halfcycle 0.3.35 → 0.3.37
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 +16 -1
- package/bin/bin.bundle.mjs +471 -61
- package/dist/banner-facts.d.ts +6 -2
- package/dist/banner-facts.d.ts.map +1 -1
- package/dist/bin.js +435 -430
- package/dist/bin.js.map +3 -3
- package/dist/claude-version-probe.d.ts +44 -0
- package/dist/claude-version-probe.d.ts.map +1 -0
- package/dist/confirm-identity.d.ts +7 -0
- package/dist/confirm-identity.d.ts.map +1 -1
- package/dist/device-signin.d.ts +93 -17
- package/dist/device-signin.d.ts.map +1 -1
- package/dist/engagement-credential.d.ts +39 -27
- package/dist/engagement-credential.d.ts.map +1 -1
- package/dist/index.js +189 -290
- package/dist/index.js.map +3 -3
- package/dist/install-manifest.d.ts +32 -4
- package/dist/install-manifest.d.ts.map +1 -1
- package/dist/install.d.ts +53 -23
- package/dist/install.d.ts.map +1 -1
- package/dist/loopback-signin.d.ts +8 -2
- package/dist/loopback-signin.d.ts.map +1 -1
- package/dist/open-phase.d.ts +2 -1
- package/dist/open-phase.d.ts.map +1 -1
- package/dist/probe-mcp.d.ts +39 -7
- package/dist/probe-mcp.d.ts.map +1 -1
- package/dist/uninstall.d.ts +1 -1
- package/dist/uninstall.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/install.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* (E1-T-09). The name is deliberately innocuous — it discloses nothing about
|
|
22
22
|
* Halfcycle's scaffold contents.
|
|
23
23
|
*/
|
|
24
|
-
import { SETTINGS_REL, WRITE_CAPABLE_TOOLS } from '@halfcycle/core';
|
|
24
|
+
import { BUNDLE_PIN_REL, MCP_REGISTRATION_REL, MCP_SERVER_KEY, SETTINGS_REL, WRITE_CAPABLE_TOOLS } from '@halfcycle/core';
|
|
25
25
|
export type EngagementType = 'self-build' | 'client';
|
|
26
26
|
export interface BundlePin {
|
|
27
27
|
version: string;
|
|
@@ -279,8 +279,8 @@ export declare const ZONE_B_DIR = ".workbench";
|
|
|
279
279
|
* depending on build mode — see the comment above `findBundleRoot`).
|
|
280
280
|
*/
|
|
281
281
|
export declare const BUNDLE_ROOT: string;
|
|
282
|
-
/** The committed pin. */
|
|
283
|
-
export
|
|
282
|
+
/** The committed pin. Its one home is `@halfcycle/core`; re-exported for the uninstaller. */
|
|
283
|
+
export { BUNDLE_PIN_REL };
|
|
284
284
|
/**
|
|
285
285
|
* The three files the installer merges into rather than owns. `SETTINGS_REL` lives
|
|
286
286
|
* with the hook table in `@halfcycle/core` and is re-exported here, as is
|
|
@@ -288,6 +288,8 @@ export declare const BUNDLE_PIN_REL = ".halfcycle/bundle.json";
|
|
|
288
288
|
*/
|
|
289
289
|
export { SETTINGS_REL, WRITE_CAPABLE_TOOLS };
|
|
290
290
|
export declare const GITIGNORE_REL = ".gitignore";
|
|
291
|
+
/** The attributes file the installer appends its line-ending rules to. */
|
|
292
|
+
export declare const GITATTRIBUTES_REL = ".gitattributes";
|
|
291
293
|
export interface ClosedWriteSet {
|
|
292
294
|
/** Files the installer writes whole. */
|
|
293
295
|
readonly files: ReadonlySet<string>;
|
|
@@ -303,6 +305,8 @@ export interface ClosedWriteSet {
|
|
|
303
305
|
readonly denyRuleSha256: ReadonlySet<string>;
|
|
304
306
|
/** Every line the installer appends to `.gitignore`. */
|
|
305
307
|
readonly gitignoreLines: ReadonlySet<string>;
|
|
308
|
+
/** Every line the installer appends to `.gitattributes`, retired scripts' included. */
|
|
309
|
+
readonly gitattributesLines: ReadonlySet<string>;
|
|
306
310
|
}
|
|
307
311
|
/**
|
|
308
312
|
* THE CLOSED WRITE SET, derived from the same constants the installer writes with
|
|
@@ -312,8 +316,11 @@ export interface ClosedWriteSet {
|
|
|
312
316
|
* deny rule or a `.gitignore` line is taken out only if the manifest records it AND
|
|
313
317
|
* it is one the installer generates: `HALFCYCLE_HOOK_COMMANDS` (the hook table's
|
|
314
318
|
* commands plus the retired ones — the set `generateSettingsJson` builds from), the
|
|
315
|
-
* hashes of `DENY_PATTERNS`,
|
|
316
|
-
* `REQUIRED_GITIGNORE_ENTRIES` plus the `.env.local` line older versions wrote
|
|
319
|
+
* hashes of `DENY_PATTERNS`, the `.gitignore` header plus
|
|
320
|
+
* `REQUIRED_GITIGNORE_ENTRIES` plus the `.env.local` line older versions wrote, and
|
|
321
|
+
* the `.gitattributes` header plus one LF rule per generated `.sh` path, current
|
|
322
|
+
* (`OWNED_GENERATED_HEADERS`) OR retired (`RETIRED_WRITE_SET_FILES`) — so a rule an
|
|
323
|
+
* earlier version wrote for a script a later one retires is still recognised.
|
|
317
324
|
* Without it a crafted manifest could name a developer's own hook, deny rule or
|
|
318
325
|
* ignore line and have uninstall delete it.
|
|
319
326
|
*
|
|
@@ -324,9 +331,10 @@ export interface ClosedWriteSet {
|
|
|
324
331
|
* that is not removed, whatever else it says.
|
|
325
332
|
*
|
|
326
333
|
* DERIVED, NOT LISTED. The command stubs come from `plugin.json`'s `commands[]`, the
|
|
327
|
-
* same array `copyManifestCommands` copies from; the hook scripts
|
|
328
|
-
*
|
|
329
|
-
*
|
|
334
|
+
* same array `copyManifestCommands` copies from; the hook scripts from
|
|
335
|
+
* `OWNED_GENERATED_HEADERS`, the table the owned-generated writes key on; the retired
|
|
336
|
+
* headers helper from `RETIRED_WRITE_SET_FILES`; the rest from the named constants
|
|
337
|
+
* their writers use. The directories are the
|
|
330
338
|
* ancestors of every member, so a new file under a new directory brings its
|
|
331
339
|
* directory with it. The writer and the remover therefore cannot hold two lists.
|
|
332
340
|
*/
|
|
@@ -419,8 +427,11 @@ export declare const USER_PROMPT_REMINDER_SENTENCE: string;
|
|
|
419
427
|
* protecting anyone: see DENY_PATTERNS for what these nine do and do not cover.
|
|
420
428
|
*/
|
|
421
429
|
export declare function generateSettingsJson(): string;
|
|
422
|
-
/**
|
|
423
|
-
|
|
430
|
+
/**
|
|
431
|
+
* What a retired generated file's removal found on disk and did about it
|
|
432
|
+
* (`removeLegacyCiStanza`, `removeRetiredMcpHeadersHelper`).
|
|
433
|
+
*/
|
|
434
|
+
export type RetiredFileRemoval = 'removed' | 'kept-foreign' | 'kept-uncommitted' | 'absent' | 'failed';
|
|
424
435
|
/**
|
|
425
436
|
* Delete `.halfcycle/ci-stanza.yml` when, and only when, BOTH hold (R-25 fix
|
|
426
437
|
* wave, F1): its opening line hashes to exactly one generation this installer
|
|
@@ -444,7 +455,7 @@ export type CiStanzaRemoval = 'removed' | 'kept-foreign' | 'kept-uncommitted' |
|
|
|
444
455
|
* reported, never thrown. Cleaning up a file this task retires must not fail an
|
|
445
456
|
* otherwise-successful install.
|
|
446
457
|
*/
|
|
447
|
-
export declare function removeLegacyCiStanza(targetRepo: string):
|
|
458
|
+
export declare function removeLegacyCiStanza(targetRepo: string): RetiredFileRemoval;
|
|
448
459
|
/**
|
|
449
460
|
* **THE INSTALLER WRITES NO `.env.example`, AND THIS IS WHERE THAT GENERATOR WAS.**
|
|
450
461
|
*
|
|
@@ -493,13 +504,21 @@ export declare function removeLegacyCiStanza(targetRepo: string): CiStanzaRemova
|
|
|
493
504
|
* key from the store makes every already-installed repository read as credential-less
|
|
494
505
|
* on its next run and silently join a fresh credential.
|
|
495
506
|
*/
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
|
|
507
|
+
export { MCP_REGISTRATION_REL, MCP_SERVER_KEY };
|
|
508
|
+
/**
|
|
509
|
+
* Delete the retired `.halfcycle/mcp-headers.sh` when, and only when, BOTH hold —
|
|
510
|
+
* the rule `removeLegacyCiStanza` follows, applied to this path
|
|
511
|
+
* (`windows-client-seat`, AC5): its second line hashes to one of
|
|
512
|
+
* `MCP_HEADERS_KNOWN_HEADER_HASHES`, AND `isTrackedAndClean` holds. Anything else is
|
|
513
|
+
* KEPT and reported, never deleted. A committed edit below an untouched header passes
|
|
514
|
+
* both keys and is deleted; accepted, because git history keeps it.
|
|
515
|
+
*
|
|
516
|
+
* CALLED ONLY AFTER `.mcp.json` HAS BEEN REWRITTEN to `MCP_HEADERS_HELPER_COMMAND`.
|
|
517
|
+
* Until then the old registration still names this script, and deleting it would
|
|
518
|
+
* take the credential away from a session that has not been migrated. An install
|
|
519
|
+
* with no MCP origin rewrites no registration, so it removes nothing.
|
|
520
|
+
*/
|
|
521
|
+
export declare function removeRetiredMcpHeadersHelper(targetRepo: string): RetiredFileRemoval;
|
|
503
522
|
/**
|
|
504
523
|
* THE ONE HOME of *which generated files this installer claims as its own, and by
|
|
505
524
|
* what evidence* (#1103). Every entry is a client-tree path this package
|
|
@@ -533,13 +552,16 @@ export declare const MCP_SERVER_KEY = "halfcycle";
|
|
|
533
552
|
* generation (`#1112`). T-25 removed the generator itself; the four forms' hashes
|
|
534
553
|
* now live in `CI_STANZA_KNOWN_HEADER_HASHES`, evidence for a REMOVAL rather than
|
|
535
554
|
* a write.
|
|
555
|
+
*
|
|
556
|
+
* `.halfcycle/mcp-headers.sh` LEFT this table (`windows-client-seat`): nothing writes
|
|
557
|
+
* it any more. Its path is in `RETIRED_WRITE_SET_FILES` and its two header forms'
|
|
558
|
+
* hashes in `MCP_HEADERS_KNOWN_HEADER_HASHES`, the same move the CI stanza made.
|
|
536
559
|
*/
|
|
537
560
|
export declare const OWNED_GENERATED_HEADERS: {
|
|
538
561
|
readonly '.claude/hooks/guard-runner.sh': "# Governance hook wrapper — generated by";
|
|
539
562
|
readonly '.claude/hooks/user-prompt-reminder.sh': "# UserPromptSubmit house-rule reminder — generated by";
|
|
540
563
|
readonly '.claude/hooks/session-end-marker.sh': "# Session-end marker cleanup — generated by";
|
|
541
564
|
readonly '.claude/hooks/session-start-marker.sh': "# Session-start marker — generated by";
|
|
542
|
-
readonly '.halfcycle/mcp-headers.sh': "# Halfcycle MCP connection headers — generated by";
|
|
543
565
|
};
|
|
544
566
|
/**
|
|
545
567
|
* The header line every `.gitignore` block this installer appends opens with. One
|
|
@@ -547,6 +569,13 @@ export declare const OWNED_GENERATED_HEADERS: {
|
|
|
547
569
|
* is what lets a first-manifest run claim the blocks an older version appended.
|
|
548
570
|
*/
|
|
549
571
|
export declare const GITIGNORE_HEADER = "# Halfcycle \u2014 machine-local secrets/state and Zone-B (never push to client remote)";
|
|
572
|
+
/**
|
|
573
|
+
* The header line every `.gitattributes` block this installer appends opens with
|
|
574
|
+
* (`windows-install-hygiene.md`, AC1). Git for Windows usually clones with
|
|
575
|
+
* `core.autocrlf=true`, which would check the generated bash scripts out with CR
|
|
576
|
+
* line endings; the rules under this header pin them to LF in every clone.
|
|
577
|
+
*/
|
|
578
|
+
export declare const GITATTRIBUTES_HEADER = "# Halfcycle \u2014 generated scripts keep LF line endings";
|
|
550
579
|
/**
|
|
551
580
|
* Read the pinned bundle.json from a target repo and compare its version
|
|
552
581
|
* against the current bundle version. Returns the installed pin if present.
|
|
@@ -641,8 +670,8 @@ export declare function readBundlePin(targetRepoRoot: string): BundlePin | null;
|
|
|
641
670
|
* either way. Reading the process environment for a secret here is still the one
|
|
642
671
|
* thing the paragraph below exists to prevent, and is still not done.
|
|
643
672
|
*
|
|
644
|
-
* PARSES, NEVER SOURCES — a credential store is not code, exactly as the
|
|
645
|
-
* `mcp-headers
|
|
673
|
+
* PARSES, NEVER SOURCES — a credential store is not code, exactly as the runner's
|
|
674
|
+
* `mcp-headers` verb treats it (through core's `parseEnvText`).
|
|
646
675
|
*/
|
|
647
676
|
export declare function readPinnedEngagement(targetRepoRoot: string, home?: string): {
|
|
648
677
|
engagementId: string;
|
|
@@ -666,8 +695,9 @@ export declare function checkDrift(targetRepoRoot: string): {
|
|
|
666
695
|
* 4. vendored guard binary → .halfcycle/bin/bin.bundle.mjs (self-contained)
|
|
667
696
|
* 5. Governance-hook wiring (.claude/settings.json, guard-runner.sh,
|
|
668
697
|
* session-start-marker.sh, user-prompt-reminder.sh)
|
|
669
|
-
* 6. (nothing) — no CI stanza (removed at T-25); the MCP registration
|
|
670
|
-
*
|
|
698
|
+
* 6. (nothing) — no CI stanza (removed at T-25); the MCP registration
|
|
699
|
+
* (credentialed installs only — T-24), then the retired connection-headers
|
|
700
|
+
* helper's removal (`windows-client-seat`).
|
|
671
701
|
* NO env scaffold either: the installer writes no `.env.example` at all
|
|
672
702
|
* (operator decision, 2026-08-30)
|
|
673
703
|
* 7. .gitignore + project identity + the engagement credential (OUTSIDE the tree,
|
package/dist/install.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,OAAO,
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,OAAO,EACL,cAAc,EAGd,oBAAoB,EACpB,cAAc,EACd,YAAY,EAEZ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AA0CzB,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,cAAc,CAAC;IAC/B;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;OAaG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;;;OAiBG;IACH,QA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EAAE,MAAM,GACZ;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACzC;2EACuE;IACvE,kBAAkB,EAAE,OAAO,CAAC;CAC7B,GAAG,IAAI,CAuBP;AA+ED,wBAAgB,UAAU,CAAC,cAAc,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAMlH;AAmRD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAmc7E"}
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `npx halfcycle` binds an ephemeral port on `127.0.0.1`, hands that port to the
|
|
5
5
|
* confirmation page through the URL it opens, and waits for the page to redirect the
|
|
6
|
-
* browser back to it.
|
|
6
|
+
* browser back to it. The redirect is a WAKE-UP, not the answer: `device-signin.ts`
|
|
7
|
+
* polls control beside this wait (walk F3, 2026-10-08), so a sign-in approved on
|
|
8
|
+
* another tab or device completes without it, and the credential is only ever
|
|
9
|
+
* collected by that one poll loop. This module never calls control.
|
|
7
10
|
*
|
|
8
11
|
* ---------------------------------------------------------------------------
|
|
9
12
|
* WHY THE OLD FLOW IS NOT SIMPLY BETTER-DOCUMENTED. The device-code flow showed the
|
|
@@ -96,7 +99,10 @@ export interface LoopbackListener {
|
|
|
96
99
|
/**
|
|
97
100
|
* Wait for the browser. Resolves with the callback, or `null` when `timeoutMs`
|
|
98
101
|
* elapses first — a timeout is a fact the caller words, not an error this module
|
|
99
|
-
* throws.
|
|
102
|
+
* throws. `close()` also ends a wait in progress with `null`: the caller's poll can
|
|
103
|
+
* finish the sign-in while this is still waiting, and a wait nobody can end would
|
|
104
|
+
* keep its timer and its still-waiting ticker alive after the terminal said
|
|
105
|
+
* *Signed in*.
|
|
100
106
|
*/
|
|
101
107
|
waitForCallback(opts: {
|
|
102
108
|
timeoutMs: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loopback-signin.d.ts","sourceRoot":"","sources":["../src/loopback-signin.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"loopback-signin.d.ts","sourceRoot":"","sources":["../src/loopback-signin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAIH,OAAO,EASL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAG3B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,4BAA4B,CAAC;AAE3D,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,IAAI,CAAC;IACZ,MAAM,EAAE,sBAAsB,CAAC;IAC/B;;;;;;;;OAQG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,eAAe,CAAC,IAAI,EAAE;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,+DAA+D;QAC/D,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;QAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACrC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,4EAA4E;AAC5E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAKxE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAqG7C;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAIzE;AAgBD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;CAChD;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,gBAAgB,CAAC;IAC9E,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,EAChD,YAAY,CAAC,EAAE,MAAM,GACpB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,KAAK,IAAI,CAmCvD;AAoBD;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAChC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,mBAAmB,CAAC,CA8E9B"}
|
package/dist/open-phase.d.ts
CHANGED
|
@@ -97,7 +97,8 @@ export interface RepoCredential {
|
|
|
97
97
|
* engagement this is*.
|
|
98
98
|
*
|
|
99
99
|
* READ, NEVER SOURCED — a credential store is not code, and this parses `KEY=value`
|
|
100
|
-
* lines exactly as the
|
|
100
|
+
* lines with core's `parseEnvText`, exactly as the runner's `mcp-headers` verb does
|
|
101
|
+
* (the editor's headers command since `windows-client-seat`). The process environment WINS
|
|
101
102
|
* when it carries a key, so an operator can point one command at a different plane
|
|
102
103
|
* without editing a file, and a CI job with no per-user store works by exporting
|
|
103
104
|
* them.
|
package/dist/open-phase.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-phase.d.ts","sourceRoot":"","sources":["../src/open-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAY3B;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sFAAsF;AACtF,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,qDAAqD;IACrD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;;OAIG;IACH,YAAY,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACvC,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,CAAC;QACtB,yEAAyE;QACzE,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QAC/B,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED;;;;;;GAMG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;aAEvB,MAAM,EAAE,MAAM;aAEd,OAAO,EAAE,MAAM,GAAG,IAAI;gBAFtB,MAAM,EAAE,MAAM,EAC9B,OAAO,EAAE,MAAM,EACC,OAAO,EAAE,MAAM,GAAG,IAAI;CAKzC;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,kFAItB,CAAC;AAEX,MAAM,WAAW,cAAc;IAC7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E,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,IAAI,CAAC,EAAE,MAAM,GACZ,cAAc,CA4BhB;AAuBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,IAAI,CAAC,EAAE,MAAM,GACZ,iBAAiB,GAAG,IAAI,CAmB1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,cAAc,EAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,KAAK,EAAE,kBAAkB,EACzB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,WAAW,CAAC,CAyEtB"}
|
package/dist/probe-mcp.d.ts
CHANGED
|
@@ -16,11 +16,36 @@
|
|
|
16
16
|
* restarting would be worse than saying so. Same degrade posture as the board
|
|
17
17
|
* mint in `bin.ts`.
|
|
18
18
|
*
|
|
19
|
-
* **`initialize` is the probe** because it
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* **`initialize` is the probe** because it identifies the server: a wrong
|
|
20
|
+
* origin 404s, a right one answers with its `serverInfo`. The alternative — a
|
|
21
|
+
* plain `GET /health` — would prove an origin is alive without proving it serves
|
|
22
|
+
* MCP, which is exactly the distinction that was missing.
|
|
23
|
+
*
|
|
24
|
+
* **It carries this machine's credential** (`windows-client-seat` AC4). This
|
|
25
|
+
* docblock used to say `initialize` was chosen because it needs no credential.
|
|
26
|
+
* That stops being true when delivery checks the bearer before any method runs,
|
|
27
|
+
* so the probe sends the same `Authorization: Bearer <token>` the editor's
|
|
28
|
+
* headers command sends. Three consequences, each deliberate:
|
|
29
|
+
*
|
|
30
|
+
* - **A 401 is its own outcome, not "unreachable".** The address answered, so
|
|
31
|
+
* the address is right; what was refused is the credential. The call site
|
|
32
|
+
* in `bin.ts` prints a different line for it, because the unreachable line
|
|
33
|
+
* tells the developer the service is down and to wait.
|
|
34
|
+
* - **Today's delivery still reads reachable.** It answers `initialize`
|
|
35
|
+
* without looking at the header, and an extra header changes nothing. This
|
|
36
|
+
* matters because the CLI that sends it publishes BEFORE delivery starts
|
|
37
|
+
* refusing.
|
|
38
|
+
* - **The credential goes to the recorded origin and nowhere else.** The URL
|
|
39
|
+
* is composed by `mcpEndpointUrl` from the same origin `.mcp.json` names, and
|
|
40
|
+
* redirects are NOT followed (`redirect: 'manual'`): a 3xx is reported, never
|
|
41
|
+
* chased, so no other host is ever sent the bearer by this call, whatever
|
|
42
|
+
* the fetch implementation does with `Authorization` across a redirect. A
|
|
43
|
+
* redirect is also not a working registration — a client that followed it
|
|
44
|
+
* would arrive at an origin the credential was not issued for — so calling
|
|
45
|
+
* it unreachable is the honest answer, not a lost case.
|
|
46
|
+
*
|
|
47
|
+
* The token never appears in a returned sentence: every `problem` below is
|
|
48
|
+
* built from the status, the timeout and the transport error's message only.
|
|
24
49
|
*
|
|
25
50
|
* INV-001: Node builtins and the global `fetch` only. No hosted import.
|
|
26
51
|
*/
|
|
@@ -30,9 +55,14 @@ export type McpProbe =
|
|
|
30
55
|
reached: true;
|
|
31
56
|
serverName: string;
|
|
32
57
|
}
|
|
33
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* It did not. `problem` is a plain-words sentence naming what happened.
|
|
60
|
+
* `credentialRefused` is true for exactly one answer — a 401 — where the
|
|
61
|
+
* address is right and the credential is what was turned away.
|
|
62
|
+
*/
|
|
34
63
|
| {
|
|
35
64
|
reached: false;
|
|
65
|
+
credentialRefused: boolean;
|
|
36
66
|
problem: string;
|
|
37
67
|
};
|
|
38
68
|
/**
|
|
@@ -42,6 +72,8 @@ export type McpProbe =
|
|
|
42
72
|
* is composed by `mcpEndpointUrl` — the SAME function that composes
|
|
43
73
|
* the literal url written into `.mcp.json` (T-24), so this probe
|
|
44
74
|
* cannot report an address the registration does not use.
|
|
75
|
+
* @param token This machine's credential for the project — the value the
|
|
76
|
+
* editor's headers command sends. Sent to that endpoint only.
|
|
45
77
|
*/
|
|
46
|
-
export declare function probeMcpOrigin(mcpUrl: string): Promise<McpProbe>;
|
|
78
|
+
export declare function probeMcpOrigin(mcpUrl: string, token: string): Promise<McpProbe>;
|
|
47
79
|
//# sourceMappingURL=probe-mcp.d.ts.map
|
package/dist/probe-mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probe-mcp.d.ts","sourceRoot":"","sources":["../src/probe-mcp.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"probe-mcp.d.ts","sourceRoot":"","sources":["../src/probe-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAQH,MAAM,MAAM,QAAQ;AAClB,4FAA4F;AAC1F;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE;AACvC;;;;GAIG;GACD;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CA4DrF"}
|
package/dist/uninstall.d.ts
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* template an earlier version wrote (`removeLegacyCiStanza`, which carries its
|
|
21
21
|
* own two keys: an exact known header and a clean committed copy);
|
|
22
22
|
* 4. remove the directories an install created, deepest first, when empty;
|
|
23
|
-
* 5. trim `.gitignore`;
|
|
23
|
+
* 5. trim `.gitignore`, then `.gitattributes`;
|
|
24
24
|
* 6. remove this machine's credential for the project, if asked;
|
|
25
25
|
* 7. only when nothing so far failed: the pin, the manifest, then `.halfcycle/`.
|
|
26
26
|
* A failure at 3–6 therefore leaves the pin and the manifest in place, and a rerun
|
package/dist/uninstall.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAyCH,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,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;CAAE,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