mthds 0.9.0 → 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.
Files changed (123) hide show
  1. package/README.md +43 -21
  2. package/dist/agent/binaries.js +2 -2
  3. package/dist/agent/commands/api-commands.d.ts +8 -0
  4. package/dist/agent/commands/api-commands.js +310 -93
  5. package/dist/agent/commands/api-commands.js.map +1 -1
  6. package/dist/agent/commands/codex-hook.d.ts +20 -0
  7. package/dist/agent/commands/codex-hook.js +25 -9
  8. package/dist/agent/commands/codex-hook.js.map +1 -1
  9. package/dist/agent/commands/config.js +2 -2
  10. package/dist/agent/commands/config.js.map +1 -1
  11. package/dist/agent/output.d.ts +4 -0
  12. package/dist/agent/output.js +7 -0
  13. package/dist/agent/output.js.map +1 -1
  14. package/dist/agent/plugin-version.d.ts +1 -1
  15. package/dist/agent/plugin-version.js +1 -1
  16. package/dist/agent-cli.js +5 -5
  17. package/dist/agent-cli.js.map +1 -1
  18. package/dist/cli/commands/config.js +2 -2
  19. package/dist/cli/commands/config.js.map +1 -1
  20. package/dist/cli/commands/install.js +29 -37
  21. package/dist/cli/commands/install.js.map +1 -1
  22. package/dist/cli/commands/run.js +82 -69
  23. package/dist/cli/commands/run.js.map +1 -1
  24. package/dist/cli/commands/setup.js +22 -23
  25. package/dist/cli/commands/setup.js.map +1 -1
  26. package/dist/cli/commands/utils.d.ts +9 -1
  27. package/dist/cli/commands/utils.js +9 -0
  28. package/dist/cli/commands/utils.js.map +1 -1
  29. package/dist/cli/commands/validate.js +29 -13
  30. package/dist/cli/commands/validate.js.map +1 -1
  31. package/dist/cli.js +2 -2
  32. package/dist/cli.js.map +1 -1
  33. package/dist/config/config.d.ts +14 -1
  34. package/dist/config/config.js +31 -6
  35. package/dist/config/config.js.map +1 -1
  36. package/dist/index.d.ts +27 -1
  37. package/dist/index.js +22 -1
  38. package/dist/index.js.map +1 -1
  39. package/dist/protocol/concept.d.ts +14 -0
  40. package/dist/protocol/concept.js +10 -0
  41. package/dist/protocol/concept.js.map +1 -0
  42. package/dist/protocol/exceptions.d.ts +10 -0
  43. package/dist/protocol/exceptions.js +12 -0
  44. package/dist/protocol/exceptions.js.map +1 -0
  45. package/dist/protocol/models.d.ts +150 -0
  46. package/dist/protocol/models.js +24 -0
  47. package/dist/protocol/models.js.map +1 -0
  48. package/dist/protocol/options.d.ts +60 -0
  49. package/dist/protocol/options.js +11 -0
  50. package/dist/protocol/options.js.map +1 -0
  51. package/dist/protocol/pipe_output.d.ts +11 -0
  52. package/dist/protocol/pipe_output.js +7 -0
  53. package/dist/protocol/pipe_output.js.map +1 -0
  54. package/dist/protocol/pipeline_inputs.d.ts +8 -0
  55. package/dist/protocol/pipeline_inputs.js +7 -0
  56. package/dist/protocol/pipeline_inputs.js.map +1 -0
  57. package/dist/protocol/protocol.d.ts +55 -0
  58. package/dist/{client → protocol}/protocol.js.map +1 -1
  59. package/dist/protocol/stuff.d.ts +16 -0
  60. package/dist/protocol/stuff.js +8 -0
  61. package/dist/{client/models → protocol}/stuff.js.map +1 -1
  62. package/dist/protocol/working_memory.d.ts +10 -0
  63. package/dist/protocol/working_memory.js +7 -0
  64. package/dist/protocol/working_memory.js.map +1 -0
  65. package/dist/runners/api/client.d.ts +181 -0
  66. package/dist/runners/api/client.js +679 -0
  67. package/dist/runners/api/client.js.map +1 -0
  68. package/dist/runners/api/exceptions.d.ts +121 -0
  69. package/dist/runners/api/exceptions.js +156 -0
  70. package/dist/runners/api/exceptions.js.map +1 -0
  71. package/dist/runners/api/models.d.ts +131 -0
  72. package/dist/runners/api/models.js +13 -0
  73. package/dist/runners/api/models.js.map +1 -0
  74. package/dist/runners/api/runs.d.ts +130 -0
  75. package/dist/runners/api/runs.js +93 -0
  76. package/dist/runners/api/runs.js.map +1 -0
  77. package/dist/runners/base-runner.d.ts +27 -0
  78. package/dist/runners/base-runner.js +25 -0
  79. package/dist/runners/base-runner.js.map +1 -0
  80. package/dist/runners/pipelex/runner.d.ts +38 -0
  81. package/dist/runners/{pipelex-runner.js → pipelex/runner.js} +171 -83
  82. package/dist/runners/pipelex/runner.js.map +1 -0
  83. package/dist/runners/registry.js +10 -4
  84. package/dist/runners/registry.js.map +1 -1
  85. package/dist/runners/types.d.ts +13 -71
  86. package/dist/runners/types.js.map +1 -1
  87. package/package.json +6 -3
  88. package/dist/agent/commands/validate.d.ts +0 -18
  89. package/dist/agent/commands/validate.js +0 -126
  90. package/dist/agent/commands/validate.js.map +0 -1
  91. package/dist/client/client.d.ts +0 -15
  92. package/dist/client/client.js +0 -127
  93. package/dist/client/client.js.map +0 -1
  94. package/dist/client/exceptions.d.ts +0 -46
  95. package/dist/client/exceptions.js +0 -61
  96. package/dist/client/exceptions.js.map +0 -1
  97. package/dist/client/index.d.ts +0 -5
  98. package/dist/client/index.js +0 -3
  99. package/dist/client/index.js.map +0 -1
  100. package/dist/client/models/index.d.ts +0 -4
  101. package/dist/client/models/index.js +0 -2
  102. package/dist/client/models/index.js.map +0 -1
  103. package/dist/client/models/pipe_output.d.ts +0 -2
  104. package/dist/client/models/pipe_output.js +0 -2
  105. package/dist/client/models/pipe_output.js.map +0 -1
  106. package/dist/client/models/pipeline_inputs.d.ts +0 -3
  107. package/dist/client/models/pipeline_inputs.js +0 -2
  108. package/dist/client/models/pipeline_inputs.js.map +0 -1
  109. package/dist/client/models/stuff.d.ts +0 -1
  110. package/dist/client/models/stuff.js +0 -2
  111. package/dist/client/models/working_memory.d.ts +0 -1
  112. package/dist/client/models/working_memory.js +0 -2
  113. package/dist/client/models/working_memory.js.map +0 -1
  114. package/dist/client/pipeline.d.ts +0 -36
  115. package/dist/client/pipeline.js +0 -2
  116. package/dist/client/pipeline.js.map +0 -1
  117. package/dist/client/protocol.d.ts +0 -5
  118. package/dist/runners/api-runner.d.ts +0 -24
  119. package/dist/runners/api-runner.js +0 -91
  120. package/dist/runners/api-runner.js.map +0 -1
  121. package/dist/runners/pipelex-runner.d.ts +0 -30
  122. package/dist/runners/pipelex-runner.js.map +0 -1
  123. /package/dist/{client → protocol}/protocol.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/runners/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAiCtC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAsBxD,kFAAkF;AAClF,MAAM,CAAC,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAE9D,2FAA2F;AAC3F,oFAAoF;AACpF,oFAAoF;AACpF,+EAA+E;AAC/E,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,MAAM,0BAA0B,GAAG,SAAS,CAAC,CAAC,0DAA0D;AACxG,MAAM,uBAAuB,GAAG,MAAM,CAAC,CAAC,wEAAwE;AAChH,MAAM,8BAA8B,GAAG,CAAC,CAAC,CAAC,yDAAyD;AAEnG;;;;;GAKG;AACH,MAAM,0BAA0B,GAAG,aAAa,CAAC;AAEjD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IACnC,IAAI,GAAe,OAAO,CAAC,GAAG,CAAC;IAEvB,QAAQ,CAAqB;IAC7B,OAAO,CAAS;IACjC,qFAAqF;IACpE,SAAS,CAAS;IACnC,wFAAwF;IAChF,kBAAkB,CAAsB;IAEhD,YAAY,UAAiC,EAAE;QAC7C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;QAC9D,MAAM,iBAAiB,GAAG,CACxB,OAAO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errors raised by
3
+ * `MthdsApiClient`. All derive from the protocol-level `PipelineRequestError`
4
+ * (`protocol/exceptions.ts`), except `ClientAuthenticationError`. Mirrors
5
+ * `mthds/runners/api/exceptions.py`.
6
+ */
7
+ import { PipelineRequestError } from "../../protocol/exceptions.js";
8
+ import type { ValidationErrorItem } from "./models.js";
9
+ export { PipelineRequestError };
10
+ export declare class ClientAuthenticationError extends Error {
11
+ constructor(message: string);
12
+ }
13
+ /**
14
+ * Thrown when the MTHDS API host cannot be reached at all (DNS failure,
15
+ * connection refused, TLS handshake failure, request timeout). The HTTP
16
+ * exchange never produced a response — distinguish from `ApiResponseError`,
17
+ * which represents a non-2xx response that did come back.
18
+ *
19
+ * `code` is the underlying network error code when available
20
+ * (`ECONNREFUSED`, `ENOTFOUND`, `ETIMEDOUT`, `EAI_AGAIN`, `ABORT_TIMEOUT`).
21
+ */
22
+ export declare class ApiUnreachableError extends PipelineRequestError {
23
+ readonly apiUrl: string;
24
+ readonly code: string | undefined;
25
+ constructor(message: string, apiUrl: string, code: string | undefined, options?: {
26
+ cause?: unknown;
27
+ });
28
+ }
29
+ /**
30
+ * Thrown when the blocking `execute` (`POST /v1/execute`) is killed by the
31
+ * hosted gateway's ~30s synchronous-request limit. The blocking path cannot
32
+ * run methods longer than 30s behind the hosted gateway — use the durable run
33
+ * lifecycle (start + poll) instead.
34
+ */
35
+ export declare class PipelineExecuteTimeoutError extends PipelineRequestError {
36
+ readonly elapsedMs: number;
37
+ constructor(elapsedMs: number, options?: {
38
+ cause?: unknown;
39
+ });
40
+ }
41
+ /**
42
+ * Thrown when a run reaches a terminal state that is not `COMPLETED`
43
+ * (`FAILED`, `CANCELLED`, `TERMINATED`, `TIMED_OUT`) — surfaced from
44
+ * `waitForResult`/`getRunResult` when the server answers a result lookup with
45
+ * HTTP 409. `runId` and `status` let callers report the outcome precisely.
46
+ */
47
+ export declare class RunFailedError extends PipelineRequestError {
48
+ readonly runId: string;
49
+ readonly status: string;
50
+ constructor(message: string, runId: string, status: string, options?: {
51
+ cause?: unknown;
52
+ });
53
+ }
54
+ /**
55
+ * Thrown when `waitForResult` exceeds its `timeoutMs` before the run reaches a
56
+ * terminal state. The run is NOT cancelled — it keeps executing server-side and
57
+ * can be resumed later by `runId` (the poll loop just stopped waiting).
58
+ */
59
+ export declare class RunTimeoutError extends PipelineRequestError {
60
+ readonly runId: string;
61
+ readonly timeoutMs: number;
62
+ constructor(message: string, runId: string, timeoutMs: number);
63
+ }
64
+ /**
65
+ * Thrown when `execute()` receives a 202 instead of a final result.
66
+ *
67
+ * The MTHDS Protocol permits an implementation to degrade a synchronous
68
+ * `/execute` into an accepted-async response (202 with a `Location` header)
69
+ * when it cannot hold the connection open. The run keeps executing
70
+ * server-side — resume by `runId` (`getRunResult` / `waitForResult` on a
71
+ * hosted deployment, or the `location` status resource when provided).
72
+ */
73
+ export declare class RunStillRunningError extends PipelineRequestError {
74
+ readonly runId: string;
75
+ readonly retryAfterSeconds: number | null;
76
+ readonly location: string | null;
77
+ constructor(message: string, runId: string, retryAfterSeconds?: number | null, location?: string | null, options?: {
78
+ cause?: unknown;
79
+ });
80
+ }
81
+ /**
82
+ * Thrown when the durable run lifecycle (`/v1/runs/*`) is not served by the
83
+ * configured `MTHDS_API_URL`.
84
+ *
85
+ * Run polling is a hosted-API extension, not part of the MTHDS Protocol: the
86
+ * open-source `pipelex-api` runner executes methods but has no run store, so
87
+ * it 404s those routes; only a deployment that includes the platform block
88
+ * (the hosted MTHDS API) serves status/results. Distinguished from a genuine
89
+ * run-not-found 404, which carries the server's structured error envelope.
90
+ */
91
+ export declare class RunLifecycleUnavailableError extends PipelineRequestError {
92
+ readonly apiUrl: string;
93
+ constructor(message: string, apiUrl: string, options?: {
94
+ cause?: unknown;
95
+ });
96
+ }
97
+ export declare class ApiResponseError extends PipelineRequestError {
98
+ readonly apiUrl: string;
99
+ readonly status: number;
100
+ readonly statusText: string;
101
+ readonly responseBody: string;
102
+ readonly errorType: string | undefined;
103
+ readonly serverMessage: string | undefined;
104
+ /**
105
+ * Structured per-error diagnostics on a problem body that carries a top-level
106
+ * `validation_errors[]` — the **build routes** (`POST /v1/build/*`), which still
107
+ * reject an invalid bundle with a 422.
108
+ *
109
+ * `POST /v1/validate` no longer routes content errors here: an invalid bundle is
110
+ * a produced verdict (a **200** `PipelexInvalidReport` whose `validation_errors[]`
111
+ * the caller reads off the returned value), not an `ApiResponseError`. This field
112
+ * stays for the build-route 422s and is `undefined` for any error that carries no
113
+ * per-error list (auth, transport, a request-shape 422). A consumer must NOT
114
+ * assume a given `error_type` implies a populated list — fall back to
115
+ * `serverMessage` when this is empty.
116
+ */
117
+ readonly validationErrors: ValidationErrorItem[] | undefined;
118
+ constructor(message: string, apiUrl: string, status: number, statusText: string, responseBody: string, errorType: string | undefined, serverMessage: string | undefined, validationErrors: ValidationErrorItem[] | undefined, options?: {
119
+ cause?: unknown;
120
+ });
121
+ }
@@ -0,0 +1,156 @@
1
+ /**
2
+ * API-runner exceptions — transport and run-lifecycle errors raised by
3
+ * `MthdsApiClient`. All derive from the protocol-level `PipelineRequestError`
4
+ * (`protocol/exceptions.ts`), except `ClientAuthenticationError`. Mirrors
5
+ * `mthds/runners/api/exceptions.py`.
6
+ */
7
+ import { PipelineRequestError } from "../../protocol/exceptions.js";
8
+ export { PipelineRequestError };
9
+ export class ClientAuthenticationError extends Error {
10
+ constructor(message) {
11
+ super(message);
12
+ this.name = "ClientAuthenticationError";
13
+ }
14
+ }
15
+ /**
16
+ * Thrown when the MTHDS API host cannot be reached at all (DNS failure,
17
+ * connection refused, TLS handshake failure, request timeout). The HTTP
18
+ * exchange never produced a response — distinguish from `ApiResponseError`,
19
+ * which represents a non-2xx response that did come back.
20
+ *
21
+ * `code` is the underlying network error code when available
22
+ * (`ECONNREFUSED`, `ENOTFOUND`, `ETIMEDOUT`, `EAI_AGAIN`, `ABORT_TIMEOUT`).
23
+ */
24
+ export class ApiUnreachableError extends PipelineRequestError {
25
+ apiUrl;
26
+ code;
27
+ constructor(message, apiUrl, code, options) {
28
+ super(message, options);
29
+ this.name = "ApiUnreachableError";
30
+ this.apiUrl = apiUrl;
31
+ this.code = code;
32
+ }
33
+ }
34
+ /**
35
+ * Thrown when the blocking `execute` (`POST /v1/execute`) is killed by the
36
+ * hosted gateway's ~30s synchronous-request limit. The blocking path cannot
37
+ * run methods longer than 30s behind the hosted gateway — use the durable run
38
+ * lifecycle (start + poll) instead.
39
+ */
40
+ export class PipelineExecuteTimeoutError extends PipelineRequestError {
41
+ elapsedMs;
42
+ constructor(elapsedMs, options) {
43
+ const seconds = Math.round(elapsedMs / 1000);
44
+ super(`The hosted MTHDS API times out synchronous requests after ~30s — this run took ${seconds}s. ` +
45
+ "The blocking execute path can't run methods longer than 30s behind the gateway. " +
46
+ "Start the run and poll for its result instead: " +
47
+ "`start()` then `waitForResult(runId)` (SDK), " +
48
+ "or `mthds-agent run start …` then `mthds-agent run poll <pipeline_run_id>` (CLI).", options);
49
+ this.name = "PipelineExecuteTimeoutError";
50
+ this.elapsedMs = elapsedMs;
51
+ }
52
+ }
53
+ /**
54
+ * Thrown when a run reaches a terminal state that is not `COMPLETED`
55
+ * (`FAILED`, `CANCELLED`, `TERMINATED`, `TIMED_OUT`) — surfaced from
56
+ * `waitForResult`/`getRunResult` when the server answers a result lookup with
57
+ * HTTP 409. `runId` and `status` let callers report the outcome precisely.
58
+ */
59
+ export class RunFailedError extends PipelineRequestError {
60
+ runId;
61
+ status;
62
+ constructor(message, runId, status, options) {
63
+ super(message, options);
64
+ this.name = "RunFailedError";
65
+ this.runId = runId;
66
+ this.status = status;
67
+ }
68
+ }
69
+ /**
70
+ * Thrown when `waitForResult` exceeds its `timeoutMs` before the run reaches a
71
+ * terminal state. The run is NOT cancelled — it keeps executing server-side and
72
+ * can be resumed later by `runId` (the poll loop just stopped waiting).
73
+ */
74
+ export class RunTimeoutError extends PipelineRequestError {
75
+ runId;
76
+ timeoutMs;
77
+ constructor(message, runId, timeoutMs) {
78
+ super(message);
79
+ this.name = "RunTimeoutError";
80
+ this.runId = runId;
81
+ this.timeoutMs = timeoutMs;
82
+ }
83
+ }
84
+ /**
85
+ * Thrown when `execute()` receives a 202 instead of a final result.
86
+ *
87
+ * The MTHDS Protocol permits an implementation to degrade a synchronous
88
+ * `/execute` into an accepted-async response (202 with a `Location` header)
89
+ * when it cannot hold the connection open. The run keeps executing
90
+ * server-side — resume by `runId` (`getRunResult` / `waitForResult` on a
91
+ * hosted deployment, or the `location` status resource when provided).
92
+ */
93
+ export class RunStillRunningError extends PipelineRequestError {
94
+ runId;
95
+ retryAfterSeconds;
96
+ location;
97
+ constructor(message, runId, retryAfterSeconds = null, location = null, options) {
98
+ super(message, options);
99
+ this.name = "RunStillRunningError";
100
+ this.runId = runId;
101
+ this.retryAfterSeconds = retryAfterSeconds;
102
+ this.location = location;
103
+ }
104
+ }
105
+ /**
106
+ * Thrown when the durable run lifecycle (`/v1/runs/*`) is not served by the
107
+ * configured `MTHDS_API_URL`.
108
+ *
109
+ * Run polling is a hosted-API extension, not part of the MTHDS Protocol: the
110
+ * open-source `pipelex-api` runner executes methods but has no run store, so
111
+ * it 404s those routes; only a deployment that includes the platform block
112
+ * (the hosted MTHDS API) serves status/results. Distinguished from a genuine
113
+ * run-not-found 404, which carries the server's structured error envelope.
114
+ */
115
+ export class RunLifecycleUnavailableError extends PipelineRequestError {
116
+ apiUrl;
117
+ constructor(message, apiUrl, options) {
118
+ super(message, options);
119
+ this.name = "RunLifecycleUnavailableError";
120
+ this.apiUrl = apiUrl;
121
+ }
122
+ }
123
+ export class ApiResponseError extends PipelineRequestError {
124
+ apiUrl;
125
+ status;
126
+ statusText;
127
+ responseBody;
128
+ errorType;
129
+ serverMessage;
130
+ /**
131
+ * Structured per-error diagnostics on a problem body that carries a top-level
132
+ * `validation_errors[]` — the **build routes** (`POST /v1/build/*`), which still
133
+ * reject an invalid bundle with a 422.
134
+ *
135
+ * `POST /v1/validate` no longer routes content errors here: an invalid bundle is
136
+ * a produced verdict (a **200** `PipelexInvalidReport` whose `validation_errors[]`
137
+ * the caller reads off the returned value), not an `ApiResponseError`. This field
138
+ * stays for the build-route 422s and is `undefined` for any error that carries no
139
+ * per-error list (auth, transport, a request-shape 422). A consumer must NOT
140
+ * assume a given `error_type` implies a populated list — fall back to
141
+ * `serverMessage` when this is empty.
142
+ */
143
+ validationErrors;
144
+ constructor(message, apiUrl, status, statusText, responseBody, errorType, serverMessage, validationErrors, options) {
145
+ super(message, options);
146
+ this.name = "ApiResponseError";
147
+ this.apiUrl = apiUrl;
148
+ this.status = status;
149
+ this.statusText = statusText;
150
+ this.responseBody = responseBody;
151
+ this.errorType = errorType;
152
+ this.serverMessage = serverMessage;
153
+ this.validationErrors = validationErrors;
154
+ }
155
+ }
156
+ //# sourceMappingURL=exceptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../../../src/runners/api/exceptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAClD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,mBAAoB,SAAQ,oBAAoB;IAC3C,MAAM,CAAS;IACf,IAAI,CAAqB;IAEzC,YACE,OAAe,EACf,MAAc,EACd,IAAwB,EACxB,OAA6B;QAE7B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,2BAA4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AC;IAC3C,CAAC;CACF"}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Dict-serialized wire models — the SDK's concrete JSON materialization of the
3
+ * protocol's domain shapes. The single home (parity D8) for `DictStuff` /
4
+ * `DictWorkingMemory` / `DictPipeOutput` and the default `RunResultExecute`
5
+ * binding. Mirrors `mthds/runners/api/models.py`.
6
+ *
7
+ * These are the JSON forms the runners deal in: each `Stuff` reduced to
8
+ * `{ concept: <ref>, content }`, working memory as a flat root + aliases, the
9
+ * pipe-output as that working memory + a run id, and `DictRunResultExecute` as
10
+ * the protocol's `RunResultExecute` carrying a `DictPipeOutput`.
11
+ */
12
+ import type { InvalidValidationReport, RunResultExecute, ValidationReport } from "../../protocol/models.js";
13
+ export interface DictStuff {
14
+ concept: string;
15
+ content: unknown;
16
+ }
17
+ export interface DictWorkingMemory {
18
+ root: Record<string, DictStuff>;
19
+ aliases: Record<string, string>;
20
+ }
21
+ /**
22
+ * Serialized pipe output — exact mirror of python's `DictPipeOutputAbstract`
23
+ * (`{working_memory, pipeline_run_id}`). NOTE: the inner `pipeline_run_id` is a
24
+ * runtime-internal field produced by the pipelex runtime inside the
25
+ * `pipe_output` payload — it deliberately keeps its name (master plan D1:
26
+ * runtime internals are out of the wire-rename scope, matching mthds-python).
27
+ */
28
+ export interface DictPipeOutput {
29
+ working_memory: DictWorkingMemory;
30
+ pipeline_run_id: string;
31
+ }
32
+ /**
33
+ * The default `RunResultExecute` binding — the concrete execute result with a
34
+ * Dict-serialized output. `RunResultExecute<DictPipeOutput>` is what both
35
+ * runners (API + pipelex CLI) produce; extension fields (e.g.
36
+ * `main_stuff_name`) ride the protocol's extension-open response.
37
+ */
38
+ export type DictRunResultExecute = RunResultExecute<DictPipeOutput>;
39
+ /** Per-pipe dry-run verdict in `validated_pipes[]` — mirror of pipelex's `DryRunStatus`. */
40
+ export type DryRunStatus = "SUCCESS" | "FAILURE" | "SKIPPED";
41
+ /** One entry of `PipelexValidationReport.validated_pipes` — `{pipe_ref, status}`. */
42
+ export interface ValidatedPipeEntry {
43
+ /** Namespaced `pipe_ref` (`domain.code`) — never the bare code. */
44
+ pipe_ref: string;
45
+ status: DryRunStatus;
46
+ }
47
+ /**
48
+ * Pipelex's `POST /v1/validate` 200 body for a VALID bundle — the canonical
49
+ * `PipelexValidationReport` (typed extension over the protocol's `ValidationReport`,
50
+ * carrying its `is_valid: true` discriminant) plus the route's wire-only extras
51
+ * (`message`, the `mthds_contents` echo). Field names follow the MTHDS brand
52
+ * boundary — blueprints/graphs are language artifacts, so no `pipelex_` prefix
53
+ * inside this envelope.
54
+ *
55
+ * `bundle_blueprint`, `pipe_io_contracts`, and `graph_spec` stay opaque transport
56
+ * (`Record<string, unknown>` / `unknown`): their canonical schemas are owned
57
+ * elsewhere (the runtime's blueprint models; `@pipelex/mthds-ui` owns `GraphSpec`),
58
+ * and the extension casts `graph_spec` to the renderer's type. Inherits the
59
+ * extension index signature, so any further server field is preserved.
60
+ */
61
+ export interface PipelexValidationReport extends ValidationReport {
62
+ /** The batch's primary blueprint (first declaring `main_pipe`, else first). */
63
+ bundle_blueprint: Record<string, unknown>;
64
+ /** Per-pipe input/output contracts, keyed by namespaced `pipe_ref` (`domain.code`). */
65
+ pipe_io_contracts: Record<string, unknown>;
66
+ /** Best-effort execution graph of the main pipe; `null` with no `main_pipe` or on degrade. */
67
+ graph_spec: unknown;
68
+ /** Per-pipe dry-run sweep outcomes. */
69
+ validated_pipes: ValidatedPipeEntry[];
70
+ /** Qualified refs of pipes still declared as `PipeSignature`. */
71
+ pending_signatures: string[];
72
+ /** `not pending_signatures` — whether the validated library is complete enough to run. */
73
+ is_runnable: boolean;
74
+ /** Route extra: status message. */
75
+ message: string;
76
+ /** Route extra: echo of the submitted `mthds_contents`. */
77
+ mthds_contents?: string[];
78
+ }
79
+ /**
80
+ * Pipelex's `POST /v1/validate` 200 body for an INVALID bundle — the `is_valid: false`
81
+ * arm of the response union, narrowing the protocol's `InvalidValidationReport` to the
82
+ * closed-vocabulary `ValidationErrorItem[]`. The structural artifacts of the valid arm
83
+ * are absent (they don't exist when load/parse/wiring failed); `validation_errors[]` is
84
+ * non-empty on every invalid verdict (the structured-info invariant — even a parse-level
85
+ * failure carries one source-less `blueprint_validation` residual).
86
+ */
87
+ export interface PipelexInvalidReport extends InvalidValidationReport {
88
+ /** Structured per-error diagnostics, built by pipelex's one shared builder. */
89
+ validation_errors: ValidationErrorItem[];
90
+ }
91
+ /**
92
+ * The Pipelex `POST /v1/validate` 200 response — the discriminated union the
93
+ * `MthdsApiClient.validate` returns, keyed on `is_valid`. Narrows the protocol's
94
+ * `ValidationResult` to Pipelex's typed arms.
95
+ */
96
+ export type PipelexValidationResult = PipelexValidationReport | PipelexInvalidReport;
97
+ /**
98
+ * Which validation stage produced a `ValidationErrorItem` — mirror of pipelex's
99
+ * closed `ValidationErrorCategory` set. `pipe_factory` and graph-level `dry_run`
100
+ * items carry no `source`; map those by `domain_code` / `pipe_code`. The other
101
+ * categories carry `source` when the runtime can attribute one.
102
+ */
103
+ export type ValidationErrorCategory = "blueprint_validation" | "pipe_factory" | "pipe_validation" | "dry_run";
104
+ /**
105
+ * One structured bundle-validation error — exact mirror of pipelex's
106
+ * `ValidationErrorItem` (the union across the `ValidateBundleError` error-data
107
+ * models). Carried by `PipelexInvalidReport.validation_errors[]` on the **200**
108
+ * invalid arm of `POST /v1/validate` (NOT a 422 — an invalid bundle is a produced
109
+ * verdict). The same typed item also rides the build routes' 422 problem bodies
110
+ * (`ApiResponseError.validationErrors`).
111
+ *
112
+ * Only `category` and `message` are always present; the rest are populated per
113
+ * `category` and dropped from the wire when unset (`exclude_none` server-side).
114
+ * `source` is the declaring file path (CLI) or the per-content `mthds_sources` name
115
+ * the API threads onto the in-memory load path — the owning file for cross-file
116
+ * diagnostics.
117
+ */
118
+ export interface ValidationErrorItem {
119
+ category: ValidationErrorCategory;
120
+ message: string;
121
+ error_type?: string;
122
+ pipe_code?: string;
123
+ concept_code?: string;
124
+ domain_code?: string;
125
+ source?: string;
126
+ field_path?: string;
127
+ field_name?: string;
128
+ variable_names?: string[];
129
+ missing_concept_code?: string;
130
+ declared_concepts?: string[];
131
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Dict-serialized wire models — the SDK's concrete JSON materialization of the
3
+ * protocol's domain shapes. The single home (parity D8) for `DictStuff` /
4
+ * `DictWorkingMemory` / `DictPipeOutput` and the default `RunResultExecute`
5
+ * binding. Mirrors `mthds/runners/api/models.py`.
6
+ *
7
+ * These are the JSON forms the runners deal in: each `Stuff` reduced to
8
+ * `{ concept: <ref>, content }`, working memory as a flat root + aliases, the
9
+ * pipe-output as that working memory + a run id, and `DictRunResultExecute` as
10
+ * the protocol's `RunResultExecute` carrying a `DictPipeOutput`.
11
+ */
12
+ export {};
13
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/runners/api/models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Run-lifecycle types + polling for the hosted polling surface (`/v1/runs/*`).
3
+ * Mirrors `mthds/runners/api/runs.py`.
4
+ *
5
+ * Long method runs outlive the hosted gateway's ~30s synchronous cap, so the
6
+ * SDK submits a run (`POST /v1/start`), then polls a self-healing endpoint by
7
+ * bare `pipeline_run_id` until the run reaches a terminal state. All state lives behind
8
+ * the id (DynamoDB + Temporal on the platform), so an agent can drop the poll
9
+ * loop and resume later with just the id.
10
+ *
11
+ * Polling is NOT part of the MTHDS Protocol — it is a hosted-API extension. A
12
+ * bare runner 404s these routes, which the client translates into
13
+ * `RunLifecycleUnavailableError`.
14
+ *
15
+ * Wire contract mirrors the hosted MTHDS API:
16
+ * POST /v1/start → RunResultStart (start, 202)
17
+ * GET /v1/runs/{pipeline_run_id}/status → RunRead (status, self-healing)
18
+ * GET /v1/runs/{pipeline_run_id}/results → 202 / 200 / 409 (results)
19
+ */
20
+ /**
21
+ * Hosted run lifecycle status. Mirrors `pipelex_shared.schemas.run.RunStatus`
22
+ * — run states are a hosted-implementation concept; the protocol defines none (the hosted store tracks
23
+ * states like `PENDING`). `STARTED` is deprecated server-side but kept here
24
+ * for historical rows.
25
+ */
26
+ export type RunStatus = "PENDING" | "STARTED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "TERMINATED" | "TIMED_OUT";
27
+ /** A terminal status means the run is done and will not transition again. */
28
+ export declare function isTerminalRunStatus(status: RunStatus): boolean;
29
+ /** Only `COMPLETED` has a result; every other terminal status is a failure. */
30
+ export declare function isSuccessRunStatus(status: RunStatus): boolean;
31
+ /**
32
+ * A run record — the BASE shape of the run-lifecycle read surface.
33
+ *
34
+ * Only the base fields are declared. An implementation may return more
35
+ * (identity, workflow ids, storage URLs, anything else) — those are
36
+ * server-specific response fields, never named in this SDK; the index
37
+ * signature keeps them accessible, mirroring the request-side `extra`
38
+ * passthrough.
39
+ */
40
+ export interface RunPublic {
41
+ pipeline_run_id: string;
42
+ pipe_code?: string | null;
43
+ status: RunStatus;
44
+ created_at: string;
45
+ finished_at?: string | null;
46
+ /** Server-specific response fields (defined by the server you call). */
47
+ [extension: string]: unknown;
48
+ }
49
+ /**
50
+ * A run read through the self-healing path (`RunPublic` + `degraded`).
51
+ * When `degraded` is true, Temporal was unreachable and `status` is the
52
+ * last-known DB value, not a freshly-derived one — pair with
53
+ * `retry_after_seconds` (parsed from the `Retry-After` header).
54
+ */
55
+ export interface RunRead extends RunPublic {
56
+ degraded: boolean;
57
+ retry_after_seconds?: number | null;
58
+ }
59
+ /**
60
+ * Result artifacts for a completed run — `GET /v1/runs/{pipeline_run_id}/results`.
61
+ *
62
+ * Hosted: `main_stuff` + `graph_spec` (S3 artifacts relayed verbatim;
63
+ * `main_stuff` is polymorphic — a list output renders to a top-level array —
64
+ * so both are typed as opaque JSON). Bare-runner blocking fallback: the
65
+ * runner's native execute response, so `pipe_output` carries the output.
66
+ * Consumers read `main_stuff ?? pipe_output` (the documented output-shape
67
+ * difference between the two tiers).
68
+ */
69
+ export interface RunResults {
70
+ pipeline_run_id: string;
71
+ /** Method graph spec (`graphspec.json`); null if missing mid-write. */
72
+ graph_spec?: unknown;
73
+ /** Main output stuff (`main_stuff.json`); null if missing mid-write. */
74
+ main_stuff?: unknown;
75
+ /** Bare runner's native pipe output (blocking-execute fallback only). */
76
+ pipe_output?: Record<string, unknown> | null;
77
+ }
78
+ /**
79
+ * Single-shot result lookup outcome, discriminated on `state`:
80
+ * - `running` — HTTP 202; poll again after `retry_after_seconds`.
81
+ * - `completed` — HTTP 200; `result` carries the artifacts.
82
+ * - `failed` — HTTP 409; run reached a terminal non-`COMPLETED` status.
83
+ */
84
+ export type RunResultState = {
85
+ state: "running";
86
+ pipeline_run_id: string;
87
+ retry_after_seconds: number | null;
88
+ } | {
89
+ state: "completed";
90
+ pipeline_run_id: string;
91
+ result: RunResults;
92
+ } | {
93
+ state: "failed";
94
+ pipeline_run_id: string;
95
+ status: RunStatus;
96
+ message: string;
97
+ };
98
+ export interface WaitForResultOptions {
99
+ /**
100
+ * Base poll interval in ms (default 2000). The server's `Retry-After`
101
+ * header overrides this when it asks for a longer wait.
102
+ */
103
+ intervalMs?: number;
104
+ /** Max ms to wait before throwing `RunTimeoutError` (default 1_200_000 — 20 min). */
105
+ timeoutMs?: number;
106
+ /** Abort the poll loop (Ctrl-C / agent walk-away). */
107
+ signal?: AbortSignal;
108
+ /** Invoked before each sleep so callers can drive a spinner / progress line. */
109
+ onPoll?: (info: {
110
+ attempt: number;
111
+ elapsedMs: number;
112
+ }) => void;
113
+ }
114
+ export declare const DEFAULT_POLL_INTERVAL_MS = 2000;
115
+ export declare const DEFAULT_WAIT_TIMEOUT_MS = 1200000;
116
+ /** A single result lookup — the primitive the poll loop drives. */
117
+ export type FetchResultOnce = (runId: string, options?: {
118
+ signal?: AbortSignal;
119
+ }) => Promise<RunResultState>;
120
+ /**
121
+ * Poll a single-shot result lookup (`fetchOnce`) until the run reaches a
122
+ * terminal state. Returns the artifacts on `COMPLETED`, throws `RunFailedError`
123
+ * on any other terminal status, and throws `RunTimeoutError` if `timeoutMs`
124
+ * elapses first (the run keeps executing server-side — re-poll by id later).
125
+ *
126
+ * The single owner of the wait/poll/Retry-After/abort logic. Both
127
+ * `MthdsApiClient.waitForResult` and `BaseRunner.waitForResult` delegate here,
128
+ * so the behavior can never drift between the wire client and the runner layer.
129
+ */
130
+ export declare function pollUntilResult(fetchOnce: FetchResultOnce, runId: string, options?: WaitForResultOptions): Promise<RunResults>;