@kitschpatrol/chagent 0.2.0 → 0.3.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/dist/bin/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as version, S as maxTimeoutMinutes, b as defaultModels, i as generateChangelog, l as agentNames, n as previewChangelog, r as reviewChangelog, s as writeChangelog, t as assertReviewTerminal, u as efforts, x as defaults, y as setLogger } from "../review-
|
|
3
|
-
import { n as assertAmendable, t as amendRelease } from "../lib-
|
|
2
|
+
import { C as version, S as maxTimeoutMinutes, b as defaultModels, i as generateChangelog, l as agentNames, n as previewChangelog, r as reviewChangelog, s as writeChangelog, t as assertReviewTerminal, u as efforts, x as defaults, y as setLogger } from "../review-ClBbl31P.js";
|
|
3
|
+
import { n as assertAmendable, t as amendRelease } from "../lib-advgvAk1.js";
|
|
4
4
|
import { t as createProgressLine } from "../progress-DQtRnH1N.js";
|
|
5
5
|
import { createLogger } from "lognow";
|
|
6
6
|
import path from "node:path";
|
package/dist/lib/bumpp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as git, i as generateChangelog, m as localDate, r as reviewChangelog, s as writeChangelog, t as assertReviewTerminal } from "../review-
|
|
1
|
+
import { g as git, i as generateChangelog, m as localDate, r as reviewChangelog, s as writeChangelog, t as assertReviewTerminal } from "../review-ClBbl31P.js";
|
|
2
2
|
import { t as createProgressLine } from "../progress-DQtRnH1N.js";
|
|
3
3
|
|
|
4
4
|
// src/lib/bumpp.ts
|
package/dist/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineConfig, c as createAgent, i as generateChangelog, n as previewChangelog, o as loadConfig, r as reviewChangelog, s as writeChangelog, y as setLogger } from "../review-
|
|
2
|
-
import { t as amendRelease } from "../lib-
|
|
1
|
+
import { a as defineConfig, c as createAgent, i as generateChangelog, n as previewChangelog, o as loadConfig, r as reviewChangelog, s as writeChangelog, y as setLogger } from "../review-ClBbl31P.js";
|
|
2
|
+
import { t as amendRelease } from "../lib-advgvAk1.js";
|
|
3
3
|
|
|
4
4
|
export { amendRelease, createAgent, defineConfig, generateChangelog, loadConfig, previewChangelog, reviewChangelog, setLogger, writeChangelog };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as isAncestor, d as LOCKFILE_PATH, f as inspectRepository, g as git, h as manifestAt, p as isVersionOnlyChange, s as writeChangelog, v as runCommand } from "./review-
|
|
1
|
+
import { _ as isAncestor, d as LOCKFILE_PATH, f as inspectRepository, g as git, h as manifestAt, p as isVersionOnlyChange, s as writeChangelog, v as runCommand } from "./review-ClBbl31P.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { realpath } from "node:fs/promises";
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ import { isCancel, select } from "@clack/prompts";
|
|
|
15
15
|
|
|
16
16
|
// package.json
|
|
17
17
|
var name = "@kitschpatrol/chagent";
|
|
18
|
-
var version = "0.
|
|
18
|
+
var version = "0.3.0";
|
|
19
19
|
var engines = { "node": "^24.16.0 || >=26.3.0" };
|
|
20
20
|
|
|
21
21
|
// src/lib/defaults.ts
|
|
@@ -229,8 +229,11 @@ async function readBlobs(root, objects) {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
// src/lib/repository.ts
|
|
232
|
-
/**
|
|
233
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Matches package manager lockfile paths. Excludes npm-shrinkwrap.json, which
|
|
234
|
+
* is published and constrains consumers.
|
|
235
|
+
*/
|
|
236
|
+
const LOCKFILE_PATH = /(?:^|\/)(?:pnpm-lock\.yaml|package-lock\.json|yarn\.lock|bun\.lockb?|deno\.lock|uv\.lock|poetry\.lock|pdm\.lock|Pipfile\.lock|Cargo\.lock|Gemfile\.lock|composer\.lock|go\.sum)$/v;
|
|
234
237
|
const TAG_DECORATION = "tag: refs/tags/";
|
|
235
238
|
const GITHUB_REMOTE = /github\.com[:\/]([^\/]+\/[^\/]+?)(?:\.git)?$/v;
|
|
236
239
|
const manifestSchema$1 = z.object({
|
|
@@ -628,7 +631,11 @@ runtime compatibility, installation and distribution, documentation and examples
|
|
|
628
631
|
dependencies, builds, tests, CI, and release tooling. Include meaningful maintenance
|
|
629
632
|
even when it is the only change in a release. Group routine runtime dependency
|
|
630
633
|
updates into a useful entry, and group development dependency/tooling refreshes
|
|
631
|
-
instead of listing every version.
|
|
634
|
+
instead of listing every version. A dependency change is a change to a declared
|
|
635
|
+
requirement, such as a version range in a manifest, workspace catalog, or
|
|
636
|
+
override. Lockfiles only record resolved versions: omit refreshed resolutions and
|
|
637
|
+
transitive updates that appear only in a lockfile, even when the same commit
|
|
638
|
+
changes other files. Identify important packages or migrations when
|
|
632
639
|
the evidence supports them. Classify dependency and tooling changes by their
|
|
633
640
|
actual impact: fixing runtime compatibility for consumers is Fixed, while fixing
|
|
634
641
|
compatibility of contributor tooling alone is Maintenance. Documentation
|
|
@@ -703,8 +710,9 @@ Before returning, check coverage across behavior/API, compatibility, dependencie
|
|
|
703
710
|
documentation, build/test/CI, and distribution. Do not drop a change just because
|
|
704
711
|
its commit is called chore, docs, build, or dependency updates. Return an empty
|
|
705
712
|
changes array only when the evidence is entirely release-version bookkeeping,
|
|
706
|
-
generated artifacts, formatting noise, or
|
|
707
|
-
entries. Do not pad the result with
|
|
713
|
+
lockfile-only resolution changes, generated artifacts, formatting noise, or
|
|
714
|
+
changes already covered by existing entries. Do not pad the result with
|
|
715
|
+
unsupported changes.`;
|
|
708
716
|
/** Invalidates cached drafts whenever the instructions change. */
|
|
709
717
|
const instructionVersion = hash(instructions);
|
|
710
718
|
|
|
@@ -1315,12 +1323,13 @@ const GENERATED_DIRECTORY = /^(?:build|changelog|coverage|dist)(?:\/|$)/iv;
|
|
|
1315
1323
|
const GENERATED_ANYWHERE = /(?:^|\/)(?:changelog(?:\.md)?$|node_modules(?:\/|$))/iv;
|
|
1316
1324
|
/**
|
|
1317
1325
|
* Generated output lives at the top of a package, so `packages/build` and
|
|
1318
|
-
* `src/dist` remain source.
|
|
1326
|
+
* `src/dist` remain source. Lockfiles record resolved versions, not declared
|
|
1327
|
+
* dependency ranges.
|
|
1319
1328
|
*/
|
|
1320
1329
|
function ignored(file, packages) {
|
|
1321
1330
|
const owner = packages.findLast(({ directory }) => file.startsWith(`${directory}/`));
|
|
1322
1331
|
const relative = owner === void 0 ? file : file.slice(owner.directory.length + 1);
|
|
1323
|
-
return GENERATED_ANYWHERE.test(file) || GENERATED_DIRECTORY.test(relative);
|
|
1332
|
+
return LOCKFILE_PATH.test(file) || GENERATED_ANYWHERE.test(file) || GENERATED_DIRECTORY.test(relative);
|
|
1324
1333
|
}
|
|
1325
1334
|
async function scopes(repository, pkg, ref) {
|
|
1326
1335
|
if (pkg.directory === ".") return ["."];
|
|
@@ -1349,11 +1358,7 @@ function manifestObjects(files, before, after) {
|
|
|
1349
1358
|
return files.flatMap((file) => isManifest(file) ? [`${before}:${file}`, `${after}:${file}`] : []);
|
|
1350
1359
|
}
|
|
1351
1360
|
function hasSourceChanges(files, commit, blobs) {
|
|
1352
|
-
|
|
1353
|
-
if (LOCKFILE_PATH.test(file)) continue;
|
|
1354
|
-
if (!isManifest(file) || !isVersionOnlyEdit(blobs.get(`${commit}^:${file}`), blobs.get(`${commit}:${file}`))) return true;
|
|
1355
|
-
}
|
|
1356
|
-
return files.length > 0 && files.every((file) => LOCKFILE_PATH.test(file));
|
|
1361
|
+
return files.some((file) => !isManifest(file) || !isVersionOnlyEdit(blobs.get(`${commit}^:${file}`), blobs.get(`${commit}:${file}`)));
|
|
1357
1362
|
}
|
|
1358
1363
|
/** Read commits and their changed files from one process. */
|
|
1359
1364
|
async function commitsInRange(root, range, paths) {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -284,7 +284,7 @@ Chagent reads reachable version tags and commit history regardless of the projec
|
|
|
284
284
|
|
|
285
285
|
GitHub enrichment uses release dates and commit-associated PR information. PR lookups batch unique commits across all requested releases and packages; each release receives only its associated PRs. **GitHub release-note bodies are never generation inputs.** Changelog files and generated build output are excluded from source evidence. Existing changelog prose is supplied only to preserve edits and avoid duplicate entries.
|
|
286
286
|
|
|
287
|
-
The agent chooses which historical source files, public interfaces, documentation, and build configuration to inspect. It reads Git snapshots at the supplied release refs instead of treating current or uncommitted files as historical evidence. `maxInputChars` bounds the starting context supplied to agents; it does not restrict which repository files they can investigate. Requests prioritize release boundaries and existing human entries, then fit optional starting evidence into the remaining budget. An individual release's existing entries are never truncated. `timeout` sets the minutes each agent session may run.
|
|
287
|
+
The agent chooses which historical source files, public interfaces, documentation, and build configuration to inspect. It reads Git snapshots at the supplied release refs instead of treating current or uncommitted files as historical evidence. `maxInputChars` bounds the starting context supplied to agents; it does not restrict which repository files they can investigate. Requests prioritize release boundaries and existing human entries, then fit optional starting evidence into the remaining budget. An individual release's existing entries are never truncated. `timeout` sets the minutes each agent session may run. Dependency entries reflect declared version ranges; lockfile-only resolution changes and pure npm version-bump bookkeeping are excluded.
|
|
288
288
|
|
|
289
289
|
Agents return structured changes with evidence references. Stray whitespace and list markers in descriptions are normalized. A response that still fails validation gets one correction request; a second failure stops the run before anything is written or cached. Application code owns the header, release boundaries, Markdown insertion, and Git writes. Agents run in the repository: Codex uses a read-only sandbox with approval requests disabled; Claude exposes read/search and Bash tools in [`dontAsk` mode](https://code.claude.com/docs/en/permissions), which allows read-only commands and denies actions requiring permission. Customizations are disabled for these invocations. Only chagent writes the reviewed changelog. Repository content is sent to the selected agent service using your existing account.
|
|
290
290
|
|