@open-agent-toolkit/cli 0.0.40 → 0.0.41
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/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-complete/SKILL.md +30 -12
- package/assets/skills/oat-project-pr-final/SKILL.md +2 -1
- package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
- package/dist/commands/project/archive/archive-utils.js +7 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-complete
|
|
3
|
-
version: 1.4.
|
|
3
|
+
version: 1.4.3
|
|
4
4
|
description: Use when all implementation work is finished and the project is ready to close. Marks the OAT project lifecycle as complete.
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
user-invocable: true
|
|
@@ -310,23 +310,40 @@ Archive happens after PR description generation (so artifacts are readable at tr
|
|
|
310
310
|
|
|
311
311
|
The archive-side effects in this step are CLI-owned. Follow the canonical behavior from `packages/cli/src/commands/project/archive/archive-utils.ts` rather than inventing separate S3 or summary-export logic inside the skill.
|
|
312
312
|
|
|
313
|
+
**Anti-pattern (do NOT do this):** Running `git check-ignore` on the
|
|
314
|
+
`.oat/projects/archived` directory itself to decide durability. A common
|
|
315
|
+
gitignore shape for this repo is `.oat/projects/archived/**`, which leaves the
|
|
316
|
+
directory visible in the tree while ignoring every file placed inside. A
|
|
317
|
+
directory-level check reports "not ignored" and produces the inverse of the
|
|
318
|
+
intended decision — archiving in the worktree when the archive must actually
|
|
319
|
+
go to the primary repo. Always probe a representative path **inside** the
|
|
320
|
+
archive directory (the project subpath or a probe filename), matching the CLI
|
|
321
|
+
helper at `packages/cli/src/commands/project/archive/archive-utils.ts`.
|
|
322
|
+
|
|
313
323
|
```bash
|
|
314
324
|
ARCHIVED_ROOT=".oat/projects/archived"
|
|
325
|
+
# ARCHIVE_RELATIVE_PATH is the contents-level probe: a hypothetical file that
|
|
326
|
+
# would live inside the archive directory. This is the same probe shape the
|
|
327
|
+
# CLI helper uses — do not simplify this to the directory itself.
|
|
315
328
|
ARCHIVE_RELATIVE_PATH=".oat/projects/archived/${PROJECT_NAME}"
|
|
316
329
|
PRIMARY_REPO_ARCHIVE=""
|
|
317
|
-
|
|
330
|
+
ARCHIVE_CONTENTS_TRACKED="true"
|
|
318
331
|
USE_PRIMARY_REPO_ARCHIVE="false"
|
|
319
332
|
|
|
320
|
-
#
|
|
321
|
-
#
|
|
322
|
-
#
|
|
333
|
+
# Will a newly-archived file at ${ARCHIVE_RELATIVE_PATH} actually be tracked in
|
|
334
|
+
# this checkout? Probe a representative path INSIDE the directory, not the
|
|
335
|
+
# directory itself. A `.oat/projects/archived/**` gitignore pattern leaves the
|
|
336
|
+
# directory visible in the tree but ignores everything placed inside, so a
|
|
337
|
+
# directory-level check reports "tracked" and gives the inverse of the
|
|
338
|
+
# intended answer.
|
|
323
339
|
if git check-ignore --quiet --no-index "$ARCHIVE_RELATIVE_PATH" 2>/dev/null; then
|
|
324
|
-
|
|
340
|
+
ARCHIVE_CONTENTS_TRACKED="false"
|
|
325
341
|
fi
|
|
326
342
|
|
|
327
|
-
#
|
|
328
|
-
#
|
|
329
|
-
|
|
343
|
+
# Fall back to the primary checkout whenever archive contents are local-only
|
|
344
|
+
# in the current worktree, regardless of whether the archive directory itself
|
|
345
|
+
# happens to exist in the tree.
|
|
346
|
+
if [[ "$ARCHIVE_CONTENTS_TRACKED" == "false" ]] && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
330
347
|
GIT_COMMON_DIR=$(git rev-parse --git-common-dir 2>/dev/null || true)
|
|
331
348
|
GIT_DIR=$(git rev-parse --git-dir 2>/dev/null || true)
|
|
332
349
|
if [[ -n "$GIT_COMMON_DIR" && -n "$GIT_DIR" && "$GIT_COMMON_DIR" != "$GIT_DIR" ]]; then
|
|
@@ -373,7 +390,7 @@ echo "Project archived to $ARCHIVE_PATH"
|
|
|
373
390
|
- Ask the user explicitly: "Primary repo archive path is unavailable, so this archive may be lost when the worktree is deleted. Continue with local-only archive anyway?"
|
|
374
391
|
- If the user declines, skip archiving and continue the completion flow without archive.
|
|
375
392
|
- Resolve the durable repo root from `git rev-parse --git-common-dir` and `git rev-parse --git-dir`, matching the CLI helper in `packages/cli/src/commands/project/archive/archive-utils.ts`. Do not rely on a `main` checkout or default-branch naming.
|
|
376
|
-
- Apply this guard only when `git check-ignore --quiet --no-index "$ARCHIVE_RELATIVE_PATH"` reports that the archive
|
|
393
|
+
- Apply this guard only when `git check-ignore --quiet --no-index "$ARCHIVE_RELATIVE_PATH"` reports that the archive **contents** are local-only in the current checkout. `$ARCHIVE_RELATIVE_PATH` must be a path **inside** the archive directory (the project subpath), never the directory itself — see the anti-pattern note above the bash block.
|
|
377
394
|
|
|
378
395
|
**Git handling after archive:**
|
|
379
396
|
|
|
@@ -387,7 +404,7 @@ This stages the deletions from the shared directory. The archived copy is preser
|
|
|
387
404
|
|
|
388
405
|
**Worktree archive target (required when available):**
|
|
389
406
|
|
|
390
|
-
If running from a git worktree, prefer the primary repo archive directory
|
|
407
|
+
If running from a git worktree, prefer the primary repo archive directory whenever a newly-archived file inside `.oat/projects/archived/` would be local-only in the current checkout.
|
|
391
408
|
|
|
392
409
|
Reference path:
|
|
393
410
|
|
|
@@ -399,7 +416,8 @@ PRIMARY_REPO_ARCHIVE="${PRIMARY_REPO_ROOT}/.oat/projects/archived"
|
|
|
399
416
|
|
|
400
417
|
Guidance:
|
|
401
418
|
|
|
402
|
-
- In a worktree,
|
|
419
|
+
- In a worktree, prefer `PRIMARY_REPO_ARCHIVE` whenever `git check-ignore --quiet --no-index "$ARCHIVE_RELATIVE_PATH"` reports the archive **contents** as ignored — regardless of whether the archive directory itself happens to exist in the tree. Only archive in the current checkout when a hypothetical file at `.oat/projects/archived/<project>/state.md` would actually be tracked here.
|
|
420
|
+
- Do not check `git check-ignore` on `.oat/projects/archived` (the directory itself). A `.oat/projects/archived/**` ignore pattern leaves the directory unignored while ignoring all contents, so a directory-level check reports "tracked" and an agent can mistakenly archive in the worktree.
|
|
403
421
|
- Do not treat the worktree-local archive as durable.
|
|
404
422
|
- If forced to use a local-only archive, warn and require explicit user confirmation.
|
|
405
423
|
- Always write the dated `archive.summaryExportPath` copy into the current checkout (`repoRoot`), even when the project archive itself is written to the primary checkout.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-pr-final
|
|
3
|
-
version: 1.3.
|
|
3
|
+
version: 1.3.3
|
|
4
4
|
description: Use when an active OAT project has completed all phases and is ready for final merge to main. Generates the final OAT lifecycle PR description from artifacts and review status, then creates the PR automatically.
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
user-invocable: true
|
|
@@ -255,6 +255,7 @@ Local path exclusion:
|
|
|
255
255
|
|
|
256
256
|
- Read `.oat/config.json` and extract `localPaths` (glob patterns for gitignored directories).
|
|
257
257
|
- Do **not** include References links to any path that matches a `localPaths` pattern — those paths are gitignored and will not exist on the remote.
|
|
258
|
+
- Evaluate the match against the actual **file or subpath** you are about to link (e.g. `.oat/projects/<proj>/pr/project-pr-2026-04-01.md`), not against the parent directory. A pattern like `.oat/**/pr` is shorthand for "everything under this directory is local-only"; a directory-level `git check-ignore` on `.oat/projects/<proj>/pr` can report "not ignored" even when every file inside is local-only, so a directory-level check will produce a broken reference link.
|
|
258
259
|
- Common matches: `.oat/projects/**/reviews/archived`, `.oat/projects/**/pr`. Active `reviews/` paths remain eligible for References when they are tracked; only archived review paths should be treated as local-only by default.
|
|
259
260
|
|
|
260
261
|
Example link context:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/archive-utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,QAAQ,CAAC;AAIhB,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE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{"version":3,"file":"archive-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/archive-utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,QAAQ,CAAC;AAIhB,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,KAChD,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,UAAU,sCAAuC,SAAQ,iCAAiC;IACxF,qBAAqB,CAAC,EAAE,OAAO,qB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G;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CA4BA;AAED,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GAClB,MAAM,CAIR;AA4JD,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iCAAiC,EAC1C,YAAY,GAAE,sCAA2C,GACxD,OAAO,CAAC,gCAAgC,CAAC,CAwG3C;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,4BAA4B,EACrC,YAAY,GAAE,iCAAsC,GACnD,OAAO,CAAC,2BAA2B,CAAC,CA0CtC"}
|
|
@@ -98,6 +98,13 @@ function isExitCode(error, code) {
|
|
|
98
98
|
'code' in error &&
|
|
99
99
|
Number(error.code) === code);
|
|
100
100
|
}
|
|
101
|
+
// archiveProjectPath must be the contents-level probe path
|
|
102
|
+
// (.oat/projects/archived/<projectName>), not the archive directory itself
|
|
103
|
+
// (.oat/projects/archived). A `.oat/projects/archived/**` gitignore pattern
|
|
104
|
+
// leaves the directory visible in the tree while ignoring every file placed
|
|
105
|
+
// inside — a directory-level check reports "not ignored" and produces the
|
|
106
|
+
// inverse of the intended durability decision. Keep the probe inside the
|
|
107
|
+
// directory; the `oat-project-complete` skill documents the same invariant.
|
|
101
108
|
async function isGitignoredArchivePath(repoRoot, archiveProjectPath, dependencies) {
|
|
102
109
|
const execFile = dependencies.gitExecFile ?? execFileAsync;
|
|
103
110
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open Agent Toolkit CLI",
|
|
6
6
|
"homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"ora": "^9.0.0",
|
|
34
34
|
"yaml": "2.8.2",
|
|
35
35
|
"zod": "^3.25.76",
|
|
36
|
-
"@open-agent-toolkit/control-plane": "0.0.
|
|
36
|
+
"@open-agent-toolkit/control-plane": "0.0.41"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^22.10.0",
|