dsh-interconnect 0.11.21 → 0.11.22
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/dsh.plugin.json +1 -1
- package/lib/index.js +6 -4
- package/lib/interconnect/index.js +6 -4
- package/lib/interconnect/index.js.map +2 -2
- package/lib/skill-interconnect/index.js.map +2 -2
- package/lib/tool-interconnect/index.js +6 -4
- package/lib/tool-interconnect/index.js.map +2 -2
- package/lib/types/interconnect/index.d.ts.map +1 -1
- package/lib/types/interconnect/types.d.ts +4 -3
- package/lib/types/interconnect/types.d.ts.map +1 -1
- package/lib/types/skill-interconnect/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/skill-interconnect/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Companion skill for the dsh-interconnect tools: tells the model how to use\n * `interconnect_list`, `interconnect_ping`, `interconnect_send`, and\n * `interconnect_reply`, including the automatic sender-identity injection.\n *\n * This is a thin skill provider, intentionally separate from\n * `tool-interconnect`: the service and tools remain usable without the skill,\n * and the profile layer that enables cross-instance handoff mounts this row\n * with them. It injects the `interconnect` service so the skill only appears\n * when the transport it describes is actually present.\n * @module @deepseek-ai/dsh-experimental-skill-interconnect\n */\n\nimport { readFile } from 'node:fs/promises'\nimport { Context } from '@deepseek-ai/cordis'\nimport {\n BUNDLED_SKILL_RANK,\n type SkillCandidate,\n type SkillDefinition,\n type SkillProvider,\n} from '@deepseek-ai/dsh-skill'\n// Activates the `Context.interconnect` merge declared by the interconnect service plugin.\nimport type {} from '../interconnect/index.ts'\n\nconst PROVIDER_NAME = 'dsh-interconnect'\nconst SKILL_BODY_URL = new URL('../../assets/dsh-interconnect.md', import.meta.url)\nconst INVOCATION = { modelInvocable: true, userInvocable: true } as const\nconst DESCRIPTION = 'Use the dsh-interconnect tools to exchange messages between DSH sessions, instances, and machines: list live sessions on a known peer instance, send messages, reply to the last sender, and probe liveness. Use whenever you need to message another DSH agent, coordinate across sessions, or respond to an incoming interconnect handoff.'\n/* jscpd:ignore-start -- the bundled-skill provider shape is the same required boilerplate as skill-badge. */\nconst CANDIDATE: SkillCandidate = {\n name: 'dsh-interconnect',\n description: DESCRIPTION,\n invocation: INVOCATION,\n provider: PROVIDER_NAME,\n source: 'bundled',\n rank: BUNDLED_SKILL_RANK,\n locator: SKILL_BODY_URL,\n}\n\nconst provider: SkillProvider = {\n name: PROVIDER_NAME,\n list: () => Promise.resolve([CANDIDATE]),\n async get(_candidate): Promise<SkillDefinition> {\n return {\n name: CANDIDATE.name,\n description: CANDIDATE.description,\n invocation: CANDIDATE.invocation,\n provider: CANDIDATE.provider,\n source: CANDIDATE.source,\n content: await readFile(SKILL_BODY_URL, 'utf8'),\n }\n },\n}\n/* jscpd:ignore-end */\n\n/** Cordis plugin name. */\nexport const name = 'skill-interconnect'\n/** Services required by the companion provider. */\nexport const inject = ['skills', 'interconnect']\n\n/** Register the bundled `dsh-interconnect` skill on `ctx.skills`. */\nexport function apply(ctx: Context): void {\n ctx.skills.registerProvider(() => provider)\n}\n"],
|
|
5
|
-
"mappings": ";AAaA,SAAS,gBAAgB;AAEzB;AAAA,EACE;AAAA,OAIK;AAIP,IAAM,gBAAgB;AACtB,IAAM,iBAAiB,IAAI,IAAI,oCAAoC,YAAY,GAAG;AAClF,IAAM,aAAa,EAAE,gBAAgB,MAAM,eAAe,KAAK;AAC/D,IAAM,cAAc;
|
|
4
|
+
"sourcesContent": ["/**\n * Companion skill for the dsh-interconnect tools: tells the model how to use\n * `interconnect_list`, `interconnect_ping`, `interconnect_send`, and\n * `interconnect_reply`, including the automatic sender-identity injection.\n *\n * This is a thin skill provider, intentionally separate from\n * `tool-interconnect`: the service and tools remain usable without the skill,\n * and the profile layer that enables cross-instance handoff mounts this row\n * with them. It injects the `interconnect` service so the skill only appears\n * when the transport it describes is actually present.\n * @module @deepseek-ai/dsh-experimental-skill-interconnect\n */\n\nimport { readFile } from 'node:fs/promises'\nimport { Context } from '@deepseek-ai/cordis'\nimport {\n BUNDLED_SKILL_RANK,\n type SkillCandidate,\n type SkillDefinition,\n type SkillProvider,\n} from '@deepseek-ai/dsh-skill'\n// Activates the `Context.interconnect` merge declared by the interconnect service plugin.\nimport type {} from '../interconnect/index.ts'\n\nconst PROVIDER_NAME = 'dsh-interconnect'\nconst SKILL_BODY_URL = new URL('../../assets/dsh-interconnect.md', import.meta.url)\nconst INVOCATION = { modelInvocable: true, userInvocable: true } as const\nconst DESCRIPTION = 'Use the dsh-interconnect tools to exchange messages between DSH sessions, instances, and machines: list live sessions on a known peer instance, send messages, reply to the last sender, and probe liveness. Use whenever you need to message another DSH agent, coordinate across sessions, or respond to an incoming interconnect handoff.'\n/* jscpd:ignore-start -- the bundled-skill provider shape is the same required boilerplate as skill-badge. */\n// Unlike skill-badge, this candidate carries no `resourceBase`: `assets/` holds\n// only the body already inlined as `<skill_instructions>`, and a directory base\n// renders this installation's absolute path into model-visible text, which a\n// recorded session cannot replay elsewhere.\nconst CANDIDATE: SkillCandidate = {\n name: 'dsh-interconnect',\n description: DESCRIPTION,\n invocation: INVOCATION,\n provider: PROVIDER_NAME,\n source: 'bundled',\n rank: BUNDLED_SKILL_RANK,\n locator: SKILL_BODY_URL,\n}\n\nconst provider: SkillProvider = {\n name: PROVIDER_NAME,\n list: () => Promise.resolve([CANDIDATE]),\n async get(_candidate): Promise<SkillDefinition> {\n return {\n name: CANDIDATE.name,\n description: CANDIDATE.description,\n invocation: CANDIDATE.invocation,\n provider: CANDIDATE.provider,\n source: CANDIDATE.source,\n content: await readFile(SKILL_BODY_URL, 'utf8'),\n }\n },\n}\n/* jscpd:ignore-end */\n\n/** Cordis plugin name. */\nexport const name = 'skill-interconnect'\n/** Services required by the companion provider. */\nexport const inject = ['skills', 'interconnect']\n\n/** Register the bundled `dsh-interconnect` skill on `ctx.skills`. */\nexport function apply(ctx: Context): void {\n ctx.skills.registerProvider(() => provider)\n}\n"],
|
|
5
|
+
"mappings": ";AAaA,SAAS,gBAAgB;AAEzB;AAAA,EACE;AAAA,OAIK;AAIP,IAAM,gBAAgB;AACtB,IAAM,iBAAiB,IAAI,IAAI,oCAAoC,YAAY,GAAG;AAClF,IAAM,aAAa,EAAE,gBAAgB,MAAM,eAAe,KAAK;AAC/D,IAAM,cAAc;AAMpB,IAAM,YAA4B;AAAA,EAChC,MAAM;AAAA,EACN,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AACX;AAEA,IAAM,WAA0B;AAAA,EAC9B,MAAM;AAAA,EACN,MAAM,MAAM,QAAQ,QAAQ,CAAC,SAAS,CAAC;AAAA,EACvC,MAAM,IAAI,YAAsC;AAC9C,WAAO;AAAA,MACL,MAAM,UAAU;AAAA,MAChB,aAAa,UAAU;AAAA,MACvB,YAAY,UAAU;AAAA,MACtB,UAAU,UAAU;AAAA,MACpB,QAAQ,UAAU;AAAA,MAClB,SAAS,MAAM,SAAS,gBAAgB,MAAM;AAAA,IAChD;AAAA,EACF;AACF;AAIO,IAAM,OAAO;AAEb,IAAM,SAAS,CAAC,UAAU,cAAc;AAGxC,SAAS,MAAM,KAAoB;AACxC,MAAI,OAAO,iBAAiB,MAAM,QAAQ;AAC5C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -836,6 +836,8 @@ function assertNever(value) {
|
|
|
836
836
|
var INTERCONNECT_TOKEN_REF = "DSH_INTERCONNECT_TOKEN";
|
|
837
837
|
var PLUGIN_SOURCE = "dsh-interconnect";
|
|
838
838
|
var MAX_LINK_FRAME_BYTES = 1024 * 1024;
|
|
839
|
+
var DEFAULT_INSTANCE_ID = "dsh";
|
|
840
|
+
var DEFAULT_REQUEST_TIMEOUT_MS = 1e4;
|
|
839
841
|
var LINK_HANDSHAKE_TIMEOUT_MS = 1e4;
|
|
840
842
|
var LINK_CHANNEL = "/interconnect/link";
|
|
841
843
|
var MAX_INSTANCE_ID_CHARS = 256;
|
|
@@ -931,8 +933,8 @@ var linkFrameSchema = Schema.union([
|
|
|
931
933
|
var InterconnectService = class extends Service {
|
|
932
934
|
static inject = ["agents", "credentials"];
|
|
933
935
|
static Config = Schema.object({
|
|
934
|
-
instanceId: Schema.string().max(MAX_INSTANCE_ID_CHARS).default(
|
|
935
|
-
requestTimeoutMs: Schema.natural().max(6e4).default(
|
|
936
|
+
instanceId: Schema.string().max(MAX_INSTANCE_ID_CHARS).default(DEFAULT_INSTANCE_ID),
|
|
937
|
+
requestTimeoutMs: Schema.natural().max(6e4).default(DEFAULT_REQUEST_TIMEOUT_MS),
|
|
936
938
|
peers: Schema.dict(Schema.string()).default({}),
|
|
937
939
|
delivery: Schema.union([Schema.const("followup"), Schema.const("steer"), Schema.const("inject")]).default("followup"),
|
|
938
940
|
allowResume: Schema.boolean().default(true)
|
|
@@ -961,8 +963,8 @@ var InterconnectService = class extends Service {
|
|
|
961
963
|
disposed = false;
|
|
962
964
|
constructor(ctx, config) {
|
|
963
965
|
super(ctx, "interconnect");
|
|
964
|
-
this.instanceId = config.instanceId;
|
|
965
|
-
this.requestTimeoutMs = config.requestTimeoutMs;
|
|
966
|
+
this.instanceId = config.instanceId ?? DEFAULT_INSTANCE_ID;
|
|
967
|
+
this.requestTimeoutMs = config.requestTimeoutMs ?? DEFAULT_REQUEST_TIMEOUT_MS;
|
|
966
968
|
this.delivery = config.delivery ?? "followup";
|
|
967
969
|
this.allowResume = config.allowResume ?? true;
|
|
968
970
|
for (const origin of Object.values(config.peers ?? {})) {
|