agentskeptic 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/dist/discovery-payload-v1.json +3 -1
- package/dist/publicDistribution.generated.d.ts +1 -1
- package/dist/publicDistribution.generated.js +1 -1
- package/dist/registryDraft/bootstrapArgsMerge.d.ts +5 -0
- package/dist/registryDraft/bootstrapArgsMerge.d.ts.map +1 -0
- package/dist/registryDraft/bootstrapArgsMerge.js +43 -0
- package/dist/registryDraft/bootstrapArgsMerge.js.map +1 -0
- package/dist/registryDraft/buildRegistryDraftPrompt.d.ts.map +1 -1
- package/dist/registryDraft/buildRegistryDraftPrompt.js +3 -2
- package/dist/registryDraft/buildRegistryDraftPrompt.js.map +1 -1
- package/dist/registryDraft/buildRegistryDraftPrompt.test.js +1 -0
- package/dist/registryDraft/buildRegistryDraftPrompt.test.js.map +1 -1
- package/dist/registryDraft/createRegistryDraftAjv.js +2 -2
- package/dist/registryDraft/createRegistryDraftAjv.js.map +1 -1
- package/dist/registryDraft/draftEnv.d.ts +20 -0
- package/dist/registryDraft/draftEnv.d.ts.map +1 -0
- package/dist/registryDraft/draftEnv.js +47 -0
- package/dist/registryDraft/draftEnv.js.map +1 -0
- package/dist/registryDraft/engine.d.ts +26 -0
- package/dist/registryDraft/engine.d.ts.map +1 -0
- package/dist/registryDraft/engine.js +149 -0
- package/dist/registryDraft/engine.js.map +1 -0
- package/dist/registryDraft/index.d.ts +5 -1
- package/dist/registryDraft/index.d.ts.map +1 -1
- package/dist/registryDraft/index.js +3 -0
- package/dist/registryDraft/index.js.map +1 -1
- package/dist/registryDraft/jsonPointer.d.ts +8 -0
- package/dist/registryDraft/jsonPointer.d.ts.map +1 -0
- package/dist/registryDraft/jsonPointer.js +56 -0
- package/dist/registryDraft/jsonPointer.js.map +1 -0
- package/dist/registryDraft/parseAndNormalizeRegistryDraftRequest.d.ts +3 -0
- package/dist/registryDraft/parseAndNormalizeRegistryDraftRequest.d.ts.map +1 -1
- package/dist/registryDraft/parseAndNormalizeRegistryDraftRequest.js +3 -1
- package/dist/registryDraft/parseAndNormalizeRegistryDraftRequest.js.map +1 -1
- package/dist/registryDraft/providers/hosted_openai.d.ts +15 -0
- package/dist/registryDraft/providers/hosted_openai.d.ts.map +1 -0
- package/dist/registryDraft/providers/hosted_openai.js +77 -0
- package/dist/registryDraft/providers/hosted_openai.js.map +1 -0
- package/dist/registryDraft/providers/local_ollama.d.ts +14 -0
- package/dist/registryDraft/providers/local_ollama.d.ts.map +1 -0
- package/dist/registryDraft/providers/local_ollama.js +78 -0
- package/dist/registryDraft/providers/local_ollama.js.map +1 -0
- package/dist/registryDraft/readiness.d.ts +16 -0
- package/dist/registryDraft/readiness.d.ts.map +1 -0
- package/dist/registryDraft/readiness.js +58 -0
- package/dist/registryDraft/readiness.js.map +1 -0
- package/dist/registryDraft/runRegistryDraftCli.d.ts +2 -0
- package/dist/registryDraft/runRegistryDraftCli.d.ts.map +1 -0
- package/dist/registryDraft/runRegistryDraftCli.js +100 -0
- package/dist/registryDraft/runRegistryDraftCli.js.map +1 -0
- package/dist/schema-validation.test.js +37 -0
- package/dist/schema-validation.test.js.map +1 -1
- package/dist/schemaLoad.d.ts +1 -1
- package/dist/schemaLoad.d.ts.map +1 -1
- package/dist/schemaLoad.js +2 -0
- package/dist/schemaLoad.js.map +1 -1
- package/package.json +9 -3
- package/schemas/contract/v1.json +65 -0
- package/schemas/contract-manifest.schema.json +130 -0
- package/schemas/openapi-commercial-v1.in.yaml +4 -0
- package/schemas/openapi-commercial-v1.yaml +5 -1
- package/schemas/registry-draft-llm-partial-v1.schema.json +18 -4
- package/schemas/registry-draft-request-v1.schema.json +11 -0
- package/schemas/registry-draft-response.schema.json +89 -0
- package/scripts/discovery-payload.lib.cjs +6 -0
- package/scripts/emit-primary-marketing.cjs +25 -0
- package/schemas/registry-draft-response-v2.schema.json +0 -52
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentskeptic.com/schemas/registry-draft-response.schema.json",
|
|
4
|
+
"title": "RegistryDraftResponseEnvelope",
|
|
5
|
+
"description": "Single SSOT envelope for assisted registry-draft (HTTP 200 success). Breaking change from deprecated v2.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"draft",
|
|
11
|
+
"assumptions",
|
|
12
|
+
"warnings",
|
|
13
|
+
"disclaimer",
|
|
14
|
+
"generation",
|
|
15
|
+
"quickIngestInput",
|
|
16
|
+
"readiness"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"schemaVersion": { "type": "integer", "const": 3 },
|
|
20
|
+
"draft": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["tools"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"tools": {
|
|
26
|
+
"$ref": "https://agentskeptic.com/schemas/tools-registry.schema.json"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"assumptions": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": { "type": "string" }
|
|
33
|
+
},
|
|
34
|
+
"warnings": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": { "type": "string" }
|
|
37
|
+
},
|
|
38
|
+
"disclaimer": { "type": "string", "minLength": 1 },
|
|
39
|
+
"generation": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["backend", "model"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"backend": { "type": "string", "enum": ["hosted_openai", "local_ollama"] },
|
|
45
|
+
"model": { "type": "string", "minLength": 1 }
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"quickIngestInput": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": ["encoding", "body"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"encoding": { "type": "string", "const": "utf8" },
|
|
54
|
+
"body": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"maxLength": 65536,
|
|
57
|
+
"description": "Deterministic NDJSON from normalized bootstrap pack (synthesizeQuickInputUtf8FromOpenAiV1)."
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"readiness": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["status", "reasons"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"status": { "type": "string", "enum": ["ready", "review", "blocked"] },
|
|
67
|
+
"reasons": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "type": "string", "enum": ["REGISTRY_INVALID", "MERGE_FAILED", "MODEL_NON_JSON", "POINTERS_UNRESOLVED", "ASSUMPTIONS_PRESENT", "WARNINGS_PRESENT", "OK"] }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"diagnostics": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"description": "Optional structured hints; typically empty when readiness is ready or review.",
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"required": ["code", "message"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"instancePath": { "type": "string" },
|
|
82
|
+
"code": { "type": "string" },
|
|
83
|
+
"message": { "type": "string" },
|
|
84
|
+
"suggestedFix": { "type": "string" }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -145,6 +145,8 @@ function buildDiscoveryPayload(root) {
|
|
|
145
145
|
const llmsBlob = `https://github.com/${owner}/${repo}/blob/${DISCOVERY_LLM_BRANCH}/llms.txt`;
|
|
146
146
|
const integratorGuideSsotRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/docs/integrate.md`;
|
|
147
147
|
const openapiRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/schemas/openapi-commercial-v1.yaml`;
|
|
148
|
+
const contractManifestCanonical = `${canonicalOrigin}/contract/v1.json`;
|
|
149
|
+
const contractManifestRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${DISCOVERY_LLM_BRANCH}/schemas/contract/v1.json`;
|
|
148
150
|
const llms = /** @type {{ intentPhrases: string[]; notFor: string[]; relatedQueries: string[] }} */ (
|
|
149
151
|
discovery.llms
|
|
150
152
|
);
|
|
@@ -164,6 +166,8 @@ function buildDiscoveryPayload(root) {
|
|
|
164
166
|
llmsRaw,
|
|
165
167
|
llmsBlob,
|
|
166
168
|
integratorGuideSsotRaw,
|
|
169
|
+
contractManifestCanonical,
|
|
170
|
+
contractManifestRaw,
|
|
167
171
|
},
|
|
168
172
|
appendix: {
|
|
169
173
|
slug: String(discovery.slug),
|
|
@@ -255,6 +259,8 @@ function renderLlmsTextFromPayload(payload) {
|
|
|
255
259
|
`- Source repository: ${links.repo}`,
|
|
256
260
|
`- npm package: ${links.npm}`,
|
|
257
261
|
`- llms.txt (repo raw): ${links.llmsRaw}`,
|
|
262
|
+
`- Verification Contract Manifest (canonical): ${links.contractManifestCanonical}`,
|
|
263
|
+
`- Verification Contract Manifest (repo raw): ${links.contractManifestRaw}`,
|
|
258
264
|
"",
|
|
259
265
|
];
|
|
260
266
|
const base = lines.join("\n");
|
|
@@ -29,8 +29,23 @@ const TOKENS = [
|
|
|
29
29
|
"__DISTRIBUTION_NPM_URL__",
|
|
30
30
|
"__OPENAPI_SELF_URL__",
|
|
31
31
|
"__SERVERS_ORIGIN__",
|
|
32
|
+
"__CONTRACT_URL__",
|
|
33
|
+
"__CONTRACT_VERSION__",
|
|
34
|
+
"__CONTRACT_SHA__",
|
|
32
35
|
];
|
|
33
36
|
|
|
37
|
+
const CONTRACT_MANIFEST_PATH = join(ROOT, "schemas", "contract", "v1.json");
|
|
38
|
+
|
|
39
|
+
function loadContractManifestPin() {
|
|
40
|
+
const m = JSON.parse(readFileSync(CONTRACT_MANIFEST_PATH, "utf8"));
|
|
41
|
+
const head = m.history[m.history.length - 1];
|
|
42
|
+
return {
|
|
43
|
+
url: String(m.publicUrl),
|
|
44
|
+
version: String(head.manifestVersion),
|
|
45
|
+
manifestSha256: String(head.manifestSha256),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
34
49
|
/**
|
|
35
50
|
* @param {string} haystack
|
|
36
51
|
* @param {string} needle
|
|
@@ -148,6 +163,8 @@ function writeAgentsMd(anchors, discovery) {
|
|
|
148
163
|
const branch = dp.DISCOVERY_LLM_BRANCH;
|
|
149
164
|
const llmsRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${branch}/llms.txt`;
|
|
150
165
|
const openapiRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${branch}/schemas/openapi-commercial-v1.yaml`;
|
|
166
|
+
const contractRaw = `https://raw.githubusercontent.com/${owner}/${repo}/refs/heads/${branch}/schemas/contract/v1.json`;
|
|
167
|
+
const contractPin = loadContractManifestPin();
|
|
151
168
|
const body = `# AGENTS
|
|
152
169
|
|
|
153
170
|
Normative **public distribution** and anchor sync: [\`docs/public-distribution.md\`](docs/public-distribution.md) (same content as ${url}).
|
|
@@ -157,6 +174,8 @@ Normative **public distribution** and anchor sync: [\`docs/public-distribution.m
|
|
|
157
174
|
- Committed \`llms.txt\` at repo root (same bytes as site \`/llms.txt\` after prebuild sync).
|
|
158
175
|
- Raw GitHub \`llms.txt\`: ${llmsRaw}
|
|
159
176
|
- OpenAPI YAML (repo raw): ${openapiRaw}
|
|
177
|
+
- Verification Contract Manifest (canonical): ${contractPin.url}
|
|
178
|
+
- Verification Contract Manifest (repo raw): ${contractRaw}
|
|
160
179
|
- Acquisition page (canonical): ${acquisitionUrl}
|
|
161
180
|
`;
|
|
162
181
|
writeFileSync(join(ROOT, "AGENTS.md"), body, "utf8");
|
|
@@ -189,6 +208,8 @@ function syncPrimaryMarketing() {
|
|
|
189
208
|
if (!productSemver) {
|
|
190
209
|
throw new Error("emit-primary-marketing: package.json missing version (OpenAPI __PRODUCT_VERSION__)");
|
|
191
210
|
}
|
|
211
|
+
const contractPin = loadContractManifestPin();
|
|
212
|
+
|
|
192
213
|
let mid = template;
|
|
193
214
|
mid = mid.replace(PRODUCT_VERSION_TOKEN, JSON.stringify(productSemver));
|
|
194
215
|
mid = mid.replace("__IDENTITY_ONE_LINER__", escaped);
|
|
@@ -196,6 +217,9 @@ function syncPrimaryMarketing() {
|
|
|
196
217
|
mid = mid.replace("__DISTRIBUTION_INTEGRATE_URL__", integrateUrl);
|
|
197
218
|
mid = mid.replace("__DISTRIBUTION_REPO_URL__", anchors.gitRepositoryUrl);
|
|
198
219
|
mid = mid.replace("__DISTRIBUTION_NPM_URL__", anchors.npmPackageUrl);
|
|
220
|
+
mid = mid.replace("__CONTRACT_URL__", contractPin.url);
|
|
221
|
+
mid = mid.replace("__CONTRACT_VERSION__", JSON.stringify(contractPin.version));
|
|
222
|
+
mid = mid.replace("__CONTRACT_SHA__", JSON.stringify(contractPin.manifestSha256));
|
|
199
223
|
|
|
200
224
|
const repoYaml = mid
|
|
201
225
|
.replace("__SERVERS_ORIGIN__", canonicalOrigin)
|
|
@@ -264,6 +288,7 @@ function syncPrimaryMarketing() {
|
|
|
264
288
|
`- **Canonical site:** ${canonicalOrigin}`,
|
|
265
289
|
`- **Integrate:** ${integrateUrl}`,
|
|
266
290
|
`- **OpenAPI (canonical):** ${openapiSelfCanonical}`,
|
|
291
|
+
`- **Verification Contract Manifest:** ${contractPin.url}`,
|
|
267
292
|
`- **llms.txt (agents, site):** ${canonicalOrigin}/llms.txt`,
|
|
268
293
|
`- **llms.txt (repo, raw):** ${pl.llmsRaw}`,
|
|
269
294
|
`- **llms.txt (repo, blob):** ${pl.llmsBlob}`,
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://agentskeptic.com/schemas/registry-draft-response-v2.schema.json",
|
|
4
|
-
"title": "RegistryDraftResponseEnvelopeV2",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"additionalProperties": false,
|
|
7
|
-
"required": ["schemaVersion", "draft", "assumptions", "warnings", "disclaimer", "model", "quickIngestInput"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"schemaVersion": { "type": "integer", "const": 2 },
|
|
10
|
-
"draft": {
|
|
11
|
-
"type": "object",
|
|
12
|
-
"additionalProperties": false,
|
|
13
|
-
"required": ["tools"],
|
|
14
|
-
"properties": {
|
|
15
|
-
"tools": {
|
|
16
|
-
"$ref": "https://agentskeptic.com/schemas/tools-registry.schema.json"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"assumptions": {
|
|
21
|
-
"type": "array",
|
|
22
|
-
"items": { "type": "string" }
|
|
23
|
-
},
|
|
24
|
-
"warnings": {
|
|
25
|
-
"type": "array",
|
|
26
|
-
"items": { "type": "string" }
|
|
27
|
-
},
|
|
28
|
-
"disclaimer": { "type": "string", "minLength": 1 },
|
|
29
|
-
"model": {
|
|
30
|
-
"type": "object",
|
|
31
|
-
"additionalProperties": false,
|
|
32
|
-
"required": ["provider", "model"],
|
|
33
|
-
"properties": {
|
|
34
|
-
"provider": { "type": "string", "const": "openai" },
|
|
35
|
-
"model": { "type": "string", "minLength": 1 }
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"quickIngestInput": {
|
|
39
|
-
"type": "object",
|
|
40
|
-
"additionalProperties": false,
|
|
41
|
-
"required": ["encoding", "body"],
|
|
42
|
-
"properties": {
|
|
43
|
-
"encoding": { "type": "string", "const": "utf8" },
|
|
44
|
-
"body": {
|
|
45
|
-
"type": "string",
|
|
46
|
-
"maxLength": 65536,
|
|
47
|
-
"description": "NDJSON in quick ingest form; same cap tier as HTTP request body for registry-draft."
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|