agentpacks 0.3.0 → 0.4.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.
Files changed (166) hide show
  1. package/README.md +168 -8
  2. package/dist/api.d.ts +2 -0
  3. package/dist/api.js +929 -409
  4. package/dist/cli/export-cmd.js +281 -149
  5. package/dist/cli/generate.js +740 -247
  6. package/dist/cli/import-cmd.js +57 -85
  7. package/dist/cli/info.d.ts +4 -0
  8. package/dist/cli/info.js +232 -0
  9. package/dist/cli/init.js +8 -36
  10. package/dist/cli/install.js +414 -129
  11. package/dist/cli/login.d.ts +9 -0
  12. package/dist/cli/login.js +202 -0
  13. package/dist/cli/models-explain.d.ts +16 -0
  14. package/dist/cli/models-explain.js +1205 -0
  15. package/dist/cli/pack/create.js +4 -32
  16. package/dist/cli/pack/enable.js +1 -29
  17. package/dist/cli/pack/list.js +266 -134
  18. package/dist/cli/pack/validate.js +274 -127
  19. package/dist/cli/publish.d.ts +8 -0
  20. package/dist/cli/publish.js +672 -0
  21. package/dist/cli/search.d.ts +12 -0
  22. package/dist/cli/search.js +210 -0
  23. package/dist/core/config.d.ts +2 -1
  24. package/dist/core/config.js +74 -117
  25. package/dist/core/dependency-resolver.js +4 -28
  26. package/dist/core/feature-merger.d.ts +7 -0
  27. package/dist/core/feature-merger.js +289 -29
  28. package/dist/core/index.js +283 -140
  29. package/dist/core/lockfile.js +0 -28
  30. package/dist/core/metarepo.js +74 -116
  31. package/dist/core/pack-loader.d.ts +2 -0
  32. package/dist/core/pack-loader.js +266 -133
  33. package/dist/core/profile-resolver.d.ts +75 -0
  34. package/dist/core/profile-resolver.js +111 -0
  35. package/dist/exporters/cursor-plugin.js +4 -32
  36. package/dist/exporters/index.js +4 -32
  37. package/dist/features/agents.d.ts +5 -0
  38. package/dist/features/agents.js +2 -30
  39. package/dist/features/commands.js +2 -30
  40. package/dist/features/hooks.js +2 -30
  41. package/dist/features/ignore.js +0 -28
  42. package/dist/features/index.d.ts +1 -0
  43. package/dist/features/index.js +176 -31
  44. package/dist/features/mcp.js +2 -30
  45. package/dist/features/models.d.ts +167 -0
  46. package/dist/features/models.js +293 -0
  47. package/dist/features/plugins.js +2 -30
  48. package/dist/features/rules.js +2 -30
  49. package/dist/features/skills.js +2 -30
  50. package/dist/importers/claude-code.js +10 -38
  51. package/dist/importers/cursor.js +15 -43
  52. package/dist/importers/opencode.js +16 -44
  53. package/dist/importers/rulesync.js +22 -50
  54. package/dist/index.js +1710 -538
  55. package/dist/node/api.js +929 -409
  56. package/dist/node/cli/export-cmd.js +281 -149
  57. package/dist/node/cli/generate.js +740 -247
  58. package/dist/node/cli/import-cmd.js +57 -85
  59. package/dist/node/cli/info.js +232 -0
  60. package/dist/node/cli/init.js +8 -36
  61. package/dist/node/cli/install.js +414 -129
  62. package/dist/node/cli/login.js +202 -0
  63. package/dist/node/cli/models-explain.js +1205 -0
  64. package/dist/node/cli/pack/create.js +4 -32
  65. package/dist/node/cli/pack/enable.js +1 -29
  66. package/dist/node/cli/pack/list.js +266 -134
  67. package/dist/node/cli/pack/validate.js +274 -127
  68. package/dist/node/cli/publish.js +672 -0
  69. package/dist/node/cli/search.js +210 -0
  70. package/dist/node/core/config.js +74 -117
  71. package/dist/node/core/dependency-resolver.js +4 -28
  72. package/dist/node/core/feature-merger.js +289 -29
  73. package/dist/node/core/index.js +283 -140
  74. package/dist/node/core/lockfile.js +0 -28
  75. package/dist/node/core/metarepo.js +74 -116
  76. package/dist/node/core/pack-loader.js +266 -133
  77. package/dist/node/core/profile-resolver.js +111 -0
  78. package/dist/node/exporters/cursor-plugin.js +4 -32
  79. package/dist/node/exporters/index.js +4 -32
  80. package/dist/node/features/agents.js +2 -30
  81. package/dist/node/features/commands.js +2 -30
  82. package/dist/node/features/hooks.js +2 -30
  83. package/dist/node/features/ignore.js +0 -28
  84. package/dist/node/features/index.js +176 -31
  85. package/dist/node/features/mcp.js +2 -30
  86. package/dist/node/features/models.js +293 -0
  87. package/dist/node/features/plugins.js +2 -30
  88. package/dist/node/features/rules.js +2 -30
  89. package/dist/node/features/skills.js +2 -30
  90. package/dist/node/importers/claude-code.js +10 -38
  91. package/dist/node/importers/cursor.js +15 -43
  92. package/dist/node/importers/opencode.js +16 -44
  93. package/dist/node/importers/rulesync.js +22 -50
  94. package/dist/node/index.js +1710 -538
  95. package/dist/node/sources/git-ref.js +7 -30
  96. package/dist/node/sources/git.js +7 -30
  97. package/dist/node/sources/index.js +337 -39
  98. package/dist/node/sources/local.js +0 -28
  99. package/dist/node/sources/npm-ref.js +0 -28
  100. package/dist/node/sources/npm.js +10 -37
  101. package/dist/node/sources/registry-ref.js +37 -0
  102. package/dist/node/sources/registry.js +355 -0
  103. package/dist/node/targets/additional-targets.js +196 -37
  104. package/dist/node/targets/agents-md.js +5 -33
  105. package/dist/node/targets/base-target.js +0 -28
  106. package/dist/node/targets/claude-code.js +211 -41
  107. package/dist/node/targets/codex-cli.js +7 -35
  108. package/dist/node/targets/copilot.js +202 -41
  109. package/dist/node/targets/cursor.js +188 -40
  110. package/dist/node/targets/gemini-cli.js +10 -38
  111. package/dist/node/targets/generic-md-target.js +196 -37
  112. package/dist/node/targets/index.js +414 -106
  113. package/dist/node/targets/opencode.js +171 -51
  114. package/dist/node/targets/registry.js +414 -106
  115. package/dist/node/utils/credentials.js +38 -0
  116. package/dist/node/utils/diff.js +22 -34
  117. package/dist/node/utils/filesystem.js +2 -30
  118. package/dist/node/utils/frontmatter.js +0 -28
  119. package/dist/node/utils/global.js +3 -31
  120. package/dist/node/utils/markdown.js +0 -28
  121. package/dist/node/utils/model-allowlist.js +110 -0
  122. package/dist/node/utils/model-guidance.js +78 -0
  123. package/dist/node/utils/registry-client.js +142 -0
  124. package/dist/node/utils/tarball.js +49 -0
  125. package/dist/sources/git-ref.js +7 -30
  126. package/dist/sources/git.d.ts +2 -2
  127. package/dist/sources/git.js +7 -30
  128. package/dist/sources/index.d.ts +2 -0
  129. package/dist/sources/index.js +337 -39
  130. package/dist/sources/local.js +0 -28
  131. package/dist/sources/npm-ref.js +0 -28
  132. package/dist/sources/npm.js +10 -37
  133. package/dist/sources/registry-ref.d.ts +30 -0
  134. package/dist/sources/registry-ref.js +37 -0
  135. package/dist/sources/registry.d.ts +18 -0
  136. package/dist/sources/registry.js +355 -0
  137. package/dist/targets/additional-targets.js +196 -37
  138. package/dist/targets/agents-md.js +5 -33
  139. package/dist/targets/base-target.d.ts +2 -0
  140. package/dist/targets/base-target.js +0 -28
  141. package/dist/targets/claude-code.js +211 -41
  142. package/dist/targets/codex-cli.js +7 -35
  143. package/dist/targets/copilot.js +202 -41
  144. package/dist/targets/cursor.js +188 -40
  145. package/dist/targets/gemini-cli.js +10 -38
  146. package/dist/targets/generic-md-target.js +196 -37
  147. package/dist/targets/index.js +414 -106
  148. package/dist/targets/opencode.js +171 -51
  149. package/dist/targets/registry.js +414 -106
  150. package/dist/utils/credentials.d.ts +19 -0
  151. package/dist/utils/credentials.js +38 -0
  152. package/dist/utils/diff.js +22 -34
  153. package/dist/utils/filesystem.js +2 -30
  154. package/dist/utils/frontmatter.js +0 -28
  155. package/dist/utils/global.js +3 -31
  156. package/dist/utils/markdown.js +0 -28
  157. package/dist/utils/model-allowlist.d.ts +39 -0
  158. package/dist/utils/model-allowlist.js +110 -0
  159. package/dist/utils/model-guidance.d.ts +6 -0
  160. package/dist/utils/model-guidance.js +78 -0
  161. package/dist/utils/registry-client.d.ts +141 -0
  162. package/dist/utils/registry-client.js +142 -0
  163. package/dist/utils/tarball.d.ts +13 -0
  164. package/dist/utils/tarball.js +49 -0
  165. package/package.json +171 -5
  166. package/templates/pack/models.json +38 -0
@@ -0,0 +1,142 @@
1
+ // @bun
2
+ var __require = import.meta.require;
3
+
4
+ // src/utils/registry-client.ts
5
+ var DEFAULT_REGISTRY_URL = "https://registry.agentpacks.dev";
6
+ function createRegistryClient(config) {
7
+ return new RegistryClient({
8
+ registryUrl: config?.registryUrl ?? DEFAULT_REGISTRY_URL,
9
+ authToken: config?.authToken,
10
+ timeout: config?.timeout ?? 30000
11
+ });
12
+ }
13
+
14
+ class RegistryClient {
15
+ config;
16
+ constructor(config) {
17
+ this.config = {
18
+ registryUrl: config.registryUrl.replace(/\/+$/, ""),
19
+ authToken: config.authToken,
20
+ timeout: config.timeout ?? 30000
21
+ };
22
+ }
23
+ async search(params) {
24
+ const searchParams = new URLSearchParams;
25
+ if (params.query)
26
+ searchParams.set("q", params.query);
27
+ if (params.tags?.length)
28
+ searchParams.set("tags", params.tags.join(","));
29
+ if (params.targets?.length)
30
+ searchParams.set("targets", params.targets.join(","));
31
+ if (params.features?.length)
32
+ searchParams.set("features", params.features.join(","));
33
+ if (params.author)
34
+ searchParams.set("author", params.author);
35
+ if (params.sort)
36
+ searchParams.set("sort", params.sort);
37
+ if (params.limit)
38
+ searchParams.set("limit", String(params.limit));
39
+ if (params.offset)
40
+ searchParams.set("offset", String(params.offset));
41
+ const url = `${this.config.registryUrl}/packs?${searchParams.toString()}`;
42
+ const res = await this.fetch(url);
43
+ return res;
44
+ }
45
+ async info(packName) {
46
+ const url = `${this.config.registryUrl}/packs/${encodeURIComponent(packName)}`;
47
+ const res = await this.fetch(url);
48
+ return res;
49
+ }
50
+ async download(packName, version = "latest") {
51
+ const url = `${this.config.registryUrl}/packs/${encodeURIComponent(packName)}/versions/${encodeURIComponent(version)}/download`;
52
+ const response = await fetch(url, {
53
+ headers: this.headers(),
54
+ signal: AbortSignal.timeout(this.config.timeout)
55
+ });
56
+ if (!response.ok) {
57
+ throw new RegistryApiError(response.status, `Failed to download ${packName}@${version}: ${response.statusText}`);
58
+ }
59
+ const integrity = response.headers.get("x-integrity") ?? "";
60
+ const data = await response.arrayBuffer();
61
+ return { data, integrity };
62
+ }
63
+ async publish(tarball, metadata) {
64
+ if (!this.config.authToken) {
65
+ throw new Error("Authentication required. Run `agentpacks login` first.");
66
+ }
67
+ const formData = new FormData;
68
+ formData.append("tarball", new Blob([tarball], { type: "application/gzip" }), `${metadata.name}-${metadata.version}.tgz`);
69
+ formData.append("metadata", JSON.stringify(metadata));
70
+ const url = `${this.config.registryUrl}/packs`;
71
+ const response = await fetch(url, {
72
+ method: "POST",
73
+ headers: {
74
+ Authorization: `Bearer ${this.config.authToken}`
75
+ },
76
+ body: formData,
77
+ signal: AbortSignal.timeout(this.config.timeout)
78
+ });
79
+ if (!response.ok) {
80
+ const body = await response.text();
81
+ throw new RegistryApiError(response.status, `Publish failed: ${body || response.statusText}`);
82
+ }
83
+ return await response.json();
84
+ }
85
+ async featured(limit) {
86
+ const url = limit ? `${this.config.registryUrl}/featured?limit=${limit}` : `${this.config.registryUrl}/featured`;
87
+ const res = await this.fetch(url);
88
+ return res.packs;
89
+ }
90
+ async tags() {
91
+ const url = `${this.config.registryUrl}/tags`;
92
+ const res = await this.fetch(url);
93
+ return res.tags;
94
+ }
95
+ async stats() {
96
+ const url = `${this.config.registryUrl}/stats`;
97
+ return await this.fetch(url);
98
+ }
99
+ async health() {
100
+ try {
101
+ const url = `${this.config.registryUrl}/health`;
102
+ await this.fetch(url);
103
+ return true;
104
+ } catch {
105
+ return false;
106
+ }
107
+ }
108
+ async fetch(url) {
109
+ const response = await fetch(url, {
110
+ headers: this.headers(),
111
+ signal: AbortSignal.timeout(this.config.timeout)
112
+ });
113
+ if (!response.ok) {
114
+ const body = await response.text();
115
+ throw new RegistryApiError(response.status, body || response.statusText);
116
+ }
117
+ return response.json();
118
+ }
119
+ headers() {
120
+ const h = {
121
+ Accept: "application/json"
122
+ };
123
+ if (this.config.authToken) {
124
+ h["Authorization"] = `Bearer ${this.config.authToken}`;
125
+ }
126
+ return h;
127
+ }
128
+ }
129
+
130
+ class RegistryApiError extends Error {
131
+ status;
132
+ constructor(status, message) {
133
+ super(message);
134
+ this.name = "RegistryApiError";
135
+ this.status = status;
136
+ }
137
+ }
138
+ export {
139
+ createRegistryClient,
140
+ RegistryClient,
141
+ RegistryApiError
142
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Create a tarball from a pack directory.
3
+ * Returns the tarball as an ArrayBuffer.
4
+ */
5
+ export declare function createTarball(packDir: string): Promise<ArrayBuffer>;
6
+ /**
7
+ * Extract a tarball to a directory.
8
+ */
9
+ export declare function extractTarball(data: ArrayBuffer, targetDir: string): Promise<void>;
10
+ /**
11
+ * Compute SHA-256 integrity hash for an ArrayBuffer.
12
+ */
13
+ export declare function computeTarballIntegrity(data: ArrayBuffer): string;
@@ -0,0 +1,49 @@
1
+ // @bun
2
+ var __require = import.meta.require;
3
+
4
+ // src/utils/tarball.ts
5
+ import { execSync } from "child_process";
6
+ import { readFileSync, existsSync, mkdirSync, rmSync } from "fs";
7
+ import { join, resolve } from "path";
8
+ import { createHash } from "crypto";
9
+ import { tmpdir } from "os";
10
+ async function createTarball(packDir) {
11
+ const absDir = resolve(packDir);
12
+ const tmpFile = join(tmpdir(), `agentpacks-${Date.now()}.tgz`);
13
+ try {
14
+ execSync(`tar -czf "${tmpFile}" -C "${absDir}" .`, {
15
+ stdio: "pipe"
16
+ });
17
+ const buffer = readFileSync(tmpFile);
18
+ return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength);
19
+ } finally {
20
+ if (existsSync(tmpFile)) {
21
+ rmSync(tmpFile);
22
+ }
23
+ }
24
+ }
25
+ async function extractTarball(data, targetDir) {
26
+ mkdirSync(targetDir, { recursive: true });
27
+ const tmpFile = join(tmpdir(), `agentpacks-${Date.now()}.tgz`);
28
+ try {
29
+ const buffer = Buffer.from(data);
30
+ const { writeFileSync } = await import("fs");
31
+ writeFileSync(tmpFile, buffer);
32
+ execSync(`tar -xzf "${tmpFile}" -C "${targetDir}"`, {
33
+ stdio: "pipe"
34
+ });
35
+ } finally {
36
+ if (existsSync(tmpFile)) {
37
+ rmSync(tmpFile);
38
+ }
39
+ }
40
+ }
41
+ function computeTarballIntegrity(data) {
42
+ const hash = createHash("sha256").update(Buffer.from(data)).digest("hex");
43
+ return `sha256-${hash}`;
44
+ }
45
+ export {
46
+ extractTarball,
47
+ createTarball,
48
+ computeTarballIntegrity
49
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentpacks",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "Composable AI agent configuration manager. Pack-based rules, commands, skills, hooks, and MCP sync across OpenCode, Cursor, Claude Code, Codex, Gemini, Copilot, and more.",
6
6
  "keywords": [
@@ -67,6 +67,12 @@
67
67
  "node": "./dist/node/cli/import-cmd.js",
68
68
  "default": "./dist/cli/import-cmd.js"
69
69
  },
70
+ "./cli/info": {
71
+ "types": "./dist/cli/info.d.ts",
72
+ "bun": "./dist/cli/info.js",
73
+ "node": "./dist/node/cli/info.js",
74
+ "default": "./dist/cli/info.js"
75
+ },
70
76
  "./cli/init": {
71
77
  "types": "./dist/cli/init.d.ts",
72
78
  "bun": "./dist/cli/init.js",
@@ -79,6 +85,18 @@
79
85
  "node": "./dist/node/cli/install.js",
80
86
  "default": "./dist/cli/install.js"
81
87
  },
88
+ "./cli/login": {
89
+ "types": "./dist/cli/login.d.ts",
90
+ "bun": "./dist/cli/login.js",
91
+ "node": "./dist/node/cli/login.js",
92
+ "default": "./dist/cli/login.js"
93
+ },
94
+ "./cli/models-explain": {
95
+ "types": "./dist/cli/models-explain.d.ts",
96
+ "bun": "./dist/cli/models-explain.js",
97
+ "node": "./dist/node/cli/models-explain.js",
98
+ "default": "./dist/cli/models-explain.js"
99
+ },
82
100
  "./cli/pack/create": {
83
101
  "types": "./dist/cli/pack/create.d.ts",
84
102
  "bun": "./dist/cli/pack/create.js",
@@ -103,6 +121,18 @@
103
121
  "node": "./dist/node/cli/pack/validate.js",
104
122
  "default": "./dist/cli/pack/validate.js"
105
123
  },
124
+ "./cli/publish": {
125
+ "types": "./dist/cli/publish.d.ts",
126
+ "bun": "./dist/cli/publish.js",
127
+ "node": "./dist/node/cli/publish.js",
128
+ "default": "./dist/cli/publish.js"
129
+ },
130
+ "./cli/search": {
131
+ "types": "./dist/cli/search.d.ts",
132
+ "bun": "./dist/cli/search.js",
133
+ "node": "./dist/node/cli/search.js",
134
+ "default": "./dist/cli/search.js"
135
+ },
106
136
  "./core": {
107
137
  "types": "./dist/core/index.d.ts",
108
138
  "bun": "./dist/core/index.js",
@@ -151,6 +181,12 @@
151
181
  "node": "./dist/node/core/pack-loader.js",
152
182
  "default": "./dist/core/pack-loader.js"
153
183
  },
184
+ "./core/profile-resolver": {
185
+ "types": "./dist/core/profile-resolver.d.ts",
186
+ "bun": "./dist/core/profile-resolver.js",
187
+ "node": "./dist/node/core/profile-resolver.js",
188
+ "default": "./dist/core/profile-resolver.js"
189
+ },
154
190
  "./exporters": {
155
191
  "types": "./dist/exporters/index.d.ts",
156
192
  "bun": "./dist/exporters/index.js",
@@ -211,6 +247,12 @@
211
247
  "node": "./dist/node/features/mcp.js",
212
248
  "default": "./dist/features/mcp.js"
213
249
  },
250
+ "./features/models": {
251
+ "types": "./dist/features/models.d.ts",
252
+ "bun": "./dist/features/models.js",
253
+ "node": "./dist/node/features/models.js",
254
+ "default": "./dist/features/models.js"
255
+ },
214
256
  "./features/plugins": {
215
257
  "types": "./dist/features/plugins.d.ts",
216
258
  "bun": "./dist/features/plugins.js",
@@ -295,6 +337,18 @@
295
337
  "node": "./dist/node/sources/npm-ref.js",
296
338
  "default": "./dist/sources/npm-ref.js"
297
339
  },
340
+ "./sources/registry": {
341
+ "types": "./dist/sources/registry.d.ts",
342
+ "bun": "./dist/sources/registry.js",
343
+ "node": "./dist/node/sources/registry.js",
344
+ "default": "./dist/sources/registry.js"
345
+ },
346
+ "./sources/registry-ref": {
347
+ "types": "./dist/sources/registry-ref.d.ts",
348
+ "bun": "./dist/sources/registry-ref.js",
349
+ "node": "./dist/node/sources/registry-ref.js",
350
+ "default": "./dist/sources/registry-ref.js"
351
+ },
298
352
  "./targets": {
299
353
  "types": "./dist/targets/index.d.ts",
300
354
  "bun": "./dist/targets/index.js",
@@ -373,6 +427,12 @@
373
427
  "node": "./dist/node/targets/registry.js",
374
428
  "default": "./dist/targets/registry.js"
375
429
  },
430
+ "./utils/credentials": {
431
+ "types": "./dist/utils/credentials.d.ts",
432
+ "bun": "./dist/utils/credentials.js",
433
+ "node": "./dist/node/utils/credentials.js",
434
+ "default": "./dist/utils/credentials.js"
435
+ },
376
436
  "./utils/diff": {
377
437
  "types": "./dist/utils/diff.d.ts",
378
438
  "bun": "./dist/utils/diff.js",
@@ -402,6 +462,30 @@
402
462
  "bun": "./dist/utils/markdown.js",
403
463
  "node": "./dist/node/utils/markdown.js",
404
464
  "default": "./dist/utils/markdown.js"
465
+ },
466
+ "./utils/model-allowlist": {
467
+ "types": "./dist/utils/model-allowlist.d.ts",
468
+ "bun": "./dist/utils/model-allowlist.js",
469
+ "node": "./dist/node/utils/model-allowlist.js",
470
+ "default": "./dist/utils/model-allowlist.js"
471
+ },
472
+ "./utils/model-guidance": {
473
+ "types": "./dist/utils/model-guidance.d.ts",
474
+ "bun": "./dist/utils/model-guidance.js",
475
+ "node": "./dist/node/utils/model-guidance.js",
476
+ "default": "./dist/utils/model-guidance.js"
477
+ },
478
+ "./utils/registry-client": {
479
+ "types": "./dist/utils/registry-client.d.ts",
480
+ "bun": "./dist/utils/registry-client.js",
481
+ "node": "./dist/node/utils/registry-client.js",
482
+ "default": "./dist/utils/registry-client.js"
483
+ },
484
+ "./utils/tarball": {
485
+ "types": "./dist/utils/tarball.d.ts",
486
+ "bun": "./dist/utils/tarball.js",
487
+ "node": "./dist/node/utils/tarball.js",
488
+ "default": "./dist/utils/tarball.js"
405
489
  }
406
490
  },
407
491
  "files": [
@@ -414,15 +498,13 @@
414
498
  "commander": "^14.0.3",
415
499
  "chalk": "^5.3.0",
416
500
  "gray-matter": "^4.0.3",
417
- "fs-extra": "^11.2.0",
418
501
  "zod": "^4.3.5",
419
502
  "jsonc-parser": "^3.3.1",
420
503
  "glob": "^13.0.3"
421
504
  },
422
505
  "devDependencies": {
423
- "@contractspec/tool.typescript": "2.4.0",
424
- "@contractspec/tool.bun": "2.4.0",
425
- "@types/fs-extra": "^11.0.4",
506
+ "@contractspec/tool.typescript": "2.5.0",
507
+ "@contractspec/tool.bun": "2.5.0",
426
508
  "typescript": "^5.9.3"
427
509
  },
428
510
  "publishConfig": {
@@ -459,6 +541,12 @@
459
541
  "node": "./dist/node/cli/import-cmd.js",
460
542
  "default": "./dist/cli/import-cmd.js"
461
543
  },
544
+ "./cli/info": {
545
+ "types": "./dist/cli/info.d.ts",
546
+ "bun": "./dist/cli/info.js",
547
+ "node": "./dist/node/cli/info.js",
548
+ "default": "./dist/cli/info.js"
549
+ },
462
550
  "./cli/init": {
463
551
  "types": "./dist/cli/init.d.ts",
464
552
  "bun": "./dist/cli/init.js",
@@ -471,6 +559,18 @@
471
559
  "node": "./dist/node/cli/install.js",
472
560
  "default": "./dist/cli/install.js"
473
561
  },
562
+ "./cli/login": {
563
+ "types": "./dist/cli/login.d.ts",
564
+ "bun": "./dist/cli/login.js",
565
+ "node": "./dist/node/cli/login.js",
566
+ "default": "./dist/cli/login.js"
567
+ },
568
+ "./cli/models-explain": {
569
+ "types": "./dist/cli/models-explain.d.ts",
570
+ "bun": "./dist/cli/models-explain.js",
571
+ "node": "./dist/node/cli/models-explain.js",
572
+ "default": "./dist/cli/models-explain.js"
573
+ },
474
574
  "./cli/pack/create": {
475
575
  "types": "./dist/cli/pack/create.d.ts",
476
576
  "bun": "./dist/cli/pack/create.js",
@@ -495,6 +595,18 @@
495
595
  "node": "./dist/node/cli/pack/validate.js",
496
596
  "default": "./dist/cli/pack/validate.js"
497
597
  },
598
+ "./cli/publish": {
599
+ "types": "./dist/cli/publish.d.ts",
600
+ "bun": "./dist/cli/publish.js",
601
+ "node": "./dist/node/cli/publish.js",
602
+ "default": "./dist/cli/publish.js"
603
+ },
604
+ "./cli/search": {
605
+ "types": "./dist/cli/search.d.ts",
606
+ "bun": "./dist/cli/search.js",
607
+ "node": "./dist/node/cli/search.js",
608
+ "default": "./dist/cli/search.js"
609
+ },
498
610
  "./core": {
499
611
  "types": "./dist/core/index.d.ts",
500
612
  "bun": "./dist/core/index.js",
@@ -543,6 +655,12 @@
543
655
  "node": "./dist/node/core/pack-loader.js",
544
656
  "default": "./dist/core/pack-loader.js"
545
657
  },
658
+ "./core/profile-resolver": {
659
+ "types": "./dist/core/profile-resolver.d.ts",
660
+ "bun": "./dist/core/profile-resolver.js",
661
+ "node": "./dist/node/core/profile-resolver.js",
662
+ "default": "./dist/core/profile-resolver.js"
663
+ },
546
664
  "./exporters": {
547
665
  "types": "./dist/exporters/index.d.ts",
548
666
  "bun": "./dist/exporters/index.js",
@@ -603,6 +721,12 @@
603
721
  "node": "./dist/node/features/mcp.js",
604
722
  "default": "./dist/features/mcp.js"
605
723
  },
724
+ "./features/models": {
725
+ "types": "./dist/features/models.d.ts",
726
+ "bun": "./dist/features/models.js",
727
+ "node": "./dist/node/features/models.js",
728
+ "default": "./dist/features/models.js"
729
+ },
606
730
  "./features/plugins": {
607
731
  "types": "./dist/features/plugins.d.ts",
608
732
  "bun": "./dist/features/plugins.js",
@@ -687,6 +811,18 @@
687
811
  "node": "./dist/node/sources/npm-ref.js",
688
812
  "default": "./dist/sources/npm-ref.js"
689
813
  },
814
+ "./sources/registry": {
815
+ "types": "./dist/sources/registry.d.ts",
816
+ "bun": "./dist/sources/registry.js",
817
+ "node": "./dist/node/sources/registry.js",
818
+ "default": "./dist/sources/registry.js"
819
+ },
820
+ "./sources/registry-ref": {
821
+ "types": "./dist/sources/registry-ref.d.ts",
822
+ "bun": "./dist/sources/registry-ref.js",
823
+ "node": "./dist/node/sources/registry-ref.js",
824
+ "default": "./dist/sources/registry-ref.js"
825
+ },
690
826
  "./targets": {
691
827
  "types": "./dist/targets/index.d.ts",
692
828
  "bun": "./dist/targets/index.js",
@@ -765,6 +901,12 @@
765
901
  "node": "./dist/node/targets/registry.js",
766
902
  "default": "./dist/targets/registry.js"
767
903
  },
904
+ "./utils/credentials": {
905
+ "types": "./dist/utils/credentials.d.ts",
906
+ "bun": "./dist/utils/credentials.js",
907
+ "node": "./dist/node/utils/credentials.js",
908
+ "default": "./dist/utils/credentials.js"
909
+ },
768
910
  "./utils/diff": {
769
911
  "types": "./dist/utils/diff.d.ts",
770
912
  "bun": "./dist/utils/diff.js",
@@ -794,6 +936,30 @@
794
936
  "bun": "./dist/utils/markdown.js",
795
937
  "node": "./dist/node/utils/markdown.js",
796
938
  "default": "./dist/utils/markdown.js"
939
+ },
940
+ "./utils/model-allowlist": {
941
+ "types": "./dist/utils/model-allowlist.d.ts",
942
+ "bun": "./dist/utils/model-allowlist.js",
943
+ "node": "./dist/node/utils/model-allowlist.js",
944
+ "default": "./dist/utils/model-allowlist.js"
945
+ },
946
+ "./utils/model-guidance": {
947
+ "types": "./dist/utils/model-guidance.d.ts",
948
+ "bun": "./dist/utils/model-guidance.js",
949
+ "node": "./dist/node/utils/model-guidance.js",
950
+ "default": "./dist/utils/model-guidance.js"
951
+ },
952
+ "./utils/registry-client": {
953
+ "types": "./dist/utils/registry-client.d.ts",
954
+ "bun": "./dist/utils/registry-client.js",
955
+ "node": "./dist/node/utils/registry-client.js",
956
+ "default": "./dist/utils/registry-client.js"
957
+ },
958
+ "./utils/tarball": {
959
+ "types": "./dist/utils/tarball.d.ts",
960
+ "bun": "./dist/utils/tarball.js",
961
+ "node": "./dist/node/utils/tarball.js",
962
+ "default": "./dist/utils/tarball.js"
797
963
  }
798
964
  }
799
965
  },
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://agentpacks.dev/schemas/models.json",
3
+ "default": "anthropic/claude-sonnet-4-20250514",
4
+ "small": "anthropic/claude-haiku-3.5",
5
+ "profiles": {
6
+ "quality": {
7
+ "description": "Maximum quality — use the strongest available model",
8
+ "default": "anthropic/claude-opus-4-20250514",
9
+ "small": "anthropic/claude-sonnet-4-20250514"
10
+ },
11
+ "budget": {
12
+ "description": "Cost-efficient — use smaller models where possible",
13
+ "default": "anthropic/claude-haiku-3.5",
14
+ "small": "anthropic/claude-haiku-3.5"
15
+ },
16
+ "fast": {
17
+ "description": "Low-latency — prioritize speed over depth",
18
+ "default": "anthropic/claude-haiku-3.5",
19
+ "small": "anthropic/claude-haiku-3.5"
20
+ }
21
+ },
22
+ "providers": {
23
+ "anthropic": {
24
+ "models": {
25
+ "claude-opus-4-20250514": {
26
+ "options": {
27
+ "budgetTokens": 10000
28
+ }
29
+ },
30
+ "claude-sonnet-4-20250514": {
31
+ "options": {
32
+ "budgetTokens": 5000
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }