@ouispec/agent-core 0.17.0 → 0.18.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/types.d.ts +3 -1
- package/dist/approvals/types.d.ts.map +1 -1
- package/dist/approvals/types.js +1 -1
- package/dist/approvals/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/takeover/index.d.ts +30 -0
- package/dist/takeover/index.d.ts.map +1 -0
- package/dist/takeover/index.js +95 -0
- package/dist/takeover/index.js.map +1 -0
- package/dist/turns/types.d.ts +14 -6
- package/dist/turns/types.d.ts.map +1 -1
- package/dist/turns/types.js +3 -1
- package/dist/turns/types.js.map +1 -1
- package/dist/types/client-config.d.ts +65 -1
- package/dist/types/client-config.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -81,12 +81,14 @@ export interface ApprovalSettlement {
|
|
|
81
81
|
* Why an approval was expired before its time:
|
|
82
82
|
* - `superseded`: the person sent a new message while the card waited.
|
|
83
83
|
* - `stopped`: the turn that asked for it was stopped as it asked.
|
|
84
|
+
* - `taken_over`: a person on the staff took the conversation over while it
|
|
85
|
+
* waited: the person now answering did not ask for it.
|
|
84
86
|
*
|
|
85
87
|
* A withdrawn approval is expired from that moment: its card is dead and its
|
|
86
88
|
* token answers `used`. What is stored and told to the model says why, so it
|
|
87
89
|
* reads "withdrawn because you sent a new message", not "it timed out".
|
|
88
90
|
*/
|
|
89
|
-
export type ApprovalWithdrawReason = 'superseded' | 'stopped';
|
|
91
|
+
export type ApprovalWithdrawReason = 'superseded' | 'stopped' | 'taken_over';
|
|
90
92
|
export declare const APPROVAL_WITHDRAW_REASONS: readonly ApprovalWithdrawReason[];
|
|
91
93
|
/** The answer to withdrawing an approval (`POST /internal/approvals/:id/settle` with `expire`). */
|
|
92
94
|
export interface ApprovalWithdrawal {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/approvals/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,eAAe,EAAiB,MAAM,mBAAmB,CAAC;AAE/F;;;;;GAKG;AAEH,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;CAQ1B,CAAC;AAEX,uEAAuE;AACvE,eAAO,MAAM,uBAAuB,QAAa,CAAC;AAClD,2DAA2D;AAC3D,eAAO,MAAM,mBAAmB,QAAc,CAAC;AAE/C,eAAO,MAAM,iBAAiB,EAAE,SAAS,eAAe,EAA4C,CAAC;AAErG;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,QAAwB,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAa,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC;AAE7F,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,qBAAqB,CAAC;IAC/B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/approvals/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,eAAe,EAAiB,MAAM,mBAAmB,CAAC;AAE/F;;;;;GAKG;AAEH,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;A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AAa,EACb,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,GACrB,MAAM,mBAAmB,CAAC"}
|
package/dist/approvals/types.js
CHANGED
|
@@ -38,7 +38,7 @@ export const EXPIRED_APPROVAL_MEMORY_MS = 30 * 24 * 60 * 60_000;
|
|
|
38
38
|
* stored conversation does not say "waiting" for good.
|
|
39
39
|
*/
|
|
40
40
|
export const EXPIRY_CLAIM_LEASE_MS = 2 * 60_000;
|
|
41
|
-
export const APPROVAL_WITHDRAW_REASONS = ['superseded', 'stopped'];
|
|
41
|
+
export const APPROVAL_WITHDRAW_REASONS = ['superseded', 'stopped', 'taken_over'];
|
|
42
42
|
const requestIsOUIs = true;
|
|
43
43
|
const grantIsOUIs = true;
|
|
44
44
|
void requestIsOUIs;
|
|
@@ -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;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,KAAK,EAAE,GAAG;IACV,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,GAAG;IAClB,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,IAAI;CACN,CAAC;AAEX,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,K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AAa,CAAC;AACnB,KAAK,WAAW,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;AACzC,cAAc,iBAAiB,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;AAChC,cAAc,qBAAqB,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;AACzC,cAAc,iBAAiB,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;AAChC,cAAc,qBAAqB,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;AACzC,cAAc,iBAAiB,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;AAChC,cAAc,qBAAqB,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;AACzC,cAAc,iBAAiB,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;AAChC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ConversationHold, ConversationMessage, StaffSpeaker, TakeoverChange } from '@ouispec/contract';
|
|
2
|
+
export type { AnnounceMessageRequest, AnnounceMessageResult, ConversationHandedBackEvent, ConversationHold, ConversationMessage, ConversationMessageEvent, ConversationMessageRole, ConversationRooms, ConversationTakenOverEvent, HandBackCause, HandBackRequest, HandBackResult, StaffSpeaker, TakeoverChange, TakeOverRequest, TakeOverResult, } from '@ouispec/contract';
|
|
3
|
+
/** The conversation's events, as the platform declares them (`@ouispec/agent-events`). */
|
|
4
|
+
export declare const CONVERSATION_EVENTS: {
|
|
5
|
+
readonly TAKEN_OVER: "agent:conversation_taken_over";
|
|
6
|
+
readonly HANDED_BACK: "agent:conversation_handed_back";
|
|
7
|
+
readonly MESSAGE: "agent:conversation_message";
|
|
8
|
+
};
|
|
9
|
+
/** The longest a staff member's name or role reaches the model or a tab: the contract's bound. */
|
|
10
|
+
export declare const MAX_STAFF_LABEL_CHARS = 80;
|
|
11
|
+
/** The stored role of a person's message, and of a take-over or hand-back entry. */
|
|
12
|
+
export declare const STAFF_ROLE = "staff";
|
|
13
|
+
/** "Jordan (Toyota of Quillhaven sales)", or "Jordan" when the speaker has no role. */
|
|
14
|
+
export declare function staffLabel(speaker: Pick<StaffSpeaker, 'displayName' | 'role'>): string;
|
|
15
|
+
/**
|
|
16
|
+
* The line the model reads before a person's message: who wrote it, that the
|
|
17
|
+
* words are theirs, and that they stand.
|
|
18
|
+
*/
|
|
19
|
+
export declare function staffMessageNote(speaker: Pick<StaffSpeaker, 'displayName' | 'role'>): string;
|
|
20
|
+
/** The line the model reads where a person took the conversation over, or handed it back. */
|
|
21
|
+
export declare function takeoverNote(change: TakeoverChange, speaker: Pick<StaffSpeaker, 'displayName' | 'role'>): string;
|
|
22
|
+
/** A staff speaker, when `value` is one; else null. Only the fields the contract names are kept. */
|
|
23
|
+
export declare function readStaffSpeaker(value: unknown): StaffSpeaker | null;
|
|
24
|
+
/** A hold, when `value` is one; else null. */
|
|
25
|
+
export declare function readConversationHold(value: unknown): ConversationHold | null;
|
|
26
|
+
/** A conversation's message, when `value` is one; else null. A `staff` message must name its speaker. */
|
|
27
|
+
export declare function readConversationMessage(value: unknown): ConversationMessage | null;
|
|
28
|
+
/** Whether `value` names a change of hands the platform knows. */
|
|
29
|
+
export declare function isTakeoverChange(value: unknown): value is TakeoverChange;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/takeover/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAK7G,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,cAAc,EACd,YAAY,EACZ,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,mBAAmB,CAAC;AAE3B,0FAA0F;AAC1F,eAAO,MAAM,mBAAmB;;;;CAA4B,CAAC;AAE7D,kGAAkG;AAClG,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,oFAAoF;AACpF,eAAO,MAAM,UAAU,UAAU,CAAC;AAelC,uFAAuF;AACvF,wBAAgB,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,MAAM,CAAC,GAAG,MAAM,CAItF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,MAAM,CAAC,GAAG,MAAM,CAK5F;AAED,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,MAAM,CAAC,GAAG,MAAM,CAIhH;AAOD,oGAAoG;AACpG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CAQpE;AAED,8CAA8C;AAC9C,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAO5E;AAED,yGAAyG;AACzG,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI,CAUlF;AAED,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A person takes a conversation from the agent, and hands it back: the shapes
|
|
3
|
+
* every party exchanges, and what the model is told.
|
|
4
|
+
*
|
|
5
|
+
* While a person on the product's staff holds a conversation the agent does
|
|
6
|
+
* not answer it. The person's messages and the take-over and hand-back are
|
|
7
|
+
* stored by the product in the conversation, under the person's name, and the
|
|
8
|
+
* agent's next turn reads them as the business's side of the conversation:
|
|
9
|
+
* the person's words, not the agent's, and never the customer's.
|
|
10
|
+
*/
|
|
11
|
+
import { AGENT_CONVERSATION_EVENTS } from '@ouispec/agent-events';
|
|
12
|
+
/** The conversation's events, as the platform declares them (`@ouispec/agent-events`). */
|
|
13
|
+
export const CONVERSATION_EVENTS = AGENT_CONVERSATION_EVENTS;
|
|
14
|
+
/** The longest a staff member's name or role reaches the model or a tab: the contract's bound. */
|
|
15
|
+
export const MAX_STAFF_LABEL_CHARS = 80;
|
|
16
|
+
/** The stored role of a person's message, and of a take-over or hand-back entry. */
|
|
17
|
+
export const STAFF_ROLE = 'staff';
|
|
18
|
+
/**
|
|
19
|
+
* A name or role as it may stand inside a bracketed line the model reads: no
|
|
20
|
+
* brackets, no line breaks, no runs of space, at most 80 characters. A product
|
|
21
|
+
* names its staff, but the line around the name is the platform's.
|
|
22
|
+
*/
|
|
23
|
+
function labelPart(text) {
|
|
24
|
+
return text
|
|
25
|
+
.replace(/[[\]\r\n\t]+/g, ' ')
|
|
26
|
+
.replace(/\s+/g, ' ')
|
|
27
|
+
.trim()
|
|
28
|
+
.slice(0, MAX_STAFF_LABEL_CHARS);
|
|
29
|
+
}
|
|
30
|
+
/** "Jordan (Toyota of Quillhaven sales)", or "Jordan" when the speaker has no role. */
|
|
31
|
+
export function staffLabel(speaker) {
|
|
32
|
+
const name = labelPart(speaker.displayName) || 'A person';
|
|
33
|
+
const role = speaker.role ? labelPart(speaker.role) : '';
|
|
34
|
+
return role ? `${name} (${role})` : name;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The line the model reads before a person's message: who wrote it, that the
|
|
38
|
+
* words are theirs, and that they stand.
|
|
39
|
+
*/
|
|
40
|
+
export function staffMessageNote(speaker) {
|
|
41
|
+
return (`[${staffLabel(speaker)}, a person on the staff, wrote this to the customer while they held the conversation. ` +
|
|
42
|
+
'These are their words, not yours; what they told the customer stands.]');
|
|
43
|
+
}
|
|
44
|
+
/** The line the model reads where a person took the conversation over, or handed it back. */
|
|
45
|
+
export function takeoverNote(change, speaker) {
|
|
46
|
+
return change === 'taken_over'
|
|
47
|
+
? `[${staffLabel(speaker)}, a person on the staff, took this conversation over here. You did not answer while they held it.]`
|
|
48
|
+
: `[${staffLabel(speaker)} handed the conversation back to you here. Answer the customer's next message yourself.]`;
|
|
49
|
+
}
|
|
50
|
+
// ─── Reading what arrives from the wire ─────────────────────────────────────
|
|
51
|
+
const text = (value, max) => typeof value === 'string' && value.trim().length > 0 && value.length <= max ? value : null;
|
|
52
|
+
/** A staff speaker, when `value` is one; else null. Only the fields the contract names are kept. */
|
|
53
|
+
export function readStaffSpeaker(value) {
|
|
54
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
55
|
+
return null;
|
|
56
|
+
const v = value;
|
|
57
|
+
const userId = text(v.userId, 200);
|
|
58
|
+
const displayName = text(v.displayName, MAX_STAFF_LABEL_CHARS);
|
|
59
|
+
if (!userId || !displayName)
|
|
60
|
+
return null;
|
|
61
|
+
const role = text(v.role, MAX_STAFF_LABEL_CHARS);
|
|
62
|
+
return { userId, displayName, ...(role ? { role } : {}) };
|
|
63
|
+
}
|
|
64
|
+
/** A hold, when `value` is one; else null. */
|
|
65
|
+
export function readConversationHold(value) {
|
|
66
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
67
|
+
return null;
|
|
68
|
+
const v = value;
|
|
69
|
+
const conversationId = text(v.conversationId, 200);
|
|
70
|
+
const holder = readStaffSpeaker(v.holder);
|
|
71
|
+
if (!conversationId || !holder || typeof v.since !== 'number' || !Number.isFinite(v.since))
|
|
72
|
+
return null;
|
|
73
|
+
return { conversationId, holder, since: v.since };
|
|
74
|
+
}
|
|
75
|
+
/** A conversation's message, when `value` is one; else null. A `staff` message must name its speaker. */
|
|
76
|
+
export function readConversationMessage(value) {
|
|
77
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
78
|
+
return null;
|
|
79
|
+
const v = value;
|
|
80
|
+
const id = text(v.id, 200);
|
|
81
|
+
const createdAt = text(v.createdAt, 64);
|
|
82
|
+
if (!id || !createdAt || typeof v.content !== 'string')
|
|
83
|
+
return null;
|
|
84
|
+
if (v.role !== 'user' && v.role !== 'assistant' && v.role !== 'staff')
|
|
85
|
+
return null;
|
|
86
|
+
const speaker = v.speaker === undefined ? null : readStaffSpeaker(v.speaker);
|
|
87
|
+
if (v.role === 'staff' && !speaker)
|
|
88
|
+
return null;
|
|
89
|
+
return { id, role: v.role, content: v.content, createdAt, ...(speaker ? { speaker } : {}) };
|
|
90
|
+
}
|
|
91
|
+
/** Whether `value` names a change of hands the platform knows. */
|
|
92
|
+
export function isTakeoverChange(value) {
|
|
93
|
+
return value === 'taken_over' || value === 'handed_back';
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/takeover/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAyBlE,0FAA0F;AAC1F,MAAM,CAAC,M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EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC9F,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,OAAO,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,aAAa,CAAC;AAC3D,CAAC"}
|
package/dist/turns/types.d.ts
CHANGED
|
@@ -16,13 +16,21 @@ export declare const TURN_STOP_EVENT = "agent:turn_stop";
|
|
|
16
16
|
export type TurnStopReason = 'user_stop' | 'superseded';
|
|
17
17
|
export declare const TURN_STOP_REASONS: readonly TurnStopReason[];
|
|
18
18
|
export declare function isTurnStopReason(value: unknown): value is TurnStopReason;
|
|
19
|
+
/**
|
|
20
|
+
* Why a turn's stop record says it must stop: a stop that was asked for
|
|
21
|
+
* (`TurnStopReason`), or a person on the staff holding its conversation
|
|
22
|
+
* (`taken_over`). Nobody asks for `taken_over`: the realtime server answers it
|
|
23
|
+
* from the conversation's hold.
|
|
24
|
+
*/
|
|
25
|
+
export type TurnStopRecordReason = TurnStopReason | 'taken_over';
|
|
19
26
|
/**
|
|
20
27
|
* Why a turn ended on the stop path, keeping what it had produced: a stop that
|
|
21
|
-
* was asked for (`TurnStopReason`),
|
|
22
|
-
*
|
|
23
|
-
*
|
|
28
|
+
* was asked for (`TurnStopReason`), its conversation taken over by a person
|
|
29
|
+
* (`taken_over`), or its own deadline (`deadline`: it ran out of time).
|
|
30
|
+
* Nobody asks for `deadline` either: it is only a stopped
|
|
31
|
+
* turn's reason.
|
|
24
32
|
*/
|
|
25
|
-
export type TurnStoppedReason =
|
|
33
|
+
export type TurnStoppedReason = TurnStopRecordReason | 'deadline';
|
|
26
34
|
export declare const TURN_STOPPED_REASONS: readonly TurnStoppedReason[];
|
|
27
35
|
export declare function isTurnStoppedReason(value: unknown): value is TurnStoppedReason;
|
|
28
36
|
/**
|
|
@@ -50,9 +58,9 @@ export type TurnStopResult = {
|
|
|
50
58
|
/** The stop the realtime server keeps for a turn, written once. */
|
|
51
59
|
export interface TurnStopRecord {
|
|
52
60
|
turnId: string;
|
|
53
|
-
/** The user who asked, or on whose behalf the host asked. */
|
|
61
|
+
/** The user who asked, or on whose behalf the host asked; for `taken_over`, the person who holds the conversation. */
|
|
54
62
|
by: string;
|
|
55
|
-
reason:
|
|
63
|
+
reason: TurnStopRecordReason;
|
|
56
64
|
/** Epoch ms, by the store's clock. */
|
|
57
65
|
at: number;
|
|
58
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/turns/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,YAAY,CAAC;AAExD,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAAgC,CAAC;AAExF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED;;;;;GAKG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/turns/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,YAAY,CAAC;AAExD,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAAgC,CAAC;AAExF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,YAAY,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,GAAG,UAAU,CAAC;AAElE,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EAAqD,CAAC;AAEnH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,WAAW,GAAG,SAAS,CAAA;CAAE,GAC3C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,GAAG,aAAa,CAAA;CAAE,CAAC;AAE1E,mEAAmE;AACnE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,sHAAsH;IACtH,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,oBAAoB,CAAC;IAC7B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAc,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,gBAAgB;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,GAAG,MAAM,CAWjF"}
|
package/dist/turns/types.js
CHANGED
|
@@ -12,7 +12,7 @@ export const TURN_STOP_REASONS = ['user_stop', 'superseded'];
|
|
|
12
12
|
export function isTurnStopReason(value) {
|
|
13
13
|
return typeof value === 'string' && TURN_STOP_REASONS.includes(value);
|
|
14
14
|
}
|
|
15
|
-
export const TURN_STOPPED_REASONS = [...TURN_STOP_REASONS, 'deadline'];
|
|
15
|
+
export const TURN_STOPPED_REASONS = [...TURN_STOP_REASONS, 'taken_over', 'deadline'];
|
|
16
16
|
export function isTurnStoppedReason(value) {
|
|
17
17
|
return typeof value === 'string' && TURN_STOPPED_REASONS.includes(value);
|
|
18
18
|
}
|
|
@@ -33,6 +33,8 @@ export function turnStoppedNote(marker) {
|
|
|
33
33
|
return '[This turn was stopped here because the person sent a new message. Calls marked "not run" did not run.]';
|
|
34
34
|
case 'deadline':
|
|
35
35
|
return '[This turn ran out of time and was stopped here. Calls marked "not run" did not run.]';
|
|
36
|
+
case 'taken_over':
|
|
37
|
+
return '[A person on the staff took this conversation over here, and this turn was stopped. Calls marked "not run" did not run.]';
|
|
36
38
|
default:
|
|
37
39
|
return '[The person stopped this turn here. Calls marked "not run" did not run.]';
|
|
38
40
|
}
|
package/dist/turns/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/turns/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AASjD,MAAM,CAAC,MAAM,iBAAiB,GAA8B,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;AAExF,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,iBAAuC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC/F,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/turns/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AASjD,MAAM,CAAC,MAAM,iBAAiB,GAA8B,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;AAExF,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,iBAAuC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC/F,CAAC;AAmBD,MAAM,CAAC,MAAM,oBAAoB,GAAiC,CAAC,GAAG,iBAAiB,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAEnH,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,oBAA0C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClG,CAAC;AAgCD;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,GAAG,MAAM,CAAC;AAYnD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,MAAyC;IACvE,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;QACtB,KAAK,YAAY;YACf,OAAO,yGAAyG,CAAC;QACnH,KAAK,UAAU;YACb,OAAO,uFAAuF,CAAC;QACjG,KAAK,YAAY;YACf,OAAO,0HAA0H,CAAC;QACpI;YACE,OAAO,0EAA0E,CAAC;IACtF,CAAC;AACH,CAAC"}
|
|
@@ -16,6 +16,7 @@ import type { ApprovalContinuation, ApprovalGrant } from '../approvals/types.js'
|
|
|
16
16
|
import type { TurnStoppedMarker } from '../turns/types.js';
|
|
17
17
|
import type { AttachmentLimits, AttachmentRef } from '../attachments/types.js';
|
|
18
18
|
import type { MessageInput } from '../message-input/index.js';
|
|
19
|
+
import type { ConversationHold, StaffSpeaker, TakeoverChange } from '../takeover/index.js';
|
|
19
20
|
/**
|
|
20
21
|
* Context sent alongside each message. The SDK collects visible annotations
|
|
21
22
|
* and current route automatically; platforms can add custom metadata.
|
|
@@ -141,10 +142,14 @@ export interface AgentConversationChanges {
|
|
|
141
142
|
* A message as the platform stored it. An assistant message that called tools
|
|
142
143
|
* carries them in `toolCalls`; each call's result follows as a `tool` message,
|
|
143
144
|
* in the same order (or matched by `toolCallId` when the platform keeps it).
|
|
145
|
+
*
|
|
146
|
+
* A person on the staff who took the conversation over writes
|
|
147
|
+
* `staff` messages, each with its `speaker`; the take-over and the hand-back
|
|
148
|
+
* are `staff` entries too, with `takeover` and no content.
|
|
144
149
|
*/
|
|
145
150
|
export interface AgentStoredMessage {
|
|
146
151
|
id: string;
|
|
147
|
-
role: 'user' | 'assistant' | 'tool' | (string & {});
|
|
152
|
+
role: 'user' | 'assistant' | 'tool' | 'staff' | (string & {});
|
|
148
153
|
content: string | null;
|
|
149
154
|
toolCalls?: Array<{
|
|
150
155
|
id: string;
|
|
@@ -165,12 +170,54 @@ export interface AgentStoredMessage {
|
|
|
165
170
|
* it: set on a message they spoke. Absent or null when typed.
|
|
166
171
|
*/
|
|
167
172
|
input?: MessageInput | null;
|
|
173
|
+
/** On a `staff` message or entry: the person on the staff. */
|
|
174
|
+
speaker?: StaffSpeaker | null;
|
|
175
|
+
/** On a `staff` entry with no content: the conversation was taken over here, or handed back. */
|
|
176
|
+
takeover?: TakeoverChange | null;
|
|
168
177
|
}
|
|
169
178
|
/** One stored conversation, with its most recent messages in chronological order. */
|
|
170
179
|
export interface AgentStoredConversation {
|
|
171
180
|
conversationId: string;
|
|
172
181
|
title: string | null;
|
|
173
182
|
messages: AgentStoredMessage[];
|
|
183
|
+
/**
|
|
184
|
+
* Who holds the conversation now, as the realtime server
|
|
185
|
+
* says (`GET /internal/conversations/{id}/hold`); null or absent when the
|
|
186
|
+
* agent answers it.
|
|
187
|
+
*/
|
|
188
|
+
hold?: ConversationHold | null;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* A conversation as a person on the staff sees it: every
|
|
192
|
+
* stored message (the customer's, the agent's and the staff's), who holds it
|
|
193
|
+
* now, and who the viewer would be as its holder.
|
|
194
|
+
*/
|
|
195
|
+
export interface StaffConversation extends AgentStoredConversation {
|
|
196
|
+
hold: ConversationHold | null;
|
|
197
|
+
/** The staff member viewing it, as they would hold it. */
|
|
198
|
+
self: StaffSpeaker;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* The staff console's routes, on the product's API: each
|
|
202
|
+
* checks the staff member's permission itself, then calls the realtime
|
|
203
|
+
* server's conversation routes. The SDK never decides staff permissions.
|
|
204
|
+
*/
|
|
205
|
+
export interface StaffConsoleSeam {
|
|
206
|
+
/** The conversation as staff see it. Rejects when this staff member may not see it. */
|
|
207
|
+
getConversation(conversationId: string): Promise<StaffConversation>;
|
|
208
|
+
/**
|
|
209
|
+
* Take it over: the product checks the permission, withdraws a waiting
|
|
210
|
+
* approval, stores the take-over entry and holds the conversation. Resolves
|
|
211
|
+
* with the hold; rejects (with why) when someone else holds it or it is refused.
|
|
212
|
+
*/
|
|
213
|
+
takeOver(conversationId: string): Promise<ConversationHold>;
|
|
214
|
+
/** Hand it back: the product stores the hand-back entry and releases the hold. */
|
|
215
|
+
handBack(conversationId: string): Promise<void>;
|
|
216
|
+
/** Write to the customer as staff: the product stores the message, then announces it. Resolves with it as stored. */
|
|
217
|
+
sendMessage(params: {
|
|
218
|
+
conversationId: string;
|
|
219
|
+
content: string;
|
|
220
|
+
}): Promise<AgentStoredMessage>;
|
|
174
221
|
}
|
|
175
222
|
/**
|
|
176
223
|
* The complete client configuration. A platform provides this and nothing else.
|
|
@@ -291,6 +338,23 @@ export interface AgentClientConfig {
|
|
|
291
338
|
* Default: "agent-sdk.activeConversation".
|
|
292
339
|
*/
|
|
293
340
|
activeConversationKey?: string | false;
|
|
341
|
+
/**
|
|
342
|
+
* The conversation's room, and the token to join it: the
|
|
343
|
+
* product's API mints it for the customer whose conversation it is, or for a
|
|
344
|
+
* staff member it lets watch it. With it, the customer's tab follows a
|
|
345
|
+
* take-over, a person's messages and a hand-back as they happen, and the
|
|
346
|
+
* staff console follows the conversation live. Without it, neither does.
|
|
347
|
+
*/
|
|
348
|
+
conversationRoom?: (conversationId: string) => Promise<{
|
|
349
|
+
room: string;
|
|
350
|
+
roomToken?: string;
|
|
351
|
+
}>;
|
|
352
|
+
/**
|
|
353
|
+
* The staff console's routes, for `useStaffConversation`:
|
|
354
|
+
* take a conversation over, write as staff, hand it back. A customer-facing
|
|
355
|
+
* app leaves it out.
|
|
356
|
+
*/
|
|
357
|
+
staff?: StaffConsoleSeam;
|
|
294
358
|
/**
|
|
295
359
|
* Realtime connection config. The SDK creates and manages its own Socket.IO
|
|
296
360
|
* connection using this URL and auth token provider.
|
|
@@ -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;
|
|
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;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3F;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC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OAGG;IACH,QAAQ,EAAE,mBAAmB,CAAC;IAE9B;;;;OAIG;IACH,WAAW,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ouispec/agent-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"ajv": "^8.17.0",
|
|
33
33
|
"yaml": "^2.7.0",
|
|
34
|
-
"@ouispec/agent-events": "^0.
|
|
35
|
-
"
|
|
36
|
-
"
|
|
34
|
+
"@ouispec/agent-events": "^0.18.0",
|
|
35
|
+
"oui-spec": "^0.11.1",
|
|
36
|
+
"@ouispec/contract": "^0.5.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^22.0.0",
|