deepline 0.3.161 → 0.3.162

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.
@@ -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.161',
203
+ version: '0.3.162',
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: {
@@ -1022,8 +1022,10 @@ export interface StopPlayRunResult {
1022
1022
  stopped: boolean;
1023
1023
  /** True when the durable cancellation lane accepted the request and is draining. */
1024
1024
  cancelling?: boolean;
1025
- /** Number of open HITL interactions marked cancelled. */
1025
+ /** Number of run-scoped HITL waits cancelled by the stop request. */
1026
1026
  hitlCancelledCount: number;
1027
+ /** True if HITL state or its same-message Slack card still needs retrying. */
1028
+ hitlCancellationPending?: boolean;
1027
1029
  /**
1028
1030
  * True when the scheduler state for the run was stale and the stop could
1029
1031
  * not be confirmed. Absent on older servers (treated as confirmed).
@@ -5519,6 +5519,8 @@ export function absurdAdoptedLaneWorkerOptions(input: {
5519
5519
  workerBase: string;
5520
5520
  queue: string;
5521
5521
  nextPollDelayMs: () => Promise<number | null>;
5522
+ reconcileRuntimeCancellations: () => Promise<void>;
5523
+ sweepAndReconcileCancellations: () => Promise<void>;
5522
5524
  onError: (error: Error) => void;
5523
5525
  }): WorkerOptions {
5524
5526
  return {
@@ -5534,6 +5536,12 @@ export function absurdAdoptedLaneWorkerOptions(input: {
5534
5536
  pollInterval: ABSURD_IDLE_POLL_INTERVAL_SECONDS,
5535
5537
  nextPollDelayMs: input.nextPollDelayMs,
5536
5538
  idlePollFallbackMs: () => ABSURD_ADOPTED_LANE_POLL_INTERVAL_MS,
5539
+ // A manually cancelled Absurd task cannot be claimed. Retired queues
5540
+ // therefore need the same scheduler/outbox projection hooks as the
5541
+ // active lane, or a run parked on this queue can stay `waiting` forever
5542
+ // after the old release stops polling it.
5543
+ afterClaim: input.reconcileRuntimeCancellations,
5544
+ saturatedMaintenance: input.sweepAndReconcileCancellations,
5537
5545
  fatalOnLeaseTimeout: false,
5538
5546
  onError: input.onError,
5539
5547
  };
@@ -6948,6 +6956,9 @@ export async function startRuntimeWorkerHost(
6948
6956
  schedulerOptions.schema,
6949
6957
  ),
6950
6958
  });
6959
+ const reportCancellationProgress = createRateLimitedRuntimeLogger({
6960
+ log: (...args) => console.info(...args),
6961
+ });
6951
6962
  const reconcileRuntimeCancellations = async () => {
6952
6963
  await withRuntimeSchedulerClient(poolOptions, async (client) => {
6953
6964
  const cancellations = await reconcileAbsurdRuntimeCancellations({
@@ -6955,12 +6966,16 @@ export async function startRuntimeWorkerHost(
6955
6966
  queue,
6956
6967
  schedulerOptions,
6957
6968
  });
6958
- if (cancellations.reconciled > 0) {
6959
- console.info('[absurd-runtime.worker] cancellations_reconciled', {
6960
- queue,
6961
- releaseId,
6962
- ...cancellations,
6963
- });
6969
+ if (cancellations.reconciled > 0 || cancellations.skipped > 0) {
6970
+ reportCancellationProgress(
6971
+ '[absurd-runtime.worker] cancellations_reconciled',
6972
+ {
6973
+ queue,
6974
+ releaseId,
6975
+ adopted: false,
6976
+ ...cancellations,
6977
+ },
6978
+ );
6964
6979
  }
6965
6980
  });
6966
6981
  };
@@ -7102,6 +7117,36 @@ export async function startRuntimeWorkerHost(
7102
7117
  const reportAdoptedQueueError = createRateLimitedRuntimeLogger({
7103
7118
  log: (...args) => console.error(...args),
7104
7119
  });
7120
+ const reportAdoptedCancellationProgress =
7121
+ createRateLimitedRuntimeLogger({
7122
+ log: (...args) => console.info(...args),
7123
+ });
7124
+ const reconcileAdoptedQueueCancellations = async () => {
7125
+ await withRuntimeSchedulerClient(poolOptions, async (client) => {
7126
+ const cancellations = await reconcileAbsurdRuntimeCancellations({
7127
+ client,
7128
+ queue: adoptedQueue,
7129
+ schedulerOptions,
7130
+ });
7131
+ if (cancellations.reconciled > 0 || cancellations.skipped > 0) {
7132
+ reportAdoptedCancellationProgress(
7133
+ '[absurd-runtime.worker] cancellations_reconciled',
7134
+ {
7135
+ queue: adoptedQueue,
7136
+ releaseId,
7137
+ adopted: true,
7138
+ ...cancellations,
7139
+ },
7140
+ );
7141
+ }
7142
+ });
7143
+ };
7144
+ const sweepAndReconcileAdoptedQueueCancellations = async () => {
7145
+ await adoptedClient.sweepCancellations(
7146
+ ABSURD_CANCELLED_DEADLINE_RECONCILE_LIMIT,
7147
+ );
7148
+ await reconcileAdoptedQueueCancellations();
7149
+ };
7105
7150
  const adoptedWorker = await adoptedClient.startWorker(
7106
7151
  absurdAdoptedLaneWorkerOptions({
7107
7152
  workerBase,
@@ -7115,6 +7160,9 @@ export async function startRuntimeWorkerHost(
7115
7160
  if (!nextDue.dueAt) return null;
7116
7161
  return nextDue.dueAt.getTime() - Date.now();
7117
7162
  }),
7163
+ reconcileRuntimeCancellations: reconcileAdoptedQueueCancellations,
7164
+ sweepAndReconcileCancellations:
7165
+ sweepAndReconcileAdoptedQueueCancellations,
7118
7166
  onError: (error) =>
7119
7167
  reportAdoptedQueueError(
7120
7168
  '[absurd-runtime.worker] adopted_queue_error',
@@ -144,6 +144,10 @@ export const PLAY_AUTHORING_CONTRACT_ISSUE_CODES = [
144
144
  'play_authoring_fetch_idempotency_required',
145
145
  'play_authoring_fetch_key_reused_in_loop',
146
146
  'play_authoring_fetch_http_error_branch',
147
+ 'play_authoring_slack_interactive_message_without_wait',
148
+ 'play_authoring_slack_interactive_layout_unverified',
149
+ 'play_authoring_slack_action_wait_result_ignored',
150
+ 'play_authoring_slack_action_wait_unbounded_loop',
147
151
  'play_authoring_tool_deprecated',
148
152
  'play_authoring_replay_unsafe_nondeterminism',
149
153
  'play_authoring_row_sleep_unsupported',
package/dist/cli/index.js CHANGED
@@ -3051,7 +3051,7 @@ var SDK_RELEASE = {
3051
3051
  // getters keep their established compatibility behavior.
3052
3052
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3053
3053
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3054
- version: "0.3.161",
3054
+ version: "0.3.162",
3055
3055
  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.",
3056
3056
  packageCapabilities: {
3057
3057
  updatePreferences: 1
@@ -28623,10 +28623,17 @@ async function handleRunStop(args) {
28623
28623
  const stopNotConfirmed = result.stopped === false || result.staleSchedulerState === true;
28624
28624
  if (stopNotConfirmed) {
28625
28625
  const detail = typeof result.error === "string" && result.error.trim() ? result.error.trim() : result.staleSchedulerState === true ? "scheduler state for the run is stale" : "the server did not confirm the stop";
28626
- process.stderr.write(
28627
- `Failed to stop run ${runId}: ${detail}. Retry 'deepline runs stop ${runId}' or inspect the run with 'deepline runs get ${runId} --full --json'.
28628
- `
28629
- );
28626
+ const lines2 = [
28627
+ `Failed to stop run ${runId}: ${detail}.`,
28628
+ ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
28629
+ ...result.hitlCancellationPending === true ? [
28630
+ "warning: HITL cancellation or same-card Slack refresh is still pending"
28631
+ ] : [],
28632
+ `retry: deepline runs stop ${runId}`,
28633
+ `inspect: deepline runs get ${runId} --full --json`
28634
+ ];
28635
+ process.stderr.write(`${lines2.join("\n")}
28636
+ `);
28630
28637
  printCommandEnvelope(
28631
28638
  {
28632
28639
  ...result,
@@ -28636,9 +28643,7 @@ async function handleRunStop(args) {
28636
28643
  title: "run stop",
28637
28644
  lines: [
28638
28645
  `\u2717 stop not confirmed for ${result.runId || runId}`,
28639
- ` ${detail}`,
28640
- ` retry: deepline runs stop ${runId}`,
28641
- ` inspect: deepline runs get ${runId} --full --json`
28646
+ ...lines2.slice(1)
28642
28647
  ]
28643
28648
  }
28644
28649
  ]
@@ -28650,7 +28655,10 @@ async function handleRunStop(args) {
28650
28655
  }
28651
28656
  const lines = [
28652
28657
  `Stopped ${result.runId}`,
28653
- ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : []
28658
+ ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
28659
+ ...result.hitlCancellationPending === true ? [
28660
+ `warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
28661
+ ] : []
28654
28662
  ];
28655
28663
  printCommandEnvelope(
28656
28664
  {
@@ -3046,7 +3046,7 @@ var SDK_RELEASE = {
3046
3046
  // getters keep their established compatibility behavior.
3047
3047
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3048
3048
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3049
- version: "0.3.161",
3049
+ version: "0.3.162",
3050
3050
  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.",
3051
3051
  packageCapabilities: {
3052
3052
  updatePreferences: 1
@@ -28695,10 +28695,17 @@ async function handleRunStop(args) {
28695
28695
  const stopNotConfirmed = result.stopped === false || result.staleSchedulerState === true;
28696
28696
  if (stopNotConfirmed) {
28697
28697
  const detail = typeof result.error === "string" && result.error.trim() ? result.error.trim() : result.staleSchedulerState === true ? "scheduler state for the run is stale" : "the server did not confirm the stop";
28698
- process.stderr.write(
28699
- `Failed to stop run ${runId}: ${detail}. Retry 'deepline runs stop ${runId}' or inspect the run with 'deepline runs get ${runId} --full --json'.
28700
- `
28701
- );
28698
+ const lines2 = [
28699
+ `Failed to stop run ${runId}: ${detail}.`,
28700
+ ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
28701
+ ...result.hitlCancellationPending === true ? [
28702
+ "warning: HITL cancellation or same-card Slack refresh is still pending"
28703
+ ] : [],
28704
+ `retry: deepline runs stop ${runId}`,
28705
+ `inspect: deepline runs get ${runId} --full --json`
28706
+ ];
28707
+ process.stderr.write(`${lines2.join("\n")}
28708
+ `);
28702
28709
  printCommandEnvelope(
28703
28710
  {
28704
28711
  ...result,
@@ -28708,9 +28715,7 @@ async function handleRunStop(args) {
28708
28715
  title: "run stop",
28709
28716
  lines: [
28710
28717
  `\u2717 stop not confirmed for ${result.runId || runId}`,
28711
- ` ${detail}`,
28712
- ` retry: deepline runs stop ${runId}`,
28713
- ` inspect: deepline runs get ${runId} --full --json`
28718
+ ...lines2.slice(1)
28714
28719
  ]
28715
28720
  }
28716
28721
  ]
@@ -28722,7 +28727,10 @@ async function handleRunStop(args) {
28722
28727
  }
28723
28728
  const lines = [
28724
28729
  `Stopped ${result.runId}`,
28725
- ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : []
28730
+ ...result.hitlCancelledCount > 0 ? [`cancelled HITL waits: ${result.hitlCancelledCount}`] : [],
28731
+ ...result.hitlCancellationPending === true ? [
28732
+ `warning: HITL cancellation or Slack card refresh is still pending; retry 'deepline runs stop ${runId}'`
28733
+ ] : []
28726
28734
  ];
28727
28735
  printCommandEnvelope(
28728
28736
  {
package/dist/index.d.mts CHANGED
@@ -1917,8 +1917,10 @@ interface StopPlayRunResult {
1917
1917
  stopped: boolean;
1918
1918
  /** True when the durable cancellation lane accepted the request and is draining. */
1919
1919
  cancelling?: boolean;
1920
- /** Number of open HITL interactions marked cancelled. */
1920
+ /** Number of run-scoped HITL waits cancelled by the stop request. */
1921
1921
  hitlCancelledCount: number;
1922
+ /** True if HITL state or its same-message Slack card still needs retrying. */
1923
+ hitlCancellationPending?: boolean;
1922
1924
  /**
1923
1925
  * True when the scheduler state for the run was stale and the stop could
1924
1926
  * not be confirmed. Absent on older servers (treated as confirmed).
package/dist/index.d.ts CHANGED
@@ -1917,8 +1917,10 @@ interface StopPlayRunResult {
1917
1917
  stopped: boolean;
1918
1918
  /** True when the durable cancellation lane accepted the request and is draining. */
1919
1919
  cancelling?: boolean;
1920
- /** Number of open HITL interactions marked cancelled. */
1920
+ /** Number of run-scoped HITL waits cancelled by the stop request. */
1921
1921
  hitlCancelledCount: number;
1922
+ /** True if HITL state or its same-message Slack card still needs retrying. */
1923
+ hitlCancellationPending?: boolean;
1922
1924
  /**
1923
1925
  * True when the scheduler state for the run was stale and the stop could
1924
1926
  * not be confirmed. Absent on older servers (treated as confirmed).
package/dist/index.js CHANGED
@@ -864,7 +864,7 @@ var SDK_RELEASE = {
864
864
  // getters keep their established compatibility behavior.
865
865
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
866
866
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
867
- version: "0.3.161",
867
+ version: "0.3.162",
868
868
  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.",
869
869
  packageCapabilities: {
870
870
  updatePreferences: 1
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.161",
771
+ version: "0.3.162",
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
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.161";
152
+ readonly version: "0.3.162";
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.161";
152
+ readonly version: "0.3.162";
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.161",
77
+ version: "0.3.162",
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.161",
51
+ version: "0.3.162",
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.161",
3
+ "version": "0.3.162",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",