@ouispec/agent-core 0.10.0 → 0.14.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/approvals/args-hash.d.ts +1 -1
- package/dist/approvals/args-hash.js +1 -1
- package/dist/approvals/types.d.ts +4 -4
- package/dist/approvals/types.d.ts.map +1 -1
- package/dist/approvals/types.js +2 -2
- package/dist/approvals/types.js.map +1 -1
- package/dist/attachments/types.d.ts +4 -4
- package/dist/attachments/types.d.ts.map +1 -1
- package/dist/attachments/types.js +2 -2
- package/dist/attachments/types.js.map +1 -1
- package/dist/browser.d.ts +1 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1 -0
- package/dist/browser.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/message-input/index.d.ts +1 -1
- package/dist/message-input/index.js +1 -1
- package/dist/protocol/index.d.ts +31 -4
- package/dist/protocol/index.d.ts.map +1 -1
- package/dist/protocol/index.js +27 -1
- package/dist/protocol/index.js.map +1 -1
- package/dist/schema/types.d.ts +1 -1
- package/dist/turns/types.d.ts +2 -2
- package/dist/turns/types.js +1 -1
- package/dist/types/client-config.d.ts +24 -15
- package/dist/types/client-config.d.ts.map +1 -1
- package/dist/types/client-config.js +1 -1
- package/dist/ui-surface/index.d.ts +2 -2
- package/dist/work/index.d.ts +72 -0
- package/dist/work/index.d.ts.map +1 -0
- package/dist/work/index.js +124 -0
- package/dist/work/index.js.map +1 -0
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The args hash
|
|
2
|
+
* The args hash: SHA-256 over the RFC 8785 (JCS) canonical
|
|
3
3
|
* JSON of a call's arguments, lowercase hex.
|
|
4
4
|
*
|
|
5
5
|
* Defined once, in `oui-spec`, where the browser's runtime checks a request
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The args hash
|
|
2
|
+
* The args hash: SHA-256 over the RFC 8785 (JCS) canonical
|
|
3
3
|
* JSON of a call's arguments, lowercase hex.
|
|
4
4
|
*
|
|
5
5
|
* Defined once, in `oui-spec`, where the browser's runtime checks a request
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ApprovalChannel } from '@ouispec/contract';
|
|
2
2
|
/**
|
|
3
|
-
* Approvals
|
|
3
|
+
* Approvals: the shapes the worker, the approval store in the
|
|
4
4
|
* realtime server, the browser's approval card and a conversation engine
|
|
5
5
|
* exchange. An irreversible action runs only on an approval the user gave,
|
|
6
6
|
* bound to the exact call by a single-use token.
|
|
7
7
|
*/
|
|
8
8
|
/** The client event a user's socket sends when they click the approval card. */
|
|
9
9
|
export declare const APPROVAL_DECIDE_EVENT = "approval:decide";
|
|
10
|
-
/** How long an approval lasts unless its action declares otherwise
|
|
10
|
+
/** How long an approval lasts unless its action declares otherwise. */
|
|
11
11
|
export declare const DEFAULT_APPROVAL_TTL_MS: number;
|
|
12
12
|
/** The longest an action may declare an approval lasts. */
|
|
13
13
|
export declare const MAX_APPROVAL_TTL_MS: number;
|
|
@@ -59,12 +59,12 @@ export interface ApprovalSettlement {
|
|
|
59
59
|
decided?: 'approved';
|
|
60
60
|
/**
|
|
61
61
|
* For `claimed` and `already`: set when the approval did not run out of
|
|
62
|
-
* time but was withdrawn
|
|
62
|
+
* time but was withdrawn. Absent when its time ran out.
|
|
63
63
|
*/
|
|
64
64
|
withdrawn?: ApprovalWithdrawReason;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
* Why an approval was expired before its time
|
|
67
|
+
* Why an approval was expired before its time:
|
|
68
68
|
* - `superseded`: the person sent a new message while the card waited.
|
|
69
69
|
* - `stopped`: the turn that asked for it was stopped as it asked.
|
|
70
70
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/approvals/types.ts"],"names":[],"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G;IACH,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;CAC9C;AAED,yFAAyF;AACzF,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;CACxB;AAKD,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,GACrB,MAAM,mBAAmB,CAAC"}
|
package/dist/approvals/types.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Approvals
|
|
2
|
+
* Approvals: the shapes the worker, the approval store in the
|
|
3
3
|
* realtime server, the browser's approval card and a conversation engine
|
|
4
4
|
* exchange. An irreversible action runs only on an approval the user gave,
|
|
5
5
|
* bound to the exact call by a single-use token.
|
|
6
6
|
*/
|
|
7
7
|
/** The client event a user's socket sends when they click the approval card. */
|
|
8
8
|
export const APPROVAL_DECIDE_EVENT = 'approval:decide';
|
|
9
|
-
/** How long an approval lasts unless its action declares otherwise
|
|
9
|
+
/** How long an approval lasts unless its action declares otherwise. */
|
|
10
10
|
export const DEFAULT_APPROVAL_TTL_MS = 5 * 60_000;
|
|
11
11
|
/** The longest an action may declare an approval lasts. */
|
|
12
12
|
export const MAX_APPROVAL_TTL_MS = 30 * 60_000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/approvals/types.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEvD,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/approvals/types.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEvD,uEAAuE;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,GAAG,MAAM,CAAC;AAClD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,GAAG,MAAM,CAAC;AAE/C,MAAM,CAAC,MAAM,iBAAiB,GAA+B,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAErG;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,MAAM,CAAC;AAqDhD,MAAM,CAAC,MAAM,yBAAyB,GAAsC,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AA8CtG,MAAM,aAAa,GAAmD,IAAI,CAAC;AAC3E,MAAM,WAAW,GAA0C,IAAI,CAAC;AAChE,KAAK,aAAa,CAAC;AACnB,KAAK,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Files the person gives the assistant
|
|
2
|
+
* Files the person gives the assistant.
|
|
3
3
|
*
|
|
4
4
|
* A file is uploaded to the platform's storage first and travels by
|
|
5
5
|
* reference: a message, a turn and an action carry its id, never its bytes.
|
|
@@ -36,7 +36,7 @@ export interface AttachmentRef {
|
|
|
36
36
|
pending?: boolean;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* The limits a platform sets
|
|
39
|
+
* The limits a platform sets. The composer refuses a
|
|
40
40
|
* file before uploading it; the platform checks again when it reserves and
|
|
41
41
|
* when it commits; the worker caps what the model is given.
|
|
42
42
|
*/
|
|
@@ -52,7 +52,7 @@ export interface AttachmentLimits {
|
|
|
52
52
|
/** The media types each kind takes; a file of any other type is `other`, if the platform takes it at all. */
|
|
53
53
|
mediaTypes: Record<Exclude<AttachmentKind, 'other'>, readonly string[]>;
|
|
54
54
|
}
|
|
55
|
-
/** The limits
|
|
55
|
+
/** The default limits. */
|
|
56
56
|
export declare const DEFAULT_ATTACHMENT_LIMITS: AttachmentLimits;
|
|
57
57
|
/** The kind a media type is under these limits. */
|
|
58
58
|
export declare function attachmentKindOf(mediaType: string, limits?: Pick<AttachmentLimits, 'mediaTypes'>): AttachmentKind;
|
|
@@ -94,7 +94,7 @@ export declare function mediaTypeForModel(mediaType: string): string;
|
|
|
94
94
|
export declare function attachmentReferenceLine(ref: AttachmentRef): string;
|
|
95
95
|
/**
|
|
96
96
|
* The JSON Schema `format` of an action input that takes a file the person
|
|
97
|
-
* attached, and the shape of an attachment's id
|
|
97
|
+
* attached, and the shape of an attachment's id: the
|
|
98
98
|
* protocol's (OUI spec §7.3.11).
|
|
99
99
|
*/
|
|
100
100
|
export { OUI_ATTACHMENT_FORMAT as ATTACHMENT_FORMAT, isAttachmentId, attachmentInputOf, attachmentIdsIn, acceptsMediaType, misplacedAttachmentInputs, type OUIAttachmentInput, } from 'oui-spec/spec';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/attachments/types.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,0EAA0E;AAC1E,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;AAEhE,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAAsC,CAAC;AAE7F;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MA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AgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAWlE;AAED;;;;GAIG;AACH,OAAO,EACL,qBAAqB,IAAI,iBAAiB,EAC1C,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,yBAAyB,EACzB,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isAttachmentId } from 'oui-spec/spec';
|
|
2
2
|
export const ATTACHMENT_KINDS = ['image', 'text', 'pdf', 'other'];
|
|
3
|
-
/** The limits
|
|
3
|
+
/** The default limits. */
|
|
4
4
|
export const DEFAULT_ATTACHMENT_LIMITS = {
|
|
5
5
|
perMessage: 5,
|
|
6
6
|
maxBytes: { image: 20 * 1024 * 1024, text: 2 * 1024 * 1024, pdf: 20 * 1024 * 1024, other: 100 * 1024 * 1024 },
|
|
@@ -118,7 +118,7 @@ export function attachmentReferenceLine(ref) {
|
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
120
|
* The JSON Schema `format` of an action input that takes a file the person
|
|
121
|
-
* attached, and the shape of an attachment's id
|
|
121
|
+
* attached, and the shape of an attachment's id: the
|
|
122
122
|
* protocol's (OUI spec §7.3.11).
|
|
123
123
|
*/
|
|
124
124
|
export { OUI_ATTACHMENT_FORMAT as ATTACHMENT_FORMAT, isAttachmentId, attachmentInputOf, attachmentIdsIn, acceptsMediaType, misplacedAttachmentInputs, } from 'oui-spec/spec';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/attachments/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAe/C,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAA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I;QACxF,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI;KAChF,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClB,IAAI,GAAG,CAAC,OAAO;QAAE,OAAO,eAAe,EAAE,KAAK,IAAI,aAAa,CAAC;IAChE,OAAO,eAAe,EAAE,KAAK,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;AACzG,CAAC;AAED;;;;GAIG;AACH,OAAO,EACL,qBAAqB,IAAI,iBAAiB,EAC1C,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,yBAAyB,GAE1B,MAAM,eAAe,CAAC"}
|
package/dist/browser.d.ts
CHANGED
package/dist/browser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAGA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
|
package/dist/browser.js
CHANGED
package/dist/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,wEAAwE;AACxE,yDAAyD;AACzD,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,wEAAwE;AACxE,yDAAyD;AACzD,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
|
package/dist/protocol/index.d.ts
CHANGED
|
@@ -16,11 +16,14 @@ export declare const AGENT_SOCKET_EVENTS: {
|
|
|
16
16
|
readonly TURN_ERROR: "agent:turn_error";
|
|
17
17
|
readonly ERROR: "agent:error";
|
|
18
18
|
readonly APPROVAL_REQUIRED: "agent:approval_required";
|
|
19
|
+
readonly REASONING_STARTED: "agent:reasoning_started";
|
|
20
|
+
readonly REASONING_DELTA: "agent:reasoning_delta";
|
|
21
|
+
readonly REASONING_ENDED: "agent:reasoning_ended";
|
|
19
22
|
};
|
|
20
23
|
export type AgentSocketEventName = (typeof AGENT_SOCKET_EVENTS)[keyof typeof AGENT_SOCKET_EVENTS];
|
|
21
24
|
export declare const ALL_AGENT_SOCKET_EVENTS: AgentSocketEventName[];
|
|
22
25
|
/**
|
|
23
|
-
* The tools an agent works a client's UI with
|
|
26
|
+
* The tools an agent works a client's UI with: the model runs
|
|
24
27
|
* one action of the page through `act`, and learns what actions take and
|
|
25
28
|
* reads the page through the other two. A stored `act` call names the action
|
|
26
29
|
* in its arguments (`{ action, input }`).
|
|
@@ -41,7 +44,7 @@ export declare function displayedToolCall(call: {
|
|
|
41
44
|
name: string;
|
|
42
45
|
arguments?: Record<string, unknown>;
|
|
43
46
|
};
|
|
44
|
-
export type AgentProtocolEvent = TokenEvent | TokenClearEvent | IntentCallEvent | IntentResultEvent | UICommandEvent | ContextSyncEvent | LearningSignalEvent | SessionUpdateEvent | ErrorEvent | DoneEvent | ApprovalRequiredProtocolEvent;
|
|
47
|
+
export type AgentProtocolEvent = TokenEvent | TokenClearEvent | IntentCallEvent | IntentResultEvent | UICommandEvent | ContextSyncEvent | LearningSignalEvent | SessionUpdateEvent | ErrorEvent | DoneEvent | ApprovalRequiredProtocolEvent | ReasoningEvent;
|
|
45
48
|
export interface TokenEvent {
|
|
46
49
|
type: 'token';
|
|
47
50
|
content: string;
|
|
@@ -163,10 +166,28 @@ export interface ErrorEvent {
|
|
|
163
166
|
turnId: string;
|
|
164
167
|
recoverable: boolean;
|
|
165
168
|
}
|
|
166
|
-
/** The turn stopped at a call that needs the user's approval
|
|
169
|
+
/** The turn stopped at a call that needs the user's approval: what the approval card renders. */
|
|
167
170
|
export interface ApprovalRequiredProtocolEvent extends Omit<ApprovalRequiredEvent, 'timestamp'> {
|
|
168
171
|
type: 'approval_required';
|
|
169
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* The model's thinking: `start` when it begins, `delta` with the next piece of
|
|
175
|
+
* its summary (sent only when the model returns one), `end` when it stops.
|
|
176
|
+
* Until `end`, the turn is planning rather than acting.
|
|
177
|
+
*/
|
|
178
|
+
export interface ReasoningEvent {
|
|
179
|
+
type: 'reasoning';
|
|
180
|
+
phase: 'start' | 'delta' | 'end';
|
|
181
|
+
/** The thinking block: its deltas and end repeat it. */
|
|
182
|
+
id: string;
|
|
183
|
+
/** The next piece of the summary, on a `delta`. */
|
|
184
|
+
text?: string;
|
|
185
|
+
turnId: string;
|
|
186
|
+
}
|
|
187
|
+
/** How a turn that ended by itself ended (`DoneEvent.endReason`). */
|
|
188
|
+
export type TurnEndReason = 'complete' | 'present_options' | 'awaiting_approval' | 'time_limit' | 'output_limit' | 'step_count';
|
|
189
|
+
export declare const TURN_END_REASONS: readonly TurnEndReason[];
|
|
190
|
+
export declare function isTurnEndReason(value: unknown): value is TurnEndReason;
|
|
170
191
|
export interface DoneEvent {
|
|
171
192
|
type: 'done';
|
|
172
193
|
turnId: string;
|
|
@@ -178,11 +199,17 @@ export interface DoneEvent {
|
|
|
178
199
|
};
|
|
179
200
|
maxRoundsReached?: boolean;
|
|
180
201
|
/**
|
|
181
|
-
* Set when the turn did not end by itself
|
|
202
|
+
* Set when the turn did not end by itself: the person stopped it,
|
|
182
203
|
* a newer message superseded it, or it ran out of time. What it had produced
|
|
183
204
|
* is stored.
|
|
184
205
|
*/
|
|
185
206
|
stopReason?: TurnStoppedReason;
|
|
207
|
+
/**
|
|
208
|
+
* How a turn that ended by itself ended: it answered, asked the person to
|
|
209
|
+
* choose or approve, handed back for time, was cut off at the output limit,
|
|
210
|
+
* or used every step. Absent from a worker that does not say.
|
|
211
|
+
*/
|
|
212
|
+
endReason?: TurnEndReason;
|
|
186
213
|
}
|
|
187
214
|
/**
|
|
188
215
|
* Maps a raw Socket.IO event (name + payload) to an AgentProtocolEvent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/protocol/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/protocol/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;CAAoB,CAAC;AAErD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAElG,eAAO,MAAM,uBAAuB,EAAE,oBAAoB,EAAuC,CAAC;AAElG;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;;;CAAuE,CAAC;AAEnG;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,IAAI,E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turns/types.js';
|
|
|
13
13
|
export const AGENT_SOCKET_EVENTS = AGENT_TURN_EVENTS;
|
|
14
14
|
export const ALL_AGENT_SOCKET_EVENTS = Object.values(AGENT_SOCKET_EVENTS);
|
|
15
15
|
/**
|
|
16
|
-
* The tools an agent works a client's UI with
|
|
16
|
+
* The tools an agent works a client's UI with: the model runs
|
|
17
17
|
* one action of the page through `act`, and learns what actions take and
|
|
18
18
|
* reads the page through the other two. A stored `act` call names the action
|
|
19
19
|
* in its arguments (`{ action, input }`).
|
|
@@ -30,6 +30,17 @@ export function displayedToolCall(call) {
|
|
|
30
30
|
const input = call.arguments?.input;
|
|
31
31
|
return { name: action, ...(input && typeof input === 'object' ? { arguments: input } : {}) };
|
|
32
32
|
}
|
|
33
|
+
export const TURN_END_REASONS = [
|
|
34
|
+
'complete',
|
|
35
|
+
'present_options',
|
|
36
|
+
'awaiting_approval',
|
|
37
|
+
'time_limit',
|
|
38
|
+
'output_limit',
|
|
39
|
+
'step_count',
|
|
40
|
+
];
|
|
41
|
+
export function isTurnEndReason(value) {
|
|
42
|
+
return typeof value === 'string' && TURN_END_REASONS.includes(value);
|
|
43
|
+
}
|
|
33
44
|
/**
|
|
34
45
|
* Maps a raw Socket.IO event (name + payload) to an AgentProtocolEvent.
|
|
35
46
|
* This is the canonical mapping — platforms never need to write their own.
|
|
@@ -81,7 +92,22 @@ export function parseSocketEvent(event, data, fallbackTurnId) {
|
|
|
81
92
|
messageId: payload.messageId,
|
|
82
93
|
usage: payload.usage,
|
|
83
94
|
...(isTurnStoppedReason(payload.stopReason) ? { stopReason: payload.stopReason } : {}),
|
|
95
|
+
...(isTurnEndReason(payload.endReason) ? { endReason: payload.endReason } : {}),
|
|
84
96
|
};
|
|
97
|
+
case AGENT_SOCKET_EVENTS.REASONING_STARTED:
|
|
98
|
+
case AGENT_SOCKET_EVENTS.REASONING_ENDED: {
|
|
99
|
+
const id = payload.reasoningId;
|
|
100
|
+
if (typeof id !== 'string' || !id)
|
|
101
|
+
return null;
|
|
102
|
+
return { type: 'reasoning', phase: event === AGENT_SOCKET_EVENTS.REASONING_STARTED ? 'start' : 'end', id, turnId };
|
|
103
|
+
}
|
|
104
|
+
case AGENT_SOCKET_EVENTS.REASONING_DELTA: {
|
|
105
|
+
const id = payload.reasoningId;
|
|
106
|
+
const text = payload.text;
|
|
107
|
+
if (typeof id !== 'string' || !id || typeof text !== 'string' || !text)
|
|
108
|
+
return null;
|
|
109
|
+
return { type: 'reasoning', phase: 'delta', id, text, turnId };
|
|
110
|
+
}
|
|
85
111
|
case AGENT_SOCKET_EVENTS.TURN_ERROR: {
|
|
86
112
|
const errObj = (payload.error ?? payload);
|
|
87
113
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/protocol/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAA0B,MAAM,mBAAmB,CAAC;AAEhF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAIrD,MAAM,CAAC,MAAM,uBAAuB,GAA2B,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAElG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAW,CAAC;AAEnG;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAA2D;IAI3F,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;IACtC,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,GAAG,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC3F,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,KAA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C,EAAE,IAAc,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,aAAa;gBACrJ,OAAO,EAAE,YAAY;gBACrB,MAAM;gBACN,WAAW,EAAG,OAAO,CAAC,WAAuB,IAAI,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAE,QAAoC,EAAE,WAAsB,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAK;aACjK,CAAC;QACJ,CAAC;QAID,KAAK,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAC3C,MAAM,KAAK,GAAG,OAAyC,CAAC;YACxD,OAAO;gBACL,IAAI,EAAE,mBAAmB;gBACzB,MAAM;gBACN,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,EAAE;gBAC1C,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,EAAE;gBAClC,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;gBACtB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,OAAO;gBAC/B,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,KAAK;gBACvC,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;gBAClF,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,CAAC;aAChC,CAAC;QACJ,CAAC;QAED;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
|
package/dist/schema/types.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export interface RawIntentExecutionSchema {
|
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
111
|
* Subscription block — for async intents, the declared events that settle the
|
|
112
|
-
* job
|
|
112
|
+
* job. The SDK waits for the completion or the failure (with a timeout)
|
|
113
113
|
* instead of polling. Each name must be declared in the product's event
|
|
114
114
|
* declarations, or the tools fail to load.
|
|
115
115
|
*/
|
package/dist/turns/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Stopping a turn
|
|
2
|
+
* Stopping a turn: the shapes the tab, the realtime server, the
|
|
3
3
|
* worker and a host's API exchange when a person stops a running turn, or
|
|
4
4
|
* sends a new message that supersedes it.
|
|
5
5
|
*
|
|
@@ -19,7 +19,7 @@ export declare function isTurnStopReason(value: unknown): value is TurnStopReaso
|
|
|
19
19
|
/**
|
|
20
20
|
* Why a turn ended on the stop path, keeping what it had produced: a stop that
|
|
21
21
|
* was asked for (`TurnStopReason`), or its own deadline (`deadline`: it ran
|
|
22
|
-
* out of time
|
|
22
|
+
* out of time). Nobody asks for `deadline`: it is never a
|
|
23
23
|
* stop request, only a stopped turn's reason.
|
|
24
24
|
*/
|
|
25
25
|
export type TurnStoppedReason = TurnStopReason | 'deadline';
|
package/dist/turns/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Stopping a turn
|
|
2
|
+
* Stopping a turn: the shapes the tab, the realtime server, the
|
|
3
3
|
* worker and a host's API exchange when a person stops a running turn, or
|
|
4
4
|
* sends a new message that supersedes it.
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* UI control is not configured here. The agent acts in the UI through the
|
|
10
10
|
* client's OUI surfaces, which the client sends with each turn and which
|
|
11
|
-
* answer every action themselves
|
|
11
|
+
* answer every action themselves.
|
|
12
12
|
*/
|
|
13
13
|
import type { AgentProtocolEvent } from '../protocol/index.js';
|
|
14
14
|
import type { ViewAnnotationState } from './api-surface.js';
|
|
@@ -31,8 +31,8 @@ export interface AgentMessageContext {
|
|
|
31
31
|
*/
|
|
32
32
|
timeZone?: string;
|
|
33
33
|
/**
|
|
34
|
-
* How the person entered this message, when it was not typed
|
|
35
|
-
*
|
|
34
|
+
* How the person entered this message, when it was not typed: `{ mode:
|
|
35
|
+
* 'voice', language }` for a message they spoke, with the
|
|
36
36
|
* language the recogniser detected. Pass it to the worker unchanged on the
|
|
37
37
|
* turn's `context`, and store it on the user's message (`AgentStoredMessage.input`).
|
|
38
38
|
*/
|
|
@@ -92,8 +92,8 @@ export interface AgentConversationMatch {
|
|
|
92
92
|
excerpt: string;
|
|
93
93
|
createdAt: string;
|
|
94
94
|
/**
|
|
95
|
-
* How the person entered the matched message, when they spoke it
|
|
96
|
-
*
|
|
95
|
+
* How the person entered the matched message, when they spoke it, as stored on
|
|
96
|
+
* it (`AgentStoredMessage.input`). Absent or null when typed.
|
|
97
97
|
*/
|
|
98
98
|
input?: MessageInput | null;
|
|
99
99
|
}
|
|
@@ -106,7 +106,7 @@ export interface AgentConversationSummary {
|
|
|
106
106
|
preview?: string | null;
|
|
107
107
|
/**
|
|
108
108
|
* How the person entered the message `preview` is taken from, when they
|
|
109
|
-
* spoke it
|
|
109
|
+
* spoke it, as stored on it (`AgentStoredMessage.input`), so
|
|
110
110
|
* a list can mark a conversation that began by voice. Absent or null when
|
|
111
111
|
* that message was typed, or when there is no preview.
|
|
112
112
|
*/
|
|
@@ -154,15 +154,15 @@ export interface AgentStoredMessage {
|
|
|
154
154
|
toolCallId?: string | null;
|
|
155
155
|
createdAt: string;
|
|
156
156
|
/**
|
|
157
|
-
* Set on the last assistant message of a turn that was stopped
|
|
157
|
+
* Set on the last assistant message of a turn that was stopped.
|
|
158
158
|
* The panel labels the message; a later turn's history says so after its text.
|
|
159
159
|
*/
|
|
160
160
|
stopped?: TurnStoppedMarker | null;
|
|
161
|
-
/** The files the person attached to this message
|
|
161
|
+
/** The files the person attached to this message, by reference. */
|
|
162
162
|
attachments?: AttachmentRef[] | null;
|
|
163
163
|
/**
|
|
164
164
|
* How the person entered this message, as its turn's `context.input` carried
|
|
165
|
-
* it
|
|
165
|
+
* it: set on a message they spoke. Absent or null when typed.
|
|
166
166
|
*/
|
|
167
167
|
input?: MessageInput | null;
|
|
168
168
|
}
|
|
@@ -206,18 +206,18 @@ export interface AgentClientConfig {
|
|
|
206
206
|
/**
|
|
207
207
|
* The page's context for the turn. Pass it to the worker as the turn
|
|
208
208
|
* payload's `context`. A message the person spoke carries `input` here
|
|
209
|
-
|
|
209
|
+
*, which the platform also stores on the user's message.
|
|
210
210
|
*/
|
|
211
211
|
context?: AgentMessageContext;
|
|
212
212
|
/**
|
|
213
213
|
* The files attached to this message, already uploaded through
|
|
214
|
-
* `attachments.upload
|
|
214
|
+
* `attachments.upload`: the platform sends their ids.
|
|
215
215
|
* No file's bytes go with a message.
|
|
216
216
|
*/
|
|
217
217
|
attachments?: AttachmentRef[];
|
|
218
218
|
/**
|
|
219
219
|
* Set on the turn the approval card starts after the user's decision
|
|
220
|
-
|
|
220
|
+
*: the token to redeem, or that they declined. The
|
|
221
221
|
* platform passes it, unchanged, to the worker as the turn payload's
|
|
222
222
|
* `approval`. Never put it in the message text. `content` is then empty:
|
|
223
223
|
* the click is not a message.
|
|
@@ -229,7 +229,7 @@ export interface AgentClientConfig {
|
|
|
229
229
|
roomToken?: string;
|
|
230
230
|
}>;
|
|
231
231
|
/**
|
|
232
|
-
* Asks the platform's API to stop a turn
|
|
232
|
+
* Asks the platform's API to stop a turn. The Stop control
|
|
233
233
|
* asks over the socket first; this is used when the socket cannot be reached
|
|
234
234
|
* or the stop is not confirmed in time. The platform checks that the turn is
|
|
235
235
|
* the user's, and records the same stop the socket would have. Optional: a
|
|
@@ -240,7 +240,7 @@ export interface AgentClientConfig {
|
|
|
240
240
|
conversationId: string | null;
|
|
241
241
|
}) => Promise<void>;
|
|
242
242
|
/**
|
|
243
|
-
* The platform's file area
|
|
243
|
+
* The platform's file area. With it, the person can
|
|
244
244
|
* attach files to a message: each is uploaded when it is attached, and the
|
|
245
245
|
* message carries references. Without it, nothing can be attached.
|
|
246
246
|
*/
|
|
@@ -307,10 +307,19 @@ export interface AgentClientConfig {
|
|
|
307
307
|
* Useful for analytics, logging, or custom side effects.
|
|
308
308
|
*/
|
|
309
309
|
onEvent?: (event: AgentProtocolEvent) => void;
|
|
310
|
+
/**
|
|
311
|
+
* What each tool's action is called on screen, by tool name
|
|
312
|
+
* (`vector_studio_add_shape` → "Draw a shape"): the status a view shows
|
|
313
|
+
* while the assistant works (`useAgentStatus().activity`). A tool without one
|
|
314
|
+
* is named from its name (`humanizeToolName`).
|
|
315
|
+
*/
|
|
316
|
+
toolLabels?: Readonly<Record<string, string>>;
|
|
317
|
+
/** The words of the status while the assistant thinks before it acts. Default "Planning…". */
|
|
318
|
+
planningText?: string;
|
|
310
319
|
}
|
|
311
320
|
/**
|
|
312
321
|
* How a tab puts files in the platform's file area and takes them out
|
|
313
|
-
|
|
322
|
+
*. The SDK holds the composer's state; the platform owns the
|
|
314
323
|
* requests, the storage and every check.
|
|
315
324
|
*/
|
|
316
325
|
export interface AttachmentClientSeam {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-config.d.ts","sourceRoot":"","sources":["../../src/types/client-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM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CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAE9C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9C,8FAA8F;IAC9F,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,kHAAkH;IAClH,MAAM,CAAC,EAAE,gBAAgB,GAAG,CAAC,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC9D;;;;OAIG;IACH,MAAM,CACJ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;QAAE,cAAc,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,WAAW,CAAC;QAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,GAChG,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1B,uDAAuD;IACvD,MAAM,CAAC,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjF"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* UI control is not configured here. The agent acts in the UI through the
|
|
10
10
|
* client's OUI surfaces, which the client sends with each turn and which
|
|
11
|
-
* answer every action themselves
|
|
11
|
+
* answer every action themselves.
|
|
12
12
|
*/
|
|
13
13
|
export {};
|
|
14
14
|
//# sourceMappingURL=client-config.js.map
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* to describe application pages, forms, actions, and players.
|
|
4
4
|
*
|
|
5
5
|
* NOTE: The UIAction dispatch mechanism (actions.ts, emitter.ts, loader.ts)
|
|
6
|
-
* was removed
|
|
6
|
+
* was removed. UI control is now exclusively handled by OUI
|
|
7
7
|
* surfaces registered at runtime. Only the schema types remain for use by
|
|
8
8
|
* the discover package. (The manifest loader that also used them,
|
|
9
|
-
* surface-loader.ts, was deleted
|
|
9
|
+
* surface-loader.ts, was deleted — it was never imported.)
|
|
10
10
|
*/
|
|
11
11
|
export type { UISurfaceSchema, PageDeclaration, ActionDeclaration, ParamDeclaration, FormDeclaration, FormFieldDeclaration, FormFieldType, FieldValidation, PlayerDeclaration, PlayerCommand, SelectionDeclaration, ModalDeclaration, } from './schema.js';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** The assistant's own bookkeeping and reading of the page: never shown as work. */
|
|
2
|
+
export declare const AGENT_HIDDEN_WORK_TOOLS: readonly string[];
|
|
3
|
+
/** Tools that put a choice card in front of the person: a card, not work. */
|
|
4
|
+
export declare const AGENT_CHOICE_TOOLS: readonly string[];
|
|
5
|
+
/** One kind of action in a run of the assistant's work, and how many times it was taken. */
|
|
6
|
+
export interface AgentWorkStep {
|
|
7
|
+
label: string;
|
|
8
|
+
count: number;
|
|
9
|
+
}
|
|
10
|
+
/** A message of a conversation, as far as its work is concerned. */
|
|
11
|
+
export interface AgentWorkMessage {
|
|
12
|
+
role: string;
|
|
13
|
+
content?: unknown;
|
|
14
|
+
toolCall?: {
|
|
15
|
+
name: string;
|
|
16
|
+
arguments?: Record<string, unknown>;
|
|
17
|
+
status?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** Work done without a word or a card in between: its steps, in the order each label first appeared. */
|
|
21
|
+
export interface AgentWorkRun {
|
|
22
|
+
/** Index of the run's first call in the messages it was read from. */
|
|
23
|
+
from: number;
|
|
24
|
+
/** Index of its last call. */
|
|
25
|
+
to: number;
|
|
26
|
+
steps: AgentWorkStep[];
|
|
27
|
+
/** The step its last call belongs to. */
|
|
28
|
+
last: AgentWorkStep;
|
|
29
|
+
}
|
|
30
|
+
export interface AgentWorkOptions {
|
|
31
|
+
/** A tool's name → what its action is called on screen: `vector_studio_add_shape` → "Draw a shape". */
|
|
32
|
+
toolLabels?: Readonly<Record<string, string>>;
|
|
33
|
+
/** Tools never shown as work. Default `AGENT_HIDDEN_WORK_TOOLS`. */
|
|
34
|
+
hiddenTools?: readonly string[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* What a tool without a label is called on screen, from its name: the room's
|
|
38
|
+
* prefix dropped (the first two words of a longer name, the first of a
|
|
39
|
+
* two-word one, never a verb), and the verb first.
|
|
40
|
+
* `vector_studio_set_keyframe` → "Set keyframe", `vector_studio_rename` →
|
|
41
|
+
* "Rename", `vector_studio_version_save` → "Save version",
|
|
42
|
+
* `ui_describe` → "Describe".
|
|
43
|
+
*/
|
|
44
|
+
export declare function humanizeToolName(name: string): string;
|
|
45
|
+
/** What a step of work reads as: "Draw a shape · 12", or the label alone for one action. */
|
|
46
|
+
export declare function formatWorkStep(step: AgentWorkStep): string;
|
|
47
|
+
/**
|
|
48
|
+
* The label a call is shown as, or null when it is not work: bookkeeping,
|
|
49
|
+
* reading the page, a choice card, or an action that failed and so changed
|
|
50
|
+
* nothing. An `act` call is the action it ran.
|
|
51
|
+
*/
|
|
52
|
+
export declare function workLabel(call: {
|
|
53
|
+
name: string;
|
|
54
|
+
arguments?: Record<string, unknown>;
|
|
55
|
+
status?: string;
|
|
56
|
+
}, options?: AgentWorkOptions): string | null;
|
|
57
|
+
/** Whether a message says something: text of its own, not only a call. */
|
|
58
|
+
export declare function hasWords(content: unknown): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The runs of work in `messages`: calls taken without the person or the
|
|
61
|
+
* assistant saying anything, or a card being offered, in between. Within a run
|
|
62
|
+
* the calls are counted by label. Calls that are not work (`workLabel`) neither
|
|
63
|
+
* count nor end a run.
|
|
64
|
+
*/
|
|
65
|
+
export declare function agentWorkRuns(messages: readonly AgentWorkMessage[], options?: AgentWorkOptions): AgentWorkRun[];
|
|
66
|
+
/**
|
|
67
|
+
* What the assistant is doing now, as one line: the step of its latest call,
|
|
68
|
+
* when that call is the last thing the turn has done (no words or card since).
|
|
69
|
+
* `messages` are the turn's own, from the person's message on.
|
|
70
|
+
*/
|
|
71
|
+
export declare function currentWorkStep(messages: readonly AgentWorkMessage[], options?: AgentWorkOptions): AgentWorkStep | null;
|
|
72
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/work/index.ts"],"names":[],"mappings":"AAQA,oFAAoF;AACpF,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAAmD,CAAC;AAEzG,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAAmE,CAAC;AAEpH,4FAA4F;AAC5F,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACnF;AAED,wGAAwG;AACxG,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,yCAAyC;IACzC,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,uGAAuG;IACvG,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,oEAAoE;IACpE,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAUD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUrD;AAED,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5E,OAAO,GAAE,gBAAqB,GAC7B,MAAM,GAAG,IAAI,CAMf;AAED,0EAA0E;AAC1E,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAQlD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,OAAO,GAAE,gBAAqB,GAAG,YAAY,EAAE,CA2BnH;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,OAAO,GAAE,gBAAqB,GAAG,aAAa,GAAG,IAAI,CAU3H"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The assistant's work as a person reads it: its calls, grouped into runs and
|
|
3
|
+
* named by what each action is called on screen. One definition, read by every
|
|
4
|
+
* view of a turn: the live status a panel or a pill shows, the steps a
|
|
5
|
+
* transcript lists, and a replay of a stored session.
|
|
6
|
+
*/
|
|
7
|
+
import { displayedToolCall } from '../protocol/index.js';
|
|
8
|
+
/** The assistant's own bookkeeping and reading of the page: never shown as work. */
|
|
9
|
+
export const AGENT_HIDDEN_WORK_TOOLS = ['note', 'ui_describe', 'ui_read', 'ui_guide'];
|
|
10
|
+
/** Tools that put a choice card in front of the person: a card, not work. */
|
|
11
|
+
export const AGENT_CHOICE_TOOLS = ['present_options', 'confirm_action', 'request_user_decision'];
|
|
12
|
+
/** Words that name what a tool does, for a name that ends in its verb (`vector_studio_appearance_set`). */
|
|
13
|
+
const VERBS = new Set([
|
|
14
|
+
'add', 'align', 'animate', 'apply', 'close', 'copy', 'create', 'delete', 'describe', 'draw', 'duplicate', 'ease',
|
|
15
|
+
'export', 'find', 'group', 'guide', 'import', 'inspect', 'list', 'make', 'move', 'new', 'open', 'paste', 'play',
|
|
16
|
+
'query', 'read', 'remove', 'rename', 'resize', 'rotate', 'save', 'scale', 'select', 'set', 'snapshot', 'stop',
|
|
17
|
+
'ungroup', 'update',
|
|
18
|
+
]);
|
|
19
|
+
/**
|
|
20
|
+
* What a tool without a label is called on screen, from its name: the room's
|
|
21
|
+
* prefix dropped (the first two words of a longer name, the first of a
|
|
22
|
+
* two-word one, never a verb), and the verb first.
|
|
23
|
+
* `vector_studio_set_keyframe` → "Set keyframe", `vector_studio_rename` →
|
|
24
|
+
* "Rename", `vector_studio_version_save` → "Save version",
|
|
25
|
+
* `ui_describe` → "Describe".
|
|
26
|
+
*/
|
|
27
|
+
export function humanizeToolName(name) {
|
|
28
|
+
const words = name.split(/[_\-.\s]+|(?<=[a-z])(?=[A-Z])/).filter(Boolean).map((w) => w.toLowerCase());
|
|
29
|
+
if (words.length === 0)
|
|
30
|
+
return name;
|
|
31
|
+
const prefixMax = words.length >= 3 ? 2 : words.length - 1;
|
|
32
|
+
let start = 0;
|
|
33
|
+
while (start < prefixMax && !VERBS.has(words[start]))
|
|
34
|
+
start++;
|
|
35
|
+
let kept = words.slice(start);
|
|
36
|
+
if (kept.length === 2 && !VERBS.has(kept[0]) && VERBS.has(kept[1]))
|
|
37
|
+
kept = [kept[1], kept[0]];
|
|
38
|
+
const phrase = kept.join(' ');
|
|
39
|
+
return phrase.charAt(0).toUpperCase() + phrase.slice(1);
|
|
40
|
+
}
|
|
41
|
+
/** What a step of work reads as: "Draw a shape · 12", or the label alone for one action. */
|
|
42
|
+
export function formatWorkStep(step) {
|
|
43
|
+
return step.count > 1 ? `${step.label} · ${step.count}` : step.label;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The label a call is shown as, or null when it is not work: bookkeeping,
|
|
47
|
+
* reading the page, a choice card, or an action that failed and so changed
|
|
48
|
+
* nothing. An `act` call is the action it ran.
|
|
49
|
+
*/
|
|
50
|
+
export function workLabel(call, options = {}) {
|
|
51
|
+
if (call.status === 'error')
|
|
52
|
+
return null;
|
|
53
|
+
const { name } = displayedToolCall(call);
|
|
54
|
+
if (AGENT_CHOICE_TOOLS.includes(name))
|
|
55
|
+
return null;
|
|
56
|
+
if ((options.hiddenTools ?? AGENT_HIDDEN_WORK_TOOLS).includes(name))
|
|
57
|
+
return null;
|
|
58
|
+
return options.toolLabels?.[name] ?? humanizeToolName(name);
|
|
59
|
+
}
|
|
60
|
+
/** Whether a message says something: text of its own, not only a call. */
|
|
61
|
+
export function hasWords(content) {
|
|
62
|
+
if (typeof content === 'string')
|
|
63
|
+
return content.trim().length > 0;
|
|
64
|
+
if (Array.isArray(content)) {
|
|
65
|
+
return content.some((part) => !!part && typeof part === 'object' && part.type === 'text' && typeof part.text === 'string' && part.text.trim().length > 0);
|
|
66
|
+
}
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The runs of work in `messages`: calls taken without the person or the
|
|
71
|
+
* assistant saying anything, or a card being offered, in between. Within a run
|
|
72
|
+
* the calls are counted by label. Calls that are not work (`workLabel`) neither
|
|
73
|
+
* count nor end a run.
|
|
74
|
+
*/
|
|
75
|
+
export function agentWorkRuns(messages, options = {}) {
|
|
76
|
+
const runs = [];
|
|
77
|
+
let run = null;
|
|
78
|
+
messages.forEach((message, i) => {
|
|
79
|
+
const call = message.toolCall;
|
|
80
|
+
const name = call ? displayedToolCall(call).name : null;
|
|
81
|
+
const breaks = (message.role === 'user' && !call) || hasWords(message.content) || (name !== null && AGENT_CHOICE_TOOLS.includes(name));
|
|
82
|
+
if (breaks)
|
|
83
|
+
run = null;
|
|
84
|
+
if (!call)
|
|
85
|
+
return;
|
|
86
|
+
const label = workLabel(call, options);
|
|
87
|
+
if (label === null)
|
|
88
|
+
return;
|
|
89
|
+
if (!run) {
|
|
90
|
+
run = { from: i, to: i, steps: [], last: { label, count: 0 } };
|
|
91
|
+
runs.push(run);
|
|
92
|
+
}
|
|
93
|
+
const current = run;
|
|
94
|
+
let step = current.steps.find((s) => s.label === label);
|
|
95
|
+
if (!step) {
|
|
96
|
+
step = { label, count: 0 };
|
|
97
|
+
current.steps.push(step);
|
|
98
|
+
}
|
|
99
|
+
step.count += 1;
|
|
100
|
+
current.to = i;
|
|
101
|
+
current.last = step;
|
|
102
|
+
});
|
|
103
|
+
return runs;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* What the assistant is doing now, as one line: the step of its latest call,
|
|
107
|
+
* when that call is the last thing the turn has done (no words or card since).
|
|
108
|
+
* `messages` are the turn's own, from the person's message on.
|
|
109
|
+
*/
|
|
110
|
+
export function currentWorkStep(messages, options = {}) {
|
|
111
|
+
const runs = agentWorkRuns(messages, options);
|
|
112
|
+
const last = runs.at(-1);
|
|
113
|
+
if (!last)
|
|
114
|
+
return null;
|
|
115
|
+
for (let i = last.to + 1; i < messages.length; i++) {
|
|
116
|
+
const m = messages[i];
|
|
117
|
+
if ((m.role === 'user' && !m.toolCall) || hasWords(m.content))
|
|
118
|
+
return null;
|
|
119
|
+
if (m.toolCall && AGENT_CHOICE_TOOLS.includes(displayedToolCall(m.toolCall).name))
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
return last.last;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/work/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,oFAA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AAC,CAAC;IACzB,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACnD,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;YAAE,OAAO,IAAI,CAAC;QAC3E,IAAI,CAAC,CAAC,QAAQ,IAAI,kBAAkB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IACjG,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouispec/agent-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Schema types, entity graph, intent resolution, and protocol definitions for the agent SDK",
|
|
5
5
|
"homepage": "https://github.com/wesreid/oui/tree/main/packages/agent-core#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"ajv": "^8.17.0",
|
|
32
32
|
"yaml": "^2.7.0",
|
|
33
|
-
"@ouispec/agent-events": "^0.
|
|
34
|
-
"@ouispec/contract": "^0.4.
|
|
35
|
-
"oui-spec": "^0.11.
|
|
33
|
+
"@ouispec/agent-events": "^0.14.0",
|
|
34
|
+
"@ouispec/contract": "^0.4.6",
|
|
35
|
+
"oui-spec": "^0.11.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^22.0.0",
|