halfcycle 0.3.22 → 0.3.24

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.
@@ -2,6 +2,16 @@
2
2
  * What each `halfcycle` verb REQUIRES — declared once, enforced from the
3
3
  * declaration (walk 8 `F-5`, W8-T-02).
4
4
  *
5
+ * **EVERY `missingMessage` BELOW IS PRINTED INTO A CLIENT'S TERMINAL**, and this
6
+ * file is bundled verbatim into the published entry, so none of them may carry an
7
+ * invariant id, a `packages/*` path, an issue number or the org name — an id
8
+ * points into a register a client cannot open. The rules the messages carry are
9
+ * named HERE instead: `--verdict` is the acceptance walk's own verdict (INV-009),
10
+ * which is why nothing derives it. A leading docblock is the right home because
11
+ * esbuild drops it; an id in a comment BESIDE a property survives into the
12
+ * published file, which is the trap `published-entry-vocabulary.test.ts` exists
13
+ * to catch.
14
+ *
5
15
  * ---
6
16
  *
7
17
  * **Why this file exists.** `orchestrator.ts` in the control plane printed
@@ -52,7 +62,7 @@
52
62
  * home is the failure mode it exists to prevent.
53
63
  */
54
64
  /** The verbs the CLI dispatches. Anything else after `halfcycle ` is unknown. */
55
- export declare const CLI_VERBS: readonly ["install", "check-drift", "build-record", "open-phase", "close-phase"];
65
+ export declare const CLI_VERBS: readonly ["install", "check-drift", "build-record", "open-phase", "close-phase", "ci"];
56
66
  export type CliVerb = (typeof CLI_VERBS)[number];
57
67
  /** A flag every invocation of the verb must carry. */
58
68
  export interface RequiredFlag {
@@ -1 +1 @@
1
- {"version":3,"file":"cli-contract.d.ts","sourceRoot":"","sources":["../src/cli-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,iFAAiF;AACjF,eAAO,MAAM,SAAS,kFAAmF,CAAC;AAE1G,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,sDAAsD;AACtD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QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAAE,CAyBxF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAMtE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMvE"}
@@ -145,6 +145,49 @@ export interface ConfirmIdentityDeps extends ResolveOptions {
145
145
  /** The `fetch` used to ask the plane who this credential is. Defaults to global. */
146
146
  fetchImpl?: typeof fetch;
147
147
  }
148
+ /**
149
+ * Everything one `GET /account` said: who the credential belongs to, and whether
150
+ * the plane refused it.
151
+ *
152
+ * TWO FACTS FROM ONE CALL, which is the whole reason this shape exists. The
153
+ * installer's re-use arm needs the refusal to decide, and the report four hundred
154
+ * lines later needs the identity to print — and they are the same call. Fetching
155
+ * twice is what `identity-not-refetched.test.ts` exists to refuse, and it would
156
+ * also double what a machine with no network waits before either question is
157
+ * answered.
158
+ */
159
+ export interface AccountAnswer {
160
+ /**
161
+ * The identity, when the plane named one. `undefined` on EVERY failure, exactly
162
+ * as `describeAccount` returns it — this field is that function's whole result.
163
+ */
164
+ readonly identity: AccountIdentity | undefined;
165
+ /**
166
+ * True iff a response arrived AND its status was `401`.
167
+ *
168
+ * **Not `identity === undefined`, and the gap between the two is the point.** A
169
+ * timeout, a `503`, an unparseable body and an unreachable host all leave
170
+ * `identity` undefined with `refused` false: nothing was said about the
171
+ * credential, so nothing may be concluded about it. Only this field may steer a
172
+ * decision; `identity` may only steer a display line.
173
+ */
174
+ readonly refused: boolean;
175
+ }
176
+ /**
177
+ * Ask the plane about a credential — the ONE composition of `GET /account` in this
178
+ * package, and the one home for reading its status.
179
+ *
180
+ * `describeAccount` below is this function with the status dropped, so there are
181
+ * not two requests, two timeouts or two readings of what a `401` means. A caller
182
+ * that has already decided takes `describeAccount`; a caller whose decision this
183
+ * answer IS takes this one.
184
+ *
185
+ * It throws for nothing. A network error, a timeout, a non-200, a body that is not
186
+ * JSON and a body this contract does not admit all come back as an answer rather
187
+ * than an exception, because one caller's next line prints a name to a human and
188
+ * the other's is a re-install that must not fail over a slow service.
189
+ */
190
+ export declare function askAccount(serviceUrl: string, credential: string, fetchImpl?: typeof fetch): Promise<AccountAnswer>;
148
191
  /**
149
192
  * Ask the plane whose account a credential is. `undefined` when it will not say.
150
193
  *
@@ -153,6 +196,13 @@ export interface ConfirmIdentityDeps extends ResolveOptions {
153
196
  * contract does not admit. The caller's next line prints a name to a human — there is no
154
197
  * failure of this call that is worth costing a developer their install, and there is no
155
198
  * failure of it that may produce a name.
199
+ *
200
+ * **THE TOTALITY IS A CONTRACT ITS CALLERS DEPEND ON, AND T-10 DID NOT WEAKEN IT.**
201
+ * The re-use arm needed a `401` to reach it, and the way that was NOT done is worth
202
+ * recording: this function did not learn to branch on status or to fail loudly. It
203
+ * collapses `askAccount`'s answer to its identity, which is what the two callers
204
+ * here have always wanted, and the caller whose decision the status is calls
205
+ * `askAccount` directly.
156
206
  */
157
207
  export declare function describeAccount(serviceUrl: string, credential: string, fetchImpl?: typeof fetch): Promise<AccountIdentity | undefined>;
158
208
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-identity.d.ts","sourceRoot":"","sources":["../src/confirm-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkGG;AAGH,OAAO,EAA4B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAInF,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAy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Ae,EAAE,MAAM,GAAG,SAAS,EACnC,OAAO,UAAQ,GACd,MAAM,CASR;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAE9E;AA+BD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAK7D;AAgKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,OAAO,GAAG,MAAM,CAO3F;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,kBAAkB,EAC9B,GAAG,EAAE,UAAU,EACf,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,kBAAkB,CAAC,CAuD7B"}
@@ -61,11 +61,22 @@
61
61
  * variable points at the wrong half used to get a bare 404 and no way to tell
62
62
  * which half of a two-service platform they had missed.
63
63
  *
64
- * INV-001: this file imports the global `fetch` (Node 20) and one bundle-internal
64
+ * INV-001: this file imports the global `fetch` (Node 20), one bundle-internal
65
65
  * constant (`DEFAULT_CONTROL_ORIGIN`, so the wrong-origin sentence names the same
66
- * plane the installer actually calls rather than a second copy of the address).
67
- * It never imports the control service — the create endpoint is an external HTTP
68
- * contract, exactly like the runner is an external binary contract.
66
+ * plane the installer actually calls rather than a second copy of the address), and
67
+ * `@halfcycle/events` — one of the exactly two workspace packages a shippable may
68
+ * import. It never imports the control service — the create endpoint is an external
69
+ * HTTP contract, exactly like the runner is an external binary contract.
70
+ *
71
+ * **THE SUCCESS BODY IS A DECLARED SHAPE SINCE T-04 (`credential-lifecycle`), AND
72
+ * THIS FILE NO LONGER DECIDES WHAT ITS KEYS ARE.** It was a route-level literal read
73
+ * here by hand, which was the right posture while exactly one package parsed it; the
74
+ * runner now parses the same body to refresh a timed-out token
75
+ * (`engagement-token-silent-refresh`), so INV-003 applies and
76
+ * `engagementCredentialResponseSchema` (`packages/events/src/credential-wire.ts`) is
77
+ * its one home. What stays here is what that declaration deliberately does not
78
+ * decide — whether a value it was handed is USABLE — and the named sentences that
79
+ * say so. See `requestEngagementValues`.
69
80
  */
70
81
  /** The four values `POST /engagements` returns (Option A — the session credential
71
82
  * crosses once on create; `mcpUrl` and `guardUrl` are the server declaring where
@@ -1 +1 @@
1
- {"version":3,"file":"create-engagement.d.ts","sourceRoot":"","sources":["../src/create-engagement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAIH;;oCAEoC;AACpC,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;;;OAkBG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAE9C,6CAA6C;aAC7B,MAAM,EAAE,MAAM;IAC9B,8DAA8D;aAC9C,aAAa,EAAE,MAAM;IACrC,+DAA+D;aAC/C,SAAS,EAAE,MAAM,GAAG,SAAS;IAC7C;;;;;;;;;;;;OAYG;aACa,MAAM,EAAE,MAAM,GAAG,SAAS;;IAnB1C,6CAA6C;IAC7B,MAAM,EAAE,MAAM;IAC9B,8DAA8D;IAC9C,aAAa,EAAE,MAAM;IACrC,+DAA+D;IAC/C,SAAS,EAAE,MAAM,GAAG,SAAS;IAC7C;;;;;;;;;;;;OAYG;IACa,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1C,OAAO,EAAE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GAAG,SAAS;;IAnB1C,6CAA6C;IAC7B,MAAM,EAAE,MAAM;IAC9B,8DAA8D;IAC9C,aAAa,EAAE,MAAM;IACrC,+DAA+D;IAC/C,SAAS,EAAE,MAAM,GAAG,SAAS;IAC7C;;;;;;;;;;;;OAYG;IACa,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1C,OAAO,EAAE,MAAM;IAMjB;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,WAAW,IAAI,OAAO,CAGzB;CACF;AA4ED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAU5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,iBAAiB,CAAC,CAW5B"}
@@ -101,6 +101,19 @@ export interface SignInDeps {
101
101
  sleep?: (ms: number) => Promise<void>;
102
102
  /** The clock the local deadline is measured on. Defaults to `Date.now`. */
103
103
  now?: () => number;
104
+ /**
105
+ * What signing in is FOR, spliced into `signIn`'s opening line: "Halfcycle needs
106
+ * an account before it can **<reason>** — signing you in through your browser."
107
+ *
108
+ * DEFAULTS TO THE INSTALL'S OWN REASON, because every caller of `signIn` was the
109
+ * installer until T-11 (`ci-oidc-token-exchange`) — an install always creates or
110
+ * joins an engagement immediately after obtaining a credential, so the hardcoded
111
+ * text was never false. `ci bind`/`ci unbind` create no engagement at all, and are
112
+ * the first callers for which the default would be — supplied here rather than a
113
+ * second hardcoded sentence in this file, which is how a caller's reason and this
114
+ * module's default come to disagree the next time either one changes.
115
+ */
116
+ reason?: string;
104
117
  }
105
118
  /**
106
119
  * The platform command that opens a URL in the user's browser, as `{command, args}`.
@@ -1 +1 @@
1
- {"version":3,"file":"device-signin.d.ts","sourceRoot":"","sources":["../src/device-signin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAIH,OAAO,EAKL,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAG3B;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,KAAK;aAEpB,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM,EAC9B,OAAO,EAAE,MAAM;CAKlB;AAED,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,QAGV,CAAC;AAE3B;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B,QAGsC,CAAC;AAQnF,yEAAyE;AACzE,MAAM,WAAW,UAAU;IACzB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,qDAAqD;IACrD,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,2EAA2E;IAC3E,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAUD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,MAAM,GACV;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAIrC;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAOlD;AAaD,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB;IACjC,oEAAoE;IACpE,MAAM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,OAAO,CAAC,kBAAkB,CAAC,CAmE7B;AAED,sDAAsD;AACtD,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAG9E;AAED,oFAAoF;AACpF,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAsC1F;AAYD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,uBAAuB,EAChC,IAAI,GAAE,UAAe,GACpB,OAAO,CAAC,kBAAkB,CAAC,CAmD7B;AAED,uCAAuC;AACvC,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,QAIF,CAAC;AAiEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,MAAM,CAC1B,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,UAAU,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CAAO,GAClD,OAAO,CAAC,QAAQ,CAAC,CAmFnB"}
@@ -73,20 +73,30 @@
73
73
  * why `halfcycleHome()` is imported from it rather than re-derived.
74
74
  *
75
75
  * ---------------------------------------------------------------------------
76
- * TWO HOMES FOR THIS PATH SHAPE ACROSS THE REPO, AND IT IS A PRESENT CONSTRAINT,
77
- * NOT AN OVERSIGHT. `packages/mac-workspace-provider/src/registry.ts` has its own
78
- * `engagementEnvPath()` for the identical path — Studio's writer. `packages/bundle`
79
- * is shippable and its import allowlist is exactly `{packages/core, packages/events}`
80
- * (INV-001), and the provider is hosted-only, so the two cannot share a function
81
- * today. `packages/core` is the one package both may import and is where this
82
- * belongs eventually; that is the same direction `GUARD_ENV_KEYS`'s docblock in
83
- * `install.ts` records as #476, and it is deliberately not done mid-wave. What
84
- * binds the two meanwhile is a test that reads the provider's source text off disk
85
- * and asserts the shapes agree (`test/credential-out-of-repo.test.ts`) — an `fs`
86
- * read, not an import, so there is no build edge and nothing crosses the moat.
87
- *
88
- * INV-001: Node builtins and this package's own modules only.
76
+ * THE FORMAT MOVED TO `packages/core`; THE I/O DID NOT (T-01,
77
+ * `engagement-token-silent-refresh`). `shq`/`unquote`, `parseEnvText`,
78
+ * `reconcileEnvText`, the header constant and the path SEGMENTS are now defined
79
+ * once in `@halfcycle/core` and re-exported from here, so this package's import
80
+ * sites are untouched. Every `readFileSync`/`writeFileSync`/`chmodSync`/`join` in
81
+ * this file STAYS here: core is transpiled into browser bundles by
82
+ * `apps/dashboard` and must hold no `node:` import at all, type-only included.
83
+ *
84
+ * That hoist is what makes a THIRD writer legal. `packages/runner` is shippable
85
+ * and may import only `{packages/core, packages/events}` (INV-001), so the refresh
86
+ * (T-08) reaches this format without reaching this package — and one writer's
87
+ * bytes are the same bytes whichever wrote them.
88
+ *
89
+ * `packages/mac-workspace-provider/src/registry.ts` still keeps its own copy of
90
+ * the path shape and of `shq` — it is hosted-only and could import core, but that
91
+ * consolidation is not this task's (#476 remains open for it). What binds Studio's
92
+ * copy meanwhile is a test that reads source text off disk and asserts the shapes
93
+ * agree (`test/credential-out-of-repo.test.ts`), and since T-01 the text it reads
94
+ * is CORE's, not this file's — an `fs` read, not an import, so there is no build
95
+ * edge and nothing crosses the moat.
96
+ *
97
+ * INV-001: Node builtins, `@halfcycle/core` and this package's own modules only.
89
98
  */
99
+ export { ENGAGEMENT_ENV_HEADER, ENGAGEMENTS_DIR_NAME, ENGAGEMENT_ENV_FILENAME, HALFCYCLE_DIR_NAME, NOT_THIS_ACCOUNT_MARKER_FILENAME, parseEnvText, shq, unquote, } from '@halfcycle/core';
90
100
  /**
91
101
  * The field the committed pin (`.halfcycle/bundle.json`) carries the engagement id
92
102
  * under. Named once here because BOTH readers of it — `readEngagementCredential`'s
@@ -101,6 +111,29 @@ export declare const PIN_ENGAGEMENT_ID_FIELD = "engagementId";
101
111
  export declare function engagementStateDir(engagementId: string, home?: string): string;
102
112
  /** `~/.halfcycle/engagements/<id>/env` — the owner-only per-engagement env file. */
103
113
  export declare function engagementEnvPath(engagementId: string, home?: string): string;
114
+ /**
115
+ * WHY THE NOT-THIS-ACCOUNT MARKER IS A FILE OF ITS OWN — the reason record for
116
+ * outcome B (T-02b, `solo-project-ownership`). The filename itself is one of
117
+ * core's path segments (`NOT_THIS_ACCOUNT_MARKER_FILENAME`, re-exported above),
118
+ * because the generated POSIX snippet below composes the same path.
119
+ *
120
+ * **BESIDE THE CREDENTIAL STORE, NEVER IN IT AND NEVER IN THE PIN.** S-01's memo
121
+ * ruled out both other homes and both rulings hold: the committed pin
122
+ * (`.halfcycle/bundle.json`) travels with the repository, so a flag there would
123
+ * tell EVERY clone — including the owner's own second machine — that it is not the
124
+ * owner's; and a ninth key in the credential env file would corrupt
125
+ * `CREDENTIAL_REQUIRED_KEYS`' conjunction, which is what decides whether a checkout
126
+ * is treated as holding a credential at all (`install.ts`). This is a THIRD file,
127
+ * a sentinel whose only fact is its own existence — cheap enough for the generated
128
+ * shell to test with `[ -f … ]` (see `engagementResolutionShell` below) and for a
129
+ * Node process to `existsSync` the same way.
130
+ *
131
+ * **WHAT IT RECORDS AND WHY THAT IS ENOUGH.** The refusal is permanent for this
132
+ * machine as this account (retrying cannot change it — only signing in as a
133
+ * different account can), so the fact is stable for as long as this credential-less
134
+ * state persists. Its content is a timestamp, for a support conversation; the three
135
+ * remedy sites that read it (S1/S2/S3) branch on presence alone, never on content.
136
+ */
104
137
  /**
105
138
  * `~/.halfcycle/engagements/<id>/not-this-account` — see
106
139
  * `NOT_THIS_ACCOUNT_MARKER_FILENAME` above for why this is a third file rather than
@@ -218,78 +251,24 @@ export type EngagementEnvKey = (typeof ENGAGEMENT_ENV_KEYS)[number];
218
251
  */
219
252
  export declare const PHASE_STAMP_ENV_KEY = "HALFCYCLE_PHASE";
220
253
  /**
221
- * Parse `KEY=value` lines. **PARSES, NEVER SOURCES** — a credential store is not
222
- * code, and `.` would execute whatever the file happens to contain. An optional
223
- * leading `export ` is tolerated because the shells that source this file accept
224
- * one, so a hand-edited store must read the same both ways, and one layer of
225
- * matching quotes is stripped for the same reason (see the encoding note above).
226
- *
227
- * (The one exception is `guard-runner.sh`, which genuinely sources rather than
228
- * parses: it must EXPORT the values into a child process, which is a thing only the
229
- * shell can do. That file is generated by us, written `0600` outside every
230
- * repository, and is Studio's adopted contract — a narrower surface than the
231
- * developer-editable `.env.local` it replaces.)
232
- */
233
- export declare function parseEnvText(raw: string): Record<string, string>;
234
- /**
235
- * Reconcile our keys into an existing env-file body BY KEY.
236
- *
237
- * Every pre-existing line survives byte-for-byte: a `KEY=value` line whose key is
238
- * one of ours is updated IN PLACE (so key order is preserved and no duplicate is
239
- * introduced); one of ours that is absent is appended under the header; and any
240
- * other line — comments, blanks, a key some other Halfcycle writer put here — is
241
- * copied through untouched.
242
- *
243
- * **`export KEY=` counts as that key.** `parseEnvText` and the installer's legacy
244
- * migration both tolerate the prefix, and this function did not — so an existing
245
- * `export HALFCYCLE_TOKEN=old` was left alone and a bare `HALFCYCLE_TOKEN=new`
246
- * appended below it. Last-assignment-wins meant nothing observably broke, which is
247
- * why it survived: a superseded token simply stayed on disk, in the one feature
248
- * whose whole subject is where a credential is allowed to be. The prefix is
249
- * preserved on the rewritten line rather than normalised away, because "every
250
- * pre-existing line survives" is the contract and `export` is the developer's.
251
- *
252
- * Values are written `shq`-quoted — see the encoding note above; the file is
253
- * SOURCED by `guard-runner.sh`, so an unquoted value carrying a space executes
254
- * its own remainder.
255
- *
256
- * **The non-destructiveness is not vestigial after the move out of the tree.** This
257
- * path is Studio's too: `packages/mac-workspace-provider` writes
258
- * `CONTROL_TELEMETRY_TOKEN` and `HALFCYCLE_GUARD_EVAL_LOG_DIR` into the same file for
259
- * an engagement it manages. A whole-file overwrite here would silently delete them on
260
- * any machine where both ever touch one engagement. Reconciling by key costs nothing
261
- * and removes that whole class.
262
- *
263
- * **`CONTROL_TELEMETRY_URL` is deliberately NOT named alongside those two** — this
264
- * said `CONTROL_TELEMETRY_*` (the whole family) until a T-10 follow-up correction.
265
- * `CONTROL_TELEMETRY_URL` is one of OURS since T-10 (`ENGAGEMENT_ENV_KEYS` above), so
266
- * it is reconciled the same as `HALFCYCLE_TOKEN` — updated in place by a Connect
267
- * install, not preserved as a foreign writer's key. A Studio-written value for it is
268
- * legitimately overwritten on the next Connect install; only `CONTROL_TELEMETRY_TOKEN`
269
- * is still genuinely foreign.
270
- *
271
- * **A `null` VALUE REMOVES THE KEY'S LINE. An absent one still writes `KEY=''`.**
272
- * The two are different requests and this function had no way to make the first
273
- * one: `values[k] ?? ''` mapped both to the empty string, so the only reachable
274
- * way to "unset" a key was to write it blank. Blank is not absent to any reader of
275
- * this file — the shell that SOURCES it sets the variable to the empty string, and
276
- * the Build-Record write predicate refuses an empty phase identity, so a phase
277
- * stamp cleared by blanking would fire a refusal on the ordinary project-scope
278
- * return. `open-phase --none` and `close-phase` therefore pass `null` and the
279
- * assignment leaves the file wherever it sat, `export ` prefix and all. Nothing is
280
- * appended for a removed key.
281
- *
282
- * **The header block is appended AT MOST ONCE per file**, and that follows from the
283
- * same pair of verbs: `HALFCYCLE_PHASE` leaves on every close and comes back on
284
- * every open, so a header emitted with each re-appearance would grow the file by a
285
- * comment block per phase. A file that already carries the header gets the new
286
- * lines under the one it has.
287
- *
288
- * **Appended lines go BEFORE the file's final newline, not after a blank one.** The
289
- * append used to land after the trailing empty element of the split, which put a
290
- * blank line above the new block — invisible when a key is written once and never
291
- * removed, and one blank line per phase once a key comes and goes. The
292
- * pre-existing text is still an untouched prefix either way.
254
+ * Reconcile the engagement credential's keys into an existing env-file body.
255
+ *
256
+ * **This is core's `reconcileEnvText` with THIS package's key set as the
257
+ * default, and nothing else.** No logic lives here: the reconciliation — lines
258
+ * preserved byte-for-byte, `export ` prefixes kept, `null` removing a key, the
259
+ * header appended at most once, the append landing before the final newline — is
260
+ * core's, and the runner calls the same function for the same bytes. What the
261
+ * default adds is the fact that when this package does not say which keys it
262
+ * owns, it owns the eight credential keys (`ENGAGEMENT_ENV_KEYS`), which is the
263
+ * installer's call and is not core's to know. Callers passing `keys` explicitly
264
+ * (the phase stamp's two verbs) are unaffected.
265
+ *
266
+ * `CONTROL_TELEMETRY_URL` is one of OURS since T-10 (`ENGAGEMENT_ENV_KEYS`
267
+ * above), so it is reconciled like `HALFCYCLE_TOKEN` — updated in place by a
268
+ * Connect install, not preserved as a foreign writer's key. A Studio-written
269
+ * value for it is legitimately overwritten on the next Connect install; only
270
+ * `CONTROL_TELEMETRY_TOKEN` and `HALFCYCLE_GUARD_EVAL_LOG_DIR` are still
271
+ * genuinely foreign, and core's by-key reconcile is what keeps them.
293
272
  */
294
273
  export declare function reconcileEnvText(existing: string | null, values: Record<string, string | null | undefined>, keys?: readonly string[]): string;
295
274
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"engagement-credential.d.ts","sourceRoot":"","sources":["../src/engagement-credential.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwFG;AAiBH;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AAEtD,oFAAoF;AACpF,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7E;AAyBD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED;;;;;;;;;G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AAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,4BAA4B,mDAExC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,mMAOtB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAoCrD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EACjD,IAAI,GAAE,SAAS,MAAM,EAAwB,GAC5C,MAAM,CAER;AAMD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAM/B;AAED,8DAA8D;AAC9D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EACjD,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,GAAE,SAAS,MAAM,EAAwB,GAC5C,eAAe,CAoBjB;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CA8ClD"}
@@ -31,6 +31,16 @@
31
31
  * that adding it here would re-open that decision. So the note can only say what
32
32
  * this id is *not*, and where the right one lives; it cannot answer the question
33
33
  * directly.
34
+ *
35
+ * **REWORDING THIS STRING REWRITES A FILE IN EVERY INSTALLED TREE AT ONCE, and
36
+ * that is not what it looks like.** The identity writer reads `projectId`,
37
+ * `rootCommit` and `remote` back off disk when the file is already there, so those
38
+ * three survive a re-install — but it takes THIS field from this constant on every
39
+ * run, never from disk. So a re-install after any edit here finds a file whose
40
+ * bytes differ, replaces it, and reports a write; the developer's identity is
41
+ * preserved and the file is not. The change reads like copy-editing and lands
42
+ * everywhere the installer has ever run. If you must change it, change it knowing
43
+ * that, and say so in the commit.
34
44
  */
35
45
  export declare const PROJECT_IDENTITY_NOTE: string;
36
46
  /** The committed project identity: minted id plus the repo's root fingerprint. */
@@ -1 +1 @@
1
- {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB,QAGF,CAAC;AAEjC,kFAAkF;AAClF,MAAM,WAAW,eAAe;IAC9B,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gEAAgE;IAChE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAgBD,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMpE;AAED,oCAAoC;AACpC,wBAAgB,UAAU,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKrE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,eAAe,CAAC;IAAC,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