codeden 0.4.3 → 0.4.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/README.md +1 -1
- package/dist/cli.js +1 -1
- package/dist/{main-CtuRKdHE.js → main-CKLHi4sz.js} +292 -47
- package/dist/main-CKLHi4sz.js.map +1 -0
- package/dist/{main-BsCZetsu.js → main-D335_24e.js} +2 -2
- package/dist/{main-BsCZetsu.js.map → main-D335_24e.js.map} +1 -1
- package/dist/{runner-BPkTmgxq.js → runner-DjavcMnG.js} +83 -8
- package/dist/runner-DjavcMnG.js.map +1 -0
- package/dist/runner.js +1 -1
- package/dist/web/assets/{core-BSglb5T2.js → core-BFbrQR07.js} +1 -1
- package/dist/web/assets/engine-oniguruma-Dod-24Yp.js +1 -0
- package/dist/web/assets/{highlighted-body-JLMTFACH-C4JIAaW0.js → highlighted-body-JLMTFACH-C9Ii0196.js} +1 -1
- package/dist/web/assets/{highlights-BiFbzXfR.js → highlights-C4aNCgJw.js} +1 -1
- package/dist/web/assets/{index-B175wXOK.css → index-BIBpPpjX.css} +1 -1
- package/dist/web/assets/{index-Dwp28BCB.js → index-WLihS360.js} +202 -202
- package/dist/web/assets/langs-X885YKmd.js +1 -0
- package/dist/web/assets/mermaid-WFAXDIZX-Dh9Bmb5R.js +1 -0
- package/dist/web/assets/{shiki-BJFGjRKC.js → shiki-MNiRnTih.js} +2 -2
- package/dist/web/assets/{stream-tokenizer-FM7Mm_zq.js → stream-tokenizer-BOiamYv-.js} +1 -1
- package/dist/web/assets/{themes-EFt_x-Bi.js → themes-DPD-gG-5.js} +2 -2
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/main-CtuRKdHE.js.map +0 -1
- package/dist/runner-BPkTmgxq.js.map +0 -1
- package/dist/web/assets/engine-oniguruma-DShJzqyt.js +0 -1
- package/dist/web/assets/langs-Fwnh7v07.js +0 -1
- package/dist/web/assets/mermaid-WFAXDIZX-dh5FbPgs.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as startRunner } from "./runner-
|
|
1
|
+
import { t as startRunner } from "./runner-DjavcMnG.js";
|
|
2
2
|
import { parseArgs } from "node:util";
|
|
3
3
|
// ../runner/src/main.ts
|
|
4
4
|
/**
|
|
@@ -56,4 +56,4 @@ try {
|
|
|
56
56
|
}
|
|
57
57
|
export {};
|
|
58
58
|
|
|
59
|
-
//# sourceMappingURL=main-
|
|
59
|
+
//# sourceMappingURL=main-D335_24e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-
|
|
1
|
+
{"version":3,"file":"main-D335_24e.js","names":[],"sources":["../../runner/src/main.ts"],"sourcesContent":["/**\n * Runner process entry. Started detached by the server:\n * node main.js --home <dir> [--fake] [--no-builtin] [--replay <fixture.json>] [--mcp-upstream <url>]\n */\nimport { parseArgs } from \"node:util\";\nimport { startRunner } from \"./runner\";\n\nconst { values } = parseArgs({\n options: {\n home: { type: \"string\" },\n fake: { type: \"boolean\", default: false },\n /** Skip the real Claude Code / Codex adapters (tests that only use Fake or Replay). */\n \"no-builtin\": { type: \"boolean\", default: false },\n /** Serve a recorded fixture as the `replay` provider (repeatable). */\n replay: { type: \"string\", multiple: true },\n \"mcp-upstream\": { type: \"string\" },\n },\n allowPositionals: false,\n});\n\nconst home = values.home ?? process.env.CODEDEN_HOME;\nif (!home) {\n console.error(\"codeden runner: --home or CODEDEN_HOME is required\");\n process.exit(2);\n}\n\nconst log = (m: string) => console.log(`[${new Date().toISOString()}] ${m}`);\n\ntry {\n const runner = await startRunner({\n home,\n enableFakeProvider: values.fake,\n builtinProviders: !values[\"no-builtin\"],\n replayFixtures: values.replay,\n mcpUpstreamUrl: values[\"mcp-upstream\"],\n sweepDescendants: true,\n log,\n onShutdown: () => process.exit(0),\n });\n const stop = () => void runner.close().then(() => process.exit(0));\n for (const signal of [\"SIGINT\", \"SIGTERM\", \"SIGHUP\", \"SIGBREAK\"] as const) {\n process.on(signal, stop);\n }\n} catch (error) {\n log(`failed to start: ${error instanceof Error ? error.message : String(error)}`);\n process.exit(1);\n}\n"],"mappings":";;;;;;;AAOA,MAAM,EAAE,WAAW,UAAU;CAC3B,SAAS;EACP,MAAM,EAAE,MAAM,SAAS;EACvB,MAAM;GAAE,MAAM;GAAW,SAAS;EAAM;;EAExC,cAAc;GAAE,MAAM;GAAW,SAAS;EAAM;;EAEhD,QAAQ;GAAE,MAAM;GAAU,UAAU;EAAK;EACzC,gBAAgB,EAAE,MAAM,SAAS;CACnC;CACA,kBAAkB;AACpB,CAAC;AAED,MAAM,OAAO,OAAO,QAAQ,QAAQ,IAAI;AACxC,IAAI,CAAC,MAAM;CACT,QAAQ,MAAM,oDAAoD;CAClE,QAAQ,KAAK,CAAC;AAChB;AAEA,MAAM,OAAO,MAAc,QAAQ,IAAI,qBAAI,IAAI,KAAK,EAAA,CAAE,YAAY,EAAE,IAAI,GAAG;AAE3E,IAAI;CACF,MAAM,SAAS,MAAM,YAAY;EAC/B;EACA,oBAAoB,OAAO;EAC3B,kBAAkB,CAAC,OAAO;EAC1B,gBAAgB,OAAO;EACvB,gBAAgB,OAAO;EACvB,kBAAkB;EAClB;EACA,kBAAkB,QAAQ,KAAK,CAAC;CAClC,CAAC;CACD,MAAM,aAAa,KAAK,OAAO,MAAM,CAAC,CAAC,WAAW,QAAQ,KAAK,CAAC,CAAC;CACjE,KAAK,MAAM,UAAU;EAAC;EAAU;EAAW;EAAU;CAAU,GAC7D,QAAQ,GAAG,QAAQ,IAAI;AAE3B,SAAS,OAAO;CACd,IAAI,oBAAoB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,GAAG;CAChF,QAAQ,KAAK,CAAC;AAChB"}
|
|
@@ -8486,16 +8486,30 @@ const FactoryItem = object({
|
|
|
8486
8486
|
triageRequestedAt: Timestamp.nullable(),
|
|
8487
8487
|
/** Timestamps of nudges sent to the builder or reviewer (keyed by purpose). */
|
|
8488
8488
|
nudges: record(string(), Timestamp).default({}),
|
|
8489
|
+
/**
|
|
8490
|
+
* Why the PM let this item go over the size limit (an initial scaffold, a stack migration:
|
|
8491
|
+
* work that can't be split). The size check then passes; every other check still applies.
|
|
8492
|
+
*/
|
|
8493
|
+
largeChange: string().nullable().default(null),
|
|
8489
8494
|
createdAt: Timestamp,
|
|
8490
8495
|
updatedAt: Timestamp,
|
|
8491
8496
|
mergedAt: Timestamp.nullable(),
|
|
8492
8497
|
finishedAt: Timestamp.nullable()
|
|
8493
8498
|
});
|
|
8499
|
+
/** Size limit defaults before 0.4.4, upgraded to the current defaults when a loop is read. */
|
|
8500
|
+
const LEGACY_SIZE_LIMITS = {
|
|
8501
|
+
maxChangedLines: 800,
|
|
8502
|
+
maxChangedFiles: 40
|
|
8503
|
+
};
|
|
8494
8504
|
/** Knobs of the loop beyond the required limits; all have safe defaults. */
|
|
8495
8505
|
const FactoryTuning = object({
|
|
8496
|
-
/**
|
|
8497
|
-
|
|
8498
|
-
|
|
8506
|
+
/**
|
|
8507
|
+
* Largest change merged automatically: added + deleted lines, not counting lockfiles and
|
|
8508
|
+
* generated or vendored files. `null`: no limit.
|
|
8509
|
+
*/
|
|
8510
|
+
maxChangedLines: int().positive().nullable().default(5e3),
|
|
8511
|
+
/** Most files changed (same files not counted). `null` (the default): no limit. */
|
|
8512
|
+
maxChangedFiles: int().positive().nullable().default(null),
|
|
8499
8513
|
/** CI must report and pass; a repository without CI cannot auto-merge. */
|
|
8500
8514
|
requireCi: boolean().default(true),
|
|
8501
8515
|
/** Security/dependency scan run in the builder's worktree (e.g. `pnpm audit --prod`). */
|
|
@@ -8514,6 +8528,14 @@ const FactoryTuning = object({
|
|
|
8514
8528
|
/** Minutes to wait for main CI after a merge before calling it done. */
|
|
8515
8529
|
watchTimeoutMin: int().positive().default(120)
|
|
8516
8530
|
});
|
|
8531
|
+
/**
|
|
8532
|
+
* A change to some tuning knobs. Unlike `FactoryTuning.partial()`, absent fields stay absent
|
|
8533
|
+
* (no defaults filled in), so saving one knob never resets the others.
|
|
8534
|
+
*/
|
|
8535
|
+
const FactoryTuningPatch = object(Object.fromEntries(Object.entries(FactoryTuning.shape).map(([key, schema]) => {
|
|
8536
|
+
const kind = schema._zod.def.type;
|
|
8537
|
+
return [key, (kind === "default" || kind === "prefault" ? schema.unwrap() : schema).optional()];
|
|
8538
|
+
})));
|
|
8517
8539
|
/** A running improvement-finder session. */
|
|
8518
8540
|
const DiscoveryRun = object({
|
|
8519
8541
|
sessionId: Id,
|
|
@@ -8633,7 +8655,7 @@ const PutVisionRequest = object({ contents: string().min(1).max(2e5) });
|
|
|
8633
8655
|
const SetAutonomyModeRequest = object({
|
|
8634
8656
|
mode: AutonomyMode,
|
|
8635
8657
|
limits: FactoryLimits.optional(),
|
|
8636
|
-
tuning:
|
|
8658
|
+
tuning: FactoryTuningPatch.optional()
|
|
8637
8659
|
});
|
|
8638
8660
|
object({
|
|
8639
8661
|
projectId: Id,
|
|
@@ -8719,7 +8741,20 @@ const FactoryTriageRequest = object({
|
|
|
8719
8741
|
/** Replaces the finder's acceptance criteria (accepts). */
|
|
8720
8742
|
acceptanceCriteria: array(string().trim().min(1).max(500)).min(1).max(12).optional(),
|
|
8721
8743
|
/** Why (required for rejects). */
|
|
8722
|
-
reason: string().trim().min(1).max(1e3).optional()
|
|
8744
|
+
reason: string().trim().min(1).max(1e3).optional(),
|
|
8745
|
+
/**
|
|
8746
|
+
* Accept work that can't be split under the size limit (an initial scaffold, a stack
|
|
8747
|
+
* migration), with the reason. Recorded as a factory decision.
|
|
8748
|
+
*/
|
|
8749
|
+
largeChange: string().trim().min(1).max(500).optional()
|
|
8750
|
+
});
|
|
8751
|
+
/**
|
|
8752
|
+
* `factory_allow_large_change`: the PM lets an item that failed only the size check merge
|
|
8753
|
+
* after all, because the work can't be split. The item goes back to verifying.
|
|
8754
|
+
*/
|
|
8755
|
+
const FactoryAllowLargeChangeRequest = object({
|
|
8756
|
+
itemId: Id,
|
|
8757
|
+
reason: string().trim().min(1).max(500)
|
|
8723
8758
|
});
|
|
8724
8759
|
/** Payloads of the factory's persisted events (projected into `factory_*` tables). */
|
|
8725
8760
|
const FACTORY_EVENT_PAYLOADS = {
|
|
@@ -9592,6 +9627,35 @@ const ImageEngineSetting = _enum([
|
|
|
9592
9627
|
"openai",
|
|
9593
9628
|
"none"
|
|
9594
9629
|
]);
|
|
9630
|
+
/**
|
|
9631
|
+
* What read-aloud speaks when a turn finishes (§11.3):
|
|
9632
|
+
* - `summary`: a spoken TL;DR of at most two short sentences from the utility model (§7.4),
|
|
9633
|
+
* or the message's first sentence or two when the model can't produce one.
|
|
9634
|
+
* - `full`: the whole final message with code and markdown removed, no model call, capped at
|
|
9635
|
+
* `READ_ALOUD_FULL_MAX_CHARS`.
|
|
9636
|
+
*/
|
|
9637
|
+
const ReadAloudContent = _enum(["summary", "full"]);
|
|
9638
|
+
/** Safety cap on `full` read-aloud (roughly five minutes of speech). */
|
|
9639
|
+
const READ_ALOUD_FULL_MAX_CHARS = 5e3;
|
|
9640
|
+
/**
|
|
9641
|
+
* Cut already-plain text to whole sentences within `maxChars`: as many leading sentences as fit,
|
|
9642
|
+
* or the first one cut at a word boundary with an ellipsis when even that is too long.
|
|
9643
|
+
*/
|
|
9644
|
+
function speechExcerpt(plain, maxChars, maxSentences = Infinity) {
|
|
9645
|
+
const text = plain.replace(/\s+/g, " ").trim();
|
|
9646
|
+
const sentences = text.split(/(?<=[.!?])\s+/);
|
|
9647
|
+
let out = "";
|
|
9648
|
+
for (const [i, sentence] of sentences.entries()) {
|
|
9649
|
+
if (i >= maxSentences) break;
|
|
9650
|
+
const next = out ? `${out} ${sentence}` : sentence;
|
|
9651
|
+
if (next.length > maxChars) break;
|
|
9652
|
+
out = next;
|
|
9653
|
+
}
|
|
9654
|
+
if (out) return out;
|
|
9655
|
+
const cut = text.slice(0, Math.max(0, maxChars - 3));
|
|
9656
|
+
const space = cut.lastIndexOf(" ");
|
|
9657
|
+
return `${(space > maxChars / 2 ? cut.slice(0, space) : cut).replace(/[\s,;:-]+$/, "")}...`;
|
|
9658
|
+
}
|
|
9595
9659
|
/** Per-project image generation override; unset fields fall back to the global settings. */
|
|
9596
9660
|
const ImageGenerationOverride = object({
|
|
9597
9661
|
engine: ImageEngineSetting.optional(),
|
|
@@ -9647,6 +9711,10 @@ const Settings = object({
|
|
|
9647
9711
|
model: string().nullable().default(null),
|
|
9648
9712
|
jobs: object({
|
|
9649
9713
|
followups: boolean().default(true),
|
|
9714
|
+
/**
|
|
9715
|
+
* @deprecated Superseded by `voice.readAloud.content` (§11.3) and no longer read. Kept
|
|
9716
|
+
* so settings files written before it was replaced still load.
|
|
9717
|
+
*/
|
|
9650
9718
|
readAloudSummary: boolean().default(true),
|
|
9651
9719
|
sessionTitles: boolean().default(true),
|
|
9652
9720
|
noticeSummaries: boolean().default(true)
|
|
@@ -9694,6 +9762,13 @@ const Settings = object({
|
|
|
9694
9762
|
enabled: boolean().default(false),
|
|
9695
9763
|
engine: _enum(["browser", "elevenlabs"]).default("browser"),
|
|
9696
9764
|
voice: string().nullable().default(null),
|
|
9765
|
+
/** What gets read when a turn finishes (§11.3); see `ReadAloudContent`. */
|
|
9766
|
+
content: ReadAloudContent.default("summary"),
|
|
9767
|
+
/**
|
|
9768
|
+
* Start each message with who it's from ("Orchestrator", "<project> project manager",
|
|
9769
|
+
* "<project>, <session title>"), built from the session, never by a model.
|
|
9770
|
+
*/
|
|
9771
|
+
announceSpeaker: boolean().default(true),
|
|
9697
9772
|
onlyWhenUnfocused: boolean().default(false),
|
|
9698
9773
|
quietHours: QuietHours.nullable().default(null)
|
|
9699
9774
|
}).prefault({})
|
|
@@ -11846,7 +11921,7 @@ object({
|
|
|
11846
11921
|
* rest of the bundle, so the package version is the single source of truth at runtime;
|
|
11847
11922
|
* everywhere else (workspace, tests) it is `SOURCE_VERSION`.
|
|
11848
11923
|
*/
|
|
11849
|
-
const CODEDEN_VERSION = packageVersion() ?? "0.4.
|
|
11924
|
+
const CODEDEN_VERSION = packageVersion() ?? "0.4.4";
|
|
11850
11925
|
function packageVersion() {
|
|
11851
11926
|
const value = globalThis.__CODEDEN_PACKAGE_VERSION__;
|
|
11852
11927
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
@@ -29582,6 +29657,6 @@ async function startRunner(opts) {
|
|
|
29582
29657
|
close
|
|
29583
29658
|
};
|
|
29584
29659
|
}
|
|
29585
|
-
export { BrowserNavigateRequest as $,
|
|
29660
|
+
export { BrowserNavigateRequest as $, InboxItemKind as $n, isNewerVersion as $t, SessionFileQuery as A, TriagePolicy as An, unknown as Ar, RespondRequest as At, NetworkStatus as B, TerminalClientMessage as Bn, HealthResponse as Bt, isElectronRuntime as C, isFactoryMode as Cn, number$1 as Cr, CreateProjectRequest as Ct, CODEDEN_VERSION as D, AutomationGuards as Dn, record as Dr, ListSessionsQuery as Dt, wrapper_default as E, AutomationAction as En, preprocess as Er, ListInboxQuery as Et, ListConflictsQuery as F, GitCommitRequest as Fn, StartSessionRequest as Ft, SetNetworkPasswordResponse as G, ConflictDecision as Gn, LOCAL_STT_SAMPLE_RATE as Gt, RemoteAccessFile as H, RunnerCommandResults as Hn, READ_ALOUD_FULL_MAX_CHARS as Ht, ListNoticesQuery as I, GitPushRequest as In, SteerRequest as It, ImageTestRequest as J, Project as Jn, TtsRequest as Jt, SignInRequest as K, StartedBy as Kn, LocalSttModelParams as Kt, ResolveConflictRequest as L, RestoreFilesRequest as Ln, ThreadItemsQuery as Lt, RunnerToServerMessage as M, SessionStatus as Mn, toJSONSchema as Mr, SendMessageRequest as Mt, ServerLock as N, DiffScope as Nn, safeParse$1 as Nr, SessionStartMeta as Nt, UsageQuery as O, AutomationRun as On, string as Or, ReorderProjectsRequest as Ot, ArchiveSessionRequest as P, EditQueuedMessageRequest as Pn, prettifyError as Pr, SetSecretRequest as Pt, BrowserHistoryRequest as Q, InboxItem as Qn, compareVersions$1 as Qt, RoleMessageRequest as R, SessionResult as Rn, UiClientMessage as Rt, acquireInstallLock as S, SetAutonomyModeRequest as Sn, looseObject as Sr, UpdateAutomationRequest as St, import_websocket_server as T, Automation as Tn, optional as Tr, FileWriteRequest as Tt, SetNetworkAccessRequest as U, SessionOptions as Un, Settings as Ut, PASSWORD_RULE_TEXT as V, TerminalQuery as Vn, agentEventToNewEvent as Vt, SetNetworkPasswordRequest as W, ProjectConfigFile as Wn, speechExcerpt as Wt, BrowserClientMessage as X, DEFAULT_VISION_PATH as Xn, UpdateInstallRequest as Xt, summarizeActivity as Y, sortProjects as Yn, AppPointer as Yt, BrowserDevServerRequest as Z, FactoryLimits as Zn, UpdateStatus as Zt, importClaudeSdkFrom as _, FactoryTuning as _n, custom as _r, StarterSetRequest as _t, Hono as a, GithubLabelRequest as an, AgentConfigWriteRequest as ar, AutomationImportSource as at, runNpm as b, PutVisionRequest as bn, intersection as br, UpcomingRunsQuery as bt, createAdaptorServer as c, MergePrRequest as cn, McpServerUpsertRequest as cr, ImportAutomationsRequest as ct, createImageEngineRegistry as d, parseGithubPrId as dn, ReasoningEffort as dr, AutomationProjectRequest as dt, ConflictRecord as en, messageFrom as er, BrowserNewTabRequest as et, IMAGE_ASPECT_RATIOS as f, DiscoveryArea as fn, datetime as fr, CreateAutomationRequest as ft, CLAUDE_SDK_VERSION as g, FactoryTriageRequest as gn, boolean as gr, SetAutomationEnabledRequest as gt, claudeSdkSource as h, FactoryDecisionRequest as hn, array as hr, RunAutomationRequest as ht, killTree as i, GithubIssue as in, AgentConfigLocator as ir, AUTOMATION_IMPORT_LIMITS as it, RunnerLock as j, Session as jn, ZodError as jr, SecretKey as jt, UsageSettings as k, AutomationTrigger as kn, union as kr, ResolveInboxRequest as kt, upgradeWebSocket as l, TriageIssueRequest as ln, AutonomyLevel as lr, AutomationFileFrontmatter as lt, ImageGenerationError as m, FactoryCandidate as mn, _null as mr, ListAutomationsQuery as mt, readLock as n, CreateGithubIssueRequest as nn, AgentConfigDiffRequest as nr, BrowserViewportRequest as nt, tryDecodeURIComponent as o, GithubListQuery as on, McpServerDiffRequest as or, DuplicateAutomationRequest as ot, resolveImageOutput as p, FactoryAllowLargeChangeRequest as pn, _enum as pr, ListAutomationRunsQuery as pt, passwordProblem as q, WorkKey as qn, SttQuery as qt, isAlive as r, GithubCommentRequest as rn, AgentConfigListQuery as rr, BrowserWsQuery as rt, bufferToFormData as s, GithubPr as sn, McpServerTarget as sr, ExportAutomationsQuery as st, startRunner as t, NOTICE_BATCH_CODE as tn, AgentConfigDeleteQuery as tr, BrowserOpenRequest as tt, ImageEngineRegistry as u, githubPrId as un, ProviderId as ur, AutomationGuardsPatch as ut, installClaudeSdk as v, KillSwitchRequest as vn, discriminatedUnion as vr, TriageDecisionRequest as vt, ownNodeEnv as w, Artifact as wn, object as wr, FileReadQuery as wt, resolveNpm as x, ReviewVerdict as xn, literal as xr, UpdateAutomationProjectSettingsRequest as xt, isClaudeSdkInstalled as y, LEGACY_SIZE_LIMITS as yn, int as yr, TriageReport as yt, UpdateSessionRequest as z, SpeechSummaryRequest as zn, UpdateProjectRequest as zt };
|
|
29586
29661
|
|
|
29587
|
-
//# sourceMappingURL=runner-
|
|
29662
|
+
//# sourceMappingURL=runner-DjavcMnG.js.map
|