@bevel-software/platform-shared 0.14.0 → 0.19.0
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/dist/auth/types.d.ts +12 -0
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/git/pr.types.d.ts +75 -11
- package/dist/git/pr.types.d.ts.map +1 -1
- package/dist/git/types.d.ts +75 -2
- package/dist/git/types.d.ts.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/workflow/events.d.ts +39 -4
- package/dist/workflow/events.d.ts.map +1 -1
- package/dist/workflow/events.js.map +1 -1
- package/dist/workflow/interface.d.ts +137 -5
- package/dist/workflow/interface.d.ts.map +1 -1
- package/dist/workflow/types.d.ts +93 -0
- package/dist/workflow/types.d.ts.map +1 -1
- package/dist/workspace/access-verbs.d.ts +83 -0
- package/dist/workspace/access-verbs.d.ts.map +1 -0
- package/dist/workspace/access-verbs.js +110 -0
- package/dist/workspace/access-verbs.js.map +1 -0
- package/dist/workspace/agent-preamble.d.ts +33 -0
- package/dist/workspace/agent-preamble.d.ts.map +1 -0
- package/dist/workspace/agent-preamble.js +45 -0
- package/dist/workspace/agent-preamble.js.map +1 -0
- package/dist/workspace/entry-exists.d.ts +27 -0
- package/dist/workspace/entry-exists.d.ts.map +1 -0
- package/dist/workspace/entry-exists.js +33 -0
- package/dist/workspace/entry-exists.js.map +1 -0
- package/dist/workspace/filename.d.ts +15 -0
- package/dist/workspace/filename.d.ts.map +1 -1
- package/dist/workspace/filename.js +37 -3
- package/dist/workspace/filename.js.map +1 -1
- package/dist/workspace/frontmatter-carriers.d.ts +44 -0
- package/dist/workspace/frontmatter-carriers.d.ts.map +1 -0
- package/dist/workspace/frontmatter-carriers.js +52 -0
- package/dist/workspace/frontmatter-carriers.js.map +1 -0
- package/dist/workspace/frontmatter.d.ts +23 -4
- package/dist/workspace/frontmatter.d.ts.map +1 -1
- package/dist/workspace/frontmatter.js +59 -9
- package/dist/workspace/frontmatter.js.map +1 -1
- package/dist/workspace/kb-layout.d.ts +365 -19
- package/dist/workspace/kb-layout.d.ts.map +1 -1
- package/dist/workspace/kb-layout.js +619 -20
- package/dist/workspace/kb-layout.js.map +1 -1
- package/dist/workspace/placeholder.d.ts +21 -0
- package/dist/workspace/placeholder.d.ts.map +1 -0
- package/dist/workspace/placeholder.js +28 -0
- package/dist/workspace/placeholder.js.map +1 -0
- package/dist/workspace/platform-files.d.ts +105 -0
- package/dist/workspace/platform-files.d.ts.map +1 -0
- package/dist/workspace/platform-files.js +147 -0
- package/dist/workspace/platform-files.js.map +1 -0
- package/dist/workspace/types.d.ts +8 -0
- package/dist/workspace/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/auth/types.ts +12 -0
- package/src/git/pr.types.ts +77 -11
- package/src/git/types.ts +81 -3
- package/src/index.ts +6 -0
- package/src/workflow/events.ts +40 -3
- package/src/workflow/interface.ts +162 -6
- package/src/workflow/types.ts +70 -0
- package/src/workspace/access-verbs.ts +124 -0
- package/src/workspace/agent-preamble.ts +47 -0
- package/src/workspace/entry-exists.ts +36 -0
- package/src/workspace/filename.ts +38 -3
- package/src/workspace/frontmatter-carriers.ts +57 -0
- package/src/workspace/frontmatter.ts +57 -8
- package/src/workspace/kb-layout.ts +660 -24
- package/src/workspace/placeholder.ts +29 -0
- package/src/workspace/platform-files.ts +188 -0
- package/src/workspace/types.ts +8 -0
package/dist/auth/types.d.ts
CHANGED
|
@@ -11,6 +11,18 @@ export interface AuthUser {
|
|
|
11
11
|
* absent field must never resurrect the welcome flow.
|
|
12
12
|
*/
|
|
13
13
|
onboardingDone?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Is this the deployment admin — the account whose password is set in the
|
|
16
|
+
* deployment environment (`ADMIN_EMAIL` while `ADMIN_PASSWORD` is set)
|
|
17
|
+
* rather than stored as a hash? That credential is the platform's rescue
|
|
18
|
+
* path into a deployment, so this account's password cannot be changed from
|
|
19
|
+
* the Account page. Derived from configuration on every read rather than
|
|
20
|
+
* stored, and it carries no part of the credential itself. Optional for the
|
|
21
|
+
* same reason as `onboardingDone` above — pre-existing fixtures and cached
|
|
22
|
+
* user objects stay valid — and only an explicit `true` means "deployment
|
|
23
|
+
* admin".
|
|
24
|
+
*/
|
|
25
|
+
isEnvAdmin?: boolean;
|
|
14
26
|
}
|
|
15
27
|
export interface LoginRequest {
|
|
16
28
|
email: string;
|
package/dist/auth/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/auth/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/auth/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;CAChB"}
|
package/dist/git/pr.types.d.ts
CHANGED
|
@@ -43,7 +43,37 @@ export interface PullRequestSummary {
|
|
|
43
43
|
/** Relative paths within `knowledge-base/`. Empty if not yet computed. */
|
|
44
44
|
touchedNodePaths: string[];
|
|
45
45
|
review: PullRequestReviewStatus;
|
|
46
|
+
/**
|
|
47
|
+
* Link to the change request: absolute (`<public frontend address>/change-requests/<number>`)
|
|
48
|
+
* when the deployment has a public address configured, else the in-app relative path.
|
|
49
|
+
*/
|
|
46
50
|
url: string;
|
|
51
|
+
/** Present when `url` is relative — says how to get absolute links. */
|
|
52
|
+
urlNote?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The most recent apply attempt that did not land, while the request is
|
|
55
|
+
* still open — so its author and every other viewer see the refusal the
|
|
56
|
+
* person who clicked Apply saw. Replaced by a newer refusal; null or
|
|
57
|
+
* absent when there is nothing to report.
|
|
58
|
+
*/
|
|
59
|
+
lastApplyFailure?: ChangeRequestApplyFailure | null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* What refused an apply: the merge gate (approvals it still waits on), git
|
|
63
|
+
* (conflicts with the target), or anything else (a push, the roles.yaml guard,
|
|
64
|
+
* an internal error). Decides which later change makes the refusal obsolete.
|
|
65
|
+
*/
|
|
66
|
+
export type ChangeRequestApplyFailureKind = 'gate' | 'conflicts' | 'error';
|
|
67
|
+
/** Why the last apply of a change request failed, as persisted on the request. */
|
|
68
|
+
export interface ChangeRequestApplyFailure {
|
|
69
|
+
/** Human-readable reason, credentials already redacted. */
|
|
70
|
+
reason: string;
|
|
71
|
+
/** True when git refused the merge on conflicts with the target. */
|
|
72
|
+
conflicts: boolean;
|
|
73
|
+
/** ISO timestamp of the failed attempt. */
|
|
74
|
+
at: string;
|
|
75
|
+
/** Display name of whoever attempted the apply. */
|
|
76
|
+
byName: string;
|
|
47
77
|
}
|
|
48
78
|
export type PrFileStatus = 'added' | 'modified' | 'removed' | 'renamed' | 'copied' | 'changed' | 'unchanged';
|
|
49
79
|
/**
|
|
@@ -137,16 +167,31 @@ export interface FileApprovalState {
|
|
|
137
167
|
}[];
|
|
138
168
|
};
|
|
139
169
|
approvedBy: FileApprovalEntry[];
|
|
170
|
+
/**
|
|
171
|
+
* True only when `eligibleApprovers` is the access tree's actual answer for
|
|
172
|
+
* this file. False (or absent) when it could not be resolved — no workspace,
|
|
173
|
+
* no usable access config on the base, a failed lookup — in which case the
|
|
174
|
+
* empty approver set means "unknown", not "outside the gate", and anything
|
|
175
|
+
* granted on the strength of that emptiness must fail closed.
|
|
176
|
+
*/
|
|
177
|
+
eligibilityResolved?: boolean;
|
|
140
178
|
/**
|
|
141
179
|
* True iff at least one eligible approver has submitted a non-stale
|
|
142
180
|
* approval. Always `false` when `eligibleApprovers` is empty — with no
|
|
143
181
|
* eligible set, nobody can satisfy the check.
|
|
144
182
|
* Whether the gate *cares* about this file is a separate concern handled
|
|
145
|
-
* by the merge-gate logic:
|
|
146
|
-
*
|
|
183
|
+
* by the merge-gate logic: files with no eligible approvers, whatever
|
|
184
|
+
* their type, are silently excluded from the gate, so `isApproved: false`
|
|
147
185
|
* on one of them does not block merge.
|
|
148
186
|
*/
|
|
149
187
|
isApproved: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Whether the merge gate binds this file at all — the backend's one
|
|
190
|
+
* relevance rule, stamped per file so clients read the verdict instead of
|
|
191
|
+
* re-deriving it. False files neither warn nor block a merge, so no surface
|
|
192
|
+
* should count them as pending or name anyone to wait on.
|
|
193
|
+
*/
|
|
194
|
+
inMergeGate: boolean;
|
|
150
195
|
/**
|
|
151
196
|
* Pre-computed for the requesting viewer: would `approveFile` accept their
|
|
152
197
|
* click? True iff their email resolves to `write` on this path under the
|
|
@@ -175,21 +220,21 @@ export interface PullRequestDetail extends PullRequestSummary {
|
|
|
175
220
|
*/
|
|
176
221
|
approvals: FileApprovalState[];
|
|
177
222
|
/**
|
|
178
|
-
* True iff no
|
|
179
|
-
* merged/closed
|
|
180
|
-
*
|
|
181
|
-
*
|
|
223
|
+
* True iff no blocking reason remains — the PR is open, has files, isn't
|
|
224
|
+
* merged/closed, and every file with an eligible approver (of any file
|
|
225
|
+
* type) holds a current approval. False while any approval is missing; an
|
|
226
|
+
* admin may still merge past missing approvals with the bypass flag.
|
|
182
227
|
*/
|
|
183
228
|
mergeableInBevel: boolean;
|
|
184
229
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
230
|
+
* Blocking reasons — hard blocks (PR state, no files) followed by each
|
|
231
|
+
* missing approval. Empty exactly when `mergeableInBevel` is true.
|
|
187
232
|
*/
|
|
188
233
|
mergeBlockedReasons: string[];
|
|
189
234
|
/**
|
|
190
|
-
*
|
|
191
|
-
* approval is stale).
|
|
192
|
-
*
|
|
235
|
+
* The missing approvals alone — files of any type with an eligible approver
|
|
236
|
+
* who hasn't approved (or whose approval is stale). An admin bypass merges
|
|
237
|
+
* past exactly these and records them. Files nobody can approve are silent.
|
|
193
238
|
*/
|
|
194
239
|
mergeWarnings: string[];
|
|
195
240
|
/**
|
|
@@ -212,6 +257,25 @@ export interface PullRequestDetail extends PullRequestSummary {
|
|
|
212
257
|
* tree can't be resolved.
|
|
213
258
|
*/
|
|
214
259
|
viewerCanCancel: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* The commit this request forked from its target (merge base of `headSha`
|
|
262
|
+
* and `baseSha`). Every file diff in the request reads its "before" side
|
|
263
|
+
* here, never at the target tip — an edit made on the target after the
|
|
264
|
+
* proposal must not look like something the proposal deletes. `null` when
|
|
265
|
+
* the branches share no history (or no workspace could resolve them).
|
|
266
|
+
*/
|
|
267
|
+
mergeBaseSha: string | null;
|
|
268
|
+
/**
|
|
269
|
+
* True iff the target holds commits the proposal does not contain — the
|
|
270
|
+
* request needs updating. False for anything not open.
|
|
271
|
+
*/
|
|
272
|
+
behind: boolean;
|
|
273
|
+
/**
|
|
274
|
+
* True iff the viewer may Update the request (merge its target into it):
|
|
275
|
+
* the request is open AND the viewer is its author or may apply it. A UX
|
|
276
|
+
* hint — the update route re-checks the same predicate server-side.
|
|
277
|
+
*/
|
|
278
|
+
viewerCanUpdate: boolean;
|
|
215
279
|
}
|
|
216
280
|
/**
|
|
217
281
|
* Result of a successful merge via the in-app gate. `sha` is the merge commit
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr.types.d.ts","sourceRoot":"","sources":["../../src/git/pr.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,MAAM,EAAE,uBAAuB,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"pr.types.d.ts","sourceRoot":"","sources":["../../src/git/pr.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;C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;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,WAAW,CAAC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACvE,iBAAiB,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC7E;;;OAGG;IACH,oBAAoB,CAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GACzB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACjC,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAC5D;;;;OAIG;IACH,WAAW,CACT,QAAQ,EAAE,MAAM;IAChB;;;;;OAKG;IACH,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GACxF,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CACtC"}
|
package/dist/git/types.d.ts
CHANGED
|
@@ -44,10 +44,22 @@ export interface ValidationReport {
|
|
|
44
44
|
warnings: string[];
|
|
45
45
|
rawOutput: string;
|
|
46
46
|
}
|
|
47
|
+
/** What `IGitService.syncFromRemote` observed under its one hold of the clone. */
|
|
48
|
+
export interface RemoteSyncPullResult {
|
|
49
|
+
/** HEAD before the pull; null when the clone had no commits yet. */
|
|
50
|
+
before: string | null;
|
|
51
|
+
/** HEAD after the pull; null only when origin is still empty too. */
|
|
52
|
+
after: string | null;
|
|
53
|
+
/** Whether the working tree's CONTENT differs — tree ids, not commit ids. */
|
|
54
|
+
treeChanged: boolean;
|
|
55
|
+
/** Repo-relative paths whose content changed; empty unless `treeChanged`. */
|
|
56
|
+
changedPaths: string[];
|
|
57
|
+
}
|
|
47
58
|
export interface IGitService {
|
|
48
59
|
status(workspaceId: string): Promise<WorkingTreeStatus>;
|
|
49
60
|
listBranches(workspaceId: string, opts?: {
|
|
50
61
|
freshFetch?: boolean;
|
|
62
|
+
strictFetch?: boolean;
|
|
51
63
|
}): Promise<BranchInfo[]>;
|
|
52
64
|
createBranch(workspaceId: string, name: string, fromBase?: string): Promise<BranchInfo>;
|
|
53
65
|
/**
|
|
@@ -83,7 +95,41 @@ export interface IGitService {
|
|
|
83
95
|
systemAuthorized?: boolean;
|
|
84
96
|
}): Promise<void>;
|
|
85
97
|
fetch(workspaceId: string): Promise<void>;
|
|
86
|
-
|
|
98
|
+
/**
|
|
99
|
+
* `treeChanged` is whether the pull left the working tree holding different
|
|
100
|
+
* CONTENT than before the call — tree ids compared, not commit ids, so a
|
|
101
|
+
* pull that only moves HEAD across content-identical commits (an empty
|
|
102
|
+
* commit, a rebase that replays to the same result) reports false. Only the
|
|
103
|
+
* pull itself can answer that (it holds the workspace mutex across the
|
|
104
|
+
* rebase; any before/after probe a caller ran around it would race), and
|
|
105
|
+
* callers that announce "this tree changed" to the rest of the process need
|
|
106
|
+
* the distinction: an "already up to date" pull that broadcast anyway would
|
|
107
|
+
* drop every catalog cache and reload every attached browser for nothing.
|
|
108
|
+
*/
|
|
109
|
+
pull(workspaceId: string): Promise<{
|
|
110
|
+
treeChanged: boolean;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* The remote sync's pull, observed as ONE serialized operation: where HEAD
|
|
114
|
+
* was, the pull, where HEAD is, and which repo-relative paths changed
|
|
115
|
+
* (rename-aware: both ends). `pull` bracketed by separate reads would let a
|
|
116
|
+
* concurrent save land between them and be announced as the sync's own.
|
|
117
|
+
*
|
|
118
|
+
* Tolerant of an unborn HEAD (a clone of an empty upstream): `before` is
|
|
119
|
+
* null, and paths are diffed against the empty tree. Throws the typed
|
|
120
|
+
* pull-conflict error like `pull`, and a typed "remote branch gone" error
|
|
121
|
+
* when origin no longer has the branch — including for an unborn clone,
|
|
122
|
+
* once origin has any branch at all. The one exception: an unborn clone
|
|
123
|
+
* against an origin with NO branches (a fresh deployment nobody has pushed
|
|
124
|
+
* to) resolves to `after: null`, since there is nothing to sync and nothing
|
|
125
|
+
* stale.
|
|
126
|
+
*/
|
|
127
|
+
syncFromRemote(workspaceId: string): Promise<RemoteSyncPullResult>;
|
|
128
|
+
/**
|
|
129
|
+
* Whether origin still has `branch` right now (`ls-remote`). Used to
|
|
130
|
+
* revalidate that a clone is still stale before it is retired.
|
|
131
|
+
*/
|
|
132
|
+
remoteBranchExists(workspaceId: string, branch: string): Promise<boolean>;
|
|
87
133
|
diffStat(workspaceId: string, base?: string): Promise<string[]>;
|
|
88
134
|
/**
|
|
89
135
|
* Paths in the working tree that the next commit would include — the set
|
|
@@ -138,7 +184,34 @@ export interface IGitService {
|
|
|
138
184
|
* Just the repo-relative paths a change request touches (three-dot diff,
|
|
139
185
|
* no statuses, no patches): the cheap form behind change-request list
|
|
140
186
|
* summaries and owner routing.
|
|
187
|
+
*
|
|
188
|
+
* `fetch: false` skips the per-request fetch of the two refs — for a caller
|
|
189
|
+
* that has just refreshed the whole clone's remote-tracking refs in one
|
|
190
|
+
* round trip, which is what a LIST does rather than paying one fetch per
|
|
191
|
+
* request. Pass it only when that is true; otherwise the diff can describe
|
|
192
|
+
* a stale head. It is a skip, not a promise: a branch the clone does not
|
|
193
|
+
* have yet is fetched anyway, since there is nothing to diff without it —
|
|
194
|
+
* so a list's first sight of a new request still costs one round trip.
|
|
195
|
+
*/
|
|
196
|
+
changedPathsForPr(workspaceId: string, baseBranch: string, headBranch: string, opts?: {
|
|
197
|
+
fetch?: boolean;
|
|
198
|
+
}): Promise<string[]>;
|
|
199
|
+
/**
|
|
200
|
+
* A change request's fork point (merge base of the two resolved commits)
|
|
201
|
+
* and whether the target has commits the proposal does not contain. No
|
|
202
|
+
* fetch: `at` is what `resolvePrShas` just returned.
|
|
203
|
+
*/
|
|
204
|
+
forkPointForPr(workspaceId: string, at: {
|
|
205
|
+
baseSha: string;
|
|
206
|
+
headSha: string;
|
|
207
|
+
}): Promise<{
|
|
208
|
+
mergeBaseSha: string | null;
|
|
209
|
+
behind: boolean;
|
|
210
|
+
}>;
|
|
211
|
+
/**
|
|
212
|
+
* A file's content at a change request's fork point — a commit that must
|
|
213
|
+
* be on `baseBranch`'s history. `null` when the path did not exist there.
|
|
141
214
|
*/
|
|
142
|
-
|
|
215
|
+
readFileAtForkPoint(workspaceId: string, baseBranch: string, sha: string, relativePath: string): Promise<string | null>;
|
|
143
216
|
}
|
|
144
217
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/git/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/git/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IAIrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;CAKpB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IAIf,WAAW,EAAE,OAAO,CAAC;IAKrB,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAMD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;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;KAAE,CAAC,CAAC;IAE7D;;;OAGG;IACH,mBAAmB,CACjB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC3B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
export * from './auth/types.js';
|
|
2
2
|
export * from './chat/types.js';
|
|
3
3
|
export * from './workspace/types.js';
|
|
4
|
+
export * from './workspace/agent-preamble.js';
|
|
4
5
|
export * from './workspace/filename.js';
|
|
6
|
+
export * from './workspace/entry-exists.js';
|
|
5
7
|
export * from './workspace/kb-layout.js';
|
|
6
8
|
export * from './workspace/join-request.js';
|
|
7
9
|
export * from './workspace/frontmatter.js';
|
|
10
|
+
export * from './workspace/placeholder.js';
|
|
11
|
+
export * from './workspace/frontmatter-carriers.js';
|
|
12
|
+
export * from './workspace/platform-files.js';
|
|
13
|
+
export * from './workspace/access-verbs.js';
|
|
8
14
|
export * from './git/types.js';
|
|
9
15
|
export * from './git/pr.types.js';
|
|
10
16
|
export * from './git/protected.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAGhC,cAAc,iBAAiB,CAAC;AAGhC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAGhC,cAAc,iBAAiB,CAAC;AAGhC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAG5C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,10 +4,16 @@ export * from './auth/types.js';
|
|
|
4
4
|
export * from './chat/types.js';
|
|
5
5
|
// Workspace
|
|
6
6
|
export * from './workspace/types.js';
|
|
7
|
+
export * from './workspace/agent-preamble.js';
|
|
7
8
|
export * from './workspace/filename.js';
|
|
9
|
+
export * from './workspace/entry-exists.js';
|
|
8
10
|
export * from './workspace/kb-layout.js';
|
|
9
11
|
export * from './workspace/join-request.js';
|
|
10
12
|
export * from './workspace/frontmatter.js';
|
|
13
|
+
export * from './workspace/placeholder.js';
|
|
14
|
+
export * from './workspace/frontmatter-carriers.js';
|
|
15
|
+
export * from './workspace/platform-files.js';
|
|
16
|
+
export * from './workspace/access-verbs.js';
|
|
11
17
|
// Git
|
|
12
18
|
export * from './git/types.js';
|
|
13
19
|
export * from './git/pr.types.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,iBAAiB,CAAC;AAEhC,OAAO;AACP,cAAc,iBAAiB,CAAC;AAEhC,YAAY;AACZ,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,iBAAiB,CAAC;AAEhC,OAAO;AACP,cAAc,iBAAiB,CAAC;AAEhC,YAAY;AACZ,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAE5C,MAAM;AACN,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,yEAAyE;AACzE,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
|
|
@@ -124,6 +124,13 @@ export interface GitSyncFailedEvent {
|
|
|
124
124
|
branch: string;
|
|
125
125
|
/** Sanitised git error — safe to display, tokens already redacted. */
|
|
126
126
|
reason: string;
|
|
127
|
+
/**
|
|
128
|
+
* Present when the failure is a REMOTE-SYNC CONFLICT (`POST /api/sync`
|
|
129
|
+
* found Hexis-side commits that contradict what landed on the host): the
|
|
130
|
+
* repo-relative files a person has to reconcile. Unlike a failing push,
|
|
131
|
+
* this is the author's to act on, so the banner offers to open them.
|
|
132
|
+
*/
|
|
133
|
+
conflictedPaths?: string[];
|
|
127
134
|
}
|
|
128
135
|
/**
|
|
129
136
|
* A push succeeded on a workspace whose previous push had failed — the
|
|
@@ -195,6 +202,27 @@ export interface ChangeRequestRejectedEvent {
|
|
|
195
202
|
kind: 'change-request-rejected';
|
|
196
203
|
number: number;
|
|
197
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* An apply did NOT land, announced to EVERY session — the counterpart of the
|
|
207
|
+
* user-scoped `change-request-merge-failed` below, which only the clicker gets.
|
|
208
|
+
*
|
|
209
|
+
* The request stays open, so everyone who can see it (its author waiting on
|
|
210
|
+
* the verdict, another owner, another admin) needs to learn that the attempt
|
|
211
|
+
* failed and why. The reason is deliberately NOT carried here: it is persisted
|
|
212
|
+
* on the request (`PullRequestSummary.lastApplyFailure`) and read back through
|
|
213
|
+
* the list and detail endpoints the viewer already uses, so the broadcast puts
|
|
214
|
+
* no error text in front of every session, and a session that missed the event
|
|
215
|
+
* reads the same answer on its next fetch.
|
|
216
|
+
*
|
|
217
|
+
* Also sent when a recorded refusal is CLEARED because a change made it
|
|
218
|
+
* obsolete (an approval for a gate refusal, a moved source head for any):
|
|
219
|
+
* either way the request's `lastApplyFailure` changed, and every viewer
|
|
220
|
+
* re-reads it.
|
|
221
|
+
*/
|
|
222
|
+
export interface ChangeRequestApplyFailedEvent {
|
|
223
|
+
kind: 'change-request-apply-failed';
|
|
224
|
+
number: number;
|
|
225
|
+
}
|
|
198
226
|
/**
|
|
199
227
|
* A merge the caller triggered did NOT land — either the gate refused it, the
|
|
200
228
|
* branch needs conflict resolution, or `gh pr merge` failed. The merge route
|
|
@@ -202,9 +230,10 @@ export interface ChangeRequestRejectedEvent {
|
|
|
202
230
|
* gateway timeout), so this is how the failure reaches the UI that kicked it
|
|
203
231
|
* off. Success travels on `change-request-merged` instead.
|
|
204
232
|
*
|
|
205
|
-
* User-scoped (`forUserId`, no `workspaceId`) —
|
|
206
|
-
*
|
|
207
|
-
*
|
|
233
|
+
* User-scoped (`forUserId`, no `workspaceId`) — the clicker's immediate
|
|
234
|
+
* answer, which also routes a conflict into the resolution flow. Everyone else
|
|
235
|
+
* learns of the failure from `change-request-apply-failed`, which carries no
|
|
236
|
+
* error string; the reason itself is persisted on the request.
|
|
208
237
|
*/
|
|
209
238
|
export interface ChangeRequestMergeFailedEvent {
|
|
210
239
|
kind: 'change-request-merge-failed';
|
|
@@ -217,6 +246,12 @@ export interface ChangeRequestMergeFailedEvent {
|
|
|
217
246
|
* The UI routes to the agent resolution flow instead of showing an error.
|
|
218
247
|
*/
|
|
219
248
|
conflicts: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* When the attempt failed (ISO) — the same instant persisted as
|
|
251
|
+
* `lastApplyFailure.at` when the refusal is recorded, so the clicker's tab
|
|
252
|
+
* can tell its own refusal from a later one somebody else's attempt made.
|
|
253
|
+
*/
|
|
254
|
+
at?: string;
|
|
220
255
|
}
|
|
221
256
|
/**
|
|
222
257
|
* Per-file approval on a change request was added or removed (e.g. via the
|
|
@@ -249,7 +284,7 @@ export interface ResyncEvent {
|
|
|
249
284
|
/** Human-readable reason for logs / debugging. */
|
|
250
285
|
reason: string;
|
|
251
286
|
}
|
|
252
|
-
export type WorkflowEventPayload = FileChangedEvent | LockAcquiredEvent | LockReleasedEvent | FsTreeChangedEvent | GitSyncFailedEvent | GitSyncRecoveredEvent | BranchSwitchedEvent | AgentToolCallEvent | ChangeRequestOpenedEvent | ChangeRequestMergedEvent | ChangeRequestRejectedEvent | ChangeRequestMergeFailedEvent | ApprovalChangedEvent | HeartbeatEvent | ResyncEvent;
|
|
287
|
+
export type WorkflowEventPayload = FileChangedEvent | LockAcquiredEvent | LockReleasedEvent | FsTreeChangedEvent | GitSyncFailedEvent | GitSyncRecoveredEvent | BranchSwitchedEvent | AgentToolCallEvent | ChangeRequestOpenedEvent | ChangeRequestMergedEvent | ChangeRequestRejectedEvent | ChangeRequestMergeFailedEvent | ChangeRequestApplyFailedEvent | ApprovalChangedEvent | HeartbeatEvent | ResyncEvent;
|
|
253
288
|
export type WorkflowEvent = WorkflowEventEnvelope & WorkflowEventPayload;
|
|
254
289
|
/** True for events scoped to a workspace — the focus filter applies. */
|
|
255
290
|
export declare function isWorkspaceScoped(e: WorkflowEventPayload): e is WorkflowEventPayload & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/workflow/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,MAAM,WAAW,qBAAqB;IACpC,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAC;CACZ;AAID;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,2EAA2E;AAC3E,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,iBAAiB,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,kBAAk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oBAAoB,GACtB,CAAC,IAAI,oBAAoB,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CASrD;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAC1B,CAAC,EAAE,oBAAoB,GACtB,CAAC,IAAI,oBAAoB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAMnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/workflow/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/workflow/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AA6SH,wEAAwE;AACxE,MAAM,UAAU,iBAAiB,CAC/B,CAAuB;IAEvB,OAAO,CACL,CAAC,CAAC,IAAI,KAAK,cAAc;QACzB,CAAC,CAAC,IAAI,KAAK,eAAe;QAC1B,CAAC,CAAC,IAAI,KAAK,eAAe;QAC1B,CAAC,CAAC,IAAI,KAAK,iBAAiB;QAC5B,CAAC,CAAC,IAAI,KAAK,iBAAiB;QAC5B,CAAC,CAAC,IAAI,KAAK,oBAAoB,CAChC,CAAC;AACJ,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,YAAY,CAC1B,CAAuB;IAEvB,OAAO,CACL,CAAC,CAAC,IAAI,KAAK,iBAAiB;QAC5B,CAAC,CAAC,IAAI,KAAK,iBAAiB;QAC5B,CAAC,CAAC,IAAI,KAAK,6BAA6B,CACzC,CAAC;AACJ,CAAC"}
|