@xingular/harness 1.3.1-unstable.1 → 1.3.1-unstable.3
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 +50 -1
- package/README.md +1 -1
- package/dist/cli.js +1217 -701
- package/dist/sdk/computer/screenshot.d.ts +32 -0
- package/dist/sdk/computer/screenshot.js +35 -0
- package/dist/sdk/context/attribution.d.ts +18 -0
- package/dist/sdk/context/attribution.js +295 -0
- package/dist/sdk/context/types.d.ts +94 -0
- package/dist/sdk/context/types.js +10 -0
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +2 -1
- package/dist/sdk/plugins/builtin.js +1 -0
- package/dist/sdk/prompt/compile.d.ts +42 -2
- package/dist/sdk/prompt/compile.js +87 -15
- package/dist/sdk/server/methods.js +3 -0
- package/dist/sdk/sessions/contracts.d.ts +4 -0
- package/dist/sdk/sessions/contracts.js +2 -0
- package/dist/sdk/sessions/runner.d.ts +10 -0
- package/dist/sdk/sessions/runner.js +17 -0
- package/dist/sdk/sessions/subagentService.d.ts +11 -1
- package/dist/sdk/sessions/subagentService.js +120 -38
- package/dist/sdk/sessions/subagents.d.ts +31 -0
- package/dist/sdk/sessions/subagents.js +45 -0
- package/dist/sdk/terminal/client.d.ts +1 -1
- package/dist/sdk/terminal/client.js +13 -6
- package/dist/sdk/terminal/control.d.ts +1 -1
- package/dist/sdk/terminal/control.js +2 -2
- package/dist/sdk/terminal/controller.d.ts +9 -0
- package/dist/sdk/terminal/controller.js +48 -11
- package/dist/sdk/terminal/piExtension.js +35 -1
- package/dist/sdk/terminal/terminals.d.ts +2 -0
- package/dist/sdk/terminal/terminals.js +11 -0
- package/dist/sdk/terminal/tui/commands.d.ts +1 -2
- package/dist/sdk/terminal/tui/commands.js +1 -4
- package/dist/sdk/terminal/tui/dialogs.d.ts +3 -2
- package/dist/sdk/terminal/tui/dialogs.js +4 -3
- package/dist/sdk/terminal/tui/keybindings.js +1 -1
- package/dist/sdk/terminal/tui/modeChoices.d.ts +3 -2
- package/dist/sdk/terminal/tui/modeChoices.js +4 -4
- package/dist/sdk/terminal/tui/mouseReport.d.ts +30 -0
- package/dist/sdk/terminal/tui/mouseReport.js +80 -0
- package/dist/sdk/terminal/tui/pages/annotatePage.js +3 -2
- package/dist/sdk/terminal/tui/pages/browserPage.d.ts +1 -1
- package/dist/sdk/terminal/tui/pages/contextPage.d.ts +54 -0
- package/dist/sdk/terminal/tui/pages/contextPage.js +393 -0
- package/dist/sdk/terminal/tui/pages/trajectoryPage.js +5 -4
- package/dist/sdk/terminal/tui/runtime.js +8 -2
- package/dist/sdk/terminal/tui/search.js +3 -2
- package/dist/sdk/terminal/tui/skillInvocation.d.ts +21 -2
- package/dist/sdk/terminal/tui/skillInvocation.js +31 -11
- package/dist/sdk/tools/defaultSkills.d.ts +19 -0
- package/dist/sdk/tools/defaultSkills.js +27 -1
- package/dist/sdk/tools/dispatch.js +8 -9
- package/dist/sdk/tools/spawnSubagent.d.ts +1 -1
- package/dist/sdk/tools/spawnSubagent.js +4 -2
- package/dist/terminal-opentui.js +1025 -624
- package/dist/terminal-pi.js +142 -28
- package/docs/README.md +1 -0
- package/docs/architecture/02-sessions-and-runs.md +9 -0
- package/docs/architecture/04-prompt.md +13 -4
- package/docs/architecture/07-tools-and-gate.md +1 -1
- package/docs/architecture/11-terminal.md +18 -1
- package/docs/architecture/13-world-tools.md +17 -3
- 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 +382 -0
- package/docs/architecture/proposals/README.md +1 -0
- package/docs/decisions/ADR-0048-required-skills-from-a-message.md +42 -0
- package/docs/decisions/ADR-0050-approved-window-screenshots.md +19 -0
- package/docs/decisions/ADR-0051-terminal-decision-wait.md +10 -0
- package/docs/decisions/ADR-0052-per-profile-subagent-budgets.md +25 -0
- package/docs/parity.md +6 -6
- package/docs/releases/1.3.1-unstable.2.md +11 -0
- package/docs/releases/1.3.1-unstable.3.md +54 -0
- package/docs/terminal-tui.md +47 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Make a skill named in a message required for that request. `$name` is a skill invocation at any
|
|
6
|
+
word start, not only as the first token: `Launch.requiredSkills` carries it and the compiler
|
|
7
|
+
renders a built-in dynamic `required-skills` section (order 52, 12,000 characters) from the pinned
|
|
8
|
+
variant's `SKILL.md`, naming an unavailable skill honestly and falling back to the shipped
|
|
9
|
+
`plugin-authoring` skill. It changes no tool or permission, and it belongs to the request, so an
|
|
10
|
+
identical one is delivered again; structured sessions deliver it through `sessionLaunch` and the
|
|
11
|
+
terminal appends the same text as a hidden `xingular-required-skills` message
|
|
12
|
+
(`requiredSkillsText`). The terminal no longer rewrites a leading `$name` to `/skill:name`, and its
|
|
13
|
+
`$` palette opens at the caret and inserts there, keeping the rest of the draft (ADR-0048).
|
|
14
|
+
|
|
15
|
+
- Bound delegation per run and per profile. `spawn_subagent` and `wait_subagents` still exist, but a
|
|
16
|
+
run now starts at most four distinct child conversations: two `worker`, three `explorer`, one of
|
|
17
|
+
any other named profile and one with no profile. The parent's `subagents` option overrides them
|
|
18
|
+
(`maxChildren`, `maxByProfile`, `maxOther`, `maxUnprofiled`, clamped to 0–50), so a host and the
|
|
19
|
+
terminal receive the same defaults; `Subagents.spawn` refuses a child past a limit with an
|
|
20
|
+
`invalid_request` that tells the model to do the work itself, and starts no run. The count covers
|
|
21
|
+
the runs the parent was continued from, continuing a stopped child costs no slot, and a concurrent
|
|
22
|
+
spawn reserves its slot before it launches (ADR-0052).
|
|
23
|
+
|
|
24
|
+
- Record where a request's characters went. `renderSized` returns the prompt and each section's
|
|
25
|
+
size, `Delivery.sizes` stores them on the recorded pack, and `Source.chars` attributes a variant's
|
|
26
|
+
tool guidance inside the tools section, so `context.attribution` (`terminal.context` in the
|
|
27
|
+
terminal) can return one row per contributor with its estimated tokens and share of the window,
|
|
28
|
+
reconciled to the provider's measured total, plus one row's text. `context.snapshot` also records
|
|
29
|
+
the compaction headroom the run was held to (`compaction: { enabled, reserveTokens }`) from Pi's
|
|
30
|
+
own settings.
|
|
31
|
+
|
|
32
|
+
- Define an opt-in approved-window screenshot contract. `computer_screenshot` in
|
|
33
|
+
`src/computer/screenshot.ts` takes a host backend that captures exactly one currently approved
|
|
34
|
+
window, excludes the desktop, other windows and overlapping overlays, and refuses with
|
|
35
|
+
`COMPUTER_SCREENSHOT_UNAVAILABLE` instead of falling back to a display capture. It goes through
|
|
36
|
+
the ordinary tool gate and is not plan-mode safe; the standalone terminal has no backend, and the
|
|
37
|
+
existing macOS host capture has not adopted the contract (ADR-0050).
|
|
38
|
+
|
|
39
|
+
- Watch approvals and questions through `terminal.pending.wait`: a control-key-protected revision
|
|
40
|
+
snapshot that returns as soon as the pending set changes and otherwise waits at most 20 seconds,
|
|
41
|
+
waking on additions, removals and disposal. `terminal.pending` stays available, the client
|
|
42
|
+
resynchronizes after errors, and no persisted state or public protocol changes (ADR-0051).
|
|
43
|
+
|
|
44
|
+
- Swap the OpenTUI send keys back. `Return` sends, or queues a follow-up behind a running reply, and
|
|
45
|
+
`Cmd+Return`, `Ctrl+Return` or `Alt+Return` steers that reply. The `app.message.followUp` action is
|
|
46
|
+
`app.message.steer` again, so a `keybindings.json` entry under the newer name needs renaming.
|
|
47
|
+
|
|
48
|
+
- Keep a stray mouse report out of input. When the terminal delivers a mouse report in two pieces
|
|
49
|
+
across the input parser's timeout, its `<button;column;row>` tail is dropped instead of being
|
|
50
|
+
typed into the composer or a single-line field, so a scroll can never become a run's prompt or a
|
|
51
|
+
filter. Text typed at human speed is never touched, pastes are never rewritten, and the Trajectory
|
|
52
|
+
page no longer prints a recorded mouse report.
|
|
53
|
+
|
|
5
54
|
- Give top-level sessions a name and a current-state prompt. An unnamed session derives a
|
|
6
55
|
provisional six-word name from its first substantive request; greetings and short replies stay
|
|
7
56
|
unnamed, and the model can revise the name. Each top-level run also receives a request-scoped
|
|
@@ -141,7 +190,7 @@ The first published release of the 1.1 line, and npm `latest`. It follows the 1.
|
|
|
141
190
|
|
|
142
191
|
- Keep the OpenTUI home screen when a notice arrives before any conversation, such as `Unknown command: /tihnk`. The notice shows beneath the product mark instead of replacing it, and the composer keeps its "Ask anything…" placeholder.
|
|
143
192
|
|
|
144
|
-
- Swap the OpenTUI send keys: `Return`
|
|
193
|
+
- Swap the OpenTUI send keys back: `Return` sends, or steers a running reply, and `Cmd+Return`, `Ctrl+Return` or `Alt+Return` queues a follow-up. The `app.message.steer` action is renamed `app.message.followUp` again, so a `keybindings.json` entry under the older name needs renaming. Pending steering, follow-up and deferred plan/Bash inputs show above the working line with their delivery type, a queued plan or `!` command acts as a barrier that later inputs wait behind, and `Alt+Up` restores queued text to the draft.
|
|
145
194
|
|
|
146
195
|
- Draw the OpenTUI `select`, `confirm`, `input` and `editor` dialogs, including `/effort` and the Thinking setting, as the same flat centered panel on the scrim that `/model` and the other pages use, instead of a rounded bordered box. The box clipped the heading's `Esc` hint and the option count; centered dialogs now cap their height at the rows the overlay shows.
|
|
147
196
|
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ index](docs/README.md) links the architecture and other project records.
|
|
|
37
37
|
|
|
38
38
|
### Session options for applications
|
|
39
39
|
|
|
40
|
-
- Interactive sessions offer `spawn_subagent` and `wait_subagents` by default. `subagents: null` disables them; `{ maxDepth }` configures native nesting (default one, maximum three), independently of the host caller depth. Unattended sessions remain disabled unless the host explicitly supplies subagent options. A frozen capability set can narrow these tools further.
|
|
40
|
+
- Interactive sessions offer `spawn_subagent` and `wait_subagents` by default. `subagents: null` disables them; `{ maxDepth }` configures native nesting (default one, maximum three), independently of the host caller depth. `{ maxChildren, maxByProfile, maxOther, maxUnprofiled }` bounds breadth: by default a run starts at most four distinct child conversations, two `worker`, three `explorer`, one of any other named profile and one with no profile. Unattended sessions remain disabled unless the host explicitly supplies subagent options. A frozen capability set can narrow these tools further.
|
|
41
41
|
- `harness.subagents.spawn({ parentRunId, brief, agent?, tools?, wait? })` opens a fresh child of the same caller with no wider capabilities. `agent` names an agent profile (below). It returns `{ runId, nativeSessionId, agent?, unavailableTools? }` once open; `wait: true` also waits for settlement. `harness.subagents.wait({ parentRunId, runIds? })` joins selected direct children, or the current children when omitted, and returns their outcomes. `results` reads the same bounded outcome records without waiting. RPC exposes `subagents.spawn`, `subagents.wait`, and `subagents.results`; `sessions.spawnSubagent` remains a compatibility alias.
|
|
42
42
|
- **Agent profiles** (PROP-0029) are what a subagent starts from: the built-in `worker` (reads, edits, writes, runs commands) and `explorer` (reads only), a person's own `<data root>/agents/<name>.md`, a repository's `<project>/.xingular/agents/<name>.md`, and the variant's c5 subagents, later ones winning. A profile is Markdown with frontmatter (`description`, `color`, `tools`, `plugins`, `variant`, `model`, `effort`) and its body is the role. It only narrows the parent's tools and plugins. `listProfiles`, `resolveProfile`, `createProfile` and `removeProfile` (RPC `agents.list|get|create|remove`) read and write them, and the child's `RunRecord.profile` names the one it used.
|
|
43
43
|
- The model's `spawn_subagent` returns immediately by default; `wait: true` returns an inline result. `wait_subagents` joins selected children. The SDK and standalone terminal share this execution service. Terminal calls use its private control channel, including when connected apps are disabled.
|