@xingular/harness 1.3.1-unstable.4 → 1.3.1-unstable.8
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 +74 -0
- package/README.md +14 -9
- package/dist/cli.js +1734 -796
- package/dist/sdk/accounts/choices.d.ts +18 -0
- package/dist/sdk/accounts/choices.js +27 -0
- package/dist/sdk/cli.js +4 -0
- package/dist/sdk/commands/extensionOwners.d.ts +4 -0
- package/dist/sdk/commands/extensionOwners.js +17 -0
- package/dist/sdk/commands/list.js +15 -2
- package/dist/sdk/commands/promptLoader.d.ts +5 -0
- package/dist/sdk/commands/promptLoader.js +76 -0
- package/dist/sdk/commands/promptRoutes.d.ts +13 -0
- package/dist/sdk/commands/promptRoutes.js +46 -0
- package/dist/sdk/commands/registry.d.ts +14 -0
- package/dist/sdk/commands/registry.js +2 -0
- package/dist/sdk/commands/runtimeRouter.d.ts +4 -0
- package/dist/sdk/commands/runtimeRouter.js +48 -0
- package/dist/sdk/computer/boundary.d.ts +40 -0
- package/dist/sdk/computer/boundary.js +79 -0
- package/dist/sdk/computer/contracts.d.ts +127 -0
- package/dist/sdk/computer/contracts.js +13 -0
- package/dist/sdk/computer/control.d.ts +34 -0
- package/dist/sdk/computer/control.js +112 -0
- package/dist/sdk/computer/terminalCapture.d.ts +26 -0
- package/dist/sdk/computer/terminalCapture.js +64 -0
- package/dist/sdk/computer/volatileImages.d.ts +9 -0
- package/dist/sdk/computer/volatileImages.js +50 -0
- package/dist/sdk/context/runDetails.d.ts +16 -0
- package/dist/sdk/context/runDetails.js +22 -0
- package/dist/sdk/doctor/checks.js +3 -0
- package/dist/sdk/doctor/probe.js +8 -6
- package/dist/sdk/harness.d.ts +8 -0
- package/dist/sdk/harness.js +7 -4
- package/dist/sdk/history/trajectory.js +2 -0
- package/dist/sdk/hub/hub.js +1 -1
- package/dist/sdk/hub/schema.d.ts +2 -2
- package/dist/sdk/plugins/manifest.d.ts +2 -0
- package/dist/sdk/plugins/manifest.js +1 -0
- package/dist/sdk/prompt/compile.d.ts +3 -1
- package/dist/sdk/prompt/compile.js +10 -7
- package/dist/sdk/refine/host.d.ts +9 -1
- package/dist/sdk/refine/host.js +29 -0
- package/dist/sdk/refine/prompts.d.ts +15 -0
- package/dist/sdk/refine/prompts.js +44 -0
- package/dist/sdk/refine/recursion.js +4 -4
- package/dist/sdk/refine/runner.d.ts +2 -0
- package/dist/sdk/refine/runner.js +2 -1
- package/dist/sdk/refine/serverMethods.js +4 -1
- package/dist/sdk/refine/service.d.ts +31 -0
- package/dist/sdk/refine/service.js +119 -4
- package/dist/sdk/refine/trajectory.js +7 -2
- package/dist/sdk/refine/types.d.ts +16 -0
- package/dist/sdk/remote/webClient.js +7 -3
- package/dist/sdk/server/methods.js +31 -1
- package/dist/sdk/sessions/compactionCheckpoint.d.ts +6 -1
- package/dist/sdk/sessions/compactionCheckpoint.js +34 -35
- package/dist/sdk/sessions/contracts.d.ts +141 -2
- package/dist/sdk/sessions/contracts.js +115 -3
- package/dist/sdk/sessions/planMode.d.ts +1 -1
- package/dist/sdk/sessions/planMode.js +7 -4
- package/dist/sdk/sessions/registry.d.ts +6 -2
- package/dist/sdk/sessions/registry.js +16 -13
- package/dist/sdk/sessions/runStore.d.ts +3 -1
- package/dist/sdk/sessions/runStore.js +26 -8
- package/dist/sdk/sessions/runner.d.ts +5 -5
- package/dist/sdk/sessions/runner.js +78 -15
- package/dist/sdk/sessions/sessions.js +35 -21
- package/dist/sdk/sessions/workSlice.d.ts +2 -0
- package/dist/sdk/sessions/workSlice.js +4 -3
- package/dist/sdk/terminal/client.d.ts +3 -0
- package/dist/sdk/terminal/client.js +13 -0
- package/dist/sdk/terminal/controller.d.ts +2 -0
- package/dist/sdk/terminal/controller.js +12 -6
- package/dist/sdk/terminal/opentui/theme.d.ts +2 -0
- package/dist/sdk/terminal/opentui/theme.js +4 -0
- package/dist/sdk/terminal/piExtension.js +73 -13
- package/dist/sdk/terminal/standalone.d.ts +6 -1
- package/dist/sdk/terminal/standalone.js +30 -3
- package/dist/sdk/terminal/terminals.d.ts +11 -1
- package/dist/sdk/terminal/terminals.js +58 -5
- package/dist/sdk/terminal/trajectory.js +2 -2
- package/dist/sdk/terminal/tui/commandPages.d.ts +1 -1
- package/dist/sdk/terminal/tui/commandPages.js +4 -2
- package/dist/sdk/terminal/tui/commands.js +29 -65
- package/dist/sdk/terminal/tui/modeChoices.d.ts +18 -0
- package/dist/sdk/terminal/tui/modeChoices.js +26 -1
- package/dist/sdk/terminal/tui/pages/contextPage.d.ts +30 -1
- package/dist/sdk/terminal/tui/pages/contextPage.js +109 -8
- package/dist/sdk/terminal/tui/pages/textPage.d.ts +17 -0
- package/dist/sdk/terminal/tui/pages/textPage.js +52 -0
- package/dist/sdk/terminal/tui/pages/trajectoryPage.d.ts +1 -0
- package/dist/sdk/terminal/tui/pages/trajectoryPage.js +12 -3
- package/dist/sdk/terminal/tui/runtime.js +60 -3
- package/dist/sdk/terminal/tui/sideQuestion.d.ts +3 -0
- package/dist/sdk/terminal/tui/sideQuestion.js +7 -1
- package/dist/sdk/terminal/tui/status.d.ts +0 -6
- package/dist/sdk/terminal/tui/status.js +1 -15
- package/dist/sdk/terminal/tui/variantCommands.d.ts +32 -0
- package/dist/sdk/terminal/tui/variantCommands.js +359 -0
- package/dist/sdk/terminal/variantControl.d.ts +24 -0
- package/dist/sdk/terminal/variantControl.js +145 -0
- package/dist/sdk/tools/definitions.js +1 -1
- package/dist/sdk/tools/dispatch.d.ts +1 -1
- package/dist/sdk/tools/dispatch.js +17 -3
- package/dist/sdk/variant/store.d.ts +33 -1
- package/dist/sdk/variant/store.js +108 -3
- package/dist/sdk/worktrees/git.d.ts +2 -0
- package/dist/sdk/worktrees/git.js +8 -0
- package/dist/sdk/worktrees/snapshot.d.ts +16 -0
- package/dist/sdk/worktrees/snapshot.js +83 -0
- package/dist/sdk/world/actions.js +1 -1
- package/dist/terminal-opentui.js +1643 -451
- package/dist/terminal-pi.js +179 -56
- package/docs/architecture/02-sessions-and-runs.md +33 -13
- package/docs/architecture/03-variants.md +24 -3
- package/docs/architecture/04-prompt.md +22 -11
- package/docs/architecture/05-refinement.md +32 -5
- package/docs/architecture/06-plugins-and-capabilities.md +13 -2
- package/docs/architecture/07-tools-and-gate.md +14 -0
- package/docs/architecture/08-memory-and-history.md +7 -3
- package/docs/architecture/09-accounts-and-connectors.md +13 -3
- package/docs/architecture/10-server-protocol.md +26 -3
- package/docs/architecture/11-terminal.md +50 -19
- package/docs/architecture/12-storage.md +12 -4
- package/docs/architecture/13-world-tools.md +19 -0
- package/docs/architecture/14-surfaces-and-parity.md +3 -3
- package/docs/architecture/README.md +2 -0
- package/docs/architecture/proposals/PROP-0049-context-attribution.md +7 -1
- package/docs/architecture/proposals/PROP-0050-run-stop-codes-and-refusals.md +30 -0
- package/docs/architecture/proposals/PROP-0051-unfinished-run-handoff.md +110 -0
- package/docs/architecture/proposals/PROP-0052-terminal-refine-and-variant-switch.md +111 -0
- package/docs/architecture/proposals/README.md +2 -0
- package/docs/decisions/ADR-0032-compaction-run-checkpoints.md +3 -1
- package/docs/decisions/ADR-0059-run-diagnostic-evidence.md +35 -0
- package/docs/decisions/ADR-0060-approvals-are-controls.md +40 -0
- package/docs/decisions/ADR-0061-strict-plugin-command-namespaces.md +41 -0
- package/docs/decisions/ADR-0062-shared-account-state.md +67 -0
- package/docs/decisions/ADR-0063-unfinished-work-handoffs.md +32 -0
- package/docs/decisions/ADR-0064-account-model-fallback-on-resume.md +79 -0
- package/docs/decisions/ADR-0065-variant-switch-at-turn-boundaries.md +31 -0
- package/docs/decisions/ADR-0066-guided-refinement-from-turn-snapshots.md +37 -0
- package/docs/decisions/ADR-0067-cache-stable-compaction-checkpoint.md +54 -0
- package/docs/doctor.md +2 -0
- package/docs/parity.md +18 -7
- package/docs/releases/1.3.1-unstable.5.md +53 -0
- package/docs/releases/1.3.1-unstable.6.md +31 -0
- package/docs/releases/1.3.1-unstable.7.md +17 -0
- package/docs/releases/1.3.1-unstable.8.md +19 -0
- package/docs/terminal-tui.md +48 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,80 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Reword the final-reply guidance so the outcome leads and structure follows what the answer needs. The
|
|
6
|
+
reporting guidance is part of every request's stable prefix, so this changes the cached prefix.
|
|
7
|
+
- Keep the provider cache working after a compaction (ADR-0067). The compaction checkpoint now arms only
|
|
8
|
+
for a compaction during the running reply, is built once, and sits right after the summary instead
|
|
9
|
+
of being rebuilt at the end of every request. A request after a compaction is again the previous
|
|
10
|
+
request plus new items, so Codex WebSocket continuation and prefix caching apply. Before, every later
|
|
11
|
+
turn of a compacted session resent its whole context: one measured session fell from 94–99% to
|
|
12
|
+
18–24% cache hits after its first compaction.
|
|
13
|
+
- Flag a low prompt-cache hit rate in the terminal's composer status bar. `R<percentage>%` now covers the
|
|
14
|
+
last 10 model responses instead of the whole session (`recentCacheUsage`, `CACHE_HIT_WINDOW`), and
|
|
15
|
+
gets a yellow `⚠` below 70 percent and a red one below 40 percent. Each drop to a worse level posts
|
|
16
|
+
one transcript notice. A window of one response, or one with no cache reads or writes, is not judged
|
|
17
|
+
(`cacheHitLevel`, `CACHE_HIT_WARNING_PERCENT`, `CACHE_HIT_CRITICAL_PERCENT`).
|
|
18
|
+
|
|
19
|
+
- Refine a variant from the terminal and keep checkpoints of it (PROP-0052, ADR-0065, ADR-0066).
|
|
20
|
+
`/refine [what to look at]` replays the latest request typed in this chat from a snapshot of the
|
|
21
|
+
folder as that turn found it, in throwaway shared clones, after a confirmation that shows the run
|
|
22
|
+
count and models; it runs in the background, and `/refine review` shows every candidate's changes
|
|
23
|
+
and output and adopts any of them. Guidance reaches improvers and composers only, never the blind
|
|
24
|
+
selector. Task runs default to this chat's model; `--model` sets the improver's, and an adopted
|
|
25
|
+
version records the model it was tuned on. `/variant` switches this conversation to another
|
|
26
|
+
version at the next turn (resuming the same conversation), restores, compares, tags, and takes
|
|
27
|
+
single components back from an earlier version. New methods: `refine.fromRun`,
|
|
28
|
+
`refine.candidateDiff`, `refine.candidateOutput`, `variants.tag|untag|tags|resolve|revert`. Run
|
|
29
|
+
records gain `workspaceSnapshot`, version records `tunedFor`, and scopes `tags.json`.
|
|
30
|
+
|
|
31
|
+
- Start a conversation this account cannot use on the account's newest selection. A resumed
|
|
32
|
+
conversation keeps its model while the account offers it and holds its provider's credentials;
|
|
33
|
+
otherwise the terminal starts it on the mode's choice, then normal's, then the newest selection in
|
|
34
|
+
any mode, with that selection's effort, writes the model change into the conversation, and says in
|
|
35
|
+
one notice which model it replaced. A fallback is never saved as the person's choice, and with no
|
|
36
|
+
usable saved model Pi's own fallback message stands (ADR-0064).
|
|
37
|
+
|
|
38
|
+
- Make unfinished-work handoffs actionable: the stable reporting guidance now names the person’s
|
|
39
|
+
concrete decision or the next action and its owner for each material blocker, without imposing a
|
|
40
|
+
fixed heading (PROP-0051, ADR-0063).
|
|
41
|
+
|
|
42
|
+
- Share the account sign-in between `npm run dev` and the installed `xagent`. A standalone launch
|
|
43
|
+
can now take its account identity from another state directory with `--account-state <dir>`
|
|
44
|
+
(`HarnessOptions.accountsDir` plus that state's `secrets.json`), and `npm run dev` passes the
|
|
45
|
+
installed one, so one provider sign-in serves both while development keeps its own data,
|
|
46
|
+
approvals and plugin trust (ADR-0062).
|
|
47
|
+
|
|
48
|
+
- Require owner-prefixed plugin commands on terminal and structured sessions. Plugin-owned prompt
|
|
49
|
+
templates join extension commands under `/<owner-prefix>:<name>`, with no bare plugin aliases.
|
|
50
|
+
A package can select a root template with `harness.defaultPrompt`; owner and route collisions fail
|
|
51
|
+
closed. Standalone templates, `/skill:<name>` and core commands remain (ADR-0061).
|
|
52
|
+
|
|
53
|
+
- Make an approval a control, never a typed permission. The compiled guidance now tells the model to
|
|
54
|
+
call the tool, the Harness pauses that exact call (`waiting_for_approval`), and Allow resumes it in
|
|
55
|
+
the same turn; a denial returns a tool result on the still-running turn and says so, instead of
|
|
56
|
+
inviting another prose request. Nothing outside the workspace changes before the click, and Full
|
|
57
|
+
Permission remains the standing bypass (INV-GATE-9, ADR-0060).
|
|
58
|
+
|
|
59
|
+
- Record structured tool refusals and run stop codes, and expose them in trajectory search and the
|
|
60
|
+
terminal trajectory page. Compaction events include available token measurements; older run
|
|
61
|
+
records remain readable without these fields.
|
|
62
|
+
|
|
63
|
+
- Keep a refused question answer in the terminal. A choice, note or typed answer that the Harness
|
|
64
|
+
would reject now stays in the dock with an inline reason, instead of closing the form and losing the
|
|
65
|
+
draft; the reason names the question and the field (selection, typed answer or note), and the answer
|
|
66
|
+
is checked against the server rule before it is sent. The terminal was previously reopening an empty
|
|
67
|
+
question after any rejection, so a second Continue skipped everything.
|
|
68
|
+
|
|
69
|
+
- Scroll a `/btw` answer taller than its block. PageUp/PageDown now reach the side-question dock
|
|
70
|
+
while it is open, and the mouse wheel over the block browses it too; before this the transcript
|
|
71
|
+
consumed those keys, so the block's `PgUp/PgDn/wheel browse` hint did nothing. When the answer fits, the
|
|
72
|
+
keys scroll the transcript as before.
|
|
73
|
+
|
|
74
|
+
- Drop the context-use reading from the terminal's composer status line, so it no longer ends the
|
|
75
|
+
token group with a figure such as `6.6%/?`. The line keeps the project and branch, account, model
|
|
76
|
+
and effort, and input/cache hit rate/output tokens; the share of the window stays on the `/context`
|
|
77
|
+
page. Both the OpenTUI status bar and the exported `tui/status` band lose the reading.
|
|
78
|
+
|
|
5
79
|
- Render the `/btw` side answer as Markdown instead of plain text. Headings, emphasis, lists,
|
|
6
80
|
quotes, links, tables and fenced code use the theme's markdown colours, and a streaming answer
|
|
7
81
|
re-renders in place. Terminal control sequences in model output are still removed.
|
package/README.md
CHANGED
|
@@ -294,11 +294,13 @@ npm run dev
|
|
|
294
294
|
|
|
295
295
|
`npm run dev` rebuilds the CLI and opens the Harness terminal in the current working directory.
|
|
296
296
|
It uses separate development directories by default: `~/.xingular-harness-dev/data` and
|
|
297
|
-
`~/.xingular-harness-dev/state
|
|
298
|
-
|
|
299
|
-
`/quit`, Ctrl+C or Ctrl+D to
|
|
300
|
-
|
|
301
|
-
|
|
297
|
+
`~/.xingular-harness-dev/state`, so development harness data, approvals, plugin trust and
|
|
298
|
+
connections stay separate from the installed command. It signs in as the installed command's
|
|
299
|
+
accounts, though: one provider sign-in serves both launches. Press `/quit`, Ctrl+C or Ctrl+D to
|
|
300
|
+
close it. Override either directory with `--data <dir>` or `--state <dir>`; choose the accounts a
|
|
301
|
+
launch signs in as with `--account-state <dir>`, for example
|
|
302
|
+
`npm run dev -- --account-state ~/.xingular-harness-dev/state` for a fully separate identity. An
|
|
303
|
+
omitted option keeps its development specific default.
|
|
302
304
|
|
|
303
305
|
The OpenTUI/Solid frontend is the only terminal. Install Bun 1.3.14 or newer and run
|
|
304
306
|
`npm run build:tui` (or `npm run build`); without Bun the build fails rather than producing a
|
|
@@ -404,10 +406,13 @@ still be removed; that session then asks for another account the next time it st
|
|
|
404
406
|
The installed standalone command defaults to `~/.xingular-harness/data` and
|
|
405
407
|
`~/.xingular-harness/state`; `npm run dev` instead defaults to the separate
|
|
406
408
|
`~/.xingular-harness-dev/data` and `~/.xingular-harness-dev/state`. Override either with
|
|
407
|
-
`--data <dir>` and `--state <dir>`.
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
409
|
+
`--data <dir>` and `--state <dir>`. A launch signs in as the accounts kept in the state directory
|
|
410
|
+
it uses; `--account-state <dir>` takes them from another state directory instead (its `accounts`
|
|
411
|
+
folder and its `secrets.json`), which is how `npm run dev` reaches the installed command's sign-in.
|
|
412
|
+
Session history is stored per working directory and can be reopened with the terminal's `/resume`
|
|
413
|
+
command. The explicit `terminal` command is an alias for the default launch. Use `--help` to see
|
|
414
|
+
the commands; `serve` remains the host-facing RPC service for integrations such as Xingular
|
|
415
|
+
Agent/App.
|
|
411
416
|
|
|
412
417
|
## Storage
|
|
413
418
|
|