tycono 0.3.45-beta.2 → 0.3.45-beta.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 (113) hide show
  1. package/README.md +191 -162
  2. package/bin/tycono.ts +42 -10
  3. package/package.json +21 -15
  4. package/packages/server/bin/cli.js +35 -0
  5. package/packages/server/bin/server.ts +183 -0
  6. package/{src → packages/server/src}/api/src/create-server.ts +11 -3
  7. package/{src → packages/server/src}/api/src/engine/agent-loop.ts +30 -7
  8. package/{src → packages/server/src}/api/src/engine/context-assembler.ts +122 -57
  9. package/{src → packages/server/src}/api/src/engine/llm-adapter.ts +10 -7
  10. package/{src → packages/server/src}/api/src/engine/org-tree.ts +43 -3
  11. package/{src → packages/server/src}/api/src/engine/runners/claude-cli.ts +37 -15
  12. package/{src → packages/server/src}/api/src/engine/runners/types.ts +6 -0
  13. package/{src → packages/server/src}/api/src/engine/tools/executor.ts +65 -9
  14. package/{src → packages/server/src}/api/src/routes/execute.ts +221 -17
  15. package/packages/server/src/api/src/services/claude-md-manager.ts +190 -0
  16. package/{src → packages/server/src}/api/src/services/company-config.ts +1 -0
  17. package/{src → packages/server/src}/api/src/services/digest-engine.ts +4 -1
  18. package/packages/server/src/api/src/services/dispatch-classifier.ts +179 -0
  19. package/{src → packages/server/src}/api/src/services/execution-manager.ts +227 -21
  20. package/{src → packages/server/src}/api/src/services/file-reader.ts +4 -1
  21. package/packages/server/src/api/src/services/preset-loader.ts +310 -0
  22. package/{src → packages/server/src}/api/src/services/supervisor-heartbeat.ts +89 -9
  23. package/{src → packages/server/src}/api/src/services/wave-multiplexer.ts +18 -8
  24. package/{src → packages/server/src}/api/src/services/wave-tracker.ts +25 -0
  25. package/packages/server/src/core/scaffolder.ts +620 -0
  26. package/{src → packages/server/src}/shared/types.ts +3 -1
  27. package/packages/server/templates/CLAUDE.md.tmpl +152 -0
  28. package/packages/server/templates/agentic-knowledge-base.md +355 -0
  29. package/src/api/src/services/claude-md-manager.ts +0 -94
  30. package/src/api/src/services/preset-loader.ts +0 -149
  31. package/templates/CLAUDE.md.tmpl +0 -239
  32. /package/{src/web → packages/pixel}/dist/assets/index-BJyiMGkM.js +0 -0
  33. /package/{src/web → packages/pixel}/dist/assets/index-BOuHc64o.css +0 -0
  34. /package/{src/web → packages/pixel}/dist/assets/index-DDPzbp9E.js +0 -0
  35. /package/{src/web → packages/pixel}/dist/assets/index-DVKWFwwK.css +0 -0
  36. /package/{src/web → packages/pixel}/dist/assets/preview-app-DZ6WxhDc.js +0 -0
  37. /package/{src/web → packages/pixel}/dist/index.html +0 -0
  38. /package/{src/web → packages/pixel}/dist/tyconoforge.js +0 -0
  39. /package/{src → packages/server/src}/api/package.json +0 -0
  40. /package/{src → packages/server/src}/api/src/create-app.ts +0 -0
  41. /package/{src → packages/server/src}/api/src/engine/authority-validator.ts +0 -0
  42. /package/{src → packages/server/src}/api/src/engine/index.ts +0 -0
  43. /package/{src → packages/server/src}/api/src/engine/knowledge-gate.ts +0 -0
  44. /package/{src → packages/server/src}/api/src/engine/role-lifecycle.ts +0 -0
  45. /package/{src → packages/server/src}/api/src/engine/runners/direct-api.ts +0 -0
  46. /package/{src → packages/server/src}/api/src/engine/runners/index.ts +0 -0
  47. /package/{src → packages/server/src}/api/src/engine/skill-template.ts +0 -0
  48. /package/{src → packages/server/src}/api/src/engine/tools/definitions.ts +0 -0
  49. /package/{src → packages/server/src}/api/src/routes/active-sessions.ts +0 -0
  50. /package/{src → packages/server/src}/api/src/routes/coins.ts +0 -0
  51. /package/{src → packages/server/src}/api/src/routes/company.ts +0 -0
  52. /package/{src → packages/server/src}/api/src/routes/cost.ts +0 -0
  53. /package/{src → packages/server/src}/api/src/routes/engine.ts +0 -0
  54. /package/{src → packages/server/src}/api/src/routes/git.ts +0 -0
  55. /package/{src → packages/server/src}/api/src/routes/knowledge.ts +0 -0
  56. /package/{src → packages/server/src}/api/src/routes/operations.ts +0 -0
  57. /package/{src → packages/server/src}/api/src/routes/preferences.ts +0 -0
  58. /package/{src → packages/server/src}/api/src/routes/presets.ts +0 -0
  59. /package/{src → packages/server/src}/api/src/routes/projects.ts +0 -0
  60. /package/{src → packages/server/src}/api/src/routes/quests.ts +0 -0
  61. /package/{src → packages/server/src}/api/src/routes/roles.ts +0 -0
  62. /package/{src → packages/server/src}/api/src/routes/save.ts +0 -0
  63. /package/{src → packages/server/src}/api/src/routes/sessions.ts +0 -0
  64. /package/{src → packages/server/src}/api/src/routes/setup.ts +0 -0
  65. /package/{src → packages/server/src}/api/src/routes/skills.ts +0 -0
  66. /package/{src → packages/server/src}/api/src/routes/speech.ts +0 -0
  67. /package/{src → packages/server/src}/api/src/routes/supervision.ts +0 -0
  68. /package/{src → packages/server/src}/api/src/routes/sync.ts +0 -0
  69. /package/{src → packages/server/src}/api/src/server.ts +0 -0
  70. /package/{src → packages/server/src}/api/src/services/activity-stream.ts +0 -0
  71. /package/{src → packages/server/src}/api/src/services/activity-tracker.ts +0 -0
  72. /package/{src → packages/server/src}/api/src/services/database.ts +0 -0
  73. /package/{src → packages/server/src}/api/src/services/git-save.ts +0 -0
  74. /package/{src → packages/server/src}/api/src/services/job-manager.ts +0 -0
  75. /package/{src → packages/server/src}/api/src/services/knowledge-importer.ts +0 -0
  76. /package/{src → packages/server/src}/api/src/services/markdown-parser.ts +0 -0
  77. /package/{src → packages/server/src}/api/src/services/port-registry.ts +0 -0
  78. /package/{src → packages/server/src}/api/src/services/preferences.ts +0 -0
  79. /package/{src → packages/server/src}/api/src/services/pricing.ts +0 -0
  80. /package/{src → packages/server/src}/api/src/services/scaffold.ts +0 -0
  81. /package/{src → packages/server/src}/api/src/services/session-store.ts +0 -0
  82. /package/{src → packages/server/src}/api/src/services/team-recommender.ts +0 -0
  83. /package/{src → packages/server/src}/api/src/services/token-ledger.ts +0 -0
  84. /package/{src → packages/server/src}/api/src/services/wave-messages.ts +0 -0
  85. /package/{src → packages/server/src}/api/src/utils/role-level.ts +0 -0
  86. /package/{templates → packages/server/templates}/company.md.tmpl +0 -0
  87. /package/{templates → packages/server/templates}/gitignore.tmpl +0 -0
  88. /package/{templates → packages/server/templates}/roles.md.tmpl +0 -0
  89. /package/{templates → packages/server/templates}/skills/_manifest.json +0 -0
  90. /package/{templates → packages/server/templates}/skills/agent-browser/SKILL.md +0 -0
  91. /package/{templates → packages/server/templates}/skills/agent-browser/meta.json +0 -0
  92. /package/{templates → packages/server/templates}/skills/akb-linter/SKILL.md +0 -0
  93. /package/{templates → packages/server/templates}/skills/akb-linter/meta.json +0 -0
  94. /package/{templates → packages/server/templates}/skills/knowledge-gate/SKILL.md +0 -0
  95. /package/{templates → packages/server/templates}/skills/knowledge-gate/meta.json +0 -0
  96. /package/{templates → packages/server/templates}/teams/agency.json +0 -0
  97. /package/{templates → packages/server/templates}/teams/research.json +0 -0
  98. /package/{templates → packages/server/templates}/teams/startup.json +0 -0
  99. /package/{src/tui → packages/tui/src}/api.ts +0 -0
  100. /package/{src/tui → packages/tui/src}/app.tsx +0 -0
  101. /package/{src/tui → packages/tui/src}/components/CommandMode.tsx +0 -0
  102. /package/{src/tui → packages/tui/src}/components/OrgTree.tsx +0 -0
  103. /package/{src/tui → packages/tui/src}/components/PanelMode.tsx +0 -0
  104. /package/{src/tui → packages/tui/src}/components/SetupWizard.tsx +0 -0
  105. /package/{src/tui → packages/tui/src}/components/StatusBar.tsx +0 -0
  106. /package/{src/tui → packages/tui/src}/components/StreamView.tsx +0 -0
  107. /package/{src/tui → packages/tui/src}/hooks/useApi.ts +0 -0
  108. /package/{src/tui → packages/tui/src}/hooks/useCommand.ts +0 -0
  109. /package/{src/tui → packages/tui/src}/hooks/useSSE.ts +0 -0
  110. /package/{src/tui → packages/tui/src}/index.tsx +0 -0
  111. /package/{src/tui → packages/tui/src}/store.ts +0 -0
  112. /package/{src/tui → packages/tui/src}/theme.ts +0 -0
  113. /package/{src/tui → packages/tui/src}/utils/markdown.tsx +0 -0
package/README.md CHANGED
@@ -1,107 +1,180 @@
1
- <p align="center">
2
- <strong>Cursor gives you one AI developer. Tycono gives you an AI team.</strong><br>
3
- <sub>Give one order. Watch your AI team plan, build, and learn together.</sub>
4
- </p>
1
+ # tycono
5
2
 
6
- <h1 align="center">tycono</h1>
3
+ AI Team Orchestration Engine
4
+
5
+ > Infrastructure-as-Code defines servers with a single YAML file.
6
+ > Company-as-Code defines an entire organization in code — and AI runs it.
7
7
 
8
8
  <p align="center">
9
9
  <a href="https://www.npmjs.com/package/tycono"><img src="https://img.shields.io/npm/v/tycono.svg" alt="npm version" /></a>
10
+ <a href="https://www.npmjs.com/package/tycono-server"><img src="https://img.shields.io/npm/v/tycono-server.svg" alt="server version" /></a>
10
11
  <a href="https://github.com/seongsu-kang/tycono/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/tycono.svg" alt="license" /></a>
11
- <a href="https://www.npmjs.com/package/tycono"><img src="https://img.shields.io/node/v/tycono.svg" alt="node version" /></a>
12
12
  </p>
13
13
 
14
- <p align="center">
15
- <a href="https://tycono.ai">Website</a> ·
16
- <a href="#quick-start">Quick Start</a> ·
17
- <a href="#how-it-works">How It Works</a> ·
18
- <a href="#company-as-code">Company-as-Code</a> ·
19
- <a href="CONTRIBUTING.md">Contributing</a>
20
- </p>
14
+ ### Real-World Results
15
+
16
+ A crypto trading research team ran **13.5 hours of autonomous AI research** with zero human intervention:
17
+
18
+ | Metric | Value |
19
+ |--------|-------|
20
+ | Duration | 13.5 hours, 0 human input |
21
+ | Sessions | 174 agent sessions |
22
+ | Hypotheses tested | 29 |
23
+ | Cost | **$54 total ($2.5/hypothesis)** |
24
+ | Critic catches | Prevented false-positive from reaching production |
25
+
26
+ Cost comparison: Solo agent $50/task vs Tycono **$4/wave** (down from $1,342 during beta).
21
27
 
22
28
  ---
23
29
 
24
- Cursor, Lovable, Bolt — they all give you **one AI agent**. It helps, but you still drive everything.
30
+ ## Philosophy
25
31
 
26
- **tycono** gives you an **AI team**. A CTO reviews architecture. Engineers write code. A PM breaks down tasks. QA catches bugs. You just give the order and watch them work.
32
+ ### Company as Code
27
33
 
28
- ```bash
29
- npx tycono
34
+ Define organizational structure, roles, authorities, and knowledge scopes in plain files. AI agents operate within this structure autonomously.
35
+
36
+ ```yaml
37
+ # role.yaml
38
+ id: engineer
39
+ name: "Alex"
40
+ level: member
41
+ reports_to: cto
42
+ model: claude-sonnet-4
43
+
44
+ authority:
45
+ autonomous:
46
+ - "Code implementation"
47
+ - "Bug fixes"
48
+ requires_approval:
49
+ - "Architecture changes"
50
+
51
+ knowledge_scope:
52
+ readable: ["projects/", "architecture/"]
53
+ writable: ["projects/*/technical/"]
30
54
  ```
31
55
 
56
+ One file defines who the agent is, what they can do, what they know, and who they report to.
57
+
58
+ Vision: `tycono deploy company.yaml` — deploy a company with one command.
59
+
60
+ ### Knowledge That Compounds
61
+
62
+ Every AI tool resets when the session ends. Tycono doesn't.
63
+
64
+ The **Agentic Knowledge Base (AKB)** is a file-based knowledge system where insights persist, compound, and cross-link over time.
65
+
32
66
  ```
33
- > Make a landing page for our product
34
-
35
- Supervisor started
36
- 💭 Analyzing the directive. I'll dispatch CTO for implementation and CBO for copy...
37
- cto 배정: Landing page structure + implementation
38
- → cbo 배정: Product messaging + copywriting
39
- → Read architecture/deployment.md
40
- → dispatch fe-engineer: Build responsive landing page
41
- cto ▶ Reviewing architecture for landing page...
42
- fe-engineer → Write src/landing/index.html
43
- 📄 Write src/landing/styles.css
44
- cbo ✓ done (5 turns)
45
- fe-engineer ✓ done (12 turns)
46
- ✓ Supervisor done (8 turns)
47
- >
67
+ 1. Pre-K Read existing knowledge before starting
68
+ 2. Task Define work from what the org already knows
69
+ 3. Execute Do the actual work
70
+ 4. Post-K Extract insights, cross-link, register in Hub
71
+ 5. Next Update status, identify next work
48
72
  ```
49
73
 
50
- ## Core Pillars
74
+ Session 50 is dramatically smarter than Session 1.
51
75
 
52
- ### 1. CEO Supervisor — Org-chart orchestration
76
+ ### Multi-Agent Supervision
53
77
 
54
- You give one order. The system dispatches through a real hierarchy.
78
+ Not a black box. You watch the entire hierarchy work in real time.
55
79
 
56
- CEO delegates to C-levels, C-levels dispatch to their teams. Authority is enforced — engineers can't make CEO decisions, PMs can't merge code.
80
+ ```
81
+ dispatch CEO assigns CTO. CTO assigns Engineer.
82
+ watch Heartbeat monitors progress in real time.
83
+ react If direction drifts, supervisor sends amend.
84
+ repeat Until the wave is complete.
85
+ ```
57
86
 
58
- **Dual Mode**: Simple questions get answered directly (no team dispatch). Work tasks activate the full team. The system judges automatically.
87
+ Authority is enforced engineers can't make CEO decisions, PMs can't merge code.
59
88
 
60
- ### 2. Multi-Wave — Parallel workspaces
89
+ ---
61
90
 
62
- Multiple persistent conversations, each with its own team context.
91
+ ## Key Features (v0.1.0)
63
92
 
64
- ```
65
- /new Build the API → Wave 1 (CTO + Engineers working)
66
- /new Write documentation → Wave 2 (CBO + Writer working)
67
- /focus 1 → Switch to Wave 1
93
+ ### Auto-Amend — 70% cost reduction
94
+
95
+ When a subordinate needs follow-up work, Tycono automatically continues the existing session instead of creating an expensive new one. A Haiku classifier decides whether each dispatch is a follow-up (amend) or genuinely new work (dispatch).
96
+
97
+ ### Dispatch Protocol
98
+
99
+ Fire-and-forget async dispatch with real-time supervision. `dispatch:start` and `dispatch:done` events flow between parent and child sessions. Supervisors use heartbeat watch for progress monitoring.
100
+
101
+ ### Handoff Summary
102
+
103
+ When the same role is re-dispatched, previous session results are automatically injected into the new context. No starting from scratch.
104
+
105
+ ### Prompt Caching
106
+
107
+ System prompt sections are tagged as cacheable/dynamic. Static sections (role definition, skills, org structure) get `cache_control` for up to 90% input cost reduction on the Direct API runner.
108
+
109
+ ### Active Wave Guard
110
+
111
+ Server shutdown checks for running waves before killing. Non-interactive environments block concurrent wave launches. Prevents data loss from accidental server kills.
112
+
113
+ ### Critic Role
114
+
115
+ A Devil's Advocate role that challenges team conclusions. In production, a Critic caught a false-positive test result that would have been deployed, and blocked a diminishing-returns research loop.
116
+
117
+ ---
118
+
119
+ ## Surfaces
120
+
121
+ One engine, three interfaces.
122
+
123
+ ### Plugin (Claude Code)
124
+
125
+ Install the plugin and run AI teams directly inside Claude Code.
126
+
127
+ ```bash
128
+ claude plugin install tycono
129
+ /tycono "Build a landing page"
130
+ /tycono --agency gamedev "Build a tower defense"
68
131
  ```
69
132
 
70
- Tab Panel Mode: wave-scoped org tree, real-time stream, docs browser.
133
+ ### TUI (Terminal)
71
134
 
72
- ### 3. Observability See everything
135
+ Terminal-native dashboard with multi-wave workspaces, real-time agent streams, and org tree visualization.
73
136
 
137
+ ```bash
138
+ npx tycono
74
139
  ```
75
- Tab → Panel Mode
76
140
 
141
+ ```
77
142
  ┌── W1 Build the API ──────┬── Stream Docs Info ──────────────┐
78
143
  │ 3 sessions │ cto → dispatch engineer │
79
144
  │ ── Org Tree ── │ engineer → Write src/api/routes.ts│
80
- │ ● CEO │ engineer 📄 Write src/api/types.ts
81
- │ ├─ ● CTO │ qa ▶ Running test suite... │
145
+ │ ● CEO │ engineer Write src/api/types.ts
146
+ │ ├─ ● CTO │ qa ▶ Running test suite... │
82
147
  │ │ ├─ ● engineer │ │
83
148
  │ │ └─ ● qa │ │
84
149
  │ └─ ○ CBO │ │
85
- │ [1] [2*] │ │
86
150
  └───────────────────────────┴─────────────────────────────────────┘
87
151
  ```
88
152
 
89
- - **Wave-scoped** org tree shows only this wave's active agents
90
- - **Docs tab** — browse all .md files, ★ marks wave artifacts, Enter → vim
91
- - **Info tab** — wave metadata, sessions, ports
92
- - **Commands** — `/agents` `/sessions` `/kill` `/docs` `/read`
153
+ ### Pixel (Web Dashboard)
93
154
 
94
- ### 4. AKB Knowledge that compounds
155
+ Isometric pixel office visualization. Watch your AI team walk around, sit at desks, and collaborate visually.
95
156
 
96
- Every AI tool: `Plan → Execute → Done`. Knowledge resets. Tycono adds:
157
+ **Coming Soon** at [tycono.ai](https://tycono.ai)
97
158
 
98
- ```
99
- Pre-K: Read existing knowledge Plan grounded in what the company knows
100
- Execute: Do the work
101
- Post-K: Extract insights → Cross-link → Register in knowledge graph
159
+ <p align="center">
160
+ <img src=".github/assets/hero-office.png" alt="Pixel office visualization" width="600" />
161
+ </p>
162
+
163
+ ---
164
+
165
+ ## Agencies
166
+
167
+ Pre-built team configurations for common workflows.
168
+
169
+ ```bash
170
+ /tycono --agency gamedev "Build a browser game"
171
+ /tycono --agency saas "Build an MVP for our SaaS"
172
+ /tycono --agency research "Analyze competitor landscape"
102
173
  ```
103
174
 
104
- Session 50 is dramatically smarter than session 1.
175
+ Browse all agencies at [tycono.ai/agencies](https://tycono.ai/agencies)
176
+
177
+ ---
105
178
 
106
179
  ## Quick Start
107
180
 
@@ -110,17 +183,49 @@ mkdir my-company && cd my-company
110
183
  npx tycono
111
184
  ```
112
185
 
113
- A setup wizard guides you through:
114
-
115
- 1. **Name your company** — set mission and domain
116
- 2. **Choose a team template** — Startup, Research, Agency, or Custom
117
- 3. **Start working** — type naturally, your AI team responds
186
+ A setup wizard guides you through naming your company, choosing a team template, and starting work.
118
187
 
119
188
  ### Requirements
120
189
 
121
190
  - Node.js >= 18
122
191
  - [Claude Code CLI](https://claude.ai/download) (recommended) or Anthropic API key
123
192
 
193
+ ---
194
+
195
+ ## Project Structure
196
+
197
+ This is a monorepo:
198
+
199
+ ```
200
+ tycono/
201
+ ├── src/
202
+ │ ├── api/ ← Core Engine (tycono server)
203
+ │ ├── tui/ ← TUI (terminal interface)
204
+ │ └── web/ ← Pixel (original web UI)
205
+ ├── packages/
206
+ │ ├── server/ ← npm: tycono-server
207
+ │ ├── plugin/ ← Claude Code Plugin
208
+ │ └── web/ ← Agency Hub (tycono.ai)
209
+ ├── .github/assets/ ← Screenshots
210
+ └── README.md
211
+ ```
212
+
213
+ ### Your Company Structure
214
+
215
+ When you run `npx tycono`, it scaffolds:
216
+
217
+ ```
218
+ your-company/
219
+ ├── CLAUDE.md ← AI operating rules
220
+ ├── roles/ ← AI role definitions (role.yaml + skills)
221
+ ├── projects/ ← Product specs, PRDs, and tasks
222
+ ├── architecture/ ← Technical decisions and designs
223
+ ├── knowledge/ ← Domain knowledge (compounds over time)
224
+ └── .tycono/ ← Config and preferences
225
+ ```
226
+
227
+ ---
228
+
124
229
  ## CLI
125
230
 
126
231
  ```bash
@@ -142,107 +247,33 @@ Type naturally to talk to your AI team.
142
247
  /agents Wave → Role → Session tree
143
248
  /sessions Sessions + ports
144
249
  /kill <id> Kill a session
145
- /cleanup Remove dead sessions
146
250
  /docs Files created in this wave
147
251
  /read <path> Preview file content
148
- /open <path> Open in $EDITOR (vim)
149
- /help Show help
150
- /quit Exit
151
-
252
+ /open <path> Open in $EDITOR
152
253
  Tab Panel Mode (org tree + stream + docs)
153
- 1-9 Switch wave (in Panel Mode)
154
- h/l Switch tab (Stream/Docs/Info)
155
- j/k Navigate
156
- Ctrl+C Quit
157
- ```
158
-
159
- ## Company-as-Code
160
-
161
- Just as Terraform turns `.tf` files into running infrastructure, Tycono turns YAML and Markdown into a running company.
162
-
163
- ```
164
- IaC CaC (Company-as-Code)
165
- ───────────────────── ─────────────────────
166
- .tf → servers role.yaml → org structure
167
- playbook → config CLAUDE.md → operating rules
168
- Dockerfile → containers skills/ → capabilities
169
- state file → infra state knowledge/ → org memory
170
- ```
171
-
172
- Your company is **versionable**, **reproducible**, and **forkable** — just like code.
173
-
174
- ## Your Company Structure
175
-
176
- ```
177
- your-company/
178
- ├── CLAUDE.md ← AI operating rules (auto-managed)
179
- ├── company/ ← Mission, vision, values
180
- ├── roles/ ← AI role definitions (role.yaml + skills)
181
- ├── projects/ ← Product specs, PRDs, and tasks
182
- ├── architecture/ ← Technical decisions and designs
183
- ├── operations/ ← Standups, decisions, wave history
184
- ├── knowledge/ ← Domain knowledge (compounds over time)
185
- └── .tycono/ ← Config and preferences
254
+ /quit Exit
186
255
  ```
187
256
 
188
- ## Team Templates
189
-
190
- | Template | Roles | Best For |
191
- |----------|-------|----------|
192
- | **Startup** | CTO + PM + Engineer + Designer + QA | Product development |
193
- | **Research** | Lead Researcher + Analyst + Writer | Analysis & reports |
194
- | **Agency** | Creative Director + Designer + Developer | Client projects |
195
- | **Custom** | Start empty, hire as you go | Full control |
196
-
197
- ## Why Tycono?
198
-
199
- | | Cursor / Lovable / Bolt | Tycono |
200
- |---|---|---|
201
- | **Agents** | 1 AI helps you | **AI team works for you** |
202
- | **Your role** | Keep directing | **Give one order, watch** |
203
- | **Knowledge** | Resets every session | **Compounds forever** |
204
- | **Quality** | You review everything | **QA agent catches bugs** |
205
- | **Scale** | 1 task at a time | **Parallel across roles** |
206
- | **Interface** | Editor / chat | **Terminal-native TUI** |
207
-
208
- ## Origin Story
209
-
210
- Tycono started as an AI office tycoon game — pixel characters walking around, sitting at desks, chatting in Slack-like channels. It was fun to watch.
257
+ ---
211
258
 
212
- But the agents underneath were actually useful. They wrote real code, real documents, made real decisions. The game UI was cute; the real value was the AI team.
259
+ ## Screenshots
213
260
 
214
- So we stripped the pixels and built a terminal tool. Same AI team, no game — just work.
261
+ <p align="center">
262
+ <img src=".github/assets/wave-center.png" alt="Wave center" width="600" />
263
+ <br><sub>Multi-wave workspace with real-time agent streams</sub>
264
+ </p>
215
265
 
216
- The pixel office lives on as `npx tycono --classic` — a reminder of where it started.
266
+ <p align="center">
267
+ <img src=".github/assets/knowledge-graph.png" alt="Knowledge graph" width="600" />
268
+ <br><sub>Knowledge graph visualization</sub>
269
+ </p>
217
270
 
218
271
  <p align="center">
219
- <img src=".github/assets/hero-office.png" alt="Where it started — pixel office" width="480" />
220
- <br>
221
- <sub>Where it started: an AI office tycoon game</sub>
272
+ <img src=".github/assets/pro-view.png" alt="Pro view" width="600" />
273
+ <br><sub>Pro view with detailed agent activity</sub>
222
274
  </p>
223
275
 
224
- ## Environment Variables
225
-
226
- | Variable | Description | Default |
227
- |----------|-------------|---------|
228
- | `ANTHROPIC_API_KEY` | Your Anthropic API key | — |
229
- | `PORT` | Server port | auto-detect |
230
- | `COMPANY_ROOT` | Company directory | current directory |
231
- | `EDITOR` | Editor for /open command | vim |
232
-
233
- ## Roadmap
234
-
235
- - [x] TUI — terminal-native interface (default)
236
- - [x] Multi-Wave — parallel persistent workspaces
237
- - [x] Dual Mode — direct answer vs team dispatch
238
- - [x] CEO Wave dispatch with org-tree targeting
239
- - [x] AKB — Pre-K / Post-K knowledge loop
240
- - [x] Port Registry for multi-agent isolation
241
- - [x] Session lifecycle persistence
242
- - [ ] Git worktree isolation per agent session
243
- - [ ] **Desktop app** (.dmg / .exe) — background execution, notifications
244
- - [ ] Multi-LLM support (OpenAI, local models)
245
- - [ ] Company Preset Marketplace
276
+ ---
246
277
 
247
278
  ## Development
248
279
 
@@ -257,12 +288,10 @@ cd src/web && npm install && cd ../..
257
288
  npm run dev
258
289
  ```
259
290
 
260
- ## License
261
-
262
- [MIT](LICENSE)
263
-
264
- ---
291
+ ## Links
265
292
 
266
- <p align="center">
267
- <sub>Built with Tycono. An AI company that builds itself.</sub>
268
- </p>
293
+ - Website: [tycono.ai](https://tycono.ai)
294
+ - Agencies: [tycono.ai/agencies](https://tycono.ai/agencies)
295
+ - npm: [tycono-server](https://www.npmjs.com/package/tycono-server)
296
+ - GitHub: [seongsu-kang/tycono](https://github.com/seongsu-kang/tycono)
297
+ - License: [MIT](LICENSE)
package/bin/tycono.ts CHANGED
@@ -20,6 +20,7 @@ function printHelp(): void {
20
20
 
21
21
  Usage:
22
22
  tycono [path] Start TUI (default, optionally point to a company directory)
23
+ tycono --headless Start API server only (no TUI, no browser)
23
24
  tycono --classic Start pixel office web UI
24
25
  tycono --attach Connect TUI to existing API server
25
26
  tycono --help Show this help message
@@ -28,6 +29,7 @@ function printHelp(): void {
28
29
  Examples:
29
30
  tycono Start TUI in current directory
30
31
  tycono ./my-company Start TUI with existing company folder
32
+ tycono --headless API server only (for plugin/external clients)
31
33
  tycono --classic Start pixel office web UI
32
34
  PORT=3000 tycono --attach Attach TUI to running server
33
35
 
@@ -159,7 +161,21 @@ async function startServer(): Promise<void> {
159
161
  }
160
162
 
161
163
  const url = `http://localhost:${port}`;
162
- if (initialized) {
164
+ const headless = !!process.env.__TYCONO_HEADLESS;
165
+ if (headless) {
166
+ console.log(` tycono v${VERSION} — headless mode`);
167
+ console.log(` API: ${url}`);
168
+ console.log(` Company: ${companyName}`);
169
+ console.log(` Engine: ${auth.engine}`);
170
+ console.log(` PID: ${process.pid}`);
171
+ // Write port to .tycono/headless.json for plugin discovery
172
+ const headlessInfo = { port, pid: process.pid, url, startedAt: new Date().toISOString() };
173
+ const headlessPath = path.join(process.env.COMPANY_ROOT!, '.tycono', 'headless.json');
174
+ try {
175
+ fs.mkdirSync(path.dirname(headlessPath), { recursive: true });
176
+ fs.writeFileSync(headlessPath, JSON.stringify(headlessInfo, null, 2));
177
+ } catch {}
178
+ } else if (initialized) {
163
179
  printBanner(companyName, port, url, auth.engine);
164
180
  } else {
165
181
  console.log(`
@@ -175,17 +191,23 @@ async function startServer(): Promise<void> {
175
191
  }
176
192
 
177
193
  // Import and start server
178
- const { createHttpServer } = await import('../src/api/src/create-server.js');
194
+ const { createHttpServer } = await import('../packages/server/src/api/src/create-server.js');
179
195
  const server = createHttpServer();
180
196
 
181
197
  const host = process.env.HOST || '0.0.0.0';
182
198
  server.listen(port, host, () => {
183
- openBrowser(url);
199
+ if (!process.env.__TYCONO_HEADLESS) {
200
+ openBrowser(url);
201
+ }
184
202
  });
185
203
 
186
204
  // Graceful shutdown
187
205
  const shutdown = () => {
188
206
  console.log('\n Shutting down...');
207
+ // Clean up headless discovery file
208
+ if (headless) {
209
+ try { fs.unlinkSync(path.join(process.env.COMPANY_ROOT!, '.tycono', 'headless.json')); } catch {}
210
+ }
189
211
  server.close(() => process.exit(0));
190
212
  setTimeout(() => process.exit(1), 5000);
191
213
  };
@@ -236,13 +258,13 @@ async function startServerForTui(): Promise<void> {
236
258
  return true;
237
259
  }) as any;
238
260
 
239
- const { createHttpServer } = await import('../src/api/src/create-server.js');
261
+ const { createHttpServer } = await import('../packages/server/src/api/src/create-server.js');
240
262
 
241
263
  // Startup orphan scan — mark stale 'active' sessions as interrupted
242
264
  // (server.ts does this for standalone mode, but TUI mode uses create-server directly)
243
265
  try {
244
- const { listSessions, updateSession } = await import('../src/api/src/services/session-store.js');
245
- const { ActivityStream } = await import('../src/api/src/services/activity-stream.js');
266
+ const { listSessions, updateSession } = await import('../packages/server/src/api/src/services/session-store.js');
267
+ const { ActivityStream } = await import('../packages/server/src/api/src/services/activity-stream.js');
246
268
  let orphaned = 0;
247
269
  for (const ses of listSessions()) {
248
270
  if (ses.status !== 'active') continue;
@@ -305,7 +327,7 @@ async function startServerForTui(): Promise<void> {
305
327
  // Graceful shutdown — mark active sessions as interrupted
306
328
  const shutdown = () => {
307
329
  try {
308
- import('../src/api/src/services/session-store.js').then(({ listSessions, updateSession }) => {
330
+ import('../packages/server/src/api/src/services/session-store.js').then(({ listSessions, updateSession }) => {
309
331
  for (const ses of listSessions()) {
310
332
  if (ses.status === 'active') updateSession(ses.id, { status: 'interrupted' as any });
311
333
  }
@@ -331,7 +353,7 @@ async function startServerForTui(): Promise<void> {
331
353
  });
332
354
 
333
355
  // Start TUI — stdout.write is NOT intercepted, Ink has full control
334
- const { startTui } = await import('../src/tui/index.tsx');
356
+ const { startTui } = await import('../packages/tui/src/index.tsx');
335
357
  await startTui({ port });
336
358
  }
337
359
 
@@ -348,6 +370,16 @@ export async function main(args: string[]): Promise<void> {
348
370
  return;
349
371
  }
350
372
 
373
+ // --headless: API server only (no TUI, no browser) — for plugin/external clients
374
+ if (command === '--headless' || args.includes('--headless')) {
375
+ if (command === '--headless' && args[1] && !args[1].startsWith('-')) {
376
+ process.env.COMPANY_ROOT = path.resolve(args[1]);
377
+ }
378
+ process.env.__TYCONO_HEADLESS = '1';
379
+ await startServer();
380
+ return;
381
+ }
382
+
351
383
  // --classic: legacy pixel office web UI
352
384
  if (command === '--classic' || args.includes('--classic')) {
353
385
  if (command === '--classic' && args[1] && !args[1].startsWith('-')) {
@@ -360,7 +392,7 @@ export async function main(args: string[]): Promise<void> {
360
392
  // --attach: connect TUI to existing API server
361
393
  if (command === '--attach' || args.includes('--attach')) {
362
394
  const port = process.env.PORT ? Number(process.env.PORT) : 3000;
363
- const { startTui } = await import('../src/tui/index.tsx');
395
+ const { startTui } = await import('../packages/tui/src/index.tsx');
364
396
  await startTui({ port });
365
397
  return;
366
398
  }
@@ -369,7 +401,7 @@ export async function main(args: string[]): Promise<void> {
369
401
  if (command === 'tui') {
370
402
  if (args.includes('--attach')) {
371
403
  const port = process.env.PORT ? Number(process.env.PORT) : 3000;
372
- const { startTui } = await import('../src/tui/index.tsx');
404
+ const { startTui } = await import('../packages/tui/src/index.tsx');
373
405
  await startTui({ port });
374
406
  return;
375
407
  }
package/package.json CHANGED
@@ -1,33 +1,39 @@
1
1
  {
2
2
  "name": "tycono",
3
- "version": "0.3.45-beta.2",
4
- "description": "Build an AI company. Watch them work.",
3
+ "version": "0.3.45-beta.3",
4
+ "description": "Your AI team for solo builders. Run a full company with AI agents.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "tycono": "./bin/cli.js"
8
8
  },
9
+ "workspaces": [
10
+ "packages/server",
11
+ "packages/pixel",
12
+ "packages/tui",
13
+ "packages/plugin"
14
+ ],
9
15
  "files": [
10
16
  "bin/",
11
- "src/api/src/",
12
- "src/api/package.json",
13
- "src/shared/",
14
- "src/tui/",
15
- "src/web/dist/",
16
- "templates/"
17
+ "packages/server/src/api/package.json",
18
+ "packages/server/src/api/src/",
19
+ "packages/server/src/core/",
20
+ "packages/server/src/shared/",
21
+ "packages/server/templates/",
22
+ "packages/server/bin/",
23
+ "packages/tui/src/",
24
+ "packages/pixel/dist/"
17
25
  ],
18
26
  "engines": {
19
27
  "node": ">=18"
20
28
  },
21
29
  "scripts": {
22
30
  "dev": "npm run dev:api & npm run dev:web",
23
- "dev:api": "npm run dev --prefix src/api",
24
- "dev:web": "npm run dev --prefix src/web",
25
- "build": "npm run build:web && npm run build:forge",
26
- "build:web": "npm run build --prefix src/web",
27
- "build:forge": "cp node_modules/tyconoforge/dist/tyconoforge.js src/web/dist/tyconoforge.js",
31
+ "dev:api": "tsx watch packages/server/src/api/src/server.ts",
32
+ "dev:web": "npm run dev --prefix packages/pixel",
33
+ "build": "npm run build --prefix packages/pixel",
28
34
  "typecheck": "npm run typecheck:api && npm run typecheck:web",
29
- "typecheck:api": "cd src/api && npx tsc --noEmit",
30
- "typecheck:web": "cd src/web && npx tsc --noEmit",
35
+ "typecheck:api": "cd packages/server/src/api && npx tsc --noEmit",
36
+ "typecheck:web": "cd packages/pixel && npx tsc --noEmit",
31
37
  "start": "node bin/cli.js"
32
38
  },
33
39
  "dependencies": {
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { fileURLToPath, pathToFileURL } from 'node:url';
4
+ import { dirname, join } from 'node:path';
5
+ import { createRequire } from 'node:module';
6
+ import { execFileSync } from 'node:child_process';
7
+
8
+ // Auto-increase heap if not already set
9
+ if (!process.env.__TYCONO_HEAP_SET && !process.execArgv.some(a => a.includes('max-old-space-size'))) {
10
+ process.env.__TYCONO_HEAP_SET = '1';
11
+ try {
12
+ execFileSync(process.execPath, [
13
+ '--max-old-space-size=4096',
14
+ ...process.execArgv,
15
+ fileURLToPath(import.meta.url),
16
+ ...process.argv.slice(2),
17
+ ], { stdio: 'inherit', env: process.env });
18
+ } catch (e) {
19
+ process.exit(e.status ?? 1);
20
+ }
21
+ process.exit(0);
22
+ }
23
+
24
+ const __filename = fileURLToPath(import.meta.url);
25
+ const __dirname = dirname(__filename);
26
+
27
+ // Resolve tsx
28
+ const require = createRequire(import.meta.url);
29
+ const tsxApiPath = pathToFileURL(require.resolve('tsx/esm/api')).href;
30
+ const tsx = await import(tsxApiPath);
31
+ tsx.register();
32
+
33
+ const entryPath = pathToFileURL(join(__dirname, 'server.ts')).href;
34
+ const { main } = await import(entryPath);
35
+ await main(process.argv.slice(2));