@sapiom/harness 0.1.0 → 0.1.2
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 +162 -0
- package/README.md +36 -0
- package/dist/cli/bin.js +26 -2
- package/dist/cli/bin.js.map +1 -1
- package/dist/cli/consent.d.ts +29 -1
- package/dist/cli/consent.d.ts.map +1 -1
- package/dist/cli/consent.js +33 -11
- package/dist/cli/consent.js.map +1 -1
- package/dist/core/adapters/adapter.d.ts +72 -0
- package/dist/core/adapters/adapter.d.ts.map +1 -0
- package/dist/core/adapters/adapter.js +18 -0
- package/dist/core/adapters/adapter.js.map +1 -0
- package/dist/core/adapters/claude-code-info.d.ts +11 -0
- package/dist/core/adapters/claude-code-info.d.ts.map +1 -0
- package/dist/core/adapters/claude-code-info.js +27 -0
- package/dist/core/adapters/claude-code-info.js.map +1 -0
- package/dist/core/adapters/claude-code.d.ts.map +1 -1
- package/dist/core/adapters/claude-code.js +9 -8
- package/dist/core/adapters/claude-code.js.map +1 -1
- package/dist/core/adapters/codex-info.d.ts +10 -0
- package/dist/core/adapters/codex-info.d.ts.map +1 -0
- package/dist/core/adapters/codex-info.js +32 -0
- package/dist/core/adapters/codex-info.js.map +1 -0
- package/dist/core/adapters/conductor.d.ts +8 -0
- package/dist/core/adapters/conductor.d.ts.map +1 -0
- package/dist/core/adapters/conductor.js +57 -0
- package/dist/core/adapters/conductor.js.map +1 -0
- package/dist/core/adapters/detect.d.ts +15 -0
- package/dist/core/adapters/detect.d.ts.map +1 -0
- package/dist/core/adapters/detect.js +62 -0
- package/dist/core/adapters/detect.js.map +1 -0
- package/dist/core/adapters/opencode.d.ts +8 -0
- package/dist/core/adapters/opencode.d.ts.map +1 -0
- package/dist/core/adapters/opencode.js +35 -0
- package/dist/core/adapters/opencode.js.map +1 -0
- package/dist/core/adapters/pi.d.ts +8 -0
- package/dist/core/adapters/pi.d.ts.map +1 -0
- package/dist/core/adapters/pi.js +24 -0
- package/dist/core/adapters/pi.js.map +1 -0
- package/dist/core/adapters/registry.d.ts +42 -0
- package/dist/core/adapters/registry.d.ts.map +1 -0
- package/dist/core/adapters/registry.js +67 -0
- package/dist/core/adapters/registry.js.map +1 -0
- package/dist/core/canvas-enrich.d.ts +9 -0
- package/dist/core/canvas-enrich.d.ts.map +1 -1
- package/dist/core/canvas-enrich.js +8 -0
- package/dist/core/canvas-enrich.js.map +1 -1
- package/dist/core/collector/analytics-emitter.d.ts +57 -0
- package/dist/core/collector/analytics-emitter.d.ts.map +1 -0
- package/dist/core/collector/analytics-emitter.js +131 -0
- package/dist/core/collector/analytics-emitter.js.map +1 -0
- package/dist/core/collector/identity-migration.d.ts +25 -0
- package/dist/core/collector/identity-migration.d.ts.map +1 -0
- package/dist/core/collector/identity-migration.js +68 -0
- package/dist/core/collector/identity-migration.js.map +1 -0
- package/dist/core/collector/store-retention.d.ts +51 -0
- package/dist/core/collector/store-retention.d.ts.map +1 -0
- package/dist/core/collector/store-retention.js +117 -0
- package/dist/core/collector/store-retention.js.map +1 -0
- package/dist/core/collector/store.d.ts +17 -1
- package/dist/core/collector/store.d.ts.map +1 -1
- package/dist/core/collector/store.js +24 -3
- package/dist/core/collector/store.js.map +1 -1
- package/dist/core/errors.d.ts +71 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +86 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/inject/claude-settings.d.ts +3 -1
- 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/inject/skills-plugin.d.ts +44 -0
- package/dist/core/inject/skills-plugin.d.ts.map +1 -0
- package/dist/core/inject/skills-plugin.js +146 -0
- package/dist/core/inject/skills-plugin.js.map +1 -0
- package/dist/core/macro-runner.d.ts.map +1 -1
- package/dist/core/macro-runner.js +20 -1
- package/dist/core/macro-runner.js.map +1 -1
- package/dist/core/macros.d.ts.map +1 -1
- package/dist/core/macros.js +3 -0
- package/dist/core/macros.js.map +1 -1
- package/dist/core/session-manager.d.ts +37 -18
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +85 -34
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/task-manager.d.ts +25 -4
- package/dist/core/task-manager.d.ts.map +1 -1
- package/dist/core/task-manager.js +118 -6
- package/dist/core/task-manager.js.map +1 -1
- package/dist/core/workflow-registry.d.ts +7 -0
- package/dist/core/workflow-registry.d.ts.map +1 -1
- package/dist/core/workflow-registry.js +74 -50
- package/dist/core/workflow-registry.js.map +1 -1
- package/dist/core/workspace-watcher.d.ts +13 -1
- package/dist/core/workspace-watcher.d.ts.map +1 -1
- package/dist/core/workspace-watcher.js +78 -4
- package/dist/core/workspace-watcher.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/server/index.d.ts +16 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +0 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/ingest.d.ts +8 -0
- package/dist/server/ingest.d.ts.map +1 -1
- package/dist/server/ingest.js +4 -0
- package/dist/server/ingest.js.map +1 -1
- package/dist/server/macros.d.ts +5 -2
- package/dist/server/macros.d.ts.map +1 -1
- package/dist/server/macros.js +5 -2
- package/dist/server/macros.js.map +1 -1
- package/dist/server/rest.d.ts +26 -1
- package/dist/server/rest.d.ts.map +1 -1
- package/dist/server/rest.js +139 -6
- package/dist/server/rest.js.map +1 -1
- package/dist/server/skills.d.ts +45 -0
- package/dist/server/skills.d.ts.map +1 -0
- package/dist/server/skills.js +286 -0
- package/dist/server/skills.js.map +1 -0
- package/dist/shared/types.d.ts +75 -2
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js +12 -1
- package/dist/shared/types.js.map +1 -1
- package/dist/web/assets/index-BTm-QNRt.css +32 -0
- package/dist/web/assets/index-CvNiFngP.js +204 -0
- package/dist/web/index.html +2 -2
- package/package.json +20 -8
- package/dist/core/collector/batcher.d.ts +0 -57
- package/dist/core/collector/batcher.d.ts.map +0 -1
- package/dist/core/collector/batcher.js +0 -143
- package/dist/core/collector/batcher.js.map +0 -1
- package/dist/web/assets/index-B9R4TzH7.css +0 -32
- package/dist/web/assets/index-Dh97QAgq.js +0 -192
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills listing server — backs GET /api/skills and GET /api/skills/:id.
|
|
3
|
+
*
|
|
4
|
+
* Two skill sources are merged:
|
|
5
|
+
* 1. Installed @sapiom packages: scans node_modules/@sapiom/{pkg}/skills/SKILL.md
|
|
6
|
+
* (gracefully empty when no package ships skills yet).
|
|
7
|
+
* 2. User's own ~/.claude/skills/{id}/SKILL.md (same convention Claude Code
|
|
8
|
+
* uses for project-specific skills).
|
|
9
|
+
*
|
|
10
|
+
* Path-traversal safety: skill ids are slug-shaped identifiers (letters,
|
|
11
|
+
* digits, hyphens, underscores) — any id that fails the SAFE_SLUG regex is
|
|
12
|
+
* rejected with a 404 before any filesystem access.
|
|
13
|
+
*
|
|
14
|
+
* The list endpoint (GET /api/skills) does a full directory walk across both
|
|
15
|
+
* roots. The detail endpoint (GET /api/skills/:id) resolves in O(1) by
|
|
16
|
+
* constructing candidate paths directly from the slug (= directory name),
|
|
17
|
+
* without re-walking the tree.
|
|
18
|
+
*
|
|
19
|
+
* Markdown is served as-is — the SPA renders it client-side (no HTML
|
|
20
|
+
* injection here). The frontmatter block is stripped before delivery so the
|
|
21
|
+
* rendered view shows only the body.
|
|
22
|
+
*/
|
|
23
|
+
import * as fs from "node:fs/promises";
|
|
24
|
+
import * as path from "node:path";
|
|
25
|
+
import * as os from "node:os";
|
|
26
|
+
import { Router } from "express";
|
|
27
|
+
import rateLimit from "express-rate-limit";
|
|
28
|
+
/** Stable slug: only letters, digits, and hyphens/underscores. */
|
|
29
|
+
const SAFE_SLUG = /^[a-zA-Z0-9_-]+$/;
|
|
30
|
+
/**
|
|
31
|
+
* Build `<root>/<slug>/SKILL.md` and return it ONLY if the resolved path stays
|
|
32
|
+
* inside `root`. Two independent barriers against path traversal: (1) callers
|
|
33
|
+
* validate the slug with SAFE_SLUG, and (2) this containment check on the
|
|
34
|
+
* fully-resolved path — a defense-in-depth barrier that also makes the
|
|
35
|
+
* no-traversal guarantee legible to static analysis (the resolved child must
|
|
36
|
+
* sit under the resolved root + separator). Returns null if containment fails.
|
|
37
|
+
*/
|
|
38
|
+
function resolveSkillFileWithin(root, slug) {
|
|
39
|
+
const resolvedRoot = path.resolve(root);
|
|
40
|
+
const candidate = path.resolve(resolvedRoot, slug, "SKILL.md");
|
|
41
|
+
if (candidate !== path.join(resolvedRoot, slug, "SKILL.md") ||
|
|
42
|
+
!candidate.startsWith(resolvedRoot + path.sep)) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return candidate;
|
|
46
|
+
}
|
|
47
|
+
/** Parse the `---\n...\n---` YAML frontmatter block (simple key: value only). */
|
|
48
|
+
function parseFrontmatter(raw) {
|
|
49
|
+
const meta = {};
|
|
50
|
+
if (!raw.startsWith("---"))
|
|
51
|
+
return { meta, body: raw };
|
|
52
|
+
const end = raw.indexOf("\n---", 3);
|
|
53
|
+
if (end === -1)
|
|
54
|
+
return { meta, body: raw };
|
|
55
|
+
const block = raw.slice(3, end).trim();
|
|
56
|
+
for (const line of block.split("\n")) {
|
|
57
|
+
const colon = line.indexOf(":");
|
|
58
|
+
if (colon === -1)
|
|
59
|
+
continue;
|
|
60
|
+
const key = line.slice(0, colon).trim();
|
|
61
|
+
// Strip inline quotes and leading whitespace; handle multi-line by
|
|
62
|
+
// collapsing continuation lines (indented) into the value.
|
|
63
|
+
const value = line.slice(colon + 1).trim().replace(/^["']|["']$/g, "");
|
|
64
|
+
if (key)
|
|
65
|
+
meta[key] = value;
|
|
66
|
+
}
|
|
67
|
+
return { meta, body: raw.slice(end + 4).trimStart() };
|
|
68
|
+
}
|
|
69
|
+
/** Read and parse a SKILL.md file, returning null on any fs/parse error. */
|
|
70
|
+
async function readSkillFile(filePath, id, source) {
|
|
71
|
+
try {
|
|
72
|
+
const raw = await fs.readFile(filePath, "utf-8");
|
|
73
|
+
const { meta, body } = parseFrontmatter(raw);
|
|
74
|
+
return {
|
|
75
|
+
id,
|
|
76
|
+
name: meta.name ?? id,
|
|
77
|
+
description: meta.description ?? "",
|
|
78
|
+
source,
|
|
79
|
+
body,
|
|
80
|
+
filePath,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Scan node_modules/@sapiom/{pkg}/skills/{id}/SKILL.md, starting from the
|
|
89
|
+
* given root (defaults to the directory this module lives in, walking up to
|
|
90
|
+
* find the node_modules directory). Returns the discovered skills.
|
|
91
|
+
*/
|
|
92
|
+
async function scanPackageSkills(nodeModulesRoot) {
|
|
93
|
+
const nmRoot = nodeModulesRoot ?? findNodeModules();
|
|
94
|
+
const sapiomDir = path.join(nmRoot, "@sapiom");
|
|
95
|
+
const results = [];
|
|
96
|
+
let pkgDirs;
|
|
97
|
+
try {
|
|
98
|
+
pkgDirs = await fs.readdir(sapiomDir);
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
return results; // no @sapiom packages installed — gracefully empty
|
|
102
|
+
}
|
|
103
|
+
for (const pkg of pkgDirs) {
|
|
104
|
+
const skillsDir = path.join(sapiomDir, pkg, "skills");
|
|
105
|
+
let skillDirs;
|
|
106
|
+
try {
|
|
107
|
+
skillDirs = await fs.readdir(skillsDir);
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
continue; // package has no skills directory
|
|
111
|
+
}
|
|
112
|
+
for (const skillDir of skillDirs) {
|
|
113
|
+
const skillFile = path.join(skillsDir, skillDir, "SKILL.md");
|
|
114
|
+
const parsed = await readSkillFile(skillFile, skillDir, "package");
|
|
115
|
+
if (parsed)
|
|
116
|
+
results.push(parsed);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return results;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Resolve the node_modules directory for production use.
|
|
123
|
+
* The compiled module lives at dist/server/skills.js — going up three levels
|
|
124
|
+
* (dist/server → dist → package-root) lands at node_modules alongside the
|
|
125
|
+
* package's own package.json. Falls back to process.cwd() when import.meta.url
|
|
126
|
+
* is unavailable (non-ESM build).
|
|
127
|
+
*/
|
|
128
|
+
function findNodeModules() {
|
|
129
|
+
try {
|
|
130
|
+
// import.meta.url is the compiled file's own URL:
|
|
131
|
+
// file:///…/packages/harness/dist/server/skills.js
|
|
132
|
+
// Three dirname calls: dist/server → dist → package-root.
|
|
133
|
+
const here = new URL(import.meta.url).pathname;
|
|
134
|
+
return path.join(path.dirname(path.dirname(path.dirname(here))), "node_modules");
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return path.join(process.cwd(), "node_modules");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/** Scan ~/.claude/skills/{id}/SKILL.md. Returns discovered skills. */
|
|
141
|
+
async function scanUserSkills() {
|
|
142
|
+
const skillsDir = path.join(os.homedir(), ".claude", "skills");
|
|
143
|
+
const results = [];
|
|
144
|
+
let skillDirs;
|
|
145
|
+
try {
|
|
146
|
+
skillDirs = await fs.readdir(skillsDir);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
return results; // directory doesn't exist — gracefully empty
|
|
150
|
+
}
|
|
151
|
+
for (const skillDir of skillDirs) {
|
|
152
|
+
const skillFile = path.join(skillsDir, skillDir, "SKILL.md");
|
|
153
|
+
const parsed = await readSkillFile(skillFile, skillDir, "user");
|
|
154
|
+
if (parsed)
|
|
155
|
+
results.push(parsed);
|
|
156
|
+
}
|
|
157
|
+
return results;
|
|
158
|
+
}
|
|
159
|
+
export function createSkillsRouter(options = {}) {
|
|
160
|
+
const router = Router();
|
|
161
|
+
// These routes touch the filesystem (skill discovery + detail reads). The
|
|
162
|
+
// harness server is localhost-only and boot-token-gated (a single local
|
|
163
|
+
// user), so this ceiling is far above any real interactive flow and never
|
|
164
|
+
// fires in practice — it's a backstop that bounds a runaway/buggy client
|
|
165
|
+
// from hammering the FS, and the explicit rate-limit control on an
|
|
166
|
+
// FS-backed route surface.
|
|
167
|
+
router.use(rateLimit({
|
|
168
|
+
windowMs: 60000,
|
|
169
|
+
limit: 240,
|
|
170
|
+
standardHeaders: true,
|
|
171
|
+
legacyHeaders: false,
|
|
172
|
+
}));
|
|
173
|
+
/**
|
|
174
|
+
* GET /api/skills — list all discoverable skills with id, name, description,
|
|
175
|
+
* and source. Safe: no paths are exposed; ids are directory names.
|
|
176
|
+
*/
|
|
177
|
+
router.get("/api/skills", async (_req, res) => {
|
|
178
|
+
try {
|
|
179
|
+
const [pkgSkills, userSkills] = await Promise.all([
|
|
180
|
+
scanPackageSkills(options.nodeModulesRoot),
|
|
181
|
+
options.userSkillsRoot
|
|
182
|
+
? scanUserSkillsFromRoot(options.userSkillsRoot)
|
|
183
|
+
: scanUserSkills(),
|
|
184
|
+
]);
|
|
185
|
+
// Dedupe by id: user skills win over package skills (same id).
|
|
186
|
+
const byId = new Map();
|
|
187
|
+
for (const skill of [...pkgSkills, ...userSkills]) {
|
|
188
|
+
byId.set(skill.id, { id: skill.id, name: skill.name, description: skill.description, source: skill.source });
|
|
189
|
+
}
|
|
190
|
+
res.json(Array.from(byId.values()));
|
|
191
|
+
}
|
|
192
|
+
catch (err) {
|
|
193
|
+
res.status(500).json({ error: err.message });
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
/**
|
|
197
|
+
* GET /api/skills/:id — full detail (meta + markdown body) for a single
|
|
198
|
+
* skill. Path-traversal safe: the id must be a safe slug (letters, digits,
|
|
199
|
+
* hyphens, underscores only) — the slug IS the directory name, so we can
|
|
200
|
+
* resolve it in O(1) by stat/reading `<root>/<slug>/SKILL.md` across the
|
|
201
|
+
* two roots (user first, per collision rule) without a full directory walk.
|
|
202
|
+
*
|
|
203
|
+
* The slug regex + containment guard (SAFE_SLUG + the two fixed roots)
|
|
204
|
+
* ensure no traversal is possible — a slug can never contain a path separator.
|
|
205
|
+
*/
|
|
206
|
+
router.get("/api/skills/:id", async (req, res) => {
|
|
207
|
+
const { id } = req.params;
|
|
208
|
+
// Reject anything that isn't a safe slug up front — prevents any path-
|
|
209
|
+
// traversal attempt before filesystem access.
|
|
210
|
+
if (!id || !SAFE_SLUG.test(id)) {
|
|
211
|
+
res.status(404).json({ error: `Unknown skill '${id}'` });
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
try {
|
|
215
|
+
// O(1) resolution: the id is the directory name, so build the candidate
|
|
216
|
+
// paths directly through the containment barrier. User root first (user
|
|
217
|
+
// skills win on id collision).
|
|
218
|
+
const userRoot = options.userSkillsRoot ??
|
|
219
|
+
path.join(os.homedir(), ".claude", "skills");
|
|
220
|
+
const userSkillFile = resolveSkillFileWithin(userRoot, id);
|
|
221
|
+
// Try user skill first; fall through to package skills on null result.
|
|
222
|
+
let found = userSkillFile
|
|
223
|
+
? await readSkillFile(userSkillFile, id, "user")
|
|
224
|
+
: null;
|
|
225
|
+
if (!found) {
|
|
226
|
+
// Package skills: resolve the node_modules root and try each @sapiom
|
|
227
|
+
// package's skills directory for a matching id. Still O(packages) but
|
|
228
|
+
// avoids the full readdir of every skills subdirectory.
|
|
229
|
+
const nmRoot = options.nodeModulesRoot ?? findNodeModules();
|
|
230
|
+
const sapiomDir = path.join(nmRoot, "@sapiom");
|
|
231
|
+
let pkgDirs;
|
|
232
|
+
try {
|
|
233
|
+
pkgDirs = await import("node:fs/promises").then((fsp) => fsp.readdir(sapiomDir));
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
pkgDirs = [];
|
|
237
|
+
}
|
|
238
|
+
for (const pkg of pkgDirs) {
|
|
239
|
+
const candidate = resolveSkillFileWithin(path.join(sapiomDir, pkg, "skills"), id);
|
|
240
|
+
const parsed = candidate
|
|
241
|
+
? await readSkillFile(candidate, id, "package")
|
|
242
|
+
: null;
|
|
243
|
+
if (parsed) {
|
|
244
|
+
found = parsed;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
if (!found) {
|
|
250
|
+
res.status(404).json({ error: `Unknown skill '${id}'` });
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
const detail = {
|
|
254
|
+
id: found.id,
|
|
255
|
+
name: found.name,
|
|
256
|
+
description: found.description,
|
|
257
|
+
source: found.source,
|
|
258
|
+
body: found.body,
|
|
259
|
+
};
|
|
260
|
+
res.json(detail);
|
|
261
|
+
}
|
|
262
|
+
catch (err) {
|
|
263
|
+
res.status(500).json({ error: err.message });
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
return router;
|
|
267
|
+
}
|
|
268
|
+
/** Scan skills from a custom root (for testing). Same logic as scanUserSkills. */
|
|
269
|
+
async function scanUserSkillsFromRoot(root) {
|
|
270
|
+
const results = [];
|
|
271
|
+
let skillDirs;
|
|
272
|
+
try {
|
|
273
|
+
skillDirs = await fs.readdir(root);
|
|
274
|
+
}
|
|
275
|
+
catch {
|
|
276
|
+
return results;
|
|
277
|
+
}
|
|
278
|
+
for (const skillDir of skillDirs) {
|
|
279
|
+
const skillFile = path.join(root, skillDir, "SKILL.md");
|
|
280
|
+
const parsed = await readSkillFile(skillFile, skillDir, "user");
|
|
281
|
+
if (parsed)
|
|
282
|
+
results.push(parsed);
|
|
283
|
+
}
|
|
284
|
+
return results;
|
|
285
|
+
}
|
|
286
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/server/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;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CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QACxD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAChE,IAAI,MAAM;YAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -70,7 +70,18 @@ export declare const ENV: {
|
|
|
70
70
|
readonly sessionId: "SAPIOM_HARNESS_SESSION_ID";
|
|
71
71
|
readonly collectorUrl: "SAPIOM_COLLECTOR_URL";
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Every harness kind that can be spawned as a session — i.e. has a full
|
|
75
|
+
* runtime adapter (launch/resume/doctor/listPastSessions) and a real e2e
|
|
76
|
+
* suite. Both `HarnessKind` and the zod enum in server/rest.ts are derived
|
|
77
|
+
* from this tuple so they can never drift from each other.
|
|
78
|
+
*
|
|
79
|
+
* External-mode adapters (conductor) and scaffold adapters that haven't
|
|
80
|
+
* earned an e2e suite yet (pi, opencode) are deliberately absent: the
|
|
81
|
+
* picker and POST /sessions reject them at the validation layer.
|
|
82
|
+
*/
|
|
83
|
+
export declare const SPAWNABLE_HARNESS_KINDS: readonly ["claude-code", "codex"];
|
|
84
|
+
export type HarnessKind = (typeof SPAWNABLE_HARNESS_KINDS)[number];
|
|
74
85
|
export type SessionStatus = "starting" | "running" | "exited";
|
|
75
86
|
/** A harness session = one pty running one agent process in one directory. */
|
|
76
87
|
export interface HarnessSession {
|
|
@@ -139,6 +150,13 @@ export interface LaunchOpts {
|
|
|
139
150
|
mcpConfigFile?: string;
|
|
140
151
|
/** Absolute path to the generated settings file (hooks). Claude only. */
|
|
141
152
|
settingsFile?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Absolute path to a generated --plugin-dir directory. Currently used to
|
|
155
|
+
* inject Sapiom's bundled skills as session-scoped slash commands via
|
|
156
|
+
* claude-code's `--plugin-dir` flag. Adapters that don't support
|
|
157
|
+
* --plugin-dir (e.g. codex) silently ignore this field.
|
|
158
|
+
*/
|
|
159
|
+
pluginDir?: string;
|
|
142
160
|
/** Only consulted by `launchTask` — the one-shot prompt a headless
|
|
143
161
|
* background task runs, then exits. Unused by `launch`/`resume`. */
|
|
144
162
|
prompt?: string;
|
|
@@ -269,8 +287,42 @@ export type BusMessage = {
|
|
|
269
287
|
harnessSessionId: string;
|
|
270
288
|
at: string;
|
|
271
289
|
};
|
|
290
|
+
/** One entry in the adapter registry, as the SPA sees it (GET /api/harnesses). */
|
|
291
|
+
export interface HarnessEntry {
|
|
292
|
+
/** Stable adapter identifier — one of the known HarnessAdapterId values (e.g. "claude-code", "codex", "conductor"). */
|
|
293
|
+
id: string;
|
|
294
|
+
label: string;
|
|
295
|
+
/** Whether the harness is spawned by the harness server ("embedded") or managed by its own companion app ("external"). */
|
|
296
|
+
mode: "embedded" | "external";
|
|
297
|
+
/** True for adapters whose launch behaviour is not yet hardened by an end-to-end suite. */
|
|
298
|
+
experimental: boolean;
|
|
299
|
+
/** True when the adapter's binary is detected on PATH at request time. */
|
|
300
|
+
installed: boolean;
|
|
301
|
+
/** Per-agent copy-paste instructions for installing and configuring the Sapiom MCP server. */
|
|
302
|
+
installMcpPrompt: string;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Canonical UI event names. Dot-separated, source "harness", surface marker
|
|
306
|
+
* data.surface: "ui". These ride the same collector pipeline as hook events
|
|
307
|
+
* (local ndjson always; remote only when opted in), so seq/session dimensions
|
|
308
|
+
* and the analytics-core envelope are added server-side, not client-side.
|
|
309
|
+
* See the collector README section in packages/harness/src/core/collector/
|
|
310
|
+
* for the full surface-"ui" contract.
|
|
311
|
+
*/
|
|
312
|
+
export type UiEventName = "prompt.submitted" | "session.switched" | "macro.invoked" | "visualize.triggered" | "consent.changed" | "session.created" | "skill.viewed" | "skill.used" | "mcp.install";
|
|
313
|
+
export interface UiTrackRequest {
|
|
314
|
+
/** Dot-canonical event name — one of the UiEventName literals. */
|
|
315
|
+
event: UiEventName;
|
|
316
|
+
/** Arbitrary data payload; server stamps data.surface: "ui" automatically.
|
|
317
|
+
* Never include prompt text — this is UI-interaction metadata only. */
|
|
318
|
+
data?: Record<string, unknown>;
|
|
319
|
+
/** harnessSessionId to associate this event with (for seq/session dims).
|
|
320
|
+
* Optional: when omitted, the event gets a synthetic single-use session id.
|
|
321
|
+
*/
|
|
322
|
+
harnessSessionId?: string;
|
|
323
|
+
}
|
|
272
324
|
export declare const ANALYTICS_SCHEMA_VERSION = 1;
|
|
273
|
-
export type AnalyticsEventType = "session.start" | "prompt.submitted" | "tool.call" | "turn.completed" | "session.end";
|
|
325
|
+
export type AnalyticsEventType = "session.start" | "prompt.submitted" | "tool.call" | "turn.completed" | "session.end" | "session.switched" | "macro.invoked" | "visualize.triggered" | "consent.changed" | "session.created" | "skill.viewed" | "skill.used" | "mcp.install";
|
|
274
326
|
/**
|
|
275
327
|
* The normalized event — the shape that (with opt-in) is batched to the
|
|
276
328
|
* remote collector and always appended to events.ndjson locally.
|
|
@@ -367,6 +419,21 @@ export interface AppState {
|
|
|
367
419
|
userId: string | null;
|
|
368
420
|
organizationName: string | null;
|
|
369
421
|
telemetryOptIn: boolean;
|
|
422
|
+
/**
|
|
423
|
+
* How telemetry consent was determined at CLI boot. The UI uses this to
|
|
424
|
+
* decide whether to show the first-run notice: "default-silent" means the
|
|
425
|
+
* user never explicitly answered the Y/n prompt (e.g. non-TTY / CI), so
|
|
426
|
+
* we surface a gentle one-time indicator. Optional: omitted by callers that
|
|
427
|
+
* don't run the consent flow (tests, mocks — treated as "stored-explicit"
|
|
428
|
+
* by the UI, i.e. no notice).
|
|
429
|
+
*/
|
|
430
|
+
consentSource?: "env-forced-off" | "stored-explicit" | "prompted" | "default-silent";
|
|
431
|
+
/**
|
|
432
|
+
* When consentSource === "env-forced-off", which env var forced it off —
|
|
433
|
+
* rendered in the tracking indicator as "off (env)" with the var name.
|
|
434
|
+
* Null/absent otherwise.
|
|
435
|
+
*/
|
|
436
|
+
consentEnvReason?: string | null;
|
|
370
437
|
sessions: HarnessSession[];
|
|
371
438
|
workflows: WorkflowInfo[];
|
|
372
439
|
macros: MacroDef[];
|
|
@@ -406,6 +473,12 @@ export interface HarnessSettings {
|
|
|
406
473
|
telemetryOptIn: boolean;
|
|
407
474
|
/** Most-recently-used project directories, newest first. */
|
|
408
475
|
recentDirs: string[];
|
|
476
|
+
/**
|
|
477
|
+
* True once the user has dismissed the first-run telemetry notice
|
|
478
|
+
* (shown when consent was determined silently in a non-TTY environment).
|
|
479
|
+
* Persisted so the notice never appears again after the first dismiss.
|
|
480
|
+
*/
|
|
481
|
+
telemetryNoticeDismissed?: boolean;
|
|
409
482
|
}
|
|
410
483
|
export interface FsDirEntry {
|
|
411
484
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,iFAAiF;AACjF,eAAO,MAAM,YAAY,sBAAsB,CAAC;AAEhD,eAAO,MAAM,aAAa;IACxB,gEAAgE;;IAEhE,mDAAmD;;IAEnD,kDAAkD;;IAElD,0EAA0E;;IAE1E,sDAAsD;;IAEtD,6EAA6E;;IAE7E;;4EAEwE;;CAEhE,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C,eAAO,MAAM,YAAY,8BAA6B,CAAC;AAEvD;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,2BAA0B,CAAC;AAE1D;;;;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;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB;AAMD,8EAA8E;AAC9E,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,mCAAmC;IACnC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAMD;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EACF;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAClD;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;IACnC;;;;8BAI0B;OACxB;QAAE,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC;IAC9B,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAC;CACrC;AAED,MAAM,WAAW,eAAe;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/dist/shared/types.js
CHANGED
|
@@ -74,7 +74,18 @@ export const ENV = {
|
|
|
74
74
|
collectorUrl: "SAPIOM_COLLECTOR_URL",
|
|
75
75
|
};
|
|
76
76
|
// ---------------------------------------------------------------------------
|
|
77
|
-
//
|
|
77
|
+
// Sessions
|
|
78
78
|
// ---------------------------------------------------------------------------
|
|
79
|
+
/**
|
|
80
|
+
* Every harness kind that can be spawned as a session — i.e. has a full
|
|
81
|
+
* runtime adapter (launch/resume/doctor/listPastSessions) and a real e2e
|
|
82
|
+
* suite. Both `HarnessKind` and the zod enum in server/rest.ts are derived
|
|
83
|
+
* from this tuple so they can never drift from each other.
|
|
84
|
+
*
|
|
85
|
+
* External-mode adapters (conductor) and scaffold adapters that haven't
|
|
86
|
+
* earned an e2e suite yet (pi, opencode) are deliberately absent: the
|
|
87
|
+
* picker and POST /sessions reject them at the validation layer.
|
|
88
|
+
*/
|
|
89
|
+
export const SPAWNABLE_HARNESS_KINDS = ["claude-code", "codex"];
|
|
79
90
|
export const ANALYTICS_SCHEMA_VERSION = 1;
|
|
80
91
|
//# sourceMappingURL=types.js.map
|
package/dist/shared/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8EAA8E;AAC9E,+BAA+B;AAC/B,8EAA8E;AAE9E,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AAEjC,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,gEAAgE;IAChE,SAAS,EAAE,GAAG,YAAY,aAAa;IACvC,mDAAmD;IACnD,QAAQ,EAAE,GAAG,YAAY,gBAAgB;IACzC,kDAAkD;IAClD,SAAS,EAAE,GAAG,YAAY,iBAAiB;IAC3C,0EAA0E;IAC1E,MAAM,EAAE,GAAG,YAAY,gBAAgB;IACvC,sDAAsD;IACtD,QAAQ,EAAE,GAAG,YAAY,gBAAgB;IACzC,6EAA6E;IAC7E,SAAS,EAAE,GAAG,YAAY,YAAY;IACtC;;4EAEwE;IACxE,aAAa,EAAE,GAAG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,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,UAAU,aAAa,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,UAAU,UAAU,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,UAAU,QAAQ,CAAC;AAEtD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,8BAA8B,CAAC;AAEnE;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,SAAS,EAAE,2BAA2B;IACtC,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,sBAAsB;CAC5B,CAAC;AAEX,8EAA8E;AAC9E,WAAW;AACX,8EAA8E;AAE9E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,aAAa,EAAE,OAAO,CAAU,CAAC;AA2RzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
+
* https://github.com/chjj/term.js
|
|
5
|
+
* @license MIT
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
* THE SOFTWARE.
|
|
24
|
+
*
|
|
25
|
+
* Originally forked from (with the author's permission):
|
|
26
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
+
* http://bellard.org/jslinux/
|
|
28
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
+
* The original design remains. The terminal itself
|
|
30
|
+
* has been extended to include xterm CSI codes, among
|
|
31
|
+
* other features.
|
|
32
|
+
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}:root{--radius: 6px;--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;--font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--radius-sm: 2px;--radius-md: 4px;--radius-lg: 6px;--radius-xl: 10px;--radius-full: 9999px;--shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -2px rgb(0 0 0 / .1);--transition-fast: .15s cubic-bezier(.4, 0, .2, 1);--bg-0: #f3f4f6;--bg-1: #f5f5f5;--bg-2: #f5f5f5;--bg-3: #f5f5f5;--bg-hover: #e5e7eb;--border: #e5e5e5;--border-strong: #d4d4d8;--text: #1a1a1a;--text-dim: #737373;--text-faint: #a1a1aa;--accent: #05a9bc;--accent-hover: #048a9a;--accent-dim: rgba(5, 169, 188, .14);--accent-border: rgba(5, 169, 188, .3);--accent-foreground: #fafafa;--focus-ring: rgba(5, 169, 188, .5);--toggle-knob-off: #ffffff;--toggle-knob-on: #ffffff;--green: #05a9bc;--amber: #b45309;--red: #ef4444;--bg-warning: #fff8e6;--border-warning: #f5d06a;--text-warning: #a07000}[data-theme=dark]{--bg-0: #0f0f0f;--bg-1: #1a1a1a;--bg-2: #1a1a1a;--bg-3: #262626;--bg-hover: #262626;--border: #2e2e2e;--border-strong: #3a3a3a;--text: #fafafa;--text-dim: #a1a1aa;--text-faint: #71717a;--accent: #6be195;--accent-hover: #8bd4a6;--accent-dim: rgba(107, 225, 149, .16);--accent-border: rgba(107, 225, 149, .3);--accent-foreground: #000000;--focus-ring: rgba(107, 225, 149, .5);--toggle-knob-off: #fafafa;--toggle-knob-on: #000000;--green: #6be195;--amber: #f59e0b;--red: #f87171;--bg-warning: #2a2200;--border-warning: #5a4500;--text-warning: #e0a800}@keyframes pop-in{0%{opacity:.4;transform:scale(.96)}to{opacity:1;transform:scale(1)}}*{box-sizing:border-box}html,body,#root{height:100%;margin:0;overflow:hidden}body{background:var(--bg-0);color:var(--text);font:13px/1.45 var(--font-sans);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;cursor:pointer}input{font:inherit;color:inherit}.app-status{display:flex;align-items:center;justify-content:center;height:100%;color:var(--text-dim)}.app-status-error{color:var(--red)}.app-shell{display:flex;flex-direction:column;height:100vh}.brand-header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;height:40px;padding:0 12px;background:var(--bg-1);border-bottom:1px solid var(--border)}.brand-lockup{display:flex;align-items:center;gap:8px}.brand-mark{width:18px;height:18px}.brand-name{font-size:13px;font-weight:600;color:var(--text);letter-spacing:-.01em}.brand-divider{width:1px;height:14px;background:var(--border-strong)}.brand-product{font-size:13px;font-weight:500;color:var(--text-dim)}.brand-header-right{display:flex;align-items:center;gap:10px}.palette-trigger{display:flex;align-items:center;gap:5px;padding:4px 8px;background:var(--bg-2);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);color:var(--text-dim);font-size:11.5px;transition:background-color var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast)}.palette-trigger:hover{background:var(--bg-hover);color:var(--text)}.palette-trigger:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.palette-trigger-hint{color:var(--text-faint);font-family:var(--font-mono);font-size:10px}.theme-toggle{width:26px;height:26px;display:flex;align-items:center;justify-content:center;background:transparent;border:1px solid transparent;border-radius:var(--radius-md);color:var(--text-dim);transition:background-color var(--transition-fast),color var(--transition-fast)}[data-theme=light] .theme-toggle:hover{background:var(--accent);color:var(--accent-foreground)}[data-theme=dark] .theme-toggle:hover{background:var(--accent-dim);color:var(--text)}.theme-toggle:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring)}.brand-identity{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--text-dim)}.identity-dot{width:6px;height:6px;border-radius:50%;background:var(--text-faint)}.identity-dot[data-authenticated=true]{background:var(--green)}.telemetry-chip{display:flex;align-items:center;gap:5px;padding:3px 7px;background:transparent;border:1px solid transparent;border-radius:var(--radius-md);color:var(--text-faint);font-size:11px;cursor:pointer;transition:background-color var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast)}.telemetry-chip:hover{background:var(--bg-2);border-color:var(--border);color:var(--text-dim)}.telemetry-chip:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring)}.telemetry-chip-dot{width:5px;height:5px;border-radius:50%;flex-shrink:0;background:var(--text-faint);transition:background-color var(--transition-fast)}.telemetry-chip[data-state=on] .telemetry-chip-dot{background:var(--accent)}.telemetry-chip[data-state=on]{color:var(--text-dim)}.telemetry-chip[data-state=off] .telemetry-chip-dot,.telemetry-chip[data-state=env] .telemetry-chip-dot{background:var(--text-faint)}.telemetry-chip-label{font-family:var(--font-mono);letter-spacing:0}.telemetry-notice{display:flex;align-items:flex-start;gap:10px;padding:8px 14px;background:var(--accent-dim);border-bottom:1px solid var(--accent-border);font-size:12px;color:var(--text-dim)}.telemetry-notice-body{flex:1;min-width:0}.telemetry-notice-text{margin:0;line-height:1.5}.telemetry-notice-settings-link{background:none;border:none;padding:0;color:var(--accent);font-size:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:2px}.telemetry-notice-settings-link:hover{color:var(--accent-hover)}.telemetry-notice-dismiss{flex-shrink:0;background:none;border:none;color:var(--text-faint);font-size:16px;line-height:1;cursor:pointer;padding:0 2px;transition:color var(--transition-fast)}.telemetry-notice-dismiss:hover{color:var(--text)}.telemetry-notice-dismiss:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring)}.app{position:relative;display:grid;grid-template-columns:minmax(180px,220px) 32px minmax(360px,1fr) minmax(280px,420px);flex:1;min-height:0;overflow-x:auto;overflow-y:hidden}.pane-resize-handle{position:absolute;top:0;bottom:0;width:7px;cursor:col-resize;z-index:20;touch-action:none}.pane-resize-handle:hover,.pane-resize-handle:active{background:var(--accent-dim)}.pane-resize-handle-rail{transform:translate(-50%)}.pane-resize-handle-canvas{transform:translate(50%)}.workflow-action-strip-col{position:relative;border-left:1px solid var(--border);background:var(--bg-1)}.workflow-action-strip-notch{position:absolute;left:-1px;width:5px;background:var(--accent-dim);transition:top .15s ease;pointer-events:none}.workflow-action-strip{position:absolute;left:3px;width:26px;z-index:10;display:flex;flex-direction:column;gap:2px;padding:4px 3px;background:var(--bg-2);border:1px solid var(--border-strong);border-left:none;border-radius:0 8px 8px;transition:top .15s ease,width .15s ease,box-shadow .15s ease}.workflow-action-strip:hover,.workflow-action-strip:focus-within{width:200px;box-shadow:var(--shadow-lg)}.strip-item{display:flex;align-items:center;width:100%;padding:5px 3px;border:none;background:transparent;border-radius:6px;color:var(--text-dim)}.strip-item:hover:not(:disabled){background:var(--bg-hover);color:var(--text)}.strip-item:disabled{color:var(--text-faint);cursor:not-allowed}.strip-item:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.strip-item-icon{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:20px}.strip-item-text{display:flex;flex-direction:column;max-width:0;opacity:0;overflow:hidden;white-space:nowrap;transition:max-width .15s ease,opacity .1s ease}.workflow-action-strip:hover .strip-item-text,.workflow-action-strip:focus-within .strip-item-text{max-width:160px;opacity:1;margin-left:6px}.strip-item-label{font-size:12px;text-align:left}.strip-item-reason{font-size:9.5px;color:var(--text-faint);white-space:normal;text-align:left}.center-pane{display:flex;flex-direction:column;min-width:0;min-height:0;border-left:1px solid var(--border);border-right:1px solid var(--border)}.rail{display:flex;flex-direction:column;background:var(--bg-1);min-width:0}.rail-workflows{padding:10px 8px}.rail-header{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint);padding:4px 6px 8px}.rail-list{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:1px}.rail-empty{color:var(--text-faint);padding:6px;font-size:12px}.workspace-group{margin-bottom:10px}.workspace-group-header{display:flex;align-items:center;gap:5px;padding:4px 6px;font-size:10.5px;font-weight:600;color:var(--text-faint);text-transform:uppercase;letter-spacing:.04em}.workspace-group.is-active .workspace-group-header{color:var(--accent)}.workspace-group-empty{padding:2px 8px 4px;color:var(--text-faint);font-size:11px;font-style:italic}.workflow-item{display:flex;align-items:center;border-radius:var(--radius);color:var(--text-dim)}.workflow-item:hover{background:var(--bg-hover);color:var(--text)}.workflow-item.is-selected{background:var(--accent-dim);color:var(--text);margin-right:-8px;border-radius:var(--radius) 0 0 var(--radius)}.workflow-item-trigger{flex:1;min-width:0;display:flex;align-items:center;gap:6px;padding:6px 4px 6px 8px;border:none;background:transparent;color:inherit;text-align:left}.workflow-caret{color:var(--text-faint);font-size:10px}.workflow-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workflow-dot{width:6px;height:6px;border-radius:50%;background:var(--green);flex:0 0 auto}.workflow-dot-pinned{position:relative;margin-left:auto}.workflow-dot-pinned:after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--bg-3);border:1px solid var(--border-strong);color:var(--text);padding:4px 8px;border-radius:4px;font-size:11px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .12s ease;box-shadow:0 4px 12px #0006;z-index:30}.workflow-dot-pinned:hover:after{opacity:1}.connect-trigger{margin-top:8px;border:1px dashed var(--border-strong);background:transparent;color:var(--text-faint);border-radius:var(--radius);padding:6px 8px;text-align:left;font-size:12px}.connect-trigger:hover{color:var(--text-dim);border-color:var(--text-faint)}.connect-form{margin-top:8px;display:flex;flex-direction:column;gap:6px}.connect-input{background:var(--bg-2);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);padding:6px 8px;color:var(--text);font-size:12px;transition:border-color var(--transition-fast)}.connect-input:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.connect-error{color:var(--red);font-size:11px}.connect-actions{display:flex;justify-content:flex-end;gap:6px}.macro-icon-btn{position:relative;width:26px;height:26px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;border:1px solid transparent;background:transparent;border-radius:var(--radius-md);color:var(--text-dim);transition:background-color var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast)}.macro-icon-btn:hover:not(:disabled){background:var(--bg-hover);border-color:var(--border-strong);color:var(--text)}.macro-icon-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring)}.macro-icon-btn:disabled{color:var(--text-faint);cursor:not-allowed;opacity:.5}.macro-icon-btn:after,.canvas-visualize-cta:after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--bg-3);border:1px solid var(--border-strong);color:var(--text);padding:4px 8px;border-radius:4px;font-size:11px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .12s ease;box-shadow:0 4px 12px #0006;z-index:30}.macro-icon-btn:hover:after,.macro-icon-btn:focus-visible:after,.canvas-visualize-cta:hover:after,.canvas-visualize-cta:focus-visible:after{opacity:1}.session-bar{display:flex;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid var(--border);background:var(--bg-1);position:relative}.session-tabs{display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:thin}.session-tab{position:relative;display:flex;align-items:center;gap:6px;flex:0 0 auto;max-width:220px;padding:5px 10px;background:var(--bg-2);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);color:var(--text-dim);transition:border-color var(--transition-fast),background-color var(--transition-fast),color var(--transition-fast)}.session-tab:hover{border-color:var(--accent);color:var(--text)}.session-tab:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.session-tab.is-active{background:var(--accent-dim);border-color:var(--accent);color:var(--text)}.session-tab-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.session-tab-busy{width:6px;height:6px;border-radius:50%;flex:0 0 auto;background:var(--accent);animation:session-tab-busy-pulse 1.2s ease-in-out infinite}@keyframes session-tab-busy-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1.15)}}.session-tab-add{display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;background:transparent;border:1px dashed var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);color:var(--text-dim);transition:border-color var(--transition-fast),background-color var(--transition-fast),color var(--transition-fast)}[data-theme=light] .session-tab-add:hover{background:var(--accent);border-color:var(--accent);border-style:solid;color:var(--accent-foreground)}[data-theme=dark] .session-tab-add:hover{border-color:var(--accent);color:var(--text)}.session-tab-add:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.session-history-wrap{position:relative;flex:0 0 auto}.session-history-trigger{display:flex;align-items:center;gap:4px;width:30px;height:30px;justify-content:center;border:1px solid var(--border-strong);background:var(--bg-2);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);color:var(--text-dim);position:relative;transition:background-color var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast)}[data-theme=light] .session-history-trigger:hover{background:var(--accent);border-color:var(--accent);color:var(--accent-foreground)}[data-theme=dark] .session-history-trigger:hover{background:var(--bg-hover);color:var(--text)}.session-history-trigger:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.session-history-badge{position:absolute;top:-5px;right:-5px;min-width:14px;height:14px;padding:0 3px;border-radius:var(--radius-full);background:var(--accent);color:var(--accent-foreground);font-size:9px;font-weight:700;line-height:14px;text-align:center}.session-workflow-chip{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:2px 8px;border-radius:var(--radius-md);background:var(--accent-dim);border:1px solid var(--accent-border);color:var(--accent);font-size:10.5px;font-weight:500}.session-dot{width:7px;height:7px;border-radius:50%;flex:0 0 auto;background:var(--text-faint)}.session-dot[data-status=running]{background:var(--green)}.session-dot[data-status=starting]{background:var(--amber)}.session-dot[data-status=exited]{background:var(--text-faint)}.session-dropdown-menu{position:absolute;top:calc(100% + 4px);right:0;width:320px;background:var(--bg-2);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:20;max-height:360px;overflow-y:auto;padding:6px;animation:pop-in var(--transition-fast) ease-out}.session-dropdown-section{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint);padding:6px 6px 4px}.session-dropdown-empty{color:var(--text-faint);font-size:12px;padding:4px 6px 8px}.session-dropdown-item{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;padding:6px 8px;border:none;background:transparent;border-radius:var(--radius-sm);text-align:left;transition:background-color var(--transition-fast)}.session-dropdown-item:hover,.session-dropdown-item.is-selected{background:var(--accent)}.session-item-title{font-size:12px;color:var(--text)}.session-item-cwd,.session-item-meta{font-size:10.5px;color:var(--text-faint)}.session-dropdown-item:hover .session-item-title,.session-dropdown-item.is-selected .session-item-title,.session-dropdown-item:hover .session-item-cwd,.session-dropdown-item.is-selected .session-item-cwd,.session-dropdown-item:hover .session-item-meta,.session-dropdown-item.is-selected .session-item-meta{color:var(--accent-foreground)}.settings-wrap{position:relative}.gear-btn{width:30px;height:30px;display:flex;align-items:center;justify-content:center;border:1px solid var(--border-strong);background:var(--bg-2);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);color:var(--text-dim);transition:background-color var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast)}[data-theme=light] .gear-btn:hover{background:var(--accent);border-color:var(--accent);color:var(--accent-foreground)}[data-theme=dark] .gear-btn:hover{background:var(--bg-hover);color:var(--text)}.gear-btn:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.settings-popover{position:absolute;top:calc(100% + 6px);right:0;width:280px;background:var(--bg-2);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-md);padding:16px;z-index:20;animation:pop-in var(--transition-fast) ease-out}.settings-identity{font-size:12px;font-weight:600;color:var(--text);padding-bottom:10px;margin-bottom:10px;border-bottom:1px solid var(--border)}.settings-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--text-dim)}.toggle-switch{flex:0 0 auto;width:34px;height:20px;border-radius:var(--radius-full);background:var(--bg-3);border:1px solid var(--border-strong);position:relative;padding:0;transition:background-color var(--transition-fast)}.toggle-switch.is-on{background:var(--accent);border-color:var(--accent)}.toggle-switch:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.toggle-switch:disabled{opacity:.6;cursor:not-allowed}.toggle-knob{position:absolute;top:1px;left:1px;width:16px;height:16px;border-radius:50%;background:var(--toggle-knob-off);transition:transform var(--transition-fast)}.toggle-switch.is-on .toggle-knob{background:var(--toggle-knob-on);transform:translate(14px)}.settings-note{margin:10px 0 12px;font-size:11px;line-height:1.5;color:var(--text-faint)}.settings-note code{color:var(--text-dim);font-family:var(--font-mono);font-size:10.5px}.settings-close{width:100%;text-align:center}.terminal-slot{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--bg-0)}.terminal-slot>.harness-terminal{flex:1;min-height:0}.terminal-placeholder,.terminal-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:var(--text-faint);font-family:var(--font-mono);font-size:12px}.terminal-placeholder-session{color:var(--text-faint);font-size:11px}.welcome-panel{height:100%;display:flex;align-items:center;justify-content:center;padding:24px;overflow-y:auto}.welcome-card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;width:460px;max-width:100%;padding:28px;background:var(--bg-2);border:1px solid var(--border-strong);border-radius:var(--radius-xl);box-shadow:var(--shadow-sm)}.welcome-eyebrow{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--accent)}.welcome-title{margin:0;font-size:17px;font-weight:600;letter-spacing:-.01em;color:var(--text)}.welcome-intro{margin:0;font-size:12.5px;line-height:1.6;color:var(--text-dim)}.welcome-actions{display:flex;gap:8px;margin-top:4px}.welcome-action{padding:8px 14px;font-size:12.5px}.welcome-sample-note{margin:0;font-size:11px;line-height:1.5;color:var(--text-faint)}.welcome-sample-note code{font-family:var(--font-mono);font-size:10.5px;color:var(--text-dim)}.welcome-error{font-size:11.5px;color:var(--red)}.welcome-hints{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:6px;padding-top:14px;border-top:1px solid var(--border);align-self:stretch}.welcome-hints-label{font-size:11px;color:var(--text-faint)}.welcome-hint-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:var(--radius-md);background:var(--accent-dim);border:1px solid var(--accent-border);color:var(--accent);font-size:10.5px;font-weight:500;white-space:nowrap}.welcome-hints-kbd{font-size:11px;color:var(--text-faint)}.welcome-hints-kbd kbd{font-family:var(--font-mono);font-size:10px;color:var(--text-dim);padding:1px 5px;background:var(--bg-1);border:1px solid var(--border-strong);border-radius:var(--radius-sm);box-shadow:var(--shadow-xs)}.welcome-dismiss{align-self:flex-end;margin-top:2px;padding:2px 4px;border:none;background:transparent;color:var(--text-faint);font-size:11px;border-radius:var(--radius-sm);transition:color var(--transition-fast)}.welcome-dismiss:hover{color:var(--text-dim);text-decoration:underline}.welcome-dismiss:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring)}.dead-session-pane{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:24px;text-align:center}.dead-session-title{color:var(--text);font-size:13px;font-weight:600}.dead-session-meta{color:var(--text-faint);font-size:11.5px;font-family:var(--font-mono);margin-bottom:6px}.dead-session-actions{display:flex;gap:8px}.dead-session-resume-reason{color:var(--text-faint);font-size:11px;max-width:300px;line-height:1.4;margin-top:4px}.canvas-pane{display:flex;flex-direction:column;background:var(--bg-1);min-width:0}.workflow-actions-header{display:flex;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid var(--border);background:var(--bg-2)}.workflow-actions-name{font-size:12px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.canvas-refresh-btn{padding-left:8px;border-left:1px solid var(--border);border-radius:0}.canvas-frame-wrap{position:relative;flex:1;display:flex;min-height:0}.canvas-iframe{flex:1;width:100%;border:none;background:#fff}.canvas-loading{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--text-faint)}.canvas-loading--overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;background:var(--bg-1)}.canvas-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;padding:24px;color:var(--text-faint);font-size:12px;line-height:1.6}.canvas-empty code{color:var(--text-dim);font-family:var(--font-mono);font-size:11px}.canvas-empty-hint{max-width:320px;color:var(--text-faint);font-size:11px}.canvas-visualize-cta{position:relative;display:flex;align-items:center;gap:6px;margin:4px 0}.canvas-task-activity,.canvas-task-failed{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:24px;color:var(--text-dim);font-size:12px;line-height:1.6}.canvas-task-activity--overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;background:color-mix(in srgb,var(--bg-1) 85%,transparent);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.canvas-task-title{display:flex;align-items:center;gap:8px;color:var(--text);font-weight:500}.canvas-task-spinner{width:8px;height:8px;border-radius:50%;flex:0 0 auto;background:var(--accent);animation:session-tab-busy-pulse 1.2s ease-in-out infinite}.canvas-task-lines{list-style:none;margin:0;padding:0;max-width:340px;width:100%;display:flex;flex-direction:column;gap:2px;font-family:var(--font-mono);font-size:11px;text-align:left;color:var(--text-faint)}.canvas-task-lines li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.canvas-task-lines li:last-child{color:var(--text-dim)}.canvas-task-error{max-width:340px;max-height:160px;width:100%;overflow:auto;margin:0;padding:8px 10px;text-align:left;font-family:var(--font-mono);font-size:11px;line-height:1.5;white-space:pre-wrap;word-break:break-word;color:var(--text-faint);background:var(--bg-inset, rgba(128, 128, 128, .08));border:1px solid var(--border);border-radius:var(--radius-md)}.canvas-task-actions{display:flex;align-items:center;gap:8px}.btn-ghost{background:transparent;border:1px solid var(--border-strong);color:var(--text-dim);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);padding:5px 10px;font-size:12px;font-weight:500;transition:background-color var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast)}[data-theme=light] .btn-ghost:hover:not(:disabled){background:var(--accent);border-color:var(--accent);color:var(--accent-foreground)}[data-theme=dark] .btn-ghost:hover:not(:disabled){color:var(--text);border-color:var(--text-faint)}.btn-ghost:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.btn-primary{background:var(--accent);border:1px solid transparent;color:var(--accent-foreground);font-weight:500;border-radius:var(--radius-md);box-shadow:var(--shadow-xs);padding:5px 10px;font-size:12px;transition:background-color var(--transition-fast)}.btn-primary:hover:not(:disabled){background:var(--accent-hover)}.btn-primary:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring)}.btn-ghost:disabled,.btn-primary:disabled{opacity:.5;cursor:not-allowed}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:100;animation:fade-in var(--transition-fast) ease-out}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.modal{background:var(--bg-2);border:1px solid var(--border-strong);border-radius:var(--radius-lg);padding:24px;width:380px;max-width:calc(100vw - 32px);box-shadow:var(--shadow-lg);animation:pop-in var(--transition-fast) ease-out}.command-palette{width:480px;padding:0;overflow:hidden}.command-palette-input{width:100%;padding:14px 16px;border:none;border-bottom:1px solid var(--border);background:transparent;color:var(--text);font-size:14px;transition:border-color var(--transition-fast)}.command-palette-input:focus{outline:none;border-bottom-color:var(--accent)}.command-palette-list{max-height:320px;overflow-y:auto;padding:6px}.command-palette-empty{padding:12px 10px;color:var(--text-faint);font-size:12px}.command-palette-item{display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-dim);text-align:left;transition:background-color var(--transition-fast)}.command-palette-item.is-selected{background:var(--accent);color:var(--accent-foreground)}.command-palette-item-label{font-size:12.5px;color:var(--text);flex:0 0 auto;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.command-palette-item-meta{font-size:11px;color:var(--text-faint);font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.command-palette-item.is-selected .command-palette-item-label,.command-palette-item.is-selected .command-palette-item-meta{color:var(--accent-foreground)}.modal-header{font-size:13px;font-weight:600;padding-bottom:16px;margin-bottom:12px;border-bottom:1px solid var(--border)}.modal-label{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint);margin:10px 0 4px}.modal-input{width:100%;background:var(--bg-3);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);padding:7px 9px;color:var(--text);font-size:12.5px;transition:border-color var(--transition-fast)}.modal-input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.modal-error{color:var(--red);font-size:11.5px;margin-top:8px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;padding-top:16px;border-top:1px solid var(--border)}.recent-dirs{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.recent-dir-chip{background:var(--bg-3);border:1px solid var(--border-strong);color:var(--text-dim);border-radius:var(--radius-md);padding:3px 9px;font-size:10.5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:color var(--transition-fast),border-color var(--transition-fast)}.recent-dir-chip:hover{color:var(--text);border-color:var(--accent)}.recent-dir-chip:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.harness-picker{display:flex;gap:6px}.harness-option{flex:1;padding:8px;background:var(--bg-3);border:1px solid var(--border-strong);border-radius:var(--radius-md);color:var(--text-dim);font-size:12px;transition:background-color var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast)}.harness-option.is-selected{border-color:var(--accent);color:var(--text);background:var(--accent-dim)}.harness-option:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.modal-new-session{width:420px}.dir-picker-inputrow{display:flex;gap:6px}.dir-picker-up{flex:0 0 auto;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:var(--bg-3);border:1px solid var(--border-strong);border-radius:var(--radius-md);box-shadow:var(--shadow-xs);color:var(--text-dim);transition:background-color var(--transition-fast),border-color var(--transition-fast),color var(--transition-fast)}[data-theme=light] .dir-picker-up:hover:not(:disabled){background:var(--accent);border-color:var(--accent);color:var(--accent-foreground)}[data-theme=dark] .dir-picker-up:hover:not(:disabled){color:var(--text);border-color:var(--accent)}.dir-picker-up:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}.dir-picker-up:disabled{opacity:.4;cursor:not-allowed}.dir-picker-input{flex:1;font-family:var(--font-mono)}.dir-picker-listing{margin-top:8px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-3);max-height:150px;overflow-y:auto}.dir-picker-path{position:sticky;top:0;padding:5px 9px;font-size:10px;font-family:var(--font-mono);color:var(--text-faint);background:var(--bg-3);border-bottom:1px solid var(--border)}.dir-picker-empty{padding:8px 9px;font-size:11.5px;color:var(--text-faint)}.dir-picker-item{display:flex;align-items:center;gap:6px;width:100%;padding:6px 9px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-dim);font-size:12px;text-align:left;transition:background-color var(--transition-fast)}.dir-picker-item:hover{background:var(--accent);color:var(--accent-foreground)}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%);display:flex;align-items:center;gap:10px;max-width:480px;padding:10px 14px;background:var(--bg-2);border:1px solid var(--border-strong);border-left:3px solid var(--red);border-radius:var(--radius-md);box-shadow:var(--shadow-md);z-index:100;animation:pop-in var(--transition-fast) ease-out}.toast-message{color:var(--text);font-size:12.5px;line-height:1.4}.toast-dismiss{border:none;background:transparent;color:var(--text-faint);font-size:16px;line-height:1;cursor:pointer;padding:0 2px;border-radius:var(--radius-sm);transition:color var(--transition-fast)}.toast-dismiss:hover{color:var(--text)}.toast-dismiss:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring)}.right-pane{display:flex;flex-direction:column;background:var(--bg-1);min-width:0;min-height:0;overflow:hidden}.right-pane-tabs{display:flex;align-items:center;gap:3px;flex-shrink:0;padding:5px 8px;border-bottom:1px solid var(--border);background:var(--bg-2)}.right-pane-tab{padding:3px 10px;font-size:11.5px;font-weight:500;color:var(--text-faint);background:transparent;border:1px solid transparent;border-radius:var(--radius-md);cursor:pointer;transition:background-color var(--transition-fast),color var(--transition-fast),border-color var(--transition-fast)}.right-pane-tab:hover{color:var(--text-dim);background:var(--bg-hover)}.right-pane-tab.is-active{color:var(--text);background:var(--bg-1);border-color:var(--border-strong);box-shadow:var(--shadow-xs)}.right-pane-tab:focus-visible{outline:none;box-shadow:0 0 0 3px var(--focus-ring)}.right-pane-panel{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.right-pane-panel.is-hidden{display:none}.right-pane-panel>.canvas-pane,.right-pane-panel>.rail-skills{flex:1;min-height:0}.rail-skills{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:0}.rail-body{flex:1;overflow-y:auto;min-height:0}.skills-list{display:flex;flex-direction:column;padding:6px 4px;gap:2px}.skills-group{margin-bottom:8px}.skills-group-header{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint);padding:4px 6px}.skill-card{display:flex;flex-direction:column;align-items:flex-start;width:100%;padding:7px 8px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--text-dim);text-align:left;cursor:pointer;transition:background-color var(--transition-fast)}.skill-card:hover{background:var(--bg-hover);color:var(--text)}.skill-card:focus-visible{outline:none;box-shadow:0 0 0 2px var(--focus-ring)}.skill-card-name{font-size:12px;font-weight:500;color:var(--text);margin-bottom:2px}.skill-card-desc{font-size:11px;color:var(--text-faint);line-height:1.35;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.skills-loading,.skills-error,.skills-empty{padding:12px 10px;font-size:12px;color:var(--text-faint)}.skills-error{color:var(--red)}.skill-detail{display:flex;flex-direction:column;height:100%;min-height:0}.skill-detail-header{display:flex;align-items:center;gap:6px;padding:8px;border-bottom:1px solid var(--border);flex-shrink:0}.skill-detail-name{flex:1;min-width:0;font-size:12px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-back{flex-shrink:0}.skill-source-badge{flex-shrink:0;font-size:9.5px;padding:1px 5px;border-radius:var(--radius-full);background:var(--bg-hover);color:var(--text-faint)}.skill-detail-body{flex:1;overflow-y:auto;padding:10px 10px 6px;min-height:0}.skill-detail-body{font-size:12px;line-height:1.5;color:var(--text-dim)}.skill-detail-body .chat-heading{color:var(--text);margin:8px 0 4px}.skill-detail-body h1.chat-heading{font-size:14px;font-weight:700;margin:0 0 8px}.skill-detail-body h2.chat-heading{font-size:12.5px;font-weight:600;margin:10px 0 6px}.skill-detail-body h3.chat-heading{font-size:12px;font-weight:600}.skill-detail-body .chat-paragraph{margin:0 0 8px;color:var(--text-dim)}.skill-detail-body .chat-code-block{font-size:11px;margin:6px 0}.skill-detail-body .chat-list{margin:0 0 8px;padding-left:18px;color:var(--text-dim)}.skill-detail-body .chat-list li{margin-bottom:2px}.skill-detail-body .chat-inline-code{font-size:10.5px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#a1a1aabf;border-radius:var(--radius-sm)}::-webkit-scrollbar-thumb:hover{background:#a1a1aae6}*{scrollbar-width:thin;scrollbar-color:rgba(161,161,170,.75) transparent}
|