@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,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure per-forge source shorthand printing grammar.
|
|
3
|
+
*
|
|
4
|
+
* Each printer formats source params as the forge's canonical shorthand
|
|
5
|
+
* string. Probing and acquisition stay with the source-resolution providers;
|
|
6
|
+
* only the string grammar lives here.
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is unstable and may change without notice.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
import * as Option from "effect/Option";
|
|
12
|
+
/** @experimental */
|
|
13
|
+
export const printGitHubSource = (source, sourceName = source.sourceName ?? "github") => {
|
|
14
|
+
let s = `${sourceName}:${source.owner}/${source.repo}`;
|
|
15
|
+
if (Option.isSome(source.subPath))
|
|
16
|
+
s += `//${source.subPath.value}`;
|
|
17
|
+
if (Option.isSome(source.ref))
|
|
18
|
+
s += `@${source.ref.value}`;
|
|
19
|
+
return s;
|
|
20
|
+
};
|
|
21
|
+
/** @experimental */
|
|
22
|
+
export const printGitLabSource = (source, sourceName = source.sourceName ?? "gitlab") => {
|
|
23
|
+
let s = `${sourceName}:${source.owner}/${source.repo}`;
|
|
24
|
+
if (Option.isSome(source.subPath))
|
|
25
|
+
s += `//${source.subPath.value}`;
|
|
26
|
+
if (Option.isSome(source.ref))
|
|
27
|
+
s += `@${source.ref.value}`;
|
|
28
|
+
return s;
|
|
29
|
+
};
|
|
30
|
+
/** @experimental */
|
|
31
|
+
export const printBitbucketSource = (source, sourceName = source.sourceName ?? "bitbucket") => {
|
|
32
|
+
let s = `${sourceName}:${source.owner}/${source.repo}`;
|
|
33
|
+
if (Option.isSome(source.subPath))
|
|
34
|
+
s += `//${source.subPath.value}`;
|
|
35
|
+
if (Option.isSome(source.ref))
|
|
36
|
+
s += `@${source.ref.value}`;
|
|
37
|
+
return s;
|
|
38
|
+
};
|
|
39
|
+
/** @experimental */
|
|
40
|
+
export const printAzureReposSource = (source, sourceName = source.sourceName ?? "azurerepos") => {
|
|
41
|
+
let s = `${sourceName}:${source.organization}/${source.project}/${source.repo}`;
|
|
42
|
+
if (Option.isSome(source.subPath))
|
|
43
|
+
s += `//${source.subPath.value}`;
|
|
44
|
+
if (Option.isSome(source.ref))
|
|
45
|
+
s += `@${source.ref.value}`;
|
|
46
|
+
return s;
|
|
47
|
+
};
|
|
48
|
+
/** @experimental */
|
|
49
|
+
export const printLocalSource = (source) => source.path.startsWith("/") || source.path.startsWith(".") ? source.path : `./${source.path}`;
|
|
50
|
+
//# sourceMappingURL=forge-grammar.js.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input pattern classification for source strings.
|
|
3
|
+
*
|
|
4
|
+
* Classifies raw input strings into typed `InputPattern` variants
|
|
5
|
+
* (URL, SCP, shorthand, file path, etc.) for downstream routing
|
|
6
|
+
* by `resolveSource`.
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is unstable and may change without notice.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
import * as Option from "effect/Option";
|
|
12
|
+
import type { VersionRange } from "../version-constraints/version-constraints.js";
|
|
13
|
+
import type { ExtensionName, ExtensionType, ExtensionTypePlural } from "../extensions/common.js";
|
|
14
|
+
import type { Handle } from "../extensions/handle.js";
|
|
15
|
+
/** A simple name with no `/`, `@`, or URL scheme. */
|
|
16
|
+
type NameInput = {
|
|
17
|
+
readonly pattern: "name-input";
|
|
18
|
+
readonly name: string;
|
|
19
|
+
};
|
|
20
|
+
/** A namespaced registry source: `[source-name:]@owner/<plural-type>/name`. */
|
|
21
|
+
type RegistryPatternInput = {
|
|
22
|
+
readonly pattern: "registry-pattern-input";
|
|
23
|
+
readonly sourceName: string;
|
|
24
|
+
readonly type: Option.Option<ExtensionTypePlural>;
|
|
25
|
+
readonly owner: Handle;
|
|
26
|
+
readonly name: Option.Option<ExtensionName>;
|
|
27
|
+
readonly versionRange: Option.Option<VersionRange>;
|
|
28
|
+
};
|
|
29
|
+
/** A valid URL (validated via `Schema.URL`). */
|
|
30
|
+
type UrlInput = {
|
|
31
|
+
readonly pattern: "url-input";
|
|
32
|
+
readonly url: URL;
|
|
33
|
+
};
|
|
34
|
+
/** An SCP-style git address: `user@host:path` (e.g. `git@github.com:owner/repo.git`). */
|
|
35
|
+
type GitScpAddress = {
|
|
36
|
+
readonly pattern: "git-scp-address";
|
|
37
|
+
readonly user: string;
|
|
38
|
+
readonly host: string;
|
|
39
|
+
readonly path: string;
|
|
40
|
+
};
|
|
41
|
+
/** An `owner/repo[/path]` style pattern containing `/` (not a URL or file path). */
|
|
42
|
+
type SlashPattern = {
|
|
43
|
+
readonly pattern: "slash-pattern";
|
|
44
|
+
readonly first: string;
|
|
45
|
+
readonly second: string;
|
|
46
|
+
readonly third: Option.Option<string>;
|
|
47
|
+
};
|
|
48
|
+
/** A local filesystem path matching `LOCAL_PATH_PATTERN`. */
|
|
49
|
+
type FilePathPattern = {
|
|
50
|
+
readonly pattern: "file-path-pattern";
|
|
51
|
+
readonly path: string;
|
|
52
|
+
};
|
|
53
|
+
/** A shorthand prefixed input: `<prefix>:...` where prefix is a known source provider. */
|
|
54
|
+
export type ShorthandInput = {
|
|
55
|
+
readonly pattern: "shorthand-input";
|
|
56
|
+
readonly prefix: string;
|
|
57
|
+
readonly remainingInput: string;
|
|
58
|
+
};
|
|
59
|
+
/** A glob pattern containing `*` wildcards (e.g. `effect-*`). */
|
|
60
|
+
type GlobInput = {
|
|
61
|
+
readonly pattern: "glob-input";
|
|
62
|
+
readonly value: string;
|
|
63
|
+
};
|
|
64
|
+
/** An intrinsic workspace package locator. */
|
|
65
|
+
type WorkspacePatternInput = {
|
|
66
|
+
readonly pattern: "workspace-pattern-input";
|
|
67
|
+
readonly owner: Handle;
|
|
68
|
+
readonly type: ExtensionType;
|
|
69
|
+
readonly name: ExtensionName;
|
|
70
|
+
};
|
|
71
|
+
/** Discriminated union of all input patterns recognized by the parser. */
|
|
72
|
+
export type InputPattern = NameInput | RegistryPatternInput | UrlInput | GitScpAddress | SlashPattern | FilePathPattern | ShorthandInput | GlobInput | WorkspacePatternInput;
|
|
73
|
+
/** Parse result with the classified pattern and original input. */
|
|
74
|
+
export type InputParseResult<T = InputPattern> = {
|
|
75
|
+
readonly pattern: T;
|
|
76
|
+
readonly originalInput: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Classify an input string into an InputPattern.
|
|
80
|
+
*
|
|
81
|
+
* Pure function — no effects, no trimming. Returns `None` for empty/whitespace-only input.
|
|
82
|
+
*/
|
|
83
|
+
export declare const parseInputPattern: (input: string) => Option.Option<InputParseResult>;
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input pattern classification for source strings.
|
|
3
|
+
*
|
|
4
|
+
* Classifies raw input strings into typed `InputPattern` variants
|
|
5
|
+
* (URL, SCP, shorthand, file path, etc.) for downstream routing
|
|
6
|
+
* by `resolveSource`.
|
|
7
|
+
*
|
|
8
|
+
* @experimental This API is unstable and may change without notice.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
import * as Option from "effect/Option";
|
|
12
|
+
import * as Result from "effect/Result";
|
|
13
|
+
import { parseFqn } from "../extensions/fqn.js";
|
|
14
|
+
import { parseSourceQualifiedRegistrySourcePatternParts } from "../extensions/registry-source.js";
|
|
15
|
+
/** Matches: ./path, ../path, /path, ~/path, ~\path, or Windows paths like C:\path */
|
|
16
|
+
const LOCAL_PATH_PATTERN = /^(?:\.\.?\/|\/|~\/|~\\|[A-Za-z]:[\\/])/;
|
|
17
|
+
/** SCP-style: `user@host:path` — no `://` scheme. */
|
|
18
|
+
const SCP_PATTERN = /^([^@]+)@([^:]+):(.+)$/;
|
|
19
|
+
/** Known shorthand prefixes. */
|
|
20
|
+
const SHORTHAND_PREFIXES = new Set(["github", "gitlab", "bitbucket"]);
|
|
21
|
+
/** Simple name: alphanumeric with hyphens, no leading/trailing hyphen. */
|
|
22
|
+
const NAME_PATTERN = /^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/;
|
|
23
|
+
/**
|
|
24
|
+
* Classify an input string into an InputPattern.
|
|
25
|
+
*
|
|
26
|
+
* Pure function — no effects, no trimming. Returns `None` for empty/whitespace-only input.
|
|
27
|
+
*/
|
|
28
|
+
export const parseInputPattern = (input) => {
|
|
29
|
+
const wrap = (pattern) => ({ pattern, originalInput: input });
|
|
30
|
+
// 1. SCP-style git address (user@host:path) — must check before URL
|
|
31
|
+
const scpMatch = input.includes("://") ? null : input.match(SCP_PATTERN);
|
|
32
|
+
if (scpMatch && scpMatch[1] && scpMatch[2] && scpMatch[3]) {
|
|
33
|
+
return Option.some(wrap({
|
|
34
|
+
pattern: "git-scp-address",
|
|
35
|
+
user: scpMatch[1],
|
|
36
|
+
host: scpMatch[2],
|
|
37
|
+
path: scpMatch[3],
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
// 2. Intrinsic workspace source — must be intercepted before URL parsing,
|
|
41
|
+
// because URL accepts arbitrary opaque schemes such as `workspace:`.
|
|
42
|
+
if (input.startsWith("workspace:")) {
|
|
43
|
+
const parsed = parseFqn(input.slice("workspace:".length));
|
|
44
|
+
if (Result.isFailure(parsed))
|
|
45
|
+
return Option.none();
|
|
46
|
+
return Option.some(wrap({
|
|
47
|
+
pattern: "workspace-pattern-input",
|
|
48
|
+
owner: parsed.success.owner,
|
|
49
|
+
type: parsed.success.type,
|
|
50
|
+
name: parsed.success.name,
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
// 3. Registry source, including an explicit configured source name. This
|
|
54
|
+
// must be intercepted before URL parsing because URL accepts arbitrary
|
|
55
|
+
// opaque schemes such as `agentxm:`.
|
|
56
|
+
const registry = parseSourceQualifiedRegistrySourcePatternParts(input);
|
|
57
|
+
if (registry !== undefined) {
|
|
58
|
+
return Option.some(wrap({
|
|
59
|
+
pattern: "registry-pattern-input",
|
|
60
|
+
sourceName: registry.sourceName,
|
|
61
|
+
type: Option.fromUndefinedOr(registry.type),
|
|
62
|
+
owner: registry.owner,
|
|
63
|
+
name: Option.fromUndefinedOr(registry.name),
|
|
64
|
+
versionRange: Option.fromUndefinedOr(registry.versionRange),
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
// 4. Shorthand prefix (github:..., gitlab:..., etc.) — must check before URL
|
|
68
|
+
const colonIndex = input.indexOf(":");
|
|
69
|
+
if (colonIndex > 0 && SHORTHAND_PREFIXES.has(input.slice(0, colonIndex))) {
|
|
70
|
+
return Option.some(wrap({
|
|
71
|
+
pattern: "shorthand-input",
|
|
72
|
+
prefix: input.slice(0, colonIndex),
|
|
73
|
+
remainingInput: input.slice(colonIndex + 1),
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
// 5. File path — must check before URL (e.g. `C:/path` is a valid URL with scheme `c:`)
|
|
77
|
+
if (LOCAL_PATH_PATTERN.test(input)) {
|
|
78
|
+
return Option.some(wrap({ pattern: "file-path-pattern", path: input }));
|
|
79
|
+
}
|
|
80
|
+
// 6. URL
|
|
81
|
+
try {
|
|
82
|
+
const url = new URL(input);
|
|
83
|
+
if (url.protocol === "file:") {
|
|
84
|
+
return Option.some(wrap({ pattern: "file-path-pattern", path: url.pathname }));
|
|
85
|
+
}
|
|
86
|
+
return Option.some(wrap({ pattern: "url-input", url }));
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// Not a URL
|
|
90
|
+
}
|
|
91
|
+
// 7. Slash pattern (`owner/repo` or `owner/repo/path`)
|
|
92
|
+
if (input.includes("/")) {
|
|
93
|
+
const segments = input.split("/");
|
|
94
|
+
const first = segments.at(0);
|
|
95
|
+
const second = segments.at(1);
|
|
96
|
+
if (first !== undefined &&
|
|
97
|
+
second !== undefined &&
|
|
98
|
+
segments.length >= 2 &&
|
|
99
|
+
NAME_PATTERN.test(first) &&
|
|
100
|
+
NAME_PATTERN.test(second) &&
|
|
101
|
+
segments.slice(2).every((s) => s.length > 0 && s !== "..")) {
|
|
102
|
+
const remaining = segments.slice(2).join("/");
|
|
103
|
+
return Option.some(wrap({
|
|
104
|
+
pattern: "slash-pattern",
|
|
105
|
+
first,
|
|
106
|
+
second,
|
|
107
|
+
third: remaining.length === 0 ? Option.none() : Option.some(remaining),
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
return Option.none();
|
|
111
|
+
}
|
|
112
|
+
// 8. Glob pattern (contains `*` wildcard)
|
|
113
|
+
if (input.includes("*")) {
|
|
114
|
+
return Option.some(wrap({ pattern: "glob-input", value: input }));
|
|
115
|
+
}
|
|
116
|
+
// 9. Simple name (alphanumeric with hyphens, no leading/trailing hyphen)
|
|
117
|
+
if (NAME_PATTERN.test(input)) {
|
|
118
|
+
return Option.some(wrap({ pattern: "name-input", name: input }));
|
|
119
|
+
}
|
|
120
|
+
return Option.none();
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source printer for canonical shorthand strings.
|
|
3
|
+
*
|
|
4
|
+
* @experimental This API is unstable and may change without notice.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import type { SourceParams } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Print source params as their canonical shorthand string.
|
|
10
|
+
*
|
|
11
|
+
* @experimental This API is unstable and may change without notice.
|
|
12
|
+
*/
|
|
13
|
+
export declare const printSourceParams: (source: SourceParams) => string;
|
|
14
|
+
//# sourceMappingURL=printer.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source printer for canonical shorthand strings.
|
|
3
|
+
*
|
|
4
|
+
* @experimental This API is unstable and may change without notice.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import * as Option from "effect/Option";
|
|
8
|
+
import { formatFqn } from "../extensions/fqn.js";
|
|
9
|
+
import { printAzureReposSource, printBitbucketSource, printGitHubSource, printGitLabSource, printLocalSource, } from "./forge-grammar.js";
|
|
10
|
+
/**
|
|
11
|
+
* Print source params as their canonical shorthand string.
|
|
12
|
+
*
|
|
13
|
+
* @experimental This API is unstable and may change without notice.
|
|
14
|
+
*/
|
|
15
|
+
export const printSourceParams = (source) => {
|
|
16
|
+
switch (source.type) {
|
|
17
|
+
case "github":
|
|
18
|
+
return printGitHubSource(source, source.sourceName ?? ("name" in source ? String(source.name) : "github"));
|
|
19
|
+
case "gitlab":
|
|
20
|
+
return printGitLabSource(source, source.sourceName ?? ("name" in source ? String(source.name) : "gitlab"));
|
|
21
|
+
case "bitbucket":
|
|
22
|
+
return printBitbucketSource(source, source.sourceName ?? ("name" in source ? String(source.name) : "bitbucket"));
|
|
23
|
+
case "azurerepos":
|
|
24
|
+
return printAzureReposSource(source, source.sourceName ?? ("name" in source ? String(source.name) : "azurerepos"));
|
|
25
|
+
case "local":
|
|
26
|
+
return printLocalSource(source);
|
|
27
|
+
case "git": {
|
|
28
|
+
const url = new URL(source.url.href);
|
|
29
|
+
url.hash = Option.getOrElse(source.ref, () => "");
|
|
30
|
+
return url.href;
|
|
31
|
+
}
|
|
32
|
+
case "registry": {
|
|
33
|
+
return source.sourceName ?? ("name" in source ? String(source.name) : "agentxm");
|
|
34
|
+
}
|
|
35
|
+
case "inline":
|
|
36
|
+
return "inline";
|
|
37
|
+
case "workspace":
|
|
38
|
+
return `workspace:${formatFqn({
|
|
39
|
+
owner: source.owner,
|
|
40
|
+
type: source.extensionType,
|
|
41
|
+
name: source.name,
|
|
42
|
+
})}`;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=printer.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branded string for content source hashes.
|
|
3
|
+
*
|
|
4
|
+
* A `SourceHash` is an advisory change-detection marker: the SHA-256 of
|
|
5
|
+
* canonical content captured at install/enable time. It powers
|
|
6
|
+
* created/updated/unchanged reporting and drift hints. It is NOT a tamper
|
|
7
|
+
* seal — installed canonical content is workspace-owned and may be
|
|
8
|
+
* rewritten by content-preserving tools (formatters, line-ending
|
|
9
|
+
* normalization) after install, so a stored hash can legitimately go stale.
|
|
10
|
+
* Consumers must never hard-fail on a mismatch; supply-chain integrity is
|
|
11
|
+
* enforced separately by verifying registry archive SRI hashes at download
|
|
12
|
+
* time.
|
|
13
|
+
*
|
|
14
|
+
* @experimental This API is unstable and may change without notice.
|
|
15
|
+
*/
|
|
16
|
+
import * as Schema from "effect/Schema";
|
|
17
|
+
export declare const SourceHashSchema: Schema.brand<Schema.String, "SourceHash">;
|
|
18
|
+
/**
|
|
19
|
+
* Branded SourceHash type.
|
|
20
|
+
*
|
|
21
|
+
* @experimental This API is unstable and may change without notice.
|
|
22
|
+
*/
|
|
23
|
+
export type SourceHash = Schema.Schema.Type<typeof SourceHashSchema>;
|
|
24
|
+
//# sourceMappingURL=source-hash.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branded string for content source hashes.
|
|
3
|
+
*
|
|
4
|
+
* A `SourceHash` is an advisory change-detection marker: the SHA-256 of
|
|
5
|
+
* canonical content captured at install/enable time. It powers
|
|
6
|
+
* created/updated/unchanged reporting and drift hints. It is NOT a tamper
|
|
7
|
+
* seal — installed canonical content is workspace-owned and may be
|
|
8
|
+
* rewritten by content-preserving tools (formatters, line-ending
|
|
9
|
+
* normalization) after install, so a stored hash can legitimately go stale.
|
|
10
|
+
* Consumers must never hard-fail on a mismatch; supply-chain integrity is
|
|
11
|
+
* enforced separately by verifying registry archive SRI hashes at download
|
|
12
|
+
* time.
|
|
13
|
+
*
|
|
14
|
+
* @experimental This API is unstable and may change without notice.
|
|
15
|
+
*/
|
|
16
|
+
import * as Schema from "effect/Schema";
|
|
17
|
+
export const SourceHashSchema = Schema.String.pipe(Schema.brand("SourceHash")).annotate({
|
|
18
|
+
description: "Advisory SHA-256 change-detection marker of canonical content at install time. " +
|
|
19
|
+
"Not a tamper guarantee: installed content is workspace-owned and may be rewritten " +
|
|
20
|
+
"by content-preserving tools after install.",
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=source-hash.js.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source provider abstraction for unified extension discovery and fetching.
|
|
3
|
+
*
|
|
4
|
+
* Defines the `SourceHostProvider` interface that all source types implement,
|
|
5
|
+
* along with supporting types for search criteria, discovery results, and errors.
|
|
6
|
+
*
|
|
7
|
+
* @experimental This API is unstable and may change without notice.
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import type * as Duration from "effect/Duration";
|
|
11
|
+
import type * as Effect from "effect/Effect";
|
|
12
|
+
import type * as Option from "effect/Option";
|
|
13
|
+
import type { ExtensionType, Handle } from "../extensions/index.js";
|
|
14
|
+
import type { ExtensionRef } from "../extensions/refs/extension-ref.js";
|
|
15
|
+
import type { Source } from "./types.js";
|
|
16
|
+
import type { ReleaseAgeEvaluation, ReleaseAgeEvidence, ReleaseAgeExemption } from "../extensions/release-age.js";
|
|
17
|
+
/**
|
|
18
|
+
* Search criteria passed to `find` -- independent of source identity.
|
|
19
|
+
*
|
|
20
|
+
* - `names`: extension names to match (empty = all)
|
|
21
|
+
* - `type`: findable extension type filter or `"*"` for all
|
|
22
|
+
* - `versionRange`: optional version constraint for registry-backed lookups
|
|
23
|
+
*
|
|
24
|
+
* @experimental This API is unstable and may change without notice.
|
|
25
|
+
*/
|
|
26
|
+
export interface FindOptions {
|
|
27
|
+
readonly names: ReadonlyArray<string>;
|
|
28
|
+
readonly type: ExtensionType | "*";
|
|
29
|
+
/** Registry owner filter (e.g. "@acme"). */
|
|
30
|
+
readonly owner: Option.Option<Handle>;
|
|
31
|
+
readonly versionRange: Option.Option<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Optional minimum age a registry release must have before it is selectable.
|
|
34
|
+
* Omitted for explicit attended installs.
|
|
35
|
+
*/
|
|
36
|
+
readonly minimumReleaseAge?: Option.Option<Duration.Duration>;
|
|
37
|
+
}
|
|
38
|
+
export interface NamedRegistryFindOptions {
|
|
39
|
+
readonly name: string;
|
|
40
|
+
readonly type: ExtensionType;
|
|
41
|
+
readonly owner: Handle;
|
|
42
|
+
readonly versionRange: Option.Option<string>;
|
|
43
|
+
readonly releaseAgeEvaluation: ReleaseAgeEvaluation;
|
|
44
|
+
/** Accepted immutable Registry identity that unattended resolution must not move behind. */
|
|
45
|
+
readonly accepted?: {
|
|
46
|
+
readonly version: string;
|
|
47
|
+
readonly publisherBindingId: string;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export type NamedRegistryResolution = {
|
|
51
|
+
readonly kind: "selected";
|
|
52
|
+
readonly target: string;
|
|
53
|
+
readonly ref: Extract<ExtensionRef, {
|
|
54
|
+
readonly refType: "registry";
|
|
55
|
+
}>;
|
|
56
|
+
readonly newerHeld?: ReleaseAgeEvidence;
|
|
57
|
+
} | {
|
|
58
|
+
readonly kind: "exempted";
|
|
59
|
+
readonly target: string;
|
|
60
|
+
readonly ref: Extract<ExtensionRef, {
|
|
61
|
+
readonly refType: "registry";
|
|
62
|
+
}>;
|
|
63
|
+
readonly bypassed: ReleaseAgeEvidence;
|
|
64
|
+
readonly exemption: ReleaseAgeExemption;
|
|
65
|
+
} | {
|
|
66
|
+
readonly kind: "not_found";
|
|
67
|
+
readonly target: string;
|
|
68
|
+
} | {
|
|
69
|
+
readonly kind: "version_unsatisfied";
|
|
70
|
+
readonly target: string;
|
|
71
|
+
readonly requestedRange: string;
|
|
72
|
+
} | {
|
|
73
|
+
readonly kind: "policy_held";
|
|
74
|
+
readonly target: string;
|
|
75
|
+
readonly requestedRange?: string;
|
|
76
|
+
readonly candidate: ReleaseAgeEvidence;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Materialized extension files ready for installation.
|
|
80
|
+
*
|
|
81
|
+
* Returned by `fetch` after files have been prepared.
|
|
82
|
+
*
|
|
83
|
+
* @experimental This API is unstable and may change without notice.
|
|
84
|
+
*/
|
|
85
|
+
export interface ExtensionFiles {
|
|
86
|
+
/** Absolute path to directory containing extension files. */
|
|
87
|
+
readonly directory: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Source host provider that unifies how all source types are accessed.
|
|
91
|
+
*
|
|
92
|
+
* Each source type is implemented as a provider with `match`, `find` and `fetch`
|
|
93
|
+
* capabilities. The `R` parameter captures Effect requirements for the
|
|
94
|
+
* provider's operations.
|
|
95
|
+
*
|
|
96
|
+
* @typeParam S - The specific `Source` variant this provider handles.
|
|
97
|
+
* @typeParam R - Effect requirements for provider operations.
|
|
98
|
+
* @typeParam E - Typed failure channel for provider operations.
|
|
99
|
+
*
|
|
100
|
+
* @experimental This API is unstable and may change without notice.
|
|
101
|
+
*/
|
|
102
|
+
export interface SourceHostProvider<S extends Source = Source, R = never, E = never> {
|
|
103
|
+
/** Source type discriminator matching `S["type"]`. */
|
|
104
|
+
readonly type: S["type"];
|
|
105
|
+
/** Check if a URL belongs to this provider. */
|
|
106
|
+
readonly match: (url: URL) => Effect.Effect<boolean, E, R>;
|
|
107
|
+
/** Discover extensions at the given source matching the search criteria. */
|
|
108
|
+
readonly find: (source: S, options: FindOptions) => Effect.Effect<ReadonlyArray<ExtensionRef>, E, R>;
|
|
109
|
+
/** Fetch and materialize extension files for a discovered ref. */
|
|
110
|
+
readonly fetch: (source: S, ref: ExtensionRef) => Effect.Effect<ExtensionFiles, E, R>;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=source-host-provider.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source provider abstraction for unified extension discovery and fetching.
|
|
3
|
+
*
|
|
4
|
+
* Defines the `SourceHostProvider` interface that all source types implement,
|
|
5
|
+
* along with supporting types for search criteria, discovery results, and errors.
|
|
6
|
+
*
|
|
7
|
+
* @experimental This API is unstable and may change without notice.
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=source-host-provider.js.map
|