gcf-aif-ext 0.20.0 → 0.20.1
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 +4 -0
- package/extension.json +1 -1
- package/lib/edits.js +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,6 +50,10 @@ Updating preserves `gcf/`, `cnlp.config.json` and the pre-commit hook. Run `ai-f
|
|
|
50
50
|
|
|
51
51
|
On Windows, run `extension add` and `extension update` from PowerShell or cmd, not Git Bash: the installer unpacks with `tar`, and Git Bash's GNU tar reads `C:\…` as a remote host (`Cannot connect to C: resolve failed`). The Windows `tar.exe` handles it.
|
|
52
52
|
|
|
53
|
+
### 0.20.1
|
|
54
|
+
|
|
55
|
+
- `edits diff|commit|discard` on a path with no change left ends its error with `gcf-refusal: {"code":"clean","paths":[…],"left":[…]}`: the clean paths, and the named ones still edited. A board whose refusal list went stale (another card's Commit took the files) knows nothing is left to fix.
|
|
56
|
+
|
|
53
57
|
### 0.20.0
|
|
54
58
|
|
|
55
59
|
- `edits diff|commit|discard --path <p>…`: the hand edits under `gcf/` that a move's refusal names. `diff` shows the staged part and the part not staged (`--json`); `commit` records them as they are, `gcf(edit): <n> files`, through the gate; `discard` puts them back as the last commit has them, a new file deleted. Commit and discard are the operator's moves: a run and a board thread are refused, and the deny group `human-moves` holds them.
|
package/extension.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/lee-to/ai-factory/2.x/schemas/extension.schema.json",
|
|
3
3
|
"name": "gcf-aif-ext",
|
|
4
|
-
"version": "0.20.
|
|
4
|
+
"version": "0.20.1",
|
|
5
5
|
"description": "Game Context Framework for AI Factory",
|
|
6
6
|
"skills": [
|
|
7
7
|
"skills/gcf-init",
|
package/lib/edits.js
CHANGED
|
@@ -6,6 +6,7 @@ import { spawnSync } from 'node:child_process';
|
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
import { dirtyGcf, literal, restoreFromHead } from './git.js';
|
|
8
8
|
import { locked } from './main-lock.js';
|
|
9
|
+
import { refusal } from './refusal.js';
|
|
9
10
|
import { commitMove } from './unit-ops.js';
|
|
10
11
|
|
|
11
12
|
/** A path from the project with `/`: the form dirtyGcf gives and a refusal names. */
|
|
@@ -25,8 +26,14 @@ function changed(projectDir, paths, verb) {
|
|
|
25
26
|
const dirty = new Set(dirtyGcf(projectDir));
|
|
26
27
|
const files = [...new Set(paths.map((p) => norm(projectDir, p)))];
|
|
27
28
|
const off = files.filter((f) => !dirty.has(f));
|
|
29
|
+
// `clean`: a board's list gone stale (one card's Commit took the file another names) learns
|
|
30
|
+
// what is left to act on, none when all of it is committed or put back already.
|
|
28
31
|
if (off.length)
|
|
29
|
-
throw
|
|
32
|
+
throw refusal(
|
|
33
|
+
'clean',
|
|
34
|
+
{ paths: off, left: files.filter((f) => dirty.has(f)) },
|
|
35
|
+
`edits ${verb}: no change under gcf/ to ${verb} in ${off.join(', ')}`,
|
|
36
|
+
);
|
|
30
37
|
|
|
31
38
|
return files;
|
|
32
39
|
}
|