@agentxm/extension-model 0.31.1-preview.35463507166.59e3bf3d74da → 0.32.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.
@@ -4,7 +4,7 @@
4
4
  * @experimental This API is unstable and may change without notice.
5
5
  */
6
6
  import * as Schema from "effect/Schema";
7
- import { CanonicalHookEventIdSchema, CanonicalHookToolIdSchema, HookBlockOutcomeSchema, HookModifyOperationSchema, } from "../agent-capabilities/index.js";
7
+ import { CanonicalHookEventIdSchema, CanonicalHookToolIdSchema, HookBlockOutcomeSchema, HookModifyOperationSchema, } from "../agent-capabilities/schema.js";
8
8
  import { CommonManifestBaseFields, ExtensionNameSchema, NonPackManifestFields, } from "../extensions/common.js";
9
9
  export const HOOK_MANIFEST_FILENAME = "hook.json";
10
10
  export const HOOK_EXTENSION_DIR = "hooks";
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "description": "Shared AgentXM extension model: identities, manifests, version constraints, and agent capabilities. Unstable and unsupported — use the axm.sh CLI.",
13
13
  "devDependencies": {
14
- "@agentxm/specification-metadata": "0.31.1-preview.35463507166.59e3bf3d74da",
14
+ "@agentxm/specification-metadata": "0.32.0",
15
15
  "@effect/vitest": "4.0.0-rc.115",
16
16
  "@fast-check/vitest": "^0.5.0",
17
17
  "@types/semver": "^7.7.1",
@@ -40,6 +40,10 @@
40
40
  "types": "./dist/src/unstable/agent-capabilities/identity.d.ts",
41
41
  "default": "./dist/src/unstable/agent-capabilities/identity.js"
42
42
  },
43
+ "./unstable/agent-capabilities/schema": {
44
+ "types": "./dist/src/unstable/agent-capabilities/schema.d.ts",
45
+ "default": "./dist/src/unstable/agent-capabilities/schema.js"
46
+ },
43
47
  "./unstable/agents/registry": {
44
48
  "types": "./dist/src/unstable/agents/registry.d.ts",
45
49
  "default": "./dist/src/unstable/agents/registry.js"
@@ -212,10 +216,6 @@
212
216
  "types": "./dist/src/unstable/path-types.d.ts",
213
217
  "default": "./dist/src/unstable/path-types.js"
214
218
  },
215
- "./unstable/release-channel": {
216
- "types": "./dist/src/unstable/release-channel.d.ts",
217
- "default": "./dist/src/unstable/release-channel.js"
218
- },
219
219
  "./unstable/recommendations/agent-extensions": {
220
220
  "types": "./dist/src/unstable/recommendations/agent-extensions.d.ts",
221
221
  "default": "./dist/src/unstable/recommendations/agent-extensions.js"
@@ -305,5 +305,5 @@
305
305
  },
306
306
  "sideEffects": false,
307
307
  "type": "module",
308
- "version": "0.31.1-preview.35463507166.59e3bf3d74da"
308
+ "version": "0.32.0"
309
309
  }
@@ -1,156 +0,0 @@
1
- import * as Schema from "effect/Schema";
2
- /** @experimental This API is unstable and may change without notice. */
3
- export declare const STABLE_CHANNEL_SCHEMA = "axm.release-channel/v1";
4
- /** @experimental This API is unstable and may change without notice. */
5
- export declare const STABLE_CHANNEL_URL = "https://releases.axm.sh/v1/channels/stable.json";
6
- /** @experimental This API is unstable and may change without notice. */
7
- export declare const STABLE_CHANNEL_REPOSITORY = "agentxm/axm";
8
- /**
9
- * Public stable-channel document. Exact-version artifacts remain hosted by the
10
- * immutable GitHub Release coordinate contained in this validated document.
11
- *
12
- * @experimental This API is unstable and may change without notice.
13
- */
14
- export declare const StableChannelDocumentV1Schema: Schema.Struct<{
15
- readonly schema: Schema.Literal<"axm.release-channel/v1">;
16
- readonly channel: Schema.Literal<"stable">;
17
- readonly revision: Schema.Int;
18
- readonly version: Schema.String;
19
- readonly release: Schema.Struct<{
20
- readonly repository: Schema.Literal<"agentxm/axm">;
21
- readonly tag: Schema.String;
22
- readonly commit: Schema.String;
23
- readonly publishedAt: Schema.String;
24
- }>;
25
- readonly artifacts: Schema.Struct<{
26
- readonly checksumManifest: Schema.Struct<{
27
- readonly name: Schema.Literal<"SHA256SUMS">;
28
- readonly url: Schema.String;
29
- readonly sha256: Schema.String;
30
- }>;
31
- readonly binaries: Schema.Tuple<readonly [Schema.Struct<{
32
- readonly target: Schema.Literal<"darwin-arm64">;
33
- readonly name: Schema.Literal<"axm-darwin-arm64">;
34
- readonly url: Schema.String;
35
- readonly sha256: Schema.String;
36
- }>, Schema.Struct<{
37
- readonly target: Schema.Literal<"darwin-x64">;
38
- readonly name: Schema.Literal<"axm-darwin-x64">;
39
- readonly url: Schema.String;
40
- readonly sha256: Schema.String;
41
- }>, Schema.Struct<{
42
- readonly target: Schema.Literal<"linux-arm64">;
43
- readonly name: Schema.Literal<"axm-linux-arm64">;
44
- readonly url: Schema.String;
45
- readonly sha256: Schema.String;
46
- }>, Schema.Struct<{
47
- readonly target: Schema.Literal<"linux-x64">;
48
- readonly name: Schema.Literal<"axm-linux-x64">;
49
- readonly url: Schema.String;
50
- readonly sha256: Schema.String;
51
- }>, Schema.Struct<{
52
- readonly target: Schema.Literal<"windows-x64">;
53
- readonly name: Schema.Literal<"axm-windows-x64.exe">;
54
- readonly url: Schema.String;
55
- readonly sha256: Schema.String;
56
- }>]>;
57
- }>;
58
- readonly promotedAt: Schema.String;
59
- }>;
60
- /** @experimental This API is unstable and may change without notice. */
61
- export type StableChannelDocumentV1 = typeof StableChannelDocumentV1Schema.Type;
62
- /** @experimental This API is unstable and may change without notice. */
63
- export declare const decodeStableChannelDocument: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
64
- readonly schema: "axm.release-channel/v1";
65
- readonly channel: "stable";
66
- readonly revision: number;
67
- readonly version: string;
68
- readonly release: {
69
- readonly repository: "agentxm/axm";
70
- readonly tag: string;
71
- readonly commit: string;
72
- readonly publishedAt: string;
73
- };
74
- readonly artifacts: {
75
- readonly checksumManifest: {
76
- readonly name: "SHA256SUMS";
77
- readonly url: string;
78
- readonly sha256: string;
79
- };
80
- readonly binaries: readonly [{
81
- readonly target: "darwin-arm64";
82
- readonly name: "axm-darwin-arm64";
83
- readonly url: string;
84
- readonly sha256: string;
85
- }, {
86
- readonly target: "darwin-x64";
87
- readonly name: "axm-darwin-x64";
88
- readonly url: string;
89
- readonly sha256: string;
90
- }, {
91
- readonly target: "linux-arm64";
92
- readonly name: "axm-linux-arm64";
93
- readonly url: string;
94
- readonly sha256: string;
95
- }, {
96
- readonly target: "linux-x64";
97
- readonly name: "axm-linux-x64";
98
- readonly url: string;
99
- readonly sha256: string;
100
- }, {
101
- readonly target: "windows-x64";
102
- readonly name: "axm-windows-x64.exe";
103
- readonly url: string;
104
- readonly sha256: string;
105
- }];
106
- };
107
- readonly promotedAt: string;
108
- }, Schema.SchemaError, never>;
109
- /** @experimental This API is unstable and may change without notice. */
110
- export declare const decodeStableChannelDocumentSync: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => {
111
- readonly schema: "axm.release-channel/v1";
112
- readonly channel: "stable";
113
- readonly revision: number;
114
- readonly version: string;
115
- readonly release: {
116
- readonly repository: "agentxm/axm";
117
- readonly tag: string;
118
- readonly commit: string;
119
- readonly publishedAt: string;
120
- };
121
- readonly artifacts: {
122
- readonly checksumManifest: {
123
- readonly name: "SHA256SUMS";
124
- readonly url: string;
125
- readonly sha256: string;
126
- };
127
- readonly binaries: readonly [{
128
- readonly target: "darwin-arm64";
129
- readonly name: "axm-darwin-arm64";
130
- readonly url: string;
131
- readonly sha256: string;
132
- }, {
133
- readonly target: "darwin-x64";
134
- readonly name: "axm-darwin-x64";
135
- readonly url: string;
136
- readonly sha256: string;
137
- }, {
138
- readonly target: "linux-arm64";
139
- readonly name: "axm-linux-arm64";
140
- readonly url: string;
141
- readonly sha256: string;
142
- }, {
143
- readonly target: "linux-x64";
144
- readonly name: "axm-linux-x64";
145
- readonly url: string;
146
- readonly sha256: string;
147
- }, {
148
- readonly target: "windows-x64";
149
- readonly name: "axm-windows-x64.exe";
150
- readonly url: string;
151
- readonly sha256: string;
152
- }];
153
- };
154
- readonly promotedAt: string;
155
- };
156
- //# sourceMappingURL=release-channel.d.ts.map
@@ -1,92 +0,0 @@
1
- import * as Schema from "effect/Schema";
2
- import * as semver from "semver";
3
- /** @experimental This API is unstable and may change without notice. */
4
- export const STABLE_CHANNEL_SCHEMA = "axm.release-channel/v1";
5
- /** @experimental This API is unstable and may change without notice. */
6
- export const STABLE_CHANNEL_URL = "https://releases.axm.sh/v1/channels/stable.json";
7
- /** @experimental This API is unstable and may change without notice. */
8
- export const STABLE_CHANNEL_REPOSITORY = "agentxm/axm";
9
- const Sha256Schema = Schema.String.pipe(Schema.check(Schema.isPattern(/^[0-9a-f]{64}$/u, {
10
- message: "Expected a lowercase SHA-256 digest",
11
- })));
12
- const UtcInstantSchema = Schema.String.pipe(Schema.check(Schema.makeFilter((value) => {
13
- if (!value.endsWith("Z") || Number.isNaN(Date.parse(value))) {
14
- return "Expected a valid UTC RFC 3339 instant";
15
- }
16
- return undefined;
17
- })));
18
- const StableVersionSchema = Schema.String.pipe(Schema.check(Schema.makeFilter((value) => {
19
- const normalized = semver.valid(value);
20
- return normalized === value && semver.prerelease(value) === null
21
- ? undefined
22
- : "Expected a normalized stable semantic version without a leading v";
23
- })));
24
- const ReleaseBinarySchema = (target, name) => Schema.Struct({
25
- target: Schema.Literal(target),
26
- name: Schema.Literal(name),
27
- url: Schema.String,
28
- sha256: Sha256Schema,
29
- });
30
- const StableChannelDocumentShape = Schema.Struct({
31
- schema: Schema.Literal(STABLE_CHANNEL_SCHEMA),
32
- channel: Schema.Literal("stable"),
33
- revision: Schema.Int.pipe(Schema.check(Schema.isGreaterThanOrEqualTo(1, { message: "Expected a positive revision" }))),
34
- version: StableVersionSchema,
35
- release: Schema.Struct({
36
- repository: Schema.Literal(STABLE_CHANNEL_REPOSITORY),
37
- tag: Schema.String,
38
- commit: Schema.String.pipe(Schema.check(Schema.isPattern(/^[0-9a-f]{40}$/u, {
39
- message: "Expected a lowercase 40-character Git object ID",
40
- }))),
41
- publishedAt: UtcInstantSchema,
42
- }),
43
- artifacts: Schema.Struct({
44
- checksumManifest: Schema.Struct({
45
- name: Schema.Literal("SHA256SUMS"),
46
- url: Schema.String,
47
- sha256: Sha256Schema,
48
- }),
49
- binaries: Schema.Tuple([
50
- ReleaseBinarySchema("darwin-arm64", "axm-darwin-arm64"),
51
- ReleaseBinarySchema("darwin-x64", "axm-darwin-x64"),
52
- ReleaseBinarySchema("linux-arm64", "axm-linux-arm64"),
53
- ReleaseBinarySchema("linux-x64", "axm-linux-x64"),
54
- ReleaseBinarySchema("windows-x64", "axm-windows-x64.exe"),
55
- ]),
56
- }),
57
- promotedAt: UtcInstantSchema,
58
- });
59
- const expectedAssetUrl = (tag, name) => `https://github.com/${STABLE_CHANNEL_REPOSITORY}/releases/download/${tag}/${name}`;
60
- const validateStableChannelDocument = (document) => {
61
- const issues = [];
62
- const expectedTag = `cli-v${document.version}`;
63
- if (document.release.tag !== expectedTag) {
64
- issues.push(`release.tag must equal ${expectedTag}`);
65
- }
66
- const checksumUrl = expectedAssetUrl(expectedTag, document.artifacts.checksumManifest.name);
67
- if (document.artifacts.checksumManifest.url !== checksumUrl) {
68
- issues.push(`artifacts.checksumManifest.url must equal ${checksumUrl}`);
69
- }
70
- for (const binary of document.artifacts.binaries) {
71
- const url = expectedAssetUrl(expectedTag, binary.name);
72
- if (binary.url !== url) {
73
- issues.push(`artifact URL for ${binary.name} must equal ${url}`);
74
- }
75
- }
76
- if (Date.parse(document.promotedAt) < Date.parse(document.release.publishedAt)) {
77
- issues.push("promotedAt must not be earlier than release.publishedAt");
78
- }
79
- return issues;
80
- };
81
- /**
82
- * Public stable-channel document. Exact-version artifacts remain hosted by the
83
- * immutable GitHub Release coordinate contained in this validated document.
84
- *
85
- * @experimental This API is unstable and may change without notice.
86
- */
87
- export const StableChannelDocumentV1Schema = StableChannelDocumentShape.pipe(Schema.check(Schema.makeFilter(validateStableChannelDocument)));
88
- /** @experimental This API is unstable and may change without notice. */
89
- export const decodeStableChannelDocument = Schema.decodeUnknownEffect(StableChannelDocumentV1Schema);
90
- /** @experimental This API is unstable and may change without notice. */
91
- export const decodeStableChannelDocumentSync = Schema.decodeUnknownSync(StableChannelDocumentV1Schema);
92
- //# sourceMappingURL=release-channel.js.map