vibe-coding-master 0.0.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/LICENSE +201 -0
- package/README.md +226 -0
- package/dist/backend/adapters/claude-adapter.js +38 -0
- package/dist/backend/adapters/command-runner.js +33 -0
- package/dist/backend/adapters/filesystem.js +60 -0
- package/dist/backend/adapters/git-adapter.js +33 -0
- package/dist/backend/api/artifact-routes.js +109 -0
- package/dist/backend/api/message-routes.js +90 -0
- package/dist/backend/api/project-routes.js +17 -0
- package/dist/backend/api/session-routes.js +64 -0
- package/dist/backend/api/task-routes.js +30 -0
- package/dist/backend/errors.js +29 -0
- package/dist/backend/runtime/node-pty-runtime.js +162 -0
- package/dist/backend/runtime/session-registry.js +36 -0
- package/dist/backend/runtime/terminal-runtime.js +1 -0
- package/dist/backend/server.js +159 -0
- package/dist/backend/services/artifact-service.js +170 -0
- package/dist/backend/services/command-dispatcher.js +37 -0
- package/dist/backend/services/message-service.js +217 -0
- package/dist/backend/services/project-service.js +71 -0
- package/dist/backend/services/session-service.js +221 -0
- package/dist/backend/services/status-service.js +21 -0
- package/dist/backend/services/task-service.js +88 -0
- package/dist/backend/templates/handoff.js +76 -0
- package/dist/backend/templates/message-envelope.js +27 -0
- package/dist/backend/templates/role-command.js +21 -0
- package/dist/backend/templates/role-messaging-context.js +44 -0
- package/dist/backend/ws/terminal-ws.js +60 -0
- package/dist/cli/vcmctl.js +141 -0
- package/dist/main.js +63 -0
- package/dist/shared/constants.js +45 -0
- package/dist/shared/types/api.js +1 -0
- package/dist/shared/types/artifact.js +1 -0
- package/dist/shared/types/message.js +1 -0
- package/dist/shared/types/project.js +1 -0
- package/dist/shared/types/role.js +1 -0
- package/dist/shared/types/session.js +1 -0
- package/dist/shared/types/task.js +1 -0
- package/dist/shared/types/terminal.js +1 -0
- package/dist/shared/validation/artifact-check.js +64 -0
- package/dist/shared/validation/slug-check.js +22 -0
- package/dist-frontend/assets/index-Bah6k-Ix.css +32 -0
- package/dist-frontend/assets/index-EMaQuIB6.js +58 -0
- package/dist-frontend/index.html +13 -0
- package/docs/cc-best-practices.md +2142 -0
- package/docs/product-design.md +1597 -0
- package/docs/v1-architecture-design.md +1431 -0
- package/docs/v1-implementation-plan.md +1949 -0
- package/docs/v1-message-bus-orchestration-design.md +534 -0
- package/package.json +60 -0
- package/scripts/clean-build.mjs +12 -0
- package/scripts/fix-node-pty-spawn-helper.mjs +31 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "node:fs/promises";
|
|
3
|
+
async function main(argv = process.argv.slice(2)) {
|
|
4
|
+
const [command, ...rest] = argv;
|
|
5
|
+
if (!command || command === "--help" || command === "-h") {
|
|
6
|
+
printHelp();
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (command === "send") {
|
|
10
|
+
const options = parseOptions(rest);
|
|
11
|
+
await sendMessage({
|
|
12
|
+
fromRole: getEnvRole(),
|
|
13
|
+
toRole: requireOption(options.to, "--to"),
|
|
14
|
+
type: options.type ?? "task",
|
|
15
|
+
body: await resolveBody(options),
|
|
16
|
+
artifactRefs: options.artifactRefs
|
|
17
|
+
});
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (command === "reply" || command === "result") {
|
|
21
|
+
const options = parseOptions(rest);
|
|
22
|
+
await sendMessage({
|
|
23
|
+
fromRole: getEnvRole(),
|
|
24
|
+
toRole: "project-manager",
|
|
25
|
+
type: command === "result" ? "result" : options.type ?? "question",
|
|
26
|
+
body: await resolveBody(options),
|
|
27
|
+
artifactRefs: options.artifactRefs
|
|
28
|
+
});
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (command === "inbox") {
|
|
32
|
+
const response = await fetchJson(`${getApiUrl()}/api/tasks/${encodeURIComponent(getTaskSlug())}/messages`);
|
|
33
|
+
console.log(JSON.stringify(response, null, 2));
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (command === "ready") {
|
|
37
|
+
console.log("ready: VCM readiness signaling is planned for a later phase.");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
throw new Error(`Unknown vcmctl command: ${command}`);
|
|
41
|
+
}
|
|
42
|
+
async function sendMessage(input) {
|
|
43
|
+
const result = await fetchJson(`${getApiUrl()}/api/tasks/${encodeURIComponent(getTaskSlug())}/messages`, {
|
|
44
|
+
method: "POST",
|
|
45
|
+
body: JSON.stringify(input),
|
|
46
|
+
headers: {
|
|
47
|
+
"content-type": "application/json"
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
console.log(JSON.stringify(result, null, 2));
|
|
51
|
+
}
|
|
52
|
+
function parseOptions(args) {
|
|
53
|
+
const options = {
|
|
54
|
+
artifactRefs: []
|
|
55
|
+
};
|
|
56
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
57
|
+
const arg = args[index];
|
|
58
|
+
if (arg === "--to") {
|
|
59
|
+
options.to = requireValue(args, index += 1);
|
|
60
|
+
}
|
|
61
|
+
else if (arg === "--type") {
|
|
62
|
+
options.type = requireValue(args, index += 1);
|
|
63
|
+
}
|
|
64
|
+
else if (arg === "--body") {
|
|
65
|
+
options.body = requireValue(args, index += 1);
|
|
66
|
+
}
|
|
67
|
+
else if (arg === "--body-file") {
|
|
68
|
+
options.bodyFile = requireValue(args, index += 1);
|
|
69
|
+
}
|
|
70
|
+
else if (arg === "--artifact") {
|
|
71
|
+
options.artifactRefs.push(requireValue(args, index += 1));
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
throw new Error(`Unknown option: ${arg}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return options;
|
|
78
|
+
}
|
|
79
|
+
async function resolveBody(options) {
|
|
80
|
+
if (options.bodyFile) {
|
|
81
|
+
return fs.readFile(options.bodyFile, "utf8");
|
|
82
|
+
}
|
|
83
|
+
if (options.body) {
|
|
84
|
+
return options.body;
|
|
85
|
+
}
|
|
86
|
+
throw new Error("Message body is required. Use --body or --body-file.");
|
|
87
|
+
}
|
|
88
|
+
function requireValue(args, index) {
|
|
89
|
+
const value = args[index];
|
|
90
|
+
if (!value) {
|
|
91
|
+
throw new Error("Missing option value.");
|
|
92
|
+
}
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
function requireOption(value, name) {
|
|
96
|
+
if (!value) {
|
|
97
|
+
throw new Error(`Missing required option: ${name}`);
|
|
98
|
+
}
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
async function fetchJson(url, init = {}) {
|
|
102
|
+
const response = await fetch(url, init);
|
|
103
|
+
if (!response.ok) {
|
|
104
|
+
const payload = await response.json().catch(() => null);
|
|
105
|
+
const message = payload?.error?.hint
|
|
106
|
+
? `${payload.error.message} ${payload.error.hint}`
|
|
107
|
+
: payload?.error?.message ?? `Request failed: ${response.status}`;
|
|
108
|
+
throw new Error(message);
|
|
109
|
+
}
|
|
110
|
+
return response.json();
|
|
111
|
+
}
|
|
112
|
+
function getApiUrl() {
|
|
113
|
+
return process.env.VCM_API_URL ?? "http://127.0.0.1:4173";
|
|
114
|
+
}
|
|
115
|
+
function getTaskSlug() {
|
|
116
|
+
return requireEnv("VCM_TASK_SLUG");
|
|
117
|
+
}
|
|
118
|
+
function getEnvRole() {
|
|
119
|
+
return requireEnv("VCM_ROLE");
|
|
120
|
+
}
|
|
121
|
+
function requireEnv(name) {
|
|
122
|
+
const value = process.env[name];
|
|
123
|
+
if (!value) {
|
|
124
|
+
throw new Error(`${name} is not set.`);
|
|
125
|
+
}
|
|
126
|
+
return value;
|
|
127
|
+
}
|
|
128
|
+
function printHelp() {
|
|
129
|
+
console.log(`vcmctl
|
|
130
|
+
|
|
131
|
+
Usage:
|
|
132
|
+
vcmctl send --to coder --type task --body-file /tmp/message.md
|
|
133
|
+
vcmctl reply --type blocked --body "Need clarification."
|
|
134
|
+
vcmctl result --body-file /tmp/result.md --artifact .ai/handoffs/task/implementation-log.md
|
|
135
|
+
vcmctl inbox
|
|
136
|
+
`);
|
|
137
|
+
}
|
|
138
|
+
main().catch((error) => {
|
|
139
|
+
console.error(error.message);
|
|
140
|
+
process.exit(1);
|
|
141
|
+
});
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { createServer as createViteDevServer } from "vite";
|
|
4
|
+
import { DEFAULT_BACKEND_PORT, DEFAULT_FRONTEND_PORT } from "./shared/constants.js";
|
|
5
|
+
import { getDefaultStaticDir, startServer } from "./backend/server.js";
|
|
6
|
+
export function parseMainArgs(argv) {
|
|
7
|
+
const options = {};
|
|
8
|
+
for (const arg of argv) {
|
|
9
|
+
if (arg === "--dev") {
|
|
10
|
+
options.dev = true;
|
|
11
|
+
}
|
|
12
|
+
else if (arg === "--open") {
|
|
13
|
+
options.open = true;
|
|
14
|
+
}
|
|
15
|
+
else if (arg.startsWith("--host=")) {
|
|
16
|
+
options.host = arg.slice("--host=".length);
|
|
17
|
+
}
|
|
18
|
+
else if (arg.startsWith("--port=")) {
|
|
19
|
+
options.port = Number(arg.slice("--port=".length));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return options;
|
|
23
|
+
}
|
|
24
|
+
export async function main(argv = process.argv.slice(2)) {
|
|
25
|
+
const options = parseMainArgs(argv);
|
|
26
|
+
const backendPort = options.port ?? DEFAULT_BACKEND_PORT;
|
|
27
|
+
const host = options.host ?? "127.0.0.1";
|
|
28
|
+
const backend = await startServer({
|
|
29
|
+
host,
|
|
30
|
+
port: backendPort,
|
|
31
|
+
staticDir: options.dev ? undefined : getDefaultStaticDir(),
|
|
32
|
+
dev: options.dev
|
|
33
|
+
});
|
|
34
|
+
let vite;
|
|
35
|
+
if (options.dev) {
|
|
36
|
+
vite = await createViteDevServer({
|
|
37
|
+
server: {
|
|
38
|
+
host,
|
|
39
|
+
port: DEFAULT_FRONTEND_PORT,
|
|
40
|
+
proxy: {
|
|
41
|
+
"/api": backend.url,
|
|
42
|
+
"/ws": {
|
|
43
|
+
target: backend.url.replace("http:", "ws:"),
|
|
44
|
+
ws: true
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
await vite.listen();
|
|
50
|
+
vite.printUrls();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
console.log(`VibeCodingMaster is running at ${backend.url}`);
|
|
54
|
+
}
|
|
55
|
+
process.once("SIGINT", async () => {
|
|
56
|
+
await vite?.close();
|
|
57
|
+
await backend.close();
|
|
58
|
+
process.exit(0);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1] ?? "")) {
|
|
62
|
+
void main();
|
|
63
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export const DEFAULT_BACKEND_PORT = 4173;
|
|
2
|
+
export const DEFAULT_FRONTEND_PORT = 5173;
|
|
3
|
+
export const ROLE_DEFINITIONS = [
|
|
4
|
+
{
|
|
5
|
+
name: "project-manager",
|
|
6
|
+
label: "Project Manager",
|
|
7
|
+
commandAgent: "project-manager",
|
|
8
|
+
dispatchable: false
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: "architect",
|
|
12
|
+
label: "Architect",
|
|
13
|
+
commandAgent: "architect",
|
|
14
|
+
dispatchable: true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "coder",
|
|
18
|
+
label: "Coder",
|
|
19
|
+
commandAgent: "coder",
|
|
20
|
+
dispatchable: true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "reviewer",
|
|
24
|
+
label: "Reviewer",
|
|
25
|
+
commandAgent: "reviewer",
|
|
26
|
+
dispatchable: true
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
export const ROLE_NAMES = ROLE_DEFINITIONS.map((role) => role.name);
|
|
30
|
+
export const DISPATCHABLE_ROLES = ROLE_DEFINITIONS
|
|
31
|
+
.filter((role) => role.dispatchable)
|
|
32
|
+
.map((role) => role.name);
|
|
33
|
+
export function isRoleName(value) {
|
|
34
|
+
return ROLE_NAMES.includes(value);
|
|
35
|
+
}
|
|
36
|
+
export function isDispatchableRole(value) {
|
|
37
|
+
return DISPATCHABLE_ROLES.includes(value);
|
|
38
|
+
}
|
|
39
|
+
export function getRoleDefinition(role) {
|
|
40
|
+
const definition = ROLE_DEFINITIONS.find((candidate) => candidate.name === role);
|
|
41
|
+
if (!definition) {
|
|
42
|
+
throw new Error(`Unknown role: ${role}`);
|
|
43
|
+
}
|
|
44
|
+
return definition;
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const REQUIRED_HEADINGS = {
|
|
2
|
+
"architecture-plan": [
|
|
3
|
+
"Context",
|
|
4
|
+
"Architecture Decision",
|
|
5
|
+
"Implementation Plan",
|
|
6
|
+
"Risks",
|
|
7
|
+
"Stop Conditions"
|
|
8
|
+
],
|
|
9
|
+
"implementation-log": [
|
|
10
|
+
"Summary",
|
|
11
|
+
"Files Changed",
|
|
12
|
+
"Validation",
|
|
13
|
+
"Deviations From Architecture Plan",
|
|
14
|
+
"Follow-ups"
|
|
15
|
+
],
|
|
16
|
+
"validation-log": [
|
|
17
|
+
"Validation"
|
|
18
|
+
],
|
|
19
|
+
"review-report": [
|
|
20
|
+
"Summary",
|
|
21
|
+
"Findings",
|
|
22
|
+
"Validation",
|
|
23
|
+
"Decision"
|
|
24
|
+
]
|
|
25
|
+
};
|
|
26
|
+
export function checkMarkdownArtifact(kind, artifactPath, content) {
|
|
27
|
+
if (content === null) {
|
|
28
|
+
return {
|
|
29
|
+
kind,
|
|
30
|
+
path: artifactPath,
|
|
31
|
+
exists: false,
|
|
32
|
+
isEmpty: true,
|
|
33
|
+
missingHeadings: [...REQUIRED_HEADINGS[kind]],
|
|
34
|
+
status: "missing"
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const trimmed = content.trim();
|
|
38
|
+
if (!trimmed) {
|
|
39
|
+
return {
|
|
40
|
+
kind,
|
|
41
|
+
path: artifactPath,
|
|
42
|
+
exists: true,
|
|
43
|
+
isEmpty: true,
|
|
44
|
+
missingHeadings: [...REQUIRED_HEADINGS[kind]],
|
|
45
|
+
status: "empty"
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const missingHeadings = REQUIRED_HEADINGS[kind].filter((heading) => !hasHeading(trimmed, heading));
|
|
49
|
+
return {
|
|
50
|
+
kind,
|
|
51
|
+
path: artifactPath,
|
|
52
|
+
exists: true,
|
|
53
|
+
isEmpty: false,
|
|
54
|
+
missingHeadings,
|
|
55
|
+
status: missingHeadings.length === 0 ? "ok" : "incomplete"
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function hasHeading(content, heading) {
|
|
59
|
+
const pattern = new RegExp(`^#{1,6}\\s+${escapeRegExp(heading)}\\s*$`, "im");
|
|
60
|
+
return pattern.test(content);
|
|
61
|
+
}
|
|
62
|
+
function escapeRegExp(value) {
|
|
63
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
64
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const TASK_SLUG_PATTERN = /^[a-z0-9][a-z0-9-]{1,62}[a-z0-9]$/;
|
|
2
|
+
export function validateTaskSlug(taskSlug) {
|
|
3
|
+
if (!taskSlug.trim()) {
|
|
4
|
+
return { ok: false, message: "Task slug is required." };
|
|
5
|
+
}
|
|
6
|
+
if (!TASK_SLUG_PATTERN.test(taskSlug)) {
|
|
7
|
+
return {
|
|
8
|
+
ok: false,
|
|
9
|
+
message: "Use 3-64 lowercase letters, numbers, and hyphens. Start and end with a letter or number."
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
if (taskSlug.includes("--")) {
|
|
13
|
+
return { ok: false, message: "Task slug cannot contain consecutive hyphens." };
|
|
14
|
+
}
|
|
15
|
+
return { ok: true };
|
|
16
|
+
}
|
|
17
|
+
export function assertValidTaskSlug(taskSlug) {
|
|
18
|
+
const result = validateTaskSlug(taskSlug);
|
|
19
|
+
if (!result.ok) {
|
|
20
|
+
throw new Error(result.message);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -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{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:#f5f2ea;color:#1c2024;line-height:1.5}html,body,#root{height:100%}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:#f5f2ea}button,input,textarea{font:inherit}button{border:1px solid #9ba6ad;background:#f8f7f2;color:#1d252b;border-radius:6px;min-height:34px;padding:6px 10px;cursor:pointer}button:hover:not(:disabled){background:#eef4f2;border-color:#607d74}button:disabled{cursor:not-allowed;opacity:.55}input,textarea:not(.xterm-helper-textarea){width:100%;border:1px solid #b9b0a1;border-radius:6px;background:#fffdf8;color:#202326;padding:8px 10px}textarea:not(.xterm-helper-textarea){min-height:240px;resize:vertical;font-family:Menlo,Monaco,Consolas,monospace;font-size:12px}h1,h2,p{margin-top:0}h1{margin-bottom:4px;font-size:26px;line-height:1.15}h2{margin-bottom:10px;font-size:14px;letter-spacing:0}.app-shell{display:grid;grid-template-columns:minmax(280px,320px) minmax(0,1fr);height:100vh;min-height:0;overflow:hidden}.app-shell.is-sidebar-collapsed{grid-template-columns:46px minmax(0,1fr)}.app-sidebar{position:relative;min-width:0;border-right:1px solid #d3c9b8;background:#fbfaf6;padding:14px;overflow:auto}.app-shell.is-sidebar-collapsed .app-sidebar{overflow:hidden;padding:8px}.sidebar-toggle{position:absolute;top:10px;right:10px;z-index:2;display:grid;place-items:center;width:28px;min-height:28px;padding:0;background:#fffdf8}.sidebar-toggle:before{width:8px;height:8px;border-color:currentColor;border-style:solid;border-width:0 2px 2px 0;content:"";transform:translate(2px) rotate(135deg)}.app-shell.is-sidebar-collapsed .sidebar-toggle{left:9px;right:auto}.app-shell.is-sidebar-collapsed .sidebar-toggle:before{transform:translate(-2px) rotate(-45deg)}.sidebar-content{min-width:0}.app-shell.is-sidebar-collapsed .sidebar-content{width:0;opacity:0;pointer-events:none}.app-main{min-width:0;height:100%;padding:14px 16px;overflow:auto}.brand-header{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:16px;padding-right:34px}.brand-header strong{font-size:18px}.brand-header span,.muted,.workspace-branch{color:#667071;font-size:13px}.repo-connect,.project-summary,.task-create,.project-dashboard section{margin-bottom:16px}.repo-connect label{display:block;margin-bottom:8px;font-size:13px;font-weight:650}.inline-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.project-summary dl{display:grid;gap:8px;margin:0}.project-summary div{min-width:0}.project-summary dt{color:#6c6255;font-size:12px}.project-summary dd{margin:0;overflow-wrap:anywhere;font-size:13px}.warnings,.error-banner{border:1px solid #c87b54;background:#fff4ed;color:#6f3218;border-radius:6px;padding:10px 12px}.warnings{margin:12px 0 0;padding-left:26px;font-size:13px}.task-create form,.task-nav{display:grid;gap:8px}.task-nav-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;text-align:left}.task-nav-item.is-active,.role-tab.is-active{border-color:#2f6f73;background:#e8f1ef}.workspace-header{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:6px}.workspace-title-line{display:flex;flex-wrap:wrap;gap:10px;align-items:baseline;min-width:0}.workspace-title-line h1{margin-bottom:0;font-size:18px;line-height:1.15}.workspace-branch{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eyebrow{color:#7a5c2f;font-size:12px;font-weight:700;text-transform:uppercase}.role-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:8px}.role-tab{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center;min-height:30px;padding:4px 8px;text-align:left}.workspace-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:start}.workspace-main{min-width:0;display:grid;gap:8px}.role-console-stack{min-width:0}.role-console-panel{min-width:0;display:none}.role-console-panel.is-active{display:block}.session-console,.message-panel,.event-log,.empty-workspace{border:1px solid #d6d0c6;border-radius:8px;background:#fffdf8;padding:10px}.session-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;margin:0 0 8px}.permission-mode-field{display:grid;grid-template-columns:auto minmax(180px,260px);gap:8px;align-items:center;width:fit-content;max-width:100%}.permission-mode-field span{color:#5f6a6c;font-size:13px;font-weight:650}.permission-mode-field small{display:block;color:#7b8587;font-size:11px;font-weight:500;line-height:1.2}.permission-mode-field select{width:100%;min-height:30px;border:1px solid #b9b0a1;border-radius:6px;background:#fffdf8;color:#202326;padding:4px 8px}.session-toolbar{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.session-toolbar button{min-height:30px;padding:4px 9px}.terminal-frame,.terminal-empty{height:clamp(560px,calc(100vh - 210px),960px);min-height:520px;border-radius:6px;overflow:hidden;background:#111316}.terminal-empty{display:grid;place-items:center;align-content:center;gap:8px;color:#d6d0c6;border:1px solid #292d31}.message-panel{display:grid;gap:8px}.message-panel-header{display:flex;justify-content:space-between;gap:12px;align-items:center}.message-panel-header h2,.message-panel-header p{margin-bottom:0}.message-controls,.message-mode-toggle,.message-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.message-mode-toggle{color:#4f5558;font-size:13px;font-weight:650}.message-mode-toggle input{width:auto}.message-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}.message-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start;border:1px solid #ece5d9;border-radius:6px;padding:8px;background:#fffdfa}.message-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:4px}.message-meta span:not(.status-badge),.message-path{color:#667071;font-size:12px}.message-item p{display:-webkit-box;margin-bottom:4px;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.message-path{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.event-log ol{margin:0;padding-left:22px;font-size:13px}.event-log{max-height:92px;overflow:auto}.event-log h2{margin-bottom:4px;font-size:13px}.event-log p{margin-bottom:0}.event-log li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:66px;min-height:20px;border-radius:999px;padding:2px 8px;border:1px solid #c7c1b8;background:#f2eee7;color:#4f5558;font-size:11px;white-space:nowrap}.status-running,.status-ok{border-color:#6ea77e;background:#e6f3e9;color:#245334}.status-blocked,.status-crashed,.status-missing,.status-empty{border-color:#c46e5f;background:#fae9e6;color:#6f2b21}.status-waiting,.status-starting,.status-incomplete{border-color:#c4a34e;background:#f7efcf;color:#604e16}.status-exited,.status-done,.status-resumable,.status-staged,.status-delivered,.status-acknowledged{border-color:#7b98b8;background:#e9f0f8;color:#2e4e70}.status-pending_approval,.status-queued{border-color:#c4a34e;background:#f7efcf;color:#604e16}.status-rejected,.status-failed,.status-cancelled{border-color:#c46e5f;background:#fae9e6;color:#6f2b21}.empty-workspace{max-width:680px}@media(max-width:980px){.app-shell,.workspace-grid{grid-template-columns:1fr}.app-sidebar{border-right:0;border-bottom:1px solid #d3c9b8}.role-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.app-main,.app-sidebar{padding:12px}.workspace-header,.inline-form{grid-template-columns:1fr;display:grid}.role-tabs{grid-template-columns:1fr}.terminal-frame,.terminal-empty{min-height:300px;height:54vh}.permission-mode-field{grid-template-columns:1fr;width:100%}}
|