@open-agent-toolkit/cli 0.0.64 → 0.0.65

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.65",
3
+ "docs-config": "0.0.65",
4
+ "docs-theme": "0.0.65",
5
+ "docs-transforms": "0.0.65"
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.
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.65",
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.65"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.10.0",