@withandeo/cli 0.19.6 → 0.19.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withandeo/cli",
3
- "version": "0.19.6",
3
+ "version": "0.19.8",
4
4
  "description": "Developer CLI for Andeo applications",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -67,6 +67,18 @@ Never initialize over an existing app. The starter does not install dependencies
67
67
 
68
68
  ## Deliver and prove
69
69
 
70
+ When pushing from GitButler or a checkout whose HEAD is not the intended source,
71
+ read the managed-source reference and select the normal branch or exact commit:
72
+ `andeo source push --source chore/andeo-agent-guidance --branch DESTINATION --json`.
73
+ The source defaults to HEAD; the destination remains independent. Confirm the
74
+ returned `sourceRevision` and `sourceDiffersFromHead`. Dirty files are excluded,
75
+ and reviewed repositories still protect their default branch.
76
+
77
+ For a protected managed repository, read the managed-source reference and use
78
+ `andeo source merge --head BRANCH --title TITLE --expected-head PUSHED_SHA --idempotency-key KEY --wait --json`
79
+ to request hosted landing and follow the saved publication policy. Inspect required
80
+ human review, deployment and cleanup outcomes separately; do not push main to bypass them.
81
+
70
82
  Read the delivery reference for commands and recovery. Run app checks and artifact dry-run before delivery. Preserve exact source, digest, release, delivery and composition identities.
71
83
 
72
84
  Distinguish local check, retained upload, ready preview, administrator approval, production activation and live acceptance. None substitutes for the next. Prove the intended combined composition for connected changes, not two unrelated releases.
@@ -1,5 +1,55 @@
1
1
  # Managed source
2
2
 
3
+ ## Request merge and deployment
4
+
5
+ On a protected repository, push the committed feature branch, then request one
6
+ exact hosted merge. Read `capabilities` and `source merge-policy show` first.
7
+
8
+ ```sh
9
+ andeo source push --branch feat/account-copy --json
10
+ andeo source merge --head feat/account-copy --title "Update account copy" \
11
+ --expected-head <sourceRevision-from-push> --idempotency-key account-copy-v1 \
12
+ --wait --json
13
+ andeo source change show --change scr_... --json
14
+ ```
15
+
16
+ Andeo pins the feature and default SHAs, validates the exact preview, lands using
17
+ an expected-SHA fast-forward operation, and follows the saved publication policy.
18
+ A diverged branch returns `update_required`: update the feature branch, push,
19
+ and review a new snapshot. The command does not integrate Git in the local checkout.
20
+ Use `--change scr_...` instead of `--head` and `--title` to attach to an existing
21
+ review; `--expected-snapshot N` pins the inspected snapshot.
22
+
23
+ Human review remains the default. A merchant administrator may explicitly grant
24
+ stable principal IDs with `source merge-policy set --mode agent --principals IDS
25
+ --expected-revision N --idempotency-key KEY [--execution-seconds 300..86400]`.
26
+ Changed validation/dependency inputs and artifact capabilities still require
27
+ review. Merge policy and default-branch publication policy are separate grants.
28
+ Preview-only publication returns `publication_not_enabled` after successful landing.
29
+
30
+ Reuse the original idempotency key after a lost acknowledgement. Waiting defaults
31
+ to no wait; `--wait --timeout-seconds N` is bounded (maximum one hour). Exit 2 means
32
+ required action or an unsuccessful outcome; exit 3 means waiting timed out while
33
+ hosted execution continues. Exit 0 without waiting means accepted, so inspect
34
+ `merge.stage`. Source, publication and cleanup are separate outcomes. `deployed`
35
+ requires verified production activation; `currentlyServing` compares the current
36
+ production head. Runtime health is reported separately as unknown.
37
+
38
+ `source change resume --change scr_...` resumes the same eligible source operation
39
+ or publication checkpoint; it cannot manufacture a new build or clear uncertain
40
+ provider effects. Normal token expiry/rotation preserves the bounded execution
41
+ grant. Explicit revocation, lost owner access, changed policy/inputs or expiry
42
+ block new effects. An administrator can use `source change take-over --change
43
+ scr_... --idempotency-key KEY`, then `resume`, for the same retained inputs.
44
+ `source change cancel` withdraws new work; issued effects require readback and
45
+ may remain `cancellation_pending`. It cannot undo a merge or deployment.
46
+
47
+ An authorized production restore pauses automatic activation and invalidates old
48
+ queued work. `source policy show` reports `automaticPaused` and `environmentEpoch`.
49
+ An administrator must explicitly save the publication policy to resume future
50
+ automatic builds; historical requests cannot undo the restore. A superseded
51
+ publication identifies its newer verified successor and must not be replayed.
52
+
3
53
  If the merchant wants Andeo to own the Git transport, use the CLI for either
4
54
  the linked gateway or service project:
5
55
 
@@ -15,6 +65,32 @@ exact `--cwd`. `source connect` derives the project working directory and build
15
65
  contract from Git plus `tender-accounts.json`; do not recreate that contract by
16
66
  hand in the admin. New connections default to preview-only. Both gateways and services support `--publication default-branch` when a merchant administrator explicitly enables automatic publication. For an existing connection use `source policy show`, then `source policy set --repository SRC_ID --publication default-branch --expected-revision N --idempotency-key KEY`. Saving the policy affects future source builds; it does not publish an existing build. Reconnecting never changes the policy.
17
67
 
68
+ Select a local commit independently from the destination branch, including from a GitButler workspace:
69
+
70
+ ```sh
71
+ andeo source push --source chore/andeo-agent-guidance --branch main --json
72
+ ```
73
+
74
+ `--source` accepts a resolvable local branch, ref or commit SHA and defaults to `HEAD`.
75
+ The CLI resolves it once to a full commit SHA; both the push and any reviewed
76
+ bundle use that exact commit even if the local ref moves. `--branch` remains the
77
+ remote destination and keeps its existing default (current checkout branch,
78
+ or the repository default when detached); selecting `--source` does not change it.
79
+ Always specify `--branch` from a GitButler workspace. Uncommitted, staged and
80
+ untracked files are excluded. JSON reports `source`, `sourceRevision` and
81
+ `sourceDiffersFromHead`; a different source uses that commit's tree and ancestry,
82
+ not the current workspace. Invalid or non-commit sources fail before obtaining
83
+ a repository credential.
84
+
85
+ The example targeting `main` applies only to unprotected repositories. Reviewed
86
+ repositories still require a non-default destination and administrator review;
87
+ `--source` does not bypass protection or allow a force push. Explicit sources
88
+ also work from detached HEAD; omitting `--source` preserves the existing reviewed
89
+ detached-HEAD rejection. Legacy pushes retain normal non-fast-forward rejection
90
+ and the existing guarded `--expected-current` rules. Reconnect seeding accepts
91
+ `--source` with `--reconnection ID --branch NAME`, defaults to `HEAD`, and reports
92
+ the resolved SHA for `source reconnect complete --expected-sha`.
93
+
18
94
  `source push` includes only the committed revision. On a reviewed repository it
19
95
  uploads a bounded Git bundle through Andeo; the trusted runner verifies the
20
96
  exact commit and may update only the named non-default branch. The developer
@@ -165,7 +241,7 @@ andeo source push --reconnection RECONNECT_ID --branch main --json
165
241
  andeo source reconnect complete --reconnection RECONNECT_ID --expected-sha EXACT_DEFAULT_BRANCH_SHA --json
166
242
  ```
167
243
 
168
- Use the actual default branch instead of `main`. The push sends local `HEAD` to the explicit destination branch, without force and without changing your managed remote. Push any other required branches from the corresponding commits before completion. The commands do not assume your checkout contains every remote branch or tag.
244
+ Use the actual default branch instead of `main`. The push sends local `HEAD` by default, or the exact commit selected by `--source REF_OR_COMMIT`, to the explicit destination branch, without force and without changing your managed remote. Push any other required branches using their corresponding `--source` refs before completion. The commands do not assume your checkout contains every remote branch or tag.
169
245
 
170
246
  Preparation pauses the old connection and revokes its write credentials; deployed production continues serving. The destination is not a connected source while it is being seeded, so seed events do not build or publish. Reviewed repositories use this administrator-only seeding path too.
171
247