akm-cli 0.10.261001-beta → 0.10.261002-beta
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 +11 -0
- package/dist/sources/providers/git-stash.js +19 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.10.261002] - 2026-10-12
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **`akm sync` and improve's pre-run sync no longer fail on tracked files under a git-ignored directory.** A stash whose
|
|
14
|
+
`.gitignore` lists `.akm/evals/runs/` after files under it were committed has tracked, ignored files that change
|
|
15
|
+
with every eval run (the `latest` symlink). The sync picked them with the managed paths and git refused to stage them
|
|
16
|
+
("The following paths are ignored by one of your .gitignore files"), so the whole sync stopped: no fetch, merge,
|
|
17
|
+
commit or push. Sync now leaves any path a `.gitignore` rule matches out of the paths it picks, tracked or not; those
|
|
18
|
+
edits stay uncommitted in the working tree. An explicit `paths` request naming an ignored path still fails.
|
|
19
|
+
|
|
9
20
|
## [0.10.261001] - 2026-10-12
|
|
10
21
|
|
|
11
22
|
### Changed
|
|
@@ -280,7 +280,7 @@ export function saveGitStash(name, message, writableOverride, options) {
|
|
|
280
280
|
: "";
|
|
281
281
|
const changedPaths = listGitChangedPaths(repoDir);
|
|
282
282
|
const requestedPaths = normalizeExactPaths(repoDir, options?.paths ??
|
|
283
|
-
(managedRelativeRoot && managedRelativeRoot !== ".." && !managedRelativeRoot.startsWith("../")
|
|
283
|
+
withoutIgnoredPaths(repoDir, managedRelativeRoot && managedRelativeRoot !== ".." && !managedRelativeRoot.startsWith("../")
|
|
284
284
|
? changedPaths.filter((changedPath) => changedPath === managedRelativeRoot || changedPath.startsWith(`${managedRelativeRoot}/`))
|
|
285
285
|
: managedFallbackPaths(repoDir, changedPaths)));
|
|
286
286
|
if (requestedPaths.length === 0) {
|
|
@@ -418,6 +418,16 @@ function managedFallbackPaths(repoDir, changedPaths) {
|
|
|
418
418
|
const prefixes = [...ownedDirs, ".akm"];
|
|
419
419
|
return changedPaths.filter((changedPath) => prefixes.some((prefix) => changedPath === prefix || changedPath.startsWith(`${prefix}/`)));
|
|
420
420
|
}
|
|
421
|
+
/**
|
|
422
|
+
* Drop paths a `.gitignore` rule matches from the paths sync picks for itself. Ignoring means "do
|
|
423
|
+
* not publish", also for a file committed before the rule existed (`.akm/evals/runs/latest` in a
|
|
424
|
+
* stash whose eval runs are ignored): git refuses to stage such a file, which would fail the whole
|
|
425
|
+
* sync. Only an explicit `paths` request still reaches {@link assertNoIgnoredExactPaths}.
|
|
426
|
+
*/
|
|
427
|
+
function withoutIgnoredPaths(repoDir, paths) {
|
|
428
|
+
const ignored = new Set(listIgnoredExactPaths(repoDir, paths, { includeTracked: true }));
|
|
429
|
+
return ignored.size === 0 ? paths : paths.filter((candidate) => !ignored.has(candidate));
|
|
430
|
+
}
|
|
421
431
|
function normalizeExactPaths(repoDir, paths) {
|
|
422
432
|
const normalized = [...new Set(paths.map((value) => value.replaceAll(path.sep, "/")))];
|
|
423
433
|
for (const filePath of normalized) {
|
|
@@ -444,11 +454,17 @@ function runExactPathChunks(repoDir, command, paths, options = {}) {
|
|
|
444
454
|
}
|
|
445
455
|
return results;
|
|
446
456
|
}
|
|
447
|
-
|
|
457
|
+
/**
|
|
458
|
+
* The subset of `paths` a `.gitignore` rule matches. By default a tracked file never counts (git's
|
|
459
|
+
* own `check-ignore` skips it); `includeTracked` asks about the rule alone, as `git add` does.
|
|
460
|
+
*/
|
|
461
|
+
export function listIgnoredExactPaths(repoDir, paths, options = {}) {
|
|
448
462
|
if (paths.length === 0)
|
|
449
463
|
return [];
|
|
450
464
|
const input = `${paths.join("\0")}\0`;
|
|
451
|
-
const result = runGit(["-C", repoDir, "check-ignore", "-z", "--stdin"
|
|
465
|
+
const result = runGit(["-C", repoDir, "check-ignore", "-z", "--stdin", ...(options.includeTracked ? ["--no-index"] : [])], {
|
|
466
|
+
input,
|
|
467
|
+
});
|
|
452
468
|
if (result.status === 1)
|
|
453
469
|
return [];
|
|
454
470
|
if (result.status !== 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "akm-cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.261002-beta",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "akm (Agent Knowledge Manager) — a portable, local-first capability library for AI agents. Discover, load, share, and improve reusable skills, scripts, workflows, and knowledge across any shell-capable coding agent, including Claude Code, OpenCode, and Cursor.",
|
|
6
6
|
"keywords": [
|