halfcycle 0.4.8 → 0.4.9
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 +2031 -216
- package/commands/agent-teams-orchestration.md +1 -1
- package/commands/consistency-check.md +1 -1
- package/commands/context-update.md +1 -1
- package/commands/halfcycle-design.md +1 -1
- package/commands/halfcycle-setup.md +1 -1
- package/commands/stack-assembly-worker.md +1 -1
- package/commands/task-execution.md +1 -1
- package/commands/task-graph.md +1 -1
- package/commands/write-spec.md +1 -1
- package/dist/bin.d.ts +2 -1
- package/dist/bin.d.ts.map +1 -1
- package/dist/build-record/obtain.d.ts +14 -7
- package/dist/build-record/obtain.d.ts.map +1 -1
- package/dist/build-record/render-v2.d.ts +32 -6
- package/dist/build-record/render-v2.d.ts.map +1 -1
- package/dist/build-record/write.d.ts +2 -2
- package/dist/build-record/write.d.ts.map +1 -1
- package/dist/cli-contract.d.ts +2 -9
- package/dist/cli-contract.d.ts.map +1 -1
- package/dist/cli.js +3189 -1401
- package/dist/cli.js.map +3 -3
- package/dist/close-phase.d.ts +215 -134
- package/dist/close-phase.d.ts.map +1 -1
- package/dist/draw/index.d.ts +25 -5
- package/dist/draw/index.d.ts.map +1 -1
- package/dist/identity.d.ts +78 -9
- package/dist/identity.d.ts.map +1 -1
- package/dist/index.js +1624 -204
- package/dist/index.js.map +3 -3
- package/dist/install.d.ts +16 -0
- package/dist/install.d.ts.map +1 -1
- package/dist/open-phase.d.ts +25 -1
- package/dist/open-phase.d.ts.map +1 -1
- package/dist/plan.d.ts +59 -18
- package/dist/plan.d.ts.map +1 -1
- package/dist/pre-create-checks.d.ts.map +1 -1
- package/dist/review.d.ts +228 -0
- package/dist/review.d.ts.map +1 -0
- package/dist/shown-record.d.ts +46 -0
- package/dist/shown-record.d.ts.map +1 -0
- package/dist/system-report.d.ts +28 -4
- package/dist/system-report.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/project-page.d.ts +0 -24
- package/dist/project-page.d.ts.map +0 -1
package/dist/open-phase.d.ts
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* treats its own.
|
|
26
26
|
*/
|
|
27
27
|
import { type MethodUpdate, type PhaseEntryDecision } from '@halfcycle/events';
|
|
28
|
+
import { type HeadCommitOutcome } from './close-phase.js';
|
|
28
29
|
/**
|
|
29
30
|
* A local phase stamp that could not be written, on a phase that DID move.
|
|
30
31
|
*
|
|
@@ -68,7 +69,30 @@ export interface OpenedPhase {
|
|
|
68
69
|
* and writes nothing about a move, exactly as it did before this field existed.
|
|
69
70
|
*/
|
|
70
71
|
methodUpdated: MethodUpdate | null;
|
|
72
|
+
/**
|
|
73
|
+
* Whether this open could read a HEAD commit to send as where the phase starts,
|
|
74
|
+
* and the commit or the cause when it could not (`what-halfcycle-saw` AC1). At
|
|
75
|
+
* project scope this is still whatever the local read found — `describeStartCommit`
|
|
76
|
+
* is what decides nothing is printed there.
|
|
77
|
+
*/
|
|
78
|
+
startCommitSent: HeadCommitOutcome;
|
|
79
|
+
/**
|
|
80
|
+
* The start commit in force after this open, per the plane's answer — the commit
|
|
81
|
+
* the phase counts its changes from, or `null` when there is none. `undefined`
|
|
82
|
+
* when the answer carries no such field at all: an older control, read loosely the
|
|
83
|
+
* same way `methodUpdated` is.
|
|
84
|
+
*/
|
|
85
|
+
startCommit: string | null | undefined;
|
|
71
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* O1–O2–O3 (`what-halfcycle-saw` AC1): what this open says about where Halfcycle
|
|
89
|
+
* counts the phase's changes from, printed after the existing open line
|
|
90
|
+
* (`describeOpen`). `null` when nothing more is said: at project scope; when the
|
|
91
|
+
* plane's answer carries no `startCommit` field at all (an older control); or when
|
|
92
|
+
* the answer's start is `null` after this open DID send a commit — a mismatch this
|
|
93
|
+
* CLI does not try to explain.
|
|
94
|
+
*/
|
|
95
|
+
export declare function describeStartCommit(phase: string | null, sent: HeadCommitOutcome, answerStartCommit: string | null | undefined): string | null;
|
|
72
96
|
/**
|
|
73
97
|
* The line that says what a successful open did (cp4f T-20, acceptance walk F7).
|
|
74
98
|
*
|
|
@@ -189,5 +213,5 @@ export declare function writePhaseStamp(engagementId: string, phase: string | nu
|
|
|
189
213
|
* warns without being able to say why.
|
|
190
214
|
* @throws Error on transport failure or a body that is not the expected shape.
|
|
191
215
|
*/
|
|
192
|
-
export declare function openPhase(credential: RepoCredential, phase: string | null, entry: PhaseEntryDecision, home?: string): Promise<OpenedPhase>;
|
|
216
|
+
export declare function openPhase(credential: RepoCredential, phase: string | null, entry: PhaseEntryDecision, home?: string, repoRoot?: string): Promise<OpenedPhase>;
|
|
193
217
|
//# sourceMappingURL=open-phase.d.ts.map
|
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,
|
|
1
|
+
{"version":3,"file":"open-phase.d.ts","sourceRoot":"","sources":["../src/open-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAW3B,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1E;;;;;;;;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,EA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tB;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,EACb,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,WAAW,CAAC,CAyFtB"}
|
package/dist/plan.d.ts
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* file's name is `renderPhaseSegment`'s (INV-023), and "is the file's phase the phase
|
|
19
19
|
* asked for" compares the two segments it renders, because that function is where a
|
|
20
20
|
* number and its decimal string become one phase. The shown record's format is
|
|
21
|
-
* `@halfcycle/core`'s
|
|
22
|
-
*
|
|
21
|
+
* `@halfcycle/core`'s, and its I/O is `./shown-record.ts`'s `updateShownRecord`, which
|
|
22
|
+
* keeps the reviews `review --show` listed. Whether a typed number reaches this phase is `resolvePhaseReference`
|
|
23
23
|
* (`@halfcycle/core`). The two approval-line swaps take their sentences and the floor
|
|
24
24
|
* from `client-version.ts` (`@halfcycle/events`); the switched-off swap is decided by
|
|
25
25
|
* the server's `typedApprovalOffered`, never by the client's copy of the switch, and
|
|
@@ -31,6 +31,27 @@
|
|
|
31
31
|
* picture package (INV-001). `test/plan-verb.test.ts` reads that package's source and
|
|
32
32
|
* holds the two equal.
|
|
33
33
|
*
|
|
34
|
+
* THREE MORE ANSWERS (`close-review-and-carry-drop` AC7, ruling S-f). `removal-owed`
|
|
35
|
+
* (CL11) is a 409 naming every part `docs/system.json` must lose before a new plan is
|
|
36
|
+
* taken; `reportPhasePlan`'s answer-parsing switch is exhaustive over
|
|
37
|
+
* `phasePlanResultSchema`'s four outcomes, with a `never` default (`assertNever`), so a
|
|
38
|
+
* fifth outcome added to the wire without a matching case here is a compile error
|
|
39
|
+
* instead of a silent fall-through to "could not record the plan just now". CL10 (a
|
|
40
|
+
* carried part left out of its target's plan) is an ordinary `refused` problem at
|
|
41
|
+
* `path: ''`, so `planRefusedLines` prints it against the plan file as it prints every
|
|
42
|
+
* other problem — one more sentence, no new code. `recorded`'s optional `carriedFrom`
|
|
43
|
+
* marks a carried part "carried over from phase N" (CL13) in `--show`'s change lines,
|
|
44
|
+
* with no second read of anything.
|
|
45
|
+
*
|
|
46
|
+
* THE REDRAW LINE (`part-state-and-builds` AC7, #1742). After a recorded plan, when the
|
|
47
|
+
* project already has this phase's embedded picture under `docs/diagrams/`
|
|
48
|
+
* (`embedImageName(phaseDiagramBase(phase))`, `./draw/write.ts` — the one home of a
|
|
49
|
+
* phase's diagram names, never copied here), `runPlan` prints the sentence asking for
|
|
50
|
+
* `draw phase` to be run again: after the state sentence without `--show`, and before
|
|
51
|
+
* the approval line with it, so the redraw line is never the last thing printed. The
|
|
52
|
+
* phase is quoted for the shell (`quoteForShell`, `@halfcycle/core`), as every other
|
|
53
|
+
* printed command is.
|
|
54
|
+
*
|
|
34
55
|
* WHAT LEAVES THE MACHINE. The checked description (through the shared stage), then
|
|
35
56
|
* `{ descriptionVersion, plan }`. Nothing is written into the person's tree; the shown
|
|
36
57
|
* record is machine state under the home folder (INV-019).
|
|
@@ -40,7 +61,7 @@
|
|
|
40
61
|
* reads, so none names an internal register, route or setting; no comment sits beside
|
|
41
62
|
* an object member.
|
|
42
63
|
*/
|
|
43
|
-
import { type PhasePlan, type PhasePlanChange, type PhasePlanProblem, type PlannedScopeState, type SystemDescription } from '@halfcycle/events';
|
|
64
|
+
import { type CarriedFromEntry, type PhasePlan, type PhasePlanChange, type PhasePlanProblem, type PlannedScopeState, type RemovalOwedPart, type SystemDescription } from '@halfcycle/events';
|
|
44
65
|
import { type ShownPlanEntry } from '@halfcycle/core';
|
|
45
66
|
import type { RepoCredential } from './open-phase.js';
|
|
46
67
|
import { type DescriptionVerb, type SystemDeps, type SystemRun } from './system-report.js';
|
|
@@ -96,8 +117,11 @@ export type PlanFileCheck = {
|
|
|
96
117
|
export declare function readAndCheckPlan(repoRoot: string, phase: string, description: SystemDescription, verb: DescriptionVerb): PlanFileCheck;
|
|
97
118
|
/**
|
|
98
119
|
* What came of reporting the plan. `recorded`: the service's answer, as its schema
|
|
99
|
-
* parsed it
|
|
100
|
-
*
|
|
120
|
+
* parsed it, `carriedFrom` present only when at least one part of this plan was
|
|
121
|
+
* carried in. `refused`: the service's own problems (CL10 among them, at `path: ''`).
|
|
122
|
+
* `removal-owed`: `docs/system.json` still holds a part an earlier close dropped or
|
|
123
|
+
* removed (CL11); nothing was sent. `no-route`: this service cannot take a plan yet.
|
|
124
|
+
* `unavailable`: it could not be reported, and `why` says so.
|
|
101
125
|
*/
|
|
102
126
|
export type PlanOutcome = {
|
|
103
127
|
kind: 'recorded';
|
|
@@ -106,9 +130,13 @@ export type PlanOutcome = {
|
|
|
106
130
|
state: PlannedScopeState;
|
|
107
131
|
changedParts: readonly string[];
|
|
108
132
|
typedApprovalOffered: boolean;
|
|
133
|
+
carriedFrom?: readonly CarriedFromEntry[];
|
|
109
134
|
} | {
|
|
110
135
|
kind: 'refused';
|
|
111
136
|
problems: PhasePlanProblem[];
|
|
137
|
+
} | {
|
|
138
|
+
kind: 'removal-owed';
|
|
139
|
+
parts: readonly RemovalOwedPart[];
|
|
112
140
|
} | {
|
|
113
141
|
kind: 'no-route';
|
|
114
142
|
} | {
|
|
@@ -135,20 +163,15 @@ export type ShownWrite = {
|
|
|
135
163
|
};
|
|
136
164
|
/**
|
|
137
165
|
* Record on this machine that `entry` was shown: `~/.halfcycle/engagements/<id>/`
|
|
138
|
-
* `shown-plans.json`,
|
|
139
|
-
*
|
|
166
|
+
* `shown-plans.json`, through `updateShownRecord` (`./shown-record.ts`), the CLI's one
|
|
167
|
+
* writer of that file. Never throws.
|
|
140
168
|
*
|
|
141
169
|
* The record keeps the latest entry per phase, so the entry for this phase is
|
|
142
170
|
* replaced. An entry holding this number under another phase is dropped too: the
|
|
143
171
|
* service gives each phase one number and never changes it, so such an entry is
|
|
144
|
-
* stale, and
|
|
145
|
-
* otherwise fail every later write.
|
|
146
|
-
* shown
|
|
147
|
-
*
|
|
148
|
-
* Written to a temporary file in the same folder, mode `0600` set on it before the
|
|
149
|
-
* rename (a rename carries the source's bits), then renamed into place, so a reader
|
|
150
|
-
* sees the old record or the new one and never a part of one. `chmod` is skipped on
|
|
151
|
-
* Windows, where the bits mean nothing.
|
|
172
|
+
* stale, and the serialiser refuses two entries with one number, which would
|
|
173
|
+
* otherwise fail every later write. The record's listed reviews are kept as they
|
|
174
|
+
* are. A missing or malformed record reads as nothing shown.
|
|
152
175
|
*/
|
|
153
176
|
export declare function writeShownPlan(engagementId: string, entry: ShownPlanEntry, home?: string): ShownWrite;
|
|
154
177
|
/**
|
|
@@ -167,7 +190,22 @@ export declare function planRefusedLines(verb: DescriptionVerb, phase: string, p
|
|
|
167
190
|
* The line for a phase name `isValidPhaseIdentity` refuses, prefixed by the verb that
|
|
168
191
|
* is running. Nothing has been sent when it is printed.
|
|
169
192
|
*/
|
|
170
|
-
export declare function notAPhaseNameLine(verb: DescriptionVerb, phase: string): string;
|
|
193
|
+
export declare function notAPhaseNameLine(verb: DescriptionVerb | 'review', phase: string): string;
|
|
194
|
+
/**
|
|
195
|
+
* CL11 — one line per part `docs/system.json` must lose before a new plan is taken
|
|
196
|
+
* (`close-review-and-carry-drop` AC7), prefixed by the verb that is running. Nothing was
|
|
197
|
+
* sent when these print.
|
|
198
|
+
*/
|
|
199
|
+
export declare function removalOwedLines(verb: DescriptionVerb, parts: readonly RemovalOwedPart[]): string;
|
|
200
|
+
/**
|
|
201
|
+
* The redraw line (#1742, `part-state-and-builds` AC7): printed after a recorded plan
|
|
202
|
+
* when this phase already has its embedded picture under `docs/diagrams/`. `null` when
|
|
203
|
+
* there is none to redraw, so the caller prints nothing. Never throws: a phase that
|
|
204
|
+
* reaches here already passed `isValidPhaseIdentity`, but a failure composing the base
|
|
205
|
+
* name still reads as "nothing to redraw" rather than crashing the verb that recorded
|
|
206
|
+
* the plan.
|
|
207
|
+
*/
|
|
208
|
+
export declare function redrawLine(repoRoot: string, phase: string): string | null;
|
|
171
209
|
/** The pieces `runPlan` reaches outside itself through; replaced in tests. */
|
|
172
210
|
export interface PlanDeps extends SystemDeps {
|
|
173
211
|
readonly reportPlan: (credential: RepoCredential, plan: PhasePlan, descriptionVersion: number) => Promise<PlanOutcome>;
|
|
@@ -188,8 +226,11 @@ export declare function planStateSentence(state: PlannedScopeState): string;
|
|
|
188
226
|
* phase whose name is that number would otherwise take it.
|
|
189
227
|
*/
|
|
190
228
|
export declare function approvalLine(phase: string, number: number, typedApprovalOffered: boolean, pinnedVersion: string | undefined, shown: readonly ShownPlanEntry[]): string;
|
|
191
|
-
/**
|
|
192
|
-
|
|
229
|
+
/**
|
|
230
|
+
* One line per change, in plan order: the part's name, the carried mark (CL13) when
|
|
231
|
+
* `carriedFrom` names it, what changes, the plan's line, and the changed mark.
|
|
232
|
+
*/
|
|
233
|
+
export declare function changeLines(plan: PhasePlan, description: SystemDescription, changed: readonly string[], carriedFrom?: readonly CarriedFromEntry[]): string;
|
|
193
234
|
/**
|
|
194
235
|
* The whole verb, in the order the module header gives. Exit 0 only when the plan is
|
|
195
236
|
* recorded and, with `--show`, the shown record is written. When that write fails the
|
package/dist/plan.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":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,CAUnE"}
|
package/dist/review.d.ts
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The client half of `npx halfcycle@latest review <phase> --show` and
|
|
3
|
+
* `review <phase> --answer <part> "<answer>"` (System view · E3, feature
|
|
4
|
+
* `typed-close-review` AC2, AC5, AC6).
|
|
5
|
+
*
|
|
6
|
+
* `--show` reads the phase's close review (`GET …/phases/:phase/review`, the control
|
|
7
|
+
* service's `readPhaseReview`), prints every part, what the agents reported beside what
|
|
8
|
+
* Halfcycle saw, and each decision so far (RV1–RV7), then records on this machine the
|
|
9
|
+
* review it listed, so a review line the owner types binds to it. `--answer` sends the
|
|
10
|
+
* agent's answer to the owner's question on one part (`POST …/review/answers`) and prints
|
|
11
|
+
* AN1, or its refusal (AN2–AN5).
|
|
12
|
+
*
|
|
13
|
+
* EVERY RV AND AN LINE LIVES HERE (AC5), and nothing else in the CLI words them. The TR
|
|
14
|
+
* lines are the runner's (`user-prompt-submit-lines.ts`), never these.
|
|
15
|
+
*
|
|
16
|
+
* ONE HOME FOR EVERYTHING THIS VERB DOES NOT WORD (INV-003). Nothing about the review is
|
|
17
|
+
* derived here; the view is the control service's one derivation, read through
|
|
18
|
+
* `phaseReviewViewSchema`, and this module only prints it:
|
|
19
|
+
* - which parts are decidable, waiting or settled is the view's (`decidable`, `waiting`,
|
|
20
|
+
* `decision`), never recomputed;
|
|
21
|
+
* - what Halfcycle saw is `observedLines` and `observedPhaseLines`, the agents' reasons
|
|
22
|
+
* are `agentSaid` (with `NO_TASK_SAID_LINE`), the code line is `codeLinkLine`, all
|
|
23
|
+
* `@halfcycle/events`' and referenced, never copied;
|
|
24
|
+
* - which acts a part takes is `reviewActsFor`, which RV7 reads to list the lines a part
|
|
25
|
+
* allows;
|
|
26
|
+
* - the answer's text rule is `reviewAnswerRequestSchema` (`statementText` at
|
|
27
|
+
* `REVIEW_ANSWER_MAX`), and the credential screen is core's `looksLikeSecret`;
|
|
28
|
+
* - the shown record's format is core's; its I/O is `./shown-record.ts`'s
|
|
29
|
+
* `updateShownRecord`, the CLI's one writer of that file;
|
|
30
|
+
* - the sign-in remedy is core's `HOOK_REMEDY`.
|
|
31
|
+
*
|
|
32
|
+
* WHEN NOTHING WAS COUNTED AT ALL. The view's `observed` is `null` when the control
|
|
33
|
+
* service holds no counts for the round. `observedLines` needs a value, so this verb
|
|
34
|
+
* hands it the value that means "nothing counted" (`NOTHING_COUNTED`, the counting state
|
|
35
|
+
* `cannot-count`, no part, no figure), and RV4 then reads `Changes not counted` and the
|
|
36
|
+
* checks line in that function's words, never a sentence of this module's. RV1b prints
|
|
37
|
+
* nothing then: there is no counting state to describe, and RV1a already says the phase
|
|
38
|
+
* could not be counted.
|
|
39
|
+
*
|
|
40
|
+
* WHAT LEAVES THE MACHINE. `--show` sends nothing but the read. `--answer` sends
|
|
41
|
+
* `{ part, answer }` only after the answer passed the same rule on this machine (AN3,
|
|
42
|
+
* AN4); a refused answer is never sent (INV-020).
|
|
43
|
+
*
|
|
44
|
+
* INV-001: Node builtins, the global `fetch`, `@halfcycle/events` and `@halfcycle/core`
|
|
45
|
+
* only. SHIPS TO CLIENT DISK inside the CLI: every string here is a sentence a person
|
|
46
|
+
* reads, so none names an internal register, route or setting; no comment sits beside
|
|
47
|
+
* an object member.
|
|
48
|
+
*/
|
|
49
|
+
import { type ShownReviewEntry } from '@halfcycle/core';
|
|
50
|
+
import { type PhaseReviewView, type ReviewViewPart } from '@halfcycle/events';
|
|
51
|
+
import type { RepoCredential } from './open-phase.js';
|
|
52
|
+
import type { SystemRun } from './system-report.js';
|
|
53
|
+
/** The usage line, printed for no phase, an extra argument, an unknown flag, or neither mode. */
|
|
54
|
+
export declare const REVIEW_USAGE = "npx halfcycle@latest review <phase> (--show | --answer <part> \"<answer>\") [--repo <root>]";
|
|
55
|
+
/** The view of a round: open, or the round that closed the phase. */
|
|
56
|
+
export type ReviewedView = Extract<PhaseReviewView, {
|
|
57
|
+
state: 'open' | 'closed';
|
|
58
|
+
}>;
|
|
59
|
+
/** The view when no round is open and none closed the phase. */
|
|
60
|
+
export type NoReviewView = Extract<PhaseReviewView, {
|
|
61
|
+
state: 'none';
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* What the arguments after `review` came to: exactly one positional (the phase), and
|
|
65
|
+
* exactly one of `--show` or `--answer <part> <answer>`, with at most one
|
|
66
|
+
* `--repo <root>`. The two values after `--answer` are taken as they are, so an answer
|
|
67
|
+
* may begin with a dash. Anything else is usage.
|
|
68
|
+
*/
|
|
69
|
+
export type ReviewArgs = {
|
|
70
|
+
ok: true;
|
|
71
|
+
mode: 'show';
|
|
72
|
+
phase: string;
|
|
73
|
+
repoRoot: string | undefined;
|
|
74
|
+
} | {
|
|
75
|
+
ok: true;
|
|
76
|
+
mode: 'answer';
|
|
77
|
+
phase: string;
|
|
78
|
+
part: string;
|
|
79
|
+
answer: string;
|
|
80
|
+
repoRoot: string | undefined;
|
|
81
|
+
} | {
|
|
82
|
+
ok: false;
|
|
83
|
+
};
|
|
84
|
+
export declare function parseReviewArgs(argv: readonly string[]): ReviewArgs;
|
|
85
|
+
/** RV1a: printed when the view's `counted` is false. */
|
|
86
|
+
export declare const RV1A_LINE = "Halfcycle could not count what this phase changed, so judge each part on what the agents reported alone.";
|
|
87
|
+
/**
|
|
88
|
+
* RV2's status, exactly one of seven (S-aa). A settled part reads its decision; an
|
|
89
|
+
* unsettled one reads whether a question waits for the agent's answer, then whether it
|
|
90
|
+
* was sent back in this round, else that it waits for the owner's decision (a part
|
|
91
|
+
* whose question was answered included).
|
|
92
|
+
*/
|
|
93
|
+
export declare function partStatus(part: ReviewViewPart, round: number): string;
|
|
94
|
+
/**
|
|
95
|
+
* THE LISTING, RV1 to RV7, in the spec's order: RV1, RV1a when Halfcycle could not
|
|
96
|
+
* count, RV1b one line each, then per part RV2–RV6 with RV4a, then RV7.
|
|
97
|
+
*/
|
|
98
|
+
export declare function reviewListingLines(view: ReviewedView): string[];
|
|
99
|
+
/** RV8: the refusal for a view with no open review, by its state. */
|
|
100
|
+
export declare function rv8Line(view: NoReviewView | Extract<PhaseReviewView, {
|
|
101
|
+
state: 'closed';
|
|
102
|
+
}>): string;
|
|
103
|
+
/** RV9: refused, not signed in. */
|
|
104
|
+
export declare const RV9_LINE = "halfcycle review: this project is not signed in on this computer. Run \"npx halfcycle\" in the project folder to sign in.";
|
|
105
|
+
/** RV10: refused, cannot reach. */
|
|
106
|
+
export declare const RV10_LINE = "halfcycle review: Halfcycle could not be reached just now. Check this computer's connection, then run this again.";
|
|
107
|
+
/** RV11: refused, the listing could not be recorded on this computer. */
|
|
108
|
+
export declare const RV11_LINE = "halfcycle review: the list just shown could not be recorded on this computer, so a typed decision cannot use it. Run this again.";
|
|
109
|
+
/** AN1: the answer is on the part. */
|
|
110
|
+
export declare function an1Line(name: string): string;
|
|
111
|
+
/** AN2: refused, no question waits on the part. */
|
|
112
|
+
export declare function an2Line(part: string, phase: string): string;
|
|
113
|
+
/** AN3: refused on this computer, the answer's shape. */
|
|
114
|
+
export declare const AN3_LINE = "halfcycle review: the answer must be one paragraph of at most 1,000 characters, with no line breaks.";
|
|
115
|
+
/** AN4: refused on this computer, the answer looks secret. */
|
|
116
|
+
export declare const AN4_LINE = "halfcycle review: the answer looks like it holds a password or key, so it was not sent. Write it again without it.";
|
|
117
|
+
/** AN5: refused by Halfcycle, the words. */
|
|
118
|
+
export declare const AN5_LINE = "halfcycle review: the answer was not accepted. Reword it in plain words and run this again.";
|
|
119
|
+
/**
|
|
120
|
+
* The shown record's review entry for a listed round (AC2): `decidable` is the view's;
|
|
121
|
+
* `awaitingAnswer` is true when one of the part's questions has no answer; `sentBack`
|
|
122
|
+
* is true when one of its send-backs is from the listed round.
|
|
123
|
+
*/
|
|
124
|
+
export declare function shownReviewEntry(view: ReviewedView, shownAt: string): ShownReviewEntry;
|
|
125
|
+
/** What writing the shown review came to. */
|
|
126
|
+
export type ShownReviewWrite = {
|
|
127
|
+
ok: true;
|
|
128
|
+
} | {
|
|
129
|
+
ok: false;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Record on this machine that `entry` was listed, through `updateShownRecord`. The
|
|
133
|
+
* record keeps the latest review per phase, so this phase's review is replaced; a review
|
|
134
|
+
* holding this number under another phase is stale and dropped, as `writeShownPlan` drops
|
|
135
|
+
* a plan's. The shown plans are kept as they are. Never throws.
|
|
136
|
+
*/
|
|
137
|
+
export declare function writeShownReview(engagementId: string, entry: ShownReviewEntry, home?: string): ShownReviewWrite;
|
|
138
|
+
/** The address of one phase's review, or of a path under it: each segment encoded once. */
|
|
139
|
+
export declare function reviewUrl(credential: RepoCredential, phase: string, rest?: string): string;
|
|
140
|
+
/** What reading the review came to. */
|
|
141
|
+
export type ReviewRead = {
|
|
142
|
+
kind: 'view';
|
|
143
|
+
view: PhaseReviewView;
|
|
144
|
+
} | {
|
|
145
|
+
kind: 'not-signed-in';
|
|
146
|
+
} | {
|
|
147
|
+
kind: 'unreachable';
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Read the phase's review. Never throws. A body that parses under
|
|
151
|
+
* `phaseReviewViewSchema` on a 200 is the view; a 401 is not signed in; anything else
|
|
152
|
+
* (no answer, a status the read does not give, a body the schema refuses) is cannot
|
|
153
|
+
* reach, never a view.
|
|
154
|
+
*/
|
|
155
|
+
export declare function readReview(credential: RepoCredential, phase: string): Promise<ReviewRead>;
|
|
156
|
+
/** What sending the answer came to. */
|
|
157
|
+
export type AnswerSend = {
|
|
158
|
+
kind: 'recorded';
|
|
159
|
+
name: string;
|
|
160
|
+
} | {
|
|
161
|
+
kind: 'no-question';
|
|
162
|
+
} | {
|
|
163
|
+
kind: 'refused';
|
|
164
|
+
} | {
|
|
165
|
+
kind: 'not-signed-in';
|
|
166
|
+
} | {
|
|
167
|
+
kind: 'unreachable';
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Send the agent's answer. Never throws. A body that parses under
|
|
171
|
+
* `reviewAnswerResultSchema` is authoritative whatever its status, except that
|
|
172
|
+
* `unavailable` is cannot reach; a 401 is not signed in; anything else is cannot reach.
|
|
173
|
+
*/
|
|
174
|
+
export declare function sendReviewAnswer(credential: RepoCredential, phase: string, body: {
|
|
175
|
+
part: string;
|
|
176
|
+
answer: string;
|
|
177
|
+
}): Promise<AnswerSend>;
|
|
178
|
+
/** The pieces the verb reaches outside itself through; replaced in tests. */
|
|
179
|
+
export interface ReviewDeps {
|
|
180
|
+
readonly readCredential: (repoRoot: string) => RepoCredential;
|
|
181
|
+
readonly readReview: (credential: RepoCredential, phase: string) => Promise<ReviewRead>;
|
|
182
|
+
readonly sendAnswer: (credential: RepoCredential, phase: string, body: {
|
|
183
|
+
part: string;
|
|
184
|
+
answer: string;
|
|
185
|
+
}) => Promise<AnswerSend>;
|
|
186
|
+
readonly recordShown: (engagementId: string, entry: ShownReviewEntry) => ShownReviewWrite;
|
|
187
|
+
readonly now: () => Date;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* `review <phase> --show`. Exit 0 when the listing is printed and recorded. A view with
|
|
191
|
+
* no open review prints RV8 and exits 1; a failed write prints the listing, then RV11,
|
|
192
|
+
* and exits 1.
|
|
193
|
+
*/
|
|
194
|
+
export declare function runReviewShow(repoRoot: string, phase: string, deps: ReviewDeps): Promise<SystemRun>;
|
|
195
|
+
/**
|
|
196
|
+
* What checking the answer on this computer came to: the request to send, the line for
|
|
197
|
+
* a refused answer, or `usage` for a part that is not a part id.
|
|
198
|
+
*/
|
|
199
|
+
export type AnswerCheck = {
|
|
200
|
+
ok: true;
|
|
201
|
+
body: {
|
|
202
|
+
part: string;
|
|
203
|
+
answer: string;
|
|
204
|
+
};
|
|
205
|
+
} | {
|
|
206
|
+
ok: false;
|
|
207
|
+
line: string;
|
|
208
|
+
} | {
|
|
209
|
+
ok: false;
|
|
210
|
+
usage: true;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Check the answer by the wire's own rule (`reviewAnswerRequestSchema`) before anything
|
|
214
|
+
* is sent (AC6). A credential-shaped answer is AN4, whatever else is wrong with it, so
|
|
215
|
+
* the person is told to take the secret out; any other problem with the answer is AN3.
|
|
216
|
+
*/
|
|
217
|
+
export declare function checkAnswer(part: string, answer: string): AnswerCheck;
|
|
218
|
+
/**
|
|
219
|
+
* `review <phase> --answer <part> "<answer>"`. Exit 0 when the answer is recorded (AN1,
|
|
220
|
+
* naming the part from the answer's `recorded`, with no second read); exit 1 for every
|
|
221
|
+
* refusal; exit 2 for a part that is not a part id, which is usage.
|
|
222
|
+
*/
|
|
223
|
+
export declare function runReviewAnswer(repoRoot: string, phase: string, part: string, answer: string, deps: ReviewDeps): Promise<{
|
|
224
|
+
stdout: string;
|
|
225
|
+
stderr: string;
|
|
226
|
+
exitCode: 0 | 1 | 2;
|
|
227
|
+
}>;
|
|
228
|
+
//# sourceMappingURL=review.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../src/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAKL,KAAK,gBAAgB,EAEtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAaL,KAAK,eAAe,EAGpB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,iGAAiG;AACjG,eAAO,MAAM,YAAY,gGAA8F,CAAC;AAExH,qEAAqE;AACrE,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,EAAE;IAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAA;CAAE,CAAC,CAAC;AAElF,gEAAgE;AAChE,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,EAAE;IAAE,KAAK,E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EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC3B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,CAAC;AAE/B;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,CAKrE;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,UAAU,GACf,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC,CAsBlE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shown record's I/O on this machine — the one place the CLI writes
|
|
3
|
+
* `~/.halfcycle/engagements/<id>/shown-plans.json`.
|
|
4
|
+
*
|
|
5
|
+
* Two verbs write it: `plan <phase> --show` (a shown plan, `writeShownPlan` in
|
|
6
|
+
* `plan.ts`) and `review <phase> --show` (a listed review, `writeShownReview` in
|
|
7
|
+
* `review.ts`). Both go through `updateShownRecord`, which reads the WHOLE record,
|
|
8
|
+
* lets the caller replace its own half, and writes the whole record back, so listing
|
|
9
|
+
* a plan never drops a listed review and listing a review never drops a shown plan.
|
|
10
|
+
* A second writer with its own read-modify-write would be the way one verb erases
|
|
11
|
+
* the other's entry.
|
|
12
|
+
*
|
|
13
|
+
* The one other write is the runner's prompt hook, which may not import this module
|
|
14
|
+
* (INV-001): after a typed review line is recorded it moves THAT listed review forward
|
|
15
|
+
* (`packages/runner/src/hooks/shown-record.ts`, `typed-close-review` S-v). It is built
|
|
16
|
+
* the same way, replaces only the one review entry it was sent from, and writes nothing
|
|
17
|
+
* when that entry was listed again meanwhile.
|
|
18
|
+
*
|
|
19
|
+
* The format is `@halfcycle/core`'s (`parseShownRecord`, `serialiseShownRecord`),
|
|
20
|
+
* never restated here; this module keeps only the I/O. A missing or malformed record
|
|
21
|
+
* reads as nothing shown.
|
|
22
|
+
*
|
|
23
|
+
* Written to a temporary file in the same folder, mode `0600` set on it before the
|
|
24
|
+
* rename (a rename carries the source's bits), then renamed into place, so a reader
|
|
25
|
+
* sees the old record or the new one and never a part of one. `chmod` is skipped on
|
|
26
|
+
* Windows, where the bits mean nothing.
|
|
27
|
+
*
|
|
28
|
+
* INV-001: Node builtins and `@halfcycle/core` only. Machine state under the home
|
|
29
|
+
* folder; nothing is written into the person's project (INV-019).
|
|
30
|
+
*/
|
|
31
|
+
import { type ShownRecord } from '@halfcycle/core';
|
|
32
|
+
/** What updating the shown record came to: on success, the whole record now written. */
|
|
33
|
+
export type ShownRecordWrite = {
|
|
34
|
+
ok: true;
|
|
35
|
+
record: ShownRecord;
|
|
36
|
+
} | {
|
|
37
|
+
ok: false;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Read the shown record for `engagementId`, pass it to `update`, and write what
|
|
41
|
+
* `update` returns. Never throws: an engagement id `engagementStateDir` refuses, a
|
|
42
|
+
* record the serialiser refuses, or any failed write answers `{ ok: false }`, and a
|
|
43
|
+
* temporary file left behind is removed.
|
|
44
|
+
*/
|
|
45
|
+
export declare function updateShownRecord(engagementId: string, update: (current: ShownRecord) => ShownRecord, home?: string): ShownRecordWrite;
|
|
46
|
+
//# sourceMappingURL=shown-record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shown-record.d.ts","sourceRoot":"","sources":["../src/shown-record.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH,OAAO,EAAgE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGjH,wFAAwF;AACxF,MAAM,MAAM,gBAAgB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC;AAEjF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,WAAW,EAC7C,IAAI,CAAC,EAAE,MAAM,GACZ,gBAAgB,CA6BlB"}
|
package/dist/system-report.d.ts
CHANGED
|
@@ -97,14 +97,17 @@ export declare function unownedPatterns(description: SystemDescription, tracked:
|
|
|
97
97
|
export declare function unownedPatternLines(unowned: readonly UnownedPattern[], verb: DescriptionVerb): string;
|
|
98
98
|
/**
|
|
99
99
|
* What came of reporting the description. `recorded`: the service holds it as
|
|
100
|
-
* `version` (a description it already had returns that version
|
|
101
|
-
* service's
|
|
102
|
-
*
|
|
100
|
+
* `version` (a description it already had returns that version; `unchanged` tells the
|
|
101
|
+
* two apart by the service's status, 200 for unchanged and 201 for a new version,
|
|
102
|
+
* and is absent from a stand-in that never sets it). `refused`: the service's own
|
|
103
|
+
* problems. `no-route`: this service cannot take a description yet. `unavailable`:
|
|
104
|
+
* it could not be reported, and `why` says so.
|
|
103
105
|
*/
|
|
104
106
|
export type ReportOutcome = {
|
|
105
107
|
kind: 'recorded';
|
|
106
108
|
version: number;
|
|
107
109
|
reportedAt: string;
|
|
110
|
+
unchanged?: boolean;
|
|
108
111
|
} | {
|
|
109
112
|
kind: 'refused';
|
|
110
113
|
problems: SystemDescriptionProblem[];
|
|
@@ -151,6 +154,7 @@ export type DescriptionStage = {
|
|
|
151
154
|
version: number;
|
|
152
155
|
credential: RepoCredential;
|
|
153
156
|
warnings: string;
|
|
157
|
+
unchanged?: boolean;
|
|
154
158
|
};
|
|
155
159
|
/** The verbs that report the description first. Names the prefix of every line. */
|
|
156
160
|
export type DescriptionVerb = 'system' | 'draw' | 'plan';
|
|
@@ -160,6 +164,21 @@ export type DescriptionVerb = 'system' | 'draw' | 'plan';
|
|
|
160
164
|
* description here; `draw` ignores the argument.
|
|
161
165
|
*/
|
|
162
166
|
export type BeforeSend = (description: SystemDescription) => string | null;
|
|
167
|
+
/** What reading the credential came to, or the one line every verb prints for it missing. */
|
|
168
|
+
export type CredentialRead = {
|
|
169
|
+
ok: true;
|
|
170
|
+
credential: RepoCredential;
|
|
171
|
+
} | {
|
|
172
|
+
ok: false;
|
|
173
|
+
line: string;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Read this project's credential, worded for the verb that is running. Shared by
|
|
177
|
+
* `checkAndReportDescription` and by `draw phase`'s closed arm (`part-state-and-builds`
|
|
178
|
+
* AC5), which reads it before the description stage, so the sentence for "not
|
|
179
|
+
* connected on this machine" has one home.
|
|
180
|
+
*/
|
|
181
|
+
export declare function readCredentialOrLine(repoRoot: string, deps: Pick<SystemDeps, 'readCredential'>, verb: DescriptionVerb): CredentialRead;
|
|
163
182
|
/**
|
|
164
183
|
* READ, CHECK, WARN, REPORT — the one path `system`, `draw` and `plan` take before
|
|
165
184
|
* anything else (feature `diagram-files-for-docs`, step 1 and 2 of the command). The
|
|
@@ -174,6 +193,11 @@ export type BeforeSend = (description: SystemDescription) => string | null;
|
|
|
174
193
|
* the line to print, or `null` to go on.
|
|
175
194
|
*/
|
|
176
195
|
export declare function checkAndReportDescription(repoRoot: string, deps: SystemDeps, verb: DescriptionVerb, beforeSend?: BeforeSend): Promise<DescriptionStage>;
|
|
177
|
-
/**
|
|
196
|
+
/**
|
|
197
|
+
* The whole `system` verb: the shared stage, then its version printed. U1
|
|
198
|
+
* (feature `what-halfcycle-saw`): when the description equalled the latest
|
|
199
|
+
* version and nothing was stored, this prints that it is unchanged rather than
|
|
200
|
+
* a line that reads like a second version.
|
|
201
|
+
*/
|
|
178
202
|
export declare function runSystem(repoRoot: string, deps: SystemDeps): Promise<SystemRun>;
|
|
179
203
|
//# sourceMappingURL=system-report.d.ts.map
|
|
@@ -1 +1 @@
|
|
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H,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,eAAe,EACrB,UAAU,GAAE,UAAuB,GAClC,OAAO,CAAC,gBAAgB,CAAC,CAgE3B;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,CAqBtF"}
|
package/package.json
CHANGED
package/dist/project-page.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The project's page on the dashboard — one address, built in one place.
|
|
3
|
-
*
|
|
4
|
-
* Two surfaces hand it out. The sign-in completion page sends the person's browser
|
|
5
|
-
* there once a join knows the project (`loopback-signin.ts`). The committed pin records
|
|
6
|
-
* it so a session reading the repository can give the person the link without guessing
|
|
7
|
-
* — before the pin carried it, the only copy was a line of installer output in a
|
|
8
|
-
* terminal the session never sees, and a cold session searching the repository for it
|
|
9
|
-
* guessed two addresses on the wrong host.
|
|
10
|
-
*
|
|
11
|
-
* THE ID MUST BE AN ENGAGEMENT ID OR THERE IS NO ADDRESS. Anything `isEngagementId`
|
|
12
|
-
* refuses — absent, empty, or carrying characters a UUID does not — yields `undefined`,
|
|
13
|
-
* and each caller decides its own fallback. `isEngagementId` stays the shape's one home.
|
|
14
|
-
*
|
|
15
|
-
* The address carries no credential and never the installer's first-visit code. The
|
|
16
|
-
* dashboard decides what a visitor sees: someone signed in to Halfcycle in that browser
|
|
17
|
-
* reaches the project, and someone who is not is refused. It is the same for every clone
|
|
18
|
-
* of the repository, because it is built from nothing but the engagement id and a
|
|
19
|
-
* constant.
|
|
20
|
-
*
|
|
21
|
-
* INV-001: `@halfcycle/core` and `@halfcycle/events` only.
|
|
22
|
-
*/
|
|
23
|
-
export declare function projectPageUrl(engagementId: string | undefined): string | undefined;
|
|
24
|
-
//# sourceMappingURL=project-page.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-page.d.ts","sourceRoot":"","sources":["../src/project-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAInF"}
|