@ouispec/agent-events 0.7.0 → 0.13.1
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/event-declarations.v1.schema.json +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/platform.d.ts +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +6 -6
- package/dist/platform.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schemas.closurestudio.ai/agent-sdk/event-declarations/v1.json",
|
|
4
4
|
"title": "Event declarations",
|
|
5
|
-
"description": "Every event a product emits over realtime: its payload schema, the rooms it is published to, its correlation fields and its role in a job
|
|
5
|
+
"description": "Every event a product emits over realtime: its payload schema, the rooms it is published to, its correlation fields and its role in a job.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": [
|
|
8
8
|
"version",
|
package/dist/index.d.ts
CHANGED
package/dist/platform.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const AGENT_TURN_EVENTS: {
|
|
|
13
13
|
readonly TURN_COMPLETE: "agent:turn_complete";
|
|
14
14
|
readonly TURN_ERROR: "agent:turn_error";
|
|
15
15
|
readonly ERROR: "agent:error";
|
|
16
|
-
/** The turn stopped at a call that needs the user's approval
|
|
16
|
+
/** The turn stopped at a call that needs the user's approval; the payload is agent-sdk-core's `ApprovalRequiredEvent`. */
|
|
17
17
|
readonly APPROVAL_REQUIRED: "agent:approval_required";
|
|
18
18
|
};
|
|
19
19
|
export declare const PLATFORM_EVENTS: EventDeclarationDocument;
|
package/dist/platform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAUA,OAAO,EAAa,KAAK,wBAAwB,EAAmB,MAAM,YAAY,CAAC;AAEvF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;IAS5B,
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAUA,OAAO,EAAa,KAAK,wBAAwB,EAAmB,MAAM,YAAY,CAAC;AAEvF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;IAS5B,0HAA0H;;CAElH,CAAC;AAiBX,eAAO,MAAM,eAAe,EAAE,wBAqG7B,CAAC"}
|
package/dist/platform.js
CHANGED
|
@@ -23,7 +23,7 @@ export const AGENT_TURN_EVENTS = {
|
|
|
23
23
|
TURN_COMPLETE: 'agent:turn_complete',
|
|
24
24
|
TURN_ERROR: 'agent:turn_error',
|
|
25
25
|
ERROR: 'agent:error',
|
|
26
|
-
/** The turn stopped at a call that needs the user's approval
|
|
26
|
+
/** The turn stopped at a call that needs the user's approval; the payload is agent-sdk-core's `ApprovalRequiredEvent`. */
|
|
27
27
|
APPROVAL_REQUIRED: 'agent:approval_required',
|
|
28
28
|
};
|
|
29
29
|
const turnId = { type: 'string', minLength: 1, description: 'The turn the event belongs to.' };
|
|
@@ -63,8 +63,8 @@ export const PLATFORM_EVENTS = {
|
|
|
63
63
|
usage: { type: 'object', description: 'Token usage.' },
|
|
64
64
|
stopReason: {
|
|
65
65
|
type: 'string',
|
|
66
|
-
enum: ['user_stop', 'superseded'],
|
|
67
|
-
description: 'Set when the turn did not end by itself
|
|
66
|
+
enum: ['user_stop', 'superseded', 'deadline'],
|
|
67
|
+
description: 'Set when the turn did not end by itself: the person stopped it, a newer message superseded it, or it ran out of time.',
|
|
68
68
|
},
|
|
69
69
|
}, []),
|
|
70
70
|
[AGENT_TURN_EVENTS.TURN_ERROR]: turnEvent('The turn failed.', {
|
|
@@ -74,7 +74,7 @@ export const PLATFORM_EVENTS = {
|
|
|
74
74
|
required: ['code', 'message'],
|
|
75
75
|
},
|
|
76
76
|
}, ['error']),
|
|
77
|
-
[AGENT_TURN_EVENTS.APPROVAL_REQUIRED]: turnEvent("The turn stopped at a call that needs the user's approval
|
|
77
|
+
[AGENT_TURN_EVENTS.APPROVAL_REQUIRED]: turnEvent("The turn stopped at a call that needs the user's approval: the card the tab shows, and what the approval is bound to.", {
|
|
78
78
|
conversationId: { type: 'string' },
|
|
79
79
|
approvalId: { type: 'string', minLength: 1, description: 'Equals the tool call id.' },
|
|
80
80
|
tool: { type: 'string' },
|
|
@@ -93,7 +93,7 @@ export const PLATFORM_EVENTS = {
|
|
|
93
93
|
expiresAt: { type: 'number', description: 'Epoch ms.' },
|
|
94
94
|
}, ['conversationId', 'approvalId', 'tool', 'effect', 'destructive', 'preview', 'expiresAt']),
|
|
95
95
|
[OUI_WIRE.dispatch]: {
|
|
96
|
-
description: "A UI action request for the tab that sent the turn
|
|
96
|
+
description: "A UI action request for the tab that sent the turn. The tab answers on OUI's result event.",
|
|
97
97
|
payload: {
|
|
98
98
|
type: 'object',
|
|
99
99
|
properties: {
|
|
@@ -105,7 +105,7 @@ export const PLATFORM_EVENTS = {
|
|
|
105
105
|
turnId: {
|
|
106
106
|
type: 'string',
|
|
107
107
|
minLength: 1,
|
|
108
|
-
description: 'The turn the request belongs to
|
|
108
|
+
description: 'The turn the request belongs to: a tab runs a request only for its current turn.',
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
111
|
required: ['requestId', 'surfaceId', 'actionId'],
|
package/dist/platform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAkD,MAAM,YAAY,CAAC;AAEvF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,YAAY,EAAE,oBAAoB;IAClC,KAAK,EAAE,aAAa;IACpB,WAA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,IAAI,EAAE,QAAQ,EAAE;iBAC7B;gBACD,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC;aAC7C;YACD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE;SACxD,EACD,CAAC,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,CAAC,CAC1F;QACD,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;YACnB,WAAW,EAAE,4FAA4F;YACzG,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;oBAC3C,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;oBAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE;oBAC1C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC7B,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,CAAC;wBACZ,WAAW,EAAE,kFAAkF;qBAChG;iBACF;gBACD,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC;aACjD;YACD,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,WAAW,EAAE,CAAC,WAAW,CAAC;YAC1B,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The event declaration document: what a product says about every event its
|
|
3
|
-
* backend emits over realtime
|
|
3
|
+
* backend emits over realtime.
|
|
4
4
|
*
|
|
5
5
|
* The platform follows it: the realtime server emits and relays declared
|
|
6
6
|
* events only, the worker's async tools wait on a declared completion event,
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The event declaration document: what a product says about every event its
|
|
3
|
-
* backend emits over realtime
|
|
3
|
+
* backend emits over realtime.
|
|
4
4
|
*
|
|
5
5
|
* The platform follows it: the realtime server emits and relays declared
|
|
6
6
|
* events only, the worker's async tools wait on a declared completion event,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouispec/agent-events",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Event contracts the product declares
|
|
3
|
+
"version": "0.13.1",
|
|
4
|
+
"description": "Event contracts the product declares: each event's payload schema, rooms, correlation and job role; the catalog the realtime server, the worker's async tools and the UI's job tracker follow; the platform's own turn events; payload validation and TypeScript generation",
|
|
5
5
|
"homepage": "https://github.com/wesreid/oui/tree/main/packages/agent-events#readme",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/wesreid/oui/issues"
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"ajv": "^8.17.0",
|
|
46
46
|
"ajv-formats": "^3.0.1",
|
|
47
|
-
"@ouispec/contract": "^0.
|
|
48
|
-
"oui-spec": "^0.
|
|
47
|
+
"@ouispec/contract": "^0.4.6",
|
|
48
|
+
"oui-spec": "^0.11.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^22.0.0",
|