@try-works/dsh-model-as-tool 0.1.1 → 0.1.2
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 +51 -0
- package/bin/dsh-tool-mode-mcp-stdio.mjs +80 -0
- package/catalog/desert-ant-models.json +77 -13
- package/lib/adapters/index.d.ts +19 -6
- package/lib/adapters/index.d.ts.map +1 -1
- package/lib/adapters/index.js +28 -13
- package/lib/adapters/tongue.d.ts +11 -3
- package/lib/adapters/tongue.d.ts.map +1 -1
- package/lib/adapters/tongue.js +12 -4
- package/lib/adapters/types.d.ts +11 -0
- package/lib/adapters/types.d.ts.map +1 -1
- package/lib/adapters/voz.d.ts +7 -1
- package/lib/adapters/voz.d.ts.map +1 -1
- package/lib/adapters/voz.js +16 -4
- package/lib/asset-acquisition.d.ts +137 -0
- package/lib/asset-acquisition.d.ts.map +1 -0
- package/lib/asset-acquisition.js +161 -0
- package/lib/authority.d.ts +153 -0
- package/lib/authority.d.ts.map +1 -0
- package/lib/authority.js +194 -0
- package/lib/bindings.d.ts +115 -0
- package/lib/bindings.d.ts.map +1 -0
- package/lib/bindings.js +239 -0
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +57 -0
- package/lib/contract-payload.d.ts +47 -0
- package/lib/contract-payload.d.ts.map +1 -0
- package/lib/contract-payload.js +137 -0
- package/lib/deployment-coordinator.d.ts +213 -0
- package/lib/deployment-coordinator.d.ts.map +1 -0
- package/lib/deployment-coordinator.js +274 -0
- package/lib/harness-budgets.d.ts +158 -0
- package/lib/harness-budgets.d.ts.map +1 -0
- package/lib/harness-budgets.js +152 -0
- package/lib/index.d.ts +41 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +424 -16
- package/lib/licensing.d.ts +221 -0
- package/lib/licensing.d.ts.map +1 -0
- package/lib/licensing.js +188 -0
- package/lib/mcp/host-binding.d.ts +91 -0
- package/lib/mcp/host-binding.d.ts.map +1 -0
- package/lib/mcp/host-binding.js +133 -0
- package/lib/mcp/http.d.ts +130 -0
- package/lib/mcp/http.d.ts.map +1 -0
- package/lib/mcp/http.js +274 -0
- package/lib/mcp/protocol.d.ts +261 -0
- package/lib/mcp/protocol.d.ts.map +1 -0
- package/lib/mcp/protocol.js +387 -0
- package/lib/mcp/server.d.ts +115 -0
- package/lib/mcp/server.d.ts.map +1 -0
- package/lib/mcp/server.js +200 -0
- package/lib/mcp/stdio.d.ts +80 -0
- package/lib/mcp/stdio.d.ts.map +1 -0
- package/lib/mcp/stdio.js +176 -0
- package/lib/mcp/subscriptions.d.ts +135 -0
- package/lib/mcp/subscriptions.d.ts.map +1 -0
- package/lib/mcp/subscriptions.js +207 -0
- package/lib/provider-bridge.d.ts +69 -0
- package/lib/provider-bridge.d.ts.map +1 -0
- package/lib/provider-bridge.js +218 -0
- package/lib/publication.d.ts +160 -0
- package/lib/publication.d.ts.map +1 -0
- package/lib/publication.js +173 -0
- package/lib/receipt.d.ts +208 -0
- package/lib/receipt.d.ts.map +1 -0
- package/lib/receipt.js +150 -0
- package/lib/registrar.d.ts +13 -0
- package/lib/registrar.d.ts.map +1 -1
- package/lib/registrar.js +20 -3
- package/lib/resource-governance.d.ts +204 -0
- package/lib/resource-governance.d.ts.map +1 -0
- package/lib/resource-governance.js +213 -0
- package/lib/server-lifecycle.d.ts +175 -0
- package/lib/server-lifecycle.d.ts.map +1 -0
- package/lib/server-lifecycle.js +269 -0
- package/lib/types.d.ts +21 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +9 -2
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server and plugin lifecycle (RUN-01, RUN-02, RUN-05, RUN-06, RUN-07).
|
|
3
|
+
*
|
|
4
|
+
* Almost every rule here is about what must NOT happen:
|
|
5
|
+
*
|
|
6
|
+
* - **Do not announce readiness before it is true** (RUN-06). A listener that reports
|
|
7
|
+
* ready before its bind or its initialisation succeeded sends a client to a port
|
|
8
|
+
* that is not answering. Readiness is therefore a STATE derived from both, not a flag
|
|
9
|
+
* set by whoever got there first.
|
|
10
|
+
* - **Do not resolve a port conflict by force or by stealth** (RUN-06). Taking the port
|
|
11
|
+
* from another process, or silently moving to a different one, both break a client
|
|
12
|
+
* that was told where to connect. The conflict is reported.
|
|
13
|
+
* - **Do not let a failed start take the host with it** (RUN-06). The MCP endpoint is
|
|
14
|
+
* one feature of a much larger host; a port clash must leave the rest running.
|
|
15
|
+
* - **Do not kill work you do not own** (RUN-07). A model process serving another
|
|
16
|
+
* still-authorized owner is not this lifecycle's to terminate.
|
|
17
|
+
* - **Do not prepare anything at startup** (RUN-05). Nothing downloads because a plugin
|
|
18
|
+
* loaded or a client listed tools.
|
|
19
|
+
*
|
|
20
|
+
* @module @try-works/dsh-model-as-tool/server-lifecycle
|
|
21
|
+
*/
|
|
22
|
+
/** The documented grace period for cleanup (RUN-07). */
|
|
23
|
+
export const DEFAULT_GRACE_MS = 5000;
|
|
24
|
+
/**
|
|
25
|
+
* Manages one MCP listener's lifecycle.
|
|
26
|
+
*
|
|
27
|
+
* Deliberately separate from the DSH plugin's own lifecycle: RUN-01 requires disabling
|
|
28
|
+
* the SERVER to stop its listener and owned work without disabling unrelated DSH tools,
|
|
29
|
+
* so the two must be independently stoppable.
|
|
30
|
+
*/
|
|
31
|
+
export class ServerLifecycle {
|
|
32
|
+
#state = 'stopped';
|
|
33
|
+
#port = null;
|
|
34
|
+
#closeListener = null;
|
|
35
|
+
#work = new Map();
|
|
36
|
+
#host;
|
|
37
|
+
#graceMs;
|
|
38
|
+
/** Set once shutdown begins, so new work is refused from that moment. */
|
|
39
|
+
#acceptingWork = true;
|
|
40
|
+
constructor(host, options = {}) {
|
|
41
|
+
this.#host = host;
|
|
42
|
+
this.#graceMs = options.graceMs ?? DEFAULT_GRACE_MS;
|
|
43
|
+
}
|
|
44
|
+
/** The current state. */
|
|
45
|
+
get state() {
|
|
46
|
+
return this.#state;
|
|
47
|
+
}
|
|
48
|
+
/** The bound port, once one exists. */
|
|
49
|
+
get port() {
|
|
50
|
+
return this.#port;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Whether the endpoint is serving (RUN-06).
|
|
54
|
+
*
|
|
55
|
+
* True only after BOTH bind and initialise succeeded. A caller asking "can I connect"
|
|
56
|
+
* gets one answer, and it is not derived from a flag somebody set early.
|
|
57
|
+
*/
|
|
58
|
+
get ready() {
|
|
59
|
+
return this.#state === 'ready';
|
|
60
|
+
}
|
|
61
|
+
/** Work currently owned, for diagnostics. */
|
|
62
|
+
get owned() {
|
|
63
|
+
return [...this.#work.values()];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Start the listener.
|
|
67
|
+
*
|
|
68
|
+
* @returns nothing on success, or the failure — never a thrown exception, because
|
|
69
|
+
* RUN-06 requires a failed start not to crash the unrelated host.
|
|
70
|
+
*/
|
|
71
|
+
async start() {
|
|
72
|
+
if (this.#state === 'ready' || this.#state === 'starting') {
|
|
73
|
+
return {
|
|
74
|
+
ok: false,
|
|
75
|
+
failure: {
|
|
76
|
+
code: 'ALREADY_STARTED',
|
|
77
|
+
message: `the server is already ${this.#state}`,
|
|
78
|
+
remedy: 'Call stop() before starting again.',
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
this.#state = 'starting';
|
|
83
|
+
try {
|
|
84
|
+
const listener = await this.#host.bind();
|
|
85
|
+
this.#port = listener.port;
|
|
86
|
+
this.#closeListener = listener.close;
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
const code = error.code;
|
|
90
|
+
this.#state = 'failed';
|
|
91
|
+
if (code === 'EADDRINUSE') {
|
|
92
|
+
// Reported, NOT resolved. Taking the port from another process or silently
|
|
93
|
+
// moving to a different one both break a client told where to connect.
|
|
94
|
+
return {
|
|
95
|
+
ok: false,
|
|
96
|
+
failure: {
|
|
97
|
+
code: 'PORT_IN_USE',
|
|
98
|
+
message: `port ${String(error.message)} is already in use`,
|
|
99
|
+
remedy: 'Choose a different port in the configuration, or stop the process holding it. This server will not take it by force or move silently.',
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
ok: false,
|
|
105
|
+
failure: {
|
|
106
|
+
code: 'BIND_FAILED',
|
|
107
|
+
message: error instanceof Error ? error.message : String(error),
|
|
108
|
+
remedy: 'Check that the bind address is a loopback address and that the port is permitted.',
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
await this.#host.initialise();
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
this.#state = 'failed';
|
|
117
|
+
// The listener bound but cannot serve, so it is CLOSED rather than left open:
|
|
118
|
+
// an open port that answers nothing is worse than no port.
|
|
119
|
+
await this.#closeListener?.().catch(() => undefined);
|
|
120
|
+
this.#closeListener = null;
|
|
121
|
+
this.#port = null;
|
|
122
|
+
return {
|
|
123
|
+
ok: false,
|
|
124
|
+
failure: {
|
|
125
|
+
code: 'INIT_FAILED',
|
|
126
|
+
message: error instanceof Error ? error.message : String(error),
|
|
127
|
+
remedy: 'Check the server diagnostics; the host itself is unaffected.',
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
// Only now. Readiness after BOTH succeed, and never before.
|
|
132
|
+
this.#state = 'ready';
|
|
133
|
+
this.#host.onReady(this.#port);
|
|
134
|
+
return { ok: true, port: this.#port };
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Register work this lifecycle owns (RUN-07).
|
|
138
|
+
*
|
|
139
|
+
* Refused once shutdown has begun, so a call racing a stop cannot slip into the
|
|
140
|
+
* cleanup window and be left running.
|
|
141
|
+
* @param work - the work to own.
|
|
142
|
+
* @returns whether it was accepted.
|
|
143
|
+
*/
|
|
144
|
+
adopt(work) {
|
|
145
|
+
if (!this.#acceptingWork)
|
|
146
|
+
return false;
|
|
147
|
+
this.#work.set(work.id, work);
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
/** Release work that finished on its own. */
|
|
151
|
+
release(id) {
|
|
152
|
+
this.#work.delete(id);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Stop the listener and everything it owns (RUN-07).
|
|
156
|
+
*
|
|
157
|
+
* The order is the requirement's: refuse new work, cancel owned foreground
|
|
158
|
+
* invocations, wait within the grace period, terminate what remains, close the
|
|
159
|
+
* transport and release the port. Work belonging to another owner is LEFT ALONE.
|
|
160
|
+
* @param options - `ownedBy` selects the owner whose work may be stopped.
|
|
161
|
+
* @returns the report.
|
|
162
|
+
*/
|
|
163
|
+
async stop(options = {}) {
|
|
164
|
+
// 1. Refuse new work FIRST, so nothing is adopted during cleanup.
|
|
165
|
+
this.#acceptingWork = false;
|
|
166
|
+
if (this.#state === 'stopped') {
|
|
167
|
+
return { cancelled: [], terminated: [], untouched: [], portReleased: true, withinGrace: true };
|
|
168
|
+
}
|
|
169
|
+
this.#state = 'stopping';
|
|
170
|
+
const mine = [];
|
|
171
|
+
const untouched = [];
|
|
172
|
+
for (const work of this.#work.values()) {
|
|
173
|
+
// RUN-07: never kill a model process serving another still-authorized owner.
|
|
174
|
+
if (options.ownedBy !== undefined && work.owner !== options.ownedBy) {
|
|
175
|
+
untouched.push(work.id);
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
mine.push(work);
|
|
179
|
+
}
|
|
180
|
+
// 2. Cancel owned foreground invocations, and wait for them WITHIN the grace
|
|
181
|
+
// period. Racing each cancel against one shared deadline is what makes the grace
|
|
182
|
+
// period mean something: a cancel that never resolves must not hold shutdown open
|
|
183
|
+
// forever, and it must not be reported as stopped either.
|
|
184
|
+
const deadline = Date.now() + this.#graceMs;
|
|
185
|
+
const cancelled = [];
|
|
186
|
+
const terminated = [];
|
|
187
|
+
const outcomes = await Promise.all(mine.map(async (work) => {
|
|
188
|
+
const remaining = Math.max(0, deadline - Date.now());
|
|
189
|
+
const settled = await Promise.race([
|
|
190
|
+
Promise.resolve(work.cancel()).then(() => true).catch(() => false),
|
|
191
|
+
new Promise(resolve => setTimeout(() => resolve(false), remaining)),
|
|
192
|
+
]);
|
|
193
|
+
return { work, settled };
|
|
194
|
+
}));
|
|
195
|
+
for (const { work, settled } of outcomes) {
|
|
196
|
+
if (settled)
|
|
197
|
+
cancelled.push(work.id);
|
|
198
|
+
}
|
|
199
|
+
const withinGrace = outcomes.every(outcome => outcome.settled);
|
|
200
|
+
// 3. Terminate whatever outlived the grace period.
|
|
201
|
+
for (const { work, settled } of outcomes) {
|
|
202
|
+
if (settled)
|
|
203
|
+
continue;
|
|
204
|
+
try {
|
|
205
|
+
work.terminate?.();
|
|
206
|
+
terminated.push(work.id);
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
// A terminate that throws is logged rather than fatal: shutdown must complete
|
|
210
|
+
// even when one piece of work refuses to die.
|
|
211
|
+
this.#host.log(`work ${work.id} could not be terminated`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
this.#work.clear();
|
|
215
|
+
// 4. Close the transport and release the port.
|
|
216
|
+
let portReleased = false;
|
|
217
|
+
try {
|
|
218
|
+
await this.#closeListener?.();
|
|
219
|
+
portReleased = true;
|
|
220
|
+
}
|
|
221
|
+
catch {
|
|
222
|
+
this.#host.log('the listener could not be closed cleanly');
|
|
223
|
+
}
|
|
224
|
+
this.#closeListener = null;
|
|
225
|
+
this.#port = null;
|
|
226
|
+
this.#state = 'stopped';
|
|
227
|
+
this.#acceptingWork = true;
|
|
228
|
+
return { cancelled, terminated, untouched, portReleased, withinGrace };
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/** The only startup policy this implementation permits (RUN-05). */
|
|
232
|
+
export const READ_ONLY_STARTUP = {
|
|
233
|
+
preparesModels: false,
|
|
234
|
+
resolvesPackages: false,
|
|
235
|
+
discoveryIsReadOnly: true,
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Whether a startup action is permitted (RUN-05).
|
|
239
|
+
*
|
|
240
|
+
* @param action - what the startup wants to do.
|
|
241
|
+
* @returns whether it may.
|
|
242
|
+
*/
|
|
243
|
+
export function startupPermits(action) {
|
|
244
|
+
switch (action) {
|
|
245
|
+
// Restoring an explicitly approved activation and inspecting local state are the
|
|
246
|
+
// two things startup MAY do.
|
|
247
|
+
case 'restore-active':
|
|
248
|
+
case 'inspect-assets':
|
|
249
|
+
case 'read-manifests':
|
|
250
|
+
return true;
|
|
251
|
+
// Preparation and resolution are refused, because RUN-05 is explicit that nothing
|
|
252
|
+
// downloads because a plugin loaded or a client listed tools.
|
|
253
|
+
case 'prepare-model':
|
|
254
|
+
case 'resolve-package':
|
|
255
|
+
case 'download-weights':
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Whether disabling the MCP server must also disable unrelated DSH tools (RUN-01).
|
|
261
|
+
*
|
|
262
|
+
* It must not. The server and the plugin are independently stoppable, which is why the
|
|
263
|
+
* lifecycle is a separate object from the plugin's own registration state.
|
|
264
|
+
* @returns always false.
|
|
265
|
+
*/
|
|
266
|
+
export function disablingServerDisablesOtherTools() {
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=server-lifecycle.js.map
|
package/lib/types.d.ts
CHANGED
|
@@ -65,6 +65,27 @@ export interface ModelCatalogEntry {
|
|
|
65
65
|
readonly name: string;
|
|
66
66
|
readonly summary: string;
|
|
67
67
|
readonly capability: string;
|
|
68
|
+
/**
|
|
69
|
+
* The standard contract this model implements, or null when none exists yet.
|
|
70
|
+
*
|
|
71
|
+
* This is what makes tool identity independent of model identity (BASE-02): the
|
|
72
|
+
* contract decides the tool name a caller sees, so a second model implementing
|
|
73
|
+
* the same contract joins the existing tool instead of creating a duplicate. A
|
|
74
|
+
* model with no contract keeps a per-model tool under its own name.
|
|
75
|
+
*/
|
|
76
|
+
readonly contract: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* The extension package that implements this model (BASE-09).
|
|
79
|
+
*
|
|
80
|
+
* A binding held as DATA, not a switch on the model name. The host loads
|
|
81
|
+
* whatever package this names through the PUBLIC extension API, so a first-party
|
|
82
|
+
* package takes the same route as a third-party one and adding a vendor means
|
|
83
|
+
* publishing a package plus adding this field — with no host change.
|
|
84
|
+
*/
|
|
85
|
+
readonly provider?: {
|
|
86
|
+
readonly extension: string;
|
|
87
|
+
readonly modelId: string;
|
|
88
|
+
};
|
|
68
89
|
readonly input: ModelInput;
|
|
69
90
|
readonly output: string;
|
|
70
91
|
readonly languages: number | null;
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,0CAA0C;AAC1C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,CAAA;AAEvF;;;;GAIG;AACH,MAAM,MAAM,cAAc;AACxB,8EAA8E;AAC5E,aAAa;AACf,6EAA6E;GAC3E,kBAAkB;AACpB,6EAA6E;GAC3E,YAAY;AACd,mEAAmE;GACjE,cAAc;AAChB,kDAAkD;GAChD,QAAQ,CAAA;AAEZ,iDAAiD;AACjD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAA;AAErF;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,iDAAiD;IACjD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,CAAA;CAC/B;AAED,wDAAwD;AACxD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,CAAA;AAEhD,sDAAsD;AACtD,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,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OAAO,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,oFAAoF;IACpF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@try-works/dsh-model-as-tool",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Install Desert Ant Labs on-device models as DSH tools and skills, with per-platform capability gating",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"catalog/desert-ant-models.json",
|
|
49
49
|
"catalog/playbooks.json",
|
|
50
50
|
"cordis.patch.yml",
|
|
51
|
-
"README.md"
|
|
51
|
+
"README.md",
|
|
52
|
+
"bin"
|
|
52
53
|
],
|
|
53
54
|
"dsh": {
|
|
54
55
|
"bundle": {
|
|
@@ -81,5 +82,11 @@
|
|
|
81
82
|
"devDependencies": {
|
|
82
83
|
"@types/node": "^24.0.0",
|
|
83
84
|
"typescript": "^5.9.0"
|
|
85
|
+
},
|
|
86
|
+
"dependencies": {
|
|
87
|
+
"@try-works/tool-mode-contracts": "^0.1.0"
|
|
88
|
+
},
|
|
89
|
+
"bin": {
|
|
90
|
+
"dsh-tool-mode-mcp-stdio": "./bin/dsh-tool-mode-mcp-stdio.mjs"
|
|
84
91
|
}
|
|
85
92
|
}
|