@collective-intelligence/external-apps-client-sdk-react 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -226,7 +226,7 @@ Your server invokes an Agent with `agents.invoke({ agentId, input })`, which ret
226
226
 
227
227
  For a multi-turn chat, use the shared chat. Start a Conversation with the Agent with `ci.chat.createConversation({ organizationId, payload: { agentId } })`, send each message with `createChatClient(ci, { organizationId }).send({ conversationId, message })` from `@collective-intelligence/external-apps-server-sdk/chat`, and read earlier turns with `ci.chat.getTranscript`. Each turn is an ordinary Agent run, and the earlier successful turns, with their saved Agent Output, become the model's conversation history. A message sent while a turn still runs steers that turn and starts no second turn, and a resend with the same message `id` adds nothing.
228
228
 
229
- `send` resolves `{ ok: true, value, runId }`: `runId` is the id of the turn's run, which the answer message also carries as `metadata.invocationId`, and `turnRunId(message)` reads it from any answer message. `runs.get`, `runs.sources` and `runs.feedback` accept that id like the `runId` of `agents.invoke`. They answer only the caller that owns the Conversation (the member, the app server or the visitor) through the application where the Conversation started, and answer `not_found` to every other caller. As for any run, only a signed-in member reads `runs.sources` and gives `runs.feedback`. `runs.get` gives the status and `result: { message, output? }`, where `output` is the Agent Output that the turn saved. `runs.sources` gives the searched Document Versions with their pages and a download link. `runs.stream` and `runs.cancel` read only runs that `agents.invoke` started: follow a turn with `GET /runs/:runId/stream` of the chat mount, and stop it with `ci.chat.cancelTurn`.
229
+ `send` resolves `{ ok: true, value, runId }`: `runId` is the id of the turn's run, which the answer message also carries as `metadata.invocationId`, and `turnRunId(message)` reads it from any answer message. `runs.get`, `runs.sources` and `runs.feedback` accept that id like the `runId` of `agents.invoke`. They answer only the caller that owns the Conversation (the member, the app server or the visitor) through the application where the Conversation started, and answer `not_found` to every other caller. As for any run, only a signed-in member reads `runs.sources` and gives `runs.feedback`. `runs.get` gives the status and `result: { message, output? }`, where `output` is the Agent Output that the turn saved. `runs.feedback` also rates a succeeded turn whose answer is only its Agent Output, with the Output's JSON text as the rated answer; a turn with neither text nor Output has no answer to rate and gets `not_found`. `runs.sources` gives the searched Document Versions with their pages and a download link. `runs.stream` and `runs.cancel` read only runs that `agents.invoke` started: follow a turn with `GET /runs/:runId/stream` of the chat mount, and stop it with `ci.chat.cancelTurn`.
230
230
 
231
231
  Anonymous visitors can chat with an Agent only when its audience has `anonymous: [app]` for that application and the call passes `caller: { kind: "anonymous_visitor", visitor: { issuer, subjectId } }`. Their turns run with the Agent's own bindings, never with the application's grants, and visitors never see each other's conversations.
232
232
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@collective-intelligence/external-apps-client-sdk-react",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "React bindings for Collective Intelligence external applications.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -54,12 +54,12 @@
54
54
  "type-check": "bun check --no-script -p tsconfig.json"
55
55
  },
56
56
  "dependencies": {
57
- "@collective-intelligence/effect-xstate": "0.9.0",
58
- "@collective-intelligence/external-apps-client-sdk": "0.9.0",
57
+ "@collective-intelligence/effect-xstate": "0.9.2",
58
+ "@collective-intelligence/external-apps-client-sdk": "0.9.2",
59
59
  "nuqs": "2.10.1"
60
60
  },
61
61
  "peerDependencies": {
62
- "@collective-intelligence/ui-react": "0.9.0",
62
+ "@collective-intelligence/ui-react": "0.9.2",
63
63
  "@tanstack/react-query": "^5.101.4",
64
64
  "effect": "^4.1.0",
65
65
  "react": ">=18.2 <20",
@@ -70,7 +70,7 @@
70
70
  "access": "public"
71
71
  },
72
72
  "devDependencies": {
73
- "@collective-intelligence/ui-react": "0.9.0",
73
+ "@collective-intelligence/ui-react": "0.9.2",
74
74
  "@effect/eslint-plugin": "0.3.2",
75
75
  "@oxlint/plugins": "1.94.0",
76
76
  "@punks/lints": "0.2.0",
@@ -99,5 +99,5 @@
99
99
  "vitest": "4.1.10",
100
100
  "xstate": "5.33.3"
101
101
  },
102
- "gitHead": "8268eaf826360188a1df4fda18f7bffd75d1575a"
102
+ "gitHead": "f2c8453ab95578ca84aaf1032db4370153a76ceb"
103
103
  }