@open-agent-toolkit/cli 0.2.5 → 0.2.6
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/assets/docs/cli-utilities/configuration.md +40 -0
- package/assets/docs/cli-utilities/tool-packs.md +31 -0
- package/assets/docs/workflows/projects/artifacts.md +27 -0
- package/assets/docs/workflows/skills/explainer-kit.md +125 -0
- package/assets/docs/workflows/skills/index.md +4 -0
- package/assets/migration/pjm-restructure.md +12 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/explainer-kit/SKILL.md +95 -0
- package/assets/skills/explainer-kit/examples/project-explainer/content.md +31 -0
- package/assets/skills/explainer-kit/examples/project-explainer/fact-base.md +22 -0
- package/assets/skills/explainer-kit/examples/project-recap/content.md +34 -0
- package/assets/skills/explainer-kit/examples/project-recap/fact-base.md +22 -0
- package/assets/skills/explainer-kit/examples/theme-bundle.json +87 -0
- package/assets/skills/explainer-kit/palettes/ember.json +37 -0
- package/assets/skills/explainer-kit/palettes/forest.json +37 -0
- package/assets/skills/explainer-kit/palettes/neutral.json +37 -0
- package/assets/skills/explainer-kit/palettes/ocean.json +37 -0
- package/assets/skills/explainer-kit/palettes/violet.json +37 -0
- package/assets/skills/explainer-kit/profiles/clean.json +42 -0
- package/assets/skills/explainer-kit/profiles/editorial.json +42 -0
- package/assets/skills/explainer-kit/profiles/technical.json +39 -0
- package/assets/skills/explainer-kit/recipes/engineer-tour.json +33 -0
- package/assets/skills/explainer-kit/recipes/program-recap.json +34 -0
- package/assets/skills/explainer-kit/recipes/project-explainer.json +33 -0
- package/assets/skills/explainer-kit/recipes/project-recap.json +34 -0
- package/assets/skills/explainer-kit/references/contracts.md +101 -0
- package/assets/skills/explainer-kit/references/destination-contract.md +94 -0
- package/assets/skills/explainer-kit/references/extension-contract.md +71 -0
- package/assets/skills/explainer-kit/references/fact-base-contract.md +119 -0
- package/assets/skills/explainer-kit/schemas/build-record.schema.json +92 -0
- package/assets/skills/explainer-kit/schemas/durability-evidence.schema.json +53 -0
- package/assets/skills/explainer-kit/schemas/fact-base.schema.json +129 -0
- package/assets/skills/explainer-kit/schemas/manifest.schema.json +193 -0
- package/assets/skills/explainer-kit/schemas/publish-receipt.schema.json +97 -0
- package/assets/skills/explainer-kit/schemas/publish-request.schema.json +32 -0
- package/assets/skills/explainer-kit/schemas/run-request.schema.json +132 -0
- package/assets/skills/explainer-kit/schemas/theme.schema.json +217 -0
- package/assets/skills/explainer-kit/scripts/lib/content-approval.mjs +180 -0
- package/assets/skills/explainer-kit/scripts/lib/contracts.mjs +680 -0
- package/assets/skills/explainer-kit/scripts/lib/durability.mjs +538 -0
- package/assets/skills/explainer-kit/scripts/lib/fact-base.mjs +494 -0
- package/assets/skills/explainer-kit/scripts/lib/fs-safe.mjs +218 -0
- package/assets/skills/explainer-kit/scripts/lib/qa.mjs +512 -0
- package/assets/skills/explainer-kit/scripts/lib/recipes.mjs +289 -0
- package/assets/skills/explainer-kit/scripts/lib/records.mjs +231 -0
- package/assets/skills/explainer-kit/scripts/lib/render.mjs +485 -0
- package/assets/skills/explainer-kit/scripts/lib/s3-static.mjs +587 -0
- package/assets/skills/explainer-kit/scripts/lib/safe-paths.mjs +96 -0
- package/assets/skills/explainer-kit/scripts/lib/theme.mjs +332 -0
- package/assets/skills/explainer-kit/scripts/publish.mjs +76 -0
- package/assets/skills/explainer-kit/scripts/record-durability.mjs +64 -0
- package/assets/skills/explainer-kit/scripts/render-qa.mjs +273 -0
- package/assets/skills/explainer-kit/scripts/run.mjs +778 -0
- package/assets/skills/explainer-kit/scripts/validate.mjs +59 -0
- package/assets/skills/explainer-kit/templates/deck-shell.html +233 -0
- package/assets/skills/explainer-kit/templates/diagram-shell.html +219 -0
- package/assets/skills/explainer-kit/templates/engineer-tour.html +273 -0
- package/assets/skills/explainer-kit/templates/house-style.html +218 -0
- package/assets/skills/oat-explainer-kit/SKILL.md +92 -0
- package/assets/skills/oat-explainer-kit/references/config-contract.md +67 -0
- package/assets/skills/oat-explainer-kit/references/lifecycle-contract.md +143 -0
- package/assets/skills/oat-explainer-kit/references/migration.md +143 -0
- package/assets/skills/oat-explainer-kit/scripts/bind-project-sources.mjs +103 -0
- package/assets/skills/oat-explainer-kit/scripts/check-core.mjs +127 -0
- package/assets/skills/oat-explainer-kit/scripts/finalize-tracked-run.mjs +392 -0
- package/assets/skills/oat-explainer-kit/scripts/persist-intent.mjs +130 -0
- package/assets/skills/oat-explainer-kit/scripts/resolve-config.mjs +293 -0
- package/assets/skills/oat-explainer-kit/scripts/resolve-intent.mjs +209 -0
- package/assets/skills/oat-explainer-kit/scripts/resolve-paths.mjs +166 -0
- package/assets/skills/oat-explainer-kit/scripts/run.mjs +284 -0
- package/assets/skills/oat-project-autonomous/SKILL.md +22 -1
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +5 -1
- package/assets/skills/oat-project-complete/SKILL.md +166 -28
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +5 -1
- package/assets/skills/oat-project-implement/SKILL.md +1 -1
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +17 -0
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +5 -1
- package/assets/skills/oat-project-plan/SKILL.md +30 -1
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +5 -1
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +5 -1
- package/assets/skills/oat-project-summary/SKILL.md +20 -1
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +232 -1
- package/dist/commands/init/tools/shared/skill-manifest.d.ts +2 -2
- package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.js +2 -0
- package/dist/commands/project/archive/archive-utils.d.ts +12 -0
- package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
- package/dist/commands/project/archive/archive-utils.js +320 -8
- package/dist/commands/project/archive/index.d.ts.map +1 -1
- package/dist/commands/project/archive/index.js +1 -0
- package/dist/commands/project/archive/push-runner.d.ts +1 -0
- package/dist/commands/project/archive/push-runner.d.ts.map +1 -1
- package/dist/commands/project/archive/push-runner.js +9 -2
- package/dist/config/oat-config.d.ts +26 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +88 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +18 -0
- package/dist/validation/project-state.d.ts +3 -0
- package/dist/validation/project-state.d.ts.map +1 -1
- package/dist/validation/project-state.js +91 -0
- package/package.json +2 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Wrapper extension contract
|
|
2
|
+
|
|
3
|
+
V1 freezes one destination-neutral extension seam:
|
|
4
|
+
|
|
5
|
+
1. **Pre-resolution:** the caller resolves presets, private source systems,
|
|
6
|
+
accounts, and destination topology without exposing them as public config.
|
|
7
|
+
2. **`ExplainerRunRequestV1`:** the caller translates only the inputs required
|
|
8
|
+
by `explainer-kit.run-request/v1`.
|
|
9
|
+
3. **Core run:** the caller invokes `runExplainer(request, options)` once. The
|
|
10
|
+
core owns validation, fact-base processing, content, theme, render, QA, and
|
|
11
|
+
run records.
|
|
12
|
+
4. **Manifest consumption:** the caller accepts only
|
|
13
|
+
`explainer-kit.manifest/v1`, verifies its run, recipe, and slug identity, and
|
|
14
|
+
reads built artifact paths from the manifest.
|
|
15
|
+
5. **Post-run linking:** the caller may create companion notes, synchronize
|
|
16
|
+
external documents, or maintain private links from manifest and optional
|
|
17
|
+
publish-receipt data.
|
|
18
|
+
|
|
19
|
+
Private wrappers may retain presets, vault conventions, Google Docs behavior,
|
|
20
|
+
and personal destinations around this seam. Those values are wrapper-owned;
|
|
21
|
+
they are not OAT config keys and must not be discovered by the core.
|
|
22
|
+
|
|
23
|
+
## Frozen v1 boundary
|
|
24
|
+
|
|
25
|
+
The versioned request, artifact package, manifest, build record, durability
|
|
26
|
+
request, publish request, and publish receipt are the public boundary. V1 has
|
|
27
|
+
no plugin registry and no mid-pipeline callback API for private destinations.
|
|
28
|
+
Provider-neutral callbacks already documented by the core remain explicit run
|
|
29
|
+
options; they do not transfer stage ownership to a wrapper.
|
|
30
|
+
|
|
31
|
+
V1 readers reject unsupported contract majors and identity mismatches rather
|
|
32
|
+
than guessing. Wrappers should preserve unknown future versions for diagnosis,
|
|
33
|
+
stop before post-processing, and migrate deliberately.
|
|
34
|
+
|
|
35
|
+
The compatibility smoke fixture at
|
|
36
|
+
`tools/smoke/explainer-kit/wrapper-compatibility.test.mjs` proves this sequence
|
|
37
|
+
with the actual core. It uses sanitized private-wrapper inputs and is not a
|
|
38
|
+
substitute for the operator-owned release-candidate gate.
|
|
39
|
+
|
|
40
|
+
Release-candidate execution requires the retained tarball directory explicitly:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Pre: resolve private inputs and write the external run request.
|
|
44
|
+
node tools/release/run-explainer-rc.mjs \
|
|
45
|
+
--rc-manifest /path/to/acceptance/rc.json \
|
|
46
|
+
--artifacts-dir /path/to/retained/explainer-kit-rc \
|
|
47
|
+
--entry scripts/run.mjs \
|
|
48
|
+
--record /path/to/acceptance/private-wrapper-execution.json \
|
|
49
|
+
-- --request /path/to/private/request.json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The packaged CLI stdout contract is exactly one complete JSON result document.
|
|
53
|
+
The document may be pretty-printed across lines; progress text and
|
|
54
|
+
line-delimited JSON are not part of this machine framing. The RC runner parses
|
|
55
|
+
the complete document, then binds the request, child-reported manifest, and core
|
|
56
|
+
run ID. It binds a receipt only when the packaged child itself reports that
|
|
57
|
+
output. The sanitized record does not store paths, argument values, credentials,
|
|
58
|
+
or private content.
|
|
59
|
+
|
|
60
|
+
After the core command returns, the wrapper performs its post-run publication
|
|
61
|
+
and linking work. It retains the immutable core manifest as
|
|
62
|
+
`private-wrapper-manifest.json`, the complete `PublishReceiptV1` as
|
|
63
|
+
`private-wrapper-publish-receipt.json`, and its sanitized wrapper result as
|
|
64
|
+
`private-wrapper-result.json`. The wrapper result repeats canonical hashes for
|
|
65
|
+
the request, manifest, and post-run receipt.
|
|
66
|
+
|
|
67
|
+
The wrapper acceptance stage reads those post-run files separately. It
|
|
68
|
+
validates the closed receipt contract, every manifest artifact/hash and
|
|
69
|
+
destination, the run-unique sentinel, the manifest hash, and the core run ID
|
|
70
|
+
against `private-wrapper-execution.json`. Repeating a matching hash cannot make
|
|
71
|
+
a foreign or stale receipt attributable to the packaged run.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Fact-base processing contract
|
|
2
|
+
|
|
3
|
+
`processFactBase(binding, options)` produces one
|
|
4
|
+
`explainer-kit.fact-base/v1` record plus processing diagnostics. It has no
|
|
5
|
+
provider-specific dispatch logic and reads no ambient configuration.
|
|
6
|
+
|
|
7
|
+
## Result
|
|
8
|
+
|
|
9
|
+
The function resolves to:
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
{
|
|
13
|
+
factBase, // valid explainer-kit.fact-base/v1
|
|
14
|
+
checks, // consistency/freshness diagnostics
|
|
15
|
+
critic, // critic invocation and provenance metadata
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
All claims are cited. Claims that cannot be reconciled remain in
|
|
20
|
+
`unresolvedClaims` with one of the contract's closed reason values.
|
|
21
|
+
|
|
22
|
+
## Supplied mode
|
|
23
|
+
|
|
24
|
+
Use:
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
await processFactBase({
|
|
28
|
+
mode: 'supplied',
|
|
29
|
+
freshnessPolicy: 'live-wins',
|
|
30
|
+
factBase,
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The processor validates the supplied v1 record, verifies unique source and
|
|
35
|
+
claim IDs, verifies that every citation names a declared source, verifies that
|
|
36
|
+
every override names a confirmed claim, and compares `generatedAt` plus each
|
|
37
|
+
available source `observedAt` with the freshness window. Staleness produces a
|
|
38
|
+
warning; structural or citation inconsistency rejects the input.
|
|
39
|
+
|
|
40
|
+
Supplied mode never invokes the adversarial critic. Its `critic` result is
|
|
41
|
+
`{ invoked: false, reason: 'supplied-mode-lightweight-check-only' }`.
|
|
42
|
+
|
|
43
|
+
## Federated mode
|
|
44
|
+
|
|
45
|
+
Each source document contains a schema-compatible source and extracted claims:
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
{
|
|
49
|
+
mode: 'federated',
|
|
50
|
+
freshnessPolicy: 'live-wins',
|
|
51
|
+
sourceDocuments: [{
|
|
52
|
+
source: {
|
|
53
|
+
id,
|
|
54
|
+
kind,
|
|
55
|
+
locator,
|
|
56
|
+
revision,
|
|
57
|
+
hash,
|
|
58
|
+
observedAt,
|
|
59
|
+
authoritativeFor,
|
|
60
|
+
},
|
|
61
|
+
claims: [{ id, text, locator }],
|
|
62
|
+
}],
|
|
63
|
+
overrides: [{ claimId, decision, confirmedAt }],
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
For conflicting text under one claim ID, an `authoritativeFor` declaration
|
|
68
|
+
wins first. Otherwise the newest `observedAt` wins. A tie remains
|
|
69
|
+
`contradictory`. Operator overrides take final precedence, produce an
|
|
70
|
+
`overridden` claim, remain explicit in `overrides`, and suppress critic
|
|
71
|
+
findings for that claim.
|
|
72
|
+
|
|
73
|
+
Federated processing requires `options.critic`, an asynchronous,
|
|
74
|
+
provider-neutral callback. The callback receives only data:
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
async function critic({ freshnessPolicy, sources, claims, overrides }) {
|
|
78
|
+
return {
|
|
79
|
+
criticId: 'stable-callback-id',
|
|
80
|
+
executedAt: new Date().toISOString(),
|
|
81
|
+
findings: [
|
|
82
|
+
{
|
|
83
|
+
claimId: 'status',
|
|
84
|
+
classification: 'contradictory',
|
|
85
|
+
text: 'The status sources disagree.',
|
|
86
|
+
sourceIds: ['snapshot', 'live'],
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The seam deliberately contains no provider, model, command, or dispatch
|
|
94
|
+
field. The caller owns critic execution; the core only invokes the callback
|
|
95
|
+
and integrates its returned data.
|
|
96
|
+
|
|
97
|
+
## Critic provenance
|
|
98
|
+
|
|
99
|
+
Every federated invocation adds one source:
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
{
|
|
103
|
+
id: `critic:${criticId}`,
|
|
104
|
+
kind: 'other',
|
|
105
|
+
locator: `critic-callback:${criticId}`,
|
|
106
|
+
hash: canonicalHash(criticResult),
|
|
107
|
+
observedAt: executedAt,
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The result's `critic` metadata repeats the stable critic ID, execution time,
|
|
112
|
+
source ID, and canonical result hash. Integrated findings cite both this
|
|
113
|
+
synthetic critic source and every declared source named by the finding. This
|
|
114
|
+
makes the critic's contribution auditable without exposing or depending on a
|
|
115
|
+
provider-specific implementation.
|
|
116
|
+
|
|
117
|
+
Critic classifications map directly to unresolved-claim reasons. A finding
|
|
118
|
+
removes a previously confirmed claim and creates an unresolved claim, or
|
|
119
|
+
updates an already unresolved claim while preserving its existing citations.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "explainer-kit.build-record/v1",
|
|
4
|
+
"title": "BuildRecordV1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"runId",
|
|
10
|
+
"renderStrategy",
|
|
11
|
+
"startedAt",
|
|
12
|
+
"stages",
|
|
13
|
+
"outcome"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"schemaVersion": { "const": "explainer-kit.build-record/v1" },
|
|
17
|
+
"runId": { "type": "string", "minLength": 1 },
|
|
18
|
+
"renderStrategy": { "enum": ["default-only", "user-switchable"] },
|
|
19
|
+
"startedAt": { "type": "string", "format": "date-time" },
|
|
20
|
+
"completedAt": { "type": "string", "format": "date-time" },
|
|
21
|
+
"stages": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": { "$ref": "#/$defs/stage" },
|
|
24
|
+
"minItems": 1
|
|
25
|
+
},
|
|
26
|
+
"outcome": {
|
|
27
|
+
"enum": ["built-durable", "built-not-durable", "failed", "incomplete"]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"$defs": {
|
|
31
|
+
"safeRelativePath": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1,
|
|
34
|
+
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"
|
|
35
|
+
},
|
|
36
|
+
"error": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["code", "message", "recovery"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"code": { "type": "string", "minLength": 1 },
|
|
42
|
+
"message": { "type": "string", "minLength": 1 },
|
|
43
|
+
"recovery": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "type": "string", "minLength": 1 },
|
|
46
|
+
"minItems": 1
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"stage": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["id", "status", "outputPaths", "warnings"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"id": {
|
|
56
|
+
"enum": [
|
|
57
|
+
"validate",
|
|
58
|
+
"fact-base",
|
|
59
|
+
"content",
|
|
60
|
+
"theme",
|
|
61
|
+
"render",
|
|
62
|
+
"qa",
|
|
63
|
+
"durability",
|
|
64
|
+
"publish"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"status": {
|
|
68
|
+
"enum": [
|
|
69
|
+
"pending",
|
|
70
|
+
"running",
|
|
71
|
+
"passed",
|
|
72
|
+
"warned",
|
|
73
|
+
"failed",
|
|
74
|
+
"skipped"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"startedAt": { "type": "string", "format": "date-time" },
|
|
78
|
+
"completedAt": { "type": "string", "format": "date-time" },
|
|
79
|
+
"outputPaths": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"items": { "$ref": "#/$defs/safeRelativePath" },
|
|
82
|
+
"uniqueItems": true
|
|
83
|
+
},
|
|
84
|
+
"warnings": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": { "type": "string", "minLength": 1 }
|
|
87
|
+
},
|
|
88
|
+
"error": { "$ref": "#/$defs/error" }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "explainer-kit.durability-evidence/v1",
|
|
4
|
+
"title": "DurabilityEvidenceRequestV1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "manifestPath", "evidence"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": {
|
|
10
|
+
"const": "explainer-kit.durability-evidence/v1"
|
|
11
|
+
},
|
|
12
|
+
"manifestPath": { "type": "string", "minLength": 1 },
|
|
13
|
+
"evidence": {
|
|
14
|
+
"oneOf": [
|
|
15
|
+
{
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["kind", "repoRoot", "commit", "paths"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"kind": { "const": "commit" },
|
|
21
|
+
"repoRoot": { "type": "string", "minLength": 1 },
|
|
22
|
+
"commit": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^[a-f0-9]{7,64}$"
|
|
25
|
+
},
|
|
26
|
+
"paths": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": { "$ref": "#/$defs/safeRelativePath" },
|
|
29
|
+
"minItems": 1,
|
|
30
|
+
"uniqueItems": true
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["kind", "receiptPath"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"kind": { "const": "publish" },
|
|
40
|
+
"receiptPath": { "type": "string", "minLength": 1 }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"$defs": {
|
|
47
|
+
"safeRelativePath": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "explainer-kit.fact-base/v1",
|
|
4
|
+
"title": "FactBaseV1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"generatedAt",
|
|
10
|
+
"mode",
|
|
11
|
+
"freshnessPolicy",
|
|
12
|
+
"sources",
|
|
13
|
+
"claims",
|
|
14
|
+
"unresolvedClaims",
|
|
15
|
+
"overrides"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schemaVersion": { "const": "explainer-kit.fact-base/v1" },
|
|
19
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
20
|
+
"mode": { "enum": ["supplied", "federated"] },
|
|
21
|
+
"freshnessPolicy": { "const": "live-wins" },
|
|
22
|
+
"sources": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": { "$ref": "#/$defs/source" },
|
|
25
|
+
"minItems": 1,
|
|
26
|
+
"uniqueItems": true
|
|
27
|
+
},
|
|
28
|
+
"claims": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": { "$ref": "#/$defs/claim" },
|
|
31
|
+
"uniqueItems": true
|
|
32
|
+
},
|
|
33
|
+
"unresolvedClaims": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": { "$ref": "#/$defs/unresolvedClaim" },
|
|
36
|
+
"uniqueItems": true
|
|
37
|
+
},
|
|
38
|
+
"overrides": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": { "$ref": "#/$defs/override" },
|
|
41
|
+
"uniqueItems": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"$defs": {
|
|
45
|
+
"hash": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
48
|
+
},
|
|
49
|
+
"source": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["id", "kind", "locator", "hash"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"id": { "type": "string", "minLength": 1 },
|
|
55
|
+
"kind": {
|
|
56
|
+
"enum": ["file", "directory", "git", "github", "session", "other"]
|
|
57
|
+
},
|
|
58
|
+
"locator": { "type": "string", "minLength": 1 },
|
|
59
|
+
"role": { "type": "string", "minLength": 1 },
|
|
60
|
+
"sourceSetId": { "type": "string", "minLength": 1 },
|
|
61
|
+
"revision": { "type": "string", "minLength": 1 },
|
|
62
|
+
"hash": { "$ref": "#/$defs/hash" },
|
|
63
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
64
|
+
"authoritativeFor": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": { "type": "string", "minLength": 1 },
|
|
67
|
+
"uniqueItems": true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"citation": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["sourceId", "locator"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"sourceId": { "type": "string", "minLength": 1 },
|
|
77
|
+
"locator": { "type": "string", "minLength": 1 }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"claim": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["id", "text", "status", "citations"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"id": { "type": "string", "minLength": 1 },
|
|
86
|
+
"text": { "type": "string", "minLength": 1 },
|
|
87
|
+
"status": { "enum": ["confirmed", "overridden"] },
|
|
88
|
+
"citations": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": { "$ref": "#/$defs/citation" },
|
|
91
|
+
"minItems": 1,
|
|
92
|
+
"uniqueItems": true
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"unresolvedClaim": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"required": ["id", "text", "reason", "citations"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"id": { "type": "string", "minLength": 1 },
|
|
102
|
+
"text": { "type": "string", "minLength": 1 },
|
|
103
|
+
"reason": {
|
|
104
|
+
"enum": [
|
|
105
|
+
"contradictory",
|
|
106
|
+
"stale",
|
|
107
|
+
"missing-evidence",
|
|
108
|
+
"needs-confirmation"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"citations": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": { "$ref": "#/$defs/citation" },
|
|
114
|
+
"uniqueItems": true
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"override": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"required": ["claimId", "decision", "confirmedAt"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"claimId": { "type": "string", "minLength": 1 },
|
|
124
|
+
"decision": { "type": "string", "minLength": 1 },
|
|
125
|
+
"confirmedAt": { "type": "string", "format": "date-time" }
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "explainer-kit.manifest/v1",
|
|
4
|
+
"title": "ArtifactManifestV1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"runId",
|
|
10
|
+
"slug",
|
|
11
|
+
"recipe",
|
|
12
|
+
"createdAt",
|
|
13
|
+
"source",
|
|
14
|
+
"theme",
|
|
15
|
+
"artifacts",
|
|
16
|
+
"immutableHashes",
|
|
17
|
+
"outcome",
|
|
18
|
+
"buildRecord",
|
|
19
|
+
"warnings"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"schemaVersion": { "const": "explainer-kit.manifest/v1" },
|
|
23
|
+
"runId": { "type": "string", "minLength": 1 },
|
|
24
|
+
"slug": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
27
|
+
},
|
|
28
|
+
"recipe": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["id", "version"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"id": { "type": "string", "minLength": 1 },
|
|
34
|
+
"version": { "type": "string", "minLength": 1 }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
38
|
+
"source": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["factBasePath", "factBaseHash", "inputHashes"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"factBasePath": { "$ref": "#/$defs/safeRelativePath" },
|
|
44
|
+
"factBaseHash": { "$ref": "#/$defs/hash" },
|
|
45
|
+
"sourceRevision": { "type": "string", "minLength": 1 },
|
|
46
|
+
"inputHashes": { "$ref": "#/$defs/hashMap" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"theme": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["path", "hash", "derived"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"path": { "const": "theme.resolved.json" },
|
|
55
|
+
"hash": { "$ref": "#/$defs/hash" },
|
|
56
|
+
"derived": { "type": "boolean" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"artifacts": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": { "$ref": "#/$defs/artifactEntry" },
|
|
62
|
+
"uniqueItems": true
|
|
63
|
+
},
|
|
64
|
+
"immutableHashes": { "$ref": "#/$defs/hashMap" },
|
|
65
|
+
"outcome": {
|
|
66
|
+
"enum": ["built-durable", "built-not-durable", "failed", "incomplete"]
|
|
67
|
+
},
|
|
68
|
+
"buildRecord": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": ["path", "hash"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"path": { "const": "build-record.json" },
|
|
74
|
+
"hash": { "$ref": "#/$defs/hash" }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"publishReceipt": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"required": ["path", "hash"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"path": { "const": "publish-receipt.json" },
|
|
83
|
+
"hash": { "$ref": "#/$defs/hash" }
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"warnings": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": { "type": "string", "minLength": 1 }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"$defs": {
|
|
92
|
+
"hash": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
95
|
+
},
|
|
96
|
+
"safeRelativePath": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"
|
|
100
|
+
},
|
|
101
|
+
"hashMap": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"propertyNames": { "$ref": "#/$defs/safeRelativePath" },
|
|
104
|
+
"additionalProperties": { "$ref": "#/$defs/hash" }
|
|
105
|
+
},
|
|
106
|
+
"failure": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["code", "message", "recovery"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"code": { "type": "string", "minLength": 1 },
|
|
112
|
+
"message": { "type": "string", "minLength": 1 },
|
|
113
|
+
"recovery": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": { "type": "string", "minLength": 1 },
|
|
116
|
+
"minItems": 1
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"durableEvidence": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"required": ["kind", "ref", "paths", "attestedAt"],
|
|
124
|
+
"properties": {
|
|
125
|
+
"kind": { "enum": ["commit", "publish"] },
|
|
126
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
127
|
+
"paths": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": { "$ref": "#/$defs/safeRelativePath" },
|
|
130
|
+
"minItems": 1,
|
|
131
|
+
"uniqueItems": true
|
|
132
|
+
},
|
|
133
|
+
"attestedAt": { "type": "string", "format": "date-time" },
|
|
134
|
+
"supersedes": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false,
|
|
137
|
+
"required": ["ref", "paths"],
|
|
138
|
+
"properties": {
|
|
139
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
140
|
+
"paths": {
|
|
141
|
+
"type": "array",
|
|
142
|
+
"items": { "$ref": "#/$defs/safeRelativePath" },
|
|
143
|
+
"minItems": 1,
|
|
144
|
+
"uniqueItems": true
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"rebuild": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"required": ["argv", "cwd", "inputHashes"],
|
|
154
|
+
"properties": {
|
|
155
|
+
"argv": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": { "type": "string" },
|
|
158
|
+
"minItems": 1
|
|
159
|
+
},
|
|
160
|
+
"cwd": { "type": "string", "minLength": 1 },
|
|
161
|
+
"inputHashes": { "$ref": "#/$defs/hashMap" }
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"artifactEntry": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": ["id", "type", "contentPath", "status", "rebuildable"],
|
|
168
|
+
"properties": {
|
|
169
|
+
"id": { "type": "string", "minLength": 1 },
|
|
170
|
+
"type": { "enum": ["hub", "diagram", "explainer", "deck", "catalog"] },
|
|
171
|
+
"contentPath": { "$ref": "#/$defs/safeRelativePath" },
|
|
172
|
+
"renderedPath": {
|
|
173
|
+
"allOf": [
|
|
174
|
+
{ "$ref": "#/$defs/safeRelativePath" },
|
|
175
|
+
{ "pattern": "^site/" }
|
|
176
|
+
],
|
|
177
|
+
"pattern": "^site/"
|
|
178
|
+
},
|
|
179
|
+
"mediaType": { "type": "string", "minLength": 1 },
|
|
180
|
+
"status": { "enum": ["built", "failed", "skipped"] },
|
|
181
|
+
"hash": { "$ref": "#/$defs/hash" },
|
|
182
|
+
"rebuildable": { "type": "boolean" },
|
|
183
|
+
"rebuild": { "$ref": "#/$defs/rebuild" },
|
|
184
|
+
"durableEvidence": {
|
|
185
|
+
"type": "array",
|
|
186
|
+
"items": { "$ref": "#/$defs/durableEvidence" },
|
|
187
|
+
"uniqueItems": true
|
|
188
|
+
},
|
|
189
|
+
"failure": { "$ref": "#/$defs/failure" }
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|