deepline 0.3.59 → 0.3.60

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/index.mjs CHANGED
@@ -738,7 +738,7 @@ var SDK_RELEASE = {
738
738
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
739
739
  // getters keep their established compatibility behavior.
740
740
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
741
- version: "0.3.59",
741
+ version: "0.3.60",
742
742
  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.",
743
743
  packageCapabilities: {
744
744
  updatePreferences: 1
@@ -4508,6 +4508,7 @@ var DeeplineClient = class {
4508
4508
  ...this.summarizePlayListItem(play, options),
4509
4509
  currentPublishedVersion: play.currentPublishedVersion ?? play.liveRevision?.version ?? null,
4510
4510
  latestRunId: play.latestRunId ?? detail.latestRuns[0]?.workflowId ?? null,
4511
+ ...play.triggerMetadata ? { triggerMetadata: play.triggerMetadata } : {},
4511
4512
  ...play.runtimeLimit ? { runtimeLimit: play.runtimeLimit } : {},
4512
4513
  ...play.activeScheduledPlays ? { activeScheduledPlays: play.activeScheduledPlays } : {}
4513
4514
  };
@@ -8307,6 +8308,39 @@ var PLAY_SQL_LISTENER_TOOL_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*\.[a-zA-Z][a-zA-Z0-
8307
8308
  var PLAY_SQL_LISTENER_WHERE_OPERATOR_SET = new Set(
8308
8309
  PLAY_SQL_LISTENER_WHERE_OPERATORS
8309
8310
  );
8311
+ var PLAY_AUTHORING_BINDING_FIELDS = {
8312
+ root: [
8313
+ "billing",
8314
+ "compatibility",
8315
+ "cron",
8316
+ "inline",
8317
+ "runtime",
8318
+ "secrets",
8319
+ "sqlListeners",
8320
+ "webhook"
8321
+ ],
8322
+ cron: ["schedule", "timezone", "input"],
8323
+ webhook: ["auth", "hmac"],
8324
+ sqlListener: [
8325
+ "id",
8326
+ "tool",
8327
+ "stream",
8328
+ "where",
8329
+ "table",
8330
+ "monitor",
8331
+ "output",
8332
+ "operations"
8333
+ ]
8334
+ };
8335
+ var PLAY_AUTHORING_DEFINE_PLAY_OPTION_FIELDS = [
8336
+ "id",
8337
+ "name",
8338
+ "description",
8339
+ "input",
8340
+ "run",
8341
+ "bindings",
8342
+ ...PLAY_AUTHORING_BINDING_FIELDS.root
8343
+ ];
8310
8344
  var CtxFetchHttpError = class extends Error {
8311
8345
  /** Build the error from the durable response record. */
8312
8346
  constructor(response) {
@@ -8606,6 +8640,22 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
8606
8640
  description: "IANA timezone. Omitted means UTC.",
8607
8641
  errorMessage: "bindings.cron.timezone must be a valid non-empty IANA timezone string."
8608
8642
  },
8643
+ "bindings.cron.input": {
8644
+ schema: Type.Object({}, { additionalProperties: true }),
8645
+ fixtures: {
8646
+ valid: { apply: true },
8647
+ invalid: ["apply"],
8648
+ absent: void 0,
8649
+ unresolved: ["cronInput"],
8650
+ edition1: void 0
8651
+ },
8652
+ referenceType: "Record<string, unknown>",
8653
+ required: false,
8654
+ resolution: "static-required",
8655
+ issueCode: "play_authoring_binding_invalid",
8656
+ description: "Static JSON object passed to every run created by this cron binding.",
8657
+ errorMessage: "bindings.cron.input must be a static JSON object (no variables, spreads, or functions)."
8658
+ },
8609
8659
  "bindings.sqlListeners": {
8610
8660
  schema: Type.Array(Type.Object({}, { additionalProperties: true })),
8611
8661
  fixtures: {
@@ -9609,14 +9659,15 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9609
9659
  " readonly timeoutMs?: PlayRuntimeTimeoutMs;",
9610
9660
  " readonly receiptWaitMs?: PlayReceiptWaitMs;",
9611
9661
  "};",
9612
- "export type PlayBindings = {",
9662
+ "export type PlayCronInput<TInput> = TInput extends readonly unknown[] ? never : TInput extends object ? TInput : never;",
9663
+ "export type PlayBindings<TInput = Record<string, unknown>> = {",
9613
9664
  ` description?: ${cloudReferenceType("description")};`,
9614
9665
  ` compatibility?: { toolErrorSchemaVersion?: ${cloudReferenceType("compatibility.toolErrorSchemaVersion")}; toolResponseReceiptRevision?: ${cloudReferenceType("compatibility.toolResponseReceiptRevision")} };`,
9615
9666
  ` inline?: ${cloudReferenceType("inline")};`,
9616
9667
  ` billing?: { maxCreditsPerRun?: ${cloudReferenceType("billing.maxCreditsPerRun")} };`,
9617
9668
  ` runtime?: { timeout?: ${cloudReferenceType("runtime.timeout")}; size?: ${cloudReferenceType("runtime.size")} };`,
9618
9669
  ` 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")} } };`,
9619
- ` cron?: { schedule: ${cloudReferenceType("bindings.cron.schedule")}; timezone?: ${cloudReferenceType("bindings.cron.timezone")} };`,
9670
+ ` cron?: { schedule: ${cloudReferenceType("bindings.cron.schedule")}; timezone?: ${cloudReferenceType("bindings.cron.timezone")}; input?: PlayCronInput<TInput> };`,
9620
9671
  " sqlListeners?: readonly SqlListenerDeclaration[];",
9621
9672
  ` secrets?: readonly ${cloudReferenceType("bindings.secrets[]")}[];`,
9622
9673
  "};",
@@ -9682,8 +9733,10 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
9682
9733
  " log(message: string): void;",
9683
9734
  ` sleep(ms: ${cloudReferenceType("ctx.sleep.ms")}): Promise<void>;`,
9684
9735
  "}",
9685
- "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'] };",
9686
- "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'] };"
9736
+ "export type DefinePlayConfig<TInput, TOutput extends PlayReturnObject> = { id: string; description?: string; input: PlayInputContract<TInput>; run: (ctx: DeeplinePlayRuntimeContext, input: TInput) => Promise<TOutput>; bindings?: PlayBindings<TInput>; billing?: PlayBindings<TInput>['billing']; runtime?: PlayBindings<TInput>['runtime']; compatibility?: PlayBindings<TInput>['compatibility'] };",
9737
+ "export type DefinedPlay<TInput, TOutput extends PlayReturnObject> = ((ctx: DeeplinePlayRuntimeContext, input: TInput) => Promise<TOutput>) & { readonly name: string; readonly __inputType?: TInput; readonly __outputType?: TOutput; readonly bindings?: PlayBindings<TInput>; readonly runtime?: PlayBindings<TInput>['runtime']; readonly compatibility?: PlayBindings<TInput>['compatibility'] };",
9738
+ "export type PlayHandlerInput<THandler> = THandler extends (context: DeeplinePlayRuntimeContext, input: infer TInput) => Promise<PlayReturnObject> ? TInput : never;",
9739
+ "export type PlayHandlerOutput<THandler> = THandler extends (context: DeeplinePlayRuntimeContext, input: unknown) => Promise<infer TOutput extends PlayReturnObject> ? TOutput : never;"
9687
9740
  ];
9688
9741
 
9689
9742
  // ../play-runtime/query-result-dataset.ts
@@ -262,8 +262,8 @@
262
262
  "dist/cli/index.js",
263
263
  "dist/cli/index.mjs",
264
264
  "dist/cli/text-imports.d.ts",
265
- "dist/compiler-manifest-B47AA7As.d.mts",
266
- "dist/compiler-manifest-B47AA7As.d.ts",
265
+ "dist/compiler-manifest-IkyvsUO-.d.mts",
266
+ "dist/compiler-manifest-IkyvsUO-.d.ts",
267
267
  "dist/helpers.d.mts",
268
268
  "dist/helpers.d.ts",
269
269
  "dist/helpers.js",
@@ -1,6 +1,6 @@
1
1
  /// <reference path="./text-imports.d.ts" />
2
- import { P as PlayArtifactKind, a as PlayBundleArtifact, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-B47AA7As.mjs';
3
- export { d as PLAY_ARTIFACT_KINDS, e as PlayArtifactCompatibility, f as PlayImportPolicy, g as PlayPackageImport, h as PlayRuntimeFeature } from '../compiler-manifest-B47AA7As.mjs';
2
+ import { P as PlayArtifactKind, a as PlayBundleArtifact, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-IkyvsUO-.mjs';
3
+ export { d as PLAY_ARTIFACT_KINDS, e as PlayArtifactCompatibility, f as PlayImportPolicy, g as PlayPackageImport, h as PlayRuntimeFeature } from '../compiler-manifest-IkyvsUO-.mjs';
4
4
  import '@sinclair/typebox';
5
5
 
6
6
  type ImportedPlayDependency = {
@@ -1,6 +1,6 @@
1
1
  /// <reference path="./text-imports.d.ts" />
2
- import { P as PlayArtifactKind, a as PlayBundleArtifact, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-B47AA7As.js';
3
- export { d as PLAY_ARTIFACT_KINDS, e as PlayArtifactCompatibility, f as PlayImportPolicy, g as PlayPackageImport, h as PlayRuntimeFeature } from '../compiler-manifest-B47AA7As.js';
2
+ import { P as PlayArtifactKind, a as PlayBundleArtifact, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-IkyvsUO-.js';
3
+ export { d as PLAY_ARTIFACT_KINDS, e as PlayArtifactCompatibility, f as PlayImportPolicy, g as PlayPackageImport, h as PlayRuntimeFeature } from '../compiler-manifest-IkyvsUO-.js';
4
4
  import '@sinclair/typebox';
5
5
 
6
6
  type ImportedPlayDependency = {
@@ -48,7 +48,7 @@ var CURRENT_PLAY_ARTIFACT_CONTRACT_VERSION = 2;
48
48
  // ../plays/authoring-contract.ts
49
49
  import { Type } from "@sinclair/typebox";
50
50
  import { Value } from "@sinclair/typebox/value";
51
- var PLAY_AUTHORING_CONTRACT_EDITION = 5;
51
+ var PLAY_AUTHORING_CONTRACT_EDITION = 6;
52
52
  var PLAY_SQL_LISTENER_WHERE_OPERATORS = [
53
53
  "eq",
54
54
  "neq",
@@ -63,6 +63,39 @@ var PLAY_SQL_LISTENER_TOOL_PATTERN = /^[a-zA-Z][a-zA-Z0-9_-]*\.[a-zA-Z][a-zA-Z0-
63
63
  var PLAY_SQL_LISTENER_WHERE_OPERATOR_SET = new Set(
64
64
  PLAY_SQL_LISTENER_WHERE_OPERATORS
65
65
  );
66
+ var PLAY_AUTHORING_BINDING_FIELDS = {
67
+ root: [
68
+ "billing",
69
+ "compatibility",
70
+ "cron",
71
+ "inline",
72
+ "runtime",
73
+ "secrets",
74
+ "sqlListeners",
75
+ "webhook"
76
+ ],
77
+ cron: ["schedule", "timezone", "input"],
78
+ webhook: ["auth", "hmac"],
79
+ sqlListener: [
80
+ "id",
81
+ "tool",
82
+ "stream",
83
+ "where",
84
+ "table",
85
+ "monitor",
86
+ "output",
87
+ "operations"
88
+ ]
89
+ };
90
+ var PLAY_AUTHORING_DEFINE_PLAY_OPTION_FIELDS = [
91
+ "id",
92
+ "name",
93
+ "description",
94
+ "input",
95
+ "run",
96
+ "bindings",
97
+ ...PLAY_AUTHORING_BINDING_FIELDS.root
98
+ ];
66
99
  var PLAY_AUTHORING_DOCUMENTATION = {
67
100
  fetchBatching: {
68
101
  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.",
@@ -324,6 +357,22 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
324
357
  description: "IANA timezone. Omitted means UTC.",
325
358
  errorMessage: "bindings.cron.timezone must be a valid non-empty IANA timezone string."
326
359
  },
360
+ "bindings.cron.input": {
361
+ schema: Type.Object({}, { additionalProperties: true }),
362
+ fixtures: {
363
+ valid: { apply: true },
364
+ invalid: ["apply"],
365
+ absent: void 0,
366
+ unresolved: ["cronInput"],
367
+ edition1: void 0
368
+ },
369
+ referenceType: "Record<string, unknown>",
370
+ required: false,
371
+ resolution: "static-required",
372
+ issueCode: "play_authoring_binding_invalid",
373
+ description: "Static JSON object passed to every run created by this cron binding.",
374
+ errorMessage: "bindings.cron.input must be a static JSON object (no variables, spreads, or functions)."
375
+ },
327
376
  "bindings.sqlListeners": {
328
377
  schema: Type.Array(Type.Object({}, { additionalProperties: true })),
329
378
  fixtures: {
@@ -1327,14 +1376,15 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
1327
1376
  " readonly timeoutMs?: PlayRuntimeTimeoutMs;",
1328
1377
  " readonly receiptWaitMs?: PlayReceiptWaitMs;",
1329
1378
  "};",
1330
- "export type PlayBindings = {",
1379
+ "export type PlayCronInput<TInput> = TInput extends readonly unknown[] ? never : TInput extends object ? TInput : never;",
1380
+ "export type PlayBindings<TInput = Record<string, unknown>> = {",
1331
1381
  ` description?: ${cloudReferenceType("description")};`,
1332
1382
  ` compatibility?: { toolErrorSchemaVersion?: ${cloudReferenceType("compatibility.toolErrorSchemaVersion")}; toolResponseReceiptRevision?: ${cloudReferenceType("compatibility.toolResponseReceiptRevision")} };`,
1333
1383
  ` inline?: ${cloudReferenceType("inline")};`,
1334
1384
  ` billing?: { maxCreditsPerRun?: ${cloudReferenceType("billing.maxCreditsPerRun")} };`,
1335
1385
  ` runtime?: { timeout?: ${cloudReferenceType("runtime.timeout")}; size?: ${cloudReferenceType("runtime.size")} };`,
1336
1386
  ` 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")} } };`,
1337
- ` cron?: { schedule: ${cloudReferenceType("bindings.cron.schedule")}; timezone?: ${cloudReferenceType("bindings.cron.timezone")} };`,
1387
+ ` cron?: { schedule: ${cloudReferenceType("bindings.cron.schedule")}; timezone?: ${cloudReferenceType("bindings.cron.timezone")}; input?: PlayCronInput<TInput> };`,
1338
1388
  " sqlListeners?: readonly SqlListenerDeclaration[];",
1339
1389
  ` secrets?: readonly ${cloudReferenceType("bindings.secrets[]")}[];`,
1340
1390
  "};",
@@ -1400,8 +1450,10 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
1400
1450
  " log(message: string): void;",
1401
1451
  ` sleep(ms: ${cloudReferenceType("ctx.sleep.ms")}): Promise<void>;`,
1402
1452
  "}",
1403
- "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'] };",
1404
- "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'] };"
1453
+ "export type DefinePlayConfig<TInput, TOutput extends PlayReturnObject> = { id: string; description?: string; input: PlayInputContract<TInput>; run: (ctx: DeeplinePlayRuntimeContext, input: TInput) => Promise<TOutput>; bindings?: PlayBindings<TInput>; billing?: PlayBindings<TInput>['billing']; runtime?: PlayBindings<TInput>['runtime']; compatibility?: PlayBindings<TInput>['compatibility'] };",
1454
+ "export type DefinedPlay<TInput, TOutput extends PlayReturnObject> = ((ctx: DeeplinePlayRuntimeContext, input: TInput) => Promise<TOutput>) & { readonly name: string; readonly __inputType?: TInput; readonly __outputType?: TOutput; readonly bindings?: PlayBindings<TInput>; readonly runtime?: PlayBindings<TInput>['runtime']; readonly compatibility?: PlayBindings<TInput>['compatibility'] };",
1455
+ "export type PlayHandlerInput<THandler> = THandler extends (context: DeeplinePlayRuntimeContext, input: infer TInput) => Promise<PlayReturnObject> ? TInput : never;",
1456
+ "export type PlayHandlerOutput<THandler> = THandler extends (context: DeeplinePlayRuntimeContext, input: unknown) => Promise<infer TOutput extends PlayReturnObject> ? TOutput : never;"
1405
1457
  ];
1406
1458
 
1407
1459
  // ../plays/tool-response-contract.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.59",
3
+ "version": "0.3.60",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",