sootsim 0.1.175 → 0.1.177

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 (153) hide show
  1. package/dist-cli/bin.js +3 -3
  2. package/dist-cli/chunks/{agent-A4WFJEFV.js → agent-3BCITLIZ.js} +3 -3
  3. package/dist-cli/chunks/{agent-wrapper-EOZBE6UT.js → agent-wrapper-26RIZVGD.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-H2I7IV7N.js → app-fonts-JVDHATQE.js} +2 -2
  5. package/dist-cli/chunks/{assert-36QXQUCE.js → assert-IT2OXM4Y.js} +2 -2
  6. package/dist-cli/chunks/beta-SPH73CAA.js +2 -0
  7. package/dist-cli/chunks/{camera-7HK2Y3PY.js → camera-ZYVEUCIO.js} +2 -2
  8. package/dist-cli/chunks/{chunk-2QTAUBZX.js → chunk-3L6I2M2Z.js} +3 -3
  9. package/dist-cli/chunks/chunk-4INGTBO7.js +4 -0
  10. package/dist-cli/chunks/{chunk-EEIUS5AS.js → chunk-4JESO36F.js} +4 -4
  11. package/dist-cli/chunks/{chunk-HWUFW3IP.js → chunk-4YNKFN2A.js} +2 -2
  12. package/dist-cli/chunks/{chunk-V7AGBG2P.js → chunk-52O56BTW.js} +2 -2
  13. package/dist-cli/chunks/{chunk-ZZWAHZ37.js → chunk-64QAFSY7.js} +1 -1
  14. package/dist-cli/chunks/{chunk-OMJ2DTQJ.js → chunk-65ZBQDQM.js} +2 -2
  15. package/dist-cli/chunks/{chunk-DV6SWCY7.js → chunk-A2WASN2L.js} +1 -1
  16. package/dist-cli/chunks/{chunk-H2J4Z7LY.js → chunk-A3VHHWLU.js} +2 -2
  17. package/dist-cli/chunks/{chunk-UMJDCX2P.js → chunk-AN4DM7IB.js} +2 -2
  18. package/dist-cli/chunks/{chunk-5QLWXLML.js → chunk-ATVKVVHZ.js} +2 -2
  19. package/dist-cli/chunks/chunk-B6GISAUX.js +1 -0
  20. package/dist-cli/chunks/{chunk-P2WO5LMI.js → chunk-BTTZN2SN.js} +2 -2
  21. package/dist-cli/chunks/{chunk-LYZXARZO.js → chunk-C5QOGCVN.js} +2 -2
  22. package/dist-cli/chunks/{chunk-RCPMRHTK.js → chunk-CH3MWM5W.js} +1 -1
  23. package/dist-cli/chunks/{chunk-7F2LH7U5.js → chunk-CHTYIQLE.js} +2 -2
  24. package/dist-cli/chunks/{chunk-SV3SRWN5.js → chunk-CUO7F2JE.js} +1 -1
  25. package/dist-cli/chunks/{chunk-YMBQBKKA.js → chunk-D2BBJUEY.js} +1 -1
  26. package/dist-cli/chunks/chunk-DGDBEXXQ.js +1 -0
  27. package/dist-cli/chunks/{chunk-3SUIAUIY.js → chunk-IBSEFPPL.js} +1 -1
  28. package/dist-cli/chunks/{chunk-ZPQY5DBY.js → chunk-JFLNZGDS.js} +2 -2
  29. package/dist-cli/chunks/{chunk-4UATZVHM.js → chunk-JHYLPDCC.js} +2 -2
  30. package/dist-cli/chunks/{chunk-XDDO46ZW.js → chunk-JS3NH2SJ.js} +1 -1
  31. package/dist-cli/chunks/{chunk-UXZRHPX6.js → chunk-JS7SSYDG.js} +2 -2
  32. package/dist-cli/chunks/{chunk-HWJ52K4J.js → chunk-JXO6UPGI.js} +1 -1
  33. package/dist-cli/chunks/{chunk-MLLINRL2.js → chunk-LTZPVG65.js} +1 -1
  34. package/dist-cli/chunks/{chunk-GJQGKFLY.js → chunk-NOLQYF76.js} +1 -1
  35. package/dist-cli/chunks/{chunk-2J67UJXT.js → chunk-NYGESF6F.js} +1 -1
  36. package/dist-cli/chunks/{chunk-QK76RK6J.js → chunk-NZWTC6K6.js} +1 -1
  37. package/dist-cli/chunks/{chunk-NPZPBSZD.js → chunk-PAU64XFG.js} +1 -1
  38. package/dist-cli/chunks/{chunk-IKJSGKUB.js → chunk-PL3ALTWB.js} +2 -2
  39. package/dist-cli/chunks/{chunk-ZG2A6LCL.js → chunk-QWZFOMCI.js} +2 -2
  40. package/dist-cli/chunks/{chunk-Y3OHYOFS.js → chunk-SNLUVL3H.js} +2 -2
  41. package/dist-cli/chunks/{chunk-KSF72FPP.js → chunk-SU3JJ7ER.js} +2 -2
  42. package/dist-cli/chunks/{chunk-XBK3XAKL.js → chunk-TVFHGWTW.js} +2 -2
  43. package/dist-cli/chunks/{chunk-JCQEG4R6.js → chunk-UBJQDMDG.js} +2 -2
  44. package/dist-cli/chunks/{chunk-VW643HG5.js → chunk-UJN3FMEX.js} +2 -2
  45. package/dist-cli/chunks/chunk-WKG5J4RD.js +2 -0
  46. package/dist-cli/chunks/{chunk-IISA6UXR.js → chunk-WRHJEI7Y.js} +1 -1
  47. package/dist-cli/chunks/{chunk-4UGD4KJM.js → chunk-WUEKKZ7Z.js} +2 -2
  48. package/dist-cli/chunks/{chunk-5D4PHINP.js → chunk-Y2637KG7.js} +1 -1
  49. package/dist-cli/chunks/chunk-YU6CNUJD.js +2 -0
  50. package/dist-cli/chunks/{chunk-46S56FJJ.js → chunk-YVDSGGOT.js} +1 -1
  51. package/dist-cli/chunks/{chunk-WM73SGMM.js → chunk-Z4IMGLHM.js} +2 -2
  52. package/dist-cli/chunks/{chunk-4PQ36DTJ.js → chunk-ZUTVEJVA.js} +3 -3
  53. package/dist-cli/chunks/cli-version-HENS6BZI.js +2 -0
  54. package/dist-cli/chunks/{compat-KWM6HXJD.js → compat-MNTQH57R.js} +3 -3
  55. package/dist-cli/chunks/{control-PVZRPH57.js → control-WQ7XEPCI.js} +2 -2
  56. package/dist-cli/chunks/{cpu-profile-3YLLRNVG.js → cpu-profile-P27HBXOI.js} +2 -2
  57. package/dist-cli/chunks/daemon-WUAZELEI.js +2 -0
  58. package/dist-cli/chunks/{debug-TD4EVFT7.js → debug-ES4A3SZQ.js} +3 -3
  59. package/dist-cli/chunks/{detox-S7M5WN3L.js → detox-Q36B2553.js} +2 -2
  60. package/dist-cli/chunks/{device-WR7GA4RN.js → device-NA7TB4E6.js} +2 -2
  61. package/dist-cli/chunks/{diagnose-JZMNR25X.js → diagnose-DKW5WI3X.js} +2 -2
  62. package/dist-cli/chunks/drivers-RFOOGIRC.js +2 -0
  63. package/dist-cli/chunks/{electron-V2YDDVKJ.js → electron-6C2VDAZW.js} +3 -3
  64. package/dist-cli/chunks/flow-GSHP52QS.js +2 -0
  65. package/dist-cli/chunks/help-J6PF4PZX.js +2 -0
  66. package/dist-cli/chunks/{hints-OK373YOJ.js → hints-W7ZZ6KZE.js} +2 -2
  67. package/dist-cli/chunks/{home-paths-IFY5UTLL.js → home-paths-K4347S7C.js} +2 -2
  68. package/dist-cli/chunks/{inspect-LRIJ7MQT.js → inspect-ZPHNFMEX.js} +4 -4
  69. package/dist-cli/chunks/{install-desktop-ESQL2Q2T.js → install-desktop-ZCCPJMOF.js} +3 -3
  70. package/dist-cli/chunks/{keys-IHG2YEL3.js → keys-XM67H4SM.js} +2 -2
  71. package/dist-cli/chunks/{login-CYIWYJGG.js → login-O4OGJKYL.js} +4 -4
  72. package/dist-cli/chunks/{logout-NALFLZWI.js → logout-DWCBRMLM.js} +2 -2
  73. package/dist-cli/chunks/{maestro-QKSXVPWG.js → maestro-MEWENIGQ.js} +2 -2
  74. package/dist-cli/chunks/optional-demo-registry-O3XS3WXJ.js +2 -0
  75. package/dist-cli/chunks/{preview-XCQGBN2I.js → preview-VPWG4462.js} +2 -2
  76. package/dist-cli/chunks/{profile-RDAPVU7K.js → profile-R4CSGXYJ.js} +2 -2
  77. package/dist-cli/chunks/{react-MM373YNE.js → react-5LFUOYV5.js} +2 -2
  78. package/dist-cli/chunks/{record-SQA376Z7.js → record-MHAAYOWF.js} +2 -2
  79. package/dist-cli/chunks/runtime-R2PRKIZM.js +2 -0
  80. package/dist-cli/chunks/{screenshot-FCKW6JV6.js → screenshot-XAEO7EBF.js} +2 -2
  81. package/dist-cli/chunks/{screenshot-mode-QVRUJXZ3.js → screenshot-mode-QNR5ESKN.js} +2 -2
  82. package/dist-cli/chunks/{screenshots-ITBCSBZS.js → screenshots-Z6OSENKY.js} +2 -2
  83. package/dist-cli/chunks/{screenshots-capture-H4EAYFH3.js → screenshots-capture-3DJPYJUD.js} +2 -2
  84. package/dist-cli/chunks/{serve-3GHYSGJR.js → serve-IVTQFOFI.js} +16 -16
  85. package/dist-cli/chunks/{setup-ME5SRHWD.js → setup-AMRSL4IK.js} +2 -2
  86. package/dist-cli/chunks/{skills-E5JE3SAI.js → skills-K4DG2CIH.js} +2 -2
  87. package/dist-cli/chunks/{slides-D37ML4LI.js → slides-UIH7KXFR.js} +2 -2
  88. package/dist-cli/chunks/store-2JY2VLVA.js +2 -0
  89. package/dist-cli/chunks/telemetry-KNKROOT5.js +2 -0
  90. package/dist-cli/chunks/{test-CWWQJG5K.js → test-XUJ2V5ZX.js} +3 -3
  91. package/dist-cli/chunks/{three-mode-WESGARG5.js → three-mode-P6HSLJMD.js} +2 -2
  92. package/dist-cli/chunks/{timeline-RUVZASG4.js → timeline-YSUY4PHV.js} +2 -2
  93. package/dist-cli/chunks/{upgrade-DKWD6TSY.js → upgrade-YZMDFQIH.js} +2 -2
  94. package/dist-cli/chunks/upload-TIH2LID6.js +2 -0
  95. package/dist-cli/chunks/{version-G45RLONC.js → version-5QAMZ5CK.js} +2 -2
  96. package/dist-cli/chunks/{web-X2HCJQQE.js → web-LM3JSBQF.js} +2 -2
  97. package/dist-cli/chunks/{what-happened-5DBVOXKC.js → what-happened-NYVQ7KER.js} +2 -2
  98. package/dist-cli/chunks/{whoami-ZDT3RQOC.js → whoami-AAHH72FM.js} +2 -2
  99. package/dist-lib/agent-daemon-client.cjs +10 -1
  100. package/dist-lib/agent-events.cjs +1 -1
  101. package/dist-lib/agent-sessions.cjs +1 -1
  102. package/dist-lib/attached-projects.cjs +1 -1
  103. package/dist-lib/auth/shared-session.cjs +1 -1
  104. package/dist-lib/backend-origin.cjs +1 -1
  105. package/dist-lib/beta.cjs +1 -1
  106. package/dist-lib/beta.mjs +1 -1
  107. package/dist-lib/bridge-constants.cjs +7 -1
  108. package/dist-lib/cli-constants.cjs +1 -1
  109. package/dist-lib/config.cjs +1 -1
  110. package/dist-lib/detox/index.cjs +1 -1
  111. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  112. package/dist-lib/home-paths.cjs +1 -1
  113. package/dist-lib/host/bridge-host.cjs +126 -12
  114. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  115. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  116. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  117. package/dist-lib/host/websocket-proxy.cjs +1 -1
  118. package/dist-lib/index.cjs +1 -1
  119. package/dist-lib/jump-to-source-babel.cjs +1 -1
  120. package/dist-lib/menu.cjs +1 -1
  121. package/dist-lib/menu.mjs +1 -1
  122. package/dist-lib/metro.cjs +1 -1
  123. package/dist-lib/profiles.cjs +1 -1
  124. package/dist-lib/render-mode.cjs +1 -1
  125. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  126. package/dist-lib/sdk.cjs +1 -1
  127. package/dist-lib/sdk.mjs +1 -1
  128. package/dist-lib/skills.cjs +237 -102
  129. package/dist-lib/vite.cjs +1 -1
  130. package/package.json +7 -1
  131. package/src/agent-daemon-client.ts +13 -0
  132. package/src/agent-identity.ts +21 -0
  133. package/src/agentbus-prompt.ts +80 -0
  134. package/src/bridge-constants.ts +9 -0
  135. package/src/host/agent-host.ts +42 -0
  136. package/src/host/bridge-host.ts +14 -1
  137. package/src/native-seam-manifest.ts +11 -0
  138. package/dist-cli/chunks/beta-7FRVMDBH.js +0 -2
  139. package/dist-cli/chunks/chunk-3G5EE3ST.js +0 -2
  140. package/dist-cli/chunks/chunk-HCKTFQLK.js +0 -2
  141. package/dist-cli/chunks/chunk-ODISDSXU.js +0 -1
  142. package/dist-cli/chunks/chunk-RAESCYIA.js +0 -4
  143. package/dist-cli/chunks/chunk-URQSBUTU.js +0 -1
  144. package/dist-cli/chunks/cli-version-HCYSKPJO.js +0 -2
  145. package/dist-cli/chunks/daemon-2DT4QAJ4.js +0 -2
  146. package/dist-cli/chunks/drivers-UMQTPEMU.js +0 -2
  147. package/dist-cli/chunks/flow-CKXTFJJ7.js +0 -2
  148. package/dist-cli/chunks/help-OEMLUQMD.js +0 -2
  149. package/dist-cli/chunks/optional-demo-registry-CIEW2ET7.js +0 -2
  150. package/dist-cli/chunks/runtime-CUNVH66R.js +0 -2
  151. package/dist-cli/chunks/store-UW5HH6DW.js +0 -2
  152. package/dist-cli/chunks/telemetry-KSBNWXNE.js +0 -2
  153. package/dist-cli/chunks/upload-LYANGCPB.js +0 -2
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.177 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sootsim",
3
- "version": "0.1.175",
3
+ "version": "0.1.177",
4
4
  "description": "sootsim CLI + vite/metro plugins + skills registry. bridge client for driving the proprietary sootsim-engine over WebSocket.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "MIT",
@@ -66,6 +66,12 @@
66
66
  "source": "./src/agent-daemon-client.ts",
67
67
  "default": "./dist-lib/agent-daemon-client.cjs"
68
68
  },
69
+ "./agent-identity": {
70
+ "source": "./src/agent-identity.ts",
71
+ "bun": "./src/agent-identity.ts",
72
+ "import": "./src/agent-identity.ts",
73
+ "default": "./dist-lib/agent-identity.cjs"
74
+ },
69
75
  "./attached-projects": {
70
76
  "source": "./src/attached-projects.ts",
71
77
  "default": "./dist-lib/attached-projects.cjs"
@@ -165,6 +165,19 @@ export class AgentDaemonClient {
165
165
  })
166
166
  }
167
167
 
168
+ async sendClaimedPrompt(
169
+ simId: string,
170
+ prompt: AgentPromptEnvelope,
171
+ ): Promise<{ ok: true; routed: 'agentbus'; sessionId: string }> {
172
+ return this.send<{ ok: true; routed: 'agentbus'; sessionId: string }>(
173
+ 'agent:send-claimed-prompt',
174
+ {
175
+ simId,
176
+ prompt,
177
+ },
178
+ )
179
+ }
180
+
168
181
  async endSession(sessionId: string): Promise<{ ok: true }> {
169
182
  return this.send<{ ok: true }>('agent:end-session', { sessionId })
170
183
  }
@@ -0,0 +1,21 @@
1
+ const AGENTBUS_SESSION_RE = /^[A-Za-z0-9._:-]{1,160}$/
2
+
3
+ export function agentSessionIdFromCliIdentity(identity: string | null): string | null {
4
+ if (!identity) return null
5
+ const colon = identity.indexOf(':')
6
+ if (colon < 0) return identity.trim() || null
7
+ const source = identity.slice(0, colon)
8
+ const value = identity.slice(colon + 1).trim()
9
+ return source === 'SOOTSIM_CLI_IDENTITY' && value ? value : null
10
+ }
11
+
12
+ export function agentbusSessionIdFromCliIdentity(identity: string | null): string | null {
13
+ if (!identity?.startsWith('AGENTBUS_SESSION:')) return null
14
+ const sessionId = identity.slice('AGENTBUS_SESSION:'.length).trim()
15
+ if (!AGENTBUS_SESSION_RE.test(sessionId)) return null
16
+ return sessionId
17
+ }
18
+
19
+ export function isValidAgentbusSessionId(sessionId: string): boolean {
20
+ return AGENTBUS_SESSION_RE.test(sessionId)
21
+ }
@@ -0,0 +1,80 @@
1
+ import { spawn } from 'node:child_process'
2
+ import fs from 'node:fs'
3
+ import os from 'node:os'
4
+ import path from 'node:path'
5
+ import {
6
+ agentbusSessionIdFromCliIdentity,
7
+ isValidAgentbusSessionId,
8
+ } from './agent-identity.ts'
9
+ import type { AgentPromptEnvelope } from './agent-prompt.ts'
10
+
11
+ export { agentbusSessionIdFromCliIdentity } from './agent-identity.ts'
12
+
13
+ export function formatAgentbusPromptText(prompt: AgentPromptEnvelope): string {
14
+ return typeof prompt.text === 'string' ? prompt.text.trim() : ''
15
+ }
16
+
17
+ function resolveAgentbusCommand(explicit?: string): string {
18
+ const fromArg = explicit?.trim()
19
+ if (fromArg) return fromArg
20
+ const fromEnv = process.env.AGENTBUS_COMMAND?.trim()
21
+ if (fromEnv) return fromEnv
22
+ const localBin = path.join(os.homedir(), '.local', 'bin', 'agentbus')
23
+ if (fs.existsSync(localBin)) return localBin
24
+ return 'agentbus'
25
+ }
26
+
27
+ export async function sendPromptToAgentbusSession(input: {
28
+ sessionId: string
29
+ prompt: AgentPromptEnvelope
30
+ command?: string
31
+ timeoutMs?: number
32
+ }): Promise<void> {
33
+ const sessionId = input.sessionId.trim()
34
+ if (!isValidAgentbusSessionId(sessionId)) {
35
+ throw new Error(`invalid agentbus session id: ${sessionId || '<empty>'}`)
36
+ }
37
+ const text = formatAgentbusPromptText(input.prompt)
38
+ if (!text) {
39
+ throw new Error('prompt text is empty')
40
+ }
41
+
42
+ const command = resolveAgentbusCommand(input.command)
43
+ const timeoutMs = input.timeoutMs ?? 15_000
44
+ await new Promise<void>((resolve, reject) => {
45
+ const child = spawn(command, ['send', sessionId, text], {
46
+ stdio: ['ignore', 'ignore', 'pipe'],
47
+ env: process.env,
48
+ })
49
+ let stderr = ''
50
+ const timer = setTimeout(() => {
51
+ try {
52
+ child.kill('SIGTERM')
53
+ } catch {}
54
+ reject(new Error(`agentbus send timed out after ${Math.round(timeoutMs / 1000)}s`))
55
+ }, timeoutMs)
56
+
57
+ child.stderr?.setEncoding('utf8')
58
+ child.stderr?.on('data', (chunk) => {
59
+ if (stderr.length < 4000) stderr += String(chunk)
60
+ })
61
+ child.on('error', (err) => {
62
+ clearTimeout(timer)
63
+ reject(err)
64
+ })
65
+ child.on('exit', (code, signal) => {
66
+ clearTimeout(timer)
67
+ if (code === 0) {
68
+ resolve()
69
+ return
70
+ }
71
+ const detail = stderr.trim()
72
+ reject(
73
+ new Error(
74
+ detail ||
75
+ `agentbus send exited with ${signal ? `signal ${signal}` : `code ${code ?? 'unknown'}`}`,
76
+ ),
77
+ )
78
+ })
79
+ })
80
+ }
@@ -82,6 +82,15 @@ export function resolveSootsimBridgePortForRuntimeLocation(
82
82
  const hrefUrl = parseHrefUrl(input.href)
83
83
  const httpPort = parsePort(input.httpPort) ?? parsePort(hrefUrl?.port)
84
84
  if (httpPort === null) return DEFAULT_SOOTSIM_BRIDGE_PORT
85
+ if (
86
+ hrefUrl?.pathname.startsWith('/sootsim') &&
87
+ (hrefUrl.searchParams.has('embed') || hrefUrl.searchParams.has('nativePreview'))
88
+ ) {
89
+ return resolveSootsimBridgePortForHttpPort({
90
+ httpPort,
91
+ baseHttpPort: SOOTBEAN_DEV_HTTP_BASE_PORT,
92
+ })
93
+ }
85
94
  if (
86
95
  hrefUrl?.pathname.startsWith('/sootsim') &&
87
96
  httpPort >= SOOTSIM_SITE_DEV_HTTP_BASE_PORT &&
@@ -28,6 +28,10 @@ import {
28
28
  transcriptPath,
29
29
  type Provider,
30
30
  } from '../agent-sessions.ts'
31
+ import {
32
+ agentbusSessionIdFromCliIdentity,
33
+ sendPromptToAgentbusSession,
34
+ } from '../agentbus-prompt.ts'
31
35
  import {
32
36
  deleteProject,
33
37
  findProjectById,
@@ -64,6 +68,15 @@ export interface AgentHostOptions {
64
68
  * the rest of the repo uses, so `sootsim serve` standalone does the
65
69
  * right thing. */
66
70
  getExcludePorts?: () => number[]
71
+ /** returns the active CLI lease for a sim. used only for prompt routing to
72
+ * an external agentbus-wrapped agent that claimed the tab. */
73
+ resolveCliLease?: (simId: string) => AgentCliLeaseSnapshot | null
74
+ }
75
+
76
+ export interface AgentCliLeaseSnapshot {
77
+ kind: 'cli' | 'user-active'
78
+ cliIdentityKey: string
79
+ expiresAt: number
67
80
  }
68
81
 
69
82
  /** default excludes keep the dev-server scanner from hitting soot's own
@@ -183,6 +196,8 @@ export class AgentHost {
183
196
  return listSessions(msg.projectId ? String(msg.projectId) : undefined)
184
197
  case 'agent:start-session':
185
198
  return this.doStartSession(msg.input ?? {})
199
+ case 'agent:send-claimed-prompt':
200
+ return this.sendClaimedPrompt(msg)
186
201
  case 'agent:send-prompt': {
187
202
  const sessionId = String(msg.sessionId)
188
203
  const session = findSessionById(sessionId)
@@ -216,6 +231,33 @@ export class AgentHost {
216
231
 
217
232
  // --- operation impls ---
218
233
 
234
+ private async sendClaimedPrompt(msg: any): Promise<{
235
+ ok: true
236
+ routed: 'agentbus'
237
+ sessionId: string
238
+ }> {
239
+ const simId = typeof msg.simId === 'string' ? msg.simId.trim() : ''
240
+ if (!simId) {
241
+ throw new AgentSessionError('NO_SIM', 'agent:send-claimed-prompt requires simId')
242
+ }
243
+ const lease = this.opts.resolveCliLease?.(simId) ?? null
244
+ if (!lease || lease.kind !== 'cli' || lease.expiresAt <= Date.now()) {
245
+ throw new AgentSessionError('NO_CLAIM', `sim ${simId} has no active CLI claim`)
246
+ }
247
+ const sessionId = agentbusSessionIdFromCliIdentity(lease.cliIdentityKey)
248
+ if (!sessionId) {
249
+ throw new AgentSessionError(
250
+ 'UNSUPPORTED_CLAIM',
251
+ `sim ${simId} is claimed by a CLI identity that is not promptable`,
252
+ )
253
+ }
254
+ await sendPromptToAgentbusSession({
255
+ sessionId,
256
+ prompt: this.normalizePromptEnvelope(msg),
257
+ })
258
+ return { ok: true, routed: 'agentbus', sessionId }
259
+ }
260
+
219
261
  private async doStartSession(input: {
220
262
  projectId: string
221
263
  provider?: Provider
@@ -439,7 +439,20 @@ export class SootSimBridgeHost {
439
439
  // respawned it forever.
440
440
  this.portFallbackCount = Math.max(1, opts.portFallbackCount ?? 10)
441
441
  this.openUrlHandler = opts.openUrl
442
- this.agentHost = new AgentHost({ getExcludePorts: opts.agentScanExcludes })
442
+ this.agentHost = new AgentHost({
443
+ getExcludePorts: opts.agentScanExcludes,
444
+ resolveCliLease: (simId) => {
445
+ const sim = this.sims.get(simId)
446
+ const lease = sim ? this.getActiveLease(sim) : null
447
+ return lease
448
+ ? {
449
+ kind: lease.kind,
450
+ cliIdentityKey: lease.cliIdentityKey,
451
+ expiresAt: lease.expiresAt,
452
+ }
453
+ : null
454
+ },
455
+ })
443
456
  this.sootbeanOrigin = opts.sootbeanOrigin?.replace(/\/$/, '') || null
444
457
  this.simIdleReapTtlMs =
445
458
  opts.simIdleReapTtlMs ?? SootSimBridgeHost.SIM_IDLE_REAP_TTL_MS
@@ -320,4 +320,15 @@ export const NATIVE_SEAM_MANIFEST: NativeSeamEntry[] = [
320
320
  notes:
321
321
  'expo-notifications native modules — routes scheduling/badge/installation-id through engine NotificationBus; tap callbacks fan out via the bus event emitters',
322
322
  },
323
+ {
324
+ pkg: 'react-native-enriched-markdown',
325
+ seamBasenames: [
326
+ 'EnrichedMarkdownTextNativeComponent',
327
+ 'EnrichedMarkdownNativeComponent',
328
+ 'EnrichedMarkdownTextInputNativeComponent',
329
+ ],
330
+ target: seamPath('react-native-enriched-markdown'),
331
+ notes:
332
+ 'generated Fabric markdown host components; upstream Streamdown/enriched-markdown JS runs unchanged',
333
+ },
323
334
  ]
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d}from"./chunk-XDDO46ZW.js";import"./chunk-ZZWAHZ37.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- var t="http://localhost:5173/";export{t as a};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- var t=4001,n="sootsim close";export{t as a,n as b};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,4 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{existsSync as D,mkdirSync as O,readFileSync as g,rmSync as s,writeFileSync as P}from"fs";import{tmpdir as R}from"os";import{dirname as x,join as A,resolve as v}from"path";import{execFileSync as I}from"child_process";import{readFileSync as S}from"fs";import{createRequire as _}from"module";var o=null;function u(r){o||(o=b());try{return o(r)}catch{return null}}function b(){let r=Number(process.env.PPID);if(Number.isFinite(r)&&r>1&&r!==process.ppid)return()=>r;if(process.platform==="linux")return y();if(process.platform==="darwin"){let n=T();return n||C()}return()=>null}function y(){return r=>{try{let n=S(`/proc/${r}/stat`,"utf8"),t=n.lastIndexOf(")");if(t<0)return null;let i=n.slice(t+1).trim().split(/\s+/),e=Number(i[1]);return Number.isFinite(e)&&e>0?e:null}catch{return null}}}var N=3,d=216,E=16;function T(){if(!process.versions?.bun)return null;try{let r=_(import.meta.url),{dlopen:n,FFIType:t}=r("bun:ffi"),i=n("/usr/lib/libproc.dylib",{proc_pidinfo:{args:[t.i32,t.i32,t.u64,t.ptr,t.i32],returns:t.i32}}),e=Buffer.alloc(d);return a=>{if(Number(i.symbols.proc_pidinfo(a,N,0n,e,d))<=0)return null;let p=e.readUInt32LE(E);return p>0?p:null}}catch{return null}}function C(){return r=>{try{let t=I("lsof",["-R","-p",String(r),"-d","cwd","-a"],{encoding:"utf8",timeout:2e3,stdio:["ignore","pipe","ignore"]}).split(`
3
- `)[1];if(!t)return null;let i=t.trim().split(/\s+/),e=Number(i[2]);return Number.isFinite(e)&&e>1?e:null}catch{return null}}}var c=1,f="SOOTSIM_CLI_CURRENT_SIM_PATH",F=["SOOTSIM_CLI_IDENTITY","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"];function m(r,n=20){let t=u(r);if(!t||t<=1)return null;for(let i=0;i<n;i++){let e=u(t);if(!e||e<=1)return t;t=e}return t}function k(){for(let n of F){let t=process.env[n];if(t&&t.trim())return{key:`${n}:${t.trim()}`,source:n,stable:!0}}let r=m(process.ppid);return r&&r>1?{key:`gppid-${r}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function L(){return k().key}function J(){return m(process.ppid)}function l(){if(process.env[f])return v(process.env[f]);let r=L();return A(R(),`sootsim-current-sim-${r}.json`)}function h(){let r=l();if(!D(r))return null;try{let n=JSON.parse(g(r,"utf8"));return n.version!==c||typeof n.simId!="string"||!n.simId.trim()||typeof n.updatedAt!="string"?(s(r,{force:!0}),null):{version:c,simId:n.simId.trim(),updatedAt:n.updatedAt}}catch{return s(r,{force:!0}),null}}function j(){return h()?.simId||null}function K(r){let n=r.trim();if(!n)return;let t=l();O(x(t),{recursive:!0}),P(t,JSON.stringify({version:c,simId:n,updatedAt:new Date().toISOString()},null,2)+`
4
- `)}function X(){s(l(),{force:!0})}export{k as a,L as b,J as c,j as d,K as e,X as f};
@@ -1 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-SV3SRWN5.js";import"./chunk-ZZWAHZ37.js";export{a as getCliVersion};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c,d,e}from"./chunk-XBK3XAKL.js";import"./chunk-Y3OHYOFS.js";import"./chunk-JCQEG4R6.js";import"./chunk-5QLWXLML.js";import"./chunk-HWUFW3IP.js";import"./chunk-DV6SWCY7.js";import"./chunk-UMJDCX2P.js";import"./chunk-7F2LH7U5.js";import"./chunk-3G5EE3ST.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-SV3SRWN5.js";import"./chunk-XDDO46ZW.js";import"./chunk-QK76RK6J.js";import"./chunk-ZZWAHZ37.js";export{c as daemonInstall,b as getDaemonServiceStatus,a as runDaemon,d as teardownDaemonService,e as teardownSootsimHome};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import"./chunk-URQSBUTU.js";import{a,b,c,d,e,f,g,h,i}from"./chunk-4UATZVHM.js";import"./chunk-NPZPBSZD.js";import"./chunk-VW643HG5.js";import"./chunk-HWJ52K4J.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-ZZWAHZ37.js";export{e as ALL_DRIVERS,i as buildDriverListRows,a as chromiumDriver,b as electronDriver,f as getAllDrivers,g as getDriver,c as playwrightDriver,h as resolveDriver,d as systemDriver};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a as c,b as d,c as e,d as f}from"./chunk-4PQ36DTJ.js";import"./chunk-ZPQY5DBY.js";import"./chunk-ODISDSXU.js";import"./chunk-UXZRHPX6.js";import{c as a,d as b}from"./chunk-4UGD4KJM.js";import"./chunk-EEIUS5AS.js";import"./chunk-KSF72FPP.js";import"./chunk-H2J4Z7LY.js";import"./chunk-YMBQBKKA.js";import"./chunk-46S56FJJ.js";import"./chunk-4UATZVHM.js";import"./chunk-NPZPBSZD.js";import"./chunk-VW643HG5.js";import"./chunk-LYZXARZO.js";import"./chunk-V7AGBG2P.js";import"./chunk-2J67UJXT.js";import"./chunk-RCPMRHTK.js";import"./chunk-OMJ2DTQJ.js";import"./chunk-HWJ52K4J.js";import"./chunk-Y3OHYOFS.js";import"./chunk-JCQEG4R6.js";import"./chunk-7F2LH7U5.js";import"./chunk-3G5EE3ST.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-P2WO5LMI.js";import"./chunk-QK76RK6J.js";import"./chunk-ZZWAHZ37.js";export{c as discoverSootsimUrl,e as hoistLeadingSimFlag,a as parseFlowFile,f as runFlow,d as runFlowPlayback,b as validateFlowFile};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c}from"./chunk-5QLWXLML.js";import"./chunk-HWUFW3IP.js";import"./chunk-DV6SWCY7.js";import"./chunk-UMJDCX2P.js";import"./chunk-7F2LH7U5.js";import"./chunk-3G5EE3ST.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-SV3SRWN5.js";import"./chunk-XDDO46ZW.js";import"./chunk-QK76RK6J.js";import"./chunk-ZZWAHZ37.js";export{c as printCommandHelp,b as printGroupHelp,a as printHelp};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b}from"./chunk-46S56FJJ.js";import"./chunk-ZZWAHZ37.js";export{a as loadOptionalDemoApps,b as optionalDemoAppsSync};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-2QTAUBZX.js";import"./chunk-ZG2A6LCL.js";import"./chunk-OMJ2DTQJ.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-ZZWAHZ37.js";export{a as runRuntime};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a}from"./chunk-P2WO5LMI.js";import"./chunk-QK76RK6J.js";import"./chunk-ZZWAHZ37.js";export{a as settingsStore};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b}from"./chunk-Y3OHYOFS.js";import"./chunk-JCQEG4R6.js";import"./chunk-3SUIAUIY.js";import"./chunk-ZZWAHZ37.js";export{b as flushCliTelemetry,a as trackCliEvent};
@@ -1,2 +0,0 @@
1
- /*! sootsim v0.1.175 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- import{a,b,c}from"./chunk-LYZXARZO.js";import"./chunk-V7AGBG2P.js";import"./chunk-2J67UJXT.js";import"./chunk-RCPMRHTK.js";import"./chunk-OMJ2DTQJ.js";import"./chunk-HWJ52K4J.js";import"./chunk-Y3OHYOFS.js";import"./chunk-JCQEG4R6.js";import"./chunk-HCKTFQLK.js";import"./chunk-RAESCYIA.js";import"./chunk-3SUIAUIY.js";import"./chunk-ZZWAHZ37.js";export{a as resolveDefaultUploadOrigin,b as resolvePublicPreviewOrigin,c as runUpload};