deepline 0.3.286 → 0.3.288

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +47 -24
  2. package/dist/bundling-sources/sdk/src/index.ts +4 -0
  3. package/dist/bundling-sources/sdk/src/release.ts +7 -1
  4. package/dist/bundling-sources/sdk/src/types.ts +36 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/cell-provenance.ts +16 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +17 -12
  7. package/dist/bundling-sources/shared_libs/play-runtime/docflow-node-io.ts +22 -54
  8. package/dist/bundling-sources/shared_libs/play-runtime/ledger-safe-payload.ts +7 -26
  9. package/dist/bundling-sources/shared_libs/play-runtime/live-state-contract.ts +2 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +38 -3
  11. package/dist/bundling-sources/shared_libs/play-runtime/run-observation.ts +12 -0
  12. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +3 -0
  13. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +43 -1
  14. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +19 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +88 -1
  16. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +3 -1
  17. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +53 -25
  18. package/dist/bundling-sources/shared_libs/play-runtime/secret-redaction.ts +47 -1
  19. package/dist/bundling-sources/shared_libs/play-runtime/step-progress.ts +83 -1
  20. package/dist/bundling-sources/shared_libs/play-runtime/worker-api-types.ts +2 -0
  21. package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +1 -89
  22. package/dist/cli/index.js +580 -629
  23. package/dist/cli/index.mjs +457 -507
  24. package/dist/{client-B7ic-kY5.d.ts → client-FR_u0dxT.d.ts} +38 -1
  25. package/dist/{client-Dzf_KovW.d.mts → client-phK1Ixcl.d.mts} +38 -1
  26. package/dist/index.d.mts +2 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +49 -26
  29. package/dist/index.mjs +49 -26
  30. package/dist/install-integrity.json +2 -2
  31. package/dist/plays/run-request.d.mts +1 -1
  32. package/dist/plays/run-request.d.ts +1 -1
  33. package/dist/release.d.mts +5 -1
  34. package/dist/release.d.ts +5 -1
  35. package/dist/release.js +6 -1
  36. package/dist/release.mjs +6 -1
  37. package/package.json +1 -1
@@ -6,7 +6,6 @@ type SecretRedactionOptions = {
6
6
  keyPolicy?: 'strict' | 'public-result';
7
7
  /** Replace sample cursor values with a non-capability-bearing placeholder. */
8
8
  placeholderContinuationValues?: boolean;
9
- redactJsonStrings?: boolean;
10
9
  };
11
10
 
12
11
  const SENSITIVE_KEY_PATTERNS = [
@@ -400,83 +399,12 @@ function maybeRedactString(value: string, options: SecretRedactionOptions) {
400
399
  : redacted.replace(HIGH_ENTROPY_VALUE_PATTERN, REDACTED_VALUE);
401
400
  }
402
401
 
403
- function parseJsonContainerText(value: unknown): unknown {
404
- if (typeof value !== 'string') return value;
405
- const trimmed = value.trim();
406
- if (!trimmed.startsWith('{') && !trimmed.startsWith('[')) return value;
407
- try {
408
- return JSON.parse(value);
409
- } catch {
410
- return value;
411
- }
412
- }
413
-
414
- function jsonStringContainsSecrets(
415
- value: string,
416
- options: SecretRedactionOptions,
417
- parentKey?: string,
418
- path: readonly string[] = [],
419
- ): boolean {
420
- // Inspect parsed values, but never reserialize SQL text and round its numeric literals.
421
- const parsed = parseJsonContainerText(value);
422
- if (!parsed || typeof parsed !== 'object') return false;
423
- const pending = [
424
- {
425
- value: parsed,
426
- parentKey,
427
- path: [...path],
428
- },
429
- ];
430
- const textOptions = { ...options, redactJsonStrings: false };
431
- while (pending.length > 0) {
432
- const current = pending.pop()!;
433
- const sourceIsArray = Array.isArray(current.value);
434
- for (const [key, rawItem] of Object.entries(current.value)) {
435
- const item = parseJsonContainerText(rawItem);
436
- const parentKey = sourceIsArray ? current.parentKey : key;
437
- if (
438
- !sourceIsArray &&
439
- options.keyPolicy === 'public-result' &&
440
- isPublicResultSafeTokenKey(key, current.path, item) &&
441
- (!item || typeof item !== 'object')
442
- ) {
443
- if (
444
- typeof item === 'string' &&
445
- maybeRedactString(item, textOptions) !== item
446
- )
447
- return true;
448
- continue;
449
- }
450
- if (!sourceIsArray && shouldRedactKey(key)) return true;
451
- if (item && typeof item === 'object') {
452
- pending.push({
453
- value: item,
454
- parentKey,
455
- path: sourceIsArray ? current.path : [...current.path, key],
456
- });
457
- } else if (
458
- typeof item === 'string' &&
459
- redactSecretsInValue(item, parentKey, textOptions) !== item
460
- ) {
461
- return true;
462
- }
463
- }
464
- }
465
- return false;
466
- }
467
-
468
402
  export function redactSecretsInValue<T>(
469
403
  value: T,
470
404
  parentKey?: string,
471
405
  options: SecretRedactionOptions = {},
472
406
  ): T {
473
407
  if (typeof value === 'string') {
474
- if (
475
- options.redactJsonStrings &&
476
- jsonStringContainsSecrets(value, options, parentKey)
477
- ) {
478
- return REDACTED_VALUE as T;
479
- }
480
408
  if (hasExplicitSecretValue(value, options)) {
481
409
  return REDACTED_VALUE as T;
482
410
  }
@@ -519,15 +447,8 @@ export function redactSecretsInValue<T>(
519
447
  const redactNestedValue = (
520
448
  item: unknown,
521
449
  itemParentKey: string | undefined,
522
- path: readonly string[],
523
450
  ): unknown => {
524
451
  if (typeof item !== 'string') return item;
525
- if (
526
- options.redactJsonStrings &&
527
- jsonStringContainsSecrets(item, options, itemParentKey, path)
528
- ) {
529
- return REDACTED_VALUE;
530
- }
531
452
  if (hasExplicitSecretValue(item, options)) {
532
453
  return REDACTED_VALUE;
533
454
  }
@@ -552,15 +473,7 @@ export function redactSecretsInValue<T>(
552
473
  (!item || typeof item !== 'object')
553
474
  ) {
554
475
  const redacted =
555
- typeof item === 'string'
556
- ? options.redactJsonStrings &&
557
- jsonStringContainsSecrets(item, options, itemParentKey, [
558
- ...current.path,
559
- key,
560
- ])
561
- ? REDACTED_VALUE
562
- : maybeRedactString(item, options)
563
- : item;
476
+ typeof item === 'string' ? maybeRedactString(item, options) : item;
564
477
  (current.target as Record<string, unknown>)[key] =
565
478
  options.placeholderContinuationValues &&
566
479
  isPublicResultCursorKey(key, current.path) &&
@@ -589,7 +502,6 @@ export function redactSecretsInValue<T>(
589
502
  (current.target as Record<string, unknown>)[key] = redactNestedValue(
590
503
  item,
591
504
  itemParentKey,
592
- sourceIsArray ? current.path : [...current.path, key],
593
505
  );
594
506
  }
595
507
  }