@bastani/atomic 0.9.11-alpha.3 → 0.9.11-alpha.4
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 +13 -0
- package/dist/builtin/cursor/package.json +2 -2
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +20 -0
- package/dist/builtin/workflows/builtin/goal-prompts.ts +8 -3
- package/dist/builtin/workflows/builtin/goal.ts +4 -4
- package/dist/builtin/workflows/builtin/ralph-forked-prompts.ts +1 -1
- package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +3 -1
- package/dist/builtin/workflows/builtin/ralph-runner.ts +2 -0
- package/dist/builtin/workflows/builtin/ralph.ts +4 -4
- package/dist/builtin/workflows/builtin/shared-prompts.ts +16 -0
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/authoring/workflow.ts +1 -0
- package/dist/builtin/workflows/src/durable/dbos-lifecycle.ts +27 -1
- package/dist/builtin/workflows/src/durable/factory.ts +29 -3
- package/dist/builtin/workflows/src/durable/index.ts +2 -0
- package/dist/builtin/workflows/src/engine/run-durable-admission.ts +50 -0
- package/dist/builtin/workflows/src/engine/run.ts +12 -17
- package/dist/builtin/workflows/src/extension/extension-factory.ts +16 -1
- package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +16 -2
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +71724 -0
- package/dist/builtin/workflows/src/extension/runtime.ts +5 -3
- package/dist/builtin/workflows/src/extension/workflow-command-registration.ts +4 -1
- package/dist/builtin/workflows/src/extension/workflow-prompts.ts +3 -1
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +1 -0
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.ts +1 -0
- package/dist/builtin/workflows/src/shared/types.ts +7 -0
- package/dist/builtin/workflows/src/shared/workflow-authoring-types.d.ts +1 -0
- package/dist/builtin/workflows/src/shared/workflow-authoring-types.ts +1 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +6 -8
- package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +2 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +4 -0
- package/dist/cli/args.d.ts +8 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +16 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js +5 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +7 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +12 -6
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive-engine/engine-monitor.d.ts +8 -1
- package/dist/modes/interactive-engine/engine-monitor.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-monitor.js +13 -15
- package/dist/modes/interactive-engine/engine-monitor.js.map +1 -1
- package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-process.js +3 -0
- package/dist/modes/rpc/rpc-client-process.js.map +1 -1
- package/dist/modes/rpc/rpc-extension-ui.d.ts +3 -1
- package/dist/modes/rpc/rpc-extension-ui.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-extension-ui.js +7 -2
- package/dist/modes/rpc/rpc-extension-ui.js.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.d.ts +1 -0
- package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.js +66 -43
- package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
- package/dist/rpc-entry.js +6 -2
- package/dist/rpc-entry.js.map +1 -1
- package/dist/utils/compile-cache.d.ts +8 -0
- package/dist/utils/compile-cache.d.ts.map +1 -0
- package/dist/utils/compile-cache.js +31 -0
- package/dist/utils/compile-cache.js.map +1 -0
- package/docs/tui.md +2 -0
- package/docs/usage.md +7 -0
- package/docs/workflows.md +34 -11
- package/npm-shrinkwrap.json +23 -23
- package/package.json +2 -2
|
@@ -12,7 +12,7 @@ import type { ExtensionAPI } from "./public-types.js";
|
|
|
12
12
|
import type { WorkflowExtensionRuntimeState } from "./extension-runtime-state.js";
|
|
13
13
|
import { deAdvertiseAskUserQuestionWhenHeadless, formatStartupDiagnostics } from "./workflow-command-surfaces.js";
|
|
14
14
|
import { inFlightRunCount } from "./workflow-targets.js";
|
|
15
|
-
import { shutdownDbos } from "../durable/dbos-lifecycle.js";
|
|
15
|
+
import { flushDbos, shutdownDbos } from "../durable/dbos-lifecycle.js";
|
|
16
16
|
|
|
17
17
|
let processShutdownInstalled = false;
|
|
18
18
|
|
|
@@ -28,6 +28,19 @@ function shutdownDbosQuietly(): Promise<void> {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Process-preserving host-session boundaries (`/new`, `/resume`, `/fork`,
|
|
33
|
+
* `/reload`) must NOT stop the process-scoped DBOS executor: the replacement
|
|
34
|
+
* session reuses it for subsequent workflow runs. Flush pending durable
|
|
35
|
+
* writes instead, and reserve SDK shutdown for actual process exit.
|
|
36
|
+
*/
|
|
37
|
+
function flushDbosQuietly(): Promise<void> {
|
|
38
|
+
return flushDbos().catch((error: unknown) => {
|
|
39
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
40
|
+
console.error(`atomic-workflows: DBOS durability flush failed: ${detail}`);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
31
44
|
function installDbosProcessShutdown(): void {
|
|
32
45
|
if (processShutdownInstalled) return;
|
|
33
46
|
processShutdownInstalled = true;
|
|
@@ -135,6 +148,7 @@ export function registerWorkflowLifecycleHandlers(
|
|
|
135
148
|
deps.storeWidgetRef.current = null;
|
|
136
149
|
runtimeState.resetWorkflowDiscoveryForSession();
|
|
137
150
|
runtimeState.setNotificationsActive(false);
|
|
138
|
-
await shutdownDbosQuietly();
|
|
151
|
+
if (reason === "quit") await shutdownDbosQuietly();
|
|
152
|
+
else await flushDbosQuietly();
|
|
139
153
|
});
|
|
140
154
|
}
|