deepline 0.3.266 → 0.3.267
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client.ts +57 -0
- package/dist/bundling-sources/sdk/src/index.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/index.js +141 -44
- package/dist/cli/index.mjs +141 -44
- package/dist/{client-C9Y49yya.d.ts → client-BqwMlN0Q.d.ts} +19 -1
- package/dist/{client-B5XbKrrs.d.mts → client-C4Zmm_zD.d.mts} +19 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -1
- package/dist/index.mjs +26 -1
- package/dist/install-integrity.json +2 -2
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +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
|
@@ -114,6 +114,7 @@ import type {
|
|
|
114
114
|
CustomerDbQueryResult,
|
|
115
115
|
DeeplineAgentModelDescription,
|
|
116
116
|
InferenceQuote,
|
|
117
|
+
ChildRunSummary,
|
|
117
118
|
} from './types.js';
|
|
118
119
|
import { isStopAllPlayRunsDryRunResult } from './types.js';
|
|
119
120
|
import type { MonitorDefinition } from './monitors.js';
|
|
@@ -662,6 +663,22 @@ export type RunsGetOptions = {
|
|
|
662
663
|
failedLogLimit?: number;
|
|
663
664
|
};
|
|
664
665
|
|
|
666
|
+
export type RunsChildrenOptions = {
|
|
667
|
+
/** Required authored `ctx.runPlayAsync` launch key. */
|
|
668
|
+
launchKey: string;
|
|
669
|
+
/** Opaque cursor returned by the preceding page. */
|
|
670
|
+
cursor?: string;
|
|
671
|
+
/** Rows to request (1–50; defaults to 50). */
|
|
672
|
+
limit?: number;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
/** One bounded page of direct child Runs for one async launch. */
|
|
676
|
+
export type RunChildrenPage = {
|
|
677
|
+
children: ChildRunSummary[];
|
|
678
|
+
nextCursor: string | null;
|
|
679
|
+
hasMore: boolean;
|
|
680
|
+
};
|
|
681
|
+
|
|
665
682
|
export type RunGetStatus =
|
|
666
683
|
| {
|
|
667
684
|
available: false;
|
|
@@ -890,6 +907,11 @@ export type RunsNamespace = {
|
|
|
890
907
|
) => Promise<import('./runs/receipts').RunToolReceiptsResponse>;
|
|
891
908
|
/** Get current run status by public run id. */
|
|
892
909
|
get: (runId: string, options?: RunsGetOptions) => Promise<PlayStatus>;
|
|
910
|
+
/** Read one bounded page of direct children for an async launch. */
|
|
911
|
+
children: (
|
|
912
|
+
parentRunId: string,
|
|
913
|
+
options: RunsChildrenOptions,
|
|
914
|
+
) => Promise<RunChildrenPage>;
|
|
893
915
|
/**
|
|
894
916
|
* @deprecated Use `client.runs.get(runId)` for status, progress, logs, and results.
|
|
895
917
|
* This scalar-only reader remains for compatibility with existing callers.
|
|
@@ -2648,6 +2670,8 @@ export class DeeplineClient {
|
|
|
2648
2670
|
this.runs = {
|
|
2649
2671
|
getReceipts: (runId, options) => this.getRunReceipts(runId, options),
|
|
2650
2672
|
get: (runId, options) => this.getRunStatus(runId, options),
|
|
2673
|
+
children: (parentRunId, options) =>
|
|
2674
|
+
this.getRunChildren(parentRunId, options),
|
|
2651
2675
|
status: (runId) => this.getRunLifecycleStatus(runId),
|
|
2652
2676
|
list: (options) => this.listRuns(options),
|
|
2653
2677
|
listPage: (options) => this.listRunsPage(options),
|
|
@@ -4220,6 +4244,39 @@ export class DeeplineClient {
|
|
|
4220
4244
|
};
|
|
4221
4245
|
}
|
|
4222
4246
|
|
|
4247
|
+
/** Read one paginated, launch-scoped page of direct child Runs. */
|
|
4248
|
+
async getRunChildren(
|
|
4249
|
+
parentRunId: string,
|
|
4250
|
+
options: RunsChildrenOptions,
|
|
4251
|
+
): Promise<RunChildrenPage> {
|
|
4252
|
+
const launchKey = options.launchKey.trim();
|
|
4253
|
+
if (!launchKey) {
|
|
4254
|
+
throw new DeeplineError(
|
|
4255
|
+
'runs.children requires a nonempty launchKey.',
|
|
4256
|
+
undefined,
|
|
4257
|
+
'INVALID_CHILD_RUN_LAUNCH_KEY',
|
|
4258
|
+
);
|
|
4259
|
+
}
|
|
4260
|
+
if (
|
|
4261
|
+
options.limit !== undefined &&
|
|
4262
|
+
(!Number.isInteger(options.limit) ||
|
|
4263
|
+
options.limit < 1 ||
|
|
4264
|
+
options.limit > 50)
|
|
4265
|
+
) {
|
|
4266
|
+
throw new DeeplineError(
|
|
4267
|
+
'runs.children limit must be an integer from 1 to 50.',
|
|
4268
|
+
undefined,
|
|
4269
|
+
'INVALID_CHILD_RUN_PAGE_LIMIT',
|
|
4270
|
+
);
|
|
4271
|
+
}
|
|
4272
|
+
const params = new URLSearchParams({ launchKey });
|
|
4273
|
+
if (options.cursor !== undefined) params.set('cursor', options.cursor);
|
|
4274
|
+
if (options.limit !== undefined) params.set('limit', String(options.limit));
|
|
4275
|
+
return this.http.get<RunChildrenPage>(
|
|
4276
|
+
`/api/v2/runs/${encodeURIComponent(parentRunId)}/children?${params.toString()}`,
|
|
4277
|
+
);
|
|
4278
|
+
}
|
|
4279
|
+
|
|
4223
4280
|
/** Fetch only the legacy scalar lifecycle status for a run.
|
|
4224
4281
|
*
|
|
4225
4282
|
* @deprecated Use `client.runs.get(runId)` for the canonical run read.
|
|
@@ -144,6 +144,8 @@ export type {
|
|
|
144
144
|
PlaysListPage,
|
|
145
145
|
RunsLogsOptions,
|
|
146
146
|
RunsLogsResult,
|
|
147
|
+
RunChildrenPage,
|
|
148
|
+
RunsChildrenOptions,
|
|
147
149
|
RunsEventSearchOptions,
|
|
148
150
|
RunsEventSearchEntry,
|
|
149
151
|
RunsEventSearchResult,
|
|
@@ -156,6 +158,7 @@ export type {
|
|
|
156
158
|
ExecutionRecovery,
|
|
157
159
|
ExecutionByKeyResult,
|
|
158
160
|
} from './client.js';
|
|
161
|
+
export type { ChildRunSummary } from './types.js';
|
|
159
162
|
|
|
160
163
|
// ——— Monitors framework ———
|
|
161
164
|
export { defineMonitor } from './monitors.js';
|
|
@@ -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.267',
|
|
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: {
|
package/dist/cli/index.js
CHANGED
|
@@ -3512,7 +3512,7 @@ var SDK_RELEASE = {
|
|
|
3512
3512
|
// getters keep their established compatibility behavior.
|
|
3513
3513
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
3514
3514
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
3515
|
-
version: "0.3.
|
|
3515
|
+
version: "0.3.267",
|
|
3516
3516
|
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.",
|
|
3517
3517
|
packageCapabilities: {
|
|
3518
3518
|
updatePreferences: 1
|
|
@@ -6742,6 +6742,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
6742
6742
|
this.runs = {
|
|
6743
6743
|
getReceipts: (runId, options2) => this.getRunReceipts(runId, options2),
|
|
6744
6744
|
get: (runId, options2) => this.getRunStatus(runId, options2),
|
|
6745
|
+
children: (parentRunId, options2) => this.getRunChildren(parentRunId, options2),
|
|
6745
6746
|
status: (runId) => this.getRunLifecycleStatus(runId),
|
|
6746
6747
|
list: (options2) => this.listRuns(options2),
|
|
6747
6748
|
listPage: (options2) => this.listRunsPage(options2),
|
|
@@ -7868,6 +7869,30 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
7868
7869
|
}
|
|
7869
7870
|
};
|
|
7870
7871
|
}
|
|
7872
|
+
/** Read one paginated, launch-scoped page of direct child Runs. */
|
|
7873
|
+
async getRunChildren(parentRunId, options) {
|
|
7874
|
+
const launchKey = options.launchKey.trim();
|
|
7875
|
+
if (!launchKey) {
|
|
7876
|
+
throw new DeeplineError(
|
|
7877
|
+
"runs.children requires a nonempty launchKey.",
|
|
7878
|
+
void 0,
|
|
7879
|
+
"INVALID_CHILD_RUN_LAUNCH_KEY"
|
|
7880
|
+
);
|
|
7881
|
+
}
|
|
7882
|
+
if (options.limit !== void 0 && (!Number.isInteger(options.limit) || options.limit < 1 || options.limit > 50)) {
|
|
7883
|
+
throw new DeeplineError(
|
|
7884
|
+
"runs.children limit must be an integer from 1 to 50.",
|
|
7885
|
+
void 0,
|
|
7886
|
+
"INVALID_CHILD_RUN_PAGE_LIMIT"
|
|
7887
|
+
);
|
|
7888
|
+
}
|
|
7889
|
+
const params = new URLSearchParams({ launchKey });
|
|
7890
|
+
if (options.cursor !== void 0) params.set("cursor", options.cursor);
|
|
7891
|
+
if (options.limit !== void 0) params.set("limit", String(options.limit));
|
|
7892
|
+
return this.http.get(
|
|
7893
|
+
`/api/v2/runs/${encodeURIComponent(parentRunId)}/children?${params.toString()}`
|
|
7894
|
+
);
|
|
7895
|
+
}
|
|
7871
7896
|
/** Fetch only the legacy scalar lifecycle status for a run.
|
|
7872
7897
|
*
|
|
7873
7898
|
* @deprecated Use `client.runs.get(runId)` for the canonical run read.
|
|
@@ -17791,6 +17816,75 @@ Existing credential redactions and referenced-list previews remain as stored.
|
|
|
17791
17816
|
);
|
|
17792
17817
|
}
|
|
17793
17818
|
|
|
17819
|
+
// src/cli/commands/run-children.ts
|
|
17820
|
+
function shellQuote2(value) {
|
|
17821
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
17822
|
+
}
|
|
17823
|
+
function registerRunChildrenCommand(runs) {
|
|
17824
|
+
runs.command("children <parentRunId>").description(
|
|
17825
|
+
"List async child Runs for one launch key, one page at a time."
|
|
17826
|
+
).requiredOption(
|
|
17827
|
+
"--launch-key <key>",
|
|
17828
|
+
"Authored ctx.runPlayAsync launch key"
|
|
17829
|
+
).option("--cursor <cursor>", "Opaque cursor from the previous page").option("--limit <number>", "Rows to request (1\u201350; default 50)", "50").option("--json", "Emit JSON output; also automatic when stdout is piped").addHelpText(
|
|
17830
|
+
"after",
|
|
17831
|
+
`
|
|
17832
|
+
Examples:
|
|
17833
|
+
deepline runs children 'play/demo/run/parent' --launch-key approval --json
|
|
17834
|
+
deepline runs children 'play/demo/run/parent' --launch-key approval --cursor '<cursor>' --limit 25 --json
|
|
17835
|
+
|
|
17836
|
+
The command is read-only. Each response contains at most 50 child Runs and
|
|
17837
|
+
includes nextCommand when another page is available.
|
|
17838
|
+
`
|
|
17839
|
+
).action(
|
|
17840
|
+
async (parentRunId, options) => {
|
|
17841
|
+
const limit = Number(options.limit);
|
|
17842
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 50) {
|
|
17843
|
+
throw Object.assign(
|
|
17844
|
+
new Error("--limit must be an integer from 1 to 50."),
|
|
17845
|
+
{ exitCode: 2 }
|
|
17846
|
+
);
|
|
17847
|
+
}
|
|
17848
|
+
const page = await new DeeplineClient().runs.children(parentRunId, {
|
|
17849
|
+
launchKey: options.launchKey,
|
|
17850
|
+
...options.cursor !== void 0 ? { cursor: options.cursor } : {},
|
|
17851
|
+
limit
|
|
17852
|
+
});
|
|
17853
|
+
const nextCommand = page.hasMore && page.nextCursor ? [
|
|
17854
|
+
"deepline runs children",
|
|
17855
|
+
shellQuote2(parentRunId),
|
|
17856
|
+
"--launch-key",
|
|
17857
|
+
shellQuote2(options.launchKey),
|
|
17858
|
+
"--cursor",
|
|
17859
|
+
shellQuote2(page.nextCursor),
|
|
17860
|
+
"--limit",
|
|
17861
|
+
String(limit),
|
|
17862
|
+
"--json"
|
|
17863
|
+
].join(" ") : null;
|
|
17864
|
+
printCommandEnvelope(
|
|
17865
|
+
{
|
|
17866
|
+
parentRunId,
|
|
17867
|
+
launchKey: options.launchKey,
|
|
17868
|
+
...page,
|
|
17869
|
+
nextCommand,
|
|
17870
|
+
render: {
|
|
17871
|
+
sections: [
|
|
17872
|
+
{
|
|
17873
|
+
title: `${page.children.length} child Runs for ${options.launchKey}${page.hasMore ? " (more available)" : ""}`,
|
|
17874
|
+
lines: page.children.map(
|
|
17875
|
+
(child) => `${child.status} \xB7 ${child.runId}`
|
|
17876
|
+
)
|
|
17877
|
+
}
|
|
17878
|
+
],
|
|
17879
|
+
...nextCommand ? { actions: [{ label: "Next page", command: nextCommand }] } : {}
|
|
17880
|
+
}
|
|
17881
|
+
},
|
|
17882
|
+
{ json: options.json }
|
|
17883
|
+
);
|
|
17884
|
+
}
|
|
17885
|
+
);
|
|
17886
|
+
}
|
|
17887
|
+
|
|
17794
17888
|
// src/cli/commands/plays/run-history.ts
|
|
17795
17889
|
async function handleRunsHistory(options) {
|
|
17796
17890
|
const query = new URLSearchParams();
|
|
@@ -26693,7 +26787,7 @@ async function handlePlaysDeploy(directory, options) {
|
|
|
26693
26787
|
}
|
|
26694
26788
|
|
|
26695
26789
|
// src/cli/commands/git.ts
|
|
26696
|
-
function
|
|
26790
|
+
function shellQuote3(value) {
|
|
26697
26791
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
26698
26792
|
}
|
|
26699
26793
|
function renderProject(project) {
|
|
@@ -26804,9 +26898,9 @@ async function handleStatus2(options) {
|
|
|
26804
26898
|
// Stored values are admin-controlled text and this line is
|
|
26805
26899
|
// copy-pasted into a shell by whoever reads it, so every
|
|
26806
26900
|
// interpolated value below is quoted.
|
|
26807
|
-
`--branch ${
|
|
26808
|
-
link2.rootDirectory ? `--root-dir ${
|
|
26809
|
-
link2.manifestPath && link2.manifestPath !== "deepline.json" ? `--manifest ${
|
|
26901
|
+
`--branch ${shellQuote3(link2.productionBranch)}`,
|
|
26902
|
+
link2.rootDirectory ? `--root-dir ${shellQuote3(link2.rootDirectory)}` : "",
|
|
26903
|
+
link2.manifestPath && link2.manifestPath !== "deepline.json" ? `--manifest ${shellQuote3(link2.manifestPath)}` : "",
|
|
26810
26904
|
link2.checkOnPullRequest ? "" : "--no-pr-checks",
|
|
26811
26905
|
// With several active installations no id is guessed: the reader picks.
|
|
26812
26906
|
activeInstallations.length > 1 ? "--installation <id>" : ""
|
|
@@ -27529,7 +27623,7 @@ function rankPlayReferenceSuggestions(input2) {
|
|
|
27529
27623
|
function searchQueryForMissingPlayReference(target) {
|
|
27530
27624
|
return parseReferencedPlayTarget2(target).unqualifiedPlayName.replace(/[-_./]+/g, " ").replace(/\s+/g, " ").trim();
|
|
27531
27625
|
}
|
|
27532
|
-
function
|
|
27626
|
+
function shellQuote4(value) {
|
|
27533
27627
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
27534
27628
|
}
|
|
27535
27629
|
function buildPlayReferenceNotFoundMessage(input2) {
|
|
@@ -27562,7 +27656,7 @@ function buildPlayReferenceNotFoundMessage(input2) {
|
|
|
27562
27656
|
lines.push(
|
|
27563
27657
|
"",
|
|
27564
27658
|
"Search visible plays:",
|
|
27565
|
-
` deepline plays search ${
|
|
27659
|
+
` deepline plays search ${shellQuote4(searchQuery)} --all --json`
|
|
27566
27660
|
);
|
|
27567
27661
|
}
|
|
27568
27662
|
return lines.join("\n");
|
|
@@ -32390,7 +32484,7 @@ async function handlePlayCheck(args) {
|
|
|
32390
32484
|
runtimeLimit: play.runtimeLimit ?? null,
|
|
32391
32485
|
activeScheduledPlays: play.activeScheduledPlays ?? null,
|
|
32392
32486
|
actions: {
|
|
32393
|
-
getFullCheckCmd: `deepline plays check ${
|
|
32487
|
+
getFullCheckCmd: `deepline plays check ${shellQuote4(options.target)} --full --json`,
|
|
32394
32488
|
...play.runCommand ? { runCmd: play.runCommand } : {}
|
|
32395
32489
|
},
|
|
32396
32490
|
...options.full ? { diagnostics: { staticPipeline: play.staticPipeline ?? null } } : {}
|
|
@@ -32444,8 +32538,8 @@ async function handlePlayCheck(args) {
|
|
|
32444
32538
|
outcomes,
|
|
32445
32539
|
target: options.target,
|
|
32446
32540
|
full: options.full,
|
|
32447
|
-
detailsCommand: `deepline plays check ${
|
|
32448
|
-
publishCommand: primary?.result.artifactHash ? `deepline plays publish ${
|
|
32541
|
+
detailsCommand: `deepline plays check ${shellQuote4(options.target)} --full --json`,
|
|
32542
|
+
publishCommand: primary?.result.artifactHash ? `deepline plays publish ${shellQuote4(options.target)} --expected-artifact ${primary.result.artifactHash}` : void 0
|
|
32449
32543
|
});
|
|
32450
32544
|
printCommandEnvelope(output2, {
|
|
32451
32545
|
json: options.jsonOutput,
|
|
@@ -33509,7 +33603,7 @@ Active runs: ${next.running}`
|
|
|
33509
33603
|
return lines2.join("\n");
|
|
33510
33604
|
});
|
|
33511
33605
|
const nextOffset = (page.offset ?? offset ?? 0) + runs.length;
|
|
33512
|
-
const nextPage = page.hasMore && playName ? `deepline runs list --play ${
|
|
33606
|
+
const nextPage = page.hasMore && playName ? `deepline runs list --play ${shellQuote4(playName)}${statusFilter ? ` --status ${shellQuote4(statusFilter)}` : ""} --limit ${page.limit ?? limit ?? 20} --offset ${nextOffset} --json` : null;
|
|
33513
33607
|
if (page.hasMore) {
|
|
33514
33608
|
lines.push("List truncated \u2014 more runs match this filter.");
|
|
33515
33609
|
lines.push(
|
|
@@ -33943,19 +34037,19 @@ ${renderedPayload}` : ""}`;
|
|
|
33943
34037
|
});
|
|
33944
34038
|
const nextCommand = result.nextCursor ? [
|
|
33945
34039
|
"deepline runs logs",
|
|
33946
|
-
...runId ? [
|
|
34040
|
+
...runId ? [shellQuote4(runId)] : [],
|
|
33947
34041
|
"--since",
|
|
33948
|
-
|
|
34042
|
+
shellQuote4(result.since),
|
|
33949
34043
|
"--until",
|
|
33950
|
-
|
|
33951
|
-
...values["--play"] ? ["--play",
|
|
33952
|
-
...values["--kind"] ? ["--kind",
|
|
33953
|
-
...values["--where"] ? ["--where",
|
|
34044
|
+
shellQuote4(result.until),
|
|
34045
|
+
...values["--play"] ? ["--play", shellQuote4(values["--play"])] : [],
|
|
34046
|
+
...values["--kind"] ? ["--kind", shellQuote4(values["--kind"])] : [],
|
|
34047
|
+
...values["--where"] ? ["--where", shellQuote4(values["--where"])] : [],
|
|
33954
34048
|
...includePayloads ? ["--payloads"] : [],
|
|
33955
|
-
...namespace ? ["--runtime-namespace",
|
|
33956
|
-
...backend ? ["--runtime-backend",
|
|
34049
|
+
...namespace ? ["--runtime-namespace", shellQuote4(namespace)] : [],
|
|
34050
|
+
...backend ? ["--runtime-backend", shellQuote4(backend)] : [],
|
|
33957
34051
|
"--cursor",
|
|
33958
|
-
|
|
34052
|
+
shellQuote4(result.nextCursor),
|
|
33959
34053
|
"--limit",
|
|
33960
34054
|
String(limit),
|
|
33961
34055
|
"--json"
|
|
@@ -34523,7 +34617,7 @@ async function handlePlayList(args) {
|
|
|
34523
34617
|
);
|
|
34524
34618
|
return 1;
|
|
34525
34619
|
}
|
|
34526
|
-
const nextPage = page.hasMore && page.cursor ? `deepline plays list${categories ? ` --categories ${
|
|
34620
|
+
const nextPage = page.hasMore && page.cursor ? `deepline plays list${categories ? ` --categories ${shellQuote4(categories)}` : ""}${tags.map((tag) => ` --tag ${shellQuote4(tag)}`).join("")}${limit ? ` --limit ${limit}` : ""}${showCost ? " --show-cost" : ""} --cursor ${shellQuote4(page.cursor)} --json` : null;
|
|
34527
34621
|
if (page.hasMore && !nextPage) {
|
|
34528
34622
|
throw new Error(
|
|
34529
34623
|
"Play list reported more results without a continuation cursor"
|
|
@@ -34958,7 +35052,7 @@ async function handlePlaySave(args) {
|
|
|
34958
35052
|
message: "Refusing to save: the local file no longer produces the artifact checked earlier.",
|
|
34959
35053
|
expectedArtifactHash: options.expectedArtifactHash,
|
|
34960
35054
|
currentArtifactHash: artifactHash,
|
|
34961
|
-
next: `deepline plays check ${
|
|
35055
|
+
next: `deepline plays check ${shellQuote4(options.target)}`
|
|
34962
35056
|
};
|
|
34963
35057
|
if (options.jsonOutput) {
|
|
34964
35058
|
printCompactJson(result);
|
|
@@ -35023,7 +35117,7 @@ async function handlePlaySave(args) {
|
|
|
35023
35117
|
graphHash: graph.root.artifact.graphHash,
|
|
35024
35118
|
artifactStorageKey: saved.artifactStorageKey,
|
|
35025
35119
|
next: {
|
|
35026
|
-
publish: `deepline plays publish ${
|
|
35120
|
+
publish: `deepline plays publish ${shellQuote4(options.target)} --expected-artifact ${artifactHash}`,
|
|
35027
35121
|
get: `deepline plays get ${playName} --source --out ./${playName}/ --working`
|
|
35028
35122
|
}
|
|
35029
35123
|
};
|
|
@@ -35083,7 +35177,7 @@ async function handlePlayPublish(args) {
|
|
|
35083
35177
|
message: "Refusing to publish: the local file no longer produces the artifact checked earlier.",
|
|
35084
35178
|
expectedArtifactHash: options.expectedArtifactHash,
|
|
35085
35179
|
currentArtifactHash: artifactHash,
|
|
35086
|
-
next: `deepline plays check ${
|
|
35180
|
+
next: `deepline plays check ${shellQuote4(playName)}`
|
|
35087
35181
|
};
|
|
35088
35182
|
if (options.jsonOutput) {
|
|
35089
35183
|
printCompactJson(result3);
|
|
@@ -36050,6 +36144,7 @@ Concepts:
|
|
|
36050
36144
|
|
|
36051
36145
|
Retrieve results:
|
|
36052
36146
|
deepline runs get <run-id> --json
|
|
36147
|
+
deepline runs children <parent-run-id> --launch-key approval --json
|
|
36053
36148
|
deepline runs export <run-id> --dataset <returned-selector> --out results.csv
|
|
36054
36149
|
Choose the selector returned by get, not a guessed internal table name.
|
|
36055
36150
|
Overview previews are samples, not complete rows. --full adds diagnostics,
|
|
@@ -36063,6 +36158,7 @@ Follow existing work:
|
|
|
36063
36158
|
|
|
36064
36159
|
More options:
|
|
36065
36160
|
deepline runs get -h
|
|
36161
|
+
deepline runs children -h
|
|
36066
36162
|
deepline runs tail -h
|
|
36067
36163
|
deepline runs export -h
|
|
36068
36164
|
deepline plays -h
|
|
@@ -36084,6 +36180,7 @@ Examples:
|
|
|
36084
36180
|
`
|
|
36085
36181
|
);
|
|
36086
36182
|
registerRunReceiptCommand(runs);
|
|
36183
|
+
registerRunChildrenCommand(runs);
|
|
36087
36184
|
registerRunHistoryCommand(runs);
|
|
36088
36185
|
runs.command("status <runId>").description(
|
|
36089
36186
|
"Legacy scalar-only read. Use runs get for canonical status, progress, logs, and results."
|
|
@@ -49109,7 +49206,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
49109
49206
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
49110
49207
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
49111
49208
|
const probes = reason === "no-installer" ? knownProbes ?? probeInstallers() : null;
|
|
49112
|
-
const manualCommand = probes?.npx === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, DEFAULT_SKILL_AGENTS).map(
|
|
49209
|
+
const manualCommand = probes?.npx === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, DEFAULT_SKILL_AGENTS).map(shellQuote5).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
49113
49210
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : probes?.bunx === "missing" && probes.npx === "missing" ? "neither `bunx` nor `npx` was found on PATH. Make one available." : `installer version check failed for ${Object.entries(probes ?? {}).filter(([, result]) => result === "failed").map(([command]) => `\`${command}\``).join(" and ")}. Check those commands with --version.`;
|
|
49114
49211
|
notice(
|
|
49115
49212
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -49437,7 +49534,7 @@ function probeCommand(command, timeoutMs) {
|
|
|
49437
49534
|
function hasCommand(command) {
|
|
49438
49535
|
return probeCommand(command) === "available";
|
|
49439
49536
|
}
|
|
49440
|
-
function
|
|
49537
|
+
function shellQuote5(arg) {
|
|
49441
49538
|
return `'${arg.replace(/'/g, `'\\''`)}'`;
|
|
49442
49539
|
}
|
|
49443
49540
|
function temporarySkillsSyncSkipCommand() {
|
|
@@ -49456,7 +49553,7 @@ function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NA
|
|
|
49456
49553
|
commands.push({
|
|
49457
49554
|
command: "bunx",
|
|
49458
49555
|
args: bunxArgs,
|
|
49459
|
-
manualCommand: `bunx ${bunxArgs.map(
|
|
49556
|
+
manualCommand: `bunx ${bunxArgs.map(shellQuote5).join(" ")}`
|
|
49460
49557
|
});
|
|
49461
49558
|
}
|
|
49462
49559
|
if (hasCommand("npx")) {
|
|
@@ -49464,7 +49561,7 @@ function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NA
|
|
|
49464
49561
|
commands.push({
|
|
49465
49562
|
command: "npx",
|
|
49466
49563
|
args: npxArgs,
|
|
49467
|
-
manualCommand: `npx ${npxArgs.map(
|
|
49564
|
+
manualCommand: `npx ${npxArgs.map(shellQuote5).join(" ")}`
|
|
49468
49565
|
});
|
|
49469
49566
|
}
|
|
49470
49567
|
return commands;
|
|
@@ -51607,14 +51704,14 @@ function posixShellQuote(value) {
|
|
|
51607
51704
|
function windowsCmdQuote(value) {
|
|
51608
51705
|
return `"${value.replace(/"/g, '""')}"`;
|
|
51609
51706
|
}
|
|
51610
|
-
function
|
|
51707
|
+
function shellQuote6(value) {
|
|
51611
51708
|
if (process.platform === "win32") {
|
|
51612
51709
|
return /^[A-Za-z0-9_./:@%+=,-]+$/.test(value) ? value : windowsCmdQuote(value);
|
|
51613
51710
|
}
|
|
51614
51711
|
return posixShellQuote(value);
|
|
51615
51712
|
}
|
|
51616
51713
|
function buildSourceUpdateCommand(sourceRoot) {
|
|
51617
|
-
const quotedRoot =
|
|
51714
|
+
const quotedRoot = shellQuote6(sourceRoot);
|
|
51618
51715
|
const cdCommand = process.platform === "win32" ? `cd /d ${quotedRoot}` : `cd ${quotedRoot}`;
|
|
51619
51716
|
return `${cdCommand} && git fetch origin main --tags && git merge --ff-only origin/main`;
|
|
51620
51717
|
}
|
|
@@ -51626,7 +51723,7 @@ function buildSidecarProjectConfigCommand(versionDir, nodeBin) {
|
|
|
51626
51723
|
"fs.mkdirSync(dir,{recursive:true});",
|
|
51627
51724
|
`fs.writeFileSync(path.join(dir,'package.json'),${JSON.stringify(NPM_SDK_SIDECAR_PACKAGE_JSON)});`
|
|
51628
51725
|
].join("");
|
|
51629
|
-
return `${
|
|
51726
|
+
return `${shellQuote6(nodeBin)} -e ${shellQuote6(script)} ${shellQuote6(versionDir)}`;
|
|
51630
51727
|
}
|
|
51631
51728
|
function sidecarStateDir(input2) {
|
|
51632
51729
|
const scope = input2.env.DEEPLINE_CONFIG_SCOPE?.trim();
|
|
@@ -51689,7 +51786,7 @@ function resolvePythonSidecarUpdatePlan(options) {
|
|
|
51689
51786
|
const npmCommand = "npm";
|
|
51690
51787
|
const registryUrl = sidecarRegistryUrl(hostUrl);
|
|
51691
51788
|
const versionDir = (0, import_node_path30.join)(stateDir, "versions", "<version>");
|
|
51692
|
-
const manualCommand = `${buildSidecarProjectConfigCommand(versionDir, nodeBin)} && ${npmCommand} install --prefix ${
|
|
51789
|
+
const manualCommand = `${buildSidecarProjectConfigCommand(versionDir, nodeBin)} && ${npmCommand} install --prefix ${shellQuote6(versionDir)} --registry ${shellQuote6(registryUrl)} ${NPM_SDK_INSTALL_COMMON_FLAGS.map(shellQuote6).join(" ")} ${shellQuote6(packageSpec)}`;
|
|
51693
51790
|
return {
|
|
51694
51791
|
kind: "python-sidecar",
|
|
51695
51792
|
stateDir,
|
|
@@ -51838,7 +51935,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
51838
51935
|
args,
|
|
51839
51936
|
...installPrefix ? { installPrefix } : {},
|
|
51840
51937
|
...fallbackRegistryUrl ? { fallbackRegistryUrl } : {},
|
|
51841
|
-
manualCommand: `${command} ${args.map(
|
|
51938
|
+
manualCommand: `${command} ${args.map(shellQuote6).join(" ")}`
|
|
51842
51939
|
};
|
|
51843
51940
|
}
|
|
51844
51941
|
var AUTO_UPDATE_FAILURE_FILE = ".auto-update-failure.json";
|
|
@@ -52106,23 +52203,23 @@ function writeSidecarLauncher(input2) {
|
|
|
52106
52203
|
input2.path,
|
|
52107
52204
|
[
|
|
52108
52205
|
"#!/usr/bin/env sh",
|
|
52109
|
-
`export DEEPLINE_HOST_URL=${
|
|
52110
|
-
`export DEEPLINE_CONFIG_SCOPE=${
|
|
52111
|
-
`if ${criticalPaths.map((path) => `[ ! -f ${
|
|
52206
|
+
`export DEEPLINE_HOST_URL=${shellQuote6(input2.hostUrl)}`,
|
|
52207
|
+
`export DEEPLINE_CONFIG_SCOPE=${shellQuote6(input2.scope)}`,
|
|
52208
|
+
`if ${criticalPaths.map((path) => `[ ! -f ${shellQuote6(path)} ]`).join(" || ")}; then`,
|
|
52112
52209
|
' if [ -n "${DEEPLINE_REAL_BINARY:-}" ] && [ -x "$DEEPLINE_REAL_BINARY" ]; then',
|
|
52113
52210
|
' exec "$DEEPLINE_REAL_BINARY" --version=v2 "$@"',
|
|
52114
52211
|
" fi",
|
|
52115
52212
|
' printf "%s\\n" "Deepline SDK CLI install is incomplete. Run \\`deepline update\\` to repair it." >&2',
|
|
52116
52213
|
" exit 1",
|
|
52117
52214
|
"fi",
|
|
52118
|
-
`if ! ${
|
|
52215
|
+
`if ! ${shellQuote6(input2.nodeBin)} -e ${shellQuote6(esbuildProbe)} ${shellQuote6(versionDir)} >/dev/null 2>&1; then`,
|
|
52119
52216
|
' if [ -n "${DEEPLINE_REAL_BINARY:-}" ] && [ -x "$DEEPLINE_REAL_BINARY" ]; then',
|
|
52120
52217
|
' exec "$DEEPLINE_REAL_BINARY" --version=v2 "$@"',
|
|
52121
52218
|
" fi",
|
|
52122
52219
|
' printf "%s\\n" "Deepline SDK CLI install is incomplete. Run \\`deepline update\\` to repair it." >&2',
|
|
52123
52220
|
" exit 1",
|
|
52124
52221
|
"fi",
|
|
52125
|
-
`exec ${
|
|
52222
|
+
`exec ${shellQuote6(input2.nodeBin)} ${shellQuote6(input2.entryPath)} "$@"`,
|
|
52126
52223
|
""
|
|
52127
52224
|
].join("\n"),
|
|
52128
52225
|
{ encoding: "utf8", mode: 493 }
|
|
@@ -55803,9 +55900,9 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
55803
55900
|
const getDatasetItemsTool = stringField2(getDatasetItems, "tool");
|
|
55804
55901
|
const getDatasetItemsPayload = recordField2(getDatasetItems, "payload");
|
|
55805
55902
|
return {
|
|
55806
|
-
getActorRun: `deepline tools execute ${getActorRunTool} --input ${
|
|
55903
|
+
getActorRun: `deepline tools execute ${getActorRunTool} --input ${shellQuote7(JSON.stringify(getActorRunPayload))} --json`,
|
|
55807
55904
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
55808
|
-
getDatasetItems: `deepline tools execute ${getDatasetItemsTool} --input ${
|
|
55905
|
+
getDatasetItems: `deepline tools execute ${getDatasetItemsTool} --input ${shellQuote7(JSON.stringify(getDatasetItemsPayload))} --json`
|
|
55809
55906
|
} : {}
|
|
55810
55907
|
};
|
|
55811
55908
|
}
|
|
@@ -56030,7 +56127,7 @@ function parseToolExecuteTimeout(raw) {
|
|
|
56030
56127
|
function safeFileStem(value) {
|
|
56031
56128
|
return value.trim().replace(/[^a-zA-Z0-9_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64) || "tool";
|
|
56032
56129
|
}
|
|
56033
|
-
function
|
|
56130
|
+
function shellQuote7(value) {
|
|
56034
56131
|
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
56035
56132
|
}
|
|
56036
56133
|
function powerShellQuote(value) {
|
|
@@ -56100,7 +56197,7 @@ export default definePlay(${JSON.stringify(playName)}, async (ctx) => {
|
|
|
56100
56197
|
path: scriptPath,
|
|
56101
56198
|
sourceCode: script,
|
|
56102
56199
|
projectDir,
|
|
56103
|
-
macCopyCommand: `mkdir -p ${
|
|
56200
|
+
macCopyCommand: `mkdir -p ${shellQuote7(projectDir)} && cp ${shellQuote7(scriptPath)} ${shellQuote7(`${projectDir}/${fileName}`)}`,
|
|
56104
56201
|
windowsCopyCommand: `New-Item -ItemType Directory -Force -Path ${powerShellQuote(projectDir.replace(/\//g, "\\"))} | Out-Null; Copy-Item -LiteralPath ${powerShellQuote(scriptPath)} -Destination ${powerShellQuote(`${projectDir.replace(/\//g, "\\")}\\${fileName}`)}`
|
|
56105
56202
|
};
|
|
56106
56203
|
}
|
|
@@ -56128,8 +56225,8 @@ function buildToolExecuteBaseEnvelope(input2) {
|
|
|
56128
56225
|
envelope,
|
|
56129
56226
|
"output"
|
|
56130
56227
|
);
|
|
56131
|
-
const billingLookup = typeof envelope.job_id === "string" && envelope.job_id.trim() ? `deepline billing usage --request-id ${
|
|
56132
|
-
const inspectCommand = `deepline tools execute ${input2.toolId} --input ${
|
|
56228
|
+
const billingLookup = typeof envelope.job_id === "string" && envelope.job_id.trim() ? `deepline billing usage --request-id ${shellQuote7(envelope.job_id)} --json` : null;
|
|
56229
|
+
const inspectCommand = `deepline tools execute ${input2.toolId} --input ${shellQuote7(JSON.stringify(input2.params))} --json`;
|
|
56133
56230
|
const actions2 = input2.listConversion ? [
|
|
56134
56231
|
{
|
|
56135
56232
|
label: "next",
|