@bastani/atomic 0.9.16-alpha.9 → 0.9.16
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.
- package/CHANGELOG.md +120 -0
- package/README.md +4 -4
- package/dist/builtin/intercom/CHANGELOG.md +42 -0
- package/dist/builtin/intercom/README.md +18 -17
- package/dist/builtin/intercom/broker/broker.ts +43 -18
- package/dist/builtin/intercom/broker/client.ts +138 -7
- package/dist/builtin/intercom/broker/group-isolation.ts +3 -3
- package/dist/builtin/intercom/broker/group-membership.ts +55 -0
- package/dist/builtin/intercom/broker/presence-handler.ts +62 -50
- package/dist/builtin/intercom/broker/send-handler.ts +2 -3
- package/dist/builtin/intercom/group.ts +40 -0
- package/dist/builtin/intercom/index.bundle.mjs +490 -183
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/skills/intercom/SKILL.md +16 -10
- package/dist/builtin/intercom/types.ts +24 -2
- package/dist/builtin/mcp/index.bundle.mjs +202 -52
- package/dist/builtin/mcp/package.json +2 -2
- package/dist/builtin/subagents/CHANGELOG.md +51 -0
- package/dist/builtin/subagents/README.md +3 -3
- package/dist/builtin/subagents/agents/code-simplifier.md +1 -1
- package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-locator.md +1 -1
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +1 -1
- package/dist/builtin/subagents/agents/codebase-pattern-finder.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-locator.md +1 -1
- package/dist/builtin/subagents/agents/debugger.md +1 -1
- package/dist/builtin/subagents/agents/worker.md +1 -1
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +422 -140
- package/dist/builtin/web-access/index.bundle.mjs +202 -52
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +70 -0
- package/dist/builtin/workflows/README.md +2 -2
- package/dist/builtin/workflows/builtin/{chunk-h5e65g7g.js → chunk-3y1hmzw6.js} +36 -6
- package/dist/builtin/workflows/builtin/{chunk-nqr34qp3.js → chunk-6rbajjf5.js} +7 -1
- package/dist/builtin/workflows/builtin/{chunk-qe6bfpbd.js → chunk-bz1c9732.js} +15 -3
- package/dist/builtin/workflows/builtin/{chunk-8v8wmb7z.js → chunk-dattsgxg.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-17zk6ffd.js → chunk-gdx0avpx.js} +355 -67
- package/dist/builtin/workflows/builtin/{chunk-rbnj9621.js → chunk-w9c7rkrk.js} +1 -1
- package/dist/builtin/workflows/builtin/goal.js +3 -3
- package/dist/builtin/workflows/builtin/index.js +5 -5
- package/dist/builtin/workflows/builtin/open-claude-design.js +2 -2
- package/dist/builtin/workflows/builtin/ralph.js +3 -3
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +531 -143
- package/dist/builtin/workflows/src/index.js +212 -72
- package/dist/cli/args.js +6 -6
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +2 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/session-picker.d.ts +2 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +3 -2
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +2 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +1 -0
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.js +3 -6
- package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +3 -1
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +6 -3
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-state.d.ts.map +1 -1
- package/dist/core/agent-session-state.js +7 -5
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +37 -23
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +9 -2
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/builtin-packages.d.ts +4 -0
- package/dist/core/builtin-packages.d.ts.map +1 -1
- package/dist/core/builtin-packages.js +22 -1
- package/dist/core/builtin-packages.js.map +1 -1
- package/dist/core/callback-activity.d.ts.map +1 -1
- package/dist/core/callback-activity.js +6 -3
- package/dist/core/callback-activity.js.map +1 -1
- package/dist/core/extensions/loader-core.d.ts +1 -0
- package/dist/core/extensions/loader-core.d.ts.map +1 -1
- package/dist/core/extensions/loader-core.js +11 -1
- package/dist/core/extensions/loader-core.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner-registries.d.ts.map +1 -1
- package/dist/core/extensions/runner-registries.js +9 -4
- package/dist/core/extensions/runner-registries.js.map +1 -1
- package/dist/core/extensions/runner-shortcuts.d.ts.map +1 -1
- package/dist/core/extensions/runner-shortcuts.js +1 -0
- package/dist/core/extensions/runner-shortcuts.js.map +1 -1
- package/dist/core/keybindings.d.ts +5 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +4 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mandatory-resource-loader.d.ts +6 -0
- package/dist/core/mandatory-resource-loader.d.ts.map +1 -0
- package/dist/core/mandatory-resource-loader.js +94 -0
- package/dist/core/mandatory-resource-loader.js.map +1 -0
- package/dist/core/mandatory-runtime-tools.d.ts +10 -0
- package/dist/core/mandatory-runtime-tools.d.ts.map +1 -0
- package/dist/core/mandatory-runtime-tools.js +31 -0
- package/dist/core/mandatory-runtime-tools.js.map +1 -0
- package/dist/core/model-resolver-defaults.js +1 -1
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +24 -13
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +2 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager-ui-accessors.d.ts +4 -1
- package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-ui-accessors.js +22 -0
- package/dist/core/settings-manager-ui-accessors.js.map +1 -1
- package/dist/core/settings-types.d.ts +4 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/main-session.d.ts.map +1 -1
- package/dist/main-session.js +3 -2
- package/dist/main-session.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/fast-mode-selector.js +2 -2
- package/dist/modes/interactive/components/fast-mode-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js +3 -0
- package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +7 -0
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +2 -1
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +1 -0
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +3 -0
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +15 -1
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +6 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +6 -1
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +3 -0
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +7 -12
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-tui.d.ts +1 -0
- package/dist/modes/interactive/interactive-tui.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-tui.js +16 -0
- package/dist/modes/interactive/interactive-tui.js.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.js +2 -0
- package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
- package/docs/compaction.md +1 -1
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +1 -1
- package/docs/intercom.md +29 -24
- package/docs/keybindings.md +5 -2
- package/docs/packages.md +1 -1
- package/docs/providers.md +2 -2
- package/docs/sdk.md +9 -7
- package/docs/settings.md +9 -3
- package/docs/subagents.md +2 -2
- package/docs/usage.md +7 -6
- package/docs/workflows.md +11 -7
- package/npm-shrinkwrap.json +59 -77
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-session-binding.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-session-binding.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAK1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAoC,MAAM,uBAAuB,CAAC;AAgBtG,MAAM,OAAO,iBAAiB;IAe7B,YAAY,EACX,WAAW,EACX,MAAM,EACN,wBAAwB,EACxB,eAAe,EACf,QAAQ,EACR,aAAa,EACb,aAAa,EACb,SAAS,EACT,iBAAiB,GACS;QAC1B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;QACzD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IACpC,CAAC;IAED,IAAI,cAAc;QACjB,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,C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,CAAC;QACrB,IAAI,CAAC,uBAAuB,EAAE,EAAE,CAAC;QACjC,IAAI,CAAC,kBAAkB,EAAE,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,uBAAuB,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;IACrC,CAAC;CACD","sourcesContent":["import type { AgentSession } from \"../../core/agent-session.ts\";\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.ts\";\nimport { FooterDataProvider } from \"../../core/footer-data-provider.ts\";\nimport { waitForRawStdoutBackpressure } from \"../../core/output-guard.ts\";\nimport type { EngineCustomUiService } from \"../interactive-engine/engine-custom-ui.ts\";\nimport type { EngineInputFormService } from \"../interactive-engine/engine-input-form.ts\";\nimport type { EngineRenderService } from \"../interactive-engine/engine-render-service.ts\";\nimport type { EngineSessionPickerService } from \"../interactive-engine/engine-session-picker.ts\";\nimport { toJsonEvent } from \"../json-event.ts\";\nimport { createRpcExtensionUIContext, type RpcPendingExtensionRequests } from \"./rpc-extension-ui.ts\";\nimport type { KeybindingsReloadCoordinator } from \"./rpc-keybindings-reload.ts\";\nimport type { RpcOutput } from \"./rpc-responses.ts\";\n\ninterface RpcSessionBindingOptions {\n\truntimeHost: AgentSessionRuntime;\n\toutput: RpcOutput;\n\tpendingExtensionRequests: RpcPendingExtensionRequests;\n\tcustomUi?: EngineCustomUiService;\n\trenderService?: EngineRenderService;\n\tsessionPicker?: EngineSessionPickerService;\n\tinputForm?: EngineInputFormService;\n\trequestShutdown: () => void;\n\treloadCoordinator?: KeybindingsReloadCoordinator<AgentSession>;\n}\n\nexport class RpcSessionBinding {\n\tprivate session: AgentSession;\n\tprivate unsubscribe?: () => void;\n\tprivate unsubscribeBackpressure?: () => void;\n\tprivate readonly runtimeHost: AgentSessionRuntime;\n\tprivate readonly output: RpcOutput;\n\tprivate readonly pendingExtensionRequests: RpcPendingExtensionRequests;\n\tprivate readonly customUi: EngineCustomUiService | undefined;\n\tprivate readonly renderService: EngineRenderService | undefined;\n\tprivate readonly sessionPicker: EngineSessionPickerService | undefined;\n\tprivate readonly inputForm: EngineInputFormService | undefined;\n\tprivate readonly requestShutdown: () => void;\n\tprivate readonly reloadCoordinator: KeybindingsReloadCoordinator<AgentSession> | undefined;\n\n\tprivate footerDataProvider: FooterDataProvider | undefined;\n\tconstructor({\n\t\truntimeHost,\n\t\toutput,\n\t\tpendingExtensionRequests,\n\t\trequestShutdown,\n\t\tcustomUi,\n\t\trenderService,\n\t\tsessionPicker,\n\t\tinputForm,\n\t\treloadCoordinator,\n\t}: RpcSessionBindingOptions) {\n\t\tthis.runtimeHost = runtimeHost;\n\t\tthis.output = output;\n\t\tthis.pendingExtensionRequests = pendingExtensionRequests;\n\t\tthis.requestShutdown = requestShutdown;\n\t\tthis.customUi = customUi;\n\t\tthis.renderService = renderService;\n\t\tthis.sessionPicker = sessionPicker;\n\t\tthis.inputForm = inputForm;\n\t\tthis.reloadCoordinator = reloadCoordinator;\n\t\tthis.session = runtimeHost.session;\n\t}\n\n\tget currentSession(): AgentSession {\n\t\treturn this.session;\n\t}\n\n\tasync rebindSession(): Promise<void> {\n\t\tthis.session = this.runtimeHost.session;\n\t\tthis.disposeSubscriptions();\n\t\tconst session = this.session;\n\t\tthis.renderService?.bindSession(session);\n\t\tthis.footerDataProvider = new FooterDataProvider(session.sessionManager.getCwd());\n\t\t// Seed the provider count from the current catalog snapshot, mirroring\n\t\t// updateProviderCountFromSnapshot() in interactive startup, so the\n\t\t// embedded footer shows the (provider) model prefix in multi-provider\n\t\t// sessions instead of defaulting to 0.\n\t\tconst models =\n\t\t\tsession.scopedModels.length > 0\n\t\t\t\t? session.scopedModels.map((scoped) => scoped.model)\n\t\t\t\t: session.modelRuntime.getAvailableSnapshot();\n\t\tthis.footerDataProvider.setAvailableProviderCount(new Set(models.map((model) => model.provider)).size);\n\n\t\ttry {\n\t\t\tawait session.bindExtensions({\n\t\t\t\tuiContext: createRpcExtensionUIContext({\n\t\t\t\t\toutput: this.output,\n\t\t\t\t\tpendingExtensionRequests: this.pendingExtensionRequests,\n\t\t\t\t\tcustomUi: this.customUi,\n\t\t\t\t\tsessionPicker: this.sessionPicker,\n\t\t\t\t\tinputForm: this.inputForm,\n\t\t\t\t\tfooterDataProvider: this.footerDataProvider,\n\t\t\t\t}),\n\t\t\t\tmode: this.customUi ? \"tui\" : \"rpc\",\n\t\t\t\tcommandContextActions: {\n\t\t\t\t\twaitForIdle: () => this.session.agent.waitForIdle(),\n\t\t\t\t\tnewSession: async (options) => this.runtimeHost.newSession(options),\n\t\t\t\t\tfork: async (entryId, forkOptions) => {\n\t\t\t\t\t\tconst result = await this.runtimeHost.fork(entryId, forkOptions);\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t},\n\t\t\t\t\tnavigateTree: async (targetId, options) => {\n\t\t\t\t\t\tconst result = await this.session.navigateTree(targetId, {\n\t\t\t\t\t\t\tsummarize: options?.summarize,\n\t\t\t\t\t\t\tcustomInstructions: options?.customInstructions,\n\t\t\t\t\t\t\treplaceInstructions: options?.replaceInstructions,\n\t\t\t\t\t\t\tlabel: options?.label,\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t},\n\t\t\t\t\tswitchSession: async (sessionPath, options) => {\n\t\t\t\t\t\treturn this.runtimeHost.switchSession(sessionPath, options);\n\t\t\t\t\t},\n\t\t\t\t\treload: async () => {\n\t\t\t\t\t\tconst steeringMode = this.session.steeringMode;\n\t\t\t\t\t\tconst followUpMode = this.session.followUpMode;\n\t\t\t\t\t\tif (this.reloadCoordinator) await this.reloadCoordinator.reload(this.session);\n\t\t\t\t\t\telse await this.session.reload();\n\t\t\t\t\t\tthis.session.setSteeringMode(steeringMode);\n\t\t\t\t\t\tthis.session.setFollowUpMode(followUpMode);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tshutdownHandler: this.requestShutdown,\n\t\t\t\tonError: (err) => {\n\t\t\t\t\tthis.output({\n\t\t\t\t\t\ttype: \"extension_error\",\n\t\t\t\t\t\textensionPath: err.extensionPath,\n\t\t\t\t\t\tevent: err.event,\n\t\t\t\t\t\terror: err.error,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t});\n\t\t\tthis.footerDataProvider.startGitWatcher();\n\t\t} catch (error) {\n\t\t\t// Leave no partially-initialized footer state behind if extension\n\t\t\t// binding fails; dispose the provider and rethrow.\n\t\t\tthis.footerDataProvider.dispose();\n\t\t\tthis.footerDataProvider = undefined;\n\t\t\tthrow error;\n\t\t}\n\n\t\tthis.unsubscribe = session.subscribe((event) => {\n\t\t\tthis.output(toJsonEvent(event));\n\t\t});\n\t\tthis.unsubscribeBackpressure = session.agent.subscribe(async () => {\n\t\t\tawait waitForRawStdoutBackpressure();\n\t\t});\n\t\tthis.reloadCoordinator?.publishCurrentState(session);\n\t}\n\n\tdisposeSubscriptions(): void {\n\t\tthis.unsubscribe?.();\n\t\tthis.unsubscribeBackpressure?.();\n\t\tthis.footerDataProvider?.dispose();\n\t\tthis.unsubscribe = undefined;\n\t\tthis.unsubscribeBackpressure = undefined;\n\t\tthis.footerDataProvider = undefined;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"rpc-session-binding.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-session-binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAK1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAoC,MAAM,uBAAuB,CAAC;AAgBtG,MAAM,OAAO,iBAAiB;IAe7B,YAAY,EACX,WAAW,EACX,MAAM,EACN,wBAAwB,EACxB,eAAe,EACf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Ae,EAAE,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,kEAAkE;YAClE,mDAAmD;YACnD,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC;YAClC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;YACpC,MAAM,KAAK,CAAC;QACb,CAAC;QAED,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;YAC9C,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,uBAAuB,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;YACjE,MAAM,4BAA4B,EAAE,CAAC;QACtC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,oBAAoB;QACnB,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACrB,IAAI,CAAC,uBAAuB,EAAE,EAAE,CAAC;QACjC,IAAI,CAAC,kBAAkB,EAAE,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,uBAAuB,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;IACrC,CAAC;CACD","sourcesContent":["import { setCapabilityOverrides } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../core/agent-session.ts\";\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.ts\";\nimport { FooterDataProvider } from \"../../core/footer-data-provider.ts\";\nimport { waitForRawStdoutBackpressure } from \"../../core/output-guard.ts\";\nimport type { EngineCustomUiService } from \"../interactive-engine/engine-custom-ui.ts\";\nimport type { EngineInputFormService } from \"../interactive-engine/engine-input-form.ts\";\nimport type { EngineRenderService } from \"../interactive-engine/engine-render-service.ts\";\nimport type { EngineSessionPickerService } from \"../interactive-engine/engine-session-picker.ts\";\nimport { toJsonEvent } from \"../json-event.ts\";\nimport { createRpcExtensionUIContext, type RpcPendingExtensionRequests } from \"./rpc-extension-ui.ts\";\nimport type { KeybindingsReloadCoordinator } from \"./rpc-keybindings-reload.ts\";\nimport type { RpcOutput } from \"./rpc-responses.ts\";\n\ninterface RpcSessionBindingOptions {\n\truntimeHost: AgentSessionRuntime;\n\toutput: RpcOutput;\n\tpendingExtensionRequests: RpcPendingExtensionRequests;\n\tcustomUi?: EngineCustomUiService;\n\trenderService?: EngineRenderService;\n\tsessionPicker?: EngineSessionPickerService;\n\tinputForm?: EngineInputFormService;\n\trequestShutdown: () => void;\n\treloadCoordinator?: KeybindingsReloadCoordinator<AgentSession>;\n}\n\nexport class RpcSessionBinding {\n\tprivate session: AgentSession;\n\tprivate unsubscribe?: () => void;\n\tprivate unsubscribeBackpressure?: () => void;\n\tprivate readonly runtimeHost: AgentSessionRuntime;\n\tprivate readonly output: RpcOutput;\n\tprivate readonly pendingExtensionRequests: RpcPendingExtensionRequests;\n\tprivate readonly customUi: EngineCustomUiService | undefined;\n\tprivate readonly renderService: EngineRenderService | undefined;\n\tprivate readonly sessionPicker: EngineSessionPickerService | undefined;\n\tprivate readonly inputForm: EngineInputFormService | undefined;\n\tprivate readonly requestShutdown: () => void;\n\tprivate readonly reloadCoordinator: KeybindingsReloadCoordinator<AgentSession> | undefined;\n\n\tprivate footerDataProvider: FooterDataProvider | undefined;\n\tconstructor({\n\t\truntimeHost,\n\t\toutput,\n\t\tpendingExtensionRequests,\n\t\trequestShutdown,\n\t\tcustomUi,\n\t\trenderService,\n\t\tsessionPicker,\n\t\tinputForm,\n\t\treloadCoordinator,\n\t}: RpcSessionBindingOptions) {\n\t\tthis.runtimeHost = runtimeHost;\n\t\tthis.output = output;\n\t\tthis.pendingExtensionRequests = pendingExtensionRequests;\n\t\tthis.requestShutdown = requestShutdown;\n\t\tthis.customUi = customUi;\n\t\tthis.renderService = renderService;\n\t\tthis.sessionPicker = sessionPicker;\n\t\tthis.inputForm = inputForm;\n\t\tthis.reloadCoordinator = reloadCoordinator;\n\t\tthis.session = runtimeHost.session;\n\t}\n\n\tget currentSession(): AgentSession {\n\t\treturn this.session;\n\t}\n\n\tasync rebindSession(): Promise<void> {\n\t\tthis.session = this.runtimeHost.session;\n\t\tthis.disposeSubscriptions();\n\t\tconst session = this.session;\n\t\tsetCapabilityOverrides(session.settingsManager.getTerminalCapabilityOverrides());\n\t\tthis.renderService?.bindSession(session);\n\t\tthis.footerDataProvider = new FooterDataProvider(session.sessionManager.getCwd());\n\t\t// Seed the provider count from the current catalog snapshot, mirroring\n\t\t// updateProviderCountFromSnapshot() in interactive startup, so the\n\t\t// embedded footer shows the (provider) model prefix in multi-provider\n\t\t// sessions instead of defaulting to 0.\n\t\tconst models =\n\t\t\tsession.scopedModels.length > 0\n\t\t\t\t? session.scopedModels.map((scoped) => scoped.model)\n\t\t\t\t: session.modelRuntime.getAvailableSnapshot();\n\t\tthis.footerDataProvider.setAvailableProviderCount(new Set(models.map((model) => model.provider)).size);\n\n\t\ttry {\n\t\t\tawait session.bindExtensions({\n\t\t\t\tuiContext: createRpcExtensionUIContext({\n\t\t\t\t\toutput: this.output,\n\t\t\t\t\tpendingExtensionRequests: this.pendingExtensionRequests,\n\t\t\t\t\tcustomUi: this.customUi,\n\t\t\t\t\tsessionPicker: this.sessionPicker,\n\t\t\t\t\tinputForm: this.inputForm,\n\t\t\t\t\tfooterDataProvider: this.footerDataProvider,\n\t\t\t\t}),\n\t\t\t\tmode: this.customUi ? \"tui\" : \"rpc\",\n\t\t\t\tcommandContextActions: {\n\t\t\t\t\twaitForIdle: () => this.session.agent.waitForIdle(),\n\t\t\t\t\tnewSession: async (options) => this.runtimeHost.newSession(options),\n\t\t\t\t\tfork: async (entryId, forkOptions) => {\n\t\t\t\t\t\tconst result = await this.runtimeHost.fork(entryId, forkOptions);\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t},\n\t\t\t\t\tnavigateTree: async (targetId, options) => {\n\t\t\t\t\t\tconst result = await this.session.navigateTree(targetId, {\n\t\t\t\t\t\t\tsummarize: options?.summarize,\n\t\t\t\t\t\t\tcustomInstructions: options?.customInstructions,\n\t\t\t\t\t\t\treplaceInstructions: options?.replaceInstructions,\n\t\t\t\t\t\t\tlabel: options?.label,\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t},\n\t\t\t\t\tswitchSession: async (sessionPath, options) => {\n\t\t\t\t\t\treturn this.runtimeHost.switchSession(sessionPath, options);\n\t\t\t\t\t},\n\t\t\t\t\treload: async () => {\n\t\t\t\t\t\tconst steeringMode = this.session.steeringMode;\n\t\t\t\t\t\tconst followUpMode = this.session.followUpMode;\n\t\t\t\t\t\tif (this.reloadCoordinator) await this.reloadCoordinator.reload(this.session);\n\t\t\t\t\t\telse await this.session.reload();\n\t\t\t\t\t\tthis.session.setSteeringMode(steeringMode);\n\t\t\t\t\t\tthis.session.setFollowUpMode(followUpMode);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tshutdownHandler: this.requestShutdown,\n\t\t\t\tonError: (err) => {\n\t\t\t\t\tthis.output({\n\t\t\t\t\t\ttype: \"extension_error\",\n\t\t\t\t\t\textensionPath: err.extensionPath,\n\t\t\t\t\t\tevent: err.event,\n\t\t\t\t\t\terror: err.error,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t});\n\t\t\tthis.footerDataProvider.startGitWatcher();\n\t\t} catch (error) {\n\t\t\t// Leave no partially-initialized footer state behind if extension\n\t\t\t// binding fails; dispose the provider and rethrow.\n\t\t\tthis.footerDataProvider.dispose();\n\t\t\tthis.footerDataProvider = undefined;\n\t\t\tthrow error;\n\t\t}\n\n\t\tthis.unsubscribe = session.subscribe((event) => {\n\t\t\tthis.output(toJsonEvent(event));\n\t\t});\n\t\tthis.unsubscribeBackpressure = session.agent.subscribe(async () => {\n\t\t\tawait waitForRawStdoutBackpressure();\n\t\t});\n\t\tthis.reloadCoordinator?.publishCurrentState(session);\n\t}\n\n\tdisposeSubscriptions(): void {\n\t\tthis.unsubscribe?.();\n\t\tthis.unsubscribeBackpressure?.();\n\t\tthis.footerDataProvider?.dispose();\n\t\tthis.unsubscribe = undefined;\n\t\tthis.unsubscribeBackpressure = undefined;\n\t\tthis.footerDataProvider = undefined;\n\t}\n}\n"]}
|
package/docs/compaction.md
CHANGED
|
@@ -117,7 +117,7 @@ Exactly the configured recent-message tail is outside the compactable region; At
|
|
|
117
117
|
|
|
118
118
|
Manual compaction is single-flight. A manual request made while another manual compaction is still in flight joins that run and receives its result instead of starting a second model call, so it emits no extra `compaction_start`/`compaction_end` pair and appends no extra boundary; `abortCompaction()` (Escape) still cancels the single owning run for every waiter. A manual request made while automatic compaction is active takes ownership: it cancels unfinished automatic work, abandons any pending automatic continuation, waits for the active turn and automatic state to settle, then runs the requested manual compaction. If the automatic boundary committed first, the manual request runs after it rather than reusing that result or writing concurrently. In the interactive TUI, `/compact` uses this takeover only for automatic compaction; a second manual compaction or branch summary is still refused. Ordinary text typed during compaction remains queued and flushes after its non-mid-turn completion, including cancellation or failure.
|
|
119
119
|
|
|
120
|
-
The post-tool check stays inside the active Pi loop: it runs the rung ladder once for that completed tool turn, returns the rebuilt context to the loop, and never calls or schedules `agent.continue()`. Normal context reconstruction preserves provider tool-call/result protocol validity. Below-threshold tool turns follow the unchanged request path. Because the same active run resumes without emitting another `agent_start`, the interactive TUI replaces the compaction loader with its working spinner as soon as successful mid-turn compaction ends; streaming feedback therefore resumes immediately without waiting for another user interaction.
|
|
120
|
+
The post-tool check stays inside the active Pi loop: it runs the rung ladder once for that completed tool turn, returns the rebuilt context to the loop, and never calls or schedules `agent.continue()`. If the caller installed `prepareNextTurn` or `prepareNextTurnWithContext`, Atomic invokes it after compaction with that rebuilt context and sends the caller's complete replacement context through the normal context transform to the next provider request. A `shouldStopAfterTurn` result of `true` takes precedence over queued steering and follow-up messages, including messages queued while the callback is running: Atomic leaves that work pending until a later explicit prompt or continuation instead of starting another provider request. Normal context reconstruction preserves provider tool-call/result protocol validity. Below-threshold tool turns follow the unchanged request path. Because the same active run resumes without emitting another `agent_start`, the interactive TUI replaces the compaction loader with its working spinner and keeps terminal progress active as soon as successful mid-turn compaction ends; streaming feedback therefore resumes immediately without waiting for another user interaction.
|
|
121
121
|
|
|
122
122
|
## Planning rungs and failure behavior
|
|
123
123
|
|
|
@@ -19,6 +19,8 @@ Atomic accepts environment variables for configuration, provider credentials, an
|
|
|
19
19
|
|
|
20
20
|
`PI_TUI_ESC_TIMEOUT` belongs to the installed pi-tui renderer and also keeps its upstream name: it sets how long the renderer waits after a lone `ESC` before treating it as the Escape key, in milliseconds. The default is `100` over SSH and `10` otherwise; increase it if Alt-key input is misread as Escape.
|
|
21
21
|
|
|
22
|
+
The renderer also owns `PI_HYPERLINKS`, `PI_IMAGE_PROTOCOL`, and `PI_TRUE_COLOR`. `PI_HYPERLINKS=1|0|auto` and `PI_TRUE_COLOR=1|0|auto` override or preserve detection; `PI_IMAGE_PROTOCOL=kitty|iterm2|none|auto` selects, disables, or preserves image-protocol detection. Explicit JSON values under `terminal.hyperlinks`, `terminal.images`, and `terminal.trueColor` take precedence. These renderer-owned names intentionally have no `ATOMIC_*` aliases.
|
|
23
|
+
|
|
22
24
|
## Subprocess attribution
|
|
23
25
|
|
|
24
26
|
`AI_AGENT=atomic` is set by the CLI, RPC, and compiled binary entry points and forced into every Atomic-owned child-process environment, including bash/tool commands, isolated RPC children, subagent and workflow runners, MCP servers, web-access subprocesses, and the intercom broker. This follows upstream's overwrite policy: a caller-supplied `AI_AGENT` is replaced in the Atomic process and child environment, but the caller's environment object is never mutated.
|
package/docs/extensions.md
CHANGED
|
@@ -1490,7 +1490,7 @@ Register a custom tool callable by the LLM. See [Custom Tools](#custom-tools) fo
|
|
|
1490
1490
|
|
|
1491
1491
|
`pi.registerTool()` works both during extension load and after startup. You can call it inside `session_start`, command handlers, or other event handlers. New tools are refreshed immediately in the same session, so they appear in `pi.getAllTools()` and are callable by the LLM without `/reload`.
|
|
1492
1492
|
|
|
1493
|
-
Use `pi.setActiveTools()` to enable or disable tools (including dynamically added tools) at runtime.
|
|
1493
|
+
Use `pi.setActiveTools()` to enable or disable tools (including dynamically added tools) at runtime. Atomic always restores mandatory ordinary `intercom`; other tool behavior is unchanged.
|
|
1494
1494
|
|
|
1495
1495
|
Use `promptSnippet` to opt a custom tool into a one-line entry in `Available tools`, and `promptGuidelines` to append tool-specific bullets to the default `Guidelines` section when the tool is active.
|
|
1496
1496
|
|
package/docs/intercom.md
CHANGED
|
@@ -10,9 +10,9 @@ description: "Direct messaging between Atomic sessions on the same machine"
|
|
|
10
10
|
Atomic bundles `@bastani/intercom`, a first-party extension for direct 1:1 messaging between Atomic sessions on the same machine. Send context, findings, or requests from one session to another — whether you're driving the conversation or letting agents coordinate. Connections are lazy and tool-driven: the extension registers its commands and tools at startup, but a session does not connect until you or the model actually invoke Intercom. No separate install is needed.
|
|
11
11
|
|
|
12
12
|
**Key capabilities:**
|
|
13
|
-
- **Session messaging** - `send`, `ask` (blocking, 10-minute timeout), `reply`, `pending`, `list`, and `status` via the `intercom` tool
|
|
14
|
-
- **Runtime groups** -
|
|
15
|
-
- **Session discovery** - List connected sessions
|
|
13
|
+
- **Session messaging** - `send`, `ask` (blocking, 10-minute timeout), `reply`, `pending`, `list`, `groups`, and `status` via the `intercom` tool
|
|
14
|
+
- **Runtime groups** - Add or remove named memberships without restarting; joined sessions keep their broker IDs and later subagents inherit the most recently joined membership
|
|
15
|
+
- **Session and group discovery** - List connected sessions or every available group, including session counts and membership markers
|
|
16
16
|
- **Keyboard overlay** - ALT+M or `/intercom` opens a session picker and compose overlay
|
|
17
17
|
- **Attachments** - Share `file`, `snippet`, and `context` payloads between sessions
|
|
18
18
|
- **Subagent escalation** - Delegated children get a `contact_supervisor` tool for decisions, structured interviews, and progress updates
|
|
@@ -119,14 +119,15 @@ See auth.ts:142-156.
|
|
|
119
119
|
|
|
120
120
|
The reply hint (enabled by default) points to `intercom({ action: "reply", ... })`, so recipients never need raw sender or `replyTo` IDs. Idle recipients get a new turn immediately; busy interactive recipients receive the message once they go idle. Attachment content is included in the agent-visible body, and messages are rendered inline and stored in Atomic session history.
|
|
121
121
|
|
|
122
|
+
Atomic treats ordinary `intercom` as a mandatory runtime tool in main chat and every workflow model stage. Tool allowlists, exclusions, `noTools`, optional-extension restrictions, and reloads cannot unload or deactivate it. Restrictions on every other tool are unchanged, and `contact_supervisor` remains subagent-only. Tool registration is lightweight; broker connection and heavy initialization remain lazy until an Intercom surface is used.
|
|
123
|
+
|
|
122
124
|
## How Connection Works
|
|
123
125
|
|
|
124
|
-
Intercom connections are normally tool-driven. Ordinary sessions and delegated children
|
|
126
|
+
Intercom connections are normally tool-driven. Ordinary sessions and delegated children load and register the lightweight wrapper at startup, while broker connection and heavy initialization wait until an Intercom tool, `/intercom`, or the ALT+M overlay is invoked. One exception is supervisor authorization: launching an Intercom-enabled subagent connects the parent runtime long enough to request a broker capability for that child; the child's own connection remains lazy until it invokes `contact_supervisor`. The parent restores issued capabilities across reconnects, and the child uses the broker-confirmed current supervisor ID. Concurrent callers share one import and connection attempt, and broker state is leased to the active session generation and cleaned up on shutdown or replacement.
|
|
125
127
|
|
|
126
128
|
A session becomes intercom-connected when all of these are true:
|
|
127
129
|
|
|
128
|
-
- the
|
|
129
|
-
- `enabled` is not set to `false` in `~/.atomic/agent/intercom/config.json` (or the legacy `~/.pi/agent/intercom/config.json` fallback)
|
|
130
|
+
- the mandatory bundled Intercom extension is loaded in that Atomic model session
|
|
130
131
|
- the model or user has invoked an Intercom surface in that session, **or** the parent runtime is authorizing an Intercom-enabled child supervisor relationship
|
|
131
132
|
- the local broker is running or can be auto-started
|
|
132
133
|
|
|
@@ -138,33 +139,34 @@ Name sessions with `/name` so they can target each other (for example `/name pla
|
|
|
138
139
|
|
|
139
140
|
| Parameter | Type | Description |
|
|
140
141
|
|-----------|------|-------------|
|
|
141
|
-
| `action` | string | `"list"`, `"join"`, `"leave"`, `"send"`, `"ask"`, `"reply"`, `"pending"`, or `"status"` |
|
|
142
|
+
| `action` | string | `"list"`, `"groups"`, `"join"`, `"leave"`, `"send"`, `"ask"`, `"reply"`, `"pending"`, or `"status"` |
|
|
142
143
|
| `to` | string | Exact session name/full session ID, or `<runId>:<stageKey>` for `send` to a not-yet-started workflow stage (for send/ask, or targeted reply) |
|
|
143
144
|
| `message` | string | Message text (for send/ask/reply) |
|
|
144
145
|
| `attachments` | array | Optional `file`, `snippet`, or `context` attachments |
|
|
145
146
|
| `replyTo` | string | Optional message ID for threading or replying to an `ask` |
|
|
146
|
-
| `group` | string | Group name for `join`; read-only group filter for `list`/`status`. `send`/`ask`
|
|
147
|
+
| `group` | string | Group name for `join` or an optional targeted `leave`; read-only group filter for `list`/`status`. `send`/`ask` remain limited to shared memberships. |
|
|
147
148
|
|
|
148
149
|
### Actions
|
|
149
150
|
|
|
150
151
|
| Action | Behavior |
|
|
151
152
|
|--------|----------|
|
|
152
|
-
| `join` |
|
|
153
|
-
| `leave` |
|
|
154
|
-
| `
|
|
153
|
+
| `join` | Adds a trimmed named group membership and creates the group if needed. The action waits for broker acknowledgement and reports the complete resulting membership set. `default` is shared; `true` and `auto` are reserved for subagent auto-groups. |
|
|
154
|
+
| `leave` | With `group`, removes only that membership and keeps all others. Without `group`, resets the session to its resolved startup home group. Both forms report the resulting membership set. |
|
|
155
|
+
| `groups` | Lists every group represented by a connected session, with its session count and a marker for each group this session belongs to. Use it to discover names rather than guessing. |
|
|
156
|
+
| `list` | Keeps session-listing semantics: returns the current session plus every active session sharing at least one membership, with name, full session ID, working directory, model, and live status. Pass `group` for a read-only view of one group. |
|
|
155
157
|
| `send` | Fire-and-forget delivery through ordinary Intercom. A live workflow-stage session receives the message immediately and returns `delivered`. A known workflow stage whose session has not initialized is addressed as `<runId>:<stageKey>`; Atomic persists the message and returns the distinct `queued` result with its FIFO position. Unknown stage identities retain the ordinary unknown-target failure. Requires `to` and `message`; cannot message the current session. |
|
|
156
158
|
| `ask` | Sends a message and blocks until a live recipient replies (10-minute timeout). An ask to a known workflow stage whose session has not initialized is refused with `pending_stage_ask_unsupported` and recommends ordinary `send`; holding a waiter until a stage eventually starts would be unbounded. A live recipient disconnect fails promptly. From a foreground child to its launching parent, the existing fresh-subagent handoff path remains unchanged. |
|
|
157
159
|
| `reply` | Replies to the intercom-triggered message of the current turn; otherwise falls back to the single unresolved inbound ask. With multiple pending asks, pass `to` or inspect with `pending` first. |
|
|
158
160
|
| `pending` | Lists unresolved inbound asks with sender, message ID, elapsed time, and a short preview. |
|
|
159
|
-
| `status` | Shows connection status, session ID,
|
|
161
|
+
| `status` | Shows connection status, session ID, every group this session belongs to, and the count of active sessions visible through those memberships. A `group` filter remains a read-only peek. |
|
|
160
162
|
|
|
161
|
-
To
|
|
163
|
+
To give two plain chat sessions a private shared membership, have both call:
|
|
162
164
|
|
|
163
165
|
```typescript
|
|
164
166
|
intercom({ action: "join", group: "api-review" })
|
|
165
167
|
```
|
|
166
168
|
|
|
167
|
-
|
|
169
|
+
Joining is additive: existing memberships remain active, and the broker updates presence without changing the session ID. Use `intercom({ action: "groups" })` to discover all available names and membership markers. `intercom({ action: "leave", group: "api-review" })` removes only that membership; `intercom({ action: "leave" })` resets to the home group resolved at startup. Rejected or unacknowledged changes leave client and inheritance state unchanged. Ordinary delivery requires a shared membership, while `contact_supervisor` retains its capability-based cross-group path.
|
|
168
170
|
|
|
169
171
|
Sent and received messages are recorded in session history as `intercom_sent` / `intercom_received` entries.
|
|
170
172
|
|
|
@@ -172,6 +174,8 @@ Sent and received messages are recorded in session history as `intercom_sent` /
|
|
|
172
174
|
|
|
173
175
|
Live-session lookup accepts only an exact full session ID or an exact case-insensitive session name. Ordinary `send` also accepts the exact `<runId>:<stageKey>` identity of a known workflow stage whose session has not initialized. The run ID is the full UUID, and the authored stage key is case-sensitive. Unknown runs and stages retain the ordinary unknown-target failure. Targeting is **group-scoped** — see [Groups](#groups) below.
|
|
174
176
|
|
|
177
|
+
Before steering a stage, join its invocation group. Use the Intercom `groups` action to discover it. Workflow invocation groups are named `workflow:<rootRunId>`.
|
|
178
|
+
|
|
175
179
|
### Deferred delivery to pending stages
|
|
176
180
|
|
|
177
181
|
Send material updates through Intercom to every affected workflow stage, including stages that have not started. Atomic queues messages for known pending stages and delivers them when their sessions initialize. A deferred send returns `queued`, including its FIFO position, rather than claiming the message was `delivered`; live delivery remains immediate and returns `delivered`.
|
|
@@ -182,13 +186,16 @@ Only a session in the workflow run's Intercom group can queue a message; a cross
|
|
|
182
186
|
|
|
183
187
|
### Groups
|
|
184
188
|
|
|
185
|
-
Every session belongs to
|
|
189
|
+
Every session belongs to a non-empty set of intercom **groups**. Sessions with no group configured retain exactly the legacy behavior: they belong only to the implicit `"default"` group and can see and message each other. A session can ordinarily discover, resolve, and message another session when their membership sets intersect; exact-ID sends with no shared membership are rejected by the broker.
|
|
190
|
+
|
|
191
|
+
- `list` still lists sessions. Without a filter it returns the union of sessions visible through any of your memberships; with `group`, it gives a read-only view of that one group.
|
|
192
|
+
- `groups` lists every currently available group, its connected-session count, and whether this session is a member.
|
|
193
|
+
- `join` adds one membership. `leave` removes the named membership, while bare `leave` resets the complete set to the startup home group.
|
|
194
|
+
- `status` reports the complete membership set. `session_joined`/`session_left`/`presence_update` events are delivered whenever a membership change affects visibility.
|
|
186
195
|
|
|
187
|
-
-
|
|
188
|
-
- `list`/`status` show your own group and only same-group peers. Pass `group: "name"` to `list`/`status` for a **read-only** peek at another group's membership. `send`/`ask` are always locked to your own group and error if you pass a different `group`.
|
|
189
|
-
- `session_joined`/`session_left`/`presence_update` are group-scoped, so you never see peers outside your group appear or disappear.
|
|
196
|
+
A session's home group is resolved with this precedence: explicit stage/task/subagent group > runtime-owned workflow invocation group or inherited launching-session group > env `ATOMIC_INTERCOM_GROUP` (legacy `PI_INTERCOM_GROUP`) > Intercom `config.json` `"group"` > `"default"`. Each top-level workflow invocation gets a stable non-default group from its persistent run identity; Intercom-capable stages, nested workflows, and their delegated subagents inherit it without authors threading IDs. Explicit `group: "default"` opts into the shared group. Boolean `true` and the trimmed, case-insensitive strings `"true"`/`"auto"` request an automatically generated subgroup; those string names are reserved. Stages and children without Intercom access receive no group. See [workflows.md](/workflows) for workflow-stage rules. The subagent-only `contact_supervisor` path remains capability-based and can cross group boundaries; ordinary `send`, `ask`, and replies cannot use it as a bypass.
|
|
190
197
|
|
|
191
|
-
|
|
198
|
+
The broker, not the client, marks validated supervisor traffic. Ordinary `send` frames remain membership-isolated even if a raw client forges a supervisor marker, and replies cross back only through an exact broker-recorded `replyTo` match. Parent-held authorization state is restored after reconnects. Before an Intercom-enabled foreground child first runs, the parent wrapper may lazy-load and connect the broker provider to mint that exact child's capability; queued children request no capability. The child still connects only when it uses an Intercom delivery path, and claimed decisions or interviews terminally hand off before child send or waiter admission. A claimed provider failure aborts launch, while runtimes with no provider omit supervisor metadata and do not expose a broken channel.
|
|
192
199
|
|
|
193
200
|
### send vs ask vs reply
|
|
194
201
|
|
|
@@ -381,9 +388,9 @@ The `subagent` tool's `control` options select which control events notify the p
|
|
|
381
388
|
- **`notifyOn`** — defaults to `["active_long_running", "needs_attention"]`
|
|
382
389
|
- **`notifyChannels`** — defaults to `["event", "intercom"]` (all that are available)
|
|
383
390
|
|
|
384
|
-
Detached subagent result delivery over Intercom is confirmation-based and preserves a successful delivery phase across watcher replacement. Each delegated child gets a deterministic Intercom target derived from its run/agent/index identity, and run results report those targets ("Run intercom target" / "Previous intercom target"; targets may be inactive after completion). `intercom({ action: "status" })` reports connection state and
|
|
391
|
+
Detached subagent result delivery over Intercom is confirmation-based and preserves a successful delivery phase across watcher replacement. Each delegated child gets a deterministic Intercom target derived from its run/agent/index identity, and run results report those targets ("Run intercom target" / "Previous intercom target"; targets may be inactive after completion). `intercom({ action: "status" })` reports connection state and every membership for the current session.
|
|
385
392
|
|
|
386
|
-
If live peer coordination is needed, invoke `intercom({ action: "status" })` in the parent before launching; the child connects on its first ordinary Intercom call. A claimed `contact_supervisor` decision or interview can yield before child broker connection because typed admission already identifies the launching parent. Fresh child sessions receive the bundled Intercom wrapper
|
|
393
|
+
If live peer coordination is needed, invoke `intercom({ action: "status" })` in the parent before launching; the child connects on its first ordinary Intercom call. A claimed `contact_supervisor` decision or interview can yield before child broker connection because typed admission already identifies the launching parent. Fresh child sessions always receive the mandatory bundled Intercom wrapper, including when an explicit `extensions` allowlist is empty or omits it.
|
|
387
394
|
|
|
388
395
|
### Delivery Ordering
|
|
389
396
|
|
|
@@ -400,7 +407,6 @@ Create `~/.atomic/agent/intercom/config.json`. The legacy `~/.pi/agent/intercom/
|
|
|
400
407
|
"brokerCommand": "npx",
|
|
401
408
|
"brokerArgs": ["--no-install", "tsx"],
|
|
402
409
|
"confirmSend": false,
|
|
403
|
-
"enabled": true,
|
|
404
410
|
"replyHint": true,
|
|
405
411
|
"status": "researching",
|
|
406
412
|
"group": "default"
|
|
@@ -412,7 +418,6 @@ Create `~/.atomic/agent/intercom/config.json`. The legacy `~/.pi/agent/intercom/
|
|
|
412
418
|
| `brokerCommand` | `"npx"` | Command used to start the local broker process; the default sentinel is hardened internally to avoid PATH lookup |
|
|
413
419
|
| `brokerArgs` | `["--no-install", "tsx"]` | Arguments passed to `brokerCommand` before the broker script path |
|
|
414
420
|
| `confirmSend` | `false` | Show a confirmation dialog before non-reply sends from an interactive session with UI |
|
|
415
|
-
| `enabled` | `true` | Enable/disable intercom entirely |
|
|
416
421
|
| `replyHint` | `true` | Include reply instruction in incoming messages |
|
|
417
422
|
| `status` | — | Optional custom status suffix shown after the automatic lifecycle status, for example `thinking · researching` |
|
|
418
423
|
| `group` | `"default"` | Home intercom group for this session (see [Groups](#groups)). Overridden by env `ATOMIC_INTERCOM_GROUP` / `PI_INTERCOM_GROUP` and by workflow/orchestrator per-session injection. |
|
|
@@ -465,7 +470,7 @@ graph TB
|
|
|
465
470
|
B2 <-->|Local Socket/Pipe| B3
|
|
466
471
|
```
|
|
467
472
|
|
|
468
|
-
The broker is a standalone process that manages session registration and message routing. It auto-spawns when the first
|
|
473
|
+
The broker is a standalone process that manages session registration and message routing. It auto-spawns when the first session that invokes Intercom needs it and exits 5 seconds after the last connected session disconnects; clients reconnect automatically if the broker restarts. A spawn lock keyed by PID and timestamp prevents duplicate brokers when multiple sessions start at once.
|
|
469
474
|
|
|
470
475
|
Transport is local IPC only — a Unix domain socket on macOS/Linux or a named pipe on Windows — using length-prefixed JSON (4-byte length + payload) with request correlation for session listing, explicit delivery failures, and validation of malformed or out-of-order messages. `ask` stays client-side: the broker routes plain messages, and the client waits for the matching reply before returning it as the tool result.
|
|
471
476
|
|
package/docs/keybindings.md
CHANGED
|
@@ -84,10 +84,10 @@ The dedicated history actions always change history entries, regardless of the c
|
|
|
84
84
|
|
|
85
85
|
### TUI Fullscreen Viewport
|
|
86
86
|
|
|
87
|
-
Interactive sessions always use this fullscreen viewport for the primary transcript scroll region. Mouse-wheel input scrolls the region under the pointer, falling back to the transcript over the fixed editor/status/footer dock. Clicking an OSC 8 hyperlink opens it in the default handler; the jump-to-bottom indicator's internal OSC 8 link returns the focused transcript surface to its live end, including an attached workflow stage chat. Dragging with the primary mouse button selects text and copies it to the clipboard. See [Terminal setup](/terminal-setup) for terminal-specific mouse and trackpad behavior.
|
|
87
|
+
Interactive sessions always use this fullscreen viewport for the primary transcript scroll region. Mouse-wheel input scrolls the region under the pointer, falling back to the transcript over the fixed editor/status/footer dock. Clicking an OSC 8 hyperlink opens it in the default handler; the jump-to-bottom indicator's internal OSC 8 link returns the focused transcript surface to its live end, including an attached workflow stage chat. Dragging with the primary mouse button selects text and, by default, copies it to the clipboard. Set `fullscreenCopyOnSelect` to `false` to retain selections for explicit Ctrl+X copying. See [Terminal setup](/terminal-setup) for terminal-specific mouse and trackpad behavior.
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
Fullscreen text selection comes from the installed pi-tui 0.84.
|
|
90
|
+
Fullscreen text selection comes from the installed pi-tui 0.84.4 renderer. Drag with the primary button to select characters; double-click selects a word, including complete slash-delimited paths and kebab-case names, and triple-click selects a line. Focus changes and non-drag clicks clear transient selection state, preventing a stale highlight from appearing. A drag release reported with the generic SGR button code also ends the selection. The renderer also reduces mouse tracking in tmux, Zellij, and GNU Screen.
|
|
91
91
|
Fullscreen transcript bindings take precedence over editor bindings while the main editor has focus. The default unmodified navigation keys therefore control the transcript, while their `ctrl` variants continue to control the editor. When a fullscreen overlay or inline custom component has focus, Atomic sends matching viewport bindings to that component first. Returning `true` keeps the key local. For an in-process component, returning `false`, `undefined`, or `void` lets transcript scrolling handle it. A remote component's correlated reply falls through on `false`, failure, or timeout; `undefined` after disposal is dropped because that component no longer owns focus.
|
|
92
92
|
|
|
93
93
|
| Key | Editor action | Fullscreen action |
|
|
@@ -128,6 +128,7 @@ On Windows, pressing the secondary mouse button in fullscreen pastes text from t
|
|
|
128
128
|
| `app.suspend` | `ctrl+z` (none on Windows) | Suspend to background |
|
|
129
129
|
| `app.editor.external` | `ctrl+g` | Open in external editor (`$VISUAL` or `$EDITOR`) |
|
|
130
130
|
| `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows) | Paste image or text from clipboard |
|
|
131
|
+
| `app.message.copy` | `ctrl+x` | When `fullscreenCopyOnSelect` is `false`, copy the active fullscreen selection; otherwise copy the last assistant message |
|
|
131
132
|
|
|
132
133
|
When `app.clipboard.pasteImage` finds text rather than an image, Atomic inserts that clipboard text into the editor instead of reporting an image-paste failure.
|
|
133
134
|
|
|
@@ -137,6 +138,8 @@ Inside tmux on macOS, `Ctrl+V` is the reliable image-paste shortcut; native `Cmd
|
|
|
137
138
|
|
|
138
139
|
When the clipboard has both text and an image, behavior depends on the terminal: empty-paste terminals may insert the text on `Cmd+V`, while Kitty-protocol terminals that deliver `super+v` go through the image path (same preference as `Ctrl+V`). `Ctrl+V` always prefers the image. Apple Terminal may send nothing for image-only paste; use Ghostty/iTerm/Kitty or `Ctrl+V` in that case.
|
|
139
140
|
|
|
141
|
+
Ctrl+X keeps Atomic's hierarchy precedence. A workflow tool-detail view closes to its graph; the scoped-model selector clears its local selection; an attached workflow stage chat returns to its graph; and a workflow graph returns to main chat. Only the main editor then runs `app.message.copy`. Workflow surfaces recognize the physical Ctrl+X chord directly, including CSI variants, rather than the configurable application action. `/copy` is separate and always copies the last assistant message.
|
|
142
|
+
|
|
140
143
|
A held paused queue by itself is idle for Ctrl+C handling. After an interruption settles, the next Ctrl+C clears the editor without releasing or dequeuing the hold, and a second quick idle press exits normally.
|
|
141
144
|
|
|
142
145
|
In interactive sessions the agent runs in a supervised engine child (see [Extensions](/extensions#interactive-callback-isolation)). Escape there requests the engine's cooperative cancellation and waits for it with no deadline; it never terminates or replaces the engine.
|
package/docs/packages.md
CHANGED
|
@@ -177,7 +177,7 @@ If no app manifest (`atomic`, or legacy `pi`) is present, Atomic auto-discovers
|
|
|
177
177
|
- `skills/` recursively finds `SKILL.md` folders and loads top-level `.md` files as skills
|
|
178
178
|
- `prompts/` loads `.md` files
|
|
179
179
|
- `themes/` loads `.json` files
|
|
180
|
-
- `workflows/` loads workflow SDK files (`.ts`, `.js`, `.mjs`, `.cjs`); `workflow/` is also accepted as a singular alias. Workflow files import `workflow` from `@bastani/atomic/workflows`, import `Type` from `typebox`, and export the definition returned by `workflow({ ... })`. TypeScript resolves the published `@bastani/atomic/workflows` specifier through the `@bastani/atomic` package. Atomic resolves that workflow specifier to
|
|
180
|
+
- `workflows/` loads workflow SDK files (`.ts`, `.js`, `.mjs`, `.cjs`); `workflow/` is also accepted as a singular alias. Workflow files import `workflow` from `@bastani/atomic/workflows`, import `Type` from `typebox`, and export the definition returned by `workflow({ ... })`. TypeScript resolves the published `@bastani/atomic/workflows` specifier through the `@bastani/atomic` package. Atomic resolves that workflow specifier and the supported TypeBox root, `typebox/compile`, `typebox/value`, and legacy `@sinclair/typebox` aliases to in-memory host modules when it loads the workflow at runtime. See Programmatic Usage in the workflows guide.
|
|
181
181
|
|
|
182
182
|
When a package manifest exists, declared resource arrays normally define what loads. Workflows are the exception: if `atomic.workflows` / legacy `pi.workflows` is omitted, Atomic still checks conventional `workflows/` and `workflow/` directories.
|
|
183
183
|
|
package/docs/providers.md
CHANGED
|
@@ -56,7 +56,7 @@ Run `/fast` in interactive mode to configure fast mode separately for normal cha
|
|
|
56
56
|
- OpenAI `openai/*` and `openai-codex/*` models use the priority service tier. A resolved provider alias also qualifies when it uses the shared `openai-codex-responses` transport.
|
|
57
57
|
- GitHub Copilot models qualify when the OAuth model catalog for the signed-in account advertises a fast variant. Atomic uses that variant only for the outgoing request, so it does not appear as a separate choice in `/model`. Copilot fast mode requires the account catalog metadata obtained through `/login`; a raw `COPILOT_GITHUB_TOKEN` does not provide that metadata.
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
Main-chat subagents use the chat setting; workflow stages, nested `ctx.workflow(...)` stages, and subagents launched by those stages use the workflow setting. Atomic checks each fallback, retry, compaction-planner, and branch-summary request against its effective model. An eligible fallback uses fast mode, while an unsupported model keeps its normal request behavior. The UI appends `fast` after the base model name in the chat footer, workflow stage model labels, and both main-chat and stage-launched subagent results. For an entitled Copilot child, that marker appears exactly when the outgoing request uses the account-advertised `<model-id>-fast` variant; OpenAI children instead use `service_tier: priority`. Fast mode does not apply to Azure OpenAI, OpenRouter, or generic OpenAI-compatible providers. Enable it deliberately for workflows because parallel fan-out can multiply provider usage.
|
|
60
60
|
|
|
61
61
|
For the shared ChatGPT Codex transport, Atomic sends the fast routing contract only after the final request payload contains `service_tier: priority`: `originator: codex_cli_rs` plus `x-codex-routing-hint: model=<effective-model>;tier=priority` on both HTTP/SSE and WebSocket transports. The same rule covers the stock provider, renamed providers, credential-resolved endpoints, and monitoring proxies that retain `api: "openai-codex-responses"`. WebSocket fallback, reconnect, and HTTP retry attempts reuse that identity; a final model or tier change drops a cached socket before reuse. Requests to the standard OpenAI API send only the tier. When fast mode is off, or a request hook changes the final tier away from `priority`, Atomic keeps the normal `originator: pi` identity and sends no routing hint.
|
|
62
62
|
|
|
@@ -162,7 +162,7 @@ Remote pi.dev catalogs persist their ETag and are revalidated with `If-None-Matc
|
|
|
162
162
|
| Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
|
|
163
163
|
| Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
|
|
164
164
|
|
|
165
|
-
Z.AI and Z.AI Coding Plan (China) default to `glm-5.3` (`zai/glm-5.3` and `zai-coding-cn/glm-5.3`)
|
|
165
|
+
Z.AI and Z.AI Coding Plan (China) default to `glm-5.3` (`zai/glm-5.3` and `zai-coding-cn/glm-5.3`), and both direct providers also expose the multimodal `glm-5.3-flash`. Baseten defaults to its directly selectable `zai-org/GLM-5.3`; OpenRouter exposes `z-ai/glm-5.3`, and both mirrors expose the multimodal Flash variant (`zai-org/GLM-5.3-Flash` on Baseten and `z-ai/glm-5.3-flash` on OpenRouter). Every full and Flash entry supports `low`, `high`, and `max` reasoning, and built-in workflow and subagent chains include all four provider routes at `:high`. Use Baseten's `zai-org/GLM-5.2` when fully disabled reasoning is required. Qwen Token Plan Individual defaults to `qwen3.8-max` and uses the international `QWEN_TOKEN_PLAN_API_KEY` shared with the existing Qwen Token Plan provider.
|
|
166
166
|
|
|
167
167
|
Reference for environment variables and `auth.json` keys: `findEnvKeys()` / `getEnvApiKey()` in the installed `@bastani/pi-ai` dependency (`node_modules/@bastani/pi-ai/dist/env-api-keys.d.ts`). The private provider map those functions use is in `node_modules/@bastani/pi-ai/dist/env-api-keys.js`; Atomic does not include a separate `packages/ai` source directory in this monorepo.
|
|
168
168
|
|
package/docs/sdk.md
CHANGED
|
@@ -102,7 +102,7 @@ The factory requires `ExecutionEnv.renameFile()` and does not add a fallback fil
|
|
|
102
102
|
|
|
103
103
|
The main factory function for a single `AgentSession`.
|
|
104
104
|
|
|
105
|
-
`createAgentSession()` uses a `ResourceLoader` to supply extensions, skills, prompt templates, themes, and context files. If you do not provide one, it uses `DefaultResourceLoader` with
|
|
105
|
+
`createAgentSession()` uses a `ResourceLoader` to supply extensions, skills, prompt templates, themes, and context files. If you do not provide one, it uses `DefaultResourceLoader` with normal user, project, and configured-package discovery. The SDK does not add optional bundled workflow, subagent, MCP, or web-access extensions by default. It always adds the lightweight ordinary Intercom extension at the model-session boundary.
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
108
|
import { createAgentSession, SessionManager } from "@bastani/atomic";
|
|
@@ -574,20 +574,20 @@ Specify which tools to expose by name:
|
|
|
574
574
|
|
|
575
575
|
- Built-in tool names enabled by default: `read`, `bash`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`
|
|
576
576
|
- `find` discovers filesystem paths by glob; `search` searches file contents with regex patterns across files, directories, globs, and internal URLs.
|
|
577
|
-
- `tools` is an allowlist: when provided, only the listed built-in, extension, and custom tool names are exposed
|
|
578
|
-
- `excludedTools` is a blocklist: matching built-in, extension, and custom tool names are omitted from the final registry and active tool set
|
|
579
|
-
- `noTools: "all"` disables
|
|
577
|
+
- `tools` is an allowlist: when provided, only the listed built-in, extension, and custom tool names are exposed, plus mandatory ordinary `intercom`.
|
|
578
|
+
- `excludedTools` is a blocklist: matching built-in, extension, and custom tool names are omitted from the final registry and active tool set, except mandatory ordinary `intercom`. If both are provided, `tools` is applied first and `excludedTools` subtracts from it.
|
|
579
|
+
- `noTools: "all"` disables every tool except mandatory ordinary `intercom`
|
|
580
580
|
- `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled, except names listed in `excludedTools`
|
|
581
581
|
|
|
582
582
|
```typescript
|
|
583
583
|
import { createAgentSession } from "@bastani/atomic";
|
|
584
584
|
|
|
585
|
-
// Read-only mode
|
|
585
|
+
// Read-only mode. `tools` selects optional tools; ordinary Intercom remains active.
|
|
586
586
|
const { session } = await createAgentSession({
|
|
587
587
|
tools: ["read", "search", "find", "ls"],
|
|
588
588
|
});
|
|
589
589
|
|
|
590
|
-
// Pick specific tools
|
|
590
|
+
// Pick specific optional tools. Ordinary Intercom remains active even when omitted.
|
|
591
591
|
const { session } = await createAgentSession({
|
|
592
592
|
tools: ["read", "bash", "search"],
|
|
593
593
|
});
|
|
@@ -600,7 +600,7 @@ const { session } = await createAgentSession({
|
|
|
600
600
|
// Allowlist first, then subtract exclusions
|
|
601
601
|
const { session } = await createAgentSession({
|
|
602
602
|
tools: ["read", "bash", "ask_user_question"],
|
|
603
|
-
excludedTools: ["ask_user_question"], //
|
|
603
|
+
excludedTools: ["ask_user_question"], // optional tools: read, bash; ordinary Intercom remains active
|
|
604
604
|
});
|
|
605
605
|
```
|
|
606
606
|
|
|
@@ -760,6 +760,8 @@ await loader.reload();
|
|
|
760
760
|
const { session } = await createAgentSession({ resourceLoader: loader });
|
|
761
761
|
```
|
|
762
762
|
|
|
763
|
+
`createAgentSession()` preserves resources from a supplied loader but restores Atomic's mandatory bundled Intercom extension after loader overrides, deferred reloads, and same-name extension or `customTools` collisions. The supplied loader still controls every optional extension.
|
|
764
|
+
|
|
763
765
|
Extensions can register tools, subscribe to events, add commands, and more. See [Extensions](/extensions) for the full API.
|
|
764
766
|
|
|
765
767
|
**Event Bus:** Extensions can communicate via `pi.events`. Pass a shared `eventBus` to `DefaultResourceLoader` if you need to emit or listen from outside:
|
package/docs/settings.md
CHANGED
|
@@ -112,6 +112,7 @@ Chat and workflow-stage scopes are independent. Workflow stages, nested `ctx.wor
|
|
|
112
112
|
| `theme` | string | `"dark"` | Theme name (`"dark"`, `"light"`, a Catppuccin built-in, or custom) |
|
|
113
113
|
| `fullscreenScrollbar` | string | `"auto"` | Fullscreen transcript scrollbar: `"auto"` shows it temporarily while scrolling, `"always"` reserves the rightmost transcript column and keeps it visible, and `"hidden"` hides it. The thumb can be dragged when shown. |
|
|
114
114
|
| `fullscreenExitOutput` | string | `"transcript"` | Fullscreen exit output: `"transcript"` prints the final transcript and session resume hint, while `"resume-hint"` restores the terminal's previous screen and prints only the resume hint. Settable from `/settings` |
|
|
115
|
+
| `fullscreenCopyOnSelect` | boolean | `true` | Copy fullscreen text selections automatically on mouse release. When `false`, the selection remains highlighted and main-editor Ctrl+X copies it; Ctrl+X falls back to the last assistant message when there is no selection. Settable from `/settings` |
|
|
115
116
|
| `quietStartup` | boolean | `false` | Hide startup header |
|
|
116
117
|
| `defaultProjectTrust` | string | `"ask"` | Fallback project trust behavior: `"ask"`, `"always"`, or `"never"`. Global setting only |
|
|
117
118
|
| `collapseChangelog` | boolean | `false` | Show condensed changelog after updates |
|
|
@@ -128,7 +129,7 @@ Chat and workflow-stage scopes are independent. Workflow stages, nested `ctx.wor
|
|
|
128
129
|
| `autocompleteMaxVisible` | number | `5` | Max visible items in the default editor and custom editors installed through `ctx.ui.setEditorComponent()` (3-20) |
|
|
129
130
|
| `showHardwareCursor` | boolean | `false` | Show the terminal cursor while TUI positions it for IME support |
|
|
130
131
|
|
|
131
|
-
Interactive sessions always use the fullscreen renderer. The transcript scrolls in its own viewport while the editor, status line, usage meter, extension widgets, and footer stay docked at the bottom. Wheel and trackpad gestures go first to a focused workflow overlay, including workflow graphs and stage chats. Events that overlay does not consume fall through to the alternate-screen viewport; non-overlay focused components leave mouse input with pi-tui so transcript scrolling, scrollbar interaction, and drag selection remain available.
|
|
132
|
+
Interactive sessions always use the fullscreen renderer. The transcript scrolls in its own viewport while the editor, status line, usage meter, extension widgets, and footer stay docked at the bottom. Wheel and trackpad gestures go first to a focused workflow overlay, including workflow graphs and stage chats. Events that overlay does not consume fall through to the alternate-screen viewport; non-overlay focused components leave mouse input with pi-tui so transcript scrolling, scrollbar interaction, and drag selection remain available. A selection made over a workflow overlay never copies during a hierarchy transition and is cleared when that overlay hides and the main chat repaints.
|
|
132
133
|
|
|
133
134
|
The fullscreen renderer keeps minimum sizes for nested layout stacks during resize, and transient fullscreen notices stack instead of replacing a notice that is still visible.
|
|
134
135
|
|
|
@@ -284,7 +285,12 @@ Older settings with a boolean `websockets` value are migrated to `transport`: `t
|
|
|
284
285
|
| `terminal.showTerminalProgress` | boolean | `false` | Show OSC 9;4 progress indicators in the terminal tab bar |
|
|
285
286
|
| `images.autoResize` | boolean | `true` | Resize oversized images to a 2000x2000 maximum. Applies to `@file` attachments, `read`, and images returned by tools |
|
|
286
287
|
| `images.blockImages` | boolean | `false` | Block all images from being sent to LLM |
|
|
288
|
+
| `terminal.hyperlinks` | boolean or `"auto"` | `"auto"` | JSON-only hyperlink capability override. `true`/`false` overrides detection; `"auto"`, omitted, and invalid values preserve detection. Not shown in `/settings` |
|
|
289
|
+
| `terminal.images` | `"kitty"`, `"iterm2"`, `"auto"`, or `false` | `"auto"` | JSON-only inline-image protocol override. `false` disables terminal images; `"auto"`, omitted, and invalid values preserve detection. Not shown in `/settings` |
|
|
290
|
+
| `terminal.trueColor` | boolean or `"auto"` | `"auto"` | JSON-only truecolor capability override. `true`/`false` overrides detection; `"auto"`, omitted, and invalid values preserve detection. Not shown in `/settings` |
|
|
287
291
|
|
|
292
|
+
|
|
293
|
+
The installed pi-tui 0.84.4 renderer owns the matching environment overrides: `PI_HYPERLINKS=1|0|auto`, `PI_IMAGE_PROTOCOL=kitty|iterm2|none|auto`, and `PI_TRUE_COLOR=1|0|auto`. Explicit JSON booleans/protocols take precedence over those environment values. Use `"auto"` or omit a JSON value to leave environment and terminal detection in control.
|
|
288
294
|
When `images.autoResize` is enabled, Atomic normalizes images before sending them to the model. Tool-result images are normalized after `tool_result` extension handlers run, so images an extension inserts receive the same limit; if processing fails, Atomic keeps the original image. Set it to `false` to preserve source dimensions.
|
|
289
295
|
|
|
290
296
|
### Shell
|
|
@@ -346,7 +352,7 @@ On Windows, select `powershell` instead of `bash`, or include both:
|
|
|
346
352
|
}
|
|
347
353
|
```
|
|
348
354
|
|
|
349
|
-
An empty array starts with no built-in tools while preserving extension and custom tools. `--tools` replaces this behavior with a strict allowlist covering
|
|
355
|
+
An empty array starts with no built-in tools while preserving extension and custom tools. `--tools` replaces this behavior with a strict allowlist covering every non-mandatory tool, `--no-tools` disables every tool except mandatory ordinary `intercom`, and `--no-builtin-tools` disables only the built-in defaults. `--exclude-tools` filters the resulting list but cannot remove Intercom. A project `defaultTools` array replaces the global array.
|
|
350
356
|
|
|
351
357
|
### Sessions
|
|
352
358
|
|
|
@@ -385,7 +391,7 @@ When multiple sources specify a session directory, precedence is `--session-dir`
|
|
|
385
391
|
|
|
386
392
|
Mermaid code blocks render as themed Unicode diagrams in interactive transcripts when they fit the available width. `"off"` keeps the Markdown fence, `"final"` renders only finalized responses, and `"streaming"` also renders partial assistant responses. Invalid or too-wide diagrams remain as code, and rendering is display-only: stored messages and model context keep the original Markdown. LaTeX rendering is also display-only and converts supported expressions to terminal-friendly Unicode math; set `markdown.latex` to `false` to keep the source form.
|
|
387
393
|
|
|
388
|
-
The installed pi-tui 0.84.
|
|
394
|
+
The installed pi-tui 0.84.4 LaTeX renderer also handles whitespace and matrix layouts correctly.
|
|
389
395
|
|
|
390
396
|
### Resources
|
|
391
397
|
|
package/docs/subagents.md
CHANGED
|
@@ -128,7 +128,7 @@ Status and interrupt use the live Rust registry and status watch; `list` and `ge
|
|
|
128
128
|
|
|
129
129
|
Inside workflow stages, completion delivery observes the stage generation boundary. A completion received before the boundary closes is queued through the stage AgentSession and processed before the stage publishes its terminal snapshot. A completion that arrives after close is routed once to the parent/main chat and cannot reopen or append to the completed stage transcript. Explicit post-mortem stage chat is still available separately.
|
|
130
130
|
|
|
131
|
-
Live progress and completed results show each step's resolved model, effective reasoning level, and applied fast-mode marker, including after a model fallback; parallel steps keep their metadata separate.
|
|
131
|
+
Live progress and completed results show each step's resolved model, effective reasoning level, and applied fast-mode marker, including after a model fallback; parallel steps keep their metadata separate. Main-chat children use the launching chat's `codexFastMode.chat` setting, while children launched from a workflow stage (including a stage in a nested workflow) use `codexFastMode.workflow`. Eligible OpenAI children and Codex-transport aliases send `service_tier: priority`. A GitHub Copilot child is eligible only when its OAuth account catalog advertises the exact fast sibling; its outgoing request uses the `<model-id>-fast` wire model and its base-model label gets a separate `fast` marker. When the applicable scope is off or fallback selects an ineligible model, the request and label both return to the normal model without that marker.
|
|
132
132
|
|
|
133
133
|
## Orchestrator model and group policy
|
|
134
134
|
|
|
@@ -149,7 +149,7 @@ For adversarial review or research, prefer fresh context so the specialist inspe
|
|
|
149
149
|
|
|
150
150
|
For parallel implementation work, `worktree: true` can give each child an isolated git worktree so concurrent edits do not clobber each other.
|
|
151
151
|
|
|
152
|
-
Fresh child sessions use normal Atomic package discovery when an agent omits `extensions`, so bundled lightweight MCP
|
|
152
|
+
Fresh child sessions use normal Atomic package discovery when an agent omits `extensions`, so bundled lightweight MCP and web-access wrappers are available just as they are in the parent. An explicit `extensions` field, including an empty list, switches optional extensions to allowlist mode and excludes unlisted optional builtins; mandatory bundled Intercom remains loaded. The child does not inherit the parent's normal optional discovery set.
|
|
153
153
|
|
|
154
154
|
Top-level parallel calls support up to 50 subagents after expanding each task's optional `count`. The extension's `parallel.maxTasks` setting defaults to 50 and can enforce a lower task limit; `parallel.concurrency` independently controls how many of those children run at once, while the Rust turn limiter admits at most four running turns per parent.
|
|
155
155
|
|
package/docs/usage.md
CHANGED
|
@@ -32,6 +32,7 @@ While ordinary agent work is active, the exact one-cell `∀` remains visible an
|
|
|
32
32
|
| Shell command | `!command` runs and sends output to the model |
|
|
33
33
|
| Hidden shell command | `!!command` runs without sending output to the model |
|
|
34
34
|
| External editor | CTRL+G opens `$VISUAL` or `$EDITOR` |
|
|
35
|
+
| Copy selection/message | Ctrl+X copies a retained fullscreen selection when `fullscreenCopyOnSelect` is disabled; otherwise it copies the last assistant message |
|
|
35
36
|
|
|
36
37
|
See [Keybindings](/keybindings) for all shortcuts and customization.
|
|
37
38
|
|
|
@@ -231,7 +232,7 @@ For raw credential exports, stdout is empty on every non-zero exit but one. Once
|
|
|
231
232
|
| `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](/rpc) |
|
|
232
233
|
| `--export <in> [out]` | Export a session to HTML |
|
|
233
234
|
|
|
234
|
-
Interactive sessions always use fullscreen: the transcript scrolls independently above a sticky dock containing the editor, status line, usage meter, extension widgets, and footer. Wheel and trackpad gestures go first to a focused workflow graph or stage chat overlay; events those overlays do not consume fall through to the alternate-screen viewport. Non-overlay focused components do not block pi-tui's mouse path, so transcript scrolling, scrollbar interaction, and drag selection still work. The `fullscreenExitOutput` setting controls what exiting prints: `"transcript"` (the default) paints the final transcript plus a session resume hint on the main screen, while `"resume-hint"` restores the previous screen and prints only the resume hint. See [Settings](/settings) and [Terminal setup](/terminal-setup).
|
|
235
|
+
Interactive sessions always use fullscreen: the transcript scrolls independently above a sticky dock containing the editor, status line, usage meter, extension widgets, and footer. Wheel and trackpad gestures go first to a focused workflow graph or stage chat overlay; events those overlays do not consume fall through to the alternate-screen viewport. Non-overlay focused components do not block pi-tui's mouse path, so transcript scrolling, scrollbar interaction, and drag selection still work. Selection copies automatically by default; disable `fullscreenCopyOnSelect` to retain it for Ctrl+X. Ctrl+X closes workflow tool detail to the graph, clears a scoped-model selection, returns stage chat to its graph, or returns a workflow graph to main chat before the main editor may copy. `/copy` always copies the last assistant message. The `fullscreenExitOutput` setting controls what exiting prints: `"transcript"` (the default) paints the final transcript plus a session resume hint on the main screen, while `"resume-hint"` restores the previous screen and prints only the resume hint. See [Settings](/settings) and [Terminal setup](/terminal-setup).
|
|
235
236
|
|
|
236
237
|
In print mode, Atomic also reads piped stdin and merges it into the initial prompt:
|
|
237
238
|
|
|
@@ -269,12 +270,12 @@ When a print-mode turn correctly finishes by calling an opt-in terminating struc
|
|
|
269
270
|
|
|
270
271
|
| Option | Description |
|
|
271
272
|
|--------|-------------|
|
|
272
|
-
| `--tools <list>`, `-t <list>` | Allowlist specific built-in, extension, and custom tools |
|
|
273
|
-
| `--exclude-tools <list>`, `-xt <list>` | Denylist specific built-in, extension, and custom tools |
|
|
273
|
+
| `--tools <list>`, `-t <list>` | Allowlist specific built-in, extension, and custom tools; mandatory `intercom` remains available |
|
|
274
|
+
| `--exclude-tools <list>`, `-xt <list>` | Denylist specific built-in, extension, and custom tools; mandatory `intercom` cannot be excluded |
|
|
274
275
|
| `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension/custom tools enabled |
|
|
275
|
-
| `--no-tools`, `-nt` | Disable
|
|
276
|
+
| `--no-tools`, `-nt` | Disable every tool except mandatory `intercom` |
|
|
276
277
|
|
|
277
|
-
Default built-in tools: `read`, `bash`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`, plus `powershell` on native Windows when a PowerShell executable is available. `find.paths` accepts directories, files, or glob paths such as `*.ts` and honors `timeout`; `search` accepts `pattern`, optional `paths`, `i`, `gitignore`, and `skip` for regex content-search pagination. Use `--exclude-tools` to disable one or more tools while leaving the rest available, for example `atomic --exclude-tools ask_user_question`. The `defaultTools` setting selects which built-in tools a session starts with; `--tools` replaces that default with a strict allowlist over built-in, custom, and extension tools; `--no-builtin-tools` removes only built-ins; `--no-tools` removes
|
|
278
|
+
Default built-in tools: `read`, `bash`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`, plus `powershell` on native Windows when a PowerShell executable is available. `find.paths` accepts directories, files, or glob paths such as `*.ts` and honors `timeout`; `search` accepts `pattern`, optional `paths`, `i`, `gitignore`, and `skip` for regex content-search pagination. Use `--exclude-tools` to disable one or more non-mandatory tools while leaving the rest available, for example `atomic --exclude-tools ask_user_question`. The `defaultTools` setting selects which built-in tools a session starts with; `--tools` replaces that default with a strict allowlist over non-mandatory built-in, custom, and extension tools; `--no-builtin-tools` removes only built-ins; `--no-tools` removes every tool except ordinary bundled `intercom`. `ls` remains available as an SDK compatibility tool but is not enabled by default.
|
|
278
279
|
|
|
279
280
|
### Project Trust Options
|
|
280
281
|
|
|
@@ -290,7 +291,7 @@ Project trust gates `.atomic`/legacy `.pi` project resources, project package se
|
|
|
290
291
|
| Option | Description |
|
|
291
292
|
|--------|-------------|
|
|
292
293
|
| `-e`, `--extension <source>` | Load an extension from path, npm, or git; repeatable |
|
|
293
|
-
| `--no-extensions`, `-ne` | Disable extension discovery |
|
|
294
|
+
| `--no-extensions`, `-ne` | Disable optional extension discovery; mandatory bundled Intercom remains loaded |
|
|
294
295
|
| `--skill <path>` | Load a skill; repeatable |
|
|
295
296
|
| `--no-skills`, `-ns` | Disable skill discovery |
|
|
296
297
|
| `--prompt-template <path>` | Load a prompt template; repeatable |
|