deepline 0.3.100 → 0.3.102

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.
@@ -766,8 +766,7 @@ export type PlaySecretCheck = {
766
766
  };
767
767
 
768
768
  /**
769
- * `client.runs` mirrors `/api/v2/runs`: the preferred low-level surface for
770
- * polling, streaming, stopping, reading logs, and exporting durable dataset rows.
769
+ * Use `client.runs` (`/api/v2/runs`) to poll, stream, stop, read logs, and export durable dataset rows.
771
770
  *
772
771
  * @sdkReference client 020 client.runs
773
772
  */
@@ -1091,7 +1090,10 @@ export type MonitorBatchExistingSubmitOptions = {
1091
1090
  kind: 'audit' | 'deactivate' | 'reactivate' | 'repair';
1092
1091
  scope: MonitorBatchScope;
1093
1092
  dryRun?: boolean;
1094
- /** Required for deactivate; it is the declared reason shown by health/UI. */
1093
+ /**
1094
+ * A declared policy reason for target deactivation. Omit it for an explicit
1095
+ * customer-owned key teardown; absent is the durable customer intent.
1096
+ */
1095
1097
  deactivationReason?: string;
1096
1098
  /** Stable retry key. Reusing it joins the original durable operation. */
1097
1099
  idempotencyKey: string;
@@ -5089,6 +5091,50 @@ export class DeeplineClient {
5089
5091
  return this.http.get<PlayDetail>(`/api/v2/plays/${encodedName}${query}`);
5090
5092
  }
5091
5093
 
5094
+ /** Read one trigger inventory page without loading run histories. */
5095
+ async listPlayTriggerInventory(options?: { cursor?: string }): Promise<{
5096
+ page: Array<{
5097
+ bindingId: string;
5098
+ name: string;
5099
+ type: string;
5100
+ status: string;
5101
+ cron: string | null;
5102
+ timezone: string | null;
5103
+ nextScheduledAt: number | null;
5104
+ }>;
5105
+ continueCursor: string;
5106
+ isDone: boolean;
5107
+ }> {
5108
+ const params = new URLSearchParams({ view: 'inventory' });
5109
+ if (options?.cursor) params.set('cursor', options.cursor);
5110
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
5111
+ }
5112
+
5113
+ /** Read one trigger's recent runs, with an explicit partial-history flag. */
5114
+ async getPlayTriggerHistory(
5115
+ bindingId: string,
5116
+ options?: { limit?: number },
5117
+ ): Promise<{
5118
+ recentRuns: Array<{
5119
+ workflowId: string;
5120
+ runId: string | null;
5121
+ status: string;
5122
+ createdAt: number;
5123
+ startedAt: number | null;
5124
+ finishedAt: number | null;
5125
+ }>;
5126
+ truncated: boolean;
5127
+ cronInput: Record<string, unknown> | null;
5128
+ }> {
5129
+ const params = new URLSearchParams({
5130
+ view: 'history',
5131
+ binding_id: bindingId,
5132
+ });
5133
+ if (options?.limit !== undefined)
5134
+ params.set('history_limit', String(options.limit));
5135
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
5136
+ }
5137
+
5092
5138
  /**
5093
5139
  * Get a normalized play description suitable for agents and CLIs.
5094
5140
  *
@@ -5,6 +5,7 @@ import { existsSync } from 'node:fs';
5
5
  import { realpath } from 'node:fs/promises';
6
6
  import {
7
7
  bundlePlayFile as bundlePlayFileCore,
8
+ PLAY_BUNDLE_CACHE_NAMESPACE,
8
9
  type BundlePlayFileOptions,
9
10
  type BundledPlayFileSuccess,
10
11
  type BundledPlayFileResult,
@@ -40,7 +41,6 @@ export type {
40
41
 
41
42
  export { extractDefinedPlayName } from '../../../shared_libs/plays/bundling/index.js';
42
43
 
43
- const PLAY_BUNDLE_CACHE_VERSION = 37;
44
44
  const MODULE_DIR = dirname(fileURLToPath(import.meta.url));
45
45
  const SDK_PACKAGE_ROOT = resolve(MODULE_DIR, '..', '..');
46
46
  const SOURCE_REPO_ROOT = resolve(SDK_PACKAGE_ROOT, '..', '..');
@@ -126,10 +126,7 @@ export function createSdkPlayBundlingAdapter(): PlayBundlingAdapter {
126
126
  nodeModulesDir: HAS_PACKAGED_BUNDLING_SOURCES
127
127
  ? resolve(SDK_PACKAGE_ROOT, 'node_modules')
128
128
  : resolve(PROJECT_ROOT, 'node_modules'),
129
- cacheDir: join(
130
- tmpdir(),
131
- `deepline-play-artifacts-v${PLAY_BUNDLE_CACHE_VERSION}`,
132
- ),
129
+ cacheDir: join(tmpdir(), PLAY_BUNDLE_CACHE_NAMESPACE),
133
130
  sdkSourceRoot: SDK_SOURCE_ROOT,
134
131
  sdkPackageJson: SDK_PACKAGE_JSON,
135
132
  sdkEntryFile: SDK_ENTRY_FILE,
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
202
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
203
- version: '0.3.100',
203
+ version: '0.3.102',
204
204
  updateSummary:
205
205
  'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
206
206
  packageCapabilities: {
@@ -78,7 +78,11 @@ export type ProviderMonitorBatchOperationRequest = {
78
78
  * this origin instead of recomputing it from a later deployment.
79
79
  */
80
80
  callbackBaseUrl?: string;
81
- /** Required for direct/target deactivation; Fleet teardown may be customer-owned. */
81
+ /**
82
+ * A closed, platform-owned reason for a policy teardown. Omit it for a
83
+ * customer-owned exact-key or Fleet teardown: absence is the durable
84
+ * representation of the customer's own inactive intent.
85
+ */
82
86
  deactivationReason?: string;
83
87
  };
84
88
 
@@ -204,13 +208,11 @@ export function validateProviderMonitorBatchOperationRequest(
204
208
  if (request.kind === 'converge') {
205
209
  throw new Error('Batch converge requires exactly one Fleet scope.');
206
210
  }
207
- if (request.kind === 'deactivate' && !request.deactivationReason) {
208
- throw new Error(
209
- 'Batch deactivate requires a declared deactivation reason.',
210
- );
211
- }
212
- if (request.kind === 'deactivate') {
213
- requireMonitorDeactivationReason(request.deactivationReason!);
211
+ if (
212
+ request.kind === 'deactivate' &&
213
+ request.deactivationReason !== undefined
214
+ ) {
215
+ requireMonitorDeactivationReason(request.deactivationReason);
214
216
  }
215
217
  return {
216
218
  ...request,
@@ -59,15 +59,11 @@ import { validatePlaySourceFilesHaveNoInlineSecrets } from '../secret-guardrails
59
59
  import { MAX_PLAY_BUNDLE_BYTES } from './limits';
60
60
  import { PLAY_AUTHORING_CONTRACT_EDITION } from '../authoring-contract';
61
61
 
62
- // The authored tool-error schema and the authored docflow block are both part
63
- // of the artifact bytes. Do not reuse a local bundle cached before either
64
- // compatibility selection or docflow instrumentation entered graph analysis.
65
- // Keep this aligned with the app and SDK adapters' cache namespace.
66
- const PLAY_BUNDLE_CACHE_VERSION = 37;
67
- const PLAY_ARTIFACT_CACHE_DIR = join(
68
- tmpdir(),
69
- `deepline-play-artifacts-v${PLAY_BUNDLE_CACHE_VERSION}`,
70
- );
62
+ // Local bundle caches may be discarded when compiler-only analysis changes;
63
+ // this descriptive namespace is not a runtime wire or schema version.
64
+ export const PLAY_BUNDLE_CACHE_NAMESPACE =
65
+ 'deepline-play-artifacts-docflow-jsdoc';
66
+ const PLAY_ARTIFACT_CACHE_DIR = join(tmpdir(), PLAY_BUNDLE_CACHE_NAMESPACE);
71
67
  const PLAY_PROXY_NAMESPACE = 'deepline-play-runtime-ref';
72
68
  const SOURCE_EXTENSIONS = [
73
69
  '.ts',
@@ -1,6 +1,6 @@
1
1
  import { tmpdir } from 'node:os';
2
2
  import { join, resolve } from 'node:path';
3
- import type { PlayBundlingAdapter } from './index';
3
+ import { PLAY_BUNDLE_CACHE_NAMESPACE, type PlayBundlingAdapter } from './index';
4
4
  import { discoverPackagedLocalFiles } from '../local-file-discovery';
5
5
 
6
6
  /** Repository source bundling shared by the API and the deploy worker.
@@ -15,7 +15,7 @@ export function createRepositoryPlayBundlingAdapter(options: {
15
15
  projectRoot: options.projectRoot,
16
16
  sourceIdentityRoot: options.sourceIdentityRoot,
17
17
  nodeModulesDir: resolve(options.projectRoot, 'node_modules'),
18
- cacheDir: join(tmpdir(), 'deepline-play-artifacts-v37'),
18
+ cacheDir: join(tmpdir(), PLAY_BUNDLE_CACHE_NAMESPACE),
19
19
  sdkSourceRoot,
20
20
  sdkPackageJson: resolve(sdkSourceRoot, '..', 'package.json'),
21
21
  sdkEntryFile: resolve(sdkSourceRoot, 'index.ts'),
@@ -44,6 +44,7 @@ export type PlayProjectDoc = {
44
44
  productionBranch: string;
45
45
  checkOnPullRequest: boolean;
46
46
  disabledAt?: number;
47
+ unlinkedAt?: number;
47
48
  createdByUserId: string;
48
49
  createdAt: number;
49
50
  updatedAt: number;
@@ -617,7 +617,7 @@ function levenshtein(left: string, right: string): number {
617
617
  return row[right.length]!;
618
618
  }
619
619
 
620
- const MERMAID_BLOCK = /\/\*\*\s*@mermaid(?:\s|\r?\n)([\s\S]*?)\*\//g;
620
+ const JSDOC_BLOCK = /\/\*\*([\s\S]*?)\*\//g;
621
621
  /**
622
622
  * What a block header may name: an export name, or the play's own kebab-case
623
623
  * name. Hyphens are in the set for the second — `@mermaid name-to-linkedin-url-
@@ -935,9 +935,12 @@ export function parsePlayDocflowFile(
935
935
  syntax: NonNullable<PlayDocflow['syntax']>;
936
936
  body: string;
937
937
  }> = [];
938
- MERMAID_BLOCK.lastIndex = 0;
939
- for (const match of sourceCode.matchAll(MERMAID_BLOCK)) {
940
- rawBlocks.push({ syntax: 'mermaid', body: cleanBlockBody(match[1]!) });
938
+ JSDOC_BLOCK.lastIndex = 0;
939
+ for (const match of sourceCode.matchAll(JSDOC_BLOCK)) {
940
+ const cleanedBody = cleanBlockBody(match[1]!);
941
+ const mermaid = /^@mermaid(?:[ \t]+|\r?\n|$)([\s\S]*)$/.exec(cleanedBody);
942
+ if (!mermaid) continue;
943
+ rawBlocks.push({ syntax: 'mermaid', body: mermaid[1]!.trim() });
941
944
  }
942
945
  if (rawBlocks.length === 0) return { blocks: [], bindings: [], errors };
943
946
 
@@ -2,6 +2,10 @@ const REDACTED_VALUE = '[REDACTED]';
2
2
 
3
3
  type SecretRedactionOptions = {
4
4
  redactHighEntropy?: boolean;
5
+ /** Preserve only known pagination cursor fields in authenticated result data. */
6
+ keyPolicy?: 'strict' | 'public-result';
7
+ /** Replace sample cursor values with a non-capability-bearing placeholder. */
8
+ placeholderContinuationValues?: boolean;
5
9
  };
6
10
 
7
11
  const SENSITIVE_KEY_PATTERNS = [
@@ -16,6 +20,55 @@ const SENSITIVE_KEY_PATTERNS = [
16
20
  /private/i,
17
21
  ];
18
22
 
23
+ const PUBLIC_RESULT_CURSOR_KEYS = new Set([
24
+ 'cursor',
25
+ 'encoded_cursor',
26
+ 'encodedCursor',
27
+ 'next_cursor',
28
+ 'nextCursor',
29
+ 'scroll_token',
30
+ 'scrollToken',
31
+ 'pagination_token',
32
+ 'paginationToken',
33
+ 'continuation_token',
34
+ 'continuationToken',
35
+ 'page_token',
36
+ 'pageToken',
37
+ 'next_page_token',
38
+ 'nextPageToken',
39
+ 'previous_page_token',
40
+ 'previousPageToken',
41
+ 'prev_page_token',
42
+ 'prevPageToken',
43
+ 'next_token',
44
+ 'nextToken',
45
+ 'offset_token',
46
+ 'offsetToken',
47
+ ]);
48
+
49
+ const PUBLIC_RESULT_TOKEN_EXPIRY_KEYS = new Set([
50
+ 'page_token_expiry',
51
+ 'pageTokenExpiry',
52
+ ]);
53
+
54
+ const PUBLIC_RESULT_TOKEN_COUNT_KEYS = new Set([
55
+ 'input_tokens',
56
+ 'inputTokens',
57
+ 'output_tokens',
58
+ 'outputTokens',
59
+ 'total_tokens',
60
+ 'totalTokens',
61
+ 'tokens_used',
62
+ 'tokensUsed',
63
+ ]);
64
+
65
+ const PAGINATION_CONTAINER_KEYS = new Set([
66
+ 'pagination',
67
+ 'paging',
68
+ 'page_info',
69
+ 'pageInfo',
70
+ ]);
71
+
19
72
  const SAFE_IDENTIFIER_KEYS = new Set([
20
73
  'artifactHash',
21
74
  'artifactHashes',
@@ -135,6 +188,39 @@ function shouldRedactKey(key: string) {
135
188
  return SENSITIVE_KEY_PATTERNS.some((pattern) => pattern.test(key));
136
189
  }
137
190
 
191
+ function isPublicResultCursorKey(
192
+ key: string,
193
+ path: readonly string[],
194
+ ): boolean {
195
+ return (
196
+ PUBLIC_RESULT_CURSOR_KEYS.has(key) ||
197
+ (key === 'token' && PAGINATION_CONTAINER_KEYS.has(path.at(-1) ?? ''))
198
+ );
199
+ }
200
+
201
+ function isPublicResultSafeTokenKey(
202
+ key: string,
203
+ path: readonly string[],
204
+ value: unknown,
205
+ ): boolean {
206
+ if (isPublicResultCursorKey(key, path)) return true;
207
+ if (value === null) {
208
+ return (
209
+ PUBLIC_RESULT_TOKEN_EXPIRY_KEYS.has(key) ||
210
+ PUBLIC_RESULT_TOKEN_COUNT_KEYS.has(key)
211
+ );
212
+ }
213
+ if (PUBLIC_RESULT_TOKEN_COUNT_KEYS.has(key)) {
214
+ return typeof value === 'number' && Number.isFinite(value) && value >= 0;
215
+ }
216
+ return (
217
+ PUBLIC_RESULT_TOKEN_EXPIRY_KEYS.has(key) &&
218
+ typeof value === 'string' &&
219
+ /^\d{4}-\d{2}-\d{2}T/.test(value) &&
220
+ Number.isFinite(Date.parse(value))
221
+ );
222
+ }
223
+
138
224
  function maybeRedactString(value: string, options: SecretRedactionOptions) {
139
225
  if (EXPLICIT_SECRET_VALUE_PATTERNS.some((pattern) => pattern.test(value))) {
140
226
  return REDACTED_VALUE;
@@ -171,6 +257,21 @@ export function redactSecretsInValue<T>(
171
257
  if (parentKey && SAFE_IDENTIFIER_KEYS.has(parentKey)) {
172
258
  return value as T;
173
259
  }
260
+ if (
261
+ parentKey &&
262
+ options.keyPolicy === 'public-result' &&
263
+ isPublicResultSafeTokenKey(parentKey, [], value)
264
+ ) {
265
+ const redacted = maybeRedactString(value, options);
266
+ return (
267
+ options.placeholderContinuationValues &&
268
+ isPublicResultCursorKey(parentKey, []) &&
269
+ redacted !== REDACTED_VALUE &&
270
+ redacted.length > 0
271
+ ? '[PAGINATION_CURSOR]'
272
+ : redacted
273
+ ) as T;
274
+ }
174
275
  if (parentKey && shouldRedactKey(parentKey)) {
175
276
  return REDACTED_VALUE as T;
176
277
  }
@@ -185,7 +286,8 @@ export function redactSecretsInValue<T>(
185
286
  source: Container;
186
287
  target: Container;
187
288
  parentKey?: string;
188
- }> = [{ source: value as Container, target: root, parentKey }];
289
+ path: string[];
290
+ }> = [{ source: value as Container, target: root, parentKey, path: [] }];
189
291
 
190
292
  const redactNestedValue = (
191
293
  item: unknown,
@@ -196,7 +298,9 @@ export function redactSecretsInValue<T>(
196
298
  return REDACTED_VALUE;
197
299
  }
198
300
  if (itemParentKey && SAFE_IDENTIFIER_KEYS.has(itemParentKey)) return item;
199
- if (itemParentKey && shouldRedactKey(itemParentKey)) return REDACTED_VALUE;
301
+ if (itemParentKey && shouldRedactKey(itemParentKey)) {
302
+ return REDACTED_VALUE;
303
+ }
200
304
  return maybeRedactString(item, options);
201
305
  };
202
306
 
@@ -206,6 +310,24 @@ export function redactSecretsInValue<T>(
206
310
  const sourceIsArray = Array.isArray(current.source);
207
311
  for (const [key, item] of Object.entries(current.source)) {
208
312
  const itemParentKey = sourceIsArray ? current.parentKey : key;
313
+ if (
314
+ !sourceIsArray &&
315
+ options.keyPolicy === 'public-result' &&
316
+ isPublicResultSafeTokenKey(key, current.path, item) &&
317
+ (!item || typeof item !== 'object')
318
+ ) {
319
+ const redacted =
320
+ typeof item === 'string' ? maybeRedactString(item, options) : item;
321
+ (current.target as Record<string, unknown>)[key] =
322
+ options.placeholderContinuationValues &&
323
+ isPublicResultCursorKey(key, current.path) &&
324
+ typeof redacted === 'string' &&
325
+ redacted !== REDACTED_VALUE &&
326
+ redacted.length > 0
327
+ ? '[PAGINATION_CURSOR]'
328
+ : redacted;
329
+ continue;
330
+ }
209
331
  if (!sourceIsArray && shouldRedactKey(key)) {
210
332
  (current.target as Record<string, unknown>)[key] = REDACTED_VALUE;
211
333
  continue;
@@ -217,6 +339,7 @@ export function redactSecretsInValue<T>(
217
339
  source: item as Container,
218
340
  target: nestedTarget,
219
341
  parentKey: itemParentKey,
342
+ path: sourceIsArray ? current.path : [...current.path, key],
220
343
  });
221
344
  continue;
222
345
  }
@@ -242,6 +365,18 @@ export function redactSecretsInCustomerValue<T>(
242
365
  return redactSecretsInValue(value, parentKey, { redactHighEntropy: false });
243
366
  }
244
367
 
368
+ /** Redaction for authenticated successful provider or Play result data. */
369
+ export function redactSecretsInPublicResultValue<T>(
370
+ value: T,
371
+ options: { placeholderContinuationValues?: boolean } = {},
372
+ ): T {
373
+ return redactSecretsInValue(value, undefined, {
374
+ redactHighEntropy: false,
375
+ keyPolicy: 'public-result',
376
+ placeholderContinuationValues: options.placeholderContinuationValues,
377
+ });
378
+ }
379
+
245
380
  export function redactSecretsInJsonText(
246
381
  text: string,
247
382
  options: SecretRedactionOptions = {},
@@ -265,3 +400,11 @@ export function redactSecretsInJsonText(
265
400
  export function redactSecretsInCustomerJsonText(text: string) {
266
401
  return redactSecretsInJsonText(text, { redactHighEntropy: false });
267
402
  }
403
+
404
+ /** Redaction for serialized authenticated provider or Play result data. */
405
+ export function redactSecretsInPublicResultJsonText(text: string) {
406
+ return redactSecretsInJsonText(text, {
407
+ redactHighEntropy: false,
408
+ keyPolicy: 'public-result',
409
+ });
410
+ }
package/dist/cli/index.js CHANGED
@@ -1298,7 +1298,7 @@ var SDK_RELEASE = {
1298
1298
  // getters keep their established compatibility behavior.
1299
1299
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1300
1300
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1301
- version: "0.3.100",
1301
+ version: "0.3.102",
1302
1302
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
1303
1303
  packageCapabilities: {
1304
1304
  updatePreferences: 1
@@ -7225,6 +7225,22 @@ var DeeplineClient = class {
7225
7225
  const query = options?.source ? `?include=source&revision=${encodeURIComponent(options.source)}` : options?.guidance ? "?include=guidance" : "";
7226
7226
  return this.http.get(`/api/v2/plays/${encodedName}${query}`);
7227
7227
  }
7228
+ /** Read one trigger inventory page without loading run histories. */
7229
+ async listPlayTriggerInventory(options) {
7230
+ const params = new URLSearchParams({ view: "inventory" });
7231
+ if (options?.cursor) params.set("cursor", options.cursor);
7232
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
7233
+ }
7234
+ /** Read one trigger's recent runs, with an explicit partial-history flag. */
7235
+ async getPlayTriggerHistory(bindingId, options) {
7236
+ const params = new URLSearchParams({
7237
+ view: "history",
7238
+ binding_id: bindingId
7239
+ });
7240
+ if (options?.limit !== void 0)
7241
+ params.set("history_limit", String(options.limit));
7242
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
7243
+ }
7228
7244
  /**
7229
7245
  * Get a normalized play description suitable for agents and CLIs.
7230
7246
  *
@@ -9780,7 +9796,10 @@ Examples:
9780
9796
  deepline auth register --wait no
9781
9797
  deepline auth register --auth-scope folder --wait no
9782
9798
  `
9783
- ).option("--org-name <name>", "Workspace name to prefill").option(
9799
+ ).option(
9800
+ "--org-name <name>",
9801
+ "Use this workspace, or create a separate one with this name"
9802
+ ).option(
9784
9803
  "--org-id <id>",
9785
9804
  "Bind to this workspace directly, skipping the browser picker"
9786
9805
  ).option("--agent-name <name>", "Agent name to register").option("--wait <mode>", "Wait mode: auto, yes, or no", "auto").option("--no-wait", "Alias for --wait no").option(
@@ -16555,11 +16574,8 @@ function collectInlineSecretFindings(sourceCode) {
16555
16574
  var MAX_PLAY_BUNDLE_BYTES = 30 * 1024 * 1024;
16556
16575
 
16557
16576
  // ../plays/bundling/index.ts
16558
- var PLAY_BUNDLE_CACHE_VERSION = 37;
16559
- var PLAY_ARTIFACT_CACHE_DIR = (0, import_node_path11.join)(
16560
- (0, import_node_os7.tmpdir)(),
16561
- `deepline-play-artifacts-v${PLAY_BUNDLE_CACHE_VERSION}`
16562
- );
16577
+ var PLAY_BUNDLE_CACHE_NAMESPACE = "deepline-play-artifacts-docflow-jsdoc";
16578
+ var PLAY_ARTIFACT_CACHE_DIR = (0, import_node_path11.join)((0, import_node_os7.tmpdir)(), PLAY_BUNDLE_CACHE_NAMESPACE);
16563
16579
  var NODE_BUILTIN_SET = new Set(
16564
16580
  import_node_module.builtinModules.flatMap(
16565
16581
  (name) => name.startsWith("node:") ? [name, name.slice(5)] : [name, `node:${name}`]
@@ -25557,6 +25573,29 @@ Examples:
25557
25573
  ...options.revision ? ["--revision", options.revision] : []
25558
25574
  ]);
25559
25575
  });
25576
+ play.command("triggers").description(
25577
+ "List a bounded page of triggers, or read one trigger\u2019s recent history."
25578
+ ).option("--cursor <cursor>", "Continue the trigger inventory").option("--binding <id>", "Read history for this trigger binding").option("--history-limit <count>", "Recent history cap, 1\u201330", "10").option("--json", "Emit JSON output").action(async (options) => {
25579
+ if (options.cursor && options.binding)
25580
+ throw new Error("--cursor and --binding cannot be combined.");
25581
+ const limit = Number(options.historyLimit);
25582
+ if (!Number.isInteger(limit) || limit < 1 || limit > 30)
25583
+ throw new Error("--history-limit must be an integer from 1 to 30.");
25584
+ const client2 = new DeeplineClient();
25585
+ if (options.binding) {
25586
+ printCompactJson(
25587
+ await client2.getPlayTriggerHistory(options.binding, { limit })
25588
+ );
25589
+ return;
25590
+ }
25591
+ const result = await client2.listPlayTriggerInventory({
25592
+ cursor: options.cursor
25593
+ });
25594
+ printCompactJson({
25595
+ ...result,
25596
+ next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
25597
+ });
25598
+ });
25560
25599
  play.command("list").description("List saved and prebuilt plays.").addHelpText(
25561
25600
  "after",
25562
25601
  `
@@ -35399,6 +35438,28 @@ function monitorBatchScope(options, kind) {
35399
35438
  function monitorBatchIdempotencyKey(kind, value) {
35400
35439
  return value?.trim() || `monitor-batch-${kind}-${(0, import_node_crypto8.randomUUID)()}`;
35401
35440
  }
35441
+ function legacyDryRunManifest(raw) {
35442
+ let parsed;
35443
+ try {
35444
+ parsed = JSON.parse(raw);
35445
+ } catch {
35446
+ return raw;
35447
+ }
35448
+ const object = asRecord2(parsed);
35449
+ if (object && asString(object.key) && asString(object.tool)) {
35450
+ return raw;
35451
+ }
35452
+ const isBatchDocument = Array.isArray(parsed) || object !== null && (Object.prototype.hasOwnProperty.call(object, "monitors") || object.kind === "batch");
35453
+ if (!isBatchDocument) return raw;
35454
+ const lint = lintMonitorBatchInput(parsed);
35455
+ if (!lint.normalized) {
35456
+ throw new MonitorsUsageError(
35457
+ lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
35458
+ );
35459
+ }
35460
+ return `${lint.normalized.monitors.map((monitor) => JSON.stringify(monitor)).join("\n")}
35461
+ `;
35462
+ }
35402
35463
  async function handleMonitorBatchDeploy(options) {
35403
35464
  if (!options.file?.trim()) {
35404
35465
  throw new MonitorsUsageError(
@@ -35421,6 +35482,9 @@ async function handleMonitorBatchDeploy(options) {
35421
35482
  if (!manifestNdjson.trim()) {
35422
35483
  throw new MonitorsUsageError("Monitor batch manifest is empty.");
35423
35484
  }
35485
+ if (options.dryRun === true) {
35486
+ manifestNdjson = legacyDryRunManifest(manifestNdjson);
35487
+ }
35424
35488
  const idempotencyKey = monitorBatchIdempotencyKey(
35425
35489
  "deploy",
35426
35490
  options.idempotencyKey
@@ -35450,9 +35514,10 @@ async function handleMonitorBatch(kind, options) {
35450
35514
  `monitors batch ${kind} changes provider monitors asynchronously. Preview with --dry-run, then confirm with --yes.`
35451
35515
  );
35452
35516
  }
35453
- if (kind === "deactivate" && !options.reason?.trim()) {
35517
+ const scope = monitorBatchScope(options, kind);
35518
+ if (kind === "deactivate" && scope.kind === "target" && !options.reason?.trim()) {
35454
35519
  throw new MonitorsUsageError(
35455
- "monitors batch deactivate requires --reason (for example insufficient_balance or billing_failure)."
35520
+ "monitors batch deactivate --target requires --reason (for example insufficient_balance or billing_failure). Omit --reason with --keys for a customer-requested teardown."
35456
35521
  );
35457
35522
  }
35458
35523
  const idempotencyKey = monitorBatchIdempotencyKey(
@@ -35461,7 +35526,7 @@ async function handleMonitorBatch(kind, options) {
35461
35526
  );
35462
35527
  const result = await new DeeplineClient().monitors.batch.submit({
35463
35528
  kind,
35464
- scope: monitorBatchScope(options, kind),
35529
+ scope,
35465
35530
  dryRun: options.dryRun === true,
35466
35531
  ...options.reason?.trim() ? { deactivationReason: options.reason.trim() } : {},
35467
35532
  idempotencyKey
@@ -35666,7 +35731,10 @@ Examples:
35666
35731
  batch.command("deactivate").description(
35667
35732
  "Durably deactivate a selection through provider batch deletes."
35668
35733
  )
35669
- ).requiredOption("--reason <reason>", "Declared deactivation reason").option("--yes", "Confirm the asynchronous provider deactivation")
35734
+ ).option(
35735
+ "--reason <reason>",
35736
+ "Declared policy reason; required with --target and omitted for a customer-requested --keys teardown"
35737
+ ).option("--yes", "Confirm the asynchronous provider deactivation")
35670
35738
  ).action(
35671
35739
  monitorsAction(
35672
35740
  (options) => handleMonitorBatch("deactivate", options)
@@ -1271,7 +1271,7 @@ var SDK_RELEASE = {
1271
1271
  // getters keep their established compatibility behavior.
1272
1272
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1273
1273
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1274
- version: "0.3.100",
1274
+ version: "0.3.102",
1275
1275
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
1276
1276
  packageCapabilities: {
1277
1277
  updatePreferences: 1
@@ -7198,6 +7198,22 @@ var DeeplineClient = class {
7198
7198
  const query = options?.source ? `?include=source&revision=${encodeURIComponent(options.source)}` : options?.guidance ? "?include=guidance" : "";
7199
7199
  return this.http.get(`/api/v2/plays/${encodedName}${query}`);
7200
7200
  }
7201
+ /** Read one trigger inventory page without loading run histories. */
7202
+ async listPlayTriggerInventory(options) {
7203
+ const params = new URLSearchParams({ view: "inventory" });
7204
+ if (options?.cursor) params.set("cursor", options.cursor);
7205
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
7206
+ }
7207
+ /** Read one trigger's recent runs, with an explicit partial-history flag. */
7208
+ async getPlayTriggerHistory(bindingId, options) {
7209
+ const params = new URLSearchParams({
7210
+ view: "history",
7211
+ binding_id: bindingId
7212
+ });
7213
+ if (options?.limit !== void 0)
7214
+ params.set("history_limit", String(options.limit));
7215
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
7216
+ }
7201
7217
  /**
7202
7218
  * Get a normalized play description suitable for agents and CLIs.
7203
7219
  *
@@ -9765,7 +9781,10 @@ Examples:
9765
9781
  deepline auth register --wait no
9766
9782
  deepline auth register --auth-scope folder --wait no
9767
9783
  `
9768
- ).option("--org-name <name>", "Workspace name to prefill").option(
9784
+ ).option(
9785
+ "--org-name <name>",
9786
+ "Use this workspace, or create a separate one with this name"
9787
+ ).option(
9769
9788
  "--org-id <id>",
9770
9789
  "Bind to this workspace directly, skipping the browser picker"
9771
9790
  ).option("--agent-name <name>", "Agent name to register").option("--wait <mode>", "Wait mode: auto, yes, or no", "auto").option("--no-wait", "Alias for --wait no").option(
@@ -16598,11 +16617,8 @@ function collectInlineSecretFindings(sourceCode) {
16598
16617
  var MAX_PLAY_BUNDLE_BYTES = 30 * 1024 * 1024;
16599
16618
 
16600
16619
  // ../plays/bundling/index.ts
16601
- var PLAY_BUNDLE_CACHE_VERSION = 37;
16602
- var PLAY_ARTIFACT_CACHE_DIR = join7(
16603
- tmpdir2(),
16604
- `deepline-play-artifacts-v${PLAY_BUNDLE_CACHE_VERSION}`
16605
- );
16620
+ var PLAY_BUNDLE_CACHE_NAMESPACE = "deepline-play-artifacts-docflow-jsdoc";
16621
+ var PLAY_ARTIFACT_CACHE_DIR = join7(tmpdir2(), PLAY_BUNDLE_CACHE_NAMESPACE);
16606
16622
  var NODE_BUILTIN_SET = new Set(
16607
16623
  builtinModules.flatMap(
16608
16624
  (name) => name.startsWith("node:") ? [name, name.slice(5)] : [name, `node:${name}`]
@@ -25607,6 +25623,29 @@ Examples:
25607
25623
  ...options.revision ? ["--revision", options.revision] : []
25608
25624
  ]);
25609
25625
  });
25626
+ play.command("triggers").description(
25627
+ "List a bounded page of triggers, or read one trigger\u2019s recent history."
25628
+ ).option("--cursor <cursor>", "Continue the trigger inventory").option("--binding <id>", "Read history for this trigger binding").option("--history-limit <count>", "Recent history cap, 1\u201330", "10").option("--json", "Emit JSON output").action(async (options) => {
25629
+ if (options.cursor && options.binding)
25630
+ throw new Error("--cursor and --binding cannot be combined.");
25631
+ const limit = Number(options.historyLimit);
25632
+ if (!Number.isInteger(limit) || limit < 1 || limit > 30)
25633
+ throw new Error("--history-limit must be an integer from 1 to 30.");
25634
+ const client2 = new DeeplineClient();
25635
+ if (options.binding) {
25636
+ printCompactJson(
25637
+ await client2.getPlayTriggerHistory(options.binding, { limit })
25638
+ );
25639
+ return;
25640
+ }
25641
+ const result = await client2.listPlayTriggerInventory({
25642
+ cursor: options.cursor
25643
+ });
25644
+ printCompactJson({
25645
+ ...result,
25646
+ next: result.isDone ? null : `deepline plays triggers --cursor ${JSON.stringify(result.continueCursor)} --json`
25647
+ });
25648
+ });
25610
25649
  play.command("list").description("List saved and prebuilt plays.").addHelpText(
25611
25650
  "after",
25612
25651
  `
@@ -35456,6 +35495,28 @@ function monitorBatchScope(options, kind) {
35456
35495
  function monitorBatchIdempotencyKey(kind, value) {
35457
35496
  return value?.trim() || `monitor-batch-${kind}-${randomUUID5()}`;
35458
35497
  }
35498
+ function legacyDryRunManifest(raw) {
35499
+ let parsed;
35500
+ try {
35501
+ parsed = JSON.parse(raw);
35502
+ } catch {
35503
+ return raw;
35504
+ }
35505
+ const object = asRecord2(parsed);
35506
+ if (object && asString(object.key) && asString(object.tool)) {
35507
+ return raw;
35508
+ }
35509
+ const isBatchDocument = Array.isArray(parsed) || object !== null && (Object.prototype.hasOwnProperty.call(object, "monitors") || object.kind === "batch");
35510
+ if (!isBatchDocument) return raw;
35511
+ const lint = lintMonitorBatchInput(parsed);
35512
+ if (!lint.normalized) {
35513
+ throw new MonitorsUsageError(
35514
+ lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
35515
+ );
35516
+ }
35517
+ return `${lint.normalized.monitors.map((monitor) => JSON.stringify(monitor)).join("\n")}
35518
+ `;
35519
+ }
35459
35520
  async function handleMonitorBatchDeploy(options) {
35460
35521
  if (!options.file?.trim()) {
35461
35522
  throw new MonitorsUsageError(
@@ -35478,6 +35539,9 @@ async function handleMonitorBatchDeploy(options) {
35478
35539
  if (!manifestNdjson.trim()) {
35479
35540
  throw new MonitorsUsageError("Monitor batch manifest is empty.");
35480
35541
  }
35542
+ if (options.dryRun === true) {
35543
+ manifestNdjson = legacyDryRunManifest(manifestNdjson);
35544
+ }
35481
35545
  const idempotencyKey = monitorBatchIdempotencyKey(
35482
35546
  "deploy",
35483
35547
  options.idempotencyKey
@@ -35507,9 +35571,10 @@ async function handleMonitorBatch(kind, options) {
35507
35571
  `monitors batch ${kind} changes provider monitors asynchronously. Preview with --dry-run, then confirm with --yes.`
35508
35572
  );
35509
35573
  }
35510
- if (kind === "deactivate" && !options.reason?.trim()) {
35574
+ const scope = monitorBatchScope(options, kind);
35575
+ if (kind === "deactivate" && scope.kind === "target" && !options.reason?.trim()) {
35511
35576
  throw new MonitorsUsageError(
35512
- "monitors batch deactivate requires --reason (for example insufficient_balance or billing_failure)."
35577
+ "monitors batch deactivate --target requires --reason (for example insufficient_balance or billing_failure). Omit --reason with --keys for a customer-requested teardown."
35513
35578
  );
35514
35579
  }
35515
35580
  const idempotencyKey = monitorBatchIdempotencyKey(
@@ -35518,7 +35583,7 @@ async function handleMonitorBatch(kind, options) {
35518
35583
  );
35519
35584
  const result = await new DeeplineClient().monitors.batch.submit({
35520
35585
  kind,
35521
- scope: monitorBatchScope(options, kind),
35586
+ scope,
35522
35587
  dryRun: options.dryRun === true,
35523
35588
  ...options.reason?.trim() ? { deactivationReason: options.reason.trim() } : {},
35524
35589
  idempotencyKey
@@ -35723,7 +35788,10 @@ Examples:
35723
35788
  batch.command("deactivate").description(
35724
35789
  "Durably deactivate a selection through provider batch deletes."
35725
35790
  )
35726
- ).requiredOption("--reason <reason>", "Declared deactivation reason").option("--yes", "Confirm the asynchronous provider deactivation")
35791
+ ).option(
35792
+ "--reason <reason>",
35793
+ "Declared policy reason; required with --target and omitted for a customer-requested --keys teardown"
35794
+ ).option("--yes", "Confirm the asynchronous provider deactivation")
35727
35795
  ).action(
35728
35796
  monitorsAction(
35729
35797
  (options) => handleMonitorBatch("deactivate", options)
package/dist/index.d.mts CHANGED
@@ -2957,8 +2957,7 @@ type PlaySecretCheck = {
2957
2957
  secret: PlaySecretMetadata | null;
2958
2958
  };
2959
2959
  /**
2960
- * `client.runs` mirrors `/api/v2/runs`: the preferred low-level surface for
2961
- * polling, streaming, stopping, reading logs, and exporting durable dataset rows.
2960
+ * Use `client.runs` (`/api/v2/runs`) to poll, stream, stop, read logs, and export durable dataset rows.
2962
2961
  *
2963
2962
  * @sdkReference client 020 client.runs
2964
2963
  */
@@ -3260,7 +3259,10 @@ type MonitorBatchExistingSubmitOptions = {
3260
3259
  kind: 'audit' | 'deactivate' | 'reactivate' | 'repair';
3261
3260
  scope: MonitorBatchScope;
3262
3261
  dryRun?: boolean;
3263
- /** Required for deactivate; it is the declared reason shown by health/UI. */
3262
+ /**
3263
+ * A declared policy reason for target deactivation. Omit it for an explicit
3264
+ * customer-owned key teardown; absent is the durable customer intent.
3265
+ */
3264
3266
  deactivationReason?: string;
3265
3267
  /** Stable retry key. Reusing it joins the original durable operation. */
3266
3268
  idempotencyKey: string;
@@ -4712,6 +4714,37 @@ declare class DeeplineClient {
4712
4714
  source?: 'working' | 'live' | `version:${number}`;
4713
4715
  guidance?: boolean;
4714
4716
  }): Promise<PlayDetail>;
4717
+ /** Read one trigger inventory page without loading run histories. */
4718
+ listPlayTriggerInventory(options?: {
4719
+ cursor?: string;
4720
+ }): Promise<{
4721
+ page: Array<{
4722
+ bindingId: string;
4723
+ name: string;
4724
+ type: string;
4725
+ status: string;
4726
+ cron: string | null;
4727
+ timezone: string | null;
4728
+ nextScheduledAt: number | null;
4729
+ }>;
4730
+ continueCursor: string;
4731
+ isDone: boolean;
4732
+ }>;
4733
+ /** Read one trigger's recent runs, with an explicit partial-history flag. */
4734
+ getPlayTriggerHistory(bindingId: string, options?: {
4735
+ limit?: number;
4736
+ }): Promise<{
4737
+ recentRuns: Array<{
4738
+ workflowId: string;
4739
+ runId: string | null;
4740
+ status: string;
4741
+ createdAt: number;
4742
+ startedAt: number | null;
4743
+ finishedAt: number | null;
4744
+ }>;
4745
+ truncated: boolean;
4746
+ cronInput: Record<string, unknown> | null;
4747
+ }>;
4715
4748
  /**
4716
4749
  * Get a normalized play description suitable for agents and CLIs.
4717
4750
  *
package/dist/index.d.ts CHANGED
@@ -2957,8 +2957,7 @@ type PlaySecretCheck = {
2957
2957
  secret: PlaySecretMetadata | null;
2958
2958
  };
2959
2959
  /**
2960
- * `client.runs` mirrors `/api/v2/runs`: the preferred low-level surface for
2961
- * polling, streaming, stopping, reading logs, and exporting durable dataset rows.
2960
+ * Use `client.runs` (`/api/v2/runs`) to poll, stream, stop, read logs, and export durable dataset rows.
2962
2961
  *
2963
2962
  * @sdkReference client 020 client.runs
2964
2963
  */
@@ -3260,7 +3259,10 @@ type MonitorBatchExistingSubmitOptions = {
3260
3259
  kind: 'audit' | 'deactivate' | 'reactivate' | 'repair';
3261
3260
  scope: MonitorBatchScope;
3262
3261
  dryRun?: boolean;
3263
- /** Required for deactivate; it is the declared reason shown by health/UI. */
3262
+ /**
3263
+ * A declared policy reason for target deactivation. Omit it for an explicit
3264
+ * customer-owned key teardown; absent is the durable customer intent.
3265
+ */
3264
3266
  deactivationReason?: string;
3265
3267
  /** Stable retry key. Reusing it joins the original durable operation. */
3266
3268
  idempotencyKey: string;
@@ -4712,6 +4714,37 @@ declare class DeeplineClient {
4712
4714
  source?: 'working' | 'live' | `version:${number}`;
4713
4715
  guidance?: boolean;
4714
4716
  }): Promise<PlayDetail>;
4717
+ /** Read one trigger inventory page without loading run histories. */
4718
+ listPlayTriggerInventory(options?: {
4719
+ cursor?: string;
4720
+ }): Promise<{
4721
+ page: Array<{
4722
+ bindingId: string;
4723
+ name: string;
4724
+ type: string;
4725
+ status: string;
4726
+ cron: string | null;
4727
+ timezone: string | null;
4728
+ nextScheduledAt: number | null;
4729
+ }>;
4730
+ continueCursor: string;
4731
+ isDone: boolean;
4732
+ }>;
4733
+ /** Read one trigger's recent runs, with an explicit partial-history flag. */
4734
+ getPlayTriggerHistory(bindingId: string, options?: {
4735
+ limit?: number;
4736
+ }): Promise<{
4737
+ recentRuns: Array<{
4738
+ workflowId: string;
4739
+ runId: string | null;
4740
+ status: string;
4741
+ createdAt: number;
4742
+ startedAt: number | null;
4743
+ finishedAt: number | null;
4744
+ }>;
4745
+ truncated: boolean;
4746
+ cronInput: Record<string, unknown> | null;
4747
+ }>;
4715
4748
  /**
4716
4749
  * Get a normalized play description suitable for agents and CLIs.
4717
4750
  *
package/dist/index.js CHANGED
@@ -860,7 +860,7 @@ var SDK_RELEASE = {
860
860
  // getters keep their established compatibility behavior.
861
861
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
862
862
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
863
- version: "0.3.100",
863
+ version: "0.3.102",
864
864
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
865
865
  packageCapabilities: {
866
866
  updatePreferences: 1
@@ -6653,6 +6653,22 @@ var DeeplineClient = class {
6653
6653
  const query = options?.source ? `?include=source&revision=${encodeURIComponent(options.source)}` : options?.guidance ? "?include=guidance" : "";
6654
6654
  return this.http.get(`/api/v2/plays/${encodedName}${query}`);
6655
6655
  }
6656
+ /** Read one trigger inventory page without loading run histories. */
6657
+ async listPlayTriggerInventory(options) {
6658
+ const params = new URLSearchParams({ view: "inventory" });
6659
+ if (options?.cursor) params.set("cursor", options.cursor);
6660
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
6661
+ }
6662
+ /** Read one trigger's recent runs, with an explicit partial-history flag. */
6663
+ async getPlayTriggerHistory(bindingId, options) {
6664
+ const params = new URLSearchParams({
6665
+ view: "history",
6666
+ binding_id: bindingId
6667
+ });
6668
+ if (options?.limit !== void 0)
6669
+ params.set("history_limit", String(options.limit));
6670
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
6671
+ }
6656
6672
  /**
6657
6673
  * Get a normalized play description suitable for agents and CLIs.
6658
6674
  *
package/dist/index.mjs CHANGED
@@ -768,7 +768,7 @@ var SDK_RELEASE = {
768
768
  // getters keep their established compatibility behavior.
769
769
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
770
770
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
771
- version: "0.3.100",
771
+ version: "0.3.102",
772
772
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
773
773
  packageCapabilities: {
774
774
  updatePreferences: 1
@@ -6561,6 +6561,22 @@ var DeeplineClient = class {
6561
6561
  const query = options?.source ? `?include=source&revision=${encodeURIComponent(options.source)}` : options?.guidance ? "?include=guidance" : "";
6562
6562
  return this.http.get(`/api/v2/plays/${encodedName}${query}`);
6563
6563
  }
6564
+ /** Read one trigger inventory page without loading run histories. */
6565
+ async listPlayTriggerInventory(options) {
6566
+ const params = new URLSearchParams({ view: "inventory" });
6567
+ if (options?.cursor) params.set("cursor", options.cursor);
6568
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
6569
+ }
6570
+ /** Read one trigger's recent runs, with an explicit partial-history flag. */
6571
+ async getPlayTriggerHistory(bindingId, options) {
6572
+ const params = new URLSearchParams({
6573
+ view: "history",
6574
+ binding_id: bindingId
6575
+ });
6576
+ if (options?.limit !== void 0)
6577
+ params.set("history_limit", String(options.limit));
6578
+ return this.http.get(`/api/v2/plays/triggers?${params}`);
6579
+ }
6564
6580
  /**
6565
6581
  * Get a normalized play description suitable for agents and CLIs.
6566
6582
  *
@@ -1964,7 +1964,7 @@ function inferBindingIo(statement) {
1964
1964
  ioConfidence: "inferred"
1965
1965
  };
1966
1966
  }
1967
- var MERMAID_BLOCK = /\/\*\*\s*@mermaid(?:\s|\r?\n)([\s\S]*?)\*\//g;
1967
+ var JSDOC_BLOCK = /\/\*\*([\s\S]*?)\*\//g;
1968
1968
  var BLOCK_EXPORT_HEADER = /^[A-Za-z_$][\w$-]*$/;
1969
1969
  function cleanBlockBody(raw) {
1970
1970
  return raw.split(/\r?\n/).map((line) => /^\s*\*/.test(line) ? line.replace(/^\s*\* ?/, "") : line).join("\n").trim();
@@ -2151,9 +2151,12 @@ function materializeDocflow(block) {
2151
2151
  function parsePlayDocflowFile(sourceCode) {
2152
2152
  const errors = [];
2153
2153
  const rawBlocks = [];
2154
- MERMAID_BLOCK.lastIndex = 0;
2155
- for (const match of sourceCode.matchAll(MERMAID_BLOCK)) {
2156
- rawBlocks.push({ syntax: "mermaid", body: cleanBlockBody(match[1]) });
2154
+ JSDOC_BLOCK.lastIndex = 0;
2155
+ for (const match of sourceCode.matchAll(JSDOC_BLOCK)) {
2156
+ const cleanedBody = cleanBlockBody(match[1]);
2157
+ const mermaid = /^@mermaid(?:[ \t]+|\r?\n|$)([\s\S]*)$/.exec(cleanedBody);
2158
+ if (!mermaid) continue;
2159
+ rawBlocks.push({ syntax: "mermaid", body: mermaid[1].trim() });
2157
2160
  }
2158
2161
  if (rawBlocks.length === 0) return { blocks: [], bindings: [], errors };
2159
2162
  const rejectedNodeIds = /* @__PURE__ */ new Set();
@@ -2878,11 +2881,8 @@ function validatePlaySourceFilesHaveNoInlineSecrets(sourceFiles) {
2878
2881
  var MAX_PLAY_BUNDLE_BYTES = 30 * 1024 * 1024;
2879
2882
 
2880
2883
  // ../plays/bundling/index.ts
2881
- var PLAY_BUNDLE_CACHE_VERSION = 37;
2882
- var PLAY_ARTIFACT_CACHE_DIR = join(
2883
- tmpdir(),
2884
- `deepline-play-artifacts-v${PLAY_BUNDLE_CACHE_VERSION}`
2885
- );
2884
+ var PLAY_BUNDLE_CACHE_NAMESPACE = "deepline-play-artifacts-docflow-jsdoc";
2885
+ var PLAY_ARTIFACT_CACHE_DIR = join(tmpdir(), PLAY_BUNDLE_CACHE_NAMESPACE);
2886
2886
  var PLAY_PROXY_NAMESPACE = "deepline-play-runtime-ref";
2887
2887
  var SOURCE_EXTENSIONS = [
2888
2888
  ".ts",
@@ -4867,7 +4867,6 @@ async function discoverPackagedLocalFiles(entryFile) {
4867
4867
  }
4868
4868
 
4869
4869
  // src/plays/bundle-play-file.ts
4870
- var PLAY_BUNDLE_CACHE_VERSION2 = 37;
4871
4870
  var MODULE_DIR = dirname3(fileURLToPath(import.meta.url));
4872
4871
  var SDK_PACKAGE_ROOT = resolve3(MODULE_DIR, "..", "..");
4873
4872
  var SOURCE_REPO_ROOT = resolve3(SDK_PACKAGE_ROOT, "..", "..");
@@ -4917,10 +4916,7 @@ function createSdkPlayBundlingAdapter() {
4917
4916
  return {
4918
4917
  projectRoot: PROJECT_ROOT,
4919
4918
  nodeModulesDir: HAS_PACKAGED_BUNDLING_SOURCES ? resolve3(SDK_PACKAGE_ROOT, "node_modules") : resolve3(PROJECT_ROOT, "node_modules"),
4920
- cacheDir: join3(
4921
- tmpdir2(),
4922
- `deepline-play-artifacts-v${PLAY_BUNDLE_CACHE_VERSION2}`
4923
- ),
4919
+ cacheDir: join3(tmpdir2(), PLAY_BUNDLE_CACHE_NAMESPACE),
4924
4920
  sdkSourceRoot: SDK_SOURCE_ROOT,
4925
4921
  sdkPackageJson: SDK_PACKAGE_JSON,
4926
4922
  sdkEntryFile: SDK_ENTRY_FILE,
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.100";
152
+ readonly version: "0.3.102";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.d.ts CHANGED
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.100";
152
+ readonly version: "0.3.102";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.js CHANGED
@@ -74,7 +74,7 @@ var SDK_RELEASE = {
74
74
  // getters keep their established compatibility behavior.
75
75
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
76
76
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
77
- version: "0.3.100",
77
+ version: "0.3.102",
78
78
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
79
79
  packageCapabilities: {
80
80
  updatePreferences: 1
package/dist/release.mjs CHANGED
@@ -48,7 +48,7 @@ var SDK_RELEASE = {
48
48
  // getters keep their established compatibility behavior.
49
49
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
50
50
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
51
- version: "0.3.100",
51
+ version: "0.3.102",
52
52
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
53
53
  packageCapabilities: {
54
54
  updatePreferences: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.100",
3
+ "version": "0.3.102",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",