@agentxm/extension-content 0.38.0 → 0.41.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/src/content/frontmatter.js +9 -22
- package/dist/src/content/skill-content.d.ts +14 -0
- package/dist/src/content/skill-content.js +24 -0
- package/dist/src/content/subagent-content.d.ts +70 -46
- package/dist/src/content/subagent-content.js +273 -85
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +4 -4
- package/dist/src/knowledge/package-inspection.d.ts +7 -7
- package/dist/src/lint/catalog/hook/entrypoint-exists.js +18 -15
- package/dist/src/lint/catalog/hook/envelope.d.ts +14 -1
- package/dist/src/lint/catalog/hook/envelope.js +25 -2
- package/dist/src/lint/catalog/hook/native-bindings-supported.d.ts +4 -0
- package/dist/src/lint/catalog/hook/native-bindings-supported.js +39 -0
- package/dist/src/lint/catalog/hook.js +2 -4
- package/dist/src/lint/catalog/skill-accessor/contexts.d.ts +1 -0
- package/dist/src/lint/catalog/skill-accessor/contexts.js +3 -0
- package/dist/src/lint/catalog/skill.d.ts +1 -1
- package/dist/src/lint/catalog/skill.js +20 -8
- package/dist/src/lint/catalog/subagent/envelope.js +1 -1
- package/dist/src/lint/catalog-metadata.js +3 -9
- package/dist/src/lint/context.d.ts +2 -0
- package/dist/src/packaging/archive-guardrails.d.ts +1 -0
- package/dist/src/packaging/archive-guardrails.js +205 -11
- package/dist/src/packaging/filtered-package-validation.js +24 -31
- package/dist/src/packaging/input-normalization.d.ts +0 -1
- package/dist/src/packaging/input-normalization.js +1 -77
- package/dist/src/packaging/manifest-file.js +1 -1
- package/dist/src/packaging/manifest-policy.d.ts +239 -109
- package/dist/src/packaging/manifest-policy.js +1 -1
- package/package.json +9 -7
- package/dist/src/lint/catalog/hook/decision-portability.d.ts +0 -4
- package/dist/src/lint/catalog/hook/decision-portability.js +0 -40
- package/dist/src/lint/catalog/hook/matcher-raw-portability.d.ts +0 -4
- package/dist/src/lint/catalog/hook/matcher-raw-portability.js +0 -51
|
@@ -29,7 +29,7 @@ export declare const extensionTypeForManifestFilename: (fileName: string) => Ext
|
|
|
29
29
|
export declare const manifestFilenameForType: (type: ExtensionType) => string;
|
|
30
30
|
export declare const ManifestIdentitySchema: Schema.Struct<{
|
|
31
31
|
readonly owner: Schema.brand<Schema.String, "Handle">;
|
|
32
|
-
readonly type: Schema.Literals<readonly ("
|
|
32
|
+
readonly type: Schema.Literals<readonly ("subagent" | "skill" | "mcp-server" | "rule" | "hook" | "knowledge" | "pack")[]>;
|
|
33
33
|
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
34
34
|
readonly version: Schema.brand<Schema.String, "Version">;
|
|
35
35
|
}>;
|
|
@@ -333,13 +333,33 @@ export declare const MANIFEST_SCHEMA_BY_TYPE: {
|
|
|
333
333
|
readonly $schema: Schema.optional<Schema.String>;
|
|
334
334
|
}>;
|
|
335
335
|
subagent: Schema.Struct<{
|
|
336
|
-
readonly type: Schema.Literal<"subagent">;
|
|
337
|
-
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
338
336
|
readonly enhances: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
339
337
|
readonly requires: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
340
|
-
readonly fallback: Schema.optional<Schema.Literals<readonly ["auto", "none"]>>;
|
|
341
338
|
readonly recommendedPacks: Schema.optional<Schema.$Array<Schema.brand<Schema.NonEmptyString, "PackSpec">>>;
|
|
342
339
|
readonly standalone: Schema.optional<Schema.Boolean>;
|
|
340
|
+
readonly type: Schema.Literal<"subagent">;
|
|
341
|
+
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
342
|
+
readonly core: Schema.optional<Schema.Struct<{
|
|
343
|
+
readonly instructions: Schema.String;
|
|
344
|
+
readonly name: Schema.optional<Schema.String>;
|
|
345
|
+
}>>;
|
|
346
|
+
readonly implementations: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
347
|
+
readonly kind: Schema.Literal<"customized">;
|
|
348
|
+
readonly source: Schema.optional<Schema.Never>;
|
|
349
|
+
readonly configuration: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
350
|
+
readonly instructions: Schema.optional<Schema.Struct<{
|
|
351
|
+
readonly mode: Schema.Literals<readonly ["append", "replace"]>;
|
|
352
|
+
readonly source: Schema.String;
|
|
353
|
+
}>>;
|
|
354
|
+
}>, Schema.Struct<{
|
|
355
|
+
readonly kind: Schema.Literal<"native">;
|
|
356
|
+
readonly source: Schema.String;
|
|
357
|
+
readonly configuration: Schema.optional<Schema.Never>;
|
|
358
|
+
readonly instructions: Schema.optional<Schema.Never>;
|
|
359
|
+
}>]>>>;
|
|
360
|
+
readonly fallback: Schema.optional<Schema.Never>;
|
|
361
|
+
readonly agentOverrides: Schema.optional<Schema.Never>;
|
|
362
|
+
readonly agents: Schema.optional<Schema.Never>;
|
|
343
363
|
readonly publish: Schema.optional<Schema.Struct<{
|
|
344
364
|
readonly visibility: Schema.optional<Schema.Literals<readonly ["public", "private"]>>;
|
|
345
365
|
readonly ignore: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
@@ -476,44 +496,89 @@ export declare const MANIFEST_SCHEMA_BY_TYPE: {
|
|
|
476
496
|
readonly $schema: Schema.optional<Schema.String>;
|
|
477
497
|
}>;
|
|
478
498
|
hook: Schema.Struct<{
|
|
499
|
+
readonly enhances: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
500
|
+
readonly requires: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
501
|
+
readonly recommendedPacks: Schema.optional<Schema.$Array<Schema.brand<Schema.NonEmptyString, "PackSpec">>>;
|
|
502
|
+
readonly standalone: Schema.optional<Schema.Boolean>;
|
|
479
503
|
readonly type: Schema.Literal<"hook">;
|
|
480
504
|
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
481
505
|
readonly title: Schema.optional<Schema.NonEmptyString>;
|
|
482
|
-
readonly
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
readonly on: Schema.Literals<readonly ["session.start", "prompt.submit", "turn.end", "tool.pre", "tool.post", "subagent.stop", "compaction.pre"]>;
|
|
486
|
-
readonly match: Schema.optional<Schema.Struct<{
|
|
487
|
-
readonly tools: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["file.read", "file.write", "file.edit", "shell.exec", "web.fetch", "mcp.call"]>>>;
|
|
488
|
-
}>>;
|
|
489
|
-
readonly matcherRaw: Schema.optional<Schema.NonEmptyString>;
|
|
490
|
-
readonly targets: Schema.optional<Schema.$Record<Schema.String, Schema.Struct<{
|
|
491
|
-
readonly matcherRaw: Schema.optional<Schema.NonEmptyString>;
|
|
492
|
-
}>>>;
|
|
506
|
+
readonly implementations: Schema.NonEmptyArray<Schema.Struct<{
|
|
507
|
+
readonly id: Schema.NonEmptyString;
|
|
508
|
+
readonly protocol: Schema.Literals<readonly ["adal", "fx", "muse-code", "mimo-code", "coder-agents", "aider-desk", "amp", "antigravity", "antigravity-cli", "augment", "claude-code", "cline", "codearts-agent", "codebuddy", "codemaker", "codestudio", "codex", "command-code", "continue", "cortex", "crush", "cursor", "deepagents", "devin", "dexto", "droid", "firebender", "forgecode", "gemini-cli", "github-copilot-cli", "goose", "grok-cli", "hermes", "ibm-bob", "iflow-cli", "junie", "lingma", "kilo", "kimi-cli", "kiro-cli", "kode", "mcpjam", "minimax-code", "mistral-vibe", "mux", "neovate", "openclaw", "opencode", "openhands", "ona", "pi", "vscode", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>;
|
|
493
509
|
readonly requires: Schema.optional<Schema.Struct<{
|
|
494
|
-
readonly
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
510
|
+
readonly hostVersion: Schema.optional<Schema.brand<Schema.NonEmptyString, "VersionRange">>;
|
|
511
|
+
readonly profiles: Schema.optional<Schema.NonEmptyArray<Schema.NonEmptyString>>;
|
|
512
|
+
readonly platforms: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["darwin", "linux", "win32"]>>>;
|
|
513
|
+
readonly scopes: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["project", "user"]>>>;
|
|
514
|
+
}>>;
|
|
515
|
+
readonly bindings: Schema.NonEmptyArray<Schema.Struct<{
|
|
516
|
+
readonly id: Schema.NonEmptyString;
|
|
517
|
+
readonly event: Schema.NonEmptyString;
|
|
518
|
+
readonly matcher: Schema.optional<Schema.NonEmptyString>;
|
|
519
|
+
readonly handler: Schema.Struct<{
|
|
520
|
+
readonly type: Schema.Literal<"command">;
|
|
521
|
+
readonly name: Schema.optional<Schema.NonEmptyString>;
|
|
522
|
+
readonly runtime: Schema.Literals<readonly ["bash", "node", "python"]>;
|
|
523
|
+
readonly entrypoint: Schema.NonEmptyString;
|
|
524
|
+
readonly args: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
525
|
+
readonly config: Schema.NonEmptyString;
|
|
526
|
+
}>, Schema.Struct<{
|
|
527
|
+
readonly env: Schema.NonEmptyString;
|
|
528
|
+
}>]>>>;
|
|
529
|
+
readonly env: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
530
|
+
readonly config: Schema.NonEmptyString;
|
|
531
|
+
}>, Schema.Struct<{
|
|
532
|
+
readonly env: Schema.NonEmptyString;
|
|
533
|
+
}>]>>>;
|
|
534
|
+
readonly timeoutMs: Schema.optional<Schema.Int>;
|
|
535
|
+
}>;
|
|
536
|
+
readonly requires: Schema.optional<Schema.Struct<{
|
|
498
537
|
readonly outcomes: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["allow", "deny", "ask"]>>>;
|
|
499
|
-
}>, Schema.Struct<{
|
|
500
|
-
readonly kind: Schema.Literal<"modify">;
|
|
501
538
|
readonly operations: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["modify-input", "inject-context", "modify-output", "synthesize", "redact"]>>>;
|
|
502
|
-
}
|
|
539
|
+
}>>;
|
|
503
540
|
}>>;
|
|
504
541
|
}>>;
|
|
505
|
-
readonly
|
|
506
|
-
|
|
507
|
-
readonly
|
|
508
|
-
readonly
|
|
509
|
-
readonly
|
|
510
|
-
readonly
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
542
|
+
readonly configuration: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
|
|
543
|
+
readonly type: Schema.Literal<"string">;
|
|
544
|
+
readonly default: Schema.optional<Schema.String>;
|
|
545
|
+
readonly secret: Schema.optional<Schema.Boolean>;
|
|
546
|
+
readonly allowEmpty: Schema.optional<Schema.Boolean>;
|
|
547
|
+
readonly minLength: Schema.optional<Schema.Int>;
|
|
548
|
+
readonly maxLength: Schema.optional<Schema.Int>;
|
|
549
|
+
readonly description: Schema.optional<Schema.NonEmptyString>;
|
|
550
|
+
readonly required: Schema.optional<Schema.Boolean>;
|
|
551
|
+
}>, Schema.Struct<{
|
|
552
|
+
readonly type: Schema.Literal<"number">;
|
|
553
|
+
readonly default: Schema.optional<Schema.Finite>;
|
|
554
|
+
readonly minimum: Schema.optional<Schema.Finite>;
|
|
555
|
+
readonly maximum: Schema.optional<Schema.Finite>;
|
|
556
|
+
readonly description: Schema.optional<Schema.NonEmptyString>;
|
|
557
|
+
readonly required: Schema.optional<Schema.Boolean>;
|
|
558
|
+
}>, Schema.Struct<{
|
|
559
|
+
readonly type: Schema.Literal<"boolean">;
|
|
560
|
+
readonly default: Schema.optional<Schema.Boolean>;
|
|
561
|
+
readonly description: Schema.optional<Schema.NonEmptyString>;
|
|
562
|
+
readonly required: Schema.optional<Schema.Boolean>;
|
|
563
|
+
}>, Schema.Struct<{
|
|
564
|
+
readonly type: Schema.Literal<"enum">;
|
|
565
|
+
readonly values: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
566
|
+
readonly default: Schema.optional<Schema.NonEmptyString>;
|
|
567
|
+
readonly description: Schema.optional<Schema.NonEmptyString>;
|
|
568
|
+
readonly required: Schema.optional<Schema.Boolean>;
|
|
569
|
+
}>]>>>;
|
|
570
|
+
readonly assets: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
571
|
+
readonly fixtures: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
572
|
+
readonly id: Schema.NonEmptyString;
|
|
573
|
+
readonly implementation: Schema.NonEmptyString;
|
|
574
|
+
readonly binding: Schema.NonEmptyString;
|
|
575
|
+
readonly input: Schema.NonEmptyString;
|
|
576
|
+
readonly expect: Schema.Struct<{
|
|
577
|
+
readonly exitCode: Schema.Int;
|
|
578
|
+
readonly stdout: Schema.optional<Schema.NonEmptyString>;
|
|
579
|
+
readonly stderr: Schema.optional<Schema.NonEmptyString>;
|
|
580
|
+
}>;
|
|
581
|
+
}>>>;
|
|
517
582
|
readonly publish: Schema.optional<Schema.Struct<{
|
|
518
583
|
readonly visibility: Schema.optional<Schema.Literals<readonly ["public", "private"]>>;
|
|
519
584
|
readonly ignore: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
@@ -607,6 +672,71 @@ export declare const MANIFEST_SCHEMA_BY_TYPE: {
|
|
|
607
672
|
};
|
|
608
673
|
export type ExtensionManifest = Schema.Schema.Type<(typeof MANIFEST_SCHEMA_BY_TYPE)[ExtensionType]>;
|
|
609
674
|
export declare const manifestSchemaForType: (type: ExtensionType) => Schema.Struct<{
|
|
675
|
+
readonly enhances: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
676
|
+
readonly requires: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
677
|
+
readonly recommendedPacks: Schema.optional<Schema.$Array<Schema.brand<Schema.NonEmptyString, "PackSpec">>>;
|
|
678
|
+
readonly standalone: Schema.optional<Schema.Boolean>;
|
|
679
|
+
readonly type: Schema.Literal<"subagent">;
|
|
680
|
+
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
681
|
+
readonly core: Schema.optional<Schema.Struct<{
|
|
682
|
+
readonly instructions: Schema.String;
|
|
683
|
+
readonly name: Schema.optional<Schema.String>;
|
|
684
|
+
}>>;
|
|
685
|
+
readonly implementations: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
|
|
686
|
+
readonly kind: Schema.Literal<"customized">;
|
|
687
|
+
readonly source: Schema.optional<Schema.Never>;
|
|
688
|
+
readonly configuration: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
689
|
+
readonly instructions: Schema.optional<Schema.Struct<{
|
|
690
|
+
readonly mode: Schema.Literals<readonly ["append", "replace"]>;
|
|
691
|
+
readonly source: Schema.String;
|
|
692
|
+
}>>;
|
|
693
|
+
}>, Schema.Struct<{
|
|
694
|
+
readonly kind: Schema.Literal<"native">;
|
|
695
|
+
readonly source: Schema.String;
|
|
696
|
+
readonly configuration: Schema.optional<Schema.Never>;
|
|
697
|
+
readonly instructions: Schema.optional<Schema.Never>;
|
|
698
|
+
}>]>>>;
|
|
699
|
+
readonly fallback: Schema.optional<Schema.Never>;
|
|
700
|
+
readonly agentOverrides: Schema.optional<Schema.Never>;
|
|
701
|
+
readonly agents: Schema.optional<Schema.Never>;
|
|
702
|
+
readonly publish: Schema.optional<Schema.Struct<{
|
|
703
|
+
readonly visibility: Schema.optional<Schema.Literals<readonly ["public", "private"]>>;
|
|
704
|
+
readonly ignore: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
705
|
+
}>>;
|
|
706
|
+
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
707
|
+
readonly owner: Schema.brand<Schema.String, "Handle">;
|
|
708
|
+
readonly version: Schema.brand<Schema.String, "Version">;
|
|
709
|
+
readonly description: Schema.optional<Schema.String>;
|
|
710
|
+
readonly keywords: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
711
|
+
readonly repository: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
712
|
+
readonly type: Schema.optional<Schema.NonEmptyString>;
|
|
713
|
+
readonly url: Schema.NonEmptyString;
|
|
714
|
+
readonly directory: Schema.optional<Schema.NonEmptyString>;
|
|
715
|
+
}>]>>;
|
|
716
|
+
readonly homepage: Schema.optional<Schema.String>;
|
|
717
|
+
readonly license: Schema.optional<Schema.String>;
|
|
718
|
+
readonly bugs: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
719
|
+
readonly url: Schema.optional<Schema.NonEmptyString>;
|
|
720
|
+
readonly email: Schema.optional<Schema.NonEmptyString>;
|
|
721
|
+
}>]>>;
|
|
722
|
+
readonly authors: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
723
|
+
readonly name: Schema.String;
|
|
724
|
+
readonly email: Schema.optional<Schema.String>;
|
|
725
|
+
readonly url: Schema.optional<Schema.String>;
|
|
726
|
+
}>>>;
|
|
727
|
+
readonly packages: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
728
|
+
readonly purl: Schema.brand<Schema.NonEmptyString, "PackageIdentityPurl">;
|
|
729
|
+
readonly versionRange: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.Struct<{
|
|
730
|
+
readonly raw: Schema.NonEmptyString;
|
|
731
|
+
readonly scheme: Schema.NonEmptyString;
|
|
732
|
+
readonly constraints: Schema.$Array<Schema.Struct<{
|
|
733
|
+
readonly comparator: Schema.Literals<readonly ["=", "!=", "<", "<=", ">", ">="]>;
|
|
734
|
+
readonly version: Schema.NonEmptyString;
|
|
735
|
+
}>>;
|
|
736
|
+
}>>, Schema.NonEmptyString, never, never>, "VersRange">>;
|
|
737
|
+
}>>>;
|
|
738
|
+
readonly $schema: Schema.optional<Schema.String>;
|
|
739
|
+
}> | Schema.Struct<{
|
|
610
740
|
readonly type: Schema.Literal<"skill">;
|
|
611
741
|
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
612
742
|
readonly enhances: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
@@ -901,51 +1031,6 @@ export declare const manifestSchemaForType: (type: ExtensionType) => Schema.Stru
|
|
|
901
1031
|
}>>, Schema.NonEmptyString, never, never>, "VersRange">>;
|
|
902
1032
|
}>>>;
|
|
903
1033
|
readonly $schema: Schema.optional<Schema.String>;
|
|
904
|
-
}> | Schema.Struct<{
|
|
905
|
-
readonly type: Schema.Literal<"subagent">;
|
|
906
|
-
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
907
|
-
readonly enhances: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
908
|
-
readonly requires: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
909
|
-
readonly fallback: Schema.optional<Schema.Literals<readonly ["auto", "none"]>>;
|
|
910
|
-
readonly recommendedPacks: Schema.optional<Schema.$Array<Schema.brand<Schema.NonEmptyString, "PackSpec">>>;
|
|
911
|
-
readonly standalone: Schema.optional<Schema.Boolean>;
|
|
912
|
-
readonly publish: Schema.optional<Schema.Struct<{
|
|
913
|
-
readonly visibility: Schema.optional<Schema.Literals<readonly ["public", "private"]>>;
|
|
914
|
-
readonly ignore: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
915
|
-
}>>;
|
|
916
|
-
readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
917
|
-
readonly owner: Schema.brand<Schema.String, "Handle">;
|
|
918
|
-
readonly version: Schema.brand<Schema.String, "Version">;
|
|
919
|
-
readonly description: Schema.optional<Schema.String>;
|
|
920
|
-
readonly keywords: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
921
|
-
readonly repository: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
922
|
-
readonly type: Schema.optional<Schema.NonEmptyString>;
|
|
923
|
-
readonly url: Schema.NonEmptyString;
|
|
924
|
-
readonly directory: Schema.optional<Schema.NonEmptyString>;
|
|
925
|
-
}>]>>;
|
|
926
|
-
readonly homepage: Schema.optional<Schema.String>;
|
|
927
|
-
readonly license: Schema.optional<Schema.String>;
|
|
928
|
-
readonly bugs: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
929
|
-
readonly url: Schema.optional<Schema.NonEmptyString>;
|
|
930
|
-
readonly email: Schema.optional<Schema.NonEmptyString>;
|
|
931
|
-
}>]>>;
|
|
932
|
-
readonly authors: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
933
|
-
readonly name: Schema.String;
|
|
934
|
-
readonly email: Schema.optional<Schema.String>;
|
|
935
|
-
readonly url: Schema.optional<Schema.String>;
|
|
936
|
-
}>>>;
|
|
937
|
-
readonly packages: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
938
|
-
readonly purl: Schema.brand<Schema.NonEmptyString, "PackageIdentityPurl">;
|
|
939
|
-
readonly versionRange: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.Struct<{
|
|
940
|
-
readonly raw: Schema.NonEmptyString;
|
|
941
|
-
readonly scheme: Schema.NonEmptyString;
|
|
942
|
-
readonly constraints: Schema.$Array<Schema.Struct<{
|
|
943
|
-
readonly comparator: Schema.Literals<readonly ["=", "!=", "<", "<=", ">", ">="]>;
|
|
944
|
-
readonly version: Schema.NonEmptyString;
|
|
945
|
-
}>>;
|
|
946
|
-
}>>, Schema.NonEmptyString, never, never>, "VersRange">>;
|
|
947
|
-
}>>>;
|
|
948
|
-
readonly $schema: Schema.optional<Schema.String>;
|
|
949
1034
|
}> | Schema.Struct<{
|
|
950
1035
|
readonly type: Schema.Literal<"pack">;
|
|
951
1036
|
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
@@ -1042,44 +1127,89 @@ export declare const manifestSchemaForType: (type: ExtensionType) => Schema.Stru
|
|
|
1042
1127
|
}>>>;
|
|
1043
1128
|
readonly $schema: Schema.optional<Schema.String>;
|
|
1044
1129
|
}> | Schema.Struct<{
|
|
1130
|
+
readonly enhances: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1131
|
+
readonly requires: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1132
|
+
readonly recommendedPacks: Schema.optional<Schema.$Array<Schema.brand<Schema.NonEmptyString, "PackSpec">>>;
|
|
1133
|
+
readonly standalone: Schema.optional<Schema.Boolean>;
|
|
1045
1134
|
readonly type: Schema.Literal<"hook">;
|
|
1046
1135
|
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
1047
1136
|
readonly title: Schema.optional<Schema.NonEmptyString>;
|
|
1048
|
-
readonly
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
readonly on: Schema.Literals<readonly ["session.start", "prompt.submit", "turn.end", "tool.pre", "tool.post", "subagent.stop", "compaction.pre"]>;
|
|
1052
|
-
readonly match: Schema.optional<Schema.Struct<{
|
|
1053
|
-
readonly tools: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["file.read", "file.write", "file.edit", "shell.exec", "web.fetch", "mcp.call"]>>>;
|
|
1054
|
-
}>>;
|
|
1055
|
-
readonly matcherRaw: Schema.optional<Schema.NonEmptyString>;
|
|
1056
|
-
readonly targets: Schema.optional<Schema.$Record<Schema.String, Schema.Struct<{
|
|
1057
|
-
readonly matcherRaw: Schema.optional<Schema.NonEmptyString>;
|
|
1058
|
-
}>>>;
|
|
1137
|
+
readonly implementations: Schema.NonEmptyArray<Schema.Struct<{
|
|
1138
|
+
readonly id: Schema.NonEmptyString;
|
|
1139
|
+
readonly protocol: Schema.Literals<readonly ["adal", "fx", "muse-code", "mimo-code", "coder-agents", "aider-desk", "amp", "antigravity", "antigravity-cli", "augment", "claude-code", "cline", "codearts-agent", "codebuddy", "codemaker", "codestudio", "codex", "command-code", "continue", "cortex", "crush", "cursor", "deepagents", "devin", "dexto", "droid", "firebender", "forgecode", "gemini-cli", "github-copilot-cli", "goose", "grok-cli", "hermes", "ibm-bob", "iflow-cli", "junie", "lingma", "kilo", "kimi-cli", "kiro-cli", "kode", "mcpjam", "minimax-code", "mistral-vibe", "mux", "neovate", "openclaw", "opencode", "openhands", "ona", "pi", "vscode", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>;
|
|
1059
1140
|
readonly requires: Schema.optional<Schema.Struct<{
|
|
1060
|
-
readonly
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1141
|
+
readonly hostVersion: Schema.optional<Schema.brand<Schema.NonEmptyString, "VersionRange">>;
|
|
1142
|
+
readonly profiles: Schema.optional<Schema.NonEmptyArray<Schema.NonEmptyString>>;
|
|
1143
|
+
readonly platforms: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["darwin", "linux", "win32"]>>>;
|
|
1144
|
+
readonly scopes: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["project", "user"]>>>;
|
|
1145
|
+
}>>;
|
|
1146
|
+
readonly bindings: Schema.NonEmptyArray<Schema.Struct<{
|
|
1147
|
+
readonly id: Schema.NonEmptyString;
|
|
1148
|
+
readonly event: Schema.NonEmptyString;
|
|
1149
|
+
readonly matcher: Schema.optional<Schema.NonEmptyString>;
|
|
1150
|
+
readonly handler: Schema.Struct<{
|
|
1151
|
+
readonly type: Schema.Literal<"command">;
|
|
1152
|
+
readonly name: Schema.optional<Schema.NonEmptyString>;
|
|
1153
|
+
readonly runtime: Schema.Literals<readonly ["bash", "node", "python"]>;
|
|
1154
|
+
readonly entrypoint: Schema.NonEmptyString;
|
|
1155
|
+
readonly args: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
1156
|
+
readonly config: Schema.NonEmptyString;
|
|
1157
|
+
}>, Schema.Struct<{
|
|
1158
|
+
readonly env: Schema.NonEmptyString;
|
|
1159
|
+
}>]>>>;
|
|
1160
|
+
readonly env: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
1161
|
+
readonly config: Schema.NonEmptyString;
|
|
1162
|
+
}>, Schema.Struct<{
|
|
1163
|
+
readonly env: Schema.NonEmptyString;
|
|
1164
|
+
}>]>>>;
|
|
1165
|
+
readonly timeoutMs: Schema.optional<Schema.Int>;
|
|
1166
|
+
}>;
|
|
1167
|
+
readonly requires: Schema.optional<Schema.Struct<{
|
|
1064
1168
|
readonly outcomes: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["allow", "deny", "ask"]>>>;
|
|
1065
|
-
}>, Schema.Struct<{
|
|
1066
|
-
readonly kind: Schema.Literal<"modify">;
|
|
1067
1169
|
readonly operations: Schema.optional<Schema.NonEmptyArray<Schema.Literals<readonly ["modify-input", "inject-context", "modify-output", "synthesize", "redact"]>>>;
|
|
1068
|
-
}
|
|
1170
|
+
}>>;
|
|
1069
1171
|
}>>;
|
|
1070
1172
|
}>>;
|
|
1071
|
-
readonly
|
|
1072
|
-
|
|
1073
|
-
readonly
|
|
1074
|
-
readonly
|
|
1075
|
-
readonly
|
|
1076
|
-
readonly
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1173
|
+
readonly configuration: Schema.optional<Schema.$Record<Schema.NonEmptyString, Schema.Union<readonly [Schema.Struct<{
|
|
1174
|
+
readonly type: Schema.Literal<"string">;
|
|
1175
|
+
readonly default: Schema.optional<Schema.String>;
|
|
1176
|
+
readonly secret: Schema.optional<Schema.Boolean>;
|
|
1177
|
+
readonly allowEmpty: Schema.optional<Schema.Boolean>;
|
|
1178
|
+
readonly minLength: Schema.optional<Schema.Int>;
|
|
1179
|
+
readonly maxLength: Schema.optional<Schema.Int>;
|
|
1180
|
+
readonly description: Schema.optional<Schema.NonEmptyString>;
|
|
1181
|
+
readonly required: Schema.optional<Schema.Boolean>;
|
|
1182
|
+
}>, Schema.Struct<{
|
|
1183
|
+
readonly type: Schema.Literal<"number">;
|
|
1184
|
+
readonly default: Schema.optional<Schema.Finite>;
|
|
1185
|
+
readonly minimum: Schema.optional<Schema.Finite>;
|
|
1186
|
+
readonly maximum: Schema.optional<Schema.Finite>;
|
|
1187
|
+
readonly description: Schema.optional<Schema.NonEmptyString>;
|
|
1188
|
+
readonly required: Schema.optional<Schema.Boolean>;
|
|
1189
|
+
}>, Schema.Struct<{
|
|
1190
|
+
readonly type: Schema.Literal<"boolean">;
|
|
1191
|
+
readonly default: Schema.optional<Schema.Boolean>;
|
|
1192
|
+
readonly description: Schema.optional<Schema.NonEmptyString>;
|
|
1193
|
+
readonly required: Schema.optional<Schema.Boolean>;
|
|
1194
|
+
}>, Schema.Struct<{
|
|
1195
|
+
readonly type: Schema.Literal<"enum">;
|
|
1196
|
+
readonly values: Schema.NonEmptyArray<Schema.NonEmptyString>;
|
|
1197
|
+
readonly default: Schema.optional<Schema.NonEmptyString>;
|
|
1198
|
+
readonly description: Schema.optional<Schema.NonEmptyString>;
|
|
1199
|
+
readonly required: Schema.optional<Schema.Boolean>;
|
|
1200
|
+
}>]>>>;
|
|
1201
|
+
readonly assets: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
1202
|
+
readonly fixtures: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1203
|
+
readonly id: Schema.NonEmptyString;
|
|
1204
|
+
readonly implementation: Schema.NonEmptyString;
|
|
1205
|
+
readonly binding: Schema.NonEmptyString;
|
|
1206
|
+
readonly input: Schema.NonEmptyString;
|
|
1207
|
+
readonly expect: Schema.Struct<{
|
|
1208
|
+
readonly exitCode: Schema.Int;
|
|
1209
|
+
readonly stdout: Schema.optional<Schema.NonEmptyString>;
|
|
1210
|
+
readonly stderr: Schema.optional<Schema.NonEmptyString>;
|
|
1211
|
+
}>;
|
|
1212
|
+
}>>>;
|
|
1083
1213
|
readonly publish: Schema.optional<Schema.Struct<{
|
|
1084
1214
|
readonly visibility: Schema.optional<Schema.Literals<readonly ["public", "private"]>>;
|
|
1085
1215
|
readonly ignore: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
|
|
@@ -153,7 +153,7 @@ export const resolveManifest = (input) => Effect.gen(function* () {
|
|
|
153
153
|
})));
|
|
154
154
|
yield* Effect.fromResult(validateManifestHasNoAgentsField(manifestEntry.fileName, parsed));
|
|
155
155
|
const schema = manifestSchemaForType(input.type);
|
|
156
|
-
yield* Schema.decodeUnknownEffect(schema)(parsed).pipe(Effect.mapError((error) => {
|
|
156
|
+
yield* Schema.decodeUnknownEffect(schema)(parsed, input.type === "hook" ? { onExcessProperty: "error" } : undefined).pipe(Effect.mapError((error) => {
|
|
157
157
|
const companionPackageError = classifyCompanionPackageManifestError(parsed);
|
|
158
158
|
return new ManifestError({
|
|
159
159
|
code: companionPackageError?.code ?? "manifest_schema_invalid",
|
package/package.json
CHANGED
|
@@ -4,21 +4,23 @@
|
|
|
4
4
|
"url": "https://github.com/agentxm/axm/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@agentxm/extension-model": "^0.
|
|
8
|
-
"effect": "4.0.
|
|
7
|
+
"@agentxm/extension-model": "^0.41.0",
|
|
8
|
+
"effect": "4.0.1",
|
|
9
|
+
"smol-toml": "^1.9.0",
|
|
9
10
|
"yaml": "^2.9.1"
|
|
10
11
|
},
|
|
11
12
|
"description": "AXM extension content behavior: skill and subagent content parsing, Knowledge bundle inspection and search, the lint rule catalog, and archive and manifest validation shared by the axm CLI and the AgentXM Registry. Unstable and unsupported — use the axm.sh CLI.",
|
|
12
13
|
"devDependencies": {
|
|
13
|
-
"@
|
|
14
|
-
"@effect/
|
|
14
|
+
"@agentxm/specification-metadata": "^0.41.0",
|
|
15
|
+
"@effect/platform-node": "4.0.1",
|
|
16
|
+
"@effect/vitest": "4.0.1",
|
|
15
17
|
"@fast-check/vitest": "^0.5.0",
|
|
16
18
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
17
19
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
18
|
-
"vitest": "^5.0.
|
|
20
|
+
"vitest": "^5.0.3"
|
|
19
21
|
},
|
|
20
22
|
"engines": {
|
|
21
|
-
"node": ">=24.
|
|
23
|
+
"node": ">=24.21.0"
|
|
22
24
|
},
|
|
23
25
|
"exports": {
|
|
24
26
|
".": {
|
|
@@ -58,5 +60,5 @@
|
|
|
58
60
|
},
|
|
59
61
|
"sideEffects": false,
|
|
60
62
|
"type": "module",
|
|
61
|
-
"version": "0.
|
|
63
|
+
"version": "0.41.0"
|
|
62
64
|
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import * as Result from "effect/Result";
|
|
3
|
-
import * as Schema from "effect/Schema";
|
|
4
|
-
import { HOOK_MANIFEST_FILENAME, HookManifestSchema, } from "@agentxm/extension-model/unstable/hooks/manifest-schema";
|
|
5
|
-
import { isManifestJsonParseFailure } from "../shared/manifest-json.js";
|
|
6
|
-
const RULE_ID = "hook/decision-portability";
|
|
7
|
-
const decodeHookManifest = Schema.decodeUnknownResult(HookManifestSchema);
|
|
8
|
-
export const decisionPortabilityRule = {
|
|
9
|
-
id: RULE_ID,
|
|
10
|
-
description: "Hook decision requirements state when native support is intentionally narrowed.",
|
|
11
|
-
kind: "advisory",
|
|
12
|
-
severity: "warning",
|
|
13
|
-
check: (context) => {
|
|
14
|
-
if (context.subject.hookJson === undefined ||
|
|
15
|
-
isManifestJsonParseFailure(context.subject.hookJson)) {
|
|
16
|
-
return Effect.succeed([]);
|
|
17
|
-
}
|
|
18
|
-
const decoded = decodeHookManifest(context.subject.hookJson, {
|
|
19
|
-
onExcessProperty: "ignore",
|
|
20
|
-
errors: "all",
|
|
21
|
-
});
|
|
22
|
-
if (Result.isFailure(decoded))
|
|
23
|
-
return Effect.succeed([]);
|
|
24
|
-
const findings = [];
|
|
25
|
-
for (const [index, binding] of decoded.success.bindings.entries()) {
|
|
26
|
-
const decision = binding.requires?.decision.kind;
|
|
27
|
-
if (decision === undefined || decision === "observe")
|
|
28
|
-
continue;
|
|
29
|
-
findings.push({
|
|
30
|
-
kind: "advisory",
|
|
31
|
-
ruleId: RULE_ID,
|
|
32
|
-
severity: "warning",
|
|
33
|
-
message: `hook.json bindings[${String(index)}].requires.decision.kind is ${decision}, which narrows native agent support and cannot use advisory fallback. Use observe when enforcement is not required, or retain ${decision} and expect unsupported configured agents to be blocked.`,
|
|
34
|
-
location: { file: HOOK_MANIFEST_FILENAME },
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
return Effect.succeed(findings);
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=decision-portability.js.map
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import * as Result from "effect/Result";
|
|
3
|
-
import * as Schema from "effect/Schema";
|
|
4
|
-
import { HookManifestSchema, HOOK_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/hooks/manifest-schema";
|
|
5
|
-
import { isManifestJsonParseFailure } from "../shared/manifest-json.js";
|
|
6
|
-
const RULE_ID = "hook/matcher-raw-portability";
|
|
7
|
-
const decodeHookManifest = Schema.decodeUnknownResult(HookManifestSchema);
|
|
8
|
-
export const matcherRawPortabilityRule = {
|
|
9
|
-
id: RULE_ID,
|
|
10
|
-
description: "Hook matchers use portable canonical tool matches where possible.",
|
|
11
|
-
kind: "advisory",
|
|
12
|
-
severity: "warning",
|
|
13
|
-
check: (context) => {
|
|
14
|
-
if (context.subject.hookJson === undefined ||
|
|
15
|
-
isManifestJsonParseFailure(context.subject.hookJson)) {
|
|
16
|
-
return Effect.succeed([]);
|
|
17
|
-
}
|
|
18
|
-
const decoded = decodeHookManifest(context.subject.hookJson, {
|
|
19
|
-
onExcessProperty: "ignore",
|
|
20
|
-
errors: "all",
|
|
21
|
-
});
|
|
22
|
-
if (Result.isFailure(decoded)) {
|
|
23
|
-
return Effect.succeed([]);
|
|
24
|
-
}
|
|
25
|
-
const findings = [];
|
|
26
|
-
for (const binding of decoded.success.bindings) {
|
|
27
|
-
if (binding.matcherRaw !== undefined) {
|
|
28
|
-
findings.push({
|
|
29
|
-
kind: "advisory",
|
|
30
|
-
ruleId: RULE_ID,
|
|
31
|
-
severity: "warning",
|
|
32
|
-
message: "hook.json uses matcherRaw, which is native-agent-specific and not portable. Prefer `match.tools` with canonical tool IDs.",
|
|
33
|
-
location: { file: HOOK_MANIFEST_FILENAME },
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
for (const target of Object.values(binding.targets ?? {})) {
|
|
37
|
-
if (target.matcherRaw !== undefined) {
|
|
38
|
-
findings.push({
|
|
39
|
-
kind: "advisory",
|
|
40
|
-
ruleId: RULE_ID,
|
|
41
|
-
severity: "warning",
|
|
42
|
-
message: "hook.json uses a target matcherRaw override, which is native-agent-specific and not portable.",
|
|
43
|
-
location: { file: HOOK_MANIFEST_FILENAME },
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return Effect.succeed(findings);
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=matcher-raw-portability.js.map
|