@agentxm/workspace-state 0.28.5 → 0.28.6
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/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/settings/schema.d.ts +0 -10
- package/dist/src/settings/schema.js +1 -22
- package/dist/src/workspace/configured-agent-outcomes.d.ts +0 -1
- package/dist/src/workspace/configured-agent-outcomes.js +0 -11
- package/dist/src/workspace/mcp-entry-semantics.d.ts +2 -5
- package/dist/src/workspace/mcp-entry-semantics.js +2 -4
- package/dist/src/workspace/read-model-record-readers.js +1 -7
- package/dist/src/workspace/service-interface.d.ts +0 -2
- package/dist/src/workspace/service.d.ts +1 -3
- package/dist/src/workspace/service.js +1 -5
- package/package.json +3 -3
package/dist/src/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export { computeSkillPathsForLayout, type SkillPathSource, type SkillDirPaths, }
|
|
|
32
32
|
export { ArtifactChangeSchema, type ArtifactChange } from "./workspace/artifact-change.js";
|
|
33
33
|
export { ConfiguredAgentOutcomeSchema, type ConfiguredAgentOutcome, } from "./workspace/configured-agent-outcome.js";
|
|
34
34
|
export { ConfiguredAgentOutcomesProvider, ConfiguredAgentOutcomesUnavailable, type ConfiguredAgentOutcomesFailureCategory, type ConfiguredAgentOutcomesForState, type ConfiguredAgentOutcomesProviderService, } from "./workspace/configured-agent-outcomes-provider.js";
|
|
35
|
-
export { AXM_MCP_METADATA_KEY, AxmMcpMetadataSchema, isAxmManagedMcpEntry,
|
|
35
|
+
export { AXM_MCP_METADATA_KEY, AxmMcpMetadataSchema, isAxmManagedMcpEntry, readAxmMcpMetadata, type AxmMcpMetadata, } from "./workspace/mcp-entry-semantics.js";
|
|
36
36
|
export { resolveProjectWorkspaceLayout, resolveProjectWorkspaceStatePaths, resolveUserWorkspaceLayout, type WorkspaceLayout, } from "./workspace/layout.js";
|
|
37
37
|
export { AXM_DIR_NAME, USER_WORKSPACE_DIRECTORY, getProjectRuntimeDir, locateWorkspace, resolveUserAxmHome, resolveUserAxmHomePure, resolveUserHome, resolveUserWorkspaceRoot, resolveUserWorkspaceRootPure, type WorkspaceLocation, } from "./workspace/paths.js";
|
|
38
38
|
export { removeIfExists } from "./workspace/remove-if-exists.js";
|
package/dist/src/index.js
CHANGED
|
@@ -39,7 +39,7 @@ export { ArtifactChangeSchema } from "./workspace/artifact-change.js";
|
|
|
39
39
|
export { ConfiguredAgentOutcomeSchema, } from "./workspace/configured-agent-outcome.js";
|
|
40
40
|
export { ConfiguredAgentOutcomesProvider, ConfiguredAgentOutcomesUnavailable, } from "./workspace/configured-agent-outcomes-provider.js";
|
|
41
41
|
// MCP entry settings semantics
|
|
42
|
-
export { AXM_MCP_METADATA_KEY, AxmMcpMetadataSchema, isAxmManagedMcpEntry,
|
|
42
|
+
export { AXM_MCP_METADATA_KEY, AxmMcpMetadataSchema, isAxmManagedMcpEntry, readAxmMcpMetadata, } from "./workspace/mcp-entry-semantics.js";
|
|
43
43
|
// Layout and paths
|
|
44
44
|
export { resolveProjectWorkspaceLayout, resolveProjectWorkspaceStatePaths, resolveUserWorkspaceLayout, } from "./workspace/layout.js";
|
|
45
45
|
export { AXM_DIR_NAME, USER_WORKSPACE_DIRECTORY, getProjectRuntimeDir, locateWorkspace, resolveUserAxmHome, resolveUserAxmHomePure, resolveUserHome, resolveUserWorkspaceRoot, resolveUserWorkspaceRootPure, } from "./workspace/paths.js";
|
|
@@ -268,7 +268,6 @@ export declare const McpServerEntryObjectSchema: Schema.Struct<{
|
|
|
268
268
|
readonly source: Schema.NonEmptyString;
|
|
269
269
|
readonly enabled: Schema.optionalKey<Schema.Boolean>;
|
|
270
270
|
readonly env: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.$Array<Schema.String>]>>;
|
|
271
|
-
readonly agents: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
272
271
|
}>;
|
|
273
272
|
/**
|
|
274
273
|
* Union of MCP server entry forms: plain source string or object with source + enabled + env.
|
|
@@ -287,7 +286,6 @@ export declare const McpServerEntrySchema: Schema.decodeTo<Schema.Union<readonly
|
|
|
287
286
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
288
287
|
readonly enabled: Schema.Boolean;
|
|
289
288
|
readonly env: Schema.$Record<Schema.String, Schema.String>;
|
|
290
|
-
readonly agents: Schema.optional<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
291
289
|
}>, Schema.Struct<{
|
|
292
290
|
readonly kind: Schema.Literal<"inline">;
|
|
293
291
|
readonly source: Schema.optional<Schema.Never>;
|
|
@@ -297,7 +295,6 @@ export declare const McpServerEntrySchema: Schema.decodeTo<Schema.Union<readonly
|
|
|
297
295
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
298
296
|
readonly enabled: Schema.Boolean;
|
|
299
297
|
readonly env: Schema.$Record<Schema.String, Schema.String>;
|
|
300
|
-
readonly agents: Schema.optional<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
301
298
|
}>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
302
299
|
readonly source: Schema.optionalKey<Schema.NonEmptyString>;
|
|
303
300
|
readonly command: Schema.optionalKey<Schema.NonEmptyString>;
|
|
@@ -306,7 +303,6 @@ export declare const McpServerEntrySchema: Schema.decodeTo<Schema.Union<readonly
|
|
|
306
303
|
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
307
304
|
readonly enabled: Schema.optionalKey<Schema.Boolean>;
|
|
308
305
|
readonly env: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.$Array<Schema.String>]>>;
|
|
309
|
-
readonly agents: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
310
306
|
}>]>, never, never>;
|
|
311
307
|
/**
|
|
312
308
|
* Inferred type for McpServerEntry schema.
|
|
@@ -336,7 +332,6 @@ export declare const McpServersMapSchema: Schema.$Record<Schema.String, Schema.d
|
|
|
336
332
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
337
333
|
readonly enabled: Schema.Boolean;
|
|
338
334
|
readonly env: Schema.$Record<Schema.String, Schema.String>;
|
|
339
|
-
readonly agents: Schema.optional<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
340
335
|
}>, Schema.Struct<{
|
|
341
336
|
readonly kind: Schema.Literal<"inline">;
|
|
342
337
|
readonly source: Schema.optional<Schema.Never>;
|
|
@@ -346,7 +341,6 @@ export declare const McpServersMapSchema: Schema.$Record<Schema.String, Schema.d
|
|
|
346
341
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
347
342
|
readonly enabled: Schema.Boolean;
|
|
348
343
|
readonly env: Schema.$Record<Schema.String, Schema.String>;
|
|
349
|
-
readonly agents: Schema.optional<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
350
344
|
}>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
351
345
|
readonly source: Schema.optionalKey<Schema.NonEmptyString>;
|
|
352
346
|
readonly command: Schema.optionalKey<Schema.NonEmptyString>;
|
|
@@ -355,7 +349,6 @@ export declare const McpServersMapSchema: Schema.$Record<Schema.String, Schema.d
|
|
|
355
349
|
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
356
350
|
readonly enabled: Schema.optionalKey<Schema.Boolean>;
|
|
357
351
|
readonly env: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.$Array<Schema.String>]>>;
|
|
358
|
-
readonly agents: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
359
352
|
}>]>, never, never>>;
|
|
360
353
|
/**
|
|
361
354
|
* Inferred type for McpServersMap schema.
|
|
@@ -643,7 +636,6 @@ export declare const SettingsSchema: Schema.StructWithRest<Schema.Struct<{
|
|
|
643
636
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
644
637
|
readonly enabled: Schema.Boolean;
|
|
645
638
|
readonly env: Schema.$Record<Schema.String, Schema.String>;
|
|
646
|
-
readonly agents: Schema.optional<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
647
639
|
}>, Schema.Struct<{
|
|
648
640
|
readonly kind: Schema.Literal<"inline">;
|
|
649
641
|
readonly source: Schema.optional<Schema.Never>;
|
|
@@ -653,7 +645,6 @@ export declare const SettingsSchema: Schema.StructWithRest<Schema.Struct<{
|
|
|
653
645
|
readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
654
646
|
readonly enabled: Schema.Boolean;
|
|
655
647
|
readonly env: Schema.$Record<Schema.String, Schema.String>;
|
|
656
|
-
readonly agents: Schema.optional<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
657
648
|
}>]>, Schema.Union<readonly [Schema.String, Schema.Struct<{
|
|
658
649
|
readonly source: Schema.optionalKey<Schema.NonEmptyString>;
|
|
659
650
|
readonly command: Schema.optionalKey<Schema.NonEmptyString>;
|
|
@@ -662,7 +653,6 @@ export declare const SettingsSchema: Schema.StructWithRest<Schema.Struct<{
|
|
|
662
653
|
readonly headers: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
663
654
|
readonly enabled: Schema.optionalKey<Schema.Boolean>;
|
|
664
655
|
readonly env: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.$Array<Schema.String>]>>;
|
|
665
|
-
readonly agents: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["adal", "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", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"]>>>;
|
|
666
656
|
}>]>, never, never>>]>>;
|
|
667
657
|
readonly mcpServersConfig: Schema.optionalKey<Schema.Struct<{
|
|
668
658
|
readonly dir: Schema.optionalKey<Schema.NonEmptyString>;
|
|
@@ -169,12 +169,6 @@ const McpServerEnvSchema = Schema.Union([
|
|
|
169
169
|
title: "MCP Server Env",
|
|
170
170
|
description: "MCP environment values as a map or pass-through variable names. Array entries decode to ${VAR} references.",
|
|
171
171
|
});
|
|
172
|
-
const McpServerAgentsSchema = Schema.Array(ConfigurableAgentIdSchema)
|
|
173
|
-
.annotate({
|
|
174
|
-
description: "Coding agents this MCP server applies to. Omit to target every configured agent.",
|
|
175
|
-
examples: [["claude-code", "codex"]],
|
|
176
|
-
})
|
|
177
|
-
.check(Schema.isMinLength(1), Schema.isUnique());
|
|
178
172
|
const decodeMcpEnv = (env) => {
|
|
179
173
|
if (env === undefined)
|
|
180
174
|
return {};
|
|
@@ -465,7 +459,6 @@ export const McpServerEntryObjectSchema = Schema.Struct({
|
|
|
465
459
|
source: entrySourceFieldSchema("MCP server", "mcps"),
|
|
466
460
|
enabled: enabledFieldSchema,
|
|
467
461
|
env: Schema.optionalKey(McpServerEnvSchema),
|
|
468
|
-
agents: Schema.optionalKey(McpServerAgentsSchema),
|
|
469
462
|
}).annotate({
|
|
470
463
|
title: "MCP Server Entry Object",
|
|
471
464
|
description: "An MCP server entry with source and optional enabled/env fields.",
|
|
@@ -489,7 +482,6 @@ const McpServerVerboseEntryObjectSchema = Schema.Struct({
|
|
|
489
482
|
})),
|
|
490
483
|
enabled: enabledFieldSchema,
|
|
491
484
|
env: Schema.optionalKey(McpServerEnvSchema),
|
|
492
|
-
agents: Schema.optionalKey(McpServerAgentsSchema),
|
|
493
485
|
}).pipe(Schema.check(Schema.makeFilter((entry) => validateMcpTransportExclusivity(entry))));
|
|
494
486
|
/**
|
|
495
487
|
* Union of MCP server entry forms: plain source string or object with source + enabled + env.
|
|
@@ -509,7 +501,6 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
509
501
|
headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
510
502
|
enabled: Schema.Boolean,
|
|
511
503
|
env: Schema.Record(Schema.String, Schema.String),
|
|
512
|
-
agents: Schema.optional(Schema.Array(ConfigurableAgentIdSchema)),
|
|
513
504
|
}),
|
|
514
505
|
Schema.Struct({
|
|
515
506
|
kind: Schema.Literal("inline"),
|
|
@@ -520,7 +511,6 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
520
511
|
headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
521
512
|
enabled: Schema.Boolean,
|
|
522
513
|
env: Schema.Record(Schema.String, Schema.String),
|
|
523
|
-
agents: Schema.optional(Schema.Array(ConfigurableAgentIdSchema)),
|
|
524
514
|
}),
|
|
525
515
|
]), {
|
|
526
516
|
decode: (entry) => typeof entry === "string"
|
|
@@ -531,7 +521,6 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
531
521
|
source: entry.source,
|
|
532
522
|
enabled: entry.enabled ?? true,
|
|
533
523
|
env: decodeMcpEnv(entry.env),
|
|
534
|
-
...(entry.agents === undefined ? {} : { agents: entry.agents }),
|
|
535
524
|
}
|
|
536
525
|
: {
|
|
537
526
|
kind: "inline",
|
|
@@ -541,13 +530,9 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
541
530
|
...(entry.headers === undefined ? {} : { headers: entry.headers }),
|
|
542
531
|
enabled: entry.enabled ?? true,
|
|
543
532
|
env: decodeMcpEnv(entry.env),
|
|
544
|
-
...(entry.agents === undefined ? {} : { agents: entry.agents }),
|
|
545
533
|
},
|
|
546
534
|
encode: (entry) => {
|
|
547
|
-
if (entry.kind !== "inline" &&
|
|
548
|
-
entry.enabled &&
|
|
549
|
-
Object.keys(entry.env).length === 0 &&
|
|
550
|
-
entry.agents === undefined) {
|
|
535
|
+
if (entry.kind !== "inline" && entry.enabled && Object.keys(entry.env).length === 0) {
|
|
551
536
|
return entry.source;
|
|
552
537
|
}
|
|
553
538
|
const obj = {};
|
|
@@ -568,14 +553,11 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
568
553
|
obj.enabled = false;
|
|
569
554
|
if (Object.keys(entry.env).length > 0)
|
|
570
555
|
obj.env = entry.env;
|
|
571
|
-
if (entry.agents !== undefined)
|
|
572
|
-
obj.agents = entry.agents;
|
|
573
556
|
if (entry.kind !== "inline") {
|
|
574
557
|
return {
|
|
575
558
|
source: entry.source,
|
|
576
559
|
...(obj.enabled === undefined ? {} : { enabled: obj.enabled }),
|
|
577
560
|
...(obj.env === undefined ? {} : { env: obj.env }),
|
|
578
|
-
...(obj.agents === undefined ? {} : { agents: obj.agents }),
|
|
579
561
|
};
|
|
580
562
|
}
|
|
581
563
|
if (entry.command !== undefined) {
|
|
@@ -584,7 +566,6 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
584
566
|
...(obj.args === undefined ? {} : { args: obj.args }),
|
|
585
567
|
...(obj.enabled === undefined ? {} : { enabled: obj.enabled }),
|
|
586
568
|
...(obj.env === undefined ? {} : { env: obj.env }),
|
|
587
|
-
...(obj.agents === undefined ? {} : { agents: obj.agents }),
|
|
588
569
|
};
|
|
589
570
|
}
|
|
590
571
|
return {
|
|
@@ -592,7 +573,6 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
592
573
|
...(obj.headers === undefined ? {} : { headers: obj.headers }),
|
|
593
574
|
...(obj.enabled === undefined ? {} : { enabled: obj.enabled }),
|
|
594
575
|
...(obj.env === undefined ? {} : { env: obj.env }),
|
|
595
|
-
...(obj.agents === undefined ? {} : { agents: obj.agents }),
|
|
596
576
|
};
|
|
597
577
|
},
|
|
598
578
|
}, {
|
|
@@ -606,7 +586,6 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
606
586
|
command: "npx",
|
|
607
587
|
args: ["-y", "linear-mcp-server"],
|
|
608
588
|
env: ["LINEAR_API_KEY"],
|
|
609
|
-
agents: ["claude-code"],
|
|
610
589
|
},
|
|
611
590
|
{ url: "https://mcp.sentry.dev/sse", headers: { Authorization: "Bearer ${SENTRY_TOKEN}" } },
|
|
612
591
|
],
|
|
@@ -43,6 +43,5 @@ export declare const configuredAgentLifecycleOutcomes: (args: {
|
|
|
43
43
|
readonly targetState: "enabled" | "disabled" | "absent";
|
|
44
44
|
readonly installed: boolean;
|
|
45
45
|
readonly observedAgentIds?: ReadonlyArray<string>;
|
|
46
|
-
readonly applicableAgentIds?: ReadonlyArray<string>;
|
|
47
46
|
}) => ReadonlyArray<ConfiguredAgentOutcome>;
|
|
48
47
|
//# sourceMappingURL=configured-agent-outcomes.d.ts.map
|
|
@@ -32,7 +32,6 @@ const unsupportedOutcome = (args) => ({
|
|
|
32
32
|
export const configuredAgentLifecycleOutcomes = (args) => {
|
|
33
33
|
const policy = EXTENSION_CONFIGURED_AGENT_POLICY[args.type];
|
|
34
34
|
const observed = new Set(args.observedAgentIds ?? []);
|
|
35
|
-
const applicable = args.applicableAgentIds === undefined ? undefined : new Set(args.applicableAgentIds);
|
|
36
35
|
if (policy.kind === "not-applicable") {
|
|
37
36
|
return args.agentIds.map((agentId) => ({
|
|
38
37
|
extensionType: args.type,
|
|
@@ -57,16 +56,6 @@ export const configuredAgentLifecycleOutcomes = (args) => {
|
|
|
57
56
|
: "The extension is disabled, so no agent projection is expected.",
|
|
58
57
|
};
|
|
59
58
|
}
|
|
60
|
-
if (applicable !== undefined && !applicable.has(agentId)) {
|
|
61
|
-
return {
|
|
62
|
-
extensionType: args.type,
|
|
63
|
-
name: args.name,
|
|
64
|
-
agentId,
|
|
65
|
-
outcome: "not-applicable",
|
|
66
|
-
reasonCode: "target-policy-excluded",
|
|
67
|
-
reason: `${agentId} is excluded by the extension target policy.`,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
59
|
const support = supportByAgent.get(agentId);
|
|
71
60
|
if (support === undefined) {
|
|
72
61
|
return unsupportedOutcome({
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Settings-semantics predicates for MCP server entries.
|
|
3
3
|
*
|
|
4
|
-
* Pure derivations over workspace-owned MCP entry shapes:
|
|
5
|
-
*
|
|
6
|
-
* embedded in agent-native MCP config entries.
|
|
4
|
+
* Pure derivations over workspace-owned MCP entry shapes: AXM
|
|
5
|
+
* ownership/provenance metadata embedded in agent-native MCP config entries.
|
|
7
6
|
*
|
|
8
7
|
* @experimental This API is unstable and may change without notice.
|
|
9
8
|
* @packageDocumentation
|
|
10
9
|
*/
|
|
11
10
|
import * as Option from "effect/Option";
|
|
12
11
|
import * as Schema from "effect/Schema";
|
|
13
|
-
import type { McpServerEntry } from "../settings/schema.js";
|
|
14
|
-
export declare const isMcpServerApplicableToAgent: (entry: McpServerEntry, agentId: string) => boolean;
|
|
15
12
|
export declare const AXM_MCP_METADATA_KEY = "x-axm";
|
|
16
13
|
export declare const AxmMcpMetadataSchema: Schema.Union<readonly [Schema.Struct<{
|
|
17
14
|
readonly v: Schema.Literal<1>;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Settings-semantics predicates for MCP server entries.
|
|
3
3
|
*
|
|
4
|
-
* Pure derivations over workspace-owned MCP entry shapes:
|
|
5
|
-
*
|
|
6
|
-
* embedded in agent-native MCP config entries.
|
|
4
|
+
* Pure derivations over workspace-owned MCP entry shapes: AXM
|
|
5
|
+
* ownership/provenance metadata embedded in agent-native MCP config entries.
|
|
7
6
|
*
|
|
8
7
|
* @experimental This API is unstable and may change without notice.
|
|
9
8
|
* @packageDocumentation
|
|
10
9
|
*/
|
|
11
10
|
import * as Option from "effect/Option";
|
|
12
11
|
import * as Schema from "effect/Schema";
|
|
13
|
-
export const isMcpServerApplicableToAgent = (entry, agentId) => entry.agents === undefined || entry.agents.some((candidate) => candidate === agentId);
|
|
14
12
|
export const AXM_MCP_METADATA_KEY = "x-axm";
|
|
15
13
|
const ResolvableSourceTypeSchema = Schema.Literals([
|
|
16
14
|
"github",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import * as Effect from "effect/Effect";
|
|
8
8
|
import * as Option from "effect/Option";
|
|
9
9
|
import { installableExtensionTypes, } from "@agentxm/extension-model/unstable/extensions/installable-types";
|
|
10
|
-
import { isAxmManagedMcpEntry
|
|
10
|
+
import { isAxmManagedMcpEntry } from "./mcp-entry-semantics.js";
|
|
11
11
|
import { createDefaultSettings } from "../settings/index.js";
|
|
12
12
|
import { configuredAgentLifecycleOutcomes } from "./configured-agent-outcomes.js";
|
|
13
13
|
import { projectExtensionInventory, } from "./read-model/extensions/inventory.js";
|
|
@@ -298,7 +298,6 @@ export const makeReadModelRecordReaders = (args) => {
|
|
|
298
298
|
const configuredAgents = settings.agents ?? [];
|
|
299
299
|
const finalizeInventory = (inventory) => {
|
|
300
300
|
const withOutcomes = inventory.items.map((row) => {
|
|
301
|
-
const mcpEntry = row.type === "mcp-server" ? settings.mcpServers?.[row.name] : undefined;
|
|
302
301
|
return {
|
|
303
302
|
...row,
|
|
304
303
|
agentOutcomes: row.classification.lifecycle === "unmanaged"
|
|
@@ -312,11 +311,6 @@ export const makeReadModelRecordReaders = (args) => {
|
|
|
312
311
|
targetState: row.enabled === false ? "disabled" : "enabled",
|
|
313
312
|
installed: row.installed,
|
|
314
313
|
observedAgentIds: row.agents,
|
|
315
|
-
...(mcpEntry === undefined
|
|
316
|
-
? {}
|
|
317
|
-
: {
|
|
318
|
-
applicableAgentIds: configuredAgents.filter((agentId) => isMcpServerApplicableToAgent(mcpEntry, agentId)),
|
|
319
|
-
}),
|
|
320
314
|
}),
|
|
321
315
|
};
|
|
322
316
|
});
|
|
@@ -33,7 +33,6 @@ import type { ExtensionInventory } from "./read-model/extensions/inventory.js";
|
|
|
33
33
|
import type { ResolvedKnowledgeDiscoveryConfig } from "../knowledge/discovery-config.js";
|
|
34
34
|
import type { DesiredStateGraph, ProspectivePackRef } from "./desired-state-graph.js";
|
|
35
35
|
import type { AbsolutePath } from "@agentxm/extension-model/unstable/path-types";
|
|
36
|
-
import type { ConfigurableAgentId } from "@agentxm/extension-model/unstable/agent-capabilities";
|
|
37
36
|
import type { WorkspaceLayout } from "./layout.js";
|
|
38
37
|
import type { ExtensionPathSource } from "./extension-paths.js";
|
|
39
38
|
/**
|
|
@@ -218,7 +217,6 @@ export interface SetMcpServerArgs {
|
|
|
218
217
|
readonly versionRange: Option.Option<string>;
|
|
219
218
|
readonly env?: Readonly<Record<string, string>>;
|
|
220
219
|
readonly enabled?: boolean;
|
|
221
|
-
readonly agents?: ReadonlyArray<ConfigurableAgentId>;
|
|
222
220
|
}
|
|
223
221
|
/**
|
|
224
222
|
* Arguments for `setRule` -- bundles the rule name with the lock entry.
|
|
@@ -117,7 +117,6 @@ export declare const makeWorkspaceMutations: (options: WorkspaceLayerOptions, ma
|
|
|
117
117
|
readonly [x: string]: string;
|
|
118
118
|
};
|
|
119
119
|
readonly url?: string | undefined;
|
|
120
|
-
readonly agents?: readonly ("adal" | "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" | "pochi" | "qoder" | "qoder-cn" | "qwen-code" | "replit" | "roo" | "rovodev" | "tabnine-cli" | "trae-cn" | "trae" | "warp" | "windsurf" | "zencoder" | "zed" | "zenflow")[] | undefined;
|
|
121
120
|
readonly command?: string | undefined;
|
|
122
121
|
readonly args?: readonly string[] | undefined;
|
|
123
122
|
readonly headers?: {
|
|
@@ -132,7 +131,6 @@ export declare const makeWorkspaceMutations: (options: WorkspaceLayerOptions, ma
|
|
|
132
131
|
readonly kind: "inline";
|
|
133
132
|
readonly url?: string | undefined;
|
|
134
133
|
readonly source?: undefined;
|
|
135
|
-
readonly agents?: readonly ("adal" | "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" | "pochi" | "qoder" | "qoder-cn" | "qwen-code" | "replit" | "roo" | "rovodev" | "tabnine-cli" | "trae-cn" | "trae" | "warp" | "windsurf" | "zencoder" | "zed" | "zenflow")[] | undefined;
|
|
136
134
|
readonly command?: string | undefined;
|
|
137
135
|
readonly args?: readonly string[] | undefined;
|
|
138
136
|
readonly headers?: {
|
|
@@ -1883,7 +1881,7 @@ export declare const makeWorkspaceMutations: (options: WorkspaceLayerOptions, ma
|
|
|
1883
1881
|
readonly publisherBindingId: string;
|
|
1884
1882
|
readonly treeIntegrity: string & import("effect/Brand").Brand<"TreeIntegrity">;
|
|
1885
1883
|
}>, import("./read-model/errors.js").SettingsIoError | import("./read-model/errors.js").SettingsParseError | import("./read-model/errors.js").SettingsDecodeError | LockfileReadError | WorkspaceRootEscape, never>;
|
|
1886
|
-
setMcpServer: ({ name, resolutionKey, lockEntry, versionRange, env, enabled,
|
|
1884
|
+
setMcpServer: ({ name, resolutionKey, lockEntry, versionRange, env, enabled, }: SetMcpServerArgs) => Effect.Effect<void, import("../settings/errors.ts").SettingsWriteError | import("./transaction.ts").WorkspaceSnapshotError | import("../lockfile/errors.js").LockfileWriteError | LockfileValidationError | SettingsReadError | LockfileReadError | WorkspaceRootEscape, never>;
|
|
1887
1885
|
setMcpServerLock: ({ name: _name, resolutionKey, lockEntry }: SetMcpServerArgs) => Effect.Effect<void, import("../lockfile/errors.js").LockfileWriteError | LockfileValidationError | LockfileReadError | WorkspaceRootEscape, never>;
|
|
1888
1886
|
updateMcpServerEntry: (name: string, updater: (entry: McpServerEntry) => McpServerEntry) => Effect.Effect<void, import("../settings/errors.ts").SettingsWriteError | import("./transaction.ts").WorkspaceSnapshotError | SettingsEntryMissing | SettingsReadError | WorkspaceRootEscape, never>;
|
|
1889
1887
|
setMcpServerEntry: (name: string, entry: McpServerEntry) => Effect.Effect<void, import("../settings/errors.ts").SettingsWriteError | import("./transaction.ts").WorkspaceSnapshotError | SettingsReadError | WorkspaceRootEscape, never>;
|
|
@@ -1109,13 +1109,12 @@ export const makeWorkspaceMutations = (options, makeCapabilities) => Effect.gen(
|
|
|
1109
1109
|
const lockfile = yield* readLockfileSafe(workspaceDir);
|
|
1110
1110
|
return Option.fromUndefinedOr((lockfile.mcpServers ?? {})[node.identity]);
|
|
1111
1111
|
}),
|
|
1112
|
-
setMcpServer: ({ name, resolutionKey, lockEntry, versionRange, env, enabled,
|
|
1112
|
+
setMcpServer: ({ name, resolutionKey, lockEntry, versionRange, env, enabled, }) => withMutex(Effect.gen(function* () {
|
|
1113
1113
|
// Update settings (uses "mcpServers" key)
|
|
1114
1114
|
const currentSettings = yield* readSettingsSafe(workspaceDir);
|
|
1115
1115
|
const currentMcpServers = currentSettings.mcpServers ?? {};
|
|
1116
1116
|
const currentEnabled = currentMcpServers[name]?.enabled ?? true;
|
|
1117
1117
|
const currentEnv = currentMcpServers[name]?.env ?? {};
|
|
1118
|
-
const currentAgents = currentMcpServers[name]?.agents;
|
|
1119
1118
|
const settingsEntry = {
|
|
1120
1119
|
kind: "sourced",
|
|
1121
1120
|
source: lockEntry.type === "registry"
|
|
@@ -1133,9 +1132,6 @@ export const makeWorkspaceMutations = (options, makeCapabilities) => Effect.gen(
|
|
|
1133
1132
|
: printSourceParams(lockEntryToSourceParams(lockEntry)),
|
|
1134
1133
|
enabled: enabled ?? currentEnabled,
|
|
1135
1134
|
env: env ?? currentEnv,
|
|
1136
|
-
...((agents ?? currentAgents) === undefined
|
|
1137
|
-
? {}
|
|
1138
|
-
: { agents: agents ?? currentAgents }),
|
|
1139
1135
|
};
|
|
1140
1136
|
const updatedSettings = {
|
|
1141
1137
|
...currentSettings,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentxm/workspace-state",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.6",
|
|
4
4
|
"description": "AXM workspace state kernel: settings, lockfile, read model, and desired-state vocabulary for the axm CLI. Unstable and unsupported — use the axm.sh CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "FSL-1.1-MIT",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"jsonc-parser": "^3.3.1",
|
|
46
46
|
"semver": "^7.8.5",
|
|
47
47
|
"yaml": "^2.9.0",
|
|
48
|
-
"@agentxm/extension-model": "^0.28.
|
|
49
|
-
"@agentxm/registry-protocol": "^0.28.
|
|
48
|
+
"@agentxm/extension-model": "^0.28.6",
|
|
49
|
+
"@agentxm/registry-protocol": "^0.28.6"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@effect/platform-node": "4.0.0-rc.112",
|