@stratusagent/channels 0.10.0 → 0.11.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/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,33 @@ export interface SessionRouting {
|
|
|
69
69
|
agentId: string;
|
|
70
70
|
/** The metadata the dispatching channel attached to the session. */
|
|
71
71
|
metadata: JsonObject;
|
|
72
|
+
/**
|
|
73
|
+
* When this agent last SPOKE in the conversation, ISO-8601 — the
|
|
74
|
+
* timestamp of its newest reply, absent when it has never produced one.
|
|
75
|
+
*
|
|
76
|
+
* Deliberately not the session's modification time, which moves on every
|
|
77
|
+
* save a turn makes: a tool result, an approval checkpoint, a recovery
|
|
78
|
+
* resuming after a restart. An agent part-way through a long turn would
|
|
79
|
+
* look like the most recent speaker under that reading while another
|
|
80
|
+
* agent had actually answered, and the Slack adapter orders the agents
|
|
81
|
+
* sharing a thread by this to decide whose an untagged follow-up is.
|
|
82
|
+
*
|
|
83
|
+
* Still routing, not transcript: it says *when* an agent spoke, never
|
|
84
|
+
* what was said. Optional because a host may not track it; a caller that
|
|
85
|
+
* needs to order two sessions checks for it rather than assuming, and
|
|
86
|
+
* says what it gives up without it.
|
|
87
|
+
*/
|
|
88
|
+
lastSpokeAt?: string;
|
|
89
|
+
/**
|
|
90
|
+
* The text the session's latest turn produced (`latestTurnReply` in
|
|
91
|
+
* `@stratusagent/core`, the same rule an adapter finalizes its own turns
|
|
92
|
+
* by; absent when the turn produced none) — for a turn the adapter did
|
|
93
|
+
* not start and so never rendered. A turn
|
|
94
|
+
* parked on a human when the daemon died is re-asked after the restart
|
|
95
|
+
* and finishes in a process that has no placeholder to edit; without
|
|
96
|
+
* this, the approval survived the restart and the reply went nowhere.
|
|
97
|
+
*/
|
|
98
|
+
reply?: string;
|
|
72
99
|
}
|
|
73
100
|
export interface GatewayLike {
|
|
74
101
|
dispatch(input: {
|
|
@@ -77,9 +104,23 @@ export interface GatewayLike {
|
|
|
77
104
|
userMessage: string;
|
|
78
105
|
metadata?: JsonObject;
|
|
79
106
|
signal?: AbortSignal;
|
|
107
|
+
/**
|
|
108
|
+
* Caller-chosen id for this turn, so the adapter can tell its own turn's
|
|
109
|
+
* events from another caller's on the same session — see `activeTurnId`.
|
|
110
|
+
*/
|
|
111
|
+
turnId?: string;
|
|
80
112
|
}): Promise<Session>;
|
|
81
113
|
readonly bus: EventBus;
|
|
82
114
|
agents(): AgentDefinition[];
|
|
115
|
+
/**
|
|
116
|
+
* The `turnId` of the turn currently running on a session, if its caller
|
|
117
|
+
* named one. Optional: a host that omits it leaves the adapter to guess
|
|
118
|
+
* which turn an outcome belongs to from the order events arrive in, which
|
|
119
|
+
* is right for every turn the adapter started itself and wrong for a turn
|
|
120
|
+
* another surface dispatched to the same session while a message of the
|
|
121
|
+
* adapter's was queued behind it.
|
|
122
|
+
*/
|
|
123
|
+
activeTurnId?(sessionId: string): string | undefined;
|
|
83
124
|
/**
|
|
84
125
|
* Where a durable session came from, or undefined if there is no such
|
|
85
126
|
* session.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,QAAQ,EACR,UAAU,EACV,OAAO,EACR,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,C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rB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,KAAG,MAMjE,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA8NA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAU,EAAE;IACzE,MAAM,QAAQ,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAChF,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACjB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stratusagent/channels",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"node": ">=22.13 <23 || >=23.4"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@stratusagent/core": "0.
|
|
20
|
+
"@stratusagent/core": "0.11.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^24.6.0",
|