mthds 0.8.1 → 0.10.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 +43 -21
- package/dist/agent/commands/api-commands.js +290 -93
- package/dist/agent/commands/api-commands.js.map +1 -1
- package/dist/agent/commands/config.js +2 -2
- package/dist/agent/commands/config.js.map +1 -1
- package/dist/agent/commands/update-check.d.ts +14 -1
- package/dist/agent/commands/update-check.js +238 -16
- package/dist/agent/commands/update-check.js.map +1 -1
- package/dist/agent/commands/validate.js +5 -13
- package/dist/agent/commands/validate.js.map +1 -1
- package/dist/agent/plugin-version.d.ts +1 -1
- package/dist/agent/plugin-version.js +1 -1
- package/dist/agent/remote-version.d.ts +31 -0
- package/dist/agent/remote-version.js +74 -0
- package/dist/agent/remote-version.js.map +1 -0
- package/dist/agent/update-cache.d.ts +41 -0
- package/dist/agent/update-cache.js +129 -0
- package/dist/agent/update-cache.js.map +1 -1
- package/dist/agent-cli.js +5 -5
- package/dist/agent-cli.js.map +1 -1
- package/dist/cli/commands/config.js +2 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/install.js +19 -39
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/run.js +82 -69
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/setup.js +22 -23
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/utils.d.ts +1 -1
- package/dist/cli/commands/validate.js +10 -14
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/config/config.d.ts +14 -1
- package/dist/config/config.js +31 -6
- package/dist/config/config.js.map +1 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol/concept.d.ts +14 -0
- package/dist/protocol/concept.js +10 -0
- package/dist/protocol/concept.js.map +1 -0
- package/dist/protocol/exceptions.d.ts +10 -0
- package/dist/protocol/exceptions.js +12 -0
- package/dist/protocol/exceptions.js.map +1 -0
- package/dist/protocol/models.d.ts +95 -0
- package/dist/protocol/models.js +24 -0
- package/dist/protocol/models.js.map +1 -0
- package/dist/protocol/options.d.ts +60 -0
- package/dist/protocol/options.js +11 -0
- package/dist/protocol/options.js.map +1 -0
- package/dist/protocol/pipe_output.d.ts +11 -0
- package/dist/protocol/pipe_output.js +7 -0
- package/dist/protocol/pipe_output.js.map +1 -0
- package/dist/protocol/pipeline_inputs.d.ts +8 -0
- package/dist/protocol/pipeline_inputs.js +7 -0
- package/dist/protocol/pipeline_inputs.js.map +1 -0
- package/dist/protocol/protocol.d.ts +47 -0
- package/dist/{client → protocol}/protocol.js.map +1 -1
- package/dist/protocol/stuff.d.ts +16 -0
- package/dist/protocol/stuff.js +8 -0
- package/dist/{client/models → protocol}/stuff.js.map +1 -1
- package/dist/protocol/working_memory.d.ts +10 -0
- package/dist/protocol/working_memory.js +7 -0
- package/dist/protocol/working_memory.js.map +1 -0
- package/dist/runners/api/client.d.ts +170 -0
- package/dist/runners/api/client.js +653 -0
- package/dist/runners/api/client.js.map +1 -0
- package/dist/runners/api/exceptions.d.ts +106 -0
- package/dist/runners/api/exceptions.js +141 -0
- package/dist/runners/api/exceptions.js.map +1 -0
- package/dist/runners/api/models.d.ts +38 -0
- package/dist/runners/api/models.js +13 -0
- package/dist/runners/api/models.js.map +1 -0
- package/dist/runners/api/runs.d.ts +130 -0
- package/dist/runners/api/runs.js +93 -0
- package/dist/runners/api/runs.js.map +1 -0
- package/dist/runners/base-runner.d.ts +27 -0
- package/dist/runners/base-runner.js +25 -0
- package/dist/runners/base-runner.js.map +1 -0
- package/dist/runners/pipelex/runner.d.ts +38 -0
- package/dist/runners/{pipelex-runner.js → pipelex/runner.js} +168 -83
- package/dist/runners/pipelex/runner.js.map +1 -0
- package/dist/runners/registry.js +10 -4
- package/dist/runners/registry.js.map +1 -1
- package/dist/runners/types.d.ts +13 -71
- package/dist/runners/types.js.map +1 -1
- package/package.json +6 -3
- package/dist/client/client.d.ts +0 -15
- package/dist/client/client.js +0 -127
- package/dist/client/client.js.map +0 -1
- package/dist/client/exceptions.d.ts +0 -46
- package/dist/client/exceptions.js +0 -61
- package/dist/client/exceptions.js.map +0 -1
- package/dist/client/index.d.ts +0 -5
- package/dist/client/index.js +0 -3
- package/dist/client/index.js.map +0 -1
- package/dist/client/models/index.d.ts +0 -4
- package/dist/client/models/index.js +0 -2
- package/dist/client/models/index.js.map +0 -1
- package/dist/client/models/pipe_output.d.ts +0 -2
- package/dist/client/models/pipe_output.js +0 -2
- package/dist/client/models/pipe_output.js.map +0 -1
- package/dist/client/models/pipeline_inputs.d.ts +0 -3
- package/dist/client/models/pipeline_inputs.js +0 -2
- package/dist/client/models/pipeline_inputs.js.map +0 -1
- package/dist/client/models/stuff.d.ts +0 -1
- package/dist/client/models/stuff.js +0 -2
- package/dist/client/models/working_memory.d.ts +0 -1
- package/dist/client/models/working_memory.js +0 -2
- package/dist/client/models/working_memory.js.map +0 -1
- package/dist/client/pipeline.d.ts +0 -36
- package/dist/client/pipeline.js +0 -2
- package/dist/client/pipeline.js.map +0 -1
- package/dist/client/protocol.d.ts +0 -5
- package/dist/runners/api-runner.d.ts +0 -24
- package/dist/runners/api-runner.js +0 -91
- package/dist/runners/api-runner.js.map +0 -1
- package/dist/runners/pipelex-runner.d.ts +0 -30
- package/dist/runners/pipelex-runner.js.map +0 -1
- /package/dist/{client → protocol}/protocol.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|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CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9D,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;QACpD,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,sEAAsE;AAEtE,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAAU,EAAE,CAAC,SAAS,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;AAC5C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Public SDK barrel — re-exports the MTHDS Protocol surface (`protocol/`) and
|
|
3
|
+
* the API runner + run-lifecycle extension (`runners/api/`).
|
|
4
|
+
*
|
|
5
|
+
* Structural split (protocol ⊥ runners) parity with `mthds-python`:
|
|
6
|
+
* - `mthds/client/*` is gone. The protocol interface + wire models live in
|
|
7
|
+
* `protocol/`; the API client/runner, lifecycle polling, and Dict-serialized
|
|
8
|
+
* concretes live in `runners/api/`.
|
|
9
|
+
* - The single run response `RunResult` is split into `RunResultExecute<T>`
|
|
10
|
+
* (execute — has `pipe_output`) and `RunResultStart` (start — id only).
|
|
11
|
+
*/
|
|
12
|
+
export { MthdsApiClient, DEFAULT_API_BASE_URL } from "./runners/api/client.js";
|
|
13
|
+
export type { MTHDSProtocol } from "./protocol/protocol.js";
|
|
14
|
+
export { PipelineRequestError } from "./protocol/exceptions.js";
|
|
15
|
+
export { ApiResponseError, ApiUnreachableError, ClientAuthenticationError, PipelineExecuteTimeoutError, RunFailedError, RunTimeoutError, RunStillRunningError, RunLifecycleUnavailableError, } from "./runners/api/exceptions.js";
|
|
16
|
+
export type { RunRequest, StartRequest, RunOptions, StartOptions, ExtensionOptions, } from "./protocol/options.js";
|
|
17
|
+
export { MTHDS_PROTOCOL_VERSION, MODEL_CATEGORIES } from "./protocol/models.js";
|
|
18
|
+
export type { RunResultExecute, RunResultStart, ModelCategory, ModelInfo, ModelDeck, ValidationReport, VersionInfo, } from "./protocol/models.js";
|
|
19
|
+
export type { VariableMultiplicity, PipeOutputAbstract } from "./protocol/pipe_output.js";
|
|
20
|
+
export type { StuffContentOrData, PipelineInputs } from "./protocol/pipeline_inputs.js";
|
|
21
|
+
export { conceptRef } from "./protocol/concept.js";
|
|
22
|
+
export type { ConceptAbstract } from "./protocol/concept.js";
|
|
23
|
+
export type { StuffAbstract, StuffContentAbstract } from "./protocol/stuff.js";
|
|
24
|
+
export type { WorkingMemoryAbstract } from "./protocol/working_memory.js";
|
|
25
|
+
export { isTerminalRunStatus, isSuccessRunStatus } from "./runners/api/runs.js";
|
|
26
|
+
export type { RunStatus, RunPublic, RunRead, RunResults, RunResultState, WaitForResultOptions, } from "./runners/api/runs.js";
|
|
27
|
+
export type { DictStuff, DictWorkingMemory, DictPipeOutput, DictRunResultExecute, } from "./runners/api/models.js";
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Public SDK barrel — re-exports the MTHDS Protocol surface (`protocol/`) and
|
|
3
|
+
* the API runner + run-lifecycle extension (`runners/api/`).
|
|
4
|
+
*
|
|
5
|
+
* Structural split (protocol ⊥ runners) parity with `mthds-python`:
|
|
6
|
+
* - `mthds/client/*` is gone. The protocol interface + wire models live in
|
|
7
|
+
* `protocol/`; the API client/runner, lifecycle polling, and Dict-serialized
|
|
8
|
+
* concretes live in `runners/api/`.
|
|
9
|
+
* - The single run response `RunResult` is split into `RunResultExecute<T>`
|
|
10
|
+
* (execute — has `pipe_output`) and `RunResultStart` (start — id only).
|
|
11
|
+
*/
|
|
12
|
+
// ── API runner / client (runners/api) ────────────────────────────────
|
|
13
|
+
export { MthdsApiClient, DEFAULT_API_BASE_URL } from "./runners/api/client.js";
|
|
14
|
+
// ── Exceptions (protocol base + api-runner errors) ───────────────────
|
|
15
|
+
export { PipelineRequestError } from "./protocol/exceptions.js";
|
|
16
|
+
export { ApiResponseError, ApiUnreachableError, ClientAuthenticationError, PipelineExecuteTimeoutError, RunFailedError, RunTimeoutError, RunStillRunningError, RunLifecycleUnavailableError, } from "./runners/api/exceptions.js";
|
|
17
|
+
// ── Wire models (protocol) ───────────────────────────────────────────
|
|
18
|
+
export { MTHDS_PROTOCOL_VERSION, MODEL_CATEGORIES } from "./protocol/models.js";
|
|
19
|
+
// ── Abstract domain shapes (protocol — exact mirror of mthds-python) ──
|
|
20
|
+
export { conceptRef } from "./protocol/concept.js";
|
|
21
|
+
// ── Run lifecycle (runners/api — hosted extension, NOT protocol) ──────
|
|
22
|
+
export { isTerminalRunStatus, isSuccessRunStatus } from "./runners/api/runs.js";
|
|
2
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,wEAAwE;AACxE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAK/E,wEAAwE;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,6BAA6B,CAAC;AAWrC,wEAAwE;AACxE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAahF,yEAAyE;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAKnD,yEAAyE;AACzE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concept domain shape — exact mirror of `mthds/protocol/concept.py`
|
|
3
|
+
* (`ConceptAbstract`). The protocol-level abstract concept; runners deal in the
|
|
4
|
+
* Dict-serialized `concept` ref string (`runners/api/models.ts`).
|
|
5
|
+
*/
|
|
6
|
+
export interface ConceptAbstract {
|
|
7
|
+
code: string;
|
|
8
|
+
domain_code: string;
|
|
9
|
+
description: string;
|
|
10
|
+
structure_class_name: string;
|
|
11
|
+
refines?: string | null;
|
|
12
|
+
}
|
|
13
|
+
/** `{domain_code}.{code}` — python's `ConceptAbstract.concept_ref` derived property. */
|
|
14
|
+
export declare function conceptRef(concept: Pick<ConceptAbstract, "domain_code" | "code">): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concept domain shape — exact mirror of `mthds/protocol/concept.py`
|
|
3
|
+
* (`ConceptAbstract`). The protocol-level abstract concept; runners deal in the
|
|
4
|
+
* Dict-serialized `concept` ref string (`runners/api/models.ts`).
|
|
5
|
+
*/
|
|
6
|
+
/** `{domain_code}.{code}` — python's `ConceptAbstract.concept_ref` derived property. */
|
|
7
|
+
export function conceptRef(concept) {
|
|
8
|
+
return `${concept.domain_code}.${concept.code}`;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=concept.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concept.js","sourceRoot":"","sources":["../../src/protocol/concept.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,wFAAwF;AACxF,MAAM,UAAU,UAAU,CAAC,OAAsD;IAC/E,OAAO,GAAG,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protocol-level exceptions — the base error every MTHDS runner error derives
|
|
3
|
+
* from. Mirrors `mthds/protocol/exceptions.py`. Runner-specific errors (API
|
|
4
|
+
* transport, run lifecycle) live in `runners/api/exceptions.ts`.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PipelineRequestError extends Error {
|
|
7
|
+
constructor(message: string, options?: {
|
|
8
|
+
cause?: unknown;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protocol-level exceptions — the base error every MTHDS runner error derives
|
|
3
|
+
* from. Mirrors `mthds/protocol/exceptions.py`. Runner-specific errors (API
|
|
4
|
+
* transport, run lifecycle) live in `runners/api/exceptions.ts`.
|
|
5
|
+
*/
|
|
6
|
+
export class PipelineRequestError extends Error {
|
|
7
|
+
constructor(message, options) {
|
|
8
|
+
super(message, options);
|
|
9
|
+
this.name = "PipelineRequestError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=exceptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../../src/protocol/exceptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAe,EAAE,OAA6B;QACxD,KAAK,CAAC,OAAO,EAAE,OAAmC,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire models for the MTHDS Protocol — exact mirror of `mthds/protocol/models.py`
|
|
3
|
+
* (which mirrors `mthds-protocol.openapi.yaml`, the standard's normative artifact).
|
|
4
|
+
*
|
|
5
|
+
* POST /execute : -> RunResultExecute (200: pipeline_run_id + pipe_output)
|
|
6
|
+
* POST /start : -> RunResultStart (202: pipeline_run_id only)
|
|
7
|
+
* POST /validate : -> ValidationReport
|
|
8
|
+
* GET /models : -> ModelDeck
|
|
9
|
+
* GET /version : -> VersionInfo
|
|
10
|
+
*
|
|
11
|
+
* Response models declare the protocol's BASE fields only and are
|
|
12
|
+
* extension-open: an implementation may return more, and those server-specific
|
|
13
|
+
* fields are preserved (via the index signature) — the response side of the
|
|
14
|
+
* same passthrough principle as the request-side `extra`.
|
|
15
|
+
*/
|
|
16
|
+
/** The MTHDS Protocol version this SDK implements (the MTHDS standard version). */
|
|
17
|
+
export declare const MTHDS_PROTOCOL_VERSION = "0.6.0";
|
|
18
|
+
/**
|
|
19
|
+
* `POST /execute` 200 — the completed run.
|
|
20
|
+
*
|
|
21
|
+
* Two base fields: the authoritative server-generated `pipeline_run_id` and
|
|
22
|
+
* the method's `pipe_output` (always present — a completed run has output).
|
|
23
|
+
* Generic in the output type so `protocol/` never names a runner-side concrete:
|
|
24
|
+
* the default `DictPipeOutput` binding (`DictRunResultExecute`) lives in
|
|
25
|
+
* `runners/api/models.ts`. Extension-open: anything more an implementation
|
|
26
|
+
* returns (a run state, timestamps, output naming) rides the index signature,
|
|
27
|
+
* never named by this SDK.
|
|
28
|
+
*/
|
|
29
|
+
export interface RunResultExecute<TPipeOutput = unknown> {
|
|
30
|
+
pipeline_run_id: string;
|
|
31
|
+
pipe_output: TPipeOutput;
|
|
32
|
+
/** Implementation extension fields — defined and documented by the server. */
|
|
33
|
+
[extension: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* `POST /start` 202 (and the optional `/execute` 202 degrade) — the started
|
|
37
|
+
* run's authoritative `pipeline_run_id`, nothing else.
|
|
38
|
+
*
|
|
39
|
+
* A started run has no output yet; how it is delivered later (polling,
|
|
40
|
+
* callbacks, anything else) is implementation-defined and outside the
|
|
41
|
+
* protocol. Extension-open: an implementation may add its own fields (a
|
|
42
|
+
* workflow id, a created-at timestamp), preserved via the index signature.
|
|
43
|
+
*/
|
|
44
|
+
export interface RunResultStart {
|
|
45
|
+
pipeline_run_id: string;
|
|
46
|
+
/** Implementation extension fields — defined and documented by the server. */
|
|
47
|
+
[extension: string]: unknown;
|
|
48
|
+
}
|
|
49
|
+
/** Model categories accepted by the protocol's `GET /models?type=` filter. */
|
|
50
|
+
export type ModelCategory = "llm" | "extract" | "img_gen" | "search";
|
|
51
|
+
export declare const MODEL_CATEGORIES: readonly ModelCategory[];
|
|
52
|
+
/** One entry of the model deck (`ModelDeck.models[]`) — base fields + extensions. */
|
|
53
|
+
export interface ModelInfo {
|
|
54
|
+
name: string;
|
|
55
|
+
type?: ModelCategory | null;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The model deck a runner can route to — `GET /models`.
|
|
59
|
+
*
|
|
60
|
+
* The protocol's base is the `models` list; implementations may add their own
|
|
61
|
+
* routing metadata (aliases, fallback chains, anything else) as extensions,
|
|
62
|
+
* preserved via the index signature.
|
|
63
|
+
*/
|
|
64
|
+
export interface ModelDeck {
|
|
65
|
+
models: ModelInfo[];
|
|
66
|
+
/** Implementation extension fields (e.g. `aliases`, `waterfalls`). */
|
|
67
|
+
[extension: string]: unknown;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Verdict of `POST /validate` for a VALID bundle — the 200 status IS the verdict.
|
|
71
|
+
*
|
|
72
|
+
* Failures never reach this shape — they are RFC 7807 problems (HTTP 422,
|
|
73
|
+
* surfaced as `ApiResponseError`). The protocol declares no body fields;
|
|
74
|
+
* implementations may include their own artifacts (parsed structures, graphs,
|
|
75
|
+
* anything else), preserved here as extension fields.
|
|
76
|
+
*/
|
|
77
|
+
export interface ValidationReport {
|
|
78
|
+
/** Implementation extension fields (e.g. `blueprint`, `graph_spec`, `pipe_structures`). */
|
|
79
|
+
[extension: string]: unknown;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Protocol + runner versions — `GET /version` (always public).
|
|
83
|
+
*
|
|
84
|
+
* The handshake clients use for feature detection. The protocol defines two
|
|
85
|
+
* base fields (`protocol_version`, optional `runner_version`); implementations
|
|
86
|
+
* may add their own identification (an `implementation` name, an underlying
|
|
87
|
+
* runtime version, anything else) as extensions, preserved via the index
|
|
88
|
+
* signature and read by the api runner's bare-runner detection.
|
|
89
|
+
*/
|
|
90
|
+
export interface VersionInfo {
|
|
91
|
+
protocol_version: string;
|
|
92
|
+
runner_version?: string | null;
|
|
93
|
+
/** Implementation extension fields (e.g. `implementation`, `runtime_version`). */
|
|
94
|
+
[extension: string]: unknown;
|
|
95
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire models for the MTHDS Protocol — exact mirror of `mthds/protocol/models.py`
|
|
3
|
+
* (which mirrors `mthds-protocol.openapi.yaml`, the standard's normative artifact).
|
|
4
|
+
*
|
|
5
|
+
* POST /execute : -> RunResultExecute (200: pipeline_run_id + pipe_output)
|
|
6
|
+
* POST /start : -> RunResultStart (202: pipeline_run_id only)
|
|
7
|
+
* POST /validate : -> ValidationReport
|
|
8
|
+
* GET /models : -> ModelDeck
|
|
9
|
+
* GET /version : -> VersionInfo
|
|
10
|
+
*
|
|
11
|
+
* Response models declare the protocol's BASE fields only and are
|
|
12
|
+
* extension-open: an implementation may return more, and those server-specific
|
|
13
|
+
* fields are preserved (via the index signature) — the response side of the
|
|
14
|
+
* same passthrough principle as the request-side `extra`.
|
|
15
|
+
*/
|
|
16
|
+
/** The MTHDS Protocol version this SDK implements (the MTHDS standard version). */
|
|
17
|
+
export const MTHDS_PROTOCOL_VERSION = "0.6.0";
|
|
18
|
+
export const MODEL_CATEGORIES = [
|
|
19
|
+
"llm",
|
|
20
|
+
"extract",
|
|
21
|
+
"img_gen",
|
|
22
|
+
"search",
|
|
23
|
+
];
|
|
24
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/protocol/models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,mFAAmF;AACnF,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;AA0C9C,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,KAAK;IACL,SAAS;IACT,SAAS;IACT,QAAQ;CACT,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MTHDS Protocol's request-argument surface — the named arguments of
|
|
3
|
+
* `execute` / `start`.
|
|
4
|
+
*
|
|
5
|
+
* The protocol has no request *model*: a runner takes the request's basic
|
|
6
|
+
* arguments as named parameters and serializes the wire body directly, merging
|
|
7
|
+
* any server-specific extension args (`extra`) as top-level properties. These
|
|
8
|
+
* option/request shapes are the TS expression of that argument surface.
|
|
9
|
+
*/
|
|
10
|
+
import type { VariableMultiplicity } from "./pipe_output.js";
|
|
11
|
+
import type { PipelineInputs } from "./pipeline_inputs.js";
|
|
12
|
+
/**
|
|
13
|
+
* Body of the protocol's `POST /execute` — mirrors `RunRequest` in
|
|
14
|
+
* `mthds-protocol.openapi.yaml`. At least one of `pipe_code` /
|
|
15
|
+
* `mthds_contents` is required.
|
|
16
|
+
*/
|
|
17
|
+
export interface RunRequest {
|
|
18
|
+
/** Code of the pipe to execute (registered, or defined in `mthds_contents`). */
|
|
19
|
+
pipe_code?: string | null;
|
|
20
|
+
/** MTHDS bundle contents to load (always an array, even for one file). */
|
|
21
|
+
mthds_contents?: string[] | null;
|
|
22
|
+
/** Method inputs: map of input name to content (loose here, strict in the runtime). */
|
|
23
|
+
inputs?: PipelineInputs | Record<string, unknown> | null;
|
|
24
|
+
/** Name of the output slot to return as the main output. */
|
|
25
|
+
output_name?: string | null;
|
|
26
|
+
/** Output multiplicity override (`false`/`true` or an exact count). */
|
|
27
|
+
output_multiplicity?: VariableMultiplicity | null;
|
|
28
|
+
/** Override for the dynamic output concept reference. */
|
|
29
|
+
dynamic_output_concept_ref?: string | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Body of the protocol's `POST /start` — the same basic arguments as `RunRequest`.
|
|
33
|
+
*
|
|
34
|
+
* The protocol declares no start-only request fields. Anything an
|
|
35
|
+
* implementation accepts on top (a client-supplied run id, anything else) is
|
|
36
|
+
* an extension arg — the server that defines it is the one that handles it;
|
|
37
|
+
* callers pass it through the generic `extra` option.
|
|
38
|
+
*/
|
|
39
|
+
export type StartRequest = RunRequest;
|
|
40
|
+
/**
|
|
41
|
+
* The generic extension passthrough: server-specific args merged into the
|
|
42
|
+
* request body as top-level properties — the server you call defines and
|
|
43
|
+
* handles them; this SDK only passes them through. Protocol args inside
|
|
44
|
+
* `extra` are rejected client-side.
|
|
45
|
+
*/
|
|
46
|
+
export interface ExtensionOptions {
|
|
47
|
+
extra?: Record<string, unknown> | null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Options for `MTHDSProtocol.execute` — the `RunRequest` fields plus the
|
|
51
|
+
* generic `extra` extension passthrough. (The options surface and the wire
|
|
52
|
+
* body are intentionally the same shape.)
|
|
53
|
+
*/
|
|
54
|
+
export type RunOptions = RunRequest & ExtensionOptions;
|
|
55
|
+
/**
|
|
56
|
+
* Options for `MTHDSProtocol.start` — the `StartRequest` wire fields (the
|
|
57
|
+
* protocol's basic execution arguments) plus the generic `extra` extension
|
|
58
|
+
* passthrough (server-specific args, merged into the body).
|
|
59
|
+
*/
|
|
60
|
+
export type StartOptions = StartRequest & ExtensionOptions;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MTHDS Protocol's request-argument surface — the named arguments of
|
|
3
|
+
* `execute` / `start`.
|
|
4
|
+
*
|
|
5
|
+
* The protocol has no request *model*: a runner takes the request's basic
|
|
6
|
+
* arguments as named parameters and serializes the wire body directly, merging
|
|
7
|
+
* any server-specific extension args (`extra`) as top-level properties. These
|
|
8
|
+
* option/request shapes are the TS expression of that argument surface.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/protocol/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipe-output domain shapes — exact mirror of `mthds/protocol/pipe_output.py`
|
|
3
|
+
* (`VariableMultiplicity`, `PipeOutputAbstract`). The Dict-serialized concrete
|
|
4
|
+
* (`DictPipeOutput`) is runner-side (`runners/api/models.ts`).
|
|
5
|
+
*/
|
|
6
|
+
import type { WorkingMemoryAbstract } from "./working_memory.js";
|
|
7
|
+
export type VariableMultiplicity = boolean | number;
|
|
8
|
+
export interface PipeOutputAbstract<TWorkingMemory extends WorkingMemoryAbstract = WorkingMemoryAbstract> {
|
|
9
|
+
working_memory: TWorkingMemory;
|
|
10
|
+
pipeline_run_id: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipe-output domain shapes — exact mirror of `mthds/protocol/pipe_output.py`
|
|
3
|
+
* (`VariableMultiplicity`, `PipeOutputAbstract`). The Dict-serialized concrete
|
|
4
|
+
* (`DictPipeOutput`) is runner-side (`runners/api/models.ts`).
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=pipe_output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipe_output.js","sourceRoot":"","sources":["../../src/protocol/pipe_output.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipeline input value shapes — exact mirror of `mthds/protocol/pipeline_inputs.py`
|
|
3
|
+
* (`StuffContentOrData`, `PipelineInputs`). The abstract input shapes only; the
|
|
4
|
+
* Dict-serialized concrete (`DictStuff`) is runner-side (`runners/api/models.ts`).
|
|
5
|
+
*/
|
|
6
|
+
import type { StuffContentAbstract } from "./stuff.js";
|
|
7
|
+
export type StuffContentOrData = string | string[] | StuffContentAbstract | StuffContentAbstract[] | Record<string, unknown>;
|
|
8
|
+
export type PipelineInputs = Record<string, StuffContentOrData>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipeline input value shapes — exact mirror of `mthds/protocol/pipeline_inputs.py`
|
|
3
|
+
* (`StuffContentOrData`, `PipelineInputs`). The abstract input shapes only; the
|
|
4
|
+
* Dict-serialized concrete (`DictStuff`) is runner-side (`runners/api/models.ts`).
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=pipeline_inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline_inputs.js","sourceRoot":"","sources":["../../src/protocol/pipeline_inputs.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { RunOptions, StartOptions } from "./options.js";
|
|
2
|
+
import type { ModelCategory, ModelDeck, RunResultExecute, RunResultStart, ValidationReport, VersionInfo } from "./models.js";
|
|
3
|
+
/**
|
|
4
|
+
* The MTHDS Protocol — the contract every MTHDS runner implements. Exact
|
|
5
|
+
* mirror of `mthds/protocol/protocol.py` (`MTHDSProtocol`, generic in the
|
|
6
|
+
* pipe-output type).
|
|
7
|
+
*
|
|
8
|
+
* Mirrors the standard's five routes (`mthds-protocol.openapi.yaml`):
|
|
9
|
+
* `execute`, `start`, `validate`, `models`, `version`. A runner is just a
|
|
10
|
+
* runner: it executes and validates methods, and reports its model deck and
|
|
11
|
+
* version. Run polling is NOT part of the protocol — it is a hosted-API
|
|
12
|
+
* extension carried by `MthdsApiClient` and the `Runner` interface only.
|
|
13
|
+
*
|
|
14
|
+
* Generic in `PipeOutputT` (mirroring python's `Generic[PipeOutputT]`): the
|
|
15
|
+
* generic is the mechanism that keeps `protocol/` pure — `execute` returns
|
|
16
|
+
* `RunResultExecute<PipeOutputT>` without the protocol ever naming the
|
|
17
|
+
* runner-side `DictPipeOutput` concrete.
|
|
18
|
+
*/
|
|
19
|
+
export interface MTHDSProtocol<PipeOutputT = unknown> {
|
|
20
|
+
/**
|
|
21
|
+
* Execute a method synchronously and wait for its completion.
|
|
22
|
+
*
|
|
23
|
+
* Throws `RunStillRunningError` if the server answers 202 (the
|
|
24
|
+
* protocol's optional async degrade) instead of a final result.
|
|
25
|
+
*/
|
|
26
|
+
execute(options: RunOptions): Promise<RunResultExecute<PipeOutputT>>;
|
|
27
|
+
/**
|
|
28
|
+
* Start a method asynchronously without waiting for completion.
|
|
29
|
+
*
|
|
30
|
+
* Carries the protocol's basic arguments only; server-specific extension
|
|
31
|
+
* args ride `options.extra`. Returns `RunResultStart` — the authoritative
|
|
32
|
+
* server-generated `pipeline_run_id`, no output yet.
|
|
33
|
+
*/
|
|
34
|
+
start(options: StartOptions): Promise<RunResultStart>;
|
|
35
|
+
/**
|
|
36
|
+
* Parse, validate, and dry-run an MTHDS bundle.
|
|
37
|
+
*
|
|
38
|
+
* Returns the structural artifacts of a VALID bundle; invalid bundles throw
|
|
39
|
+
* (HTTP 422 problem on API runners). `allowSignatures` tolerates
|
|
40
|
+
* unimplemented pipe signatures (strict by default).
|
|
41
|
+
*/
|
|
42
|
+
validate(mthdsContents: string[], allowSignatures?: boolean): Promise<ValidationReport>;
|
|
43
|
+
/** The model deck this runner can route to, optionally filtered by category. */
|
|
44
|
+
models(category?: ModelCategory): Promise<ModelDeck>;
|
|
45
|
+
/** Protocol + implementation versions — the handshake for feature detection. */
|
|
46
|
+
version(): Promise<VersionInfo>;
|
|
47
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/protocol/protocol.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stuff domain shapes — exact mirror of `mthds/protocol/stuff.py`
|
|
3
|
+
* (`StuffAbstract`, `StuffContentAbstract`). The protocol-level abstract stuff;
|
|
4
|
+
* the Dict-serialized concrete (`DictStuff`) is runner-side
|
|
5
|
+
* (`runners/api/models.ts`).
|
|
6
|
+
*/
|
|
7
|
+
import type { ConceptAbstract } from "./concept.js";
|
|
8
|
+
/** Marker base for a stuff's content payload (mirrors python `StuffContentAbstract`). */
|
|
9
|
+
export interface StuffContentAbstract {
|
|
10
|
+
}
|
|
11
|
+
export interface StuffAbstract<TConcept extends ConceptAbstract = ConceptAbstract, TContent extends StuffContentAbstract = StuffContentAbstract> {
|
|
12
|
+
stuff_code: string;
|
|
13
|
+
stuff_name?: string | null;
|
|
14
|
+
concept: TConcept;
|
|
15
|
+
content: TContent;
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stuff domain shapes — exact mirror of `mthds/protocol/stuff.py`
|
|
3
|
+
* (`StuffAbstract`, `StuffContentAbstract`). The protocol-level abstract stuff;
|
|
4
|
+
* the Dict-serialized concrete (`DictStuff`) is runner-side
|
|
5
|
+
* (`runners/api/models.ts`).
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=stuff.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stuff.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"stuff.js","sourceRoot":"","sources":["../../src/protocol/stuff.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Working-memory domain shape — exact mirror of `mthds/protocol/working_memory.py`
|
|
3
|
+
* (`WorkingMemoryAbstract`). The Dict-serialized concrete (`DictWorkingMemory`)
|
|
4
|
+
* is runner-side (`runners/api/models.ts`).
|
|
5
|
+
*/
|
|
6
|
+
import type { StuffAbstract } from "./stuff.js";
|
|
7
|
+
export interface WorkingMemoryAbstract<TStuff extends StuffAbstract = StuffAbstract> {
|
|
8
|
+
root: Record<string, TStuff>;
|
|
9
|
+
aliases: Record<string, string>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Working-memory domain shape — exact mirror of `mthds/protocol/working_memory.py`
|
|
3
|
+
* (`WorkingMemoryAbstract`). The Dict-serialized concrete (`DictWorkingMemory`)
|
|
4
|
+
* is runner-side (`runners/api/models.ts`).
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=working_memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"working_memory.js","sourceRoot":"","sources":["../../src/protocol/working_memory.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|