halfcycle 0.3.26 → 0.3.28
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/.claude-plugin/plugin.json +1 -1
- package/README.md +8 -8
- package/bin/bin.bundle.mjs +122 -55
- package/dist/bin.d.ts +11 -5
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +1397 -359
- package/dist/bin.js.map +3 -3
- package/dist/cli-contract.d.ts +1 -1
- package/dist/cli-contract.d.ts.map +1 -1
- package/dist/create-engagement.d.ts +5 -5
- package/dist/device-signin.d.ts +17 -7
- package/dist/device-signin.d.ts.map +1 -1
- package/dist/engagement-credential.d.ts +50 -4
- package/dist/engagement-credential.d.ts.map +1 -1
- package/dist/index.js +689 -165
- package/dist/index.js.map +3 -3
- package/dist/install-manifest.d.ts +169 -0
- package/dist/install-manifest.d.ts.map +1 -0
- package/dist/install.d.ts +146 -7
- package/dist/install.d.ts.map +1 -1
- package/dist/loopback-signin.d.ts +25 -5
- package/dist/loopback-signin.d.ts.map +1 -1
- package/dist/merge-settings.d.ts +12 -0
- package/dist/merge-settings.d.ts.map +1 -1
- package/dist/open-phase.d.ts.map +1 -1
- package/dist/own-engagement.d.ts.map +1 -1
- package/dist/scan.d.ts +7 -0
- package/dist/scan.d.ts.map +1 -1
- package/dist/uninstall.d.ts +96 -0
- package/dist/uninstall.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/ci-bind.d.ts +0 -116
- package/dist/ci-bind.d.ts.map +0 -1
package/dist/device-signin.d.ts
CHANGED
|
@@ -105,15 +105,25 @@ export interface SignInDeps {
|
|
|
105
105
|
* What signing in is FOR, spliced into `signIn`'s opening line: "Halfcycle needs
|
|
106
106
|
* an account before it can **<reason>** — signing you in through your browser."
|
|
107
107
|
*
|
|
108
|
-
* DEFAULTS TO THE
|
|
109
|
-
*
|
|
110
|
-
* joins
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
108
|
+
* DEFAULTS TO THE CREATE PATH'S REASON, and only the create path may rely on it.
|
|
109
|
+
* This used to say the default was never false because an install "always creates
|
|
110
|
+
* or joins" — but the sentence names creating, and every JOIN printed it too until
|
|
111
|
+
* #1345: a second machine was told the CLI was about to create the one thing it
|
|
112
|
+
* was being careful not to. So any caller that is not a create supplies its own
|
|
113
|
+
* reason here — `joinPinnedEngagement` does — rather than a second hardcoded
|
|
114
|
+
* sentence in this file, which is how a caller's reason and this module's default
|
|
115
|
+
* come to disagree the next time either one changes. (`ci bind`/`ci unbind` were
|
|
116
|
+
* the first callers to supply one; they were removed at T-25.)
|
|
115
117
|
*/
|
|
116
118
|
reason?: string;
|
|
119
|
+
/**
|
|
120
|
+
* The project this sign-in is for, when the caller knows it BEFORE the sign-in
|
|
121
|
+
* completes — the join path does, the create path does not. Used for one thing:
|
|
122
|
+
* the loopback completion page sends the browser on to that project's page instead
|
|
123
|
+
* of the projects list. Never read to decide access, and only a value that passes
|
|
124
|
+
* the engagement-id check is used at all (`loopback-signin.ts`, `onwardTarget`).
|
|
125
|
+
*/
|
|
126
|
+
onwardEngagementId?: string;
|
|
117
127
|
}
|
|
118
128
|
/**
|
|
119
129
|
* 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;AAE7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wB,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"}
|
|
@@ -107,7 +107,44 @@ export { ENGAGEMENT_ENV_HEADER, ENGAGEMENTS_DIR_NAME, ENGAGEMENT_ENV_FILENAME, H
|
|
|
107
107
|
* than left to match by eye.
|
|
108
108
|
*/
|
|
109
109
|
export declare const PIN_ENGAGEMENT_ID_FIELD = "engagementId";
|
|
110
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* The refusal an engagement id that is not UUID-shaped meets before it becomes a
|
|
112
|
+
* path. A class of its own so a caller can tell "this id cannot name a folder"
|
|
113
|
+
* from an I/O failure without matching on words.
|
|
114
|
+
*/
|
|
115
|
+
export declare class InvalidEngagementIdError extends Error {
|
|
116
|
+
constructor(engagementId: string);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* THE ENGAGEMENT-ID CHECK THIS PACKAGE CALLS — once, before an id becomes a path
|
|
120
|
+
* under the repository or under `~/.halfcycle` (T-18a, #1270).
|
|
121
|
+
*
|
|
122
|
+
* The id is joined into `~/.halfcycle/engagements/<id>/`, and it arrives from a
|
|
123
|
+
* COMMITTED file: `.halfcycle/bundle.json` travels with the repository, so anyone
|
|
124
|
+
* who can land a commit decides it. `"../../.ssh"` there made the installer's
|
|
125
|
+
* credential write, the phase stamp and the marker land wherever that pointed.
|
|
126
|
+
* So the id is checked here, before anything is composed from it, and a caller
|
|
127
|
+
* that must refuse before its FIRST write (the installer, the uninstaller) calls
|
|
128
|
+
* this at its entry rather than waiting for the path composition below to throw.
|
|
129
|
+
*
|
|
130
|
+
* The shape itself is not defined here: `isEngagementId` in `@halfcycle/core` is
|
|
131
|
+
* its one home, shared with the runner's credential refresh and rendered into the
|
|
132
|
+
* generated shell scripts from the same pattern (`engagementResolutionShell`). A
|
|
133
|
+
* second copy of the regex in this package would be a second answer to the same
|
|
134
|
+
* question.
|
|
135
|
+
*
|
|
136
|
+
* @throws InvalidEngagementIdError
|
|
137
|
+
*/
|
|
138
|
+
export declare function assertEngagementId(engagementId: string): void;
|
|
139
|
+
/**
|
|
140
|
+
* `~/.halfcycle/engagements/<id>/` — this engagement's machine-level state dir.
|
|
141
|
+
*
|
|
142
|
+
* Every path this package composes under `~/.halfcycle/engagements` passes through
|
|
143
|
+
* here, so the id is checked HERE as well as at the callers' entries: a caller
|
|
144
|
+
* that forgot `assertEngagementId` still cannot compose a path out of `../`.
|
|
145
|
+
*
|
|
146
|
+
* @throws InvalidEngagementIdError
|
|
147
|
+
*/
|
|
111
148
|
export declare function engagementStateDir(engagementId: string, home?: string): string;
|
|
112
149
|
/** `~/.halfcycle/engagements/<id>/env` — the owner-only per-engagement env file. */
|
|
113
150
|
export declare function engagementEnvPath(engagementId: string, home?: string): string;
|
|
@@ -340,9 +377,18 @@ export declare function writeEngagementEnv(engagementId: string, values: Record<
|
|
|
340
377
|
* `HALFCYCLE_ENV_FILE` / `HALFCYCLE_ENV_PROBLEM` / `HALFCYCLE_ENV_ENGAGEMENT` in
|
|
341
378
|
* the CURRENT shell and returns a status, and callers use `if halfcycle_env_file …`.
|
|
342
379
|
*
|
|
343
|
-
* `$HALFCYCLE_ENV_PROBLEM` names which step failed — `no-pin`, `no-id`, `
|
|
344
|
-
* `no-credential` — so each caller says the true thing for its own
|
|
345
|
-
* of printing one sentence for
|
|
380
|
+
* `$HALFCYCLE_ENV_PROBLEM` names which step failed — `no-pin`, `no-id`, `bad-id`,
|
|
381
|
+
* `no-home`, `no-credential` — so each caller says the true thing for its own
|
|
382
|
+
* surface instead of printing one sentence for five different situations.
|
|
383
|
+
*
|
|
384
|
+
* **`bad-id` (T-18a, #1270) is the id failing `ENGAGEMENT_ID_PATTERN`** — core's
|
|
385
|
+
* one definition of the shape, interpolated here so the shell and
|
|
386
|
+
* `isEngagementId` cannot disagree about what may become a path. It is a problem
|
|
387
|
+
* value of its own rather than `no-id` because the remedy differs: re-running the
|
|
388
|
+
* installer does not rewrite a pin whose id it refuses, so "run npx halfcycle to
|
|
389
|
+
* rewrite it" would be false. The guard wrapper and the session-start marker treat
|
|
390
|
+
* every failure alike (no credential sourced), which is the right answer for this
|
|
391
|
+
* one too; only `mcp-headers.sh` words each case, and it has a `bad-id` arm.
|
|
346
392
|
*
|
|
347
393
|
* **HALFCYCLE_ENV_NOT_THIS_ACCOUNT IS SET ON THE `no-credential` FAILURE PATH TOO
|
|
348
394
|
* (T-02b, `solo-project-ownership`) — that is the state it exists to distinguish.**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engagement-credential.d.ts","sourceRoot":"","sources":["../src/engagement-credential.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiGG;
|
|
1
|
+
{"version":3,"file":"engagement-credential.d.ts","sourceRoot":"","sources":["../src/engagement-credential.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiGG;AAmBH,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,gCAAgC,EAChC,YAAY,EACZ,GAAG,EACH,OAAO,GACR,MAAM,iBAAiB,CAAC;AAgBzB;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AAEtD;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,YAAY,EAAE,MAAM;CAajC;AAED;;;;;;;;;;;;;;;;;;;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