indusagi-coding-agent 0.1.42 → 0.1.44

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 (288) hide show
  1. package/CHANGELOG.md +23 -3
  2. package/README.md +3 -0
  3. package/dist/command-line/args.js +1 -1
  4. package/dist/command-line/args.js.map +1 -1
  5. package/dist/command-line/list-models.js +1 -1
  6. package/dist/command-line/list-models.js.map +1 -1
  7. package/dist/command-line/login-handler.d.ts.map +1 -1
  8. package/dist/command-line/login-handler.js +39 -0
  9. package/dist/command-line/login-handler.js.map +1 -1
  10. package/dist/dev/observe-deep.d.ts +2 -0
  11. package/dist/dev/observe-deep.d.ts.map +1 -0
  12. package/dist/dev/observe-deep.js +333 -0
  13. package/dist/dev/observe-deep.js.map +1 -0
  14. package/dist/dev/observe-smoke.d.ts +2 -0
  15. package/dist/dev/observe-smoke.d.ts.map +1 -0
  16. package/dist/dev/observe-smoke.js +264 -0
  17. package/dist/dev/observe-smoke.js.map +1 -0
  18. package/dist/index.d.ts +4 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/interfaces/induscode-ui-delegate.d.ts +3 -0
  23. package/dist/interfaces/induscode-ui-delegate.d.ts.map +1 -0
  24. package/dist/interfaces/induscode-ui-delegate.js +148 -0
  25. package/dist/interfaces/induscode-ui-delegate.js.map +1 -0
  26. package/dist/interfaces/terminal-ui/components/footer.d.ts.map +1 -1
  27. package/dist/interfaces/terminal-ui/components/footer.js +9 -15
  28. package/dist/interfaces/terminal-ui/components/footer.js.map +1 -1
  29. package/dist/interfaces/terminal-ui/components/model-selector.d.ts.map +1 -1
  30. package/dist/interfaces/terminal-ui/components/model-selector.js +1 -1
  31. package/dist/interfaces/terminal-ui/components/model-selector.js.map +1 -1
  32. package/dist/interfaces/terminal-ui/components/oauth-selector.d.ts.map +1 -1
  33. package/dist/interfaces/terminal-ui/components/oauth-selector.js +1 -0
  34. package/dist/interfaces/terminal-ui/components/oauth-selector.js.map +1 -1
  35. package/dist/main.d.ts.map +1 -1
  36. package/dist/main.js +42 -18
  37. package/dist/main.js.map +1 -1
  38. package/dist/observe.d.ts +2 -0
  39. package/dist/observe.d.ts.map +1 -0
  40. package/dist/observe.js +2 -0
  41. package/dist/observe.js.map +1 -0
  42. package/dist/runtime/agent-session.d.ts +15 -0
  43. package/dist/runtime/agent-session.d.ts.map +1 -1
  44. package/dist/runtime/agent-session.js +444 -223
  45. package/dist/runtime/agent-session.js.map +1 -1
  46. package/dist/runtime/index.d.ts +5 -0
  47. package/dist/runtime/index.d.ts.map +1 -1
  48. package/dist/runtime/index.js +5 -0
  49. package/dist/runtime/index.js.map +1 -1
  50. package/dist/runtime/model-registry.d.ts +6 -0
  51. package/dist/runtime/model-registry.d.ts.map +1 -1
  52. package/dist/runtime/model-registry.js +71 -14
  53. package/dist/runtime/model-registry.js.map +1 -1
  54. package/dist/runtime/model-resolver.d.ts.map +1 -1
  55. package/dist/runtime/model-resolver.js +6 -3
  56. package/dist/runtime/model-resolver.js.map +1 -1
  57. package/dist/runtime/observe.d.ts +50 -0
  58. package/dist/runtime/observe.d.ts.map +1 -0
  59. package/dist/runtime/observe.js +233 -0
  60. package/dist/runtime/observe.js.map +1 -0
  61. package/dist/runtime/plugins/types.d.ts +3 -0
  62. package/dist/runtime/plugins/types.d.ts.map +1 -1
  63. package/dist/runtime/plugins/types.js.map +1 -1
  64. package/dist/runtime/providers/adapters/claude-cli-adapter.d.ts +19 -0
  65. package/dist/runtime/providers/adapters/claude-cli-adapter.d.ts.map +1 -0
  66. package/dist/runtime/providers/adapters/claude-cli-adapter.js +242 -0
  67. package/dist/runtime/providers/adapters/claude-cli-adapter.js.map +1 -0
  68. package/dist/runtime/providers/adapters/codex-cli-adapter.d.ts +18 -0
  69. package/dist/runtime/providers/adapters/codex-cli-adapter.d.ts.map +1 -0
  70. package/dist/runtime/providers/adapters/codex-cli-adapter.js +177 -0
  71. package/dist/runtime/providers/adapters/codex-cli-adapter.js.map +1 -0
  72. package/dist/runtime/providers/adapters/indusagi-cli-adapter.d.ts +21 -0
  73. package/dist/runtime/providers/adapters/indusagi-cli-adapter.d.ts.map +1 -0
  74. package/dist/runtime/providers/adapters/indusagi-cli-adapter.js +162 -0
  75. package/dist/runtime/providers/adapters/indusagi-cli-adapter.js.map +1 -0
  76. package/dist/runtime/providers/adapters/utils.d.ts +12 -0
  77. package/dist/runtime/providers/adapters/utils.d.ts.map +1 -0
  78. package/dist/runtime/providers/adapters/utils.js +122 -0
  79. package/dist/runtime/providers/adapters/utils.js.map +1 -0
  80. package/dist/runtime/providers/builtins.d.ts +3 -0
  81. package/dist/runtime/providers/builtins.d.ts.map +1 -0
  82. package/dist/runtime/providers/builtins.js +99 -0
  83. package/dist/runtime/providers/builtins.js.map +1 -0
  84. package/dist/runtime/providers/provider-adapter-registry.d.ts +11 -0
  85. package/dist/runtime/providers/provider-adapter-registry.d.ts.map +1 -0
  86. package/dist/runtime/providers/provider-adapter-registry.js +36 -0
  87. package/dist/runtime/providers/provider-adapter-registry.js.map +1 -0
  88. package/dist/runtime/providers/provider-adapter.d.ts +33 -0
  89. package/dist/runtime/providers/provider-adapter.d.ts.map +1 -0
  90. package/dist/runtime/providers/provider-adapter.js +2 -0
  91. package/dist/runtime/providers/provider-adapter.js.map +1 -0
  92. package/dist/runtime/providers/provider-service.d.ts +33 -0
  93. package/dist/runtime/providers/provider-service.d.ts.map +1 -0
  94. package/dist/runtime/providers/provider-service.js +157 -0
  95. package/dist/runtime/providers/provider-service.js.map +1 -0
  96. package/dist/runtime/providers/types.d.ts +29 -0
  97. package/dist/runtime/providers/types.d.ts.map +1 -0
  98. package/dist/runtime/providers/types.js +9 -0
  99. package/dist/runtime/providers/types.js.map +1 -0
  100. package/dist/runtime/sdk.d.ts +6 -0
  101. package/dist/runtime/sdk.d.ts.map +1 -1
  102. package/dist/runtime/sdk.js +55 -8
  103. package/dist/runtime/sdk.js.map +1 -1
  104. package/dist/telemetry/core/types.d.ts +1 -1
  105. package/dist/telemetry/core/types.js +1 -1
  106. package/dist/vendor/observe/adapters/agent-event-adapter.d.ts +28 -0
  107. package/dist/vendor/observe/adapters/agent-event-adapter.d.ts.map +1 -0
  108. package/dist/vendor/observe/adapters/agent-event-adapter.js +136 -0
  109. package/dist/vendor/observe/adapters/agent-event-adapter.js.map +1 -0
  110. package/dist/vendor/observe/adapters/ai-stream-adapter.d.ts +24 -0
  111. package/dist/vendor/observe/adapters/ai-stream-adapter.d.ts.map +1 -0
  112. package/dist/vendor/observe/adapters/ai-stream-adapter.js +118 -0
  113. package/dist/vendor/observe/adapters/ai-stream-adapter.js.map +1 -0
  114. package/dist/vendor/observe/artifacts/content-store.d.ts +12 -0
  115. package/dist/vendor/observe/artifacts/content-store.d.ts.map +1 -0
  116. package/dist/vendor/observe/artifacts/content-store.js +2 -0
  117. package/dist/vendor/observe/artifacts/content-store.js.map +1 -0
  118. package/dist/vendor/observe/artifacts/file-content-store.d.ts +16 -0
  119. package/dist/vendor/observe/artifacts/file-content-store.d.ts.map +1 -0
  120. package/dist/vendor/observe/artifacts/file-content-store.js +43 -0
  121. package/dist/vendor/observe/artifacts/file-content-store.js.map +1 -0
  122. package/dist/vendor/observe/batcher.d.ts +27 -0
  123. package/dist/vendor/observe/batcher.d.ts.map +1 -0
  124. package/dist/vendor/observe/batcher.js +66 -0
  125. package/dist/vendor/observe/batcher.js.map +1 -0
  126. package/dist/vendor/observe/client/artifacts-manager.d.ts +29 -0
  127. package/dist/vendor/observe/client/artifacts-manager.d.ts.map +1 -0
  128. package/dist/vendor/observe/client/artifacts-manager.js +120 -0
  129. package/dist/vendor/observe/client/artifacts-manager.js.map +1 -0
  130. package/dist/vendor/observe/client/datasets-manager.d.ts +16 -0
  131. package/dist/vendor/observe/client/datasets-manager.d.ts.map +1 -0
  132. package/dist/vendor/observe/client/datasets-manager.js +27 -0
  133. package/dist/vendor/observe/client/datasets-manager.js.map +1 -0
  134. package/dist/vendor/observe/client/experiments-manager.d.ts +61 -0
  135. package/dist/vendor/observe/client/experiments-manager.d.ts.map +1 -0
  136. package/dist/vendor/observe/client/experiments-manager.js +132 -0
  137. package/dist/vendor/observe/client/experiments-manager.js.map +1 -0
  138. package/dist/vendor/observe/client/index.d.ts +9 -0
  139. package/dist/vendor/observe/client/index.d.ts.map +1 -0
  140. package/dist/vendor/observe/client/index.js +9 -0
  141. package/dist/vendor/observe/client/index.js.map +1 -0
  142. package/dist/vendor/observe/client/observe-client.d.ts +30 -0
  143. package/dist/vendor/observe/client/observe-client.d.ts.map +1 -0
  144. package/dist/vendor/observe/client/observe-client.js +22 -0
  145. package/dist/vendor/observe/client/observe-client.js.map +1 -0
  146. package/dist/vendor/observe/client/prompts-manager.d.ts +17 -0
  147. package/dist/vendor/observe/client/prompts-manager.d.ts.map +1 -0
  148. package/dist/vendor/observe/client/prompts-manager.js +38 -0
  149. package/dist/vendor/observe/client/prompts-manager.js.map +1 -0
  150. package/dist/vendor/observe/client/scores-manager.d.ts +10 -0
  151. package/dist/vendor/observe/client/scores-manager.d.ts.map +1 -0
  152. package/dist/vendor/observe/client/scores-manager.js +15 -0
  153. package/dist/vendor/observe/client/scores-manager.js.map +1 -0
  154. package/dist/vendor/observe/client/sessions-manager.d.ts +15 -0
  155. package/dist/vendor/observe/client/sessions-manager.d.ts.map +1 -0
  156. package/dist/vendor/observe/client/sessions-manager.js +24 -0
  157. package/dist/vendor/observe/client/sessions-manager.js.map +1 -0
  158. package/dist/vendor/observe/client/traces-manager.d.ts +23 -0
  159. package/dist/vendor/observe/client/traces-manager.d.ts.map +1 -0
  160. package/dist/vendor/observe/client/traces-manager.js +39 -0
  161. package/dist/vendor/observe/client/traces-manager.js.map +1 -0
  162. package/dist/vendor/observe/console-exporter.d.ts +11 -0
  163. package/dist/vendor/observe/console-exporter.d.ts.map +1 -0
  164. package/dist/vendor/observe/console-exporter.js +18 -0
  165. package/dist/vendor/observe/console-exporter.js.map +1 -0
  166. package/dist/vendor/observe/context.d.ts +4 -0
  167. package/dist/vendor/observe/context.d.ts.map +1 -0
  168. package/dist/vendor/observe/context.js +9 -0
  169. package/dist/vendor/observe/context.js.map +1 -0
  170. package/dist/vendor/observe/entities/artifacts.d.ts +46 -0
  171. package/dist/vendor/observe/entities/artifacts.d.ts.map +1 -0
  172. package/dist/vendor/observe/entities/artifacts.js +2 -0
  173. package/dist/vendor/observe/entities/artifacts.js.map +1 -0
  174. package/dist/vendor/observe/entities/datasets.d.ts +37 -0
  175. package/dist/vendor/observe/entities/datasets.d.ts.map +1 -0
  176. package/dist/vendor/observe/entities/datasets.js +2 -0
  177. package/dist/vendor/observe/entities/datasets.js.map +1 -0
  178. package/dist/vendor/observe/entities/experiments.d.ts +66 -0
  179. package/dist/vendor/observe/entities/experiments.d.ts.map +1 -0
  180. package/dist/vendor/observe/entities/experiments.js +2 -0
  181. package/dist/vendor/observe/entities/experiments.js.map +1 -0
  182. package/dist/vendor/observe/entities/index.d.ts +9 -0
  183. package/dist/vendor/observe/entities/index.d.ts.map +1 -0
  184. package/dist/vendor/observe/entities/index.js +9 -0
  185. package/dist/vendor/observe/entities/index.js.map +1 -0
  186. package/dist/vendor/observe/entities/prompts.d.ts +25 -0
  187. package/dist/vendor/observe/entities/prompts.d.ts.map +1 -0
  188. package/dist/vendor/observe/entities/prompts.js +2 -0
  189. package/dist/vendor/observe/entities/prompts.js.map +1 -0
  190. package/dist/vendor/observe/entities/scores.d.ts +28 -0
  191. package/dist/vendor/observe/entities/scores.d.ts.map +1 -0
  192. package/dist/vendor/observe/entities/scores.js +2 -0
  193. package/dist/vendor/observe/entities/scores.js.map +1 -0
  194. package/dist/vendor/observe/entities/sessions.d.ts +36 -0
  195. package/dist/vendor/observe/entities/sessions.d.ts.map +1 -0
  196. package/dist/vendor/observe/entities/sessions.js +2 -0
  197. package/dist/vendor/observe/entities/sessions.js.map +1 -0
  198. package/dist/vendor/observe/entities/shared.d.ts +26 -0
  199. package/dist/vendor/observe/entities/shared.d.ts.map +1 -0
  200. package/dist/vendor/observe/entities/shared.js +2 -0
  201. package/dist/vendor/observe/entities/shared.js.map +1 -0
  202. package/dist/vendor/observe/entities/traces.d.ts +59 -0
  203. package/dist/vendor/observe/entities/traces.d.ts.map +1 -0
  204. package/dist/vendor/observe/entities/traces.js +2 -0
  205. package/dist/vendor/observe/entities/traces.js.map +1 -0
  206. package/dist/vendor/observe/exporter.d.ts +2 -0
  207. package/dist/vendor/observe/exporter.d.ts.map +1 -0
  208. package/dist/vendor/observe/exporter.js +2 -0
  209. package/dist/vendor/observe/exporter.js.map +1 -0
  210. package/dist/vendor/observe/file-exporter.d.ts +16 -0
  211. package/dist/vendor/observe/file-exporter.d.ts.map +1 -0
  212. package/dist/vendor/observe/file-exporter.js +39 -0
  213. package/dist/vendor/observe/file-exporter.js.map +1 -0
  214. package/dist/vendor/observe/global.d.ts +6 -0
  215. package/dist/vendor/observe/global.d.ts.map +1 -0
  216. package/dist/vendor/observe/global.js +17 -0
  217. package/dist/vendor/observe/global.js.map +1 -0
  218. package/dist/vendor/observe/index.d.ts +24 -0
  219. package/dist/vendor/observe/index.d.ts.map +1 -0
  220. package/dist/vendor/observe/index.js +24 -0
  221. package/dist/vendor/observe/index.js.map +1 -0
  222. package/dist/vendor/observe/noop.d.ts +17 -0
  223. package/dist/vendor/observe/noop.d.ts.map +1 -0
  224. package/dist/vendor/observe/noop.js +80 -0
  225. package/dist/vendor/observe/noop.js.map +1 -0
  226. package/dist/vendor/observe/privacy.d.ts +18 -0
  227. package/dist/vendor/observe/privacy.d.ts.map +1 -0
  228. package/dist/vendor/observe/privacy.js +160 -0
  229. package/dist/vendor/observe/privacy.js.map +1 -0
  230. package/dist/vendor/observe/query/simple-query-client.d.ts +11 -0
  231. package/dist/vendor/observe/query/simple-query-client.d.ts.map +1 -0
  232. package/dist/vendor/observe/query/simple-query-client.js +31 -0
  233. package/dist/vendor/observe/query/simple-query-client.js.map +1 -0
  234. package/dist/vendor/observe/replay/session-replay.d.ts +20 -0
  235. package/dist/vendor/observe/replay/session-replay.d.ts.map +1 -0
  236. package/dist/vendor/observe/replay/session-replay.js +180 -0
  237. package/dist/vendor/observe/replay/session-replay.js.map +1 -0
  238. package/dist/vendor/observe/runtime.d.ts +27 -0
  239. package/dist/vendor/observe/runtime.d.ts.map +1 -0
  240. package/dist/vendor/observe/runtime.js +177 -0
  241. package/dist/vendor/observe/runtime.js.map +1 -0
  242. package/dist/vendor/observe/server/dashboard-html.d.ts +6 -0
  243. package/dist/vendor/observe/server/dashboard-html.d.ts.map +1 -0
  244. package/dist/vendor/observe/server/dashboard-html.js +305 -0
  245. package/dist/vendor/observe/server/dashboard-html.js.map +1 -0
  246. package/dist/vendor/observe/server/http-observe-server.d.ts +62 -0
  247. package/dist/vendor/observe/server/http-observe-server.d.ts.map +1 -0
  248. package/dist/vendor/observe/server/http-observe-server.js +418 -0
  249. package/dist/vendor/observe/server/http-observe-server.js.map +1 -0
  250. package/dist/vendor/observe/server/in-memory-observe-server.d.ts +20 -0
  251. package/dist/vendor/observe/server/in-memory-observe-server.d.ts.map +1 -0
  252. package/dist/vendor/observe/server/in-memory-observe-server.js +76 -0
  253. package/dist/vendor/observe/server/in-memory-observe-server.js.map +1 -0
  254. package/dist/vendor/observe/span.d.ts +45 -0
  255. package/dist/vendor/observe/span.d.ts.map +1 -0
  256. package/dist/vendor/observe/span.js +110 -0
  257. package/dist/vendor/observe/span.js.map +1 -0
  258. package/dist/vendor/observe/store/contracts.d.ts +59 -0
  259. package/dist/vendor/observe/store/contracts.d.ts.map +1 -0
  260. package/dist/vendor/observe/store/contracts.js +2 -0
  261. package/dist/vendor/observe/store/contracts.js.map +1 -0
  262. package/dist/vendor/observe/store/file-control-plane-store.d.ts +33 -0
  263. package/dist/vendor/observe/store/file-control-plane-store.d.ts.map +1 -0
  264. package/dist/vendor/observe/store/file-control-plane-store.js +146 -0
  265. package/dist/vendor/observe/store/file-control-plane-store.js.map +1 -0
  266. package/dist/vendor/observe/store/in-memory-control-plane-store.d.ts +84 -0
  267. package/dist/vendor/observe/store/in-memory-control-plane-store.d.ts.map +1 -0
  268. package/dist/vendor/observe/store/in-memory-control-plane-store.js +447 -0
  269. package/dist/vendor/observe/store/in-memory-control-plane-store.js.map +1 -0
  270. package/dist/vendor/observe/store/index.d.ts +4 -0
  271. package/dist/vendor/observe/store/index.d.ts.map +1 -0
  272. package/dist/vendor/observe/store/index.js +4 -0
  273. package/dist/vendor/observe/store/index.js.map +1 -0
  274. package/dist/vendor/observe/types.d.ts +246 -0
  275. package/dist/vendor/observe/types.d.ts.map +1 -0
  276. package/dist/vendor/observe/types.js +152 -0
  277. package/dist/vendor/observe/types.js.map +1 -0
  278. package/dist/vendor/observe/worker/in-memory-observe-worker.d.ts +25 -0
  279. package/dist/vendor/observe/worker/in-memory-observe-worker.d.ts.map +1 -0
  280. package/dist/vendor/observe/worker/in-memory-observe-worker.js +82 -0
  281. package/dist/vendor/observe/worker/in-memory-observe-worker.js.map +1 -0
  282. package/guides/CLAUDE_CODEX_CLI_INTEGRATION_PLAN.md +321 -0
  283. package/guides/{PI_MONO_MIT_REMOVAL_GUIDE.md → INDUSAGI_MONO_MIT_REMOVAL_GUIDE.md} +29 -29
  284. package/guides/INDUSVX_OBSERVE_FULL_INTEGRATION_REPORT.md +543 -0
  285. package/guides/OBSERVE_DEEP_VALIDATION.md +252 -0
  286. package/guides/OBSERVE_LOCAL_TESTING.md +183 -0
  287. package/guides/OPTION3_PROVIDER_ADAPTER_RUNTIME_PLAN.md +370 -0
  288. package/package.json +11 -4
@@ -0,0 +1,543 @@
1
+ # Use `indusvx-screth` locally as `indusagi` and get full Observe in `indusagi-screth`
2
+
3
+ Date: 2026-03-30
4
+
5
+ ## What this document is about
6
+
7
+ This report is **not** about copying all `indusvx-screth` source code into `indusagi-screth`.
8
+
9
+ This report is about this exact goal:
10
+
11
+ - keep `indusagi-screth` as the app repo
12
+ - keep app imports like `indusagi/agent`, `indusagi/ai`, `indusagi/tui`
13
+ - **replace the installed npm `indusagi` package with local `../indusvx-screth`**
14
+ - then use **`indusvx-screth` Observe** inside `indusagi-screth` through normal imports
15
+ - get as much of the full observability power as possible **without copying the whole codebase**
16
+
17
+ ---
18
+
19
+ # Final answer
20
+
21
+ ## Yes, this is the right approach
22
+
23
+ If your goal is:
24
+
25
+ - do **not** move all `indusvx-screth` code into `indusagi-screth`
26
+ - do **not** rewrite `indusagi-screth` into an `indusvx` repo
27
+ - keep using imports named `indusagi/...`
28
+ - but actually use your local `indusvx-screth` package and its Observe stack
29
+
30
+ then the correct direction is:
31
+
32
+ ## 1) install local `indusvx-screth` under the dependency name `indusagi`
33
+
34
+ In `indusagi-screth/package.json`, use:
35
+
36
+ ```json
37
+ {
38
+ "dependencies": {
39
+ "indusagi": "file:../indusvx-screth"
40
+ }
41
+ }
42
+ ```
43
+
44
+ That means:
45
+
46
+ - `indusagi-screth` still writes imports like `import { Agent } from "indusagi/agent"`
47
+ - but npm resolves that dependency from your local `../indusvx-screth`
48
+ - so at runtime/build time, `indusagi-screth` is actually using local `indusvx-screth`
49
+
50
+ ## 2) use Observe from normal package imports
51
+
52
+ Inside `indusagi-screth`, import like this:
53
+
54
+ ```ts
55
+ import {
56
+ createObserve,
57
+ ObserveClient,
58
+ InMemoryObserveServer,
59
+ FileObserveControlPlaneStore,
60
+ FileObserveArtifactContentStore,
61
+ ObserveHttpServer,
62
+ } from "indusagi/observe";
63
+ ```
64
+
65
+ So the app still looks like it uses `indusagi`, but the implementation comes from local `indusvx-screth`.
66
+
67
+ ---
68
+
69
+ # Very important clarification
70
+
71
+ ## We should NOT do this
72
+
73
+ Do **not**:
74
+
75
+ - copy `src/observe/**` from `indusvx-screth` into `indusagi-screth`
76
+ - copy `agent`, `ai`, `mcp`, `tui` source trees into `indusagi-screth`
77
+ - maintain two duplicated implementations
78
+
79
+ That would create:
80
+
81
+ - drift
82
+ - harder upgrades
83
+ - more bugs
84
+ - messy ownership
85
+
86
+ ## We SHOULD do this
87
+
88
+ - keep `indusvx-screth` as the package implementation source
89
+ - keep `indusagi-screth` as the application/shell repo
90
+ - connect them through the package dependency named `indusagi`
91
+ - wire Observe in `indusagi-screth` by importing from `indusagi/observe`
92
+
93
+ That is the cleanest path.
94
+
95
+ ---
96
+
97
+ # Main architecture idea
98
+
99
+ ## Desired setup
100
+
101
+ ### `indusvx-screth`
102
+ Owns:
103
+
104
+ - `agent`
105
+ - `ai`
106
+ - `mcp`
107
+ - `tui`
108
+ - `observe`
109
+ - low-level runtime instrumentation
110
+
111
+ ### `indusagi-screth`
112
+ Owns:
113
+
114
+ - coding-agent app shell
115
+ - CLI / modes
116
+ - settings
117
+ - auth
118
+ - extension runtime
119
+ - hooks
120
+ - session orchestration
121
+ - app-specific wiring
122
+
123
+ So the app shell stays in `indusagi-screth`, but its engine comes from local `indusvx-screth`.
124
+
125
+ ---
126
+
127
+ # How `indusagi-screth` should use Observe
128
+
129
+ ## Core idea
130
+
131
+ After local package replacement, `indusagi-screth` should use Observe like any normal package feature:
132
+
133
+ ```ts
134
+ import { createObserve } from "indusagi/observe";
135
+ ```
136
+
137
+ No source copy needed.
138
+
139
+ ---
140
+
141
+ # Recommended package setup
142
+
143
+ ## Best local-dev package change
144
+
145
+ In `indusagi-screth/package.json` change:
146
+
147
+ ```json
148
+ "indusagi": "^0.12.22"
149
+ ```
150
+
151
+ to:
152
+
153
+ ```json
154
+ "indusagi": "file:../indusvx-screth"
155
+ ```
156
+
157
+ ## Why this is the best option
158
+
159
+ Because it gives you all of this:
160
+
161
+ - existing imports stay the same
162
+ - no mass refactor of source files
163
+ - `indusagi-screth` still feels like an `indusagi` app
164
+ - actual implementation comes from your local repo
165
+ - Observe can be imported from `indusagi/observe`
166
+
167
+ ---
168
+
169
+ # Build/install flow
170
+
171
+ ## Required flow
172
+
173
+ Whenever you want `indusagi-screth` to use the latest local `indusvx-screth`:
174
+
175
+ ### 1. Build local package
176
+
177
+ In `indusvx-screth`:
178
+
179
+ ```bash
180
+ npm run build
181
+ ```
182
+
183
+ ### 2. Reinstall or refresh dependency in app repo
184
+
185
+ In `indusagi-screth`:
186
+
187
+ ```bash
188
+ npm install
189
+ ```
190
+
191
+ ### 3. Build app repo
192
+
193
+ ```bash
194
+ npm run build
195
+ ```
196
+
197
+ ### 4. Test
198
+
199
+ ```bash
200
+ npm test
201
+ ```
202
+
203
+ ---
204
+
205
+ # How to use full Observe power in `indusagi-screth`
206
+
207
+ ## Goal
208
+
209
+ Use these `indusvx-screth` Observe pieces via `indusagi/observe`:
210
+
211
+ - `ObserveRuntime`
212
+ - `ObserveClient`
213
+ - `InMemoryObserveServer`
214
+ - `FileObserveControlPlaneStore`
215
+ - `FileObserveArtifactContentStore`
216
+ - `ObserveHttpServer`
217
+ - `ObservePanel`
218
+ - privacy controls
219
+
220
+ ---
221
+
222
+ # Recommended integration points in `indusagi-screth`
223
+
224
+ ## 1. Bootstrap Observe once in app startup
225
+
226
+ ### File
227
+ - `app/main.ts`
228
+
229
+ ### What to do
230
+ Create one Observe stack at startup.
231
+
232
+ Example shape:
233
+
234
+ ```ts
235
+ import {
236
+ createObserve,
237
+ ObserveClient,
238
+ InMemoryObserveServer,
239
+ FileObserveControlPlaneStore,
240
+ FileObserveArtifactContentStore,
241
+ ObserveHttpServer,
242
+ } from "indusagi/observe";
243
+ ```
244
+
245
+ Then initialize:
246
+
247
+ - runtime exporter
248
+ - control-plane store
249
+ - artifact store
250
+ - query backend
251
+ - optional dashboard server
252
+ - observe client
253
+
254
+ ### Why here
255
+ This lets all app modes share one observability setup.
256
+
257
+ ---
258
+
259
+ ## 2. Pass Observe into runtime session creation
260
+
261
+ ### File
262
+ - `app/runtime/sdk.ts`
263
+
264
+ ### What to add
265
+ Extend session creation options so the app can pass Observe handles down.
266
+
267
+ Example direction:
268
+
269
+ ```ts
270
+ observe?: {
271
+ runtime: ReturnType<typeof createObserve>;
272
+ client?: ObserveClient;
273
+ server?: InMemoryObserveServer;
274
+ }
275
+ ```
276
+
277
+ ### Why this matters
278
+ This is the main handoff point between app shell and low-level engine.
279
+
280
+ ---
281
+
282
+ ## 3. Use Observe in the real agent/model flow
283
+
284
+ ### File
285
+ - `app/runtime/sdk.ts`
286
+
287
+ ### Important functions
288
+ - `createAgentInstance(...)`
289
+ - `createStreamWithHooks(...)`
290
+ - `createAgentSession(...)`
291
+
292
+ ### What to do
293
+ Use Observe there so real runs produce:
294
+
295
+ - trace
296
+ - spans
297
+ - events
298
+ - tool metadata
299
+ - model-generation metadata
300
+ - errors
301
+
302
+ If `Agent` in the local package supports `observe`, pass it directly.
303
+ If not, wrap around it at the app layer first.
304
+
305
+ ---
306
+
307
+ ## 4. Instrument session lifecycle in the app shell
308
+
309
+ ### File
310
+ - `app/runtime/agent-session.ts`
311
+
312
+ ### High-value targets
313
+ - `prompt(...)`
314
+ - `newSession(...)`
315
+ - `switchSession(...)`
316
+ - `fork(...)`
317
+ - `compact(...)`
318
+ - `executeBash(...)`
319
+ - MCP registration/reconnect
320
+ - memory enable/disable
321
+
322
+ ### Why
323
+ This is how you get full app-level observability, not just model-call logging.
324
+
325
+ ---
326
+
327
+ ## 5. Turn on dashboard and API
328
+
329
+ ### Use from package import
330
+
331
+ ```ts
332
+ import { ObserveHttpServer } from "indusagi/observe";
333
+ ```
334
+
335
+ ### Result
336
+ `indusagi-screth` can expose:
337
+
338
+ - health endpoint
339
+ - stats endpoint
340
+ - records endpoint
341
+ - control-plane endpoints
342
+ - dashboard HTML UI
343
+
344
+ So you get a Langfuse-like local inspection surface without copying code.
345
+
346
+ ---
347
+
348
+ ## 6. Use artifact and control-plane features
349
+
350
+ ### Package imports
351
+
352
+ ```ts
353
+ import {
354
+ ObserveClient,
355
+ FileObserveControlPlaneStore,
356
+ FileObserveArtifactContentStore,
357
+ } from "indusagi/observe";
358
+ ```
359
+
360
+ ### Use for
361
+ - prompts
362
+ - traces
363
+ - datasets
364
+ - experiments
365
+ - scores
366
+ - artifacts
367
+ - persisted snapshots
368
+
369
+ This gives the app richer observability than simple log files.
370
+
371
+ ---
372
+
373
+ ## 7. Use TUI Observe helpers from package import
374
+
375
+ ### Package imports
376
+
377
+ ```ts
378
+ import {
379
+ ObservePanel,
380
+ buildObservePanelSnapshot,
381
+ createObservePanelOverlayMetadata,
382
+ } from "indusagi/observe";
383
+ ```
384
+
385
+ ### Integrate in
386
+ - `app/interfaces/terminal-ui/interactive-mode.ts`
387
+
388
+ ### Result
389
+ You can show:
390
+
391
+ - live stats
392
+ - trace counters
393
+ - errors
394
+ - recent spans/events
395
+ - dashboard URL
396
+
397
+ Again: no source copy, only package usage.
398
+
399
+ ---
400
+
401
+ # Full-potential observability path
402
+
403
+ If you want "full potential" observability in `indusagi-screth`, the package-based path should look like this:
404
+
405
+ ## Step 1
406
+ Make `indusagi-screth` consume local `indusvx-screth` as dependency `indusagi`.
407
+
408
+ ## Step 2
409
+ Import and bootstrap Observe from `indusagi/observe`.
410
+
411
+ ## Step 3
412
+ Pass Observe through the app runtime so real agent runs use it.
413
+
414
+ ## Step 4
415
+ Enable:
416
+
417
+ - file exporter or custom exporter
418
+ - control-plane store
419
+ - artifact store
420
+ - HTTP observe server
421
+ - privacy config
422
+ - TUI panel
423
+
424
+ ## Step 5
425
+ Add app-level instrumentation in `sdk.ts` and `agent-session.ts`.
426
+
427
+ That is the correct way to get near-full power while keeping clean boundaries.
428
+
429
+ ---
430
+
431
+ # Practical answer
432
+
433
+ For this plan, the direction is simple:
434
+
435
+ 1. keep `indusagi-screth` app code where it is
436
+ 2. do **not** copy `indusvx-screth` source into it
437
+ 3. point dependency `indusagi` to local `../indusvx-screth`
438
+ 4. import Observe from `indusagi/observe`
439
+ 5. wire Observe into `app/main.ts`, `app/runtime/sdk.ts`, and `app/runtime/agent-session.ts`
440
+ 6. use the dashboard, control-plane store, artifact store, privacy controls, and TUI helpers from package imports
441
+
442
+ That is the architecture this document recommends.
443
+
444
+ ---
445
+
446
+ # Best recommendation
447
+
448
+ ## If the priority is observability first
449
+
450
+ Do this:
451
+
452
+ 1. keep `indusagi-screth` app code where it is
453
+ 2. do **not** copy `indusvx-screth` source into it
454
+ 3. point dependency `indusagi` to local `../indusvx-screth`
455
+ 4. import Observe from `indusagi/observe`
456
+ 5. wire Observe into `app/main.ts`, `app/runtime/sdk.ts`, and `app/runtime/agent-session.ts`
457
+ 6. use the full Observe stack through package imports
458
+
459
+ That gives you the right architecture.
460
+
461
+ ---
462
+
463
+ # Example mental model
464
+
465
+ ## Wanted model
466
+
467
+ `indusagi-screth` says:
468
+
469
+ ```ts
470
+ import { Agent } from "indusagi/agent";
471
+ import { createObserve } from "indusagi/observe";
472
+ ```
473
+
474
+ But because `package.json` points `indusagi` to:
475
+
476
+ ```json
477
+ "file:../indusvx-screth"
478
+ ```
479
+
480
+ those imports actually use your local `indusvx-screth` implementation.
481
+
482
+ That is exactly the package-level swap you want.
483
+
484
+ ---
485
+
486
+ # Testing checklist
487
+
488
+ After switching the dependency to local `indusvx-screth`:
489
+
490
+ ## In `indusvx-screth`
491
+
492
+ ```bash
493
+ npm run build
494
+ npm test
495
+ ```
496
+
497
+ ## In `indusagi-screth`
498
+
499
+ ```bash
500
+ npm install
501
+ npm run build
502
+ npm test
503
+ ```
504
+
505
+ ## Then validate observability
506
+
507
+ - start app flow
508
+ - confirm `indusagi/observe` imports work
509
+ - confirm traces/spans/events are emitted
510
+ - confirm dashboard server starts
511
+ - confirm artifacts/control-plane files are written
512
+ - confirm TUI still works
513
+ - confirm privacy redaction works
514
+
515
+ ---
516
+
517
+ # One-line conclusion
518
+
519
+ ## Correct direction
520
+
521
+ **Do not copy `indusvx-screth` code into `indusagi-screth`. Instead, make `indusagi-screth` use local `indusvx-screth` as the installed `indusagi` package, then import and wire full observability from `indusagi/observe`.**
522
+
523
+ ---
524
+
525
+ # What I would do next
526
+
527
+ If you want, next I can update the actual code for this package-based approach in one of these ways:
528
+
529
+ ## Option 1 — docs/package only
530
+ - change `indusagi-screth/package.json` to local `file:../indusvx-screth`
531
+ - document the local build/install flow
532
+
533
+ ## Option 2 — real Observe wiring
534
+ - keep imports as `indusagi/...`
535
+ - wire `indusagi/observe` into:
536
+ - `app/main.ts`
537
+ - `app/runtime/sdk.ts`
538
+ - `app/runtime/agent-session.ts`
539
+
540
+ ## Option 3 — compat path
541
+ - create a minimal local compat package strategy so memory imports do not break
542
+
543
+ If you want, I can do **Option 2 next** and keep everything package-based, no source-copy approach.