@agentxm/extension-model 0.28.4-bootstrap.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/LICENSE +110 -0
- package/README.md +17 -0
- package/dist/src/unstable/agent-capabilities/catalog.d.ts +47000 -0
- package/dist/src/unstable/agent-capabilities/catalog.js +172 -0
- package/dist/src/unstable/agent-capabilities/data/agents/adal.d.ts +162 -0
- package/dist/src/unstable/agent-capabilities/data/agents/adal.js +134 -0
- package/dist/src/unstable/agent-capabilities/data/agents/aider-desk.d.ts +167 -0
- package/dist/src/unstable/agent-capabilities/data/agents/aider-desk.js +133 -0
- package/dist/src/unstable/agent-capabilities/data/agents/amp.d.ts +203 -0
- package/dist/src/unstable/agent-capabilities/data/agents/amp.js +187 -0
- package/dist/src/unstable/agent-capabilities/data/agents/antigravity-cli.d.ts +186 -0
- package/dist/src/unstable/agent-capabilities/data/agents/antigravity-cli.js +140 -0
- package/dist/src/unstable/agent-capabilities/data/agents/antigravity.d.ts +357 -0
- package/dist/src/unstable/agent-capabilities/data/agents/antigravity.js +294 -0
- package/dist/src/unstable/agent-capabilities/data/agents/augment.d.ts +383 -0
- package/dist/src/unstable/agent-capabilities/data/agents/augment.js +329 -0
- package/dist/src/unstable/agent-capabilities/data/agents/chatgpt.d.ts +159 -0
- package/dist/src/unstable/agent-capabilities/data/agents/chatgpt.js +117 -0
- package/dist/src/unstable/agent-capabilities/data/agents/claude-ai.d.ts +153 -0
- package/dist/src/unstable/agent-capabilities/data/agents/claude-ai.js +105 -0
- package/dist/src/unstable/agent-capabilities/data/agents/claude-code.d.ts +460 -0
- package/dist/src/unstable/agent-capabilities/data/agents/claude-code.js +406 -0
- package/dist/src/unstable/agent-capabilities/data/agents/cline.d.ts +225 -0
- package/dist/src/unstable/agent-capabilities/data/agents/cline.js +190 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codearts-agent.d.ts +246 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codearts-agent.js +206 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.d.ts +420 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.js +378 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codemaker.d.ts +143 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codemaker.js +112 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codestudio.d.ts +165 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codestudio.js +136 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codex.d.ts +458 -0
- package/dist/src/unstable/agent-capabilities/data/agents/codex.js +399 -0
- package/dist/src/unstable/agent-capabilities/data/agents/command-code.d.ts +247 -0
- package/dist/src/unstable/agent-capabilities/data/agents/command-code.js +222 -0
- package/dist/src/unstable/agent-capabilities/data/agents/continue.d.ts +322 -0
- package/dist/src/unstable/agent-capabilities/data/agents/continue.js +273 -0
- package/dist/src/unstable/agent-capabilities/data/agents/cortex.d.ts +306 -0
- package/dist/src/unstable/agent-capabilities/data/agents/cortex.js +241 -0
- package/dist/src/unstable/agent-capabilities/data/agents/cowork.d.ts +185 -0
- package/dist/src/unstable/agent-capabilities/data/agents/cowork.js +133 -0
- package/dist/src/unstable/agent-capabilities/data/agents/crush.d.ts +249 -0
- package/dist/src/unstable/agent-capabilities/data/agents/crush.js +218 -0
- package/dist/src/unstable/agent-capabilities/data/agents/cursor.d.ts +300 -0
- package/dist/src/unstable/agent-capabilities/data/agents/cursor.js +282 -0
- package/dist/src/unstable/agent-capabilities/data/agents/deepagents.d.ts +159 -0
- package/dist/src/unstable/agent-capabilities/data/agents/deepagents.js +137 -0
- package/dist/src/unstable/agent-capabilities/data/agents/devin.d.ts +410 -0
- package/dist/src/unstable/agent-capabilities/data/agents/devin.js +358 -0
- package/dist/src/unstable/agent-capabilities/data/agents/dexto.d.ts +166 -0
- package/dist/src/unstable/agent-capabilities/data/agents/dexto.js +141 -0
- package/dist/src/unstable/agent-capabilities/data/agents/droid.d.ts +318 -0
- package/dist/src/unstable/agent-capabilities/data/agents/droid.js +257 -0
- package/dist/src/unstable/agent-capabilities/data/agents/firebender.d.ts +313 -0
- package/dist/src/unstable/agent-capabilities/data/agents/firebender.js +244 -0
- package/dist/src/unstable/agent-capabilities/data/agents/forgecode.d.ts +193 -0
- package/dist/src/unstable/agent-capabilities/data/agents/forgecode.js +160 -0
- package/dist/src/unstable/agent-capabilities/data/agents/gemini-app.d.ts +153 -0
- package/dist/src/unstable/agent-capabilities/data/agents/gemini-app.js +105 -0
- package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.d.ts +424 -0
- package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.js +411 -0
- package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.d.ts +300 -0
- package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.js +307 -0
- package/dist/src/unstable/agent-capabilities/data/agents/goose.d.ts +162 -0
- package/dist/src/unstable/agent-capabilities/data/agents/goose.js +131 -0
- package/dist/src/unstable/agent-capabilities/data/agents/grok-cli.d.ts +186 -0
- package/dist/src/unstable/agent-capabilities/data/agents/grok-cli.js +164 -0
- package/dist/src/unstable/agent-capabilities/data/agents/hermes.d.ts +303 -0
- package/dist/src/unstable/agent-capabilities/data/agents/hermes.js +223 -0
- package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.d.ts +231 -0
- package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.js +200 -0
- package/dist/src/unstable/agent-capabilities/data/agents/iflow-cli.d.ts +182 -0
- package/dist/src/unstable/agent-capabilities/data/agents/iflow-cli.js +126 -0
- package/dist/src/unstable/agent-capabilities/data/agents/index.d.ts +67 -0
- package/dist/src/unstable/agent-capabilities/data/agents/index.js +67 -0
- package/dist/src/unstable/agent-capabilities/data/agents/junie.d.ts +219 -0
- package/dist/src/unstable/agent-capabilities/data/agents/junie.js +200 -0
- package/dist/src/unstable/agent-capabilities/data/agents/kilo.d.ts +282 -0
- package/dist/src/unstable/agent-capabilities/data/agents/kilo.js +260 -0
- package/dist/src/unstable/agent-capabilities/data/agents/kimi-cli.d.ts +350 -0
- package/dist/src/unstable/agent-capabilities/data/agents/kimi-cli.js +274 -0
- package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.d.ts +227 -0
- package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.js +197 -0
- package/dist/src/unstable/agent-capabilities/data/agents/kode.d.ts +166 -0
- package/dist/src/unstable/agent-capabilities/data/agents/kode.js +141 -0
- package/dist/src/unstable/agent-capabilities/data/agents/lingma.d.ts +185 -0
- package/dist/src/unstable/agent-capabilities/data/agents/lingma.js +149 -0
- package/dist/src/unstable/agent-capabilities/data/agents/mcpjam.d.ts +144 -0
- package/dist/src/unstable/agent-capabilities/data/agents/mcpjam.js +116 -0
- package/dist/src/unstable/agent-capabilities/data/agents/minimax-code.d.ts +138 -0
- package/dist/src/unstable/agent-capabilities/data/agents/minimax-code.js +93 -0
- package/dist/src/unstable/agent-capabilities/data/agents/mistral-vibe.d.ts +244 -0
- package/dist/src/unstable/agent-capabilities/data/agents/mistral-vibe.js +200 -0
- package/dist/src/unstable/agent-capabilities/data/agents/mux.d.ts +155 -0
- package/dist/src/unstable/agent-capabilities/data/agents/mux.js +127 -0
- package/dist/src/unstable/agent-capabilities/data/agents/neovate.d.ts +211 -0
- package/dist/src/unstable/agent-capabilities/data/agents/neovate.js +178 -0
- package/dist/src/unstable/agent-capabilities/data/agents/ona.d.ts +167 -0
- package/dist/src/unstable/agent-capabilities/data/agents/ona.js +110 -0
- package/dist/src/unstable/agent-capabilities/data/agents/openclaw.d.ts +139 -0
- package/dist/src/unstable/agent-capabilities/data/agents/openclaw.js +114 -0
- package/dist/src/unstable/agent-capabilities/data/agents/opencode.d.ts +220 -0
- package/dist/src/unstable/agent-capabilities/data/agents/opencode.js +192 -0
- package/dist/src/unstable/agent-capabilities/data/agents/openhands.d.ts +245 -0
- package/dist/src/unstable/agent-capabilities/data/agents/openhands.js +184 -0
- package/dist/src/unstable/agent-capabilities/data/agents/pi.d.ts +185 -0
- package/dist/src/unstable/agent-capabilities/data/agents/pi.js +169 -0
- package/dist/src/unstable/agent-capabilities/data/agents/pochi.d.ts +199 -0
- package/dist/src/unstable/agent-capabilities/data/agents/pochi.js +163 -0
- package/dist/src/unstable/agent-capabilities/data/agents/qoder-cn.d.ts +199 -0
- package/dist/src/unstable/agent-capabilities/data/agents/qoder-cn.js +141 -0
- package/dist/src/unstable/agent-capabilities/data/agents/qoder.d.ts +414 -0
- package/dist/src/unstable/agent-capabilities/data/agents/qoder.js +378 -0
- package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.d.ts +406 -0
- package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.js +345 -0
- package/dist/src/unstable/agent-capabilities/data/agents/replit.d.ts +144 -0
- package/dist/src/unstable/agent-capabilities/data/agents/replit.js +116 -0
- package/dist/src/unstable/agent-capabilities/data/agents/roo.d.ts +192 -0
- package/dist/src/unstable/agent-capabilities/data/agents/roo.js +180 -0
- package/dist/src/unstable/agent-capabilities/data/agents/rovodev.d.ts +189 -0
- package/dist/src/unstable/agent-capabilities/data/agents/rovodev.js +156 -0
- package/dist/src/unstable/agent-capabilities/data/agents/tabnine-cli.d.ts +280 -0
- package/dist/src/unstable/agent-capabilities/data/agents/tabnine-cli.js +223 -0
- package/dist/src/unstable/agent-capabilities/data/agents/trae-cn.d.ts +188 -0
- package/dist/src/unstable/agent-capabilities/data/agents/trae-cn.js +156 -0
- package/dist/src/unstable/agent-capabilities/data/agents/trae.d.ts +188 -0
- package/dist/src/unstable/agent-capabilities/data/agents/trae.js +156 -0
- package/dist/src/unstable/agent-capabilities/data/agents/warp.d.ts +169 -0
- package/dist/src/unstable/agent-capabilities/data/agents/warp.js +133 -0
- package/dist/src/unstable/agent-capabilities/data/agents/windsurf.d.ts +414 -0
- package/dist/src/unstable/agent-capabilities/data/agents/windsurf.js +326 -0
- package/dist/src/unstable/agent-capabilities/data/agents/zed.d.ts +168 -0
- package/dist/src/unstable/agent-capabilities/data/agents/zed.js +109 -0
- package/dist/src/unstable/agent-capabilities/data/agents/zencoder.d.ts +168 -0
- package/dist/src/unstable/agent-capabilities/data/agents/zencoder.js +137 -0
- package/dist/src/unstable/agent-capabilities/data/agents/zenflow.d.ts +153 -0
- package/dist/src/unstable/agent-capabilities/data/agents/zenflow.js +96 -0
- package/dist/src/unstable/agent-capabilities/derive.d.ts +129 -0
- package/dist/src/unstable/agent-capabilities/derive.js +389 -0
- package/dist/src/unstable/agent-capabilities/index.d.ts +15 -0
- package/dist/src/unstable/agent-capabilities/index.js +15 -0
- package/dist/src/unstable/agent-capabilities/lookup.d.ts +10 -0
- package/dist/src/unstable/agent-capabilities/lookup.js +9 -0
- package/dist/src/unstable/agent-capabilities/schema.d.ts +3788 -0
- package/dist/src/unstable/agent-capabilities/schema.js +1218 -0
- package/dist/src/unstable/agent-capabilities/verification.d.ts +25 -0
- package/dist/src/unstable/agent-capabilities/verification.js +40 -0
- package/dist/src/unstable/agents/registry.d.ts +33 -0
- package/dist/src/unstable/agents/registry.js +50 -0
- package/dist/src/unstable/agents/types.d.ts +126 -0
- package/dist/src/unstable/agents/types.js +17 -0
- package/dist/src/unstable/date-time.d.ts +17 -0
- package/dist/src/unstable/date-time.js +30 -0
- package/dist/src/unstable/discovery-walk.d.ts +8 -0
- package/dist/src/unstable/discovery-walk.js +15 -0
- package/dist/src/unstable/extension-types/index.d.ts +8 -0
- package/dist/src/unstable/extension-types/index.js +8 -0
- package/dist/src/unstable/extension-types/schema.d.ts +154 -0
- package/dist/src/unstable/extension-types/schema.js +102 -0
- package/dist/src/unstable/extension-types/standards.d.ts +29 -0
- package/dist/src/unstable/extension-types/standards.js +29 -0
- package/dist/src/unstable/extensions/common.d.ts +539 -0
- package/dist/src/unstable/extensions/common.js +605 -0
- package/dist/src/unstable/extensions/deprecation.d.ts +42 -0
- package/dist/src/unstable/extensions/deprecation.js +46 -0
- package/dist/src/unstable/extensions/fqn-pattern.d.ts +17 -0
- package/dist/src/unstable/extensions/fqn-pattern.js +63 -0
- package/dist/src/unstable/extensions/fqn.d.ts +51 -0
- package/dist/src/unstable/extensions/fqn.js +51 -0
- package/dist/src/unstable/extensions/handle.d.ts +16 -0
- package/dist/src/unstable/extensions/handle.js +30 -0
- package/dist/src/unstable/extensions/index.d.ts +13 -0
- package/dist/src/unstable/extensions/index.js +13 -0
- package/dist/src/unstable/extensions/installable-types.d.ts +12 -0
- package/dist/src/unstable/extensions/installable-types.js +21 -0
- package/dist/src/unstable/extensions/license.d.ts +16 -0
- package/dist/src/unstable/extensions/license.js +29 -0
- package/dist/src/unstable/extensions/manifest-metadata.d.ts +18 -0
- package/dist/src/unstable/extensions/manifest-metadata.js +61 -0
- package/dist/src/unstable/extensions/refs/extension-ref.d.ts +20 -0
- package/dist/src/unstable/extensions/refs/extension-ref.js +12 -0
- package/dist/src/unstable/extensions/refs/hook.d.ts +29 -0
- package/dist/src/unstable/extensions/refs/hook.js +8 -0
- package/dist/src/unstable/extensions/refs/knowledge.d.ts +15 -0
- package/dist/src/unstable/extensions/refs/knowledge.js +2 -0
- package/dist/src/unstable/extensions/refs/mcp-server.d.ts +19 -0
- package/dist/src/unstable/extensions/refs/mcp-server.js +8 -0
- package/dist/src/unstable/extensions/refs/pack.d.ts +17 -0
- package/dist/src/unstable/extensions/refs/pack.js +10 -0
- package/dist/src/unstable/extensions/refs/ref-base.d.ts +125 -0
- package/dist/src/unstable/extensions/refs/ref-base.js +12 -0
- package/dist/src/unstable/extensions/refs/rule.d.ts +27 -0
- package/dist/src/unstable/extensions/refs/rule.js +8 -0
- package/dist/src/unstable/extensions/refs/skill.d.ts +28 -0
- package/dist/src/unstable/extensions/refs/skill.js +11 -0
- package/dist/src/unstable/extensions/refs/subagent.d.ts +19 -0
- package/dist/src/unstable/extensions/refs/subagent.js +8 -0
- package/dist/src/unstable/extensions/registry-source.d.ts +37 -0
- package/dist/src/unstable/extensions/registry-source.js +158 -0
- package/dist/src/unstable/extensions/release-age.d.ts +36 -0
- package/dist/src/unstable/extensions/release-age.js +11 -0
- package/dist/src/unstable/extensions/universal-skills-dir.d.ts +58 -0
- package/dist/src/unstable/extensions/universal-skills-dir.js +68 -0
- package/dist/src/unstable/hooks/manifest-schema.d.ts +175 -0
- package/dist/src/unstable/hooks/manifest-schema.js +112 -0
- package/dist/src/unstable/knowledge/concept-ref.d.ts +34 -0
- package/dist/src/unstable/knowledge/concept-ref.js +114 -0
- package/dist/src/unstable/knowledge/index.d.ts +8 -0
- package/dist/src/unstable/knowledge/index.js +8 -0
- package/dist/src/unstable/knowledge/manifest-schema.d.ts +60 -0
- package/dist/src/unstable/knowledge/manifest-schema.js +34 -0
- package/dist/src/unstable/mcps/manifest-schema.d.ts +899 -0
- package/dist/src/unstable/mcps/manifest-schema.js +230 -0
- package/dist/src/unstable/package-urls/companion-package.d.ts +14 -0
- package/dist/src/unstable/package-urls/companion-package.js +44 -0
- package/dist/src/unstable/package-urls/index.d.ts +4 -0
- package/dist/src/unstable/package-urls/index.js +4 -0
- package/dist/src/unstable/package-urls/internal.d.ts +6 -0
- package/dist/src/unstable/package-urls/internal.js +17 -0
- package/dist/src/unstable/package-urls/package-identity-purl.d.ts +5 -0
- package/dist/src/unstable/package-urls/package-identity-purl.js +26 -0
- package/dist/src/unstable/package-urls/vers-range.d.ts +34 -0
- package/dist/src/unstable/package-urls/vers-range.js +163 -0
- package/dist/src/unstable/packaging/index.d.ts +8 -0
- package/dist/src/unstable/packaging/index.js +8 -0
- package/dist/src/unstable/packaging/package-type.d.ts +23 -0
- package/dist/src/unstable/packaging/package-type.js +31 -0
- package/dist/src/unstable/packaging/package-url.d.ts +50 -0
- package/dist/src/unstable/packaging/package-url.js +93 -0
- package/dist/src/unstable/packs/manifest-schema.d.ts +66 -0
- package/dist/src/unstable/packs/manifest-schema.js +34 -0
- package/dist/src/unstable/path-types.d.ts +22 -0
- package/dist/src/unstable/path-types.js +48 -0
- package/dist/src/unstable/rules/manifest-schema.d.ts +70 -0
- package/dist/src/unstable/rules/manifest-schema.js +43 -0
- package/dist/src/unstable/schema-issues.d.ts +13 -0
- package/dist/src/unstable/schema-issues.js +34 -0
- package/dist/src/unstable/skills/manifest-schema.d.ts +69 -0
- package/dist/src/unstable/skills/manifest-schema.js +31 -0
- package/dist/src/unstable/sources/forge-grammar.d.ts +22 -0
- package/dist/src/unstable/sources/forge-grammar.js +50 -0
- package/dist/src/unstable/sources/parser.d.ts +85 -0
- package/dist/src/unstable/sources/parser.js +122 -0
- package/dist/src/unstable/sources/printer.d.ts +14 -0
- package/dist/src/unstable/sources/printer.js +45 -0
- package/dist/src/unstable/sources/source-hash.d.ts +24 -0
- package/dist/src/unstable/sources/source-hash.js +22 -0
- package/dist/src/unstable/sources/source-host-provider.d.ts +112 -0
- package/dist/src/unstable/sources/source-host-provider.js +11 -0
- package/dist/src/unstable/sources/types.d.ts +262 -0
- package/dist/src/unstable/sources/types.js +127 -0
- package/dist/src/unstable/sources/workspace.d.ts +13 -0
- package/dist/src/unstable/sources/workspace.js +13 -0
- package/dist/src/unstable/subagents/manifest-schema.d.ts +81 -0
- package/dist/src/unstable/subagents/manifest-schema.js +43 -0
- package/dist/src/unstable/version-constraints/version-constraints.d.ts +71 -0
- package/dist/src/unstable/version-constraints/version-constraints.js +144 -0
- package/dist/src/unstable/workspace-files.d.ts +13 -0
- package/dist/src/unstable/workspace-files.js +13 -0
- package/dist/src/unstable/workspace-scope.d.ts +11 -0
- package/dist/src/unstable/workspace-scope.js +10 -0
- package/package.json +271 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base types for extension references.
|
|
3
|
+
*
|
|
4
|
+
* Defines the foundational type hierarchy used by all extension types.
|
|
5
|
+
* Per-type concrete refs live in their respective feature folders
|
|
6
|
+
* (skills/refs.ts, mcps/refs.ts, etc.).
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is unstable and may change without notice.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
import type { ExtensionName, ExtensionType } from "../common.js";
|
|
12
|
+
import type * as Option from "effect/Option";
|
|
13
|
+
import type * as Record from "effect/Record";
|
|
14
|
+
import type { RefType, Source } from "../../sources/types.js";
|
|
15
|
+
import type { ExtensionDependencyConstraintMap } from "../common.js";
|
|
16
|
+
import type { Version } from "../../version-constraints/version-constraints.js";
|
|
17
|
+
import type { Handle } from "../handle.js";
|
|
18
|
+
import type { PackageUrlParts } from "../../packaging/package-url.js";
|
|
19
|
+
import type { WorkspaceScope } from "../../workspace-scope.js";
|
|
20
|
+
import type { SourceHash } from "../../sources/source-hash.js";
|
|
21
|
+
import type { DeprecationView } from "../deprecation.js";
|
|
22
|
+
/** Ref details for git-hosted sources (GitHub, GitLab, Bitbucket, AzureRepos, Git). @experimental */
|
|
23
|
+
export interface GitHostedRefDetails {
|
|
24
|
+
/** Publisher identity declared by the resolved package manifest. */
|
|
25
|
+
readonly owner: Handle;
|
|
26
|
+
/** Package identity declared by the resolved package manifest. */
|
|
27
|
+
readonly name: ExtensionName;
|
|
28
|
+
/** file:// URL to cloned directory */
|
|
29
|
+
readonly location: string;
|
|
30
|
+
/** Repository-relative directory selected for this extension */
|
|
31
|
+
readonly sourcePath?: string;
|
|
32
|
+
/** Git tree SHA for integrity verification */
|
|
33
|
+
readonly gitTreeSha: string;
|
|
34
|
+
/** Immutable commit checked out while resolving this ref. */
|
|
35
|
+
readonly gitCommitSha: string;
|
|
36
|
+
}
|
|
37
|
+
/** Ref details for registry sources. @experimental */
|
|
38
|
+
export interface RegistryRefDetails {
|
|
39
|
+
/** Registry owner that owns the published extension */
|
|
40
|
+
readonly owner: Handle;
|
|
41
|
+
/** Immutable registry publisher epoch. */
|
|
42
|
+
readonly publisherBindingId: string;
|
|
43
|
+
/**
|
|
44
|
+
* Registry package name — the identifier used for registry operations (fetch, version resolution).
|
|
45
|
+
* This may differ from the extension-specific display name (e.g., skill.name, pack.name,
|
|
46
|
+
* server.name) which is the user-facing name parsed from the extension's manifest.
|
|
47
|
+
*/
|
|
48
|
+
readonly name: ExtensionName;
|
|
49
|
+
/** Resolved semver version */
|
|
50
|
+
readonly version: Version;
|
|
51
|
+
/** SRI integrity string in `sha512-<base64>` format. None for synthetic refs from publish. */
|
|
52
|
+
readonly integrity: Option.Option<string>;
|
|
53
|
+
/** Package URLs this extension is designed to work with, from registry metadata. Empty when absent. */
|
|
54
|
+
readonly packages: ReadonlyArray<PackageUrlParts>;
|
|
55
|
+
/** Structured Registry lifecycle evidence captured at resolution time. */
|
|
56
|
+
readonly deprecation?: DeprecationView;
|
|
57
|
+
/** Lifecycle notices that must be shown before an exact historical install. */
|
|
58
|
+
readonly lifecycleWarnings?: ReadonlyArray<string>;
|
|
59
|
+
}
|
|
60
|
+
/** Ref details for local filesystem sources. @experimental */
|
|
61
|
+
export interface LocalRefDetails {
|
|
62
|
+
/** Publisher identity declared by the resolved package manifest. */
|
|
63
|
+
readonly owner: Handle;
|
|
64
|
+
/** Package identity declared by the resolved package manifest. */
|
|
65
|
+
readonly name: ExtensionName;
|
|
66
|
+
/** file:// URL to local directory */
|
|
67
|
+
readonly location: string;
|
|
68
|
+
/** Workspace-relative selected package directory when known. */
|
|
69
|
+
readonly sourcePath?: string;
|
|
70
|
+
}
|
|
71
|
+
/** Ref details for intrinsic workspace sources. @experimental */
|
|
72
|
+
export interface WorkspaceRefDetails {
|
|
73
|
+
/** Owner declared by the workspace locator and manifest. */
|
|
74
|
+
readonly owner: Handle;
|
|
75
|
+
/** Package name declared by the workspace locator and manifest. */
|
|
76
|
+
readonly name: ExtensionName;
|
|
77
|
+
/** Manifest version; workspace locators never carry a version constraint. */
|
|
78
|
+
readonly version: Version;
|
|
79
|
+
/** Scope whose settings document declares the workspace source. */
|
|
80
|
+
readonly scope: WorkspaceScope;
|
|
81
|
+
/** Runtime-only canonical package location. Never persisted in the lockfile. */
|
|
82
|
+
readonly location: string;
|
|
83
|
+
/** Deterministic hash of the authoritative workspace package content. */
|
|
84
|
+
readonly sourceHash: SourceHash;
|
|
85
|
+
}
|
|
86
|
+
/** @experimental */
|
|
87
|
+
export interface ExtensionRefBase<TExtensionType extends ExtensionType, TRefType extends RefType, TSource extends Source> {
|
|
88
|
+
readonly type: TExtensionType;
|
|
89
|
+
readonly refType: TRefType;
|
|
90
|
+
readonly source: TSource;
|
|
91
|
+
}
|
|
92
|
+
/** @experimental */
|
|
93
|
+
export type SkillExtensionRefBase<TRefType extends RefType, TSource extends Source> = ExtensionRefBase<"skill", TRefType, TSource> & {
|
|
94
|
+
readonly skill: {
|
|
95
|
+
readonly name: ExtensionName;
|
|
96
|
+
readonly description: Option.Option<string>;
|
|
97
|
+
readonly metadata: Option.Option<Record.ReadonlyRecord<string, unknown>>;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/** @experimental */
|
|
101
|
+
/** @experimental */
|
|
102
|
+
export type McpServerExtensionRefBase<TRefType extends RefType, TSource extends Source> = ExtensionRefBase<"mcp-server", TRefType, TSource> & {
|
|
103
|
+
readonly server: {
|
|
104
|
+
readonly name: ExtensionName;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
/** @experimental */
|
|
108
|
+
export type SubagentExtensionRefBase<TRefType extends RefType, TSource extends Source> = ExtensionRefBase<"subagent", TRefType, TSource> & {
|
|
109
|
+
readonly subagent: {
|
|
110
|
+
readonly name: ExtensionName;
|
|
111
|
+
readonly description: Option.Option<string>;
|
|
112
|
+
};
|
|
113
|
+
/** Override platform capability degradation for this extension. */
|
|
114
|
+
readonly fallback?: "auto" | "none";
|
|
115
|
+
};
|
|
116
|
+
/** @experimental */
|
|
117
|
+
/** @experimental */
|
|
118
|
+
export type PackRefBase<TRefType extends RefType, TSource extends Source> = ExtensionRefBase<"pack", TRefType, TSource> & {
|
|
119
|
+
readonly owner: Handle;
|
|
120
|
+
readonly pack: {
|
|
121
|
+
readonly name: ExtensionName;
|
|
122
|
+
readonly dependencies: ExtensionDependencyConstraintMap;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
//# sourceMappingURL=ref-base.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base types for extension references.
|
|
3
|
+
*
|
|
4
|
+
* Defines the foundational type hierarchy used by all extension types.
|
|
5
|
+
* Per-type concrete refs live in their respective feature folders
|
|
6
|
+
* (skills/refs.ts, mcps/refs.ts, etc.).
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is unstable and may change without notice.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ref-base.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concrete rule ref types.
|
|
3
|
+
*
|
|
4
|
+
* @experimental This API is unstable and may change without notice.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import type { GitHostedRefDetails, LocalRefDetails, RegistryRefDetails, WorkspaceRefDetails } from "./ref-base.js";
|
|
8
|
+
import type { ExtensionRefBase } from "./ref-base.js";
|
|
9
|
+
import type { GitBasedSource, LocalSource, RegistrySource, WorkspaceSource } from "../../sources/types.js";
|
|
10
|
+
import type { ExtensionName } from "../common.js";
|
|
11
|
+
type RuleExtensionRefBase<TRefType, TSource> = ExtensionRefBase<"rule", Extract<TRefType, "git-hosted" | "registry" | "local" | "workspace">, Extract<TSource, GitBasedSource | RegistrySource | LocalSource | WorkspaceSource>> & {
|
|
12
|
+
readonly rule: {
|
|
13
|
+
readonly name: ExtensionName;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/** @experimental */
|
|
17
|
+
export type GitHostedRuleRef = RuleExtensionRefBase<"git-hosted", GitBasedSource> & GitHostedRefDetails;
|
|
18
|
+
/** @experimental */
|
|
19
|
+
export type RegistryRuleRef = RuleExtensionRefBase<"registry", RegistrySource> & RegistryRefDetails;
|
|
20
|
+
/** @experimental */
|
|
21
|
+
export type LocalRuleRef = RuleExtensionRefBase<"local", LocalSource> & LocalRefDetails;
|
|
22
|
+
/** @experimental */
|
|
23
|
+
export type WorkspaceRuleRef = RuleExtensionRefBase<"workspace", WorkspaceSource> & WorkspaceRefDetails;
|
|
24
|
+
/** @experimental */
|
|
25
|
+
export type RuleExtensionRef = GitHostedRuleRef | RegistryRuleRef | LocalRuleRef | WorkspaceRuleRef;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=rule.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill extension ref types.
|
|
3
|
+
*
|
|
4
|
+
* Concrete ref types for skill extensions, built on the shared
|
|
5
|
+
* ExtensionRefBase and ref detail interfaces.
|
|
6
|
+
*
|
|
7
|
+
* @experimental This API is unstable and may change without notice.
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import type { SkillExtensionRefBase, GitHostedRefDetails, RegistryRefDetails, LocalRefDetails, WorkspaceRefDetails } from "./ref-base.js";
|
|
11
|
+
import type { GitBasedSource, RegistrySource, LocalSource, WorkspaceSource } from "../../sources/types.js";
|
|
12
|
+
import type { Handle } from "../handle.js";
|
|
13
|
+
type ExternalSkillRefDetails<TDetails extends GitHostedRefDetails | LocalRefDetails> = Omit<TDetails, "owner"> & {
|
|
14
|
+
readonly owner?: Handle;
|
|
15
|
+
readonly portable?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** @experimental */
|
|
18
|
+
export type GitHostedSkillRef = SkillExtensionRefBase<"git-hosted", GitBasedSource> & ExternalSkillRefDetails<GitHostedRefDetails>;
|
|
19
|
+
/** @experimental */
|
|
20
|
+
export type RegistrySkillRef = SkillExtensionRefBase<"registry", RegistrySource> & RegistryRefDetails;
|
|
21
|
+
/** @experimental */
|
|
22
|
+
export type LocalSkillRef = SkillExtensionRefBase<"local", LocalSource> & ExternalSkillRefDetails<LocalRefDetails>;
|
|
23
|
+
/** @experimental */
|
|
24
|
+
export type WorkspaceSkillRef = SkillExtensionRefBase<"workspace", WorkspaceSource> & WorkspaceRefDetails;
|
|
25
|
+
/** @experimental */
|
|
26
|
+
export type SkillExtensionRef = GitHostedSkillRef | RegistrySkillRef | LocalSkillRef | WorkspaceSkillRef;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=skill.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill extension ref types.
|
|
3
|
+
*
|
|
4
|
+
* Concrete ref types for skill extensions, built on the shared
|
|
5
|
+
* ExtensionRefBase and ref detail interfaces.
|
|
6
|
+
*
|
|
7
|
+
* @experimental This API is unstable and may change without notice.
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=skill.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concrete subagent extension ref types.
|
|
3
|
+
*
|
|
4
|
+
* @experimental This API is unstable and may change without notice.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import type { SubagentExtensionRefBase, GitHostedRefDetails, RegistryRefDetails, LocalRefDetails, WorkspaceRefDetails } from "./ref-base.js";
|
|
8
|
+
import type { GitBasedSource, RegistrySource, LocalSource, WorkspaceSource } from "../../sources/types.js";
|
|
9
|
+
/** @experimental */
|
|
10
|
+
export type GitHostedSubagentRef = SubagentExtensionRefBase<"git-hosted", GitBasedSource> & GitHostedRefDetails;
|
|
11
|
+
/** @experimental */
|
|
12
|
+
export type RegistrySubagentRef = SubagentExtensionRefBase<"registry", RegistrySource> & RegistryRefDetails;
|
|
13
|
+
/** @experimental */
|
|
14
|
+
export type LocalSubagentRef = SubagentExtensionRefBase<"local", LocalSource> & LocalRefDetails;
|
|
15
|
+
/** @experimental */
|
|
16
|
+
export type WorkspaceSubagentRef = SubagentExtensionRefBase<"workspace", WorkspaceSource> & WorkspaceRefDetails;
|
|
17
|
+
/** @experimental */
|
|
18
|
+
export type SubagentExtensionRef = GitHostedSubagentRef | RegistrySubagentRef | LocalSubagentRef | WorkspaceSubagentRef;
|
|
19
|
+
//# sourceMappingURL=subagent.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
export declare const RegistrySourcePatternPartsSchema: Schema.Struct<{
|
|
3
|
+
readonly owner: Schema.brand<Schema.String, "Handle">;
|
|
4
|
+
readonly type: Schema.optional<Schema.Literals<readonly ("skills" | "mcps" | "subagents" | "rules" | "hooks" | "knowledge" | "packs")[]>>;
|
|
5
|
+
readonly name: Schema.optional<Schema.brand<Schema.NonEmptyString, "ExtensionName">>;
|
|
6
|
+
readonly versionRange: Schema.optional<Schema.brand<Schema.NonEmptyString, "VersionRange">>;
|
|
7
|
+
}>;
|
|
8
|
+
export type RegistrySourcePatternParts = Schema.Schema.Type<typeof RegistrySourcePatternPartsSchema>;
|
|
9
|
+
export type SourceQualifiedRegistrySourcePatternParts = RegistrySourcePatternParts & {
|
|
10
|
+
readonly sourceName: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const RegistrySourceRefPartsSchema: Schema.Struct<{
|
|
13
|
+
readonly owner: Schema.brand<Schema.String, "Handle">;
|
|
14
|
+
readonly type: Schema.Literals<readonly ("skills" | "mcps" | "subagents" | "rules" | "hooks" | "knowledge" | "packs")[]>;
|
|
15
|
+
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
16
|
+
readonly versionRange: Schema.optional<Schema.brand<Schema.NonEmptyString, "VersionRange">>;
|
|
17
|
+
}>;
|
|
18
|
+
export type RegistrySourceRefParts = Schema.Schema.Type<typeof RegistrySourceRefPartsSchema>;
|
|
19
|
+
export declare const parseRegistrySourcePatternParts: (input: string) => RegistrySourcePatternParts | undefined;
|
|
20
|
+
/** Parse a Registry locator, assigning unqualified input to the built-in agentxm source. */
|
|
21
|
+
export declare const parseSourceQualifiedRegistrySourcePatternParts: (input: string) => SourceQualifiedRegistrySourcePatternParts | undefined;
|
|
22
|
+
export declare const parseRegistrySourceRef: (input: string) => RegistrySourceRefParts | undefined;
|
|
23
|
+
export declare const formatRegistrySourcePatternParts: (value: RegistrySourcePatternParts) => string;
|
|
24
|
+
export declare const formatRegistrySourceRef: (value: RegistrySourceRefParts) => string;
|
|
25
|
+
export declare const RegistrySourcePatternSchema: Schema.decodeTo<Schema.toType<Schema.Struct<{
|
|
26
|
+
readonly owner: Schema.brand<Schema.String, "Handle">;
|
|
27
|
+
readonly type: Schema.optional<Schema.Literals<readonly ("skills" | "mcps" | "subagents" | "rules" | "hooks" | "knowledge" | "packs")[]>>;
|
|
28
|
+
readonly name: Schema.optional<Schema.brand<Schema.NonEmptyString, "ExtensionName">>;
|
|
29
|
+
readonly versionRange: Schema.optional<Schema.brand<Schema.NonEmptyString, "VersionRange">>;
|
|
30
|
+
}>>, Schema.String, never, never>;
|
|
31
|
+
export declare const RegistrySourceRefSchema: Schema.decodeTo<Schema.toType<Schema.Struct<{
|
|
32
|
+
readonly owner: Schema.brand<Schema.String, "Handle">;
|
|
33
|
+
readonly type: Schema.Literals<readonly ("skills" | "mcps" | "subagents" | "rules" | "hooks" | "knowledge" | "packs")[]>;
|
|
34
|
+
readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
|
|
35
|
+
readonly versionRange: Schema.optional<Schema.brand<Schema.NonEmptyString, "VersionRange">>;
|
|
36
|
+
}>>, Schema.String, never, never>;
|
|
37
|
+
//# sourceMappingURL=registry-source.d.ts.map
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Result from "effect/Result";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
import * as SchemaIssue from "effect/SchemaIssue";
|
|
5
|
+
import * as SchemaTransformation from "effect/SchemaTransformation";
|
|
6
|
+
import { ExtensionNameSchema, ExtensionTypePluralSchema } from "./common.js";
|
|
7
|
+
import { HandleSchema } from "./handle.js";
|
|
8
|
+
import { VersionRangeSchema } from "../version-constraints/version-constraints.js";
|
|
9
|
+
const invalidRegistrySourcePattern = (input) => `Expected registry source pattern in @handle, @handle/<plural-type>, or @handle/<plural-type>/<name>@<constraint> form, got: ${input}`;
|
|
10
|
+
const invalidRegistrySourceRef = (input) => `Expected registry source ref in @handle/<plural-type>/<name>@<constraint> form, got: ${input}`;
|
|
11
|
+
export const RegistrySourcePatternPartsSchema = Schema.Struct({
|
|
12
|
+
owner: HandleSchema,
|
|
13
|
+
type: Schema.optional(ExtensionTypePluralSchema),
|
|
14
|
+
name: Schema.optional(ExtensionNameSchema),
|
|
15
|
+
versionRange: Schema.optional(VersionRangeSchema),
|
|
16
|
+
})
|
|
17
|
+
.pipe(Schema.check(Schema.makeFilter((value) => {
|
|
18
|
+
if (value.type === undefined) {
|
|
19
|
+
return value.name === undefined && value.versionRange === undefined
|
|
20
|
+
? undefined
|
|
21
|
+
: "Registry source pattern cannot include name or versionRange without type";
|
|
22
|
+
}
|
|
23
|
+
if (value.name === undefined) {
|
|
24
|
+
return value.versionRange === undefined
|
|
25
|
+
? undefined
|
|
26
|
+
: "Registry source pattern cannot include versionRange without name";
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
})))
|
|
30
|
+
.annotate({
|
|
31
|
+
identifier: "RegistrySourcePatternParts",
|
|
32
|
+
title: "Registry Source Pattern",
|
|
33
|
+
description: "Structured registry source pattern: @handle, @handle/<type>, or @handle/<type>/<name>@<constraint>.",
|
|
34
|
+
});
|
|
35
|
+
export const RegistrySourceRefPartsSchema = Schema.Struct({
|
|
36
|
+
owner: HandleSchema,
|
|
37
|
+
type: ExtensionTypePluralSchema,
|
|
38
|
+
name: ExtensionNameSchema,
|
|
39
|
+
versionRange: Schema.optional(VersionRangeSchema),
|
|
40
|
+
}).annotate({
|
|
41
|
+
identifier: "RegistrySourceRefParts",
|
|
42
|
+
title: "Registry Source Ref",
|
|
43
|
+
description: "Structured registry source ref: @handle/<type>/<name> with optional version constraint.",
|
|
44
|
+
});
|
|
45
|
+
const decodeRegistrySourcePatternParts = Schema.decodeUnknownResult(RegistrySourcePatternPartsSchema);
|
|
46
|
+
const decodeRegistrySourceRefParts = Schema.decodeUnknownResult(RegistrySourceRefPartsSchema);
|
|
47
|
+
const parseNameAndConstraintSegment = (segment) => {
|
|
48
|
+
const atIndex = segment.indexOf("@");
|
|
49
|
+
if (atIndex === 0) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
if (atIndex === -1) {
|
|
53
|
+
return { name: segment };
|
|
54
|
+
}
|
|
55
|
+
const name = segment.slice(0, atIndex);
|
|
56
|
+
const versionRange = segment.slice(atIndex + 1);
|
|
57
|
+
if (name.length === 0 || versionRange.length === 0) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
return { name, versionRange };
|
|
61
|
+
};
|
|
62
|
+
export const parseRegistrySourcePatternParts = (input) => {
|
|
63
|
+
if (!input.startsWith("@")) {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
const segments = input.split("/");
|
|
67
|
+
if (segments.length < 1 || segments.length > 3) {
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
const owner = segments[0];
|
|
71
|
+
if (owner === undefined) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
let candidate;
|
|
75
|
+
if (segments.length === 1) {
|
|
76
|
+
candidate = { owner };
|
|
77
|
+
}
|
|
78
|
+
else if (segments.length === 2) {
|
|
79
|
+
const type = segments[1];
|
|
80
|
+
if (type !== undefined) {
|
|
81
|
+
candidate = { owner, type };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
const type = segments[1];
|
|
86
|
+
const third = segments[2];
|
|
87
|
+
if (type !== undefined && third !== undefined) {
|
|
88
|
+
const parsedName = parseNameAndConstraintSegment(third);
|
|
89
|
+
if (parsedName !== undefined) {
|
|
90
|
+
candidate = {
|
|
91
|
+
owner,
|
|
92
|
+
type,
|
|
93
|
+
name: parsedName.name,
|
|
94
|
+
versionRange: parsedName.versionRange,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (candidate === undefined) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
const result = decodeRegistrySourcePatternParts(candidate);
|
|
103
|
+
return Result.isSuccess(result) ? result.success : undefined;
|
|
104
|
+
};
|
|
105
|
+
/** Parse a Registry locator, assigning unqualified input to the built-in agentxm source. */
|
|
106
|
+
export const parseSourceQualifiedRegistrySourcePatternParts = (input) => {
|
|
107
|
+
const unqualified = parseRegistrySourcePatternParts(input);
|
|
108
|
+
if (unqualified !== undefined) {
|
|
109
|
+
return { ...unqualified, sourceName: "agentxm" };
|
|
110
|
+
}
|
|
111
|
+
const separator = input.indexOf(":");
|
|
112
|
+
if (separator <= 0)
|
|
113
|
+
return undefined;
|
|
114
|
+
const sourceName = input.slice(0, separator);
|
|
115
|
+
const qualified = parseRegistrySourcePatternParts(input.slice(separator + 1));
|
|
116
|
+
return qualified === undefined ? undefined : { ...qualified, sourceName };
|
|
117
|
+
};
|
|
118
|
+
export const parseRegistrySourceRef = (input) => {
|
|
119
|
+
const parsed = parseSourceQualifiedRegistrySourcePatternParts(input);
|
|
120
|
+
if (parsed?.type === undefined || parsed.name === undefined) {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
const result = decodeRegistrySourceRefParts(parsed);
|
|
124
|
+
return Result.isSuccess(result) ? result.success : undefined;
|
|
125
|
+
};
|
|
126
|
+
export const formatRegistrySourcePatternParts = (value) => {
|
|
127
|
+
let output = value.owner;
|
|
128
|
+
if (value.type !== undefined) {
|
|
129
|
+
output += `/${value.type}`;
|
|
130
|
+
}
|
|
131
|
+
if (value.name !== undefined) {
|
|
132
|
+
output += `/${value.name}`;
|
|
133
|
+
}
|
|
134
|
+
if (value.versionRange !== undefined) {
|
|
135
|
+
output += `@${value.versionRange}`;
|
|
136
|
+
}
|
|
137
|
+
return output;
|
|
138
|
+
};
|
|
139
|
+
export const formatRegistrySourceRef = (value) => formatRegistrySourcePatternParts(value);
|
|
140
|
+
export const RegistrySourcePatternSchema = Schema.String.pipe(Schema.decodeTo(Schema.toType(RegistrySourcePatternPartsSchema), SchemaTransformation.transformOrFail({
|
|
141
|
+
decode: (input) => {
|
|
142
|
+
const parsed = parseRegistrySourcePatternParts(input);
|
|
143
|
+
return parsed === undefined
|
|
144
|
+
? Effect.fail(new SchemaIssue.Forbidden({ message: invalidRegistrySourcePattern(input) }, input))
|
|
145
|
+
: Effect.succeed(parsed);
|
|
146
|
+
},
|
|
147
|
+
encode: (value) => Effect.succeed(formatRegistrySourcePatternParts(value)),
|
|
148
|
+
})));
|
|
149
|
+
export const RegistrySourceRefSchema = Schema.String.pipe(Schema.decodeTo(Schema.toType(RegistrySourceRefPartsSchema), SchemaTransformation.transformOrFail({
|
|
150
|
+
decode: (input) => {
|
|
151
|
+
const parsed = parseRegistrySourceRef(input);
|
|
152
|
+
return parsed === undefined
|
|
153
|
+
? Effect.fail(new SchemaIssue.Forbidden({ message: invalidRegistrySourceRef(input) }, input))
|
|
154
|
+
: Effect.succeed(parsed);
|
|
155
|
+
},
|
|
156
|
+
encode: (value) => Effect.succeed(formatRegistrySourceRef(value)),
|
|
157
|
+
})));
|
|
158
|
+
//# sourceMappingURL=registry-source.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Release-age policy vocabulary consumed by source resolution ports.
|
|
3
|
+
*
|
|
4
|
+
* These are the pure evaluation, exemption, and evidence shapes a resolution
|
|
5
|
+
* request commits to. Record construction, maturity checks, and everything
|
|
6
|
+
* coupled to registry version entries stays in `@agentxm/registry-protocol`.
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is unstable and may change without notice.
|
|
9
|
+
*/
|
|
10
|
+
import type * as DateTime from "effect/DateTime";
|
|
11
|
+
import type * as Duration from "effect/Duration";
|
|
12
|
+
import type { ReleaseAgeExcludePattern } from "./fqn-pattern.js";
|
|
13
|
+
export interface ScopedReleaseAgeExcludePattern {
|
|
14
|
+
readonly pattern: ReleaseAgeExcludePattern;
|
|
15
|
+
readonly scope: "project" | "user";
|
|
16
|
+
}
|
|
17
|
+
export interface ReleaseAgeEvaluation {
|
|
18
|
+
readonly minimumReleaseAge: Duration.Duration;
|
|
19
|
+
readonly evaluatedAt: DateTime.Utc;
|
|
20
|
+
readonly mode: "enforce" | "ignore";
|
|
21
|
+
readonly exclude?: ReadonlyArray<ScopedReleaseAgeExcludePattern>;
|
|
22
|
+
readonly grantedExemption?: ReleaseAgeExemption;
|
|
23
|
+
}
|
|
24
|
+
export type ReleaseAgeExemption = {
|
|
25
|
+
readonly bypassCause: "exclude";
|
|
26
|
+
readonly exemptionScope: "project" | "user";
|
|
27
|
+
} | {
|
|
28
|
+
readonly bypassCause: "ignore-flag";
|
|
29
|
+
};
|
|
30
|
+
export interface ReleaseAgeEvidence {
|
|
31
|
+
readonly version: string;
|
|
32
|
+
readonly publishedAt: string;
|
|
33
|
+
readonly eligibleAt: string;
|
|
34
|
+
readonly minimumReleaseAgeSeconds: number;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=release-age.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Release-age policy vocabulary consumed by source resolution ports.
|
|
3
|
+
*
|
|
4
|
+
* These are the pure evaluation, exemption, and evidence shapes a resolution
|
|
5
|
+
* request commits to. Record construction, maturity checks, and everything
|
|
6
|
+
* coupled to registry version entries stays in `@agentxm/registry-protocol`.
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is unstable and may change without notice.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=release-age.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal skills directory convention.
|
|
3
|
+
*
|
|
4
|
+
* The universal skills directory (`.agents/skills`) is a shared cross-agent
|
|
5
|
+
* convention used by multiple coding agents. Skills placed here are visible to
|
|
6
|
+
* every agent that opts in, rather than being scoped to a single agent's
|
|
7
|
+
* configuration directory.
|
|
8
|
+
*
|
|
9
|
+
* @experimental This API is unstable and may change without notice.
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* WorkspaceMutations-relative path of the universal skills directory.
|
|
14
|
+
*/
|
|
15
|
+
export declare const UNIVERSAL_SKILLS_DIR = ".agents/skills";
|
|
16
|
+
/**
|
|
17
|
+
* First path segment of {@link UNIVERSAL_SKILLS_DIR}.
|
|
18
|
+
*
|
|
19
|
+
* Used by detection and lint logic to exclude the universal directory from
|
|
20
|
+
* agent-specific filesystem probes.
|
|
21
|
+
*/
|
|
22
|
+
export declare const UNIVERSAL_SKILLS_DIR_SEGMENT: string;
|
|
23
|
+
/**
|
|
24
|
+
* Strips trailing path separators from a path string.
|
|
25
|
+
*/
|
|
26
|
+
export declare const stripTrailingSeparators: (p: string) => string;
|
|
27
|
+
/**
|
|
28
|
+
* Returns `true` when `dir` is the workspace-relative universal skills
|
|
29
|
+
* directory path. Use for descriptor-level comparisons where paths are
|
|
30
|
+
* relative (e.g., `agent.skills.dir`).
|
|
31
|
+
*
|
|
32
|
+
* @see {@link isUniversalSkillsDir} for absolute resolved-path comparisons
|
|
33
|
+
* (e.g., after `resolveEffectiveSkillsDir`).
|
|
34
|
+
*/
|
|
35
|
+
export declare const isUniversalSkillsRelativeDir: (dir: string) => boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Resolve per-agent artifact presence when some agents share the universal
|
|
38
|
+
* skills directory. If any agent in `universalAgentIds` has the artifact,
|
|
39
|
+
* all agents in that set are treated as having it — because the directory
|
|
40
|
+
* is shared, one symlink/copy satisfies them all.
|
|
41
|
+
*
|
|
42
|
+
* Returns the input unchanged when `universalAgentIds` is empty.
|
|
43
|
+
*/
|
|
44
|
+
export declare const resolveUniversalDirPresence: <T extends {
|
|
45
|
+
readonly agentId: string;
|
|
46
|
+
readonly exists: boolean;
|
|
47
|
+
}>(perAgent: ReadonlyArray<T>, universalAgentIds: ReadonlySet<string>) => ReadonlyArray<T>;
|
|
48
|
+
/**
|
|
49
|
+
* Returns `true` when `resolvedDir` points to the universal skills directory
|
|
50
|
+
* (`<workspaceRoot>/.agents/skills`).
|
|
51
|
+
*
|
|
52
|
+
* Both paths are normalized by stripping trailing separators before comparison.
|
|
53
|
+
*
|
|
54
|
+
* Intended for comparing resolved absolute paths from `resolveEffectiveSkillsDir`.
|
|
55
|
+
* For descriptor-level relative paths, use {@link isUniversalSkillsRelativeDir}.
|
|
56
|
+
*/
|
|
57
|
+
export declare const isUniversalSkillsDir: (resolvedDir: string, workspaceRoot: string) => boolean;
|
|
58
|
+
//# sourceMappingURL=universal-skills-dir.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal skills directory convention.
|
|
3
|
+
*
|
|
4
|
+
* The universal skills directory (`.agents/skills`) is a shared cross-agent
|
|
5
|
+
* convention used by multiple coding agents. Skills placed here are visible to
|
|
6
|
+
* every agent that opts in, rather than being scoped to a single agent's
|
|
7
|
+
* configuration directory.
|
|
8
|
+
*
|
|
9
|
+
* @experimental This API is unstable and may change without notice.
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* WorkspaceMutations-relative path of the universal skills directory.
|
|
14
|
+
*/
|
|
15
|
+
export const UNIVERSAL_SKILLS_DIR = ".agents/skills";
|
|
16
|
+
/**
|
|
17
|
+
* First path segment of {@link UNIVERSAL_SKILLS_DIR}.
|
|
18
|
+
*
|
|
19
|
+
* Used by detection and lint logic to exclude the universal directory from
|
|
20
|
+
* agent-specific filesystem probes.
|
|
21
|
+
*/
|
|
22
|
+
export const UNIVERSAL_SKILLS_DIR_SEGMENT = UNIVERSAL_SKILLS_DIR.split("/")[0] ?? "";
|
|
23
|
+
/**
|
|
24
|
+
* Strips trailing path separators from a path string.
|
|
25
|
+
*/
|
|
26
|
+
export const stripTrailingSeparators = (p) => p.length > 1 ? p.replace(/[/\\]+$/, "") : p;
|
|
27
|
+
/**
|
|
28
|
+
* Returns `true` when `dir` is the workspace-relative universal skills
|
|
29
|
+
* directory path. Use for descriptor-level comparisons where paths are
|
|
30
|
+
* relative (e.g., `agent.skills.dir`).
|
|
31
|
+
*
|
|
32
|
+
* @see {@link isUniversalSkillsDir} for absolute resolved-path comparisons
|
|
33
|
+
* (e.g., after `resolveEffectiveSkillsDir`).
|
|
34
|
+
*/
|
|
35
|
+
export const isUniversalSkillsRelativeDir = (dir) => dir === UNIVERSAL_SKILLS_DIR;
|
|
36
|
+
/**
|
|
37
|
+
* Resolve per-agent artifact presence when some agents share the universal
|
|
38
|
+
* skills directory. If any agent in `universalAgentIds` has the artifact,
|
|
39
|
+
* all agents in that set are treated as having it — because the directory
|
|
40
|
+
* is shared, one symlink/copy satisfies them all.
|
|
41
|
+
*
|
|
42
|
+
* Returns the input unchanged when `universalAgentIds` is empty.
|
|
43
|
+
*/
|
|
44
|
+
export const resolveUniversalDirPresence = (perAgent, universalAgentIds) => {
|
|
45
|
+
if (universalAgentIds.size === 0) {
|
|
46
|
+
return perAgent;
|
|
47
|
+
}
|
|
48
|
+
const anyUniversalExists = perAgent.some((p) => p.exists && universalAgentIds.has(p.agentId));
|
|
49
|
+
if (!anyUniversalExists) {
|
|
50
|
+
return perAgent;
|
|
51
|
+
}
|
|
52
|
+
return perAgent.map((p) => (universalAgentIds.has(p.agentId) ? { ...p, exists: true } : p));
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Returns `true` when `resolvedDir` points to the universal skills directory
|
|
56
|
+
* (`<workspaceRoot>/.agents/skills`).
|
|
57
|
+
*
|
|
58
|
+
* Both paths are normalized by stripping trailing separators before comparison.
|
|
59
|
+
*
|
|
60
|
+
* Intended for comparing resolved absolute paths from `resolveEffectiveSkillsDir`.
|
|
61
|
+
* For descriptor-level relative paths, use {@link isUniversalSkillsRelativeDir}.
|
|
62
|
+
*/
|
|
63
|
+
export const isUniversalSkillsDir = (resolvedDir, workspaceRoot) => {
|
|
64
|
+
const sep = "/";
|
|
65
|
+
const expected = stripTrailingSeparators(`${stripTrailingSeparators(workspaceRoot)}${sep}${UNIVERSAL_SKILLS_DIR}`);
|
|
66
|
+
return stripTrailingSeparators(resolvedDir) === expected;
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=universal-skills-dir.js.map
|