Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
8570c45
docs(atomic-2): add UI server research and Bun-native daemon RFC
flora131 May 9, 2026
c4d4dda
fix(file-discovery): scrub git env vars so cwd controls the repo
flora131 May 9, 2026
fe992f4
feat(atomic-sdk): add ui-protocol/schemas.ts with zod schemas for all…
flora131 May 9, 2026
02ad091
feat(atomic-sdk): replace isMode1Source heuristic with filesystem-che…
flora131 May 9, 2026
5d94f7e
feat(atomic-sdk): harden RunState — pruning, version, AgentType, sess…
flora131 May 9, 2026
9c26566
fix(atomic-sdk): restore console.warn spy in §5.2.4 invariant 3 test …
flora131 May 9, 2026
805e3dc
feat(supervisor): add process supervisor with DI PTY spawner, ring bu…
flora131 May 10, 2026
b80c6c0
feat(sdk): export daemon surfaces and add platform optionalDependencies
flora131 May 10, 2026
871b430
feat(atomic-sdk): implement JSON-RPC method dispatcher (ui-protocol/m…
flora131 May 10, 2026
e6d760b
feat(atomic-sdk): implement TCP loopback JSON-RPC UI server (§5.1.5, …
flora131 May 10, 2026
2bc66b6
feat(atomic-sdk): implement Daemon lifecycle — singleton, endpoint fi…
flora131 May 10, 2026
c3ae530
docs(daemon): add ui-server-client example and update daemon JSON-RPC…
flora131 May 10, 2026
597aa87
feat(panel-client): implement PanelClient and PtyPane daemon protocol…
flora131 May 10, 2026
2b209c1
feat(sdk-client): route runWorkflow and session primitives through da…
flora131 May 10, 2026
2b762a1
test(workflow): update tests for JSON-RPC dispatch via ensureStarted()
flora131 May 10, 2026
4c780c9
feat(cli): add --ui-server flag, JSON-RPC dispatch, workflow attach
flora131 May 10, 2026
bc717ff
refactor: remove all tmux/hidden-command paths
flora131 May 10, 2026
7170053
test(sdk): skip non-ts exports in sdk-build-emits-js test
flora131 May 10, 2026
78d073e
fix: update sessions tests to async mock deps; remove stale bunfig co…
flora131 May 10, 2026
757ad6a
test: fix test failures from daemon/tmux refactor
flora131 May 10, 2026
87270be
feat(runtime): add DaemonSupervisorAdapter bridging ISupervisor to Su…
lavaman131 May 10, 2026
33b0e88
feat(sdk): implement terminal run/ended lifecycle with cancellation s…
lavaman131 May 10, 2026
fbf20d5
test(runtime): add supervisor RPC contract tests with real adapter an…
lavaman131 May 10, 2026
048811e
fix(foreground-wait): register run/ended handler before workflow/star…
flora131 May 10, 2026
f290b58
feat(ui-server): inject DaemonSupervisorAdapter into RunManager; add …
flora131 May 10, 2026
d6c1d65
feat(runtime): implement DaemonWorkflowContext replacing makeStubContext
flora131 May 10, 2026
0be8cf9
feat(runtime): wire run-manager execution with DaemonWorkflowContext …
flora131 May 10, 2026
513e952
test(runtime): add staged workflow integration tests with fake superv…
flora131 May 10, 2026
0eb9d0e
test(foreground): add deterministic foreground completion tests and f…
flora131 May 10, 2026
43698a0
test: improve coverage across 6 files to pass 85% gate
flora131 May 10, 2026
47c96b8
refactor(runtime): centralize terminal transitions into markRunComple…
flora131 May 10, 2026
1bbe696
test(runtime): expand launch-boundary executeRun rejection lifecycle …
flora131 May 10, 2026
3b3f670
fix(ui-protocol): await WorkflowRegistry.load() before list() in work…
flora131 May 10, 2026
9b0ab9f
fix(runtime): track and clean up inner RunState subscription ids in R…
flora131 May 10, 2026
864630a
feat(daemon): await workflows.load() before writing endpoint file
flora131 May 10, 2026
295cded
feat(runtime): track run-owned stage PIDs and stop() sends SIGTERM
flora131 May 10, 2026
6024146
test(run-manager): cover stage-exit-after-cancel invariant
flora131 May 10, 2026
e2298a4
fix(tests): update workflow.test.ts for external workflow subprocess …
flora131 May 10, 2026
0cc2895
fix(cli): restore ExternalWorkflow discriminator in dispatch() to use…
flora131 May 10, 2026
20ce1e7
test(daemon): add integration tests for registry listing, run/stop PT…
flora131 May 10, 2026
9297d02
test(cli): add focused dispatch routing tests for external spawn and …
flora131 May 10, 2026
6bba1bc
feat(sdk): add export classification registry
flora131 May 10, 2026
5dd1c7b
refactor(daemon): complete tmux→daemon cutover for sessions, panels, …
flora131 May 10, 2026
fa2789d
test: align tests with removed tmux exports and SIGKILL stop behavior
flora131 May 10, 2026
6b44433
fix(spawn): drop dangling uv helpers after rebase onto origin/main
flora131 May 10, 2026
243e4b8
refactor(sdk): remove host-local workflows and external dispatch surface
May 10, 2026
3c96384
fix(panel-footer): key success tone off completionInfo, not completio…
May 10, 2026
73d0976
test(cli): restore coverage on workflow.ts and custom-workflows.ts
May 10, 2026
0792aeb
test: cover hil-watchers, workflow-list defaults, and daemon platform…
May 10, 2026
bb77bf2
feat(pty): forward mouse input to direct PTY sessions
May 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 78 additions & 38 deletions .agents/skills/workflow-creator/references/agent-setup-recipe.md

Large diffs are not rendered by default.

357 changes: 132 additions & 225 deletions .agents/skills/workflow-creator/references/running-workflows.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .opencode/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"@opencode-ai/plugin": "1.14.39"
"@opencode-ai/plugin": "1.14.41"
}
}
96 changes: 57 additions & 39 deletions README.md

Large diffs are not rendered by default.

12 changes: 3 additions & 9 deletions assets/settings.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"workflows": {
"type": "object",
"description": "Each entry's `command` must be a CLI that imports `@bastani/atomic-sdk`, calls `defineWorkflow({…}).run(…).compile()`, and invokes `hostWorkflows([wf])` once afterward. The `hostWorkflows` call lets atomic discover and dispatch the workflow without relying on ESM module-load ordering.",
"description": "Each entry's `command` must point directly at an importable workflow source file that exports compiled WorkflowDefinition objects. Dispatch uses daemon JSON-RPC; hidden subprocess commands are not supported.",
"additionalProperties": { "$ref": "#/$defs/customWorkflow" }
}
},
Expand All @@ -40,13 +40,7 @@
"properties": {
"command": {
"type": "string",
"description": "Executable to spawn (e.g., 'bunx', 'node', '/abs/path/to/binary')."
},
"args": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Static arguments passed before atomic's hidden `_emit-workflow-meta` / `_atomic-run` argv."
"description": "Importable workflow source file path (.ts, .tsx, .js, .mjs, or .cjs)."
},
"agents": {
"type": "array",
Expand All @@ -56,7 +50,7 @@
"type": "string",
"enum": ["claude", "opencode", "copilot"]
},
"description": "Required. Agents this workflow supports. Atomic registers one entry per agent listed; the third-party command's WorkflowDefinitions must cover them."
"description": "Required. Agents this workflow supports. Atomic registers one entry per agent listed; the source module's WorkflowDefinitions must cover them."
}
},
"additionalProperties": false
Expand Down
69 changes: 53 additions & 16 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 29 additions & 29 deletions bunfig.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,10 @@ coveragePathIgnorePatterns = [
"**/var/folders/**",
# Compiled workflow temp files generated at runtime
"**/.atomic/.tmp/**",
# Entry points (not unit-testable). The SDK dispatcher mirrors the
# user-facing CLI: top-level `await program.parseAsync(...)` runs on
# import, so it can't be unit-imported from a test. Subprocess
# dispatch is exercised by `packages/atomic-sdk/script/build.test.ts`
# against the bundled `dist/cli.js`.
# Entry points (not unit-testable): top-level `await program.parseAsync(...)`
# runs on import, so these can't be unit-imported from a test.
"packages/atomic/src/cli.ts",
"packages/atomic/src/version.ts",
"packages/atomic-sdk/src/cli.ts",
# Auto-dispatch is a top-level argv side-effect that exits the
# process — same shape as the SDK cli entry; subprocess dispatch is
# exercised by `tests/fixtures/sdk-compiled-consumer/` end-to-end.
"packages/atomic-sdk/src/lib/auto-dispatch.ts",
# React/OpenTUI components (require component test infrastructure)
"packages/atomic-sdk/src/components/**",
# Theme (React context + OpenTUI native resources)
Expand All @@ -43,25 +35,21 @@ coveragePathIgnorePatterns = [
# SDK: non-testable runtime modules (require running agent CLIs, terminals, filesystems)
"packages/atomic-sdk/src/define-workflow.ts",
"packages/atomic-sdk/src/providers/**",
"packages/atomic-sdk/src/runtime/attached-footer.ts",
"packages/atomic-sdk/src/runtime/cc-debounce.ts",
"packages/atomic-sdk/src/runtime/executor.ts",
# `runtime/tmux.ts` is a thin wrapper around `tmuxExec(...)` subprocess
# calls into a real tmux/psmux server. The integration tests that
# exercised these wrappers were removed because they ran on the same
# `atomic` socket as the user's chat sessions and could detach an
# attached client mid-`bun test`. Pure helpers (parsers, env-var
# guards, hook builders) remain covered by tmux.test.ts.
"packages/atomic-sdk/src/runtime/tmux.ts",
# `runOrchestratorEntry` / `runOrchestratorWithDefinition` both delegate
# to `runOrchestrator` (tmux-bound), so the function bodies aren't unit-
# testable. The new `resolveWorkflowDefinition` helper IS unit-tested by
# `orchestrator-entry.resolve.test.ts` — excluding the whole file keeps
# the threshold honest without us needing to instantiate a tmux session
# in-process.
"packages/atomic-sdk/src/runtime/orchestrator-entry.ts",
"packages/atomic-sdk/src/runtime/panel.tsx",
"packages/atomic-sdk/src/runtime/theme.ts",
# Daemon supervisor wrapper: branch coverage requires running bun-pty
# processes and exercising every fallback path (descendant reaping,
# buffered scrollback edge cases). Integration tests in daemon.test.ts
# cover the happy path via the real supervisor.
"packages/atomic-sdk/src/runtime/supervisor.ts",
"packages/atomic-sdk/src/runtime/daemon-supervisor-adapter.ts",
# Daemon workflow context: provider SDK client/session construction (Claude
# Agent SDK, Copilot SDK, OpenCode SDK) per stage. Each branch needs the
# corresponding agent CLI installed; covered by integration tests against
# the real daemon. Pure helpers in this file are reused from terminal-env.ts
# / config modules which have their own unit tests.
"packages/atomic-sdk/src/runtime/daemon-workflow-context.ts",
"packages/atomic-sdk/src/components/error-boundary.tsx",
"packages/atomic-sdk/src/components/orchestrator-panel.tsx",
"packages/atomic-sdk/src/components/compact-switcher.tsx",
Expand All @@ -71,9 +59,7 @@ coveragePathIgnorePatterns = [
# wrap subprocess calls into a running tmux/psmux server. The compile
# path is covered by tui/compiler/parser.test.tsx and the consumer JSX
# (attachedStatusline) is covered by runtime/attached-footer.test.ts.
"packages/atomic-sdk/src/tui/components.tsx",
"packages/atomic-sdk/src/tui/mux.ts",
"packages/atomic-sdk/src/tui/renderer.ts",
# (tui directory was removed in the daemon refactor)
# Commander subcommand builder — action handlers call process.exit and
# dynamically import subprocess orchestration modules.
"packages/atomic/src/commands/cli/management-commands.ts",
Expand All @@ -86,6 +72,20 @@ coveragePathIgnorePatterns = [
"packages/atomic/src/commands/cli/init.ts",
"packages/atomic/src/commands/cli/init/**",
"packages/atomic/src/commands/cli/chat/**",
# daemon CLI command: thin wrapper around ensureStarted/closeDaemonConnection
# that signals the running daemon process. Restart/timeout escalation requires
# a live daemon process; covered end-to-end by integration tests rather than
# unit-imported.
"packages/atomic/src/commands/cli/daemon.ts",
# session.ts: all business logic has 100% line coverage through injected deps.
# However, the `defaultDeps` object contains 9 arrow-function stubs that always
# return false / throw (isTmuxInstalled, sessionExists, listSessions,
# isInsideAtomicSocket, isInsideTmux, switchClient, spawnMuxAttach,
# detachAndAttachAtomic, killSession) because the real implementations live in
# the daemon/tmux layer. These stubs are unreachable from tests without
# modifying source code since all command functions short-circuit on
# `isTmuxInstalled() === false`.
"packages/atomic/src/commands/cli/session.ts",
# Self-install orchestrators wrap PowerShell / registry / rc-file I/O;
# pure helpers are covered by install.test.ts.
"packages/atomic/src/commands/cli/install.ts",
Expand Down
Loading
Loading