@gajae-code/coding-agent 0.8.2 → 0.9.0
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 +29 -0
- package/dist/types/append-only-mode.d.ts +31 -0
- package/dist/types/capability/rule.d.ts +8 -0
- package/dist/types/cli/fixture-report.d.ts +20 -0
- package/dist/types/cli/fixture-report.test.d.ts +1 -0
- package/dist/types/cli/nofile-limit.d.ts +11 -0
- package/dist/types/cli/update-cli.d.ts +22 -0
- package/dist/types/config/settings-schema.d.ts +105 -1
- package/dist/types/discovery/index.d.ts +1 -0
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/export/ttsr.d.ts +14 -3
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +5 -2
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +7 -0
- package/dist/types/gjc-runtime/state-writer.d.ts +3 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +26 -0
- package/dist/types/gjc-runtime/ultragoal-receipt-freshness.d.ts +42 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +119 -13
- package/dist/types/goals/runtime.d.ts +1 -0
- package/dist/types/hooks/native-skill-hook.d.ts +12 -0
- package/dist/types/modes/components/assistant-message.d.ts +5 -1
- package/dist/types/modes/components/status-line.d.ts +9 -0
- package/dist/types/modes/controllers/command-controller.d.ts +1 -0
- package/dist/types/modes/controllers/event-controller.d.ts +5 -0
- package/dist/types/modes/interactive-mode.d.ts +2 -0
- package/dist/types/modes/rpc/rpc-types.d.ts +14 -0
- package/dist/types/modes/shared/agent-wire/event-contract.d.ts +19 -0
- package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +23 -1
- package/dist/types/modes/types.d.ts +1 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +1 -0
- package/dist/types/notifications/config.d.ts +6 -0
- package/dist/types/notifications/telegram-daemon.d.ts +8 -0
- package/dist/types/notifications/threaded-render.d.ts +6 -0
- package/dist/types/sdk.d.ts +3 -0
- package/dist/types/session/agent-session.d.ts +43 -1
- package/dist/types/session/file-mention-pruning.d.ts +8 -0
- package/dist/types/session/messages.d.ts +4 -0
- package/dist/types/session/session-manager.d.ts +17 -1
- package/dist/types/skill-state/active-state.d.ts +18 -1
- package/dist/types/system-prompt.d.ts +18 -2
- package/dist/types/task/executor.d.ts +1 -0
- package/dist/types/task/fork-context-budget.d.ts +7 -0
- package/dist/types/task/token-log.d.ts +30 -0
- package/dist/types/task/token-log.test.d.ts +1 -0
- package/dist/types/tools/bisect.d.ts +81 -0
- package/dist/types/tools/index.d.ts +1 -0
- package/dist/types/tools/search.d.ts +2 -2
- package/dist/types/utils/file-mentions.d.ts +14 -0
- package/dist/types/utils/git.d.ts +32 -0
- package/dist/types/web/scrapers/youtube.d.ts +8 -0
- package/package.json +7 -7
- package/src/append-only-mode.ts +58 -0
- package/src/autoresearch/prompt.md +1 -1
- package/src/autoresearch/tools/log-experiment.ts +1 -1
- package/src/capability/rule.ts +9 -0
- package/src/cli/config-cli.ts +27 -3
- package/src/cli/fixture-report.test.ts +230 -0
- package/src/cli/fixture-report.ts +171 -0
- package/src/cli/nofile-limit.ts +48 -0
- package/src/cli/update-cli.ts +85 -9
- package/src/cli.ts +26 -0
- package/src/commands/contribution-prep.ts +1 -1
- package/src/config/settings-schema.ts +68 -1
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +12 -13
- package/src/defaults/gjc/skills/ralplan/SKILL.md +30 -93
- package/src/defaults/gjc/skills/team/SKILL.md +16 -13
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +59 -4
- package/src/defaults/gjc/skills/ultragoal/pipeline-validation-contracts.md +30 -0
- package/src/defaults/gjc-defaults.ts +9 -0
- package/src/discovery/helpers.ts +10 -0
- package/src/discovery/index.ts +1 -0
- package/src/export/html/template.generated.ts +1 -1
- package/src/export/html/template.js +60 -2
- package/src/export/ttsr.ts +96 -18
- package/src/extensibility/extensions/runner.ts +181 -219
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +156 -44
- package/src/gjc-runtime/deep-interview-state.ts +31 -2
- package/src/gjc-runtime/session-state-sidecar.ts +208 -13
- package/src/gjc-runtime/state-writer.ts +15 -0
- package/src/gjc-runtime/team-runtime.ts +164 -15
- package/src/gjc-runtime/ultragoal-guard.ts +55 -66
- package/src/gjc-runtime/ultragoal-receipt-freshness.ts +315 -0
- package/src/gjc-runtime/ultragoal-runtime.ts +1593 -143
- package/src/gjc-runtime/workflow-manifest.generated.json +113 -2
- package/src/gjc-runtime/workflow-manifest.ts +74 -1
- package/src/goals/runtime.ts +10 -2
- package/src/hindsight/backend.ts +1 -3
- package/src/hooks/native-skill-hook.ts +95 -4
- package/src/internal-urls/docs-index.generated.ts +14 -5
- package/src/main.ts +43 -2
- package/src/memories/index.ts +12 -1
- package/src/modes/components/assistant-message.ts +241 -82
- package/src/modes/components/custom-editor.ts +1 -0
- package/src/modes/components/status-line.ts +167 -54
- package/src/modes/components/tool-execution.ts +44 -19
- package/src/modes/controllers/command-controller.ts +39 -2
- package/src/modes/controllers/event-controller.ts +66 -47
- package/src/modes/controllers/input-controller.ts +1 -1
- package/src/modes/interactive-mode.ts +9 -1
- package/src/modes/rpc/rpc-mode.ts +29 -3
- package/src/modes/rpc/rpc-types.ts +9 -0
- package/src/modes/shared/agent-wire/command-validation.ts +4 -0
- package/src/modes/shared/agent-wire/event-contract.ts +22 -0
- package/src/modes/shared/agent-wire/event-envelope.ts +82 -0
- package/src/modes/shared/agent-wire/scopes.ts +1 -0
- package/src/modes/types.ts +1 -0
- package/src/modes/utils/ui-helpers.ts +17 -4
- package/src/notifications/config.ts +16 -4
- package/src/notifications/index.ts +78 -5
- package/src/notifications/telegram-daemon-cli.ts +2 -2
- package/src/notifications/telegram-daemon-control.ts +2 -2
- package/src/notifications/telegram-daemon.ts +85 -8
- package/src/notifications/threaded-render.ts +17 -1
- package/src/prompts/agents/architect.md +19 -10
- package/src/prompts/agents/critic.md +16 -18
- package/src/prompts/agents/executor.md +14 -11
- package/src/prompts/agents/planner.md +18 -13
- package/src/prompts/ci-green-request.md +3 -8
- package/src/prompts/goals/goal-continuation.md +0 -5
- package/src/prompts/goals/goal-mode-active.md +0 -5
- package/src/prompts/system/agent-creation-architect.md +2 -2
- package/src/prompts/system/plan-mode-active.md +1 -1
- package/src/prompts/system/plan-mode-subagent.md +3 -3
- package/src/prompts/system/project-prompt.md +0 -13
- package/src/prompts/system/subagent-system-prompt.md +3 -2
- package/src/prompts/system/system-prompt.md +26 -19
- package/src/prompts/system/volatile-project-context.md +10 -0
- package/src/prompts/system/web-search.md +4 -7
- package/src/prompts/tools/apply-patch.md +6 -0
- package/src/prompts/tools/ast-edit.md +1 -0
- package/src/prompts/tools/bash.md +1 -1
- package/src/prompts/tools/bisect.md +22 -0
- package/src/prompts/tools/browser.md +1 -1
- package/src/prompts/tools/cron.md +0 -2
- package/src/prompts/tools/eval.md +2 -2
- package/src/prompts/tools/find.md +1 -1
- package/src/prompts/tools/github.md +6 -6
- package/src/prompts/tools/goal.md +1 -3
- package/src/prompts/tools/image-gen.md +12 -5
- package/src/prompts/tools/irc.md +5 -4
- package/src/prompts/tools/job.md +2 -2
- package/src/prompts/tools/lsp.md +1 -1
- package/src/prompts/tools/monitor.md +2 -2
- package/src/prompts/tools/patch.md +2 -2
- package/src/prompts/tools/replace.md +2 -21
- package/src/prompts/tools/rewind.md +1 -1
- package/src/prompts/tools/search-tool-bm25.md +1 -11
- package/src/prompts/tools/search.md +1 -1
- package/src/prompts/tools/skill.md +3 -2
- package/src/prompts/tools/ssh.md +2 -1
- package/src/prompts/tools/subagent.md +2 -2
- package/src/prompts/tools/task.md +4 -5
- package/src/prompts/tools/todo-write.md +1 -1
- package/src/prompts/tools/vim.md +1 -0
- package/src/prompts/tools/web-search.md +2 -0
- package/src/prompts/tools/write.md +8 -2
- package/src/sdk.ts +32 -22
- package/src/session/agent-session.ts +732 -107
- package/src/session/file-mention-pruning.ts +64 -0
- package/src/session/messages.ts +4 -0
- package/src/session/session-manager.ts +59 -2
- package/src/skill-state/active-state.ts +141 -5
- package/src/skill-state/deep-interview-mutation-guard.ts +67 -3
- package/src/slash-commands/builtin-registry.ts +65 -0
- package/src/system-prompt.ts +57 -16
- package/src/task/executor.ts +125 -20
- package/src/task/fork-context-advisory.ts +2 -7
- package/src/task/fork-context-budget.ts +9 -0
- package/src/task/index.ts +4 -3
- package/src/task/output-manager.ts +4 -2
- package/src/task/token-log.test.ts +188 -0
- package/src/task/token-log.ts +179 -0
- package/src/tools/bisect.ts +367 -0
- package/src/tools/index.ts +3 -0
- package/src/tools/output-meta.ts +116 -4
- package/src/tools/search.ts +8 -2
- package/src/tools/skill.ts +15 -0
- package/src/utils/file-mentions.ts +39 -7
- package/src/utils/git.ts +73 -0
- package/src/web/scrapers/youtube.ts +24 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.9.0] - 2026-07-07
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- Added `/quit` as an alias of the `/exit` slash command, so the near-universal REPL/CLI quit verb shuts the session down instead of silently falling through to the model as a chat message. Like `/exit` it is a TUI-only shutdown: it is not advertised to ACP clients and is not listed as its own autocomplete/help entry.
|
|
9
|
+
- Added a `/clear` slash command that clears the active conversation context while preserving the current session id and durable session history (#1677).
|
|
10
|
+
- Added an Extragoal local skill template (`docs/extragoal-skill-template.md`) documenting an external final review gate on top of `ultragoal` — a fresh-context, cross-family, tool-restricted read-only reviewer with a machine-parsable verdict contract, mandatory bundle secret scan, prompt-injection stance, explicit findings triage, and a bounded re-sign loop — plus a `reviewer` stance profile and cross-session review-gate recipe in `docs/multi-vendor-profiles.md`, pinned by `test/extragoal-template.test.ts`.
|
|
11
|
+
- Added opt-in live turn streaming to the notifications surface. With `GJC_NOTIFICATIONS_STREAM=1` the session WebSocket now emits throttled non-finalized `turn_stream` frames (each carrying a per-turn `messageRef`) as the assistant message streams, and the Telegram threaded daemon edits ONE message in place — via `editMessageText` keyed by `(session, coalesceKey)` — so the finalized text lands on the same message instead of posting a new one. Off by default; without a `messageRef` finalized turns keep their legacy one-message-per-turn behaviour. Throttle interval is `GJC_NOTIFICATIONS_STREAM_INTERVAL_MS` (default 500ms); streamed frames remain suppressed under redaction.
|
|
12
|
+
- Added `GJC_NOTIFICATIONS_TURN_MAX` to raise the finalized `turn_stream` text cap (default 3500 chars, unchanged) so full long turns reach split-capable clients — the Telegram daemon already fans a long finalized turn across multiple messages via `splitTelegramHtml` — instead of being truncated with an ellipsis at the notification layer. The value is clamped to a finite `[280, 40000]` range: a non-finite or non-positive value (unset, `NaN`, `Infinity`, `<= 0`) falls back to the default, so the cap can never be unbounded. Opt-in and off by default (mirror stays a glanceable per-turn summary); live in-progress frames are intentionally NOT raised so a streaming turn stays one editable preview message rather than fanning across sends.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Stopped the Hindsight memory backend from injecting stale public-memory-tool guidance into the system prompt. `hindsight/backend.ts`'s `STATIC_INSTRUCTIONS` still instructed the model to "Use `recall`/`retain`/`reflect`", but those tools were removed from the public surface in #341 — they are unregistered in `BUILTIN_TOOLS`/`HIDDEN_TOOLS` and not discoverable — so every Hindsight-backed session advertised three uncallable tools in its injected `# Memory` block. #341 cleaned the local-memory prompts, public docs, and tool registry but never touched the Hindsight backend's own injected block, and its `public-memory-tool-surface.test.ts` guard list omitted `backend.ts`, so the drift went unnoticed. The block now describes the automatic recall/retain lifecycle instead of naming tools, and the regression test now guards `hindsight/backend.ts`.
|
|
17
|
+
- Task subagent output-ID allocation now reserves numeric prefixes from `.jsonl` session artifacts and `.patch` sidecars as well as final `.md` outputs, preventing resumed or partial subagent runs from reusing an existing artifact stem (#1733).
|
|
18
|
+
- Restored `/changelog` as a built-in slash command, including autocomplete and `/changelog --full`/`/changelog full`, so the What's New prompt no longer points at a missing command.
|
|
19
|
+
- Corrected the Extragoal template's read-only enforcement claim: the `--tools` allowlist governs the built-in tool surface, while the runtime injects the session `goal` tool (when `goal.enabled` is on) and `generate_image` (when an image credential exists) beyond it. Because goal's mutating ops persist session mode state, disabling it is now a mandatory gate precondition (`goal.enabled: false` in the review working directory's `.gjc/config.yml`), and reviewer calls outside the allowlist are gate-failing contract violations.
|
|
20
|
+
- Corrected the GJC dogfood template's user-level install instructions (`docs/gjc-dogfood-skill-template.md`): the documented verbatim `cp` wrote to `~/.gjc/skills/`, which is not the user-level scan location (`~/.gjc/agent/skills/`), and left the YAML frontmatter mid-file, so the scan's required `description` never parsed and the installed skill was silently skipped. The template now documents the same frontmatter-first `sed` extraction into the scanned location that the Extragoal template ships with, pinned by `test/gjc-dogfood-template.test.ts`.
|
|
21
|
+
- Reconciled the skill-template docs with review fixes that raced their merges: the Extragoal reviewer now disables the injected `goal` tool via a dedicated gate directory outside the repository (keeping the reviewed checkout clean, per the #1685 review) instead of an untracked in-repo `.gjc/config.yml`; both the Extragoal and dogfood templates document the one-time skill-discovery enablement (`skills.enabled` plus the install-matched `enablePiUser` **or** `enablePiProject` scan — not both, since the project scan opts every future session into repo-local `.gjc/skills` discovery, per the #1704 review); and the Extragoal template test pins the corrected contract strings.
|
|
22
|
+
- Team worker auto-checkpoints now exclude the entire `.gjc/_session-*/` session subtree instead of nine enumerated subdirectories, so extragoal gate receipts and the session activity marker are no longer committed with `--no-verify` and merged into the leader branch on repos that do not gitignore `.gjc/_session-*/`.
|
|
23
|
+
- The Telegram threaded daemon now schedules each split chunk of an oversized message through the shared rate-limit pool: a granted send slot maps to exactly one Bot API send, and continuation chunks are re-queued (one token each) rather than fanned out against a single token. This keeps a long finalized turn (e.g. raised via `GJC_NOTIFICATIONS_TURN_MAX`) within the documented per-chat rate-limit / round-robin fairness invariant instead of bursting many `sendMessage` calls on one slot.
|
|
24
|
+
- `gjc config list`, `gjc config get`, and `gjc config set` now redact secret-like setting paths even when malformed config files store object, array, boolean, or numeric values there; `--show-secrets` remains the explicit unsafe opt-in (#1738).
|
|
25
|
+
- `gjc ultragoal` now fails with a clean CLI error (exit 1, actionable stderr) instead of crashing with an uncaught `SessionResolutionError` stack dump when no session id is resolvable (missing `GJC_SESSION_ID` / `--session-id`), and `gjc ultragoal --help` no longer requires a resolvable session.
|
|
26
|
+
- Local memory consolidation no longer falls back to the registry's first model (which can be a retired model the provider rejects with 404, permanently failing every phase1/phase2 job). When no model role is configured and the session model is not yet resolved, it now prefers the most recently used model before falling back to registry order.
|
|
27
|
+
- `search` no longer fails schema validation when `paths` is omitted; it defaults to searching the working directory, matching the common repo-wide-search intent.
|
|
28
|
+
- Ultragoal validation-batch tests are now hermetic: they previously ran `computeCheckpointChangeSet` against the enclosing repository, so their hardcoded declared change set only covered the branch that introduced them — failing for any contributor branch or dirty checkout that touches other files. They now use a root outside the git work tree with `CI_DEV_CHANGED_PATHS` pinned to the declared paths.
|
|
29
|
+
- Added a discoverable `bisect` tool that hunts down the commit responsible for a regression by driving `git bisect` with a shell predicate (exit `0` = good, `125` = skip, any other non-zero = bad). It validates preconditions (git repo, clean worktree, `good` is an ancestor of `bad`), resolves the worktree top level once and runs every git command, the predicate, and teardown from that repository root (so it is safe even when invoked from a subdirectory that a candidate commit deletes), and always restores the working tree on completion, error, or abort — running `git bisect reset` and then discarding any tracked-file edits the predicate made (`git reset --hard`) so the promised clean teardown holds even when the predicate mutates tracked files (untracked files the predicate creates are left in place and reported, never deleted). It supports an `invert` mode to find the commit that *fixed* a behavior, bounds the search with `maxSteps` and a per-step `stepTimeoutMs` (a timed-out step counts as a skip), and reports the culprit commit with its author, date, subject, changed files, and every revision it tested.
|
|
30
|
+
|
|
5
31
|
## [0.8.2] - 2026-07-06
|
|
6
32
|
### Added
|
|
7
33
|
|
|
@@ -106,6 +132,9 @@
|
|
|
106
132
|
### Changed
|
|
107
133
|
|
|
108
134
|
- `web_search` latency overhaul: provider hard timeouts are now class-based (pure search APIs 15s, LLM-mediated providers 120s, Kimi 35s aligned to its upstream 30s budget, replacing the uniform 300s ceiling; an explicitly configured `web_search.timeout` still overrides — the schema default no longer reinstalls 300s), DuckDuckGo is fired as a background hedge 3s into a slower primary so a failing primary falls back to an already-settled result, the Gemini 429/5xx retry-delay budget dropped from 5 minutes to 30 seconds, resolved provider chains are cached per AuthStorage for 60s keyed on the credential generation (availability probes skipped on repeat searches; login/logout invalidates immediately), and `WebSearchTool` prewarms the chain at construction. Measured: hung-primary fallback 301s → 15s, slow-failing-primary fallback ~7s → 6s, repeat chain resolution ~26ms → ~0.01ms.
|
|
135
|
+
### Fixed
|
|
136
|
+
|
|
137
|
+
- Kept the default composer border one cell inside the terminal edge to avoid the right rounded input corner protruding in narrow/macOS terminal renderers.
|
|
109
138
|
|
|
110
139
|
## [0.7.10] - 2026-07-02
|
|
111
140
|
### Added
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for append-only context-mode resolution and manager
|
|
3
|
+
* construction. Both the initial session build (`sdk.ts`) and the runtime
|
|
4
|
+
* model/setting-change path (`agent-session.ts`), plus the status UI, resolve
|
|
5
|
+
* through here so the auto allowlist and prefix-reset diagnostics never drift.
|
|
6
|
+
*/
|
|
7
|
+
import { AppendOnlyContextManager } from "@gajae-code/agent-core";
|
|
8
|
+
/**
|
|
9
|
+
* Providers for which append-only context auto-enables. Exact provider-string
|
|
10
|
+
* match only: `anthropic` reached via a gateway/aggregator provider string
|
|
11
|
+
* (e.g. `openrouter`, a custom gateway) does NOT match and stays opt-in via
|
|
12
|
+
* `provider.appendOnlyContext: "on"`, because those transports can rewrite or
|
|
13
|
+
* renormalize the request in ways that have not been validated for append-only
|
|
14
|
+
* prefix stability.
|
|
15
|
+
*/
|
|
16
|
+
export declare function providerSupportsAppendOnlyAuto(provider: string): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Resolve whether to enable append-only context mode based on the setting and provider.
|
|
19
|
+
*
|
|
20
|
+
* - `"on"` → always enable
|
|
21
|
+
* - `"off"` → never enable
|
|
22
|
+
* - `"auto"` → enable for providers with strong prompt-prefix caching that this
|
|
23
|
+
* harness has validated (see {@link providerSupportsAppendOnlyAuto})
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveAppendOnlyMode(setting: "auto" | "on" | "off" | undefined, provider: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Construct an {@link AppendOnlyContextManager} wired to emit per-session
|
|
28
|
+
* stable-prefix reset diagnostics. Use this at every creation site so the
|
|
29
|
+
* telemetry is uniform.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createAppendOnlyContextManager(provider: string | undefined): AppendOnlyContextManager;
|
|
@@ -12,6 +12,10 @@ export interface RuleFrontmatter {
|
|
|
12
12
|
scope?: string | string[];
|
|
13
13
|
/** Per-rule TTSR interrupt mode override. */
|
|
14
14
|
interruptMode?: "never" | "prose-only" | "tool-only" | "always";
|
|
15
|
+
/** Per-rule TTSR repeat mode override. */
|
|
16
|
+
repeatMode?: "once" | "after-gap";
|
|
17
|
+
/** Per-rule TTSR repeat gap override. */
|
|
18
|
+
repeatGap?: number;
|
|
15
19
|
[key: string]: unknown;
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
@@ -36,6 +40,10 @@ export interface Rule {
|
|
|
36
40
|
scope?: string[];
|
|
37
41
|
/** Per-rule TTSR interrupt mode override (falls back to global ttsr.interruptMode). */
|
|
38
42
|
interruptMode?: "never" | "prose-only" | "tool-only" | "always";
|
|
43
|
+
/** Per-rule TTSR repeat mode override (falls back to global ttsr.repeatMode). */
|
|
44
|
+
repeatMode?: "once" | "after-gap";
|
|
45
|
+
/** Per-rule TTSR repeat gap override (falls back to global ttsr.repeatGap). */
|
|
46
|
+
repeatGap?: number;
|
|
39
47
|
/** Source metadata */
|
|
40
48
|
_source: SourceMeta;
|
|
41
49
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TaskTokenLog } from "../task/types";
|
|
2
|
+
export interface LiveRunReportShape {
|
|
3
|
+
schemaVersion: 1;
|
|
4
|
+
binaryId: string;
|
|
5
|
+
fixtureId: string;
|
|
6
|
+
totals: {
|
|
7
|
+
turns: number;
|
|
8
|
+
inputTokens: number;
|
|
9
|
+
outputTokens: number;
|
|
10
|
+
cacheReadTokens: number;
|
|
11
|
+
cacheWriteTokens: number;
|
|
12
|
+
totalTokens: number;
|
|
13
|
+
};
|
|
14
|
+
cacheHitRate: number | null;
|
|
15
|
+
receiptArtifactRatio: number | null;
|
|
16
|
+
spawnDecisions: number | null;
|
|
17
|
+
roi: number | null;
|
|
18
|
+
}
|
|
19
|
+
export declare function buildFixtureReport(fixtureId: string, logs: readonly TaskTokenLog[]): LiveRunReportShape;
|
|
20
|
+
export declare function runFixtureReport(fixtureId: string): Promise<number>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
export declare const RECOMMENDED_MACOS_NOFILE_LIMIT = 4096;
|
|
3
|
+
export declare function parseNoFileLimit(text: string): number | undefined;
|
|
4
|
+
export declare function buildMacOSNoFileLimitWarning(currentLimit: number): string;
|
|
5
|
+
export interface WarnIfMacOSNoFileLimitTooLowDeps {
|
|
6
|
+
platform?: NodeJS.Platform;
|
|
7
|
+
env?: NodeJS.ProcessEnv;
|
|
8
|
+
execFileSync?: typeof execFileSync;
|
|
9
|
+
writeStderr?: (text: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function warnIfMacOSNoFileLimitTooLow(deps?: WarnIfMacOSNoFileLimitTooLowDeps): void;
|
|
@@ -53,6 +53,28 @@ export declare function formatVerificationFailureForTest(result: InstalledVersio
|
|
|
53
53
|
*/
|
|
54
54
|
export declare function replaceBinaryForUpdate(options: BinaryReplacementOptions): Promise<InstalledVersionVerification>;
|
|
55
55
|
export declare function runPackageManagerUpdateForTest(options: PackageManagerUpdateOptions): Promise<InstalledVersionVerification>;
|
|
56
|
+
export declare function fsyncFileForTest(filePath: string): Promise<void>;
|
|
57
|
+
/** Injectable steps of the binary update flow (seams for testing ordering). */
|
|
58
|
+
export interface BinaryUpdateFlow {
|
|
59
|
+
download(url: string, tempPath: string): Promise<void>;
|
|
60
|
+
fsync(filePath: string): Promise<void>;
|
|
61
|
+
replace(options: BinaryReplacementOptions): Promise<InstalledVersionVerification>;
|
|
62
|
+
verifyInstalledVersion(expectedVersion: string): Promise<InstalledVersionVerification>;
|
|
63
|
+
/** Best-effort cleanup of the temp file when the flow aborts before replace. */
|
|
64
|
+
removeTemp?(filePath: string): Promise<void>;
|
|
65
|
+
/** Called once fsync has succeeded, right before replacement begins. */
|
|
66
|
+
beforeReplace?(): void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Orchestrate download → fsync → replace → verify with a strict ordering
|
|
70
|
+
* contract: the downloaded temp binary MUST be flushed to stable storage
|
|
71
|
+
* before it is published (renamed into place) or exec'd for verification.
|
|
72
|
+
*
|
|
73
|
+
* If fsync fails the temp bytes are not durable, so we abort before
|
|
74
|
+
* replacement/verification and clean up the temp file rather than installing a
|
|
75
|
+
* possibly-truncated binary.
|
|
76
|
+
*/
|
|
77
|
+
export declare function runBinaryUpdateFlow(targetPath: string, url: string, expectedVersion: string, flow: BinaryUpdateFlow): Promise<InstalledVersionVerification>;
|
|
56
78
|
/**
|
|
57
79
|
* Run the update command.
|
|
58
80
|
*/
|
|
@@ -520,6 +520,66 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
520
520
|
}];
|
|
521
521
|
};
|
|
522
522
|
};
|
|
523
|
+
readonly "tools.readArtifactSpillThreshold": {
|
|
524
|
+
readonly type: "number";
|
|
525
|
+
readonly default: 0;
|
|
526
|
+
readonly ui: {
|
|
527
|
+
readonly tab: "tools";
|
|
528
|
+
readonly label: "Experimental read-tool artifact spill threshold (KB)";
|
|
529
|
+
readonly description: "Advanced opt-in only: combined-size cap for `read` output across all requested ranges. Above this the full output is saved as an artifact and a bounded head+tail snippet is kept inline. Live layofflabs/gpt-5.5 medium evidence on 2026-07-07 found no token savings and a lower cache-hit rate at 50 KB, so normal coding sessions should leave this Off unless intentionally measuring large-read behavior.";
|
|
530
|
+
readonly options: readonly [{
|
|
531
|
+
readonly value: "0";
|
|
532
|
+
readonly label: "Off";
|
|
533
|
+
readonly description: "Default; no read-specific spill (backstop only)";
|
|
534
|
+
}, {
|
|
535
|
+
readonly value: "50";
|
|
536
|
+
readonly label: "50 KB";
|
|
537
|
+
readonly description: "~12.5K tokens";
|
|
538
|
+
}, {
|
|
539
|
+
readonly value: "100";
|
|
540
|
+
readonly label: "100 KB";
|
|
541
|
+
readonly description: "~25K tokens";
|
|
542
|
+
}, {
|
|
543
|
+
readonly value: "256";
|
|
544
|
+
readonly label: "256 KB";
|
|
545
|
+
readonly description: "~64K tokens";
|
|
546
|
+
}, {
|
|
547
|
+
readonly value: "512";
|
|
548
|
+
readonly label: "512 KB";
|
|
549
|
+
readonly description: "~128K tokens";
|
|
550
|
+
}, {
|
|
551
|
+
readonly value: "1000";
|
|
552
|
+
readonly label: "1 MB";
|
|
553
|
+
readonly description: "~250K tokens";
|
|
554
|
+
}];
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
readonly "tools.fileMentionInlineBytes": {
|
|
558
|
+
readonly type: "number";
|
|
559
|
+
readonly default: 20;
|
|
560
|
+
readonly ui: {
|
|
561
|
+
readonly tab: "tools";
|
|
562
|
+
readonly label: "File-mention inline cap (KB)";
|
|
563
|
+
readonly description: "Inline byte cap for auto-read `@path` file mentions, deliberately below the read-tool cap so an incidental mention injects a smaller snippet than an explicit read. The full file is still available via the read tool.";
|
|
564
|
+
readonly options: readonly [{
|
|
565
|
+
readonly value: "5";
|
|
566
|
+
readonly label: "5 KB";
|
|
567
|
+
readonly description: "~1.25K tokens";
|
|
568
|
+
}, {
|
|
569
|
+
readonly value: "10";
|
|
570
|
+
readonly label: "10 KB";
|
|
571
|
+
readonly description: "~2.5K tokens";
|
|
572
|
+
}, {
|
|
573
|
+
readonly value: "20";
|
|
574
|
+
readonly label: "20 KB";
|
|
575
|
+
readonly description: "Default; ~5K tokens";
|
|
576
|
+
}, {
|
|
577
|
+
readonly value: "50";
|
|
578
|
+
readonly label: "50 KB";
|
|
579
|
+
readonly description: "~12.5K tokens (matches read cap)";
|
|
580
|
+
}];
|
|
581
|
+
};
|
|
582
|
+
};
|
|
523
583
|
readonly "tools.artifactTailBytes": {
|
|
524
584
|
readonly type: "number";
|
|
525
585
|
readonly default: 20;
|
|
@@ -681,6 +741,40 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
681
741
|
}];
|
|
682
742
|
};
|
|
683
743
|
};
|
|
744
|
+
readonly "tools.maxInlineResultBytes": {
|
|
745
|
+
readonly type: "number";
|
|
746
|
+
readonly default: 0;
|
|
747
|
+
readonly ui: {
|
|
748
|
+
readonly tab: "tools";
|
|
749
|
+
readonly label: "Max inline tool-result size (KB)";
|
|
750
|
+
readonly description: "Absolute backstop cap on inline tool-result text, enforced after artifact spill for every tool (including read and tools that set their own partial artifact meta). Output above this size is force-saved as an artifact and truncated to head+tail. 0 disables (default; opt-in pending measurement).";
|
|
751
|
+
readonly options: readonly [{
|
|
752
|
+
readonly value: "0";
|
|
753
|
+
readonly label: "Off";
|
|
754
|
+
readonly description: "Disabled; no absolute inline cap";
|
|
755
|
+
}, {
|
|
756
|
+
readonly value: "20";
|
|
757
|
+
readonly label: "20 KB";
|
|
758
|
+
readonly description: "~5K tokens";
|
|
759
|
+
}, {
|
|
760
|
+
readonly value: "30";
|
|
761
|
+
readonly label: "30 KB";
|
|
762
|
+
readonly description: "~7.5K tokens";
|
|
763
|
+
}, {
|
|
764
|
+
readonly value: "50";
|
|
765
|
+
readonly label: "50 KB";
|
|
766
|
+
readonly description: "~12.5K tokens";
|
|
767
|
+
}, {
|
|
768
|
+
readonly value: "75";
|
|
769
|
+
readonly label: "75 KB";
|
|
770
|
+
readonly description: "~19K tokens";
|
|
771
|
+
}, {
|
|
772
|
+
readonly value: "100";
|
|
773
|
+
readonly label: "100 KB";
|
|
774
|
+
readonly description: "~25K tokens";
|
|
775
|
+
}];
|
|
776
|
+
};
|
|
777
|
+
};
|
|
684
778
|
readonly "statusLine.showHookStatus": {
|
|
685
779
|
readonly type: "boolean";
|
|
686
780
|
readonly default: false;
|
|
@@ -1646,6 +1740,14 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1646
1740
|
readonly type: "string";
|
|
1647
1741
|
readonly default: undefined;
|
|
1648
1742
|
};
|
|
1743
|
+
readonly "compaction.maintenancePruningEnabled": {
|
|
1744
|
+
readonly type: "boolean";
|
|
1745
|
+
readonly default: false;
|
|
1746
|
+
};
|
|
1747
|
+
readonly "compaction.maintenancePruningMinSavingsTokens": {
|
|
1748
|
+
readonly type: "number";
|
|
1749
|
+
readonly default: 8000;
|
|
1750
|
+
};
|
|
1649
1751
|
readonly "compaction.idleEnabled": {
|
|
1650
1752
|
readonly type: "boolean";
|
|
1651
1753
|
readonly default: false;
|
|
@@ -2001,7 +2103,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2001
2103
|
readonly ui: {
|
|
2002
2104
|
readonly tab: "context";
|
|
2003
2105
|
readonly label: "TTSR Context Mode";
|
|
2004
|
-
readonly description: "What to do with partial output when TTSR triggers";
|
|
2106
|
+
readonly description: "What to do with partial output when TTSR triggers. 'discard' (recommended) drops the aborted partial turn so it never accumulates in context. 'keep' retains every aborted partial turn, which grows the token footprint each time a rule fires \u2014 prefer 'discard' unless you specifically need the partial output.";
|
|
2005
2107
|
};
|
|
2006
2108
|
};
|
|
2007
2109
|
readonly "ttsr.interruptMode": {
|
|
@@ -3640,6 +3742,8 @@ export interface CompactionSettings {
|
|
|
3640
3742
|
autoContinue: boolean;
|
|
3641
3743
|
remoteEnabled: boolean;
|
|
3642
3744
|
remoteEndpoint: string | undefined;
|
|
3745
|
+
maintenancePruningEnabled: boolean;
|
|
3746
|
+
maintenancePruningMinSavingsTokens: number;
|
|
3643
3747
|
idleEnabled: boolean;
|
|
3644
3748
|
idleThresholdTokens: number;
|
|
3645
3749
|
idleTimeoutSeconds: number;
|