@oxgeneral/orch 0.3.3 → 0.3.4

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.
Files changed (108) hide show
  1. package/dist/App-RKAPZNZO.js +6682 -0
  2. package/dist/agent-KBTLGGCT.js +183 -0
  3. package/dist/agent-shop-YN2BSLHM.js +2 -0
  4. package/dist/chunk-2C2TFQ7K.js +136 -0
  5. package/dist/chunk-45K2XID7.js +29 -0
  6. package/dist/chunk-52BFUGDD.js +220 -0
  7. package/dist/chunk-7X2GI5OV.js +181 -0
  8. package/dist/{chunk-HSBYJ5C5.js → chunk-A36WAF2S.js} +89 -2
  9. package/dist/chunk-CHIP7O6V.js +83 -0
  10. package/dist/chunk-D6RFF3KN.js +85 -0
  11. package/dist/{chunk-BCPUTULS.js → chunk-DAVHOWGD.js} +188 -16
  12. package/dist/chunk-FRTKB575.js +87 -0
  13. package/dist/chunk-HXYAZGLP.js +15 -0
  14. package/dist/chunk-I3SMISEF.js +29 -0
  15. package/dist/chunk-K6DMQERQ.js +89 -0
  16. package/dist/chunk-LV6GDBBI.js +297 -0
  17. package/dist/chunk-P6ATSXGL.js +107 -0
  18. package/dist/chunk-PNE6LQRF.js +5 -0
  19. package/dist/chunk-U2VDNUZL.js +52 -0
  20. package/dist/{chunk-BGHCY7WY.js → chunk-VMDQVRBR.js} +18 -8
  21. package/dist/chunk-VMDQVRBR.js.map +1 -0
  22. package/dist/chunk-W6RSVMXR.js +66 -0
  23. package/dist/claude-NHUNA5RZ.js +5 -0
  24. package/dist/cli.js +199 -1
  25. package/dist/clipboard-service-RTDUUQQU.js +200 -0
  26. package/dist/codex-DIXT44JR.js +123 -0
  27. package/dist/config-OTAVSMOD.js +75 -0
  28. package/dist/container-LJU4QNDH.js +1594 -0
  29. package/dist/context-OL4BVUV5.js +83 -0
  30. package/dist/cursor-C3TR2IJC.js +97 -0
  31. package/dist/doctor-V2FPS236.js +67 -0
  32. package/dist/doctor-service-TPOMFAIG.js +2 -0
  33. package/dist/goal-FMYYN2FR.js +138 -0
  34. package/dist/index.d.ts +12 -1
  35. package/dist/index.js +14 -7
  36. package/dist/index.js.map +1 -1
  37. package/dist/init-U7MCIOB2.js +165 -0
  38. package/dist/logs-PHPYWQ6I.js +207 -0
  39. package/dist/msg-FUWWLEKM.js +95 -0
  40. package/dist/orchestrator-ADO66XZ3.js +5 -0
  41. package/dist/{orchestrator-KF4UY5GD.js.map → orchestrator-ADO66XZ3.js.map} +1 -1
  42. package/dist/orchestrator-E3FQ4SOE.js +1424 -0
  43. package/dist/process-manager-HUVNAPQV.js +2 -0
  44. package/dist/registry-PQWRVNF2.js +2 -0
  45. package/dist/run-N72G5V2H.js +95 -0
  46. package/dist/shell-3S4VLYEG.js +4 -0
  47. package/dist/{shell-UXJNTNBC.js → shell-JXOPKDXH.js} +3 -3
  48. package/dist/shell-JXOPKDXH.js.map +1 -0
  49. package/dist/shop-picker-2HY67UWP.js +79 -0
  50. package/dist/status-RZWN2C6C.js +56 -0
  51. package/dist/task-2TJW6Z7O.js +221 -0
  52. package/dist/team-PFLP4PPL.js +97 -0
  53. package/dist/template-engine-4IZKRRHG.js +3 -0
  54. package/dist/tui-IM3YUUVD.js +245 -0
  55. package/dist/update-YLP7FPNY.js +64 -0
  56. package/dist/update-check-4YKLGBFB.js +2 -0
  57. package/dist/workspace-manager-JM6U7JOH.js +215 -0
  58. package/package.json +1 -1
  59. package/readme.md +9 -2
  60. package/scripts/postinstall.js +44 -2
  61. package/dist/App-NN7HR7UE.js +0 -20
  62. package/dist/agent-S4DKSX63.js +0 -9
  63. package/dist/agent-shop-D2RS4BZK.js +0 -2
  64. package/dist/chunk-3MQNQ7QW.js +0 -2
  65. package/dist/chunk-5AJ4LYO5.js +0 -8
  66. package/dist/chunk-6MJ7V6VY.js +0 -2
  67. package/dist/chunk-BGHCY7WY.js.map +0 -1
  68. package/dist/chunk-CDFA4IIQ.js +0 -2
  69. package/dist/chunk-CHRW4CLD.js +0 -2
  70. package/dist/chunk-HMMPM7MF.js +0 -3
  71. package/dist/chunk-HXOMNULD.js +0 -2
  72. package/dist/chunk-IS3YBE2B.js +0 -3
  73. package/dist/chunk-KPCT44WU.js +0 -2
  74. package/dist/chunk-L26TK7Y5.js +0 -2
  75. package/dist/chunk-LXNRCJ22.js +0 -2
  76. package/dist/chunk-OQKREZUF.js +0 -11
  77. package/dist/chunk-PJ5DKXGR.js +0 -2
  78. package/dist/chunk-QFKVCNKL.js +0 -2
  79. package/dist/chunk-UMZEA3JT.js +0 -5
  80. package/dist/claude-GQZNDJ6L.js +0 -2
  81. package/dist/clipboard-service-MYLSWM5E.js +0 -25
  82. package/dist/codex-SJV7ZZBY.js +0 -2
  83. package/dist/config-CCSS2P7R.js +0 -2
  84. package/dist/container-NEKK5W2B.js +0 -6
  85. package/dist/context-GSMQHQES.js +0 -7
  86. package/dist/cursor-4JQOCP5X.js +0 -2
  87. package/dist/doctor-UAII4VWN.js +0 -2
  88. package/dist/doctor-service-PB7YBH3F.js +0 -2
  89. package/dist/goal-RFKFPR7M.js +0 -8
  90. package/dist/init-2D4RAN7B.js +0 -53
  91. package/dist/logs-UXFXVYCP.js +0 -12
  92. package/dist/msg-4SCLBO4K.js +0 -9
  93. package/dist/orchestrator-KF4UY5GD.js +0 -5
  94. package/dist/orchestrator-MFL3XK5L.js +0 -13
  95. package/dist/process-manager-33H27MQF.js +0 -2
  96. package/dist/registry-BO2PPRNG.js +0 -2
  97. package/dist/run-HSHRELOP.js +0 -3
  98. package/dist/shell-F42UUF3U.js +0 -2
  99. package/dist/shell-UXJNTNBC.js.map +0 -1
  100. package/dist/shop-picker-LE3SKFOX.js +0 -5
  101. package/dist/status-DLBNWSWM.js +0 -2
  102. package/dist/task-AP2TIOOF.js +0 -20
  103. package/dist/team-MSIBKOQC.js +0 -4
  104. package/dist/template-engine-ONIDVD4F.js +0 -2
  105. package/dist/tui-PIQT4ZZ2.js +0 -2
  106. package/dist/update-PC2ENCKU.js +0 -2
  107. package/dist/update-check-HGMBDYHL.js +0 -2
  108. package/dist/workspace-manager-DYN3XJ7X.js +0 -3
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env node
2
+ import { printSuccess, printError, dim, formatDurationSince, printTable } from './chunk-7X2GI5OV.js';
3
+
4
+ // src/cli/commands/context.ts
5
+ function registerContextCommand(program, container) {
6
+ const ctx = program.command("context").description("Shared context store for inter-agent data exchange");
7
+ ctx.command("set <key> <value>").description("Set a shared context entry").option("--ttl <ms>", "Time-to-live in milliseconds").action(async (key, value, opts) => {
8
+ await container.paths.requireInit();
9
+ const ttlMs = opts.ttl ? parseInt(opts.ttl, 10) : void 0;
10
+ await container.contextStore.set(key, value, ttlMs);
11
+ if (container.context.json) {
12
+ const entry = await container.contextStore.get(key);
13
+ console.log(JSON.stringify(entry, null, 2));
14
+ } else if (container.context.quiet) {
15
+ console.log(key);
16
+ } else {
17
+ printSuccess(`Set context "${key}"`);
18
+ }
19
+ });
20
+ ctx.command("get <key>").description("Get a shared context entry").action(async (key) => {
21
+ await container.paths.requireInit();
22
+ const entry = await container.contextStore.get(key);
23
+ if (!entry) {
24
+ if (container.context.json) {
25
+ console.log("null");
26
+ } else {
27
+ printError(`Context key "${key}" not found`);
28
+ }
29
+ return;
30
+ }
31
+ if (container.context.json) {
32
+ console.log(JSON.stringify(entry, null, 2));
33
+ } else if (container.context.quiet) {
34
+ console.log(entry.value);
35
+ } else {
36
+ console.log(`
37
+ ${key} = ${entry.value}`);
38
+ if (entry.expires_at) {
39
+ console.log(` ${dim(`expires: ${entry.expires_at}`)}`);
40
+ }
41
+ console.log();
42
+ }
43
+ });
44
+ ctx.command("list").description("List all shared context entries").action(async () => {
45
+ await container.paths.requireInit();
46
+ const entries = await container.contextStore.list();
47
+ if (container.context.json) {
48
+ console.log(JSON.stringify(entries, null, 2));
49
+ return;
50
+ }
51
+ if (container.context.quiet) {
52
+ entries.forEach((e) => console.log(`${e.key}=${e.value}`));
53
+ return;
54
+ }
55
+ if (entries.length === 0) {
56
+ console.log(`
57
+ No shared context entries. Set one: ${dim("orch context set key value")}
58
+ `);
59
+ return;
60
+ }
61
+ const headers = ["KEY", "VALUE", "UPDATED", "TTL"];
62
+ const rows = entries.map((e) => [
63
+ e.key,
64
+ e.value.length > 50 ? e.value.slice(0, 47) + "..." : e.value,
65
+ formatDurationSince(e.updated_at),
66
+ e.expires_at ? formatDurationSince(e.expires_at) : dim("\u2014")
67
+ ]);
68
+ console.log();
69
+ printTable(headers, rows);
70
+ console.log(`
71
+ ${entries.length} entries
72
+ `);
73
+ });
74
+ ctx.command("delete <key>").description("Delete a shared context entry").action(async (key) => {
75
+ await container.paths.requireInit();
76
+ await container.contextStore.delete(key);
77
+ if (!container.context.quiet && !container.context.json) {
78
+ printSuccess(`Deleted context "${key}"`);
79
+ }
80
+ });
81
+ }
82
+
83
+ export { registerContextCommand };
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env node
2
+ import { createStreamingEvents, extractTokens } from './chunk-W6RSVMXR.js';
3
+ import './chunk-CHIP7O6V.js';
4
+ import { classifyAdapterError } from './chunk-2C2TFQ7K.js';
5
+ import { execFile } from 'child_process';
6
+ import { promisify } from 'util';
7
+
8
+ var execFileAsync = promisify(execFile);
9
+ async function findCommand() {
10
+ for (const cmd of ["cursor-agent", "agent"]) {
11
+ try {
12
+ const { stdout } = await execFileAsync(cmd, ["--version"]);
13
+ return { command: cmd, version: stdout.trim() };
14
+ } catch {
15
+ }
16
+ }
17
+ return null;
18
+ }
19
+ var CursorAdapter = class {
20
+ constructor(processManager) {
21
+ this.processManager = processManager;
22
+ }
23
+ kind = "cursor";
24
+ resolvedCommand = "cursor-agent";
25
+ async test() {
26
+ const found = await findCommand();
27
+ if (found) {
28
+ this.resolvedCommand = found.command;
29
+ return { ok: true, version: found.version };
30
+ }
31
+ return {
32
+ ok: false,
33
+ error: "Cursor Agent CLI not found. The headless agent CLI is required (cursor-agent or agent).",
34
+ errorKind: "adapter_not_found" /* ADAPTER_NOT_FOUND */
35
+ };
36
+ }
37
+ execute(params) {
38
+ const args = [
39
+ "-p",
40
+ "--output-format",
41
+ "stream-json",
42
+ "--workspace",
43
+ params.workspace,
44
+ "--yolo"
45
+ // bypass interactive prompts for autonomous agents
46
+ ];
47
+ if (params.config.model) {
48
+ args.push("--model", params.config.model);
49
+ }
50
+ const { process: proc, pid } = this.processManager.spawn(this.resolvedCommand, args, {
51
+ cwd: params.workspace,
52
+ env: { ...process.env, ...params.env },
53
+ signal: params.signal,
54
+ stdio: ["pipe", "pipe", "pipe"]
55
+ // stdin must be 'pipe' to send prompt
56
+ });
57
+ if (proc.stdin) {
58
+ proc.stdin.write(params.prompt);
59
+ proc.stdin.end();
60
+ }
61
+ const events = createStreamingEvents(proc, parseCursorEvent, "Cursor agent", params.signal);
62
+ return { pid, events };
63
+ }
64
+ async stop(pid) {
65
+ await this.processManager.killWithGrace(pid);
66
+ }
67
+ };
68
+ function parseCursorEvent(line) {
69
+ if (!line.trim()) return null;
70
+ try {
71
+ const parsed = JSON.parse(line);
72
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString();
73
+ switch (parsed.type) {
74
+ case "assistant":
75
+ return { type: "output", timestamp, data: parsed.message ?? parsed };
76
+ case "tool_use":
77
+ return { type: "tool_call", timestamp, data: parsed };
78
+ case "tool_result":
79
+ return { type: "output", timestamp, data: parsed };
80
+ case "error": {
81
+ const errData = parsed.error ?? parsed;
82
+ const errMsg = typeof errData === "string" ? errData : JSON.stringify(errData);
83
+ return { type: "error", timestamp, data: errData, errorKind: classifyAdapterError(errMsg) };
84
+ }
85
+ case "result": {
86
+ const tokens = extractTokens(parsed);
87
+ return { type: "done", timestamp, data: parsed, tokens };
88
+ }
89
+ default:
90
+ return { type: "output", timestamp, data: parsed };
91
+ }
92
+ } catch {
93
+ return { type: "output", timestamp: (/* @__PURE__ */ new Date()).toISOString(), data: line };
94
+ }
95
+ }
96
+
97
+ export { CursorAdapter };
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env node
2
+ import { DoctorService } from './chunk-K6DMQERQ.js';
3
+ import { amber, getIcon, dim } from './chunk-7X2GI5OV.js';
4
+ import { AdapterRegistry } from './chunk-45K2XID7.js';
5
+ import { ClaudeAdapter } from './chunk-D6RFF3KN.js';
6
+ import './chunk-W6RSVMXR.js';
7
+ import { ShellAdapter } from './chunk-52BFUGDD.js';
8
+ import { ProcessManager } from './chunk-CHIP7O6V.js';
9
+ import { Paths } from './chunk-LV6GDBBI.js';
10
+ import './chunk-2C2TFQ7K.js';
11
+ import chalk from 'chalk';
12
+
13
+ function registerDoctorCommand(program, container) {
14
+ program.command("doctor").description("Check adapters and dependencies").action(async () => {
15
+ let doctorService;
16
+ let paths;
17
+ let hasContainer = false;
18
+ if (container) {
19
+ doctorService = container.doctorService;
20
+ paths = container.paths;
21
+ hasContainer = true;
22
+ } else {
23
+ const pm = new ProcessManager();
24
+ const registry = new AdapterRegistry();
25
+ registry.register(new ClaudeAdapter(pm));
26
+ registry.register(new ShellAdapter(pm));
27
+ doctorService = new DoctorService(registry, pm, process.cwd());
28
+ paths = new Paths(process.cwd());
29
+ }
30
+ console.log();
31
+ console.log(` ${amber("orch doctor")} \xB7 checking adapters and dependencies`);
32
+ console.log();
33
+ const report = await doctorService.runAll();
34
+ if (container?.context.json) {
35
+ console.log(JSON.stringify(report, null, 2));
36
+ return;
37
+ }
38
+ for (const check of report.checks) {
39
+ const icon = check.status === "ok" ? chalk.ansi256(72)(getIcon("done")) : check.status === "fail" ? chalk.ansi256(167)(getIcon("failed")) : dim("\u2014");
40
+ const detail = check.detail ? dim(` ${check.detail}`) : "";
41
+ console.log(` ${icon} ${check.name.padEnd(12)}${detail}`);
42
+ }
43
+ if (paths) {
44
+ const initialized = await paths.isInitialized();
45
+ if (initialized && hasContainer) {
46
+ const agents = await container.agentService.list();
47
+ const tasks = await container.taskService.list();
48
+ console.log();
49
+ console.log(
50
+ ` ${chalk.ansi256(72)(getIcon("done"))} .orchestry/ ${dim(`exists \xB7 ${agents.length} agents \xB7 ${tasks.length} tasks`)}`
51
+ );
52
+ } else if (!initialized) {
53
+ console.log();
54
+ console.log(
55
+ ` ${chalk.ansi256(167)(getIcon("failed"))} .orchestry/ ${dim("not found \u2014 run: orch init")}`
56
+ );
57
+ }
58
+ }
59
+ console.log();
60
+ console.log(
61
+ ` ${report.adaptersReady} of ${report.adaptersTotal} adapters ready`
62
+ );
63
+ console.log();
64
+ });
65
+ }
66
+
67
+ export { registerDoctorCommand };
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export { DoctorService } from './chunk-K6DMQERQ.js';
@@ -0,0 +1,138 @@
1
+ #!/usr/bin/env node
2
+ import { GOAL_STATUSES } from './chunk-HXYAZGLP.js';
3
+ import { printSuccess, dim, printTable, printKeyValue, statusIcon, agentName, printError } from './chunk-7X2GI5OV.js';
4
+
5
+ // src/cli/commands/goal.ts
6
+ var STATUS_ICON = {
7
+ active: "\u25CF",
8
+ // ●
9
+ paused: "\u2016",
10
+ // ‖
11
+ achieved: "\u2713",
12
+ // ✓
13
+ abandoned: "\u2715"
14
+ // ✕
15
+ };
16
+ function registerGoalCommand(program, container) {
17
+ const goal = program.command("goal").description("Manage goals");
18
+ goal.command("add <title>").description("Create a new goal").option("--description <desc>", "Goal description").option("--assignee <agentId>", "Assign to a specific agent").action(async (title, opts) => {
19
+ await container.paths.requireInit();
20
+ const g = await container.goalService.create({
21
+ title,
22
+ description: opts.description,
23
+ assignee: opts.assignee
24
+ });
25
+ if (container.context.json) {
26
+ console.log(JSON.stringify(g, null, 2));
27
+ } else if (container.context.quiet) {
28
+ console.log(g.id);
29
+ } else {
30
+ printSuccess(`Created goal "${g.title}" (${g.id})`);
31
+ }
32
+ });
33
+ goal.command("list").alias("ls").description("List all goals").option("--status <status>", "Filter by status").action(async (opts) => {
34
+ await container.paths.requireInit();
35
+ const goals = await container.goalService.list(
36
+ opts.status ? { status: opts.status } : void 0
37
+ );
38
+ if (container.context.json) {
39
+ console.log(JSON.stringify(goals, null, 2));
40
+ return;
41
+ }
42
+ if (goals.length === 0) {
43
+ console.log(dim("No goals found."));
44
+ return;
45
+ }
46
+ const rows = goals.map((g) => [
47
+ STATUS_ICON[g.status] ?? "?",
48
+ g.id,
49
+ g.title,
50
+ g.status,
51
+ g.assignee ?? dim("any")
52
+ ]);
53
+ printTable(["", "ID", "Title", "Status", "Assignee"], rows);
54
+ });
55
+ goal.command("show <id>").description("Show goal details").action(async (id) => {
56
+ await container.paths.requireInit();
57
+ const [g, tasks, progress] = await Promise.all([
58
+ container.goalService.get(id),
59
+ container.goalService.listTasksForGoal(id),
60
+ container.goalService.getProgressReport(id)
61
+ ]);
62
+ if (container.context.json) {
63
+ console.log(JSON.stringify({ ...g, tasks, progress }, null, 2));
64
+ return;
65
+ }
66
+ printKeyValue([
67
+ ["ID", g.id],
68
+ ["Title", g.title],
69
+ ["Status", g.status],
70
+ ["Assignee", g.assignee ?? dim("any")],
71
+ ["Description", g.description || dim("none")],
72
+ ["Created", g.created_at],
73
+ ["Updated", g.updated_at ?? dim("never")]
74
+ ]);
75
+ if (tasks.length > 0) {
76
+ console.log(`
77
+ Tasks (${tasks.length})
78
+ ${"\u2500".repeat(42)}`);
79
+ const rows = tasks.map((t) => [
80
+ `${statusIcon(t.status)} ${t.status}`,
81
+ t.id,
82
+ t.title.slice(0, 40),
83
+ t.assignee ? agentName(t.assignee) : dim("\u2014")
84
+ ]);
85
+ printTable(["STATUS", "ID", "TITLE", "AGENT"], rows);
86
+ } else {
87
+ console.log(`
88
+ ${dim("No tasks linked to this goal yet.")}`);
89
+ }
90
+ if (progress) {
91
+ console.log(`
92
+ Progress Report
93
+ ${"\u2500".repeat(42)}`);
94
+ for (const line of progress.split("\n")) {
95
+ console.log(` ${line}`);
96
+ }
97
+ }
98
+ console.log();
99
+ });
100
+ goal.command("status <id> <status>").description("Change goal status (active, paused, achieved, abandoned)").action(async (id, status) => {
101
+ await container.paths.requireInit();
102
+ if (!GOAL_STATUSES.includes(status)) {
103
+ printError(`Invalid status "${status}". Valid: ${GOAL_STATUSES.join(", ")}`);
104
+ process.exitCode = 1;
105
+ return;
106
+ }
107
+ const g = await container.goalService.updateStatus(id, status);
108
+ if (container.context.json) {
109
+ console.log(JSON.stringify(g, null, 2));
110
+ } else if (container.context.quiet) {
111
+ console.log(g.id);
112
+ } else {
113
+ printSuccess(`Goal "${g.title}" \u2192 ${g.status}`);
114
+ }
115
+ });
116
+ goal.command("update <id>").description("Update goal fields").option("--title <title>", "New title").option("--description <desc>", "New description").option("--assignee <agentId>", "New assignee (empty string to unassign)").action(async (id, opts) => {
117
+ await container.paths.requireInit();
118
+ const g = await container.goalService.update(id, opts);
119
+ if (container.context.json) {
120
+ console.log(JSON.stringify(g, null, 2));
121
+ } else if (container.context.quiet) {
122
+ console.log(g.id);
123
+ } else {
124
+ printSuccess(`Updated goal "${g.title}"`);
125
+ }
126
+ });
127
+ goal.command("delete <id>").alias("rm").description("Delete a goal").action(async (id) => {
128
+ await container.paths.requireInit();
129
+ await container.goalService.delete(id);
130
+ if (container.context.json) {
131
+ console.log(JSON.stringify({ deleted: id }));
132
+ } else if (!container.context.quiet) {
133
+ printSuccess(`Deleted goal ${id}`);
134
+ }
135
+ });
136
+ }
137
+
138
+ export { registerGoalCommand };
package/dist/index.d.ts CHANGED
@@ -86,6 +86,11 @@ interface AgentStats {
86
86
  total_runtime_ms: number;
87
87
  tokens_used?: number;
88
88
  }
89
+ interface AgentLastError {
90
+ message: string;
91
+ kind: string;
92
+ timestamp: string;
93
+ }
89
94
  interface Agent {
90
95
  id: string;
91
96
  name: string;
@@ -96,6 +101,7 @@ interface Agent {
96
101
  current_task?: string;
97
102
  autonomous?: boolean;
98
103
  stats: AgentStats;
104
+ last_error?: AgentLastError;
99
105
  }
100
106
  interface CreateAgentInput {
101
107
  name: string;
@@ -1269,8 +1275,13 @@ interface CliContext {
1269
1275
  */
1270
1276
  /** Activity feed filter preset name */
1271
1277
  type ActivityFilterPreset = 'all' | 'text' | 'tools' | 'errors' | 'events';
1278
+ interface NotificationPreferences {
1279
+ toast: boolean;
1280
+ bell: boolean;
1281
+ }
1272
1282
  interface TuiPreferences {
1273
1283
  activity_filter: ActivityFilterPreset;
1284
+ notifications: NotificationPreferences;
1274
1285
  }
1275
1286
  interface GlobalConfig {
1276
1287
  tui: TuiPreferences;
@@ -1443,4 +1454,4 @@ declare function buildFullContainer(context: CliContext): Promise<Container>;
1443
1454
  */
1444
1455
  declare function buildContainer(context: CliContext): Promise<Container>;
1445
1456
 
1446
- export { type AdapterErrorHint, AdapterErrorKind, AdapterRegistry, type AdapterTestResult, type Agent, type AgentConfig, type AgentEvent, AgentNotFoundError, AgentService, type AgentStats, type AgentStatus, type ApprovalPolicy, type ClipboardContentType, type ClipboardImage, type Container, type CreateAgentInput, type CreateTaskInput, ERROR_HINTS, EventBus, type EventPayload, type ExecuteParams, type IAgentAdapter, type LightContainer, NotInitializedError, Orchestrator, type OrchestratorConfig, type OrchestratorEvent, type OrchestratorEventType, type OrchestratorState, OrchestryError, type ProjectConfig, type RetryEntry, type Run, type RunEvent, type RunEventType, RunService, type RunStatus, type RunningEntry, type SchedulingConfig, type Task, TaskNotFoundError, type TaskProof, TaskService, type TaskStatus, type TokenUsage, WorkspaceError, type WorkspaceMode, buildContainer, buildFullContainer, buildLightContainer, canTransition, classifyAdapterError, createTokenUsage, detectClipboardType, getClipboardImage, isBlocked, isClipboardToolAvailable, isDispatchable, isTerminal, resolveFailureStatus };
1457
+ export { type AdapterErrorHint, AdapterErrorKind, AdapterRegistry, type AdapterTestResult, type Agent, type AgentConfig, type AgentEvent, type AgentLastError, AgentNotFoundError, AgentService, type AgentStats, type AgentStatus, type ApprovalPolicy, type ClipboardContentType, type ClipboardImage, type Container, type CreateAgentInput, type CreateTaskInput, ERROR_HINTS, EventBus, type EventPayload, type ExecuteParams, type IAgentAdapter, type LightContainer, NotInitializedError, Orchestrator, type OrchestratorConfig, type OrchestratorEvent, type OrchestratorEventType, type OrchestratorState, OrchestryError, type ProjectConfig, type RetryEntry, type Run, type RunEvent, type RunEventType, RunService, type RunStatus, type RunningEntry, type SchedulingConfig, type Task, TaskNotFoundError, type TaskProof, TaskService, type TaskStatus, type TokenUsage, WorkspaceError, type WorkspaceMode, buildContainer, buildFullContainer, buildLightContainer, canTransition, classifyAdapterError, createTokenUsage, detectClipboardType, getClipboardImage, isBlocked, isClipboardToolAvailable, isDispatchable, isTerminal, resolveFailureStatus };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ensureDir, Paths, readYaml, writeYaml, listFiles, writeJson, readJson, appendJsonl, readJsonl, readJsonlTail, pathExists } from './chunk-UIJYU3J7.js';
2
- import { canTransition, isTerminal } from './chunk-BGHCY7WY.js';
3
- export { Orchestrator, canTransition, isBlocked, isDispatchable, isTerminal, resolveFailureStatus } from './chunk-BGHCY7WY.js';
2
+ import { canTransition, isTerminal } from './chunk-VMDQVRBR.js';
3
+ export { Orchestrator, canTransition, isBlocked, isDispatchable, isTerminal, resolveFailureStatus } from './chunk-VMDQVRBR.js';
4
4
  import { AUTONOMOUS_LABEL } from './chunk-B4JQM4NU.js';
5
5
  export { AdapterRegistry } from './chunk-6DWHQPTE.js';
6
6
  export { createTokenUsage } from './chunk-XDVMX2FO.js';
@@ -1060,7 +1060,8 @@ function deepMerge(target, source) {
1060
1060
  // src/domain/global-config.ts
1061
1061
  var DEFAULT_GLOBAL_CONFIG = {
1062
1062
  tui: {
1063
- activity_filter: "all"
1063
+ activity_filter: "all",
1064
+ notifications: { toast: true, bell: false }
1064
1065
  }
1065
1066
  };
1066
1067
 
@@ -1070,10 +1071,16 @@ var GLOBAL_CONFIG_PATH = path.join(GLOBAL_DIR, "global.yml");
1070
1071
  var GlobalConfigStore = class {
1071
1072
  async read() {
1072
1073
  const data = await readYaml(GLOBAL_CONFIG_PATH);
1073
- if (!data) return { ...DEFAULT_GLOBAL_CONFIG };
1074
+ if (!data) return { ...DEFAULT_GLOBAL_CONFIG, tui: { ...DEFAULT_GLOBAL_CONFIG.tui, notifications: { ...DEFAULT_GLOBAL_CONFIG.tui.notifications } } };
1075
+ const tui = data.tui;
1076
+ const notif = tui?.notifications;
1074
1077
  return {
1075
1078
  tui: {
1076
- activity_filter: data.tui?.activity_filter ?? DEFAULT_GLOBAL_CONFIG.tui.activity_filter
1079
+ activity_filter: tui?.activity_filter ?? DEFAULT_GLOBAL_CONFIG.tui.activity_filter,
1080
+ notifications: {
1081
+ toast: typeof notif?.toast === "boolean" ? notif.toast : DEFAULT_GLOBAL_CONFIG.tui.notifications.toast,
1082
+ bell: typeof notif?.bell === "boolean" ? notif.bell : DEFAULT_GLOBAL_CONFIG.tui.notifications.bell
1083
+ }
1077
1084
  }
1078
1085
  };
1079
1086
  }
@@ -1762,10 +1769,10 @@ async function buildFullContainer(context) {
1762
1769
  import('./claude-INM52PTH.js'),
1763
1770
  import('./codex-QGH2GRV6.js'),
1764
1771
  import('./cursor-KQJTQ73D.js'),
1765
- import('./shell-UXJNTNBC.js'),
1772
+ import('./shell-JXOPKDXH.js'),
1766
1773
  import('./workspace-manager-EVD67GCG.js'),
1767
1774
  import('./template-engine-MFL5B677.js'),
1768
- import('./orchestrator-KF4UY5GD.js'),
1775
+ import('./orchestrator-ADO66XZ3.js'),
1769
1776
  import('./doctor-service-F2SXDWHS.js')
1770
1777
  ]);
1771
1778
  const processManager = new ProcessManager();