android app not being detected

I have an app build on Cordova that runs both iOS and Android. When I set up the plugin, after tinkering with it a while I managed to get it working with iOS but no luck at all with Android. It throws no errors on the plugin, both Answers and Crashlytics functions seem to go by unnoticed, the sendCrash does crash the app but no logs are sent to the Fabric dashboard.
Am I missing something? If anyone else has a working app using this, how did you manage to set it up?

I'm using the un-altered plugin in production now. Sometimes the crash reports aren't sent immediately after the crash, but the next time the app is launched. This is not a limitation of the plugin, but it is how the Fabric SDK works.
I recommend double checking your two keys are correct when you add the plugin:
cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx

Ok, I must be doing something weird or my configuration is not the same... I double checked my API and Secret keys, and I'm testing with a sendCrash() after 'deviceready' and my local dependencies are verified, but the dashboard still shows nothing.
Also with an un-altered version of the plugin. I'm running mac osx 10.11.3, node 5.10.0, cordova 6.1.1, cordova-android 5.1.1, android sdk 23.0.3
iOS apps were detected after first launch in about 2 or 3 minutes, I keep launching and crashing the Android ones with no success on the fabric dashboard :(

Hi,
I have the same issue. Is there a workaround ?
node 5.6.0, cordova 6.1.0, cordova-android 5.1.1, android sdk 21

I would double check that you've added the plugin after you've added your platforms so that the build hooks can update the platform files properly.
After the first launch of the app it should show up in the dashboard.
 $ node --version
v4.2.2

 $ cordova --version
6.1.1

$ cordova create TestApp4
Creating a new cordova project.

$ cd TestApp4

$ cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=xxx --variable FABRIC_API_SECRET=xxx
Fetching plugin "cordova-fabric-plugin" via npm

 $ cordova platform add ios
Adding ios project...
iOS project created with<EMAIL_ADDRESS>Installing "cordova-fabric-plugin" for ios
Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for ios

 $ cordova platform add android
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: io.cordova.hellocordova
	Name: HelloCordova
	Activity: MainActivity
	Android target: android-23
Android project created with<EMAIL_ADDRESS>Installing "cordova-fabric-plugin" for android
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

 $ cordova prepare ios

 $ cordova prepare android

I find my bug, this is a wrong rights on my platform folder, idon't know why. I deleted all my project, clone it again and the issue is solved.  there is no issues with your plugin. :(

I'm experiencing this also. I have an existing Cordova project, with iOS and Android platforms. I add the cordova-fabric-plugin and the following files are added to my project:
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)

modified:   platforms/android/.gradle/2.2.1/taskArtifacts/cache.properties.lock
modified:   platforms/android/.gradle/2.2.1/taskArtifacts/fileHashes.bin
modified:   platforms/android/.gradle/2.2.1/taskArtifacts/fileSnapshots.bin
modified:   platforms/android/.gradle/2.2.1/taskArtifacts/outputFileStates.bin
modified:   platforms/android/.gradle/2.2.1/taskArtifacts/taskArtifacts.bin
modified:   platforms/android/AndroidManifest.xml
modified:   platforms/android/CordovaLib/build/intermediates/bundles/debug/classes.jar
modified:   platforms/android/CordovaLib/build/intermediates/bundles/release/classes.jar
modified:   platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugAssets/merger.xml
modified:   platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml
modified:   platforms/android/CordovaLib/build/intermediates/incremental/mergeReleaseAssets/merger.xml
modified:   platforms/android/CordovaLib/build/intermediates/incremental/mergeReleaseJniLibFolders/merger.xml
modified:   platforms/android/CordovaLib/build/intermediates/incremental/packageDebugResources/merger.xml
modified:   platforms/android/CordovaLib/build/intermediates/incremental/packageReleaseResources/merger.xml
modified:   platforms/android/CordovaLib/build/outputs/aar/CordovaLib-debug.aar
modified:   platforms/android/CordovaLib/build/outputs/aar/CordovaLib-release.aar
modified:   platforms/android/android.json
modified:   platforms/android/build.gradle
modified:   platforms/android/platform_www/cordova_plugins.js
modified:   platforms/android/project.properties
modified:   platforms/android/res/xml/config.xml
modified:   platforms/ios/SecretProject.xcodeproj/project.pbxproj
modified:   platforms/ios/SecretProject/SecretProject-Info.plist
modified:   platforms/ios/SecretProject/config.xml
modified:   platforms/ios/frameworks.json
modified:   platforms/ios/ios.json
modified:   platforms/ios/platform_www/cordova_plugins.js
modified:   plugins/android.json
modified:   plugins/fetch.json
modified:   plugins/ios.json
modified:   www/app/router.js

Untracked files:
(use "git add ..." to include in what will be committed)

platforms/android/cordova-fabric-plugin/
platforms/android/platform_www/plugins/cordova-fabric-plugin/
platforms/android/src/com/sarriaroman/
platforms/ios/SecretProject/Plugins/cordova-fabric-plugin/
platforms/ios/platform_www/plugins/cordova-fabric-plugin/
plugins/cordova-fabric-plugin/
I'm able to crash the app in both iOS and Android, but only the iOS app actually makes it to Crashlytics:
            window.fabric.Crashlytics.addLog("about to send a crash for testing!");
            window.fabric.Crashlytics.sendNonFatalCrash('hey its a bug');
            window.fabric.Crashlytics.sendCrash();

Is there a step I'm missing?
Thanks


a bug in preprocess.py

Hi, I wanted to point out something I noticed that took me a long time to figure out.
in preprocess.py  line 110,
# step 2: filter cells
if isinstance(self.filter_cell_by_counts, int):
Even if self.filter_cell_by_counts is passed as False, the condition still yields true and the if block from 110-117 still runs
I think this is a misunderstanding with the isinstance function, where the variable is initially defined as (line 23): filter_cell_by_counts: Union[int, bool] = False and is a bool type. However, because in python the bool class is a subclass of int, isinstance( a_bool_value , int ) will STILL return True regardless.
However, this bug isn't fatal because in line 112 sc.pp.filter_cells (False) is the same as  filter cells >=0, just thought the code could be fixed to avoid future errors. Thanks!

Thank you for bringing it up! Honestly speaking, was not aware that bool inherits int before. I've fixed it in https://github.com/bowang-lab/scGPT/commit/c1d2101188b8c3d1c1269067f4c48fd3419b7192


Fix WelsThreadLib.cpp to build under Fuchsia.

Fuchsia's POSIX compatibility layer does not provide the two pthread calls used here.

Pinging @fluffy to help with assignment


Add unix domain socket support

I've added some support for unix sockets to be able to send MQTT messages running on the same machine as the broker without needing to use the network. There is a sandbox I've been using here mqttclientjl-sandbox to smoke test with a docker container running a mosquitto broker. Let me know if need any further changes

This looks Awesome! thanks for contributing.
The smoke tests are a bit problematic for running with GH Actions. I think that is the only issue.
Even mine has been a bit unreliable, I was thinking about making a custom docker for running the smoke tests. I haven't done it with GH before though, so I am not sure how much work it will take. Maybe for now it is best to pull the smoke testes out of the runtest altogether, and I can work on adding it in later?


Commit ce607d3fcb4c730c991563b4c62725cd89ce0ced breaks "tab" functionality

Can you be more specific? What tab functionality – autocompletion? What's broken about it?
What operating system are you on, and what oh-my-zsh plugins do you have enabled?

Here's the commit: ce607d3fcb4c730c991563b4c62725cd89ce0ced
Doesn't look like it's part of a PR.
Sounds like you're talking about the tab() function inside the osx plugin. I don't know that this commit itself broke it. I undid the commit locally, and it still didn't work. New tabs opened with tab would have the cd ... command sitting there on the command line, but not executed. Is that what you're seeing?

When was the last time this actually worked for you?
I think the issue might be that the trailing semicolon in the $command string; it seems to cause iTerm to not execute it.

I put in a fix for this, #4093. Could you give it a try?

That fixes the issue that I was referencing which was the "tab" functionality that is part of the OSX plugin stopped working on my system after the referenced commit.

Cool. Do you mind giving a "+1" comment on the PR itself? That will help it get merged sooner.


Style nodes initialization and duplication fix

fela-dom/render should mount all <style> nodes and rules if necessary even before the first change event is triggerd.  These cases were not covered:

style nodes were not server-side rendered
style nodes were server-side rendered but the rules don't match with browser version

there was a weird bug when fela-dom/render was called twice right away (aka react-fela's <Provider> renderered from two points of app) - it created all style nodes twice. I believe it's because the list of mounted nodes were kept in fela-dom/render() closure and there was some delay between adding nodes into DOM and reading them from DOM. Now, this list of mounted nodes is kept in renderer which should be always singleton.

Tests: I'm trying to put together some tests for the style nodes initialization but so I haven't been lucky with JSDom yet. I'll try later again. We definitely need better coverage for fela-dom.

@rofrischmann I extracted getStyleNode into fela-tools.

Awesome! Can't wait to finally release that beast 5.0


Title: Error in loading database settings from environment variable

Description:
I encountered an error while trying to load the database settings from the environment variable DJANGO_DB_SETTINGS in my Django project. The error message indicates a JSONDecodeError, specifically "Expecting value: line 4 column 17 (char 83)".
Steps to Reproduce:

Set the DJANGO_DB_SETTINGS environment variable in the .env file.
Run the Django application.
Observe the error message in the console.

Expected Behavior:
The database settings should be loaded successfully from the DJANGO_DB_SETTINGS environment variable, and the Django application should start without any errors.
Actual Behavior:
The Django application fails to load the database settings and raises a JSONDecodeError, pointing to an issue with the content or format of the DB_SETTINGS_STRING.
Additional Information:
I have verified the format and content of the DB_SETTINGS_STRING in my .env file, and it appears to be a valid JSON string representing the database settings.
I have also confirmed that the required environment variable DJANGO_DB_SETTINGS is properly set and accessible to the Django application.

Hi @freedompraise !
I made this all a lot simpler in https://github.com/jsolly/blogthedata/pull/321 which I just merged into master.
By default, all tests are now run using sqlite instead of postgres.
If you want to use sqlite for development or production, add USE_SQLITE=True to your .env file.
Let me know if that works for you!

alright. Let me try it out

it works perfectly


Update readme for newer versions of ember-cli

Apparently ember install:addon is a thing of the past. I just tried this on version 0.2.3 and that command didn't exist. It's just ember install addon-name now.

Thanks for this @mitchlloyd there was already a different pull request fixing this, thank you anyways for this!


Update supported operating systems

The following changes should be made to specify Windows Server 2016 is only supported with Skype for Business Server 2019 Call Quality Dashboard.  This is in response to RFC clarifying supportability and the documentation
Under section "Infrastructure Requirements For CQD" (https://docs.microsoft.com/en-us/skypeforbusiness/management-tools/call-quality-dashboard/plan#infrastructure-requirements-for-cqd):
Add  Windows Server 2016 to the following line.  Example below.
"Supported Operating Systems:  Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, and Windows Server 2016 (Skype for Business Server 2019 CQD only)"
Under section "Software Requirements" (https://docs.microsoft.com/en-us/skypeforbusiness/management-tools/call-quality-dashboard/plan#software-requirements):
The line that currently states, "Windows Server 2016 with IIS" should be changed to "Windows Server 2016 with IIS 10.0 (Skype for Business Server 2019 CQD only)"

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f91216e8-0b6c-88b1-635a-401529556f78
Version Independent ID: 0b0e068d-b870-bbd2-550d-07917ec63926
Content: Plan for Call Quality Dashboard for Skype for Business Server
Content Source: Skype/SfbServer/management-tools/call-quality-dashboard/plan.md
Product: skype-for-business-itpro
GitHub Login: @kenwith
Microsoft Alias: kenwith

@NicholasBurkhammer Thank you for submitting this feedback.
From our understanding the issue has been resolved. If you feel it hasn't been resolved please re-open this issue.

@officedocsbot close


Migrate to new url

Google has changed the url to messages.google.com/web
Please update the app to use the new url :-)

Thanks @saschaeggi ,
I have updated the URL in the newest release of the app, 1.0.0 :)


[FLINK-8557][checkpointing] Remove illegal characters from operator d…

What is the purpose of the change
This fixes the problem that the operator descriptor text is used to construct the instance directory in RocksDB, but can contain characters that are illegal for paths in some file systems.
Brief change log
We replace all illegal characters with underscore before constructing the path.
Verifying this change
Check if RocksDB can be used as state backend on Windows.
This change is a trivial rework / code cleanup without any test coverage.

Thanks @zentol for the fast review! Will merge this.


Added Revisions (P5 3.1 and 3.4)

Added the Revisions based on the utterances we received.

Sorry can't pick this up.  Looks like you need to resolve some changes with another.
This branch has conflicts that must be resolved
to resolve conflicts before continuing.
Conflicting files
_notebooks/CSP/big-ideas/big-idea-3-part-1-fundamentals/Period5/aaak/2024-09-24-3.1-js.ipynb
_notebooks/CSP/big-ideas/big-idea-3-part-1-fundamentals/Period5/aaak/2024-09-24-3.1-py.ipynb
_notebooks/CSP/big-ideas/big-idea-3-part-1-fundamentals/Period5/aaak/2024-09-24-3.4-js.ipynb


Fix various typos noted while browsing the code

Looks good, merge yourself if you like. I only don't remember our policy for micro-fixes without JIRA, @Sanne? From my side that's fine.

I only don't remember our policy for micro-fixes without JIRA

Not very well defined, and it's bothering me. So let's give it a shot:
We historically followed Steve Ebersole's example "any change needs a JIRA", which I think has the benefit of affecting changelogs and removes any form of argument among the team of the form "I think this needs a JIRA".
On the other side, I struggle with this myself. I just did some cleanup of local branches and identified some dozen of improving commits which I've never shared because they were not "significant enough" to deserve a JIRA.
To be fair, that's a lot of waste.. I should have merged these patches long ago.
So I'm inclined to say "go ahead" but please let's not take this as a precedent to not create JIRAs for things which could use one... as a rule I guess we could say that a JIRA is necessary if anyone thinks so.
My "rule of thumb" is: does recording the change in JIRA add value for those reading the JIRA generated changelogs vs does it add noise?
"Various typos" is noise of course so I guess not having a JIRA is the better way.
Examples of things which will always need a JIRA, even though they are micro:

deprecated a method
any incompatibility potential (even .impl API changes)
dependency version changes
anything which might change semantics, affect default encoding / index state (even if it's a fix)

Pretty much how I'd handle this, too. +1.

Merged!


(FACT-2777) Fix lsbdist facts on ubuntu

Jenkins please test this on all

Jenkins please test this on all

CLA signed by all contributors.


Flag to add active query tracker.

Signed-off-by: Aditi Ahuja<EMAIL_ADDRESS>Fixes #5521

[x] I added CHANGELOG entry for this change.
[ ] Change is not relevant to the end user.

Changes
Added a new flag which creates a query.active file in the filepath specified by the flag.
Verification

Thanks @yeya24 :)
This breaks the E2E tests and I have a feeling it's due to the fact that they're run in containers. This seems to be an existing issue - https://github.com/prometheus/prometheus/issues/5976
Looking into how I can fix this failing test.
Thanks!

@yeya24 marked it as ready, but I think I need to add an E2E test right?

Yeah, please add it.

Just a draft :)
But the errors I was getting were permission errors which I had faced with
the CI tests too so I don't think they're related to query execution per se?
Just a quick thought though.
On Tue, 2 Aug 2022, 21:24 Saswata Mukherjee, @.***>
wrote:

@.**** commented on this pull request.
In test/e2e/query_test.go
https://github.com/thanos-io/thanos/pull/5555#discussion_r935764302:

@@ -368,6 +368,21 @@ func TestQueryWithAuthorizedSidecar(t *testing.T) {
})
}

+func TestQueryActivePath(t *testing.T) {

t.Parallel()

e, err := e2e.NewDockerEnvironment("e2e_test_query_active")
testutil.Ok(t, err)
t.Cleanup(e2ethanos.CleanScenario(t, e))

qBuilder := e2ethanos.NewQuerierBuilder(e, "1").WithActivePath("test-active")
q := qBuilder.Init()
testutil.Ok(t, e2e.StartAndWaitReady(q))

_, err = os.Stat(filepath.Join(q.InternalDir(), "test-active", "queries.active"))
testutil.Assert(t, os.IsExist(err)) // fails if os.IsExist() is false.

So I think this might fail, as you aren't executing a query against this
Querier and it won't have any active queries file.
—
Reply to this email directly, view it on GitHub
https://github.com/thanos-io/thanos/pull/5555#pullrequestreview-1059016619,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALV2I57DRQVK2RCEIL4LIDTVXFABZANCNFSM55DLGGSQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Yep, thanks! I shall do that.
On Tue, 2 Aug 2022, 21:26 Saswata Mukherjee, @.***>
wrote:

@.**** commented on this pull request.
In test/e2e/e2ethanos/services.go
https://github.com/thanos-io/thanos/pull/5555#discussion_r935766915:

@@ -345,6 +345,9 @@ func (q *QuerierBuilder) collectArgs() ([]string, error) {

  args = append(args, "--store.sd-files="+filepath.Join(q.InternalDir(), "filesd.yaml"))

}

args = append(args, "--query.active-query-path="+q.InternalDir())

It might be a bit too difficult to make it work in an e2e setup, so I
think it would be fine to skip an e2e test for this. But maybe you can
document this issue in Querier docs instead? So users are aware of the
implications of using this! 🙂
—
Reply to this email directly, view it on GitHub
https://github.com/thanos-io/thanos/pull/5555#discussion_r935766915, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ALV2I54C4MB45SNKZMEH7OLVXFAKVANCNFSM55DLGGSQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

@GiedriusS @yeya24 pls take a final look at this when you're free :)


Changing a marker's layer or icon does not update the map

Hi, changing a marker's layer and/or icon is not reflected on the map. Here's what I do:

Create a marker with right-click
Function node changes the layer from "drawing" to "myLayer"
Also change the marker's icon
Store the marker on disk
Inject the modified marker to worldmap in

The marker layer and icon stay the same. But, when I reload the page, markers are redrawn from disk and then appear with correct layer and icon.

A simple test works for me...
[{"id":"c85f4997.5de2e8","type":"worldmap","z":"ff27ff95.cc8d5","name":"","lat":"51.05","lon":"-1.35","zoom":"","layer":"","cluster":"0","maxage":"","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","path":"/worldmap","x":700,"y":100,"wires":[]},{"id":"7bb44888.47dbf8","type":"worldmap in","z":"ff27ff95.cc8d5","name":"","path":"/worldmap","x":94,"y":100,"wires":[["5a28a7a0.937928","32106c05.d40664"]]},{"id":"5a28a7a0.937928","type":"switch","z":"ff27ff95.cc8d5","name":"","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"connected","vt":"str"},{"t":"eq","v":"disconnect","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":264,"y":100,"wires":[["d70038a7.5f0f48"],[],["8849d461.d3bb58","80556c57.97ebc"]]},{"id":"8849d461.d3bb58","type":"change","z":"ff27ff95.cc8d5","name":"","rules":[{"t":"delete","p":"_sessionid","pt":"msg"},{"t":"set","p":"payload.layer","pt":"msg","to":"test","tot":"str"},{"t":"set","p":"payload.icon","pt":"msg","to":"fa-male","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":434,"y":100,"wires":[["5f7d8e38.8461f","c85f4997.5de2e8"]]}]

Your simple test doesn't work here...
On creation, the "fa-male" appears right under the marker, then disappears.
On subsequent moves, both markers appear.
Example here.

Tested with this flow:
[{"id":"1796010d.67ca7f","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"8c68be20.319c28","type":"worldmap","z":"1796010d.67ca7f","name":"","lat":"51.05","lon":"-1.35","zoom":"","layer":"","cluster":"0","maxage":"","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","path":"/worldmap4","x":810,"y":160,"wires":[]},{"id":"1e660003.479e48","type":"worldmap in","z":"1796010d.67ca7f","name":"","path":"/worldmap4","x":194,"y":160,"wires":[["7f6a84a1.7269c4"]]},{"id":"7f6a84a1.7269c4","type":"switch","z":"1796010d.67ca7f","name":"","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"connected","vt":"str"},{"t":"eq","v":"disconnect","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":364,"y":160,"wires":[[],[],["5ed42589.957864"]]},{"id":"5ed42589.957864","type":"change","z":"1796010d.67ca7f","name":"","rules":[{"t":"delete","p":"_sessionid","pt":"msg"},{"t":"set","p":"payload.layer","pt":"msg","to":"test","tot":"str"},{"t":"set","p":"payload.icon","pt":"msg","to":"fa-male","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":534,"y":160,"wires":[["8c68be20.319c28","2b1dafcc.0832d"]]},{"id":"2b1dafcc.0832d","type":"debug","z":"1796010d.67ca7f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":760,"y":240,"wires":[]}]

sorry - but that is working 100% for me on version 1.5.37
clean install on PI. using chrome browser from laptop to browse
or locally on laptop.

My bad, this particular VPS was running 1.5.36. Sorry for the noise.


Update developer guide knative links

Update the developer guides knative links and wording to be accurate
Improve wording around metrics and tracing and provide link

What this PR does / why we need it:
Updates Knative installation docs, improve logging metrics section.

/assign @cliveseldon

thanks @iancoffey ! This is very helpful!
/lgtm
/approve


codes accepts spaces and specaial characters

not sure if it is a bug or intended behavior but it causes inconsistency with Sylius
as codes in Sylius only allow characters, numbers, dash and underscore

fixed with 3.0.0 release


[Controller/tagrecorder] change wayof getting genesis vifs

This PR is for:

Server

change wayof getting genesis vifs
Checklist

[ ] Added unit test.

Backport to branches

main

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.zhengya seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


能不能直接支持Netty的ByteBuf

包装一层总是会有一些性能降低

?

can support netty ByteBuf directly？

implement a custom serializer in order to serialize netty byte bufs.
implement an FSTCoder on top of netty bytebuf (see examples: OnHeapCoder, OffHeapCoder, ..)

I won't add netty as a dependency


[Bug]: iOS - The pre-screen for Card Hub does not correspond to the selected theme

Preconditions
Login to the app
Steps to reproduce

Open SORA Card hub
Settings -> Change selected theme (dark or white).
Open SORA Card hub again
Relaunch the app
Open SORA Card hub again

Actual behavior
The pre-screen for Card Hub does not correspond to the selected theme.
CHECK THE VIDEO.
https://github.com/sora-xor/sora-card-ios/assets/51509139/c7e79c33-ccdf-414c-9b32-5bca2638b1a8
Expected behavior
The pre-screen for Card Hub should correspond to the selected theme (dark or white).
Environment
{"label"=>"Development"}
OS version
17.4.1
Additional context
Sora Dev 3.8.6 (2) version

it's still an actual task


Typo on Adaptive Cards and Bot Framework

"adaptive card" -> "Adaptive Card"
"bot framework" -> "Bot Framework"

Docs Build status updates of commit cc4b8b1:
:warning: Validation status: warnings

File
Status
Preview URL
Details

msteams-platform/concepts/Cards/cards-actions.md
:warning:Warning

Details

msteams-platform/whats-new.md
:warning:Warning

Details

msteams-platform/concepts/task-modules/task-modules-bots.md
:warning:Warning

Details

msteams-platform/concepts/Cards/cards-reference.md
:warning:Warning

Details

msteams-platform/concepts/Cards/cards-actions.md

Line 24: [Warning] Invalid file link:(~/concepts/cards/cards-actions#adaptive-card-actions).
Line 214: [Warning] Invalid file link:(~/concepts/authentication/auth-flow-bot).

msteams-platform/whats-new.md

Line 35: [Warning] Illegal link: `<a href="concepts/Cards/cards-actions.md#adaptive-card-actions">Adaptive card actions in Teams</a>` -- missing bookmark. The file concepts/Cards/cards-actions.md doesn't contain a bookmark named adaptive-card-actions.
Line 46: [Warning] Illegal link: `<a href="concepts/Cards/cards-actions.md#adaptive-card-actions">Adaptive card actions in Teams</a>` -- missing bookmark. The file concepts/Cards/cards-actions.md doesn't contain a bookmark named adaptive-card-actions.

msteams-platform/concepts/task-modules/task-modules-bots.md

Line 13: [Warning] Illegal link: `<a href="concepts/Cards/cards-actions.md#adaptive-card-actions">card action</a>` -- missing bookmark. The file concepts/Cards/cards-actions.md doesn't contain a bookmark named adaptive-card-actions.
Line 14: [Warning] Illegal link: `<a href="concepts/Cards/cards-actions.md#adaptive-card-actions">card action</a>` -- missing bookmark. The file concepts/Cards/cards-actions.md doesn't contain a bookmark named adaptive-card-actions.

msteams-platform/concepts/Cards/cards-reference.md

Line 216: [Warning] Illegal link: `<a href="concepts/Cards/cards-actions.md#adaptive-card-actions">Adaptive card actions in Teams</a>` -- missing bookmark. The file concepts/Cards/cards-actions.md doesn't contain a bookmark named adaptive-card-actions.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


deal of WETH Fails

Component
Forge
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0
What command(s) is the bug in?
forge test
Operating System
None
Describe the bug
When attempting to ERC20 deal WETH tokens there is a stdStorage failure.
code:
deal(WETH, msg.sender, 10e18, true)

output:
    ├─ [0] VM::deal(0x052b91ad9732D1bcE0dDAe15a4545e5c65D02443,<PHONE_NUMBER>000000000)
    │   └─ ← ()
    ├─ [2534] 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2::balanceOf(0x052b91ad9732D1bcE0dDAe15a4545e5c65D02443)
    │   └─ ← 0x0000000000000000000000000000000000000000000000000000000000000000
    ├─ [0] VM::record()
    │   └─ ← ()
    ├─ [534] 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2::balanceOf(0x052b91ad9732D1bcE0dDAe15a4545e5c65D02443) [staticcall]
    │   └─ ← 0x0000000000000000000000000000000000000000000000000000000000000000
    ├─ [0] VM::accesses(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)
    │   └─ ← [0xdda3916aa6ea92652756e849fc9d0eb2cc05c883bbad9b1ecb2680461b4c58c3], []
    ├─ [0] VM::load(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 0xdda3916aa6ea92652756e849fc9d0eb2cc05c883bbad9b1ecb2680461b4c58c3) [staticcall]
    │   └─ ← 0x0000000000000000000000000000000000000000000000000000000000000000
    ├─ emit WARNING_UninitedSlot(who: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, slot:<PHONE_NUMBER>37013717507433835091581028482884725370741455048669145571941090613443)
    ├─ emit SlotFound(who: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, fsig: 0x70a08231, keysHash: 0x24d7dcdb2cca236e5d3bfd8820168fe21c47f70685c96900356d9d82f1a61099, slot:<PHONE_NUMBER>37013717507433835091581028482884725370741455048669145571941090613443)
    ├─ [534] 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2::balanceOf(0x052b91ad9732D1bcE0dDAe15a4545e5c65D02443) [staticcall]
    │   └─ ← 0x0000000000000000000000000000000000000000000000000000000000000000
    ├─ [0] VM::load(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 0xdda3916aa6ea92652756e849fc9d0eb2cc05c883bbad9b1ecb2680461b4c58c3) [staticcall]
    │   └─ ← 0x0000000000000000000000000000000000000000000000000000000000000000
    ├─ [0] VM::store(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 0xdda3916aa6ea92652756e849fc9d0eb2cc05c883bbad9b1ecb2680461b4c58c3, 0x0000000000000000000000000000000000000000000000008ac7230489e80000)
    │   └─ ← ()
    ├─ [343] 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2::totalSupply()
    │   └─ ← 0x00000000000000000000000000000000000000000002fd30fc69e5d6e5628f40
    ├─ [0] VM::record()
    │   └─ ← ()
    ├─ [343] 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2::totalSupply() [staticcall]
    │   └─ ← 0x00000000000000000000000000000000000000000002fd30fc69e5d6e5628f40
    ├─ [0] VM::accesses(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2)
    │   └─ ← [], []
    └─ ← "stdStorage find(StdStorage): No storage use detected for target."

Please open this issue up in https://github.com/foundry-rs/forge-std as this is related to that library. I would transfer the issue if I could but GitHub won't let me :/

https://github.com/foundry-rs/forge-std/issues/395


slightly improved natclient.New to use concurrency

It makes the implementation of New a bit faster.
I also added multierror "github.com/hashicorp/go-multierror" to improve error message output.
When no methods can be identified now it responds with
2019/07/12 11:53:29 failed to initialize/discover a port forwarding mechanism 2 errors occurred:
	* NAT-PMP connection timed out
	* UPnP connection timed out

type outErr struct {
	name   string
	client base.Client
	err    error
}

// New attempts to initialize a port forwarding mechanism that is compatible
// with the local network.  If the protocol is not specified, the first
// compatible backend will be chosen.  Currently supported protocols are "UPnP"
// and "NAT-PMP".
func New(protocol string, verbose bool) (base.Client, error) {
	if protocol != "" {
		f := factories[protocol]
		if f == nil {
			return nil, fmt.Errorf("unknown protocol '%s'", protocol)
		}
		return invokeFactory(f, verbose)
	}
	fs := make(chan string)
	out := make(chan outErr)
	var wg sync.WaitGroup
	for i := 0; i < 4; i++ {
		wg.Add(1)
		go func() {
			defer wg.Done()
			for name := range fs {
				f := factories[name]
				c, err := invokeFactory(f, verbose)
				out <- outErr{name: name, client: c, err: err}
			}
		}()
	}
	go func() {
		wg.Wait()
		close(out)
	}()
	for _, name := range factoryNames {
		fs <- name
	}
	close(fs)
	var ret base.Client
	var err error
	for o := range out {
		if o.err != nil {
			err = multierror.Append(err, fmt.Errorf("%v %v", o.name, err))
		} else if o.client != nil && ret == nil {
			ret = o.client
			err = nil
			break
		}
	}
	if err != nil {
		err = fmt.Errorf("failed to initialize/discover a port forwarding mechanism %v", strings.TrimSpace(err.Error()))
	}
	return ret, err
}

I guess?  I would need to page the code back into my memory since it's been many years since I thought about this.  Given that support for using this sort of helper has been removed from the tor daemon, why the interest in performance?

I not working on the tor daemon. I use it for my own case, just improved it for my own purpose and sharing back. : /


add common typo detection in CI

Issue Template
Title: Add common typos detection in CI
Description:

see http://go/gh/envoyproxy/envoy/pull/7125 for an example, we err as we strive. :)
We should consider add a better linter or some common typo detection in our CI.

[optional Relevant Links:]

Any extra documentation required to understand the issue.

not dead yet.


moved create case study section from ch4 to ch5

Purpose/implementation Section
What changes are being implemented in this Pull Request?
moved the section on how to create a case study with the template case study or the makecasestudies app from the end of ch4 to the beginning of ch5
What was your approach?
copied and pasted and added some text to ensure smooth transition
What GitHub issue does your pull request address?
https://github.com/opencasestudies/OCS_Guide/issues/141
"Move creation sections from ch4 to 5"
Tell potential reviewers what kind of feedback you are soliciting.
open to feedback on everything i added, including:

the placement of the creation section in ch 5
the bullet i added to the learning objectives list to reflect the new section
added this sentence to the blurb about creating case studies: "If you'd like to create a case study to contribute to the Open Case Studies, using one of these methods is recommended, but not required." feel free to change if this is not accurate
if the new section flows organically into the next sections

New Content Checklist

[x] New content/chapter is in an Rmd file with this kind of format and headers.

[x] New content/chapter contains Learning Objectives and are in the correct format.

[x] Bookdown successfully re-renders and any new content files have been added to the _bookdown.yml.

[x] Spell check runs successfully in Github actions style-n-check).

[x] Any newly necessary packages that are needed have been added to the Dockerfile and image.

[x] Images are in the correct format for rendering.

[x] Every new image has alt text and is in a Google Slide.

[x] Each slide is described in the notes of the slide so learners relying on a screen reader can access the content. See https://lastcallmedia.com/blog/accessible-comics for more guidance on this.

[x] The color palette choices of the slide are contrasted in a way that is friendly to those with color vision deficiencies.
You can check this using Color Oracle.

fixed air pollution rendering issue, added compilation time to the table here as well.


Alignment problem when using namespace map literals

Hi! Thanks for this tool, I appreciate what you're trying to accomplish with it!
To test it, I just ran it on our code and one thing in particular is not quite right I believe. The easiest way to understand what I mean is by looking at the screenshot:

There are two things going on:

The indentation is (incorrectly) decreased with one space after every map in the list, and
I feel like the original alignment should be preserved.

I guess (2) is subjective but of course I feel very strongly about it 😉

Thank you for the report! This looks like a bug to me.


[incubator/drone] Custom command and args to Drone DinD

What this PR does / why we need it: This PR will allow to set custom command and args to Drone DinD.
Which issue this PR fixes: Reference - https://discourse.drone.io/t/docker-mtu-problem/1207
Special notes for your reviewer:

Thanks @darkyat !

Done, thanks @timstoop !

/assign @prydonius

/ok-to-test

/approve

/lgtm
And already approved by the Chart maintainer.

/lgtm


Is there a patch or document that can show how to patch kafl agent into the target linux kernel?

And are there explanations about the kafl kernel config parameters?For example:
grep KAFL config.vanilla.virtio
CONFIG_TDX_FUZZ_KAFL=y
CONFIG_TDX_FUZZ_KAFL_DETERMINISTIC=y
CONFIG_TDX_FUZZ_KAFL_DEBUGFS=y
CONFIG_TDX_FUZZ_KAFL_TRACE_LOCATIONS is not set
CONFIG_TDX_FUZZ_KAFL_VIRTIO=y
CONFIG_TDX_FUZZ_KAFL_SKIP_MSR=y
CONFIG_TDX_FUZZ_KAFL_SKIP_CPUID=y
CONFIG_TDX_FUZZ_KAFL_SKIP_IOAPIC_READS is not set
CONFIG_TDX_FUZZ_KAFL_SKIP_ACPI_PIO is not set
CONFIG_TDX_FUZZ_KAFL_SKIP_RNG_SEEDING=y
CONFIG_TDX_FUZZ_KAFL_SKIP_PARAVIRT_REWRITE is not set
CONFIG_TDX_FUZZ_KAFL_VANILLA_PAYLOAD=y
CONFIG_TDX_FUZZ_KAFL_VANILLA_INJECTION_SAMPLE=y

Hi @liujf628995,
I totally agree that the currrent Linux Kernel Tutorial lacks documentation on the internals of the kafl-agent, and its configuration options.
In my opinion it doesn't serve it's purpose very well as an introduction to kAFL.
I started an initiative to improve the documentation, but it will take time.
That's why I started to build another Linux based target, more accessible: the DVKM module:
https://github.com/IntelLabs/kafl.targets/pull/31
I'm currently building a detailed tutorial for this, and will be publishing it in a few weeks.
Were you specifically interested by the Linux kernel virtualization interfaces fuzzing (Virtio, MSR, CPUID, IOAPIC, RNG,...), and the new DVKM (Damn Vulnerable Kernel Module) target could suit your needs ?

Would you want to replace the KAFL Agent with DVKM?Or just add this module to the existing agent?

The exisitng kafl-agent was very specialized to fuzz the linux kernel virtualization communication channels, it's very complicated to understand and maintain, even more for a beginner.
The kafl-agent for DVKM will be minimal, only inserting crash hypercalls at the right locations in the kernel, and the rest will be in userland.

Hi @liujf628995
The DVKM tutorial has now been merged upstream, and the documentation is online:
https://intellabs.github.io/kAFL/tutorials/linux/dvkm/target.html
I'm eager to receive your feedback on it, what works and what doesn't, what's unclear and what unanswered questions you might have.

Thanks for your detailed tutorial,I'll try it these days and give you feedback later.

Hi @liujf628995
The DVKM tutorial has now been merged upstream, and the documentation is online: https://intellabs.github.io/kAFL/tutorials/linux/dvkm/target.html
I'm eager to receive your feedback on it, what works and what doesn't, what's unclear and what unanswered questions you might have.

Thanks !
Closing this issue for now, feel free to reopen if necessary


Use '_test' package when appropriate

If the -exported flag is set, it makes more sense to use the _test package by default in the generated code.

Can you please give me an example? I'm not exactly sure what you mean by "_test package".

When testing only exported functions, tests are encouraged to use the <package>_test package instead of just <package>. It has the effect of making the user think more about what he exports and forces him to only test exported methods. It is the exception to the only one package per directory rule.

 I had never heard of that before, but I just tested it out, and it works. Since which Go version is that a thing?
Could you please point me to some documentation for this feature? I have trouble finding it.

Unfortunately I can't find any official documentation of the feature... There's a good amount of blog posts and stackoverflow answers alluding to it positively though. There doesn't seem to be a general consensus on when to use it. The official blog uses it here but doesn't specify why. I assume it's to isolate the scope of test related variables.
Maybe it would be best to just make it optional?

The other time I've seen it used is to make ExampleXXX functions copy and paste friendly. Since they need to be compilable, if you write them in the regular package name you won't have the package name for your example code. https://blog.golang.org/examples

This feature is documented here.

Test files that declare a package with the suffix "_test" will be compiled as a separate package, and then linked and run with the main test binary.

This would be a great feature to have

I would like to see this feature too. Testing a library from a _test package proves that the library can be used by others.


Added Litmus Checker

Signed-off-by: Soumya Ghosh Dastidar<EMAIL_ADDRESS>What this PR does / why we need it:

Adds Litmus Checker required in chaos-workflows
Litmus Checker creates ChaosEngines from provided artefact in a workflow and ensures the workflow doesn't complete before the experiment

@ispeakc0de @ksatchit PTAL.


Prefer (L)GPL 3.0 to 2.x.

The GPL v3 is an improvement over v2 fixing several issues and
increasing compatibility with other free software licenses.  As such
there is no reason to feature v2 prominently rather than v3.  See
http://www.gnu.org/licenses/rms-why-gplv3.en.html for more rationale.

Thanks for the pull request, and the link to a primary source.


Fix echarts staggering

Removes the debounce workaround in echarts.js in favour of removing debounced calls during component initialization

Missing changeset

merging into #1598 who already has a changeset for this


[BUG] need help on button change

if i change in the code the button to streamtape i get this error
Streamtape opens and than this error appers and after that everything is fucked
maybe you can help me to fix it
2023-07-05 22:20:40,009: INFO    start_app -> We have this many seasons: 2
2023-07-05 22:20:40,452: INFO    start_app -> Season 1 has 24 Episodes.
2023-07-05 22:20:47,597: ERROR   start_app -> ----------
2023-07-05 22:20:47,597: ERROR   start_app -> Exception: 'NoneType' object has no attribute 'get'
2023-07-05 22:20:47,597: ERROR   start_app -> ----------

@deinemamaliebtdichnicht Any updates/infos?

@deinemamaliebtdichnicht Please respond or I will have to close the Issue.

Closed. No Response from creator.


Error Handling help

I struggled to invoke a failure to ADF from the webhook so below is the powershell I used to help others:
Param(
[object]$WebhookData
)
if ($WebhookData){
$parameters = (ConvertFrom-Json -InputObject $WebhookData.RequestBody)
if($parameters.callBackUri) {$callBackUri = $parameters.callBackUri}
}
$jsonRequest = [ordered]@{
output= @{
restoreStatus = "Failed"
}
error = @{
ErrorCode = "RestoreError"
Message = "Restoring the Database failed"
}
statusCode = "500"
}
    $jsonBody = $jsonRequest | ConvertTo-Json -Depth 10

    $jsonBody

    $headers = @{
        "Content-Type"="application/json"
    }

    Invoke-WebRequest -Uri $callBackUri -UseBasicParsing -Method POST -Body $jsonBody -Header $headers

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d6f4db3e-4194-0e9e-a4d1-1c456c6f2efe
Version Independent ID: fbf5b447-3b63-ac21-ddac-903341223938
Content: Webhook activity in Azure Data Factory - Azure Data Factory
Content Source: articles/data-factory/control-flow-webhook-activity.md
Service: data-factory
GitHub Login: @djpmsft
Microsoft Alias: daperlov

Thanks for the feedback and bringing this to our notice . At this time we are reviewing the feedback and will update the document as appropriate .

Hello @bigdaveydave .  Could you please clarify the ask?
Is there a problem to be solved, or is this code you wish to contribute to the documentation?
If this is code you wish to contribute, could you please give more context of when to use it, and explain in detail the expected behavior?

If this code can be contributed in some way as an example I think it could help users a lot more.
Context - Calling a Webhook from an ADF pipeline to perform a Restore of an Azure SQL Database, if it fails I want the ADF pipeline to fail also and not carry on performing any more activities.
This section is for the start of your powershell script:
Param(
[object]$WebhookData
)
if ($WebhookData){
$parameters = (ConvertFrom-Json -InputObject $WebhookData.RequestBody)
if($parameters.callBackUri) {$callBackUri = $parameters.callBackUri}
}

You need the parameter to receive the Webhookdata from ADF and then you can get the callbackuri so you can send a web request back to say whether it succeeds or fails.
If it succeeds then you can simply put:
Invoke-WebRequest -Uri $callBackUri -UseBasicParsing -Method POST
If it fails then in the catch I have put the following to fail the ADF webhok activity:
$jsonRequest = [ordered]@{
                                output= @{
                                    restoreStatus = "Failed"
                                }
                                error = @{
                                    ErrorCode = "RestoreError"
                                    Message = "Restoring the Database failed"
                                }
                                statusCode = "500"
                            }

        $jsonBody = $jsonRequest | ConvertTo-Json -Depth 10

        $jsonBody

        $headers = @{
            "Content-Type"="application/json"
        }

        Invoke-WebRequest -Uri $callBackUri -UseBasicParsing -Method POST -Body $jsonBody -Header $headers

Hope this helps. If you need more information let me know.

Thank you very much for the clarification @bigdaveydave .  A webhook tutorial would be a beneficial addition to our docs.  Would you be interested in helping create one?

@djpmsft This contribution could be helpful in illustrating how to implement the "Report status on callback" option of Webhook.  Do you think I should insert this into the docs, or should I leave as is?
This implementation is specific to PowerShell.  If I read this in the docs, I would ask "how do I get URL for my PowerShell".
In my opinion, a full tutorial / how-to would be a beneficial addition to the docs.  To match the standards of the other tutorials, the following points would be covered:

Create Data Factory
Create Compute service (or whatever hosts the endpoint)
Get a URL
Make pipeline and WebHook activity
Write script to respond to WebHook
Pipeline response to callback

I just wanted to add that I was struggling with callbacks as it is currently documented here (and elsewhere) and it was only when i read this open issue that I managed to get a callback working with a body by following @bigdaveydave's example.

This is really helpful! I spent 2 hours to find an example of how to fail a runbook webhook activity. And I got it here. Great, thanks very much!

#assign chez-charlie

Hi Surface Errors back to WebHook has now been implemented. There is a new setting called reportStatusOnCallBack that you can configure now. Thanks for the feedback #please-close


Is this the correct approach to building a multi-agent application using Pydantic AI?

Hi Team,
I have been working on extending the sample provided at Pydantic AI Bank Support Example, and I’ve added a multi-agent system that includes several agents interacting with each other. Here’s an overview of what I’ve implemented:
Multi-Agent System Breakdown:

Triage Agent: This agent receives customer queries and determines whether the query is related to support or loan. It then calls either the Support Agent or Loan Agent using tools based on the query type.
Support Agent: Handles customer support queries, such as balance checks and card blocking. It can call the Marketing Agent to capture customer details (e.g., their name).
Loan Agent: Deals with loan-related queries, such as loan status and loan balance. It can also call the Marketing Agent to capture customer details.
Marketing Agent: A backend agent responsible for capturing customer details (e.g., saving the customer’s name and tracking inquiries in a CSV file).

Each agent is called via Tools and utilizes RunContext to pass dependencies. The tools call_support_agent and call_loan_agent are used by the Triage Agent to forward the query to the appropriate agent based on the customer’s request.
Sample Output:
Here is an example of what the output looks like for various queries:
Prompt: What is my balance?
Response: Hello John, your current account balance is $123.45.

Prompt: My card is lost. Please help!
Response: I'm sorry to hear that, John. We are temporarily blocking your card to prevent unauthorized transactions. Please confirm if you need further assistance or would like to request a new card.

Prompt: What is the status of my loan?
Response: Your loan status is currently 'Active' and the remaining balance is $5000.

Prompt: How tall is the Eiffel Tower?
Response: I'm sorry, but I cannot answer questions that don't relate to loans or support. Please let me know if you have any queries regarding loans or bank support!

My Questions:

Is this the correct approach to building a multi-agent application using Pydantic AI?
Are the dependencies, tools, and agents interacting correctly in this structure?
Is there a more optimal way to organize or manage communication between agents in this setup?

I’m looking for feedback on whether the way I’ve implemented these agents and their interaction is aligned with best practices for multi-agent systems in Pydantic AI. Any suggestions or improvements would be greatly appreciated.
Thanks for your help!
logFire Debug lines ( nicely indented - Thanks to whoever coded that!  🙏)
********************************************************************************
Prompt: What is my balance?
********************************************************************************
06:05:07.247 triage_agent run prompt=What is my balance?
06:05:07.247   preparing model and tools run_step=1
06:05:07.248   model request
Logfire project URL: https://logfire.pydantic.dev/ishswar/weather
06:05:07.996   handle model response
06:05:07.997     running tools=['call_support_agent']
06:05:07.997     support_agent run prompt=What is the customer's account balance?
06:05:07.997       preparing model and tools run_step=1
06:05:07.998       model request
06:05:09.375       handle model response
06:05:09.376         running tools=['customer_balance', 'capture_customer_name']
06:05:09.377         marketing_agent run prompt=Save customer name John for ID 123
06:05:09.378           preparing model and tools run_step=1
06:05:09.378           model request
06:05:10.252           handle model response
06:05:10.253             running tools=['save_customer_name']
06:05:10.256           preparing model and tools run_step=2
06:05:10.257           model request
06:05:10.901           handle model response
06:05:10.905       preparing model and tools run_step=2
06:05:10.906       model request
06:05:12.569       handle model response
06:05:12.575   preparing model and tools run_step=2
06:05:12.575   model request
06:05:14.432   handle model response
Your current account balance is $123.45, including pending transactions.

Full Code
import os
import csv
import uuid
import dotenv
import logfire
from typing import Any, Optional
from dataclasses import dataclass
from pydantic import BaseModel, Field
from pydantic_ai.result import RunResult
from pydantic_ai import Agent, RunContext

# Load environment variables
dotenv.load_dotenv()
# # 'if-token-present' means nothing will be sent (and the example will work) if you don't have logfire configured
# logfire.configure()

# --- Fake Database for Loan Data ---
class LoanDB:
    """This is a fake loan database for example purposes.

    In reality, you'd be connecting to an external database
    (e.g., PostgreSQL) to manage loan information.
    """

    @classmethod
    async def customer_name(cls, *, id: int) -> str | None:
        if id == 123:
            return 'John'

    @classmethod
    async def loan_status(cls, *, id: int) -> str | None:
        """Fetch the loan status of a customer by their ID."""
        if id == 123:
            return 'Active'
        elif id == 124:
            return 'Paid off'
        elif id == 125:
            return 'Defaulted'
        else:
            return None

    @classmethod
    async def cancel_loan(cls, *, id: int) -> str:
        """Cancel a loan for a customer."""
        if id == 123:
            # Fake logic for canceling a loan
            return f"Loan for customer ID {id} has been canceled."
        else:
            raise ValueError(f"Customer with ID {id} does not have an active loan.")

    @classmethod
    async def add_loan(cls, *, id: int, amount: float, interest_rate: float) -> str:
        """Add a loan for a customer."""
        if id == 123:
            # Fake logic for adding a loan
            return f"Loan of ${amount} with an interest rate of {interest_rate}% has been added for customer ID {id}."
        else:
            raise ValueError(f"Customer with ID {id} cannot be found to add a loan.")

    @classmethod
    async def loan_balance(cls, *, id: int) -> float | None:
        """Fetch the remaining balance of a customer's loan."""
        if id == 123:
            return 5000.0  # Fake loan balance
        elif id == 124:
            return 0.0  # Loan paid off
        else:
            raise ValueError(f"Customer with ID {id} not found or no loan exists.")

# --- Fake Database for Customer Data ---
class DatabaseConn:
    """This is a fake database for example purposes.

    In reality, you'd be connecting to an external database
    (e.g. PostgreSQL) to get information about customers.
    """

    @classmethod
    async def customer_name(cls, *, id: int) -> str | None:
        if id == 123:
            return 'John'

    @classmethod
    async def customer_balance(cls, *, id: int, include_pending: bool) -> float:
        if id == 123:
            return 123.45
        else:
            raise ValueError('Customer not found')

# --- Dependencies ---

@dataclass
class SupportDependencies:
    customer_id: int
    db: DatabaseConn
    marketing_agent: Agent

@dataclass
class LoanDependencies:
    customer_id: int
    db: LoanDB
    marketing_agent: Agent

@dataclass
class TriageDependencies:
    support_agent: Agent
    loan_agent: Agent
    customer_id: int

# --- Result Models ---
class SupportResult(BaseModel):
    support_advice: str = Field(description='Advice returned to the customer')
    block_card: bool = Field(description='Whether to block their')
    risk: int = Field(description='Risk level of query', ge=0, le=10)
    customer_tracking_id : str = Field(description='Tracking ID for customer')

class LoanResult(BaseModel):
    loan_approval_status: str = Field(description='Approval status of the loan (e.g., Approved, Denied, Pending)')
    loan_balance: float = Field(description='Remaining balance of the loan')
    customer_tracking_id: str = Field(description='Tracking ID for the customer applying for the loan')

class TriageResult(BaseModel):
    department: Optional[str] = Field(description='Department to direct the customer query to')
    response: Optional[LoanResult | SupportResult] = Field(description='Response to the customer query')
    text_response: Optional[str] = Field(description='Text response to the customer query')

# --- Agents ---

# Support agent for handling customer support queries
support_agent = Agent(
    'openai:gpt-4o-mini',
    deps_type=SupportDependencies,
    result_type=SupportResult,
    system_prompt=(
        'You are a support agent in our bank, give the '
        'customer support and judge the risk level of their query. '
        "Reply using the customer's name."
        'Additionally, always capture the customer's name in our marking system using the tool `capture_customer_name`, regardless of the query type. '
        'At the end of your response, make sure to capture the customer's name to maintain proper records. '
    ),
)

@support_agent.system_prompt
async def add_customer_name(ctx: RunContext[SupportDependencies]) -> str:
    customer_name = await ctx.deps.db.customer_name(id=ctx.deps.customer_id)
    return f"The customer's name is {customer_name!r}"

@support_agent.tool()
async def block_card(ctx: RunContext[SupportDependencies] , customer_name: str ) -> str:
    return f"I'm sorry to hear that, {customer_name}. We are temporarily blocking your card to prevent unauthorized transactions."

@support_agent.tool
async def customer_balance(
    ctx: RunContext[SupportDependencies], include_pending: bool
) -> str:
    """Returns the customer's current account balance."""
    balance = await ctx.deps.db.customer_balance(
        id=ctx.deps.customer_id,
        include_pending=include_pending,
    )
    return f'${balance:.2f}'

# Loan agent for handling loan-related queries

loan_agent = Agent(
    'openai:gpt-4o-mini',
    deps_type=LoanDependencies,
    result_type=LoanResult,
    system_prompt=(
        'You are a support agent in our bank, assisting customers with loan-related inquiries. '
        'For every query, provide the following information: '
        '- Loan approval status (e.g., Approved, Denied, Pending) '
        '- Loan balance '
        'Please ensure that your response is clear and helpful for the customer. '
        'Always conclude by providing the customer's name and capturing their information in the marking system using the tool `capture_customer_name`. '
        'Never generate data based on your internal knowledge; always rely on the provided tools to fetch the most accurate and up-to-date information.'
    ),
)

# Add the customer's name to the response
@loan_agent.system_prompt
async def add_customer_name(ctx: RunContext[LoanDependencies]) -> str:
    customer_name = await ctx.deps.db.customer_name(id=ctx.deps.customer_id)
    return f"The customer's name is {customer_name!r}"

# Tools for the loan agent
@loan_agent.tool()
async def loan_status(ctx: RunContext[LoanDependencies]) -> str:
    status = await ctx.deps.db.loan_status(id=ctx.deps.customer_id)
    return f'The loan status is {status!r}'

@loan_agent.tool()
async def cancel_loan(ctx: RunContext[LoanDependencies]) -> str:
    return await ctx.deps.db.cancel_loan(id=ctx.deps.customer_id)

@loan_agent.tool()
async def add_loan(ctx: RunContext[LoanDependencies], amount: float, interest_rate: float) -> str:
    return await ctx.deps.db.add_loan(id=ctx.deps.customer_id, amount=amount, interest_rate=interest_rate)

@loan_agent.tool()
async def loan_balance(ctx: RunContext[LoanDependencies]) -> float:
    return await ctx.deps.db.loan_balance(id=ctx.deps.customer_id)

# End of the loan agent

# Common tool for capturing the customer's name
# Used by both the support and loan agents
@support_agent.tool
@loan_agent.tool
async def capture_customer_name(ctx: RunContext[SupportDependencies], customer_name: str) -> str:
    """Capture the customer's name for marketing purposes."""

    await ctx.deps.marketing_agent.run(f"Save customer name {customer_name} for ID {ctx.deps.customer_id}", deps=ctx.deps)

    tracking_id = str(uuid.uuid4())
    return tracking_id

# Start of the triage agent

# Triage agent to direct customer queries to the appropriate department
triage_agent = Agent(
    'openai:gpt-4o-mini',
    deps_type=TriageDependencies,
    system_prompt=(
        'You are a triage agent in our bank, responsible for directing customer queries to the appropriate department. '
        'For each query, determine whether it is related to support (e.g., balance, card, account-related queries) or loan services (e.g., loan status, application, and loan-related inquiries). '
        'If the query is related to support, direct the customer to the support team with an appropriate response. '
        'If the query is related to loans, direct the customer to the loan department with a relevant response. '
        'If the query is unclear or does not fit into either category, politely inform the customer and suggest they ask about loans or support. '
        'Always ensure that the response is clear, concise, and provides direction to the right department for further assistance.'
        'Never generate data based on your internal knowledge; always rely on the provided tools to fetch the most accurate and up-to-date information.'
    ),
    result_type=TriageResult,
)

# Start of the tools for the triage agent

@triage_agent.tool
async def call_support_agent(ctx: RunContext[TriageDependencies], prompt: str) -> RunResult[Any]:
    # print(f"Calling support agent with prompt: {prompt}")
    support_deps = SupportDependencies(customer_id=ctx.deps.customer_id, db=DatabaseConn(), marketing_agent=marketing_agent)

    return await ctx.deps.support_agent.run(prompt, deps=support_deps)

@triage_agent.tool
async def call_loan_agent(ctx: RunContext[TriageDependencies], prompt: str) -> RunResult[Any]:
    # print(f"Calling loan agent with prompt: {prompt}")
    loan_deps = LoanDependencies(customer_id=ctx.deps.customer_id, db=LoanDB(), marketing_agent=marketing_agent)

    return await ctx.deps.loan_agent.run(prompt, deps=loan_deps)

# End of the tools for the triage agent

# Marketing agent for saving customer names
marketing_agent = Agent(
    'openai:gpt-4o-mini',
    deps_type=SupportDependencies,
    system_prompt=(
        'You are a marketing agent in our bank'
        'For now you only save the customer name in our marking system using tool `save_customer_name`'
    ),
)

@marketing_agent.tool_plain
async def save_customer_name(customer_name: str, customer_id: int) -> None:
    """Saves the customer's name and tracks how many times their info is captured."""
    # print(f"Saving customer name {customer_name} for ID {customer_id}. in the marketing system")
    # Path to the CSV file
    csv_file_path = 'customer_name.csv'

    # If the file does not exist, create it and write the header
    if not os.path.exists(csv_file_path):
        with open(csv_file_path, 'w', newline='') as f:
            writer = csv.writer(f)
            writer.writerow(['customer_id', 'customer_name', 'inquiries_count'])

    # Read the existing data to check if the customer already exists
    customer_found = False
    rows = []
    with open(csv_file_path, 'r', newline='') as f:
        reader = csv.reader(f)
        rows = list(reader)

    # Check if the customer ID already exists and update the inquiry count
    for row in rows:
        if row[0] == str(customer_id):
            row[2] = str(int(row[2]) + 1)  # Increment the inquiry count
            customer_found = True
            break

    # If the customer was not found, add a new row with inquiry count starting from 0
    if not customer_found:
        rows.append([str(customer_id), customer_name, '0'])

    # Write the updated data back to the CSV file
    with open(csv_file_path, 'w', newline='') as f:
        writer = csv.writer(f)
        writer.writerows(rows)

    # print(f"Customer data updated for ID {customer_id} with name {customer_name}.")

def print_prompt(prompt: str):
    print("*" * 80)
    print(f"Prompt: {prompt}")
    print("*" * 80)

# Main function to run the triage agent
def main():
    deps = TriageDependencies(support_agent=support_agent, loan_agent=loan_agent, customer_id=123)
    prompt = 'What is my balance?'
    print_prompt(prompt)
    result = triage_agent.run_sync(prompt, deps=deps)
    print(result.data.text_response)
    # print(result.data.model_dump_json(indent=2))
    """
    {
      "department": "support",
      "response": {
        "support_advice": "Your current account balance is $123.45.",
        "block_card": false,
        "risk": 2,
        "customer_tracking_id": "13673e99-70ff-4851-8737-d06e66151234"
      },
      "text_response": "Your current account balance is $123.45."
    }
        """

    prompt = 'My card is lost. Please help!'
    print_prompt(prompt)
    result = triage_agent.run_sync(prompt, deps=deps)
    print(result.data.text_response)
    # print(result.data.model_dump_json(indent=2))
    """
    {
      "department": "support",
      "response": {
        "support_advice": "I'm sorry to hear that, John. We are temporarily blocking your card to prevent unauthorized transactions.",
        "block_card": true,
        "risk": 8,
        "customer_tracking_id": "04ee6c84-d996-43ae-b049-466c36249042"
      },
      "text_response": "I'm sorry to hear that, John. We are temporarily blocking your card to prevent unauthorized transactions."
    }
        """
    prompt = 'What is the status of my loan?'
    print_prompt(prompt)
    result = triage_agent.run_sync(prompt, deps=deps)
    print(result.data.text_response)
    # print(result.data.model_dump_json(indent=2))

    """
    {
      "department": "loan",
      "response": {
        "loan_approval_status": "Active",
        "loan_balance": 5000.0,
        "customer_tracking_id": "3ec98579-43cc-4fb0-86eb-bd49ac66479c"
      },
      "text_response": "Your loan status is currently 'Active' and you have a remaining loan balance of $5000. If you need further assistance, feel free to reach out!"
    }
        """
    prompt = 'How tall is Eiffel tower ?'
    print_prompt(prompt)
    result = triage_agent.run_sync(prompt, deps=deps)
    print(result.data.text_response)
    #print(result.data.model_dump_json(indent=2))

if __name__ == '__main__':
    main()

Thanks so much for this, this is really interesting,
Yes this is roughly what we're thinking of, you might also be interested in #120.
There are a few things I think we can do to make this even simpler:

use the same deps across all agents, so we can pass deps around freely - I don't see any downside to this
provide a cleaner way of registering agents as tools
Introduce and recommend a DOA pattern for data access - we almost have this already in these examples

Looks solid. No better idea currently on how to build multi-agents. And thanks for sharing this. I am also currently working on a kind of multi-agent system.
But I tried to use just tools so far. What I'm currently struggling with is getting the agent to always think before deciding to use a tool to answer the user's message. I haven't found a way to add a rule so the agent does this consistently.
But I think your approach with the multi-agent could work for me. I could create a thinking/planning agent and use it as a dependency.

@ishswar really cool example!
I think there is (at least) two different types of multi-agent systems. (I'm making up terms on the spot):

Orchestrator: Each message is initially send to the orchestrator agent, which then forwards single tool calls to other agents as necessary. It follows an analogy of "let me ask my colleague and get back to you".
Handoff: The current agent can decide at any point to handoff a conversation to a different agent to lead the conversation. It follows an analogy of "let me forward you to my colleague".

The example above uses the Orchestrator approach. I have a gut feeling that this is a serious limitation for more complex systems.
Notices that my brain works faster than my fingers can type
How about this:
# --- Result Model ---
class AgentResult(BaseModel):
    response: str = Field(description="Response to the customer")
    target_agent: Optional[str] = Field(description="Agent to hand over to", default=None)

# --- Dependencies ---
@dataclass
class AgentDependencies:
    conversation_id: str
    user_id: str

# --- Agents ---
triage_agent = Agent(
    "openai:gpt-4o",
    deps_type=AgentDependencies,
    result_type=AgentResult,
    system_prompt="""You are a triage agent that directs customers to the right department.
    For technical issues (internet, service outages, connection problems), set target_agent to 'tech_support'.
    For billing issues (payments, charges, invoices), set target_agent to 'billing'.
    For general inquiries, handle them yourself without setting a target_agent.
    """
)

tech_support = Agent(
    "openai:gpt-4o",
    deps_type=AgentDependencies,
    result_type=AgentResult,
    system_prompt="""You are a technical support agent. Handle technical issues.
    If a billing question comes up, set target_agent to 'billing' in your response.
    """
)

billing_agent = Agent(
    "openai:gpt-4o",
    deps_type=AgentDependencies,
    result_type=AgentResult,
    system_prompt="""You are a billing support agent. Handle billing issues.
    If a technical question comes up, set target_agent to 'tech_support' in your response.
    """
)

# --- Router ---
class AgentRouter:
    def __init__(self):
        self.agents = {
            "triage": triage_agent,
            "tech_support": tech_support,
            "billing": billing_agent
        }

    async def handle_conversation(self, prompt: str, deps: AgentDependencies) -> str:
        current_agent = self.agents["triage"]

        while True:
            # Run current agent
            result = await current_agent.run(prompt, deps=deps)

            # Check for handover
            if result.data.target_agent:
                print(f"Handing over to {result.data.target_agent}")
                current_agent = self.agents[result.data.target_agent]
                continue

            # No handover needed, return response
            return result.data.response

@pietz this is an elegant approach, thanks. I will try it.

See also:

#83 which would provides alternative sugar for deciding the next thing to do
#142 which would allow you to optionally end a run and call a different agent

I implemented my agents using an Orchestrator approach last week, and I found it to be more effective than the router method. In this setup, the first agent has a comprehensive view of the overall process, utilizing all other agents as tools to achieve the desired outcome. This is analogous to a manager who assigns tasks to different team members and reviews the results before presenting them to the boss.
In contrast, the handoff approach tends to miss important details, as each agent only has knowledge of specific tasks or information. The Orchestrator method ensures a more cohesive and integrated workflow.

I have a question regarding agents being used as dependencies for other agents. In what scenarios do we actually need this? For example, in @ishswar's example, the triage agent has dependencies on the support and loan agents. Why can't we directly use the support and loan agents instead of passing them as dependencies to the triage agent?
I am actually trying to create a sample pydanticai fast api backend. A

I have a question regarding agents being used as dependencies for other agents. In what scenarios do we actually need this? For example, in @ishswar's example, the triage agent has dependencies on the support and loan agents. Why can't we directly use the support and loan agents instead of passing them as dependencies to the triage agent? I am actually trying to create a sample pydanticai fast api backend.

I think there's no reason to make an agent a dependency, agents are generally global and immutable, so you can use them without making them deps.

I've proposed #541 which I hope documents multi-agent applications pretty well.
Full support for graphs is coming too, see #528 and #539.
I'd love your feedback, particularly on #541 at this time.


Nested queries

How i can use nested queries such as:
SELECT
  AVG(report.count) AS avg
FROM (
  SELECT
  COUNT(SR.id) AS count
FROM
  api_session S
LEFT JOIN
  search_report SR
ON
  SR.api_session_id = S.id
GROUP BY
  S.id) AS report;

//Before create nested query

       $subQuery = $this->getQueryBuilder()->select('COUNT(SR.id) AS count')->from($this->tableName, 'S');
        $subQuery->leftJoin('search_report', 'SR')->on('SR.api_session_id = S.id');
        $subQuery->groupBy(['S.id']);
//convert to string
        $subQuery = $this->getQueryBuilder()->toSql($subQuery);
// now u can set from string
        $query = $this->getQueryBuilder()->select('AVG(count) AS avg')->setFrom('(' . $subQuery . ')');