@bastani/atomic 0.9.11 → 0.9.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +12 -0
  3. package/dist/builtin/intercom/closed-workflow-stage-message.ts +1 -1
  4. package/dist/builtin/intercom/contact-supervisor-tool.ts +1 -1
  5. package/dist/builtin/intercom/index-heavy.ts +2 -2
  6. package/dist/builtin/intercom/intercom-tool.ts +2 -2
  7. package/dist/builtin/intercom/intercom-utils.ts +1 -1
  8. package/dist/builtin/intercom/lifecycle.ts +2 -2
  9. package/dist/builtin/intercom/overlay.ts +2 -2
  10. package/dist/builtin/intercom/package.json +1 -1
  11. package/dist/builtin/intercom/reply-tracker.ts +1 -1
  12. package/dist/builtin/intercom/subagent-relay.ts +2 -2
  13. package/dist/builtin/mcp/CHANGELOG.md +12 -0
  14. package/dist/builtin/mcp/apps-cancellation.ts +1 -1
  15. package/dist/builtin/mcp/commands.ts +7 -7
  16. package/dist/builtin/mcp/direct-tool-executor.ts +1 -1
  17. package/dist/builtin/mcp/direct-tools.ts +3 -3
  18. package/dist/builtin/mcp/host-html-template.ts +1 -1
  19. package/dist/builtin/mcp/index.ts +3 -3
  20. package/dist/builtin/mcp/init.ts +6 -6
  21. package/dist/builtin/mcp/mcp-auth-flow.ts +1 -1
  22. package/dist/builtin/mcp/mcp-callback-server.ts +1 -1
  23. package/dist/builtin/mcp/mcp-panel-state.ts +1 -1
  24. package/dist/builtin/mcp/mcp-panel.ts +1 -1
  25. package/dist/builtin/mcp/metadata-cache.ts +1 -1
  26. package/dist/builtin/mcp/package.json +1 -1
  27. package/dist/builtin/mcp/proxy-call.ts +2 -2
  28. package/dist/builtin/mcp/proxy-info-modes.ts +2 -2
  29. package/dist/builtin/mcp/sampling-handler.ts +1 -1
  30. package/dist/builtin/mcp/server-manager.ts +3 -3
  31. package/dist/builtin/mcp/startup-warmup.ts +5 -5
  32. package/dist/builtin/mcp/state.ts +1 -1
  33. package/dist/builtin/mcp/tool-call-timeout.ts +1 -1
  34. package/dist/builtin/mcp/tool-metadata.ts +2 -2
  35. package/dist/builtin/mcp/types.ts +1 -1
  36. package/dist/builtin/mcp/ui-server.ts +4 -4
  37. package/dist/builtin/mcp/ui-session.ts +3 -3
  38. package/dist/builtin/subagents/CHANGELOG.md +12 -0
  39. package/dist/builtin/subagents/package.json +1 -1
  40. package/dist/builtin/subagents/src/runs/background/result-delivery-processor.ts +5 -5
  41. package/dist/builtin/subagents/src/runs/background/result-file-claims.ts +1 -1
  42. package/dist/builtin/subagents/src/runs/background/result-status.ts +2 -2
  43. package/dist/builtin/subagents/src/runs/background/result-watcher-data.ts +2 -2
  44. package/dist/builtin/subagents/src/runs/background/result-watcher.ts +1 -1
  45. package/dist/builtin/subagents/src/runs/foreground/execution-detach-reservations.ts +1 -1
  46. package/dist/builtin/subagents/src/shared/artifacts.ts +1 -1
  47. package/dist/builtin/web-access/CHANGELOG.md +12 -0
  48. package/dist/builtin/web-access/index-heavy.ts +1 -1
  49. package/dist/builtin/web-access/package.json +1 -1
  50. package/dist/builtin/workflows/CHANGELOG.md +24 -0
  51. package/dist/builtin/workflows/README.md +1 -1
  52. package/dist/builtin/workflows/builtin/goal-prompts.ts +4 -1
  53. package/dist/builtin/workflows/builtin/ralph-core.ts +7 -4
  54. package/dist/builtin/workflows/builtin/ralph-forked-prompts.ts +5 -2
  55. package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +2 -1
  56. package/dist/builtin/workflows/builtin/ralph-runner.ts +2 -1
  57. package/dist/builtin/workflows/builtin/shared-prompts.ts +34 -7
  58. package/dist/builtin/workflows/package.json +1 -1
  59. package/dist/builtin/workflows/src/authoring/keep-context.ts +46 -0
  60. package/dist/builtin/workflows/src/authoring.d.ts +11 -0
  61. package/dist/builtin/workflows/src/extension/index.bundle.mjs +35 -17
  62. package/dist/builtin/workflows/src/extension/workflow-prompts.ts +4 -0
  63. package/dist/builtin/workflows/src/sdk-surface.ts +1 -0
  64. package/dist/core/agent-session-methods.d.ts +1 -1
  65. package/dist/core/agent-session-methods.js.map +1 -1
  66. package/dist/core/agent-session.d.ts +1 -1
  67. package/dist/core/agent-session.js.map +1 -1
  68. package/dist/core/async/session-manager.d.ts +1 -1
  69. package/dist/core/async/session-manager.js.map +1 -1
  70. package/dist/core/compaction/branch-summarization.js.map +1 -1
  71. package/dist/core/compaction/compaction-boundary.d.ts +2 -2
  72. package/dist/core/compaction/compaction-boundary.js.map +1 -1
  73. package/dist/core/compaction/compaction-parameters.d.ts +5 -0
  74. package/dist/core/compaction/compaction-parameters.d.ts.map +1 -1
  75. package/dist/core/compaction/compaction-parameters.js +6 -5
  76. package/dist/core/compaction/compaction-parameters.js.map +1 -1
  77. package/dist/core/compaction/compaction-runner.d.ts +4 -0
  78. package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
  79. package/dist/core/compaction/compaction-runner.js +5 -1
  80. package/dist/core/compaction/compaction-runner.js.map +1 -1
  81. package/dist/core/compaction/compaction-types.d.ts +7 -1
  82. package/dist/core/compaction/compaction-types.d.ts.map +1 -1
  83. package/dist/core/compaction/compaction-types.js.map +1 -1
  84. package/dist/core/compaction/deleted-ranges.d.ts.map +1 -1
  85. package/dist/core/compaction/deleted-ranges.js +2 -0
  86. package/dist/core/compaction/deleted-ranges.js.map +1 -1
  87. package/dist/core/compaction/fallback-planner.d.ts +1 -1
  88. package/dist/core/compaction/fallback-planner.js.map +1 -1
  89. package/dist/core/compaction/range-planner.d.ts +3 -3
  90. package/dist/core/compaction/range-planner.d.ts.map +1 -1
  91. package/dist/core/compaction/range-planner.js +12 -14
  92. package/dist/core/compaction/range-planner.js.map +1 -1
  93. package/dist/core/compaction/transcript-serialization.d.ts +12 -0
  94. package/dist/core/compaction/transcript-serialization.d.ts.map +1 -1
  95. package/dist/core/compaction/transcript-serialization.js +99 -1
  96. package/dist/core/compaction/transcript-serialization.js.map +1 -1
  97. package/dist/core/compaction/utils.d.ts +3 -0
  98. package/dist/core/compaction/utils.d.ts.map +1 -1
  99. package/dist/core/compaction/utils.js +16 -0
  100. package/dist/core/compaction/utils.js.map +1 -1
  101. package/dist/core/session-manager-history.js.map +1 -1
  102. package/dist/core/tools/bash-async-execution.d.ts +1 -1
  103. package/dist/core/tools/bash-async-execution.js.map +1 -1
  104. package/dist/core/tools/bash.js.map +1 -1
  105. package/dist/core/tools/oversized-tool-result.js.map +1 -1
  106. package/dist/extensions/index.d.ts +1 -1
  107. package/dist/extensions/index.js.map +1 -1
  108. package/dist/extensions/llama/huggingface-ui.d.ts +2 -2
  109. package/dist/extensions/llama/huggingface-ui.js.map +1 -1
  110. package/dist/extensions/llama/index.d.ts +1 -1
  111. package/dist/extensions/llama/index.js.map +1 -1
  112. package/dist/extensions/llama/ui.d.ts +1 -1
  113. package/dist/extensions/llama/ui.js.map +1 -1
  114. package/dist/modes/interactive-engine/remote-queue-pause.d.ts +1 -1
  115. package/dist/modes/interactive-engine/remote-queue-pause.js.map +1 -1
  116. package/docs/compaction.md +24 -0
  117. package/docs/workflows.md +56 -0
  118. package/npm-shrinkwrap.json +39 -39
  119. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.12] - 2026-08-04
6
+
7
+ Cumulative release of the `0.9.12-alpha.1` prerelease. The summary below covers the user-visible outcome of that work; the per-change detail remains in the prerelease section below.
8
+
9
+ ### Added
10
+
11
+ - Compaction honors `<keepContext>` / `</keepContext>` tags. Wrap any part of a prompt you never want compressed, and every line of the span — tag lines included — is protected verbatim regardless of the compression ratio. The guarantee is mechanical rather than advisory: deletion ranges are split around protected lines after the planner responds. Because the tag lines are protected too, a span is re-detected on each subsequent boundary and stays protected for the life of the session. Detection is bounded on three sides, because the transcript it scans is untrusted: a tag must be the whole line after any role header, a span is scoped to one message so an unclosed tag stops at the end of its own message rather than running to the end of the region, and tags inside tool results are inert — user and assistant messages may both protect, so prompts, steering, and an agent's own pinned information all work, but file, page, or command output an agent reads cannot mark itself unreclaimable or persist through compaction ahead of real content. Protected lines count against the keep target rather than raising it, so the compression ratio stays a real bound on output size and the unprotected remainder compresses harder. Results report force-preserved ranges as `keptRanges` ([#2172](https://github.com/bastani-inc/atomic/issues/2172)).
12
+
13
+ ### Fixed
14
+
15
+ - The compaction relevance query is no longer truncated to 1,000 characters. Truncation made prompt section order the retention policy: for a long structured prompt only the leading section reached the planner, so a constraint stated later could not influence what was kept, while the objective it qualified survived and was acted on. Long queries are safe — an oversized planner request surfaces as an explicit provider-overflow failure rather than silent truncation ([#2172](https://github.com/bastani-inc/atomic/issues/2172)).
16
+ - Cleared three advisories in the shipped dependency tree. `undici` moves 8.5.0 → 8.9.0, which covers five advisories against 8.0.0–8.8.0 — response desynchronization via the retry interceptor, two cross-user cache-directive disclosures, CRLF injection through a blob body `type`, and cookie-attribute injection — and it is the dispatcher behind `fetch_url` and every agent HTTP request. Transitively under `@modelcontextprotocol/sdk`, `ip-address` is pinned to 10.3.1 for three SSRF and trust-boundary bypasses (octal-decoded leading-zero octets, CIDR suffixes suppressing special-use classification, and misclassified IPv4-mapped/NAT64 addresses), and `hono` to 4.12.34 for a CORS-middleware ReDoS. `npm audit` is clean.
17
+ - Fixed bundled builtin extensions failing to load on Windows when shared modules were evaluated twice, so bundled workflows and tools initialize correctly.
18
+
19
+ ## [0.9.12-alpha.1] - 2026-08-04
20
+
21
+ ### Added
22
+
23
+ - Compaction honors `<keepContext>` / `</keepContext>` tags. Wrap any part of a prompt you never want compressed, and every line of the span — tag lines included — is protected verbatim regardless of the compression ratio. The guarantee is mechanical rather than advisory: deletion ranges are split around protected lines after the planner responds. Because the tag lines are protected too, a span is re-detected on each subsequent boundary and stays protected for the life of the session. Detection is bounded on three sides, because the transcript it scans is untrusted: a tag must be the whole line after any role header, a span is scoped to one message so an unclosed tag stops at the end of its own message rather than running to the end of the region, and tags inside tool results are inert — user and assistant messages may both protect, so prompts, steering, and an agent's own pinned information all work, but file, page, or command output an agent reads cannot mark itself unreclaimable or persist through compaction ahead of real content. Protected lines count against the keep target rather than raising it, so the compression ratio stays a real bound on output size and the unprotected remainder compresses harder. Results report force-preserved ranges as `keptRanges` ([#2172](https://github.com/bastani-inc/atomic/issues/2172)).
24
+
25
+ ### Fixed
26
+
27
+ - The compaction relevance query is no longer truncated to 1,000 characters. Truncation made prompt section order the retention policy: for a long structured prompt only the leading section reached the planner, so a constraint stated later could not influence what was kept, while the objective it qualified survived and was acted on. Long queries are safe — an oversized planner request surfaces as an explicit provider-overflow failure rather than silent truncation ([#2172](https://github.com/bastani-inc/atomic/issues/2172)).
28
+ - Cleared three advisories in the shipped dependency tree. `undici` moves 8.5.0 → 8.9.0, which covers five advisories against 8.0.0–8.8.0 — response desynchronization via the retry interceptor, two cross-user cache-directive disclosures, CRLF injection through a blob body `type`, and cookie-attribute injection — and it is the dispatcher behind `fetch_url` and every agent HTTP request. Transitively under `@modelcontextprotocol/sdk`, `ip-address` is pinned to 10.3.1 for three SSRF and trust-boundary bypasses (octal-decoded leading-zero octets, CIDR suffixes suppressing special-use classification, and misclassified IPv4-mapped/NAT64 addresses), and `hono` to 4.12.34 for a CORS-middleware ReDoS. `npm audit` is clean.
29
+
30
+ - Fixed bundled builtin extensions failing to load on Windows when shared modules were evaluated twice, so bundled workflows and tools initialize correctly.
31
+
5
32
  ## [0.9.11] - 2026-08-03
6
33
 
7
34
  Cumulative release of the `0.9.11-alpha.1` – `0.9.11-alpha.12` prereleases. The summary below covers the user-visible outcome of that work; the per-change detail remains in the prerelease sections below.
@@ -4,6 +4,18 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.12] - 2026-08-04
8
+
9
+ ### Fixed
10
+
11
+ - Fixed bundled Intercom resources failing to load on Windows when shared modules used mixed `.ts` and `.js` import spellings.
12
+
13
+ ## [0.9.12-alpha.1] - 2026-08-04
14
+
15
+ ### Fixed
16
+
17
+ - Fixed bundled Intercom resources failing to load on Windows when shared modules used mixed `.ts` and `.js` import spellings.
18
+
7
19
  ## [0.9.11] - 2026-08-03
8
20
 
9
21
  ### Changed
@@ -3,7 +3,7 @@ import type { InboundMessageAdmission } from "./inbound-message-admission.js";
3
3
  import type { InboundMessageEntry } from "./intercom-utils.js";
4
4
  import { routeIncomingReply } from "./reply-routing.js";
5
5
  import type { ReplyTracker } from "./reply-tracker.js";
6
- import type { ReplyWaiterRecord } from "./reply-waiter.js";
6
+ import type { ReplyWaiterRecord } from "./reply-waiter.ts";
7
7
  import { retryStableDelivery } from "./stable-delivery-retry.js";
8
8
  import { sendWorkflowStageDeliveryFailure } from "./workflow-stage-delivery-failure.js";
9
9
 
@@ -2,7 +2,7 @@ import type { ExtensionAPI } from "@bastani/atomic";
2
2
  import { randomUUID } from "crypto";
3
3
  import { Type } from "typebox";
4
4
  import { Text } from "@earendil-works/pi-tui";
5
- import type { IntercomClient } from "./broker/client.ts";
5
+ import type { IntercomClient } from "./broker/client.js";
6
6
  import type { ReplyWait, ReplyWaitAdmission } from "./reply-waiter.ts";
7
7
  import { renderContactSupervisorResult } from "./result-renderers.js";
8
8
  import {
@@ -3,10 +3,10 @@ import { appendFileSync } from "node:fs";
3
3
  import { IntercomClient } from "./broker/client.js";
4
4
  import { spawnBrokerIfNeeded } from "./broker/spawn.js";
5
5
  import { InlineMessageComponent } from "./ui/inline-message.js";
6
- import { loadConfig, type IntercomConfig } from "./config.js";
6
+ import { loadConfig, type IntercomConfig } from "./config.ts";
7
7
  import type { SessionInfo, Message } from "./types.js";
8
8
  import { ReplyTracker } from "./reply-tracker.js";
9
- import { ReplyWaiterSlot } from "./reply-waiter.js";
9
+ import { ReplyWaiterSlot } from "./reply-waiter.ts";
10
10
  import { registerContactSupervisorTool } from "./contact-supervisor-tool.js";
11
11
  import { registerIntercomTool } from "./intercom-tool.js";
12
12
  import { registerIntercomOverlay } from "./overlay.js";
@@ -2,7 +2,7 @@ import type { ExtensionAPI } from "@bastani/atomic";
2
2
  import { randomUUID } from "crypto";
3
3
  import { Type } from "typebox";
4
4
  import { Text } from "@earendil-works/pi-tui";
5
- import type { IntercomClient } from "./broker/client.ts";
5
+ import type { IntercomClient } from "./broker/client.js";
6
6
  import type { ReplyWait, ReplyWaitAdmission } from "./reply-waiter.ts";
7
7
  import { renderIntercomResult } from "./result-renderers.js";
8
8
  import {
@@ -12,7 +12,7 @@ import {
12
12
  previewText,
13
13
  toError,
14
14
  } from "./intercom-utils.js";
15
- import type { ReplyTracker } from "./reply-tracker.ts";
15
+ import type { ReplyTracker } from "./reply-tracker.js";
16
16
  import { resolveSessionTargetId } from "./session-target.js";
17
17
  import { normalizeGroup } from "./group.js";
18
18
 
@@ -1,6 +1,6 @@
1
1
  import type { ExtensionAPI } from "@bastani/atomic";
2
2
  import { APP_NAME, getEnvValue } from "@bastani/atomic";
3
- import type { Attachment, Message, SessionInfo, SupervisorRegistration } from "./types.ts";
3
+ import type { Attachment, Message, SessionInfo, SupervisorRegistration } from "./types.js";
4
4
  import { DEFAULT_GROUP, normalizeGroup } from "./group.js";
5
5
 
6
6
 
@@ -1,9 +1,9 @@
1
1
  import type { ExtensionAPI, ExtensionContext } from "@bastani/atomic";
2
- import type { IntercomClient } from "./broker/client.ts";
2
+ import type { IntercomClient } from "./broker/client.js";
3
3
  import type { IntercomConfig } from "./config.ts";
4
4
  import { buildPresenceIdentity } from "./intercom-utils.js";
5
5
  import type { InboundIdleQueue } from "./inbound-idle-queue.js";
6
- import type { ReplyTracker } from "./reply-tracker.ts";
6
+ import type { ReplyTracker } from "./reply-tracker.js";
7
7
 
8
8
  interface LifecycleDeps {
9
9
  config: IntercomConfig;
@@ -1,9 +1,9 @@
1
1
  import type { ExtensionAPI, ExtensionContext } from "@bastani/atomic";
2
- import type { IntercomClient } from "./broker/client.ts";
2
+ import type { IntercomClient } from "./broker/client.js";
3
3
  import type { ComposeResult } from "./ui/compose.ts";
4
4
  import { ComposeOverlay } from "./ui/compose.ts";
5
5
  import { SessionListOverlay } from "./ui/session-list.ts";
6
- import type { SessionInfo } from "./types.ts";
6
+ import type { SessionInfo } from "./types.js";
7
7
  import { duplicateSessionNames, formatSessionLabel, getErrorMessage } from "./intercom-utils.js";
8
8
 
9
9
  interface OverlayDeps {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/intercom",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "private": true,
5
5
  "description": "Atomic extension providing a private coordination channel between parent and child agent sessions. Fork of: https://github.com/nicobailon/pi-intercom",
6
6
  "contributors": [
@@ -1,4 +1,4 @@
1
- import type { Message, SessionInfo } from "./types.ts";
1
+ import type { Message, SessionInfo } from "./types.js";
2
2
  import { resolveSessionTarget, sessionTargetFailureReason } from "./session-target.js";
3
3
 
4
4
  export interface IntercomContext {
@@ -1,7 +1,7 @@
1
1
  import type { ExtensionAPI, ExtensionContext } from "@bastani/atomic";
2
2
  import { randomUUID } from "crypto";
3
- import type { IntercomClient } from "./broker/client.ts";
4
- import type { SessionInfo, Message } from "./types.ts";
3
+ import type { IntercomClient } from "./broker/client.js";
4
+ import type { SessionInfo, Message } from "./types.js";
5
5
  import {
6
6
  SUBAGENT_CONTROL_INTERCOM_EVENT,
7
7
  SUBAGENT_RESULT_INTERCOM_DELIVERY_EVENT,
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.12] - 2026-08-04
11
+
12
+ ### Fixed
13
+
14
+ - Fixed bundled MCP resources failing to load on Windows when shared modules used mixed `.ts` and `.js` import spellings.
15
+
16
+ ## [0.9.12-alpha.1] - 2026-08-04
17
+
18
+ ### Fixed
19
+
20
+ - Fixed bundled MCP resources failing to load on Windows when shared modules used mixed `.ts` and `.js` import spellings.
21
+
10
22
  ## [0.9.11] - 2026-08-03
11
23
 
12
24
  ### Removed
@@ -1,5 +1,5 @@
1
1
  import type { UiSessionRuntime } from "./ui-session.js";
2
- import { logger } from "./logger.js";
2
+ import { logger } from "./logger.ts";
3
3
 
4
4
  function formatCancellationReason(signal: AbortSignal): string {
5
5
  const reason = signal.reason;
@@ -1,5 +1,5 @@
1
1
  import type { ExtensionAPI, ExtensionContext } from "@bastani/atomic";
2
- import type { McpExtensionState } from "./state.ts";
2
+ import type { McpExtensionState } from "./state.js";
3
3
  import type { McpAuthResult, McpConfig, ServerEntry, McpPanelCallbacks, McpPanelResult, ImportKind } from "./types.ts";
4
4
  import {
5
5
  ensureCompatibilityImports,
@@ -12,13 +12,13 @@ import {
12
12
  writeSharedServerEntry,
13
13
  writeStarterProjectConfig,
14
14
  } from "./config.ts";
15
- import { lazyConnect, updateMetadataCache, updateStatusBar, getFailureAgeSeconds } from "./init.ts";
16
- import { loadMetadataCache } from "./metadata-cache.ts";
17
- import { buildToolMetadata } from "./tool-metadata.ts";
18
- import { supportsOAuth, authenticate, removeAuth } from "./mcp-auth-flow.ts";
19
- import { getAuthForUrl } from "./mcp-auth.ts";
15
+ import { lazyConnect, updateMetadataCache, updateStatusBar, getFailureAgeSeconds } from "./init.js";
16
+ import { loadMetadataCache } from "./metadata-cache.js";
17
+ import { buildToolMetadata } from "./tool-metadata.js";
18
+ import { supportsOAuth, authenticate, removeAuth } from "./mcp-auth-flow.js";
19
+ import { getAuthForUrl } from "./mcp-auth.js";
20
20
  import { loadOnboardingState, markSetupCompleted as persistSetupCompleted, markSharedConfigHintShown } from "./onboarding-state.ts";
21
- import { openPath } from "./utils.ts";
21
+ import { openPath } from "./utils.js";
22
22
 
23
23
  export async function showStatus(state: McpExtensionState, ctx: ExtensionContext): Promise<void> {
24
24
  if (!ctx.hasUI) return;
@@ -1,6 +1,6 @@
1
1
  import type { AgentToolResult, AgentToolUpdateCallback, ExtensionContext } from "@bastani/atomic";
2
2
  import type { McpExtensionState } from "./state.js";
3
- import type { DirectToolSpec, McpContent } from "./types.js";
3
+ import type { DirectToolSpec, McpContent } from "./types.ts";
4
4
  import { getFailureAgeSeconds, lazyConnect } from "./init.js";
5
5
  import { formatSchema } from "./tool-metadata.js";
6
6
  import { transformMcpContent } from "./tool-registrar.js";
@@ -1,8 +1,8 @@
1
- import type { DirectToolSpec, McpConfig } from "./types.js";
1
+ import type { DirectToolSpec, McpConfig } from "./types.ts";
2
2
  import type { MetadataCache } from "./metadata-cache.js";
3
3
  import { isServerCacheValid } from "./metadata-cache.js";
4
- import { formatToolName, isToolExcluded } from "./types.js";
5
- import { resourceNameToToolName } from "./resource-tools.js";
4
+ import { formatToolName, isToolExcluded } from "./types.ts";
5
+ import { resourceNameToToolName } from "./resource-tools.ts";
6
6
 
7
7
  const BUILTIN_NAMES = new Set(["read", "bash", "edit", "write", "grep", "find", "search", "ls", "mcp"]);
8
8
 
@@ -1,4 +1,4 @@
1
- import type { UiHostContext, UiResourceContent, UiResourceCsp } from "./types.js";
1
+ import type { UiHostContext, UiResourceContent, UiResourceCsp } from "./types.ts";
2
2
 
3
3
  // Use locally bundled AppBridge to avoid CDN Zod bundling issues
4
4
  const DEFAULT_APP_BRIDGE_MODULE_URL = "/app-bridge.bundle.js";
@@ -1,6 +1,6 @@
1
1
  import type { AgentToolUpdateCallback, ExtensionAPI, ExtensionContext, ToolInfo } from "@bastani/atomic";
2
2
  import type { McpExtensionState } from "./state.js";
3
- import type { McpConfig } from "./types.js";
3
+ import type { McpConfig } from "./types.ts";
4
4
  import type { MetadataCache } from "./metadata-cache.js";
5
5
  import type { ProxyToolResult } from "./proxy-types.js";
6
6
  import { waitForCaller } from "./caller-wait.js";
@@ -8,7 +8,7 @@ import { McpSessionCleanupBarrier } from "./session-cleanup-barrier.js";
8
8
  import { McpStateChangedError } from "./state-lease.js";
9
9
  import { registerMcpCommands } from "./command-registration.js";
10
10
  import { Type } from "typebox";
11
- import { loadMcpConfig } from "./config.js";
11
+ import { loadMcpConfig } from "./config.ts";
12
12
  import { getConfigPathFromArgv } from "./utils.js";
13
13
  import { renderMcpToolResult } from "./tool-result-renderer.js";
14
14
 
@@ -57,7 +57,7 @@ export default function mcpAdapter(pi: ExtensionAPI) {
57
57
  cache: MetadataCache | null,
58
58
  ): Promise<{ directToolCount: number; missingConfiguredDirectToolServers: string[] }> {
59
59
  const [{ resolveDirectTools, createDirectToolExecutor, getMissingConfiguredDirectToolServers }, { truncateAtWord }] = await Promise.all([
60
- import("./direct-tools.js"),
60
+ import("./direct-tools.ts"),
61
61
  import("./utils.js"),
62
62
  ]);
63
63
  const prefix = config.settings?.toolPrefix ?? "server";
@@ -1,10 +1,10 @@
1
1
  import type { ExtensionAPI, ExtensionContext } from "@bastani/atomic";
2
2
  import type { McpExtensionState } from "./state.js";
3
- import type { ToolMetadata } from "./types.js";
3
+ import type { ToolMetadata } from "./types.ts";
4
4
  import { existsSync } from "node:fs";
5
- import { loadMcpConfig } from "./config.js";
5
+ import { loadMcpConfig } from "./config.ts";
6
6
  import { ConsentManager } from "./consent-manager.js";
7
- import { McpLifecycleManager } from "./lifecycle.js";
7
+ import { McpLifecycleManager } from "./lifecycle.ts";
8
8
  import {
9
9
  computeServerHash,
10
10
  getMetadataCachePath,
@@ -16,11 +16,11 @@ import {
16
16
  serializeTools,
17
17
  type ServerCacheEntry,
18
18
  } from "./metadata-cache.js";
19
- import { McpServerManager } from "./server-manager.js";
19
+ import { McpServerManager } from "./server-manager.ts";
20
20
  import { buildToolMetadata, totalToolCount } from "./tool-metadata.js";
21
- import { UiResourceHandler } from "./ui-resource-handler.js";
21
+ import { UiResourceHandler } from "./ui-resource-handler.ts";
22
22
  import { openUrl, parallelLimit } from "./utils.js";
23
- import { logger } from "./logger.js";
23
+ import { logger } from "./logger.ts";
24
24
 
25
25
  const FAILURE_BACKOFF_MS = 60 * 1000;
26
26
 
@@ -23,7 +23,7 @@ import {
23
23
  type StoredTokens,
24
24
  } from "./mcp-auth.js"
25
25
  import { McpSessionCleanupBarrier } from "./session-cleanup-barrier.js"
26
- import type { ServerEntry } from "./types.js"
26
+ import type { ServerEntry } from "./types.ts"
27
27
 
28
28
  export type AuthStatus = "authenticated" | "expired" | "not_authenticated"
29
29
 
@@ -12,7 +12,7 @@ import {
12
12
  getOAuthCallbackPort,
13
13
  setOAuthCallbackPort,
14
14
  } from "./mcp-oauth-provider.js"
15
- import { logger } from "./logger.js"
15
+ import { logger } from "./logger.ts"
16
16
 
17
17
  // HTML templates for callback responses
18
18
  const HTML_SUCCESS = `<!DOCTYPE html>
@@ -1,5 +1,5 @@
1
1
  import { isToolExcluded } from "./types.ts";
2
- import type { MetadataCache, ServerCacheEntry, CachedTool } from "./metadata-cache.ts";
2
+ import type { MetadataCache, ServerCacheEntry, CachedTool } from "./metadata-cache.js";
3
3
  import { resourceNameToToolName } from "./resource-tools.ts";
4
4
  import type { McpConfig, McpPanelCallbacks, McpPanelResult, ServerProvenance } from "./types.ts";
5
5
  import type { ServerState, ToolState, VisibleItem } from "./mcp-panel-types.ts";
@@ -1,5 +1,5 @@
1
1
  import { matchesKey } from "@earendil-works/pi-tui";
2
- import type { MetadataCache } from "./metadata-cache.ts";
2
+ import type { MetadataCache } from "./metadata-cache.js";
3
3
  import type { McpConfig, McpPanelCallbacks, McpPanelResult, ServerProvenance } from "./types.ts";
4
4
  import {
5
5
  buildMcpPanelResult,
@@ -7,7 +7,7 @@ import { getToolUiResourceUri } from "@modelcontextprotocol/ext-apps/app-bridge"
7
7
  import type { McpTool, McpResource, ServerEntry, ToolMetadata } from "./types.ts";
8
8
  import { formatToolName, isToolExcluded } from "./types.ts";
9
9
  import { resourceNameToToolName } from "./resource-tools.ts";
10
- import { extractToolUiStreamMode, interpolateEnvRecord, resolveBearerToken, resolveConfigPath } from "./utils.ts";
10
+ import { extractToolUiStreamMode, interpolateEnvRecord, resolveBearerToken, resolveConfigPath } from "./utils.js";
11
11
 
12
12
  const CACHE_VERSION = 1;
13
13
  const CACHE_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1000;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/mcp",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "private": true,
5
5
  "description": "Atomic extension that adapts MCP (Model Context Protocol) servers into the coding agent. Fork of: https://github.com/nicobailon/pi-mcp-adapter",
6
6
  "contributors": [
@@ -1,7 +1,7 @@
1
1
  import type { ToolInfo } from "@bastani/atomic";
2
2
  import type { McpExtensionState } from "./state.js";
3
- import type { McpContent, ToolMetadata } from "./types.js";
4
- import { getServerPrefix } from "./types.js";
3
+ import type { McpContent, ToolMetadata } from "./types.ts";
4
+ import { getServerPrefix } from "./types.ts";
5
5
  import { lazyConnect, updateServerMetadata, updateMetadataCache, getFailureAgeSeconds, updateStatusBar } from "./init.js";
6
6
  import { getToolNames, findToolByName, formatSchema } from "./tool-metadata.js";
7
7
  import { transformMcpContent } from "./tool-registrar.js";
@@ -1,6 +1,6 @@
1
1
  import type { McpExtensionState } from "./state.js";
2
- import type { ToolMetadata } from "./types.js";
3
- import { getServerPrefix, parseUiPromptHandoff } from "./types.js";
2
+ import type { ToolMetadata } from "./types.ts";
3
+ import { getServerPrefix, parseUiPromptHandoff } from "./types.ts";
4
4
  import { getFailureAgeSeconds } from "./init.js";
5
5
  import { findToolByName, formatSchema } from "./tool-metadata.js";
6
6
  import { truncateAtWord } from "./utils.js";
@@ -1,6 +1,6 @@
1
1
  import type { ProviderHeaders } from "@earendil-works/pi-ai";
2
2
  import { complete, type Api, type AssistantMessage, type Message, type Model, type TextContent } from "@earendil-works/pi-ai/compat";
3
- import { truncateAtWord } from "./utils.ts";
3
+ import { truncateAtWord } from "./utils.js";
4
4
  import type { ExtensionUIContext, ModelRegistry } from "@bastani/atomic";
5
5
  import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
6
6
  import {
@@ -14,10 +14,10 @@ import type {
14
14
  import { serverStreamResultPatchNotificationSchema } from "./types.ts";
15
15
  import { resolveNpxBinary } from "./npx-resolver.ts";
16
16
  import { logger } from "./logger.ts";
17
- import { McpOAuthProvider } from "./mcp-oauth-provider.ts";
18
- import { supportsOAuth } from "./mcp-auth-flow.ts";
17
+ import { McpOAuthProvider } from "./mcp-oauth-provider.js";
18
+ import { supportsOAuth } from "./mcp-auth-flow.js";
19
19
  import { registerSamplingHandler, type ServerSamplingConfig } from "./sampling-handler.ts";
20
- import { interpolateEnvRecord, resolveBearerToken, resolveConfigPath } from "./utils.ts";
20
+ import { interpolateEnvRecord, resolveBearerToken, resolveConfigPath } from "./utils.js";
21
21
 
22
22
  interface ServerConnection {
23
23
  client: Client;
@@ -1,10 +1,10 @@
1
- import type { McpExtensionState } from "./state.ts";
1
+ import type { McpExtensionState } from "./state.js";
2
2
  import { getMissingConfiguredDirectToolServers } from "./direct-tools.ts";
3
- import { loadMetadataCache } from "./metadata-cache.ts";
4
- import { buildToolMetadata } from "./tool-metadata.ts";
5
- import { parallelLimit } from "./utils.ts";
3
+ import { loadMetadataCache } from "./metadata-cache.js";
4
+ import { buildToolMetadata } from "./tool-metadata.js";
5
+ import { parallelLimit } from "./utils.js";
6
6
  import { logger } from "./logger.ts";
7
- import { updateMetadataCache, updateStatusBar } from "./init.ts";
7
+ import { updateMetadataCache, updateStatusBar } from "./init.js";
8
8
 
9
9
  export interface McpStartupWarmupOptions {
10
10
  shouldContinue?: () => boolean;
@@ -1,5 +1,5 @@
1
1
  import type { ExtensionContext } from "@bastani/atomic";
2
- import type { ConsentManager } from "./consent-manager.ts";
2
+ import type { ConsentManager } from "./consent-manager.js";
3
3
  import type { McpLifecycleManager } from "./lifecycle.ts";
4
4
  import type { McpServerManager } from "./server-manager.ts";
5
5
  import type { ToolMetadata, McpConfig, UiSessionMessages, UiStreamSummary } from "./types.ts";
@@ -6,7 +6,7 @@ import {
6
6
  McpError,
7
7
  type CallToolRequest,
8
8
  } from "@modelcontextprotocol/sdk/types.js";
9
- import type { ServerEntry } from "./types.js";
9
+ import type { ServerEntry } from "./types.ts";
10
10
 
11
11
  export const MCP_TIMEOUT_MS_CONFIG_ERROR =
12
12
  "timeoutMs must be a finite number greater than 0 milliseconds";
@@ -1,9 +1,9 @@
1
1
  import { getToolUiResourceUri } from "@modelcontextprotocol/ext-apps/app-bridge";
2
- import type { McpExtensionState } from "./state.ts";
2
+ import type { McpExtensionState } from "./state.js";
3
3
  import type { ToolMetadata, McpTool, McpResource, ServerEntry } from "./types.ts";
4
4
  import { formatToolName, isToolExcluded } from "./types.ts";
5
5
  import { resourceNameToToolName } from "./resource-tools.ts";
6
- import { extractToolUiStreamMode } from "./utils.ts";
6
+ import { extractToolUiStreamMode } from "./utils.js";
7
7
 
8
8
  export function buildToolMetadata(
9
9
  tools: McpTool[],
@@ -379,7 +379,7 @@ export interface McpPanelCallbacks {
379
379
  canAuthenticate: (serverName: string) => boolean;
380
380
  authenticate: (serverName: string) => Promise<McpAuthResult>;
381
381
  getConnectionStatus: (serverName: string) => "connected" | "idle" | "failed" | "needs-auth";
382
- refreshCacheAfterReconnect: (serverName: string) => import("./metadata-cache.ts").ServerCacheEntry | null;
382
+ refreshCacheAfterReconnect: (serverName: string) => import("./metadata-cache.js").ServerCacheEntry | null;
383
383
  }
384
384
 
385
385
  export interface McpPanelResult {
@@ -8,11 +8,11 @@ import type {
8
8
  CallToolResult,
9
9
  } from "@modelcontextprotocol/sdk/types.js";
10
10
  import type { ConsentManager } from "./consent-manager.js";
11
- import { ServerError, wrapError } from "./errors.js";
11
+ import { ServerError, wrapError } from "./errors.ts";
12
12
  import { buildHostHtmlTemplate, buildCspMetaContent, applyCspMeta } from "./host-html-template.js";
13
- import { logger } from "./logger.js";
13
+ import { logger } from "./logger.ts";
14
14
  import { parseBody, sendJson, validateTokenBody, validateTokenQuery } from "./ui-server-http.js";
15
- import type { McpServerManager } from "./server-manager.js";
15
+ import type { McpServerManager } from "./server-manager.ts";
16
16
  import { callToolWithConfiguredTimeout } from "./tool-call-timeout.js";
17
17
  import {
18
18
  extractUiPromptText,
@@ -27,7 +27,7 @@ import {
27
27
  type UiResourceContent,
28
28
  type UiSessionMessages,
29
29
  type UiStreamSummary,
30
- } from "./types.js";
30
+ } from "./types.ts";
31
31
 
32
32
  const ABANDONED_GRACE_MS = 60_000;
33
33
  const WATCHDOG_INTERVAL_MS = 5_000;
@@ -10,9 +10,9 @@ import {
10
10
  type UiMessageParams,
11
11
  type UiModelContextParams,
12
12
  type UiStreamMode,
13
- } from "./types.js";
14
- import { logger } from "./logger.js";
15
- import { startUiServer, type UiServerHandle } from "./ui-server.js";
13
+ } from "./types.ts";
14
+ import { logger } from "./logger.ts";
15
+ import { startUiServer, type UiServerHandle } from "./ui-server.ts";
16
16
  import { isGlimpseAvailable, openGlimpseWindow } from "./glimpse-ui.js";
17
17
  import { escapeHtmlAttribute } from "./host-html-template.js";
18
18
 
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.12] - 2026-08-04
6
+
7
+ ### Fixed
8
+
9
+ - Fixed bundled subagent resources failing to load on Windows when shared modules used mixed `.ts` and `.js` import spellings.
10
+
11
+ ## [0.9.12-alpha.1] - 2026-08-04
12
+
13
+ ### Fixed
14
+
15
+ - Fixed bundled subagent resources failing to load on Windows when shared modules used mixed `.ts` and `.js` import spellings.
16
+
5
17
  ## [0.9.11] - 2026-08-03
6
18
 
7
19
  ### Changed
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/subagents",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "private": true,
5
5
  "description": "Atomic extension for delegating tasks to subagents with chains, parallel execution, and background runs. Fork of: https://github.com/nicobailon/pi-subagents",
6
6
  "contributors": [
@@ -7,12 +7,12 @@ import {
7
7
  compactNestedResultChildren,
8
8
  deliverSubagentResultIntercomEvent,
9
9
  resolveSubagentResultStatus,
10
- } from "../../intercom/result-intercom.js";
11
- import type { IntercomEventBus, SubagentResultIntercomChild, SubagentState } from "../../shared/types.js";
12
- import { projectNestedRegistryForRoot } from "../shared/nested-events.js";
10
+ } from "../../intercom/result-intercom.ts";
11
+ import type { IntercomEventBus, SubagentResultIntercomChild, SubagentState } from "../../shared/types.ts";
12
+ import { projectNestedRegistryForRoot } from "../shared/nested-events.ts";
13
13
  import { type CompletionClaimSnapshot, deliverClaimedCompletion } from "./completion-claims.js";
14
- import { buildCompletionKey, lookupSeenWithTtl, recordSeen } from "./completion-dedupe.js";
15
- import { deliverLocalCompletionNotification } from "./completion-notification.js";
14
+ import { buildCompletionKey, lookupSeenWithTtl, recordSeen } from "./completion-dedupe.ts";
15
+ import { deliverLocalCompletionNotification } from "./completion-notification.ts";
16
16
  import {
17
17
  claimIdFromScheduleKey,
18
18
  claimPublicResult,
@@ -1,7 +1,7 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
- import type { GroupedResultIntercomMessageInput } from "../../intercom/result-intercom.js";
4
+ import type { GroupedResultIntercomMessageInput } from "../../intercom/result-intercom.ts";
5
5
  import type { ResultFileData } from "./result-watcher-data.js";
6
6
 
7
7
  const CLAIMS_DIR = ".claims";
@@ -1,7 +1,7 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
- import { ASYNC_DIR } from "../../shared/types.js";
4
- import { NESTED_RUNS_DIR } from "../shared/nested-events.js";
3
+ import { ASYNC_DIR } from "../../shared/types.ts";
4
+ import { NESTED_RUNS_DIR } from "../shared/nested-events.ts";
5
5
  import type { ResultFileData } from "./result-watcher-data.js";
6
6
 
7
7
  const TERMINAL_ASYNC_STATES = new Set(["complete", "failed", "paused"]);
@@ -1,6 +1,6 @@
1
1
  import { createHash } from "node:crypto";
2
- import type { NestedRunSummary } from "../../shared/types.js";
3
- import { sanitizeSummary } from "../shared/nested-events.js";
2
+ import type { NestedRunSummary } from "../../shared/types.ts";
3
+ import { sanitizeSummary } from "../shared/nested-events.ts";
4
4
 
5
5
  export interface ResultFileChild {
6
6
  agent?: string;
@@ -2,7 +2,7 @@ import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import { isSafeFsWatchPathError, watchWithErrorHandler } from "@bastani/atomic";
4
4
  import { createFileCoalescer } from "../../shared/file-coalescer.js";
5
- import type { IntercomEventBus, SubagentState } from "../../shared/types.js";
5
+ import type { IntercomEventBus, SubagentState } from "../../shared/types.ts";
6
6
  import { processResultEntry, type ResultProcessorFs } from "./result-delivery-processor.js";
7
7
  import { claimIdFromScheduleKey, claimScheduleKey, listResultClaims } from "./result-file-claims.js";
8
8
  import { createRetryScheduler } from "./result-retry-scheduler.js";
@@ -1,4 +1,4 @@
1
- import type { IntercomDetachRoute } from "./execution-detach-route.js";
1
+ import type { IntercomDetachRoute } from "./execution-detach-route.ts";
2
2
 
3
3
  interface Reservation {
4
4
  route: IntercomDetachRoute;