@cat-factory/contracts 0.259.0 → 0.261.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/audit.d.ts CHANGED
@@ -12,7 +12,7 @@ import * as v from 'valibot';
12
12
  * run start/stop/retry, the notification `act` (which performs a real merge), and API-key
13
13
  * mint/revoke.
14
14
  */
15
- export declare const auditActionSchema: v.PicklistSchema<["account.member_added", "account.member_roles_changed", "account.budget_changed", "account.settings_changed", "account.invitation_created", "account.invitation_revoked", "account.invitation_accepted", "workspace.member_added", "workspace.member_role_changed", "workspace.member_removed", "workspace.access_mode_changed"], undefined>;
15
+ export declare const auditActionSchema: v.PicklistSchema<["account.member_added", "account.member_roles_changed", "account.budget_changed", "account.settings_changed", "account.invitation_created", "account.invitation_revoked", "account.invitation_accepted", "account.member_sessions_revoked", "workspace.member_added", "workspace.member_role_changed", "workspace.member_removed", "workspace.access_mode_changed"], undefined>;
16
16
  export type AuditAction = v.InferOutput<typeof auditActionSchema>;
17
17
  /**
18
18
  * WHAT KIND of thing an audited action acted on: the type `targetId` is an id WITHIN.
@@ -97,4 +97,117 @@ export declare function isAuditTargetType(value: string): value is AuditTargetTy
97
97
  export declare function readAuditAction(value: string): AuditAction | RetiredAuditValue;
98
98
  /** A stored `targetType` as either a current member or the retired value it is. */
99
99
  export declare function readAuditTargetType(value: string): AuditTargetType | RetiredAuditValue;
100
+ /** A persisted vocabulary member this build no longer declares, on the wire. */
101
+ export declare const retiredAuditValueSchema: v.ObjectSchema<{
102
+ readonly retired: v.StringSchema<undefined>;
103
+ }, undefined>;
104
+ /**
105
+ * The acting principal, as the three shapes it can take.
106
+ *
107
+ * A union rather than `{ kind, id }`, so the id's MEANING travels with it: `usr_*` resolves
108
+ * against the user roster and `pak_*` against the API-key list, and a viewer handed a bare id
109
+ * would have to guess which. `system` carries no id at all, which is what stops it being confused
110
+ * with a principal whose name merely failed to resolve.
111
+ */
112
+ export declare const auditActorSchema: v.VariantSchema<"kind", [v.ObjectSchema<{
113
+ readonly kind: v.LiteralSchema<"user", undefined>;
114
+ readonly userId: v.StringSchema<undefined>;
115
+ }, undefined>, v.ObjectSchema<{
116
+ readonly kind: v.LiteralSchema<"apiKey", undefined>;
117
+ readonly apiKeyId: v.StringSchema<undefined>;
118
+ }, undefined>, v.ObjectSchema<{
119
+ readonly kind: v.LiteralSchema<"system", undefined>;
120
+ }, undefined>], undefined>;
121
+ /** One audit event as the viewer renders it. */
122
+ export declare const auditEventViewSchema: v.ObjectSchema<{
123
+ readonly id: v.StringSchema<undefined>;
124
+ /** Epoch ms the action committed. */
125
+ readonly at: v.NumberSchema<undefined>;
126
+ /** The board it happened on, when the action was board-scoped. */
127
+ readonly workspaceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
128
+ readonly actor: v.VariantSchema<"kind", [v.ObjectSchema<{
129
+ readonly kind: v.LiteralSchema<"user", undefined>;
130
+ readonly userId: v.StringSchema<undefined>;
131
+ }, undefined>, v.ObjectSchema<{
132
+ readonly kind: v.LiteralSchema<"apiKey", undefined>;
133
+ readonly apiKeyId: v.StringSchema<undefined>;
134
+ }, undefined>, v.ObjectSchema<{
135
+ readonly kind: v.LiteralSchema<"system", undefined>;
136
+ }, undefined>], undefined>;
137
+ /**
138
+ * Unions with the retired shape for the reason stated on {@link RetiredAuditValue}: the row
139
+ * outlives the vocabulary it was written against, and a viewer mapping actions to copy through
140
+ * an exhaustive `Record` would otherwise splice `undefined` into an admin's screen.
141
+ */
142
+ readonly action: v.UnionSchema<[v.PicklistSchema<["account.member_added", "account.member_roles_changed", "account.budget_changed", "account.settings_changed", "account.invitation_created", "account.invitation_revoked", "account.invitation_accepted", "account.member_sessions_revoked", "workspace.member_added", "workspace.member_role_changed", "workspace.member_removed", "workspace.access_mode_changed"], undefined>, v.ObjectSchema<{
143
+ readonly retired: v.StringSchema<undefined>;
144
+ }, undefined>], undefined>;
145
+ readonly targetType: v.UnionSchema<[v.PicklistSchema<["user", "invitation", "workspace", "account"], undefined>, v.ObjectSchema<{
146
+ readonly retired: v.StringSchema<undefined>;
147
+ }, undefined>], undefined>;
148
+ readonly targetId: v.StringSchema<undefined>;
149
+ /** Machine-readable values, interpolated into translated copy. See {@link AUDIT_ACTION_DETAIL_KEYS}. */
150
+ readonly details: v.RecordSchema<v.StringSchema<undefined>, v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>;
151
+ /**
152
+ * Display name for the ACTOR, resolved server-side, or null.
153
+ *
154
+ * Null is a real and expected answer, not a failure: an audit log outlives the people in it, and
155
+ * "the user who did this no longer exists" is exactly the kind of thing it is kept to record. The
156
+ * viewer renders the id in that case rather than an empty space, so a row never reads as though
157
+ * nobody performed it.
158
+ */
159
+ readonly actorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
160
+ /** Display name for the TARGET when it is a user, resolved server-side, or null. As above. */
161
+ readonly targetName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
162
+ }, undefined>;
163
+ export type AuditEventWire = v.InferOutput<typeof auditEventViewSchema>;
164
+ /** One page of an account's audit log, newest first. */
165
+ export declare const auditEventPageSchema: v.ObjectSchema<{
166
+ readonly events: v.ArraySchema<v.ObjectSchema<{
167
+ readonly id: v.StringSchema<undefined>;
168
+ /** Epoch ms the action committed. */
169
+ readonly at: v.NumberSchema<undefined>;
170
+ /** The board it happened on, when the action was board-scoped. */
171
+ readonly workspaceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
172
+ readonly actor: v.VariantSchema<"kind", [v.ObjectSchema<{
173
+ readonly kind: v.LiteralSchema<"user", undefined>;
174
+ readonly userId: v.StringSchema<undefined>;
175
+ }, undefined>, v.ObjectSchema<{
176
+ readonly kind: v.LiteralSchema<"apiKey", undefined>;
177
+ readonly apiKeyId: v.StringSchema<undefined>;
178
+ }, undefined>, v.ObjectSchema<{
179
+ readonly kind: v.LiteralSchema<"system", undefined>;
180
+ }, undefined>], undefined>;
181
+ /**
182
+ * Unions with the retired shape for the reason stated on {@link RetiredAuditValue}: the row
183
+ * outlives the vocabulary it was written against, and a viewer mapping actions to copy through
184
+ * an exhaustive `Record` would otherwise splice `undefined` into an admin's screen.
185
+ */
186
+ readonly action: v.UnionSchema<[v.PicklistSchema<["account.member_added", "account.member_roles_changed", "account.budget_changed", "account.settings_changed", "account.invitation_created", "account.invitation_revoked", "account.invitation_accepted", "account.member_sessions_revoked", "workspace.member_added", "workspace.member_role_changed", "workspace.member_removed", "workspace.access_mode_changed"], undefined>, v.ObjectSchema<{
187
+ readonly retired: v.StringSchema<undefined>;
188
+ }, undefined>], undefined>;
189
+ readonly targetType: v.UnionSchema<[v.PicklistSchema<["user", "invitation", "workspace", "account"], undefined>, v.ObjectSchema<{
190
+ readonly retired: v.StringSchema<undefined>;
191
+ }, undefined>], undefined>;
192
+ readonly targetId: v.StringSchema<undefined>;
193
+ /** Machine-readable values, interpolated into translated copy. See {@link AUDIT_ACTION_DETAIL_KEYS}. */
194
+ readonly details: v.RecordSchema<v.StringSchema<undefined>, v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.BooleanSchema<undefined>], undefined>, undefined>, undefined>;
195
+ /**
196
+ * Display name for the ACTOR, resolved server-side, or null.
197
+ *
198
+ * Null is a real and expected answer, not a failure: an audit log outlives the people in it, and
199
+ * "the user who did this no longer exists" is exactly the kind of thing it is kept to record. The
200
+ * viewer renders the id in that case rather than an empty space, so a row never reads as though
201
+ * nobody performed it.
202
+ */
203
+ readonly actorName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
204
+ /** Display name for the TARGET when it is a user, resolved server-side, or null. As above. */
205
+ readonly targetName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
206
+ }, undefined>, undefined>;
207
+ /**
208
+ * Opaque cursor for the next (older) page, or null at the end. Keyset, never an offset: the
209
+ * log grows while it is being read, and an offset would re-serve or skip rows at every boundary.
210
+ */
211
+ readonly nextCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
212
+ }, undefined>;
100
213
  //# sourceMappingURL=audit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AA4B5B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,gWAuB5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,6EAShC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,2DAO/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAY3E,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;AAE/D,mGAAmG;AACnG,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAA;AAE1E;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAClD,KAAK,EAAE,CAAC,GAAG,iBAAiB,GAC3B,KAAK,IAAI,iBAAiB,CAE5B;AAKD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EA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W,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAClD,KAAK,EAAE,CAAC,GAAG,iBAAiB,GAC3B,KAAK,IAAI,iBAAiB,CAE5B;AAKD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAEjE;AAED,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,eAAe,CAEzE;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,iBAAiB,CAE9E;AAED,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,iBAAiB,CAEtF;AAOD,gFAAgF;AAChF,eAAO,MAAM,uBAAuB;;aAAoC,CAAA;AAExE;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;0BAI3B,CAAA;AAEF,gDAAgD;AAChD,eAAO,MAAM,oBAAoB;;IAE/B,qCAAqC;;IAErC,kEAAkE;;;;;;;;;;;IAGlE;;;;OAIG;;;;;;;;IAIH,wGAAwG;;IAExG;;;;;;;OAOG;;IAEH,8FAA8F;;aAE9F,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,wDAAwD;AACxD,eAAO,MAAM,oBAAoB;;;QA9B/B,qCAAqC;;QAErC,kEAAkE;;;;;;;;;;;QAGlE;;;;WAIG;;;;;;;;QAIH,wGAAwG;;QAExG;;;;;;;WAOG;;QAEH,8FAA8F;;;IAQ9F;;;OAGG;;aAEH,CAAA"}
package/dist/audit.js CHANGED
@@ -52,6 +52,13 @@ export const auditActionSchema = v.picklist([
52
52
  'account.invitation_revoked',
53
53
  /** An invitation was accepted, creating the membership it granted. */
54
54
  'account.invitation_accepted',
55
+ /**
56
+ * An admin ended every session a member currently held (offboarding, a lost device). Distinct
57
+ * from a role change: this withdraws AUTHENTICATION, not permissions, and the member keeps their
58
+ * roles. Self-serve "sign out everywhere" is deliberately NOT recorded as this action — nobody's
59
+ * admin performed it, and there is no account it belongs to.
60
+ */
61
+ 'account.member_sessions_revoked',
55
62
  /** A member was added to one workspace (board-level roster, not the account roster). */
56
63
  'workspace.member_added',
57
64
  /** A workspace member's role was changed. */
@@ -123,6 +130,11 @@ export const AUDIT_ACTION_DETAIL_KEYS = {
123
130
  'account.invitation_created': ['email', 'roles'],
124
131
  'account.invitation_revoked': ['email'],
125
132
  'account.invitation_accepted': ['email', 'roles', 'invitedBy'],
133
+ // No values: WHO revoked WHOSE sessions and WHEN is the whole fact, and all three are columns
134
+ // already. The new generation is deliberately not recorded — it is an internal counter, and a
135
+ // reader comparing two of them would be inferring how many revocations went unlogged rather
136
+ // than reading the rows that state them.
137
+ 'account.member_sessions_revoked': [],
126
138
  'workspace.member_added': ['role'],
127
139
  'workspace.member_role_changed': ['previousRole', 'role'],
128
140
  'workspace.member_removed': ['role'],
@@ -153,4 +165,62 @@ export function readAuditAction(value) {
153
165
  export function readAuditTargetType(value) {
154
166
  return isAuditTargetType(value) ? value : { retired: value };
155
167
  }
168
+ // ---------------------------------------------------------------------------
169
+ // The WIRE shapes the viewer reads. Separate from the vocabulary above because a read must cope
170
+ // with values a write cannot produce: a member retired since the row was written.
171
+ // ---------------------------------------------------------------------------
172
+ /** A persisted vocabulary member this build no longer declares, on the wire. */
173
+ export const retiredAuditValueSchema = v.object({ retired: v.string() });
174
+ /**
175
+ * The acting principal, as the three shapes it can take.
176
+ *
177
+ * A union rather than `{ kind, id }`, so the id's MEANING travels with it: `usr_*` resolves
178
+ * against the user roster and `pak_*` against the API-key list, and a viewer handed a bare id
179
+ * would have to guess which. `system` carries no id at all, which is what stops it being confused
180
+ * with a principal whose name merely failed to resolve.
181
+ */
182
+ export const auditActorSchema = v.variant('kind', [
183
+ v.object({ kind: v.literal('user'), userId: v.string() }),
184
+ v.object({ kind: v.literal('apiKey'), apiKeyId: v.string() }),
185
+ v.object({ kind: v.literal('system') }),
186
+ ]);
187
+ /** One audit event as the viewer renders it. */
188
+ export const auditEventViewSchema = v.object({
189
+ id: v.string(),
190
+ /** Epoch ms the action committed. */
191
+ at: v.number(),
192
+ /** The board it happened on, when the action was board-scoped. */
193
+ workspaceId: v.nullable(v.string()),
194
+ actor: auditActorSchema,
195
+ /**
196
+ * Unions with the retired shape for the reason stated on {@link RetiredAuditValue}: the row
197
+ * outlives the vocabulary it was written against, and a viewer mapping actions to copy through
198
+ * an exhaustive `Record` would otherwise splice `undefined` into an admin's screen.
199
+ */
200
+ action: v.union([auditActionSchema, retiredAuditValueSchema]),
201
+ targetType: v.union([auditTargetTypeSchema, retiredAuditValueSchema]),
202
+ targetId: v.string(),
203
+ /** Machine-readable values, interpolated into translated copy. See {@link AUDIT_ACTION_DETAIL_KEYS}. */
204
+ details: v.record(v.string(), v.nullable(v.union([v.string(), v.number(), v.boolean()]))),
205
+ /**
206
+ * Display name for the ACTOR, resolved server-side, or null.
207
+ *
208
+ * Null is a real and expected answer, not a failure: an audit log outlives the people in it, and
209
+ * "the user who did this no longer exists" is exactly the kind of thing it is kept to record. The
210
+ * viewer renders the id in that case rather than an empty space, so a row never reads as though
211
+ * nobody performed it.
212
+ */
213
+ actorName: v.nullable(v.string()),
214
+ /** Display name for the TARGET when it is a user, resolved server-side, or null. As above. */
215
+ targetName: v.nullable(v.string()),
216
+ });
217
+ /** One page of an account's audit log, newest first. */
218
+ export const auditEventPageSchema = v.object({
219
+ events: v.array(auditEventViewSchema),
220
+ /**
221
+ * Opaque cursor for the next (older) page, or null at the end. Keyset, never an offset: the
222
+ * log grows while it is being read, and an offset would re-serve or skip rows at every boundary.
223
+ */
224
+ nextCursor: v.nullable(v.string()),
225
+ });
156
226
  //# sourceMappingURL=audit.js.map
package/dist/audit.js.map CHANGED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B,CAAC;IACrC;;;OAGG;IACH,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC,CAAA"}
@@ -74,6 +74,72 @@ export declare function isHostPinnedSource(source: DocumentSourceKind): boolean;
74
74
  export declare function orderSourcesByClaimConfidence<T extends {
75
75
  kind: DocumentSourceKind;
76
76
  }>(sources: readonly T[]): T[];
77
+ /**
78
+ * Why the platform could not confirm a source-backed document against its source. Each member
79
+ * needs a DIFFERENT fix, which is the whole reason they are not one value:
80
+ *
81
+ * - `not_connected`: the workspace's connection to the source is gone (revoked/disconnected), so
82
+ * reconnecting it is the remedy.
83
+ * - `credentials_unreadable`: the connection could not be READ at all, so the platform never got
84
+ * as far as asking the source. Distinct from `not_connected` (a definite "there is no
85
+ * connection") because the remedy is the deployment's, not the workspace's, and distinct from
86
+ * `source_unreachable` because the source is not the thing that failed. What makes it
87
+ * load-bearing rather than defensive is MOTHERSHIP MODE, where a document-source connection is
88
+ * sealed with the mothership's key and therefore cannot be served to a node at all: the read
89
+ * fails permanently and by design there, and reporting it as an outage would send an operator
90
+ * hunting a Figma incident that does not exist.
91
+ * - `unversioned`: the source answered but exposes no version token to compare, so there is
92
+ * nothing to fix. Saying so beats implying the copy was checked.
93
+ * - `source_unreachable`: the probe or the re-fetch failed (a 403, a rate limit, an outage). The
94
+ * stored body is still served; the operator's log line carries the cause.
95
+ *
96
+ * It lives HERE rather than in kernel because both sides have to agree about it: the engine
97
+ * renders the agent-facing warning from it, and the SPA states the same verdict to a human in
98
+ * their own language off an exhaustive `Record` keyed by these members (the backend does not
99
+ * localize prose).
100
+ */
101
+ export declare const documentFreshnessGapSchema: v.PicklistSchema<["not_connected", "credentials_unreadable", "unversioned", "source_unreachable"], undefined>;
102
+ export type DocumentFreshnessGap = v.InferOutput<typeof documentFreshnessGapSchema>;
103
+ /**
104
+ * What a confirmed check found had changed in the board's copy. None of the three is a degradation
105
+ * (all leave the reader on the live revision), but they answer "did my edit land" differently and
106
+ * the middle one is the reason this is not a boolean:
107
+ *
108
+ * - `unchanged`: the source is still at the revision the stored copy was taken from. Nothing was
109
+ * fetched and nothing was written.
110
+ * - `reimported`: the source had moved on, and the copy an agent reads was rewritten from it.
111
+ * - `revision_only`: the source's revision token moved, but nothing an agent reads differs. This is
112
+ * the NORMAL case for a whole-file source with a per-file version: a Figma file's version bumps on
113
+ * any edit anywhere in it, including frames a given document does not cover. Folding it into
114
+ * `reimported` would tell a person their design was pulled in when their own edit may not have
115
+ * been touched at all, and it is exactly the false confidence this vocabulary exists to remove.
116
+ *
117
+ * A closed picklist rather than a boolean for the same reason `DocumentFreshnessGap` is: the SPA
118
+ * keys translated copy off these members, and adding one has to fail a build rather than render an
119
+ * empty line.
120
+ */
121
+ export declare const documentFreshnessChangeSchema: v.PicklistSchema<["unchanged", "reimported", "revision_only"], undefined>;
122
+ export type DocumentFreshnessChange = v.InferOutput<typeof documentFreshnessChangeSchema>;
123
+ /**
124
+ * What a refresh attempt concluded about one linked document.
125
+ *
126
+ * A source-backed document is a PROJECTION of a page someone else keeps editing, so "is the copy
127
+ * we are about to read the current one" is a question with THREE answers, not two. "No source to
128
+ * confirm against" and "tried and failed" are different facts: an `upload` has nothing to be stale
129
+ * relative to, while a Figma file the API refused may well be behind the live design. Only the
130
+ * second is a warning, and only a `confirmed` verdict can name a revision.
131
+ */
132
+ export declare const documentFreshnessSchema: v.VariantSchema<"status", [v.ObjectSchema<{
133
+ readonly status: v.LiteralSchema<"confirmed", undefined>;
134
+ readonly version: v.StringSchema<undefined>;
135
+ readonly change: v.PicklistSchema<["unchanged", "reimported", "revision_only"], undefined>;
136
+ }, undefined>, v.ObjectSchema<{
137
+ readonly status: v.LiteralSchema<"not-applicable", undefined>;
138
+ }, undefined>, v.ObjectSchema<{
139
+ readonly status: v.LiteralSchema<"unconfirmed", undefined>;
140
+ readonly reason: v.PicklistSchema<["not_connected", "credentials_unreadable", "unversioned", "source_unreachable"], undefined>;
141
+ }, undefined>], undefined>;
142
+ export type DocumentFreshness = v.InferOutput<typeof documentFreshnessSchema>;
77
143
  /**
78
144
  * The role a workspace+`DocKind`-scoped document link plays for the forward document-authoring
79
145
  * track (WS1 items 2–4). A `template` link's parsed sections REPLACE the built-in skeleton for
@@ -315,6 +381,68 @@ export type ResolvedDocumentRef = v.InferOutput<typeof resolvedDocumentRefSchema
315
381
  */
316
382
  export declare const documentRefReasonSchema: v.PicklistSchema<["document_ref_unrecognized", "document_ref_claimed_by_other_source"], undefined>;
317
383
  export type DocumentRefReason = v.InferOutput<typeof documentRefReasonSchema>;
384
+ /**
385
+ * Re-confirm ONE stored document against its source right now: probe, and re-import if the page
386
+ * moved. The same ladder every dispatch runs, asked for by a person instead of by a run.
387
+ *
388
+ * `source` is the NARROW union, so an `upload` is refused at the boundary rather than answered
389
+ * with a `not-applicable` verdict. There is no provider to ask about a body the platform was
390
+ * handed directly, and a 200 saying so would leave the caller unable to tell "this document has no
391
+ * source" from "the check ran and found nothing to compare", which is exactly the distinction the
392
+ * freshness vocabulary exists to keep.
393
+ */
394
+ export declare const refreshDocumentSchema: v.ObjectSchema<{
395
+ readonly source: v.PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear"], undefined>;
396
+ readonly externalId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
397
+ }, undefined>;
398
+ export type RefreshDocumentInput = v.InferOutput<typeof refreshDocumentSchema>;
399
+ /**
400
+ * The refreshed projection plus what the check concluded about it.
401
+ *
402
+ * Both halves, because neither answers on its own: the document carries the (possibly rewritten)
403
+ * title/excerpt/`syncedAt` a caller has to re-render, and the verdict is the only thing that says
404
+ * whether the copy was CONFIRMED current. An unchanged document with an `unconfirmed` verdict and
405
+ * one with a `confirmed` one are byte-for-byte identical rows and opposite facts.
406
+ */
407
+ export declare const refreshedDocumentViewSchema: v.ObjectSchema<{
408
+ readonly document: v.ObjectSchema<{
409
+ readonly source: v.PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
410
+ /** The source's stable id for the page (Confluence page id, Notion page id). */
411
+ readonly externalId: v.StringSchema<undefined>;
412
+ readonly title: v.StringSchema<undefined>;
413
+ /**
414
+ * Canonical URL of the page on the source, or EMPTY for an `upload`, which has no page to
415
+ * link back to. Readers render the origin only when there is one: an empty parenthetical or a
416
+ * bare `Source:` line reads as a broken link rather than as a document that never had one.
417
+ */
418
+ readonly url: v.StringSchema<undefined>;
419
+ /** A short plain-text excerpt of the body (full body stays in storage). */
420
+ readonly excerpt: v.StringSchema<undefined>;
421
+ /** The board block this document is attached to as context, if any. */
422
+ readonly linkedBlockId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
423
+ /**
424
+ * The workspace+`DocKind` link role this document plays, if any — `template` (its parsed
425
+ * sections override the kind's built-in skeleton) or `exemplar` (a good example to emulate).
426
+ * Null for a plain imported/block-linked document. Paired with {@link docKind}.
427
+ */
428
+ readonly role: v.NullableSchema<v.PicklistSchema<["template", "exemplar"], undefined>, undefined>;
429
+ /** The document kind a `role`-tagged link is scoped to (null when the document carries no role). */
430
+ readonly docKind: v.NullableSchema<v.PicklistSchema<readonly ["prd", "rfc", "adr", "design", "technical", "api", "runbook", "research", "reference", "other"], undefined>, undefined>;
431
+ /** When this projection row was last refreshed (epoch ms). */
432
+ readonly syncedAt: v.NumberSchema<undefined>;
433
+ }, undefined>;
434
+ readonly freshness: v.VariantSchema<"status", [v.ObjectSchema<{
435
+ readonly status: v.LiteralSchema<"confirmed", undefined>;
436
+ readonly version: v.StringSchema<undefined>;
437
+ readonly change: v.PicklistSchema<["unchanged", "reimported", "revision_only"], undefined>;
438
+ }, undefined>, v.ObjectSchema<{
439
+ readonly status: v.LiteralSchema<"not-applicable", undefined>;
440
+ }, undefined>, v.ObjectSchema<{
441
+ readonly status: v.LiteralSchema<"unconfirmed", undefined>;
442
+ readonly reason: v.PicklistSchema<["not_connected", "credentials_unreadable", "unversioned", "source_unreachable"], undefined>;
443
+ }, undefined>], undefined>;
444
+ }, undefined>;
445
+ export type RefreshedDocumentView = v.InferOutput<typeof refreshedDocumentViewSchema>;
318
446
  /** Search a source's catalogue by free text (title/content). */
319
447
  export declare const searchDocumentsSchema: v.ObjectSchema<{
320
448
  readonly query: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
@@ -1 +1 @@
1
- {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../src/documents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAiB5B;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,8FAOnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,wGAK/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,+FAA+F;AAC/F,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,IAAI,kBAAkB,CAExF;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;CAC7B;AAeD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAE9D;AAED,iGAAiG;AACjG,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAEtE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,kBAAkB,CAAA;CAAE,EAClF,OAAO,EAAE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KG;AACH,eAAO,MAAM,yBAAyB;;;;;aAKpC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEtF,kHAAkH;AAClH,eAAO,MAAM,2BAA2B;;;aAGtC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
package/dist/documents.js CHANGED
@@ -96,6 +96,88 @@ export function orderSourcesByClaimConfidence(sources) {
96
96
  ...sources.filter((s) => !isHostPinnedSource(s.kind)),
97
97
  ];
98
98
  }
99
+ // ---- Freshness: how current a stored projection is ------------------------
100
+ /**
101
+ * Why the platform could not confirm a source-backed document against its source. Each member
102
+ * needs a DIFFERENT fix, which is the whole reason they are not one value:
103
+ *
104
+ * - `not_connected`: the workspace's connection to the source is gone (revoked/disconnected), so
105
+ * reconnecting it is the remedy.
106
+ * - `credentials_unreadable`: the connection could not be READ at all, so the platform never got
107
+ * as far as asking the source. Distinct from `not_connected` (a definite "there is no
108
+ * connection") because the remedy is the deployment's, not the workspace's, and distinct from
109
+ * `source_unreachable` because the source is not the thing that failed. What makes it
110
+ * load-bearing rather than defensive is MOTHERSHIP MODE, where a document-source connection is
111
+ * sealed with the mothership's key and therefore cannot be served to a node at all: the read
112
+ * fails permanently and by design there, and reporting it as an outage would send an operator
113
+ * hunting a Figma incident that does not exist.
114
+ * - `unversioned`: the source answered but exposes no version token to compare, so there is
115
+ * nothing to fix. Saying so beats implying the copy was checked.
116
+ * - `source_unreachable`: the probe or the re-fetch failed (a 403, a rate limit, an outage). The
117
+ * stored body is still served; the operator's log line carries the cause.
118
+ *
119
+ * It lives HERE rather than in kernel because both sides have to agree about it: the engine
120
+ * renders the agent-facing warning from it, and the SPA states the same verdict to a human in
121
+ * their own language off an exhaustive `Record` keyed by these members (the backend does not
122
+ * localize prose).
123
+ */
124
+ export const documentFreshnessGapSchema = v.picklist([
125
+ 'not_connected',
126
+ 'credentials_unreadable',
127
+ 'unversioned',
128
+ 'source_unreachable',
129
+ ]);
130
+ /**
131
+ * What a confirmed check found had changed in the board's copy. None of the three is a degradation
132
+ * (all leave the reader on the live revision), but they answer "did my edit land" differently and
133
+ * the middle one is the reason this is not a boolean:
134
+ *
135
+ * - `unchanged`: the source is still at the revision the stored copy was taken from. Nothing was
136
+ * fetched and nothing was written.
137
+ * - `reimported`: the source had moved on, and the copy an agent reads was rewritten from it.
138
+ * - `revision_only`: the source's revision token moved, but nothing an agent reads differs. This is
139
+ * the NORMAL case for a whole-file source with a per-file version: a Figma file's version bumps on
140
+ * any edit anywhere in it, including frames a given document does not cover. Folding it into
141
+ * `reimported` would tell a person their design was pulled in when their own edit may not have
142
+ * been touched at all, and it is exactly the false confidence this vocabulary exists to remove.
143
+ *
144
+ * A closed picklist rather than a boolean for the same reason `DocumentFreshnessGap` is: the SPA
145
+ * keys translated copy off these members, and adding one has to fail a build rather than render an
146
+ * empty line.
147
+ */
148
+ export const documentFreshnessChangeSchema = v.picklist([
149
+ 'unchanged',
150
+ 'reimported',
151
+ 'revision_only',
152
+ ]);
153
+ /**
154
+ * What a refresh attempt concluded about one linked document.
155
+ *
156
+ * A source-backed document is a PROJECTION of a page someone else keeps editing, so "is the copy
157
+ * we are about to read the current one" is a question with THREE answers, not two. "No source to
158
+ * confirm against" and "tried and failed" are different facts: an `upload` has nothing to be stale
159
+ * relative to, while a Figma file the API refused may well be behind the live design. Only the
160
+ * second is a warning, and only a `confirmed` verdict can name a revision.
161
+ */
162
+ export const documentFreshnessSchema = v.variant('status', [
163
+ /**
164
+ * Checked against the source, which is now known to be the revision named here. What the check
165
+ * had to DO to get there is {@link DocumentFreshnessChange}.
166
+ */
167
+ v.object({
168
+ status: v.literal('confirmed'),
169
+ version: v.string(),
170
+ change: documentFreshnessChangeSchema,
171
+ }),
172
+ /**
173
+ * Nothing to confirm against: an `upload` body the platform was handed directly, or a source
174
+ * this deployment has no provider wired for. Not a gap and not a warning, because no fresher
175
+ * copy exists.
176
+ */
177
+ v.object({ status: v.literal('not-applicable') }),
178
+ /** The platform tried and could not confirm. The stored body stands; see the reason. */
179
+ v.object({ status: v.literal('unconfirmed'), reason: documentFreshnessGapSchema }),
180
+ ]);
99
181
  /**
100
182
  * The role a workspace+`DocKind`-scoped document link plays for the forward document-authoring
101
183
  * track (WS1 items 2–4). A `template` link's parsed sections REPLACE the built-in skeleton for
@@ -292,6 +374,33 @@ export const documentRefReasonSchema = v.picklist([
292
374
  'document_ref_unrecognized',
293
375
  'document_ref_claimed_by_other_source',
294
376
  ]);
377
+ // ---- Manual refresh (the human dual of the dispatch-time one) --------------
378
+ /**
379
+ * Re-confirm ONE stored document against its source right now: probe, and re-import if the page
380
+ * moved. The same ladder every dispatch runs, asked for by a person instead of by a run.
381
+ *
382
+ * `source` is the NARROW union, so an `upload` is refused at the boundary rather than answered
383
+ * with a `not-applicable` verdict. There is no provider to ask about a body the platform was
384
+ * handed directly, and a 200 saying so would leave the caller unable to tell "this document has no
385
+ * source" from "the check ran and found nothing to compare", which is exactly the distinction the
386
+ * freshness vocabulary exists to keep.
387
+ */
388
+ export const refreshDocumentSchema = v.object({
389
+ source: documentSourceKindSchema,
390
+ externalId: v.pipe(v.string(), v.trim(), v.minLength(1)),
391
+ });
392
+ /**
393
+ * The refreshed projection plus what the check concluded about it.
394
+ *
395
+ * Both halves, because neither answers on its own: the document carries the (possibly rewritten)
396
+ * title/excerpt/`syncedAt` a caller has to re-render, and the verdict is the only thing that says
397
+ * whether the copy was CONFIRMED current. An unchanged document with an `unconfirmed` verdict and
398
+ * one with a `confirmed` one are byte-for-byte identical rows and opposite facts.
399
+ */
400
+ export const refreshedDocumentViewSchema = v.object({
401
+ document: sourceDocumentSchema,
402
+ freshness: documentFreshnessSchema,
403
+ });
295
404
  /** Search a source's catalogue by free text (title/content). */
296
405
  export const searchDocumentsSchema = v.object({
297
406
  query: v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(200)),
@@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/dist/merge.d.ts CHANGED
@@ -2818,6 +2818,13 @@ export declare const mergeDecisionSchema: v.ObjectSchema<{
2818
2818
  * - `within_thresholds`: auto-merged; every axis at/below the preset ceiling.
2819
2819
  * - `exceeded_thresholds`: review; one or more axes over the ceiling (`exceededAxes`).
2820
2820
  * - `auto_merge_disabled`: review; the preset routes every PR to a human.
2821
+ * - `no_policy_configured`: review; NO preset resolved at all (no preset library is wired),
2822
+ * so the run fell back to the built-in `FALLBACK_RISK_POLICY`, which auto-merges nothing. A
2823
+ * board's library is written when it is created, so this is a deployment-level fact rather
2824
+ * than a board nobody had opened yet. Kept apart from `auto_merge_disabled`
2825
+ * because the remedies have nothing in common: that one names a preset somebody chose and is
2826
+ * fixed by editing it, while this one says the deployment has stated no merge policy, and a
2827
+ * reader sent looking for the preset that held their PR back would not find one.
2821
2828
  * - `no_rationale`: review; the merger returned scores but no rationale, so the verdict
2822
2829
  * can't be trusted to auto-merge (the assessment IS present, just not credible).
2823
2830
  * - `no_assessment`: review; the merger produced no parseable assessment at all.
@@ -2847,7 +2854,7 @@ export declare const mergeDecisionSchema: v.ObjectSchema<{
2847
2854
  * a preset that would otherwise auto-merge must not report a dry run's PR as "held back by
2848
2855
  * the scores", which would send someone editing thresholds that were never consulted.
2849
2856
  */
2850
- readonly reason: v.PicklistSchema<["within_thresholds", "exceeded_thresholds", "auto_merge_disabled", "no_rationale", "no_assessment", "merge_failed", "merge_partial", "class_auto_merge", "class_requires_review", "role_requires_review", "submission_not_allowed", "dry_run"], undefined>;
2857
+ readonly reason: v.PicklistSchema<["within_thresholds", "exceeded_thresholds", "auto_merge_disabled", "no_policy_configured", "no_rationale", "no_assessment", "merge_failed", "merge_partial", "class_auto_merge", "class_requires_review", "role_requires_review", "submission_not_allowed", "dry_run"], undefined>;
2851
2858
  /** The merger's assessment (absent only when it produced no parseable one). */
2852
2859
  readonly assessment: v.OptionalSchema<v.ObjectSchema<{
2853
2860
  /** How intricate the change is (size, coupling, subtlety). */