indusagi-coding-agent 0.1.42 → 0.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -2
- package/README.md +3 -0
- package/dist/command-line/args.js +1 -1
- package/dist/command-line/args.js.map +1 -1
- package/dist/command-line/login-handler.d.ts.map +1 -1
- package/dist/command-line/login-handler.js +7 -0
- package/dist/command-line/login-handler.js.map +1 -1
- package/dist/dev/observe-deep.d.ts +2 -0
- package/dist/dev/observe-deep.d.ts.map +1 -0
- package/dist/dev/observe-deep.js +333 -0
- package/dist/dev/observe-deep.js.map +1 -0
- package/dist/dev/observe-smoke.d.ts +2 -0
- package/dist/dev/observe-smoke.d.ts.map +1 -0
- package/dist/dev/observe-smoke.js +264 -0
- package/dist/dev/observe-smoke.js.map +1 -0
- package/dist/interfaces/terminal-ui/components/oauth-selector.d.ts.map +1 -1
- package/dist/interfaces/terminal-ui/components/oauth-selector.js +1 -0
- package/dist/interfaces/terminal-ui/components/oauth-selector.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +40 -18
- package/dist/main.js.map +1 -1
- package/dist/observe.d.ts +2 -0
- package/dist/observe.d.ts.map +1 -0
- package/dist/observe.js +2 -0
- package/dist/observe.js.map +1 -0
- package/dist/runtime/agent-session.d.ts +11 -0
- package/dist/runtime/agent-session.d.ts.map +1 -1
- package/dist/runtime/agent-session.js +391 -201
- package/dist/runtime/agent-session.js.map +1 -1
- package/dist/runtime/model-resolver.d.ts.map +1 -1
- package/dist/runtime/model-resolver.js +1 -0
- package/dist/runtime/model-resolver.js.map +1 -1
- package/dist/runtime/observe.d.ts +50 -0
- package/dist/runtime/observe.d.ts.map +1 -0
- package/dist/runtime/observe.js +233 -0
- package/dist/runtime/observe.js.map +1 -0
- package/dist/runtime/sdk.d.ts +2 -0
- package/dist/runtime/sdk.d.ts.map +1 -1
- package/dist/runtime/sdk.js +19 -6
- package/dist/runtime/sdk.js.map +1 -1
- package/dist/vendor/observe/adapters/agent-event-adapter.d.ts +28 -0
- package/dist/vendor/observe/adapters/agent-event-adapter.d.ts.map +1 -0
- package/dist/vendor/observe/adapters/agent-event-adapter.js +136 -0
- package/dist/vendor/observe/adapters/agent-event-adapter.js.map +1 -0
- package/dist/vendor/observe/adapters/ai-stream-adapter.d.ts +24 -0
- package/dist/vendor/observe/adapters/ai-stream-adapter.d.ts.map +1 -0
- package/dist/vendor/observe/adapters/ai-stream-adapter.js +118 -0
- package/dist/vendor/observe/adapters/ai-stream-adapter.js.map +1 -0
- package/dist/vendor/observe/artifacts/content-store.d.ts +12 -0
- package/dist/vendor/observe/artifacts/content-store.d.ts.map +1 -0
- package/dist/vendor/observe/artifacts/content-store.js +2 -0
- package/dist/vendor/observe/artifacts/content-store.js.map +1 -0
- package/dist/vendor/observe/artifacts/file-content-store.d.ts +16 -0
- package/dist/vendor/observe/artifacts/file-content-store.d.ts.map +1 -0
- package/dist/vendor/observe/artifacts/file-content-store.js +43 -0
- package/dist/vendor/observe/artifacts/file-content-store.js.map +1 -0
- package/dist/vendor/observe/batcher.d.ts +27 -0
- package/dist/vendor/observe/batcher.d.ts.map +1 -0
- package/dist/vendor/observe/batcher.js +66 -0
- package/dist/vendor/observe/batcher.js.map +1 -0
- package/dist/vendor/observe/client/artifacts-manager.d.ts +29 -0
- package/dist/vendor/observe/client/artifacts-manager.d.ts.map +1 -0
- package/dist/vendor/observe/client/artifacts-manager.js +120 -0
- package/dist/vendor/observe/client/artifacts-manager.js.map +1 -0
- package/dist/vendor/observe/client/datasets-manager.d.ts +16 -0
- package/dist/vendor/observe/client/datasets-manager.d.ts.map +1 -0
- package/dist/vendor/observe/client/datasets-manager.js +27 -0
- package/dist/vendor/observe/client/datasets-manager.js.map +1 -0
- package/dist/vendor/observe/client/experiments-manager.d.ts +61 -0
- package/dist/vendor/observe/client/experiments-manager.d.ts.map +1 -0
- package/dist/vendor/observe/client/experiments-manager.js +132 -0
- package/dist/vendor/observe/client/experiments-manager.js.map +1 -0
- package/dist/vendor/observe/client/index.d.ts +9 -0
- package/dist/vendor/observe/client/index.d.ts.map +1 -0
- package/dist/vendor/observe/client/index.js +9 -0
- package/dist/vendor/observe/client/index.js.map +1 -0
- package/dist/vendor/observe/client/observe-client.d.ts +30 -0
- package/dist/vendor/observe/client/observe-client.d.ts.map +1 -0
- package/dist/vendor/observe/client/observe-client.js +22 -0
- package/dist/vendor/observe/client/observe-client.js.map +1 -0
- package/dist/vendor/observe/client/prompts-manager.d.ts +17 -0
- package/dist/vendor/observe/client/prompts-manager.d.ts.map +1 -0
- package/dist/vendor/observe/client/prompts-manager.js +38 -0
- package/dist/vendor/observe/client/prompts-manager.js.map +1 -0
- package/dist/vendor/observe/client/scores-manager.d.ts +10 -0
- package/dist/vendor/observe/client/scores-manager.d.ts.map +1 -0
- package/dist/vendor/observe/client/scores-manager.js +15 -0
- package/dist/vendor/observe/client/scores-manager.js.map +1 -0
- package/dist/vendor/observe/client/sessions-manager.d.ts +15 -0
- package/dist/vendor/observe/client/sessions-manager.d.ts.map +1 -0
- package/dist/vendor/observe/client/sessions-manager.js +24 -0
- package/dist/vendor/observe/client/sessions-manager.js.map +1 -0
- package/dist/vendor/observe/client/traces-manager.d.ts +23 -0
- package/dist/vendor/observe/client/traces-manager.d.ts.map +1 -0
- package/dist/vendor/observe/client/traces-manager.js +39 -0
- package/dist/vendor/observe/client/traces-manager.js.map +1 -0
- package/dist/vendor/observe/console-exporter.d.ts +11 -0
- package/dist/vendor/observe/console-exporter.d.ts.map +1 -0
- package/dist/vendor/observe/console-exporter.js +18 -0
- package/dist/vendor/observe/console-exporter.js.map +1 -0
- package/dist/vendor/observe/context.d.ts +4 -0
- package/dist/vendor/observe/context.d.ts.map +1 -0
- package/dist/vendor/observe/context.js +9 -0
- package/dist/vendor/observe/context.js.map +1 -0
- package/dist/vendor/observe/entities/artifacts.d.ts +46 -0
- package/dist/vendor/observe/entities/artifacts.d.ts.map +1 -0
- package/dist/vendor/observe/entities/artifacts.js +2 -0
- package/dist/vendor/observe/entities/artifacts.js.map +1 -0
- package/dist/vendor/observe/entities/datasets.d.ts +37 -0
- package/dist/vendor/observe/entities/datasets.d.ts.map +1 -0
- package/dist/vendor/observe/entities/datasets.js +2 -0
- package/dist/vendor/observe/entities/datasets.js.map +1 -0
- package/dist/vendor/observe/entities/experiments.d.ts +66 -0
- package/dist/vendor/observe/entities/experiments.d.ts.map +1 -0
- package/dist/vendor/observe/entities/experiments.js +2 -0
- package/dist/vendor/observe/entities/experiments.js.map +1 -0
- package/dist/vendor/observe/entities/index.d.ts +9 -0
- package/dist/vendor/observe/entities/index.d.ts.map +1 -0
- package/dist/vendor/observe/entities/index.js +9 -0
- package/dist/vendor/observe/entities/index.js.map +1 -0
- package/dist/vendor/observe/entities/prompts.d.ts +25 -0
- package/dist/vendor/observe/entities/prompts.d.ts.map +1 -0
- package/dist/vendor/observe/entities/prompts.js +2 -0
- package/dist/vendor/observe/entities/prompts.js.map +1 -0
- package/dist/vendor/observe/entities/scores.d.ts +28 -0
- package/dist/vendor/observe/entities/scores.d.ts.map +1 -0
- package/dist/vendor/observe/entities/scores.js +2 -0
- package/dist/vendor/observe/entities/scores.js.map +1 -0
- package/dist/vendor/observe/entities/sessions.d.ts +36 -0
- package/dist/vendor/observe/entities/sessions.d.ts.map +1 -0
- package/dist/vendor/observe/entities/sessions.js +2 -0
- package/dist/vendor/observe/entities/sessions.js.map +1 -0
- package/dist/vendor/observe/entities/shared.d.ts +26 -0
- package/dist/vendor/observe/entities/shared.d.ts.map +1 -0
- package/dist/vendor/observe/entities/shared.js +2 -0
- package/dist/vendor/observe/entities/shared.js.map +1 -0
- package/dist/vendor/observe/entities/traces.d.ts +59 -0
- package/dist/vendor/observe/entities/traces.d.ts.map +1 -0
- package/dist/vendor/observe/entities/traces.js +2 -0
- package/dist/vendor/observe/entities/traces.js.map +1 -0
- package/dist/vendor/observe/exporter.d.ts +2 -0
- package/dist/vendor/observe/exporter.d.ts.map +1 -0
- package/dist/vendor/observe/exporter.js +2 -0
- package/dist/vendor/observe/exporter.js.map +1 -0
- package/dist/vendor/observe/file-exporter.d.ts +16 -0
- package/dist/vendor/observe/file-exporter.d.ts.map +1 -0
- package/dist/vendor/observe/file-exporter.js +39 -0
- package/dist/vendor/observe/file-exporter.js.map +1 -0
- package/dist/vendor/observe/global.d.ts +6 -0
- package/dist/vendor/observe/global.d.ts.map +1 -0
- package/dist/vendor/observe/global.js +17 -0
- package/dist/vendor/observe/global.js.map +1 -0
- package/dist/vendor/observe/index.d.ts +24 -0
- package/dist/vendor/observe/index.d.ts.map +1 -0
- package/dist/vendor/observe/index.js +24 -0
- package/dist/vendor/observe/index.js.map +1 -0
- package/dist/vendor/observe/noop.d.ts +17 -0
- package/dist/vendor/observe/noop.d.ts.map +1 -0
- package/dist/vendor/observe/noop.js +80 -0
- package/dist/vendor/observe/noop.js.map +1 -0
- package/dist/vendor/observe/privacy.d.ts +18 -0
- package/dist/vendor/observe/privacy.d.ts.map +1 -0
- package/dist/vendor/observe/privacy.js +160 -0
- package/dist/vendor/observe/privacy.js.map +1 -0
- package/dist/vendor/observe/query/simple-query-client.d.ts +11 -0
- package/dist/vendor/observe/query/simple-query-client.d.ts.map +1 -0
- package/dist/vendor/observe/query/simple-query-client.js +31 -0
- package/dist/vendor/observe/query/simple-query-client.js.map +1 -0
- package/dist/vendor/observe/replay/session-replay.d.ts +20 -0
- package/dist/vendor/observe/replay/session-replay.d.ts.map +1 -0
- package/dist/vendor/observe/replay/session-replay.js +180 -0
- package/dist/vendor/observe/replay/session-replay.js.map +1 -0
- package/dist/vendor/observe/runtime.d.ts +27 -0
- package/dist/vendor/observe/runtime.d.ts.map +1 -0
- package/dist/vendor/observe/runtime.js +177 -0
- package/dist/vendor/observe/runtime.js.map +1 -0
- package/dist/vendor/observe/server/dashboard-html.d.ts +6 -0
- package/dist/vendor/observe/server/dashboard-html.d.ts.map +1 -0
- package/dist/vendor/observe/server/dashboard-html.js +305 -0
- package/dist/vendor/observe/server/dashboard-html.js.map +1 -0
- package/dist/vendor/observe/server/http-observe-server.d.ts +62 -0
- package/dist/vendor/observe/server/http-observe-server.d.ts.map +1 -0
- package/dist/vendor/observe/server/http-observe-server.js +418 -0
- package/dist/vendor/observe/server/http-observe-server.js.map +1 -0
- package/dist/vendor/observe/server/in-memory-observe-server.d.ts +20 -0
- package/dist/vendor/observe/server/in-memory-observe-server.d.ts.map +1 -0
- package/dist/vendor/observe/server/in-memory-observe-server.js +76 -0
- package/dist/vendor/observe/server/in-memory-observe-server.js.map +1 -0
- package/dist/vendor/observe/span.d.ts +45 -0
- package/dist/vendor/observe/span.d.ts.map +1 -0
- package/dist/vendor/observe/span.js +110 -0
- package/dist/vendor/observe/span.js.map +1 -0
- package/dist/vendor/observe/store/contracts.d.ts +59 -0
- package/dist/vendor/observe/store/contracts.d.ts.map +1 -0
- package/dist/vendor/observe/store/contracts.js +2 -0
- package/dist/vendor/observe/store/contracts.js.map +1 -0
- package/dist/vendor/observe/store/file-control-plane-store.d.ts +33 -0
- package/dist/vendor/observe/store/file-control-plane-store.d.ts.map +1 -0
- package/dist/vendor/observe/store/file-control-plane-store.js +146 -0
- package/dist/vendor/observe/store/file-control-plane-store.js.map +1 -0
- package/dist/vendor/observe/store/in-memory-control-plane-store.d.ts +84 -0
- package/dist/vendor/observe/store/in-memory-control-plane-store.d.ts.map +1 -0
- package/dist/vendor/observe/store/in-memory-control-plane-store.js +447 -0
- package/dist/vendor/observe/store/in-memory-control-plane-store.js.map +1 -0
- package/dist/vendor/observe/store/index.d.ts +4 -0
- package/dist/vendor/observe/store/index.d.ts.map +1 -0
- package/dist/vendor/observe/store/index.js +4 -0
- package/dist/vendor/observe/store/index.js.map +1 -0
- package/dist/vendor/observe/types.d.ts +246 -0
- package/dist/vendor/observe/types.d.ts.map +1 -0
- package/dist/vendor/observe/types.js +152 -0
- package/dist/vendor/observe/types.js.map +1 -0
- package/dist/vendor/observe/worker/in-memory-observe-worker.d.ts +25 -0
- package/dist/vendor/observe/worker/in-memory-observe-worker.d.ts.map +1 -0
- package/dist/vendor/observe/worker/in-memory-observe-worker.js +82 -0
- package/dist/vendor/observe/worker/in-memory-observe-worker.js.map +1 -0
- package/guides/INDUSVX_OBSERVE_FULL_INTEGRATION_REPORT.md +543 -0
- package/guides/OBSERVE_DEEP_VALIDATION.md +252 -0
- package/guides/OBSERVE_LOCAL_TESTING.md +183 -0
- 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.
|