@agentforge-io/sdk-server 4.10.0 → 4.12.0
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.
- package/dist/resources/chat.d.ts +10 -0
- package/dist/resources/chat.js +1 -0
- package/dist/types.d.ts +23 -0
- package/package.json +1 -1
package/dist/resources/chat.d.ts
CHANGED
|
@@ -48,6 +48,16 @@ export interface StreamMessageForAppUserInput {
|
|
|
48
48
|
* as "declared by the App, not verified by AgentForge"; omit for no claims.
|
|
49
49
|
*/
|
|
50
50
|
caller?: AppCallerClaims;
|
|
51
|
+
/**
|
|
52
|
+
* AGF-100g — set when the App shows human-owned conversations to its own
|
|
53
|
+
* people (e.g. through `af.inbox.forAgent(agentId)`). Then, when the agent
|
|
54
|
+
* calls `request_human_review`, the conversation's thread moves to human
|
|
55
|
+
* mode: the agent stops answering until a person hands it back (or the
|
|
56
|
+
* team's handback timeout does), and the stream ends with a
|
|
57
|
+
* `{ type: 'mode', mode: 'human', reason: 'escalated' }` chunk. Omit it if
|
|
58
|
+
* nobody on the App side will answer — the tool then stays a no-op.
|
|
59
|
+
*/
|
|
60
|
+
humanHandoff?: boolean;
|
|
51
61
|
}
|
|
52
62
|
/** What an App declares about its end user on a chat turn (see `caller`). */
|
|
53
63
|
export interface AppCallerClaims {
|
package/dist/resources/chat.js
CHANGED
|
@@ -150,6 +150,7 @@ class ChatResource {
|
|
|
150
150
|
content: input.content,
|
|
151
151
|
...(input.channel ? { channel: input.channel } : {}),
|
|
152
152
|
...(input.caller ? { caller: input.caller } : {}),
|
|
153
|
+
...(input.humanHandoff ? { humanHandoff: true } : {}),
|
|
153
154
|
});
|
|
154
155
|
if (!res.body) {
|
|
155
156
|
throw new Error('chat.streamMessageForAppUser: response has no readable body');
|
package/dist/types.d.ts
CHANGED
|
@@ -342,6 +342,18 @@ export type ChatStreamChunk = ({
|
|
|
342
342
|
connectorName?: string;
|
|
343
343
|
toolDescription?: string;
|
|
344
344
|
copy?: ApprovalCopyBundle;
|
|
345
|
+
} | {
|
|
346
|
+
/**
|
|
347
|
+
* AGF-100g — App-user chat only: who owns the conversation's inbox
|
|
348
|
+
* thread. Sent once after `conversation` (`mode: 'agent'`), as the
|
|
349
|
+
* only frame when a human owns the thread (`mode: 'human'`, the
|
|
350
|
+
* agent did not run), and before the stream closes when this turn
|
|
351
|
+
* escalated to a human (`reason: 'escalated'`, needs `humanHandoff`).
|
|
352
|
+
*/
|
|
353
|
+
type: 'mode';
|
|
354
|
+
mode: InboxThreadMode;
|
|
355
|
+
threadId: string;
|
|
356
|
+
reason?: 'escalated';
|
|
345
357
|
} | {
|
|
346
358
|
type: 'done';
|
|
347
359
|
messageId: string;
|
|
@@ -390,6 +402,17 @@ export interface ConnectorStatus {
|
|
|
390
402
|
/** ¿Tiene selector de recursos real implementado (nivel 2 del picker)?
|
|
391
403
|
* false = se puede conectar pero `listResources()` devuelve `unsupported`. */
|
|
392
404
|
browsable: boolean;
|
|
405
|
+
/** Display name, when the connector is registered in that deploy. */
|
|
406
|
+
name?: string;
|
|
407
|
+
/** How it connects: 'oauth' → `authorizeForTenant()`; 'api_key' → the user
|
|
408
|
+
* pastes a key, saved with `saveApiKeyForTenant()`. Absent on older
|
|
409
|
+
* platforms or for connectors not registered there. */
|
|
410
|
+
authKind?: 'oauth' | 'api_key';
|
|
411
|
+
/** `api_key` only: where the user generates the key, and an input placeholder. */
|
|
412
|
+
apiKey?: {
|
|
413
|
+
instructionsUrl?: string;
|
|
414
|
+
placeholder?: string;
|
|
415
|
+
};
|
|
393
416
|
}
|
|
394
417
|
export interface AppUserConnectorStatus {
|
|
395
418
|
connectorId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/sdk-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.0",
|
|
4
4
|
"description": "Server-side SDK for backend apps integrating with AgentForge platform. Auth via ChatToken, ak_live_ API key or App secret (sk_live_), with App installations across tenants.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|