@agentxm/client-core 0.19.3 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/unstable/commands/index.d.ts +1 -1
- package/dist/src/unstable/commands/index.d.ts.map +1 -1
- package/dist/src/unstable/commands/index.js.map +1 -1
- package/dist/src/unstable/commands/install-artifact.d.ts.map +1 -1
- package/dist/src/unstable/commands/install-artifact.js +6 -2
- package/dist/src/unstable/commands/install-artifact.js.map +1 -1
- package/dist/src/unstable/commands/manager.d.ts.map +1 -1
- package/dist/src/unstable/commands/manager.js +33 -5
- package/dist/src/unstable/commands/manager.js.map +1 -1
- package/dist/src/unstable/commands/operations/disable.js +1 -1
- package/dist/src/unstable/commands/operations/disable.js.map +1 -1
- package/dist/src/unstable/commands/operations/enable.js +1 -1
- package/dist/src/unstable/commands/operations/enable.js.map +1 -1
- package/dist/src/unstable/commands/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/install.js +27 -1
- package/dist/src/unstable/commands/operations/install.js.map +1 -1
- package/dist/src/unstable/commands/reconciliation-adapter.d.ts.map +1 -1
- package/dist/src/unstable/commands/reconciliation-adapter.js +3 -1
- package/dist/src/unstable/commands/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/commands/refs.d.ts +5 -3
- package/dist/src/unstable/commands/refs.d.ts.map +1 -1
- package/dist/src/unstable/extensions/canonical-path.d.ts +1 -1
- package/dist/src/unstable/extensions/canonical-path.d.ts.map +1 -1
- package/dist/src/unstable/extensions/canonical-path.js +1 -1
- package/dist/src/unstable/extensions/canonical-path.js.map +1 -1
- package/dist/src/unstable/extensions/extension-paths.d.ts +1 -1
- package/dist/src/unstable/extensions/extension-paths.d.ts.map +1 -1
- package/dist/src/unstable/extensions/extension-paths.js +1 -1
- package/dist/src/unstable/extensions/extension-paths.js.map +1 -1
- package/dist/src/unstable/extensions/index.d.ts +1 -1
- package/dist/src/unstable/extensions/index.d.ts.map +1 -1
- package/dist/src/unstable/extensions/index.js.map +1 -1
- package/dist/src/unstable/extensions/marker-fqn.d.ts +1 -1
- package/dist/src/unstable/extensions/marker-fqn.d.ts.map +1 -1
- package/dist/src/unstable/extensions/marker-fqn.js +1 -1
- package/dist/src/unstable/extensions/marker-fqn.js.map +1 -1
- package/dist/src/unstable/extensions/materializable-from-disk.d.ts +4 -2
- package/dist/src/unstable/extensions/materializable-from-disk.d.ts.map +1 -1
- package/dist/src/unstable/extensions/materializable-from-disk.js +33 -0
- package/dist/src/unstable/extensions/materializable-from-disk.js.map +1 -1
- package/dist/src/unstable/extensions/operations.d.ts +8 -5
- package/dist/src/unstable/extensions/operations.d.ts.map +1 -1
- package/dist/src/unstable/extensions/operations.js +53 -6
- package/dist/src/unstable/extensions/operations.js.map +1 -1
- package/dist/src/unstable/extensions/ref-base.d.ts +17 -0
- package/dist/src/unstable/extensions/ref-base.d.ts.map +1 -1
- package/dist/src/unstable/files/index.d.ts +1 -1
- package/dist/src/unstable/files/index.d.ts.map +1 -1
- package/dist/src/unstable/files/index.js.map +1 -1
- package/dist/src/unstable/files/manager.d.ts.map +1 -1
- package/dist/src/unstable/files/manager.js +38 -5
- package/dist/src/unstable/files/manager.js.map +1 -1
- package/dist/src/unstable/files/refs.d.ts +5 -3
- package/dist/src/unstable/files/refs.d.ts.map +1 -1
- package/dist/src/unstable/hooks/index.d.ts +1 -1
- package/dist/src/unstable/hooks/index.d.ts.map +1 -1
- package/dist/src/unstable/hooks/index.js.map +1 -1
- package/dist/src/unstable/hooks/manager.d.ts.map +1 -1
- package/dist/src/unstable/hooks/manager.js +32 -8
- package/dist/src/unstable/hooks/manager.js.map +1 -1
- package/dist/src/unstable/hooks/refs.d.ts +6 -4
- package/dist/src/unstable/hooks/refs.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.js +8 -3
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/helpers/source-categorize.d.ts +1 -1
- package/dist/src/unstable/lint/catalog/workspace/helpers/source-categorize.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/helpers/source-categorize.js +14 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/source-categorize.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.js +12 -1
- package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.js +4 -2
- package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/skills-managed.js +1 -1
- package/dist/src/unstable/lint/catalog/workspace/skills-managed.js.map +1 -1
- package/dist/src/unstable/lint/cli.js +2 -2
- package/dist/src/unstable/lint/cli.js.map +1 -1
- package/dist/src/unstable/lockfile/index.d.ts +2 -2
- package/dist/src/unstable/lockfile/index.d.ts.map +1 -1
- package/dist/src/unstable/lockfile/index.js +1 -1
- package/dist/src/unstable/lockfile/index.js.map +1 -1
- package/dist/src/unstable/lockfile/lockfile.d.ts +548 -254
- package/dist/src/unstable/lockfile/lockfile.d.ts.map +1 -1
- package/dist/src/unstable/lockfile/schema.d.ts +443 -32
- package/dist/src/unstable/lockfile/schema.d.ts.map +1 -1
- package/dist/src/unstable/lockfile/schema.js +58 -9
- package/dist/src/unstable/lockfile/schema.js.map +1 -1
- package/dist/src/unstable/mcps/index.d.ts +1 -1
- package/dist/src/unstable/mcps/index.d.ts.map +1 -1
- package/dist/src/unstable/mcps/index.js.map +1 -1
- package/dist/src/unstable/mcps/manager.d.ts.map +1 -1
- package/dist/src/unstable/mcps/manager.js +8 -2
- package/dist/src/unstable/mcps/manager.js.map +1 -1
- package/dist/src/unstable/mcps/metadata.d.ts +2 -2
- package/dist/src/unstable/mcps/metadata.d.ts.map +1 -1
- package/dist/src/unstable/mcps/metadata.js +4 -0
- package/dist/src/unstable/mcps/metadata.js.map +1 -1
- package/dist/src/unstable/mcps/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/mcps/operations/install.js +40 -3
- package/dist/src/unstable/mcps/operations/install.js.map +1 -1
- package/dist/src/unstable/mcps/reconciliation-adapter.d.ts.map +1 -1
- package/dist/src/unstable/mcps/reconciliation-adapter.js +3 -1
- package/dist/src/unstable/mcps/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/mcps/refs.d.ts +5 -3
- package/dist/src/unstable/mcps/refs.d.ts.map +1 -1
- package/dist/src/unstable/packs/index.d.ts +1 -1
- package/dist/src/unstable/packs/index.d.ts.map +1 -1
- package/dist/src/unstable/packs/manager.d.ts +13 -2
- package/dist/src/unstable/packs/manager.d.ts.map +1 -1
- package/dist/src/unstable/packs/manager.js +153 -7
- package/dist/src/unstable/packs/manager.js.map +1 -1
- package/dist/src/unstable/packs/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/install.js +1 -0
- package/dist/src/unstable/packs/operations/install.js.map +1 -1
- package/dist/src/unstable/packs/operations/uninstall.js +1 -1
- package/dist/src/unstable/packs/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/packs/reconciliation-adapter.d.ts.map +1 -1
- package/dist/src/unstable/packs/reconciliation-adapter.js +3 -1
- package/dist/src/unstable/packs/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/packs/refs.d.ts +5 -3
- package/dist/src/unstable/packs/refs.d.ts.map +1 -1
- package/dist/src/unstable/plan/plan.d.ts +2 -2
- package/dist/src/unstable/plan/plan.d.ts.map +1 -1
- package/dist/src/unstable/plan/resolve-plan.d.ts +1 -1
- package/dist/src/unstable/plan/resolve-plan.d.ts.map +1 -1
- package/dist/src/unstable/publish/index.d.ts +1 -0
- package/dist/src/unstable/publish/index.d.ts.map +1 -1
- package/dist/src/unstable/publish/index.js +1 -0
- package/dist/src/unstable/publish/index.js.map +1 -1
- package/dist/src/unstable/registry/client.d.ts +8 -0
- package/dist/src/unstable/registry/client.d.ts.map +1 -1
- package/dist/src/unstable/registry/client.js.map +1 -1
- package/dist/src/unstable/registry/index.d.ts +1 -1
- package/dist/src/unstable/registry/index.d.ts.map +1 -1
- package/dist/src/unstable/registry/index.js.map +1 -1
- package/dist/src/unstable/registry/local-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/local-client.js +17 -0
- package/dist/src/unstable/registry/local-client.js.map +1 -1
- package/dist/src/unstable/registry/remote-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/remote-client.js +15 -0
- package/dist/src/unstable/registry/remote-client.js.map +1 -1
- package/dist/src/unstable/registry/schema.d.ts +1 -0
- package/dist/src/unstable/registry/schema.d.ts.map +1 -1
- package/dist/src/unstable/registry/schema.js +1 -0
- package/dist/src/unstable/registry/schema.js.map +1 -1
- package/dist/src/unstable/rules/index.d.ts +1 -1
- package/dist/src/unstable/rules/index.d.ts.map +1 -1
- package/dist/src/unstable/rules/index.js.map +1 -1
- package/dist/src/unstable/rules/manager.d.ts.map +1 -1
- package/dist/src/unstable/rules/manager.js +34 -4
- package/dist/src/unstable/rules/manager.js.map +1 -1
- package/dist/src/unstable/rules/refs.d.ts +6 -4
- package/dist/src/unstable/rules/refs.d.ts.map +1 -1
- package/dist/src/unstable/settings/schema.d.ts +20 -73
- package/dist/src/unstable/settings/schema.d.ts.map +1 -1
- package/dist/src/unstable/settings/schema.js +81 -98
- package/dist/src/unstable/settings/schema.js.map +1 -1
- package/dist/src/unstable/skills/index.d.ts +1 -1
- package/dist/src/unstable/skills/index.d.ts.map +1 -1
- package/dist/src/unstable/skills/index.js.map +1 -1
- package/dist/src/unstable/skills/manager.d.ts.map +1 -1
- package/dist/src/unstable/skills/manager.js +9 -3
- package/dist/src/unstable/skills/manager.js.map +1 -1
- package/dist/src/unstable/skills/materialization.d.ts.map +1 -1
- package/dist/src/unstable/skills/materialization.js +6 -0
- package/dist/src/unstable/skills/materialization.js.map +1 -1
- package/dist/src/unstable/skills/operations/copy.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/copy.js +5 -4
- package/dist/src/unstable/skills/operations/copy.js.map +1 -1
- package/dist/src/unstable/skills/operations/disable.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/disable.js +4 -2
- package/dist/src/unstable/skills/operations/disable.js.map +1 -1
- package/dist/src/unstable/skills/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/install.js +34 -0
- package/dist/src/unstable/skills/operations/install.js.map +1 -1
- package/dist/src/unstable/skills/paths.d.ts +1 -1
- package/dist/src/unstable/skills/paths.d.ts.map +1 -1
- package/dist/src/unstable/skills/reconciliation-adapter.d.ts.map +1 -1
- package/dist/src/unstable/skills/reconciliation-adapter.js +3 -1
- package/dist/src/unstable/skills/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/skills/refs.d.ts +5 -3
- package/dist/src/unstable/skills/refs.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-source.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-source.js +9 -0
- package/dist/src/unstable/source-resolution/resolve-source.js.map +1 -1
- package/dist/src/unstable/source-resolution/service.d.ts +1 -1
- package/dist/src/unstable/source-resolution/service.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/service.js +15 -0
- package/dist/src/unstable/source-resolution/service.js.map +1 -1
- package/dist/src/unstable/sources/index.d.ts +2 -1
- package/dist/src/unstable/sources/index.d.ts.map +1 -1
- package/dist/src/unstable/sources/index.js +1 -0
- package/dist/src/unstable/sources/index.js.map +1 -1
- package/dist/src/unstable/sources/lock-entry-to-ref.d.ts +3 -1
- package/dist/src/unstable/sources/lock-entry-to-ref.d.ts.map +1 -1
- package/dist/src/unstable/sources/lock-entry-to-ref.js +106 -14
- package/dist/src/unstable/sources/lock-entry-to-ref.js.map +1 -1
- package/dist/src/unstable/sources/parser.d.ts +9 -2
- package/dist/src/unstable/sources/parser.d.ts.map +1 -1
- package/dist/src/unstable/sources/parser.js +22 -7
- package/dist/src/unstable/sources/parser.js.map +1 -1
- package/dist/src/unstable/sources/printer.d.ts +2 -2
- package/dist/src/unstable/sources/printer.d.ts.map +1 -1
- package/dist/src/unstable/sources/printer.js +14 -0
- package/dist/src/unstable/sources/printer.js.map +1 -1
- package/dist/src/unstable/sources/source-to-lock-entry.d.ts.map +1 -1
- package/dist/src/unstable/sources/source-to-lock-entry.js +10 -0
- package/dist/src/unstable/sources/source-to-lock-entry.js.map +1 -1
- package/dist/src/unstable/sources/types.d.ts +21 -6
- package/dist/src/unstable/sources/types.d.ts.map +1 -1
- package/dist/src/unstable/sources/types.js +11 -3
- package/dist/src/unstable/sources/types.js.map +1 -1
- package/dist/src/unstable/sources/workspace.d.ts +13 -0
- package/dist/src/unstable/sources/workspace.d.ts.map +1 -0
- package/dist/src/unstable/sources/workspace.js +13 -0
- package/dist/src/unstable/sources/workspace.js.map +1 -0
- package/dist/src/unstable/subagents/index.d.ts +1 -1
- package/dist/src/unstable/subagents/index.d.ts.map +1 -1
- package/dist/src/unstable/subagents/index.js.map +1 -1
- package/dist/src/unstable/subagents/lock-entry-builder.d.ts.map +1 -1
- package/dist/src/unstable/subagents/lock-entry-builder.js +10 -0
- package/dist/src/unstable/subagents/lock-entry-builder.js.map +1 -1
- package/dist/src/unstable/subagents/manager.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manager.js +32 -5
- package/dist/src/unstable/subagents/manager.js.map +1 -1
- package/dist/src/unstable/subagents/operations/disable.d.ts.map +1 -1
- package/dist/src/unstable/subagents/operations/disable.js +2 -1
- package/dist/src/unstable/subagents/operations/disable.js.map +1 -1
- package/dist/src/unstable/subagents/paths.d.ts +1 -1
- package/dist/src/unstable/subagents/paths.d.ts.map +1 -1
- package/dist/src/unstable/subagents/reconciliation-adapter.d.ts.map +1 -1
- package/dist/src/unstable/subagents/reconciliation-adapter.js +3 -1
- package/dist/src/unstable/subagents/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/subagents/refs.d.ts +5 -3
- package/dist/src/unstable/subagents/refs.d.ts.map +1 -1
- package/dist/src/unstable/workflows/index.d.ts +1 -1
- package/dist/src/unstable/workflows/index.d.ts.map +1 -1
- package/dist/src/unstable/workflows/index.js.map +1 -1
- package/dist/src/unstable/workflows/uninstall-command/workflow.d.ts +9 -7
- package/dist/src/unstable/workflows/uninstall-command/workflow.d.ts.map +1 -1
- package/dist/src/unstable/workflows/uninstall-command/workflow.js +1 -1
- package/dist/src/unstable/workflows/uninstall-command/workflow.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/index.d.ts +1 -0
- package/dist/src/unstable/workspace/configured-entry-resolution/index.d.ts.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/index.js +1 -0
- package/dist/src/unstable/workspace/configured-entry-resolution/index.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.d.ts +2 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.d.ts.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js +138 -0
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/workspace-ref.d.ts +24 -0
- package/dist/src/unstable/workspace/configured-entry-resolution/workspace-ref.d.ts.map +1 -0
- package/dist/src/unstable/workspace/configured-entry-resolution/workspace-ref.js +211 -0
- package/dist/src/unstable/workspace/configured-entry-resolution/workspace-ref.js.map +1 -0
- package/dist/src/unstable/workspace/index.d.ts +1 -1
- package/dist/src/unstable/workspace/index.d.ts.map +1 -1
- package/dist/src/unstable/workspace/index.js +1 -1
- package/dist/src/unstable/workspace/index.js.map +1 -1
- package/dist/src/unstable/workspace/initialization.d.ts +4 -40
- package/dist/src/unstable/workspace/initialization.d.ts.map +1 -1
- package/dist/src/unstable/workspace/initialization.js +1 -1
- package/dist/src/unstable/workspace/initialization.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/state.d.ts.map +1 -1
- package/dist/src/unstable/workspace/read-model/state.js +21 -5
- package/dist/src/unstable/workspace/read-model/state.js.map +1 -1
- package/dist/src/unstable/workspace/reconciliation-types.d.ts +16 -2
- package/dist/src/unstable/workspace/reconciliation-types.d.ts.map +1 -1
- package/dist/src/unstable/workspace/reconciliation.d.ts.map +1 -1
- package/dist/src/unstable/workspace/reconciliation.js +185 -2
- package/dist/src/unstable/workspace/reconciliation.js.map +1 -1
- package/dist/src/unstable/workspace/service-interface.d.ts +10 -4
- package/dist/src/unstable/workspace/service-interface.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service-interface.js.map +1 -1
- package/dist/src/unstable/workspace/service.d.ts +556 -264
- package/dist/src/unstable/workspace/service.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service.js +41 -90
- package/dist/src/unstable/workspace/service.js.map +1 -1
- package/dist/src/unstable/workspace/skill-snapshot.d.ts.map +1 -1
- package/dist/src/unstable/workspace/skill-snapshot.js +2 -1
- package/dist/src/unstable/workspace/skill-snapshot.js.map +1 -1
- package/dist/src/unstable/workspace/test-stubs.d.ts.map +1 -1
- package/dist/src/unstable/workspace/test-stubs.js +1 -0
- package/dist/src/unstable/workspace/test-stubs.js.map +1 -1
- package/package.json +2 -2
- package/site-content/__generated__/schemas/axm-lock.schema.json +370 -2
- package/site-content/__generated__/schemas/settings.schema.json +27 -91
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as Schema from "effect/Schema";
|
|
9
9
|
import * as SchemaTransformation from "effect/SchemaTransformation";
|
|
10
|
-
import { ConfigurableAgentIdSchema, EXTENSION_NAME_PATTERN } from "../extensions/common.js";
|
|
10
|
+
import { ConfigurableAgentIdSchema, EXTENSION_NAME_PATTERN, FQN_PATTERN, } from "../extensions/common.js";
|
|
11
11
|
import { FileInputValueSchema } from "../files/manifest-schema.js";
|
|
12
12
|
import { HandleSchema } from "../extensions/handle.js";
|
|
13
13
|
import { LibraryRefSchema } from "../libraries/index.js";
|
|
14
14
|
import { LintConfigSchema } from "../lint/config.js";
|
|
15
|
+
import { isWorkspaceSourceLocator } from "../sources/workspace.js";
|
|
15
16
|
// -----------------------------------------------------------------------------
|
|
16
17
|
// Source Host Config (array-based, discriminated on `type` field)
|
|
17
18
|
// -----------------------------------------------------------------------------
|
|
@@ -21,13 +22,13 @@ import { LintConfigSchema } from "../lint/config.js";
|
|
|
21
22
|
*
|
|
22
23
|
* @experimental This API is unstable and may change without notice.
|
|
23
24
|
*/
|
|
24
|
-
const SOURCE_NAME_PATTERN = /^[a-z0-9][a-z0-9.-]*$/;
|
|
25
|
+
const SOURCE_NAME_PATTERN = /^(?!workspace$)[a-z0-9][a-z0-9.-]*$/;
|
|
25
26
|
const SourceNameSchema = Schema.String.check(Schema.isPattern(SOURCE_NAME_PATTERN, {
|
|
26
|
-
message:
|
|
27
|
+
message: 'source name must start with a letter or digit, contain only lowercase alphanumeric characters, hyphens, and dots, and must not be reserved name "workspace"',
|
|
27
28
|
})).annotate({
|
|
28
29
|
identifier: "SourceName",
|
|
29
30
|
title: "Source Name",
|
|
30
|
-
description:
|
|
31
|
+
description: 'A source host alias: lowercase letters, numbers, hyphens, and dots. The name "workspace" is reserved.',
|
|
31
32
|
examples: ["github", "my-registry.dev"],
|
|
32
33
|
});
|
|
33
34
|
const sourceNameFieldSchema = SourceNameSchema.pipe(Schema.annotateKey({ messageMissingKey: "source name is required" }), Schema.annotate({
|
|
@@ -129,10 +130,6 @@ export const SourceHostConfigSchema = Schema.Union([
|
|
|
129
130
|
const ExtensionMapKeySchema = Schema.String.check(Schema.isPattern(EXTENSION_NAME_PATTERN, {
|
|
130
131
|
message: "Names must be max 64 chars, lowercase letters/numbers/hyphens, not starting or ending with hyphen.",
|
|
131
132
|
}));
|
|
132
|
-
const authoredFieldSchema = Schema.optionalKey(Schema.Boolean.annotate({
|
|
133
|
-
description: "Set to true to mark this entry as authored locally in this workspace — for extensions you edit here. AXM treats authored entries as locally owned: it preserves their files on uninstall, keeps the local source instead of repointing to the registry on update, and re-resolves them from the local managed copy on enable. Omit otherwise — false is the default and should not be written explicitly.",
|
|
134
|
-
default: false,
|
|
135
|
-
}));
|
|
136
133
|
const enabledFieldSchema = Schema.optionalKey(Schema.Boolean.annotate({
|
|
137
134
|
description: "Set to false to disable this entry. Omit otherwise — true is the default and should not be written explicitly.",
|
|
138
135
|
default: true,
|
|
@@ -145,6 +142,26 @@ const entrySourceFieldSchema = (label, fqnType) => Schema.NonEmptyString.pipe(Sc
|
|
|
145
142
|
"./extensions/code-review",
|
|
146
143
|
],
|
|
147
144
|
}));
|
|
145
|
+
const workspaceEntriesMatch = (pluralType) => Schema.makeFilter((entries) => {
|
|
146
|
+
for (const [entryName, entry] of Object.entries(entries)) {
|
|
147
|
+
if (!isWorkspaceSourceLocator(entry.source))
|
|
148
|
+
continue;
|
|
149
|
+
const fqn = entry.source.slice("workspace:".length);
|
|
150
|
+
const match = FQN_PATTERN.exec(fqn);
|
|
151
|
+
if (match === null) {
|
|
152
|
+
return `Workspace source "${entry.source}" must be workspace:@owner/<plural-type>/<name> without a version`;
|
|
153
|
+
}
|
|
154
|
+
const sourceType = match[2];
|
|
155
|
+
const sourceName = match[3];
|
|
156
|
+
if (sourceType !== pluralType) {
|
|
157
|
+
return `Workspace source "${entry.source}" has type "${sourceType ?? ""}", but this settings section requires "${pluralType}"`;
|
|
158
|
+
}
|
|
159
|
+
if (sourceName !== entryName) {
|
|
160
|
+
return `Workspace source "${entry.source}" has name "${sourceName ?? ""}", but the settings key is "${entryName}"`;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return undefined;
|
|
164
|
+
});
|
|
148
165
|
const McpServerEnvSchema = Schema.Union([
|
|
149
166
|
Schema.Record(Schema.String, Schema.String),
|
|
150
167
|
Schema.Array(Schema.String),
|
|
@@ -228,25 +245,21 @@ const compactOrVerboseEntry = (objectSchema, canonicalSchema, transformation, an
|
|
|
228
245
|
const EnabledEntryCanonicalSchema = Schema.Struct({
|
|
229
246
|
source: Schema.String,
|
|
230
247
|
enabled: Schema.Boolean,
|
|
231
|
-
authored: Schema.Boolean,
|
|
232
248
|
});
|
|
233
249
|
const decodeEnabledEntry = (entry) => typeof entry === "string"
|
|
234
|
-
? { source: entry, enabled: true
|
|
250
|
+
? { source: entry, enabled: true }
|
|
235
251
|
: {
|
|
236
252
|
source: entry.source,
|
|
237
253
|
enabled: entry.enabled ?? true,
|
|
238
|
-
authored: entry.authored ?? false,
|
|
239
254
|
};
|
|
240
255
|
const encodeEnabledEntry = (entry) => {
|
|
241
|
-
if (entry.enabled
|
|
256
|
+
if (entry.enabled)
|
|
242
257
|
return entry.source;
|
|
243
258
|
const obj = {
|
|
244
259
|
source: entry.source,
|
|
245
260
|
};
|
|
246
261
|
if (!entry.enabled)
|
|
247
262
|
obj.enabled = false;
|
|
248
|
-
if (entry.authored)
|
|
249
|
-
obj.authored = true;
|
|
250
263
|
return obj;
|
|
251
264
|
};
|
|
252
265
|
const enabledEntryTransformation = {
|
|
@@ -262,17 +275,15 @@ const compactEnabledEntry = (objectSchema, annotations) => compactOrVerboseEntry
|
|
|
262
275
|
export const SkillEntryObjectSchema = Schema.Struct({
|
|
263
276
|
source: entrySourceFieldSchema("skill", "skills"),
|
|
264
277
|
enabled: enabledFieldSchema,
|
|
265
|
-
authored: authoredFieldSchema,
|
|
266
278
|
}).annotate({
|
|
267
279
|
title: "Skill Entry Object",
|
|
268
|
-
description: "A skill entry with source and optional enabled
|
|
280
|
+
description: "A skill entry with source and an optional enabled flag.",
|
|
269
281
|
});
|
|
270
282
|
/**
|
|
271
|
-
* Union of skill entry forms: plain source string or object with source + enabled
|
|
283
|
+
* Union of skill entry forms: plain source string or object with source + enabled.
|
|
272
284
|
*
|
|
273
|
-
* Decodes to canonical `{ source, enabled
|
|
274
|
-
*
|
|
275
|
-
* authored, object otherwise).
|
|
285
|
+
* Decodes to canonical `{ source, enabled }` form; encodes back to the most
|
|
286
|
+
* compact JSON representation.
|
|
276
287
|
*
|
|
277
288
|
* @experimental This API is unstable and may change without notice.
|
|
278
289
|
*/
|
|
@@ -299,6 +310,7 @@ export const SkillEntrySchema = compactEnabledEntry(SkillEntryObjectSchema, {
|
|
|
299
310
|
*/
|
|
300
311
|
export const SkillsMapSchema = Schema.Record(Schema.String, SkillEntrySchema)
|
|
301
312
|
.check(Schema.isPropertyNames(ExtensionMapKeySchema))
|
|
313
|
+
.check(workspaceEntriesMatch("skills"))
|
|
302
314
|
.annotate({
|
|
303
315
|
identifier: "SkillsMap",
|
|
304
316
|
title: "Skills Map",
|
|
@@ -312,17 +324,15 @@ export const SkillsMapSchema = Schema.Record(Schema.String, SkillEntrySchema)
|
|
|
312
324
|
export const CommandEntryObjectSchema = Schema.Struct({
|
|
313
325
|
source: entrySourceFieldSchema("command", "commands"),
|
|
314
326
|
enabled: enabledFieldSchema,
|
|
315
|
-
authored: authoredFieldSchema,
|
|
316
327
|
}).annotate({
|
|
317
328
|
title: "Command Entry Object",
|
|
318
|
-
description: "A command entry with source and optional enabled
|
|
329
|
+
description: "A command entry with source and an optional enabled flag.",
|
|
319
330
|
});
|
|
320
331
|
/**
|
|
321
|
-
* Union of command entry forms: plain source string or object with source + enabled
|
|
332
|
+
* Union of command entry forms: plain source string or object with source + enabled.
|
|
322
333
|
*
|
|
323
|
-
* Decodes to canonical `{ source, enabled
|
|
324
|
-
*
|
|
325
|
-
* authored, object otherwise).
|
|
334
|
+
* Decodes to canonical `{ source, enabled }` form; encodes back to the most
|
|
335
|
+
* compact JSON representation.
|
|
326
336
|
*
|
|
327
337
|
* @experimental This API is unstable and may change without notice.
|
|
328
338
|
*/
|
|
@@ -349,6 +359,7 @@ export const CommandEntrySchema = compactEnabledEntry(CommandEntryObjectSchema,
|
|
|
349
359
|
*/
|
|
350
360
|
export const CommandsMapSchema = Schema.Record(Schema.String, CommandEntrySchema)
|
|
351
361
|
.check(Schema.isPropertyNames(ExtensionMapKeySchema))
|
|
362
|
+
.check(workspaceEntriesMatch("commands"))
|
|
352
363
|
.annotate({
|
|
353
364
|
identifier: "CommandsMap",
|
|
354
365
|
title: "Commands Map",
|
|
@@ -365,7 +376,6 @@ export const CommandsMapSchema = Schema.Record(Schema.String, CommandEntrySchema
|
|
|
365
376
|
export const FilesEntryObjectSchema = Schema.Struct({
|
|
366
377
|
source: entrySourceFieldSchema("Context Files package", "files"),
|
|
367
378
|
enabled: enabledFieldSchema,
|
|
368
|
-
authored: authoredFieldSchema,
|
|
369
379
|
inputs: Schema.optionalKey(FileInputValuesMapSchema),
|
|
370
380
|
}).annotate({
|
|
371
381
|
title: "Files Entry Object",
|
|
@@ -374,7 +384,7 @@ export const FilesEntryObjectSchema = Schema.Struct({
|
|
|
374
384
|
/**
|
|
375
385
|
* Union of Context Files package entry forms: plain source string or object with source, flags, and inputs.
|
|
376
386
|
*
|
|
377
|
-
* Decodes to canonical `{ source, enabled,
|
|
387
|
+
* Decodes to canonical `{ source, enabled, inputs }` form; encodes
|
|
378
388
|
* back to a plain source string when all metadata is default and no inputs are
|
|
379
389
|
* set.
|
|
380
390
|
*
|
|
@@ -383,26 +393,22 @@ export const FilesEntryObjectSchema = Schema.Struct({
|
|
|
383
393
|
export const FilesEntrySchema = compactOrVerboseEntry(FilesEntryObjectSchema, Schema.Struct({
|
|
384
394
|
source: Schema.String,
|
|
385
395
|
enabled: Schema.Boolean,
|
|
386
|
-
authored: Schema.Boolean,
|
|
387
396
|
inputs: FileInputValuesMapSchema,
|
|
388
397
|
}), {
|
|
389
398
|
decode: (entry) => typeof entry === "string"
|
|
390
|
-
? { source: entry, enabled: true,
|
|
399
|
+
? { source: entry, enabled: true, inputs: {} }
|
|
391
400
|
: {
|
|
392
401
|
source: entry.source,
|
|
393
402
|
enabled: entry.enabled ?? true,
|
|
394
|
-
authored: entry.authored ?? false,
|
|
395
403
|
inputs: entry.inputs ?? {},
|
|
396
404
|
},
|
|
397
405
|
encode: (entry) => {
|
|
398
406
|
const hasInputs = Object.keys(entry.inputs).length > 0;
|
|
399
|
-
if (entry.enabled && !
|
|
407
|
+
if (entry.enabled && !hasInputs)
|
|
400
408
|
return entry.source;
|
|
401
409
|
const obj = { source: entry.source };
|
|
402
410
|
if (!entry.enabled)
|
|
403
411
|
obj.enabled = false;
|
|
404
|
-
if (entry.authored)
|
|
405
|
-
obj.authored = true;
|
|
406
412
|
if (hasInputs)
|
|
407
413
|
obj.inputs = entry.inputs;
|
|
408
414
|
return obj;
|
|
@@ -426,6 +432,7 @@ export const FilesEntrySchema = compactOrVerboseEntry(FilesEntryObjectSchema, Sc
|
|
|
426
432
|
*/
|
|
427
433
|
export const FilesMapSchema = Schema.Record(Schema.String, FilesEntrySchema)
|
|
428
434
|
.check(Schema.isPropertyNames(ExtensionMapKeySchema))
|
|
435
|
+
.check(workspaceEntriesMatch("files"))
|
|
429
436
|
.annotate({
|
|
430
437
|
identifier: "FilesMap",
|
|
431
438
|
title: "Files Map",
|
|
@@ -442,13 +449,12 @@ export const FilesMapSchema = Schema.Record(Schema.String, FilesEntrySchema)
|
|
|
442
449
|
export const RuleEntryObjectSchema = Schema.Struct({
|
|
443
450
|
source: entrySourceFieldSchema("rule", "rules"),
|
|
444
451
|
enabled: enabledFieldSchema,
|
|
445
|
-
authored: authoredFieldSchema,
|
|
446
452
|
}).annotate({
|
|
447
453
|
title: "Rule Entry Object",
|
|
448
|
-
description: "A rule entry with source and optional enabled
|
|
454
|
+
description: "A rule entry with source and an optional enabled flag.",
|
|
449
455
|
});
|
|
450
456
|
/**
|
|
451
|
-
* Union of rule entry forms: plain source string or object with source + enabled
|
|
457
|
+
* Union of rule entry forms: plain source string or object with source + enabled.
|
|
452
458
|
*
|
|
453
459
|
* @experimental This API is unstable and may change without notice.
|
|
454
460
|
*/
|
|
@@ -468,6 +474,7 @@ export const RuleEntrySchema = compactEnabledEntry(RuleEntryObjectSchema, {
|
|
|
468
474
|
*/
|
|
469
475
|
export const RulesMapSchema = Schema.Record(Schema.String, RuleEntrySchema)
|
|
470
476
|
.check(Schema.isPropertyNames(ExtensionMapKeySchema))
|
|
477
|
+
.check(workspaceEntriesMatch("rules"))
|
|
471
478
|
.annotate({
|
|
472
479
|
identifier: "RulesMap",
|
|
473
480
|
title: "Rules Map",
|
|
@@ -484,13 +491,12 @@ export const RulesMapSchema = Schema.Record(Schema.String, RuleEntrySchema)
|
|
|
484
491
|
export const HookEntryObjectSchema = Schema.Struct({
|
|
485
492
|
source: entrySourceFieldSchema("hook", "hooks"),
|
|
486
493
|
enabled: enabledFieldSchema,
|
|
487
|
-
authored: authoredFieldSchema,
|
|
488
494
|
}).annotate({
|
|
489
495
|
title: "Hook Entry Object",
|
|
490
|
-
description: "A hook entry with source and optional enabled
|
|
496
|
+
description: "A hook entry with source and an optional enabled flag.",
|
|
491
497
|
});
|
|
492
498
|
/**
|
|
493
|
-
* Union of hook entry forms: plain source string or object with source + enabled
|
|
499
|
+
* Union of hook entry forms: plain source string or object with source + enabled.
|
|
494
500
|
*
|
|
495
501
|
* @experimental This API is unstable and may change without notice.
|
|
496
502
|
*/
|
|
@@ -510,6 +516,7 @@ export const HookEntrySchema = compactEnabledEntry(HookEntryObjectSchema, {
|
|
|
510
516
|
*/
|
|
511
517
|
export const HooksMapSchema = Schema.Record(Schema.String, HookEntrySchema)
|
|
512
518
|
.check(Schema.isPropertyNames(ExtensionMapKeySchema))
|
|
519
|
+
.check(workspaceEntriesMatch("hooks"))
|
|
513
520
|
.annotate({
|
|
514
521
|
identifier: "HooksMap",
|
|
515
522
|
title: "Hooks Map",
|
|
@@ -526,11 +533,10 @@ export const HooksMapSchema = Schema.Record(Schema.String, HookEntrySchema)
|
|
|
526
533
|
export const McpServerEntryObjectSchema = Schema.Struct({
|
|
527
534
|
source: entrySourceFieldSchema("MCP server", "mcps"),
|
|
528
535
|
enabled: enabledFieldSchema,
|
|
529
|
-
authored: authoredFieldSchema,
|
|
530
536
|
env: Schema.optionalKey(McpServerEnvSchema),
|
|
531
537
|
}).annotate({
|
|
532
538
|
title: "MCP Server Entry Object",
|
|
533
|
-
description: "An MCP server entry with source and optional enabled/
|
|
539
|
+
description: "An MCP server entry with source and optional enabled/env fields.",
|
|
534
540
|
});
|
|
535
541
|
const McpServerVerboseEntryObjectSchema = Schema.Struct({
|
|
536
542
|
source: Schema.optionalKey(entrySourceFieldSchema("MCP server", "mcps")),
|
|
@@ -550,14 +556,13 @@ const McpServerVerboseEntryObjectSchema = Schema.Struct({
|
|
|
550
556
|
description: "HTTP headers for a remote MCP server. Prefer ${VAR} references for secrets.",
|
|
551
557
|
})),
|
|
552
558
|
enabled: enabledFieldSchema,
|
|
553
|
-
authored: authoredFieldSchema,
|
|
554
559
|
env: Schema.optionalKey(McpServerEnvSchema),
|
|
555
560
|
}).pipe(Schema.check(Schema.makeFilter((entry) => validateMcpTransportExclusivity(entry))));
|
|
556
561
|
/**
|
|
557
|
-
* Union of MCP server entry forms: plain source string or object with source + enabled +
|
|
562
|
+
* Union of MCP server entry forms: plain source string or object with source + enabled + env.
|
|
558
563
|
*
|
|
559
|
-
* Decodes to canonical `{ source, enabled,
|
|
560
|
-
* compact JSON representation
|
|
564
|
+
* Decodes to canonical `{ source, enabled, env }` form; encodes back to the most
|
|
565
|
+
* compact JSON representation.
|
|
561
566
|
*
|
|
562
567
|
* @experimental This API is unstable and may change without notice.
|
|
563
568
|
*/
|
|
@@ -568,11 +573,10 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
568
573
|
url: Schema.optional(Schema.String),
|
|
569
574
|
headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
570
575
|
enabled: Schema.Boolean,
|
|
571
|
-
authored: Schema.Boolean,
|
|
572
576
|
env: Schema.Record(Schema.String, Schema.String),
|
|
573
577
|
}), {
|
|
574
578
|
decode: (entry) => typeof entry === "string"
|
|
575
|
-
? { source: entry, enabled: true,
|
|
579
|
+
? { source: entry, enabled: true, env: {} }
|
|
576
580
|
: {
|
|
577
581
|
source: "source" in entry && entry.source !== undefined ? entry.source : "inline",
|
|
578
582
|
...("command" in entry && entry.command !== undefined
|
|
@@ -584,14 +588,10 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
584
588
|
? { headers: entry.headers }
|
|
585
589
|
: {}),
|
|
586
590
|
enabled: entry.enabled ?? true,
|
|
587
|
-
authored: entry.authored ?? false,
|
|
588
591
|
env: decodeMcpEnv(entry.env),
|
|
589
592
|
},
|
|
590
593
|
encode: (entry) => {
|
|
591
|
-
if (entry.source !== "inline" &&
|
|
592
|
-
entry.enabled &&
|
|
593
|
-
!entry.authored &&
|
|
594
|
-
Object.keys(entry.env).length === 0) {
|
|
594
|
+
if (entry.source !== "inline" && entry.enabled && Object.keys(entry.env).length === 0) {
|
|
595
595
|
return entry.source;
|
|
596
596
|
}
|
|
597
597
|
const obj = {};
|
|
@@ -608,15 +608,12 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
608
608
|
}
|
|
609
609
|
if (!entry.enabled)
|
|
610
610
|
obj.enabled = false;
|
|
611
|
-
if (entry.authored)
|
|
612
|
-
obj.authored = true;
|
|
613
611
|
if (Object.keys(entry.env).length > 0)
|
|
614
612
|
obj.env = entry.env;
|
|
615
613
|
if (entry.source !== "inline") {
|
|
616
614
|
return {
|
|
617
615
|
source: entry.source,
|
|
618
616
|
...(obj.enabled === undefined ? {} : { enabled: obj.enabled }),
|
|
619
|
-
...(obj.authored === undefined ? {} : { authored: obj.authored }),
|
|
620
617
|
...(obj.env === undefined ? {} : { env: obj.env }),
|
|
621
618
|
};
|
|
622
619
|
}
|
|
@@ -625,7 +622,6 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
625
622
|
command: entry.command,
|
|
626
623
|
...(obj.args === undefined ? {} : { args: obj.args }),
|
|
627
624
|
...(obj.enabled === undefined ? {} : { enabled: obj.enabled }),
|
|
628
|
-
...(obj.authored === undefined ? {} : { authored: obj.authored }),
|
|
629
625
|
...(obj.env === undefined ? {} : { env: obj.env }),
|
|
630
626
|
};
|
|
631
627
|
}
|
|
@@ -633,7 +629,6 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
633
629
|
url: entry.url ?? "",
|
|
634
630
|
...(obj.headers === undefined ? {} : { headers: obj.headers }),
|
|
635
631
|
...(obj.enabled === undefined ? {} : { enabled: obj.enabled }),
|
|
636
|
-
...(obj.authored === undefined ? {} : { authored: obj.authored }),
|
|
637
632
|
...(obj.env === undefined ? {} : { env: obj.env }),
|
|
638
633
|
};
|
|
639
634
|
},
|
|
@@ -657,6 +652,7 @@ export const McpServerEntrySchema = compactOrVerboseEntry(McpServerVerboseEntryO
|
|
|
657
652
|
*/
|
|
658
653
|
export const McpServersMapSchema = Schema.Record(Schema.String, McpServerEntrySchema)
|
|
659
654
|
.check(Schema.isPropertyNames(ExtensionMapKeySchema))
|
|
655
|
+
.check(workspaceEntriesMatch("mcps"))
|
|
660
656
|
.annotate({
|
|
661
657
|
identifier: "McpServersMap",
|
|
662
658
|
title: "MCP Servers Map",
|
|
@@ -673,17 +669,15 @@ export const McpServersMapSchema = Schema.Record(Schema.String, McpServerEntrySc
|
|
|
673
669
|
export const SubagentEntryObjectSchema = Schema.Struct({
|
|
674
670
|
source: entrySourceFieldSchema("subagent", "subagents"),
|
|
675
671
|
enabled: enabledFieldSchema,
|
|
676
|
-
authored: authoredFieldSchema,
|
|
677
672
|
}).annotate({
|
|
678
673
|
title: "Subagent Entry Object",
|
|
679
|
-
description: "A subagent entry with source and optional enabled
|
|
674
|
+
description: "A subagent entry with source and an optional enabled flag.",
|
|
680
675
|
});
|
|
681
676
|
/**
|
|
682
|
-
* Union of subagent entry forms: plain source string or object with source + enabled
|
|
677
|
+
* Union of subagent entry forms: plain source string or object with source + enabled.
|
|
683
678
|
*
|
|
684
|
-
* Decodes to canonical `{ source, enabled
|
|
685
|
-
*
|
|
686
|
-
* authored, object otherwise).
|
|
679
|
+
* Decodes to canonical `{ source, enabled }` form; encodes back to the most
|
|
680
|
+
* compact JSON representation.
|
|
687
681
|
*
|
|
688
682
|
* @experimental This API is unstable and may change without notice.
|
|
689
683
|
*/
|
|
@@ -710,6 +704,7 @@ export const SubagentEntrySchema = compactEnabledEntry(SubagentEntryObjectSchema
|
|
|
710
704
|
*/
|
|
711
705
|
export const SubagentsMapSchema = Schema.Record(Schema.String, SubagentEntrySchema)
|
|
712
706
|
.check(Schema.isPropertyNames(ExtensionMapKeySchema))
|
|
707
|
+
.check(workspaceEntriesMatch("subagents"))
|
|
713
708
|
.annotate({
|
|
714
709
|
identifier: "SubagentsMap",
|
|
715
710
|
title: "Subagents Map",
|
|
@@ -725,35 +720,27 @@ export const SubagentsMapSchema = Schema.Record(Schema.String, SubagentEntrySche
|
|
|
725
720
|
*/
|
|
726
721
|
export const PackEntryObjectSchema = Schema.Struct({
|
|
727
722
|
source: entrySourceFieldSchema("pack", "packs"),
|
|
728
|
-
authored: authoredFieldSchema,
|
|
729
723
|
}).annotate({
|
|
730
724
|
title: "Pack Entry Object",
|
|
731
|
-
description: "A pack entry with source
|
|
725
|
+
description: "A pack entry with a source.",
|
|
732
726
|
});
|
|
733
727
|
/**
|
|
734
|
-
* Union of pack entry forms: plain source string or object with source
|
|
728
|
+
* Union of pack entry forms: plain source string or object with source.
|
|
735
729
|
*
|
|
736
|
-
* Decodes to canonical `{ source
|
|
737
|
-
* compact JSON representation (plain string when not authored, object otherwise).
|
|
730
|
+
* Decodes to canonical `{ source }` form and encodes back to a source string.
|
|
738
731
|
*
|
|
739
732
|
* @experimental This API is unstable and may change without notice.
|
|
740
733
|
*/
|
|
741
734
|
export const PackEntrySchema = compactOrVerboseEntry(PackEntryObjectSchema, Schema.Struct({
|
|
742
735
|
source: Schema.String,
|
|
743
|
-
authored: Schema.Boolean,
|
|
744
736
|
}), {
|
|
745
|
-
decode: (entry) => typeof entry === "string"
|
|
746
|
-
|
|
747
|
-
: { source: entry.source, authored: entry.authored ?? false },
|
|
748
|
-
encode: (entry) => entry.authored ? { source: entry.source, authored: true } : entry.source,
|
|
737
|
+
decode: (entry) => typeof entry === "string" ? { source: entry } : { source: entry.source },
|
|
738
|
+
encode: (entry) => entry.source,
|
|
749
739
|
}, {
|
|
750
740
|
identifier: "PackEntry",
|
|
751
741
|
title: "Pack Entry",
|
|
752
|
-
description: "A pack entry: a source string, or an object with source
|
|
753
|
-
examples: [
|
|
754
|
-
"@acme/packs/typescript@^1.0.0",
|
|
755
|
-
{ source: "github:acme/agent-extensions", authored: true },
|
|
756
|
-
],
|
|
742
|
+
description: "A pack entry: a source string, or an object with a source.",
|
|
743
|
+
examples: ["@acme/packs/typescript@^1.0.0"],
|
|
757
744
|
});
|
|
758
745
|
/**
|
|
759
746
|
* Packs map - maps pack names to pack entries.
|
|
@@ -769,6 +756,7 @@ export const PackEntrySchema = compactOrVerboseEntry(PackEntryObjectSchema, Sche
|
|
|
769
756
|
*/
|
|
770
757
|
export const PacksMapSchema = Schema.Record(Schema.String, PackEntrySchema)
|
|
771
758
|
.check(Schema.isPropertyNames(ExtensionMapKeySchema))
|
|
759
|
+
.check(workspaceEntriesMatch("packs"))
|
|
772
760
|
.annotate({
|
|
773
761
|
identifier: "PacksMap",
|
|
774
762
|
title: "Packs Map",
|
|
@@ -788,38 +776,33 @@ export const LibraryEntryObjectSchema = Schema.Struct({
|
|
|
788
776
|
examples: ["@acme/libraries/frontend"],
|
|
789
777
|
})),
|
|
790
778
|
enabled: enabledFieldSchema,
|
|
791
|
-
authored: authoredFieldSchema,
|
|
792
779
|
}).annotate({
|
|
793
780
|
title: "Library Entry Object",
|
|
794
|
-
description: "A Library subscription entry with source and optional enabled
|
|
781
|
+
description: "A Library subscription entry with source and an optional enabled flag.",
|
|
795
782
|
});
|
|
796
783
|
/**
|
|
797
|
-
* Union of Library entry forms: plain Library ref or object with source + enabled
|
|
784
|
+
* Union of Library entry forms: plain Library ref or object with source + enabled.
|
|
798
785
|
*
|
|
799
786
|
* @experimental This API is unstable and may change without notice.
|
|
800
787
|
*/
|
|
801
788
|
export const LibraryEntrySchema = compactOrVerboseEntry(LibraryEntryObjectSchema, Schema.Struct({
|
|
802
789
|
source: LibraryRefSchema,
|
|
803
790
|
enabled: Schema.Boolean,
|
|
804
|
-
authored: Schema.Boolean,
|
|
805
791
|
}), {
|
|
806
792
|
decode: (entry) => typeof entry === "string"
|
|
807
|
-
? { source: entry, enabled: true
|
|
793
|
+
? { source: entry, enabled: true }
|
|
808
794
|
: {
|
|
809
795
|
source: entry.source,
|
|
810
796
|
enabled: entry.enabled ?? true,
|
|
811
|
-
authored: entry.authored ?? false,
|
|
812
797
|
},
|
|
813
798
|
encode: (entry) => {
|
|
814
|
-
if (entry.enabled
|
|
799
|
+
if (entry.enabled)
|
|
815
800
|
return entry.source;
|
|
816
801
|
const obj = {
|
|
817
802
|
source: entry.source,
|
|
818
803
|
};
|
|
819
804
|
if (!entry.enabled)
|
|
820
805
|
obj.enabled = false;
|
|
821
|
-
if (entry.authored)
|
|
822
|
-
obj.authored = true;
|
|
823
806
|
return obj;
|
|
824
807
|
},
|
|
825
808
|
}, {
|
|
@@ -1058,43 +1041,43 @@ export const SettingsSchema = Schema.Struct({
|
|
|
1058
1041
|
description: "Scalar workspace variables available to Context Files templates.",
|
|
1059
1042
|
})),
|
|
1060
1043
|
skills: Schema.optionalKey(Schema.Union([SkillsMapSchema]).annotate({
|
|
1061
|
-
description: "Your installed skills, keyed by workspace skill name. Prefer plain source strings; use the object form only to set `enabled: false
|
|
1044
|
+
description: "Your installed skills, keyed by workspace skill name. Prefer plain source strings; use the object form only to set `enabled: false`.",
|
|
1062
1045
|
})),
|
|
1063
1046
|
skillsConfig: Schema.optionalKey(Schema.Union([SkillsConfigSchema]).annotate({
|
|
1064
1047
|
description: "Feature-level options for skill management.",
|
|
1065
1048
|
})),
|
|
1066
1049
|
commands: Schema.optionalKey(Schema.Union([CommandsMapSchema]).annotate({
|
|
1067
|
-
description: "Your installed commands, keyed by workspace command name. Prefer plain source strings; use the object form only to set `enabled: false
|
|
1050
|
+
description: "Your installed commands, keyed by workspace command name. Prefer plain source strings; use the object form only to set `enabled: false`.",
|
|
1068
1051
|
})),
|
|
1069
1052
|
commandsConfig: Schema.optionalKey(Schema.Union([CommandsConfigSchema]).annotate({
|
|
1070
1053
|
description: "Feature-level options for command management.",
|
|
1071
1054
|
})),
|
|
1072
1055
|
files: Schema.optionalKey(Schema.Union([FilesMapSchema]).annotate({
|
|
1073
|
-
description: "Your installed Context Files packages, keyed by workspace package name. Prefer plain source strings; use the object form only to set `enabled: false
|
|
1056
|
+
description: "Your installed Context Files packages, keyed by workspace package name. Prefer plain source strings; use the object form only to set `enabled: false` or scalar `inputs`.",
|
|
1074
1057
|
})),
|
|
1075
1058
|
rules: Schema.optionalKey(Schema.Union([RulesMapSchema]).annotate({
|
|
1076
|
-
description: "Your installed rules, keyed by workspace rule name. Prefer plain source strings; use the object form only to set `enabled: false
|
|
1059
|
+
description: "Your installed rules, keyed by workspace rule name. Prefer plain source strings; use the object form only to set `enabled: false`.",
|
|
1077
1060
|
})),
|
|
1078
1061
|
hooks: Schema.optionalKey(Schema.Union([HooksMapSchema]).annotate({
|
|
1079
|
-
description: "Your installed hooks, keyed by workspace hook name. Prefer plain source strings; use the object form only to set `enabled: false
|
|
1062
|
+
description: "Your installed hooks, keyed by workspace hook name. Prefer plain source strings; use the object form only to set `enabled: false`.",
|
|
1080
1063
|
})),
|
|
1081
1064
|
subagents: Schema.optionalKey(Schema.Union([SubagentsMapSchema]).annotate({
|
|
1082
|
-
description: "Your installed subagents, keyed by workspace subagent name. Prefer plain source strings; use the object form only to set `enabled: false
|
|
1065
|
+
description: "Your installed subagents, keyed by workspace subagent name. Prefer plain source strings; use the object form only to set `enabled: false`.",
|
|
1083
1066
|
})),
|
|
1084
1067
|
subagentsConfig: Schema.optionalKey(Schema.Union([SubagentsConfigSchema]).annotate({
|
|
1085
1068
|
description: "Feature-level options for subagent management.",
|
|
1086
1069
|
})),
|
|
1087
1070
|
packs: Schema.optionalKey(Schema.Union([PacksMapSchema]).annotate({
|
|
1088
|
-
description: "Your installed packs, keyed by workspace pack name.
|
|
1071
|
+
description: "Your installed packs, keyed by workspace pack name. Pack entries do not support `enabled` yet.",
|
|
1089
1072
|
})),
|
|
1090
1073
|
packsConfig: Schema.optionalKey(Schema.Union([PacksConfigSchema]).annotate({
|
|
1091
1074
|
description: "Feature-level options for pack management.",
|
|
1092
1075
|
})),
|
|
1093
1076
|
libraries: Schema.optionalKey(Schema.Union([LibrariesMapSchema]).annotate({
|
|
1094
|
-
description: "Your Library subscriptions, keyed by workspace subscription name. Prefer plain Library refs; use the object form only to set `enabled: false
|
|
1077
|
+
description: "Your Library subscriptions, keyed by workspace subscription name. Prefer plain Library refs; use the object form only to set `enabled: false`. Libraries are always latest and do not accept version suffixes.",
|
|
1095
1078
|
})),
|
|
1096
1079
|
mcpServers: Schema.optionalKey(Schema.Union([McpServersMapSchema]).annotate({
|
|
1097
|
-
description: "Your installed MCP servers, keyed by workspace MCP server name. Prefer plain source strings; use the object form only to set `enabled: false
|
|
1080
|
+
description: "Your installed MCP servers, keyed by workspace MCP server name. Prefer plain source strings; use the object form only to set `enabled: false` or persisted `env` values.",
|
|
1098
1081
|
})),
|
|
1099
1082
|
mcpServersConfig: Schema.optionalKey(Schema.Union([McpServersConfigSchema]).annotate({
|
|
1100
1083
|
description: "Feature-level options for MCP server management.",
|
|
@@ -1110,7 +1093,7 @@ export const SettingsSchema = Schema.Struct({
|
|
|
1110
1093
|
// them in the encoded (compact) form so agents see the preferred shape:
|
|
1111
1094
|
// plain source strings, with the object form reserved for non-default flags.
|
|
1112
1095
|
// Assertion needed: `.annotate()` types examples against the decoded
|
|
1113
|
-
// canonical shape (where `enabled
|
|
1096
|
+
// canonical shape (where `enabled` is a required boolean), but
|
|
1114
1097
|
// emitting that shape would teach agents to write the very defaults we want
|
|
1115
1098
|
// them to omit.
|
|
1116
1099
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|