@codai/axiom-mcp 2.0.0 → 2.1.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 +57 -6
- package/dist/axm-lazy-CR-FmFVd.js +6255 -0
- package/dist/axm-lazy.js +81 -2
- package/dist/cli-main.js +2315 -264
- package/dist/dist-FFqnyzCe.js +6141 -0
- package/dist/gate-lazy.js +77 -1
- package/dist/http-lazy.js +15154 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +411 -21
- package/dist/lib-CqHwM4m_.js +3884 -0
- package/dist/migrate-lazy.js +6472 -0
- package/package.json +9 -7
- package/spec/codai-tools.json +65 -2
- package/spec/tools.json +324 -2
package/dist/axm-lazy.js
CHANGED
|
@@ -5809,6 +5809,12 @@ const ERROR_CODES = [
|
|
|
5809
5809
|
"ERR_PROVIDER_FAILED",
|
|
5810
5810
|
"ERR_GUARD_TIMEOUT",
|
|
5811
5811
|
"ERR_GUARD_OUTPUT",
|
|
5812
|
+
"ERR_SIGNATURE_MISSING",
|
|
5813
|
+
"ERR_SIGNATURE_INVALID",
|
|
5814
|
+
"ERR_ROLLBACK",
|
|
5815
|
+
"ERR_EMITTER_UNKNOWN",
|
|
5816
|
+
"ERR_TEMPLATE_UNKNOWN",
|
|
5817
|
+
"ERR_TEMPLATE_PARAMS",
|
|
5812
5818
|
"ERR_GIT_NOT_FOUND",
|
|
5813
5819
|
"ERR_GIT_NOT_REPO",
|
|
5814
5820
|
"ERR_GIT_DIRTY",
|
|
@@ -5816,6 +5822,9 @@ const ERROR_CODES = [
|
|
|
5816
5822
|
"ERR_GIT_BRANCH_INVALID",
|
|
5817
5823
|
"ERR_GIT_FAILED",
|
|
5818
5824
|
"ERR_REF_OFFLINE",
|
|
5825
|
+
"ERR_NET_DISABLED",
|
|
5826
|
+
"ERR_NET_DENIED",
|
|
5827
|
+
"ERR_NET_FAILED",
|
|
5819
5828
|
"ERR_NOT_CANONICAL",
|
|
5820
5829
|
"ERR_UNSUPPORTED_OP",
|
|
5821
5830
|
"ERR_INTERNAL"
|
|
@@ -5981,6 +5990,8 @@ const PlanSchema = object({
|
|
|
5981
5990
|
capabilities: array(CapabilitySchema).default([]),
|
|
5982
5991
|
artifacts: array(PlanArtifactSchema).min(1).max(2e3),
|
|
5983
5992
|
checks: array(CheckRefSchema).default([]),
|
|
5993
|
+
/** Anti-rollback counter (D-16); copied verbatim into `ManifestBody.counter`. */
|
|
5994
|
+
counter: int().nonnegative().optional(),
|
|
5984
5995
|
metadata: record(string(), json()).default({})
|
|
5985
5996
|
}).strict();
|
|
5986
5997
|
const ErrorCodeSchema = _enum(ERROR_CODES);
|
|
@@ -6120,7 +6131,12 @@ const ManifestBodySchema = object({
|
|
|
6120
6131
|
artifacts: array(ManifestArtifactSchema).min(1).max(2e3),
|
|
6121
6132
|
/** Sorted by id, unique (§2.4 determinism). */
|
|
6122
6133
|
checks: array(CheckRefSchema),
|
|
6123
|
-
toolchain: ToolchainSchema
|
|
6134
|
+
toolchain: ToolchainSchema,
|
|
6135
|
+
/**
|
|
6136
|
+
* Anti-rollback counter (D-16): monotonic per root, part of the canonical body so a
|
|
6137
|
+
* signature binds it. Verified by `manifest.requireSigned { antiRollback: true }`.
|
|
6138
|
+
*/
|
|
6139
|
+
counter: int().nonnegative().optional()
|
|
6124
6140
|
}).strict().superRefine((m, ctx) => {
|
|
6125
6141
|
if (!isSortedUnique(m.artifacts.map((a) => a.path))) ctx.addIssue({
|
|
6126
6142
|
code: "custom",
|
|
@@ -6155,7 +6171,7 @@ const InTotoStatementLooseSchema = object({
|
|
|
6155
6171
|
predicateType: url(),
|
|
6156
6172
|
predicate: record(string(), unknown())
|
|
6157
6173
|
}).strict();
|
|
6158
|
-
/** DSSE envelope (secure-systems-lab/dsse v1.0.2). */
|
|
6174
|
+
/** DSSE envelope (secure-systems-lab/dsse v1.0.2) around an in-toto attestation. */
|
|
6159
6175
|
const DsseEnvelopeSchema = object({
|
|
6160
6176
|
payloadType: literal("application/vnd.in-toto+json"),
|
|
6161
6177
|
payload: base64(),
|
|
@@ -6164,11 +6180,48 @@ const DsseEnvelopeSchema = object({
|
|
|
6164
6180
|
sig: base64()
|
|
6165
6181
|
}).strict())
|
|
6166
6182
|
}).strict();
|
|
6183
|
+
/**
|
|
6184
|
+
* DSSE envelope whose payload is `base64(JCS(manifest))`, signed with Ed25519 (D-16).
|
|
6185
|
+
* Lives outside the canonical body: `manifestDigest` is unchanged whether signed or not.
|
|
6186
|
+
*/
|
|
6187
|
+
const ManifestSignatureSchema = object({
|
|
6188
|
+
payloadType: literal("application/vnd.axiom.manifest+json"),
|
|
6189
|
+
payload: base64(),
|
|
6190
|
+
signatures: array(object({
|
|
6191
|
+
keyid: string().optional(),
|
|
6192
|
+
sig: base64()
|
|
6193
|
+
}).strict()).min(1)
|
|
6194
|
+
}).strict();
|
|
6195
|
+
/** `.axiom/trust/keys.json` — the per-root allowlist of signing keys (D-16). */
|
|
6196
|
+
const TrustedKeySchema = object({
|
|
6197
|
+
/** sha256(raw 32-byte public key), lowercase hex. */
|
|
6198
|
+
keyid: string().regex(/^[0-9a-f]{64}$/),
|
|
6199
|
+
alg: literal("ed25519"),
|
|
6200
|
+
/** base64 of the raw 32-byte Ed25519 public key. */
|
|
6201
|
+
publicKey: base64(),
|
|
6202
|
+
name: string().min(1).max(200).optional(),
|
|
6203
|
+
/** Lowest manifest `counter` this key may sign for. */
|
|
6204
|
+
notBefore: int().nonnegative().optional()
|
|
6205
|
+
}).strict();
|
|
6206
|
+
object({
|
|
6207
|
+
version: literal(1),
|
|
6208
|
+
keys: array(TrustedKeySchema),
|
|
6209
|
+
/** Floor for `counter` when no state has been recorded yet. */
|
|
6210
|
+
minCounter: int().nonnegative().optional()
|
|
6211
|
+
}).strict();
|
|
6212
|
+
object({
|
|
6213
|
+
version: literal(1),
|
|
6214
|
+
lastCounter: int().nonnegative(),
|
|
6215
|
+
/** Digest of the manifest that advanced `lastCounter` (informational). */
|
|
6216
|
+
manifestDigest: DigestRefSchema.optional()
|
|
6217
|
+
}).strict();
|
|
6167
6218
|
object({
|
|
6168
6219
|
manifest: ManifestBodySchema,
|
|
6169
6220
|
manifestDigest: DigestRefSchema,
|
|
6170
6221
|
attestation: InTotoStatementLooseSchema.optional(),
|
|
6171
6222
|
envelope: DsseEnvelopeSchema.optional(),
|
|
6223
|
+
/** Detached DSSE signatures over `manifest` (D-16). Not part of `manifestDigest`. */
|
|
6224
|
+
signatures: array(ManifestSignatureSchema).optional(),
|
|
6172
6225
|
/** Inline side-channel keyed by `sha256:<hex>`. */
|
|
6173
6226
|
blobs: record(DigestRefSchema, BlobSchema).default({})
|
|
6174
6227
|
}).strict().superRefine((b, ctx) => {
|
|
@@ -6204,6 +6257,32 @@ object({
|
|
|
6204
6257
|
limits: ProfileLimitsSchema.default({}),
|
|
6205
6258
|
facts: ProfileFactsSchema.prefault({})
|
|
6206
6259
|
}).strict();
|
|
6260
|
+
const RepoSnapshotEntryKindSchema = _enum(["file", "symlink"]);
|
|
6261
|
+
/** The hashed part: `snapshotDigest = sha256(JCS(body))`. No timestamps, no absolute paths. */
|
|
6262
|
+
const RepoSnapshotBodySchema = object({
|
|
6263
|
+
/** Sorted by `compareUtf8(path)`. */
|
|
6264
|
+
files: array(object({
|
|
6265
|
+
path: RelPathSchema,
|
|
6266
|
+
bytes: int().nonnegative(),
|
|
6267
|
+
sha256: Sha256HexSchema.optional(),
|
|
6268
|
+
mode: ArtifactModeSchema,
|
|
6269
|
+
kind: RepoSnapshotEntryKindSchema
|
|
6270
|
+
}).strict()),
|
|
6271
|
+
/** True when `maxFiles` or `maxBytes` stopped the walk; `files` is then a prefix of the full order. */
|
|
6272
|
+
truncated: boolean(),
|
|
6273
|
+
counts: object({
|
|
6274
|
+
files: int().nonnegative(),
|
|
6275
|
+
bytes: int().nonnegative()
|
|
6276
|
+
}).strict()
|
|
6277
|
+
}).strict();
|
|
6278
|
+
object({
|
|
6279
|
+
apiVersion: ApiVersionSchema,
|
|
6280
|
+
kind: literal("RepoSnapshot"),
|
|
6281
|
+
/** Paths are relative to the walked root; the root itself is deliberately not recorded. */
|
|
6282
|
+
root: object({ kind: literal("relative") }).strict(),
|
|
6283
|
+
snapshotDigest: DigestRefSchema,
|
|
6284
|
+
body: RepoSnapshotBodySchema
|
|
6285
|
+
}).strict();
|
|
6207
6286
|
//#endregion
|
|
6208
6287
|
//#region ../../node_modules/.pnpm/@chevrotain+utils@13.2.0/node_modules/@chevrotain/utils/lib/src/print.js
|
|
6209
6288
|
function PRINT_ERROR(msg) {
|