@sapiom/harness 0.3.0 β 0.4.1
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/CHANGELOG.md +143 -0
- package/dist/core/agent-deps.d.ts +10 -0
- package/dist/core/agent-deps.d.ts.map +1 -0
- package/dist/core/agent-deps.js +92 -0
- package/dist/core/agent-deps.js.map +1 -0
- package/dist/core/agent-project-discovery.d.ts +6 -0
- package/dist/core/agent-project-discovery.d.ts.map +1 -1
- package/dist/core/agent-project-discovery.js.map +1 -1
- package/dist/core/canvas-body.d.ts +8 -0
- package/dist/core/canvas-body.d.ts.map +1 -1
- package/dist/core/canvas-body.js +20 -0
- package/dist/core/canvas-body.js.map +1 -1
- package/dist/core/canvas-render.d.ts +14 -0
- package/dist/core/canvas-render.d.ts.map +1 -1
- package/dist/core/canvas-render.js +51 -18
- package/dist/core/canvas-render.js.map +1 -1
- package/dist/core/canvas-template.d.ts +12 -0
- package/dist/core/canvas-template.d.ts.map +1 -1
- package/dist/core/canvas-template.js +37 -0
- package/dist/core/canvas-template.js.map +1 -1
- package/dist/core/inject/claude-settings.d.ts +18 -0
- package/dist/core/inject/claude-settings.d.ts.map +1 -1
- package/dist/core/inject/claude-settings.js +3 -1
- package/dist/core/inject/claude-settings.js.map +1 -1
- package/dist/core/install-watcher.d.ts +35 -0
- package/dist/core/install-watcher.d.ts.map +1 -0
- package/dist/core/install-watcher.js +120 -0
- package/dist/core/install-watcher.js.map +1 -0
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +4 -0
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/workflow-registry.d.ts.map +1 -1
- package/dist/core/workflow-registry.js +6 -0
- package/dist/core/workflow-registry.js.map +1 -1
- package/dist/server/canvas.d.ts.map +1 -1
- package/dist/server/canvas.js +6 -20
- package/dist/server/canvas.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +66 -5
- package/dist/server/index.js.map +1 -1
- package/dist/server/rest.d.ts.map +1 -1
- package/dist/server/rest.js +1 -0
- package/dist/server/rest.js.map +1 -1
- package/dist/shared/types.d.ts +27 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js.map +1 -1
- package/dist/web/assets/index-BaADppjR.css +32 -0
- package/dist/web/assets/index-Bof-vfeB.js +463 -0
- package/dist/web/index.html +2 -2
- package/package.json +4 -4
- package/dist/web/assets/index-055xzwa-.js +0 -458
- package/dist/web/assets/index-DUELJTDJ.css +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,148 @@
|
|
|
1
1
|
# @sapiom/harness
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e3b2e7a: Studio's top bar, rail icon, and window floor:
|
|
8
|
+
|
|
9
|
+
- While the composer home is up there is no session to name, so the bar's first
|
|
10
|
+
slot carries **Back** (a left arrow) to the session the composer was opened
|
|
11
|
+
over, replacing the inert `π¬ new session` pill β and the composer's own
|
|
12
|
+
floating Back, which duplicated it and overlapped the heading on a narrow
|
|
13
|
+
window. With nothing behind the composer (first run, every session closed) the
|
|
14
|
+
slot is empty rather than offering a Back that goes nowhere.
|
|
15
|
+
- "Add existing agents" now reads with a folder**+** glyph instead of the open
|
|
16
|
+
folder it shared with the Workspaces header.
|
|
17
|
+
- The desktop window refuses to resize below **560Γ480**: dragged narrower, the
|
|
18
|
+
app became a strip of overlapping labels. The starter-template row also drops
|
|
19
|
+
to one column under 640px, where two cards left the names ellipsized past the
|
|
20
|
+
words that tell templates apart.
|
|
21
|
+
|
|
22
|
+
- a34bd32: Studio UI fixes from design review:
|
|
23
|
+
|
|
24
|
+
- **Canvas chat input**: the "Ask about this agent/step" field is now a clean, boxless single row β no border, padding box, or separator hairline β that auto-grows upward up to five lines (then scrolls) with the Ask button bottom-anchored.
|
|
25
|
+
- **Canvas overview card**: no longer repeats the step/exit count or the entry/step/terminal legend that the canvas board already shows; the card focuses on the description, Describe-with-AI, notes, and per-step detail.
|
|
26
|
+
- **Rail brand header (frameless macOS)**: the Sapiom wordmark drops off the traffic-light line and reads inline as "sapiom agent.studio"; only the theme/collapse tools ride the lights' line.
|
|
27
|
+
- **Account menu**: opening the account menu now collapses the settings card (and vice-versa) so the two never stack; the Workspaces β― menu's Past-sessions sub-card also collapses when a grouping/sort choice is clicked.
|
|
28
|
+
- **"Create new"**: promoted above Search as the primary affirmative action, restyled to the app's solid ink-button CTA (the Deploy treatment) with the reserved brand-green plus; the empty-rail state keeps a brand halo.
|
|
29
|
+
- **Rail spacing**: top-level rail rows share one icon size, iconβtext gap, and left inset.
|
|
30
|
+
- **Sign-out**: removed the duplicate Disconnect from the settings panel β signing out now lives once in the account menu, below "Check for updates" and only when signed in.
|
|
31
|
+
- **Composer**: dropped the redundant "New session" + from the top bar of the create-new composer β you're already starting one there.
|
|
32
|
+
- **Canvas pane reveal**: an empty agent's board no longer snaps the canvas shut again right after you manually open it (a reveal race that also flaked CI); a live render still re-opens a pane you'd collapsed, and switching agents still follows the new board.
|
|
33
|
+
- **Collapsed panels**: the expand control is now the mirror of the collapse icon (a panel-open glyph, same quiet style) instead of a menu/list icon; the rail's top tools line up with the icons below them; and the Templates header no longer collides with the macOS traffic lights when the left panel is collapsed.
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [0bf040f]
|
|
36
|
+
- @sapiom/agent-core@0.10.4
|
|
37
|
+
- @sapiom/mcp@0.12.3
|
|
38
|
+
|
|
39
|
+
## 0.4.0
|
|
40
|
+
|
|
41
|
+
### Minor Changes
|
|
42
|
+
|
|
43
|
+
- feaaeaa: Make Test / Run / Deploy observable in Studio: clicking one now reveals the
|
|
44
|
+
right pane and switches it to the Steps view (the unified activity surface),
|
|
45
|
+
instead of the action landing silently.
|
|
46
|
+
|
|
47
|
+
- **See it move.** A run's steps advance pending β running β passed in view; the
|
|
48
|
+
acting button carries a `data-running` pulse tied to the real run status (not
|
|
49
|
+
just the brief hand-off ring); and the demo prod run now progresses across
|
|
50
|
+
polls on a wall clock rather than snapping to "completed".
|
|
51
|
+
- **Relevant final data up front.** A run-summary card headlines the Steps
|
|
52
|
+
surface β outcome, live progress, total duration, and the single most relevant
|
|
53
|
+
result CTA (the deployed agent's dashboard link β a dev-server preview β
|
|
54
|
+
URLs the run produced β the final step's output). Honest-absence throughout:
|
|
55
|
+
no cost fields, no latency on a still-running step, no fabricated values.
|
|
56
|
+
- **Better payload CTAs.** Input / Output / Logs / Result share one disclosure
|
|
57
|
+
with a Copy button (the final Result renders expanded); nothing renders for a
|
|
58
|
+
payload a step never carried.
|
|
59
|
+
- **Deploy as an action, not a toast.** Deploy lands in the same Steps surface
|
|
60
|
+
with a live linking β building β deployed banner, then a completion state that
|
|
61
|
+
links to the dashboard and jumps to the "Trigger from your code" snippet.
|
|
62
|
+
|
|
63
|
+
Note: after an action, the persisted right-pane tab is Steps.
|
|
64
|
+
|
|
65
|
+
- 2c4e8d9: Studio now emits agent-lifecycle product events to PostHog, so the build β
|
|
66
|
+
templates β deploy funnel is measurable.
|
|
67
|
+
|
|
68
|
+
- `agent.created` β a new agent came into existence (a fresh `sapiom.json`
|
|
69
|
+
appeared in the workspace registry), deduped by path and seeded on first load
|
|
70
|
+
so pre-existing agents are never counted. This is the "agents built" metric β
|
|
71
|
+
confirmed existence, not the click that kicked off scaffolding.
|
|
72
|
+
- `agent.template_cloned` β a template was used to start an agent, carrying the
|
|
73
|
+
template slug and the on-ramp surface. The "templates used" metric.
|
|
74
|
+
- `agent.deploy_started` / `agent.deploy_succeeded` (with duration) /
|
|
75
|
+
`agent.deploy_failed` (coarse `error_kind` enum) β the "agents deployed"
|
|
76
|
+
metric, fired from the deploy stream.
|
|
77
|
+
|
|
78
|
+
Payloads carry ids / enums / counts / durations only β never prompt text, file
|
|
79
|
+
contents, or absolute paths. Capture stays gated by the existing
|
|
80
|
+
product-analytics consent tiers and is disabled under mock/e2e.
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- 38a7327: Studio's canvas pane now simply follows the active session's board: whenever a
|
|
85
|
+
session has a rendered board, the pane is shown; when it doesn't, it stays
|
|
86
|
+
closed. This replaces the previous auto-reveal, which fired only once and only
|
|
87
|
+
for sessions born from the composer β so a resumed session that built an agent,
|
|
88
|
+
or opening an already-populated agent, left the freshly-rendered board sitting
|
|
89
|
+
in a collapsed pane the user had to open by hand.
|
|
90
|
+
|
|
91
|
+
Now any live render (a `canvas.reload` for the active session β a finished
|
|
92
|
+
build, a re-render) opens the pane on its own, and switching to a populated
|
|
93
|
+
session shows its board straight away. Trade-off of the simpler model: a manual
|
|
94
|
+
collapse of the canvas is no longer a persisted arrangement β it lasts until the
|
|
95
|
+
next render or session switch (the rail collapse and the Canvas/Steps/Code tab
|
|
96
|
+
still persist). Exited sessions keep their pane open for the "resume to see it"
|
|
97
|
+
invite.
|
|
98
|
+
|
|
99
|
+
- 0b0784c: Fix the Canvas showing a raw "Render failed" esbuild dump (`Could not resolve
|
|
100
|
+
"@sapiom/agent"` / `"zod/v4"`) on a freshly scaffolded agent, before its
|
|
101
|
+
`npm install` has run. Studio now shows a calm "Preparing your agentβ¦"
|
|
102
|
+
placeholder while dependencies are missing and auto-renders the step graph the
|
|
103
|
+
moment they land β no Retry click. Readiness waits for the whole declared
|
|
104
|
+
dependency set (walking `node_modules` up the tree as esbuild does), so a
|
|
105
|
+
partial install can't flash the error. The Canvas empty-state and "renderingβ¦"
|
|
106
|
+
pages are now theme-aware, matching the app's light/dark theme instead of always
|
|
107
|
+
painting a white panel.
|
|
108
|
+
- 0b0784c: Fix new agents nesting under `projects/<agent>/projects/β¦` in Studio, deepening
|
|
109
|
+
on every launch. The desktop host derived its launch dir from the most-recent
|
|
110
|
+
session dir, which drifted into a project folder β so `<launchDir>/projects`
|
|
111
|
+
(where new agents are created) appended a second `projects/` inside it, and the
|
|
112
|
+
new agent's session cwd fed back in to nest even further next time. Pin the
|
|
113
|
+
launch dir to the harness home so every agent stays flat under one `projects/`
|
|
114
|
+
and the rail scans them all. The same `projectRoot` pin also fixes the template
|
|
115
|
+
destination, which nested (and failed with "Couldn't read that directory") for
|
|
116
|
+
the same reason. The "Add existing agents" folder picker now opens on the
|
|
117
|
+
project root where agents live.
|
|
118
|
+
- 58f8008: Fix two issues on the Templates screen in Studio:
|
|
119
|
+
|
|
120
|
+
- The info (i) spec sheet popover rendered with no surface β its background,
|
|
121
|
+
border, and shadow were missing, so the Steps / Trigger / Complexity /
|
|
122
|
+
Capabilities list and the Preview / Use buttons painted directly over the card
|
|
123
|
+
behind it. `.template-facts` now opts into the shared popover elevation recipe.
|
|
124
|
+
- The Templates destination hid the workbench, but the rail's other nav actions
|
|
125
|
+
never cleared it, so clicking Create new, Search, or an agent/session row left
|
|
126
|
+
you stranded on the browser until you used the back arrow. Navigating anywhere
|
|
127
|
+
now dismisses the Templates screen the same way the back arrow does.
|
|
128
|
+
|
|
129
|
+
- 1b3c103: Recolor the embedded terminal so Claude Code's accent colors match the Studio
|
|
130
|
+
brand, without touching the terminal background.
|
|
131
|
+
|
|
132
|
+
Claude Code renders in 256-color by default, so the terminal's own 16-color
|
|
133
|
+
palette never reached its output β its "blue", "green", etc. were Claude's, not
|
|
134
|
+
Studio's. Each Claude session is now pinned to Claude Code's `dark-ansi` /
|
|
135
|
+
`light-ansi` theme (matched to the app theme) through the generated `--settings`
|
|
136
|
+
file, which routes Claude's colors through the terminal's ANSI ramp. That ramp
|
|
137
|
+
(`Terminal.tsx`) is retuned to a brand-coherent palette: a calmer blue, the
|
|
138
|
+
Studio green for success/live state, and harmonized red / yellow / cyan /
|
|
139
|
+
magenta that read cleanly on the recessed `--bg` surface (which is unchanged).
|
|
140
|
+
|
|
141
|
+
The app theme is threaded through session create and persisted on the session so
|
|
142
|
+
resume keeps the same base; unthemed launches (server-side auto-create, a legacy
|
|
143
|
+
session resumed from before this existed) omit the theme and keep Claude's
|
|
144
|
+
default rendering.
|
|
145
|
+
|
|
3
146
|
## 0.3.0
|
|
4
147
|
|
|
5
148
|
### Minor Changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The SDK package every agent project imports β the fallback probe when a
|
|
2
|
+
* project's package.json can't be read, and the source of the canonical
|
|
3
|
+
* `Could not resolve "@sapiom/agent"` error on a fresh scaffold. */
|
|
4
|
+
export declare const AGENT_SDK_PACKAGE = "@sapiom/agent";
|
|
5
|
+
/** Async readiness probe for the render pipeline β true iff every declared
|
|
6
|
+
* runtime dependency resolves. */
|
|
7
|
+
export declare function agentDepsInstalled(projectDir: string): Promise<boolean>;
|
|
8
|
+
/** Sync readiness probe for the install watcher's poll loop. */
|
|
9
|
+
export declare function agentDepsInstalledSync(projectDir: string): boolean;
|
|
10
|
+
//# sourceMappingURL=agent-deps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-deps.d.ts","sourceRoot":"","sources":["../../src/core/agent-deps.ts"],"names":[],"mappings":"AAkCA;;qEAEqE;AACrE,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AA4CjD;mCACmC;AACnC,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAK7E;AAED,gEAAgE;AAChE,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAElE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One shared notion of "this agent project's dependencies are installed",
|
|
3
|
+
* used by both the render pipeline (core/canvas-render.ts β decides whether to
|
|
4
|
+
* extract or show the "preparing" placeholder) and the install watcher
|
|
5
|
+
* (core/install-watcher.ts β decides when to re-render). Keeping the probe in
|
|
6
|
+
* one place stops those two from disagreeing about readiness, which would
|
|
7
|
+
* either flash the esbuild error or never re-render.
|
|
8
|
+
*
|
|
9
|
+
* "Ready" means EVERY runtime dependency the bundle imports is resolvable β
|
|
10
|
+
* the project's declared `dependencies` (e.g. `@sapiom/agent`, `@sapiom/tools`,
|
|
11
|
+
* `zod`), each found by walking `node_modules` up the directory tree exactly as
|
|
12
|
+
* Node/esbuild module resolution does. Three things this gets right:
|
|
13
|
+
*
|
|
14
|
+
* - Requiring ALL declared deps, not just the SDK, closes the partial-install
|
|
15
|
+
* window. `npm install` writes packages incrementally, so `@sapiom/agent`
|
|
16
|
+
* can land before `zod`; keying on the SDK alone would let the watcher
|
|
17
|
+
* re-render into a `Could not resolve "zod/v4"` failure β the very error
|
|
18
|
+
* we're hiding. The graph appears only once the bundle can actually
|
|
19
|
+
* succeed. (devDependencies β typescript, prettier β don't affect the
|
|
20
|
+
* type-stripped bundle, so they're intentionally not required.)
|
|
21
|
+
* - Checking each package's `package.json` (not just its directory) means a
|
|
22
|
+
* dir npm created but hasn't populated yet still reads as "not ready".
|
|
23
|
+
* - Walking UP resolves deps hoisted to a parent `node_modules` (a monorepo
|
|
24
|
+
* checkout, the repo's own example fixtures), matching what the bundle can
|
|
25
|
+
* resolve; a standalone fresh scaffold has no such ancestor, so it reads as
|
|
26
|
+
* "preparing" until its own `npm install` lands.
|
|
27
|
+
*
|
|
28
|
+
* If `package.json` can't be read (a fixture without one), it falls back to the
|
|
29
|
+
* SDK package every agent project imports β never crashing the render on it.
|
|
30
|
+
*/
|
|
31
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
32
|
+
import * as fsp from "node:fs/promises";
|
|
33
|
+
import * as path from "node:path";
|
|
34
|
+
/** The SDK package every agent project imports β the fallback probe when a
|
|
35
|
+
* project's package.json can't be read, and the source of the canonical
|
|
36
|
+
* `Could not resolve "@sapiom/agent"` error on a fresh scaffold. */
|
|
37
|
+
export const AGENT_SDK_PACKAGE = "@sapiom/agent";
|
|
38
|
+
/** The `node_modules/<pkg>/package.json` candidate at each ancestor of
|
|
39
|
+
* `projectDir` β the search path Node/esbuild walk to resolve a bare import. */
|
|
40
|
+
function manifestCandidates(projectDir, pkg) {
|
|
41
|
+
const candidates = [];
|
|
42
|
+
let dir = path.resolve(projectDir);
|
|
43
|
+
for (;;) {
|
|
44
|
+
candidates.push(path.join(dir, "node_modules", pkg, "package.json"));
|
|
45
|
+
const parent = path.dirname(dir);
|
|
46
|
+
if (parent === dir)
|
|
47
|
+
break;
|
|
48
|
+
dir = parent;
|
|
49
|
+
}
|
|
50
|
+
return candidates;
|
|
51
|
+
}
|
|
52
|
+
/** The runtime deps the bundle must resolve: the project's declared
|
|
53
|
+
* `dependencies` keys, or the SDK alone if package.json is missing/unreadable. */
|
|
54
|
+
function requiredDeps(projectDir) {
|
|
55
|
+
try {
|
|
56
|
+
const raw = readFileSync(path.join(projectDir, "package.json"), "utf8");
|
|
57
|
+
const deps = JSON.parse(raw).dependencies;
|
|
58
|
+
const names = deps ? Object.keys(deps) : [];
|
|
59
|
+
return names.length > 0 ? names : [AGENT_SDK_PACKAGE];
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return [AGENT_SDK_PACKAGE];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function resolvesSync(projectDir, pkg) {
|
|
66
|
+
return manifestCandidates(projectDir, pkg).some((c) => existsSync(c));
|
|
67
|
+
}
|
|
68
|
+
async function resolvesAsync(projectDir, pkg) {
|
|
69
|
+
for (const candidate of manifestCandidates(projectDir, pkg)) {
|
|
70
|
+
const found = await fsp
|
|
71
|
+
.access(candidate)
|
|
72
|
+
.then(() => true)
|
|
73
|
+
.catch(() => false);
|
|
74
|
+
if (found)
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
/** Async readiness probe for the render pipeline β true iff every declared
|
|
80
|
+
* runtime dependency resolves. */
|
|
81
|
+
export async function agentDepsInstalled(projectDir) {
|
|
82
|
+
for (const dep of requiredDeps(projectDir)) {
|
|
83
|
+
if (!(await resolvesAsync(projectDir, dep)))
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
/** Sync readiness probe for the install watcher's poll loop. */
|
|
89
|
+
export function agentDepsInstalledSync(projectDir) {
|
|
90
|
+
return requiredDeps(projectDir).every((dep) => resolvesSync(projectDir, dep));
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=agent-deps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-deps.js","sourceRoot":"","sources":["../../src/core/agent-deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC;;qEAEqE;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAEjD;iFACiF;AACjF,SAAS,kBAAkB,CAAC,UAAkB,EAAE,GAAW;IACzD,MAAM,UAAU,GAAa,EAAE,CAAC;IAChC,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACnC,SAAS,CAAC;QACR,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,MAAM,KAAK,GAAG;YAAE,MAAM;QAC1B,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;mFACmF;AACnF,SAAS,YAAY,CAAC,UAAkB;IACtC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC;QACxE,MAAM,IAAI,GAAI,IAAI,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AChE,MAAM,UAAU,sBAAsB,CAAC,UAAkB;IACvD,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -3,6 +3,12 @@ export interface AgentProjectMarker {
|
|
|
3
3
|
definitionId?: number | null;
|
|
4
4
|
/** The agent's `defineAgent({ name })`, cached by `link`. */
|
|
5
5
|
name?: string;
|
|
6
|
+
/** Gallery-template provenance, written by clone (a clone carries `forkId` too). */
|
|
7
|
+
templateId?: string | null;
|
|
8
|
+
/** Fork record id, written by clone. */
|
|
9
|
+
forkId?: string | null;
|
|
10
|
+
/** Bundled-starter id, written by scaffold; `"default"` = bare scaffold. */
|
|
11
|
+
starterId?: string | null;
|
|
6
12
|
}
|
|
7
13
|
/**
|
|
8
14
|
* A detailed marker result for callers that must distinguish definitive
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-project-discovery.d.ts","sourceRoot":"","sources":["../../src/core/agent-project-discovery.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAW9C,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-project-discovery.d.ts","sourceRoot":"","sources":["../../src/core/agent-project-discovery.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAW9C,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,wCAAwC;IACxC,MAAM,CAAC,EAAE,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IACN,OAAO;IACP,OAAO;CACR,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-project-discovery.js","sourceRoot":"","sources":["../../src/core/agent-project-discovery.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAE9C,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,cAAc;IACd,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,OAAO;CACR,CAAC,CAAC;AAwBH,MAAM,UAAU,4BAA4B,CAAC,IAAY;IACvD,OAAO,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,uBAAuB,CACrC,GAAW;IAEX,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAY,CAAC;QAC1C,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YACxE,OAAO,IAAI,CAAC;QACd,OAAO,MAA4B,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,6BAA6B,CAAC,GAAW;IAChD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;IACnE,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,EA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Q,CAAC,UAAU,EAAE,MAAM,CAAC,CACvC,CAAC;QACF,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IACtE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,MAAM,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;IAClD,CAAC;AACH,CAAC"}
|
|
@@ -36,6 +36,14 @@ export declare function buildWorkflowPanelHtml(graph: CanvasGraph, meta: Workflo
|
|
|
36
36
|
* a crash, never a silent fallback to the LLM path, just an honest reason
|
|
37
37
|
* styled through the same shell. */
|
|
38
38
|
export declare function buildErrorPanelHtml(title: string, reason: string): string;
|
|
39
|
+
/** A calm, transient panel for a workflow whose dependencies aren't installed
|
|
40
|
+
* yet (a freshly scaffolded project between `scaffold` and `npm install`).
|
|
41
|
+
* Extraction WOULD fail here with esbuild "Could not resolve β¦" noise, so we
|
|
42
|
+
* don't run it β we show this instead and let the install watcher re-render
|
|
43
|
+
* once `node_modules` lands. Crucially it emits NO `#sapiom-render-error`
|
|
44
|
+
* script, so the SPA shows no "render failed" card / Retry buttons: this is a
|
|
45
|
+
* normal setup state, not an error the user has to act on. */
|
|
46
|
+
export declare function buildPreparingPanelHtml(title: string): string;
|
|
39
47
|
/** Joins the workflow panel(s) into the final `#canvas-root` body β the string
|
|
40
48
|
* `renderCanvasDocument()` wraps. Each panel already carries its own legend
|
|
41
49
|
* footer (see `buildWorkflowPanelHtml`); there is no document-level footer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-body.d.ts","sourceRoot":"","sources":["../../src/core/canvas-body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,KAA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I,EAAE,iBAAiB,EACvB,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,GACnC,MAAM,CA2BR;AAED;;qCAEqC;AACrC,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAczE;AAED;;;;;;+DAM+D;AAC/D,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAY7D;AAED;;gFAEgF;AAChF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAEtE"}
|
package/dist/core/canvas-body.js
CHANGED
|
@@ -151,6 +151,26 @@ export function buildErrorPanelHtml(title, reason) {
|
|
|
151
151
|
<script type="application/json" id="sapiom-render-error">${errorData}</script>
|
|
152
152
|
</section>`;
|
|
153
153
|
}
|
|
154
|
+
/** A calm, transient panel for a workflow whose dependencies aren't installed
|
|
155
|
+
* yet (a freshly scaffolded project between `scaffold` and `npm install`).
|
|
156
|
+
* Extraction WOULD fail here with esbuild "Could not resolve β¦" noise, so we
|
|
157
|
+
* don't run it β we show this instead and let the install watcher re-render
|
|
158
|
+
* once `node_modules` lands. Crucially it emits NO `#sapiom-render-error`
|
|
159
|
+
* script, so the SPA shows no "render failed" card / Retry buttons: this is a
|
|
160
|
+
* normal setup state, not an error the user has to act on. */
|
|
161
|
+
export function buildPreparingPanelHtml(title) {
|
|
162
|
+
return `<section class="canvas-panel">
|
|
163
|
+
<header class="canvas-header">
|
|
164
|
+
<div class="canvas-title-row">
|
|
165
|
+
<h1 class="canvas-title">${esc(title)}</h1>
|
|
166
|
+
<span class="canvas-badge">preparing</span>
|
|
167
|
+
</div>
|
|
168
|
+
</header>
|
|
169
|
+
<div class="canvas-diagram-panel">
|
|
170
|
+
<p class="canvas-empty-note">Preparing your agent β installing dependencies. The step graph appears here automatically once setup finishes.</p>
|
|
171
|
+
</div>
|
|
172
|
+
</section>`;
|
|
173
|
+
}
|
|
154
174
|
/** Joins the workflow panel(s) into the final `#canvas-root` body β the string
|
|
155
175
|
* `renderCanvasDocument()` wraps. Each panel already carries its own legend
|
|
156
176
|
* footer (see `buildWorkflowPanelHtml`); there is no document-level footer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-body.js","sourceRoot":"","sources":["../../src/core/canvas-body.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5D,SAAS,GAAG,CAAC,CAAS;IACpB,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACtG,CAAC;AAOD,MAAM,eAAe,GAAmC;IACtD,KAAK,EAAE,qBAAqB;IAC5B,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,yBAAyB;IAChC,kBAAkB,EAAE,oBAAoB;IACxC,eAAe,EAAE,uBAAuB;IACxC,mBAAmB,EAAE,wBAAwB;CAC9C,CAAC;AAEF,MAAM,eAAe,GAAqB;IACxC,OAAO;IACP,MAAM;IACN,OAAO;IACP,kBAAkB;IAClB,eAAe;IACf,mBAAmB;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,SAA8B,EAAE,SAA8B;IAC5F,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAC/D,CAAC,CAAC,EAAE,EAAE,CACJ,4FAA4F,CAAC,YAAY,eAAe,CAAC,CAAC,CAAC,SAAS,CACvI,CAAC;IACF,IAAI,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,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C;AACrC,MAAM,UAAU,mBAAmB,CAAC,KAAa,EAAE,MAAc;IAC/D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC7E,OAAO;;;iCAGwB,GAAG,CAAC,KAAK,CAAC;;;;;8EAKmC,GAAG,CAAC,MAAM,CAAC;;6DAE5B,SAAS;WAC3D,CAAC;AACZ,CAAC;AAED;;;;;;+DAM+D;AAC/D,MAAM,UAAU,uBAAuB,CAAC,KAAa;IACnD,OAAO;;;iCAGwB,GAAG,CAAC,KAAK,CAAC;;;;;;;WAOhC,CAAC;AACZ,CAAC;AAED;;gFAEgF;AAChF,MAAM,UAAU,kBAAkB,CAAC,KAA2B;IAC5D,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -36,6 +36,11 @@ export interface CanvasRenderOutcome {
|
|
|
36
36
|
writeError?: string;
|
|
37
37
|
/** True when `preserveExistingOnFailure` kept the existing render instead of writing an error panel over it. */
|
|
38
38
|
preservedExisting?: boolean;
|
|
39
|
+
/** True when the workflow's `node_modules` isn't present yet, so extraction
|
|
40
|
+
* was skipped and a calm "preparing" placeholder was written instead of an
|
|
41
|
+
* esbuild error panel. The server arms an install watcher on this to
|
|
42
|
+
* re-render once dependencies land β see server/index.ts. */
|
|
43
|
+
depsMissing?: boolean;
|
|
39
44
|
}
|
|
40
45
|
export interface RenderCanvasOptions {
|
|
41
46
|
/**
|
|
@@ -47,6 +52,15 @@ export interface RenderCanvasOptions {
|
|
|
47
52
|
* page IS the answer the user asked for.
|
|
48
53
|
*/
|
|
49
54
|
preserveExistingOnFailure?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Force extraction even when the project's dependencies aren't installed,
|
|
57
|
+
* so the honest esbuild error panel is written instead of the calm
|
|
58
|
+
* "preparing" placeholder. The install watcher's timeout path sets this to
|
|
59
|
+
* restore the Retry / Ask-coding-agent actions when an install never
|
|
60
|
+
* completes β otherwise the placeholder (and its `depsMissing` re-arm) would
|
|
61
|
+
* wait forever. Normal renders leave it off.
|
|
62
|
+
*/
|
|
63
|
+
surfaceErrorOnMissingDeps?: boolean;
|
|
50
64
|
}
|
|
51
65
|
/**
|
|
52
66
|
* Renders `session`'s bound workflow to its per-workflow render file. Never
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-render.d.ts","sourceRoot":"","sources":["../../src/core/canvas-render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"canvas-render.d.ts","sourceRoot":"","sources":["../../src/core/canvas-render.ts"],"names":[],"mappings":"AAwCA,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAShE;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED,MAAM,WAAW,mBAAmB;IAClC;;8EAE0E;IAC1E,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yGAAyG;IACzG,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;iDAC6C;IAC7C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8HAA8H;IAC9H,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gHAAgH;IAChH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;kEAG8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;;;OAOG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;OAOG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAqCD;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,mBAAmB,CAAC,CAM9B;AAED;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,mBAAmB,CAAC,CA6D9B"}
|
|
@@ -25,10 +25,11 @@ import { createHash } from "node:crypto";
|
|
|
25
25
|
import * as fs from "node:fs/promises";
|
|
26
26
|
import * as path from "node:path";
|
|
27
27
|
import { CANVAS_RENDERS_DIR } from "../shared/types.js";
|
|
28
|
+
import { agentDepsInstalled } from "./agent-deps.js";
|
|
28
29
|
import { renderCanvasDocument } from "./canvas-template.js";
|
|
29
30
|
import { extractWorkflowGraphCached } from "./canvas-cache.js";
|
|
30
31
|
import { deriveEnrichment } from "./canvas-derive.js";
|
|
31
|
-
import { assembleCanvasBody, buildErrorPanelHtml, buildWorkflowPanelHtml, } from "./canvas-body.js";
|
|
32
|
+
import { assembleCanvasBody, buildErrorPanelHtml, buildPreparingPanelHtml, buildWorkflowPanelHtml, } from "./canvas-body.js";
|
|
32
33
|
/**
|
|
33
34
|
* Stable, filesystem-safe render-file name for a workflow: its directory
|
|
34
35
|
* basename (readable in `ls`) plus a short path hash (two same-named
|
|
@@ -91,6 +92,33 @@ export async function renderCanvasForSession(session, workflows, options = {}) {
|
|
|
91
92
|
* file is per-workflow.
|
|
92
93
|
*/
|
|
93
94
|
export async function renderWorkflowRenderFile(cwd, bound, options = {}) {
|
|
95
|
+
const renderPath = renderFileFor(cwd, bound.path);
|
|
96
|
+
// A freshly scaffolded project β between `scaffold` and the coding agent's
|
|
97
|
+
// `npm install` β has no installed SDK, so extraction (an esbuild bundle of
|
|
98
|
+
// the project's own index.ts) is guaranteed to fail with "Could not resolve
|
|
99
|
+
// @sapiom/agent / zod/v4". That's not an error the user caused or can act on;
|
|
100
|
+
// it self-resolves when install finishes. So skip extraction entirely and
|
|
101
|
+
// write a calm "preparing" placeholder, flagging `depsMissing` so the server
|
|
102
|
+
// arms an install watcher that re-renders once dependencies land. A bundle
|
|
103
|
+
// failure WITH deps installed stays a genuine error (below).
|
|
104
|
+
if (!options.surfaceErrorOnMissingDeps && !(await agentDepsInstalled(bound.path))) {
|
|
105
|
+
const outcome = {
|
|
106
|
+
mode: "single",
|
|
107
|
+
workflowPath: bound.path,
|
|
108
|
+
renderPath,
|
|
109
|
+
extractionFailed: [],
|
|
110
|
+
depsMissing: true,
|
|
111
|
+
};
|
|
112
|
+
// Preserve semantics: an unprompted render must not replace an existing
|
|
113
|
+
// (possibly good) diagram just because deps went missing β but still flag
|
|
114
|
+
// depsMissing so the watcher re-renders when they return.
|
|
115
|
+
if (options.preserveExistingOnFailure && (await pathExists(renderPath))) {
|
|
116
|
+
outcome.preservedExisting = true;
|
|
117
|
+
return outcome;
|
|
118
|
+
}
|
|
119
|
+
await writeRenderFile(renderPath, buildPreparingPanelHtml(bound.name), outcome);
|
|
120
|
+
return outcome;
|
|
121
|
+
}
|
|
94
122
|
const { result, cached } = await extractWorkflowGraphCached(bound.path);
|
|
95
123
|
const failed = !result.ok;
|
|
96
124
|
// Enrichment only decorates a successful extraction β deriving annotations
|
|
@@ -99,7 +127,6 @@ export async function renderWorkflowRenderFile(cwd, bound, options = {}) {
|
|
|
99
127
|
// with the diagram and can never go stale.
|
|
100
128
|
const enrichment = result.ok ? deriveEnrichment(result.graph) : null;
|
|
101
129
|
const body = buildSingleBody(bound, result.ok ? result.graph : null, result.ok ? null : result.reason, enrichment);
|
|
102
|
-
const renderPath = renderFileFor(cwd, bound.path);
|
|
103
130
|
const outcome = {
|
|
104
131
|
mode: "single",
|
|
105
132
|
workflowPath: bound.path,
|
|
@@ -109,25 +136,32 @@ export async function renderWorkflowRenderFile(cwd, bound, options = {}) {
|
|
|
109
136
|
...(enrichment ? { enrichmentApplied: true } : {}),
|
|
110
137
|
};
|
|
111
138
|
// An unprompted render that failed to extract must not destroy an existing
|
|
112
|
-
// (possibly good) diagram for this workflow β e.g.
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
.catch(() => false);
|
|
119
|
-
if (exists) {
|
|
120
|
-
outcome.preservedExisting = true;
|
|
121
|
-
return outcome;
|
|
122
|
-
}
|
|
139
|
+
// (possibly good) diagram for this workflow β e.g. an agent mid-edit whose
|
|
140
|
+
// sources are transiently un-buildable. (The deps-not-installed case is
|
|
141
|
+
// handled above; this is a genuine extraction failure with deps present.)
|
|
142
|
+
if (options.preserveExistingOnFailure && failed && (await pathExists(renderPath))) {
|
|
143
|
+
outcome.preservedExisting = true;
|
|
144
|
+
return outcome;
|
|
123
145
|
}
|
|
146
|
+
await writeRenderFile(renderPath, body, outcome);
|
|
147
|
+
return outcome;
|
|
148
|
+
}
|
|
149
|
+
/** True if `p` exists (any type). */
|
|
150
|
+
async function pathExists(p) {
|
|
151
|
+
return fs
|
|
152
|
+
.access(p)
|
|
153
|
+
.then(() => true)
|
|
154
|
+
.catch(() => false);
|
|
155
|
+
}
|
|
156
|
+
/** Writes the render file, skipping an identical rewrite (which would bump the
|
|
157
|
+
* mtime and make the canvas watcher fire a needless iframe reload β a true
|
|
158
|
+
* no-op now that any workflow source edit triggers a re-render). A write
|
|
159
|
+
* failure (e.g. an unwritable cwd) is captured on `outcome.writeError`;
|
|
160
|
+
* extraction success/failure is unaffected. */
|
|
161
|
+
async function writeRenderFile(renderPath, body, outcome) {
|
|
124
162
|
try {
|
|
125
163
|
const document = renderCanvasDocument(body);
|
|
126
164
|
const existing = await fs.readFile(renderPath, "utf8").catch(() => null);
|
|
127
|
-
// Skip the write when nothing changed: an identical rewrite would still
|
|
128
|
-
// bump the render file's mtime and make the canvas watcher fire a needless
|
|
129
|
-
// iframe reload. This matters now that any workflow source edit triggers a
|
|
130
|
-
// re-render β a save that doesn't change the diagram is a true no-op.
|
|
131
165
|
if (existing !== document) {
|
|
132
166
|
await fs.mkdir(path.dirname(renderPath), { recursive: true });
|
|
133
167
|
await fs.writeFile(renderPath, document, "utf8");
|
|
@@ -136,6 +170,5 @@ export async function renderWorkflowRenderFile(cwd, bound, options = {}) {
|
|
|
136
170
|
catch (err) {
|
|
137
171
|
outcome.writeError = err instanceof Error ? err.message : String(err);
|
|
138
172
|
}
|
|
139
|
-
return outcome;
|
|
140
173
|
}
|
|
141
174
|
//# sourceMappingURL=canvas-render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-render.js","sourceRoot":"","sources":["../../src/core/canvas-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,kBAAkB,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,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACzE,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC1B,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC9D,MAAM,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,UAAU,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC;AACH,CAAC"}
|
|
@@ -25,6 +25,18 @@ export declare const CANVAS_TEMPLATE_FILE = ".sapiom/canvas/_template.html";
|
|
|
25
25
|
* can't drift from each other.
|
|
26
26
|
*/
|
|
27
27
|
export declare function renderCanvasDocument(bodyHtml: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* A minimal, THEME-AWARE document for the canvas pane's non-graph states β
|
|
30
|
+
* the empty state and the "renderingβ¦" placeholder the server serves for a
|
|
31
|
+
* session with nothing (yet) to draw. It reuses the SAME theme mechanism as
|
|
32
|
+
* `renderCanvasDocument` (the `?theme` reader + the ported token block), so
|
|
33
|
+
* these pages follow the app's light/dark theme instead of always painting a
|
|
34
|
+
* white panel inside a dark app. No graph, so it deliberately omits the
|
|
35
|
+
* run-state/pan-zoom script and SVG defs β just a centered title + subtitle on
|
|
36
|
+
* the themed canvas backdrop. `title`/`subtitle` are trusted, static server
|
|
37
|
+
* copy (never user input), so they're inlined without escaping.
|
|
38
|
+
*/
|
|
39
|
+
export declare function renderCanvasMessageDocument(title: string, subtitle: string): string;
|
|
28
40
|
/** The exact document written to both `_template.html` and the initial
|
|
29
41
|
* `index.html` β a friendly empty state plus the patterns reference. */
|
|
30
42
|
export declare const TEMPLATE_HTML: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-template.d.ts","sourceRoot":"","sources":["../../src/core/canvas-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH;;uEAEuE;AACvE,eAAO,MAAM,oBAAoB,kCAAiC,CAAC;AAiVnE;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAyB7D;AAgCD;yEACyE;AACzE,eAAO,MAAM,aAAa,QAAsC,CAAC;AAoBjE;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIrE"}
|
|
1
|
+
{"version":3,"file":"canvas-template.d.ts","sourceRoot":"","sources":["../../src/core/canvas-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH;;uEAEuE;AACvE,eAAO,MAAM,oBAAoB,kCAAiC,CAAC;AAiVnE;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAyB7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAyBnF;AAgCD;yEACyE;AACzE,eAAO,MAAM,aAAa,QAAsC,CAAC;AAoBjE;;;;;;;;;;GAUG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIrE"}
|
|
@@ -384,6 +384,43 @@ ${bodyHtml}
|
|
|
384
384
|
</html>
|
|
385
385
|
`;
|
|
386
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* A minimal, THEME-AWARE document for the canvas pane's non-graph states β
|
|
389
|
+
* the empty state and the "renderingβ¦" placeholder the server serves for a
|
|
390
|
+
* session with nothing (yet) to draw. It reuses the SAME theme mechanism as
|
|
391
|
+
* `renderCanvasDocument` (the `?theme` reader + the ported token block), so
|
|
392
|
+
* these pages follow the app's light/dark theme instead of always painting a
|
|
393
|
+
* white panel inside a dark app. No graph, so it deliberately omits the
|
|
394
|
+
* run-state/pan-zoom script and SVG defs β just a centered title + subtitle on
|
|
395
|
+
* the themed canvas backdrop. `title`/`subtitle` are trusted, static server
|
|
396
|
+
* copy (never user input), so they're inlined without escaping.
|
|
397
|
+
*/
|
|
398
|
+
export function renderCanvasMessageDocument(title, subtitle) {
|
|
399
|
+
return `<!DOCTYPE html>
|
|
400
|
+
<html lang="en">
|
|
401
|
+
<head>
|
|
402
|
+
<meta charset="UTF-8" />
|
|
403
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
404
|
+
<title>Agent Studio canvas</title>
|
|
405
|
+
<script>
|
|
406
|
+
${THEME_SCRIPT}
|
|
407
|
+
</script>
|
|
408
|
+
<style>
|
|
409
|
+
${themeStyleBlock()}
|
|
410
|
+
.canvas-message { text-align: center; padding: 0 2rem; max-width: 520px; }
|
|
411
|
+
.canvas-message h1 { margin: 0 0 0.5rem; font-size: 1.1rem; font-weight: 600; color: var(--canvas-text); }
|
|
412
|
+
.canvas-message p { margin: 0; font-size: 13px; color: var(--canvas-text-dim); }
|
|
413
|
+
</style>
|
|
414
|
+
</head>
|
|
415
|
+
<body>
|
|
416
|
+
<div class="canvas-message">
|
|
417
|
+
<h1>${title}</h1>
|
|
418
|
+
<p>${subtitle}</p>
|
|
419
|
+
</div>
|
|
420
|
+
</body>
|
|
421
|
+
</html>
|
|
422
|
+
`;
|
|
423
|
+
}
|
|
387
424
|
const TEMPLATE_BODY = `
|
|
388
425
|
<!--
|
|
389
426
|
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|