@open-agent-toolkit/cli 0.1.19 → 0.1.20

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.
Files changed (32) hide show
  1. package/README.md +2 -1
  2. package/assets/docs/cli-utilities/config-and-local-state.md +1 -1
  3. package/assets/docs/cli-utilities/configuration.md +5 -5
  4. package/assets/docs/reference/cli-reference.md +7 -5
  5. package/assets/docs/reference/file-locations.md +1 -1
  6. package/assets/docs/reference/oat-directory-structure.md +3 -3
  7. package/assets/docs/workflows/projects/index.md +1 -1
  8. package/assets/docs/workflows/projects/lifecycle.md +1 -1
  9. package/assets/docs/workflows/projects/repo-analysis.md +7 -4
  10. package/assets/public-package-versions.json +4 -4
  11. package/assets/skills/oat-project-complete/SKILL.md +16 -152
  12. package/assets/skills/oat-wrap-up/SKILL.md +9 -9
  13. package/assets/skills/oat-wrap-up/references/automation-recipes.md +5 -5
  14. package/dist/commands/config/index.js +2 -2
  15. package/dist/commands/project/archive/archive-utils.d.ts +19 -0
  16. package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
  17. package/dist/commands/project/archive/archive-utils.js +94 -25
  18. package/dist/commands/project/archive/index.d.ts +6 -19
  19. package/dist/commands/project/archive/index.d.ts.map +1 -1
  20. package/dist/commands/project/archive/index.js +19 -251
  21. package/dist/commands/project/archive/push-runner.d.ts +21 -0
  22. package/dist/commands/project/archive/push-runner.d.ts.map +1 -0
  23. package/dist/commands/project/archive/push-runner.js +151 -0
  24. package/dist/commands/project/archive/sync-runner.d.ts +47 -0
  25. package/dist/commands/project/archive/sync-runner.d.ts.map +1 -0
  26. package/dist/commands/project/archive/sync-runner.js +232 -0
  27. package/dist/commands/repo/archive/index.d.ts +4 -0
  28. package/dist/commands/repo/archive/index.d.ts.map +1 -0
  29. package/dist/commands/repo/archive/index.js +22 -0
  30. package/dist/commands/repo/index.d.ts.map +1 -1
  31. package/dist/commands/repo/index.js +2 -0
  32. package/package.json +2 -2
package/README.md CHANGED
@@ -36,7 +36,8 @@ Additional useful entry points:
36
36
  - `oat project status --json`
37
37
  - `oat project list --json`
38
38
  - `oat project complete-state /path/to/project`
39
- - `oat project archive sync`
39
+ - `oat project archive /path/to/project`
40
+ - `oat repo archive sync`
40
41
  - `oat doctor`
41
42
 
42
43
  ## Inspection Commands
@@ -62,7 +62,7 @@ Archive lifecycle settings live here as shared repo config:
62
62
  - `archive.awsProfile`
63
63
  - `archive.awsRegion`
64
64
 
65
- `archive.awsProfile` and `archive.awsRegion` are forwarded as `AWS_PROFILE` / `AWS_REGION` env vars into every `aws` spawn that runs during `oat-project-complete` and `oat project archive sync`, and they override any values already set in the parent shell — the repo's archive-scoped declaration wins so users don't have to remember to unset `AWS_PROFILE` per shell. The per-invocation `oat project archive sync --profile <profile>` and `--region <region>` flags then override the config for a single run, giving precedence `flag > config > shell env`. When neither flag nor config is set, the parent shell's `AWS_PROFILE` / `AWS_REGION` pass through unchanged. Raw access keys (`AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY`) remain a shell-environment concern — there is no config plumbing for them.
65
+ `archive.awsProfile` and `archive.awsRegion` are forwarded as `AWS_PROFILE` / `AWS_REGION` env vars into every `aws` spawn that runs during `oat-project-complete` and `oat repo archive sync`, and they override any values already set in the parent shell — the repo's archive-scoped declaration wins so users don't have to remember to unset `AWS_PROFILE` per shell. The per-invocation `oat repo archive sync --profile <profile>` and `--region <region>` flags then override the config for a single run, giving precedence `flag > config > shell env`. When neither flag nor config is set, the parent shell's `AWS_PROFILE` / `AWS_REGION` pass through unchanged. Raw access keys (`AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY`) remain a shell-environment concern — there is no config plumbing for them.
66
66
 
67
67
  Tool-pack installation state also lives here as shared repo config:
68
68
 
@@ -112,7 +112,7 @@ With those values configured:
112
112
  - `oat-project-complete` still archives locally into `.oat/projects/archived/<project>/`
113
113
  - completion also attempts an S3 upload when AWS CLI is available and configured, storing dated snapshots such as `<archive.s3Uri>/<repo-slug>/projects/20260401-my-project/`
114
114
  - completion also copies `summary.md` into `<archive.summaryExportPath>/20260401-my-project.md`
115
- - `oat project archive sync` can later pull archive data back down from S3 and materialize the latest snapshot into the local bare archive path `.oat/projects/archived/<project>/`
115
+ - `oat repo archive sync` can later pull archive data back down from S3 and materialize the latest snapshot into the local bare archive path `.oat/projects/archived/<project>/`
116
116
  - `oat-wrap-up` can write tracked reports into `<archive.wrapUpExportPath>/YYYY-MM-DD-wrap-up-<label>.md`; if the key is unset, the skill uses `.oat/repo/reference/wrap-ups/`
117
117
  - every `aws` spawn (preflight `aws sts get-caller-identity`, `aws s3 ls`, `aws s3 sync`) runs with `AWS_PROFILE` / `AWS_REGION` set from `archive.awsProfile` / `archive.awsRegion` when configured, overriding any value already in the parent shell
118
118
 
@@ -120,7 +120,7 @@ With those values configured:
120
120
 
121
121
  Profile and region resolve with the following precedence per `aws` invocation, highest first:
122
122
 
123
- 1. CLI flag passed to `oat project archive sync` (`--profile <profile>`, `--region <region>`)
123
+ 1. CLI flag passed to `oat repo archive sync` (`--profile <profile>`, `--region <region>`)
124
124
  2. The repo's shared `archive.awsProfile` / `archive.awsRegion` config
125
125
  3. The parent shell's existing `AWS_PROFILE` / `AWS_REGION` env vars
126
126
 
@@ -128,15 +128,15 @@ If none of the three are present for a given var, OAT does not inject it — the
128
128
 
129
129
  `archive.awsProfile` is treated as deliberate, OAT-archive-scoped intent: if the repo declares the identity it wants to archive under, that value wins over whatever profile happens to be in the calling shell. Use `--profile` for one-off overrides; clear `archive.awsProfile` (set it to an empty string) to fall back to shell `AWS_PROFILE`.
130
130
 
131
- The `oat project archive sync` flags only override for that single invocation:
131
+ The `oat repo archive sync` flags only override for that single invocation:
132
132
 
133
133
  ```bash
134
- oat project archive sync --profile work-sso --region us-east-1
134
+ oat repo archive sync --profile work-sso --region us-east-1
135
135
  ```
136
136
 
137
137
  `oat-project-complete` does not accept per-invocation flags. Set the shared config (or your shell env) ahead of time if completion needs a specific profile.
138
138
 
139
- Raw access keys (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and friends) remain a shell-environment concern. OAT does not expose config keys for them — set them in your shell before running `oat-project-complete` or `oat project archive sync` and they are inherited by the spawned `aws` process unchanged.
139
+ Raw access keys (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and friends) remain a shell-environment concern. OAT does not expose config keys for them — set them in your shell before running `oat-project-complete` or `oat repo archive sync` and they are inherited by the spawned `aws` process unchanged.
140
140
 
141
141
  ## Repo-local and user state
142
142
 
@@ -7,7 +7,7 @@ description: Scannable reference for the current OAT CLI surface, with links to
7
7
 
8
8
  Use this page when you need a quick map of the OAT CLI rather than the full command-by-command docs. It is intentionally shallow: each section points to the owning page that documents the detailed behavior.
9
9
 
10
- The CLI is also a standalone value path. You can use `oat init`, `oat sync`, `oat tools`, docs commands, and repo-analysis commands without adopting the full project workflow.
10
+ The CLI is also a standalone value path. You can use `oat init`, `oat sync`, `oat tools`, docs commands, repo archive sync, and repo-analysis commands without adopting the full project workflow.
11
11
 
12
12
  ## Contents
13
13
 
@@ -18,7 +18,7 @@ The CLI is also a standalone value path. You can use `oat init`, `oat sync`, `oa
18
18
  - [Provider Sync](../provider-sync/index.md) - Sync behavior, provider capabilities, config, and drift management.
19
19
  - [Agentic Workflows](../workflows/index.md) - Tracked project execution, skills, ideas, and workflow routing.
20
20
  - [Workflow & Projects](../workflows/projects/index.md) - Project lifecycle, artifacts, reviews, PR flow, and state-machine docs.
21
- - [Repository Analysis](../workflows/projects/repo-analysis.md) - Detailed `oat repo pr-comments ...` behavior.
21
+ - [Repository PR Comment Analysis](../workflows/projects/repo-analysis.md) - Detailed `oat repo pr-comments ...` behavior.
22
22
 
23
23
  ## Command Groups
24
24
 
@@ -32,10 +32,10 @@ The CLI is also a standalone value path. You can use `oat init`, `oat sync`, `oa
32
32
  | `oat state ...` / `oat index ...` / `internal` | Repo dashboard refresh, repo indexing, validation helpers, and diagnostics. | [Config and Local State](../cli-utilities/config-and-local-state.md) |
33
33
  | `oat docs ...` | Docs app bootstrap, migration, index generation, nav sync, and docs workflow entrypoints. | [Docs Tooling Commands](../docs-tooling/commands.md) |
34
34
  | `oat status` / `oat sync` / `oat providers ...` | Provider sync, drift inspection, provider configuration, and adoption behavior. | [Provider Sync](../provider-sync/index.md) |
35
- | `oat project ...` / `oat cleanup ...` | Project scaffolding, active-project status inspection, tracked-project listing, plan validation, and project/artifact cleanup commands. | [Workflow & Projects](../workflows/projects/index.md) |
36
- | `oat repo ...` | Repository-level analysis workflows, currently centered on PR comments. | [Repository Analysis](../workflows/projects/repo-analysis.md) |
35
+ | `oat project ...` / `oat cleanup ...` | Project scaffolding, active-project status inspection, tracked-project listing, plan validation, archive creation, and project/artifact cleanup commands. | [Workflow & Projects](../workflows/projects/index.md) |
36
+ | `oat repo ...` | Repository-level workflows such as archive sync and PR-comment analysis. | [Repository Analysis](../workflows/projects/repo-analysis.md) |
37
37
 
38
- Notable inspection commands introduced in the current CLI surface:
38
+ Notable commands introduced in the current CLI surface:
39
39
 
40
40
  - `oat config dump --json` - merged config with source attribution
41
41
  - `oat project status --json` - full parsed state for the active tracked project. **Stable contract for skills:** the JSON output is a typed read interface for OAT skills; the field set consumed by migrated skills is locked by `MIGRATED_FIELDS` in `packages/cli/src/commands/project/status.test.ts`. Removing or renaming any of `project.{name, path, phase, phaseStatus, workflowMode, docsUpdated, lastCommit, prStatus, prUrl}` is a breaking change and will fail the contract test.
@@ -44,6 +44,8 @@ Notable inspection commands introduced in the current CLI surface:
44
44
  - `oat project status --shell NAME=path ...` - print shell-safe assignments for one or more fields from one status read, e.g. `WORKFLOW_MODE='quick'`. This is the preferred multi-field read API for skills. See [Writing Skills → Reading project state](../contributing/skills.md#reading-project-state) for examples and the `npx`-backed `oat` shim contract.
45
45
  - `oat project list --json` - summary state for tracked projects under the configured projects root
46
46
  - `oat project complete-state <project-path>` - apply the canonical completed-state mutation to a project's `state.md`; used by `oat-project-complete` during lifecycle closeout
47
+ - `oat project archive [project-path]` - archive a tracked project through the same local move, summary export, and optional S3 upload path used by completion. When omitted, the project path falls back to the active project.
48
+ - `oat repo archive sync [project-name]` - hydrate archived project snapshots from the configured repo-scoped S3 archive into `.oat/projects/archived/`. The old `oat project archive sync` path remains as a deprecated shim.
47
49
  - `oat project validate-plan --project-path <path>` - validates `oat_plan_parallel_groups` metadata in `plan.md`; exits non-zero on invalid. See [Implementation Execution](../workflows/projects/implementation-execution.md#validating-plan-metadata).
48
50
  - `oat project set-mode` — deprecated no-op. Execution mode is no longer user-selectable; emits a deprecation warning and preserves the `--json` contract.
49
51
 
@@ -57,7 +57,7 @@ Archive sync surfaces:
57
57
 
58
58
  - Local archive root: `.oat/projects/archived/`
59
59
  - Remote archive base: `archive.s3Uri` in `.oat/config.json`
60
- - Archive sync command: `oat project archive sync` or `oat project archive sync <project-name>`
60
+ - Archive sync command: `oat repo archive sync` or `oat repo archive sync <project-name>`
61
61
  - Remote archive snapshot shape: `<archive.s3Uri>/<repo-slug>/projects/YYYYMMDD-<project-name>/`
62
62
  - Summary export target: `<repo>/<archive.summaryExportPath>/YYYYMMDD-<project-name>.md` when configured
63
63
  - Wrap-up export target: `<repo>/<archive.wrapUpExportPath>/YYYY-MM-DD-wrap-up-<label>.md` when configured; otherwise `oat-wrap-up` falls back to `<repo>/.oat/repo/reference/wrap-ups/`
@@ -112,7 +112,7 @@ Current schema keys:
112
112
  | `archive.s3SyncOnComplete` | `boolean` | `false` | When `true`, `oat-project-complete` uploads the archived project to the configured S3 archive after local archive succeeds |
113
113
  | `archive.summaryExportPath` | `string` | - | Repo-relative directory where completion exports `summary.md` as a dated snapshot like `20260401-<project-name>.md` for durable tracked reference |
114
114
  | `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/` |
115
- | `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. |
115
+ | `archive.awsProfile` | `string` | - | Optional AWS named profile forwarded as `AWS_PROFILE` to every `aws` invocation in archive flows (`oat-project-complete` S3 sync, `oat repo archive sync`). Overrides ambient shell `AWS_PROFILE` / `AWS_DEFAULT_PROFILE` when set. |
116
116
  | `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. |
117
117
 
118
118
  All `documentation.*` keys are managed via `oat config get/set` and are set automatically by `oat docs init`.
@@ -166,8 +166,8 @@ Archive sync behavior:
166
166
 
167
167
  - `oat-project-complete` always archives locally into `.oat/projects/archived/<project>/`.
168
168
  - If `archive.s3SyncOnComplete=true` and `archive.s3Uri` is configured, completion also uploads a dated snapshot such as `<archive.s3Uri>/<repo-slug>/projects/20260401-<project>/`.
169
- - `oat project archive sync` syncs all repo archived projects down from S3 into `.oat/projects/archived/`.
170
- - `oat project archive sync <project-name>` syncs the latest dated remote snapshot for a single project into `.oat/projects/archived/<project-name>/`.
169
+ - `oat repo archive sync` syncs all repo archived projects down from S3 into `.oat/projects/archived/`.
170
+ - `oat repo archive sync <project-name>` syncs the latest dated remote snapshot for a single project into `.oat/projects/archived/<project-name>/`.
171
171
  - Default archive sync is non-destructive toward unrelated local-only archive data, but it does replace a local project archive when a newer dated remote snapshot is selected for that same project.
172
172
 
173
173
  Typical contents:
@@ -39,4 +39,4 @@ This sub-section is the deep technical surface for how tracked OAT projects exec
39
39
  - [State Machine](state-machine.md) - Lifecycle and review status transitions across a project.
40
40
  - [Reviews](reviews.md) - How review request/receive loops work inside OAT projects.
41
41
  - [PR Flow](pr-flow.md) - Progress and final PR generation expectations.
42
- - [Repository Analysis](repo-analysis.md) - Repo-wide PR comment collection and triage workflows.
42
+ - [Repository PR Comment Analysis](repo-analysis.md) - Repo-wide PR comment collection and triage workflows.
@@ -65,7 +65,7 @@ On completion, OAT now treats archive handling as part of the closeout lifecycle
65
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.
66
66
  - If `.oat/config.json` sets `archive.summaryExportPath`, completion copies `summary.md` to `<archive.summaryExportPath>/20260401-<project>.md`.
67
67
  - Missing or unusable AWS CLI configuration produces warnings during completion instead of blocking closeout.
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.
68
+ - `oat repo 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.
69
69
 
70
70
  ### Phase status: `pr_open`
71
71
 
@@ -1,11 +1,13 @@
1
1
  ---
2
- title: Repository Analysis
3
- description: 'Repository-level analysis commands for collecting and triaging PR review comments.'
2
+ title: Repository PR Comment Analysis
3
+ description: 'Repository-level PR comment analysis commands for collecting and triaging review feedback.'
4
4
  ---
5
5
 
6
- # Repository Analysis (`oat repo`)
6
+ # Repository PR Comment Analysis (`oat repo pr-comments`)
7
7
 
8
- The `oat repo` command group provides repository-level analysis and insight tools. These commands operate across merged pull requests rather than on individual PRs.
8
+ The `oat repo pr-comments` command group provides repository-level review analysis tools. These commands operate across merged pull requests rather than on individual PRs.
9
+
10
+ This page covers the PR-comment analysis surface only. Other repository-level commands, such as `oat repo archive sync`, are covered in [Lifecycle](lifecycle.md#completion-archive-behavior) and [Configuration](../../cli-utilities/configuration.md#shared-repo-config-you-will-touch-most-often).
9
11
 
10
12
  ## Quick Look
11
13
 
@@ -100,3 +102,4 @@ Both commands accept dependency injection for testability:
100
102
 
101
103
  - Source: `packages/cli/src/commands/repo/pr-comments/`
102
104
  - Types: `packages/cli/src/commands/repo/pr-comments/collect/pr-comments.types.ts`
105
+ - Archive sync: [Lifecycle](lifecycle.md#completion-archive-behavior) and [Configuration](../../cli-utilities/configuration.md#shared-repo-config-you-will-touch-most-often)
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.1.19",
3
- "docs-config": "0.1.19",
4
- "docs-theme": "0.1.19",
5
- "docs-transforms": "0.1.19"
2
+ "cli": "0.1.20",
3
+ "docs-config": "0.1.20",
4
+ "docs-theme": "0.1.20",
5
+ "docs-transforms": "0.1.20"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-complete
3
- version: 1.4.8
3
+ version: 1.4.9
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
@@ -340,166 +340,30 @@ Anti-pattern: do not "rescue" a dropped artifact by linking to its archived path
340
340
 
341
341
  Archive happens after PR description generation (so artifacts are readable at tracked paths) but before commit+push (so the archive deletion is included in the commit).
342
342
 
343
- 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.
344
-
345
- **Anti-pattern (do NOT do this):** Running `git check-ignore` on the
346
- `.oat/projects/archived` directory itself to decide durability. A common
347
- gitignore shape for this repo is `.oat/projects/archived/**`, which leaves the
348
- directory visible in the tree while ignoring every file placed inside. A
349
- directory-level check reports "not ignored" and produces the inverse of the
350
- intended decision — archiving in the worktree when the archive must actually
351
- go to the primary repo. Always probe a representative path **inside** the
352
- archive directory (the project subpath or a probe filename), matching the CLI
353
- helper at `packages/cli/src/commands/project/archive/archive-utils.ts`.
343
+ The archive-side effects in this step are CLI-owned. Do not reimplement local archive movement, summary export, S3 sync, AWS credential handling, or worktree durability checks in the skill.
354
344
 
355
345
  ```bash
356
- ARCHIVED_ROOT=".oat/projects/archived"
357
- # ARCHIVE_RELATIVE_PATH is the contents-level probe: a hypothetical file that
358
- # would live inside the archive directory. This is the same probe shape the
359
- # CLI helper uses do not simplify this to the directory itself.
360
- ARCHIVE_RELATIVE_PATH=".oat/projects/archived/${PROJECT_NAME}"
361
- PRIMARY_REPO_ARCHIVE=""
362
- ARCHIVE_CONTENTS_TRACKED="true"
363
- USE_PRIMARY_REPO_ARCHIVE="false"
364
-
365
- # Will a newly-archived file at ${ARCHIVE_RELATIVE_PATH} actually be tracked in
366
- # this checkout? Probe a representative path INSIDE the directory, not the
367
- # directory itself. A `.oat/projects/archived/**` gitignore pattern leaves the
368
- # directory visible in the tree but ignores everything placed inside, so a
369
- # directory-level check reports "tracked" and gives the inverse of the
370
- # intended answer.
371
- if git check-ignore --quiet --no-index "$ARCHIVE_RELATIVE_PATH" 2>/dev/null; then
372
- ARCHIVE_CONTENTS_TRACKED="false"
373
- fi
374
-
375
- # Fall back to the primary checkout whenever archive contents are local-only
376
- # in the current worktree, regardless of whether the archive directory itself
377
- # happens to exist in the tree.
378
- if [[ "$ARCHIVE_CONTENTS_TRACKED" == "false" ]] && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
379
- GIT_COMMON_DIR=$(git rev-parse --git-common-dir 2>/dev/null || true)
380
- GIT_DIR=$(git rev-parse --git-dir 2>/dev/null || true)
381
- if [[ -n "$GIT_COMMON_DIR" && -n "$GIT_DIR" && "$GIT_COMMON_DIR" != "$GIT_DIR" ]]; then
382
- PRIMARY_REPO_ROOT=$(cd "$(dirname "$GIT_COMMON_DIR")" && pwd)
383
- PRIMARY_REPO_ARCHIVE="${PRIMARY_REPO_ROOT}/.oat/projects/archived"
384
- if [[ -d "$(dirname "$PRIMARY_REPO_ARCHIVE")" ]]; then
385
- USE_PRIMARY_REPO_ARCHIVE="true"
386
- ARCHIVED_ROOT="$PRIMARY_REPO_ARCHIVE"
387
- else
388
- echo "Warning: Running in a worktree with a local-only archive path, but the primary repo archive path is unavailable: $PRIMARY_REPO_ARCHIVE"
389
- echo "A worktree-local archive may be deleted when the worktree is removed and is not a durable archive."
390
- echo "Require explicit confirmation before proceeding with local-only archive."
391
- fi
392
- fi
393
- fi
394
-
395
- if [[ "$USE_PRIMARY_REPO_ARCHIVE" != "true" ]]; then
396
- ARCHIVED_ROOT=".oat/projects/archived"
346
+ ARCHIVE_OUTPUT=""
347
+ if ! ARCHIVE_OUTPUT=$(oat project archive "$PROJECT_PATH" 2>&1); then
348
+ printf '%s\n' "$ARCHIVE_OUTPUT" >&2
349
+ echo "Error: Project archive failed." >&2
350
+ exit 1
397
351
  fi
398
352
 
399
- mkdir -p "$ARCHIVED_ROOT"
400
- ARCHIVE_PATH="${ARCHIVED_ROOT}/${PROJECT_NAME}"
353
+ printf '%s\n' "$ARCHIVE_OUTPUT"
401
354
 
402
- if [[ -e "$ARCHIVE_PATH" ]]; then
403
- ARCHIVE_PATH="${ARCHIVED_ROOT}/${PROJECT_NAME}-$(date +%Y%m%d-%H%M%S)"
355
+ ARCHIVE_PATH=$(printf '%s\n' "$ARCHIVE_OUTPUT" | sed -nE 's/^Archived project `[^`]+` to `(.+)`\.$/\1/p' | tail -1)
356
+ if [[ -z "$ARCHIVE_PATH" ]]; then
357
+ echo "Error: oat project archive did not report the archived path." >&2
358
+ exit 1
404
359
  fi
405
360
 
406
- mv "$PROJECT_PATH" "$ARCHIVE_PATH"
407
361
  PROJECT_PATH="$ARCHIVE_PATH"
408
- echo "Project archived to $ARCHIVE_PATH"
362
+ ARCHIVE_S3_PATH=$(printf '%s\n' "$ARCHIVE_OUTPUT" | sed -nE 's/^S3 archive: (.+)$/\1/p' | tail -1)
363
+ ARCHIVE_S3_CONTEXT=$(printf '%s\n' "$ARCHIVE_OUTPUT" | grep -E '^Archive S3 sync: .*profile=.*region=' | tail -1 || true)
409
364
  ```
410
365
 
411
- **Canonical helper behaviors (required):**
412
-
413
- - Always archive locally first. The local archive is the authoritative completion artifact even when remote sync is also configured.
414
- - If `archive.summaryExportPath` is configured and `summary.md` exists after archive, copy it to `{repoRoot}/{archive.summaryExportPath}/YYYYMMDD-{PROJECT_NAME}.md`.
415
- - 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`.
416
- - If AWS CLI is missing or unusable for that S3 sync, warn and continue. Completion must not fail after the local archive succeeds.
417
- - If `archive.s3SyncOnComplete` is false or `archive.s3Uri` is unset, skip remote sync without prompting.
418
-
419
- **AWS credential handling for archive S3 sync (required):**
420
-
421
- 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`.
422
-
423
- - **Read both keys from OAT config before any AWS CLI call:**
424
-
425
- ```bash
426
- ARCHIVE_AWS_PROFILE=$(oat config get archive.awsProfile 2>/dev/null || true)
427
- ARCHIVE_AWS_REGION=$(oat config get archive.awsRegion 2>/dev/null || true)
428
- ```
429
-
430
- - **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.
431
- - **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.
432
- - **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.
433
- - **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:
434
-
435
- ```bash
436
- AWS_FLAGS=()
437
- if [[ -n "$ARCHIVE_AWS_PROFILE" ]]; then
438
- AWS_FLAGS+=(--profile "$ARCHIVE_AWS_PROFILE")
439
- fi
440
- if [[ -n "$ARCHIVE_AWS_REGION" ]]; then
441
- AWS_FLAGS+=(--region "$ARCHIVE_AWS_REGION")
442
- fi
443
-
444
- aws "${AWS_FLAGS[@]}" sts get-caller-identity
445
- aws "${AWS_FLAGS[@]}" s3 sync \
446
- "$ARCHIVE_PATH" \
447
- "${ARCHIVE_S3_URI%/}/${REPO_SLUG}/projects/${SNAPSHOT_NAME}/" \
448
- --exclude 'reviews/*' --exclude 'pr/*'
449
- ```
450
-
451
- …or set the equivalent env vars for the spawned process so the same precedence applies:
452
-
453
- ```bash
454
- AWS_ENV=()
455
- [[ -n "$ARCHIVE_AWS_PROFILE" ]] && AWS_ENV+=("AWS_PROFILE=$ARCHIVE_AWS_PROFILE")
456
- [[ -n "$ARCHIVE_AWS_REGION" ]] && AWS_ENV+=("AWS_REGION=$ARCHIVE_AWS_REGION")
457
- env "${AWS_ENV[@]}" aws s3 sync ...
458
- ```
459
-
460
- 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.
461
-
462
- - **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.
463
- - **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.
464
-
465
- **Worktree durability guard (required):**
466
-
467
- - If running in a worktree and the primary repo archive path is unavailable, do not silently continue with a local-only archive.
468
- - 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?"
469
- - If the user declines, skip archiving and continue the completion flow without archive.
470
- - 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.
471
- - 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.
472
-
473
- **Git handling after archive:**
474
-
475
- If the archived directory is gitignored (check with `git check-ignore -q "$ARCHIVE_PATH"`), the move looks like a deletion to git — the original tracked files disappear and the archived copy is local-only. To commit:
476
-
477
- ```bash
478
- git add -A "$PROJECTS_ROOT/$PROJECT_NAME" 2>/dev/null || true
479
- ```
480
-
481
- This stages the deletions from the shared directory. The archived copy is preserved locally but not tracked by git.
482
-
483
- **Worktree archive target (required when available):**
484
-
485
- 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.
486
-
487
- Reference path:
488
-
489
- ```bash
490
- GIT_COMMON_DIR=$(git rev-parse --git-common-dir)
491
- PRIMARY_REPO_ROOT=$(cd "$(dirname "$GIT_COMMON_DIR")" && pwd)
492
- PRIMARY_REPO_ARCHIVE="${PRIMARY_REPO_ROOT}/.oat/projects/archived"
493
- ```
494
-
495
- Guidance:
496
-
497
- - 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.
498
- - 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.
499
- - Do not treat the worktree-local archive as durable.
500
- - If forced to use a local-only archive, warn and require explicit user confirmation.
501
- - Always write the dated `archive.summaryExportPath` copy into the current checkout (`repoRoot`), even when the project archive itself is written to the primary checkout.
502
- - Do not hardcode user-specific absolute paths.
366
+ Use `ARCHIVE_S3_CONTEXT` in Step 12 if the command reports profile/region details. If S3 sync ran and only `ARCHIVE_S3_PATH` is available, report the destination and note that credential context was not emitted by the command.
503
367
 
504
368
  ### Step 9: Regenerate Dashboard
505
369
 
@@ -607,7 +471,7 @@ Show user:
607
471
 
608
472
  - "Project **{PROJECT_NAME}** marked as complete."
609
473
  - If archived: "Archived location: **{PROJECT_PATH}**"
610
- - 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.).
474
+ - If S3 archive sync ran: include `ARCHIVE_S3_CONTEXT` when the archive command reported profile/region details. If only `ARCHIVE_S3_PATH` is available, include the S3 destination and note that profile/region context was not reported by the command. Never echo raw credentials (`AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`, etc.).
611
475
  - Include commit hash and push result for the bookkeeping changes.
612
476
  - If PR was opened: include the PR URL.
613
477
  - 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-wrap-up
3
- version: 1.0.0
3
+ version: 1.0.1
4
4
  description: Use when preparing a shipping digest or weekly/biweekly wrap-up summarizing OAT projects and merged PRs over a time window. Reads local summary files and GitHub PR metadata; writes a version-controlled markdown report.
5
5
  argument-hint: '[--since YYYY-MM-DD] [--until YYYY-MM-DD] [--past-week|--past-2-weeks|--past-month] [--output <path>] [--dry-run]'
6
6
  disable-model-invocation: false
@@ -26,7 +26,7 @@ Don't use when:
26
26
 
27
27
  - You need a single specific project's summary — use `oat-project-summary` instead.
28
28
  - You want an always-current status view without a fixed window — the wrap-up is window-scoped by design.
29
- - Archived projects from teammates have not been hydrated locally yet — run `oat project archive sync` first so the digest reflects the full team's work. The skill warns if this looks undone but will not auto-run sync.
29
+ - Archived projects from teammates have not been hydrated locally yet — run `oat repo archive sync` first so the digest reflects the full team's work. The skill warns if this looks undone but will not auto-run sync.
30
30
 
31
31
  ## Arguments
32
32
 
@@ -45,7 +45,7 @@ Exactly one time-range specifier is required: either a named range (`--past-week
45
45
  ## Prerequisites
46
46
 
47
47
  - Repository is an OAT project (contains `.oat/`).
48
- - For cross-teammate visibility: `oat project archive sync` has been run recently so teammates' archived projects are hydrated into `.oat/projects/archived/`. The skill warns if `archive.s3Uri` is configured but the local archive has no `.oat-archive-source.json` metadata files.
48
+ - For cross-teammate visibility: `oat repo archive sync` has been run recently so teammates' archived projects are hydrated into `.oat/projects/archived/`. The skill warns if `archive.s3Uri` is configured but the local archive has no `.oat-archive-source.json` metadata files.
49
49
  - `gh` CLI authenticated for the current repository (needed for merged-PR fetching via `gh api graphql`).
50
50
 
51
51
  ## Mode Assertion
@@ -57,7 +57,7 @@ Exactly one time-range specifier is required: either a named range (`--past-week
57
57
  **BLOCKED Activities:**
58
58
 
59
59
  - No modifying OAT project summaries, plan files, or other implementation artifacts.
60
- - No auto-running `oat project archive sync` — it is a user-gated prerequisite, not a side effect of this skill.
60
+ - No auto-running `oat repo archive sync` — it is a user-gated prerequisite, not a side effect of this skill.
61
61
  - No network writes of any kind. The GitHub API is read-only.
62
62
 
63
63
  **ALLOWED Activities:**
@@ -71,7 +71,7 @@ Exactly one time-range specifier is required: either a named range (`--past-week
71
71
  If you catch yourself:
72
72
 
73
73
  - About to modify a summary file → STOP, the skill is strictly read-only against summaries.
74
- - About to auto-run `oat project archive sync` → STOP, the skill only warns; the user runs sync themselves.
74
+ - About to auto-run `oat repo archive sync` → STOP, the skill only warns; the user runs sync themselves.
75
75
  - About to string-concatenate summary prose verbatim → STOP, the report is a synthesis, not a concatenation.
76
76
  - About to skip the prerequisite warning when the local archive is empty and S3 is configured → STOP, emit the warning first.
77
77
 
@@ -123,12 +123,12 @@ S3_URI="$(oat config get archive.s3Uri 2>/dev/null || true)"
123
123
  if [ -n "$S3_URI" ] && [ -d "$ARCHIVE_DIR" ]; then
124
124
  if ! find "$ARCHIVE_DIR" -maxdepth 2 -name '.oat-archive-source.json' 2>/dev/null | grep -q . ; then
125
125
  printf '⚠️ archive.s3Uri is configured but no archived snapshots are hydrated locally.\n'
126
- printf ' Run "oat project archive sync" first so teammates archived projects are visible to the wrap-up.\n'
126
+ printf ' Run "oat repo archive sync" first so teammates archived projects are visible to the wrap-up.\n'
127
127
  printf ' (Proceeding with active projects and the version-controlled summaries directory only.)\n'
128
128
  fi
129
129
  elif [ -n "$S3_URI" ]; then
130
130
  printf '⚠️ archive.s3Uri is configured but %s does not exist.\n' "$ARCHIVE_DIR"
131
- printf ' Run "oat project archive sync" first so archived projects are available.\n'
131
+ printf ' Run "oat repo archive sync" first so archived projects are available.\n'
132
132
  printf ' (Proceeding with active projects and the version-controlled summaries directory only.)\n'
133
133
  fi
134
134
  ```
@@ -362,7 +362,7 @@ so I can review before committing it.
362
362
 
363
363
  - Report skeleton: `references/report-template.md`
364
364
  - Automation patterns (Claude Code `CronCreate`, Codex host scheduling, plain cron): `references/automation-recipes.md`
365
- - Prerequisite command: `oat project archive sync` at `packages/cli/src/commands/project/archive/index.ts:244`
365
+ - Prerequisite command: `oat repo archive sync` at `packages/cli/src/commands/repo/archive/index.ts`
366
366
  - Merged-PR query pattern: `packages/cli/src/commands/repo/pr-comments/collect/collect-comments.ts:198-205`
367
367
  - Summary frontmatter schema: `.oat/templates/summary.md`
368
368
  - Config key: `archive.wrapUpExportPath` (managed via `oat config set archive.wrapUpExportPath <path>`)
@@ -377,7 +377,7 @@ so I can review before committing it.
377
377
  **Report is empty or "no summaries found":**
378
378
 
379
379
  - The window may genuinely have no activity — double-check `SINCE` and `UNTIL`.
380
- - Check whether teammates' archived projects are hydrated: `ls .oat/projects/archived/` should list directories. If empty and `archive.s3Uri` is configured, run `oat project archive sync` first.
380
+ - Check whether teammates' archived projects are hydrated: `ls .oat/projects/archived/` should list directories. If empty and `archive.s3Uri` is configured, run `oat repo archive sync` first.
381
381
  - Verify that `.oat/projects/*/*/summary.md` and/or `${SUMMARY_EXPORT_PATH}/*.md` contain files whose `oat_last_updated` falls inside the window.
382
382
 
383
383
  **Report is missing PRs that clearly merged in the window:**
@@ -35,7 +35,7 @@ The generic pattern:
35
35
 
36
36
  1. Create a scheduled trigger whose prompt is `/oat-wrap-up --past-week` (or a named range that matches your cadence).
37
37
  2. Configure the trigger to run in a workspace where the OAT repository is the current working directory.
38
- 3. Ensure the workspace has `gh` authenticated and, for cross-teammate visibility, a recent run of `oat project archive sync` (this can be a pre-prompt step in the trigger).
38
+ 3. Ensure the workspace has `gh` authenticated and, for cross-teammate visibility, a recent run of `oat repo archive sync` (this can be a pre-prompt step in the trigger).
39
39
 
40
40
  If your Codex host does not expose scheduled triggers, fall through to Pattern 3.
41
41
 
@@ -48,7 +48,7 @@ When neither Claude Code's `CronCreate` nor Codex host scheduling is available,
48
48
  ```cron
49
49
  # Every Monday at 09:00 local time, generate a past-week wrap-up and commit it.
50
50
  0 9 * * 1 cd /path/to/repo && \
51
- oat project archive sync --dry-run > /dev/null && \
51
+ oat repo archive sync --dry-run > /dev/null && \
52
52
  claude -p "/oat-wrap-up --past-week" && \
53
53
  git add .oat/repo/reference/wrap-ups && \
54
54
  git -c user.name="wrapup-bot" -c user.email="wrapup-bot@example.com" commit -m "chore: weekly wrap-up $(date -u +%Y-%m-%d)" >/dev/null 2>&1 || true
@@ -57,7 +57,7 @@ When neither Claude Code's `CronCreate` nor Codex host scheduling is available,
57
57
  Notes:
58
58
 
59
59
  - Replace `claude -p ...` with your host's headless invocation (`codex -p ...`, etc.) if using a different host.
60
- - The `oat project archive sync --dry-run` call is a preflight check — it surfaces auth or config problems early. Change it to `oat project archive sync` if you want to actively pull teammates' archives before each run.
60
+ - The `oat repo archive sync --dry-run` call is a preflight check — it surfaces auth or config problems early. Change it to `oat repo archive sync` if you want to actively pull teammates' archives before each run.
61
61
  - The trailing `|| true` keeps cron quiet when there is nothing new to commit (e.g., the wrap-up matched a previous one).
62
62
 
63
63
  ### systemd timer example
@@ -71,7 +71,7 @@ Description=Generate weekly OAT wrap-up
71
71
  [Service]
72
72
  Type=oneshot
73
73
  WorkingDirectory=/path/to/repo
74
- ExecStart=/bin/sh -c 'oat project archive sync --dry-run && claude -p "/oat-wrap-up --past-week"'
74
+ ExecStart=/bin/sh -c 'oat repo archive sync --dry-run && claude -p "/oat-wrap-up --past-week"'
75
75
  User=wrapup-bot
76
76
  ```
77
77
 
@@ -96,5 +96,5 @@ Enable with `systemctl enable --now oat-wrap-up.timer`.
96
96
  - **Timezones**: The skill resolves named ranges against `today` in the local timezone of the host running the skill. Always pin the timezone at the scheduler layer (cron `TZ=`, systemd `OnCalendar=Mon 09:00 America/Los_Angeles`, or the Claude Code trigger's `timezone` field) so reports are reproducible across re-runs.
97
97
  - **Cadence vs window length**: A weekly cadence usually pairs with `--past-week`. A biweekly cadence with `--past-2-weeks`. Running a weekly cadence with `--past-2-weeks` overlaps every report — fine if you want a rolling window, confusing if you expect discrete chunks.
98
98
  - **Commit + push**: The skill itself never commits. If you want the report to land in the repo automatically, the automation wrapper owns the `git add && git commit && git push` step. Keep that wrapper out of the skill so the skill stays portable.
99
- - **Failure handling**: If `gh` auth expires or `oat project archive sync` fails, the cron run should log the failure and exit non-zero rather than producing an empty wrap-up. Prefer pinning the shell to `set -euo pipefail` or an equivalent in the wrapper.
99
+ - **Failure handling**: If `gh` auth expires or `oat repo archive sync` fails, the cron run should log the failure and exit non-zero rather than producing an empty wrap-up. Prefer pinning the shell to `set -euo pipefail` or an equivalent in the wrapper.
100
100
  - **Idempotence**: Running the same window twice produces the same report content (modulo `generated_at`). Overwriting is safe; appending duplicate commits is usually not — coalesce with a pre-check (`git diff --quiet` on the wrap-ups directory) if your cadence might cause no-op runs.
@@ -188,7 +188,7 @@ const CONFIG_CATALOG = [
188
188
  defaultValue: 'unset',
189
189
  mutability: 'read/write',
190
190
  owningCommand: 'oat config set archive.awsProfile <value>',
191
- description: 'AWS named profile forwarded as AWS_PROFILE to every `aws` invocation made by the archive S3 sync (completion + `oat project archive sync`). Precedence: per-invocation flag > existing shell env > this config value.',
191
+ description: 'AWS named profile forwarded as AWS_PROFILE to every `aws` invocation made by the archive S3 sync (completion + `oat repo archive sync`). Precedence: per-invocation flag > this config value > existing shell env.',
192
192
  },
193
193
  {
194
194
  key: 'archive.awsRegion',
@@ -199,7 +199,7 @@ const CONFIG_CATALOG = [
199
199
  defaultValue: 'unset',
200
200
  mutability: 'read/write',
201
201
  owningCommand: 'oat config set archive.awsRegion <value>',
202
- description: 'AWS region forwarded as AWS_REGION to every `aws` invocation made by the archive S3 sync (completion + `oat project archive sync`). Precedence: per-invocation flag > existing shell env > this config value.',
202
+ description: 'AWS region forwarded as AWS_REGION to every `aws` invocation made by the archive S3 sync (completion + `oat repo archive sync`). Precedence: per-invocation flag > this config value > existing shell env.',
203
203
  },
204
204
  {
205
205
  key: 'tools.brainstorm',
@@ -60,6 +60,23 @@ export interface ResolvePrimaryRepoRootDependencies {
60
60
  dirExists?: typeof dirExists;
61
61
  env?: NodeJS.ProcessEnv;
62
62
  }
63
+ export interface ResolveArchiveProjectTargetOptions {
64
+ repoRoot: string;
65
+ projectsRoot: string;
66
+ projectName: string;
67
+ }
68
+ export interface ResolveArchiveProjectTargetDependencies extends ResolvePrimaryRepoRootDependencies {
69
+ timestamp?: () => string;
70
+ }
71
+ export interface ArchiveProjectTarget {
72
+ archiveProjectPath: string;
73
+ archiveRepoRoot: string;
74
+ archivePath: string;
75
+ archivePathIsGitignored: boolean;
76
+ primaryRepoRoot: string | null;
77
+ primaryRepoRootAvailable: boolean;
78
+ localOnlyWarning: string | null;
79
+ }
63
80
  interface ArchiveProjectOnCompletionDependencies extends EnsureS3ArchiveAccessDependencies, ResolvePrimaryRepoRootDependencies {
64
81
  ensureS3ArchiveAccess?: typeof ensureS3ArchiveAccess;
65
82
  execFile?: ExecFileLike;
@@ -120,6 +137,8 @@ export declare function parseArchiveSnapshotName(snapshotName: string): {
120
137
  };
121
138
  export declare function resolveLocalArchiveProjectPath(projectsRoot: string, projectName: string): string;
122
139
  export declare function resolvePrimaryRepoRoot(repoRoot: string, dependencies?: ResolvePrimaryRepoRootDependencies): Promise<string>;
140
+ export declare function resolveArchiveProjectTarget(options: ResolveArchiveProjectTargetOptions, dependencies?: ResolveArchiveProjectTargetDependencies): Promise<ArchiveProjectTarget>;
141
+ export declare function assertDurableArchiveProjectTarget(target: ArchiveProjectTarget): void;
123
142
  export declare function archiveProjectOnCompletion(options: ArchiveProjectOnCompletionOptions, dependencies?: ArchiveProjectOnCompletionDependencies): Promise<ArchiveProjectOnCompletionResult>;
124
143
  export declare function ensureS3ArchiveAccess(options: EnsureS3ArchiveAccessOptions, dependencies?: EnsureS3ArchiveAccessDependencies): Promise<EnsureS3ArchiveAccessResult>;
125
144
  export {};
@@ -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,EA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MAAM,CAAC,UAAU,CAgBnB;AA0BD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM,CAER;AAmBD,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,MAAM,CAER;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG;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;AA6DD,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAChB,YAAY,GAAE,kCAAuC,GACpD,OAAO,CAAC,MAAM,CAAC,CAgCjB;AAmED,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iCAAiC,EAC1C,YAAY,GAAE,sCAA2C,GACxD,OAAO,CAAC,gCAAgC,CAAC,CAgH3C;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,4BAA4B,EACrC,YAAY,GAAE,iCAAsC,GACnD,OAAO,CAAC,2BAA2B,CAAC,CA+CtC"}
1
+ {"version":3,"file":"archive-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/archive-utils.ts"],"names":[],"mappings":"AAeA,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,YA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