@codai/axiom-mcp 2.1.0 → 2.2.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 +56 -24
- package/dist/{axm-lazy-CR-FmFVd.js → axm-lazy-LAnrfjUO.js} +32 -3
- package/dist/axm-lazy-Xin1nh7Q.js +6284 -0
- package/dist/axm-lazy.js +119 -9
- package/dist/cli-main.js +1650 -14959
- package/dist/dist-Bt9Wvd_P.js +6379 -0
- package/dist/{dist-FFqnyzCe.js → dist-D4M2Lyji.js} +264 -27
- package/dist/gate-lazy.js +581 -46
- package/dist/gc-lazy.js +6885 -0
- package/dist/http-lazy.js +18262 -9889
- package/dist/index.d.ts +140 -4
- package/dist/index.js +575 -41
- package/dist/mcp-lazy.js +23050 -0
- package/dist/migrate-lazy.js +48 -7
- package/dist/verify-tree-lazy.js +6893 -0
- package/package.json +14 -9
- package/spec/codai-tools.json +283 -0
- package/spec/tools.json +1487 -160
package/dist/migrate-lazy.js
CHANGED
|
@@ -5665,18 +5665,26 @@ const ERROR_CODES = [
|
|
|
5665
5665
|
"ERR_PROVIDER_FAILED",
|
|
5666
5666
|
"ERR_GUARD_TIMEOUT",
|
|
5667
5667
|
"ERR_GUARD_OUTPUT",
|
|
5668
|
+
"ERR_FACT_DISABLED",
|
|
5668
5669
|
"ERR_SIGNATURE_MISSING",
|
|
5669
5670
|
"ERR_SIGNATURE_INVALID",
|
|
5671
|
+
"ERR_TRUST_STATE_CORRUPT",
|
|
5670
5672
|
"ERR_ROLLBACK",
|
|
5671
5673
|
"ERR_EMITTER_UNKNOWN",
|
|
5672
5674
|
"ERR_TEMPLATE_UNKNOWN",
|
|
5673
5675
|
"ERR_TEMPLATE_PARAMS",
|
|
5676
|
+
"ERR_PATCH_FORMAT",
|
|
5677
|
+
"ERR_PATCH_PREIMAGE",
|
|
5678
|
+
"ERR_PATCH_NO_MATCH",
|
|
5674
5679
|
"ERR_GIT_NOT_FOUND",
|
|
5675
5680
|
"ERR_GIT_NOT_REPO",
|
|
5676
5681
|
"ERR_GIT_DIRTY",
|
|
5677
5682
|
"ERR_GIT_BRANCH_EXISTS",
|
|
5678
5683
|
"ERR_GIT_BRANCH_INVALID",
|
|
5679
5684
|
"ERR_GIT_FAILED",
|
|
5685
|
+
"ERR_TASK_NOT_FOUND",
|
|
5686
|
+
"ERR_TASK_CANCELLED",
|
|
5687
|
+
"ERR_PLAN_SESSION_STATE",
|
|
5680
5688
|
"ERR_REF_OFFLINE",
|
|
5681
5689
|
"ERR_NET_DISABLED",
|
|
5682
5690
|
"ERR_NET_DENIED",
|
|
@@ -5778,7 +5786,12 @@ object({
|
|
|
5778
5786
|
findings: array(FindingSchema),
|
|
5779
5787
|
factsDigest: DigestRefSchema,
|
|
5780
5788
|
durationMs: int().nonnegative(),
|
|
5781
|
-
providers: array(ProviderStatusSchema)
|
|
5789
|
+
providers: array(ProviderStatusSchema),
|
|
5790
|
+
preImage: _enum([
|
|
5791
|
+
"verified",
|
|
5792
|
+
"drifted",
|
|
5793
|
+
"unverified"
|
|
5794
|
+
]).optional()
|
|
5782
5795
|
}).strict();
|
|
5783
5796
|
const ApiVersionSchema = literal("axiom.dev/v2");
|
|
5784
5797
|
const INLINE_CONTENT_MAX = 262144;
|
|
@@ -5817,7 +5830,17 @@ const PlanArtifactSourceSchema = discriminatedUnion("type", [
|
|
|
5817
5830
|
emitter: string().min(1),
|
|
5818
5831
|
template: string().min(1),
|
|
5819
5832
|
params: record(string(), json()).default({})
|
|
5820
|
-
}).strict().describe("
|
|
5833
|
+
}).strict().describe("template source rendered by a registered emitter at compile time"),
|
|
5834
|
+
object({
|
|
5835
|
+
type: literal("patch"),
|
|
5836
|
+
format: _enum([
|
|
5837
|
+
"unified",
|
|
5838
|
+
"v4a",
|
|
5839
|
+
"search-replace"
|
|
5840
|
+
]),
|
|
5841
|
+
preImage: union([DigestRefSchema, literal("absent")]),
|
|
5842
|
+
body: string().max(INLINE_CONTENT_MAX)
|
|
5843
|
+
}).strict().describe("patch applied at compile time to the pre-image named by its digest")
|
|
5821
5844
|
]);
|
|
5822
5845
|
const PlanArtifactSchema = object({
|
|
5823
5846
|
path: RelPathSchema,
|
|
@@ -5892,6 +5915,7 @@ object({
|
|
|
5892
5915
|
diff: string().optional(),
|
|
5893
5916
|
journal: string().optional(),
|
|
5894
5917
|
git: GitResultSchema.optional(),
|
|
5918
|
+
drifted: array(RelPathSchema).optional(),
|
|
5895
5919
|
error: ApplyErrorSchema.optional()
|
|
5896
5920
|
}).strict().superRefine((r, ctx) => {
|
|
5897
5921
|
if (r.status === "failed" && r.error === void 0) ctx.addIssue({
|
|
@@ -5952,7 +5976,8 @@ const ManifestArtifactSchema = object({
|
|
|
5952
5976
|
"inline",
|
|
5953
5977
|
"template",
|
|
5954
5978
|
"cas",
|
|
5955
|
-
"ref"
|
|
5979
|
+
"ref",
|
|
5980
|
+
"patch"
|
|
5956
5981
|
]).optional()
|
|
5957
5982
|
}).strict().superRefine((a, ctx) => {
|
|
5958
5983
|
if (a.op !== "delete" && a.digest === void 0) ctx.addIssue({
|
|
@@ -5966,6 +5991,10 @@ const ToolchainSchema = object({
|
|
|
5966
5991
|
axiom: string().min(1),
|
|
5967
5992
|
emitters: record(string(), string())
|
|
5968
5993
|
}).strict();
|
|
5994
|
+
const PreImageEntrySchema = object({
|
|
5995
|
+
path: RelPathSchema,
|
|
5996
|
+
sha256: union([Sha256HexSchema, literal("absent")])
|
|
5997
|
+
}).strict();
|
|
5969
5998
|
const ManifestBodySchema = object({
|
|
5970
5999
|
apiVersion: ApiVersionSchema,
|
|
5971
6000
|
kind: literal("Manifest"),
|
|
@@ -5975,8 +6004,15 @@ const ManifestBodySchema = object({
|
|
|
5975
6004
|
artifacts: array(ManifestArtifactSchema).min(1).max(2e3),
|
|
5976
6005
|
checks: array(CheckRefSchema),
|
|
5977
6006
|
toolchain: ToolchainSchema,
|
|
5978
|
-
counter: int().nonnegative().optional()
|
|
6007
|
+
counter: int().nonnegative().optional(),
|
|
6008
|
+
preImage: array(PreImageEntrySchema).optional()
|
|
5979
6009
|
}).strict().superRefine((m, ctx) => {
|
|
6010
|
+
if (m.preImage !== void 0 && !isSortedUnique(m.preImage.map((p) => p.path))) ctx.addIssue({
|
|
6011
|
+
code: "custom",
|
|
6012
|
+
path: ["preImage"],
|
|
6013
|
+
message: "preImage must be sorted by path (UTF-8 byte order) and unique",
|
|
6014
|
+
params: { code: "ERR_NOT_CANONICAL" }
|
|
6015
|
+
});
|
|
5980
6016
|
if (!isSortedUnique(m.artifacts.map((a) => a.path))) ctx.addIssue({
|
|
5981
6017
|
code: "custom",
|
|
5982
6018
|
path: ["artifacts"],
|
|
@@ -6016,8 +6052,11 @@ const DsseEnvelopeSchema = object({
|
|
|
6016
6052
|
sig: base64()
|
|
6017
6053
|
}).strict())
|
|
6018
6054
|
}).strict();
|
|
6055
|
+
const AXIOM_MANIFEST_PAYLOAD_TYPE = "application/vnd.axiom.manifest+json";
|
|
6056
|
+
const AXIOM_MANIFEST_BOUND_PAYLOAD_TYPE = "application/vnd.axiom.manifest-bound+json";
|
|
6057
|
+
const RootIdSchema = string().min(1).max(200).regex(/^[A-Za-z0-9][A-Za-z0-9._:/@-]*$/, "rootId: letters, digits, . _ : / @ - only");
|
|
6019
6058
|
const ManifestSignatureSchema = object({
|
|
6020
|
-
payloadType: literal(
|
|
6059
|
+
payloadType: union([literal(AXIOM_MANIFEST_PAYLOAD_TYPE), literal(AXIOM_MANIFEST_BOUND_PAYLOAD_TYPE)]),
|
|
6021
6060
|
payload: base64(),
|
|
6022
6061
|
signatures: array(object({
|
|
6023
6062
|
keyid: string().optional(),
|
|
@@ -6034,12 +6073,14 @@ const TrustedKeySchema = object({
|
|
|
6034
6073
|
object({
|
|
6035
6074
|
version: literal(1),
|
|
6036
6075
|
keys: array(TrustedKeySchema),
|
|
6037
|
-
minCounter: int().nonnegative().optional()
|
|
6076
|
+
minCounter: int().nonnegative().optional(),
|
|
6077
|
+
rootId: RootIdSchema.optional()
|
|
6038
6078
|
}).strict();
|
|
6039
6079
|
object({
|
|
6040
6080
|
version: literal(1),
|
|
6041
6081
|
lastCounter: int().nonnegative(),
|
|
6042
|
-
manifestDigest: DigestRefSchema.optional()
|
|
6082
|
+
manifestDigest: DigestRefSchema.optional(),
|
|
6083
|
+
mac: string().regex(/^[0-9a-f]{64}$/).optional()
|
|
6043
6084
|
}).strict();
|
|
6044
6085
|
object({
|
|
6045
6086
|
manifest: ManifestBodySchema,
|