deepline 0.3.49 → 0.3.51
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/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/play.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +106 -89
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +0 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +52 -21
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +45 -5
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +11 -3
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +0 -2
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +11 -0
- package/dist/bundling-sources/shared_libs/play-runtime/secret-capability.ts +5 -1
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +1 -14
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/contract.ts +17 -7
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/index.ts +0 -1
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +112 -5
- package/dist/bundling-sources/shared_libs/security/safe-fetch.ts +6 -1
- package/dist/cli/index.js +837 -3147
- package/dist/cli/index.mjs +704 -3010
- package/dist/{compiler-manifest-CbzdZrJj.d.mts → compiler-manifest-B47AA7As.d.mts} +46 -4
- package/dist/{compiler-manifest-CbzdZrJj.d.ts → compiler-manifest-B47AA7As.d.ts} +46 -4
- package/dist/index.d.mts +151 -149
- package/dist/index.d.ts +151 -149
- package/dist/index.js +1515 -117
- package/dist/index.mjs +1514 -117
- package/dist/install-integrity.json +2 -2
- package/dist/plays/bundle-play-file.d.mts +2 -2
- package/dist/plays/bundle-play-file.d.ts +2 -2
- package/dist/plays/bundle-play-file.mjs +5 -2614
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ var src_exports = {};
|
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
AuthError: () => AuthError,
|
|
34
34
|
ConfigError: () => ConfigError,
|
|
35
|
+
CtxFetchHttpError: () => CtxFetchHttpError,
|
|
35
36
|
DEEPLINE_EXTRACTOR_TARGETS: () => DEEPLINE_EXTRACTOR_TARGETS,
|
|
36
37
|
DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS: () => DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS,
|
|
37
38
|
DEEPLINE_TOOL_CATEGORIES: () => DEEPLINE_TOOL_CATEGORIES,
|
|
@@ -815,7 +816,7 @@ var SDK_RELEASE = {
|
|
|
815
816
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
816
817
|
// getters keep their established compatibility behavior.
|
|
817
818
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
818
|
-
version: "0.3.
|
|
819
|
+
version: "0.3.51",
|
|
819
820
|
updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
|
|
820
821
|
packageCapabilities: {
|
|
821
822
|
updatePreferences: 1
|
|
@@ -6806,122 +6807,6 @@ var DeeplineClient = class {
|
|
|
6806
6807
|
}
|
|
6807
6808
|
};
|
|
6808
6809
|
|
|
6809
|
-
// src/monitors.ts
|
|
6810
|
-
function defineMonitor(definition) {
|
|
6811
|
-
if (!definition || typeof definition !== "object") {
|
|
6812
|
-
throw new Error("defineMonitor(definition) requires a definition object.");
|
|
6813
|
-
}
|
|
6814
|
-
const key = typeof definition.key === "string" ? definition.key.trim() : "";
|
|
6815
|
-
if (!key) {
|
|
6816
|
-
throw new Error('defineMonitor(definition) requires a non-empty "key".');
|
|
6817
|
-
}
|
|
6818
|
-
const tool = typeof definition.tool === "string" ? definition.tool.trim() : "";
|
|
6819
|
-
if (!tool) {
|
|
6820
|
-
throw new Error(
|
|
6821
|
-
'defineMonitor(definition) requires a non-empty monitor tool id in "tool" (e.g. "deepline_native.company_radar").'
|
|
6822
|
-
);
|
|
6823
|
-
}
|
|
6824
|
-
if (!definition.payload || typeof definition.payload !== "object" || Array.isArray(definition.payload)) {
|
|
6825
|
-
throw new Error(
|
|
6826
|
-
'defineMonitor(definition) requires "payload" to be a JSON object.'
|
|
6827
|
-
);
|
|
6828
|
-
}
|
|
6829
|
-
if (definition.name !== void 0 && typeof definition.name !== "string") {
|
|
6830
|
-
throw new Error('defineMonitor(definition) "name" must be a string.');
|
|
6831
|
-
}
|
|
6832
|
-
if (definition.controls !== void 0 && (typeof definition.controls !== "object" || Array.isArray(definition.controls))) {
|
|
6833
|
-
throw new Error(
|
|
6834
|
-
'defineMonitor(definition) "controls" must be a JSON object.'
|
|
6835
|
-
);
|
|
6836
|
-
}
|
|
6837
|
-
return definition;
|
|
6838
|
-
}
|
|
6839
|
-
|
|
6840
|
-
// ../plays/bootstrap-routes.ts
|
|
6841
|
-
var DEEPLINE_TOOL_CATEGORIES = [
|
|
6842
|
-
"company_search",
|
|
6843
|
-
"people_search",
|
|
6844
|
-
"people_enrich",
|
|
6845
|
-
"email_finder",
|
|
6846
|
-
"email_verify",
|
|
6847
|
-
"phone_finder",
|
|
6848
|
-
"phone_verify",
|
|
6849
|
-
"identity_resolution",
|
|
6850
|
-
"reverse_lookup",
|
|
6851
|
-
"enrichment",
|
|
6852
|
-
"batch",
|
|
6853
|
-
"premium",
|
|
6854
|
-
"free"
|
|
6855
|
-
];
|
|
6856
|
-
var PLAY_BOOTSTRAP_TEMPLATES = [
|
|
6857
|
-
"people-list",
|
|
6858
|
-
"company-list",
|
|
6859
|
-
"people-email",
|
|
6860
|
-
"people-phone",
|
|
6861
|
-
"company-people",
|
|
6862
|
-
"company-people-email",
|
|
6863
|
-
"company-people-phone"
|
|
6864
|
-
];
|
|
6865
|
-
var PLAY_BOOTSTRAP_SOURCE_KINDS = [
|
|
6866
|
-
"csv",
|
|
6867
|
-
"play",
|
|
6868
|
-
"provider",
|
|
6869
|
-
"providers"
|
|
6870
|
-
];
|
|
6871
|
-
var PLAY_BOOTSTRAP_STAGE_KINDS = [
|
|
6872
|
-
"play",
|
|
6873
|
-
"provider",
|
|
6874
|
-
"providers"
|
|
6875
|
-
];
|
|
6876
|
-
var PLAY_BOOTSTRAP_FINDER_KINDS = [
|
|
6877
|
-
"email_finder",
|
|
6878
|
-
"phone_finder"
|
|
6879
|
-
];
|
|
6880
|
-
var PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY = "company_search";
|
|
6881
|
-
var PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY = "people_search";
|
|
6882
|
-
var PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER = {
|
|
6883
|
-
email_finder: "email_finder",
|
|
6884
|
-
phone_finder: "phone_finder"
|
|
6885
|
-
};
|
|
6886
|
-
var PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER = {
|
|
6887
|
-
email_finder: "email",
|
|
6888
|
-
phone_finder: "phone"
|
|
6889
|
-
};
|
|
6890
|
-
var PLAY_BOOTSTRAP_CONTACT_FIELDS = [
|
|
6891
|
-
"first_name",
|
|
6892
|
-
"last_name",
|
|
6893
|
-
"domain",
|
|
6894
|
-
"company_name",
|
|
6895
|
-
"linkedin_url",
|
|
6896
|
-
"title",
|
|
6897
|
-
"email",
|
|
6898
|
-
"phone"
|
|
6899
|
-
];
|
|
6900
|
-
var PLAY_BOOTSTRAP_COMPANY_FIELDS = [
|
|
6901
|
-
"domain",
|
|
6902
|
-
"company_domain",
|
|
6903
|
-
"company_name",
|
|
6904
|
-
"linkedin_url",
|
|
6905
|
-
"website"
|
|
6906
|
-
];
|
|
6907
|
-
function isPlayBootstrapFinderKind(value) {
|
|
6908
|
-
return PLAY_BOOTSTRAP_FINDER_KINDS.includes(value);
|
|
6909
|
-
}
|
|
6910
|
-
function isPlayBootstrapTemplate(value) {
|
|
6911
|
-
return PLAY_BOOTSTRAP_TEMPLATES.includes(value);
|
|
6912
|
-
}
|
|
6913
|
-
function formatPlayBootstrapFinderKinds() {
|
|
6914
|
-
return PLAY_BOOTSTRAP_FINDER_KINDS.join("|");
|
|
6915
|
-
}
|
|
6916
|
-
function formatPlayBootstrapTemplates() {
|
|
6917
|
-
return PLAY_BOOTSTRAP_TEMPLATES.join("|");
|
|
6918
|
-
}
|
|
6919
|
-
function formatPlayBootstrapFinderKindsForSentence() {
|
|
6920
|
-
const allButLast = PLAY_BOOTSTRAP_FINDER_KINDS.slice(0, -1);
|
|
6921
|
-
const last = PLAY_BOOTSTRAP_FINDER_KINDS.at(-1);
|
|
6922
|
-
return `${allButLast.join(", ")} or ${last}`;
|
|
6923
|
-
}
|
|
6924
|
-
|
|
6925
6810
|
// ../plays/email-status.ts
|
|
6926
6811
|
function normalizeKey(value) {
|
|
6927
6812
|
if (value == null) return null;
|
|
@@ -8378,6 +8263,1402 @@ function replaceAtPath(root, path, replacement) {
|
|
|
8378
8263
|
return replace(root, 0);
|
|
8379
8264
|
}
|
|
8380
8265
|
|
|
8266
|
+
// ../plays/authoring-contract.ts
|
|
8267
|
+
var import_typebox = require("@sinclair/typebox");
|
|
8268
|
+
var import_value = require("@sinclair/typebox/value");
|
|
8269
|
+
var PLAY_SQL_LISTENER_WHERE_OPERATORS = [
|
|
8270
|
+
"eq",
|
|
8271
|
+
"neq",
|
|
8272
|
+
"in",
|
|
8273
|
+
"notIn",
|
|
8274
|
+
"isNull",
|
|
8275
|
+
"isNotNull",
|
|
8276
|
+
"ilike"
|
|
8277
|
+
];
|
|
8278
|
+
var PLAY_SQL_LISTENER_ID_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*$/;
|
|
8279
|
+
var PLAY_SQL_LISTENER_TOOL_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*\.[a-zA-Z][a-zA-Z0-9_-]*$/;
|
|
8280
|
+
var PLAY_SQL_LISTENER_WHERE_OPERATOR_SET = new Set(
|
|
8281
|
+
PLAY_SQL_LISTENER_WHERE_OPERATORS
|
|
8282
|
+
);
|
|
8283
|
+
var CtxFetchHttpError = class extends Error {
|
|
8284
|
+
/** Build the error from the durable response record. */
|
|
8285
|
+
constructor(response) {
|
|
8286
|
+
const body = response.bodyText || "empty response body";
|
|
8287
|
+
super(
|
|
8288
|
+
`ctx.fetch(${response.url}) returned HTTP ${response.status}${response.statusText ? ` ${response.statusText}` : ""}: ${body}`
|
|
8289
|
+
);
|
|
8290
|
+
this.response = response;
|
|
8291
|
+
this.name = "CtxFetchHttpError";
|
|
8292
|
+
this.status = response.status;
|
|
8293
|
+
this.statusText = response.statusText;
|
|
8294
|
+
this.url = response.url;
|
|
8295
|
+
this.headers = response.headers;
|
|
8296
|
+
this.bodyText = response.bodyText;
|
|
8297
|
+
this.json = response.json;
|
|
8298
|
+
}
|
|
8299
|
+
/**
|
|
8300
|
+
* Play source and the runtime are separately bundled. Recognize the stable
|
|
8301
|
+
* public error code so `instanceof` works across that boundary as well.
|
|
8302
|
+
*/
|
|
8303
|
+
static [Symbol.hasInstance](value) {
|
|
8304
|
+
return value !== null && typeof value === "object" && value.code === "CTX_FETCH_HTTP_ERROR";
|
|
8305
|
+
}
|
|
8306
|
+
/** Stable machine-readable HTTP-failure code. */
|
|
8307
|
+
code = "CTX_FETCH_HTTP_ERROR";
|
|
8308
|
+
/** Upstream HTTP status. */
|
|
8309
|
+
status;
|
|
8310
|
+
/** Upstream HTTP status text. */
|
|
8311
|
+
statusText;
|
|
8312
|
+
/** Final response URL after redirects. */
|
|
8313
|
+
url;
|
|
8314
|
+
/** Secret-redacted response headers. */
|
|
8315
|
+
headers;
|
|
8316
|
+
/** Complete secret-redacted response body. */
|
|
8317
|
+
bodyText;
|
|
8318
|
+
/** Eagerly parsed secret-redacted JSON, or null. */
|
|
8319
|
+
json;
|
|
8320
|
+
};
|
|
8321
|
+
var PLAY_AUTHORING_DOCUMENTATION = {
|
|
8322
|
+
fetchBatching: {
|
|
8323
|
+
warning: "A static ctx.fetch key inside a loop is a warning because every iteration must still have distinct method, URL, body, or safe headers. One durable receipt must never stand in for every request.",
|
|
8324
|
+
guidance: "Keep the static fetch label. For a mutating batch, make the body distinct and use a replay-stable external Idempotency-Key such as `${ctx.run.id}:signals:${batchIndex}`."
|
|
8325
|
+
},
|
|
8326
|
+
runId: {
|
|
8327
|
+
semantics: "ctx.run.id is stable while Deepline retries or resumes one durable run. A separately submitted run receives a new id.",
|
|
8328
|
+
use: "Use it when deriving an external idempotency key for a sequence of batches."
|
|
8329
|
+
},
|
|
8330
|
+
staticCallKeys: {
|
|
8331
|
+
constraint: "Durable call keys \u2014 the ctx.fetch key, the ctx.dataset key, the ctx.step id \u2014 must be static string literals. The key names a durable receipt, so check, publish, and replay have to agree on it before the body runs. A key computed at runtime cannot be resolved at check time and is rejected.",
|
|
8332
|
+
consequence: "This is an architectural constraint, not a style rule. A play cannot loop over a computed key, so it cannot page a large table with a helper like page(pageNumber). Unrolling one literal key per page is not a design at any real page count.",
|
|
8333
|
+
workaround: "Push the aggregation server-side and call it once: a SQL function, a view, or a provider endpoint that returns the whole result. Keep unrolled literal keys only for a handful of genuinely distinct calls. To fan out over rows, use ctx.dataset with a static key \u2014 the per-row receipt identity comes from the row, not from the key."
|
|
8334
|
+
}
|
|
8335
|
+
};
|
|
8336
|
+
var PLAY_AUTHORING_STATIC_FETCH_KEY_HINT = `${PLAY_AUTHORING_DOCUMENTATION.staticCallKeys.workaround} Do not compute the key.`;
|
|
8337
|
+
var SecretEnvironmentNameSchema = import_typebox.Type.String({
|
|
8338
|
+
pattern: "^[A-Z][A-Z0-9_]{1,63}$",
|
|
8339
|
+
description: "An uppercase environment variable name beginning with a letter."
|
|
8340
|
+
});
|
|
8341
|
+
var SqlListenerFilterScalarSchema = import_typebox.Type.Union([
|
|
8342
|
+
import_typebox.Type.String(),
|
|
8343
|
+
import_typebox.Type.Number(),
|
|
8344
|
+
import_typebox.Type.Boolean(),
|
|
8345
|
+
import_typebox.Type.Null()
|
|
8346
|
+
]);
|
|
8347
|
+
var PLAY_AUTHORING_FIELD_REGISTRY = {
|
|
8348
|
+
description: {
|
|
8349
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
8350
|
+
fixtures: {
|
|
8351
|
+
valid: "Enrich a company.",
|
|
8352
|
+
invalid: "",
|
|
8353
|
+
absent: void 0,
|
|
8354
|
+
unresolved: { expression: "description" },
|
|
8355
|
+
edition1: "Legacy play."
|
|
8356
|
+
},
|
|
8357
|
+
referenceType: "string",
|
|
8358
|
+
required: false,
|
|
8359
|
+
resolution: "static-required",
|
|
8360
|
+
issueCode: "play_authoring_binding_invalid",
|
|
8361
|
+
description: "Optional non-empty human-readable summary of the Play.",
|
|
8362
|
+
errorMessage: "description must be a non-empty static string."
|
|
8363
|
+
},
|
|
8364
|
+
"compatibility.toolErrorSchemaVersion": {
|
|
8365
|
+
schema: import_typebox.Type.Union([import_typebox.Type.Literal(0), import_typebox.Type.Literal(1)]),
|
|
8366
|
+
fixtures: {
|
|
8367
|
+
valid: 1,
|
|
8368
|
+
invalid: 2,
|
|
8369
|
+
absent: void 0,
|
|
8370
|
+
unresolved: { expression: "version" },
|
|
8371
|
+
edition1: 0
|
|
8372
|
+
},
|
|
8373
|
+
referenceType: "0 | 1",
|
|
8374
|
+
required: false,
|
|
8375
|
+
resolution: "static-required",
|
|
8376
|
+
issueCode: "play_authoring_binding_invalid",
|
|
8377
|
+
description: "Artifact-pinned tool error behavior, either 0 or 1.",
|
|
8378
|
+
errorMessage: "compatibility.toolErrorSchemaVersion must be the static literal 0 or 1."
|
|
8379
|
+
},
|
|
8380
|
+
"compatibility.toolResponseReceiptRevision": {
|
|
8381
|
+
schema: import_typebox.Type.String({
|
|
8382
|
+
minLength: 1,
|
|
8383
|
+
maxLength: 64,
|
|
8384
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
|
|
8385
|
+
}),
|
|
8386
|
+
fixtures: {
|
|
8387
|
+
valid: "raw-v2-receipt-v1",
|
|
8388
|
+
invalid: "has spaces",
|
|
8389
|
+
absent: void 0,
|
|
8390
|
+
unresolved: { expression: "revision" },
|
|
8391
|
+
edition1: void 0
|
|
8392
|
+
},
|
|
8393
|
+
referenceType: "string",
|
|
8394
|
+
required: false,
|
|
8395
|
+
resolution: "static-required",
|
|
8396
|
+
issueCode: "play_authoring_binding_invalid",
|
|
8397
|
+
description: "Explicit durable-receipt revision for a response transformation; bump only when serialized tool output changes.",
|
|
8398
|
+
errorMessage: "compatibility.toolResponseReceiptRevision must be a non-empty static identifier using letters, numbers, dots, underscores, or hyphens."
|
|
8399
|
+
},
|
|
8400
|
+
inline: {
|
|
8401
|
+
schema: import_typebox.Type.Boolean(),
|
|
8402
|
+
fixtures: {
|
|
8403
|
+
valid: true,
|
|
8404
|
+
invalid: "true",
|
|
8405
|
+
absent: void 0,
|
|
8406
|
+
unresolved: { expression: "inline" },
|
|
8407
|
+
edition1: false
|
|
8408
|
+
},
|
|
8409
|
+
referenceType: "boolean",
|
|
8410
|
+
required: false,
|
|
8411
|
+
resolution: "static-required",
|
|
8412
|
+
issueCode: "play_authoring_binding_invalid",
|
|
8413
|
+
description: "Compiler hint for an inline named Play handler.",
|
|
8414
|
+
errorMessage: "inline must be a static boolean."
|
|
8415
|
+
},
|
|
8416
|
+
"billing.maxCreditsPerRun": {
|
|
8417
|
+
schema: import_typebox.Type.Number({ exclusiveMinimum: 0 }),
|
|
8418
|
+
fixtures: {
|
|
8419
|
+
valid: 1,
|
|
8420
|
+
invalid: 0,
|
|
8421
|
+
absent: void 0,
|
|
8422
|
+
unresolved: { expression: "cap" },
|
|
8423
|
+
edition1: 1
|
|
8424
|
+
},
|
|
8425
|
+
referenceType: "number",
|
|
8426
|
+
required: false,
|
|
8427
|
+
resolution: "static-required",
|
|
8428
|
+
issueCode: "play_authoring_billing_limit_invalid",
|
|
8429
|
+
description: "Maximum Deepline credits permitted for one Play Run.",
|
|
8430
|
+
errorMessage: "billing.maxCreditsPerRun must be a static number greater than 0. Remove it for no run cap."
|
|
8431
|
+
},
|
|
8432
|
+
"bindings.webhook.hmac.secretEnv": {
|
|
8433
|
+
schema: SecretEnvironmentNameSchema,
|
|
8434
|
+
fixtures: {
|
|
8435
|
+
valid: "WEBHOOK_SECRET",
|
|
8436
|
+
invalid: "webhook_secret",
|
|
8437
|
+
absent: void 0,
|
|
8438
|
+
unresolved: { expression: "secretEnv" },
|
|
8439
|
+
edition1: "WEBHOOK_SECRET"
|
|
8440
|
+
},
|
|
8441
|
+
referenceType: "string",
|
|
8442
|
+
required: true,
|
|
8443
|
+
resolution: "static-required",
|
|
8444
|
+
issueCode: "play_authoring_webhook_hmac_invalid",
|
|
8445
|
+
description: "Environment variable containing the webhook HMAC secret.",
|
|
8446
|
+
errorMessage: "bindings.webhook.hmac.secretEnv must be an uppercase environment variable name beginning with a letter."
|
|
8447
|
+
},
|
|
8448
|
+
"bindings.webhook.hmac.algorithm": {
|
|
8449
|
+
schema: import_typebox.Type.Literal("sha256"),
|
|
8450
|
+
fixtures: {
|
|
8451
|
+
valid: "sha256",
|
|
8452
|
+
invalid: "sha1",
|
|
8453
|
+
absent: void 0,
|
|
8454
|
+
unresolved: { expression: "algorithm" },
|
|
8455
|
+
edition1: "sha256"
|
|
8456
|
+
},
|
|
8457
|
+
referenceType: "'sha256'",
|
|
8458
|
+
required: false,
|
|
8459
|
+
resolution: "static-required",
|
|
8460
|
+
issueCode: "play_authoring_webhook_hmac_invalid",
|
|
8461
|
+
description: "Webhook signature hash algorithm. Only sha256 is supported.",
|
|
8462
|
+
errorMessage: 'bindings.webhook.hmac.algorithm must be the static literal "sha256".'
|
|
8463
|
+
},
|
|
8464
|
+
"bindings.webhook.hmac.header": {
|
|
8465
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
8466
|
+
fixtures: {
|
|
8467
|
+
valid: "x-signature",
|
|
8468
|
+
invalid: "",
|
|
8469
|
+
absent: void 0,
|
|
8470
|
+
unresolved: { expression: "header" },
|
|
8471
|
+
edition1: "x-signature"
|
|
8472
|
+
},
|
|
8473
|
+
referenceType: "string",
|
|
8474
|
+
required: false,
|
|
8475
|
+
resolution: "static-required",
|
|
8476
|
+
issueCode: "play_authoring_webhook_hmac_invalid",
|
|
8477
|
+
description: "HTTP header containing the webhook signature.",
|
|
8478
|
+
errorMessage: "bindings.webhook.hmac.header must be a non-empty static string."
|
|
8479
|
+
},
|
|
8480
|
+
"bindings.webhook.auth.type": {
|
|
8481
|
+
schema: import_typebox.Type.Literal("standard-webhooks"),
|
|
8482
|
+
fixtures: {
|
|
8483
|
+
valid: "standard-webhooks",
|
|
8484
|
+
invalid: "svix",
|
|
8485
|
+
absent: void 0,
|
|
8486
|
+
unresolved: { expression: "type" },
|
|
8487
|
+
edition1: void 0
|
|
8488
|
+
},
|
|
8489
|
+
referenceType: "'standard-webhooks'",
|
|
8490
|
+
// auth itself is optional; once present, the AST adapter requires this
|
|
8491
|
+
// field together with headerFamily and signingSecrets.
|
|
8492
|
+
required: false,
|
|
8493
|
+
resolution: "static-required",
|
|
8494
|
+
issueCode: "play_authoring_standard_webhooks_invalid",
|
|
8495
|
+
description: "Uses the Standard Webhooks v1 symmetric signing scheme.",
|
|
8496
|
+
errorMessage: 'bindings.webhook.auth.type must be the static literal "standard-webhooks".'
|
|
8497
|
+
},
|
|
8498
|
+
"bindings.webhook.auth.headerFamily": {
|
|
8499
|
+
schema: import_typebox.Type.Union([import_typebox.Type.Literal("standard"), import_typebox.Type.Literal("svix")]),
|
|
8500
|
+
fixtures: {
|
|
8501
|
+
valid: "svix",
|
|
8502
|
+
invalid: "webhook",
|
|
8503
|
+
absent: void 0,
|
|
8504
|
+
unresolved: { expression: "headerFamily" },
|
|
8505
|
+
edition1: void 0
|
|
8506
|
+
},
|
|
8507
|
+
referenceType: "'standard' | 'svix'",
|
|
8508
|
+
// auth itself is optional; once present, the AST adapter requires this
|
|
8509
|
+
// field together with type and signingSecrets.
|
|
8510
|
+
required: false,
|
|
8511
|
+
resolution: "static-required",
|
|
8512
|
+
issueCode: "play_authoring_standard_webhooks_invalid",
|
|
8513
|
+
description: "Header namespace expected from the webhook provider.",
|
|
8514
|
+
errorMessage: 'bindings.webhook.auth.headerFamily must be the static literal "standard" or "svix".'
|
|
8515
|
+
},
|
|
8516
|
+
"bindings.webhook.auth.signingSecrets[]": {
|
|
8517
|
+
schema: SecretEnvironmentNameSchema,
|
|
8518
|
+
fixtures: {
|
|
8519
|
+
valid: "VECTOR_WEBHOOK_SECRET",
|
|
8520
|
+
invalid: "vector_webhook_secret",
|
|
8521
|
+
absent: void 0,
|
|
8522
|
+
unresolved: { expression: "secret" },
|
|
8523
|
+
edition1: void 0
|
|
8524
|
+
},
|
|
8525
|
+
referenceType: "string",
|
|
8526
|
+
// auth itself is optional; once present, the AST adapter requires this
|
|
8527
|
+
// field together with type and headerFamily.
|
|
8528
|
+
required: false,
|
|
8529
|
+
resolution: "static-required",
|
|
8530
|
+
issueCode: "play_authoring_standard_webhooks_invalid",
|
|
8531
|
+
description: "Deepline Secret name used to verify Standard Webhooks.",
|
|
8532
|
+
errorMessage: "bindings.webhook.auth.signingSecrets entries must be uppercase Deepline Secret names beginning with a letter."
|
|
8533
|
+
},
|
|
8534
|
+
"bindings.webhook.auth.toleranceSeconds": {
|
|
8535
|
+
schema: import_typebox.Type.Integer({ minimum: 1, maximum: 3600 }),
|
|
8536
|
+
fixtures: {
|
|
8537
|
+
valid: 300,
|
|
8538
|
+
invalid: 0,
|
|
8539
|
+
absent: void 0,
|
|
8540
|
+
unresolved: { expression: "toleranceSeconds" },
|
|
8541
|
+
edition1: void 0
|
|
8542
|
+
},
|
|
8543
|
+
referenceType: "number",
|
|
8544
|
+
required: false,
|
|
8545
|
+
resolution: "static-required",
|
|
8546
|
+
issueCode: "play_authoring_standard_webhooks_invalid",
|
|
8547
|
+
description: "Accepted delivery timestamp skew in seconds, from 1 through 3600.",
|
|
8548
|
+
errorMessage: "bindings.webhook.auth.toleranceSeconds must be a static whole number from 1 through 3600."
|
|
8549
|
+
},
|
|
8550
|
+
"bindings.cron.schedule": {
|
|
8551
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
8552
|
+
fixtures: {
|
|
8553
|
+
valid: "0 9 * * *",
|
|
8554
|
+
invalid: "",
|
|
8555
|
+
absent: void 0,
|
|
8556
|
+
unresolved: { expression: "schedule" },
|
|
8557
|
+
edition1: "0 9 * * *"
|
|
8558
|
+
},
|
|
8559
|
+
referenceType: "string",
|
|
8560
|
+
required: true,
|
|
8561
|
+
resolution: "static-required",
|
|
8562
|
+
issueCode: "play_authoring_binding_invalid",
|
|
8563
|
+
description: "Five-field cron expression.",
|
|
8564
|
+
errorMessage: "bindings.cron.schedule must be a non-empty static string."
|
|
8565
|
+
},
|
|
8566
|
+
"bindings.cron.timezone": {
|
|
8567
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
8568
|
+
fixtures: {
|
|
8569
|
+
valid: "UTC",
|
|
8570
|
+
invalid: "",
|
|
8571
|
+
absent: void 0,
|
|
8572
|
+
unresolved: { expression: "timezone" },
|
|
8573
|
+
edition1: "UTC"
|
|
8574
|
+
},
|
|
8575
|
+
referenceType: "string",
|
|
8576
|
+
required: false,
|
|
8577
|
+
resolution: "static-required",
|
|
8578
|
+
issueCode: "play_authoring_cron_timezone_invalid",
|
|
8579
|
+
description: "IANA timezone. Omitted means UTC.",
|
|
8580
|
+
errorMessage: "bindings.cron.timezone must be a valid non-empty IANA timezone string."
|
|
8581
|
+
},
|
|
8582
|
+
"bindings.sqlListeners": {
|
|
8583
|
+
schema: import_typebox.Type.Array(import_typebox.Type.Object({}, { additionalProperties: true })),
|
|
8584
|
+
fixtures: {
|
|
8585
|
+
valid: [],
|
|
8586
|
+
invalid: "listeners",
|
|
8587
|
+
absent: void 0,
|
|
8588
|
+
unresolved: { expression: "listeners" },
|
|
8589
|
+
edition1: []
|
|
8590
|
+
},
|
|
8591
|
+
referenceType: "SqlListener[]",
|
|
8592
|
+
required: false,
|
|
8593
|
+
resolution: "static-required",
|
|
8594
|
+
issueCode: "play_authoring_binding_invalid",
|
|
8595
|
+
description: "Static provider-monitor listener declarations.",
|
|
8596
|
+
errorMessage: "bindings.sqlListeners must be a static array of objects."
|
|
8597
|
+
},
|
|
8598
|
+
"bindings.sqlListeners[].id": {
|
|
8599
|
+
schema: import_typebox.Type.String({ pattern: PLAY_SQL_LISTENER_ID_PATTERN.source }),
|
|
8600
|
+
fixtures: {
|
|
8601
|
+
valid: "job-openings",
|
|
8602
|
+
invalid: "1-job-openings",
|
|
8603
|
+
absent: void 0,
|
|
8604
|
+
unresolved: { expression: "listenerId" },
|
|
8605
|
+
edition1: "job-openings"
|
|
8606
|
+
},
|
|
8607
|
+
referenceType: "string",
|
|
8608
|
+
required: true,
|
|
8609
|
+
resolution: "static-required",
|
|
8610
|
+
issueCode: "sql_listener_binding_shape",
|
|
8611
|
+
description: "Unique static listener identifier within one Play.",
|
|
8612
|
+
errorMessage: "bindings.sqlListeners[].id must begin with a letter and contain only letters, numbers, underscores, or hyphens."
|
|
8613
|
+
},
|
|
8614
|
+
"bindings.sqlListeners[].tool": {
|
|
8615
|
+
schema: import_typebox.Type.String({ pattern: PLAY_SQL_LISTENER_TOOL_PATTERN.source }),
|
|
8616
|
+
fixtures: {
|
|
8617
|
+
valid: "deepline_native.company_radar",
|
|
8618
|
+
invalid: "company_radar",
|
|
8619
|
+
absent: void 0,
|
|
8620
|
+
unresolved: { expression: "toolId" },
|
|
8621
|
+
edition1: "deepline_native.company_radar"
|
|
8622
|
+
},
|
|
8623
|
+
referenceType: "string",
|
|
8624
|
+
required: true,
|
|
8625
|
+
resolution: "static-required",
|
|
8626
|
+
issueCode: "sql_listener_binding_shape",
|
|
8627
|
+
description: "Modeled provider monitor tool id in provider.tool form.",
|
|
8628
|
+
errorMessage: "bindings.sqlListeners[].tool must use static provider.tool syntax."
|
|
8629
|
+
},
|
|
8630
|
+
"bindings.sqlListeners[].stream": {
|
|
8631
|
+
schema: import_typebox.Type.String({ pattern: PLAY_SQL_LISTENER_ID_PATTERN.source }),
|
|
8632
|
+
fixtures: {
|
|
8633
|
+
valid: "company_job_openings",
|
|
8634
|
+
invalid: "1-company-job-openings",
|
|
8635
|
+
absent: void 0,
|
|
8636
|
+
unresolved: { expression: "stream" },
|
|
8637
|
+
edition1: "company_job_openings"
|
|
8638
|
+
},
|
|
8639
|
+
referenceType: "string",
|
|
8640
|
+
required: true,
|
|
8641
|
+
resolution: "static-required",
|
|
8642
|
+
issueCode: "sql_listener_binding_shape",
|
|
8643
|
+
description: "Static output stream key exposed by the monitor tool.",
|
|
8644
|
+
errorMessage: "bindings.sqlListeners[].stream must be a static stream identifier."
|
|
8645
|
+
},
|
|
8646
|
+
"bindings.sqlListeners[].operations[]": {
|
|
8647
|
+
schema: import_typebox.Type.Union([
|
|
8648
|
+
import_typebox.Type.Literal("INSERT"),
|
|
8649
|
+
import_typebox.Type.Literal("UPDATE"),
|
|
8650
|
+
import_typebox.Type.Literal("DELETE")
|
|
8651
|
+
]),
|
|
8652
|
+
fixtures: {
|
|
8653
|
+
valid: "INSERT",
|
|
8654
|
+
invalid: "UPSERT",
|
|
8655
|
+
absent: void 0,
|
|
8656
|
+
unresolved: { expression: "operation" },
|
|
8657
|
+
edition1: "UPDATE"
|
|
8658
|
+
},
|
|
8659
|
+
referenceType: "'INSERT' | 'UPDATE' | 'DELETE'",
|
|
8660
|
+
required: false,
|
|
8661
|
+
resolution: "static-required",
|
|
8662
|
+
issueCode: "sql_listener_binding_shape",
|
|
8663
|
+
description: "Database operation that wakes the listener.",
|
|
8664
|
+
errorMessage: "bindings.sqlListeners[].operations entries must be INSERT, UPDATE, or DELETE."
|
|
8665
|
+
},
|
|
8666
|
+
"bindings.sqlListeners[].where.before": {
|
|
8667
|
+
schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
|
|
8668
|
+
fixtures: {
|
|
8669
|
+
valid: { status: { eq: "open" } },
|
|
8670
|
+
invalid: "status=open",
|
|
8671
|
+
absent: void 0,
|
|
8672
|
+
unresolved: "beforeFilter",
|
|
8673
|
+
edition1: { status: { eq: "open" } }
|
|
8674
|
+
},
|
|
8675
|
+
referenceType: "Record<string, SqlListenerFilterOperator>",
|
|
8676
|
+
required: false,
|
|
8677
|
+
resolution: "static-required",
|
|
8678
|
+
issueCode: "sql_listener_binding_shape",
|
|
8679
|
+
description: "Column filters evaluated against the row before mutation.",
|
|
8680
|
+
errorMessage: "bindings.sqlListeners[].where.before must be a static object keyed by column."
|
|
8681
|
+
},
|
|
8682
|
+
"bindings.sqlListeners[].where.after": {
|
|
8683
|
+
schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
|
|
8684
|
+
fixtures: {
|
|
8685
|
+
valid: { status: { eq: "open" } },
|
|
8686
|
+
invalid: "status=open",
|
|
8687
|
+
absent: void 0,
|
|
8688
|
+
unresolved: "afterFilter",
|
|
8689
|
+
edition1: { status: { eq: "open" } }
|
|
8690
|
+
},
|
|
8691
|
+
referenceType: "Record<string, SqlListenerFilterOperator>",
|
|
8692
|
+
required: false,
|
|
8693
|
+
resolution: "static-required",
|
|
8694
|
+
issueCode: "sql_listener_binding_shape",
|
|
8695
|
+
description: "Column filters evaluated against the row after mutation.",
|
|
8696
|
+
errorMessage: "bindings.sqlListeners[].where.after must be a static object keyed by column."
|
|
8697
|
+
},
|
|
8698
|
+
"bindings.sqlListeners[].where.*.*.eq": {
|
|
8699
|
+
schema: SqlListenerFilterScalarSchema,
|
|
8700
|
+
fixtures: {
|
|
8701
|
+
valid: "open",
|
|
8702
|
+
invalid: { nested: true },
|
|
8703
|
+
absent: void 0,
|
|
8704
|
+
unresolved: { expression: "equalsValue" },
|
|
8705
|
+
edition1: "open"
|
|
8706
|
+
},
|
|
8707
|
+
referenceType: "SqlListenerFilterScalar",
|
|
8708
|
+
required: false,
|
|
8709
|
+
resolution: "static-required",
|
|
8710
|
+
issueCode: "sql_listener_binding_shape",
|
|
8711
|
+
description: "Scalar equality condition.",
|
|
8712
|
+
errorMessage: "SQL listener eq must compare a scalar value."
|
|
8713
|
+
},
|
|
8714
|
+
"bindings.sqlListeners[].where.*.*.neq": {
|
|
8715
|
+
schema: SqlListenerFilterScalarSchema,
|
|
8716
|
+
fixtures: {
|
|
8717
|
+
valid: "closed",
|
|
8718
|
+
invalid: { nested: true },
|
|
8719
|
+
absent: void 0,
|
|
8720
|
+
unresolved: { expression: "notEqualsValue" },
|
|
8721
|
+
edition1: "closed"
|
|
8722
|
+
},
|
|
8723
|
+
referenceType: "SqlListenerFilterScalar",
|
|
8724
|
+
required: false,
|
|
8725
|
+
resolution: "static-required",
|
|
8726
|
+
issueCode: "sql_listener_binding_shape",
|
|
8727
|
+
description: "Scalar inequality condition.",
|
|
8728
|
+
errorMessage: "SQL listener neq must compare a scalar value."
|
|
8729
|
+
},
|
|
8730
|
+
"bindings.sqlListeners[].where.*.*.in": {
|
|
8731
|
+
schema: import_typebox.Type.Array(SqlListenerFilterScalarSchema, { minItems: 1 }),
|
|
8732
|
+
fixtures: {
|
|
8733
|
+
valid: ["open", "pending"],
|
|
8734
|
+
invalid: [],
|
|
8735
|
+
absent: void 0,
|
|
8736
|
+
unresolved: { expression: "acceptedValues" },
|
|
8737
|
+
edition1: ["open"]
|
|
8738
|
+
},
|
|
8739
|
+
referenceType: "readonly SqlListenerFilterScalar[]",
|
|
8740
|
+
required: false,
|
|
8741
|
+
resolution: "static-required",
|
|
8742
|
+
issueCode: "sql_listener_binding_shape",
|
|
8743
|
+
description: "Non-empty scalar membership condition.",
|
|
8744
|
+
errorMessage: "SQL listener in must contain at least one scalar value."
|
|
8745
|
+
},
|
|
8746
|
+
"bindings.sqlListeners[].where.*.*.notIn": {
|
|
8747
|
+
schema: import_typebox.Type.Array(SqlListenerFilterScalarSchema, { minItems: 1 }),
|
|
8748
|
+
fixtures: {
|
|
8749
|
+
valid: ["closed"],
|
|
8750
|
+
invalid: [],
|
|
8751
|
+
absent: void 0,
|
|
8752
|
+
unresolved: { expression: "rejectedValues" },
|
|
8753
|
+
edition1: ["closed"]
|
|
8754
|
+
},
|
|
8755
|
+
referenceType: "readonly SqlListenerFilterScalar[]",
|
|
8756
|
+
required: false,
|
|
8757
|
+
resolution: "static-required",
|
|
8758
|
+
issueCode: "sql_listener_binding_shape",
|
|
8759
|
+
description: "Non-empty scalar exclusion condition.",
|
|
8760
|
+
errorMessage: "SQL listener notIn must contain at least one scalar value."
|
|
8761
|
+
},
|
|
8762
|
+
"bindings.sqlListeners[].where.*.*.isNull": {
|
|
8763
|
+
schema: import_typebox.Type.Literal(true),
|
|
8764
|
+
fixtures: {
|
|
8765
|
+
valid: true,
|
|
8766
|
+
invalid: false,
|
|
8767
|
+
absent: void 0,
|
|
8768
|
+
unresolved: { expression: "isNull" },
|
|
8769
|
+
edition1: true
|
|
8770
|
+
},
|
|
8771
|
+
referenceType: "true",
|
|
8772
|
+
required: false,
|
|
8773
|
+
resolution: "static-required",
|
|
8774
|
+
issueCode: "sql_listener_binding_shape",
|
|
8775
|
+
description: "Matches null values when set to true.",
|
|
8776
|
+
errorMessage: "SQL listener isNull must be the static literal true."
|
|
8777
|
+
},
|
|
8778
|
+
"bindings.sqlListeners[].where.*.*.isNotNull": {
|
|
8779
|
+
schema: import_typebox.Type.Literal(true),
|
|
8780
|
+
fixtures: {
|
|
8781
|
+
valid: true,
|
|
8782
|
+
invalid: false,
|
|
8783
|
+
absent: void 0,
|
|
8784
|
+
unresolved: { expression: "isNotNull" },
|
|
8785
|
+
edition1: true
|
|
8786
|
+
},
|
|
8787
|
+
referenceType: "true",
|
|
8788
|
+
required: false,
|
|
8789
|
+
resolution: "static-required",
|
|
8790
|
+
issueCode: "sql_listener_binding_shape",
|
|
8791
|
+
description: "Matches non-null values when set to true.",
|
|
8792
|
+
errorMessage: "SQL listener isNotNull must be the static literal true."
|
|
8793
|
+
},
|
|
8794
|
+
"bindings.sqlListeners[].where.*.*.ilike": {
|
|
8795
|
+
schema: import_typebox.Type.String(),
|
|
8796
|
+
fixtures: {
|
|
8797
|
+
valid: "%software%",
|
|
8798
|
+
invalid: 1,
|
|
8799
|
+
absent: void 0,
|
|
8800
|
+
unresolved: { expression: "pattern" },
|
|
8801
|
+
edition1: "%software%"
|
|
8802
|
+
},
|
|
8803
|
+
referenceType: "string",
|
|
8804
|
+
required: false,
|
|
8805
|
+
resolution: "static-required",
|
|
8806
|
+
issueCode: "sql_listener_binding_shape",
|
|
8807
|
+
description: "Case-insensitive SQL pattern condition.",
|
|
8808
|
+
errorMessage: "SQL listener ilike must be a string pattern."
|
|
8809
|
+
},
|
|
8810
|
+
"bindings.secrets[]": {
|
|
8811
|
+
schema: SecretEnvironmentNameSchema,
|
|
8812
|
+
fixtures: {
|
|
8813
|
+
valid: "API_TOKEN",
|
|
8814
|
+
invalid: "api_token",
|
|
8815
|
+
absent: void 0,
|
|
8816
|
+
unresolved: { expression: "secret" },
|
|
8817
|
+
edition1: "API_TOKEN"
|
|
8818
|
+
},
|
|
8819
|
+
referenceType: "string",
|
|
8820
|
+
required: false,
|
|
8821
|
+
resolution: "static-required",
|
|
8822
|
+
issueCode: "play_authoring_secret_invalid",
|
|
8823
|
+
description: "Environment variable made available to the Play.",
|
|
8824
|
+
errorMessage: "bindings.secrets entries must be uppercase environment variable names beginning with a letter."
|
|
8825
|
+
},
|
|
8826
|
+
"ctx.tools.execute.staleAfterSeconds": {
|
|
8827
|
+
schema: import_typebox.Type.Union([import_typebox.Type.Null(), import_typebox.Type.Integer({ minimum: 0 })]),
|
|
8828
|
+
fixtures: {
|
|
8829
|
+
valid: 0,
|
|
8830
|
+
invalid: -1,
|
|
8831
|
+
absent: void 0,
|
|
8832
|
+
unresolved: { expression: "ttl" },
|
|
8833
|
+
edition1: null
|
|
8834
|
+
},
|
|
8835
|
+
referenceType: "number | null",
|
|
8836
|
+
required: false,
|
|
8837
|
+
resolution: "runtime-allowed",
|
|
8838
|
+
issueCode: "play_authoring_durable_policy_invalid",
|
|
8839
|
+
description: "`0` always executes; `null`/omitted never expires; a positive integer is a TTL in seconds.",
|
|
8840
|
+
errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."
|
|
8841
|
+
},
|
|
8842
|
+
"ctx.tools.execute.id": {
|
|
8843
|
+
schema: import_typebox.Type.String({ pattern: "\\S" }),
|
|
8844
|
+
fixtures: {
|
|
8845
|
+
valid: "company-enrichment",
|
|
8846
|
+
invalid: "",
|
|
8847
|
+
absent: void 0,
|
|
8848
|
+
unresolved: { expression: "receiptId" },
|
|
8849
|
+
edition1: "company-enrichment"
|
|
8850
|
+
},
|
|
8851
|
+
referenceType: "string",
|
|
8852
|
+
required: true,
|
|
8853
|
+
resolution: "runtime-allowed",
|
|
8854
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
8855
|
+
description: "Stable durable receipt identity within one execution scope.",
|
|
8856
|
+
errorMessage: "ctx.tools.execute id must be a non-empty string."
|
|
8857
|
+
},
|
|
8858
|
+
"ctx.tools.execute.tool": {
|
|
8859
|
+
schema: import_typebox.Type.String({ pattern: "\\S" }),
|
|
8860
|
+
fixtures: {
|
|
8861
|
+
valid: "openmart_enrich_company",
|
|
8862
|
+
invalid: "",
|
|
8863
|
+
absent: void 0,
|
|
8864
|
+
unresolved: { expression: "toolId" },
|
|
8865
|
+
edition1: "openmart_enrich_company"
|
|
8866
|
+
},
|
|
8867
|
+
referenceType: "K",
|
|
8868
|
+
required: true,
|
|
8869
|
+
resolution: "runtime-allowed",
|
|
8870
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
8871
|
+
description: "Integration tool id resolved against the generated ToolMap.",
|
|
8872
|
+
errorMessage: "ctx.tools.execute tool must be a non-empty tool id."
|
|
8873
|
+
},
|
|
8874
|
+
"ctx.tools.execute.input": {
|
|
8875
|
+
schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
|
|
8876
|
+
fixtures: {
|
|
8877
|
+
valid: { domain: "example.com" },
|
|
8878
|
+
invalid: "example.com",
|
|
8879
|
+
absent: void 0,
|
|
8880
|
+
unresolved: "toolInput",
|
|
8881
|
+
edition1: {}
|
|
8882
|
+
},
|
|
8883
|
+
referenceType: "K extends keyof ToolMap ? ToolMap[K]['input'] : Record<string, unknown>",
|
|
8884
|
+
required: true,
|
|
8885
|
+
resolution: "runtime-allowed",
|
|
8886
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
8887
|
+
description: "Tool-specific input object.",
|
|
8888
|
+
errorMessage: "ctx.tools.execute input must be an object."
|
|
8889
|
+
},
|
|
8890
|
+
"ctx.tools.execute.description": {
|
|
8891
|
+
schema: import_typebox.Type.String(),
|
|
8892
|
+
fixtures: {
|
|
8893
|
+
valid: "Enrich the company.",
|
|
8894
|
+
invalid: 1,
|
|
8895
|
+
absent: void 0,
|
|
8896
|
+
unresolved: { expression: "description" },
|
|
8897
|
+
edition1: "Enrich the company."
|
|
8898
|
+
},
|
|
8899
|
+
referenceType: "string",
|
|
8900
|
+
required: false,
|
|
8901
|
+
resolution: "runtime-allowed",
|
|
8902
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
8903
|
+
description: "Human-readable purpose of the durable tool call.",
|
|
8904
|
+
errorMessage: "ctx.tools.execute description must be a string."
|
|
8905
|
+
},
|
|
8906
|
+
"ctx.tools.execute.force": {
|
|
8907
|
+
schema: import_typebox.Type.Boolean(),
|
|
8908
|
+
fixtures: {
|
|
8909
|
+
valid: true,
|
|
8910
|
+
invalid: "true",
|
|
8911
|
+
absent: void 0,
|
|
8912
|
+
unresolved: { expression: "force" },
|
|
8913
|
+
edition1: false
|
|
8914
|
+
},
|
|
8915
|
+
referenceType: "boolean",
|
|
8916
|
+
required: false,
|
|
8917
|
+
resolution: "runtime-allowed",
|
|
8918
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
8919
|
+
description: "Explicitly bypasses a completed durable tool receipt.",
|
|
8920
|
+
errorMessage: "ctx.tools.execute force must be a boolean."
|
|
8921
|
+
},
|
|
8922
|
+
"ctx.tools.execute.timeoutMs": {
|
|
8923
|
+
schema: import_typebox.Type.Integer({ minimum: 1 }),
|
|
8924
|
+
fixtures: {
|
|
8925
|
+
valid: 1,
|
|
8926
|
+
invalid: 0,
|
|
8927
|
+
absent: void 0,
|
|
8928
|
+
unresolved: { expression: "timeout" },
|
|
8929
|
+
edition1: 1
|
|
8930
|
+
},
|
|
8931
|
+
referenceType: "number",
|
|
8932
|
+
required: false,
|
|
8933
|
+
resolution: "runtime-allowed",
|
|
8934
|
+
issueCode: "play_authoring_durable_policy_invalid",
|
|
8935
|
+
description: "Positive whole-number runtime transport timeout in milliseconds.",
|
|
8936
|
+
errorMessage: "timeoutMs must be a positive whole number of milliseconds."
|
|
8937
|
+
},
|
|
8938
|
+
"ctx.tools.execute.receiptWaitMs": {
|
|
8939
|
+
schema: import_typebox.Type.Integer({ minimum: 1 }),
|
|
8940
|
+
fixtures: {
|
|
8941
|
+
valid: 1,
|
|
8942
|
+
invalid: 0,
|
|
8943
|
+
absent: void 0,
|
|
8944
|
+
unresolved: { expression: "receiptWait" },
|
|
8945
|
+
edition1: 1
|
|
8946
|
+
},
|
|
8947
|
+
referenceType: "number",
|
|
8948
|
+
required: false,
|
|
8949
|
+
resolution: "runtime-allowed",
|
|
8950
|
+
issueCode: "play_authoring_durable_policy_invalid",
|
|
8951
|
+
description: "Positive whole-number durable receipt wait budget in milliseconds.",
|
|
8952
|
+
errorMessage: "receiptWaitMs must be a positive whole number of milliseconds."
|
|
8953
|
+
},
|
|
8954
|
+
"ctx.csv.options.description": {
|
|
8955
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
8956
|
+
fixtures: {
|
|
8957
|
+
valid: "Load account rows.",
|
|
8958
|
+
invalid: "",
|
|
8959
|
+
absent: void 0,
|
|
8960
|
+
unresolved: { expression: "description" },
|
|
8961
|
+
edition1: "Load rows."
|
|
8962
|
+
},
|
|
8963
|
+
referenceType: "string",
|
|
8964
|
+
required: false,
|
|
8965
|
+
resolution: "static-when-present",
|
|
8966
|
+
issueCode: "play_authoring_csv_option_invalid",
|
|
8967
|
+
description: "Non-empty description for a staged CSV load.",
|
|
8968
|
+
errorMessage: "ctx.csv options.description must be non-empty."
|
|
8969
|
+
},
|
|
8970
|
+
"ctx.csv.options.columns": {
|
|
8971
|
+
schema: import_typebox.Type.Record(
|
|
8972
|
+
import_typebox.Type.String(),
|
|
8973
|
+
import_typebox.Type.Union([
|
|
8974
|
+
import_typebox.Type.String({ minLength: 1 }),
|
|
8975
|
+
import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 }), { minItems: 1 })
|
|
8976
|
+
])
|
|
8977
|
+
),
|
|
8978
|
+
fixtures: {
|
|
8979
|
+
valid: { domain: ["domain", "Company Domain"] },
|
|
8980
|
+
invalid: { domain: [] },
|
|
8981
|
+
absent: void 0,
|
|
8982
|
+
unresolved: { expression: { dynamic: true } },
|
|
8983
|
+
edition1: { domain: "domain" }
|
|
8984
|
+
},
|
|
8985
|
+
referenceType: "CsvRenameMap",
|
|
8986
|
+
required: false,
|
|
8987
|
+
resolution: "runtime-allowed",
|
|
8988
|
+
issueCode: "play_authoring_csv_option_invalid",
|
|
8989
|
+
description: "Canonical field-to-header aliases for a staged CSV.",
|
|
8990
|
+
errorMessage: "ctx.csv options.columns values must be a non-empty header or alias list."
|
|
8991
|
+
},
|
|
8992
|
+
"ctx.csv.options.rename": {
|
|
8993
|
+
schema: import_typebox.Type.Record(
|
|
8994
|
+
import_typebox.Type.String(),
|
|
8995
|
+
import_typebox.Type.Union([
|
|
8996
|
+
import_typebox.Type.String({ minLength: 1 }),
|
|
8997
|
+
import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 }), { minItems: 1 })
|
|
8998
|
+
])
|
|
8999
|
+
),
|
|
9000
|
+
fixtures: {
|
|
9001
|
+
valid: { domain: "Company Domain" },
|
|
9002
|
+
invalid: { domain: "" },
|
|
9003
|
+
absent: void 0,
|
|
9004
|
+
unresolved: { expression: { dynamic: true } },
|
|
9005
|
+
edition1: { domain: "domain" }
|
|
9006
|
+
},
|
|
9007
|
+
referenceType: "CsvRenameMap",
|
|
9008
|
+
required: false,
|
|
9009
|
+
resolution: "static-when-present",
|
|
9010
|
+
issueCode: "play_authoring_csv_option_invalid",
|
|
9011
|
+
description: "Legacy header rename aliases for a staged CSV.",
|
|
9012
|
+
errorMessage: "ctx.csv options.rename values must be a non-empty header or alias list."
|
|
9013
|
+
},
|
|
9014
|
+
"ctx.csv.options.required": {
|
|
9015
|
+
schema: import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 })),
|
|
9016
|
+
fixtures: {
|
|
9017
|
+
valid: ["domain"],
|
|
9018
|
+
invalid: [""],
|
|
9019
|
+
absent: void 0,
|
|
9020
|
+
unresolved: { expression: "requiredColumns" },
|
|
9021
|
+
edition1: []
|
|
9022
|
+
},
|
|
9023
|
+
referenceType: "readonly string[]",
|
|
9024
|
+
required: false,
|
|
9025
|
+
resolution: "static-when-present",
|
|
9026
|
+
issueCode: "play_authoring_csv_option_invalid",
|
|
9027
|
+
description: "Canonical columns required after CSV normalization.",
|
|
9028
|
+
errorMessage: "ctx.csv options.required entries must be non-empty column names."
|
|
9029
|
+
},
|
|
9030
|
+
"ctx.dataset.key": {
|
|
9031
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9032
|
+
fixtures: {
|
|
9033
|
+
valid: "accounts",
|
|
9034
|
+
invalid: "",
|
|
9035
|
+
absent: void 0,
|
|
9036
|
+
unresolved: { expression: "datasetKey" },
|
|
9037
|
+
edition1: "rows"
|
|
9038
|
+
},
|
|
9039
|
+
referenceType: "string",
|
|
9040
|
+
required: true,
|
|
9041
|
+
resolution: "static-required",
|
|
9042
|
+
issueCode: "play_authoring_dataset_option_invalid",
|
|
9043
|
+
description: "Stable durable identity for one dataset.",
|
|
9044
|
+
errorMessage: "ctx.dataset key must be a non-empty static string."
|
|
9045
|
+
},
|
|
9046
|
+
"ctx.dataset.run.description": {
|
|
9047
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9048
|
+
fixtures: {
|
|
9049
|
+
valid: "Enrich account rows.",
|
|
9050
|
+
invalid: "",
|
|
9051
|
+
absent: void 0,
|
|
9052
|
+
unresolved: { expression: "description" },
|
|
9053
|
+
edition1: "Process rows."
|
|
9054
|
+
},
|
|
9055
|
+
referenceType: "string",
|
|
9056
|
+
required: false,
|
|
9057
|
+
resolution: "static-when-present",
|
|
9058
|
+
issueCode: "play_authoring_dataset_option_invalid",
|
|
9059
|
+
description: "Non-empty description for one dataset execution.",
|
|
9060
|
+
errorMessage: "ctx.dataset run description must be non-empty."
|
|
9061
|
+
},
|
|
9062
|
+
"ctx.dataset.run.key": {
|
|
9063
|
+
schema: import_typebox.Type.Union([
|
|
9064
|
+
import_typebox.Type.String({ minLength: 1 }),
|
|
9065
|
+
import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 }), { minItems: 1 }),
|
|
9066
|
+
import_typebox.Type.Function(
|
|
9067
|
+
[import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()), import_typebox.Type.Integer()],
|
|
9068
|
+
import_typebox.Type.Union([
|
|
9069
|
+
import_typebox.Type.String(),
|
|
9070
|
+
import_typebox.Type.Number(),
|
|
9071
|
+
import_typebox.Type.Readonly(import_typebox.Type.Array(import_typebox.Type.Unknown()))
|
|
9072
|
+
])
|
|
9073
|
+
)
|
|
9074
|
+
]),
|
|
9075
|
+
fixtures: {
|
|
9076
|
+
valid: (row) => String(row.domain),
|
|
9077
|
+
invalid: [],
|
|
9078
|
+
absent: void 0,
|
|
9079
|
+
unresolved: { expression: "rowKey" },
|
|
9080
|
+
edition1: ["domain"]
|
|
9081
|
+
},
|
|
9082
|
+
referenceType: "DatasetRowKey<InputRow>",
|
|
9083
|
+
required: false,
|
|
9084
|
+
resolution: "runtime-dynamic",
|
|
9085
|
+
issueCode: "play_authoring_dataset_option_invalid",
|
|
9086
|
+
description: "Stable field or fields used for durable row identity.",
|
|
9087
|
+
errorMessage: "ctx.dataset run key must be a non-empty field, field list, or key function."
|
|
9088
|
+
},
|
|
9089
|
+
"ctx.dataset.run.onRowError": {
|
|
9090
|
+
schema: import_typebox.Type.Union([import_typebox.Type.Literal("isolate"), import_typebox.Type.Literal("fail")]),
|
|
9091
|
+
fixtures: {
|
|
9092
|
+
valid: "isolate",
|
|
9093
|
+
invalid: "continue",
|
|
9094
|
+
absent: void 0,
|
|
9095
|
+
unresolved: { expression: "rowErrorPolicy" },
|
|
9096
|
+
edition1: "fail"
|
|
9097
|
+
},
|
|
9098
|
+
referenceType: "'isolate' | 'fail'",
|
|
9099
|
+
required: false,
|
|
9100
|
+
resolution: "static-when-present",
|
|
9101
|
+
issueCode: "play_authoring_dataset_option_invalid",
|
|
9102
|
+
description: "Whether row failures isolate or fail the whole dataset.",
|
|
9103
|
+
errorMessage: 'ctx.dataset run onRowError must be "isolate" or "fail".'
|
|
9104
|
+
},
|
|
9105
|
+
"ctx.dataset.run.mode": {
|
|
9106
|
+
schema: import_typebox.Type.Union([import_typebox.Type.Literal("upsert"), import_typebox.Type.Literal("net_new")]),
|
|
9107
|
+
fixtures: {
|
|
9108
|
+
valid: "upsert",
|
|
9109
|
+
invalid: "append",
|
|
9110
|
+
absent: void 0,
|
|
9111
|
+
unresolved: { expression: "datasetMode" },
|
|
9112
|
+
edition1: "upsert"
|
|
9113
|
+
},
|
|
9114
|
+
referenceType: "'upsert' | 'net_new'",
|
|
9115
|
+
required: false,
|
|
9116
|
+
resolution: "static-when-present",
|
|
9117
|
+
issueCode: "play_authoring_dataset_option_invalid",
|
|
9118
|
+
description: "Whether the dataset returns all rows or only newly admitted rows.",
|
|
9119
|
+
errorMessage: 'ctx.dataset run mode must be "upsert" or "net_new".'
|
|
9120
|
+
},
|
|
9121
|
+
"ctx.dataset.run.undrawnColumns": {
|
|
9122
|
+
schema: import_typebox.Type.Array(import_typebox.Type.String({ minLength: 1 }), { minItems: 1 }),
|
|
9123
|
+
fixtures: {
|
|
9124
|
+
valid: ["miss_reason"],
|
|
9125
|
+
invalid: [],
|
|
9126
|
+
absent: void 0,
|
|
9127
|
+
unresolved: { expression: "undrawnColumns" },
|
|
9128
|
+
edition1: ["miss_reason"]
|
|
9129
|
+
},
|
|
9130
|
+
referenceType: "readonly string[]",
|
|
9131
|
+
required: false,
|
|
9132
|
+
resolution: "static-when-present",
|
|
9133
|
+
issueCode: "play_authoring_dataset_option_invalid",
|
|
9134
|
+
description: "Computed columns deliberately left out of the authored @mermaid diagram.",
|
|
9135
|
+
errorMessage: "ctx.dataset run undrawnColumns must be a non-empty array of static column-name strings."
|
|
9136
|
+
},
|
|
9137
|
+
"ctx.step.id": {
|
|
9138
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9139
|
+
fixtures: {
|
|
9140
|
+
valid: "load-settings",
|
|
9141
|
+
invalid: "",
|
|
9142
|
+
absent: void 0,
|
|
9143
|
+
unresolved: { expression: "stepId" },
|
|
9144
|
+
edition1: "step"
|
|
9145
|
+
},
|
|
9146
|
+
referenceType: "string",
|
|
9147
|
+
required: true,
|
|
9148
|
+
resolution: "static-required",
|
|
9149
|
+
issueCode: "play_authoring_step_option_invalid",
|
|
9150
|
+
description: "Stable durable identity for one scalar checkpoint.",
|
|
9151
|
+
errorMessage: "ctx.step id must be a non-empty static string."
|
|
9152
|
+
},
|
|
9153
|
+
"ctx.step.semanticKey": {
|
|
9154
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9155
|
+
fixtures: {
|
|
9156
|
+
valid: "account:stripe.com",
|
|
9157
|
+
invalid: "",
|
|
9158
|
+
absent: void 0,
|
|
9159
|
+
unresolved: { expression: "semanticKey" },
|
|
9160
|
+
edition1: "account"
|
|
9161
|
+
},
|
|
9162
|
+
referenceType: "string",
|
|
9163
|
+
required: false,
|
|
9164
|
+
resolution: "runtime-dynamic",
|
|
9165
|
+
issueCode: "play_authoring_step_option_invalid",
|
|
9166
|
+
description: "Optional semantic receipt identity for a scalar checkpoint.",
|
|
9167
|
+
errorMessage: "ctx.step semanticKey must be a non-empty string."
|
|
9168
|
+
},
|
|
9169
|
+
"ctx.step.staleAfterSeconds": {
|
|
9170
|
+
schema: import_typebox.Type.Union([import_typebox.Type.Null(), import_typebox.Type.Integer({ minimum: 0 })]),
|
|
9171
|
+
fixtures: {
|
|
9172
|
+
valid: 0,
|
|
9173
|
+
invalid: -1,
|
|
9174
|
+
absent: void 0,
|
|
9175
|
+
unresolved: { expression: "ttl" },
|
|
9176
|
+
edition1: null
|
|
9177
|
+
},
|
|
9178
|
+
referenceType: "number | null",
|
|
9179
|
+
required: false,
|
|
9180
|
+
resolution: "runtime-dynamic",
|
|
9181
|
+
issueCode: "play_authoring_durable_policy_invalid",
|
|
9182
|
+
description: "Checkpoint freshness: null/omitted never expires, 0 always executes.",
|
|
9183
|
+
errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."
|
|
9184
|
+
},
|
|
9185
|
+
"ctx.fetch.key": {
|
|
9186
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9187
|
+
fixtures: {
|
|
9188
|
+
valid: "notify-crm",
|
|
9189
|
+
invalid: "",
|
|
9190
|
+
absent: void 0,
|
|
9191
|
+
unresolved: { expression: "fetchKey" },
|
|
9192
|
+
edition1: "fetch"
|
|
9193
|
+
},
|
|
9194
|
+
referenceType: "string",
|
|
9195
|
+
required: true,
|
|
9196
|
+
resolution: "static-required",
|
|
9197
|
+
issueCode: "play_authoring_durable_policy_invalid",
|
|
9198
|
+
description: "Stable durable identity for one external HTTP request.",
|
|
9199
|
+
errorMessage: "ctx.fetch key must be a non-empty static string.",
|
|
9200
|
+
unresolvedHint: PLAY_AUTHORING_STATIC_FETCH_KEY_HINT
|
|
9201
|
+
},
|
|
9202
|
+
"ctx.fetch.staleAfterSeconds": {
|
|
9203
|
+
schema: import_typebox.Type.Union([import_typebox.Type.Null(), import_typebox.Type.Integer({ minimum: 0 })]),
|
|
9204
|
+
fixtures: {
|
|
9205
|
+
valid: null,
|
|
9206
|
+
invalid: 1.5,
|
|
9207
|
+
absent: void 0,
|
|
9208
|
+
unresolved: { expression: "ttl" },
|
|
9209
|
+
edition1: 0
|
|
9210
|
+
},
|
|
9211
|
+
referenceType: "number | null",
|
|
9212
|
+
required: false,
|
|
9213
|
+
resolution: "runtime-dynamic",
|
|
9214
|
+
issueCode: "play_authoring_durable_policy_invalid",
|
|
9215
|
+
description: "Fetch freshness: null/omitted never expires, 0 always executes.",
|
|
9216
|
+
errorMessage: "staleAfterSeconds must be null, 0 (always execute), or a positive whole number of seconds."
|
|
9217
|
+
},
|
|
9218
|
+
"ctx.runPlay.key": {
|
|
9219
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9220
|
+
fixtures: {
|
|
9221
|
+
valid: "enrich-company",
|
|
9222
|
+
invalid: "",
|
|
9223
|
+
absent: void 0,
|
|
9224
|
+
unresolved: { expression: "callKey" },
|
|
9225
|
+
edition1: "child"
|
|
9226
|
+
},
|
|
9227
|
+
referenceType: "string",
|
|
9228
|
+
required: true,
|
|
9229
|
+
resolution: "runtime-dynamic",
|
|
9230
|
+
issueCode: "play_authoring_run_play_option_invalid",
|
|
9231
|
+
description: "Stable identity for one inline child Play call.",
|
|
9232
|
+
errorMessage: "ctx.runPlay key must be a non-empty string."
|
|
9233
|
+
},
|
|
9234
|
+
"ctx.runPlay.playRef": {
|
|
9235
|
+
schema: import_typebox.Type.Union([
|
|
9236
|
+
import_typebox.Type.String({ minLength: 1 }),
|
|
9237
|
+
import_typebox.Type.Union([
|
|
9238
|
+
import_typebox.Type.Object(
|
|
9239
|
+
{ playName: import_typebox.Type.String({ minLength: 1 }) },
|
|
9240
|
+
{ additionalProperties: true }
|
|
9241
|
+
),
|
|
9242
|
+
import_typebox.Type.Object(
|
|
9243
|
+
{ name: import_typebox.Type.String({ minLength: 1 }) },
|
|
9244
|
+
{ additionalProperties: true }
|
|
9245
|
+
)
|
|
9246
|
+
])
|
|
9247
|
+
]),
|
|
9248
|
+
fixtures: {
|
|
9249
|
+
valid: "prebuilt/company-lookup",
|
|
9250
|
+
invalid: {},
|
|
9251
|
+
absent: void 0,
|
|
9252
|
+
unresolved: { expression: "playRef" },
|
|
9253
|
+
edition1: { name: "company-lookup" }
|
|
9254
|
+
},
|
|
9255
|
+
referenceType: "string | PlayReferenceLike",
|
|
9256
|
+
required: true,
|
|
9257
|
+
resolution: "runtime-dynamic",
|
|
9258
|
+
issueCode: "play_authoring_run_play_option_invalid",
|
|
9259
|
+
description: "Child Play name or typed Play definition handle.",
|
|
9260
|
+
errorMessage: "ctx.runPlay playRef must be a non-empty Play name or definition handle."
|
|
9261
|
+
},
|
|
9262
|
+
"ctx.runPlay.input": {
|
|
9263
|
+
schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
|
|
9264
|
+
fixtures: {
|
|
9265
|
+
valid: { domain: "example.com" },
|
|
9266
|
+
invalid: "example.com",
|
|
9267
|
+
absent: void 0,
|
|
9268
|
+
unresolved: "childInput",
|
|
9269
|
+
edition1: {}
|
|
9270
|
+
},
|
|
9271
|
+
referenceType: "Record<string, unknown>",
|
|
9272
|
+
required: true,
|
|
9273
|
+
resolution: "runtime-dynamic",
|
|
9274
|
+
issueCode: "play_authoring_run_play_option_invalid",
|
|
9275
|
+
description: "Scalar input object submitted to the child Play.",
|
|
9276
|
+
errorMessage: "ctx.runPlay input must be an object."
|
|
9277
|
+
},
|
|
9278
|
+
"ctx.runPlay.options.description": {
|
|
9279
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9280
|
+
fixtures: {
|
|
9281
|
+
valid: "Enrich the company.",
|
|
9282
|
+
invalid: "",
|
|
9283
|
+
absent: void 0,
|
|
9284
|
+
unresolved: { expression: "description" },
|
|
9285
|
+
edition1: "Run child."
|
|
9286
|
+
},
|
|
9287
|
+
referenceType: "string",
|
|
9288
|
+
required: true,
|
|
9289
|
+
resolution: "runtime-dynamic",
|
|
9290
|
+
issueCode: "play_authoring_run_play_option_invalid",
|
|
9291
|
+
description: "Non-empty purpose for one inline child Play call.",
|
|
9292
|
+
errorMessage: "ctx.runPlay options.description must be non-empty."
|
|
9293
|
+
},
|
|
9294
|
+
"ctx.runPlay.options.execution": {
|
|
9295
|
+
schema: import_typebox.Type.Literal("inline"),
|
|
9296
|
+
fixtures: {
|
|
9297
|
+
valid: "inline",
|
|
9298
|
+
invalid: "child-workflow",
|
|
9299
|
+
absent: void 0,
|
|
9300
|
+
unresolved: { expression: "execution" },
|
|
9301
|
+
edition1: "inline"
|
|
9302
|
+
},
|
|
9303
|
+
referenceType: "'inline'",
|
|
9304
|
+
required: false,
|
|
9305
|
+
resolution: "static-required",
|
|
9306
|
+
issueCode: "play_authoring_run_play_option_invalid",
|
|
9307
|
+
description: "Child composition strategy. Only inline is supported.",
|
|
9308
|
+
errorMessage: 'ctx.runPlay execution must be "inline".'
|
|
9309
|
+
},
|
|
9310
|
+
"ctx.runPlay.options.timeoutMs": {
|
|
9311
|
+
schema: import_typebox.Type.Undefined(),
|
|
9312
|
+
fixtures: {
|
|
9313
|
+
valid: void 0,
|
|
9314
|
+
invalid: 1e3,
|
|
9315
|
+
absent: void 0,
|
|
9316
|
+
unresolved: { expression: "timeoutMs" },
|
|
9317
|
+
edition1: void 0
|
|
9318
|
+
},
|
|
9319
|
+
referenceType: "never",
|
|
9320
|
+
required: false,
|
|
9321
|
+
resolution: "unsupported",
|
|
9322
|
+
issueCode: "play_authoring_run_play_option_invalid",
|
|
9323
|
+
description: "Unsupported legacy child-workflow timeout.",
|
|
9324
|
+
errorMessage: "ctx.runPlay timeoutMs is unsupported because child Plays execute inline."
|
|
9325
|
+
},
|
|
9326
|
+
"runtime.timeout": {
|
|
9327
|
+
schema: import_typebox.Type.String({ pattern: "^\\d+\\s*[mh]$" }),
|
|
9328
|
+
fixtures: {
|
|
9329
|
+
valid: "90m",
|
|
9330
|
+
invalid: "90s",
|
|
9331
|
+
absent: void 0,
|
|
9332
|
+
unresolved: { expression: "timeout" },
|
|
9333
|
+
edition1: "90m"
|
|
9334
|
+
},
|
|
9335
|
+
referenceType: "string",
|
|
9336
|
+
required: false,
|
|
9337
|
+
resolution: "static-required",
|
|
9338
|
+
issueCode: "play_authoring_binding_invalid",
|
|
9339
|
+
description: "Play-level sandbox deadline. The default is 30m; use a static duration such as 90m or 2h, up to 4h.",
|
|
9340
|
+
errorMessage: 'runtime.timeout must be a static duration such as "90m" or "2h".'
|
|
9341
|
+
},
|
|
9342
|
+
"runtime.size": {
|
|
9343
|
+
schema: import_typebox.Type.Literal("standard"),
|
|
9344
|
+
fixtures: {
|
|
9345
|
+
valid: "standard",
|
|
9346
|
+
invalid: "large",
|
|
9347
|
+
absent: void 0,
|
|
9348
|
+
unresolved: { expression: "size" },
|
|
9349
|
+
edition1: "standard"
|
|
9350
|
+
},
|
|
9351
|
+
referenceType: "'standard'",
|
|
9352
|
+
required: false,
|
|
9353
|
+
resolution: "static-required",
|
|
9354
|
+
issueCode: "play_authoring_binding_invalid",
|
|
9355
|
+
description: "Deepline-managed sandbox size. Only standard is supported.",
|
|
9356
|
+
errorMessage: 'runtime.size must be the static literal "standard".'
|
|
9357
|
+
},
|
|
9358
|
+
"ctx.customerDb.query.statement": {
|
|
9359
|
+
schema: import_typebox.Type.Union([
|
|
9360
|
+
import_typebox.Type.String({ minLength: 1 }),
|
|
9361
|
+
import_typebox.Type.Object(
|
|
9362
|
+
{
|
|
9363
|
+
kind: import_typebox.Type.Optional(import_typebox.Type.Literal("sql.query")),
|
|
9364
|
+
text: import_typebox.Type.String({ minLength: 1 }),
|
|
9365
|
+
values: import_typebox.Type.Optional(import_typebox.Type.Array(import_typebox.Type.Unknown(), { maxItems: 0 }))
|
|
9366
|
+
},
|
|
9367
|
+
{ additionalProperties: false }
|
|
9368
|
+
)
|
|
9369
|
+
]),
|
|
9370
|
+
fixtures: {
|
|
9371
|
+
valid: { kind: "sql.query", text: "select 1", values: [] },
|
|
9372
|
+
invalid: { kind: "sql.query", text: "select $1", values: [1] },
|
|
9373
|
+
absent: void 0,
|
|
9374
|
+
unresolved: { expression: "statement" },
|
|
9375
|
+
edition1: "select 1"
|
|
9376
|
+
},
|
|
9377
|
+
referenceType: "SqlQuery",
|
|
9378
|
+
required: true,
|
|
9379
|
+
resolution: "runtime-dynamic",
|
|
9380
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
9381
|
+
description: "One non-empty Customer DB SQL string; the deprecated SqlQuery object is accepted only without parameter values.",
|
|
9382
|
+
errorMessage: "ctx.customerDb.query statement must be a non-empty SQL string. Deprecated SqlQuery objects cannot contain parameter values."
|
|
9383
|
+
},
|
|
9384
|
+
"ctx.customerDb.query.options.maxRows": {
|
|
9385
|
+
schema: import_typebox.Type.Integer({ minimum: 1 }),
|
|
9386
|
+
fixtures: {
|
|
9387
|
+
valid: 100,
|
|
9388
|
+
invalid: 0,
|
|
9389
|
+
absent: void 0,
|
|
9390
|
+
unresolved: { expression: "maxRows" },
|
|
9391
|
+
edition1: 100
|
|
9392
|
+
},
|
|
9393
|
+
referenceType: "number",
|
|
9394
|
+
required: false,
|
|
9395
|
+
resolution: "runtime-dynamic",
|
|
9396
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
9397
|
+
description: "Positive whole-number Customer DB response row limit.",
|
|
9398
|
+
errorMessage: "ctx.customerDb.query options.maxRows must be a positive whole number."
|
|
9399
|
+
},
|
|
9400
|
+
"ctx.customerDb.query.options.timeoutMs": {
|
|
9401
|
+
schema: import_typebox.Type.Integer({ minimum: 1 }),
|
|
9402
|
+
fixtures: {
|
|
9403
|
+
valid: 1e3,
|
|
9404
|
+
invalid: 0,
|
|
9405
|
+
absent: void 0,
|
|
9406
|
+
unresolved: { expression: "timeoutMs" },
|
|
9407
|
+
edition1: 1e3
|
|
9408
|
+
},
|
|
9409
|
+
referenceType: "number",
|
|
9410
|
+
required: false,
|
|
9411
|
+
resolution: "runtime-dynamic",
|
|
9412
|
+
issueCode: "play_authoring_durable_policy_invalid",
|
|
9413
|
+
description: "Positive whole-number Customer DB timeout in milliseconds.",
|
|
9414
|
+
errorMessage: "ctx.customerDb.query options.timeoutMs must be a positive whole number of milliseconds."
|
|
9415
|
+
},
|
|
9416
|
+
"ctx.tool.key": {
|
|
9417
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9418
|
+
fixtures: {
|
|
9419
|
+
valid: "company",
|
|
9420
|
+
invalid: "",
|
|
9421
|
+
absent: void 0,
|
|
9422
|
+
unresolved: { expression: "key" },
|
|
9423
|
+
edition1: "tool"
|
|
9424
|
+
},
|
|
9425
|
+
referenceType: "string",
|
|
9426
|
+
required: true,
|
|
9427
|
+
resolution: "runtime-dynamic",
|
|
9428
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
9429
|
+
description: "Stable receipt identity for the tool shorthand.",
|
|
9430
|
+
errorMessage: "ctx.tool key must be a non-empty string."
|
|
9431
|
+
},
|
|
9432
|
+
"ctx.tool.tool": {
|
|
9433
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9434
|
+
fixtures: {
|
|
9435
|
+
valid: "openmart_enrich_company",
|
|
9436
|
+
invalid: "",
|
|
9437
|
+
absent: void 0,
|
|
9438
|
+
unresolved: { expression: "tool" },
|
|
9439
|
+
edition1: "openmart_enrich_company"
|
|
9440
|
+
},
|
|
9441
|
+
referenceType: "string",
|
|
9442
|
+
required: true,
|
|
9443
|
+
resolution: "runtime-dynamic",
|
|
9444
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
9445
|
+
description: "Integration tool id for the tool shorthand.",
|
|
9446
|
+
errorMessage: "ctx.tool tool must be a non-empty tool id."
|
|
9447
|
+
},
|
|
9448
|
+
"ctx.tool.input": {
|
|
9449
|
+
schema: import_typebox.Type.Record(import_typebox.Type.String(), import_typebox.Type.Unknown()),
|
|
9450
|
+
fixtures: {
|
|
9451
|
+
valid: { domain: "example.com" },
|
|
9452
|
+
invalid: "example.com",
|
|
9453
|
+
absent: void 0,
|
|
9454
|
+
unresolved: "toolInput",
|
|
9455
|
+
edition1: {}
|
|
9456
|
+
},
|
|
9457
|
+
referenceType: "Record<string, unknown>",
|
|
9458
|
+
required: true,
|
|
9459
|
+
resolution: "runtime-dynamic",
|
|
9460
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
9461
|
+
description: "Tool-specific input object for the shorthand.",
|
|
9462
|
+
errorMessage: "ctx.tool input must be an object."
|
|
9463
|
+
},
|
|
9464
|
+
"ctx.tool.options.description": {
|
|
9465
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9466
|
+
fixtures: {
|
|
9467
|
+
valid: "Enrich the company.",
|
|
9468
|
+
invalid: "",
|
|
9469
|
+
absent: void 0,
|
|
9470
|
+
unresolved: { expression: "description" },
|
|
9471
|
+
edition1: "Run tool."
|
|
9472
|
+
},
|
|
9473
|
+
referenceType: "string",
|
|
9474
|
+
required: false,
|
|
9475
|
+
resolution: "runtime-dynamic",
|
|
9476
|
+
issueCode: "play_authoring_tool_request_invalid",
|
|
9477
|
+
description: "Non-empty purpose for the tool shorthand.",
|
|
9478
|
+
errorMessage: "ctx.tool options.description must be non-empty."
|
|
9479
|
+
},
|
|
9480
|
+
"ctx.runSteps.options.description": {
|
|
9481
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9482
|
+
fixtures: {
|
|
9483
|
+
valid: "Score the account.",
|
|
9484
|
+
invalid: "",
|
|
9485
|
+
absent: void 0,
|
|
9486
|
+
unresolved: { expression: "description" },
|
|
9487
|
+
edition1: "Run steps."
|
|
9488
|
+
},
|
|
9489
|
+
referenceType: "string",
|
|
9490
|
+
required: false,
|
|
9491
|
+
resolution: "runtime-dynamic",
|
|
9492
|
+
issueCode: "play_authoring_step_option_invalid",
|
|
9493
|
+
description: "Non-empty purpose for a reusable step program.",
|
|
9494
|
+
errorMessage: "ctx.runSteps options.description must be non-empty."
|
|
9495
|
+
},
|
|
9496
|
+
"ctx.sleep.ms": {
|
|
9497
|
+
schema: import_typebox.Type.Integer({ minimum: 0 }),
|
|
9498
|
+
fixtures: {
|
|
9499
|
+
valid: 0,
|
|
9500
|
+
invalid: -1,
|
|
9501
|
+
absent: void 0,
|
|
9502
|
+
unresolved: { expression: "delayMs" },
|
|
9503
|
+
edition1: 1e3
|
|
9504
|
+
},
|
|
9505
|
+
referenceType: "number",
|
|
9506
|
+
required: true,
|
|
9507
|
+
resolution: "runtime-dynamic",
|
|
9508
|
+
issueCode: "play_authoring_step_option_invalid",
|
|
9509
|
+
description: "Non-negative whole-number sleep duration in milliseconds.",
|
|
9510
|
+
errorMessage: "ctx.sleep ms must be a non-negative whole number."
|
|
9511
|
+
},
|
|
9512
|
+
"ctx.fetch.url": {
|
|
9513
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9514
|
+
fixtures: {
|
|
9515
|
+
valid: "https://example.com",
|
|
9516
|
+
invalid: "",
|
|
9517
|
+
absent: void 0,
|
|
9518
|
+
unresolved: { expression: "url" },
|
|
9519
|
+
edition1: "https://example.com"
|
|
9520
|
+
},
|
|
9521
|
+
referenceType: "string",
|
|
9522
|
+
required: true,
|
|
9523
|
+
resolution: "runtime-allowed",
|
|
9524
|
+
issueCode: "play_authoring_fetch_secret_requires_tls",
|
|
9525
|
+
description: "HTTP request URL. Secret authentication requires HTTPS.",
|
|
9526
|
+
errorMessage: "ctx.fetch URL must be a non-empty URL string."
|
|
9527
|
+
},
|
|
9528
|
+
"ctx.fetch.init.method": {
|
|
9529
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9530
|
+
fixtures: {
|
|
9531
|
+
valid: "GET",
|
|
9532
|
+
invalid: "",
|
|
9533
|
+
absent: void 0,
|
|
9534
|
+
unresolved: { expression: "method" },
|
|
9535
|
+
edition1: "GET"
|
|
9536
|
+
},
|
|
9537
|
+
referenceType: "string",
|
|
9538
|
+
required: false,
|
|
9539
|
+
resolution: "runtime-allowed",
|
|
9540
|
+
issueCode: "play_authoring_fetch_idempotency_required",
|
|
9541
|
+
description: "HTTP method. Mutating methods require an Idempotency-Key.",
|
|
9542
|
+
errorMessage: "ctx.fetch method must be a non-empty string."
|
|
9543
|
+
},
|
|
9544
|
+
"ctx.fetch.init.headers.Idempotency-Key": {
|
|
9545
|
+
schema: import_typebox.Type.String({ minLength: 1 }),
|
|
9546
|
+
fixtures: {
|
|
9547
|
+
valid: "contact-123-update",
|
|
9548
|
+
invalid: "",
|
|
9549
|
+
absent: void 0,
|
|
9550
|
+
unresolved: { expression: "idempotencyKey" },
|
|
9551
|
+
edition1: "contact-123-update"
|
|
9552
|
+
},
|
|
9553
|
+
referenceType: "string",
|
|
9554
|
+
required: false,
|
|
9555
|
+
resolution: "runtime-allowed",
|
|
9556
|
+
issueCode: "play_authoring_fetch_idempotency_required",
|
|
9557
|
+
description: "Required for mutating HTTP methods to make replay safe.",
|
|
9558
|
+
errorMessage: "Idempotency-Key must be a non-empty string when provided."
|
|
9559
|
+
}
|
|
9560
|
+
};
|
|
9561
|
+
function cloudReferenceType(path) {
|
|
9562
|
+
return PLAY_AUTHORING_FIELD_REGISTRY[path].referenceType;
|
|
9563
|
+
}
|
|
9564
|
+
var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
9565
|
+
`export type DurableCallStaleAfterSeconds = ${cloudReferenceType("ctx.tools.execute.staleAfterSeconds")};`,
|
|
9566
|
+
`export type PlayRuntimeTimeoutMs = ${cloudReferenceType("ctx.tools.execute.timeoutMs")};`,
|
|
9567
|
+
`export type PlayReceiptWaitMs = ${cloudReferenceType("ctx.tools.execute.receiptWaitMs")};`,
|
|
9568
|
+
`export type SqlListenerOperation = ${cloudReferenceType("bindings.sqlListeners[].operations[]")};`,
|
|
9569
|
+
"export type SqlListenerFilterScalar = string | number | boolean | null;",
|
|
9570
|
+
`export type SqlListenerFilterOperator = { eq?: ${cloudReferenceType("bindings.sqlListeners[].where.*.*.eq")}; neq?: ${cloudReferenceType("bindings.sqlListeners[].where.*.*.neq")}; in?: ${cloudReferenceType("bindings.sqlListeners[].where.*.*.in")}; notIn?: ${cloudReferenceType("bindings.sqlListeners[].where.*.*.notIn")}; isNull?: ${cloudReferenceType("bindings.sqlListeners[].where.*.*.isNull")}; isNotNull?: ${cloudReferenceType("bindings.sqlListeners[].where.*.*.isNotNull")}; ilike?: ${cloudReferenceType("bindings.sqlListeners[].where.*.*.ilike")} };`,
|
|
9571
|
+
`export type SqlListenerWhere = { before?: ${cloudReferenceType("bindings.sqlListeners[].where.before")}; after?: ${cloudReferenceType("bindings.sqlListeners[].where.after")} };`,
|
|
9572
|
+
`export type SqlListenerDeclaration = { id: ${cloudReferenceType("bindings.sqlListeners[].id")}; tool: ${cloudReferenceType("bindings.sqlListeners[].tool")}; stream: ${cloudReferenceType("bindings.sqlListeners[].stream")}; operations?: readonly SqlListenerOperation[]; where?: SqlListenerWhere };`,
|
|
9573
|
+
"export type SqlListenerEvent<T extends object = Record<string, unknown>> = { tool: string; stream: string; operation: SqlListenerOperation; before: T | null; after: T | null; changedAt: string; metadata: { outboxId: string; listenerId: string; table: string } };",
|
|
9574
|
+
"export type SqlQuery = string | { kind?: 'sql.query'; text: string; values?: readonly unknown[] };",
|
|
9575
|
+
"export type ToolExecutionRequest<K extends string> = {",
|
|
9576
|
+
` readonly id: ${cloudReferenceType("ctx.tools.execute.id")};`,
|
|
9577
|
+
` readonly tool: ${cloudReferenceType("ctx.tools.execute.tool")};`,
|
|
9578
|
+
` readonly input: ${cloudReferenceType("ctx.tools.execute.input")};`,
|
|
9579
|
+
` readonly description?: ${cloudReferenceType("ctx.tools.execute.description")};`,
|
|
9580
|
+
` readonly force?: ${cloudReferenceType("ctx.tools.execute.force")};`,
|
|
9581
|
+
" readonly staleAfterSeconds?: DurableCallStaleAfterSeconds;",
|
|
9582
|
+
" readonly timeoutMs?: PlayRuntimeTimeoutMs;",
|
|
9583
|
+
" readonly receiptWaitMs?: PlayReceiptWaitMs;",
|
|
9584
|
+
"};",
|
|
9585
|
+
"export type PlayBindings = {",
|
|
9586
|
+
` description?: ${cloudReferenceType("description")};`,
|
|
9587
|
+
` compatibility?: { toolErrorSchemaVersion?: ${cloudReferenceType("compatibility.toolErrorSchemaVersion")}; toolResponseReceiptRevision?: ${cloudReferenceType("compatibility.toolResponseReceiptRevision")} };`,
|
|
9588
|
+
` inline?: ${cloudReferenceType("inline")};`,
|
|
9589
|
+
` billing?: { maxCreditsPerRun?: ${cloudReferenceType("billing.maxCreditsPerRun")} };`,
|
|
9590
|
+
` runtime?: { timeout?: ${cloudReferenceType("runtime.timeout")}; size?: ${cloudReferenceType("runtime.size")} };`,
|
|
9591
|
+
` webhook?: { hmac?: { algorithm?: ${cloudReferenceType("bindings.webhook.hmac.algorithm")}; header?: ${cloudReferenceType("bindings.webhook.hmac.header")}; secretEnv: ${cloudReferenceType("bindings.webhook.hmac.secretEnv")} }; auth?: { type: ${cloudReferenceType("bindings.webhook.auth.type")}; headerFamily: ${cloudReferenceType("bindings.webhook.auth.headerFamily")}; signingSecrets: readonly ${cloudReferenceType("bindings.webhook.auth.signingSecrets[]")}[]; toleranceSeconds?: ${cloudReferenceType("bindings.webhook.auth.toleranceSeconds")} } };`,
|
|
9592
|
+
` cron?: { schedule: ${cloudReferenceType("bindings.cron.schedule")}; timezone?: ${cloudReferenceType("bindings.cron.timezone")} };`,
|
|
9593
|
+
" sqlListeners?: readonly SqlListenerDeclaration[];",
|
|
9594
|
+
` secrets?: readonly ${cloudReferenceType("bindings.secrets[]")}[];`,
|
|
9595
|
+
"};",
|
|
9596
|
+
"declare const SECRET_HANDLE_BRAND: unique symbol;",
|
|
9597
|
+
"declare const SECRET_PROMISE_BRAND: unique symbol;",
|
|
9598
|
+
"export type SecretHandle = { readonly [SECRET_HANDLE_BRAND]: never; readonly name: string; toString(): string; toJSON(): never };",
|
|
9599
|
+
"export type SecretPromise = Promise<string> & { readonly [SECRET_PROMISE_BRAND]: never };",
|
|
9600
|
+
"export type SecretValue = SecretHandle;",
|
|
9601
|
+
"export type SecretAuth = { readonly kind: 'bearer' | 'header'; readonly secret: string | SecretPromise | SecretHandle; readonly header?: string };",
|
|
9602
|
+
"export type SecretAuthInput = SecretAuth | readonly SecretAuth[];",
|
|
9603
|
+
"export type PlayInputContract<TInput> = { readonly schema: Record<string, unknown>; readonly __inputType?: TInput };",
|
|
9604
|
+
"export type PlayReturnObject = Record<string, unknown> & { readonly _metadata?: never };",
|
|
9605
|
+
"export type CsvRenameMap = Record<string, string | readonly string[]>;",
|
|
9606
|
+
"export type FileInput<TMetadata = unknown> = string & { readonly __deeplineFileInputMetadata?: TMetadata };",
|
|
9607
|
+
"export type CsvInput<TRow extends object = Record<string, unknown>> = FileInput<{ readonly kind: 'csv'; readonly row: TRow }>;",
|
|
9608
|
+
"export type ColumnMap<TRow extends object> = { [K in keyof TRow & string]?: string | readonly string[] };",
|
|
9609
|
+
`export type CsvOptions = { description?: ${cloudReferenceType("ctx.csv.options.description")}; columns?: ${cloudReferenceType("ctx.csv.options.columns")}; rename?: ${cloudReferenceType("ctx.csv.options.rename")}; required?: ${cloudReferenceType("ctx.csv.options.required")} };`,
|
|
9610
|
+
"export type PlayCallExecution = 'inline';",
|
|
9611
|
+
`export type PlayCallOptions = { description: ${cloudReferenceType("ctx.runPlay.options.description")}; execution?: ${cloudReferenceType("ctx.runPlay.options.execution")}; timeoutMs?: ${cloudReferenceType("ctx.runPlay.options.timeoutMs")} };`,
|
|
9612
|
+
`export type RuntimeStepOptions = { semanticKey?: ${cloudReferenceType("ctx.step.semanticKey")}; staleAfterSeconds?: ${cloudReferenceType("ctx.step.staleAfterSeconds")} };`,
|
|
9613
|
+
`export type FetchOptions = { staleAfterSeconds?: ${cloudReferenceType("ctx.fetch.staleAfterSeconds")}; transient?: boolean };`,
|
|
9614
|
+
"export type PlayFetchResponse = { ok: boolean; status: number; statusText: string; url: string; headers: Record<string, string>; bodyText: string; json: unknown | null };",
|
|
9615
|
+
"export declare class CtxFetchHttpError extends Error { readonly code: 'CTX_FETCH_HTTP_ERROR'; readonly response: PlayFetchResponse; readonly status: number; readonly statusText: string; readonly url: string; readonly headers: Record<string, string>; readonly bodyText: string; readonly json: unknown | null; }",
|
|
9616
|
+
"export type StepResolver<Row, Value> = (row: Row, ctx: DeeplinePlayRuntimeContext, index: number, previousCell?: PreviousCell<Value>) => Value | Promise<Value>;",
|
|
9617
|
+
"export type DatasetColumnRunInput<Row, Value> = { readonly row: Row; readonly ctx: DeeplinePlayRuntimeContext; readonly index: number; readonly previousCell?: PreviousCell<Value> };",
|
|
9618
|
+
"export type DatasetColumnDefinition<Row, Value> = { readonly run: (input: DatasetColumnRunInput<Row, Value>) => Value | Promise<Value>; readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean> };",
|
|
9619
|
+
"export type ConditionalStepResolver<Row, Value, Else = null> = { readonly kind: 'conditional'; readonly when: (row: Row, index: number) => boolean | Promise<boolean>; readonly run: StepResolver<Row, Value>; readonly elseValue: Else; else<ValueElse>(value: ValueElse): ConditionalStepResolver<Row, Value, ValueElse>; };",
|
|
9620
|
+
"export type StepOptions<Row, Value = unknown> = { readonly runIf?: (row: Row, index: number) => boolean | Promise<boolean>; readonly recompute?: boolean; readonly recomputeOnError?: boolean; readonly staleAfterSeconds?: number };",
|
|
9621
|
+
"export type StepProgramOptions = { readonly continueOnProviderUnavailable?: boolean };",
|
|
9622
|
+
"export type StepProgram<Input, Output, Return = Output> = { readonly kind: 'steps'; readonly steps: readonly PlayStepProgramStep[]; readonly returnResolver?: StepResolver<Output, Return>; readonly continueOnProviderUnavailable?: boolean; readonly __inputType?: (input: Input) => void; step<Name extends string, Value>(name: Name, resolver: StepResolver<Output, Value> | ConditionalStepResolver<Output, Value> | StepProgramResolver<Output, Value>): StepProgram<Input, Output & Record<Name, Value>, Return>; step<Name extends string, Value>(name: Name, resolver: StepResolver<Output, Value> | StepProgramResolver<Output, Value>, options: StepOptions<Output, Value>): StepProgram<Input, Output & Record<Name, Value | null>, Return>; return<Value>(resolver: StepResolver<Output, Value>): StepProgram<Input, Output, Value>; };",
|
|
9623
|
+
"export type StepProgramResolver<Input, Return> = { readonly kind: 'steps'; readonly steps: readonly PlayStepProgramStep[]; readonly returnResolver?: StepResolver<never, Return>; readonly __inputType?: (input: Input) => void };",
|
|
9624
|
+
"export type RunnableStepProgram<Input, Return> = Pick<StepProgram<Input, never, Return>, 'kind' | 'steps' | 'returnResolver' | '__inputType'>;",
|
|
9625
|
+
"export type RunnableColumnStepProgram<Return> = Pick<StepProgramResolver<unknown, Return>, 'kind' | 'steps' | 'returnResolver'>;",
|
|
9626
|
+
"export type PlayStepProgramStep = { readonly name: string; readonly recompute?: boolean; readonly recomputeOnError?: boolean; readonly staleAfterSeconds?: number; readonly resolver: StepResolver<Record<string, unknown>, unknown> | ConditionalStepResolver<Record<string, unknown>, unknown> | StepProgramResolver<Record<string, unknown>, unknown> };",
|
|
9627
|
+
"export type ColumnResolver<Row, Value> = StepResolver<Row, Value> | ConditionalStepResolver<Row, Value> | RunnableColumnStepProgram<Value>;",
|
|
9628
|
+
"export type StepProgramOutput<TProgram> = TProgram extends StepProgram<unknown, infer Output, unknown> ? Output : never;",
|
|
9629
|
+
"export type DatasetRowKey<InputRow extends object> = (keyof InputRow & string) | readonly (keyof InputRow & string)[] | ((row: InputRow, index: number) => string | number | readonly unknown[]);",
|
|
9630
|
+
"export type DatasetDefinitionOptions<InputRow extends object> = { key?: DatasetRowKey<InputRow> };",
|
|
9631
|
+
`export type DatasetRunOptions<InputRow extends object> = { description?: ${cloudReferenceType("ctx.dataset.run.description")}; key?: DatasetRowKey<InputRow>; onRowError?: ${cloudReferenceType("ctx.dataset.run.onRowError")}; mode?: ${cloudReferenceType("ctx.dataset.run.mode")}; undrawnColumns?: ${cloudReferenceType("ctx.dataset.run.undrawnColumns")} };`,
|
|
9632
|
+
"export type DatasetBuilder<InputRow extends object, OutputRow extends object> = {",
|
|
9633
|
+
" withColumn<Name extends string, Value>(name: Name, resolver: ColumnResolver<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value>>;",
|
|
9634
|
+
" withColumn<Name extends string, Value>(name: Name, definition: DatasetColumnDefinition<OutputRow, Value> & { readonly runIf: (row: OutputRow, index: number) => boolean | Promise<boolean> }): DatasetBuilder<InputRow, OutputRow & Record<Name, Value | null>>;",
|
|
9635
|
+
" withColumn<Name extends string, Value>(name: Name, definition: DatasetColumnDefinition<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value>>;",
|
|
9636
|
+
" withColumn<Name extends string, Value>(name: Name, resolver: StepResolver<OutputRow, Value> | RunnableColumnStepProgram<Value>, options: StepOptions<OutputRow, Value>): DatasetBuilder<InputRow, OutputRow & Record<Name, Value | null>>;",
|
|
9637
|
+
" withColumns<Program extends StepProgram<OutputRow, object, unknown>>(program: Program): DatasetBuilder<InputRow, StepProgramOutput<Program>>;",
|
|
9638
|
+
" step<Name extends string, Value>(name: Name, resolver: ColumnResolver<OutputRow, Value>): never;",
|
|
9639
|
+
" run(options?: DatasetRunOptions<InputRow>): Promise<PlayDataset<OutputRow>>;",
|
|
9640
|
+
"};",
|
|
9641
|
+
"export type PlayReferenceLike = { readonly playName: string; readonly name?: string } | { readonly name: string; readonly playName?: string };",
|
|
9642
|
+
"export interface DeeplinePlayRuntimeContext {",
|
|
9643
|
+
" csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
|
|
9644
|
+
" dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
|
|
9645
|
+
" map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;",
|
|
9646
|
+
" readonly run: { readonly id: string };",
|
|
9647
|
+
` runSteps<TInput extends Record<string, unknown>, TOutput>(program: RunnableStepProgram<TInput, TOutput>, input: TInput, options?: { description?: ${cloudReferenceType("ctx.runSteps.options.description")} }): Promise<TOutput>;`,
|
|
9648
|
+
" tools: { execute<K extends string>(request: ToolExecutionRequest<K>): Promise<ToolExecutionOutput<K>> };",
|
|
9649
|
+
` customerDb: { query<TRow extends Record<string, unknown> = Record<string, unknown>>(statement: SqlQuery, options?: { maxRows?: ${cloudReferenceType("ctx.customerDb.query.options.maxRows")}; timeoutMs?: ${cloudReferenceType("ctx.customerDb.query.options.timeoutMs")} }): Promise<TRow[]> };`,
|
|
9650
|
+
` tool<K extends string>(key: ${cloudReferenceType("ctx.tool.key")}, toolId: K, input: ${cloudReferenceType("ctx.tool.input")}, options?: { description?: ${cloudReferenceType("ctx.tool.options.description")} }): Promise<ToolExecutionOutput<K>>;`,
|
|
9651
|
+
" step<T>(id: string, run: () => T | Promise<T>, options?: RuntimeStepOptions): Promise<T>;",
|
|
9652
|
+
" fetch(key: string, url: string | URL, init?: RequestInit & { headers?: HeadersInit & { 'Idempotency-Key'?: string; 'X-Idempotency-Key'?: string }; auth?: SecretAuthInput }, options?: FetchOptions): Promise<PlayFetchResponse>;",
|
|
9653
|
+
" secrets: { get(name: string): SecretPromise; bearer(secret: string | SecretPromise | SecretHandle): SecretAuth; header(header: string, secret: string | SecretPromise | SecretHandle): SecretAuth };",
|
|
9654
|
+
` runPlay<TOutput = unknown>(key: string, playRef: ${cloudReferenceType("ctx.runPlay.playRef")}, input: ${cloudReferenceType("ctx.runPlay.input")}, options: PlayCallOptions): Promise<TOutput>;`,
|
|
9655
|
+
" log(message: string): void;",
|
|
9656
|
+
` sleep(ms: ${cloudReferenceType("ctx.sleep.ms")}): Promise<void>;`,
|
|
9657
|
+
"}",
|
|
9658
|
+
"export type DefinePlayConfig<TInput, TOutput extends PlayReturnObject> = { id: string; description?: string; input: PlayInputContract<TInput>; run: (ctx: DeeplinePlayRuntimeContext, input: TInput) => Promise<TOutput>; bindings?: PlayBindings; billing?: PlayBindings['billing']; runtime?: PlayBindings['runtime']; compatibility?: PlayBindings['compatibility'] };",
|
|
9659
|
+
"export type DefinedPlay<TInput, TOutput extends PlayReturnObject> = ((ctx: DeeplinePlayRuntimeContext, input: TInput) => Promise<TOutput>) & { readonly name: string; readonly __inputType?: TInput; readonly __outputType?: TOutput; readonly runtime?: PlayBindings['runtime']; readonly compatibility?: PlayBindings['compatibility'] };"
|
|
9660
|
+
];
|
|
9661
|
+
|
|
8381
9662
|
// ../play-runtime/query-result-dataset.ts
|
|
8382
9663
|
var QUERY_RESULT_DATASET_PAGE_SIZE = 1e3;
|
|
8383
9664
|
function isCustomerDbDatasetTool(toolId) {
|
|
@@ -9072,6 +10353,122 @@ function getDefinedPlayMetadata(value) {
|
|
|
9072
10353
|
return candidate;
|
|
9073
10354
|
}
|
|
9074
10355
|
|
|
10356
|
+
// src/monitors.ts
|
|
10357
|
+
function defineMonitor(definition) {
|
|
10358
|
+
if (!definition || typeof definition !== "object") {
|
|
10359
|
+
throw new Error("defineMonitor(definition) requires a definition object.");
|
|
10360
|
+
}
|
|
10361
|
+
const key = typeof definition.key === "string" ? definition.key.trim() : "";
|
|
10362
|
+
if (!key) {
|
|
10363
|
+
throw new Error('defineMonitor(definition) requires a non-empty "key".');
|
|
10364
|
+
}
|
|
10365
|
+
const tool = typeof definition.tool === "string" ? definition.tool.trim() : "";
|
|
10366
|
+
if (!tool) {
|
|
10367
|
+
throw new Error(
|
|
10368
|
+
'defineMonitor(definition) requires a non-empty monitor tool id in "tool" (e.g. "deepline_native.company_radar").'
|
|
10369
|
+
);
|
|
10370
|
+
}
|
|
10371
|
+
if (!definition.payload || typeof definition.payload !== "object" || Array.isArray(definition.payload)) {
|
|
10372
|
+
throw new Error(
|
|
10373
|
+
'defineMonitor(definition) requires "payload" to be a JSON object.'
|
|
10374
|
+
);
|
|
10375
|
+
}
|
|
10376
|
+
if (definition.name !== void 0 && typeof definition.name !== "string") {
|
|
10377
|
+
throw new Error('defineMonitor(definition) "name" must be a string.');
|
|
10378
|
+
}
|
|
10379
|
+
if (definition.controls !== void 0 && (typeof definition.controls !== "object" || Array.isArray(definition.controls))) {
|
|
10380
|
+
throw new Error(
|
|
10381
|
+
'defineMonitor(definition) "controls" must be a JSON object.'
|
|
10382
|
+
);
|
|
10383
|
+
}
|
|
10384
|
+
return definition;
|
|
10385
|
+
}
|
|
10386
|
+
|
|
10387
|
+
// ../plays/bootstrap-routes.ts
|
|
10388
|
+
var DEEPLINE_TOOL_CATEGORIES = [
|
|
10389
|
+
"company_search",
|
|
10390
|
+
"people_search",
|
|
10391
|
+
"people_enrich",
|
|
10392
|
+
"email_finder",
|
|
10393
|
+
"email_verify",
|
|
10394
|
+
"phone_finder",
|
|
10395
|
+
"phone_verify",
|
|
10396
|
+
"identity_resolution",
|
|
10397
|
+
"reverse_lookup",
|
|
10398
|
+
"enrichment",
|
|
10399
|
+
"batch",
|
|
10400
|
+
"premium",
|
|
10401
|
+
"free"
|
|
10402
|
+
];
|
|
10403
|
+
var PLAY_BOOTSTRAP_TEMPLATES = [
|
|
10404
|
+
"people-list",
|
|
10405
|
+
"company-list",
|
|
10406
|
+
"people-email",
|
|
10407
|
+
"people-phone",
|
|
10408
|
+
"company-people",
|
|
10409
|
+
"company-people-email",
|
|
10410
|
+
"company-people-phone"
|
|
10411
|
+
];
|
|
10412
|
+
var PLAY_BOOTSTRAP_SOURCE_KINDS = [
|
|
10413
|
+
"csv",
|
|
10414
|
+
"play",
|
|
10415
|
+
"provider",
|
|
10416
|
+
"providers"
|
|
10417
|
+
];
|
|
10418
|
+
var PLAY_BOOTSTRAP_STAGE_KINDS = [
|
|
10419
|
+
"play",
|
|
10420
|
+
"provider",
|
|
10421
|
+
"providers"
|
|
10422
|
+
];
|
|
10423
|
+
var PLAY_BOOTSTRAP_FINDER_KINDS = [
|
|
10424
|
+
"email_finder",
|
|
10425
|
+
"phone_finder"
|
|
10426
|
+
];
|
|
10427
|
+
var PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY = "company_search";
|
|
10428
|
+
var PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY = "people_search";
|
|
10429
|
+
var PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER = {
|
|
10430
|
+
email_finder: "email_finder",
|
|
10431
|
+
phone_finder: "phone_finder"
|
|
10432
|
+
};
|
|
10433
|
+
var PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER = {
|
|
10434
|
+
email_finder: "email",
|
|
10435
|
+
phone_finder: "phone"
|
|
10436
|
+
};
|
|
10437
|
+
var PLAY_BOOTSTRAP_CONTACT_FIELDS = [
|
|
10438
|
+
"first_name",
|
|
10439
|
+
"last_name",
|
|
10440
|
+
"domain",
|
|
10441
|
+
"company_name",
|
|
10442
|
+
"linkedin_url",
|
|
10443
|
+
"title",
|
|
10444
|
+
"email",
|
|
10445
|
+
"phone"
|
|
10446
|
+
];
|
|
10447
|
+
var PLAY_BOOTSTRAP_COMPANY_FIELDS = [
|
|
10448
|
+
"domain",
|
|
10449
|
+
"company_domain",
|
|
10450
|
+
"company_name",
|
|
10451
|
+
"linkedin_url",
|
|
10452
|
+
"website"
|
|
10453
|
+
];
|
|
10454
|
+
function isPlayBootstrapFinderKind(value) {
|
|
10455
|
+
return PLAY_BOOTSTRAP_FINDER_KINDS.includes(value);
|
|
10456
|
+
}
|
|
10457
|
+
function isPlayBootstrapTemplate(value) {
|
|
10458
|
+
return PLAY_BOOTSTRAP_TEMPLATES.includes(value);
|
|
10459
|
+
}
|
|
10460
|
+
function formatPlayBootstrapFinderKinds() {
|
|
10461
|
+
return PLAY_BOOTSTRAP_FINDER_KINDS.join("|");
|
|
10462
|
+
}
|
|
10463
|
+
function formatPlayBootstrapTemplates() {
|
|
10464
|
+
return PLAY_BOOTSTRAP_TEMPLATES.join("|");
|
|
10465
|
+
}
|
|
10466
|
+
function formatPlayBootstrapFinderKindsForSentence() {
|
|
10467
|
+
const allButLast = PLAY_BOOTSTRAP_FINDER_KINDS.slice(0, -1);
|
|
10468
|
+
const last = PLAY_BOOTSTRAP_FINDER_KINDS.at(-1);
|
|
10469
|
+
return `${allButLast.join(", ")} or ${last}`;
|
|
10470
|
+
}
|
|
10471
|
+
|
|
9075
10472
|
// src/tool-output.ts
|
|
9076
10473
|
var import_node_fs3 = require("fs");
|
|
9077
10474
|
var import_node_os3 = require("os");
|
|
@@ -9260,6 +10657,7 @@ function extractSummaryFields(payload) {
|
|
|
9260
10657
|
0 && (module.exports = {
|
|
9261
10658
|
AuthError,
|
|
9262
10659
|
ConfigError,
|
|
10660
|
+
CtxFetchHttpError,
|
|
9263
10661
|
DEEPLINE_EXTRACTOR_TARGETS,
|
|
9264
10662
|
DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS,
|
|
9265
10663
|
DEEPLINE_TOOL_CATEGORIES,
|