dsh-interconnect 0.10.1 → 0.11.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/README.md +15 -13
- package/assets/dsh-interconnect.md +5 -5
- package/dsh.plugin.json +2 -2
- package/lib/index.js +270 -152
- package/lib/interconnect/index.js +272 -153
- package/lib/interconnect/index.js.map +3 -3
- package/lib/skill-interconnect/index.js +1 -1
- package/lib/skill-interconnect/index.js.map +2 -2
- package/lib/tool-interconnect/index.js +70 -58
- package/lib/tool-interconnect/index.js.map +2 -2
- package/lib/types/interconnect/index.d.ts +64 -26
- package/lib/types/interconnect/index.d.ts.map +1 -1
- package/lib/types/interconnect/types.d.ts +7 -47
- package/lib/types/interconnect/types.d.ts.map +1 -1
- package/lib/types/skill-interconnect/index.d.ts.map +1 -1
- package/lib/types/tool-interconnect/index.d.ts +7 -3
- package/lib/types/tool-interconnect/index.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Wire contracts for `@deepseek-ai/dsh-interconnect`.
|
|
3
|
-
* The transport is WebSocket
|
|
4
|
-
*
|
|
5
|
-
* (see `index.ts`); this module defines those frames plus the business payloads
|
|
6
|
-
* that ride inside them. No Host RPC envelope is involved.
|
|
3
|
+
* The transport is one WebSocket link per peer; this module defines only the
|
|
4
|
+
* business payloads that ride inside link frames.
|
|
7
5
|
* @module @deepseek-ai/dsh-interconnect
|
|
8
6
|
*/
|
|
9
|
-
/**
|
|
10
|
-
* Logical HTTP route prefix this service owns. Requests reach endpoints as
|
|
11
|
-
* `<baseURL>/interconnect/<endpoint>`.
|
|
12
|
-
*/
|
|
13
|
-
export declare const INTERCONNECT_CHANNEL = "/interconnect";
|
|
14
|
-
/**
|
|
15
|
-
* Credential reference holding the shared auth token. Both halves of a link
|
|
16
|
-
* must resolve the same value: inbound requests are rejected unless their
|
|
17
|
-
* `Authorization: Bearer <token>` matches this secret, and outbound requests
|
|
18
|
-
* send it. An unconfigured token fails closed on the inbound side.
|
|
19
|
-
*/
|
|
20
|
-
export declare const INTERCONNECT_TOKEN_REF = "DSH_INTERCONNECT_TOKEN";
|
|
21
7
|
/**
|
|
22
8
|
* How one inbound message reaches the target agent's inbox. Each value names an
|
|
23
9
|
* existing `Agent` method, which is exactly the pair `(inbox target, wakeup)`:
|
|
@@ -131,7 +117,7 @@ export interface PingResult {
|
|
|
131
117
|
* can reach exactly these, so the listing is the set of valid `sessionId`
|
|
132
118
|
* values rather than a directory of everything ever persisted.
|
|
133
119
|
*/
|
|
134
|
-
export interface
|
|
120
|
+
export interface InterconnectSessionSummary {
|
|
135
121
|
/** The session id to pass back as `SendPayload.sessionId`. */
|
|
136
122
|
readonly sessionId: string;
|
|
137
123
|
/**
|
|
@@ -146,7 +132,7 @@ export interface SessionSummary {
|
|
|
146
132
|
/** Business result of a `list` endpoint call. */
|
|
147
133
|
export interface ListResult {
|
|
148
134
|
/** Live sessions in registration order. */
|
|
149
|
-
readonly sessions: readonly
|
|
135
|
+
readonly sessions: readonly InterconnectSessionSummary[];
|
|
150
136
|
/** Echoed receiver instance id (diagnostic; never trusted for routing). */
|
|
151
137
|
readonly instance: string;
|
|
152
138
|
}
|
|
@@ -174,23 +160,6 @@ export interface SendRequest {
|
|
|
174
160
|
/** Ask the receiver to wake a persisted session; see {@link SendPayload.resume}. */
|
|
175
161
|
readonly resume?: boolean;
|
|
176
162
|
}
|
|
177
|
-
/**
|
|
178
|
-
* Business payload for the `reply` endpoint: deliver one text message back to
|
|
179
|
-
* the peer that a given local session most recently received a message from.
|
|
180
|
-
* `sessionId` names the LOCAL session; the outbound target is the sender this
|
|
181
|
-
* session recorded, so the caller does not need to know the peer's origin or
|
|
182
|
-
* session id again.
|
|
183
|
-
*/
|
|
184
|
-
export interface ReplyPayload {
|
|
185
|
-
/** Local session id that received the message being replied to. */
|
|
186
|
-
readonly sessionId: string;
|
|
187
|
-
/** Message text delivered back to the recorded sender's session. */
|
|
188
|
-
readonly text: string;
|
|
189
|
-
/** Per-message delivery override forwarded to the recalled sender. */
|
|
190
|
-
readonly delivery?: DeliveryMode;
|
|
191
|
-
/** Ask the recalled sender's receiver to wake a persisted session. */
|
|
192
|
-
readonly resume?: boolean;
|
|
193
|
-
}
|
|
194
163
|
/** Outbound reply request: which local session is replying, plus the text. */
|
|
195
164
|
export interface ReplyRequest {
|
|
196
165
|
/** Local session id that received the message being replied to. */
|
|
@@ -285,9 +254,9 @@ export type QueryMessage = {
|
|
|
285
254
|
};
|
|
286
255
|
/**
|
|
287
256
|
* The message-shaped business payload carried by a `msg` link frame. `kind`
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
257
|
+
* is always `send`: a reply originates locally (the tool calls `reply()`,
|
|
258
|
+
* which sends a regular `send` frame to the recalled sender), so the wire
|
|
259
|
+
* carries no `reply` variant to relay.
|
|
291
260
|
*/
|
|
292
261
|
export type LinkMessage = {
|
|
293
262
|
readonly kind: 'send';
|
|
@@ -297,15 +266,6 @@ export type LinkMessage = {
|
|
|
297
266
|
readonly sender?: SenderIdentity;
|
|
298
267
|
readonly delivery?: DeliveryMode;
|
|
299
268
|
readonly resume?: boolean;
|
|
300
|
-
} | {
|
|
301
|
-
readonly kind: 'reply';
|
|
302
|
-
/** LOCAL session id that received the message being replied to. */
|
|
303
|
-
readonly sessionId: string;
|
|
304
|
-
readonly text: string;
|
|
305
|
-
/** Attribution for the replying instance, so the peer can reply back. */
|
|
306
|
-
readonly sender?: SenderIdentity;
|
|
307
|
-
readonly delivery?: DeliveryMode;
|
|
308
|
-
readonly resume?: boolean;
|
|
309
269
|
};
|
|
310
270
|
/**
|
|
311
271
|
* Handle to one established outbound WebSocket peer link. `close` tears the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/interconnect/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","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AClC,8BAA8B;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,wDAAwD;IACxD,KAAK,IAAI,IAAI,CAAA;CACd;AAED,sDAAsD;AACtD,MAAM,WAAW,MAAM;IACrB,sFAAsF;IACtF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAA;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/skill-interconnect/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/skill-interconnect/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA+C7C,0BAA0B;AAC1B,eAAO,MAAM,IAAI,uBAAuB,CAAA;AACxC,mDAAmD;AACnD,eAAO,MAAM,MAAM,UAA6B,CAAA;AAEhD,qEAAqE;AACrE,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAExC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Model-facing tools for cross-instance message handoff: `interconnect_send`
|
|
3
|
-
* delivers one text message to a live session on a peer DSH instance,
|
|
4
|
-
* `interconnect_ping` probes a peer's liveness and identity
|
|
3
|
+
* delivers one text message to a live session on a peer DSH instance,
|
|
4
|
+
* `interconnect_ping` probes a peer's liveness and identity, `interconnect_list`
|
|
5
|
+
* discovers a peer's live sessions, and `interconnect_reply` answers the sender
|
|
6
|
+
* a local session last heard from.
|
|
5
7
|
*
|
|
6
8
|
* The tools consume the host-plane `interconnect` service and publish nothing
|
|
7
9
|
* themselves, so this row sits as an ordinary tool plugin in a preset while
|
|
@@ -10,10 +12,12 @@
|
|
|
10
12
|
* @module @deepseek-ai/dsh-tool-interconnect
|
|
11
13
|
*/
|
|
12
14
|
import { Context } from '@deepseek-ai/cordis';
|
|
15
|
+
/** Cordis plugin name. */
|
|
16
|
+
export declare const name = "tool-interconnect";
|
|
13
17
|
/** Services required before the tools can register. */
|
|
14
18
|
export declare const inject: string[];
|
|
15
19
|
/**
|
|
16
|
-
* Register the
|
|
20
|
+
* Register the four tool surfaces. Registration is idempotent per fiber; the
|
|
17
21
|
* tools unregister with the owning fiber.
|
|
18
22
|
* @param ctx - connection context carrying the interconnect service and the tool registry.
|
|
19
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tool-interconnect/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tool-interconnect/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAK7C,0BAA0B;AAC1B,eAAO,MAAM,IAAI,sBAAsB,CAAA;AAEvC,uDAAuD;AACvD,eAAO,MAAM,MAAM,UAA4B,CAAA;AA6C/C;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAmRxC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-interconnect",
|
|
3
3
|
"description": "Cross-instance message/event handoff plugins for DeepSeek Harness (DSH): interconnect service + model-facing tools + companion skill",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@deepseek-ai/cordis": "link:../dsh/vendor/cordis",
|
|
67
|
+
"@deepseek-ai/cordis-plugin-loader": "link:../dsh/vendor/loader",
|
|
67
68
|
"@deepseek-ai/schemastery": "link:../dsh/vendor/schemastery",
|
|
68
69
|
"@deepseek-ai/dsh-agent": "link:../dsh/packages/core/agent",
|
|
69
70
|
"@deepseek-ai/dsh-credentials": "link:../dsh/packages/credentials/credentials",
|