@xeonr/pipelines-sdk 0.1.0 → 0.3.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 +247 -24
- package/dist/client.d.ts +73 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +48 -1
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +42 -6
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +45 -2
- package/dist/errors.js.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts +173 -12
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.js +45 -28
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.d.ts +136 -17
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.js +42 -35
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts +346 -15
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js +105 -10
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts +38 -6
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/common_pb.js +37 -5
- package/dist/gen/xeonr/pipelines/v1/common_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts +280 -5
- package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/definition_pb.js +100 -7
- package/dist/gen/xeonr/pipelines/v1/definition_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.d.ts +1100 -0
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js +298 -0
- package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/pools_pb.d.ts +120 -1
- package/dist/gen/xeonr/pipelines/v1/pools_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/pools_pb.js +36 -11
- package/dist/gen/xeonr/pipelines/v1/pools_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/queues_pb.d.ts +769 -0
- package/dist/gen/xeonr/pipelines/v1/queues_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/queues_pb.js +190 -0
- package/dist/gen/xeonr/pipelines/v1/queues_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts +60 -0
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js +21 -16
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts +867 -4
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/runs_pb.js +243 -27
- package/dist/gen/xeonr/pipelines/v1/runs_pb.js.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.d.ts +1110 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.js +295 -0
- package/dist/gen/xeonr/pipelines/v1/schedules_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.d.ts +8 -3
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.js +1 -1
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.js.map +1 -1
- package/dist/gen/xeonr/platform/v1/options_pb.d.ts +123 -1
- package/dist/gen/xeonr/platform/v1/options_pb.d.ts.map +1 -1
- package/dist/gen/xeonr/platform/v1/options_pb.js +90 -1
- package/dist/gen/xeonr/platform/v1/options_pb.js.map +1 -1
- package/dist/handler.d.ts +50 -0
- package/dist/handler.d.ts.map +1 -1
- package/dist/handler.js +27 -0
- package/dist/handler.js.map +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/logship.d.ts +60 -10
- package/dist/logship.d.ts.map +1 -1
- package/dist/logship.js +171 -28
- package/dist/logship.js.map +1 -1
- package/dist/queues.d.ts +171 -0
- package/dist/queues.d.ts.map +1 -0
- package/dist/queues.js +135 -0
- package/dist/queues.js.map +1 -0
- package/dist/reporter.d.ts +120 -0
- package/dist/reporter.d.ts.map +1 -0
- package/dist/reporter.js +323 -0
- package/dist/reporter.js.map +1 -0
- package/dist/schedules.d.ts +201 -0
- package/dist/schedules.d.ts.map +1 -0
- package/dist/schedules.js +127 -0
- package/dist/schedules.js.map +1 -0
- package/dist/testing/cron.d.ts +33 -0
- package/dist/testing/cron.d.ts.map +1 -0
- package/dist/testing/cron.js +177 -0
- package/dist/testing/cron.js.map +1 -0
- package/dist/testing/index.d.ts +142 -4
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +843 -44
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/queues.d.ts +46 -0
- package/dist/testing/queues.d.ts.map +1 -0
- package/dist/testing/queues.js +70 -0
- package/dist/testing/queues.js.map +1 -0
- package/dist/testing/schedules.d.ts +113 -0
- package/dist/testing/schedules.d.ts.map +1 -0
- package/dist/testing/schedules.js +419 -0
- package/dist/testing/schedules.js.map +1 -0
- package/dist/worker.d.ts +78 -8
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +163 -33
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options_pb.d.ts","sourceRoot":"","sources":["../../../../../src/gen/xeonr/platform/v1/options_pb.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/F,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"options_pb.d.ts","sourceRoot":"","sources":["../../../../../src/gen/xeonr/platform/v1/options_pb.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/F,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEvG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,OAC4tG,CAAC;AAE1wG;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC,2BAA2B,CAAC,GAAG;IAC3D;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAElB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,OAAO,CACE,CAAC;AAEjD;;;;;GA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E,MAAM,CAChB,CAAC;AAE7C;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,aAAa,EAAE,MAAM,CACxB,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,aAAa,EAAE,OAAO,CACxB,CAAC;AAE7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,CAAC,aAAa,EAAE,OAAO,CACpB,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,YAAY,CAAC,aAAa,EAAE,OAAO,CACb,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,EAAE,YAAY,CAAC,YAAY,EAAE,OAAO,CACZ,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,YAAY,EAAE,OAAO,CACd,CAAC;AAE9C;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,YAAY,EAAE,MAAM,CAClB,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,aAAa,EAAE,YAAY,CACrB,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,cAAc,EAAE,YAAY,CAC9B,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,WAAW,EAAE,YAAY,CACxB,CAAC"}
|
|
@@ -24,7 +24,7 @@ import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt";
|
|
|
24
24
|
/**
|
|
25
25
|
* Describes the file xeonr/platform/v1/options.proto.
|
|
26
26
|
*/
|
|
27
|
-
export const file_xeonr_platform_v1_options = /*@__PURE__*/ fileDesc("
|
|
27
|
+
export const file_xeonr_platform_v1_options = /*@__PURE__*/ fileDesc("Ch94ZW9uci9wbGF0Zm9ybS92MS9vcHRpb25zLn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bGJ1ZmZlcnMvZ28veGVvbnIvcGxhdGZvcm0vdjE7cGxhdGZvcm12MWIGcHJvdG8z", [file_google_protobuf_descriptor]);
|
|
28
28
|
/**
|
|
29
29
|
* Describes the message xeonr.platform.v1.McpTool.
|
|
30
30
|
* Use `create(McpToolSchema)` to create a new message.
|
|
@@ -40,6 +40,11 @@ export const McpToolsetSchema = /*@__PURE__*/ messageDesc(file_xeonr_platform_v1
|
|
|
40
40
|
* Use `create(McpProductSchema)` to create a new message.
|
|
41
41
|
*/
|
|
42
42
|
export const McpProductSchema = /*@__PURE__*/ messageDesc(file_xeonr_platform_v1_options, 2);
|
|
43
|
+
/**
|
|
44
|
+
* Describes the message xeonr.platform.v1.McpExclusion.
|
|
45
|
+
* Use `create(McpExclusionSchema)` to create a new message.
|
|
46
|
+
*/
|
|
47
|
+
export const McpExclusionSchema = /*@__PURE__*/ messageDesc(file_xeonr_platform_v1_options, 3);
|
|
43
48
|
/**
|
|
44
49
|
* McpTier says whether the gateway lists a tool or only finds it on request.
|
|
45
50
|
*
|
|
@@ -96,6 +101,70 @@ export var McpEffect;
|
|
|
96
101
|
* Describes the enum xeonr.platform.v1.McpEffect.
|
|
97
102
|
*/
|
|
98
103
|
export const McpEffectSchema = /*@__PURE__*/ enumDesc(file_xeonr_platform_v1_options, 1);
|
|
104
|
+
/**
|
|
105
|
+
* McpExcluded is why an RPC is deliberately not an MCP tool.
|
|
106
|
+
*
|
|
107
|
+
* @generated from enum xeonr.platform.v1.McpExcluded
|
|
108
|
+
*/
|
|
109
|
+
export var McpExcluded;
|
|
110
|
+
(function (McpExcluded) {
|
|
111
|
+
/**
|
|
112
|
+
* @generated from enum value: MCP_EXCLUDED_UNSPECIFIED = 0;
|
|
113
|
+
*/
|
|
114
|
+
McpExcluded[McpExcluded["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
115
|
+
/**
|
|
116
|
+
* Sign-in, passkey, consent, OAuth and session flows a browser drives.
|
|
117
|
+
*
|
|
118
|
+
* @generated from enum value: MCP_EXCLUDED_INTERACTIVE_AUTH = 1;
|
|
119
|
+
*/
|
|
120
|
+
McpExcluded[McpExcluded["INTERACTIVE_AUTH"] = 1] = "INTERACTIVE_AUTH";
|
|
121
|
+
/**
|
|
122
|
+
* Called by a machine, not a person: runner, agent, webhook,
|
|
123
|
+
* service-to-service, controller callbacks.
|
|
124
|
+
*
|
|
125
|
+
* @generated from enum value: MCP_EXCLUDED_MACHINE_PROTOCOL = 2;
|
|
126
|
+
*/
|
|
127
|
+
McpExcluded[McpExcluded["MACHINE_PROTOCOL"] = 2] = "MACHINE_PROTOCOL";
|
|
128
|
+
/**
|
|
129
|
+
* Moves bytes (uploads, downloads, chunked transfers) a model cannot carry
|
|
130
|
+
* as JSON arguments or results.
|
|
131
|
+
*
|
|
132
|
+
* @generated from enum value: MCP_EXCLUDED_BYTE_TRANSFER = 3;
|
|
133
|
+
*/
|
|
134
|
+
McpExcluded[McpExcluded["BYTE_TRANSFER"] = 3] = "BYTE_TRANSFER";
|
|
135
|
+
/**
|
|
136
|
+
* Needs a principal the gateway cannot carry (an API key, an automation
|
|
137
|
+
* key, a service account, a device). McpExclusion.ticket names the ticket
|
|
138
|
+
* that would lift it.
|
|
139
|
+
*
|
|
140
|
+
* @generated from enum value: MCP_EXCLUDED_NOT_PERSON_CALLABLE = 4;
|
|
141
|
+
*/
|
|
142
|
+
McpExcluded[McpExcluded["NOT_PERSON_CALLABLE"] = 4] = "NOT_PERSON_CALLABLE";
|
|
143
|
+
/**
|
|
144
|
+
* Another tool of the same product covers it. McpExclusion.superseded_by
|
|
145
|
+
* names that tool.
|
|
146
|
+
*
|
|
147
|
+
* @generated from enum value: MCP_EXCLUDED_SUPERSEDED = 5;
|
|
148
|
+
*/
|
|
149
|
+
McpExcluded[McpExcluded["SUPERSEDED"] = 5] = "SUPERSEDED";
|
|
150
|
+
/**
|
|
151
|
+
* Platform staff operations (require_admin and the like) that a person's
|
|
152
|
+
* gateway connection should not reach.
|
|
153
|
+
*
|
|
154
|
+
* @generated from enum value: MCP_EXCLUDED_PLATFORM_ADMIN = 6;
|
|
155
|
+
*/
|
|
156
|
+
McpExcluded[McpExcluded["PLATFORM_ADMIN"] = 6] = "PLATFORM_ADMIN";
|
|
157
|
+
/**
|
|
158
|
+
* None of the above. McpExclusion.detail says why.
|
|
159
|
+
*
|
|
160
|
+
* @generated from enum value: MCP_EXCLUDED_OTHER = 7;
|
|
161
|
+
*/
|
|
162
|
+
McpExcluded[McpExcluded["OTHER"] = 7] = "OTHER";
|
|
163
|
+
})(McpExcluded || (McpExcluded = {}));
|
|
164
|
+
/**
|
|
165
|
+
* Describes the enum xeonr.platform.v1.McpExcluded.
|
|
166
|
+
*/
|
|
167
|
+
export const McpExcludedSchema = /*@__PURE__*/ enumDesc(file_xeonr_platform_v1_options, 2);
|
|
99
168
|
/**
|
|
100
169
|
* no_authentication marks a method callable without a bearer token. A
|
|
101
170
|
* bearer that IS presented is still verified and, when valid, placed on the
|
|
@@ -232,4 +301,24 @@ export const mcp_hidden = /*@__PURE__*/ extDesc(file_xeonr_platform_v1_options,
|
|
|
232
301
|
* @generated from extension: string mcp_description = 9902;
|
|
233
302
|
*/
|
|
234
303
|
export const mcp_description = /*@__PURE__*/ extDesc(file_xeonr_platform_v1_options, 13);
|
|
304
|
+
/**
|
|
305
|
+
* mcp_exclude marks a unary RPC as deliberately not an MCP tool.
|
|
306
|
+
*
|
|
307
|
+
* @generated from extension: xeonr.platform.v1.McpExclusion mcp_exclude = 9911;
|
|
308
|
+
*/
|
|
309
|
+
export const mcp_exclude = /*@__PURE__*/ extDesc(file_xeonr_platform_v1_options, 14);
|
|
310
|
+
/**
|
|
311
|
+
* mcp_exclude_service excludes every method of the service that does not
|
|
312
|
+
* carry mcp_tool or its own mcp_exclude.
|
|
313
|
+
*
|
|
314
|
+
* @generated from extension: xeonr.platform.v1.McpExclusion mcp_exclude_service = 9900;
|
|
315
|
+
*/
|
|
316
|
+
export const mcp_exclude_service = /*@__PURE__*/ extDesc(file_xeonr_platform_v1_options, 15);
|
|
317
|
+
/**
|
|
318
|
+
* mcp_exclude_file excludes every method of every service in the file
|
|
319
|
+
* that does not carry mcp_tool or its own exclusion.
|
|
320
|
+
*
|
|
321
|
+
* @generated from extension: xeonr.platform.v1.McpExclusion mcp_exclude_file = 9900;
|
|
322
|
+
*/
|
|
323
|
+
export const mcp_exclude_file = /*@__PURE__*/ extDesc(file_xeonr_platform_v1_options, 16);
|
|
235
324
|
//# sourceMappingURL=options_pb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options_pb.js","sourceRoot":"","sources":["../../../../../src/gen/xeonr/platform/v1/options_pb.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,kEAAkE;AAClE,EAAE;AACF,8EAA8E;AAC9E,0EAA0E;AAC1E,yEAAyE;AACzE,4EAA4E;AAC5E,+EAA+E;AAC/E,4EAA4E;AAC5E,kEAAkE;AAClE,2EAA2E;AAC3E,EAAE;AACF,2EAA2E;AAC3E,0DAA0D;AAC1D,EAAE;AACF,0EAA0E;AAC1E,oEAAoE;AACpE,iEAAiE;AACjE,8EAA8E;AAC9E,8EAA8E;AAC9E,2BAA2B;AAO3B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAExF,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAGzE;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAY,aAAa,CAClE,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"options_pb.js","sourceRoot":"","sources":["../../../../../src/gen/xeonr/platform/v1/options_pb.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,kEAAkE;AAClE,EAAE;AACF,8EAA8E;AAC9E,0EAA0E;AAC1E,yEAAyE;AACzE,4EAA4E;AAC5E,+EAA+E;AAC/E,4EAA4E;AAC5E,kEAAkE;AAClE,2EAA2E;AAC3E,E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AAO,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA+C,aAAa,CAC1F,OAAO,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA4C,aAAa,CACpF,OAAO,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC"}
|
package/dist/handler.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { JsonObject, JsonValue, MessageInitShape } from "@bufbuild/protobuf";
|
|
2
2
|
import type { InputSlotSchema, OutputSlotSchema } from "./gen/xeonr/pipelines/v1/registry_pb.js";
|
|
3
|
+
import type { IssueInput, ProgressUpdate, SpanHandle, StageDef } from "./reporter.js";
|
|
4
|
+
import type { ScheduleTargetJson } from "./schedules.js";
|
|
3
5
|
/** The `<namespace>/<name>` pattern the contract holds handler names to. */
|
|
4
6
|
export declare const HANDLER_NAME: RegExp;
|
|
5
7
|
/** One attempt of a node, as the handler running it sees it. */
|
|
@@ -48,6 +50,34 @@ export interface HandlerContext<I> {
|
|
|
48
50
|
readonly attempt: AttemptInfo;
|
|
49
51
|
/** The attempt's log in pipelines. */
|
|
50
52
|
readonly log: AttemptLogger;
|
|
53
|
+
/**
|
|
54
|
+
* Enters a stage: one the handler declares in `stages`, or a new one,
|
|
55
|
+
* added with weight 0. Entering a stage finishes the one before it; the
|
|
56
|
+
* last one is finished when the handler returns (or fails). Pass `state`
|
|
57
|
+
* to finish or skip the current stage explicitly.
|
|
58
|
+
*/
|
|
59
|
+
stage(key: string, opts?: {
|
|
60
|
+
name?: string;
|
|
61
|
+
state?: "running" | "succeeded" | "failed" | "skipped";
|
|
62
|
+
message?: string;
|
|
63
|
+
}): void;
|
|
64
|
+
/**
|
|
65
|
+
* Reports progress within the current stage (or the attempt as a whole):
|
|
66
|
+
* items processed, total and failed, a fraction, a message. Sent about
|
|
67
|
+
* once a second at most, and once more before the attempt completes.
|
|
68
|
+
*/
|
|
69
|
+
progress(update: ProgressUpdate): void;
|
|
70
|
+
/**
|
|
71
|
+
* Reports a structured, non-fatal problem with one item of the work. The
|
|
72
|
+
* run can still succeed; it carries the issues. Batched, never fails the
|
|
73
|
+
* handler.
|
|
74
|
+
*/
|
|
75
|
+
issue(issue: IssueInput): void;
|
|
76
|
+
/**
|
|
77
|
+
* Runs `fn` inside a span of the attempt's trace, recorded with
|
|
78
|
+
* `ReportSpans` (status `error` when `fn` throws, which is rethrown).
|
|
79
|
+
*/
|
|
80
|
+
span<T>(name: string, fn: (span: SpanHandle) => Promise<T> | T, attributes?: JsonObject): Promise<T>;
|
|
51
81
|
}
|
|
52
82
|
/** kv outputs a handler returns, by output slot. */
|
|
53
83
|
export type HandlerOutputs = Record<string, JsonValue>;
|
|
@@ -69,6 +99,14 @@ export interface HandlerDefinition<I = JsonObject, O extends HandlerOutputs | vo
|
|
|
69
99
|
/** Resource kinds the handler accepts; empty accepts any. */
|
|
70
100
|
readonly resourceKinds?: string[];
|
|
71
101
|
readonly readmeMd?: string;
|
|
102
|
+
/** The handler's title for people ("Image convert"); empty shows the name. */
|
|
103
|
+
readonly title?: string;
|
|
104
|
+
/**
|
|
105
|
+
* The stages the handler's work goes through, in order, published in the
|
|
106
|
+
* manifest so a console can draw them before the attempt starts. Enter
|
|
107
|
+
* each with `ctx.stage(key)`.
|
|
108
|
+
*/
|
|
109
|
+
readonly stages?: readonly StageDef[];
|
|
72
110
|
/**
|
|
73
111
|
* The most attempts of this handler one worker process runs at once.
|
|
74
112
|
* Default: the worker's overall concurrency.
|
|
@@ -91,4 +129,16 @@ export interface HandlerDefinition<I = JsonObject, O extends HandlerOutputs | vo
|
|
|
91
129
|
* register it with `worker.handle`.
|
|
92
130
|
*/
|
|
93
131
|
export declare function defineHandler<I = JsonObject, O extends HandlerOutputs | void = HandlerOutputs | void>(def: HandlerDefinition<I, O>): HandlerDefinition<I, O>;
|
|
132
|
+
/**
|
|
133
|
+
* Defines a schedule's enumeration handler: at each occurrence it returns
|
|
134
|
+
* the targets the schedule fans out to, published as the kv output
|
|
135
|
+
* `targets` the platform reads.
|
|
136
|
+
*/
|
|
137
|
+
export declare function defineEnumerator<I = JsonObject>(def: Omit<HandlerDefinition<I, {
|
|
138
|
+
targets: JsonValue;
|
|
139
|
+
}>, "run" | "outputs"> & {
|
|
140
|
+
run: (ctx: HandlerContext<I>) => Promise<readonly ScheduleTargetJson[]> | readonly ScheduleTargetJson[];
|
|
141
|
+
}): HandlerDefinition<I, {
|
|
142
|
+
targets: JsonValue;
|
|
143
|
+
}>;
|
|
94
144
|
//# sourceMappingURL=handler.d.ts.map
|
package/dist/handler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,4EAA4E;AAC5E,eAAO,MAAM,YAAY,QAAuD,CAAC;AAGjF,gEAAgE;AAChE,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,EAAE,EAAE,MAAM,C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AAG,iBAAiB,CAAC,CAAC,EAAE;IAAE,OAAO,EAAE,SAAS,CAAA;CAAE,CAAC,CAM/C"}
|
package/dist/handler.js
CHANGED
|
@@ -10,9 +10,36 @@ export function defineHandler(def) {
|
|
|
10
10
|
throw new TypeError(`defineHandler: ${JSON.stringify(def.name)} is not <namespace>/<name>`);
|
|
11
11
|
if (!VERSION.test(def.version))
|
|
12
12
|
throw new TypeError(`defineHandler: ${JSON.stringify(def.version)} is not a semantic version`);
|
|
13
|
+
const keys = new Set();
|
|
14
|
+
for (const st of def.stages ?? []) {
|
|
15
|
+
if (!/^[a-z][a-z0-9_.-]{0,63}$/.test(st.key))
|
|
16
|
+
throw new TypeError(`defineHandler: stage key ${JSON.stringify(st.key)} is not valid`);
|
|
17
|
+
if (keys.has(st.key))
|
|
18
|
+
throw new TypeError(`defineHandler: stage ${st.key} is declared twice`);
|
|
19
|
+
if (!st.name || st.name.length > 128)
|
|
20
|
+
throw new TypeError(`defineHandler: stage ${st.key} needs a name of at most 128 characters`);
|
|
21
|
+
if (st.weight !== undefined && (!Number.isInteger(st.weight) || st.weight < 0 || st.weight > 1000)) {
|
|
22
|
+
throw new TypeError(`defineHandler: stage ${st.key}'s weight must be an integer from 0 to 1000`);
|
|
23
|
+
}
|
|
24
|
+
keys.add(st.key);
|
|
25
|
+
}
|
|
26
|
+
if ((def.stages?.length ?? 0) > 32)
|
|
27
|
+
throw new TypeError("defineHandler: at most 32 stages");
|
|
13
28
|
if (def.concurrency !== undefined && (!Number.isInteger(def.concurrency) || def.concurrency < 1)) {
|
|
14
29
|
throw new TypeError("defineHandler: concurrency must be a positive integer");
|
|
15
30
|
}
|
|
16
31
|
return def;
|
|
17
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Defines a schedule's enumeration handler: at each occurrence it returns
|
|
35
|
+
* the targets the schedule fans out to, published as the kv output
|
|
36
|
+
* `targets` the platform reads.
|
|
37
|
+
*/
|
|
38
|
+
export function defineEnumerator(def) {
|
|
39
|
+
return defineHandler({
|
|
40
|
+
...def,
|
|
41
|
+
outputs: [{ name: "targets", type: 1, required: true }],
|
|
42
|
+
run: async (ctx) => ({ targets: (await def.run(ctx)) }),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
18
45
|
//# sourceMappingURL=handler.js.map
|
package/dist/handler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAKA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,oDAAoD,CAAC;AACjF,MAAM,OAAO,GAAG,4CAA4C,CAAC;AAuH7D;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,GAA4B;IAE5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;IAC9H,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAC/H,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,EAAE,IAAI,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;QAClC,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,SAAS,CAAC,4BAA4B,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACrI,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;YAAE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AE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAyB,EAAE,CAAC;KAChF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { jwtBearer, tokenSource } from "./auth.js";
|
|
|
15
15
|
export type { JwtBearerOptions, JwtBearerTokenProvider, TokenProvider, TokenSource } from "./auth.js";
|
|
16
16
|
export { PipelinesClient } from "./client.js";
|
|
17
17
|
export type { CreateJobInput, CreatedRun, CreateRunInput, ListRunsInput, PipelinesClientOptions } from "./client.js";
|
|
18
|
-
export { AttemptAbortedError, errorKind, PipelinesAuthError, WorkerStartError } from "./errors.js";
|
|
18
|
+
export { AttemptAbortedError, errorKind, handlerFailureKind, PermanentError, PipelinesAuthError, TransientError, WorkerStartError } from "./errors.js";
|
|
19
19
|
export type { ErrorKind } from "./errors.js";
|
|
20
20
|
export { defineHandler, HANDLER_NAME } from "./handler.js";
|
|
21
21
|
export type { AttemptInfo, AttemptLogger, HandlerContext, HandlerDefinition, HandlerOutputs } from "./handler.js";
|
|
@@ -25,5 +25,17 @@ export { consoleLogger, Worker } from "./worker.js";
|
|
|
25
25
|
export type { StopOptions, WorkerLogger, WorkerOptions, WorkerState, WorkerStats } from "./worker.js";
|
|
26
26
|
export { AttemptState, FailureClass, NodeState, RunState, Termination } from "./gen/xeonr/pipelines/v1/common_pb.js";
|
|
27
27
|
export { Visibility, SlotType } from "./gen/xeonr/pipelines/v1/registry_pb.js";
|
|
28
|
+
export { HandlerFailureKind } from "./gen/xeonr/pipelines/private/v1/worker_pb.js";
|
|
28
29
|
export type { Run, NodeRun, Attempt } from "./gen/xeonr/pipelines/v1/runs_pb.js";
|
|
30
|
+
export { declareQueues, productFromToken, QueuesClient } from "./queues.js";
|
|
31
|
+
export type { QueueDecl, QueueRef, QueuesClientOptions } from "./queues.js";
|
|
32
|
+
export { declareSchedules, SchedulesClient } from "./schedules.js";
|
|
33
|
+
export type { ScheduleDecl, ScheduleJobDecl, SchedulesClientOptions, ScheduleTargetJson } from "./schedules.js";
|
|
34
|
+
export { defineEnumerator } from "./handler.js";
|
|
35
|
+
export type { IssueInput, ProgressUpdate, SpanHandle, StageDef } from "./reporter.js";
|
|
36
|
+
export { IssueSeverity, RunOrigin, RunTrigger, StageState } from "./gen/xeonr/pipelines/v1/runs_pb.js";
|
|
37
|
+
export type { RunIssue, TraceSpan, AttemptProgress } from "./gen/xeonr/pipelines/v1/runs_pb.js";
|
|
38
|
+
export type { Queue } from "./gen/xeonr/pipelines/v1/queues_pb.js";
|
|
39
|
+
export { MisfirePolicy, OccurrenceOutcome } from "./gen/xeonr/pipelines/v1/schedules_pb.js";
|
|
40
|
+
export type { Schedule } from "./gen/xeonr/pipelines/v1/schedules_pb.js";
|
|
29
41
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACtG,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrH,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CA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CAAC;AAC5E,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACnE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACvG,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAChG,YAAY,EAAE,KAAK,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC5F,YAAY,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,11 +13,17 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export { jwtBearer, tokenSource } from "./auth.js";
|
|
15
15
|
export { PipelinesClient } from "./client.js";
|
|
16
|
-
export { AttemptAbortedError, errorKind, PipelinesAuthError, WorkerStartError } from "./errors.js";
|
|
16
|
+
export { AttemptAbortedError, errorKind, handlerFailureKind, PermanentError, PipelinesAuthError, TransientError, WorkerStartError } from "./errors.js";
|
|
17
17
|
export { defineHandler, HANDLER_NAME } from "./handler.js";
|
|
18
18
|
export { authInterceptor, createPipelinesTransport } from "./transport.js";
|
|
19
19
|
export { consoleLogger, Worker } from "./worker.js";
|
|
20
20
|
// The contract's vocabulary, re-exported for convenience.
|
|
21
21
|
export { AttemptState, FailureClass, NodeState, RunState, Termination } from "./gen/xeonr/pipelines/v1/common_pb.js";
|
|
22
22
|
export { Visibility, SlotType } from "./gen/xeonr/pipelines/v1/registry_pb.js";
|
|
23
|
+
export { HandlerFailureKind } from "./gen/xeonr/pipelines/private/v1/worker_pb.js";
|
|
24
|
+
export { declareQueues, productFromToken, QueuesClient } from "./queues.js";
|
|
25
|
+
export { declareSchedules, SchedulesClient } from "./schedules.js";
|
|
26
|
+
export { defineEnumerator } from "./handler.js";
|
|
27
|
+
export { IssueSeverity, RunOrigin, RunTrigger, StageState } from "./gen/xeonr/pipelines/v1/runs_pb.js";
|
|
28
|
+
export { MisfirePolicy, OccurrenceOutcome } from "./gen/xeonr/pipelines/v1/schedules_pb.js";
|
|
23
29
|
//# 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;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEvJ,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEpD,0DAA0D;AAC1D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAEnF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAGvG,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC"}
|
package/dist/logship.d.ts
CHANGED
|
@@ -10,8 +10,9 @@ export interface LogShipperOptions {
|
|
|
10
10
|
/** How long output waits before a part-full chunk is sent. Default 500 ms. */
|
|
11
11
|
flushIntervalMs?: number;
|
|
12
12
|
/**
|
|
13
|
-
* Most bytes held while the API is slow or down
|
|
14
|
-
*
|
|
13
|
+
* Most bytes held while the API is slow or down, and most acknowledged
|
|
14
|
+
* bytes kept to resend to a server that lost them. A handler's log calls
|
|
15
|
+
* cannot block, so past this, new output is dropped and a marker says how
|
|
15
16
|
* much. Default 8 MiB.
|
|
16
17
|
*/
|
|
17
18
|
maxBuffered?: number;
|
|
@@ -21,18 +22,37 @@ export interface LogShipperOptions {
|
|
|
21
22
|
onLost?: () => void;
|
|
22
23
|
/** Told of each failed send. */
|
|
23
24
|
onRetry?: (err: unknown) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Told when the server expected an earlier seq than this shipper had
|
|
27
|
+
* reached and the chunks in between were no longer held: the log carries
|
|
28
|
+
* on at `to` after a marker saying `lost` bytes are gone.
|
|
29
|
+
*/
|
|
30
|
+
onRenumber?: (from: bigint, to: bigint, lost: number) => void;
|
|
24
31
|
}
|
|
32
|
+
/** The line a renumbered log carries where output was lost. */
|
|
33
|
+
export declare function lostMarker(lost: number): string;
|
|
34
|
+
/**
|
|
35
|
+
* The seq an `out_of_range` answer names as expected: the last number in its
|
|
36
|
+
* message (the api says "seq: the next expected seq is N"), as the Go
|
|
37
|
+
* runner's `workerclient.ExpectedSeq` reads it. Undefined when it names none.
|
|
38
|
+
*/
|
|
39
|
+
export declare function expectedSeq(err: unknown): bigint | undefined;
|
|
25
40
|
/**
|
|
26
|
-
* Ships one attempt's log,
|
|
27
|
-
* numbered from 0
|
|
28
|
-
*
|
|
29
|
-
*
|
|
41
|
+
* Ships one attempt's log, the runner's way (pkg/logship): chunks are
|
|
42
|
+
* numbered from 0, each is sent until acknowledged before the next, so a
|
|
43
|
+
* retry after a lost reply cannot duplicate or reorder anything; the last
|
|
44
|
+
* chunk carries `final`.
|
|
30
45
|
*
|
|
31
|
-
* - `failed_precondition`: the attempt is lost
|
|
46
|
+
* - `failed_precondition`: the attempt is lost. Shipping stops and `onLost`
|
|
32
47
|
* is told.
|
|
33
|
-
* - `out_of_range`
|
|
34
|
-
*
|
|
48
|
+
* - `out_of_range` naming the expected seq: the server holds fewer chunks
|
|
49
|
+
* than it acknowledged. The held chunks from the expected one are sent
|
|
50
|
+
* again; if they are no longer held, the log is renumbered from the
|
|
51
|
+
* expected seq after one marker line saying how much output was lost.
|
|
52
|
+
* Never fatal to the attempt.
|
|
35
53
|
* - The server's `truncated`: the log is at its cap; shipping stops.
|
|
54
|
+
* - Another final code (`invalid_argument`, `unimplemented`): the rest of
|
|
55
|
+
* the log is dropped; the attempt carries on.
|
|
36
56
|
* - Anything else is retried with backoff.
|
|
37
57
|
*/
|
|
38
58
|
export declare class LogShipper {
|
|
@@ -46,6 +66,11 @@ export declare class LogShipper {
|
|
|
46
66
|
private stopped;
|
|
47
67
|
private closing;
|
|
48
68
|
private seq;
|
|
69
|
+
/** Acknowledged chunks, oldest first, kept to resend; bounded by maxBuffered. */
|
|
70
|
+
private sent;
|
|
71
|
+
private sentBytes;
|
|
72
|
+
/** offsets[i] is how many bytes the chunks before seq i held; its length is seq + 1. */
|
|
73
|
+
private offsets;
|
|
49
74
|
private wake;
|
|
50
75
|
private readonly done;
|
|
51
76
|
private readonly abort;
|
|
@@ -61,7 +86,32 @@ export declare class LogShipper {
|
|
|
61
86
|
stop(): void;
|
|
62
87
|
private take;
|
|
63
88
|
private run;
|
|
64
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Delivers one chunk at the current seq. A refusal as ahead of the server
|
|
91
|
+
* is answered by resending what it lost, or by renumbering, and then this
|
|
92
|
+
* chunk again; a server that refuses again is answered the same way, a
|
|
93
|
+
* bounded number of times.
|
|
94
|
+
*/
|
|
65
95
|
private send;
|
|
96
|
+
/**
|
|
97
|
+
* Sends one chunk at `seq` until it is acknowledged. Throws Stop when the
|
|
98
|
+
* attempt is lost, shipping stopped, or the server answered something
|
|
99
|
+
* final; and the error itself for an `out_of_range` naming a seq other
|
|
100
|
+
* than this one, which the caller answers.
|
|
101
|
+
*/
|
|
102
|
+
private deliver;
|
|
103
|
+
/** Records chunk `seq` as stored and keeps it for a resend. */
|
|
104
|
+
private acknowledged;
|
|
105
|
+
/**
|
|
106
|
+
* Sends the held chunks from `expected` up to (not including) `upTo`
|
|
107
|
+
* again. False when they are not all held, or the server refused one.
|
|
108
|
+
*/
|
|
109
|
+
private replay;
|
|
110
|
+
/**
|
|
111
|
+
* Continues the log at `expected` when the chunks from there to `upTo`
|
|
112
|
+
* are not all held: one marker with the size of what is gone, then the
|
|
113
|
+
* held chunks that ran without a gap up to `upTo`, under new seqs.
|
|
114
|
+
*/
|
|
115
|
+
private renumber;
|
|
66
116
|
}
|
|
67
117
|
//# sourceMappingURL=logship.d.ts.map
|
package/dist/logship.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logship.d.ts","sourceRoot":"","sources":["../src/logship.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logship.d.ts","sourceRoot":"","sources":["../src/logship.ts"],"names":[],"mappings":"AAIA,8EAA8E;AAC9E,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE/I,gCAAgC;AAChC,MAAM,WAAW,iBAAiB;IAChC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gCAAgC;IAChC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D;AAID,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAK5D;AAID;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAU;IAwBnB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAvBvB,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