@phyzess/pappra 0.0.0-stage → 0.1.0-beta.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.
- package/LICENSE +21 -0
- package/README.md +80 -2
- package/THIRD_PARTY_NOTICES.md +16 -0
- package/assets/integrations/skills/pappra/SKILL.md +68 -0
- package/assets/integrations/skills/pappra/references/hosts.md +30 -0
- package/assets/integrations/skills/pappra/references/lifecycle.md +37 -0
- package/assets/integrations/skills/pappra/references/operations.md +14 -0
- package/assets/manifest.json +4 -0
- package/dist/app/collaboration.d.ts +170 -0
- package/dist/app/collaboration.js +1650 -0
- package/dist/app/doctor.d.ts +9 -0
- package/dist/app/doctor.js +1030 -0
- package/dist/app/init.d.ts +143 -0
- package/dist/app/init.js +1111 -0
- package/dist/cli/commands/code.d.ts +16 -0
- package/dist/cli/commands/code.js +127 -0
- package/dist/cli/commands/collaboration.d.ts +13 -0
- package/dist/cli/commands/collaboration.js +186 -0
- package/dist/cli/commands/continuity.d.ts +29 -0
- package/dist/cli/commands/continuity.js +133 -0
- package/dist/cli/commands/docs.d.ts +11 -0
- package/dist/cli/commands/docs.js +133 -0
- package/dist/cli/commands/doctor.d.ts +14 -0
- package/dist/cli/commands/doctor.js +57 -0
- package/dist/cli/commands/host.d.ts +13 -0
- package/dist/cli/commands/host.js +125 -0
- package/dist/cli/commands/init.d.ts +51 -0
- package/dist/cli/commands/init.js +668 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +10 -0
- package/dist/cli/output.d.ts +4 -0
- package/dist/cli/output.js +1 -0
- package/dist/cli/run.d.ts +2 -0
- package/dist/cli/run.js +597 -0
- package/dist/code/budget.d.ts +14 -0
- package/dist/code/budget.js +39 -0
- package/dist/code/exec.d.ts +23 -0
- package/dist/code/exec.js +133 -0
- package/dist/code/identity.d.ts +13 -0
- package/dist/code/identity.js +214 -0
- package/dist/code/index.d.ts +6 -0
- package/dist/code/index.js +3 -0
- package/dist/code/providers/codegraph.d.ts +59 -0
- package/dist/code/providers/codegraph.js +567 -0
- package/dist/code/registration.d.ts +9 -0
- package/dist/code/registration.js +293 -0
- package/dist/code/service.d.ts +53 -0
- package/dist/code/service.js +633 -0
- package/dist/code/text.d.ts +3 -0
- package/dist/code/text.js +202 -0
- package/dist/collab/admission.d.ts +450 -0
- package/dist/collab/admission.js +797 -0
- package/dist/collab/canonical.d.ts +26 -0
- package/dist/collab/canonical.js +136 -0
- package/dist/collab/contracts.d.ts +73 -0
- package/dist/collab/contracts.js +76 -0
- package/dist/collab/envelope.d.ts +52 -0
- package/dist/collab/envelope.js +241 -0
- package/dist/collab/fingerprint.d.ts +7 -0
- package/dist/collab/fingerprint.js +58 -0
- package/dist/collab/handoff.d.ts +350 -0
- package/dist/collab/handoff.js +513 -0
- package/dist/collab/index.d.ts +9 -0
- package/dist/collab/index.js +8 -0
- package/dist/collab/lifecycle.d.ts +449 -0
- package/dist/collab/lifecycle.js +534 -0
- package/dist/collab/messages.d.ts +148 -0
- package/dist/collab/messages.js +583 -0
- package/dist/collab/notify.d.ts +47 -0
- package/dist/collab/notify.js +140 -0
- package/dist/collab/preflight.d.ts +31 -0
- package/dist/collab/preflight.js +271 -0
- package/dist/collab/resources.d.ts +119 -0
- package/dist/collab/resources.js +451 -0
- package/dist/collab/store.d.ts +143 -0
- package/dist/collab/store.js +606 -0
- package/dist/collab/types.d.ts +354 -0
- package/dist/collab/types.js +1 -0
- package/dist/collab/validation.d.ts +10 -0
- package/dist/collab/validation.js +303 -0
- package/dist/continuity/context.d.ts +24 -0
- package/dist/continuity/context.js +179 -0
- package/dist/continuity/index.d.ts +3 -0
- package/dist/continuity/index.js +1 -0
- package/dist/continuity/paths.d.ts +37 -0
- package/dist/continuity/paths.js +258 -0
- package/dist/continuity/service.d.ts +59 -0
- package/dist/continuity/service.js +1258 -0
- package/dist/hosts/claude/native.d.ts +79 -0
- package/dist/hosts/claude/native.js +853 -0
- package/dist/hosts/codex/native.d.ts +345 -0
- package/dist/hosts/codex/native.js +1528 -0
- package/dist/hosts/codex/protocol.d.ts +51 -0
- package/dist/hosts/codex/protocol.js +42 -0
- package/dist/hosts/detect.d.ts +28 -0
- package/dist/hosts/detect.js +73 -0
- package/dist/hosts/index.d.ts +10 -0
- package/dist/hosts/index.js +10 -0
- package/dist/hosts/integration/bundle.d.ts +16 -0
- package/dist/hosts/integration/bundle.js +81 -0
- package/dist/hosts/integration/hook-entry.d.ts +1 -0
- package/dist/hosts/integration/hook-entry.js +68 -0
- package/dist/hosts/integration/hook.d.ts +32 -0
- package/dist/hosts/integration/hook.js +781 -0
- package/dist/hosts/integration/pi-extension-runtime.d.ts +18 -0
- package/dist/hosts/integration/pi-extension-runtime.js +89 -0
- package/dist/hosts/integration/pi-template.d.ts +3 -0
- package/dist/hosts/integration/pi-template.js +5 -0
- package/dist/hosts/integration/service.d.ts +41 -0
- package/dist/hosts/integration/service.js +1381 -0
- package/dist/hosts/integration/support.d.ts +36 -0
- package/dist/hosts/integration/support.js +41 -0
- package/dist/hosts/integration/templates.d.ts +22 -0
- package/dist/hosts/integration/templates.js +70 -0
- package/dist/hosts/pi/protocol.d.ts +22 -0
- package/dist/hosts/pi/protocol.js +28 -0
- package/dist/hosts/pi/query-result.d.ts +22 -0
- package/dist/hosts/pi/query-result.js +710 -0
- package/dist/hosts/pi/rpc.d.ts +937 -0
- package/dist/hosts/pi/rpc.js +1621 -0
- package/dist/hosts/pilot.d.ts +485 -0
- package/dist/hosts/pilot.js +593 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/infra/fs.d.ts +27 -0
- package/dist/infra/fs.js +130 -0
- package/dist/infra/git.d.ts +60 -0
- package/dist/infra/git.js +358 -0
- package/dist/infra/owned-process-group.d.ts +173 -0
- package/dist/infra/owned-process-group.js +571 -0
- package/dist/install/apply.d.ts +65 -0
- package/dist/install/apply.js +663 -0
- package/dist/install/index.d.ts +5 -0
- package/dist/install/index.js +5 -0
- package/dist/install/ownership.d.ts +85 -0
- package/dist/install/ownership.js +430 -0
- package/dist/install/plan.d.ts +39 -0
- package/dist/install/plan.js +97 -0
- package/dist/install/rollback.d.ts +18 -0
- package/dist/install/rollback.js +544 -0
- package/dist/install/runtime.d.ts +76 -0
- package/dist/install/runtime.js +1145 -0
- package/dist/knowledge/catalog.d.ts +47 -0
- package/dist/knowledge/catalog.js +308 -0
- package/dist/knowledge/context.d.ts +28 -0
- package/dist/knowledge/context.js +61 -0
- package/dist/knowledge/index.d.ts +3 -0
- package/dist/knowledge/index.js +1 -0
- package/dist/knowledge/journal.d.ts +16 -0
- package/dist/knowledge/journal.js +109 -0
- package/dist/knowledge/lifecycle.d.ts +8 -0
- package/dist/knowledge/lifecycle.js +1001 -0
- package/dist/knowledge/paths.d.ts +37 -0
- package/dist/knowledge/paths.js +236 -0
- package/dist/knowledge/refs.d.ts +36 -0
- package/dist/knowledge/refs.js +267 -0
- package/dist/knowledge/service.d.ts +21 -0
- package/dist/knowledge/service.js +393 -0
- package/dist/knowledge/types.d.ts +171 -0
- package/dist/knowledge/types.js +1 -0
- package/dist/knowledge/write.d.ts +8 -0
- package/dist/knowledge/write.js +1223 -0
- package/dist/package-info.d.ts +6 -0
- package/dist/package-info.js +19 -0
- package/dist/schemas/code.d.ts +377 -0
- package/dist/schemas/code.js +145 -0
- package/dist/schemas/collaboration.d.ts +115 -0
- package/dist/schemas/collaboration.js +106 -0
- package/dist/schemas/continuity.d.ts +315 -0
- package/dist/schemas/continuity.js +199 -0
- package/dist/schemas/diagnostics.d.ts +28 -0
- package/dist/schemas/diagnostics.js +27 -0
- package/dist/schemas/doctor.d.ts +157 -0
- package/dist/schemas/doctor.js +75 -0
- package/dist/schemas/document.d.ts +644 -0
- package/dist/schemas/document.js +296 -0
- package/dist/schemas/errors.d.ts +177 -0
- package/dist/schemas/errors.js +176 -0
- package/dist/schemas/evidence.d.ts +24 -0
- package/dist/schemas/evidence.js +16 -0
- package/dist/schemas/host.d.ts +436 -0
- package/dist/schemas/host.js +201 -0
- package/dist/schemas/index.d.ts +15 -0
- package/dist/schemas/index.js +15 -0
- package/dist/schemas/init.d.ts +121 -0
- package/dist/schemas/init.js +94 -0
- package/dist/schemas/install.d.ts +213 -0
- package/dist/schemas/install.js +139 -0
- package/dist/schemas/machine.d.ts +43 -0
- package/dist/schemas/machine.js +96 -0
- package/dist/schemas/outcome.d.ts +23 -0
- package/dist/schemas/outcome.js +17 -0
- package/dist/schemas/paths.d.ts +19 -0
- package/dist/schemas/paths.js +63 -0
- package/dist/schemas/workspace.d.ts +120 -0
- package/dist/schemas/workspace.js +201 -0
- package/dist/workspace/config-file.d.ts +36 -0
- package/dist/workspace/config-file.js +237 -0
- package/dist/workspace/config.d.ts +28 -0
- package/dist/workspace/config.js +79 -0
- package/dist/workspace/discover.d.ts +34 -0
- package/dist/workspace/discover.js +195 -0
- package/dist/workspace/documents.d.ts +21 -0
- package/dist/workspace/documents.js +395 -0
- package/dist/workspace/ignore.d.ts +10 -0
- package/dist/workspace/ignore.js +48 -0
- package/dist/workspace/index.d.ts +7 -0
- package/dist/workspace/index.js +3 -0
- package/dist/workspace/repositories.d.ts +24 -0
- package/dist/workspace/repositories.js +411 -0
- package/dist/workspace/resolve.d.ts +24 -0
- package/dist/workspace/resolve.js +268 -0
- package/dist/workspace/types.d.ts +71 -0
- package/dist/workspace/types.js +1 -0
- package/dist/workspace/validation.d.ts +18 -0
- package/dist/workspace/validation.js +197 -0
- package/package.json +105 -4
- package/skills/pappra/SKILL.md +68 -0
- package/skills/pappra/references/hosts.md +30 -0
- package/skills/pappra/references/lifecycle.md +37 -0
- package/skills/pappra/references/operations.md +14 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { isPortableRelativePath, normalizePortableRelativePath, } from './paths.js';
|
|
3
|
+
export const DOCUMENT_SCHEMA = 'pappra/document/1';
|
|
4
|
+
export const DOCUMENT_CATALOG_SCHEMA = 'pappra/document-catalog/1';
|
|
5
|
+
export const DOCUMENT_WRITE_PROPOSAL_SCHEMA = 'pappra/document-write-proposal/1';
|
|
6
|
+
export const KNOWLEDGE_DELETE_PLAN_SCHEMA = 'pappra/knowledge-delete-plan/1';
|
|
7
|
+
export const KNOWLEDGE_LOCK_SCHEMA = 'pappra/knowledge-lock/1';
|
|
8
|
+
export const KNOWLEDGE_JOURNAL_SCHEMA = 'pappra/knowledge-journal/1';
|
|
9
|
+
const digestSchema = z.string().regex(/^sha256:[0-9a-f]{64}$/);
|
|
10
|
+
const identifierSchema = z
|
|
11
|
+
.string()
|
|
12
|
+
.min(1)
|
|
13
|
+
.max(64)
|
|
14
|
+
.regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/);
|
|
15
|
+
const documentPathSchema = z
|
|
16
|
+
.string()
|
|
17
|
+
.min(1)
|
|
18
|
+
.max(2048)
|
|
19
|
+
.refine((value) => value !== '.' &&
|
|
20
|
+
isPortableRelativePath(value) &&
|
|
21
|
+
normalizePortableRelativePath(value) === value, 'Use a normalized non-empty workspace-relative path without escaping the root.');
|
|
22
|
+
export const documentKindSchema = z.enum([
|
|
23
|
+
'rule',
|
|
24
|
+
'architecture',
|
|
25
|
+
'decision',
|
|
26
|
+
'plan',
|
|
27
|
+
'research',
|
|
28
|
+
'review',
|
|
29
|
+
'delivery',
|
|
30
|
+
'checkpoint',
|
|
31
|
+
'generated',
|
|
32
|
+
]);
|
|
33
|
+
export const documentLifecycleSchema = z.enum([
|
|
34
|
+
'active',
|
|
35
|
+
'archived',
|
|
36
|
+
'superseded',
|
|
37
|
+
]);
|
|
38
|
+
export const documentMaturitySchema = z.enum(['draft', 'reviewed']);
|
|
39
|
+
export const documentOwnerSchema = z.enum(['human', 'agent', 'generator']);
|
|
40
|
+
export const documentVisibilitySchema = z.enum(['private', 'shareable']);
|
|
41
|
+
export const documentLocationSchema = z.discriminatedUnion('kind', [
|
|
42
|
+
z.strictObject({
|
|
43
|
+
kind: z.literal('workspace'),
|
|
44
|
+
path: documentPathSchema,
|
|
45
|
+
}),
|
|
46
|
+
z.strictObject({
|
|
47
|
+
kind: z.literal('source'),
|
|
48
|
+
sourceId: identifierSchema,
|
|
49
|
+
path: documentPathSchema,
|
|
50
|
+
}),
|
|
51
|
+
]);
|
|
52
|
+
export const documentSourceSchema = z.discriminatedUnion('kind', [
|
|
53
|
+
z.strictObject({
|
|
54
|
+
kind: z.literal('document'),
|
|
55
|
+
documentId: z.uuid(),
|
|
56
|
+
digest: digestSchema,
|
|
57
|
+
}),
|
|
58
|
+
z.strictObject({
|
|
59
|
+
kind: z.literal('code'),
|
|
60
|
+
repositoryId: identifierSchema,
|
|
61
|
+
path: documentPathSchema,
|
|
62
|
+
version: z.string().min(1).max(256),
|
|
63
|
+
}),
|
|
64
|
+
]);
|
|
65
|
+
const documentRecordBaseSchema = z.strictObject({
|
|
66
|
+
schema: z.literal(DOCUMENT_SCHEMA),
|
|
67
|
+
documentId: z.uuid(),
|
|
68
|
+
location: documentLocationSchema,
|
|
69
|
+
kind: documentKindSchema,
|
|
70
|
+
lifecycle: documentLifecycleSchema,
|
|
71
|
+
maturity: documentMaturitySchema,
|
|
72
|
+
taskId: z.string().min(1).max(256).nullable(),
|
|
73
|
+
owner: documentOwnerSchema,
|
|
74
|
+
digest: digestSchema,
|
|
75
|
+
sources: z.array(documentSourceSchema).max(64),
|
|
76
|
+
supersededBy: z.uuid().nullable(),
|
|
77
|
+
lastReviewedAt: z.iso.datetime({ offset: true }).nullable(),
|
|
78
|
+
visibility: documentVisibilitySchema,
|
|
79
|
+
});
|
|
80
|
+
export const documentRecordSchema = documentRecordBaseSchema.superRefine((record, context) => {
|
|
81
|
+
if (record.lifecycle === 'superseded') {
|
|
82
|
+
if (record.supersededBy === null) {
|
|
83
|
+
context.addIssue({
|
|
84
|
+
code: 'custom',
|
|
85
|
+
path: ['supersededBy'],
|
|
86
|
+
message: 'A superseded document must name its replacement.',
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else if (record.supersededBy === record.documentId) {
|
|
90
|
+
context.addIssue({
|
|
91
|
+
code: 'custom',
|
|
92
|
+
path: ['supersededBy'],
|
|
93
|
+
message: 'A document cannot supersede itself.',
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else if (record.supersededBy !== null) {
|
|
98
|
+
context.addIssue({
|
|
99
|
+
code: 'custom',
|
|
100
|
+
path: ['supersededBy'],
|
|
101
|
+
message: 'Only a superseded document may name a replacement.',
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export const documentCatalogSchema = z.strictObject({
|
|
106
|
+
schema: z.literal(DOCUMENT_CATALOG_SCHEMA),
|
|
107
|
+
workspaceId: z.uuid(),
|
|
108
|
+
updatedAt: z.iso.datetime({ offset: true }),
|
|
109
|
+
records: z.array(documentRecordSchema).max(2048),
|
|
110
|
+
});
|
|
111
|
+
const fileIdentitySchema = z.strictObject({
|
|
112
|
+
dev: z.number().int().nonnegative(),
|
|
113
|
+
ino: z.number().int().nonnegative(),
|
|
114
|
+
});
|
|
115
|
+
export const documentWriteProposalSchema = z
|
|
116
|
+
.strictObject({
|
|
117
|
+
schema: z.literal(DOCUMENT_WRITE_PROPOSAL_SCHEMA),
|
|
118
|
+
proposalId: z.uuid(),
|
|
119
|
+
createdAt: z.iso.datetime({ offset: true }),
|
|
120
|
+
mode: z.enum(['create', 'update']),
|
|
121
|
+
documentId: z.uuid(),
|
|
122
|
+
location: documentLocationSchema,
|
|
123
|
+
expectedDigest: digestSchema.nullable(),
|
|
124
|
+
nextDigest: digestSchema,
|
|
125
|
+
catalogDigest: digestSchema,
|
|
126
|
+
rootIdentity: fileIdentitySchema,
|
|
127
|
+
record: documentRecordSchema,
|
|
128
|
+
diff: z.string().max(4 * 1024 * 1024),
|
|
129
|
+
})
|
|
130
|
+
.superRefine((proposal, context) => {
|
|
131
|
+
if (proposal.documentId !== proposal.record.documentId ||
|
|
132
|
+
JSON.stringify(proposal.location) !==
|
|
133
|
+
JSON.stringify(proposal.record.location) ||
|
|
134
|
+
proposal.nextDigest !== proposal.record.digest) {
|
|
135
|
+
context.addIssue({
|
|
136
|
+
code: 'custom',
|
|
137
|
+
path: ['record'],
|
|
138
|
+
message: 'Proposal identity/location/digest must match its record.',
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
if (proposal.mode === 'create') {
|
|
142
|
+
if (proposal.expectedDigest !== null) {
|
|
143
|
+
context.addIssue({
|
|
144
|
+
code: 'custom',
|
|
145
|
+
path: ['expectedDigest'],
|
|
146
|
+
message: 'A create proposal must have expectedDigest=null.',
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (proposal.record.lifecycle !== 'active' ||
|
|
150
|
+
proposal.record.supersededBy !== null) {
|
|
151
|
+
context.addIssue({
|
|
152
|
+
code: 'custom',
|
|
153
|
+
path: ['record'],
|
|
154
|
+
message: 'A new document record must be active and not superseded.',
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else if (proposal.expectedDigest === null) {
|
|
159
|
+
context.addIssue({
|
|
160
|
+
code: 'custom',
|
|
161
|
+
path: ['expectedDigest'],
|
|
162
|
+
message: 'An update proposal must bind the current expectedDigest.',
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
export const knowledgeDeleteBlockerSchema = z.strictObject({
|
|
167
|
+
code: z.string().min(1).max(128),
|
|
168
|
+
message: z.string().min(1).max(1024),
|
|
169
|
+
});
|
|
170
|
+
export const knowledgeDeleteReferenceSchema = z.strictObject({
|
|
171
|
+
documentId: z.uuid(),
|
|
172
|
+
relation: z.enum(['source', 'superseded-by']),
|
|
173
|
+
});
|
|
174
|
+
export const knowledgeDeletePlanSchema = z.strictObject({
|
|
175
|
+
schema: z.literal(KNOWLEDGE_DELETE_PLAN_SCHEMA),
|
|
176
|
+
planId: z.uuid(),
|
|
177
|
+
createdAt: z.iso.datetime({ offset: true }),
|
|
178
|
+
documentId: z.uuid(),
|
|
179
|
+
removeFile: z.boolean(),
|
|
180
|
+
location: documentLocationSchema,
|
|
181
|
+
expectedFileDigest: digestSchema.nullable(),
|
|
182
|
+
expectedFileIdentity: fileIdentitySchema.nullable(),
|
|
183
|
+
catalogScope: z.enum(['shared', 'private']),
|
|
184
|
+
catalogDigest: digestSchema,
|
|
185
|
+
rootIdentity: fileIdentitySchema,
|
|
186
|
+
references: z.array(knowledgeDeleteReferenceSchema).max(128),
|
|
187
|
+
pathReferences: z.literal('unchecked'),
|
|
188
|
+
coverage: z.literal('catalog-only'),
|
|
189
|
+
taskState: z.enum(['not-linked', 'unknown']),
|
|
190
|
+
blockers: z.array(knowledgeDeleteBlockerSchema).max(32),
|
|
191
|
+
deletable: z.boolean(),
|
|
192
|
+
});
|
|
193
|
+
export const knowledgeOperationSchema = z.enum([
|
|
194
|
+
'write-document',
|
|
195
|
+
'archive-document',
|
|
196
|
+
'supersede-document',
|
|
197
|
+
'delete-document',
|
|
198
|
+
'share-document',
|
|
199
|
+
]);
|
|
200
|
+
export const knowledgeLockSchema = z.strictObject({
|
|
201
|
+
schema: z.literal(KNOWLEDGE_LOCK_SCHEMA),
|
|
202
|
+
token: z.uuid(),
|
|
203
|
+
operation: knowledgeOperationSchema,
|
|
204
|
+
pid: z.number().int().positive(),
|
|
205
|
+
createdAt: z.iso.datetime({ offset: true }),
|
|
206
|
+
});
|
|
207
|
+
export const knowledgeJournalSchema = z.strictObject({
|
|
208
|
+
schema: z.literal(KNOWLEDGE_JOURNAL_SCHEMA),
|
|
209
|
+
operationId: z.uuid(),
|
|
210
|
+
operation: knowledgeOperationSchema,
|
|
211
|
+
stage: z.enum([
|
|
212
|
+
'prepared',
|
|
213
|
+
'file-written',
|
|
214
|
+
'catalog-written',
|
|
215
|
+
'file-removed',
|
|
216
|
+
'complete',
|
|
217
|
+
'failed',
|
|
218
|
+
]),
|
|
219
|
+
documentId: z.uuid().nullable(),
|
|
220
|
+
targetPath: z.string().min(1).max(4096).nullable(),
|
|
221
|
+
catalogScope: z.enum(['shared', 'private']).nullable(),
|
|
222
|
+
expectedDigest: digestSchema.nullable(),
|
|
223
|
+
fileDigest: digestSchema.nullable(),
|
|
224
|
+
catalogDigest: digestSchema.nullable(),
|
|
225
|
+
createdAt: z.iso.datetime({ offset: true }),
|
|
226
|
+
updatedAt: z.iso.datetime({ offset: true }),
|
|
227
|
+
residualPaths: z.array(z.string().min(1).max(4096)).max(64),
|
|
228
|
+
detail: z.string().max(4096).nullable(),
|
|
229
|
+
});
|
|
230
|
+
export const knowledgeDiagnosticSchema = z.strictObject({
|
|
231
|
+
code: z.string().min(1).max(128),
|
|
232
|
+
severity: z.enum(['error', 'warning', 'info']),
|
|
233
|
+
message: z.string().min(1).max(4096),
|
|
234
|
+
source: z.string().min(1).max(4096),
|
|
235
|
+
pointer: z.string().max(2048).nullable(),
|
|
236
|
+
hint: z.string().max(4096).nullable(),
|
|
237
|
+
});
|
|
238
|
+
export const docsListReportSchema = z.strictObject({
|
|
239
|
+
schema: z.literal('pappra/docs-list/1'),
|
|
240
|
+
ok: z.boolean(),
|
|
241
|
+
includePrivate: z.boolean(),
|
|
242
|
+
includeArchived: z.boolean(),
|
|
243
|
+
catalogDigest: z.string(),
|
|
244
|
+
documents: z.array(documentRecordSchema).max(2048),
|
|
245
|
+
diagnostics: z.array(knowledgeDiagnosticSchema).max(2048),
|
|
246
|
+
});
|
|
247
|
+
export const documentCheckEntrySchema = z.strictObject({
|
|
248
|
+
documentId: z.uuid(),
|
|
249
|
+
scope: z.enum(['shared', 'private']),
|
|
250
|
+
lifecycle: documentLifecycleSchema,
|
|
251
|
+
maturity: documentMaturitySchema,
|
|
252
|
+
fileDigest: digestSchema.nullable(),
|
|
253
|
+
recordDigest: digestSchema,
|
|
254
|
+
freshness: z.enum(['current', 'needs-review', 'unknown']),
|
|
255
|
+
reasons: z
|
|
256
|
+
.array(z.strictObject({
|
|
257
|
+
code: z.string().min(1).max(128),
|
|
258
|
+
message: z.string().min(1).max(4096),
|
|
259
|
+
}))
|
|
260
|
+
.max(128),
|
|
261
|
+
sourceChecks: z
|
|
262
|
+
.array(z.strictObject({
|
|
263
|
+
kind: z.enum(['document', 'code']),
|
|
264
|
+
ref: z.string().min(1).max(4096),
|
|
265
|
+
status: z.enum(['current', 'needs-review', 'unknown']),
|
|
266
|
+
message: z.string().min(1).max(4096),
|
|
267
|
+
}))
|
|
268
|
+
.max(128),
|
|
269
|
+
});
|
|
270
|
+
export const docsCheckReportSchema = z.strictObject({
|
|
271
|
+
schema: z.literal('pappra/docs-check/1'),
|
|
272
|
+
ok: z.boolean(),
|
|
273
|
+
checkedAt: z.iso.datetime({ offset: true }),
|
|
274
|
+
catalogDigest: z.string(),
|
|
275
|
+
entries: z.array(documentCheckEntrySchema).max(2048),
|
|
276
|
+
diagnostics: z.array(knowledgeDiagnosticSchema).max(2048),
|
|
277
|
+
summary: z.strictObject({
|
|
278
|
+
total: z.number().int().nonnegative(),
|
|
279
|
+
current: z.number().int().nonnegative(),
|
|
280
|
+
needsReview: z.number().int().nonnegative(),
|
|
281
|
+
unknown: z.number().int().nonnegative(),
|
|
282
|
+
}),
|
|
283
|
+
coverage: z.strictObject({
|
|
284
|
+
catalogs: z.enum(['shared', 'shared-and-private']),
|
|
285
|
+
pathReferences: z.literal('unchecked'),
|
|
286
|
+
repositoryContent: z.literal('not-scanned'),
|
|
287
|
+
taskExecution: z.literal('unknown'),
|
|
288
|
+
}),
|
|
289
|
+
});
|
|
290
|
+
export const docsArchiveReportSchema = z.strictObject({
|
|
291
|
+
schema: z.literal('pappra/docs-archive/1'),
|
|
292
|
+
ok: z.boolean(),
|
|
293
|
+
status: z.string().min(1).max(64),
|
|
294
|
+
document: documentRecordSchema.nullable(),
|
|
295
|
+
diagnostics: z.array(knowledgeDiagnosticSchema).max(2048),
|
|
296
|
+
});
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable diagnostic and rejection codes.
|
|
3
|
+
*
|
|
4
|
+
* These values are part of the persisted and machine-readable interface:
|
|
5
|
+
* never rename an existing entry. Add a new code instead.
|
|
6
|
+
*/
|
|
7
|
+
export declare const diagnosticCodes: {
|
|
8
|
+
readonly fileNotFound: 'file_not_found';
|
|
9
|
+
readonly fileUnreadable: 'file_unreadable';
|
|
10
|
+
readonly fileTooLarge: 'file_too_large';
|
|
11
|
+
readonly fileNotRegular: 'file_not_regular';
|
|
12
|
+
readonly documentPathEscapesRoot: 'document_path_escapes_root';
|
|
13
|
+
readonly initInputRequired: 'init_input_required';
|
|
14
|
+
readonly initInvalidInput: 'init_invalid_input';
|
|
15
|
+
readonly initNoTty: 'init_no_tty';
|
|
16
|
+
readonly initRegisteredRootUsed: 'init_registered_root_used';
|
|
17
|
+
readonly initExistingConfigReused: 'init_existing_config_reused';
|
|
18
|
+
readonly initPlanStale: 'init_plan_stale';
|
|
19
|
+
readonly initPlanInvalid: 'init_plan_invalid';
|
|
20
|
+
readonly initTargetExists: 'init_target_exists';
|
|
21
|
+
readonly initTargetUnsafe: 'init_target_unsafe';
|
|
22
|
+
readonly initRepositoryUnknown: 'init_repository_unknown';
|
|
23
|
+
readonly initRepositoryDuplicate: 'init_repository_duplicate';
|
|
24
|
+
readonly initKnowledgeUnknown: 'init_knowledge_unknown';
|
|
25
|
+
readonly initValidationUnknown: 'init_validation_unknown';
|
|
26
|
+
readonly initValidationUnbound: 'init_validation_unbound';
|
|
27
|
+
readonly initExternalMappingRequired: 'init_external_mapping_required';
|
|
28
|
+
readonly initApplyUnsupported: 'init_apply_unsupported';
|
|
29
|
+
readonly initApplyFailed: 'init_apply_failed';
|
|
30
|
+
readonly initApplyResidual: 'init_apply_residual';
|
|
31
|
+
readonly initRuntimeSourceRequired: 'init_runtime_source_required';
|
|
32
|
+
readonly initCancelled: 'init_cancelled';
|
|
33
|
+
readonly fileInvalidEncoding: 'file_invalid_encoding';
|
|
34
|
+
readonly configMissing: 'config_missing';
|
|
35
|
+
readonly configSymlinkEscape: 'config_symlink_escape';
|
|
36
|
+
readonly configInvalidJson: 'config_invalid_json';
|
|
37
|
+
readonly configUnsupportedSchema: 'config_unsupported_schema';
|
|
38
|
+
readonly configUnknownKey: 'config_unknown_key';
|
|
39
|
+
readonly configSchemaInvalid: 'config_schema_invalid';
|
|
40
|
+
readonly configDuplicateRepositoryId: 'config_duplicate_repository_id';
|
|
41
|
+
readonly configDuplicateValidationId: 'config_duplicate_validation_id';
|
|
42
|
+
readonly configUnknownRepository: 'config_unknown_repository';
|
|
43
|
+
readonly configPathInvalid: 'config_path_invalid';
|
|
44
|
+
readonly configPathAbsolute: 'config_path_absolute';
|
|
45
|
+
readonly configPathEscapesRoot: 'config_path_escapes_root';
|
|
46
|
+
readonly configGlobNotSupported: 'config_glob_not_supported';
|
|
47
|
+
readonly machineWorkspaceMismatch: 'machine_workspace_mismatch';
|
|
48
|
+
readonly machineExternalDuplicate: 'machine_external_duplicate';
|
|
49
|
+
readonly machineExternalPathInvalid: 'machine_external_path_invalid';
|
|
50
|
+
readonly runtimeMissing: 'runtime_missing';
|
|
51
|
+
readonly runtimeVersionMismatch: 'runtime_version_mismatch';
|
|
52
|
+
readonly workspaceStartInvalid: 'workspace_start_invalid';
|
|
53
|
+
readonly workspaceRootInvalid: 'workspace_root_invalid';
|
|
54
|
+
readonly workspaceNotFound: 'workspace_not_found';
|
|
55
|
+
readonly workspaceRegistrationIncomplete: 'workspace_registration_incomplete';
|
|
56
|
+
readonly repositoryPathMissing: 'repository_path_missing';
|
|
57
|
+
readonly repositoryNotGit: 'repository_not_git';
|
|
58
|
+
readonly repositorySymlinkEscape: 'repository_symlink_escape';
|
|
59
|
+
readonly repositoryNestedWorkspace: 'repository_nested_workspace';
|
|
60
|
+
readonly repositoryDuplicatePath: 'repository_duplicate_path';
|
|
61
|
+
readonly externalRepositoryUnmapped: 'external_repository_unmapped';
|
|
62
|
+
readonly externalRepositoryInvalid: 'external_repository_invalid';
|
|
63
|
+
readonly knowledgeSourceMissing: 'knowledge_source_missing';
|
|
64
|
+
readonly knowledgeSourceSymlinkEscape: 'knowledge_source_symlink_escape';
|
|
65
|
+
readonly knowledgeSourceNotReadable: 'knowledge_source_not_readable';
|
|
66
|
+
readonly documentIgnored: 'document_ignored';
|
|
67
|
+
readonly discoverySymlinkSkipped: 'discovery_symlink_skipped';
|
|
68
|
+
readonly discoveryLimitReached: 'discovery_limit_reached';
|
|
69
|
+
readonly discoveryNestedWorkspace: 'discovery_nested_workspace';
|
|
70
|
+
readonly ignoreFilterUnavailable: 'ignore_filter_unavailable';
|
|
71
|
+
readonly packageManifestInvalid: 'package_manifest_invalid';
|
|
72
|
+
readonly validationRunnerUnsupported: 'validation_runner_unsupported';
|
|
73
|
+
readonly validationRunnerAmbiguous: 'validation_runner_ambiguous';
|
|
74
|
+
readonly validationCandidateUnbound: 'validation_candidate_unbound';
|
|
75
|
+
readonly gitUnavailable: 'git_unavailable';
|
|
76
|
+
readonly gitCommandFailed: 'git_command_failed';
|
|
77
|
+
readonly gitTimeout: 'git_timeout';
|
|
78
|
+
readonly gitOutputLimit: 'git_output_limit';
|
|
79
|
+
readonly gitAborted: 'git_aborted';
|
|
80
|
+
readonly doctor_workspace_registered: 'doctor_workspace_registered';
|
|
81
|
+
readonly doctor_workspace_not_registered: 'doctor_workspace_not_registered';
|
|
82
|
+
readonly doctor_config_valid: 'doctor_config_valid';
|
|
83
|
+
readonly doctor_machine_valid: 'doctor_machine_valid';
|
|
84
|
+
readonly doctor_repository_ok: 'doctor_repository_ok';
|
|
85
|
+
readonly doctor_knowledge_ok: 'doctor_knowledge_ok';
|
|
86
|
+
readonly doctor_install_ok: 'doctor_install_ok';
|
|
87
|
+
readonly doctor_install_unknown: 'doctor_install_unknown';
|
|
88
|
+
readonly doctor_tool_disabled: 'doctor_tool_disabled';
|
|
89
|
+
readonly doctor_workspace_incomplete: 'doctor_workspace_incomplete';
|
|
90
|
+
readonly doctor_workspace_unavailable: 'doctor_workspace_unavailable';
|
|
91
|
+
readonly doctor_config_missing: 'doctor_config_missing';
|
|
92
|
+
readonly doctor_config_invalid: 'doctor_config_invalid';
|
|
93
|
+
readonly doctor_machine_invalid: 'doctor_machine_invalid';
|
|
94
|
+
readonly doctor_repository_issues: 'doctor_repository_issues';
|
|
95
|
+
readonly doctor_knowledge_issues: 'doctor_knowledge_issues';
|
|
96
|
+
readonly doctor_validation_unverified: 'doctor_validation_unverified';
|
|
97
|
+
readonly doctor_install_state_invalid: 'doctor_install_state_invalid';
|
|
98
|
+
readonly doctor_install_lock: 'doctor_install_lock';
|
|
99
|
+
readonly doctor_install_partial: 'doctor_install_partial';
|
|
100
|
+
readonly doctor_install_modified: 'doctor_install_modified';
|
|
101
|
+
readonly doctor_install_backup_missing: 'doctor_install_backup_missing';
|
|
102
|
+
readonly doctor_runtime_missing: 'doctor_runtime_missing';
|
|
103
|
+
readonly doctor_runtime_mismatch: 'doctor_runtime_mismatch';
|
|
104
|
+
readonly doctor_runtime_unverified: 'doctor_runtime_unverified';
|
|
105
|
+
readonly doctor_runtime_locked: 'doctor_runtime_locked';
|
|
106
|
+
readonly doctor_runtime_partial: 'doctor_runtime_partial';
|
|
107
|
+
readonly doctor_runtime_corrupt: 'doctor_runtime_corrupt';
|
|
108
|
+
readonly doctor_runtime_unknown: 'doctor_runtime_unknown';
|
|
109
|
+
readonly doctor_host_missing: 'doctor_host_missing';
|
|
110
|
+
readonly doctor_host_discovered_unverified: 'doctor_host_discovered_unverified';
|
|
111
|
+
readonly doctor_host_config_present: 'doctor_host_config_present';
|
|
112
|
+
readonly doctor_host_integration_unsupported: 'doctor_host_integration_unsupported';
|
|
113
|
+
readonly doctor_skill_verification_unsupported: 'doctor_skill_verification_unsupported';
|
|
114
|
+
readonly doctor_tool_preference_unavailable: 'doctor_tool_preference_unavailable';
|
|
115
|
+
readonly doctor_tool_discovered_unverified: 'doctor_tool_discovered_unverified';
|
|
116
|
+
readonly doctor_references_incomplete: 'doctor_references_incomplete';
|
|
117
|
+
readonly doctor_read_error: 'doctor_read_error';
|
|
118
|
+
readonly doctor_failed: 'doctor_failed';
|
|
119
|
+
readonly document_catalog_invalid: 'document_catalog_invalid';
|
|
120
|
+
readonly document_catalog_unsupported: 'document_catalog_unsupported';
|
|
121
|
+
readonly document_catalog_conflict: 'document_catalog_conflict';
|
|
122
|
+
readonly document_record_invalid: 'document_record_invalid';
|
|
123
|
+
readonly document_not_found: 'document_not_found';
|
|
124
|
+
readonly document_already_registered: 'document_already_registered';
|
|
125
|
+
readonly document_duplicate_id: 'document_duplicate_id';
|
|
126
|
+
readonly document_location_conflict: 'document_location_conflict';
|
|
127
|
+
readonly document_path_unsafe: 'document_path_unsafe';
|
|
128
|
+
readonly document_nested_workspace: 'document_nested_workspace';
|
|
129
|
+
readonly document_access_denied: 'document_access_denied';
|
|
130
|
+
readonly document_source_invalid: 'document_source_invalid';
|
|
131
|
+
readonly document_file_changed: 'document_file_changed';
|
|
132
|
+
readonly document_write_conflict: 'document_write_conflict';
|
|
133
|
+
readonly document_proposal_stale: 'document_proposal_stale';
|
|
134
|
+
readonly document_write_partial: 'document_write_partial';
|
|
135
|
+
readonly document_generated_modified: 'document_generated_modified';
|
|
136
|
+
readonly document_delete_blocked: 'document_delete_blocked';
|
|
137
|
+
readonly document_delete_stale: 'document_delete_stale';
|
|
138
|
+
readonly document_supersede_invalid: 'document_supersede_invalid';
|
|
139
|
+
readonly document_visibility_invalid: 'document_visibility_invalid';
|
|
140
|
+
readonly document_task_state_unknown: 'document_task_state_unknown';
|
|
141
|
+
readonly document_locked: 'document_locked';
|
|
142
|
+
readonly document_journal_failed: 'document_journal_failed';
|
|
143
|
+
readonly code_repository_required: 'code_repository_required';
|
|
144
|
+
readonly code_repository_unknown: 'code_repository_unknown';
|
|
145
|
+
readonly code_identity_changed: 'code_identity_changed';
|
|
146
|
+
readonly code_working_tree_partial: 'code_working_tree_partial';
|
|
147
|
+
readonly code_engine_unavailable: 'code_engine_unavailable';
|
|
148
|
+
readonly code_engine_failed: 'code_engine_failed';
|
|
149
|
+
readonly code_index_missing: 'code_index_missing';
|
|
150
|
+
readonly code_index_stale: 'code_index_stale';
|
|
151
|
+
readonly code_index_partial: 'code_index_partial';
|
|
152
|
+
readonly code_index_unsupported: 'code_index_unsupported';
|
|
153
|
+
readonly code_prepare_conflict: 'code_prepare_conflict';
|
|
154
|
+
readonly code_prepare_failed: 'code_prepare_failed';
|
|
155
|
+
readonly code_prepare_partial: 'code_prepare_partial';
|
|
156
|
+
readonly code_registration_invalid: 'code_registration_invalid';
|
|
157
|
+
readonly code_query_unsupported: 'code_query_unsupported';
|
|
158
|
+
readonly code_query_invalid: 'code_query_invalid';
|
|
159
|
+
readonly code_output_limit: 'code_output_limit';
|
|
160
|
+
readonly code_path_unsafe: 'code_path_unsafe';
|
|
161
|
+
readonly host_unavailable: 'host_unavailable';
|
|
162
|
+
readonly host_version_unsupported: 'host_version_unsupported';
|
|
163
|
+
readonly host_capability_unknown: 'host_capability_unknown';
|
|
164
|
+
readonly host_install_conflict: 'host_install_conflict';
|
|
165
|
+
readonly host_install_unsafe: 'host_install_unsafe';
|
|
166
|
+
readonly host_install_partial: 'host_install_partial';
|
|
167
|
+
readonly host_config_invalid: 'host_config_invalid';
|
|
168
|
+
readonly host_bundle_invalid: 'host_bundle_invalid';
|
|
169
|
+
readonly host_bundle_stale: 'host_bundle_stale';
|
|
170
|
+
readonly host_verify_failed: 'host_verify_failed';
|
|
171
|
+
readonly host_hook_input_invalid: 'host_hook_input_invalid';
|
|
172
|
+
readonly host_hook_cwd_invalid: 'host_hook_cwd_invalid';
|
|
173
|
+
readonly host_hook_unsupported: 'host_hook_unsupported';
|
|
174
|
+
readonly host_hook_timeout: 'host_hook_timeout';
|
|
175
|
+
readonly host_hook_failed: 'host_hook_failed';
|
|
176
|
+
};
|
|
177
|
+
export type DiagnosticCode = (typeof diagnosticCodes)[keyof typeof diagnosticCodes];
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable diagnostic and rejection codes.
|
|
3
|
+
*
|
|
4
|
+
* These values are part of the persisted and machine-readable interface:
|
|
5
|
+
* never rename an existing entry. Add a new code instead.
|
|
6
|
+
*/
|
|
7
|
+
export const diagnosticCodes = {
|
|
8
|
+
fileNotFound: 'file_not_found',
|
|
9
|
+
fileUnreadable: 'file_unreadable',
|
|
10
|
+
fileTooLarge: 'file_too_large',
|
|
11
|
+
fileNotRegular: 'file_not_regular',
|
|
12
|
+
documentPathEscapesRoot: 'document_path_escapes_root',
|
|
13
|
+
initInputRequired: 'init_input_required',
|
|
14
|
+
initInvalidInput: 'init_invalid_input',
|
|
15
|
+
initNoTty: 'init_no_tty',
|
|
16
|
+
initRegisteredRootUsed: 'init_registered_root_used',
|
|
17
|
+
initExistingConfigReused: 'init_existing_config_reused',
|
|
18
|
+
initPlanStale: 'init_plan_stale',
|
|
19
|
+
initPlanInvalid: 'init_plan_invalid',
|
|
20
|
+
initTargetExists: 'init_target_exists',
|
|
21
|
+
initTargetUnsafe: 'init_target_unsafe',
|
|
22
|
+
initRepositoryUnknown: 'init_repository_unknown',
|
|
23
|
+
initRepositoryDuplicate: 'init_repository_duplicate',
|
|
24
|
+
initKnowledgeUnknown: 'init_knowledge_unknown',
|
|
25
|
+
initValidationUnknown: 'init_validation_unknown',
|
|
26
|
+
initValidationUnbound: 'init_validation_unbound',
|
|
27
|
+
initExternalMappingRequired: 'init_external_mapping_required',
|
|
28
|
+
initApplyUnsupported: 'init_apply_unsupported',
|
|
29
|
+
initApplyFailed: 'init_apply_failed',
|
|
30
|
+
initApplyResidual: 'init_apply_residual',
|
|
31
|
+
initRuntimeSourceRequired: 'init_runtime_source_required',
|
|
32
|
+
initCancelled: 'init_cancelled',
|
|
33
|
+
fileInvalidEncoding: 'file_invalid_encoding',
|
|
34
|
+
configMissing: 'config_missing',
|
|
35
|
+
configSymlinkEscape: 'config_symlink_escape',
|
|
36
|
+
configInvalidJson: 'config_invalid_json',
|
|
37
|
+
configUnsupportedSchema: 'config_unsupported_schema',
|
|
38
|
+
configUnknownKey: 'config_unknown_key',
|
|
39
|
+
configSchemaInvalid: 'config_schema_invalid',
|
|
40
|
+
configDuplicateRepositoryId: 'config_duplicate_repository_id',
|
|
41
|
+
configDuplicateValidationId: 'config_duplicate_validation_id',
|
|
42
|
+
configUnknownRepository: 'config_unknown_repository',
|
|
43
|
+
configPathInvalid: 'config_path_invalid',
|
|
44
|
+
configPathAbsolute: 'config_path_absolute',
|
|
45
|
+
configPathEscapesRoot: 'config_path_escapes_root',
|
|
46
|
+
configGlobNotSupported: 'config_glob_not_supported',
|
|
47
|
+
machineWorkspaceMismatch: 'machine_workspace_mismatch',
|
|
48
|
+
machineExternalDuplicate: 'machine_external_duplicate',
|
|
49
|
+
machineExternalPathInvalid: 'machine_external_path_invalid',
|
|
50
|
+
runtimeMissing: 'runtime_missing',
|
|
51
|
+
runtimeVersionMismatch: 'runtime_version_mismatch',
|
|
52
|
+
workspaceStartInvalid: 'workspace_start_invalid',
|
|
53
|
+
workspaceRootInvalid: 'workspace_root_invalid',
|
|
54
|
+
workspaceNotFound: 'workspace_not_found',
|
|
55
|
+
workspaceRegistrationIncomplete: 'workspace_registration_incomplete',
|
|
56
|
+
repositoryPathMissing: 'repository_path_missing',
|
|
57
|
+
repositoryNotGit: 'repository_not_git',
|
|
58
|
+
repositorySymlinkEscape: 'repository_symlink_escape',
|
|
59
|
+
repositoryNestedWorkspace: 'repository_nested_workspace',
|
|
60
|
+
repositoryDuplicatePath: 'repository_duplicate_path',
|
|
61
|
+
externalRepositoryUnmapped: 'external_repository_unmapped',
|
|
62
|
+
externalRepositoryInvalid: 'external_repository_invalid',
|
|
63
|
+
knowledgeSourceMissing: 'knowledge_source_missing',
|
|
64
|
+
knowledgeSourceSymlinkEscape: 'knowledge_source_symlink_escape',
|
|
65
|
+
knowledgeSourceNotReadable: 'knowledge_source_not_readable',
|
|
66
|
+
documentIgnored: 'document_ignored',
|
|
67
|
+
discoverySymlinkSkipped: 'discovery_symlink_skipped',
|
|
68
|
+
discoveryLimitReached: 'discovery_limit_reached',
|
|
69
|
+
discoveryNestedWorkspace: 'discovery_nested_workspace',
|
|
70
|
+
ignoreFilterUnavailable: 'ignore_filter_unavailable',
|
|
71
|
+
packageManifestInvalid: 'package_manifest_invalid',
|
|
72
|
+
validationRunnerUnsupported: 'validation_runner_unsupported',
|
|
73
|
+
validationRunnerAmbiguous: 'validation_runner_ambiguous',
|
|
74
|
+
validationCandidateUnbound: 'validation_candidate_unbound',
|
|
75
|
+
gitUnavailable: 'git_unavailable',
|
|
76
|
+
gitCommandFailed: 'git_command_failed',
|
|
77
|
+
gitTimeout: 'git_timeout',
|
|
78
|
+
gitOutputLimit: 'git_output_limit',
|
|
79
|
+
gitAborted: 'git_aborted',
|
|
80
|
+
doctor_workspace_registered: 'doctor_workspace_registered',
|
|
81
|
+
doctor_workspace_not_registered: 'doctor_workspace_not_registered',
|
|
82
|
+
doctor_config_valid: 'doctor_config_valid',
|
|
83
|
+
doctor_machine_valid: 'doctor_machine_valid',
|
|
84
|
+
doctor_repository_ok: 'doctor_repository_ok',
|
|
85
|
+
doctor_knowledge_ok: 'doctor_knowledge_ok',
|
|
86
|
+
doctor_install_ok: 'doctor_install_ok',
|
|
87
|
+
doctor_install_unknown: 'doctor_install_unknown',
|
|
88
|
+
doctor_tool_disabled: 'doctor_tool_disabled',
|
|
89
|
+
doctor_workspace_incomplete: 'doctor_workspace_incomplete',
|
|
90
|
+
doctor_workspace_unavailable: 'doctor_workspace_unavailable',
|
|
91
|
+
doctor_config_missing: 'doctor_config_missing',
|
|
92
|
+
doctor_config_invalid: 'doctor_config_invalid',
|
|
93
|
+
doctor_machine_invalid: 'doctor_machine_invalid',
|
|
94
|
+
doctor_repository_issues: 'doctor_repository_issues',
|
|
95
|
+
doctor_knowledge_issues: 'doctor_knowledge_issues',
|
|
96
|
+
doctor_validation_unverified: 'doctor_validation_unverified',
|
|
97
|
+
doctor_install_state_invalid: 'doctor_install_state_invalid',
|
|
98
|
+
doctor_install_lock: 'doctor_install_lock',
|
|
99
|
+
doctor_install_partial: 'doctor_install_partial',
|
|
100
|
+
doctor_install_modified: 'doctor_install_modified',
|
|
101
|
+
doctor_install_backup_missing: 'doctor_install_backup_missing',
|
|
102
|
+
doctor_runtime_missing: 'doctor_runtime_missing',
|
|
103
|
+
doctor_runtime_mismatch: 'doctor_runtime_mismatch',
|
|
104
|
+
doctor_runtime_unverified: 'doctor_runtime_unverified',
|
|
105
|
+
doctor_runtime_locked: 'doctor_runtime_locked',
|
|
106
|
+
doctor_runtime_partial: 'doctor_runtime_partial',
|
|
107
|
+
doctor_runtime_corrupt: 'doctor_runtime_corrupt',
|
|
108
|
+
doctor_runtime_unknown: 'doctor_runtime_unknown',
|
|
109
|
+
doctor_host_missing: 'doctor_host_missing',
|
|
110
|
+
doctor_host_discovered_unverified: 'doctor_host_discovered_unverified',
|
|
111
|
+
doctor_host_config_present: 'doctor_host_config_present',
|
|
112
|
+
doctor_host_integration_unsupported: 'doctor_host_integration_unsupported',
|
|
113
|
+
doctor_skill_verification_unsupported: 'doctor_skill_verification_unsupported',
|
|
114
|
+
doctor_tool_preference_unavailable: 'doctor_tool_preference_unavailable',
|
|
115
|
+
doctor_tool_discovered_unverified: 'doctor_tool_discovered_unverified',
|
|
116
|
+
doctor_references_incomplete: 'doctor_references_incomplete',
|
|
117
|
+
doctor_read_error: 'doctor_read_error',
|
|
118
|
+
doctor_failed: 'doctor_failed',
|
|
119
|
+
document_catalog_invalid: 'document_catalog_invalid',
|
|
120
|
+
document_catalog_unsupported: 'document_catalog_unsupported',
|
|
121
|
+
document_catalog_conflict: 'document_catalog_conflict',
|
|
122
|
+
document_record_invalid: 'document_record_invalid',
|
|
123
|
+
document_not_found: 'document_not_found',
|
|
124
|
+
document_already_registered: 'document_already_registered',
|
|
125
|
+
document_duplicate_id: 'document_duplicate_id',
|
|
126
|
+
document_location_conflict: 'document_location_conflict',
|
|
127
|
+
document_path_unsafe: 'document_path_unsafe',
|
|
128
|
+
document_nested_workspace: 'document_nested_workspace',
|
|
129
|
+
document_access_denied: 'document_access_denied',
|
|
130
|
+
document_source_invalid: 'document_source_invalid',
|
|
131
|
+
document_file_changed: 'document_file_changed',
|
|
132
|
+
document_write_conflict: 'document_write_conflict',
|
|
133
|
+
document_proposal_stale: 'document_proposal_stale',
|
|
134
|
+
document_write_partial: 'document_write_partial',
|
|
135
|
+
document_generated_modified: 'document_generated_modified',
|
|
136
|
+
document_delete_blocked: 'document_delete_blocked',
|
|
137
|
+
document_delete_stale: 'document_delete_stale',
|
|
138
|
+
document_supersede_invalid: 'document_supersede_invalid',
|
|
139
|
+
document_visibility_invalid: 'document_visibility_invalid',
|
|
140
|
+
document_task_state_unknown: 'document_task_state_unknown',
|
|
141
|
+
document_locked: 'document_locked',
|
|
142
|
+
document_journal_failed: 'document_journal_failed',
|
|
143
|
+
code_repository_required: 'code_repository_required',
|
|
144
|
+
code_repository_unknown: 'code_repository_unknown',
|
|
145
|
+
code_identity_changed: 'code_identity_changed',
|
|
146
|
+
code_working_tree_partial: 'code_working_tree_partial',
|
|
147
|
+
code_engine_unavailable: 'code_engine_unavailable',
|
|
148
|
+
code_engine_failed: 'code_engine_failed',
|
|
149
|
+
code_index_missing: 'code_index_missing',
|
|
150
|
+
code_index_stale: 'code_index_stale',
|
|
151
|
+
code_index_partial: 'code_index_partial',
|
|
152
|
+
code_index_unsupported: 'code_index_unsupported',
|
|
153
|
+
code_prepare_conflict: 'code_prepare_conflict',
|
|
154
|
+
code_prepare_failed: 'code_prepare_failed',
|
|
155
|
+
code_prepare_partial: 'code_prepare_partial',
|
|
156
|
+
code_registration_invalid: 'code_registration_invalid',
|
|
157
|
+
code_query_unsupported: 'code_query_unsupported',
|
|
158
|
+
code_query_invalid: 'code_query_invalid',
|
|
159
|
+
code_output_limit: 'code_output_limit',
|
|
160
|
+
code_path_unsafe: 'code_path_unsafe',
|
|
161
|
+
host_unavailable: 'host_unavailable',
|
|
162
|
+
host_version_unsupported: 'host_version_unsupported',
|
|
163
|
+
host_capability_unknown: 'host_capability_unknown',
|
|
164
|
+
host_install_conflict: 'host_install_conflict',
|
|
165
|
+
host_install_unsafe: 'host_install_unsafe',
|
|
166
|
+
host_install_partial: 'host_install_partial',
|
|
167
|
+
host_config_invalid: 'host_config_invalid',
|
|
168
|
+
host_bundle_invalid: 'host_bundle_invalid',
|
|
169
|
+
host_bundle_stale: 'host_bundle_stale',
|
|
170
|
+
host_verify_failed: 'host_verify_failed',
|
|
171
|
+
host_hook_input_invalid: 'host_hook_input_invalid',
|
|
172
|
+
host_hook_cwd_invalid: 'host_hook_cwd_invalid',
|
|
173
|
+
host_hook_unsupported: 'host_hook_unsupported',
|
|
174
|
+
host_hook_timeout: 'host_hook_timeout',
|
|
175
|
+
host_hook_failed: 'host_hook_failed',
|
|
176
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const evidenceScopeSchema: z.ZodEnum<{
|
|
3
|
+
declared: "declared";
|
|
4
|
+
"live-owned": "live-owned";
|
|
5
|
+
persisted: "persisted";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const evidenceRefSchema: z.ZodObject<{
|
|
8
|
+
kind: z.ZodEnum<{
|
|
9
|
+
file: "file";
|
|
10
|
+
git: "git";
|
|
11
|
+
"native-event": "native-event";
|
|
12
|
+
"runtime-probe": "runtime-probe";
|
|
13
|
+
}>;
|
|
14
|
+
ref: z.ZodString;
|
|
15
|
+
digest: z.ZodNullable<z.ZodString>;
|
|
16
|
+
observedAt: z.ZodISODateTime;
|
|
17
|
+
scope: z.ZodEnum<{
|
|
18
|
+
declared: "declared";
|
|
19
|
+
"live-owned": "live-owned";
|
|
20
|
+
persisted: "persisted";
|
|
21
|
+
}>;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
export type EvidenceRef = z.infer<typeof evidenceRefSchema>;
|
|
24
|
+
export type EvidenceScope = z.infer<typeof evidenceScopeSchema>;
|