@oxgeneral/orch 0.2.1 → 0.2.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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { DEFAULT_CONFIG } from './chunk-ED47GL3F.js';
3
3
  import { GOAL_STATUS_ORDER } from './chunk-HXYAZGLP.js';
4
- import { formatDuration, formatDurationSince } from './chunk-2VSAM7RH.js';
4
+ import { formatDuration, formatDurationSince } from './chunk-I5WEMARW.js';
5
5
  import React5, { useState, useEffect, useMemo, useRef, useCallback } from 'react';
6
6
  import { Box, Text, useApp, useStdout, useInput } from 'ink';
7
7
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -53,6 +53,7 @@ var DOT = "\xB7";
53
53
  var LOZENGE = "\u25C8";
54
54
  var STAR = "\u2605";
55
55
  var LOOP = "\u27F3";
56
+ var DIAMOND = "\u25C6";
56
57
  var TICK_INTERVAL = 120;
57
58
  var globalTick = 0;
58
59
  var timer = null;
@@ -579,7 +580,6 @@ var TABS = [
579
580
  { key: "A", id: "agents", label: "AGENTS" },
580
581
  { key: "L", id: "logs", label: "ACTIONS" }
581
582
  ];
582
- var DIAMOND = "\u25C6";
583
583
  var FILLED_CIRCLE = "\u25CF";
584
584
  var EMPTY_CIRCLE3 = "\u25CB";
585
585
  var CHECK4 = "\u2713";
@@ -1503,6 +1503,121 @@ function FormWizard({ title, steps, onComplete, onCancel, width, height }) {
1503
1503
  ] }) })
1504
1504
  ] });
1505
1505
  }
1506
+ var TL = "\u256D";
1507
+ var TR = "\u256E";
1508
+ var BL = "\u2570";
1509
+ var BR = "\u256F";
1510
+ var V = "\u2502";
1511
+ function Row({ children, cw }) {
1512
+ return /* @__PURE__ */ jsxs(Text, { children: [
1513
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.ghost, children: V }),
1514
+ /* @__PURE__ */ jsxs(Text, { children: [
1515
+ " ",
1516
+ children.padEnd(cw),
1517
+ " "
1518
+ ] }),
1519
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.ghost, children: V })
1520
+ ] });
1521
+ }
1522
+ function EmptyRow({ cw }) {
1523
+ return /* @__PURE__ */ jsx(Row, { cw, children: "" });
1524
+ }
1525
+ function OnboardingBox({ count, config, width }) {
1526
+ if (count >= 3) return null;
1527
+ const boxW = Math.min((width ?? 44) - 4, 50);
1528
+ const cw = boxW - 6;
1529
+ const hLine = LIGHT_RULE.repeat(boxW - 2);
1530
+ const topBorder = /* @__PURE__ */ jsxs(Text, { color: tuiColors.ghost, children: [
1531
+ TL,
1532
+ hLine,
1533
+ TR
1534
+ ] });
1535
+ const botBorder = /* @__PURE__ */ jsxs(Text, { color: tuiColors.ghost, children: [
1536
+ BL,
1537
+ hLine,
1538
+ BR
1539
+ ] });
1540
+ if (count > 0) {
1541
+ const hint = config.hints[0];
1542
+ const hintSuffix = hint ? ` ${hint.key} ${hint.label}` : "";
1543
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [
1544
+ topBorder,
1545
+ /* @__PURE__ */ jsxs(Text, { children: [
1546
+ /* @__PURE__ */ jsxs(Text, { color: tuiColors.ghost, children: [
1547
+ V,
1548
+ " "
1549
+ ] }),
1550
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.amber, children: DIAMOND }),
1551
+ /* @__PURE__ */ jsxs(Text, { color: tuiColors.silver, children: [
1552
+ " ",
1553
+ config.nudge.padEnd(cw - 2 - hintSuffix.length)
1554
+ ] }),
1555
+ hint && /* @__PURE__ */ jsxs(Fragment, { children: [
1556
+ /* @__PURE__ */ jsxs(Text, { color: tuiColors.amber, children: [
1557
+ " ",
1558
+ hint.key
1559
+ ] }),
1560
+ /* @__PURE__ */ jsxs(Text, { color: tuiColors.gray, children: [
1561
+ " ",
1562
+ hint.label
1563
+ ] })
1564
+ ] }),
1565
+ /* @__PURE__ */ jsx(Text, { children: " " }),
1566
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.ghost, children: V })
1567
+ ] }),
1568
+ botBorder
1569
+ ] });
1570
+ }
1571
+ const hintsLen = config.hints.reduce((acc, h, i) => acc + h.key.length + 1 + h.label.length + (i > 0 ? 3 : 0), 0);
1572
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, marginTop: 1, children: [
1573
+ topBorder,
1574
+ /* @__PURE__ */ jsx(EmptyRow, { cw }),
1575
+ /* @__PURE__ */ jsxs(Text, { children: [
1576
+ /* @__PURE__ */ jsxs(Text, { color: tuiColors.ghost, children: [
1577
+ V,
1578
+ " "
1579
+ ] }),
1580
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.amber, children: DIAMOND }),
1581
+ /* @__PURE__ */ jsxs(Text, { color: tuiColors.white, bold: true, children: [
1582
+ " ",
1583
+ config.title
1584
+ ] }),
1585
+ /* @__PURE__ */ jsx(Text, { children: " ".repeat(Math.max(0, cw - config.title.length - 2)) }),
1586
+ /* @__PURE__ */ jsx(Text, { children: " " }),
1587
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.ghost, children: V })
1588
+ ] }),
1589
+ /* @__PURE__ */ jsx(EmptyRow, { cw }),
1590
+ config.description.map((line, i) => /* @__PURE__ */ jsxs(Text, { children: [
1591
+ /* @__PURE__ */ jsxs(Text, { color: tuiColors.ghost, children: [
1592
+ V,
1593
+ " "
1594
+ ] }),
1595
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.silver, children: line.padEnd(cw) }),
1596
+ /* @__PURE__ */ jsx(Text, { children: " " }),
1597
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.ghost, children: V })
1598
+ ] }, i)),
1599
+ /* @__PURE__ */ jsx(EmptyRow, { cw }),
1600
+ /* @__PURE__ */ jsxs(Text, { children: [
1601
+ /* @__PURE__ */ jsxs(Text, { color: tuiColors.ghost, children: [
1602
+ V,
1603
+ " "
1604
+ ] }),
1605
+ config.hints.map((h, i) => /* @__PURE__ */ jsxs(React5.Fragment, { children: [
1606
+ i > 0 && /* @__PURE__ */ jsx(Text, { color: tuiColors.ghost, children: " " }),
1607
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.amber, children: h.key }),
1608
+ /* @__PURE__ */ jsxs(Text, { color: tuiColors.gray, children: [
1609
+ " ",
1610
+ h.label
1611
+ ] })
1612
+ ] }, i)),
1613
+ /* @__PURE__ */ jsx(Text, { children: " ".repeat(Math.max(0, cw - hintsLen)) }),
1614
+ /* @__PURE__ */ jsx(Text, { children: " " }),
1615
+ /* @__PURE__ */ jsx(Text, { color: tuiColors.ghost, children: V })
1616
+ ] }),
1617
+ /* @__PURE__ */ jsx(EmptyRow, { cw }),
1618
+ botBorder
1619
+ ] });
1620
+ }
1506
1621
 
1507
1622
  // src/tui/wizardConfigs.ts
1508
1623
  var CLAUDE_MODELS = [
@@ -1931,6 +2046,36 @@ var MAX_RUN_MAP_SIZE = 500;
1931
2046
  var MAX_DETAIL_LEN = 2048;
1932
2047
  var MAX_MESSAGES = 200;
1933
2048
  var RUNNABLE = /* @__PURE__ */ new Set(["todo", "failed", "cancelled"]);
2049
+ var ONBOARDING_GOALS = {
2050
+ title: "Goals",
2051
+ description: [
2052
+ "Define what your team should achieve.",
2053
+ "The orchestrator breaks goals into tasks",
2054
+ "and assigns them to agents automatically."
2055
+ ],
2056
+ hints: [{ key: "N", label: "new goal" }, { key: "/", label: "commands" }],
2057
+ nudge: "Add more goals to keep your team focused."
2058
+ };
2059
+ var ONBOARDING_TASKS = {
2060
+ title: "Tasks",
2061
+ description: [
2062
+ "Units of work dispatched to agents.",
2063
+ "Create them manually or let goals",
2064
+ "generate them automatically."
2065
+ ],
2066
+ hints: [{ key: "N", label: "new task" }, { key: "W", label: "start orchestrator" }],
2067
+ nudge: "Add more tasks to keep agents busy."
2068
+ };
2069
+ var ONBOARDING_AGENTS = {
2070
+ title: "Agents",
2071
+ description: [
2072
+ "AI workers that execute your tasks.",
2073
+ "Each agent uses an adapter (claude, codex,",
2074
+ "cursor, shell) and has its own role."
2075
+ ],
2076
+ hints: [{ key: "N", label: "new agent" }, { key: "W", label: "start orchestrator" }],
2077
+ nudge: "Add more agents to increase parallelism."
2078
+ };
1934
2079
  var LIFECYCLE_TAG_RE = /^\[[\w_]+\]$/;
1935
2080
  function classifyAgentSummary(summary) {
1936
2081
  if (LIFECYCLE_TAG_RE.test(summary)) return { msgType: "lifecycle", color: tuiColors.dim };
@@ -3765,7 +3910,7 @@ function App({
3765
3910
  agentNameMap
3766
3911
  }
3767
3912
  )
3768
- ] }) : null,
3913
+ ] }) : activeView === "goals" ? /* @__PURE__ */ jsx(OnboardingBox, { count: sortedGoals.length, config: ONBOARDING_GOALS, width: ruleW }) : activeView === "tasks" ? /* @__PURE__ */ jsx(OnboardingBox, { count: sortedTasks.length, config: ONBOARDING_TASKS, width: ruleW }) : activeView === "agents" ? /* @__PURE__ */ jsx(OnboardingBox, { count: sortedAgents.length, config: ONBOARDING_AGENTS, width: ruleW }) : null,
3769
3914
  /* @__PURE__ */ jsx(Box, { flexGrow: 1 }),
3770
3915
  /* @__PURE__ */ jsx(
3771
3916
  CommandBar,
@@ -3823,19 +3968,8 @@ function SuggestionsPanel({ suggestions, selectedIndex, height, width }) {
3823
3968
  }
3824
3969
  function GoalsContent({ goals, selectedIndex, scrollOffset = 0, height, width, showAddRow, agentNameMap }) {
3825
3970
  const addRowIndex = goals.length;
3826
- const totalItems = goals.length + (showAddRow ? 1 : 0);
3827
3971
  const visible = goals.slice(scrollOffset, scrollOffset + height);
3828
3972
  const addRowVisible = showAddRow && addRowIndex >= scrollOffset && addRowIndex < scrollOffset + height;
3829
- if (totalItems === 0 || goals.length === 0 && !showAddRow) {
3830
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, children: [
3831
- /* @__PURE__ */ jsx(Text, { children: " " }),
3832
- /* @__PURE__ */ jsxs(Text, { color: tuiColors.dim, children: [
3833
- " No goals yet. Press ",
3834
- /* @__PURE__ */ jsx(Text, { color: tuiColors.gray, bold: true, children: "N" }),
3835
- " to create one."
3836
- ] })
3837
- ] });
3838
- }
3839
3973
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", height, children: [
3840
3974
  visible.map((goal, i) => /* @__PURE__ */ jsx(Box, { paddingX: 2, children: /* @__PURE__ */ jsx(GoalRow, { goal, selected: i + scrollOffset === selectedIndex, width: width - 2, agentNameMap }) }, goal.id)),
3841
3975
  addRowVisible && /* @__PURE__ */ jsx(Box, { paddingX: 2, children: /* @__PURE__ */ jsxs(Text, { color: selectedIndex === addRowIndex ? tuiColors.amber : tuiColors.ghost, children: [
@@ -3872,20 +4006,9 @@ function TasksContent({ tasks, selectedIndex, scrollOffset = 0, height, width, s
3872
4006
  const hasShowAll = hiddenCount > 0;
3873
4007
  const showAllIndex = hasShowAll ? tasks.length : -1;
3874
4008
  const addRowIndex = tasks.length + (hasShowAll ? 1 : 0);
3875
- const totalItems = tasks.length + (hasShowAll ? 1 : 0) + (showAddRow ? 1 : 0);
3876
4009
  const visible = tasks.slice(scrollOffset, scrollOffset + height);
3877
4010
  const showAllVisible = hasShowAll && showAllIndex >= scrollOffset && showAllIndex < scrollOffset + height;
3878
4011
  const addRowVisible = showAddRow && addRowIndex >= scrollOffset && addRowIndex < scrollOffset + height;
3879
- if (totalItems === 0 || tasks.length === 0 && !showAddRow) {
3880
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, children: [
3881
- /* @__PURE__ */ jsx(Text, { children: " " }),
3882
- /* @__PURE__ */ jsxs(Text, { color: tuiColors.dim, children: [
3883
- " No tasks yet. Press ",
3884
- /* @__PURE__ */ jsx(Text, { color: tuiColors.gray, bold: true, children: "Enter" }),
3885
- " to create one."
3886
- ] })
3887
- ] });
3888
- }
3889
4012
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", height, children: [
3890
4013
  visible.map((task, i) => /* @__PURE__ */ jsx(Box, { paddingX: 2, children: /* @__PURE__ */ jsx(TaskRow, { task, selected: i + scrollOffset === selectedIndex, width: width - 2, agentNameMap }) }, task.id)),
3891
4014
  showAllVisible && /* @__PURE__ */ jsx(Box, { paddingX: 2, children: /* @__PURE__ */ jsxs(Text, { color: selectedIndex === showAllIndex ? tuiColors.amber : tuiColors.ghost, children: [
@@ -3919,16 +4042,6 @@ function AgentsContent({ agents, selectedIndex, scrollOffset = 0, height, width,
3919
4042
  const addRowIndex = agents.length;
3920
4043
  const visible = agents.slice(scrollOffset, scrollOffset + height);
3921
4044
  const addRowVisible = showAddRow && addRowIndex >= scrollOffset && addRowIndex < scrollOffset + height;
3922
- if (agents.length === 0 && !showAddRow) {
3923
- return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, children: [
3924
- /* @__PURE__ */ jsx(Text, { children: " " }),
3925
- /* @__PURE__ */ jsxs(Text, { color: tuiColors.dim, children: [
3926
- " No agents yet. Press ",
3927
- /* @__PURE__ */ jsx(Text, { color: tuiColors.gray, bold: true, children: "Enter" }),
3928
- " to create one."
3929
- ] })
3930
- ] });
3931
- }
3932
4045
  const hasTeams = activeTeamCount != null && activeTeamCount > 0;
3933
4046
  const teamLeadNameMap = /* @__PURE__ */ new Map();
3934
4047
  if (hasTeams && teamLeadSet && agentTeamMap) {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { agentToEditorContent, openInEditor, agentFromEditorContent } from './chunk-P6ATSXGL.js';
3
- import { printSuccess, agentName, dim, statusIcon, printTable, formatTokens, printKeyValue } from './chunk-2VSAM7RH.js';
3
+ import { printSuccess, agentName, dim, statusIcon, printTable, formatTokens, printKeyValue } from './chunk-I5WEMARW.js';
4
4
 
5
5
  // src/cli/commands/agent.ts
6
6
  function registerAgentCommand(program, container) {
@@ -163,4 +163,4 @@ function stripAnsi(str) {
163
163
  return str.replace(/\x1b\[[0-9;]*m/g, "");
164
164
  }
165
165
 
166
- export { agentName, amber, dim, filePath, formatDuration, formatDurationSince, formatTokens, getIcon, icons, printError, printKeyValue, printSuccess, printTable, printWarning, priorityLabel, setAsciiMode, setNoColor, statusIcon };
166
+ export { agentName, amber, dim, filePath, formatDuration, formatDurationSince, formatTokens, getIcon, printError, printKeyValue, printSuccess, printTable, printWarning, priorityLabel, setAsciiMode, setNoColor, statusIcon };
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
+ import { setAsciiMode, setNoColor, printError } from './chunk-I5WEMARW.js';
2
3
  import { findProjectRoot } from './chunk-VTA74YWX.js';
3
4
  import { OrchestryError, NotInitializedError } from './chunk-O5AO5QIR.js';
4
- import { setAsciiMode, setNoColor, printError } from './chunk-2VSAM7RH.js';
5
5
  import { Command } from 'commander';
6
6
 
7
7
  // src/cli/context.ts
@@ -20,58 +20,58 @@ function createContext(opts) {
20
20
  // src/bin/cli.ts
21
21
  var LIGHT_COMMANDS = {
22
22
  task: async (p, c) => {
23
- const m = await import('./task-NUCRHYW7.js');
23
+ const m = await import('./task-5OJTXW27.js');
24
24
  m.registerTaskCommand(p, c);
25
25
  },
26
26
  agent: async (p, c) => {
27
- const m = await import('./agent-J62U7ABO.js');
27
+ const m = await import('./agent-V5M2C3OC.js');
28
28
  m.registerAgentCommand(p, c);
29
29
  },
30
30
  status: async (p, c) => {
31
- const m = await import('./status-KIISF542.js');
31
+ const m = await import('./status-DTF7D3DV.js');
32
32
  m.registerStatusCommand(p, c);
33
33
  },
34
34
  logs: async (p, c) => {
35
- const m = await import('./logs-PYEKMQE2.js');
35
+ const m = await import('./logs-IAUAS5TX.js');
36
36
  m.registerLogsCommand(p, c);
37
37
  },
38
38
  config: async (p, c) => {
39
- const m = await import('./config-VN4MYHSY.js');
39
+ const m = await import('./config-LJFM55LN.js');
40
40
  m.registerConfigCommand(p, c);
41
41
  },
42
42
  context: async (p, c) => {
43
- const m = await import('./context-EPHCF34F.js');
43
+ const m = await import('./context-EPSDCJTU.js');
44
44
  m.registerContextCommand(p, c);
45
45
  },
46
46
  msg: async (p, c) => {
47
- const m = await import('./msg-BBIPCGDO.js');
47
+ const m = await import('./msg-SQWQLJP6.js');
48
48
  m.registerMsgCommand(p, c);
49
49
  },
50
50
  goal: async (p, c) => {
51
- const m = await import('./goal-KGAIM3ZK.js');
51
+ const m = await import('./goal-I56QP7HS.js');
52
52
  m.registerGoalCommand(p, c);
53
53
  },
54
54
  team: async (p, c) => {
55
- const m = await import('./team-IBUP5XV4.js');
55
+ const m = await import('./team-AISPLEJB.js');
56
56
  m.registerTeamCommand(p, c);
57
57
  }
58
58
  };
59
59
  var FULL_COMMANDS = {
60
60
  run: async (p, c) => {
61
- const m = await import('./run-4GSZFGQZ.js');
61
+ const m = await import('./run-PSZURVVL.js');
62
62
  m.registerRunCommand(p, c);
63
63
  },
64
64
  doctor: async (p, c) => {
65
- const m = await import('./doctor-BK46WCQ5.js');
65
+ const m = await import('./doctor-IO4PV4D6.js');
66
66
  m.registerDoctorCommand(p, c);
67
67
  },
68
68
  tui: async (p, c) => {
69
- const m = await import('./tui-WWZA73IO.js');
69
+ const m = await import('./tui-XDJE3IUA.js');
70
70
  m.registerTuiCommand(p, c);
71
71
  }
72
72
  };
73
73
  var program = new Command();
74
- program.name("orchestry").description("Agents Organizations \u2014 CLI orchestrator for AI agents").version("0.2.1").option("--json", "Output as JSON").option("--quiet", "Minimal output (IDs only)").option("--no-color", "Disable colors").option("--ascii", "ASCII-only output (no Unicode)").hook("preAction", async (thisCommand) => {
74
+ program.name("orchestry").description("Agents Organizations \u2014 CLI orchestrator for AI agents").version("0.2.3").option("--json", "Output as JSON").option("--quiet", "Minimal output (IDs only)").option("--no-color", "Disable colors").option("--ascii", "ASCII-only output (no Unicode)").hook("preAction", async (thisCommand) => {
75
75
  const opts = thisCommand.opts();
76
76
  if (opts.ascii) setAsciiMode(true);
77
77
  if (opts.color === false) setNoColor(true);
@@ -113,16 +113,16 @@ async function main() {
113
113
  return;
114
114
  }
115
115
  if (sub === "init") {
116
- const { registerInitCommand } = await import('./init-QBWCEDCI.js');
116
+ const { registerInitCommand } = await import('./init-BE5VKWOM.js');
117
117
  registerInitCommand(program);
118
118
  } else if (sub === "update") {
119
- const { registerUpdateCommand } = await import('./update-RJ4IYACQ.js');
119
+ const { registerUpdateCommand } = await import('./update-72GZMF65.js');
120
120
  registerUpdateCommand(program);
121
121
  }
122
122
  const needsFull = !sub || sub in FULL_COMMANDS;
123
+ const { buildFullContainer, buildLightContainer } = await import('./container-JV7TAUP5.js');
123
124
  try {
124
125
  if (needsFull) {
125
- const { buildFullContainer } = await import('./container-74P43KDY.js');
126
126
  const container = await buildFullContainer(context);
127
127
  const fullLoader = sub ? FULL_COMMANDS[sub] : void 0;
128
128
  if (fullLoader) {
@@ -137,7 +137,6 @@ async function main() {
137
137
  await lightLoader(program, container);
138
138
  }
139
139
  } else {
140
- const { buildLightContainer } = await import('./container-74P43KDY.js');
141
140
  const container = await buildLightContainer(context);
142
141
  const lightLoader = LIGHT_COMMANDS[sub];
143
142
  if (lightLoader) {
@@ -151,19 +150,15 @@ async function main() {
151
150
  } catch (err) {
152
151
  if (err instanceof NotInitializedError) {
153
152
  if (sub === "doctor") {
154
- const { registerDoctorCommand } = await import('./doctor-BK46WCQ5.js');
153
+ const { registerDoctorCommand } = await import('./doctor-IO4PV4D6.js');
155
154
  registerDoctorCommand(program);
156
155
  }
157
156
  if (process.argv.length <= 2) {
158
- const { dim } = await import('./output-5VQVCJ2K.js');
159
- console.log();
160
- console.log(` ${dim("orchestry")} \u2014 CLI orchestrator for AI agents`);
161
- console.log();
162
- console.log(` Get started:`);
163
- console.log(` $ orch init`);
164
- console.log();
165
- console.log(` ${dim("This will create .orchestry/ in the current directory.")}`);
166
- console.log();
157
+ const { runInit } = await import('./init-BE5VKWOM.js');
158
+ await runInit();
159
+ const freshContainer = await buildFullContainer(context);
160
+ await FULL_COMMANDS["tui"](program, freshContainer);
161
+ await program.parseAsync([...process.argv, "tui"]);
167
162
  return;
168
163
  }
169
164
  if (sub === "init" || sub === "doctor" || sub === "update") {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { dim, printSuccess, printError } from './chunk-2VSAM7RH.js';
2
+ import { dim, printSuccess, printError } from './chunk-I5WEMARW.js';
3
3
  import { spawn } from 'child_process';
4
4
 
5
5
  var VALID_FILTER_PRESETS = ["all", "text", "tools", "errors", "events"];
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { printSuccess, printError, dim, formatDurationSince, printTable } from './chunk-2VSAM7RH.js';
2
+ import { printSuccess, printError, dim, formatDurationSince, printTable } from './chunk-I5WEMARW.js';
3
3
 
4
4
  // src/cli/commands/context.ts
5
5
  function registerContextCommand(program, container) {
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { DoctorService } from './chunk-XI4TU6VU.js';
3
- import { Paths } from './chunk-VTA74YWX.js';
4
- import './chunk-O5AO5QIR.js';
5
- import { amber, getIcon, dim } from './chunk-2VSAM7RH.js';
3
+ import { amber, getIcon, dim } from './chunk-I5WEMARW.js';
6
4
  import { AdapterRegistry } from './chunk-45K2XID7.js';
7
5
  import { ClaudeAdapter } from './chunk-IRN2U2NE.js';
8
6
  import './chunk-TX7WOFCW.js';
9
7
  import { ShellAdapter } from './chunk-CIIE6LNG.js';
10
8
  import { ProcessManager } from './chunk-CHIP7O6V.js';
9
+ import { Paths } from './chunk-VTA74YWX.js';
10
+ import './chunk-O5AO5QIR.js';
11
11
  import chalk from 'chalk';
12
12
 
13
13
  function registerDoctorCommand(program, container) {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { GOAL_STATUSES } from './chunk-HXYAZGLP.js';
3
- import { printSuccess, dim, printTable, printKeyValue, printError } from './chunk-2VSAM7RH.js';
3
+ import { printSuccess, dim, printTable, printKeyValue, printError } from './chunk-I5WEMARW.js';
4
4
 
5
5
  // src/cli/commands/goal.ts
6
6
  var STATUS_ICON = {
@@ -2,9 +2,9 @@
2
2
  import { DEFAULT_PROMPT_TEMPLATE } from './chunk-HNKJ4IF7.js';
3
3
  import { DEFAULT_CONFIG } from './chunk-ED47GL3F.js';
4
4
  import './chunk-PNE6LQRF.js';
5
+ import { printWarning, printSuccess, dim } from './chunk-I5WEMARW.js';
5
6
  import { Paths, pathExists, ensureDir, writeYaml, atomicWrite } from './chunk-VTA74YWX.js';
6
7
  import './chunk-O5AO5QIR.js';
7
- import { printWarning, printSuccess, dim } from './chunk-2VSAM7RH.js';
8
8
  import path from 'path';
9
9
 
10
10
  // src/domain/default-agents.ts
@@ -75,78 +75,75 @@ function getDefaultAgents() {
75
75
  }
76
76
 
77
77
  // src/cli/commands/init.ts
78
+ async function runInit(opts = {}) {
79
+ const projectRoot = process.cwd();
80
+ const paths = new Paths(projectRoot);
81
+ if (await pathExists(paths.root)) {
82
+ printWarning("Already initialized");
83
+ return;
84
+ }
85
+ await Promise.all([
86
+ ensureDir(paths.tasksDir),
87
+ ensureDir(paths.agentsDir),
88
+ ensureDir(paths.goalsDir),
89
+ ensureDir(paths.runsDir),
90
+ ensureDir(paths.templatesDir),
91
+ ensureDir(paths.logsDir)
92
+ ]);
93
+ const config = { ...DEFAULT_CONFIG };
94
+ config.project.name = opts.name ?? path.basename(projectRoot);
95
+ const gitignoreContent = [
96
+ "# Runtime state",
97
+ "state.json",
98
+ "*.lock",
99
+ "",
100
+ "# Logs and runs",
101
+ "runs/",
102
+ "logs/",
103
+ "",
104
+ "# Agent workspaces",
105
+ "workspaces/"
106
+ ].join("\n") + "\n";
107
+ const excludeContent = [
108
+ ".orchestry",
109
+ "node_modules",
110
+ ".env",
111
+ ".env.*",
112
+ "dist",
113
+ "build",
114
+ ".next",
115
+ "__pycache__",
116
+ "*.pyc",
117
+ ".venv"
118
+ ].join("\n") + "\n";
119
+ const defaultAgents = getDefaultAgents();
120
+ await Promise.all([
121
+ writeYaml(paths.configPath, config),
122
+ atomicWrite(paths.gitignorePath, gitignoreContent),
123
+ atomicWrite(paths.workspaceExcludePath, excludeContent),
124
+ atomicWrite(paths.defaultTemplatePath(), DEFAULT_PROMPT_TEMPLATE),
125
+ ...defaultAgents.map((agent) => writeYaml(paths.agentPath(agent.id), agent))
126
+ ]);
127
+ console.log();
128
+ printSuccess("initialized");
129
+ console.log();
130
+ console.log(` Created ${dim(".orchestry/")}`);
131
+ console.log(` ${dim("\u251C\u2500\u2500")} config.yml`);
132
+ console.log(` ${dim("\u251C\u2500\u2500")} tasks/`);
133
+ console.log(` ${dim("\u251C\u2500\u2500")} agents/`);
134
+ for (const agent of defaultAgents) {
135
+ console.log(` ${dim("\u2502 \u2514\u2500\u2500")} ${agent.id}.yml ${dim(`(${agent.name})`)}`);
136
+ }
137
+ console.log(` ${dim("\u251C\u2500\u2500")} templates/default.md`);
138
+ console.log(` ${dim("\u2514\u2500\u2500")} .gitignore`);
139
+ console.log();
140
+ }
78
141
  function registerInitCommand(program) {
79
142
  program.command("init").description("Initialize .orchestry/ in the current directory").option("--name <name>", "Project name").action(async (opts) => {
80
- const projectRoot = process.cwd();
81
- const paths = new Paths(projectRoot);
82
- if (await pathExists(paths.root)) {
83
- printWarning("Already initialized");
84
- return;
85
- }
86
- await ensureDir(paths.tasksDir);
87
- await ensureDir(paths.agentsDir);
88
- await ensureDir(paths.goalsDir);
89
- await ensureDir(paths.runsDir);
90
- await ensureDir(paths.templatesDir);
91
- await ensureDir(paths.logsDir);
92
- const config = { ...DEFAULT_CONFIG };
93
- if (opts.name) {
94
- config.project.name = opts.name;
95
- } else {
96
- config.project.name = path.basename(projectRoot);
97
- }
98
- await writeYaml(paths.configPath, config);
99
- await atomicWrite(
100
- paths.gitignorePath,
101
- [
102
- "# Runtime state",
103
- "state.json",
104
- "*.lock",
105
- "",
106
- "# Logs and runs",
107
- "runs/",
108
- "logs/",
109
- "",
110
- "# Agent workspaces",
111
- "workspaces/"
112
- ].join("\n") + "\n"
113
- );
114
- await atomicWrite(
115
- paths.workspaceExcludePath,
116
- [
117
- ".orchestry",
118
- "node_modules",
119
- ".env",
120
- ".env.*",
121
- "dist",
122
- "build",
123
- ".next",
124
- "__pycache__",
125
- "*.pyc",
126
- ".venv"
127
- ].join("\n") + "\n"
128
- );
129
- await atomicWrite(paths.defaultTemplatePath(), DEFAULT_PROMPT_TEMPLATE);
130
- const defaultAgents = getDefaultAgents();
131
- await Promise.all(
132
- defaultAgents.map((agent) => writeYaml(paths.agentPath(agent.id), agent))
133
- );
134
- console.log();
135
- printSuccess("initialized");
136
- console.log();
137
- console.log(` Created ${dim(".orchestry/")}`);
138
- console.log(` ${dim("\u251C\u2500\u2500")} config.yml`);
139
- console.log(` ${dim("\u251C\u2500\u2500")} tasks/`);
140
- console.log(` ${dim("\u251C\u2500\u2500")} agents/`);
141
- for (const agent of defaultAgents) {
142
- console.log(` ${dim("\u2502 \u2514\u2500\u2500")} ${agent.id}.yml ${dim(`(${agent.name})`)}`);
143
- }
144
- console.log(` ${dim("\u251C\u2500\u2500")} templates/default.md`);
145
- console.log(` ${dim("\u2514\u2500\u2500")} .gitignore`);
146
- console.log();
143
+ await runInit(opts);
147
144
  console.log(` Next: ${dim('orch task add "Create backend agent" --assignee agt_creator')}`);
148
145
  console.log();
149
146
  });
150
147
  }
151
148
 
152
- export { registerInitCommand };
149
+ export { registerInitCommand, runInit };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
+ import { printError, dim, getIcon } from './chunk-I5WEMARW.js';
2
3
  import { InvalidArgumentsError } from './chunk-O5AO5QIR.js';
3
- import { printError, dim, getIcon } from './chunk-2VSAM7RH.js';
4
4
 
5
5
  // src/cli/commands/logs.ts
6
6
  function registerLogsCommand(program, container) {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { printSuccess, dim, formatDurationSince, printTable } from './chunk-2VSAM7RH.js';
2
+ import { printSuccess, dim, formatDurationSince, printTable } from './chunk-I5WEMARW.js';
3
3
 
4
4
  // src/cli/commands/msg.ts
5
5
  function registerMsgCommand(program, container) {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { printError, amber, printSuccess, dim, getIcon } from './chunk-2VSAM7RH.js';
2
+ import { printError, amber, printSuccess, dim, getIcon } from './chunk-I5WEMARW.js';
3
3
 
4
4
  // src/cli/commands/run.ts
5
5
  function registerRunCommand(program, container) {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { formatDurationSince, amber, dim, statusIcon, agentName, priorityLabel, formatTokens } from './chunk-2VSAM7RH.js';
2
+ import { formatDurationSince, amber, dim, statusIcon, agentName, priorityLabel, formatTokens } from './chunk-I5WEMARW.js';
3
3
 
4
4
  // src/cli/commands/status.ts
5
5
  function registerStatusCommand(program, container) {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { openInEditor, toEditorContent, fromEditorContent } from './chunk-P6ATSXGL.js';
3
- import { printSuccess, dim, formatDurationSince, statusIcon, priorityLabel, agentName, printTable, filePath, printKeyValue } from './chunk-2VSAM7RH.js';
3
+ import { printSuccess, dim, formatDurationSince, statusIcon, priorityLabel, agentName, printTable, filePath, printKeyValue } from './chunk-I5WEMARW.js';
4
4
 
5
5
  // src/cli/commands/task.ts
6
6
  function registerTaskCommand(program, container) {
@@ -181,7 +181,7 @@ function registerTaskCommand(program, container) {
181
181
  await container.paths.requireInit();
182
182
  const task2 = await container.taskService.get(id);
183
183
  if (task2.status === "in_progress") {
184
- const { buildFullContainer } = await import('./container-74P43KDY.js');
184
+ const { buildFullContainer } = await import('./container-JV7TAUP5.js');
185
185
  const full = await buildFullContainer(container.context);
186
186
  await full.orchestrator.cancelTask(id);
187
187
  } else {
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { printSuccess, dim, printTable, printKeyValue } from './chunk-2VSAM7RH.js';
2
+ import { printSuccess, dim, printTable, printKeyValue } from './chunk-I5WEMARW.js';
3
3
 
4
4
  // src/cli/commands/team.ts
5
5
  function registerTeamCommand(program, container) {
@@ -8,7 +8,7 @@ function registerTuiCommand(program, container) {
8
8
  const state = await container.stateStore.read();
9
9
  const { render } = await import('ink');
10
10
  const { createElement } = await import('react');
11
- const { App } = await import('./App-CPQPQTZU.js');
11
+ const { App } = await import('./App-KDZSTAMR.js');
12
12
  const onRunTask = async (taskId) => {
13
13
  await container.orchestrator.runTask(taskId);
14
14
  };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { checkForUpdateNow } from './chunk-6GFVB6EK.js';
3
- import { amber, dim } from './chunk-2VSAM7RH.js';
3
+ import { amber, dim } from './chunk-I5WEMARW.js';
4
4
  import { execFile } from 'child_process';
5
5
  import chalk from 'chalk';
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxgeneral/orch",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Agents Organizations — CLI orchestrator for AI agents",
5
5
  "type": "module",
6
6
  "engines": {
package/readme.md CHANGED
@@ -7,10 +7,10 @@
7
7
  <p align="center">
8
8
  <a href="https://github.com/oxgeneral/ORCH/stargazers"><img src="https://img.shields.io/github/stars/oxgeneral/ORCH?style=social" alt="GitHub Stars" /></a>
9
9
  <a href="https://landing-xi-murex.vercel.app/"><img src="https://img.shields.io/badge/website-landing-amber" alt="Website" /></a>
10
- <a href="https://github.com/oxgeneral/ORCH/packages"><img src="https://img.shields.io/badge/npm-@oxgeneral/orch-cb0000" alt="GitHub Packages" /></a>
10
+ <a href="https://www.npmjs.com/package/@oxgeneral/orch"><img src="https://img.shields.io/npm/v/@oxgeneral/orch?color=cb0000" alt="npm" /></a>
11
11
  <a href="#get-started-in-30-seconds"><img src="https://img.shields.io/badge/setup-one%20command-brightgreen" alt="One command setup" /></a>
12
12
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" /></a>
13
- <a href="#development"><img src="https://img.shields.io/badge/tests-844%20passing-brightgreen" alt="Tests" /></a>
13
+ <a href="#development"><img src="https://img.shields.io/badge/tests-851%20passing-brightgreen" alt="Tests" /></a>
14
14
  <a href="#architecture"><img src="https://img.shields.io/badge/TypeScript-strict-blue" alt="TypeScript strict" /></a>
15
15
  </p>
16
16
  </p>
@@ -53,27 +53,18 @@ One command. Three agents. Zero tab-switching.
53
53
 
54
54
  ## Get started in 30 seconds
55
55
 
56
- ### Option 1: Install from GitHub Packages
57
-
58
56
  ```bash
59
- npm install -g @oxgeneral/orch --registry=https://npm.pkg.github.com
60
-
61
- cd ~/your-project
62
- orch
57
+ npm install -g @oxgeneral/orch
63
58
  ```
64
59
 
65
- ### Option 2: Clone and build
60
+ Then go to your project and run:
66
61
 
67
62
  ```bash
68
- git clone https://github.com/oxgeneral/ORCH.git && cd ORCH
69
- npm install && npm run build
70
-
71
- # Go to your project and launch
72
63
  cd ~/your-project
73
64
  orch
74
65
  ```
75
66
 
76
- That's it. The TUI opens, you add agents and tasks right from the dashboard — no CLI memorization needed.
67
+ That's it. ORCH auto-initializes on first run, then opens the TUI dashboard — you add agents and tasks right from there.
77
68
 
78
69
  **Requirements:** Node.js >= 20
79
70
 
@@ -239,7 +230,7 @@ src/
239
230
  ```bash
240
231
  npm run dev # Run via tsx
241
232
  npm run build # Build ESM + DTS
242
- npm test # 844 tests via Vitest
233
+ npm test # 851 tests via Vitest
243
234
  npm run typecheck # Strict TypeScript
244
235
  ```
245
236
 
@@ -8,6 +8,7 @@
8
8
  // Skip in CI or non-interactive environments
9
9
  if (process.env.CI || !process.stderr.isTTY) process.exit(0);
10
10
 
11
+ // Color values synced with src/cli/output.ts colors map
11
12
  const dim = (s) => `\x1b[38;5;240m${s}\x1b[0m`;
12
13
  const bold = (s) => `\x1b[1m${s}\x1b[0m`;
13
14
  const green = (s) => `\x1b[38;5;72m${s}\x1b[0m`;
@@ -16,7 +17,6 @@ process.stderr.write(`
16
17
  ${green('✓')} ${bold('orchestry')} installed
17
18
 
18
19
  Get started:
19
- $ ${bold('orch init')} ${dim('— initialize project')}
20
- $ ${bold('orch')} ${dim('— open dashboard')}
20
+ $ ${bold('orch')}
21
21
 
22
22
  `);
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Usage: ./scripts/release.sh patch|minor|major
5
+ # Bumps version in package.json + cli.ts, commits, tags, and pushes.
6
+
7
+ BUMP="${1:?Usage: release.sh patch|minor|major}"
8
+
9
+ # Bump package.json version (no git tag from npm)
10
+ NEW_VERSION=$(npm version "$BUMP" --no-git-tag-version)
11
+ VERSION="${NEW_VERSION#v}"
12
+
13
+ # Sync version into cli.ts
14
+ sed -i.bak "s/\.version('[^']*')/\.version('${VERSION}')/" src/bin/cli.ts
15
+ rm -f src/bin/cli.ts.bak
16
+
17
+ # Sync version into landing
18
+ sed -i.bak "s/v[0-9]*\.[0-9]*\.[0-9]* — open source/v${VERSION} — open source/" landing/index.html
19
+ rm -f landing/index.html.bak
20
+
21
+ # Commit and tag
22
+ git add package.json package-lock.json src/bin/cli.ts
23
+ git add -f landing/index.html
24
+ git commit -m "Release ${NEW_VERSION}"
25
+ git tag "$NEW_VERSION"
26
+
27
+ echo ""
28
+ echo " ✓ ${NEW_VERSION}"
29
+ echo ""
30
+ echo " Push to publish:"
31
+ echo " git push && git push --tags"
32
+ echo ""
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export { agentName, amber, dim, filePath, formatDuration, formatDurationSince, formatTokens, getIcon, icons, printError, printKeyValue, printSuccess, printTable, printWarning, priorityLabel, setAsciiMode, setNoColor, statusIcon } from './chunk-2VSAM7RH.js';
@@ -3,9 +3,9 @@ import { DEFAULT_CONFIG } from './chunk-ED47GL3F.js';
3
3
  import { isGoalTerminal, GOAL_STATUS_ORDER } from './chunk-HXYAZGLP.js';
4
4
  import { canTransition, isTerminal } from './chunk-33QNTNR6.js';
5
5
  import { AUTONOMOUS_LABEL } from './chunk-PNE6LQRF.js';
6
+ import { readLines } from './chunk-CHIP7O6V.js';
6
7
  import { Paths, readYaml, writeYaml, ensureDir, listFiles, writeJson, readJson, appendJsonl, readJsonl, readJsonlTail, pathExists } from './chunk-VTA74YWX.js';
7
8
  import { InvalidArgumentsError, TeamNotFoundError, GoalNotFoundError, AgentNotFoundError, TaskNotFoundError, InvalidTransitionError } from './chunk-O5AO5QIR.js';
8
- import { readLines } from './chunk-CHIP7O6V.js';
9
9
  import fs, { mkdir } from 'fs/promises';
10
10
  import { createReadStream } from 'fs';
11
11
  import path from 'path';