@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/dist/gate-lazy.js CHANGED
@@ -4,6 +4,7 @@ import { readFile } from "node:fs/promises";
4
4
  import { cpus, homedir } from "node:os";
5
5
  import * as path from "node:path";
6
6
  import { parseArgs, promisify } from "node:util";
7
+ import "node:crypto";
7
8
  import "node:child_process";
8
9
  var __create = Object.create;
9
10
  var __defProp = Object.defineProperty;
@@ -27,6 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
28
  enumerable: true
28
29
  }) : target, mod));
29
30
  new TextEncoder();
31
+ Buffer.from("302a300506032b6570032100", "hex");
32
+ Buffer.from("302e020100300506032b657004220420", "hex");
30
33
  function getEnumValues(entries) {
31
34
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
32
35
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -5677,6 +5680,12 @@ const ERROR_CODES = [
5677
5680
  "ERR_PROVIDER_FAILED",
5678
5681
  "ERR_GUARD_TIMEOUT",
5679
5682
  "ERR_GUARD_OUTPUT",
5683
+ "ERR_SIGNATURE_MISSING",
5684
+ "ERR_SIGNATURE_INVALID",
5685
+ "ERR_ROLLBACK",
5686
+ "ERR_EMITTER_UNKNOWN",
5687
+ "ERR_TEMPLATE_UNKNOWN",
5688
+ "ERR_TEMPLATE_PARAMS",
5680
5689
  "ERR_GIT_NOT_FOUND",
5681
5690
  "ERR_GIT_NOT_REPO",
5682
5691
  "ERR_GIT_DIRTY",
@@ -5684,6 +5693,9 @@ const ERROR_CODES = [
5684
5693
  "ERR_GIT_BRANCH_INVALID",
5685
5694
  "ERR_GIT_FAILED",
5686
5695
  "ERR_REF_OFFLINE",
5696
+ "ERR_NET_DISABLED",
5697
+ "ERR_NET_DENIED",
5698
+ "ERR_NET_FAILED",
5687
5699
  "ERR_NOT_CANONICAL",
5688
5700
  "ERR_UNSUPPORTED_OP",
5689
5701
  "ERR_INTERNAL"
@@ -5856,6 +5868,7 @@ object({
5856
5868
  capabilities: array(CapabilitySchema).default([]),
5857
5869
  artifacts: array(PlanArtifactSchema).min(1).max(2e3),
5858
5870
  checks: array(CheckRefSchema).default([]),
5871
+ counter: int().nonnegative().optional(),
5859
5872
  metadata: record(string(), json()).default({})
5860
5873
  }).strict();
5861
5874
  const ErrorCodeSchema = _enum(ERROR_CODES);
@@ -5982,7 +5995,8 @@ const ManifestBodySchema = object({
5982
5995
  planDigest: DigestRefSchema,
5983
5996
  artifacts: array(ManifestArtifactSchema).min(1).max(2e3),
5984
5997
  checks: array(CheckRefSchema),
5985
- toolchain: ToolchainSchema
5998
+ toolchain: ToolchainSchema,
5999
+ counter: int().nonnegative().optional()
5986
6000
  }).strict().superRefine((m, ctx) => {
5987
6001
  if (!isSortedUnique(m.artifacts.map((a) => a.path))) ctx.addIssue({
5988
6002
  code: "custom",
@@ -6023,11 +6037,37 @@ const DsseEnvelopeSchema = object({
6023
6037
  sig: base64()
6024
6038
  }).strict())
6025
6039
  }).strict();
6040
+ const ManifestSignatureSchema = object({
6041
+ payloadType: literal("application/vnd.axiom.manifest+json"),
6042
+ payload: base64(),
6043
+ signatures: array(object({
6044
+ keyid: string().optional(),
6045
+ sig: base64()
6046
+ }).strict()).min(1)
6047
+ }).strict();
6048
+ const TrustedKeySchema = object({
6049
+ keyid: string().regex(/^[0-9a-f]{64}$/),
6050
+ alg: literal("ed25519"),
6051
+ publicKey: base64(),
6052
+ name: string().min(1).max(200).optional(),
6053
+ notBefore: int().nonnegative().optional()
6054
+ }).strict();
6055
+ object({
6056
+ version: literal(1),
6057
+ keys: array(TrustedKeySchema),
6058
+ minCounter: int().nonnegative().optional()
6059
+ }).strict();
6060
+ object({
6061
+ version: literal(1),
6062
+ lastCounter: int().nonnegative(),
6063
+ manifestDigest: DigestRefSchema.optional()
6064
+ }).strict();
6026
6065
  object({
6027
6066
  manifest: ManifestBodySchema,
6028
6067
  manifestDigest: DigestRefSchema,
6029
6068
  attestation: InTotoStatementLooseSchema.optional(),
6030
6069
  envelope: DsseEnvelopeSchema.optional(),
6070
+ signatures: array(ManifestSignatureSchema).optional(),
6031
6071
  blobs: record(DigestRefSchema, BlobSchema).default({})
6032
6072
  }).strict().superRefine((b, ctx) => {
6033
6073
  let total = 0;
@@ -6062,6 +6102,28 @@ object({
6062
6102
  limits: ProfileLimitsSchema.default({}),
6063
6103
  facts: ProfileFactsSchema.prefault({})
6064
6104
  }).strict();
6105
+ const RepoSnapshotEntryKindSchema = _enum(["file", "symlink"]);
6106
+ const RepoSnapshotBodySchema = object({
6107
+ files: array(object({
6108
+ path: RelPathSchema,
6109
+ bytes: int().nonnegative(),
6110
+ sha256: Sha256HexSchema.optional(),
6111
+ mode: ArtifactModeSchema,
6112
+ kind: RepoSnapshotEntryKindSchema
6113
+ }).strict()),
6114
+ truncated: boolean(),
6115
+ counts: object({
6116
+ files: int().nonnegative(),
6117
+ bytes: int().nonnegative()
6118
+ }).strict()
6119
+ }).strict();
6120
+ object({
6121
+ apiVersion: ApiVersionSchema,
6122
+ kind: literal("RepoSnapshot"),
6123
+ root: object({ kind: literal("relative") }).strict(),
6124
+ snapshotDigest: DigestRefSchema,
6125
+ body: RepoSnapshotBodySchema
6126
+ }).strict();
6065
6127
  var Diff = class {
6066
6128
  diff(oldStr, newStr, options = {}) {
6067
6129
  let callback;
@@ -8244,6 +8306,15 @@ function finding(f) {
8244
8306
  if (f.path !== void 0) out.path = f.path;
8245
8307
  return out;
8246
8308
  }
8309
+ object({
8310
+ expression: string().min(1).max(4096),
8311
+ message: string().max(2e3).optional(),
8312
+ severity: _enum([
8313
+ "error",
8314
+ "warn",
8315
+ "info"
8316
+ ]).optional()
8317
+ }).strict();
8247
8318
  const SECRET_PATTERNS = [
8248
8319
  {
8249
8320
  name: "cnp",
@@ -8429,6 +8500,11 @@ object({ rules: array(object({
8429
8500
  match: string().min(1)
8430
8501
  }).strict()).min(1)
8431
8502
  }).strict()).min(1) }).strict();
8503
+ object({
8504
+ minSignatures: int().min(1).max(16).default(1),
8505
+ antiRollback: boolean().default(false),
8506
+ trustFile: string().min(1).default(".axiom/trust/keys.json")
8507
+ }).strict();
8432
8508
  Math.max(1, Math.min(4, cpus().length));
8433
8509
  const realpathNative = promisify(realpath.native);
8434
8510
  const IS_WIN32 = process.platform === "win32";