halfcycle 0.4.2 → 0.4.3
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/bin/bin.bundle.mjs +26 -6
- package/dist/claude-version-probe.d.ts.map +1 -1
- package/dist/cli.js +131 -59
- package/dist/cli.js.map +1 -1
- package/dist/confirm-identity.d.ts +27 -17
- package/dist/confirm-identity.d.ts.map +1 -1
- package/dist/device-signin.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -18
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +68 -9
- package/dist/install.d.ts.map +1 -1
- package/dist/merge-settings.d.ts +35 -16
- package/dist/merge-settings.d.ts.map +1 -1
- package/dist/own-engagement.d.ts +8 -7
- package/dist/own-engagement.d.ts.map +1 -1
- package/dist/uninstall.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/merge-settings.d.ts
CHANGED
|
@@ -9,12 +9,15 @@
|
|
|
9
9
|
* here: it has grown twice (`UserPromptSubmit` at W8-T-05b, `Stop` at G-01) and a
|
|
10
10
|
* number in this comment goes stale silently while the code stays right.
|
|
11
11
|
*
|
|
12
|
-
* The merge is UPSERT-BY-IDENTITY, not append: every
|
|
13
|
-
*
|
|
14
|
-
* second install does not fire the guard twice per edit. Identity is
|
|
15
|
-
* hook command string, which is the stable, generated marker of a
|
|
16
|
-
*
|
|
17
|
-
* `.claude/hooks/`).
|
|
12
|
+
* The merge is UPSERT-BY-IDENTITY, not append: every command of ours already present
|
|
13
|
+
* for an event is taken out of the entry holding it and the generated entries
|
|
14
|
+
* re-added, so a second install does not fire the guard twice per edit. Identity is
|
|
15
|
+
* decided by the hook command string, which is the stable, generated marker of a
|
|
16
|
+
* Halfcycle-authored command (each of ours is a distinct invocation of a script under
|
|
17
|
+
* `.claude/hooks/`). **OURS ARE TAKEN OUT COMMAND BY COMMAND, NEVER ENTRY BY ENTRY**
|
|
18
|
+
* (E7, onboarding-fix-wave-2; #1586): an entry is dropped only when ours were all it
|
|
19
|
+
* held, so a developer's command grouped into the same entry as one of ours keeps its
|
|
20
|
+
* entry and matcher (`withoutHalfcycleCommands`, the rule uninstall applies too).
|
|
18
21
|
*
|
|
19
22
|
* **"OURS" IS EVERY COMMAND WE HAVE EVER WRITTEN, not only what this version
|
|
20
23
|
* generates** (#1556). The commands' form changed from `bash ./<script>` to
|
|
@@ -70,17 +73,33 @@ export interface ClaudeSettings {
|
|
|
70
73
|
[key: string]: unknown;
|
|
71
74
|
}
|
|
72
75
|
/**
|
|
73
|
-
* True iff `entry`
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
76
|
+
* True iff `hook` — one element of an entry's `hooks` list, as parsed — is a command
|
|
77
|
+
* of ours. THE PER-COMMAND TEST, and the only one: the merge and uninstall both take
|
|
78
|
+
* out exactly the commands it matches, and nothing else in an entry.
|
|
79
|
+
*/
|
|
80
|
+
export declare function isHalfcycleCommand(hook: unknown, halfcycleCommands: ReadonlySet<string>): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* True iff `entry` holds a command of ours (`isHalfcycleCommand`). This is how a
|
|
83
|
+
* re-install recognises our wiring, and how the installer's manifest decides whether a
|
|
84
|
+
* pre-manifest settings file is adopted. It says the entry HOLDS ours, not that the
|
|
85
|
+
* entry IS ours: a developer may group their own command into the same entry, so what
|
|
86
|
+
* the merge and uninstall take out is decided command by command
|
|
87
|
+
* (`withoutHalfcycleCommands`), never entry by entry.
|
|
88
|
+
*/
|
|
89
|
+
export declare function isHalfcycleEntry(entry: {
|
|
90
|
+
hooks: readonly unknown[];
|
|
91
|
+
}, halfcycleCommands: ReadonlySet<string>): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* `entry` with our commands taken out — THE ONE RULE both the merge and uninstall
|
|
94
|
+
* apply to a hook entry (E7, onboarding-fix-wave-2; #1586): an entry holding none of
|
|
95
|
+
* ours comes back as it is (the same object); one holding ours comes back with only
|
|
96
|
+
* the developer's commands, its `matcher` and every other key kept; and `null` only
|
|
97
|
+
* when taking ours out left it with no command at all. A developer's command in an
|
|
98
|
+
* entry beside ours therefore survives both install and uninstall.
|
|
82
99
|
*/
|
|
83
|
-
export declare function
|
|
100
|
+
export declare function withoutHalfcycleCommands<E extends {
|
|
101
|
+
hooks: readonly unknown[];
|
|
102
|
+
}>(entry: E, halfcycleCommands: ReadonlySet<string>): E | null;
|
|
84
103
|
/**
|
|
85
104
|
* Merge Halfcycle's generated hook entries into an existing settings object.
|
|
86
105
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-settings.d.ts","sourceRoot":"","sources":["../src/merge-settings.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"merge-settings.d.ts","sourceRoot":"","sources":["../src/merge-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAIH,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,6DAA6D;AAC7D,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,sEAAsE;AACtE,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAIjG;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,SAAS,OAAO,EAAE,CAAA;CAAE,EAAE,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAEtH;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS;IAAE,KAAK,EAAE,SAAS,OAAO,EAAE,CAAA;CAAE,EAC9E,KAAK,EAAE,CAAC,EACR,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,GACrC,CAAC,GAAG,IAAI,CAIV;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,GAAG,cAAc,CA0CjG"}
|
package/dist/own-engagement.d.ts
CHANGED
|
@@ -32,10 +32,11 @@ export type OwnEngagementDeps = ConfirmIdentityDeps;
|
|
|
32
32
|
*
|
|
33
33
|
* `actingAccountId` is not part of the plane's response and is not read from one: it is
|
|
34
34
|
* the account `confirmActingIdentity` settled on for this run, carried out to `bin.ts`
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* the
|
|
35
|
+
* for the report's "Signed in as" line and, on a CREATE only, for the committed
|
|
36
|
+
* `.halfcycle/bundle.json` as `createdByAccountId` (E1, #1598). Naming the account on
|
|
37
|
+
* stdout leaves the fact in scrollback and in nothing else — an agent-run install puts
|
|
38
|
+
* it in a transcript, not in front of a person — so the creator's id travels to disk
|
|
39
|
+
* with the engagement id it belongs beside. A join writes nothing there.
|
|
39
40
|
*
|
|
40
41
|
* THE ID AND NEVER THE EMAIL. That file is committed into the client's repository, so
|
|
41
42
|
* the identity read's `email` stops at the terminal; what is recorded is the value the
|
|
@@ -78,9 +79,9 @@ export interface OutcomeBRefusal {
|
|
|
78
79
|
readonly message: string;
|
|
79
80
|
/**
|
|
80
81
|
* The account this run confirmed before the plane refused it, when known — the
|
|
81
|
-
* same value `OwnedEngagement.actingAccountId` carries on success,
|
|
82
|
-
*
|
|
83
|
-
*
|
|
82
|
+
* same value `OwnedEngagement.actingAccountId` carries on success, for the
|
|
83
|
+
* report's "Signed in as" line. Never written to `.halfcycle/bundle.json`: only
|
|
84
|
+
* a create records an account there (E1, #1598).
|
|
84
85
|
*/
|
|
85
86
|
readonly actingAccountId?: string;
|
|
86
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"own-engagement.d.ts","sourceRoot":"","sources":["../src/own-engagement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EAAyB,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGxF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"own-engagement.d.ts","sourceRoot":"","sources":["../src/own-engagement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EAAyB,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGxF;;;G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;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,iBAAsB,GAC3B,OAAO,CAAC,eAAe,GAAG,eAAe,CAAC,CAoF5C"}
|
package/dist/uninstall.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AA8CH,2BAA2B;AAC3B,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,iFAAiF;IACjF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,kEAAkE;AAClE,MAAM,MAAM,iBAAiB,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,GACnC;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAC/B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QA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