@openplanr/protocol 0.6.1 → 0.6.2

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.
Files changed (55) hide show
  1. package/lib/dashboard/closed-json-contract.mjs +99 -109
  2. package/lib/dashboard/operate-experience-audit-display-contract.d.mts +128 -153
  3. package/lib/dashboard/operate-experience-audit-display-contract.mjs +530 -585
  4. package/lib/dashboard/operate-experience-display-contract.d.mts +415 -437
  5. package/lib/dashboard/operate-experience-display-contract.mjs +768 -831
  6. package/lib/dashboard/operate-experience-surface-contract.d.mts +143 -148
  7. package/lib/dashboard/operate-experience-surface-contract.mjs +72 -73
  8. package/lib/dashboard/operate-review-contract.d.mts +7 -14
  9. package/lib/dashboard/operate-review-contract.mjs +46 -42
  10. package/lib/dashboard/operate-review-display-workspace-contract.d.mts +2 -5
  11. package/lib/dashboard/operate-review-display-workspace-contract.mjs +158 -104
  12. package/lib/dashboard/operate-review-payload-safety.mjs +4 -2
  13. package/lib/dashboard/operate-review-workspace-projection-v2.d.mts +47 -33
  14. package/lib/protocol/index.d.ts +2647 -543
  15. package/package.json +1 -1
  16. package/registries/commands.json +3 -3
  17. package/registries/skills.json +5 -5
  18. package/src/browser-contracts.d.mts +4 -1
  19. package/src/browser-contracts.mjs +16 -5
  20. package/src/canonical-json.d.mts +3 -1
  21. package/src/canonical-json.mjs +57 -20
  22. package/src/compat/live-evidence-v2.mjs +1604 -485
  23. package/src/compat/operate-experience-live-patch.mjs +67 -15
  24. package/src/compat/operating-planning-contracts.mjs +183 -51
  25. package/src/contracts.d.mts +54 -13
  26. package/src/contracts.mjs +625 -335
  27. package/src/design-contracts.mjs +58 -21
  28. package/src/design-handoff-contracts.d.mts +67 -11
  29. package/src/design-handoff-contracts.mjs +243 -98
  30. package/src/design-publication-contracts.mjs +98 -33
  31. package/src/diagram-authoring-contracts.d.mts +422 -78
  32. package/src/diagram-authoring-contracts.mjs +1697 -326
  33. package/src/diagram-contracts.d.mts +4 -1
  34. package/src/diagram-contracts.mjs +16 -4
  35. package/src/enterprise-contracts.d.mts +211 -46
  36. package/src/enterprise-contracts.mjs +727 -175
  37. package/src/errors.mjs +4 -0
  38. package/src/generated/canonical-registries.mjs +8 -8
  39. package/src/index.d.mts +8 -8
  40. package/src/index.mjs +36 -20
  41. package/src/json-schema.d.mts +21 -6
  42. package/src/json-schema.mjs +66 -18
  43. package/src/planning-contracts.d.mts +8 -2
  44. package/src/planning-contracts.mjs +33 -7
  45. package/src/registries.d.mts +11 -3
  46. package/src/registries.mjs +369 -87
  47. package/src/review-experience-contracts.d.mts +7 -2
  48. package/src/review-experience-contracts.mjs +198 -49
  49. package/src/semver.mjs +5 -1
  50. package/src/skill-source-contracts.d.mts +36 -16
  51. package/src/skill-source-contracts.mjs +25 -6
  52. package/src/task-contracts.d.mts +13 -3
  53. package/src/task-contracts.mjs +181 -40
  54. package/src/workspace-contracts.d.mts +38 -10
  55. package/src/workspace-contracts.mjs +147 -33
@@ -15,5 +15,8 @@ export declare const DIAGRAM_GRAMMAR_REGISTRY: Readonly<{
15
15
  }>;
16
16
  export declare const DIAGRAM_SEMANTIC_PATTERN_REGISTRY: Readonly<Record<string, unknown>>;
17
17
  export declare function getDiagramGrammar(grammarId: string): DiagramGrammarRegistryEntry | null;
18
- export declare function diagramContractUrl(kind: string, options?: { protocolVersion?: '1.6.0' | '1.13.0' }): URL;
18
+ export declare function diagramContractUrl(
19
+ kind: string,
20
+ options?: { protocolVersion?: '1.6.0' | '1.13.0' },
21
+ ): URL;
19
22
  export declare function diagramDocumentPath(slug: string): string;
@@ -1,27 +1,39 @@
1
- import { DIAGRAM_V16_CONTRACT_FILES } from './skill-source-contracts.mjs';
1
+ // @ts-check
2
2
  import { DIAGRAM_AUTHORING_CONTRACT_FILES } from './diagram-authoring-contracts.mjs';
3
3
  import { DIAGRAM_REGISTRIES } from './generated/diagram-registries.mjs';
4
+ import { DIAGRAM_V16_CONTRACT_FILES } from './skill-source-contracts.mjs';
4
5
 
6
+ /** @type {typeof import('./diagram-contracts.d.mts').DIAGRAM_CONTRACT_FILES} */
5
7
  export const DIAGRAM_CONTRACT_FILES = DIAGRAM_V16_CONTRACT_FILES;
8
+ /** @type {typeof import('./diagram-contracts.d.mts').DIAGRAM_GRAMMAR_REGISTRY} */
6
9
  export const DIAGRAM_GRAMMAR_REGISTRY = DIAGRAM_REGISTRIES['diagram-grammars.json'];
7
- export const DIAGRAM_SEMANTIC_PATTERN_REGISTRY = DIAGRAM_REGISTRIES['diagram-semantic-patterns.json'];
10
+ /** @type {typeof import('./diagram-contracts.d.mts').DIAGRAM_SEMANTIC_PATTERN_REGISTRY} */
11
+ export const DIAGRAM_SEMANTIC_PATTERN_REGISTRY =
12
+ DIAGRAM_REGISTRIES['diagram-semantic-patterns.json'];
8
13
 
9
14
  const grammarIndex = new Map(
10
15
  DIAGRAM_GRAMMAR_REGISTRY.grammars.map((grammar) => [grammar.grammarId, grammar]),
11
16
  );
12
17
 
18
+ /** @type {typeof import('./diagram-contracts.d.mts').getDiagramGrammar} */
13
19
  export function getDiagramGrammar(grammarId) {
14
20
  return grammarIndex.get(grammarId) ?? null;
15
21
  }
16
22
 
23
+ /** @type {typeof import('./diagram-contracts.d.mts').diagramContractUrl} */
17
24
  export function diagramContractUrl(kind, { protocolVersion = '1.6.0' } = {}) {
18
- const files = protocolVersion === '1.6.0' ? DIAGRAM_CONTRACT_FILES
19
- : protocolVersion === '1.13.0' ? DIAGRAM_AUTHORING_CONTRACT_FILES : null;
25
+ const files =
26
+ protocolVersion === '1.6.0'
27
+ ? DIAGRAM_CONTRACT_FILES
28
+ : protocolVersion === '1.13.0'
29
+ ? DIAGRAM_AUTHORING_CONTRACT_FILES
30
+ : null;
20
31
  const filename = files && Object.hasOwn(files, kind) ? files[kind] : null;
21
32
  if (!filename) throw new RangeError(`Unknown diagram contract: ${kind}@${protocolVersion}`);
22
33
  return new URL(`../schemas/v${protocolVersion}/${filename}`, import.meta.url);
23
34
  }
24
35
 
36
+ /** @type {typeof import('./diagram-contracts.d.mts').diagramDocumentPath} */
25
37
  export function diagramDocumentPath(slug) {
26
38
  const value = String(slug);
27
39
  if (!/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u.test(value)) {
@@ -2,73 +2,191 @@ export type EnterpriseId = string;
2
2
  export type EnterpriseTimestamp = string;
3
3
  export type EnterpriseDigest = string;
4
4
  export type EnterpriseSchema = Readonly<Record<string, unknown>>;
5
- export type EnterpriseAction = 'organization.manage' | 'ownership.transfer' | 'billing.manage' | 'audit.read' | 'project.create' | 'project.manage' | 'artifact.read' | 'artifact.author' | 'artifact.export' | 'review.write' | 'review.resolve';
5
+ export type EnterpriseAction =
6
+ | 'organization.manage'
7
+ | 'ownership.transfer'
8
+ | 'billing.manage'
9
+ | 'audit.read'
10
+ | 'project.create'
11
+ | 'project.manage'
12
+ | 'artifact.read'
13
+ | 'artifact.author'
14
+ | 'artifact.export'
15
+ | 'review.write'
16
+ | 'review.resolve';
6
17
  export type EnterpriseProjectRole = 'maintainer' | 'author' | 'reviewer' | 'viewer';
7
- export type EnterpriseJson = null | boolean | number | string | EnterpriseJson[] | { [key: string]: EnterpriseJson };
8
- export interface EnterpriseScope { organizationId: EnterpriseId; projectId: EnterpriseId }
18
+ export type EnterpriseJson =
19
+ | null
20
+ | boolean
21
+ | number
22
+ | string
23
+ | EnterpriseJson[]
24
+ | { [key: string]: EnterpriseJson };
25
+ export interface EnterpriseScope {
26
+ organizationId: EnterpriseId;
27
+ projectId: EnterpriseId;
28
+ }
9
29
  export interface EnterpriseAccessContext {
10
30
  actor: { id: EnterpriseId; verified: boolean };
11
31
  organization: { id: EnterpriseId; status: 'active' | 'suspended' };
12
- membership?: { organizationId: EnterpriseId; actorId: EnterpriseId; role: 'owner' | 'admin' | 'member'; status: 'active' | 'revoked' };
13
- projectMembership?: EnterpriseScope & { actorId: EnterpriseId; role: EnterpriseProjectRole; status: 'active' | 'revoked' };
14
- guestGrant?: EnterpriseScope & { artifactId: EnterpriseId; actorId: EnterpriseId; role: 'reviewer' | 'viewer'; status: 'active' | 'revoked'; expiresAt: EnterpriseTimestamp };
32
+ membership?: {
33
+ organizationId: EnterpriseId;
34
+ actorId: EnterpriseId;
35
+ role: 'owner' | 'admin' | 'member';
36
+ status: 'active' | 'revoked';
37
+ };
38
+ projectMembership?: EnterpriseScope & {
39
+ actorId: EnterpriseId;
40
+ role: EnterpriseProjectRole;
41
+ status: 'active' | 'revoked';
42
+ };
43
+ guestGrant?: EnterpriseScope & {
44
+ artifactId: EnterpriseId;
45
+ actorId: EnterpriseId;
46
+ role: 'reviewer' | 'viewer';
47
+ status: 'active' | 'revoked';
48
+ expiresAt: EnterpriseTimestamp;
49
+ };
15
50
  resource: { organizationId: EnterpriseId; projectId?: EnterpriseId; artifactId?: EnterpriseId };
16
51
  action: EnterpriseAction;
17
52
  now: EnterpriseTimestamp;
18
53
  }
19
- export interface EnterpriseAccessDecision { readonly allowed: boolean; readonly code: string }
54
+ export interface EnterpriseAccessDecision {
55
+ readonly allowed: boolean;
56
+ readonly code: string;
57
+ }
20
58
  export interface EnterpriseArtifactRevision extends EnterpriseScope {
21
- kind: 'openplanr-enterprise-artifact-revision'; schemaVersion: '1.0.0';
22
- id: EnterpriseId; artifactId: EnterpriseId; parentRevisionId: EnterpriseId | null;
23
- contentDigest: EnterpriseDigest; contentType: 'application/json' | 'text/markdown' | 'image/svg+xml' | 'text/html';
24
- byteLength: number; createdAt: EnterpriseTimestamp; actorId: EnterpriseId;
59
+ kind: 'openplanr-enterprise-artifact-revision';
60
+ schemaVersion: '1.0.0';
61
+ id: EnterpriseId;
62
+ artifactId: EnterpriseId;
63
+ parentRevisionId: EnterpriseId | null;
64
+ contentDigest: EnterpriseDigest;
65
+ contentType: 'application/json' | 'text/markdown' | 'image/svg+xml' | 'text/html';
66
+ byteLength: number;
67
+ createdAt: EnterpriseTimestamp;
68
+ actorId: EnterpriseId;
25
69
  }
26
70
  export interface EnterpriseReviewAnchor {
27
- revisionId: EnterpriseId; elementId?: EnterpriseId; screenId?: EnterpriseId; frameId?: EnterpriseId; x?: number; y?: number;
71
+ revisionId: EnterpriseId;
72
+ elementId?: EnterpriseId;
73
+ screenId?: EnterpriseId;
74
+ frameId?: EnterpriseId;
75
+ x?: number;
76
+ y?: number;
77
+ }
78
+ export interface EnterpriseReviewReply {
79
+ id: EnterpriseId;
80
+ authorId: EnterpriseId;
81
+ body: string;
82
+ createdAt: EnterpriseTimestamp;
28
83
  }
29
- export interface EnterpriseReviewReply { id: EnterpriseId; authorId: EnterpriseId; body: string; createdAt: EnterpriseTimestamp }
30
84
  export type EnterpriseReviewCategory = 'question' | 'suggestion' | 'change-request' | 'blocker';
31
85
  export interface EnterpriseReviewThread extends EnterpriseScope {
32
- kind: 'openplanr-enterprise-review-thread'; schemaVersion: '1.0.0';
33
- id: EnterpriseId; artifactId: EnterpriseId; anchor: EnterpriseReviewAnchor;
34
- category: EnterpriseReviewCategory; status: 'open' | 'addressed' | 'resolved';
35
- authorId: EnterpriseId; body: string; createdAt: EnterpriseTimestamp; updatedAt: EnterpriseTimestamp;
36
- replies: EnterpriseReviewReply[]; assigneeId?: EnterpriseId | null; addressedRevisionId?: EnterpriseId; resolvedAt?: EnterpriseTimestamp;
86
+ kind: 'openplanr-enterprise-review-thread';
87
+ schemaVersion: '1.0.0';
88
+ id: EnterpriseId;
89
+ artifactId: EnterpriseId;
90
+ anchor: EnterpriseReviewAnchor;
91
+ category: EnterpriseReviewCategory;
92
+ status: 'open' | 'addressed' | 'resolved';
93
+ authorId: EnterpriseId;
94
+ body: string;
95
+ createdAt: EnterpriseTimestamp;
96
+ updatedAt: EnterpriseTimestamp;
97
+ replies: EnterpriseReviewReply[];
98
+ assigneeId?: EnterpriseId | null;
99
+ addressedRevisionId?: EnterpriseId;
100
+ resolvedAt?: EnterpriseTimestamp;
37
101
  }
38
102
  export type EnterpriseElementCollection = 'nodes' | 'relations' | 'groups' | 'events' | 'items';
39
103
  export type EnterpriseChangeOperation =
40
104
  | { op: 'replace-document'; content: { [key: string]: EnterpriseJson } }
41
- | { op: 'set-field'; targetId: EnterpriseId; field: 'label' | 'description' | 'status' | 'title'; value: string }
42
- | { op: 'add-element'; collection: EnterpriseElementCollection; element: { id: EnterpriseId; [key: string]: EnterpriseJson } }
105
+ | {
106
+ op: 'set-field';
107
+ targetId: EnterpriseId;
108
+ field: 'label' | 'description' | 'status' | 'title';
109
+ value: string;
110
+ }
111
+ | {
112
+ op: 'add-element';
113
+ collection: EnterpriseElementCollection;
114
+ element: { id: EnterpriseId; [key: string]: EnterpriseJson };
115
+ }
43
116
  | { op: 'remove-element'; collection: EnterpriseElementCollection; targetId: EnterpriseId }
44
117
  | { op: 'set-layout'; targetId: EnterpriseId; x: number; y: number };
45
118
  export interface EnterpriseChangeProposal extends EnterpriseScope {
46
- kind: 'openplanr-enterprise-change-proposal'; schemaVersion: '1.0.0';
47
- id: EnterpriseId; artifactId: EnterpriseId; baseRevisionId: EnterpriseId; authorId: EnterpriseId; createdAt: EnterpriseTimestamp;
48
- status: 'draft' | 'proposed' | 'accepted' | 'rejected' | 'applied' | 'conflicted'; summary: string;
119
+ kind: 'openplanr-enterprise-change-proposal';
120
+ schemaVersion: '1.0.0';
121
+ id: EnterpriseId;
122
+ artifactId: EnterpriseId;
123
+ baseRevisionId: EnterpriseId;
124
+ authorId: EnterpriseId;
125
+ createdAt: EnterpriseTimestamp;
126
+ status: 'draft' | 'proposed' | 'accepted' | 'rejected' | 'applied' | 'conflicted';
127
+ summary: string;
49
128
  operations: EnterpriseChangeOperation[];
50
- validation: { status: 'pending' | 'passed' | 'failed'; issues: { code: string; message: string; targetId?: EnterpriseId }[] };
51
- application?: { revisionId: EnterpriseId; appliedAt: EnterpriseTimestamp; actorId: EnterpriseId; gitCommit?: string };
129
+ validation: {
130
+ status: 'pending' | 'passed' | 'failed';
131
+ issues: { code: string; message: string; targetId?: EnterpriseId }[];
132
+ };
133
+ application?: {
134
+ revisionId: EnterpriseId;
135
+ appliedAt: EnterpriseTimestamp;
136
+ actorId: EnterpriseId;
137
+ gitCommit?: string;
138
+ };
52
139
  }
53
140
  export type EnterpriseEvidenceSource =
54
141
  | { kind: 'repository'; repositoryId: EnterpriseId; path: string; commit: string; line?: number }
55
- | { kind: 'artifact'; artifactId: EnterpriseId; revisionId: EnterpriseId; elementId?: EnterpriseId }
142
+ | {
143
+ kind: 'artifact';
144
+ artifactId: EnterpriseId;
145
+ revisionId: EnterpriseId;
146
+ elementId?: EnterpriseId;
147
+ }
56
148
  | { kind: 'url'; url: string };
57
149
  export interface EnterpriseEvidenceReference extends EnterpriseScope {
58
- kind: 'openplanr-enterprise-evidence-reference'; schemaVersion: '1.0.0'; id: EnterpriseId;
59
- source: EnterpriseEvidenceSource; capturedAt: EnterpriseTimestamp; freshness: 'current' | 'stale' | 'unknown'; label: string; contentDigest?: EnterpriseDigest;
150
+ kind: 'openplanr-enterprise-evidence-reference';
151
+ schemaVersion: '1.0.0';
152
+ id: EnterpriseId;
153
+ source: EnterpriseEvidenceSource;
154
+ capturedAt: EnterpriseTimestamp;
155
+ freshness: 'current' | 'stale' | 'unknown';
156
+ label: string;
157
+ contentDigest?: EnterpriseDigest;
60
158
  }
61
159
  export interface EnterpriseSyncState extends EnterpriseScope {
62
- kind: 'openplanr-enterprise-sync-state'; schemaVersion: '1.0.0'; repositoryId: EnterpriseId;
63
- direction: 'push' | 'pull'; status: 'preview' | 'pending' | 'synchronized' | 'failed' | 'conflicted';
64
- scope: EnterpriseId[]; cursor: string | null; operationId: EnterpriseId; updatedAt: EnterpriseTimestamp;
65
- items: { artifactId: EnterpriseId; baseRevisionId: EnterpriseId | null; revisionId: EnterpriseId | null; contentDigest: EnterpriseDigest; action: 'create' | 'update' | 'unchanged' | 'conflict' }[];
160
+ kind: 'openplanr-enterprise-sync-state';
161
+ schemaVersion: '1.0.0';
162
+ repositoryId: EnterpriseId;
163
+ direction: 'push' | 'pull';
164
+ status: 'preview' | 'pending' | 'synchronized' | 'failed' | 'conflicted';
165
+ scope: EnterpriseId[];
166
+ cursor: string | null;
167
+ operationId: EnterpriseId;
168
+ updatedAt: EnterpriseTimestamp;
169
+ items: {
170
+ artifactId: EnterpriseId;
171
+ baseRevisionId: EnterpriseId | null;
172
+ revisionId: EnterpriseId | null;
173
+ contentDigest: EnterpriseDigest;
174
+ action: 'create' | 'update' | 'unchanged' | 'conflict';
175
+ }[];
66
176
  issues: { code: string; artifactId?: EnterpriseId; message: string }[];
67
177
  }
68
178
  export interface EnterpriseAgentHandoff extends EnterpriseScope {
69
- kind: 'openplanr-enterprise-agent-handoff'; schemaVersion: '1.0.0'; artifactId: EnterpriseId; revisionId: EnterpriseId;
70
- generatedAt: EnterpriseTimestamp; authority: 'feedback-only'; contentTrust: 'untrusted';
71
- threads: EnterpriseReviewThread[]; evidence: EnterpriseEvidenceReference[]; unresolvedUncertainties: string[]; contentDigest: EnterpriseDigest;
179
+ kind: 'openplanr-enterprise-agent-handoff';
180
+ schemaVersion: '1.0.0';
181
+ artifactId: EnterpriseId;
182
+ revisionId: EnterpriseId;
183
+ generatedAt: EnterpriseTimestamp;
184
+ authority: 'feedback-only';
185
+ contentTrust: 'untrusted';
186
+ threads: EnterpriseReviewThread[];
187
+ evidence: EnterpriseEvidenceReference[];
188
+ unresolvedUncertainties: string[];
189
+ contentDigest: EnterpriseDigest;
72
190
  }
73
191
  export declare const ENTERPRISE_CONTRACT_VERSION: '1.0.0';
74
192
  export declare const ENTERPRISE_PROTOCOL_VERSION: '1.12.0';
@@ -86,22 +204,69 @@ export declare const ENTERPRISE_EVIDENCE_REFERENCE_SCHEMA: EnterpriseSchema;
86
204
  export declare const ENTERPRISE_SYNC_STATE_SCHEMA: EnterpriseSchema;
87
205
  export declare const ENTERPRISE_AGENT_HANDOFF_SCHEMA: EnterpriseSchema;
88
206
  export declare const ENTERPRISE_SCHEMAS: Readonly<Record<string, EnterpriseSchema>>;
89
- export declare function assertEnterpriseContract<T>(value: T, schemaOrName: EnterpriseSchema | string): T;
207
+ export declare function assertEnterpriseContract<T>(
208
+ value: T,
209
+ schemaOrName: EnterpriseSchema | string,
210
+ ): T;
90
211
  export declare function assertEnterpriseRevision<T extends EnterpriseArtifactRevision>(value: T): T;
91
- export declare function assertEnterpriseRevisionAppend<T extends EnterpriseArtifactRevision>(revision: T, previous: EnterpriseArtifactRevision | null, content: string | Uint8Array): T;
212
+ export declare function assertEnterpriseRevisionAppend<T extends EnterpriseArtifactRevision>(
213
+ revision: T,
214
+ previous: EnterpriseArtifactRevision | null,
215
+ content: string | Uint8Array,
216
+ ): T;
92
217
  export declare function assertEnterpriseReviewThread<T extends EnterpriseReviewThread>(value: T): T;
93
218
  export declare function assertEnterpriseProposal<T extends EnterpriseChangeProposal>(value: T): T;
94
- export declare function assertEnterpriseEvidence<T extends EnterpriseEvidenceReference>(value: T): T;
219
+ export declare function assertEnterpriseEvidence<T extends EnterpriseEvidenceReference>(
220
+ value: T,
221
+ ): T;
95
222
  export declare function assertEnterpriseSync<T extends EnterpriseSyncState>(value: T): T;
96
223
  export declare function assertEnterpriseHandoff<T extends EnterpriseAgentHandoff>(value: T): T;
97
224
  export declare function isEnterpriseRepositoryPath(value: unknown): boolean;
98
- export declare function authorizeEnterpriseAccess(context: EnterpriseAccessContext): EnterpriseAccessDecision;
225
+ export declare function authorizeEnterpriseAccess(
226
+ context: EnterpriseAccessContext,
227
+ ): EnterpriseAccessDecision;
99
228
  /** Stable UI projection only; every resource request still requires server authorization. */
100
- export declare function enterpriseProjectCapabilities(role: EnterpriseProjectRole | string): readonly EnterpriseAction[];
101
- export declare function createEnterpriseHandoff(input: EnterpriseScope & { artifactId: EnterpriseId; revisionId: EnterpriseId; generatedAt: EnterpriseTimestamp; threads?: EnterpriseReviewThread[]; evidence?: EnterpriseEvidenceReference[]; unresolvedUncertainties?: string[] }): EnterpriseAgentHandoff;
229
+ export declare function enterpriseProjectCapabilities(
230
+ role: EnterpriseProjectRole | string,
231
+ ): readonly EnterpriseAction[];
232
+ export declare function createEnterpriseHandoff(
233
+ input: EnterpriseScope & {
234
+ artifactId: EnterpriseId;
235
+ revisionId: EnterpriseId;
236
+ generatedAt: EnterpriseTimestamp;
237
+ threads?: EnterpriseReviewThread[];
238
+ evidence?: EnterpriseEvidenceReference[];
239
+ unresolvedUncertainties?: string[];
240
+ },
241
+ ): EnterpriseAgentHandoff;
102
242
  export declare function renderEnterpriseHandoffMarkdown(value: EnterpriseAgentHandoff): string;
103
- export interface EnterpriseLayout { [targetId: string]: { x: number; y: number } }
104
- export interface EnterpriseDocumentChange { op: 'add' | 'remove' | 'replace'; plane: 'semantic' | 'layout'; collection?: string; targetId?: string; field?: string; before?: EnterpriseJson; after?: EnterpriseJson }
105
- export interface EnterpriseDocumentDiff { semanticChanged: boolean; layoutChanged: boolean; changes: EnterpriseDocumentChange[] }
106
- export declare function diffEnterpriseDocuments(before: { [key: string]: EnterpriseJson }, after: { [key: string]: EnterpriseJson }, options?: { beforeLayout?: EnterpriseLayout; afterLayout?: EnterpriseLayout }): EnterpriseDocumentDiff;
107
- export declare function applyEnterpriseOperations(document: { [key: string]: EnterpriseJson }, proposal: EnterpriseChangeProposal, options?: { layout?: EnterpriseLayout }): EnterpriseDocumentDiff & { document: { [key: string]: EnterpriseJson }; layout: EnterpriseLayout };
243
+ export interface EnterpriseLayout {
244
+ [targetId: string]: { x: number; y: number };
245
+ }
246
+ export interface EnterpriseDocumentChange {
247
+ op: 'add' | 'remove' | 'replace';
248
+ plane: 'semantic' | 'layout';
249
+ collection?: string;
250
+ targetId?: string;
251
+ field?: string;
252
+ before?: EnterpriseJson;
253
+ after?: EnterpriseJson;
254
+ }
255
+ export interface EnterpriseDocumentDiff {
256
+ semanticChanged: boolean;
257
+ layoutChanged: boolean;
258
+ changes: EnterpriseDocumentChange[];
259
+ }
260
+ export declare function diffEnterpriseDocuments(
261
+ before: { [key: string]: EnterpriseJson },
262
+ after: { [key: string]: EnterpriseJson },
263
+ options?: { beforeLayout?: EnterpriseLayout; afterLayout?: EnterpriseLayout },
264
+ ): EnterpriseDocumentDiff;
265
+ export declare function applyEnterpriseOperations(
266
+ document: { [key: string]: EnterpriseJson },
267
+ proposal: EnterpriseChangeProposal,
268
+ options?: { layout?: EnterpriseLayout },
269
+ ): EnterpriseDocumentDiff & {
270
+ document: { [key: string]: EnterpriseJson };
271
+ layout: EnterpriseLayout;
272
+ };