@ora-ai/cli 0.1.0
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/LICENSE +21 -0
- package/README.md +102 -0
- package/dist/auth-commands.d.ts +39 -0
- package/dist/auth-commands.d.ts.map +1 -0
- package/dist/auth-commands.js +116 -0
- package/dist/auth-commands.js.map +1 -0
- package/dist/core/auth.d.ts +41 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/auth.js +110 -0
- package/dist/core/auth.js.map +1 -0
- package/dist/core/config.d.ts +26 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +51 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/http.d.ts +46 -0
- package/dist/core/http.d.ts.map +1 -0
- package/dist/core/http.js +82 -0
- package/dist/core/http.js.map +1 -0
- package/dist/core/login.d.ts +14 -0
- package/dist/core/login.d.ts.map +1 -0
- package/dist/core/login.js +70 -0
- package/dist/core/login.js.map +1 -0
- package/dist/core/output.d.ts +18 -0
- package/dist/core/output.d.ts.map +1 -0
- package/dist/core/output.js +94 -0
- package/dist/core/output.js.map +1 -0
- package/dist/core/run-operation.d.ts +57 -0
- package/dist/core/run-operation.d.ts.map +1 -0
- package/dist/core/run-operation.js +119 -0
- package/dist/core/run-operation.js.map +1 -0
- package/dist/core/sse.d.ts +13 -0
- package/dist/core/sse.d.ts.map +1 -0
- package/dist/core/sse.js +63 -0
- package/dist/core/sse.js.map +1 -0
- package/dist/generated/operations.d.ts +47 -0
- package/dist/generated/operations.d.ts.map +1 -0
- package/dist/generated/operations.js +2050 -0
- package/dist/generated/operations.js.map +1 -0
- package/dist/generated/types.d.ts +1039 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +5 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive/derive-prompts.d.ts +44 -0
- package/dist/interactive/derive-prompts.d.ts.map +1 -0
- package/dist/interactive/derive-prompts.js +58 -0
- package/dist/interactive/derive-prompts.js.map +1 -0
- package/dist/interactive/inquirer-prompter.d.ts +11 -0
- package/dist/interactive/inquirer-prompter.d.ts.map +1 -0
- package/dist/interactive/inquirer-prompter.js +64 -0
- package/dist/interactive/inquirer-prompter.js.map +1 -0
- package/dist/interactive/menu.d.ts +25 -0
- package/dist/interactive/menu.d.ts.map +1 -0
- package/dist/interactive/menu.js +57 -0
- package/dist/interactive/menu.js.map +1 -0
- package/dist/interactive/prompter.d.ts +25 -0
- package/dist/interactive/prompter.d.ts.map +1 -0
- package/dist/interactive/prompter.js +14 -0
- package/dist/interactive/prompter.js.map +1 -0
- package/dist/interactive/session.d.ts +19 -0
- package/dist/interactive/session.d.ts.map +1 -0
- package/dist/interactive/session.js +204 -0
- package/dist/interactive/session.js.map +1 -0
- package/dist/program.d.ts +81 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +178 -0
- package/dist/program.js.map +1 -0
- package/dist/render/ansi.d.ts +13 -0
- package/dist/render/ansi.d.ts.map +1 -0
- package/dist/render/ansi.js +34 -0
- package/dist/render/ansi.js.map +1 -0
- package/dist/render/banner.d.ts +7 -0
- package/dist/render/banner.d.ts.map +1 -0
- package/dist/render/banner.js +18 -0
- package/dist/render/banner.js.map +1 -0
- package/dist/render/glyphs.d.ts +39 -0
- package/dist/render/glyphs.d.ts.map +1 -0
- package/dist/render/glyphs.js +83 -0
- package/dist/render/glyphs.js.map +1 -0
- package/dist/render/index.d.ts +13 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +24 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/insight-lines.d.ts +8 -0
- package/dist/render/insight-lines.d.ts.map +1 -0
- package/dist/render/insight-lines.js +62 -0
- package/dist/render/insight-lines.js.map +1 -0
- package/dist/render/insight.d.ts +9 -0
- package/dist/render/insight.d.ts.map +1 -0
- package/dist/render/insight.js +68 -0
- package/dist/render/insight.js.map +1 -0
- package/dist/render/journey-graph.d.ts +73 -0
- package/dist/render/journey-graph.d.ts.map +1 -0
- package/dist/render/journey-graph.js +250 -0
- package/dist/render/journey-graph.js.map +1 -0
- package/dist/render/journey.d.ts +14 -0
- package/dist/render/journey.d.ts.map +1 -0
- package/dist/render/journey.js +67 -0
- package/dist/render/journey.js.map +1 -0
- package/dist/render/live-panel.d.ts +34 -0
- package/dist/render/live-panel.d.ts.map +1 -0
- package/dist/render/live-panel.js +84 -0
- package/dist/render/live-panel.js.map +1 -0
- package/dist/render/mode.d.ts +19 -0
- package/dist/render/mode.d.ts.map +1 -0
- package/dist/render/mode.js +23 -0
- package/dist/render/mode.js.map +1 -0
- package/dist/render/registry.d.ts +17 -0
- package/dist/render/registry.d.ts.map +1 -0
- package/dist/render/registry.js +34 -0
- package/dist/render/registry.js.map +1 -0
- package/dist/render/run-list.d.ts +11 -0
- package/dist/render/run-list.d.ts.map +1 -0
- package/dist/render/run-list.js +53 -0
- package/dist/render/run-list.js.map +1 -0
- package/dist/render/spinner.d.ts +14 -0
- package/dist/render/spinner.d.ts.map +1 -0
- package/dist/render/spinner.js +37 -0
- package/dist/render/spinner.js.map +1 -0
- package/dist/render/table.d.ts +20 -0
- package/dist/render/table.d.ts.map +1 -0
- package/dist/render/table.js +29 -0
- package/dist/render/table.js.map +1 -0
- package/dist/render/trajectory.d.ts +19 -0
- package/dist/render/trajectory.d.ts.map +1 -0
- package/dist/render/trajectory.js +75 -0
- package/dist/render/trajectory.js.map +1 -0
- package/dist/render/tunnel.d.ts +10 -0
- package/dist/render/tunnel.d.ts.map +1 -0
- package/dist/render/tunnel.js +108 -0
- package/dist/render/tunnel.js.map +1 -0
- package/dist/render/usage.d.ts +29 -0
- package/dist/render/usage.d.ts.map +1 -0
- package/dist/render/usage.js +83 -0
- package/dist/render/usage.js.map +1 -0
- package/dist/tunnel-command.d.ts +15 -0
- package/dist/tunnel-command.d.ts.map +1 -0
- package/dist/tunnel-command.js +267 -0
- package/dist/tunnel-command.js.map +1 -0
- package/dist/watch.d.ts +53 -0
- package/dist/watch.d.ts.map +1 -0
- package/dist/watch.js +305 -0
- package/dist/watch.js.map +1 -0
- package/package.json +36 -0
package/dist/watch.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The watch-after-create + epilog helpers for the generated registrar
|
|
3
|
+
* (program.ts's attachOperation calls these; the logic itself never touches
|
|
4
|
+
* commander).
|
|
5
|
+
*
|
|
6
|
+
* The streamUrl hypermedia rule: a create response optionally carries a
|
|
7
|
+
* server-provided `streamUrl` — the client always follows it as-is and never
|
|
8
|
+
* constructs a stream path itself. No streamUrl means the operation already
|
|
9
|
+
* completed synchronously (e.g. `wait:true`); --watch then degrades to
|
|
10
|
+
* printing the result instead of opening a stream.
|
|
11
|
+
*/
|
|
12
|
+
import type { HttpClient } from "./core/http.js";
|
|
13
|
+
import { type SseEvent } from "./core/sse.js";
|
|
14
|
+
import type { OperationMeta } from "./generated/operations.js";
|
|
15
|
+
import type { ResolvedDeps } from "./program.js";
|
|
16
|
+
import type { OutputMode } from "./render/mode.js";
|
|
17
|
+
export declare function helpEpilog(meta: OperationMeta): string;
|
|
18
|
+
/**
|
|
19
|
+
* Follow a create response's server-provided streamUrl (hypermedia — the
|
|
20
|
+
* client never constructs the URL). Absent streamUrl means the operation
|
|
21
|
+
* completed synchronously (e.g. wait:true) — render the result and say so.
|
|
22
|
+
*
|
|
23
|
+
* mode is resolved once by the caller (program.ts) and threaded through, not
|
|
24
|
+
* re-derived here. json/plain behave exactly as the pre-mode boolean did; the
|
|
25
|
+
* event loop itself (json/plain/rich) is delegated to renderEventStream below
|
|
26
|
+
* — the SAME helper program.ts's standalone isStream branch calls.
|
|
27
|
+
*/
|
|
28
|
+
export declare function watchAfterCreate(data: unknown, ctx: {
|
|
29
|
+
client: Pick<HttpClient, "call" | "open">;
|
|
30
|
+
deps: Pick<ResolvedDeps, "out" | "errOut" | "rawOut" | "now">;
|
|
31
|
+
mode: OutputMode;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
export declare function tryParse(data: string): unknown;
|
|
34
|
+
/**
|
|
35
|
+
* Renders an SSE event stream according to `mode` — the ONE implementation
|
|
36
|
+
* shared by watchAfterCreate (after a watchable create) and program.ts's
|
|
37
|
+
* standalone `isStream` command branch (`stream`/`feed`). json/plain are
|
|
38
|
+
* BYTE-IDENTICAL to their pre-rich behavior (a NDJSON envelope line / a
|
|
39
|
+
* `[event] data` line per event, respectively) — only rich adds presentation:
|
|
40
|
+
* a spinner until the first event, then a glyph line per event with an
|
|
41
|
+
* elapsed `(+N.Ns)` suffix, a `result` banner, and `insight` events rendered
|
|
42
|
+
* through the shared renderer registry (Task 6's insight card).
|
|
43
|
+
*
|
|
44
|
+
* The spinner is STOPPED before the first real line is ever printed — an
|
|
45
|
+
* un-stopped interval hangs the process, so this ordering is load-bearing,
|
|
46
|
+
* not cosmetic. It is stopped unconditionally even if the stream closes
|
|
47
|
+
* having emitted zero events.
|
|
48
|
+
*/
|
|
49
|
+
export declare function renderEventStream(events: AsyncIterable<SseEvent>, ctx: {
|
|
50
|
+
deps: Pick<ResolvedDeps, "out" | "errOut" | "rawOut" | "now">;
|
|
51
|
+
mode: OutputMode;
|
|
52
|
+
}): Promise<void>;
|
|
53
|
+
//# sourceMappingURL=watch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../src/watch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAYjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,wBAAgB,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAOtD;AAED;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,OAAO,EACb,GAAG,EAAE;IACH,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC1C,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC,CAAC;IAC9D,IAAI,EAAE,UAAU,CAAC;CAClB,GACA,OAAO,CAAC,IAAI,CAAC,CAiCf;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAM9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,EAC/B,GAAG,EAAE;IAAE,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GACvF,OAAO,CAAC,IAAI,CAAC,CAkHf"}
|
package/dist/watch.js
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The watch-after-create + epilog helpers for the generated registrar
|
|
3
|
+
* (program.ts's attachOperation calls these; the logic itself never touches
|
|
4
|
+
* commander).
|
|
5
|
+
*
|
|
6
|
+
* The streamUrl hypermedia rule: a create response optionally carries a
|
|
7
|
+
* server-provided `streamUrl` — the client always follows it as-is and never
|
|
8
|
+
* constructs a stream path itself. No streamUrl means the operation already
|
|
9
|
+
* completed synchronously (e.g. `wait:true`); --watch then degrades to
|
|
10
|
+
* printing the result instead of opening a stream.
|
|
11
|
+
*/
|
|
12
|
+
import chalk from "chalk";
|
|
13
|
+
import { renderResult } from "./core/output.js";
|
|
14
|
+
import { readSse } from "./core/sse.js";
|
|
15
|
+
import { GLYPHS, accent, eventGlyph } from "./render/glyphs.js";
|
|
16
|
+
import { activityLabel, buildJourneyTree, drawJourneyTree, journeySummary, } from "./render/journey-graph.js";
|
|
17
|
+
import { LivePanel } from "./render/live-panel.js";
|
|
18
|
+
import { insightLines } from "./render/insight-lines.js";
|
|
19
|
+
import { readUsage, usageChips } from "./render/usage.js";
|
|
20
|
+
import { renderRich } from "./render/registry.js";
|
|
21
|
+
import { createSpinner } from "./render/spinner.js";
|
|
22
|
+
export function helpEpilog(meta) {
|
|
23
|
+
const lines = ["", "Examples:", ` ${meta.help.command}`];
|
|
24
|
+
if (meta.help.body) {
|
|
25
|
+
lines.push("", " run.json:");
|
|
26
|
+
for (const bodyLine of meta.help.body.split("\n"))
|
|
27
|
+
lines.push(` ${bodyLine}`);
|
|
28
|
+
}
|
|
29
|
+
return lines.join("\n");
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Follow a create response's server-provided streamUrl (hypermedia — the
|
|
33
|
+
* client never constructs the URL). Absent streamUrl means the operation
|
|
34
|
+
* completed synchronously (e.g. wait:true) — render the result and say so.
|
|
35
|
+
*
|
|
36
|
+
* mode is resolved once by the caller (program.ts) and threaded through, not
|
|
37
|
+
* re-derived here. json/plain behave exactly as the pre-mode boolean did; the
|
|
38
|
+
* event loop itself (json/plain/rich) is delegated to renderEventStream below
|
|
39
|
+
* — the SAME helper program.ts's standalone isStream branch calls.
|
|
40
|
+
*/
|
|
41
|
+
export async function watchAfterCreate(data, ctx) {
|
|
42
|
+
const record = (data ?? {});
|
|
43
|
+
const streamUrl = typeof record.streamUrl === "string" ? record.streamUrl : undefined;
|
|
44
|
+
const isJson = ctx.mode === "json";
|
|
45
|
+
if (!streamUrl) {
|
|
46
|
+
const note = chalk.dim("nothing to stream — the operation completed synchronously");
|
|
47
|
+
if (isJson) {
|
|
48
|
+
// Keep stdout pure JSON — same first-line shape as the happy path.
|
|
49
|
+
// The note is diagnostic, not data, so it goes to stderr.
|
|
50
|
+
ctx.deps.out(JSON.stringify(data));
|
|
51
|
+
ctx.deps.errOut(note);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
ctx.deps.out(renderResult(data, { mode: ctx.mode }));
|
|
55
|
+
ctx.deps.out(note);
|
|
56
|
+
}
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (isJson) {
|
|
60
|
+
ctx.deps.out(JSON.stringify(data));
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
const id = typeof record.runId === "string" ? record.runId : typeof record.id === "string" ? record.id : streamUrl;
|
|
64
|
+
ctx.deps.out(`created ${id} — streaming (Ctrl+C detaches; the operation continues server-side)`);
|
|
65
|
+
const meta = [record.harness, record.model, record.provider].filter((v) => typeof v === "string" && v.length > 0);
|
|
66
|
+
if (meta.length)
|
|
67
|
+
ctx.deps.out(chalk.dim(` ▶ ${meta.join(" · ")}`));
|
|
68
|
+
}
|
|
69
|
+
const res = await ctx.client.open({ method: "get", path: streamUrl });
|
|
70
|
+
await renderEventStream(readSse(res), { deps: ctx.deps, mode: ctx.mode });
|
|
71
|
+
}
|
|
72
|
+
export function tryParse(data) {
|
|
73
|
+
try {
|
|
74
|
+
return JSON.parse(data);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return data;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Renders an SSE event stream according to `mode` — the ONE implementation
|
|
82
|
+
* shared by watchAfterCreate (after a watchable create) and program.ts's
|
|
83
|
+
* standalone `isStream` command branch (`stream`/`feed`). json/plain are
|
|
84
|
+
* BYTE-IDENTICAL to their pre-rich behavior (a NDJSON envelope line / a
|
|
85
|
+
* `[event] data` line per event, respectively) — only rich adds presentation:
|
|
86
|
+
* a spinner until the first event, then a glyph line per event with an
|
|
87
|
+
* elapsed `(+N.Ns)` suffix, a `result` banner, and `insight` events rendered
|
|
88
|
+
* through the shared renderer registry (Task 6's insight card).
|
|
89
|
+
*
|
|
90
|
+
* The spinner is STOPPED before the first real line is ever printed — an
|
|
91
|
+
* un-stopped interval hangs the process, so this ordering is load-bearing,
|
|
92
|
+
* not cosmetic. It is stopped unconditionally even if the stream closes
|
|
93
|
+
* having emitted zero events.
|
|
94
|
+
*/
|
|
95
|
+
export async function renderEventStream(events, ctx) {
|
|
96
|
+
if (ctx.mode === "json") {
|
|
97
|
+
for await (const event of events) {
|
|
98
|
+
ctx.deps.out(JSON.stringify({ event: event.event, data: tryParse(event.data) }));
|
|
99
|
+
}
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (ctx.mode === "plain") {
|
|
103
|
+
for await (const event of events) {
|
|
104
|
+
ctx.deps.out(`[${event.event}] ${event.data}`);
|
|
105
|
+
}
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const spinner = createSpinner(ctx.deps.rawOut);
|
|
109
|
+
const startedAt = ctx.deps.now();
|
|
110
|
+
spinner.start("waiting for the first event…");
|
|
111
|
+
// The LIVE JOURNEY VIEW. The stream carries THREE step-ish shapes and each
|
|
112
|
+
// has exactly one job here:
|
|
113
|
+
// · `trajectory` snapshot events (the normalized artifact) are the ONE
|
|
114
|
+
// source of tree truth — each snapshot REPLACES the steps and repaints
|
|
115
|
+
// the panel in place (never a second printed tree).
|
|
116
|
+
// · raw `step` events (kalanu frames, `{runId, seq, step:{…}}`) drive the
|
|
117
|
+
// present-tense headline caption only — never printed as JSON.
|
|
118
|
+
// · `insight`/`result` envelopes are UNWRAPPED so their renderers fire;
|
|
119
|
+
// result becomes a compact stats line, insight adds its usage chips.
|
|
120
|
+
// On a TTY the panel owns the region (pulsing headline between events);
|
|
121
|
+
// piped output gets caption lines instead.
|
|
122
|
+
let steps = [];
|
|
123
|
+
let caption = "waking the agent";
|
|
124
|
+
let printedSig = -1; // steps.length at the last settled print — a post-result snapshot with no new steps must NOT reprint the tree
|
|
125
|
+
const panel = new LivePanel({
|
|
126
|
+
write: ctx.deps.rawOut,
|
|
127
|
+
isTty: Boolean(process.stdout.isTTY),
|
|
128
|
+
now: ctx.deps.now,
|
|
129
|
+
});
|
|
130
|
+
const treeLines = (settled) => [
|
|
131
|
+
` ${journeySummary(steps)}`,
|
|
132
|
+
"",
|
|
133
|
+
...drawJourneyTree(buildJourneyTree(steps, "journey", settled)).map((row) => ` ${row}`),
|
|
134
|
+
];
|
|
135
|
+
let settledPrinted = false;
|
|
136
|
+
const settleTree = () => {
|
|
137
|
+
panel.close();
|
|
138
|
+
if (!steps.length || settledPrinted)
|
|
139
|
+
return;
|
|
140
|
+
settledPrinted = true;
|
|
141
|
+
printedSig = steps.length;
|
|
142
|
+
for (const row of treeLines(true))
|
|
143
|
+
ctx.deps.out(row);
|
|
144
|
+
ctx.deps.out("");
|
|
145
|
+
};
|
|
146
|
+
let sawEvent = false;
|
|
147
|
+
try {
|
|
148
|
+
for await (const event of events) {
|
|
149
|
+
if (!sawEvent) {
|
|
150
|
+
spinner.stop(); // before ANY real line — see doc comment above
|
|
151
|
+
sawEvent = true;
|
|
152
|
+
}
|
|
153
|
+
const data = tryParse(event.data);
|
|
154
|
+
if (event.event === "run") {
|
|
155
|
+
// Stream attached — the panel takes over as the waiting indicator.
|
|
156
|
+
if (panel.live) {
|
|
157
|
+
panel.open();
|
|
158
|
+
panel.draw(treeLines(false), caption);
|
|
159
|
+
}
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
const snapshot = trajectorySnapshotOf(data);
|
|
163
|
+
if (snapshot) {
|
|
164
|
+
steps = snapshot;
|
|
165
|
+
// The caption follows the newest snapshot step too — raw step events
|
|
166
|
+
// can lag (the SSE burst), and 'waking the agent' must not outlive
|
|
167
|
+
// the first real activity.
|
|
168
|
+
const last = steps.filter((x) => x.type === "tool_call" || x.kind === "reasoning").at(-1);
|
|
169
|
+
if (last)
|
|
170
|
+
caption = activityLabel(last);
|
|
171
|
+
if (steps.length !== printedSig)
|
|
172
|
+
settledPrinted = false;
|
|
173
|
+
if (panel.live && !settledPrinted)
|
|
174
|
+
panel.draw(treeLines(false), caption);
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
const stepCaption = rawStepCaption(data);
|
|
178
|
+
if (event.event === "step" && stepCaption) {
|
|
179
|
+
caption = stepCaption;
|
|
180
|
+
if (panel.live) {
|
|
181
|
+
panel.open();
|
|
182
|
+
panel.draw(treeLines(false), caption);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
ctx.deps.out(`${accent(eventGlyph(event.event))} ${stepCaption} ${elapsedSuffix(startedAt, ctx.deps.now)}`);
|
|
186
|
+
}
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (event.event === "result") {
|
|
190
|
+
settleTree();
|
|
191
|
+
ctx.deps.out(renderOutcomeLine(data, elapsedSuffix(startedAt, ctx.deps.now)));
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (event.event === "insight") {
|
|
195
|
+
settleTree();
|
|
196
|
+
ctx.deps.out(renderInsightEvent(data, startedAt, ctx.deps.now));
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
if (event.event === "done")
|
|
200
|
+
settleTree();
|
|
201
|
+
ctx.deps.out(renderRichEvent(event, startedAt, ctx.deps.now));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
finally {
|
|
205
|
+
settleTree();
|
|
206
|
+
spinner.stop(); // idempotent — covers a stream that closed with zero events
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/** A trajectory SNAPSHOT payload (the normalized artifact, possibly bare or enveloped). */
|
|
210
|
+
function trajectorySnapshotOf(data) {
|
|
211
|
+
if (typeof data !== "object" || data === null)
|
|
212
|
+
return undefined;
|
|
213
|
+
const d = data;
|
|
214
|
+
if (Array.isArray(d.steps))
|
|
215
|
+
return d.steps;
|
|
216
|
+
const nested = d.trajectory;
|
|
217
|
+
if (typeof nested === "object" && nested !== null && Array.isArray(nested.steps)) {
|
|
218
|
+
return nested.steps;
|
|
219
|
+
}
|
|
220
|
+
return undefined;
|
|
221
|
+
}
|
|
222
|
+
/** Present-tense caption for a RAW `step` event (`{runId, seq, step:{…}}` — kalanu frame shapes). */
|
|
223
|
+
function rawStepCaption(data) {
|
|
224
|
+
if (typeof data !== "object" || data === null)
|
|
225
|
+
return undefined;
|
|
226
|
+
const frame = data.step;
|
|
227
|
+
if (typeof frame !== "object" || frame === null)
|
|
228
|
+
return undefined;
|
|
229
|
+
const f = frame;
|
|
230
|
+
if (f.type === "thinking")
|
|
231
|
+
return "deciding next step…";
|
|
232
|
+
if (f.type === "tool_call") {
|
|
233
|
+
return activityLabel({ type: "tool_call", tool: f.tool, action: f.tool, input: f.input });
|
|
234
|
+
}
|
|
235
|
+
if (f.type === "tool_result")
|
|
236
|
+
return "reading the results…";
|
|
237
|
+
if (f.type === "text")
|
|
238
|
+
return "writing the answer…";
|
|
239
|
+
return undefined;
|
|
240
|
+
}
|
|
241
|
+
/** Compact stats line for the `result` envelope — never a JSON dump. */
|
|
242
|
+
function renderOutcomeLine(data, suffix) {
|
|
243
|
+
const d = typeof data === "object" && data !== null ? data : {};
|
|
244
|
+
const result = typeof d.result === "object" && d.result !== null ? d.result : d;
|
|
245
|
+
const outcome = typeof d.outcome === "string" ? d.outcome : typeof result.outcome === "string" ? result.outcome : "finished";
|
|
246
|
+
const won = outcome === "success";
|
|
247
|
+
const chips = [];
|
|
248
|
+
if (typeof result.harness === "string")
|
|
249
|
+
chips.push(result.harness);
|
|
250
|
+
const model = result.effective_model ?? result.model;
|
|
251
|
+
if (typeof model === "string")
|
|
252
|
+
chips.push(model);
|
|
253
|
+
// usageChips already renders turns + duration (readUsage picks up
|
|
254
|
+
// num_turns/duration_ms) — never add them separately, that duplicated them.
|
|
255
|
+
const usage = usageChips(readUsage(result));
|
|
256
|
+
if (usage)
|
|
257
|
+
chips.push(usage);
|
|
258
|
+
const mark = won ? chalk.green("✔") : chalk.red("✘");
|
|
259
|
+
const rule = ` ${chalk.dim("─".repeat(52))}`;
|
|
260
|
+
return `${rule}\n ${mark} ${chalk.bold(won ? "completed" : outcome)}${chips.length ? ` ${chalk.dim(chips.join(" · "))}` : ""} ${suffix}`;
|
|
261
|
+
}
|
|
262
|
+
/** Unwrap the insight envelope and draw the reference-style finale (gauge, friction, recommendations) + usage chips. */
|
|
263
|
+
function renderInsightEvent(data, startedAt, now) {
|
|
264
|
+
const d = typeof data === "object" && data !== null ? data : {};
|
|
265
|
+
const insight = typeof d.insight === "object" && d.insight !== null ? d.insight : data;
|
|
266
|
+
const lines = insightLines(insight);
|
|
267
|
+
const usage = usageChips(readUsage(insight.usage));
|
|
268
|
+
if (usage)
|
|
269
|
+
lines.push(` ${chalk.dim(`insight spend ${usage}`)}`, "");
|
|
270
|
+
void startedAt;
|
|
271
|
+
void now;
|
|
272
|
+
return lines.join("\n");
|
|
273
|
+
}
|
|
274
|
+
const RESULT_BANNER_WIDTH = 60;
|
|
275
|
+
function elapsedSuffix(startedAt, now) {
|
|
276
|
+
const seconds = (now() - startedAt) / 1000;
|
|
277
|
+
return chalk.dim(`(+${seconds.toFixed(1)}s)`);
|
|
278
|
+
}
|
|
279
|
+
function eventBody(data) {
|
|
280
|
+
return typeof data === "string" ? data : JSON.stringify(data);
|
|
281
|
+
}
|
|
282
|
+
/** A `result` event is always a banner — this is a fixed event-name mapping, not shape-detected, since a result payload has no distinguishing shape of its own. */
|
|
283
|
+
function renderResultBanner(data, suffix) {
|
|
284
|
+
const rule = accent("─".repeat(RESULT_BANNER_WIDTH));
|
|
285
|
+
return [rule, `${accent(GLYPHS.ok)} ${accent.bold("result")} ${eventBody(data)} ${suffix}`, rule].join("\n");
|
|
286
|
+
}
|
|
287
|
+
function renderGlyphLine(event, data, suffix) {
|
|
288
|
+
return `${accent(eventGlyph(event.event))} ${event.event} ${eventBody(data)} ${suffix}`;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Non-result events go through the SAME renderer registry Task 6 built for
|
|
292
|
+
* one-shot payloads (render/registry.ts) — an `insight` event's data is
|
|
293
|
+
* insight-shaped, so insightRenderer claims it and this draws the box card
|
|
294
|
+
* for free, with no event-name switch here (Open/Closed: a future rich
|
|
295
|
+
* renderer for another event shape needs no edit to this file, only a new
|
|
296
|
+
* registry entry). Anything no renderer claims falls back to the glyph line.
|
|
297
|
+
*/
|
|
298
|
+
function renderRichEvent(event, startedAt, now) {
|
|
299
|
+
const data = tryParse(event.data);
|
|
300
|
+
const suffix = elapsedSuffix(startedAt, now);
|
|
301
|
+
if (event.event === "result")
|
|
302
|
+
return renderResultBanner(data, suffix);
|
|
303
|
+
return renderRich(data, () => renderGlyphLine(event, data, suffix));
|
|
304
|
+
}
|
|
305
|
+
//# sourceMappingURL=watch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../src/watch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAiB,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,cAAc,GAEf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,UAAU,UAAU,CAAC,IAAmB;IAC5C,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,WAAW,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KAAK,QAAQ;QAAE,OAAO,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtE,OAAO,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AACtE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ora-ai/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ora customer CLI — generated from the ora public API",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"ora": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc -p tsconfig.build.json",
|
|
17
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit",
|
|
18
|
+
"test": "vitest run --passWithNoTests",
|
|
19
|
+
"lint": "eslint src",
|
|
20
|
+
"generate": "node scripts/generate.mjs"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@inquirer/prompts": "^8.5.2",
|
|
24
|
+
"@ora-ai/tunnel-protocol": "^0.1.0",
|
|
25
|
+
"chalk": "^5.4.1",
|
|
26
|
+
"commander": "^12.1.0",
|
|
27
|
+
"ws": "^8.21.1"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
}
|
|
36
|
+
}
|