deepline 0.3.160 → 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.
- package/README.md +13 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +54 -6
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +4 -0
- package/dist/cli/index.js +57 -20
- package/dist/cli/index.mjs +54 -17
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +1 -1
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,11 +16,22 @@ Claude Code, Codex, or your terminal.
|
|
|
16
16
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
19
|
+
Check `npm --version` and use the matching command.
|
|
20
|
+
|
|
21
|
+
For npm 11.16 or newer:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g --allow-scripts=esbuild deepline@latest
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For older npm:
|
|
28
|
+
|
|
19
29
|
```bash
|
|
20
30
|
npm install -g deepline@latest
|
|
21
|
-
deepline setup --json
|
|
22
31
|
```
|
|
23
32
|
|
|
33
|
+
Then run `deepline setup --json`.
|
|
34
|
+
|
|
24
35
|
Setup opens your browser so you can sign in, then installs Deepline's skills
|
|
25
36
|
for your coding agent. If global skill setup is unavailable, Deepline retries
|
|
26
37
|
with project-local skills automatically.
|
|
@@ -30,7 +41,7 @@ with project-local skills automatically.
|
|
|
30
41
|
Paste this into Claude Code, Codex, or another coding agent:
|
|
31
42
|
|
|
32
43
|
```text
|
|
33
|
-
|
|
44
|
+
Install the official Deepline CLI globally from npm (package: deepline) by following https://code.deepline.com/INSTALL.md.
|
|
34
45
|
```
|
|
35
46
|
|
|
36
47
|
Once setup is complete, tell your agent what you want to do:
|
|
@@ -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.
|
|
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
|
|
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).
|
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts
CHANGED
|
@@ -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
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
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.
|
|
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
|
-
|
|
28627
|
-
`Failed to stop run ${runId}: ${detail}
|
|
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
|
-
|
|
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
|
{
|
|
@@ -42469,7 +42477,7 @@ Examples:
|
|
|
42469
42477
|
}
|
|
42470
42478
|
|
|
42471
42479
|
// src/cli/commands/setup.ts
|
|
42472
|
-
var
|
|
42480
|
+
var import_node_child_process5 = require("child_process");
|
|
42473
42481
|
var import_node_fs20 = require("fs");
|
|
42474
42482
|
var import_node_os14 = require("os");
|
|
42475
42483
|
var import_node_path25 = require("path");
|
|
@@ -44224,6 +44232,32 @@ Examples:
|
|
|
44224
44232
|
});
|
|
44225
44233
|
}
|
|
44226
44234
|
|
|
44235
|
+
// src/cli/npm-script-policy.ts
|
|
44236
|
+
var import_node_child_process4 = require("child_process");
|
|
44237
|
+
function npmSupportsAllowScripts(version) {
|
|
44238
|
+
const match = /^(\d+)\.(\d+)(?:\.|$)/.exec(version?.trim() ?? "");
|
|
44239
|
+
if (!match) return false;
|
|
44240
|
+
const major = Number(match[1]);
|
|
44241
|
+
const minor = Number(match[2]);
|
|
44242
|
+
return major > 11 || major === 11 && minor >= 16;
|
|
44243
|
+
}
|
|
44244
|
+
function readNpmVersion(env) {
|
|
44245
|
+
try {
|
|
44246
|
+
const plan = resolveShellSpawn("npm", ["--version"]);
|
|
44247
|
+
const result = (0, import_node_child_process4.spawnSync)(plan.command, plan.args, {
|
|
44248
|
+
encoding: "utf8",
|
|
44249
|
+
env,
|
|
44250
|
+
shell: plan.shell,
|
|
44251
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
44252
|
+
timeout: 5e3
|
|
44253
|
+
});
|
|
44254
|
+
if (result.status !== 0) return null;
|
|
44255
|
+
return String(result.stdout ?? "").trim() || null;
|
|
44256
|
+
} catch {
|
|
44257
|
+
return null;
|
|
44258
|
+
}
|
|
44259
|
+
}
|
|
44260
|
+
|
|
44227
44261
|
// src/cli/commands/setup.ts
|
|
44228
44262
|
var SETUP_PHASE_NAMES = [
|
|
44229
44263
|
"cli",
|
|
@@ -44413,7 +44447,7 @@ function removeKnownLegacyPaths(baseUrl) {
|
|
|
44413
44447
|
}).removeRetiredArtifacts();
|
|
44414
44448
|
}
|
|
44415
44449
|
function resolvePathCommands(command) {
|
|
44416
|
-
const lookup = (0,
|
|
44450
|
+
const lookup = (0, import_node_child_process5.spawnSync)(
|
|
44417
44451
|
process.platform === "win32" ? "where" : "which",
|
|
44418
44452
|
process.platform === "win32" ? [command] : ["-a", command],
|
|
44419
44453
|
{ encoding: "utf8", shell: process.platform === "win32" }
|
|
@@ -44440,7 +44474,7 @@ function isHomebrewFormulaCommand(path) {
|
|
|
44440
44474
|
}
|
|
44441
44475
|
function resolvePersistentGlobalCommand(dependencies = {}) {
|
|
44442
44476
|
const platform3 = dependencies.platform ?? process.platform;
|
|
44443
|
-
const run = dependencies.spawn ??
|
|
44477
|
+
const run = dependencies.spawn ?? import_node_child_process5.spawnSync;
|
|
44444
44478
|
const pathExists = dependencies.exists ?? import_node_fs20.existsSync;
|
|
44445
44479
|
const pathClis = dependencies.pathClis ?? resolvePathCommands("deepline");
|
|
44446
44480
|
const homebrewCommand = pathClis.find(isHomebrewFormulaCommand);
|
|
@@ -44539,7 +44573,8 @@ function failSetupPhase(phases, phase, code) {
|
|
|
44539
44573
|
}
|
|
44540
44574
|
function rollbackCommand(scope, root) {
|
|
44541
44575
|
const prefix = scope === "local" && root ? ` --prefix ${JSON.stringify((0, import_node_path25.join)(root, ".deepline", "runtime"))}` : "";
|
|
44542
|
-
|
|
44576
|
+
const allowScriptsFlag = npmSupportsAllowScripts(readNpmVersion(process.env)) ? " --allow-scripts=esbuild" : "";
|
|
44577
|
+
return `npm install -g${prefix} --no-audit --no-fund --include=optional${allowScriptsFlag} deepline@${SDK_VERSION}`;
|
|
44543
44578
|
}
|
|
44544
44579
|
function setupResumeCommand(baseUrl, scope) {
|
|
44545
44580
|
const hostPrefix = baseUrl === "https://code.deepline.com" ? "" : `DEEPLINE_HOST_URL=${JSON.stringify(baseUrl)} `;
|
|
@@ -45280,7 +45315,7 @@ function consumePendingCliUpdateMessages(homeDir2 = (0, import_node_os15.homedir
|
|
|
45280
45315
|
}
|
|
45281
45316
|
|
|
45282
45317
|
// src/cli/commands/update.ts
|
|
45283
|
-
var
|
|
45318
|
+
var import_node_child_process6 = require("child_process");
|
|
45284
45319
|
var import_node_fs23 = require("fs");
|
|
45285
45320
|
var import_node_os16 = require("os");
|
|
45286
45321
|
var import_node_path28 = require("path");
|
|
@@ -45631,7 +45666,7 @@ function normalizedNpmPrefix(value) {
|
|
|
45631
45666
|
function resolveNpmGlobalPrefix(env) {
|
|
45632
45667
|
try {
|
|
45633
45668
|
const plan = resolveShellSpawn("npm", ["prefix", "-g"]);
|
|
45634
|
-
const result = (0,
|
|
45669
|
+
const result = (0, import_node_child_process6.spawnSync)(plan.command, plan.args, {
|
|
45635
45670
|
encoding: "utf8",
|
|
45636
45671
|
env,
|
|
45637
45672
|
shell: plan.shell,
|
|
@@ -45686,14 +45721,16 @@ function resolveUpdatePlan(options = {}) {
|
|
|
45686
45721
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
45687
45722
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
45688
45723
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
45724
|
+
const npmVersion = options.npmVersion === void 0 ? readNpmVersion(env) : options.npmVersion;
|
|
45725
|
+
const npmGlobalInstallFlags = npmSupportsAllowScripts(npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
45689
45726
|
const args = installPrefix ? [
|
|
45690
45727
|
"install",
|
|
45691
45728
|
"-g",
|
|
45692
45729
|
"--prefix",
|
|
45693
45730
|
installPrefix,
|
|
45694
|
-
...
|
|
45731
|
+
...npmGlobalInstallFlags,
|
|
45695
45732
|
packageSpec
|
|
45696
|
-
] : ["install", "-g", ...
|
|
45733
|
+
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
45697
45734
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
45698
45735
|
env.DEEPLINE_HOST_URL?.trim() || autoDetectBaseUrl()
|
|
45699
45736
|
);
|
|
@@ -45843,7 +45880,7 @@ function runCommand(command, args, env = process.env) {
|
|
|
45843
45880
|
return new Promise((resolveResult) => {
|
|
45844
45881
|
let output2 = "";
|
|
45845
45882
|
const plan = resolveShellSpawn(command, args);
|
|
45846
|
-
const child = (0,
|
|
45883
|
+
const child = (0, import_node_child_process6.spawn)(plan.command, plan.args, {
|
|
45847
45884
|
stdio: ["inherit", "pipe", "pipe"],
|
|
45848
45885
|
shell: plan.shell,
|
|
45849
45886
|
env
|
|
@@ -50823,7 +50860,7 @@ function registerDeeplineCommandGroups(program) {
|
|
|
50823
50860
|
}
|
|
50824
50861
|
|
|
50825
50862
|
// src/cli/self-update.ts
|
|
50826
|
-
var
|
|
50863
|
+
var import_node_child_process7 = require("child_process");
|
|
50827
50864
|
var AUTO_UPDATE_TELEMETRY_TIMEOUT_MS = 2e3;
|
|
50828
50865
|
var TRUSTED_AUTO_UPDATE_ORIGIN = "https://code.deepline.com";
|
|
50829
50866
|
function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
@@ -50919,7 +50956,7 @@ function relaunchCurrentCommand(plan) {
|
|
|
50919
50956
|
return new Promise((resolve22) => {
|
|
50920
50957
|
const command = plan.kind === "python-sidecar" ? plan.sidecarPath : process.execPath;
|
|
50921
50958
|
const args = plan.kind === "python-sidecar" ? process.argv.slice(2) : process.argv.slice(1);
|
|
50922
|
-
const child = (0,
|
|
50959
|
+
const child = (0, import_node_child_process7.spawn)(command, args, {
|
|
50923
50960
|
stdio: "inherit",
|
|
50924
50961
|
shell: process.platform === "win32",
|
|
50925
50962
|
env: {
|
package/dist/cli/index.mjs
CHANGED
|
@@ -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.
|
|
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
|
-
|
|
28699
|
-
`Failed to stop run ${runId}: ${detail}
|
|
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
|
-
|
|
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
|
{
|
|
@@ -42554,7 +42562,7 @@ Examples:
|
|
|
42554
42562
|
}
|
|
42555
42563
|
|
|
42556
42564
|
// src/cli/commands/setup.ts
|
|
42557
|
-
import { spawnSync as
|
|
42565
|
+
import { spawnSync as spawnSync3 } from "child_process";
|
|
42558
42566
|
import {
|
|
42559
42567
|
existsSync as existsSync15,
|
|
42560
42568
|
lstatSync as lstatSync2,
|
|
@@ -44331,6 +44339,32 @@ Examples:
|
|
|
44331
44339
|
});
|
|
44332
44340
|
}
|
|
44333
44341
|
|
|
44342
|
+
// src/cli/npm-script-policy.ts
|
|
44343
|
+
import { spawnSync as spawnSync2 } from "child_process";
|
|
44344
|
+
function npmSupportsAllowScripts(version) {
|
|
44345
|
+
const match = /^(\d+)\.(\d+)(?:\.|$)/.exec(version?.trim() ?? "");
|
|
44346
|
+
if (!match) return false;
|
|
44347
|
+
const major = Number(match[1]);
|
|
44348
|
+
const minor = Number(match[2]);
|
|
44349
|
+
return major > 11 || major === 11 && minor >= 16;
|
|
44350
|
+
}
|
|
44351
|
+
function readNpmVersion(env) {
|
|
44352
|
+
try {
|
|
44353
|
+
const plan = resolveShellSpawn("npm", ["--version"]);
|
|
44354
|
+
const result = spawnSync2(plan.command, plan.args, {
|
|
44355
|
+
encoding: "utf8",
|
|
44356
|
+
env,
|
|
44357
|
+
shell: plan.shell,
|
|
44358
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
44359
|
+
timeout: 5e3
|
|
44360
|
+
});
|
|
44361
|
+
if (result.status !== 0) return null;
|
|
44362
|
+
return String(result.stdout ?? "").trim() || null;
|
|
44363
|
+
} catch {
|
|
44364
|
+
return null;
|
|
44365
|
+
}
|
|
44366
|
+
}
|
|
44367
|
+
|
|
44334
44368
|
// src/cli/commands/setup.ts
|
|
44335
44369
|
var SETUP_PHASE_NAMES = [
|
|
44336
44370
|
"cli",
|
|
@@ -44520,7 +44554,7 @@ function removeKnownLegacyPaths(baseUrl) {
|
|
|
44520
44554
|
}).removeRetiredArtifacts();
|
|
44521
44555
|
}
|
|
44522
44556
|
function resolvePathCommands(command) {
|
|
44523
|
-
const lookup =
|
|
44557
|
+
const lookup = spawnSync3(
|
|
44524
44558
|
process.platform === "win32" ? "where" : "which",
|
|
44525
44559
|
process.platform === "win32" ? [command] : ["-a", command],
|
|
44526
44560
|
{ encoding: "utf8", shell: process.platform === "win32" }
|
|
@@ -44547,7 +44581,7 @@ function isHomebrewFormulaCommand(path) {
|
|
|
44547
44581
|
}
|
|
44548
44582
|
function resolvePersistentGlobalCommand(dependencies = {}) {
|
|
44549
44583
|
const platform3 = dependencies.platform ?? process.platform;
|
|
44550
|
-
const run = dependencies.spawn ??
|
|
44584
|
+
const run = dependencies.spawn ?? spawnSync3;
|
|
44551
44585
|
const pathExists = dependencies.exists ?? existsSync15;
|
|
44552
44586
|
const pathClis = dependencies.pathClis ?? resolvePathCommands("deepline");
|
|
44553
44587
|
const homebrewCommand = pathClis.find(isHomebrewFormulaCommand);
|
|
@@ -44646,7 +44680,8 @@ function failSetupPhase(phases, phase, code) {
|
|
|
44646
44680
|
}
|
|
44647
44681
|
function rollbackCommand(scope, root) {
|
|
44648
44682
|
const prefix = scope === "local" && root ? ` --prefix ${JSON.stringify(join20(root, ".deepline", "runtime"))}` : "";
|
|
44649
|
-
|
|
44683
|
+
const allowScriptsFlag = npmSupportsAllowScripts(readNpmVersion(process.env)) ? " --allow-scripts=esbuild" : "";
|
|
44684
|
+
return `npm install -g${prefix} --no-audit --no-fund --include=optional${allowScriptsFlag} deepline@${SDK_VERSION}`;
|
|
44650
44685
|
}
|
|
44651
44686
|
function setupResumeCommand(baseUrl, scope) {
|
|
44652
44687
|
const hostPrefix = baseUrl === "https://code.deepline.com" ? "" : `DEEPLINE_HOST_URL=${JSON.stringify(baseUrl)} `;
|
|
@@ -45394,7 +45429,7 @@ function consumePendingCliUpdateMessages(homeDir2 = homedir10()) {
|
|
|
45394
45429
|
}
|
|
45395
45430
|
|
|
45396
45431
|
// src/cli/commands/update.ts
|
|
45397
|
-
import { spawn as spawn4, spawnSync as
|
|
45432
|
+
import { spawn as spawn4, spawnSync as spawnSync4 } from "child_process";
|
|
45398
45433
|
import {
|
|
45399
45434
|
existsSync as existsSync18,
|
|
45400
45435
|
mkdirSync as mkdirSync14,
|
|
@@ -45761,7 +45796,7 @@ function normalizedNpmPrefix(value) {
|
|
|
45761
45796
|
function resolveNpmGlobalPrefix(env) {
|
|
45762
45797
|
try {
|
|
45763
45798
|
const plan = resolveShellSpawn("npm", ["prefix", "-g"]);
|
|
45764
|
-
const result =
|
|
45799
|
+
const result = spawnSync4(plan.command, plan.args, {
|
|
45765
45800
|
encoding: "utf8",
|
|
45766
45801
|
env,
|
|
45767
45802
|
shell: plan.shell,
|
|
@@ -45816,14 +45851,16 @@ function resolveUpdatePlan(options = {}) {
|
|
|
45816
45851
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
45817
45852
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
45818
45853
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
45854
|
+
const npmVersion = options.npmVersion === void 0 ? readNpmVersion(env) : options.npmVersion;
|
|
45855
|
+
const npmGlobalInstallFlags = npmSupportsAllowScripts(npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
45819
45856
|
const args = installPrefix ? [
|
|
45820
45857
|
"install",
|
|
45821
45858
|
"-g",
|
|
45822
45859
|
"--prefix",
|
|
45823
45860
|
installPrefix,
|
|
45824
|
-
...
|
|
45861
|
+
...npmGlobalInstallFlags,
|
|
45825
45862
|
packageSpec
|
|
45826
|
-
] : ["install", "-g", ...
|
|
45863
|
+
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
45827
45864
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
45828
45865
|
env.DEEPLINE_HOST_URL?.trim() || autoDetectBaseUrl()
|
|
45829
45866
|
);
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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
|
package/dist/release.d.mts
CHANGED
|
@@ -149,7 +149,7 @@ type SdkRelease = {
|
|
|
149
149
|
supportPolicy: SdkSupportPolicy;
|
|
150
150
|
};
|
|
151
151
|
declare const SDK_RELEASE: {
|
|
152
|
-
readonly version: "0.3.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|