halfcycle 0.3.37 → 0.3.39

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.
@@ -18,7 +18,9 @@
18
18
  * `JSON.parse` returned it, key order included — not the schema's output, which
19
19
  * would reorder keys. The schema parse decides only whether it is written at all.
20
20
  *
21
- * INV-001: Node builtins, the global `fetch` and `@halfcycle/events` only.
21
+ * INV-001: Node builtins, the global `fetch`, `@halfcycle/events` and
22
+ * `@halfcycle/core` only (the latter for the one shared shell-quoting helper,
23
+ * `quoteForShell`, used by `refetchCommand` below).
22
24
  * SHIPS TO CLIENT DISK inside the CLI: every string here is a client-facing
23
25
  * sentence, and no comment sits beside an object member.
24
26
  */
@@ -74,8 +76,10 @@ export declare function buildRecordUrl(credential: RepoCredential, phase: string
74
76
  */
75
77
  export declare function obtainBuildRecord(credential: RepoCredential, repoRoot: string, phase: string, io?: RecordPairIo): Promise<ObtainOutcome>;
76
78
  /**
77
- * How to fetch a phase's record later, as a line a person can paste: the phase is
78
- * quoted for the shell unless it is plain letters, digits and `._+-`.
79
+ * How to fetch a phase's record later, as a line a person can paste: the phase
80
+ * is quoted for the shell, through the one home every package that prints a
81
+ * runnable command shares (`quoteForShell`, `@halfcycle/core`) — not a second
82
+ * copy of the same escaping.
79
83
  */
80
84
  export declare function refetchCommand(phase: string): string;
81
85
  //# sourceMappingURL=obtain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"obtain.d.ts","sourceRoot":"","sources":["../../src/build-record/obtain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAwC,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAErF;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAA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M,aAAa,GACrB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,wBAAwB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;CAM+B,CAAC;AAE9D,8EAA8E;AAC9E,eAAO,MAAM,eAAe,EAAE,SAAS,wBAAwB,EAA2C,CAAC;AAE3G,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKhF;AASD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,cAAc,EAC1B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,EAAE,GAAE,YAAkC,GACrC,OAAO,CAAC,aAAa,CAAC,CA0ExB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD"}
@@ -32,9 +32,10 @@ import type { BuildRecordV2 } from '@halfcycle/events';
32
32
  * Print one string from the record as inert, visible markdown text.
33
33
  *
34
34
  * Per code point: a hidden character becomes `U+` and its code in uppercase hex,
35
- * at least four digits; a markdown special character is escaped with a
36
- * backslash; everything else prints as itself. An empty string prints
37
- * `(blank)`, so a slot is never silently empty.
35
+ * at least four digits; a character that could start or end markup where it
36
+ * stands (`escapeMask`) is escaped with a backslash; everything else, a code
37
+ * span's contents included, prints as itself. An empty string prints `(blank)`,
38
+ * so a slot is never silently empty.
38
39
  */
39
40
  export declare function printRecordText(text: string): string;
40
41
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"render-v2.d.ts","sourceRoot":"","sources":["../../src/build-record/render-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAyBvD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAapD;AAyRD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CA2DzE"}
1
+ {"version":3,"file":"render-v2.d.ts","sourceRoot":"","sources":["../../src/build-record/render-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA4JvD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAepD;AAuUD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CA2DzE"}
@@ -125,6 +125,13 @@ export declare function requirementMessage(verb: CliVerb, flag: string): string;
125
125
  * RENDERED, not typed out. A remedy string built by hand is the defect this file
126
126
  * was opened for; one built here cannot omit a flag, because the flags come from
127
127
  * the same table the binary refuses on.
128
+ *
129
+ * `phase` is quoted for the shell (`quoteForShell`, `packages/core`) — a phase
130
+ * name has no closed vocabulary and a space or `#` in it would otherwise paste
131
+ * back as more than one argument. The one gap that quoting does not close: a
132
+ * phase starting with a dash still reads as a flag once the shell hands it
133
+ * back; that needs a `--` end-of-flags marker on both this output and the
134
+ * argument parser, which is a wider change than this function and is not done.
128
135
  */
129
136
  export declare function runnableInvocation(verb: CliVerb, phase: string): string;
130
137
  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CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;CAClD;AAsFD,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAElE;AAED,iDAAiD;AACjD,MAAM,WAAW,SAAS;IACxB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,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;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMvE"}
@@ -52,8 +52,8 @@
52
52
  * second answer to the question this file exists to answer once.
53
53
  */
54
54
  /**
55
- * The Halfcycle CONTROL plane — the origin that serves `POST /engagements`,
56
- * `POST /engagements/:id/join` and `POST /board/enter-codes`.
55
+ * The Halfcycle CONTROL plane — the origin that serves `POST /engagements` and
56
+ * `POST /engagements/:id/join`.
57
57
  *
58
58
  * NOT the MCP origin and NOT the guard origin: the platform reports both of those
59
59
  * on the create/join response (T-22, FW-4), and a developer configures neither.
@@ -47,7 +47,7 @@
47
47
  *
48
48
  * **THE TWO ORIGINS (T-22, #438).** `baseUrl` here is the CONTROL origin —
49
49
  * `HALFCYCLE_SERVICE_URL`, which serves `POST /engagements` and
50
- * `POST /board/enter-codes`. The MCP endpoint lives on a DIFFERENT deployed
50
+ * `POST /engagements/:id/join`. The MCP endpoint lives on a DIFFERENT deployed
51
51
  * service, and control does not serve `/mcp` at all. Before T-22 one variable was
52
52
  * read as the origin for all three routes, so no value satisfied it: pointed at
53
53
  * control the installed `.mcp.json` named a 404 and the developer got no method
@@ -136,6 +136,32 @@ export interface CreatedEngagement {
136
136
  * gains the fifth.
137
137
  */
138
138
  controlTelemetryUrl?: string;
139
+ /**
140
+ * The engagement's own console address, as the platform reports it (Connect
141
+ * Phase 4 follow-ups T-01, items 1/14) — built by control from its own
142
+ * `boardBaseUrl` plus the engagement id, so this package never carries a
143
+ * hosted host of its own (INV-001). `bin.ts` prints it on its own line, in
144
+ * the brand's gold.
145
+ *
146
+ * ABSENT, not present-and-empty, on a control deployment that predates T-01
147
+ * or has no console origin configured. There is then nothing honest to
148
+ * print, and the caller must print NOTHING about the console rather than a
149
+ * link that cannot work — same posture as the two origins above being
150
+ * genuinely absent, never a degraded guess.
151
+ */
152
+ consoleUrl?: string;
153
+ /**
154
+ * The method version this engagement is stamped with (T-01) — the CREATE
155
+ * route's own deployment default at the moment of creation; the JOIN
156
+ * route's engagement-level pin, which can be OLDER than this deployment's
157
+ * current default by the time a second developer joins. `bin.ts` prints it
158
+ * plainly, and `checkDrift` reads the SAME fact back from the committed pin
159
+ * without asking the plane again.
160
+ *
161
+ * ABSENT on a control deployment that predates T-01, for the same reason
162
+ * `consoleUrl` can be.
163
+ */
164
+ methodVersion?: string;
139
165
  }
140
166
  /**
141
167
  * A refusal the CONTROL PLANE wrote — the origin is right, and it declined (T-08).
@@ -1 +1 @@
1
- {"version":3,"file":"create-engagement.d.ts","sourceRoot":"","sources":["../src/create-engagement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AAKH;;oCAEoC;AACpC,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;I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M,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"}
package/dist/index.d.ts CHANGED
@@ -14,8 +14,6 @@ export { mintOrReadIdentity, readRootCommit, readRemote } from './identity.js';
14
14
  export type { ProjectIdentity } from './identity.js';
15
15
  export { createEngagement, CreateEngagementRefused } from './create-engagement.js';
16
16
  export type { CreatedEngagement } from './create-engagement.js';
17
- export { mintBoardEnterCode } from './mint-board-code.js';
18
- export type { MintedBoardCode } from './mint-board-code.js';
19
17
  export { mergeSettings } from './merge-settings.js';
20
18
  export type { ClaudeSettings, HookEntry, HookCommand } from './merge-settings.js';
21
19
  export { runBootstrapScan, scanLayers, mergeWithRecords, HALFCYCLE_STATE_FORMAT } from './scan.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC9E,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC/G,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC/E,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACnF,YAAY,EAAE,iBAAiB,EAAE,MAAM,w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kB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAI1F,cAAc,kBAAkB,CAAC;AAKjC,cAAc,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -209,6 +209,11 @@ function looksLikeSecret(text) {
209
209
  var MCP_REGISTRATION_REL = ".mcp.json";
210
210
  var MCP_SERVER_KEY = "halfcycle";
211
211
 
212
+ // ../core/dist/shell-quote.js
213
+ function quoteForShell(value) {
214
+ return `'${value.replace(/'/g, `'\\''`)}'`;
215
+ }
216
+
212
217
  // ../events/dist/result.js
213
218
  import { z as z2 } from "zod";
214
219
  var firedGuardSchema = z2.object({
@@ -578,9 +583,14 @@ var closedBySchema = z4.discriminatedUnion("kind", [
578
583
  z4.object({ kind: z4.literal("account-removed") }).strict(),
579
584
  z4.object({ kind: z4.literal("not-recorded") }).strict()
580
585
  ]);
586
+ var STEP_NAME_MAX = 200;
587
+ var stepNameSchema = plainText(STEP_NAME_MAX).refine((v) => v.trim().length > 0, {
588
+ message: "must not be blank"
589
+ });
581
590
  var unfinishedStepSchema = z4.object({
582
591
  stepId: plainText(),
583
- state: z4.enum(["parked", "failed"])
592
+ state: z4.enum(["parked", "failed"]),
593
+ name: stepNameSchema.optional()
584
594
  }).strict();
585
595
  var crossedSchema = z4.discriminatedUnion("kind", [
586
596
  z4.object({ kind: z4.literal("none") }).strict(),
@@ -998,7 +1008,9 @@ var engagementCredentialResponseSchema = z7.object({
998
1008
  sessionToken: z7.string(),
999
1009
  mcpUrl: z7.string(),
1000
1010
  guardUrl: z7.string(),
1001
- controlTelemetryUrl: z7.string()
1011
+ controlTelemetryUrl: z7.string(),
1012
+ methodVersion: z7.string().optional(),
1013
+ consoleUrl: z7.string().optional()
1002
1014
  }).strict();
1003
1015
  var ciTokenExchangeResponseSchema = z7.object({
1004
1016
  token: z7.string(),
@@ -2428,9 +2440,10 @@ function previousPinForEngagement(targetRepoRoot, engagementId) {
2428
2440
  function nonEmpty(value) {
2429
2441
  return typeof value === "string" && value.trim() !== "" ? value : void 0;
2430
2442
  }
2431
- function writeBundlePin(targetRepoRoot, version, engagementId, engagementType, accountId, writtenPaths) {
2443
+ function writeBundlePin(targetRepoRoot, version, engagementId, engagementType, accountId, methodVersion, writtenPaths) {
2432
2444
  const previous = previousPinForEngagement(targetRepoRoot, engagementId);
2433
2445
  const carried = nonEmpty(accountId) ?? nonEmpty(previous?.accountId);
2446
+ const carriedMethodVersion = nonEmpty(methodVersion) ?? nonEmpty(previous?.methodVersion);
2434
2447
  const installedAt = nonEmpty(previous?.installedAt) ?? (/* @__PURE__ */ new Date()).toISOString();
2435
2448
  const projectPage = projectPageUrl(engagementId);
2436
2449
  const pin = {
@@ -2439,6 +2452,7 @@ function writeBundlePin(targetRepoRoot, version, engagementId, engagementType, a
2439
2452
  engagementType,
2440
2453
  installedAt,
2441
2454
  ...carried !== void 0 ? { accountId: carried } : {},
2455
+ ...carriedMethodVersion !== void 0 ? { methodVersion: carriedMethodVersion } : {},
2442
2456
  ...projectPage !== void 0 ? { projectPage } : {}
2443
2457
  };
2444
2458
  const pinPath = join5(targetRepoRoot, BUNDLE_PIN_REL);
@@ -2476,7 +2490,7 @@ function checkDrift(targetRepoRoot) {
2476
2490
  const pin = readBundlePin(targetRepoRoot);
2477
2491
  const installed = pin?.version ?? null;
2478
2492
  const current = manifest.version;
2479
- return { drifted: installed !== current, installed, current };
2493
+ return { drifted: installed !== current, installed, current, methodVersion: pin?.methodVersion ?? null };
2480
2494
  }
2481
2495
  function writeProjectIdentity(targetRepo) {
2482
2496
  const path = join5(targetRepo, PROJECT_IDENTITY_REL);
@@ -2707,7 +2721,7 @@ async function install(options) {
2707
2721
  case "absent":
2708
2722
  break;
2709
2723
  }
2710
- writeBundlePin(targetRepo, manifest.version, engagementId, engagementType, accountId, report.writtenPaths);
2724
+ writeBundlePin(targetRepo, manifest.version, engagementId, engagementType, accountId, credential?.methodVersion, report.writtenPaths);
2711
2725
  noteFile(draft, targetRepo, BUNDLE_PIN_REL, "written");
2712
2726
  noteFile(draft, targetRepo, CREW_ROSTER_REL, writeCrewRoster(targetRepo, report));
2713
2727
  const scanResult = runBootstrapScan(targetRepo);
@@ -2797,7 +2811,7 @@ function planeRefusal(detail) {
2797
2811
  reason: typeof candidate.reason === "string" ? candidate.reason : void 0
2798
2812
  };
2799
2813
  }
2800
- var CONTROL_ORIGIN_HINT = `This CLI talks to ${DEFAULT_CONTROL_ORIGIN}; it must be the CONTROL origin \u2014 the one that serves /engagements and /board/enter-codes. The MCP server runs at a different address, and the platform supplies that one itself; you configure neither.`;
2814
+ var CONTROL_ORIGIN_HINT = `This CLI talks to ${DEFAULT_CONTROL_ORIGIN}; it must be the CONTROL origin \u2014 the one that serves /engagements. The MCP server runs at a different address, and the platform supplies that one itself; you configure neither.`;
2801
2815
  async function createEngagement(baseUrl, name, credential, derivedName) {
2802
2816
  return requestEngagementValues(
2803
2817
  `${baseUrl.replace(/\/+$/, "")}/engagements`,
@@ -2870,43 +2884,16 @@ async function requestEngagementValues(url, requestBody, credential, shape) {
2870
2884
  }).join(", ");
2871
2885
  throw new Error(`[bundle install] ${shape.action} response from ${url} is not the credential response this CLI is built to read (${fields}). ${shape.nothingHappened}. Either that service is a different version from this installer, or ${url} is not a Halfcycle service.`);
2872
2886
  }
2887
+ const consoleUrl = typeof body.consoleUrl === "string" && body.consoleUrl.trim() !== "" ? body.consoleUrl.trim() : void 0;
2888
+ const methodVersion = typeof body.methodVersion === "string" && body.methodVersion.trim() !== "" ? body.methodVersion.trim() : void 0;
2873
2889
  return {
2874
2890
  engagementId: body.engagementId,
2875
2891
  sessionToken: body.sessionToken,
2876
2892
  mcpUrl: body.mcpUrl.trim().replace(/\/+$/, ""),
2877
2893
  guardUrl: body.guardUrl.trim().replace(/\/+$/, ""),
2878
- ...controlTelemetryUrl !== void 0 ? { controlTelemetryUrl } : {}
2879
- };
2880
- }
2881
-
2882
- // dist/mint-board-code.js
2883
- async function mintBoardEnterCode(baseUrl, sessionToken) {
2884
- const url = `${baseUrl.replace(/\/+$/, "")}/board/enter-codes`;
2885
- let res;
2886
- try {
2887
- res = await fetch(url, {
2888
- method: "POST",
2889
- headers: {
2890
- "content-type": "application/json",
2891
- authorization: `Bearer ${sessionToken}`
2892
- },
2893
- body: "{}"
2894
- });
2895
- } catch (err) {
2896
- throw new Error(`[bundle install] Could not reach the Halfcycle board mint endpoint at ${url}: ${err instanceof Error ? err.message : String(err)}.`);
2897
- }
2898
- if (!res.ok) {
2899
- throw new Error(`[bundle install] Board code mint failed: ${url} returned ${res.status}.`);
2900
- }
2901
- const body = await res.json().catch(() => null);
2902
- if (!body || typeof body.enterCode !== "string" || typeof body.engagementId !== "string" || typeof body.boardUrl !== "string" || typeof body.expiresAt !== "string") {
2903
- throw new Error(`[bundle install] Board code mint response from ${url} did not carry {enterCode, engagementId, boardUrl, expiresAt}.`);
2904
- }
2905
- return {
2906
- enterCode: body.enterCode,
2907
- engagementId: body.engagementId,
2908
- boardUrl: body.boardUrl,
2909
- expiresAt: body.expiresAt
2894
+ ...controlTelemetryUrl !== void 0 ? { controlTelemetryUrl } : {},
2895
+ ...consoleUrl !== void 0 ? { consoleUrl } : {},
2896
+ ...methodVersion !== void 0 ? { methodVersion } : {}
2910
2897
  };
2911
2898
  }
2912
2899
 
@@ -3361,20 +3348,127 @@ function buildEngagementRecord(input) {
3361
3348
 
3362
3349
  // dist/build-record/render-v2.js
3363
3350
  var HIDDEN = /[\p{Cc}\p{Zl}\p{Zp}\p{Default_Ignorable_Code_Point}]/u;
3364
- var MARKDOWN_SPECIAL = /* @__PURE__ */ new Set(["\\", "`", "*", "_", "[", "]", "<", "|", "~", "#", "&", "$"]);
3351
+ var SPACE = new RegExp("\\p{Zs}", "u");
3352
+ var WORD = /[\p{L}\p{N}]/u;
3353
+ var ASCII_PUNCTUATION = /[!-/:-@[-`{-~]/;
3354
+ var CHARACTER_REFERENCE = /^#?[A-Za-z0-9]+;/;
3355
+ var PAIRED = ["*", "_", "~", "$"];
3356
+ function codeSpanMask(cps) {
3357
+ const mask = cps.map(() => false);
3358
+ const runs = [];
3359
+ for (let i = 0; i < cps.length; ) {
3360
+ if (cps[i] !== "`") {
3361
+ i++;
3362
+ continue;
3363
+ }
3364
+ let j = i;
3365
+ while (j < cps.length && cps[j] === "`")
3366
+ j++;
3367
+ runs.push({ start: i, length: j - i });
3368
+ i = j;
3369
+ }
3370
+ for (let k = 0; k < runs.length; ) {
3371
+ const open = runs[k];
3372
+ let m = k + 1;
3373
+ while (m < runs.length && runs[m].length !== open.length)
3374
+ m++;
3375
+ if (m === runs.length) {
3376
+ k++;
3377
+ continue;
3378
+ }
3379
+ const close = runs[m];
3380
+ for (let i = open.start; i < close.start + close.length; i++)
3381
+ mask[i] = true;
3382
+ k = m + 1;
3383
+ }
3384
+ return mask;
3385
+ }
3386
+ function escapeMask(cps, inSpan) {
3387
+ const n = cps.length;
3388
+ const escape = cps.map(() => false);
3389
+ const isSpace = (i) => i >= 0 && i < n && SPACE.test(cps[i]) && !HIDDEN.test(cps[i]);
3390
+ const isWord = (i) => i >= 0 && i < n && WORD.test(cps[i]);
3391
+ const rest = (i) => cps.slice(i).join("");
3392
+ for (let i = 0; i < n; i++) {
3393
+ if (inSpan[i])
3394
+ continue;
3395
+ const ch = cps[i];
3396
+ const next = i + 1 < n ? cps[i + 1] : null;
3397
+ switch (ch) {
3398
+ case "\\":
3399
+ escape[i] = next === null || ASCII_PUNCTUATION.test(next);
3400
+ break;
3401
+ case "<":
3402
+ escape[i] = next !== null && !isSpace(i + 1) && rest(i + 1).includes(">");
3403
+ break;
3404
+ case "&":
3405
+ escape[i] = CHARACTER_REFERENCE.test(rest(i + 1));
3406
+ break;
3407
+ case "]":
3408
+ escape[i] = next === "(";
3409
+ break;
3410
+ case "[":
3411
+ case "{":
3412
+ escape[i] = (next === "+" || next === "-") && (rest(i + 2).includes(`${next}]`) || rest(i + 2).includes(`${next}}`));
3413
+ break;
3414
+ default:
3415
+ break;
3416
+ }
3417
+ }
3418
+ for (let i = 0; i < n; ) {
3419
+ if (inSpan[i] || cps[i] !== "#") {
3420
+ i++;
3421
+ continue;
3422
+ }
3423
+ let j = i;
3424
+ while (j < n && cps[j] === "#" && !inSpan[j])
3425
+ j++;
3426
+ let k = j;
3427
+ while (k < n && isSpace(k))
3428
+ k++;
3429
+ if (k === n && (i === 0 || isSpace(i - 1)))
3430
+ for (let m = i; m < j; m++)
3431
+ escape[m] = true;
3432
+ i = j;
3433
+ }
3434
+ for (const c of PAIRED) {
3435
+ const live = [];
3436
+ for (let i = 0; i < n; ) {
3437
+ if (inSpan[i] || cps[i] !== c) {
3438
+ i++;
3439
+ continue;
3440
+ }
3441
+ let j = i;
3442
+ while (j < n && cps[j] === c && !inSpan[j])
3443
+ j++;
3444
+ const inert = c !== "$" && (isSpace(i - 1) && isSpace(j) || c === "_" && isWord(i - 1) && isWord(j));
3445
+ if (!inert)
3446
+ live.push({ start: i, end: j });
3447
+ i = j;
3448
+ }
3449
+ if (live.length < 2)
3450
+ continue;
3451
+ for (const run of live)
3452
+ for (let m = run.start; m < run.end; m++)
3453
+ escape[m] = true;
3454
+ }
3455
+ return escape;
3456
+ }
3365
3457
  function printRecordText(text) {
3366
3458
  if (text === "")
3367
3459
  return "(blank)";
3460
+ const cps = [...text];
3461
+ const escape = escapeMask(cps, codeSpanMask(cps));
3368
3462
  let out = "";
3369
- for (const ch of text) {
3463
+ cps.forEach((ch, i) => {
3370
3464
  if (HIDDEN.test(ch)) {
3371
3465
  out += `U+${ch.codePointAt(0).toString(16).toUpperCase().padStart(4, "0")}`;
3372
- } else if (MARKDOWN_SPECIAL.has(ch)) {
3466
+ } else if (escape[i]) {
3373
3467
  out += `\\${ch}`;
3374
3468
  } else {
3375
3469
  out += ch;
3376
3470
  }
3377
- }
3471
+ });
3378
3472
  return out;
3379
3473
  }
3380
3474
  function makePrinter() {
@@ -3464,12 +3558,18 @@ function headline(observed, attested, checks) {
3464
3558
  if (problemsReported) {
3465
3559
  return "**Closed with problems reported.** Halfcycle saw nothing outstanding, and the person closing the phase reported problems found in its acceptance walk.";
3466
3560
  }
3467
- return checks === "not-observed" ? "**Closed with nothing outstanding, but no checks ran.** Halfcycle saw nothing outstanding, and the person closing the phase stated its finish conditions were met, but Halfcycle has no record of any check running during this phase, so this is not a clean result." : "**Closed cleanly.** Halfcycle saw nothing outstanding, and the person closing the phase stated its finish conditions were met.";
3561
+ return checks === "not-observed" ? "**Closed with nothing outstanding, but no check on record.** Halfcycle saw nothing outstanding, and the person closing the phase stated its finish conditions were met, but Halfcycle has no record of any check running during this phase, so this is not a clean result." : "**Closed cleanly.** Halfcycle saw nothing outstanding, and the person closing the phase stated its finish conditions were met.";
3468
3562
  case "unfinished-steps":
3469
3563
  case "clean-over-findings":
3470
- return met ? "**Closed over outstanding work.** Halfcycle saw work still outstanding, and the person closing the phase stated its finish conditions were met anyway." : "**Closed over outstanding work.** Halfcycle saw work still outstanding, and the person closing the phase chose to override it.";
3564
+ if (!met) {
3565
+ return "**Closed over outstanding work.** Halfcycle saw work still outstanding, and the person closing the phase chose to override it.";
3566
+ }
3567
+ return problemsReported ? "**Closed over outstanding work.** Halfcycle saw work still outstanding, and the person closing the phase closed it as it stood, reporting problems found in its acceptance walk." : "**Closed over outstanding work.** Halfcycle saw work still outstanding, and the person closing the phase stated its finish conditions were met anyway.";
3471
3568
  case "not-recorded":
3472
- return met ? "**Outstanding work not recorded.** Halfcycle has no record of what was outstanding at this close. The person closing the phase stated its finish conditions were met." : "**Outstanding work not recorded.** Halfcycle has no record of what was outstanding at this close. The person closing the phase chose to override.";
3569
+ if (!met) {
3570
+ return "**Outstanding work not recorded.** Halfcycle has no record of what was outstanding at this close. The person closing the phase chose to override.";
3571
+ }
3572
+ return problemsReported ? "**Outstanding work not recorded.** Halfcycle has no record of what was outstanding at this close. The person closing the phase reported problems found in its acceptance walk." : "**Outstanding work not recorded.** Halfcycle has no record of what was outstanding at this close. The person closing the phase stated its finish conditions were met.";
3473
3573
  }
3474
3574
  }
3475
3575
  function closedAtText(closedAt, p) {
@@ -3488,30 +3588,38 @@ function signedInAs(closedBy, p) {
3488
3588
  return "not recorded for this close";
3489
3589
  }
3490
3590
  }
3591
+ var OUTSTANDING_LABEL = "- Outstanding work in Halfcycle's own records of this phase (the method's steps, and problems recorded against the phase): ";
3491
3592
  function outstanding(crossed, p) {
3492
3593
  switch (crossed.kind) {
3493
3594
  case "none":
3494
- return ["- Outstanding work Halfcycle could see: none."];
3595
+ return [`${OUTSTANDING_LABEL}none.`];
3495
3596
  case "not-recorded":
3496
- return ["- Outstanding work Halfcycle could see: not recorded for this close."];
3597
+ return [`${OUTSTANDING_LABEL}not recorded for this close.`];
3497
3598
  case "clean-over-findings":
3498
- return [
3499
- `- Outstanding work Halfcycle could see: ${counted(crossed.findings, "problem", "problems")} recorded against this phase.`
3500
- ];
3599
+ return [`${OUTSTANDING_LABEL}${counted(crossed.findings, "problem", "problems")} recorded against this phase.`];
3501
3600
  case "unfinished-steps":
3502
3601
  return [
3503
- `- Outstanding work Halfcycle could see: ${counted(crossed.steps.length, "step", "steps")} of the method left unfinished. Each is shown by the method's own label for it:`,
3504
- ...crossed.steps.map((step) => ` - Step: ${p.text(step.stepId)} \u2014 ${step.state === "failed" ? "failed" : "set aside unfinished"}`)
3602
+ `${OUTSTANDING_LABEL}${counted(crossed.steps.length, "step", "steps")} of the method left unfinished. ${shownBy(crossed.steps)}`,
3603
+ ...crossed.steps.map((step) => ` - Step: ${p.text(step.name ?? step.stepId)} \u2014 ${step.state === "failed" ? "failed" : "set aside unfinished"}`)
3505
3604
  ];
3506
3605
  }
3507
3606
  }
3508
- function machines(coverage) {
3607
+ function shownBy(steps) {
3608
+ const named = steps.filter((s) => s.name !== void 0).length;
3609
+ if (named === 0)
3610
+ return "Each is shown by the method's own label for it:";
3611
+ if (named === steps.length)
3612
+ return "Each is shown by the method's own name for it:";
3613
+ return "Each is shown by the method's own name for it, or by its label where the record holds no name:";
3614
+ }
3615
+ function machines(coverage, checks) {
3509
3616
  const label = "- Computers signed in to Halfcycle for this project when the phase closed: ";
3510
3617
  if (coverage === null)
3511
3618
  return `${label}not recorded.`;
3512
3619
  if (coverage.enrolled === 0)
3513
3620
  return `${label}none.`;
3514
- return `${label}${String(coverage.enrolled)}. Of these, ${String(coverage.conformant)} had reported Halfcycle's checks as fully set up.`;
3621
+ const line = `${label}${String(coverage.enrolled)}. Of these, ${String(coverage.conformant)} had reported Halfcycle's checks as fully set up.`;
3622
+ return checks === "not-observed" && coverage.conformant > 0 ? `${line} Set up is not the same as running: Halfcycle has no record of any check running during this phase.` : line;
3515
3623
  }
3516
3624
  function walkLines(walk, p) {
3517
3625
  const label = "> - Acceptance walk (the finished work tried as a user would, by someone other than its builder): ";
@@ -3531,9 +3639,15 @@ function walkLines(walk, p) {
3531
3639
  function statedOrNot(value, p) {
3532
3640
  return value === null ? "Not stated by the client." : p.text(value);
3533
3641
  }
3642
+ function decisionLine(attested) {
3643
+ if (attested.decision === "override") {
3644
+ return "> - Decision: close the phase by override, without stating its finish conditions were met.";
3645
+ }
3646
+ return attested.walk !== null && attested.walk.verdict === "defects" ? "> - Decision: close the phase as it stood, with the problems its acceptance walk found." : "> - Decision: the phase's agreed finish conditions were met.";
3647
+ }
3534
3648
  function renderStated(attested, p) {
3535
3649
  const lines = [
3536
- attested.decision === "done-when-met" ? "> - Decision: the phase's agreed finish conditions were met." : "> - Decision: close the phase by override, without stating its finish conditions were met.",
3650
+ decisionLine(attested),
3537
3651
  `> - Name given: ${attested.actor === null ? "removed with the account that made this close" : p.text(attested.actor)}`,
3538
3652
  `> - Reason given: ${attested.reason === null ? "none." : p.text(attested.reason)}`,
3539
3653
  ...walkLines(attested.walk, p),
@@ -3561,7 +3675,7 @@ function renderClose(heading, observed, attested, checks, p) {
3561
3675
  `- Closed at: ${closedAtText(observed.closedAt, p)}`,
3562
3676
  `- Signed in as: ${signedInAs(observed.closedBy, p)}`,
3563
3677
  ...outstanding(observed.crossed, p),
3564
- machines(observed.seatCoverage)
3678
+ machines(observed.seatCoverage, checks)
3565
3679
  ].join("\n"),
3566
3680
  STATED_LABEL,
3567
3681
  renderStated(attested, p)
@@ -3824,8 +3938,7 @@ async function obtainBuildRecord(credential, repoRoot, phase, io = NODE_RECORD_P
3824
3938
  };
3825
3939
  }
3826
3940
  function refetchCommand(phase) {
3827
- const quoted = /^[A-Za-z0-9._+-]+$/.test(phase) ? phase : `'${phase.replace(/'/g, `'\\''`)}'`;
3828
- return `npx halfcycle@latest build-record ${quoted}`;
3941
+ return `npx halfcycle@latest build-record ${quoteForShell(phase)}`;
3829
3942
  }
3830
3943
  export {
3831
3944
  BUILD_RECORD_DIR,
@@ -3855,7 +3968,6 @@ export {
3855
3968
  layerDocumentRow,
3856
3969
  mergeSettings,
3857
3970
  mergeWithRecords,
3858
- mintBoardEnterCode,
3859
3971
  mintOrReadIdentity,
3860
3972
  obtainBuildRecord,
3861
3973
  questionsToPut,