pantheon-opencode 1.6.3-beta.3 → 1.6.3-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +5 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/decision-router.mjs +26 -1
- package/scripts/install/decision-router-config.mjs +45 -0
- package/scripts/install/interactive.mjs +35 -2
- package/scripts/install/plugin.mjs +17 -0
- package/scripts/sync-tui.mjs +11 -0
- package/src/pantheon/j-telemetry-file.ts +96 -0
- package/src/plugin-v2.ts +9 -2
- package/src/plugins/tui/dist/tui-v2.d.ts.map +1 -1
- package/src/plugins/tui/dist/tui-v2.js +457 -4
- package/src/plugins/tui/dist/tui-v2.js.map +1 -1
- package/src/plugins/tui/dist/tui.js +1 -1
- package/src/plugins/tui/package-lock.json +2 -2
- package/src/plugins/tui/package.json +1 -1
- package/src/plugins/tui/src/index-v2.tsx +6 -0
- package/src/plugins/tui/src/whats-new-highlights.ts +263 -0
- package/src/plugins/tui/src/whats-new-open.ts +80 -0
- package/src/plugins/tui/src/whats-new-state.ts +128 -0
- package/src/plugins/tui/src/whats-new.tsx +119 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
10
10
|
<!-- Add new changes here. Running `node scripts/versioning.mjs apply` will
|
|
11
11
|
move this section to a versioned entry and reset the template below. -->
|
|
12
12
|
|
|
13
|
+
## [v1.6.3-beta.4] - 2026-11-04
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **routing** — `decision-router setup-model cloudflare-workers-jev/clef --account-id=<id>` provisions the Cloudflare Workers AI custom provider entry (accountId + `models.clef`, type `"decision"`); the token rides `CLOUDFLARE_API_TOKEN` in the host environment. Docs record the OpenAI Decisions protocol and the what's-new TUI window as deliberately unwired candidates.
|
|
18
|
+
|
|
13
19
|
## [v1.6.3-beta.3] - 2026-11-04
|
|
14
20
|
|
|
15
21
|
### Fixed
|
package/README.md
CHANGED
|
@@ -112,7 +112,11 @@ see [Quick Start](docs/QUICKSTART.md).
|
|
|
112
112
|
preset/source, git state, and a `Context` block (tokens, a percent gauge,
|
|
113
113
|
`$<spent> spent`, and a muted `cache <n>% · <n.n> tok/s` line); the native
|
|
114
114
|
prompt footer keeps its own line, and Pantheon only appends
|
|
115
|
-
`▸<preset> · ✦<n> ativos` while delegations are running.
|
|
115
|
+
`▸<preset> · ✦<n> ativos` while delegations are running. When the Pantheon
|
|
116
|
+
version changes since the last TUI start, a one-time dismissable
|
|
117
|
+
"What's new" dialog lists that version's highlights from the shipped
|
|
118
|
+
changelog — once per version, `esc`/`q` dismisses; see
|
|
119
|
+
[What's new window](docs/reference/whats-new.md). The installer
|
|
116
120
|
selects the `plugins` component by default; in interactive setup you can
|
|
117
121
|
change the component selection. A component-scoped install includes the TUI
|
|
118
122
|
only when `plugins` is selected. The TUI ships no quota panel: for provider
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pantheon",
|
|
3
3
|
"publisher": "ils15",
|
|
4
|
-
"version": "1.6.3-beta.
|
|
4
|
+
"version": "1.6.3-beta.4",
|
|
5
5
|
"displayName": "Pantheon",
|
|
6
6
|
"description": "Conductor-Delegate orchestration platform with 14 specialized agents, 20 skills, and OpenCode support.",
|
|
7
7
|
"agents": "./src/agents",
|
package/pyproject.toml
CHANGED
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.backends._legacy:_Backend"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pantheon"
|
|
7
|
-
version = "1.6.3-beta.
|
|
7
|
+
version = "1.6.3-beta.4"
|
|
8
8
|
description = "Multi-agent orchestration framework"
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
# Python sources under src/mcp/ import fastmcp/pydantic at runtime, but those
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
DECISION_ROUTER_MODELS,
|
|
33
33
|
diffDecisionRouterSurfaces,
|
|
34
34
|
inspectTypesafeHostProvider,
|
|
35
|
+
provisionCloudflareHostProvider,
|
|
35
36
|
provisionTypesafeHostProvider,
|
|
36
37
|
readUserDecisionRouterConfig,
|
|
37
38
|
resolveUserDecisionRouterConfigPath,
|
|
@@ -314,7 +315,9 @@ export async function runDecisionRouterCommand(
|
|
|
314
315
|
)
|
|
315
316
|
}
|
|
316
317
|
const noConsent = flagArgs.includes('--no-consent')
|
|
317
|
-
const capArgs = flagArgs.filter(
|
|
318
|
+
const capArgs = flagArgs.filter(
|
|
319
|
+
(arg) => arg !== '--no-consent' && !arg.startsWith('--account-id='),
|
|
320
|
+
)
|
|
318
321
|
// Exactly the two caps flags with values; parseCaps validates them and
|
|
319
322
|
// leaves `rest` empty because setup-model has no positional caps targets.
|
|
320
323
|
if (capArgs.length !== 4) throw new DecisionRouterUsageError(USAGE)
|
|
@@ -337,6 +340,28 @@ export async function runDecisionRouterCommand(
|
|
|
337
340
|
noConsent ? 'Egress consent NOT recorded (--no-consent).' : 'Egress consent recorded: yes.',
|
|
338
341
|
)
|
|
339
342
|
|
|
343
|
+
// The Cloudflare route needs a custom entry with the accountId (the
|
|
344
|
+
// host's embedded cloudflare-workers-ai module reads the token from
|
|
345
|
+
// CLOUDFLARE_API_TOKEN and the account from the entry options).
|
|
346
|
+
if (provider === 'cloudflare-workers-jev') {
|
|
347
|
+
const accountId = flagArgs.find((arg) => arg.startsWith('--account-id='))
|
|
348
|
+
const provision = provisionCloudflareHostProvider({
|
|
349
|
+
accountId: accountId?.split('=')[1],
|
|
350
|
+
env,
|
|
351
|
+
})
|
|
352
|
+
if (provision.ok) {
|
|
353
|
+
stdout(
|
|
354
|
+
`Cloudflare provider entry merged into ${provision.path} (accountId + models.clef, type "decision"). ` +
|
|
355
|
+
'The token comes from CLOUDFLARE_API_TOKEN (Workers AI-scoped token) in the host environment.',
|
|
356
|
+
)
|
|
357
|
+
} else {
|
|
358
|
+
stdout(
|
|
359
|
+
`⚠ Cloudflare provider entry NOT merged: ${provision.reason}` +
|
|
360
|
+
' — pass --account-id=<32-hex Cloudflare account id>.',
|
|
361
|
+
)
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
340
365
|
// The TypeSafe route needs a host-side provider entry the decisions API
|
|
341
366
|
// can resolve; the Console routes are host-native and need none. The
|
|
342
367
|
// merge is additive and idempotent; a failure is a printed warning (the
|
|
@@ -627,6 +627,51 @@ export function provisionTypesafeHostProvider({ env = process.env } = {}) {
|
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
+
/**
|
|
631
|
+
* Additively merge the Cloudflare Workers AI decision provider entry into the
|
|
632
|
+
* user's host `opencode.json`. The host's embedded `cloudflare-workers-ai`
|
|
633
|
+
* decisions module needs the accountId in the entry options and reads the
|
|
634
|
+
* token from `CLOUDFLARE_API_TOKEN` (a Workers AI-scoped token — not the
|
|
635
|
+
* global Cloudflare key). Existing entries are preserved.
|
|
636
|
+
* @param {{ accountId: string, env?: Record<string, string | undefined> }} options
|
|
637
|
+
* @returns {{ ok: true, path: string } | { ok: false, reason: string }}
|
|
638
|
+
*/
|
|
639
|
+
export function provisionCloudflareHostProvider({ accountId, env = process.env } = {}) {
|
|
640
|
+
const trimmed = String(accountId ?? '').trim()
|
|
641
|
+
if (!/^[a-f0-9]{32}$/i.test(trimmed)) {
|
|
642
|
+
return { ok: false, reason: 'accountId must be the 32-hex Cloudflare account id' }
|
|
643
|
+
}
|
|
644
|
+
const configPath = resolveHostOpenCodeConfigPath(env)
|
|
645
|
+
if (!existsSync(configPath)) return { ok: false, reason: 'opencode.json not found' }
|
|
646
|
+
let data
|
|
647
|
+
try {
|
|
648
|
+
const parsed = JSON.parse(readFileSync(configPath, 'utf8'))
|
|
649
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
650
|
+
return { ok: false, reason: 'opencode.json is not a JSON object' }
|
|
651
|
+
}
|
|
652
|
+
data = parsed
|
|
653
|
+
} catch {
|
|
654
|
+
return { ok: false, reason: 'opencode.json is not plain JSON (comments?)' }
|
|
655
|
+
}
|
|
656
|
+
data.providers ??= {}
|
|
657
|
+
data.providers['cloudflare-workers-ai'] ??= {}
|
|
658
|
+
data.providers['cloudflare-workers-ai'].options ??= {}
|
|
659
|
+
data.providers['cloudflare-workers-ai'].options.accountId ??= trimmed
|
|
660
|
+
data.providers['cloudflare-workers-ai'].models ??= {}
|
|
661
|
+
if (data.providers['cloudflare-workers-ai'].models['clef'] === undefined) {
|
|
662
|
+
data.providers['cloudflare-workers-ai'].models['clef'] = {
|
|
663
|
+
name: 'Clef (Cloudflare Workers AI)',
|
|
664
|
+
type: 'decision',
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
try {
|
|
668
|
+
writeFileSync(configPath, `${JSON.stringify(data, null, 2)}\n`)
|
|
669
|
+
return { ok: true, path: configPath }
|
|
670
|
+
} catch (error) {
|
|
671
|
+
return { ok: false, reason: String(error instanceof Error ? error.message : error) }
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
|
|
630
675
|
/**
|
|
631
676
|
* Read-only check that the TypeSafe provider entry exists in the host config.
|
|
632
677
|
* Never writes; an unreadable config reports present:false with the path for
|
|
@@ -146,12 +146,22 @@ export async function runInteractiveInstall({
|
|
|
146
146
|
{
|
|
147
147
|
label: 'OpenCode Console Jev (stock)',
|
|
148
148
|
value: 'opencode-console-jev/jev-1.13',
|
|
149
|
-
hint:
|
|
149
|
+
hint: consoleJevHint(process.env),
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
label: 'OpenRouter-hosted Jev',
|
|
153
|
+
value: 'openrouter-jev/typesafe/jev-1.13',
|
|
154
|
+
hint: openrouterJevHint(),
|
|
150
155
|
},
|
|
151
156
|
{
|
|
152
157
|
label: 'TypeSafe Jev (direct)',
|
|
153
158
|
value: 'typesafe-jev/jev-1.14.0',
|
|
154
|
-
hint:
|
|
159
|
+
hint: typesafeJevHint(process.env),
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
label: 'Cloudflare Clef',
|
|
163
|
+
value: 'cloudflare-workers-jev/clef',
|
|
164
|
+
hint: cloudflareJevHint(process.env),
|
|
155
165
|
},
|
|
156
166
|
],
|
|
157
167
|
initialValue: 'skip',
|
|
@@ -200,3 +210,26 @@ export async function runInteractiveInstall({
|
|
|
200
210
|
decisionModelActivation,
|
|
201
211
|
}
|
|
202
212
|
}
|
|
213
|
+
|
|
214
|
+
/** Credential-state hints for the Jev wizard routes (set at prompt time). */
|
|
215
|
+
function consoleJevHint(env = process.env) {
|
|
216
|
+
return env.OPENCODE_API_KEY
|
|
217
|
+
? 'Zen credits via OPENCODE_API_KEY — ✓ detected in this shell'
|
|
218
|
+
: 'Zen credits via OPENCODE_API_KEY — export it first (opencode.ai/console)'
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function openrouterJevHint() {
|
|
222
|
+
return 'Uses the host OpenRouter credential (opencode auth list); billed per decision'
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function typesafeJevHint(env = process.env) {
|
|
226
|
+
return env.TYPESAFE_API_KEY
|
|
227
|
+
? '✓ TYPESAFE_API_KEY detected — the installer merges the provider entry'
|
|
228
|
+
: 'export TYPESAFE_API_KEY first; the installer merges the provider entry'
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function cloudflareJevHint(env = process.env) {
|
|
232
|
+
return env.CLOUDFLARE_API_TOKEN
|
|
233
|
+
? '✓ CLOUDFLARE_API_TOKEN detected — pass --account-id at setup-model'
|
|
234
|
+
: 'Workers AI-scoped CLOUDFLARE_API_TOKEN + accountId; setup-model merges the entry'
|
|
235
|
+
}
|
|
@@ -215,6 +215,23 @@ export function copyPluginFiles(
|
|
|
215
215
|
else result.skipped++
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
// CHANGELOG.md — the copy's one-time "What's new" window reads the release
|
|
219
|
+
// highlights for the running version from its own installed root. Best
|
|
220
|
+
// effort: a missing source simply means no window (the TUI fails open).
|
|
221
|
+
// src/plugins/tui → src/plugins → src → the package root, which ships
|
|
222
|
+
// CHANGELOG.md in its npm `files` allow-list.
|
|
223
|
+
const changelogSrc = join(srcDir, '..', '..', '..', 'CHANGELOG.md')
|
|
224
|
+
if (existsSync(changelogSrc)) {
|
|
225
|
+
const changelogStatus = writeIfChanged(
|
|
226
|
+
join(dstDir, 'CHANGELOG.md'),
|
|
227
|
+
readFileSync(changelogSrc, 'utf8'),
|
|
228
|
+
dryRun,
|
|
229
|
+
{ recorder },
|
|
230
|
+
)
|
|
231
|
+
if (changelogStatus === 'created') result.created++
|
|
232
|
+
else result.skipped++
|
|
233
|
+
}
|
|
234
|
+
|
|
218
235
|
return result
|
|
219
236
|
}
|
|
220
237
|
|
package/scripts/sync-tui.mjs
CHANGED
|
@@ -106,6 +106,17 @@ export function copyPluginFiles(srcDir, dstDir, version) {
|
|
|
106
106
|
else result.skipped++
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
// CHANGELOG.md — the copy's one-time "What's new" window reads the release
|
|
110
|
+
// highlights for the running version from its own installed root. Best
|
|
111
|
+
// effort: a missing source simply means no window (the TUI fails open).
|
|
112
|
+
// src/plugins/tui → src/plugins → src → package root.
|
|
113
|
+
const changelogSrc = join(srcDir, '..', '..', '..', 'CHANGELOG.md')
|
|
114
|
+
if (existsSync(changelogSrc)) {
|
|
115
|
+
if (writeIfChanged(join(dstDir, 'CHANGELOG.md'), readFileSync(changelogSrc, 'utf8'))) {
|
|
116
|
+
result.created++
|
|
117
|
+
} else result.skipped++
|
|
118
|
+
}
|
|
119
|
+
|
|
109
120
|
const tuiEntry = join(srcDir, version === 'v2' ? 'tui-v2.ts' : 'tui.ts')
|
|
110
121
|
if (existsSync(tuiEntry)) {
|
|
111
122
|
if (writeIfChanged(join(dstDir, 'tui.ts'), readFileSync(tuiEntry, 'utf8'))) result.created++
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* j-telemetry-file.ts — field-baseline mirror for the J-series shadow
|
|
3
|
+
* records (J1 risk gate, J3 escalation, J4 review).
|
|
4
|
+
*
|
|
5
|
+
* The in-memory sink (`createTelemetrySink`) is deliberately I/O-free and
|
|
6
|
+
* "the plugin never reads back" — which made the shadow records impossible
|
|
7
|
+
* to measure in the field, and the J1/J3 activation gate requires a measured
|
|
8
|
+
* baseline. This module adds the measurement channel: an opt-in JSONL mirror
|
|
9
|
+
* (`.pantheon/logs/j-telemetry.jsonl`) written ONLY when the J-series flags
|
|
10
|
+
* are on, carrying ONLY the already-sanitized record fields (point, mode,
|
|
11
|
+
* effect, reason tokens — the same bounded vocabulary the in-memory records
|
|
12
|
+
* carry; no user content exists on this path by construction).
|
|
13
|
+
*
|
|
14
|
+
* Fire-and-forget like every plugin log: a write failure is swallowed and
|
|
15
|
+
* never reaches the hook. The file is size-capped (rotate to `.1`, drop the
|
|
16
|
+
* oldest) so a long session cannot grow it unbounded.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { appendFile, mkdir, rename, stat } from 'node:fs/promises'
|
|
20
|
+
import { dirname, join } from 'node:path'
|
|
21
|
+
|
|
22
|
+
const MAX_FILE_BYTES = 1_048_576
|
|
23
|
+
|
|
24
|
+
/** Default mirror target: the established Pantheon logs directory. */
|
|
25
|
+
export function defaultMirrorPath(cwd: string = process.cwd()): string {
|
|
26
|
+
return join(cwd, '.pantheon', 'logs', 'j-telemetry.jsonl')
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** The record fields allowed on the wire. Everything else is dropped. */
|
|
30
|
+
const ALLOWED_FIELDS = ['point', 'mode', 'effect', 'decision', 'reason'] as const
|
|
31
|
+
|
|
32
|
+
/** Extract the bounded projection a mirror line may carry. */
|
|
33
|
+
export function mirrorProjection(record: unknown): Record<string, unknown> | null {
|
|
34
|
+
if (record === null || typeof record !== 'object' || Array.isArray(record)) return null
|
|
35
|
+
const source = record as Record<string, unknown>
|
|
36
|
+
const projected: Record<string, unknown> = { ts: new Date().toISOString() }
|
|
37
|
+
for (const field of ALLOWED_FIELDS) {
|
|
38
|
+
const value = source[field]
|
|
39
|
+
if (value === undefined) continue
|
|
40
|
+
if (typeof value !== 'string') return null
|
|
41
|
+
if (value.length > 200) return null
|
|
42
|
+
projected[field] = value
|
|
43
|
+
}
|
|
44
|
+
return projected
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface JTelemetryMirror {
|
|
48
|
+
/**
|
|
49
|
+
* Append one sanitized record line; best-effort, never throws. Fire-and-
|
|
50
|
+
* forget at call sites (the promise may be ignored); it is returned so a
|
|
51
|
+
* test can await the write.
|
|
52
|
+
*/
|
|
53
|
+
record(record: unknown): Promise<void>
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Create the opt-in JSONL mirror. Returns null when `enabled` is false so
|
|
58
|
+
* callers keep the zero-overhead path branch-free.
|
|
59
|
+
* @param {{ enabled: boolean, path?: string }} options
|
|
60
|
+
*/
|
|
61
|
+
export function createJTelemetryMirror(options: {
|
|
62
|
+
enabled: boolean
|
|
63
|
+
path?: string
|
|
64
|
+
}): JTelemetryMirror | null {
|
|
65
|
+
if (!options.enabled) return null
|
|
66
|
+
const path = options.path ?? defaultMirrorPath()
|
|
67
|
+
let rotating = false
|
|
68
|
+
return {
|
|
69
|
+
record(record: unknown): Promise<void> {
|
|
70
|
+
try {
|
|
71
|
+
const projected = mirrorProjection(record)
|
|
72
|
+
if (projected === null) return Promise.resolve()
|
|
73
|
+
const line = `${JSON.stringify(projected)}\n`
|
|
74
|
+
return (async () => {
|
|
75
|
+
try {
|
|
76
|
+
if (!rotating) {
|
|
77
|
+
const current = await stat(path).catch(() => null)
|
|
78
|
+
if (current !== null && current.size > MAX_FILE_BYTES) {
|
|
79
|
+
rotating = true
|
|
80
|
+
await rename(path, `${path}.1`).catch(() => {})
|
|
81
|
+
rotating = false
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
await mkdir(dirname(path), { recursive: true })
|
|
85
|
+
await appendFile(path, line, 'utf8')
|
|
86
|
+
} catch {
|
|
87
|
+
// Best-effort mirror — never break the plugin over telemetry.
|
|
88
|
+
}
|
|
89
|
+
})()
|
|
90
|
+
} catch {
|
|
91
|
+
// Swallow: projection failures are data-shaped, never fatal.
|
|
92
|
+
return Promise.resolve()
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
}
|
|
96
|
+
}
|
package/src/plugin-v2.ts
CHANGED
|
@@ -115,6 +115,7 @@ import {
|
|
|
115
115
|
} from './pantheon/delegation-enforce.ts'
|
|
116
116
|
import { GOAL_LOOP_DEFAULTS, GoalStore } from './pantheon/goal-loop.ts'
|
|
117
117
|
import { createGuardPathResolver } from './pantheon/guard-path.ts'
|
|
118
|
+
import { createJTelemetryMirror } from './pantheon/j-telemetry-file.ts'
|
|
118
119
|
import type { V2JevDecisionRuntime } from './pantheon/jev-decision-tool.ts'
|
|
119
120
|
import { specialistCallerAllowlist } from './pantheon/jev-decision-tool.ts'
|
|
120
121
|
import {
|
|
@@ -705,6 +706,7 @@ function buildV2JevRuntime(host: ReturnType<typeof hostDomains>): V2JevDecisionR
|
|
|
705
706
|
// it; the records are advisory and never read back by the tool path.
|
|
706
707
|
const j4Sink = createTelemetrySink()
|
|
707
708
|
j4TelemetrySink = j4Sink
|
|
709
|
+
const j4Mirror = createJTelemetryMirror({ enabled: true })
|
|
708
710
|
return {
|
|
709
711
|
specialistCallers,
|
|
710
712
|
// Every host method is invoked with its owning domain as receiver: the
|
|
@@ -718,7 +720,9 @@ function buildV2JevRuntime(host: ReturnType<typeof hostDomains>): V2JevDecisionR
|
|
|
718
720
|
listSkills: async () => skillList?.call(skillDomain),
|
|
719
721
|
...(permissionAssert === undefined ? {} : { permissionAssert }),
|
|
720
722
|
shadowSink: (record) => {
|
|
721
|
-
|
|
723
|
+
const shadowRecord = { ...record, mode: 'shadow' }
|
|
724
|
+
j4Sink.emit(shadowRecord)
|
|
725
|
+
j4Mirror?.record(shadowRecord)
|
|
722
726
|
},
|
|
723
727
|
}
|
|
724
728
|
}
|
|
@@ -2009,10 +2013,13 @@ async function registerV2ToolHooks(
|
|
|
2009
2013
|
if (jevRuntime !== undefined && j3EscalationEnabledFromEnv()) {
|
|
2010
2014
|
const j3Sink = createTelemetrySink()
|
|
2011
2015
|
j3TelemetrySink = j3Sink
|
|
2016
|
+
const j3Mirror = createJTelemetryMirror({ enabled: true })
|
|
2012
2017
|
j3Observer = createJ3EscalationObserver({
|
|
2013
2018
|
runtime: jevRuntime,
|
|
2014
2019
|
sink: (record) => {
|
|
2015
|
-
|
|
2020
|
+
const shadowRecord = { ...record, mode: 'shadow' }
|
|
2021
|
+
j3Sink.emit(shadowRecord)
|
|
2022
|
+
j3Mirror?.record(shadowRecord)
|
|
2016
2023
|
},
|
|
2017
2024
|
})
|
|
2018
2025
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui-v2.d.ts","names":[],"sources":["../src/context-gauge.ts","../src/model-usage-limits.ts","../src/sidebar-width.ts","../src/index-v2.tsx"],"mappings":";;;;KAEY;qBAEC;qBACA;qBACA;wBAMG,iBAAiB,kBAAkB;wBAOnC,iBAAiB;wBAMjB,oBAAoB;wBAQpB,iBAAiB,iBAAiB;wBAOlC,WACd,oCACA;EACG;EAAgB;;wBAWL,YAAY;;;;qBCrDf;qBACA;qBACA;;;;;;;;wBCyHG,UAAU;;;;
|
|
1
|
+
{"version":3,"file":"tui-v2.d.ts","names":[],"sources":["../src/context-gauge.ts","../src/model-usage-limits.ts","../src/sidebar-width.ts","../src/index-v2.tsx"],"mappings":";;;;KAEY;qBAEC;qBACA;qBACA;wBAMG,iBAAiB,kBAAkB;wBAOnC,iBAAiB;wBAMjB,oBAAoB;wBAQpB,iBAAiB,iBAAiB;wBAOlC,WACd,oCACA;EACG;EAAgB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