style(coding-agent/registry): formatted persisted mid-spawn test writes as template literals
- Replaced `join("\\n") + "\\n"` concatenations with template-literal interpolation in mid-spawn registry fixtures.
- Updated the three Bun.write calls in `persisted-mid-spawn-stub.test.ts` to use the template form.
This commit is contained in:
@@ -65,9 +65,6 @@
|
||||
- Made extension tool-call timeouts configurable and paused them during user dialogs.
|
||||
- Fixed `/vibe` cancellation leaving an in-flight model turn unaware that Vibe mode and its tools were removed ([#8326](https://github.com/can1357/oh-my-pi/issues/8326)).
|
||||
- Fixed empty local-model stops lingering on the persisted active branch after retries; discarded turns now durably select their parent, preserve safe metadata children, and cannot resurface after reload or a mid-retry process kill. ([#5179](https://github.com/can1357/oh-my-pi/issues/5179))
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed the Biome linter client silently dropping every diagnostic because `#parseJsonOutput` expected an outdated `--reporter=json` schema (`location.path.file`, byte-offset `span`, `description`); it now reads Biome 2.x's string `location.path`, 1-indexed `location.start`/`location.end`, and `message`, and warns when a non-empty diagnostics array has no recognizable location ([#8694](https://github.com/can1357/oh-my-pi/issues/8694)).
|
||||
|
||||
## [17.3.4] - 2026-08-14
|
||||
|
||||
@@ -42,7 +42,7 @@ describe("registerPersistedSubagents mid-spawn stubs", () => {
|
||||
await Bun.write(path.join(dir, "main.jsonl"), `${sessionHeader("main")}\n`);
|
||||
await Bun.write(
|
||||
path.join(dir, "main", "Worker.jsonl"),
|
||||
[
|
||||
`${[
|
||||
sessionHeader("worker"),
|
||||
JSON.stringify({
|
||||
type: "session_init",
|
||||
@@ -54,7 +54,7 @@ describe("registerPersistedSubagents mid-spawn stubs", () => {
|
||||
tools: ["read"],
|
||||
agent: "adversarial-reviewer",
|
||||
}),
|
||||
].join("\n") + "\n",
|
||||
].join("\n")}\n`,
|
||||
);
|
||||
|
||||
const registry = await registerFrom(dir);
|
||||
@@ -68,7 +68,7 @@ describe("registerPersistedSubagents mid-spawn stubs", () => {
|
||||
await Bun.write(path.join(dir, "main.jsonl"), `${sessionHeader("main")}\n`);
|
||||
await Bun.write(
|
||||
path.join(dir, "main", "Legacy.jsonl"),
|
||||
[
|
||||
`${[
|
||||
sessionHeader("legacy"),
|
||||
JSON.stringify({
|
||||
type: "message",
|
||||
@@ -77,7 +77,7 @@ describe("registerPersistedSubagents mid-spawn stubs", () => {
|
||||
timestamp: "2026-08-13T17:14:49.000Z",
|
||||
message: { role: "user", content: "hello", timestamp: 1 },
|
||||
}),
|
||||
].join("\n") + "\n",
|
||||
].join("\n")}\n`,
|
||||
);
|
||||
|
||||
const registry = await registerFrom(dir);
|
||||
@@ -91,7 +91,7 @@ describe("registerPersistedSubagents mid-spawn stubs", () => {
|
||||
await Bun.write(path.join(dir, "main.jsonl"), `${sessionHeader("main")}\n`);
|
||||
await Bun.write(
|
||||
childFile,
|
||||
[
|
||||
`${[
|
||||
sessionHeader("worker"),
|
||||
JSON.stringify({
|
||||
type: "session_init",
|
||||
@@ -102,7 +102,7 @@ describe("registerPersistedSubagents mid-spawn stubs", () => {
|
||||
task: "review the diff",
|
||||
tools: ["read"],
|
||||
}),
|
||||
].join("\n") + "\n",
|
||||
].join("\n")}\n`,
|
||||
);
|
||||
|
||||
const registry = new AgentRegistry();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* the final shipped behavior belongs in release notes.
|
||||
*
|
||||
* For every non-empty `[Unreleased]` section this script hands the whole section
|
||||
* to a small model (default `google-vertex/gemini-3.5-flash` via `@oh-my-pi/pi-ai`)
|
||||
* to a small model (default `google-antigravity/gemini-3.7-flash` via `@oh-my-pi/pi-ai`)
|
||||
* and asks for a complete replacement grouped by changelog category. The model
|
||||
* returns structured sections/items; markdown is rendered locally so only the
|
||||
* Unreleased section changes and formatting stays deterministic.
|
||||
@@ -32,18 +32,9 @@
|
||||
import * as path from "node:path";
|
||||
import { parseArgs } from "node:util";
|
||||
import { type } from "@oh-my-pi/omptype";
|
||||
import {
|
||||
type Api,
|
||||
AuthStorage,
|
||||
completeSimple,
|
||||
Effort,
|
||||
type Model,
|
||||
SqliteAuthCredentialStore,
|
||||
type Tool,
|
||||
type ToolCall,
|
||||
} from "@oh-my-pi/pi-ai";
|
||||
import { type Api, completeSimple, Effort, type Model, type Tool, type ToolCall } from "@oh-my-pi/pi-ai";
|
||||
import { discoverAuthStorage } from "@oh-my-pi/pi-ai/auth-broker";
|
||||
import { type GeneratedProvider, getBundledModel } from "@oh-my-pi/pi-catalog/models";
|
||||
import { getAgentDbPath } from "@oh-my-pi/pi-utils";
|
||||
import {
|
||||
type ChangelogDocument,
|
||||
changelogPaths,
|
||||
@@ -55,7 +46,7 @@ import {
|
||||
resolveRepoRoot,
|
||||
} from "./fix-changelogs";
|
||||
|
||||
const DEFAULT_MODEL = "google-vertex/gemini-3.5-flash";
|
||||
const DEFAULT_MODEL = "google-antigravity/gemini-3.7-flash";
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Prompts
|
||||
@@ -109,12 +100,12 @@ async function openModel(modelSpec: string): Promise<RewriteModel> {
|
||||
const modelId = modelSpec.slice(slash + 1);
|
||||
const model = getBundledModel(provider as GeneratedProvider, modelId);
|
||||
if (!model) throw new Error(`unknown model "${modelSpec}" (not in bundled catalog)`);
|
||||
const store = await SqliteAuthCredentialStore.open(getAgentDbPath());
|
||||
const storage = new AuthStorage(store);
|
||||
await storage.reload();
|
||||
const storage = await discoverAuthStorage({ sourceLabel: "rewrite-changelog" });
|
||||
const apiKey = await storage.getApiKey(provider);
|
||||
if (!apiKey) {
|
||||
throw new Error(`no credentials for provider "${provider}" (run \`omp login\` or set the provider env var)`);
|
||||
throw new Error(
|
||||
`no credentials for provider "${provider}" via ${storage.sourceLabel ?? "auth storage"} (check broker or run \`omp login\`)`,
|
||||
);
|
||||
}
|
||||
return { model, apiKey, spec: modelSpec };
|
||||
}
|
||||
@@ -379,7 +370,7 @@ function parseCli(argv: string[]): CliOptions | "help" {
|
||||
options: {
|
||||
"dry-run": { type: "boolean", default: false },
|
||||
check: { type: "boolean", default: false },
|
||||
model: { type: "string", default: DEFAULT_MODEL },
|
||||
model: { type: "string", short: "m", default: DEFAULT_MODEL },
|
||||
package: { type: "string" },
|
||||
"repo-root": { type: "string" },
|
||||
concurrency: { type: "string", default: "4" },
|
||||
@@ -398,14 +389,14 @@ function parseCli(argv: string[]): CliOptions | "help" {
|
||||
|
||||
function usage(): string {
|
||||
return [
|
||||
"Usage: bun scripts/rewrite-changelog.ts [--dry-run|--check] [--model <prov/id>] [--package <substr>] [--concurrency <n>]",
|
||||
"Usage: bun scripts/rewrite-changelog.ts [--dry-run|--check] [-m|--model <prov/id>] [--package <substr>] [--concurrency <n>]",
|
||||
"",
|
||||
"Hands each non-empty [Unreleased] changelog section to a small model and rewrites the entries",
|
||||
"into user-facing release notes, dropping intermediate developer churn and implementation-only details",
|
||||
"while preserving public contract, exports, API, config, auth, and billing behavior.",
|
||||
"",
|
||||
"Options:",
|
||||
` --model <prov/id> Classifier model (default ${DEFAULT_MODEL}).`,
|
||||
` -m, --model <prov/id> Classifier model (default ${DEFAULT_MODEL}).`,
|
||||
" --package <substr> Only changelogs whose path contains this substring.",
|
||||
" --concurrency <n> Max concurrent changelogs to process in parallel (default 4).",
|
||||
" --dry-run Report what would be dropped without writing files.",
|
||||
|
||||
Reference in New Issue
Block a user