@oxgeneral/orch 1.0.1 → 1.0.3

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 (132) hide show
  1. package/dist/App-A5TZETZ2.js +21 -0
  2. package/dist/agent-Q34L27AY.js +9 -0
  3. package/dist/agent-shop-D2RS4BZK.js +2 -0
  4. package/dist/chunk-4MMHVHA6.js +112 -0
  5. package/dist/chunk-64WUDYEM.js +6 -0
  6. package/dist/chunk-6MJ7V6VY.js +2 -0
  7. package/dist/{chunk-DAVHOWGD.js → chunk-BCPUTULS.js} +16 -188
  8. package/dist/{chunk-UIJYU3J7.js → chunk-BSJVYRI3.js} +5 -2
  9. package/dist/chunk-BSJVYRI3.js.map +1 -0
  10. package/dist/chunk-CDFA4IIQ.js +2 -0
  11. package/dist/chunk-CHRW4CLD.js +2 -0
  12. package/dist/{chunk-O2OQCSBL.js → chunk-FDSFFFMT.js} +46 -29
  13. package/dist/chunk-FDSFFFMT.js.map +1 -0
  14. package/dist/chunk-HMMPM7MF.js +3 -0
  15. package/dist/chunk-HXOMNULD.js +2 -0
  16. package/dist/chunk-IKNBPOQL.js +2 -0
  17. package/dist/chunk-KFQTWMZI.js +3 -0
  18. package/dist/chunk-LXNRCJ22.js +2 -0
  19. package/dist/{chunk-C6XZ3FJT.js → chunk-MOWC2CHX.js} +7 -4
  20. package/dist/chunk-MOWC2CHX.js.map +1 -0
  21. package/dist/chunk-P4JTJBWO.js +2 -0
  22. package/dist/chunk-PJ5DKXGR.js +2 -0
  23. package/dist/chunk-QNZ6D63E.js +4 -0
  24. package/dist/chunk-RHFRHCN5.js +16 -0
  25. package/dist/chunk-RHFRHCN5.js.map +1 -0
  26. package/dist/chunk-TPTHLFOB.js +2 -0
  27. package/dist/chunk-UMZEA3JT.js +5 -0
  28. package/dist/chunk-X54D5JZG.js +11 -0
  29. package/dist/{claude-WUJU5KIE.js → claude-4R6L6BWY.js} +4 -4
  30. package/dist/{claude-WUJU5KIE.js.map → claude-4R6L6BWY.js.map} +1 -1
  31. package/dist/claude-ZLVOLRUG.js +2 -0
  32. package/dist/cli.js +1 -199
  33. package/dist/clipboard-service-WVON5ZN4.js +25 -0
  34. package/dist/{codex-NYJWEPRQ.js → codex-IMOW5ZUZ.js} +4 -4
  35. package/dist/{codex-NYJWEPRQ.js.map → codex-IMOW5ZUZ.js.map} +1 -1
  36. package/dist/codex-YRSODLH4.js +2 -0
  37. package/dist/config-OOB7QEKM.js +2 -0
  38. package/dist/container-CFMUT5KS.js +4 -0
  39. package/dist/context-FXRERFSP.js +7 -0
  40. package/dist/cursor-2HILMNM3.js +2 -0
  41. package/dist/{cursor-3YHVD4NP.js → cursor-NHV7X3WG.js} +4 -4
  42. package/dist/{cursor-3YHVD4NP.js.map → cursor-NHV7X3WG.js.map} +1 -1
  43. package/dist/doctor-GKTV4YYD.js +2 -0
  44. package/dist/doctor-service-PB7YBH3F.js +2 -0
  45. package/dist/editor-7IFRWVTL.js +8 -0
  46. package/dist/goal-RNNZYMNR.js +8 -0
  47. package/dist/index.d.ts +16 -14
  48. package/dist/index.js +247 -75
  49. package/dist/index.js.map +1 -1
  50. package/dist/init-56QC5QVX.js +53 -0
  51. package/dist/logs-4ISTWUWV.js +12 -0
  52. package/dist/msg-4ELI7Q52.js +9 -0
  53. package/dist/opencode-3S4VDXRG.js +2 -0
  54. package/dist/{opencode-FAMPSA6X.js → opencode-ULT6DYCT.js} +6 -5
  55. package/dist/opencode-ULT6DYCT.js.map +1 -0
  56. package/dist/orchestrator-6XH2TY3T.js +6 -0
  57. package/dist/{orchestrator-X2CWGFCL.js.map → orchestrator-6XH2TY3T.js.map} +1 -1
  58. package/dist/orchestrator-DRITPUWT.js +13 -0
  59. package/dist/org-WAK3CDPG.js +3 -0
  60. package/dist/process-manager-33H27MQF.js +2 -0
  61. package/dist/registry-BO2PPRNG.js +2 -0
  62. package/dist/run-NE5E4JPW.js +3 -0
  63. package/dist/shell-OBHIVC2H.js +2 -0
  64. package/dist/{shell-NJNW3O6K.js → shell-UXEJRK3D.js} +4 -4
  65. package/dist/{shell-NJNW3O6K.js.map → shell-UXEJRK3D.js.map} +1 -1
  66. package/dist/shop-picker-LE3SKFOX.js +5 -0
  67. package/dist/status-NYHZ7Q5G.js +2 -0
  68. package/dist/task-JUS5OZJR.js +20 -0
  69. package/dist/team-VCJSUDWX.js +4 -0
  70. package/dist/template-engine-42PKL5KD.js +2 -0
  71. package/dist/tui-R6LXKKSH.js +2 -0
  72. package/dist/update-FFKCOV63.js +2 -0
  73. package/dist/update-check-HGMBDYHL.js +2 -0
  74. package/dist/{workspace-manager-EVD67GCG.js → workspace-manager-ABXFBL2A.js} +3 -3
  75. package/dist/{workspace-manager-EVD67GCG.js.map → workspace-manager-ABXFBL2A.js.map} +1 -1
  76. package/dist/workspace-manager-Q6WWXSTR.js +3 -0
  77. package/package.json +1 -1
  78. package/readme.md +5 -5
  79. package/dist/App-GJVTVGRU.js +0 -6717
  80. package/dist/agent-7ZJ3ZDJ7.js +0 -183
  81. package/dist/agent-shop-YN2BSLHM.js +0 -2
  82. package/dist/chunk-2C2TFQ7K.js +0 -136
  83. package/dist/chunk-45K2XID7.js +0 -29
  84. package/dist/chunk-4IFIOMCW.js +0 -86
  85. package/dist/chunk-7X2GI5OV.js +0 -181
  86. package/dist/chunk-C6XZ3FJT.js.map +0 -1
  87. package/dist/chunk-CHIP7O6V.js +0 -83
  88. package/dist/chunk-FRTKB575.js +0 -87
  89. package/dist/chunk-HXYAZGLP.js +0 -15
  90. package/dist/chunk-I3SMISEF.js +0 -29
  91. package/dist/chunk-K6DMQERQ.js +0 -89
  92. package/dist/chunk-LV6GDBBI.js +0 -297
  93. package/dist/chunk-MGGSRXWJ.js +0 -69
  94. package/dist/chunk-O2OQCSBL.js.map +0 -1
  95. package/dist/chunk-P6ATSXGL.js +0 -107
  96. package/dist/chunk-PNE6LQRF.js +0 -5
  97. package/dist/chunk-U2VDNUZL.js +0 -52
  98. package/dist/chunk-UIJYU3J7.js.map +0 -1
  99. package/dist/chunk-VXS2CJFH.js +0 -273
  100. package/dist/chunk-XDVMX2FO.js +0 -8
  101. package/dist/chunk-XDVMX2FO.js.map +0 -1
  102. package/dist/chunk-XJTJ2TJV.js +0 -221
  103. package/dist/claude-ZUEKJJ4X.js +0 -5
  104. package/dist/clipboard-service-RTDUUQQU.js +0 -200
  105. package/dist/codex-7IXXXG5U.js +0 -123
  106. package/dist/config-OTAVSMOD.js +0 -75
  107. package/dist/container-RY54L3XC.js +0 -1596
  108. package/dist/context-OL4BVUV5.js +0 -83
  109. package/dist/cursor-622RBRHH.js +0 -97
  110. package/dist/doctor-XSGQSD57.js +0 -67
  111. package/dist/doctor-service-TPOMFAIG.js +0 -2
  112. package/dist/goal-FMYYN2FR.js +0 -138
  113. package/dist/init-45BEMVL6.js +0 -199
  114. package/dist/logs-PHPYWQ6I.js +0 -207
  115. package/dist/msg-FUWWLEKM.js +0 -95
  116. package/dist/opencode-FAMPSA6X.js.map +0 -1
  117. package/dist/opencode-WOR53TSC.js +0 -98
  118. package/dist/orchestrator-O6MFMATT.js +0 -1448
  119. package/dist/orchestrator-X2CWGFCL.js +0 -5
  120. package/dist/process-manager-HUVNAPQV.js +0 -2
  121. package/dist/registry-PQWRVNF2.js +0 -2
  122. package/dist/run-N72G5V2H.js +0 -95
  123. package/dist/shell-DVFHHYAZ.js +0 -5
  124. package/dist/shop-picker-2HY67UWP.js +0 -79
  125. package/dist/status-RZWN2C6C.js +0 -56
  126. package/dist/task-5EL2RNGW.js +0 -221
  127. package/dist/team-PFLP4PPL.js +0 -97
  128. package/dist/template-engine-AWIS56BL.js +0 -3
  129. package/dist/tui-LN5XHSQY.js +0 -245
  130. package/dist/update-YLP7FPNY.js +0 -64
  131. package/dist/update-check-4YKLGBFB.js +0 -2
  132. package/dist/workspace-manager-JM6U7JOH.js +0 -215
@@ -1,200 +0,0 @@
1
- #!/usr/bin/env node
2
- import { OrchestryError } from './chunk-2C2TFQ7K.js';
3
- import { execFile as execFile$1, execFileSync } from 'child_process';
4
- import { promisify } from 'util';
5
- import { mkdtemp, readFile, unlink, rm } from 'fs/promises';
6
- import { tmpdir } from 'os';
7
- import { join } from 'path';
8
-
9
- var execFile = promisify(execFile$1);
10
- var EXEC_TIMEOUT_MS = 3e3;
11
- function isClipboardToolAvailable() {
12
- const platform = process.platform;
13
- if (platform === "darwin") {
14
- return true;
15
- }
16
- if (platform === "linux") {
17
- try {
18
- execFileSync("which", ["xclip"], { timeout: EXEC_TIMEOUT_MS, stdio: "ignore" });
19
- return true;
20
- } catch {
21
- return false;
22
- }
23
- }
24
- if (platform === "win32") {
25
- return true;
26
- }
27
- return false;
28
- }
29
- async function detectClipboardType() {
30
- const platform = process.platform;
31
- if (platform === "darwin") {
32
- return detectMacOS();
33
- }
34
- if (platform === "linux") {
35
- return detectLinux();
36
- }
37
- if (platform === "win32") {
38
- return detectWindows();
39
- }
40
- throw new OrchestryError(
41
- `Unsupported platform for clipboard: ${platform}`,
42
- 1,
43
- "Supported: macOS, Linux, Windows"
44
- );
45
- }
46
- async function getClipboardImage() {
47
- const type = await detectClipboardType();
48
- if (type !== "image") return null;
49
- const platform = process.platform;
50
- if (platform === "darwin") {
51
- return getImageMacOS();
52
- }
53
- if (platform === "linux") {
54
- return getImageLinux();
55
- }
56
- if (platform === "win32") {
57
- return getImageWindows();
58
- }
59
- return null;
60
- }
61
- async function detectMacOS() {
62
- try {
63
- const { stdout } = await execFile("osascript", ["-e", "clipboard info"], {
64
- timeout: EXEC_TIMEOUT_MS
65
- });
66
- if (stdout.includes("\xABclass PNGf\xBB") || stdout.includes("\xABclass TIFF\xBB")) {
67
- return "image";
68
- }
69
- if (stdout.includes("\xABclass ut16\xBB") || stdout.includes("\xABclass utf8\xBB")) {
70
- return "text";
71
- }
72
- return stdout.trim().length > 0 ? "text" : "empty";
73
- } catch {
74
- return "empty";
75
- }
76
- }
77
- async function getImageMacOS() {
78
- const dir = await mkdtemp(join(tmpdir(), "orch-clip-"));
79
- const filePath = join(dir, "clipboard.png");
80
- try {
81
- const script = `
82
- set theFile to POSIX file "${filePath}"
83
- try
84
- set imgData to the clipboard as \xABclass PNGf\xBB
85
- set fRef to open for access theFile with write permission
86
- write imgData to fRef
87
- close access fRef
88
- return "ok"
89
- on error
90
- try
91
- close access theFile
92
- end try
93
- return "error"
94
- end try
95
- `;
96
- const { stdout } = await execFile("osascript", ["-e", script], {
97
- timeout: EXEC_TIMEOUT_MS
98
- });
99
- if (stdout.trim() !== "ok") return null;
100
- const data = await readFile(filePath);
101
- return { data, ext: "png" };
102
- } catch {
103
- return null;
104
- } finally {
105
- try {
106
- await unlink(filePath);
107
- } catch {
108
- }
109
- try {
110
- await rm(dir, { recursive: true });
111
- } catch {
112
- }
113
- }
114
- }
115
- async function detectLinux() {
116
- try {
117
- const { stdout } = await execFile(
118
- "xclip",
119
- ["-selection", "clipboard", "-t", "TARGETS", "-o"],
120
- { timeout: EXEC_TIMEOUT_MS }
121
- );
122
- const targets = stdout.toLowerCase();
123
- if (targets.includes("image/png") || targets.includes("image/tiff") || targets.includes("image/jpeg")) {
124
- return "image";
125
- }
126
- if (targets.includes("text/plain") || targets.includes("utf8_string") || targets.includes("string")) {
127
- return "text";
128
- }
129
- return targets.trim().length > 0 ? "text" : "empty";
130
- } catch {
131
- return "empty";
132
- }
133
- }
134
- async function getImageLinux() {
135
- try {
136
- const { stdout } = await execFile(
137
- "xclip",
138
- ["-selection", "clipboard", "-t", "image/png", "-o"],
139
- { timeout: EXEC_TIMEOUT_MS, encoding: "buffer", maxBuffer: 50 * 1024 * 1024 }
140
- );
141
- const data = Buffer.isBuffer(stdout) ? stdout : Buffer.from(stdout, "binary");
142
- if (data.length === 0) return null;
143
- return { data, ext: "png" };
144
- } catch {
145
- return null;
146
- }
147
- }
148
- async function detectWindows() {
149
- try {
150
- const { stdout: imgCheck } = await execFile(
151
- "powershell",
152
- ["-NoProfile", "-Command", 'if (Get-Clipboard -Format Image) { "image" } else { "none" }'],
153
- { timeout: EXEC_TIMEOUT_MS }
154
- );
155
- if (imgCheck.trim() === "image") return "image";
156
- const { stdout: textCheck } = await execFile(
157
- "powershell",
158
- ["-NoProfile", "-Command", 'if (Get-Clipboard) { "text" } else { "empty" }'],
159
- { timeout: EXEC_TIMEOUT_MS }
160
- );
161
- return textCheck.trim() === "text" ? "text" : "empty";
162
- } catch {
163
- return "empty";
164
- }
165
- }
166
- async function getImageWindows() {
167
- const dir = await mkdtemp(join(tmpdir(), "orch-clip-"));
168
- const filePath = join(dir, "clipboard.png");
169
- try {
170
- const script = `
171
- Add-Type -AssemblyName System.Windows.Forms
172
- $img = [System.Windows.Forms.Clipboard]::GetImage()
173
- if ($img) {
174
- $img.Save('${filePath.replace(/\\/g, "\\\\")}', [System.Drawing.Imaging.ImageFormat]::Png)
175
- Write-Output 'ok'
176
- } else {
177
- Write-Output 'error'
178
- }
179
- `;
180
- const { stdout } = await execFile("powershell", ["-NoProfile", "-Command", script], {
181
- timeout: EXEC_TIMEOUT_MS
182
- });
183
- if (stdout.trim() !== "ok") return null;
184
- const data = await readFile(filePath);
185
- return { data, ext: "png" };
186
- } catch {
187
- return null;
188
- } finally {
189
- try {
190
- await unlink(filePath);
191
- } catch {
192
- }
193
- try {
194
- await rm(dir, { recursive: true });
195
- } catch {
196
- }
197
- }
198
- }
199
-
200
- export { detectClipboardType, getClipboardImage, isClipboardToolAvailable };
@@ -1,123 +0,0 @@
1
- #!/usr/bin/env node
2
- import { buildFullPrompt, createStreamingEvents, extractTokens } from './chunk-MGGSRXWJ.js';
3
- import { classifyAdapterError } from './chunk-2C2TFQ7K.js';
4
- import './chunk-CHIP7O6V.js';
5
- import { execFile } from 'child_process';
6
- import { promisify } from 'util';
7
-
8
- var execFileAsync = promisify(execFile);
9
- var CodexAdapter = class {
10
- constructor(processManager) {
11
- this.processManager = processManager;
12
- }
13
- kind = "codex";
14
- async test() {
15
- try {
16
- const { stdout } = await execFileAsync("codex", ["--version"]);
17
- return { ok: true, version: stdout.trim() };
18
- } catch (err) {
19
- const msg = err instanceof Error ? err.message : String(err);
20
- return {
21
- ok: false,
22
- error: "Codex CLI not found. Install: npm i -g @openai/codex",
23
- errorKind: classifyAdapterError(msg)
24
- };
25
- }
26
- }
27
- execute(params) {
28
- const args = [
29
- "exec",
30
- "--json",
31
- "--sandbox",
32
- "danger-full-access"
33
- // autonomous agents can't respond to approval prompts
34
- ];
35
- if (params.config.model) {
36
- args.push("--model", params.config.model);
37
- }
38
- args.push("-");
39
- const { process: proc, pid } = this.processManager.spawn("codex", args, {
40
- cwd: params.workspace,
41
- env: { ...process.env, ...params.env },
42
- signal: params.signal,
43
- stdio: ["pipe", "pipe", "pipe"]
44
- // stdin must be 'pipe' to send prompt
45
- });
46
- if (proc.stdin) {
47
- proc.stdin.write(buildFullPrompt(params.systemPrompt, params.prompt));
48
- proc.stdin.end();
49
- }
50
- const events = createStreamingEvents(proc, parseCodexEvent, "Codex", params.signal);
51
- return { pid, events };
52
- }
53
- async stop(pid) {
54
- await this.processManager.killWithGrace(pid);
55
- }
56
- };
57
- function parseCodexEvent(line) {
58
- if (!line.trim()) return null;
59
- try {
60
- const parsed = JSON.parse(line);
61
- const timestamp = (/* @__PURE__ */ new Date()).toISOString();
62
- const type = parsed.type ?? "";
63
- switch (type) {
64
- // Thread/session started
65
- case "thread.started":
66
- return { type: "output", timestamp, data: parsed };
67
- // Turn lifecycle
68
- case "turn.started":
69
- return { type: "output", timestamp, data: parsed };
70
- case "turn.completed": {
71
- const tokens = extractTokens(parsed);
72
- return { type: "done", timestamp, data: parsed, tokens };
73
- }
74
- case "turn.failed": {
75
- const tokens = extractTokens(parsed);
76
- const failMsg = typeof parsed.error === "string" ? parsed.error : JSON.stringify(parsed);
77
- return { type: "error", timestamp, data: parsed, tokens, errorKind: classifyAdapterError(failMsg) };
78
- }
79
- // Item events
80
- case "item.started":
81
- case "item.completed": {
82
- const item = parsed.item ?? {};
83
- const itemType = item.type ?? "";
84
- if (itemType === "agent_message") {
85
- return { type: "output", timestamp, data: item };
86
- }
87
- if (itemType === "reasoning") {
88
- return { type: "output", timestamp, data: item };
89
- }
90
- if (itemType === "command_execution") {
91
- return { type: "command", timestamp, data: item };
92
- }
93
- if (itemType === "file_change") {
94
- const changes = Array.isArray(item.changes) ? item.changes : [];
95
- const paths = changes.map((c) => typeof c.path === "string" ? c.path : "").filter(Boolean);
96
- return { type: "file_change", timestamp, data: { paths, raw: item } };
97
- }
98
- if (itemType === "tool_use") {
99
- return { type: "tool_call", timestamp, data: item };
100
- }
101
- if (itemType === "tool_result") {
102
- return { type: "output", timestamp, data: item };
103
- }
104
- if (itemType === "error") {
105
- const itemErrMsg = typeof item.message === "string" ? item.message : JSON.stringify(item);
106
- return { type: "error", timestamp, data: item, errorKind: classifyAdapterError(itemErrMsg) };
107
- }
108
- return { type: "output", timestamp, data: item };
109
- }
110
- case "error": {
111
- const errData = parsed.error ?? parsed;
112
- const errMsg = typeof errData === "string" ? errData : JSON.stringify(errData);
113
- return { type: "error", timestamp, data: errData, errorKind: classifyAdapterError(errMsg) };
114
- }
115
- default:
116
- return { type: "output", timestamp, data: parsed };
117
- }
118
- } catch {
119
- return { type: "output", timestamp: (/* @__PURE__ */ new Date()).toISOString(), data: line };
120
- }
121
- }
122
-
123
- export { CodexAdapter };
@@ -1,75 +0,0 @@
1
- #!/usr/bin/env node
2
- import { dim, printSuccess, printError } from './chunk-7X2GI5OV.js';
3
- import { spawn } from 'child_process';
4
-
5
- var VALID_FILTER_PRESETS = ["all", "text", "tools", "errors", "events"];
6
- function registerConfigCommand(program, container) {
7
- const config = program.command("config").description("Manage configuration");
8
- config.command("get <key>").description("Get a config value (dot notation)").action(async (key) => {
9
- await container.paths.requireInit();
10
- const value = await container.configStore.get(key);
11
- if (container.context.json) {
12
- console.log(JSON.stringify({ key, value }));
13
- } else {
14
- console.log(` ${dim(key)} = ${JSON.stringify(value)}`);
15
- }
16
- });
17
- config.command("set <key> <value>").description("Set a config value (dot notation)").action(async (key, value) => {
18
- await container.paths.requireInit();
19
- let parsed;
20
- try {
21
- parsed = JSON.parse(value);
22
- } catch {
23
- parsed = value;
24
- }
25
- await container.configStore.set(key, parsed);
26
- printSuccess(`${key} = ${JSON.stringify(parsed)}`);
27
- });
28
- config.command("edit").description("Open config.yml in $EDITOR").action(async () => {
29
- await container.paths.requireInit();
30
- const editor = process.env["EDITOR"] || process.env["VISUAL"] || "vi";
31
- const parts = editor.split(/\s+/);
32
- const child = spawn(parts[0], [...parts.slice(1), container.paths.configPath], {
33
- stdio: "inherit"
34
- });
35
- await new Promise((resolve, reject) => {
36
- child.on("close", (code) => {
37
- if (code === 0) resolve();
38
- else reject(new Error(`Editor exited with code ${code}`));
39
- });
40
- child.on("error", reject);
41
- });
42
- });
43
- const global = config.command("global").description("Manage global settings (~/.orchestry/global.yml)");
44
- global.command("get <key>").description("Get a global config value").action(async (key) => {
45
- const gc = await container.globalConfigStore.read();
46
- const value = key === "activity_filter" ? gc.tui.activity_filter : void 0;
47
- if (container.context.json) {
48
- console.log(JSON.stringify({ key, value }));
49
- } else {
50
- console.log(` ${dim(key)} = ${JSON.stringify(value)}`);
51
- }
52
- });
53
- global.command("set <key> <value>").description("Set a global config value").action(async (key, value) => {
54
- if (key === "activity_filter") {
55
- if (!VALID_FILTER_PRESETS.includes(value)) {
56
- printError(`Invalid value "${value}". Valid: ${VALID_FILTER_PRESETS.join(", ")}`);
57
- return;
58
- }
59
- await container.globalConfigStore.set("activity_filter", value);
60
- printSuccess(`${key} = ${value}`);
61
- } else {
62
- printError(`Unknown global config key: ${key}`);
63
- }
64
- });
65
- global.command("show").description("Show all global settings").action(async () => {
66
- const gc = await container.globalConfigStore.read();
67
- if (container.context.json) {
68
- console.log(JSON.stringify(gc));
69
- } else {
70
- console.log(` ${dim("tui.activity_filter")} = ${gc.tui.activity_filter}`);
71
- }
72
- });
73
- }
74
-
75
- export { registerConfigCommand };