chore: post-migration cleanup — drop legacy TS, fix docs/website - #65
Conversation
Removes the obsolete TypeScript worker layer that has been fully ported to
Rust narrow workers under workers/. Realigns docs and website with current
state (65 workers, 257 functions, iii-sdk 0.11.4-next.4).
Workspace
- Add 9 orphan workers to Cargo workspace members (5 channels + 4 security)
that existed on disk but were excluded from build:
channel-bluesky, channel-discord, channel-mastodon, channel-matrix,
channel-telegram, security-headers, security-map, security-zeroize,
skill-security
- All 65 workers now build; 1281 release tests pass.
Bloat removal (28,565 deletions)
- Delete src/ entirely. Every domain it covered now lives in workers/.
- Delete packages/shared/ (consumed only by src/).
- Delete src/__tests__/ and vitest.config.ts (covered legacy TS only).
- Drop tracked lockfiles (package-lock.json, website/package-lock.json);
add to .gitignore per repo policy.
- Drop tracked CLAUDE.md per "no vendor/tooling artifacts" policy.
package.json + tsconfig.json
- Drop tsx, @anthropic-ai/sdk, nodemailer, @agentos/shared workspace.
- Keep only iii-sdk + vitest for the e2e suite.
- Pin iii-sdk to 0.11.4-next.4 (matches Rust workspace).
README
- Lead with the actual shape: 65 narrow workers on iii primitives.
- Replace inflated and stale numbers ("51 workers", "2,754 tests",
"18 crates", "46 TS workers", "25-screen TUI") with measured counts.
- Drop competitor benchmarks and migration paths to other frameworks.
- Drop marketing prose about features that don't ship today.
ARCHITECTURE.md
- Worker map covers all 65 workers grouped by responsibility.
- Drop obsolete src/ TypeScript section.
- Test count corrected (1281 release tests, was 831).
Website
- stats.ts: real measured counts (65 workers, 257 functions, 1281 tests,
14 channels). Was hardcoded inflated values.
- Compare.tsx: replaced unsourced competitor benchmark table with a
primitive composition section. Per repo policy: no competitor names
in code.
- Architecture.tsx: render groups derived from real worker layout.
- Why.tsx, docs-data.ts, Hero.tsx: drop "18% overhead vs raw function
calls" and other unsourced claims; align worker counts.
📝 WalkthroughWalkthroughThis pull request performs a major architectural restructuring, removing the TypeScript-based worker system (channels, cost tracking, knowledge graphs, memory reflection, migration, model catalog, recovery, dashboard, API layer) and associated test suites, while adding Rust-based worker crates to the workspace, updating documentation to reflect a new contract-centered architecture, and simplifying package management by removing the shared package and related utilities. Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120+ minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Review rate limit: 2/3 reviews remaining, refill in 20 minutes. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ARCHITECTURE.md`:
- Around line 7-22: The unlabeled fenced block in ARCHITECTURE.md that contains
the directory tree starting with "agentos/" triggers markdownlint MD040; fix it
by adding a language tag to the opening fence (e.g., change ``` to ```text) so
the block becomes a labeled code fence; update the single fenced block
containing the directory layout to use ```text as the opener.
In `@README.md`:
- Around line 118-129: The fenced code block in README.md listing directories is
unlabeled (triggers markdownlint MD040); update that fenced block (the directory
listing block) to include a language label—e.g., change the opening ``` to
```text—so the block is explicitly labeled and markdownlint will accept it.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 65b29258-9b46-4511-b8b1-afa1ec16daa9
⛔ Files ignored due to path filters (3)
Cargo.lockis excluded by!**/*.lockpackage-lock.jsonis excluded by!**/package-lock.jsonwebsite/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (96)
.gitignoreARCHITECTURE.mdCLAUDE.mdCargo.tomlREADME.mdpackage.jsonpackages/shared/package.jsonpackages/shared/src/config.tspackages/shared/src/errors.tspackages/shared/src/index.tspackages/shared/src/metrics.tspackages/shared/src/pricing.tspackages/shared/src/secrets.tspackages/shared/src/security-headers.tspackages/shared/src/shutdown.tspackages/shared/src/tokens.tspackages/shared/src/utils.tspackages/shared/src/validate.tssrc/__tests__/api.test.tssrc/__tests__/artifact-dag.test.tssrc/__tests__/channels-bluesky.test.tssrc/__tests__/channels-gchat-line-messenger.test.tssrc/__tests__/channels-mastodon.test.tssrc/__tests__/channels-matrix.test.tssrc/__tests__/channels-mattermost.test.tssrc/__tests__/channels-reddit.test.tssrc/__tests__/channels-teams.test.tssrc/__tests__/channels-viber-feishu-dingtalk.test.tssrc/__tests__/channels-webex.test.tssrc/__tests__/channels-webhook.test.tssrc/__tests__/cost-tracker.test.tssrc/__tests__/dashboard.test.tssrc/__tests__/helpers.tssrc/__tests__/knowledge-graph.test.tssrc/__tests__/memory-reflection.test.tssrc/__tests__/migration.test.tssrc/__tests__/model-catalog-extended.test.tssrc/__tests__/model-catalog.test.tssrc/__tests__/recovery.test.tssrc/__tests__/shared-errors.test.tssrc/__tests__/shared-utils.test.tssrc/__tests__/skills-extended.test.tssrc/__tests__/skills.test.tssrc/__tests__/tool-profiles.test.tssrc/__tests__/tools-extended.test.tssrc/__tests__/tools.test.tssrc/__tests__/types-extended.test.tssrc/api.tssrc/artifact-dag.tssrc/channels/dingtalk.tssrc/channels/discourse.tssrc/channels/feishu.tssrc/channels/flock.tssrc/channels/gitter.tssrc/channels/google-chat.tssrc/channels/gotify.tssrc/channels/guilded.tssrc/channels/irc.tssrc/channels/keybase.tssrc/channels/line.tssrc/channels/mattermost.tssrc/channels/messenger.tssrc/channels/mumble.tssrc/channels/nextcloud.tssrc/channels/nostr.tssrc/channels/ntfy.tssrc/channels/pumble.tssrc/channels/revolt.tssrc/channels/rocketchat.tssrc/channels/threema.tssrc/channels/twist.tssrc/channels/viber.tssrc/channels/webhook.tssrc/channels/xmpp.tssrc/channels/zulip.tssrc/cost-tracker.tssrc/dashboard.tssrc/index.tssrc/knowledge-graph.tssrc/memory-reflection.tssrc/migration.tssrc/model-catalog.tssrc/recovery.tssrc/skills.tssrc/tool-profiles.tssrc/tools-extended.tssrc/tools.tssrc/types.tstsconfig.jsonvitest.config.tswebsite/components/Architecture.tsxwebsite/components/Compare.tsxwebsite/components/Hero.tsxwebsite/components/Why.tsxwebsite/components/docs/docs-data.tswebsite/data/stats.ts
💤 Files with no reviewable changes (78)
- packages/shared/src/security-headers.ts
- packages/shared/src/tokens.ts
- packages/shared/src/pricing.ts
- src/index.ts
- src/tests/channels-reddit.test.ts
- src/tests/channels-mastodon.test.ts
- packages/shared/src/shutdown.ts
- src/channels/google-chat.ts
- packages/shared/src/config.ts
- src/tests/model-catalog.test.ts
- src/tests/channels-viber-feishu-dingtalk.test.ts
- src/tests/types-extended.test.ts
- packages/shared/src/validate.ts
- src/channels/keybase.ts
- src/channels/nextcloud.ts
- src/knowledge-graph.ts
- src/channels/discourse.ts
- src/tests/knowledge-graph.test.ts
- CLAUDE.md
- src/channels/gitter.ts
- src/channels/dingtalk.ts
- packages/shared/src/secrets.ts
- src/tests/skills.test.ts
- packages/shared/src/index.ts
- src/tests/api.test.ts
- src/channels/messenger.ts
- src/channels/viber.ts
- src/tests/channels-bluesky.test.ts
- src/tests/dashboard.test.ts
- src/channels/gotify.ts
- src/channels/pumble.ts
- src/tests/channels-teams.test.ts
- src/channels/zulip.ts
- src/tests/migration.test.ts
- src/channels/line.ts
- src/channels/irc.ts
- src/channels/rocketchat.ts
- packages/shared/package.json
- src/channels/mattermost.ts
- src/channels/feishu.ts
- src/channels/mumble.ts
- src/tests/skills-extended.test.ts
- src/tests/shared-errors.test.ts
- src/tests/channels-webhook.test.ts
- src/migration.ts
- src/channels/revolt.ts
- src/channels/guilded.ts
- src/channels/flock.ts
- src/memory-reflection.ts
- src/tests/channels-matrix.test.ts
- src/tests/memory-reflection.test.ts
- src/tests/shared-utils.test.ts
- src/tests/channels-mattermost.test.ts
- src/channels/threema.ts
- src/channels/twist.ts
- src/tests/channels-gchat-line-messenger.test.ts
- src/cost-tracker.ts
- src/channels/ntfy.ts
- src/tests/tools-extended.test.ts
- src/model-catalog.ts
- src/tests/artifact-dag.test.ts
- src/tests/tools.test.ts
- src/api.ts
- src/tests/model-catalog-extended.test.ts
- src/tests/recovery.test.ts
- src/channels/webhook.ts
- packages/shared/src/errors.ts
- src/dashboard.ts
- src/artifact-dag.ts
- packages/shared/src/utils.ts
- src/tests/helpers.ts
- src/recovery.ts
- src/tests/cost-tracker.test.ts
- src/channels/nostr.ts
- src/tests/channels-webex.test.ts
- src/tests/tool-profiles.test.ts
- packages/shared/src/metrics.ts
- src/channels/xmpp.ts
| ``` | ||
| agentos/ | ||
| ├── workers/ Narrow iii workers (one binary each) | ||
| │ ├── agent-core/ ReAct loop agent::* | ||
| │ ├── bridge/ External runtime adapters bridge::* | ||
| │ ├── council/ Proposals + activity log council::* | ||
| │ ├── directive/ Hierarchical goal alignment directive::* | ||
| │ ├── embedding/ SentenceTransformers (Python) embedding::* | ||
| │ ├── hierarchy/ Org graph (cycle-safe) hierarchy::* | ||
| │ ├── ledger/ Budget + spend tracking ledger::* | ||
| │ ├── llm-router/ Provider routing llm::* | ||
| │ ├── memory/ Narrow agent memory memory::* | ||
| │ ├── mission/ Task lifecycle mission::* | ||
| │ ├── pulse/ Scheduled invocation pulse::* | ||
| │ ├── realm/ Multi-tenant isolation realm::* | ||
| │ ├── security/ Combined guardrails + audit security::* | ||
| │ └── wasm-sandbox/ wasmtime fuel-metered wasm::* | ||
| │ | ||
| ├── crates/ Surfaces (clients, not workers) | ||
| │ ├── cli/ Command-line interface | ||
| │ └── tui/ 21-screen terminal dashboard | ||
| │ | ||
| ├── src/ TypeScript workers (54 files, ~23k LOC) | ||
| │ └── ... a2a, browser, cron, evolve, swarm, etc. | ||
| │ | ||
| ├── hands/ Agent personas as TOML config (consumed by hand-runner) | ||
| ├── integrations/ MCP server configs as TOML | ||
| ├── agents/ Agent templates as markdown | ||
| │ | ||
| ├── config.yaml iii engine boot config (workers: + modules:) | ||
| └── .github/workflows/ci.yml End-to-end CI (build, test, e2e smoke, namespace check) | ||
| ├── workers/ 64 Rust workers + 1 Python worker | ||
| ├── crates/ | ||
| │ ├── cli/ Command-line client (HTTP → iii-http on 3111) | ||
| │ └── tui/ Terminal dashboard | ||
| ├── e2e/ vitest end-to-end suite (live engine + workers) | ||
| ├── tests/ Rust integration tests | ||
| ├── hands/ Agent personas (TOML, consumed by hand-runner) | ||
| ├── integrations/ MCP server configs (TOML, consumed by mcp-client) | ||
| ├── agents/ Agent templates (markdown) | ||
| ├── workflows/ Pre-defined workflow YAMLs | ||
| ├── plugin/ Reusable agent/command/skill/hook bundles | ||
| ├── config.yaml iii engine boot config | ||
| └── .github/workflows/ci.yml Build + test + e2e | ||
| ``` |
There was a problem hiding this comment.
Add a language tag to the fenced layout block.
Line 7 uses an unlabeled code fence, which triggers markdownlint MD040.
Suggested fix
-```
+```text
agentos/
├── workers/ 64 Rust workers + 1 Python worker
├── crates/
│ ├── cli/ Command-line client (HTTP → iii-http on 3111)
│ └── tui/ Terminal dashboard
├── e2e/ vitest end-to-end suite (live engine + workers)
├── tests/ Rust integration tests
├── hands/ Agent personas (TOML, consumed by hand-runner)
├── integrations/ MCP server configs (TOML, consumed by mcp-client)
├── agents/ Agent templates (markdown)
├── workflows/ Pre-defined workflow YAMLs
├── plugin/ Reusable agent/command/skill/hook bundles
├── config.yaml iii engine boot config
└── .github/workflows/ci.yml Build + test + e2e</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 7-7: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ARCHITECTURE.md` around lines 7 - 22, The unlabeled fenced block in
ARCHITECTURE.md that contains the directory tree starting with "agentos/"
triggers markdownlint MD040; fix it by adding a language tag to the opening
fence (e.g., change ``` to ```text) so the block becomes a labeled code fence;
update the single fenced block containing the directory layout to use ```text as
the opener.
| ``` | ||
| agentos/ | ||
| ├── Cargo.toml Rust workspace | ||
| ├── package.json Node.js package | ||
| ├── config.yaml iii-engine configuration | ||
| ├── vitest.config.ts Unit/integration test configuration | ||
| ├── vitest.e2e.config.ts E2E test configuration | ||
| │ | ||
| ├── crates/ Surfaces (clients, not workers) | ||
| │ ├── cli/ CLI (50+ commands) | ||
| │ └── tui/ 21-screen terminal dashboard | ||
| │ | ||
| ├── workers/ Narrow iii workers (one binary each, registered functions over iii.trigger) | ||
| │ ├── agent-core/ ReAct agent loop agent::* | ||
| │ ├── bridge/ External runtime adapters bridge::* | ||
| │ ├── council/ Proposals + hash-chained activity log council::* | ||
| │ ├── directive/ Hierarchical goal alignment directive::* | ||
| │ ├── embedding/ Embedding generation (Python) embedding::* | ||
| │ ├── hierarchy/ Agent org graph (cycle-safe) hierarchy::* | ||
| │ ├── ledger/ Budget enforcement ledger::* | ||
| │ ├── llm-router/ LLM provider routing llm::* | ||
| │ ├── memory/ Narrow agent memory memory::* | ||
| │ ├── mission/ Task lifecycle + state machine mission::* | ||
| │ ├── pulse/ Scheduled agent invocation pulse::* | ||
| │ ├── realm/ Multi-tenant isolation realm::* | ||
| │ ├── security/ Combined guardrails + audit security::* | ||
| │ └── wasm-sandbox/ WASM execution (wasmtime) wasm::* | ||
| │ | ||
| ├── src/ TypeScript workers (51) | ||
| │ ├── api.ts OpenAI-compatible API | ||
| │ ├── agent-core.ts TS agent loop (profile injection, memory reflection) | ||
| │ ├── tools.ts 22 built-in tools | ||
| │ ├── tools-extended.ts 38 extended tools | ||
| │ ├── memory-reflection.ts Self-curating memory reflection | ||
| │ ├── session-lifecycle.ts Session state machine + reaction rules | ||
| │ ├── task-decomposer.ts Recursive task decomposition | ||
| │ ├── recovery.ts Session health + auto-recovery | ||
| │ ├── orchestrator.ts Multi-agent orchestrator | ||
| │ ├── evolve.ts Dynamic function evolution + DAG branching | ||
| │ ├── eval.ts Production eval harness | ||
| │ ├── feedback.ts Feedback loop + signal injection | ||
| │ ├── artifact-dag.ts DAG-based content artifact exchange | ||
| │ ├── coordination.ts Inter-agent coordination board | ||
| │ ├── swarm.ts Multi-agent swarms | ||
| │ ├── knowledge-graph.ts Entity-relation graph | ||
| │ ├── session-replay.ts Session recording | ||
| │ ├── tool-profiles.ts 8 tool filtering profiles | ||
| │ ├── skillkit-bridge.ts SkillKit marketplace bridge | ||
| │ ├── security-map.ts Mutual Authentication Protocol | ||
| │ ├── channels/ 40 channel adapters | ||
| │ ├── shared/ Shared utilities | ||
| │ ├── __tests__/ 1,748 TypeScript tests (70 files) | ||
| │ └── ... 25 more workers | ||
| │ | ||
| ├── agents/ 45 agent templates | ||
| ├── hands/ 7 autonomous hands | ||
| ├── integrations/ 25 MCP integrations | ||
| └── identity/ System identity files | ||
| workers/ 64 Rust workers + 1 Python (embedding) | ||
| crates/ CLI + TUI surfaces (HTTP clients, not workers) | ||
| e2e/ vitest end-to-end suite (live engine + workers) | ||
| tests/ Rust integration tests | ||
| hands/ Agent personas (TOML) | ||
| integrations/ MCP server configs (TOML) | ||
| agents/ Agent templates (markdown) | ||
| workflows/ Workflow definitions (YAML) | ||
| plugin/ Reusable agent/command/skill/hook bundles | ||
| config.yaml iii engine boot config | ||
| ``` |
There was a problem hiding this comment.
Specify a language for the layout code fence.
Line 118 is an unlabeled fenced block and will trip markdownlint MD040.
Suggested fix
-```
+```text
workers/ 64 Rust workers + 1 Python (embedding)
crates/ CLI + TUI surfaces (HTTP clients, not workers)
e2e/ vitest end-to-end suite (live engine + workers)
tests/ Rust integration tests
hands/ Agent personas (TOML)
integrations/ MCP server configs (TOML)
agents/ Agent templates (markdown)
workflows/ Workflow definitions (YAML)
plugin/ Reusable agent/command/skill/hook bundles
config.yaml iii engine boot config</details>
<details>
<summary>🧰 Tools</summary>
<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>
[warning] 118-118: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
</details>
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
Verify each finding against the current code and only fix it if needed.
In @README.md around lines 118 - 129, The fenced code block in README.md listing
directories is unlabeled (triggers markdownlint MD040); update that fenced block
(the directory listing block) to include a language label—e.g., change the
opening totext—so the block is explicitly labeled and markdownlint will
accept it.
</details>
<!-- fingerprinting:phantom:poseidon:hawk:0c4a797f-4b17-4dde-b5c8-77cbe7fc70f3 -->
<!-- d98c2f50 -->
<!-- This is an auto-generated comment by CodeRabbit -->
Summary
Post-Rust-migration cleanup. Removes the obsolete TypeScript worker layer, fixes count drift across README/website/ARCHITECTURE.md, and pulls 9 orphaned workers back into the Cargo workspace.
99 files, +625 -28,565.
Workspace
Adds 9 worker dirs that existed on disk but were excluded from `Cargo.toml` members:
After: 65 workers (64 Rust + 1 Python), 257 registered functions, 1,281 release tests pass.
Removed
package.json + tsconfig.json
Drops tsx, @anthropic-ai/sdk, nodemailer, @agentos/shared workspace. Keeps only `iii-sdk` + `vitest` for the e2e suite. Pins `iii-sdk` to `0.11.4-next.4` (matches Rust workspace).
Docs
Test plan
Summary by CodeRabbit
Architecture Refactor
Documentation