@open-agent-toolkit/cli 0.0.64 → 0.0.66

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.
@@ -21,7 +21,7 @@ For detailed `.oat/` tree semantics, see:
21
21
  - Local runtime config (per-developer state): `.oat/config.local.json`
22
22
  - Active idea: `activeIdea` in `.oat/config.local.json` (repo) or `~/.oat/config.json` (user)
23
23
  - Projects root config: `projects.root` in `.oat/config.json` (read via `oat config get projects.root`)
24
- - Archive config: `archive.s3Uri`, `archive.s3SyncOnComplete`, `archive.summaryExportPath`, and `archive.wrapUpExportPath` in `.oat/config.json`
24
+ - Archive config: `archive.s3Uri`, `archive.s3SyncOnComplete`, `archive.summaryExportPath`, `archive.wrapUpExportPath`, `archive.awsProfile`, and `archive.awsRegion` in `.oat/config.json`
25
25
  - Project manifests/config: `.oat/sync/`
26
26
 
27
27
  Config discovery via CLI:
@@ -108,6 +108,8 @@ Current schema keys:
108
108
  | `archive.s3SyncOnComplete` | `boolean` | `false` | When `true`, `oat-project-complete` uploads the archived project to the configured S3 archive after local archive succeeds |
109
109
  | `archive.summaryExportPath` | `string` | - | Repo-relative directory where completion exports `summary.md` as a dated snapshot like `20260401-<project-name>.md` for durable tracked reference |
110
110
  | `archive.wrapUpExportPath` | `string` | - | Repo-relative directory where `oat-wrap-up` writes dated reports like `20260413-wrap-up-past-week.md`; when unset, the skill falls back to `.oat/repo/reference/wrap-ups/` |
111
+ | `archive.awsProfile` | `string` | - | Optional AWS named profile forwarded as `AWS_PROFILE` to every `aws` invocation in archive flows (`oat-project-complete` S3 sync, `oat project archive sync`). Overrides ambient shell `AWS_PROFILE` / `AWS_DEFAULT_PROFILE` when set. |
112
+ | `archive.awsRegion` | `string` | - | Optional AWS region forwarded as `AWS_REGION` to every `aws` invocation in archive flows. Overrides ambient shell `AWS_REGION` / `AWS_DEFAULT_REGION` when set. |
111
113
 
112
114
  All `documentation.*` keys are managed via `oat config get/set` and are set automatically by `oat docs init`.
113
115
  The `git.defaultBranch` key is auto-detected during `oat init` and can be overridden via `oat config set git.defaultBranch <branch>`.
@@ -62,6 +62,7 @@ On completion, OAT now treats archive handling as part of the closeout lifecycle
62
62
 
63
63
  - Local archive is always written to `.oat/projects/archived/<project>/`.
64
64
  - If `.oat/config.json` enables `archive.s3SyncOnComplete` and sets `archive.s3Uri`, completion also attempts an S3 upload for a dated snapshot such as `<archive.s3Uri>/<repo-slug>/projects/20260401-<project>/`.
65
+ - If `.oat/config.json` sets `archive.awsProfile` and/or `archive.awsRegion`, those values are forwarded to every `aws` invocation triggered by completion (preflight checks + `aws s3 sync`) and override any ambient shell `AWS_PROFILE` / `AWS_DEFAULT_PROFILE` / `AWS_REGION` / `AWS_DEFAULT_REGION` values. The repo's archive-scoped credentials are treated as deliberate intent so users don't have to unset shell env vars before running completion. See [`config-and-local-state.md`](../../cli-utilities/config-and-local-state.md) for the full precedence chain.
65
66
  - If `.oat/config.json` sets `archive.summaryExportPath`, completion copies `summary.md` to `<archive.summaryExportPath>/20260401-<project>.md`.
66
67
  - Missing or unusable AWS CLI configuration produces warnings during completion instead of blocking closeout.
67
68
  - `oat project archive sync` can later sync all archived projects, or one named archived project, back down from S3; it selects the latest dated remote snapshot and materializes it into the local bare archive tree.
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.0.64",
3
- "docs-config": "0.0.64",
4
- "docs-theme": "0.0.64",
5
- "docs-transforms": "0.0.64"
2
+ "cli": "0.0.66",
3
+ "docs-config": "0.0.66",
4
+ "docs-theme": "0.0.66",
5
+ "docs-transforms": "0.0.66"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-complete
3
- version: 1.4.4
3
+ version: 1.4.5
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
@@ -379,10 +379,56 @@ echo "Project archived to $ARCHIVE_PATH"
379
379
 
380
380
  - Always archive locally first. The local archive is the authoritative completion artifact even when remote sync is also configured.
381
381
  - If `archive.summaryExportPath` is configured and `summary.md` exists after archive, copy it to `{repoRoot}/{archive.summaryExportPath}/YYYYMMDD-{PROJECT_NAME}.md`.
382
- - If `archive.s3SyncOnComplete=true` and `archive.s3Uri` is configured, sync the archived project to `{archive.s3Uri}/{repo-slug}/{PROJECT_NAME}/`. The S3 sync excludes process artifacts (`reviews/*`, `pr/*`) — only core deliverables (discovery, spec, design, plan, implementation, summary, state) are uploaded. The CLI enforces this via `S3_ARCHIVE_SYNC_EXCLUDES` in `archive-utils.ts`.
382
+ - If `archive.s3SyncOnComplete=true` and `archive.s3Uri` is configured, sync the archived project to `{archive.s3Uri}/{repo-slug}/projects/YYYYMMDD-{PROJECT_NAME}/`. The S3 sync excludes process artifacts (`reviews/*`, `pr/*`) — only core deliverables (discovery, spec, design, plan, implementation, summary, state) are uploaded. The CLI enforces this via `S3_ARCHIVE_SYNC_EXCLUDES` in `archive-utils.ts`.
383
383
  - If AWS CLI is missing or unusable for that S3 sync, warn and continue. Completion must not fail after the local archive succeeds.
384
384
  - If `archive.s3SyncOnComplete` is false or `archive.s3Uri` is unset, skip remote sync without prompting.
385
385
 
386
+ **AWS credential handling for archive S3 sync (required):**
387
+
388
+ When `archive.s3SyncOnComplete=true` and `archive.s3Uri` is set, the agent MUST honor the repo's archive-scoped AWS credentials instead of falling back to whatever shell profile/region happens to be active. The contract mirrors `buildAwsEnv` in `packages/cli/src/commands/project/archive/archive-utils.ts`.
389
+
390
+ - **Read both keys from OAT config before any AWS CLI call:**
391
+
392
+ ```bash
393
+ ARCHIVE_AWS_PROFILE=$(oat config get archive.awsProfile 2>/dev/null || true)
394
+ ARCHIVE_AWS_REGION=$(oat config get archive.awsRegion 2>/dev/null || true)
395
+ ```
396
+
397
+ - **Apply them to every `aws` invocation tied to archive sync** — preflight checks (`aws --version`, `aws sts get-caller-identity`), bucket access probes (`aws s3 ls`), and the actual `aws s3 sync`. Do not mix configured values across some calls and ambient values across others.
398
+ - **Configured archive values WIN over ambient shell AWS env vars.** A non-empty `archive.awsProfile` overrides any `AWS_PROFILE` or `AWS_DEFAULT_PROFILE` already exported in the shell. A non-empty `archive.awsRegion` overrides `AWS_REGION` and `AWS_DEFAULT_REGION`. Treat the repo's archive-scoped declaration as deliberate intent — users should not have to unset shell env vars to get correct archive credentials. Empty/unset config values fall through to the AWS CLI's normal resolution chain.
399
+ - **Prefer the OAT CLI when it is available.** If you delegate archive sync to an `oat project archive ...` invocation, the CLI applies the canonical handling for you (config-resolved profile/region clobber the spawned env). Do not pass `--profile` / `--region` flags unless the user asked for a one-off override different from the repo config.
400
+ - **Manual AWS CLI fallback** — when no OAT command wraps the operation and the agent must call `aws` directly, pass the configured profile/region explicitly. Either use flags:
401
+
402
+ ```bash
403
+ AWS_FLAGS=()
404
+ if [[ -n "$ARCHIVE_AWS_PROFILE" ]]; then
405
+ AWS_FLAGS+=(--profile "$ARCHIVE_AWS_PROFILE")
406
+ fi
407
+ if [[ -n "$ARCHIVE_AWS_REGION" ]]; then
408
+ AWS_FLAGS+=(--region "$ARCHIVE_AWS_REGION")
409
+ fi
410
+
411
+ aws "${AWS_FLAGS[@]}" sts get-caller-identity
412
+ aws "${AWS_FLAGS[@]}" s3 sync \
413
+ "$ARCHIVE_PATH" \
414
+ "${ARCHIVE_S3_URI%/}/${REPO_SLUG}/projects/${SNAPSHOT_NAME}/" \
415
+ --exclude 'reviews/*' --exclude 'pr/*'
416
+ ```
417
+
418
+ …or set the equivalent env vars for the spawned process so the same precedence applies:
419
+
420
+ ```bash
421
+ AWS_ENV=()
422
+ [[ -n "$ARCHIVE_AWS_PROFILE" ]] && AWS_ENV+=("AWS_PROFILE=$ARCHIVE_AWS_PROFILE")
423
+ [[ -n "$ARCHIVE_AWS_REGION" ]] && AWS_ENV+=("AWS_REGION=$ARCHIVE_AWS_REGION")
424
+ env "${AWS_ENV[@]}" aws s3 sync ...
425
+ ```
426
+
427
+ Both shapes are acceptable; the AWS CLI treats `--profile` / `--region` and `AWS_PROFILE` / `AWS_REGION` env as higher precedence than `AWS_DEFAULT_*`, so the configured values win.
428
+
429
+ - **Report the resolved profile/region in the completion summary** so the user can confirm the right identity ran the sync, e.g. `Archive S3 sync used AWS profile=tkstang-artifact-sync region=us-east-1`. Do not echo raw access keys, session tokens, or any value from `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN`. If `archive.awsProfile` or `archive.awsRegion` is unset, report `<unset; using shell default>` for that field.
430
+ - **AccessDenied troubleshooting** — if `aws s3 sync` returns AccessDenied, confirm before retrying that the spawn actually used `archive.awsProfile` (not the ambient shell profile). A common pitfall is invoking `aws s3 sync` without flags from a shell where `AWS_PROFILE` points at an unrelated identity; rerun with the configured profile/region applied as above.
431
+
386
432
  **Worktree durability guard (required):**
387
433
 
388
434
  - If running in a worktree and the primary repo archive path is unavailable, do not silently continue with a local-only archive.
@@ -488,6 +534,7 @@ Show user:
488
534
 
489
535
  - "Project **{PROJECT_NAME}** marked as complete."
490
536
  - If archived: "Archived location: **{PROJECT_PATH}**"
537
+ - If S3 archive sync ran: include the resolved AWS profile and region used (e.g. `Archive S3 sync: profile=<archive.awsProfile> region=<archive.awsRegion>`). Show `<unset; using shell default>` for any field the config did not provide. Never echo raw credentials (`AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`, etc.).
491
538
  - Include commit hash and push result for the bookkeeping changes.
492
539
  - If PR was opened: include the PR URL.
493
540
  - If `oat_pr_url` is present, show it in the completion summary even when PR creation was skipped because the project already tracked an open PR.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-implement
3
- version: 2.0.6
3
+ version: 2.0.7
4
4
  description: Use when plan.md is ready for execution. Dispatches phase-level subagents with bounded fix loops; supports plan-declared parallel phase groups with worktree-isolated execution and ordered fan-in.
5
5
  argument-hint: '[--retry-limit <N>] [--dry-run]'
6
6
  disable-model-invocation: true
@@ -23,7 +23,7 @@ Execute the implementation plan task-by-task with full state tracking.
23
23
  **Purpose:** Execute plan tasks with TDD discipline, track progress, handle blockers.
24
24
 
25
25
  **CRITICAL — Bookkeeping commits are mandatory, not optional.**
26
- After every code commit and after every phase/review-fix completion, you MUST commit the OAT tracking files (`implementation.md`, `state.md`, `plan.md`) as a separate bookkeeping commit. Do not defer, batch, or skip these commits under the reasoning that they "aren't related to the implementation." Skipping a bookkeeping commit is the primary cause of cross-session state drift and will cause the next implementation run to fail bookkeeping cross-checks. If bookkeeping commits feel frequent, that is the intended design — they are cheap and they prevent drift.
26
+ After every code commit and after every phase/review-fix completion, you MUST commit the OAT tracking files (project: `implementation.md`, `state.md`, `plan.md`; repo dashboard: `.oat/state.md`) as a separate bookkeeping commit. Refresh the repo dashboard with `oat state refresh` immediately before staging so `.oat/state.md` reflects the just-completed phase/task. Do not defer, batch, or skip these commits under the reasoning that they "aren't related to the implementation." Skipping a bookkeeping commit (or skipping the dashboard refresh) is the primary cause of cross-session state drift and will cause the next implementation run to fail bookkeeping cross-checks. If bookkeeping commits feel frequent, that is the intended design — they are cheap and they prevent drift.
27
27
 
28
28
  **CRITICAL — Review boundaries require a committed artifact baseline.**
29
29
  Do not enter checkpoint review, final review, revise, or PR-final handoff with dirty core project artifacts (`discovery.md`, `spec.md`, `design.md`, `plan.md`, `implementation.md`, `state.md`, plus `.oat/state.md` when refreshed). If one of those boundaries is next and artifact bookkeeping is still uncommitted, stop and create the bookkeeping commit first.
@@ -646,7 +646,8 @@ For each phase that completed:
646
646
  **Bookkeeping commit (mandatory):**
647
647
 
648
648
  ```bash
649
- git add {PROJECT_PATH}/implementation.md {PROJECT_PATH}/state.md {PROJECT_PATH}/plan.md
649
+ oat state refresh
650
+ git add {PROJECT_PATH}/implementation.md {PROJECT_PATH}/state.md {PROJECT_PATH}/plan.md .oat/state.md
650
651
  git commit -m "chore(oat): bookkeeping after {pNN} {pass|fail}"
651
652
  ```
652
653
 
@@ -719,14 +720,15 @@ When pausing:
719
720
 
720
721
  **DO NOT SKIP.** This commit prevents state drift across sessions.
721
722
 
722
- After phase summary and task pointer advancement, commit all modified OAT tracking files:
723
+ After phase summary and task pointer advancement, refresh the repo dashboard and commit all modified OAT tracking files:
723
724
 
724
725
  ```bash
725
- git add "$PROJECT_PATH/implementation.md" "$PROJECT_PATH/state.md" "$PROJECT_PATH/plan.md"
726
+ oat state refresh
727
+ git add "$PROJECT_PATH/implementation.md" "$PROJECT_PATH/state.md" "$PROJECT_PATH/plan.md" .oat/state.md
726
728
  git diff --cached --quiet || git commit -m "chore(oat): update tracking artifacts for {phase} completion"
727
729
  ```
728
730
 
729
- Do not use `git add -A` or glob patterns. Only commit the three OAT project files listed above.
731
+ Do not use `git add -A` or glob patterns. Only commit the four files listed above (three project artifacts plus the regenerated repo dashboard).
730
732
 
731
733
  **Note on HiLL types:**
732
734
 
@@ -852,14 +854,15 @@ Implementation - Tasks complete; awaiting final review.
852
854
 
853
855
  **DO NOT SKIP.** This commit prevents state drift across sessions.
854
856
 
855
- After updating state.md to reflect implementation completion, commit all modified OAT tracking files:
857
+ After updating state.md to reflect implementation completion, refresh the repo dashboard and commit all modified OAT tracking files:
856
858
 
857
859
  ```bash
858
- git add "$PROJECT_PATH/implementation.md" "$PROJECT_PATH/state.md" "$PROJECT_PATH/plan.md"
860
+ oat state refresh
861
+ git add "$PROJECT_PATH/implementation.md" "$PROJECT_PATH/state.md" "$PROJECT_PATH/plan.md" .oat/state.md
859
862
  git diff --cached --quiet || git commit -m "chore(oat): update tracking artifacts for implementation complete"
860
863
  ```
861
864
 
862
- Do not use `git add -A` or glob patterns. Only commit the three OAT project files listed above.
865
+ Do not use `git add -A` or glob patterns. Only commit the four files listed above (three project artifacts plus the regenerated repo dashboard).
863
866
 
864
867
  ### Step 13: Final Verification
865
868
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-agent-toolkit/cli",
3
- "version": "0.0.64",
3
+ "version": "0.0.66",
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.64"
36
+ "@open-agent-toolkit/control-plane": "0.0.66"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.10.0",