deepline 0.1.7 → 0.1.8
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/cli/index.js +41 -12
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +41 -12
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/repo/sdk/src/cli/commands/play.ts +21 -6
- package/dist/repo/sdk/src/cli/progress.ts +14 -0
- package/dist/repo/sdk/src/cli/skills-sync.ts +6 -2
- package/dist/repo/sdk/src/version.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -968,9 +968,16 @@ async function startAndWaitForPlayCompletionByStream(input: {
|
|
|
968
968
|
const dashboardUrl =
|
|
969
969
|
getDashboardUrlFromLiveEvent(event) ??
|
|
970
970
|
buildPlayDashboardUrl(input.client.baseUrl, input.playName);
|
|
971
|
-
input.
|
|
972
|
-
|
|
973
|
-
|
|
971
|
+
if (!input.jsonOutput) {
|
|
972
|
+
writeStartedPlayRun({
|
|
973
|
+
runId: workflowId,
|
|
974
|
+
playName: input.playName,
|
|
975
|
+
dashboardUrl,
|
|
976
|
+
jsonOutput: false,
|
|
977
|
+
progress: input.progress,
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
input.progress.phase(`loading play on ${dashboardUrl}`);
|
|
974
981
|
emittedDashboardUrl = true;
|
|
975
982
|
}
|
|
976
983
|
assertPlayWaitNotTimedOut({
|
|
@@ -1100,8 +1107,8 @@ async function waitForPlayCompletionByPolling(input: {
|
|
|
1100
1107
|
const now = Date.now();
|
|
1101
1108
|
if (now - lastTransientPollWarningAt >= 30_000) {
|
|
1102
1109
|
const message = error instanceof Error ? error.message : String(error);
|
|
1103
|
-
|
|
1104
|
-
`[play tail] transient status poll failed; retrying: ${message}
|
|
1110
|
+
input.progress.writeLine(
|
|
1111
|
+
`[play tail] transient status poll failed; retrying: ${message}`,
|
|
1105
1112
|
);
|
|
1106
1113
|
lastTransientPollWarningAt = now;
|
|
1107
1114
|
}
|
|
@@ -1787,6 +1794,7 @@ function writeStartedPlayRun(input: {
|
|
|
1787
1794
|
statusUrl?: string;
|
|
1788
1795
|
dashboardUrl?: string;
|
|
1789
1796
|
jsonOutput: boolean;
|
|
1797
|
+
progress?: CliProgress;
|
|
1790
1798
|
}): void {
|
|
1791
1799
|
const payload = {
|
|
1792
1800
|
runId: input.runId,
|
|
@@ -1815,7 +1823,12 @@ function writeStartedPlayRun(input: {
|
|
|
1815
1823
|
lines.push(` play page: ${input.dashboardUrl}`);
|
|
1816
1824
|
}
|
|
1817
1825
|
|
|
1818
|
-
|
|
1826
|
+
const output = lines.join('\n');
|
|
1827
|
+
if (input.progress) {
|
|
1828
|
+
input.progress.writeLine(output, process.stdout);
|
|
1829
|
+
return;
|
|
1830
|
+
}
|
|
1831
|
+
console.log(output);
|
|
1819
1832
|
}
|
|
1820
1833
|
|
|
1821
1834
|
function parsePlayRunOptions(args: string[]): PlayRunCommandOptions {
|
|
@@ -2188,6 +2201,7 @@ async function handleFileBackedRun(
|
|
|
2188
2201
|
statusUrl: started.statusUrl,
|
|
2189
2202
|
dashboardUrl,
|
|
2190
2203
|
jsonOutput: options.jsonOutput,
|
|
2204
|
+
progress,
|
|
2191
2205
|
});
|
|
2192
2206
|
return 0;
|
|
2193
2207
|
}
|
|
@@ -2303,6 +2317,7 @@ async function handleNamedRun(options: PlayRunCommandOptions): Promise<number> {
|
|
|
2303
2317
|
statusUrl: started.statusUrl,
|
|
2304
2318
|
dashboardUrl,
|
|
2305
2319
|
jsonOutput: options.jsonOutput,
|
|
2320
|
+
progress,
|
|
2306
2321
|
});
|
|
2307
2322
|
return 0;
|
|
2308
2323
|
}
|
|
@@ -56,6 +56,20 @@ export class CliProgress {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
writeLine(line: string, stream: NodeJS.WriteStream = process.stderr): void {
|
|
60
|
+
if (!this.enabled || !this.interactive) {
|
|
61
|
+
stream.write(`${line}\n`);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const activeMessage = this.lastMessage;
|
|
65
|
+
this.worker?.terminate().catch(() => undefined);
|
|
66
|
+
this.worker = null;
|
|
67
|
+
stream.write(`\r\x1b[2K${line}\n`);
|
|
68
|
+
if (activeMessage) {
|
|
69
|
+
this.startWorker().postMessage({ type: 'phase', message: activeMessage });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
59
73
|
private settle(mark: '✓' | '✗'): void {
|
|
60
74
|
if (!this.enabled || !this.lastMessage) {
|
|
61
75
|
return;
|
|
@@ -2,6 +2,7 @@ import { spawn } from 'node:child_process';
|
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { dirname, join } from 'node:path';
|
|
5
|
+
import { getActiveCliProgress } from './progress.js';
|
|
5
6
|
import { baseUrlSlug } from '../config.js';
|
|
6
7
|
|
|
7
8
|
const CHECK_TIMEOUT_MS = 3_000;
|
|
@@ -128,10 +129,13 @@ export async function syncSdkSkillsIfNeeded(baseUrl: string): Promise<void> {
|
|
|
128
129
|
const update = await fetchSkillsUpdate(baseUrl, localVersion);
|
|
129
130
|
if (!update?.needsUpdate || !update.remoteVersion) return;
|
|
130
131
|
|
|
131
|
-
|
|
132
|
+
const progress = getActiveCliProgress();
|
|
133
|
+
progress?.writeLine('SDK skills changed; syncing deepline-sdk skill...') ??
|
|
134
|
+
process.stderr.write('SDK skills changed; syncing deepline-sdk skill...\n');
|
|
132
135
|
const installed = await runSkillsInstall(baseUrl);
|
|
133
136
|
if (!installed) return;
|
|
134
137
|
|
|
135
138
|
writeLocalSkillsVersion(baseUrl, update.remoteVersion);
|
|
136
|
-
|
|
139
|
+
progress?.writeLine('SDK skills are up to date.') ??
|
|
140
|
+
process.stderr.write('SDK skills are up to date.\n');
|
|
137
141
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.1.
|
|
1
|
+
export const SDK_VERSION = "0.1.8";
|
|
2
2
|
export const SDK_API_CONTRACT = "2026-04-plays-v1";
|