@agentxm/client-core 0.5.3 → 0.6.2

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 (89) hide show
  1. package/dist/src/unstable/auth/auth-client.d.ts +17 -3
  2. package/dist/src/unstable/auth/auth-client.d.ts.map +1 -1
  3. package/dist/src/unstable/auth/auth-client.js +127 -58
  4. package/dist/src/unstable/auth/auth-client.js.map +1 -1
  5. package/dist/src/unstable/auth/credential-store.d.ts +5 -4
  6. package/dist/src/unstable/auth/credential-store.d.ts.map +1 -1
  7. package/dist/src/unstable/auth/credential-store.js +115 -9
  8. package/dist/src/unstable/auth/credential-store.js.map +1 -1
  9. package/dist/src/unstable/auth/device-login.d.ts +4 -1
  10. package/dist/src/unstable/auth/device-login.d.ts.map +1 -1
  11. package/dist/src/unstable/auth/device-login.js +13 -15
  12. package/dist/src/unstable/auth/device-login.js.map +1 -1
  13. package/dist/src/unstable/auth/index.d.ts +4 -1
  14. package/dist/src/unstable/auth/index.d.ts.map +1 -1
  15. package/dist/src/unstable/auth/index.js +3 -0
  16. package/dist/src/unstable/auth/index.js.map +1 -1
  17. package/dist/src/unstable/auth/login-strategy.d.ts +21 -0
  18. package/dist/src/unstable/auth/login-strategy.d.ts.map +1 -0
  19. package/dist/src/unstable/auth/login-strategy.js +25 -0
  20. package/dist/src/unstable/auth/login-strategy.js.map +1 -0
  21. package/dist/src/unstable/auth/loopback-login.d.ts +16 -0
  22. package/dist/src/unstable/auth/loopback-login.d.ts.map +1 -0
  23. package/dist/src/unstable/auth/loopback-login.js +86 -0
  24. package/dist/src/unstable/auth/loopback-login.js.map +1 -0
  25. package/dist/src/unstable/auth/loopback-server.d.ts +36 -0
  26. package/dist/src/unstable/auth/loopback-server.d.ts.map +1 -0
  27. package/dist/src/unstable/auth/loopback-server.js +136 -0
  28. package/dist/src/unstable/auth/loopback-server.js.map +1 -0
  29. package/dist/src/unstable/commands/operations/publish.js +1 -1
  30. package/dist/src/unstable/commands/operations/publish.js.map +1 -1
  31. package/dist/src/unstable/extensions/common.d.ts.map +1 -1
  32. package/dist/src/unstable/extensions/common.js +6 -1
  33. package/dist/src/unstable/extensions/common.js.map +1 -1
  34. package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.d.ts +1 -2
  35. package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.d.ts.map +1 -1
  36. package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.js +1 -2
  37. package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.js.map +1 -1
  38. package/dist/src/unstable/lint/config.d.ts +1 -1
  39. package/dist/src/unstable/lint/config.d.ts.map +1 -1
  40. package/dist/src/unstable/lint/config.js +7 -4
  41. package/dist/src/unstable/lint/config.js.map +1 -1
  42. package/dist/src/unstable/mcp-servers/operations/publish.js +1 -1
  43. package/dist/src/unstable/mcp-servers/operations/publish.js.map +1 -1
  44. package/dist/src/unstable/packs/operations/publish.js +1 -1
  45. package/dist/src/unstable/packs/operations/publish.js.map +1 -1
  46. package/dist/src/unstable/registry/__generated__/registry-client.d.ts +170 -96
  47. package/dist/src/unstable/registry/__generated__/registry-client.d.ts.map +1 -1
  48. package/dist/src/unstable/registry/__generated__/registry-client.js +152 -64
  49. package/dist/src/unstable/registry/__generated__/registry-client.js.map +1 -1
  50. package/dist/src/unstable/settings/index.d.ts +2 -2
  51. package/dist/src/unstable/settings/index.d.ts.map +1 -1
  52. package/dist/src/unstable/settings/index.js +1 -1
  53. package/dist/src/unstable/settings/index.js.map +1 -1
  54. package/dist/src/unstable/settings/schema.d.ts +121 -68
  55. package/dist/src/unstable/settings/schema.d.ts.map +1 -1
  56. package/dist/src/unstable/settings/schema.js +268 -89
  57. package/dist/src/unstable/settings/schema.js.map +1 -1
  58. package/dist/src/unstable/settings/settings.d.ts.map +1 -1
  59. package/dist/src/unstable/settings/settings.js +17 -1
  60. package/dist/src/unstable/settings/settings.js.map +1 -1
  61. package/dist/src/unstable/skills/operations/publish.js +1 -1
  62. package/dist/src/unstable/skills/operations/publish.js.map +1 -1
  63. package/dist/src/unstable/subagents/operations/publish.js +1 -1
  64. package/dist/src/unstable/subagents/operations/publish.js.map +1 -1
  65. package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts +3 -0
  66. package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts.map +1 -1
  67. package/dist/src/unstable/telemetry/__generated__/telemetry-client.js +1 -0
  68. package/dist/src/unstable/telemetry/__generated__/telemetry-client.js.map +1 -1
  69. package/dist/src/unstable/telemetry/client.d.ts.map +1 -1
  70. package/dist/src/unstable/telemetry/client.js +9 -1
  71. package/dist/src/unstable/telemetry/client.js.map +1 -1
  72. package/dist/src/unstable/utils/build-zip-archive.d.ts +8 -7
  73. package/dist/src/unstable/utils/build-zip-archive.d.ts.map +1 -1
  74. package/dist/src/unstable/utils/build-zip-archive.js +42 -52
  75. package/dist/src/unstable/utils/build-zip-archive.js.map +1 -1
  76. package/dist/src/unstable/workspace/initialization.d.ts +120 -88
  77. package/dist/src/unstable/workspace/initialization.d.ts.map +1 -1
  78. package/dist/src/unstable/workspace/read-model/state.d.ts.map +1 -1
  79. package/dist/src/unstable/workspace/read-model/state.js +11 -0
  80. package/dist/src/unstable/workspace/read-model/state.js.map +1 -1
  81. package/dist/src/unstable/workspace/read-model-record-readers.d.ts.map +1 -1
  82. package/dist/src/unstable/workspace/read-model-record-readers.js +8 -5
  83. package/dist/src/unstable/workspace/read-model-record-readers.js.map +1 -1
  84. package/dist/src/unstable/workspace/service.js +4 -4
  85. package/dist/src/unstable/workspace/service.js.map +1 -1
  86. package/package.json +5 -2
  87. package/site-content/__generated__/schemas/settings.schema.json +391 -217
  88. package/site-content/docs/quickstart.md +4 -1
  89. package/site-content/install.md +4 -3
@@ -25,22 +25,28 @@ const SourceNameSchema = Schema.String.check(Schema.isPattern(SOURCE_NAME_PATTER
25
25
  })).annotate({
26
26
  identifier: "SourceName",
27
27
  title: "Source Name",
28
- description: "A source name using lowercase letters, numbers, hyphens, and dots (e.g. github, my-registry.dev).",
28
+ description: "A source host alias: lowercase letters, numbers, hyphens, and dots.",
29
29
  examples: ["github", "my-registry.dev"],
30
30
  });
31
+ const sourceNameFieldSchema = SourceNameSchema.pipe(Schema.annotateKey({ messageMissingKey: "source name is required" }), Schema.annotate({
32
+ description: "Alias used in entry source strings for this source host.",
33
+ }));
34
+ const sourceUrlFieldSchema = Schema.URLFromString.pipe(Schema.annotateKey({ messageMissingKey: "source url is required" }), Schema.annotate({
35
+ description: "Base URL for this source host endpoint.",
36
+ }));
31
37
  /**
32
38
  * GitHub source host configuration.
33
39
  *
34
40
  * @experimental This API is unstable and may change without notice.
35
41
  */
36
42
  const GitHubSourceHostConfigSchema = Schema.Struct({
37
- name: SourceNameSchema.pipe(Schema.annotateKey({ messageMissingKey: "source name is required" })),
43
+ name: sourceNameFieldSchema,
38
44
  type: Schema.Literal("github"),
39
- url: Schema.URLFromString.pipe(Schema.annotateKey({ messageMissingKey: "source url is required" })),
45
+ url: sourceUrlFieldSchema,
40
46
  }).annotate({
41
47
  identifier: "GitHubSourceHostConfig",
42
48
  title: "GitHub Source Host",
43
- description: "Configuration for a GitHub source.",
49
+ description: "A GitHub source host.",
44
50
  });
45
51
  /**
46
52
  * GitLab source host configuration.
@@ -48,13 +54,13 @@ const GitHubSourceHostConfigSchema = Schema.Struct({
48
54
  * @experimental This API is unstable and may change without notice.
49
55
  */
50
56
  const GitLabSourceHostConfigSchema = Schema.Struct({
51
- name: SourceNameSchema.pipe(Schema.annotateKey({ messageMissingKey: "source name is required" })),
57
+ name: sourceNameFieldSchema,
52
58
  type: Schema.Literal("gitlab"),
53
- url: Schema.URLFromString.pipe(Schema.annotateKey({ messageMissingKey: "source url is required" })),
59
+ url: sourceUrlFieldSchema,
54
60
  }).annotate({
55
61
  identifier: "GitLabSourceHostConfig",
56
62
  title: "GitLab Source Host",
57
- description: "Configuration for a GitLab source.",
63
+ description: "A GitLab source host.",
58
64
  });
59
65
  /**
60
66
  * Bitbucket source host configuration.
@@ -62,13 +68,13 @@ const GitLabSourceHostConfigSchema = Schema.Struct({
62
68
  * @experimental This API is unstable and may change without notice.
63
69
  */
64
70
  const BitbucketSourceHostConfigSchema = Schema.Struct({
65
- name: SourceNameSchema.pipe(Schema.annotateKey({ messageMissingKey: "source name is required" })),
71
+ name: sourceNameFieldSchema,
66
72
  type: Schema.Literal("bitbucket"),
67
- url: Schema.URLFromString.pipe(Schema.annotateKey({ messageMissingKey: "source url is required" })),
73
+ url: sourceUrlFieldSchema,
68
74
  }).annotate({
69
75
  identifier: "BitbucketSourceHostConfig",
70
76
  title: "Bitbucket Source Host",
71
- description: "Configuration for a Bitbucket source.",
77
+ description: "A Bitbucket source host.",
72
78
  });
73
79
  /**
74
80
  * Azure Repos source host configuration.
@@ -76,13 +82,13 @@ const BitbucketSourceHostConfigSchema = Schema.Struct({
76
82
  * @experimental This API is unstable and may change without notice.
77
83
  */
78
84
  const AzureReposSourceHostConfigSchema = Schema.Struct({
79
- name: SourceNameSchema.pipe(Schema.annotateKey({ messageMissingKey: "source name is required" })),
85
+ name: sourceNameFieldSchema,
80
86
  type: Schema.Literal("azurerepos"),
81
- url: Schema.URLFromString.pipe(Schema.annotateKey({ messageMissingKey: "source url is required" })),
87
+ url: sourceUrlFieldSchema,
82
88
  }).annotate({
83
89
  identifier: "AzureReposSourceHostConfig",
84
90
  title: "Azure Repos Source Host",
85
- description: "Configuration for an Azure Repos source.",
91
+ description: "An Azure Repos source host.",
86
92
  });
87
93
  /**
88
94
  * Registry source host configuration.
@@ -90,13 +96,15 @@ const AzureReposSourceHostConfigSchema = Schema.Struct({
90
96
  * @experimental This API is unstable and may change without notice.
91
97
  */
92
98
  const RegistrySourceHostConfigSchema = Schema.Struct({
93
- name: SourceNameSchema.pipe(Schema.annotateKey({ messageMissingKey: "source name is required" })),
99
+ name: sourceNameFieldSchema,
94
100
  type: Schema.Literal("registry"),
95
- location: Schema.URLFromString.pipe(Schema.annotateKey({ messageMissingKey: "source location is required" })),
101
+ location: Schema.URLFromString.pipe(Schema.annotateKey({ messageMissingKey: "source location is required" }), Schema.annotate({
102
+ description: "Registry endpoint for this source; accepts http(s)://, file://, or local paths.",
103
+ })),
96
104
  }).annotate({
97
105
  identifier: "RegistrySourceHostConfig",
98
106
  title: "Registry Source Host",
99
- description: "Configuration for a package registry source.",
107
+ description: "A package registry source host.",
100
108
  });
101
109
  /**
102
110
  * Discriminated union of source host configurations on the `type` field.
@@ -114,33 +122,57 @@ export const SourceHostConfigSchema = Schema.Union([
114
122
  ]).annotate({
115
123
  identifier: "SourceHostConfig",
116
124
  title: "Source Host Config",
117
- description: "Where extensions are fetched from — GitHub, GitLab, Bitbucket, Azure Repos, or a package registry.",
125
+ description: "A source host configuration: GitHub, GitLab, Bitbucket, Azure Repos, or a package registry.",
118
126
  });
119
127
  const ExtensionMapKeySchema = Schema.String.check(Schema.isPattern(EXTENSION_NAME_PATTERN, {
120
128
  message: "Names must be max 64 chars, lowercase letters/numbers/hyphens, not starting or ending with hyphen.",
121
129
  }));
122
- const authoredFieldSchema = Schema.optional(Schema.Boolean.annotate({
123
- description: "Whether this entry was authored locally. Defaults to false when omitted.",
130
+ const authoredFieldSchema = Schema.optionalKey(Schema.Boolean.annotate({
131
+ description: "Set to true to mark this entry as authored locally in this workspace. Omit otherwise false is the default and should not be written explicitly.",
124
132
  default: false,
125
133
  }));
126
- const enabledFieldSchema = Schema.optional(Schema.Boolean.annotate({
127
- description: "Whether this entry is enabled. Defaults to true when omitted.",
134
+ const enabledFieldSchema = Schema.optionalKey(Schema.Boolean.annotate({
135
+ description: "Set to false to disable this entry. Omit otherwise — true is the default and should not be written explicitly.",
128
136
  default: true,
129
137
  }));
130
- const compactOrVerboseEntry = (objectSchema, canonicalSchema, transformation) => Schema.Union([Schema.String, objectSchema]).pipe(Schema.decodeTo(canonicalSchema, SchemaTransformation.transform(transformation)));
138
+ const entrySourceFieldSchema = (label, fqnType) => Schema.NonEmptyString.pipe(Schema.annotateKey({ messageMissingKey: `${label} source is required` }), Schema.annotate({
139
+ description: "FQN with optional version constraint, source-scheme ref like github:owner/repo, or local path.",
140
+ examples: [
141
+ `@acme/${fqnType}/code-review@^1.0.0`,
142
+ "github:acme/agent-extensions",
143
+ "./extensions/code-review",
144
+ ],
145
+ }));
146
+ const telemetryModeExamples = [true, "errors", false];
147
+ /**
148
+ * Telemetry preference for this workspace.
149
+ *
150
+ * @experimental This API is unstable and may change without notice.
151
+ */
152
+ export const TelemetryModeSchema = Schema.Union([
153
+ Schema.Boolean,
154
+ Schema.Literal("errors"),
155
+ ]).annotate({
156
+ identifier: "TelemetryMode",
157
+ title: "Telemetry Mode",
158
+ description: '`true` sends usage and error telemetry, `"errors"` sends only errors, and `false` disables telemetry.',
159
+ examples: telemetryModeExamples,
160
+ });
161
+ const compactOrVerboseEntry = (objectSchema, canonicalSchema, transformation, annotations) => Schema.Union([Schema.String, objectSchema])
162
+ .annotate(annotations)
163
+ .pipe(Schema.decodeTo(canonicalSchema, SchemaTransformation.transform(transformation)));
131
164
  /**
132
165
  * Managed skill with source and optional config flags.
133
166
  *
134
167
  * @experimental This API is unstable and may change without notice.
135
168
  */
136
169
  export const SkillEntryObjectSchema = Schema.Struct({
137
- source: Schema.NonEmptyString.pipe(Schema.annotateKey({ messageMissingKey: "skill source is required" })),
170
+ source: entrySourceFieldSchema("skill", "skills"),
138
171
  enabled: enabledFieldSchema,
139
172
  authored: authoredFieldSchema,
140
173
  }).annotate({
141
- identifier: "SkillEntryObject",
142
174
  title: "Skill Entry Object",
143
- description: "A skill with its source location and whether it's enabled.",
175
+ description: "A skill entry with source and optional enabled/authored flags.",
144
176
  });
145
177
  /**
146
178
  * Union of skill entry forms: plain source string or object with source + enabled + authored.
@@ -157,10 +189,6 @@ export const SkillEntrySchema = compactOrVerboseEntry(SkillEntryObjectSchema, Sc
157
189
  source: Schema.String,
158
190
  enabled: Schema.Boolean,
159
191
  authored: Schema.Boolean,
160
- }).annotate({
161
- identifier: "SkillEntry",
162
- title: "Skill Entry",
163
- description: "A skill reference — either a source string like @owner/skills/name or an object with source, enabled, and authored.",
164
192
  }), {
165
193
  decode: (entry) => typeof entry === "string"
166
194
  ? { source: entry, enabled: true, authored: false }
@@ -181,6 +209,14 @@ export const SkillEntrySchema = compactOrVerboseEntry(SkillEntryObjectSchema, Sc
181
209
  obj.authored = true;
182
210
  return obj;
183
211
  },
212
+ }, {
213
+ identifier: "SkillEntry",
214
+ title: "Skill Entry",
215
+ description: "A skill entry: a source string, or an object with source plus optional flags.",
216
+ examples: [
217
+ "@acme/skills/code-review@^1.0.0",
218
+ { source: "github:acme/agent-extensions", enabled: false },
219
+ ],
184
220
  });
185
221
  /**
186
222
  * Skills map - maps skill names to skill entries.
@@ -197,7 +233,7 @@ export const SkillEntrySchema = compactOrVerboseEntry(SkillEntryObjectSchema, Sc
197
233
  export const SkillsMapSchema = Schema.Record(ExtensionMapKeySchema, SkillEntrySchema).annotate({
198
234
  identifier: "SkillsMap",
199
235
  title: "Skills Map",
200
- description: "Your installed skills, keyed by name.",
236
+ description: "A map of skill names to skill entries.",
201
237
  });
202
238
  /**
203
239
  * Managed command with source and optional config flags.
@@ -205,13 +241,12 @@ export const SkillsMapSchema = Schema.Record(ExtensionMapKeySchema, SkillEntrySc
205
241
  * @experimental This API is unstable and may change without notice.
206
242
  */
207
243
  export const CommandEntryObjectSchema = Schema.Struct({
208
- source: Schema.NonEmptyString.pipe(Schema.annotateKey({ messageMissingKey: "command source is required" })),
244
+ source: entrySourceFieldSchema("command", "commands"),
209
245
  enabled: enabledFieldSchema,
210
246
  authored: authoredFieldSchema,
211
247
  }).annotate({
212
- identifier: "CommandEntryObject",
213
248
  title: "Command Entry Object",
214
- description: "A command with its source location and whether it's enabled.",
249
+ description: "A command entry with source and optional enabled/authored flags.",
215
250
  });
216
251
  /**
217
252
  * Union of command entry forms: plain source string or object with source + enabled + authored.
@@ -226,10 +261,6 @@ export const CommandEntrySchema = compactOrVerboseEntry(CommandEntryObjectSchema
226
261
  source: Schema.String,
227
262
  enabled: Schema.Boolean,
228
263
  authored: Schema.Boolean,
229
- }).annotate({
230
- identifier: "CommandEntry",
231
- title: "Command Entry",
232
- description: "A command reference — either a source string like @owner/commands/name or an object with source, enabled, and authored.",
233
264
  }), {
234
265
  decode: (entry) => typeof entry === "string"
235
266
  ? { source: entry, enabled: true, authored: false }
@@ -250,6 +281,14 @@ export const CommandEntrySchema = compactOrVerboseEntry(CommandEntryObjectSchema
250
281
  obj.authored = true;
251
282
  return obj;
252
283
  },
284
+ }, {
285
+ identifier: "CommandEntry",
286
+ title: "Command Entry",
287
+ description: "A command entry: a source string, or an object with source plus optional flags.",
288
+ examples: [
289
+ "@acme/commands/code-review@^1.0.0",
290
+ { source: "github:acme/agent-extensions", enabled: false },
291
+ ],
253
292
  });
254
293
  /**
255
294
  * Commands map - maps command names to command entries.
@@ -266,7 +305,7 @@ export const CommandEntrySchema = compactOrVerboseEntry(CommandEntryObjectSchema
266
305
  export const CommandsMapSchema = Schema.Record(ExtensionMapKeySchema, CommandEntrySchema).annotate({
267
306
  identifier: "CommandsMap",
268
307
  title: "Commands Map",
269
- description: "Your installed commands, keyed by name.",
308
+ description: "A map of command names to command entries.",
270
309
  });
271
310
  /**
272
311
  * MCP server entry object with source.
@@ -274,12 +313,11 @@ export const CommandsMapSchema = Schema.Record(ExtensionMapKeySchema, CommandEnt
274
313
  * @experimental This API is unstable and may change without notice.
275
314
  */
276
315
  export const McpServerEntryObjectSchema = Schema.Struct({
277
- source: Schema.NonEmptyString.pipe(Schema.annotateKey({ messageMissingKey: "MCP server source is required" })),
316
+ source: entrySourceFieldSchema("MCP server", "mcp-servers"),
278
317
  authored: authoredFieldSchema,
279
318
  }).annotate({
280
- identifier: "McpServerEntryObject",
281
319
  title: "MCP Server Entry Object",
282
- description: "An MCP server with its source location.",
320
+ description: "An MCP server entry with source and optional authored flag.",
283
321
  });
284
322
  /**
285
323
  * Union of MCP server entry forms: plain source string or object with source + authored.
@@ -292,15 +330,19 @@ export const McpServerEntryObjectSchema = Schema.Struct({
292
330
  export const McpServerEntrySchema = compactOrVerboseEntry(McpServerEntryObjectSchema, Schema.Struct({
293
331
  source: Schema.String,
294
332
  authored: Schema.Boolean,
295
- }).annotate({
296
- identifier: "McpServerEntry",
297
- title: "MCP Server Entry",
298
- description: "An MCP server reference — either a source string or an object with source and authored.",
299
333
  }), {
300
334
  decode: (entry) => typeof entry === "string"
301
335
  ? { source: entry, authored: false }
302
336
  : { source: entry.source, authored: entry.authored ?? false },
303
337
  encode: (entry) => entry.authored ? { source: entry.source, authored: true } : entry.source,
338
+ }, {
339
+ identifier: "McpServerEntry",
340
+ title: "MCP Server Entry",
341
+ description: "An MCP server entry: a source string, or an object with source plus optional authored flag.",
342
+ examples: [
343
+ "@acme/mcp-servers/context@^1.0.0",
344
+ { source: "github:acme/agent-extensions", authored: true },
345
+ ],
304
346
  });
305
347
  /**
306
348
  * MCP servers map - maps MCP server names to MCP server entries.
@@ -312,7 +354,7 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerEntryObjectSc
312
354
  export const McpServersMapSchema = Schema.Record(ExtensionMapKeySchema, McpServerEntrySchema).annotate({
313
355
  identifier: "McpServersMap",
314
356
  title: "MCP Servers Map",
315
- description: "Your installed MCP servers, keyed by name.",
357
+ description: "A map of MCP server names to MCP server entries.",
316
358
  });
317
359
  // -----------------------------------------------------------------------------
318
360
  // Subagent Entry Schemas
@@ -323,13 +365,12 @@ export const McpServersMapSchema = Schema.Record(ExtensionMapKeySchema, McpServe
323
365
  * @experimental This API is unstable and may change without notice.
324
366
  */
325
367
  export const SubagentEntryObjectSchema = Schema.Struct({
326
- source: Schema.NonEmptyString.pipe(Schema.annotateKey({ messageMissingKey: "subagent source is required" })),
368
+ source: entrySourceFieldSchema("subagent", "subagents"),
327
369
  enabled: enabledFieldSchema,
328
370
  authored: authoredFieldSchema,
329
371
  }).annotate({
330
- identifier: "SubagentEntryObject",
331
372
  title: "Subagent Entry Object",
332
- description: "A subagent with its source location and whether it's enabled.",
373
+ description: "A subagent entry with source and optional enabled/authored flags.",
333
374
  });
334
375
  /**
335
376
  * Union of subagent entry forms: plain source string or object with source + enabled + authored.
@@ -344,10 +385,6 @@ export const SubagentEntrySchema = compactOrVerboseEntry(SubagentEntryObjectSche
344
385
  source: Schema.String,
345
386
  enabled: Schema.Boolean,
346
387
  authored: Schema.Boolean,
347
- }).annotate({
348
- identifier: "SubagentEntry",
349
- title: "Subagent Entry",
350
- description: "A subagent reference — either a source string like @owner/subagents/name or an object with source, enabled, and authored.",
351
388
  }), {
352
389
  decode: (entry) => typeof entry === "string"
353
390
  ? { source: entry, enabled: true, authored: false }
@@ -368,6 +405,14 @@ export const SubagentEntrySchema = compactOrVerboseEntry(SubagentEntryObjectSche
368
405
  obj.authored = true;
369
406
  return obj;
370
407
  },
408
+ }, {
409
+ identifier: "SubagentEntry",
410
+ title: "Subagent Entry",
411
+ description: "A subagent entry: a source string, or an object with source plus optional flags.",
412
+ examples: [
413
+ "@acme/subagents/reviewer@^1.0.0",
414
+ { source: "github:acme/agent-extensions", enabled: false },
415
+ ],
371
416
  });
372
417
  /**
373
418
  * Subagents map - maps subagent names to subagent entries.
@@ -384,7 +429,7 @@ export const SubagentEntrySchema = compactOrVerboseEntry(SubagentEntryObjectSche
384
429
  export const SubagentsMapSchema = Schema.Record(ExtensionMapKeySchema, SubagentEntrySchema).annotate({
385
430
  identifier: "SubagentsMap",
386
431
  title: "Subagents Map",
387
- description: "Your installed subagents, keyed by name.",
432
+ description: "A map of subagent names to subagent entries.",
388
433
  });
389
434
  // -----------------------------------------------------------------------------
390
435
  // Pack Entry Schemas
@@ -395,12 +440,11 @@ export const SubagentsMapSchema = Schema.Record(ExtensionMapKeySchema, SubagentE
395
440
  * @experimental This API is unstable and may change without notice.
396
441
  */
397
442
  export const PackEntryObjectSchema = Schema.Struct({
398
- source: Schema.NonEmptyString.pipe(Schema.annotateKey({ messageMissingKey: "pack source is required" })),
443
+ source: entrySourceFieldSchema("pack", "packs"),
399
444
  authored: authoredFieldSchema,
400
445
  }).annotate({
401
- identifier: "PackEntryObject",
402
446
  title: "Pack Entry Object",
403
- description: "A pack with its source location.",
447
+ description: "A pack entry with source and optional authored flag.",
404
448
  });
405
449
  /**
406
450
  * Union of pack entry forms: plain source string or object with source + authored.
@@ -413,15 +457,19 @@ export const PackEntryObjectSchema = Schema.Struct({
413
457
  export const PackEntrySchema = compactOrVerboseEntry(PackEntryObjectSchema, Schema.Struct({
414
458
  source: Schema.String,
415
459
  authored: Schema.Boolean,
416
- }).annotate({
417
- identifier: "PackEntry",
418
- title: "Pack Entry",
419
- description: "A pack reference — either a source string or an object with source and authored.",
420
460
  }), {
421
461
  decode: (entry) => typeof entry === "string"
422
462
  ? { source: entry, authored: false }
423
463
  : { source: entry.source, authored: entry.authored ?? false },
424
464
  encode: (entry) => entry.authored ? { source: entry.source, authored: true } : entry.source,
465
+ }, {
466
+ identifier: "PackEntry",
467
+ title: "Pack Entry",
468
+ description: "A pack entry: a source string, or an object with source plus optional authored flag.",
469
+ examples: [
470
+ "@acme/packs/typescript@^1.0.0",
471
+ { source: "github:acme/agent-extensions", authored: true },
472
+ ],
425
473
  });
426
474
  /**
427
475
  * Packs map - maps pack names to pack entries.
@@ -438,27 +486,85 @@ export const PackEntrySchema = compactOrVerboseEntry(PackEntryObjectSchema, Sche
438
486
  export const PacksMapSchema = Schema.Record(ExtensionMapKeySchema, PackEntrySchema).annotate({
439
487
  identifier: "PacksMap",
440
488
  title: "Packs Map",
441
- description: "Your installed packs, keyed by name.",
489
+ description: "A map of pack names to pack entries.",
442
490
  });
443
491
  // -----------------------------------------------------------------------------
444
- // Ignored Patterns Schema
492
+ // Feature Config Schemas
445
493
  // -----------------------------------------------------------------------------
446
494
  /**
447
- * Ignored patterns map — per-extension-type arrays of glob patterns
448
- * for extensions to exclude from lifecycle classification.
495
+ * Feature-level configuration for skills.
449
496
  *
450
497
  * @experimental This API is unstable and may change without notice.
451
498
  */
452
- export const IgnoredSettingsSchema = Schema.Struct({
453
- skills: Schema.optional(Schema.Array(Schema.String)),
454
- commands: Schema.optional(Schema.Array(Schema.String)),
455
- subagents: Schema.optional(Schema.Array(Schema.String)),
456
- mcpServers: Schema.optional(Schema.Array(Schema.String)),
457
- packs: Schema.optional(Schema.Array(Schema.String)),
499
+ export const SkillsConfigSchema = Schema.Struct({
500
+ ignore: Schema.optionalKey(Schema.Array(Schema.String).annotate({
501
+ description: "Installed skill names AXM should leave unmanaged.",
502
+ examples: [["local-*", "legacy-helper"]],
503
+ })),
458
504
  }).annotate({
459
- identifier: "IgnoredSettings",
460
- title: "Ignored Settings",
461
- description: "Glob patterns for extensions to ignore, grouped by type (e.g. skills, commands).",
505
+ identifier: "SkillsConfig",
506
+ title: "Skills Config",
507
+ description: "Feature-level configuration for skills.",
508
+ });
509
+ /**
510
+ * Feature-level configuration for commands.
511
+ *
512
+ * @experimental This API is unstable and may change without notice.
513
+ */
514
+ export const CommandsConfigSchema = Schema.Struct({
515
+ ignore: Schema.optionalKey(Schema.Array(Schema.String).annotate({
516
+ description: "Installed command names AXM should leave unmanaged.",
517
+ examples: [["local-*", "legacy-helper"]],
518
+ })),
519
+ }).annotate({
520
+ identifier: "CommandsConfig",
521
+ title: "Commands Config",
522
+ description: "Feature-level configuration for commands.",
523
+ });
524
+ /**
525
+ * Feature-level configuration for subagents.
526
+ *
527
+ * @experimental This API is unstable and may change without notice.
528
+ */
529
+ export const SubagentsConfigSchema = Schema.Struct({
530
+ ignore: Schema.optionalKey(Schema.Array(Schema.String).annotate({
531
+ description: "Installed subagent names AXM should leave unmanaged.",
532
+ examples: [["local-*", "legacy-helper"]],
533
+ })),
534
+ }).annotate({
535
+ identifier: "SubagentsConfig",
536
+ title: "Subagents Config",
537
+ description: "Feature-level configuration for subagents.",
538
+ });
539
+ /**
540
+ * Feature-level configuration for MCP servers.
541
+ *
542
+ * @experimental This API is unstable and may change without notice.
543
+ */
544
+ export const McpServersConfigSchema = Schema.Struct({
545
+ ignore: Schema.optionalKey(Schema.Array(Schema.String).annotate({
546
+ description: "Installed MCP server names AXM should leave unmanaged.",
547
+ examples: [["local-*", "legacy-helper"]],
548
+ })),
549
+ }).annotate({
550
+ identifier: "McpServersConfig",
551
+ title: "MCP Servers Config",
552
+ description: "Feature-level configuration for MCP servers.",
553
+ });
554
+ /**
555
+ * Feature-level configuration for packs.
556
+ *
557
+ * @experimental This API is unstable and may change without notice.
558
+ */
559
+ export const PacksConfigSchema = Schema.Struct({
560
+ ignore: Schema.optionalKey(Schema.Array(Schema.String).annotate({
561
+ description: "Installed pack names AXM should leave unmanaged.",
562
+ examples: [["local-*", "legacy-helper"]],
563
+ })),
564
+ }).annotate({
565
+ identifier: "PacksConfig",
566
+ title: "Packs Config",
567
+ description: "Feature-level configuration for packs.",
462
568
  });
463
569
  /**
464
570
  * Canonical key order for settings properties.
@@ -474,11 +580,15 @@ export const SETTINGS_KEY_ORDER = [
474
580
  "sources",
475
581
  "agents",
476
582
  "skills",
583
+ "skillsConfig",
477
584
  "commands",
585
+ "commandsConfig",
478
586
  "subagents",
587
+ "subagentsConfig",
479
588
  "packs",
589
+ "packsConfig",
480
590
  "mcpServers",
481
- "ignored",
591
+ "mcpServersConfig",
482
592
  "lint",
483
593
  ];
484
594
  /**
@@ -489,27 +599,96 @@ export const SETTINGS_KEY_ORDER = [
489
599
  * - sources: Source provider configurations
490
600
  * - agents: List of agent IDs to sync extensions to
491
601
  * - skills: Desired skills by name to source string
602
+ * - skillsConfig: Feature-level configuration for skills
492
603
  * - commands: Desired commands by name to version specifier
604
+ * - commandsConfig: Feature-level configuration for commands
605
+ * - subagents: Desired subagents by name to version specifier
606
+ * - subagentsConfig: Feature-level configuration for subagents
493
607
  * - packs: Desired packs by name to version specifier
494
- * - mcp-servers: Desired MCP servers by name to version specifier
608
+ * - packsConfig: Feature-level configuration for packs
609
+ * - mcpServers: Desired MCP servers by name to version specifier
610
+ * - mcpServersConfig: Feature-level configuration for MCP servers
495
611
  *
496
612
  * @experimental This API is unstable and may change without notice.
497
613
  */
498
614
  export const SettingsSchema = Schema.Struct({
499
- telemetry: Schema.optional(Schema.Union([Schema.Boolean, Schema.Literal("errors")])),
500
- owner: Schema.optional(HandleSchema),
501
- agents: Schema.optional(Schema.Array(AgentIdSchema)),
502
- sources: Schema.optional(Schema.Array(SourceHostConfigSchema)),
503
- commands: Schema.optional(CommandsMapSchema),
504
- subagents: Schema.optional(SubagentsMapSchema),
505
- mcpServers: Schema.optional(McpServersMapSchema),
506
- packs: Schema.optional(PacksMapSchema),
507
- skills: Schema.optional(SkillsMapSchema),
508
- ignored: Schema.optional(IgnoredSettingsSchema),
509
- lint: Schema.optional(LintConfigSchema),
615
+ telemetry: Schema.optionalKey(Schema.Union([TelemetryModeSchema]).annotate({
616
+ description: "Workspace telemetry mode: full, errors-only, or disabled.",
617
+ })),
618
+ owner: Schema.optionalKey(Schema.Union([HandleSchema]).annotate({
619
+ description: "Default owner handle used when AXM scaffolds or resolves workspace extensions.",
620
+ })),
621
+ agents: Schema.optionalKey(Schema.Array(AgentIdSchema)
622
+ .annotate({
623
+ description: "Coding agents AXM should sync managed extensions into.",
624
+ examples: [["claude-code", "codex"]],
625
+ })
626
+ .check(Schema.isUnique())),
627
+ sources: Schema.optionalKey(Schema.Array(SourceHostConfigSchema).annotate({
628
+ description: "Named source hosts used to resolve source-scheme entry references.",
629
+ })),
630
+ skills: Schema.optionalKey(Schema.Union([SkillsMapSchema]).annotate({
631
+ description: "Your installed skills, keyed by workspace skill name. Prefer plain source strings; use the object form only to set `enabled: false` or `authored: true`, and never write `enabled: true` or `authored: false` explicitly.",
632
+ })),
633
+ skillsConfig: Schema.optionalKey(Schema.Union([SkillsConfigSchema]).annotate({
634
+ description: "Feature-level options for skill management.",
635
+ })),
636
+ commands: Schema.optionalKey(Schema.Union([CommandsMapSchema]).annotate({
637
+ description: "Your installed commands, keyed by workspace command name. Prefer plain source strings; use the object form only to set `enabled: false` or `authored: true`, and never write `enabled: true` or `authored: false` explicitly.",
638
+ })),
639
+ commandsConfig: Schema.optionalKey(Schema.Union([CommandsConfigSchema]).annotate({
640
+ description: "Feature-level options for command management.",
641
+ })),
642
+ subagents: Schema.optionalKey(Schema.Union([SubagentsMapSchema]).annotate({
643
+ description: "Your installed subagents, keyed by workspace subagent name. Prefer plain source strings; use the object form only to set `enabled: false` or `authored: true`, and never write `enabled: true` or `authored: false` explicitly.",
644
+ })),
645
+ subagentsConfig: Schema.optionalKey(Schema.Union([SubagentsConfigSchema]).annotate({
646
+ description: "Feature-level options for subagent management.",
647
+ })),
648
+ packs: Schema.optionalKey(Schema.Union([PacksMapSchema]).annotate({
649
+ description: "Your installed packs, keyed by workspace pack name. Prefer plain source strings; use the object form only to set `authored: true`, and never write `authored: false` explicitly. Pack entries do not support `enabled` yet.",
650
+ })),
651
+ packsConfig: Schema.optionalKey(Schema.Union([PacksConfigSchema]).annotate({
652
+ description: "Feature-level options for pack management.",
653
+ })),
654
+ mcpServers: Schema.optionalKey(Schema.Union([McpServersMapSchema]).annotate({
655
+ description: "Your installed MCP servers, keyed by workspace MCP server name. Prefer plain source strings; use the object form only to set `authored: true`, and never write `authored: false` explicitly. MCP server entries do not support `enabled` yet.",
656
+ })),
657
+ mcpServersConfig: Schema.optionalKey(Schema.Union([McpServersConfigSchema]).annotate({
658
+ description: "Feature-level options for MCP server management.",
659
+ })),
660
+ lint: Schema.optionalKey(Schema.Union([LintConfigSchema]).annotate({
661
+ description: "Lint configuration for `axm lint` in this workspace.",
662
+ })),
510
663
  }).annotate({
511
- identifier: "Settings",
664
+ identifier: "AxmSettings",
512
665
  title: "AXM Settings",
513
- description: "Your workspace configuration — owner, sources, installed extensions, and ignore patterns.",
666
+ description: "Your workspace configuration — owner, sources, installed extensions, feature config, and lint config.",
667
+ // Examples are emitted verbatim into the generated JSON Schema. We declare
668
+ // them in the encoded (compact) form so agents see the preferred shape:
669
+ // plain source strings, with the object form reserved for non-default flags.
670
+ // Assertion needed: `.annotate()` types examples against the decoded
671
+ // canonical shape (where `enabled`/`authored` are required booleans), but
672
+ // emitting that shape would teach agents to write the very defaults we want
673
+ // them to omit.
674
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
675
+ examples: [
676
+ {
677
+ telemetry: "errors",
678
+ agents: ["claude-code", "codex"],
679
+ skills: {
680
+ "code-review": "@acme/skills/code-review@^1.0.0",
681
+ "legacy-rules": { source: "@acme/skills/legacy-rules@^1.0.0", enabled: false },
682
+ },
683
+ skillsConfig: {
684
+ ignore: ["local-*"],
685
+ },
686
+ lint: {
687
+ rules: {
688
+ "workspace/settings-schema-valid": "error",
689
+ },
690
+ },
691
+ },
692
+ ],
514
693
  });
515
694
  //# sourceMappingURL=schema.js.map