@passioncode-ai/fabric-agent-adapter 0.3.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,42 @@
1
+ # Changelog
2
+
3
+ ## 0.3.1 - 2026-08-27
4
+
5
+ - Fix the executable bit on `bin/fabric-agent-adapter.js` and `install.sh`: the
6
+ packed tarball shipped them non-executable, so `npx` failed with exit 126.
7
+ Caught by the release workflow's own packed-tarball smoke — the gate this
8
+ release added, doing its job on its first run.
9
+
10
+ ## 0.3.0 - 2026-08-27
11
+
12
+ - Ship the npm channel: the package is `@passioncode-ai/fabric-agent-adapter`,
13
+ an installer CLI (`bin/fabric-agent-adapter.js`) plus the plugin tree, with
14
+ `install.sh` as the POSIX fallback.
15
+ - Add toggleable release automation (`release.yml`): a `v*` tag runs validate,
16
+ checks tag reachability and version sync, cuts the GitHub release from the
17
+ CHANGELOG section, smoke-tests the packed tarball from a clean cwd (the
18
+ repository is private, so the tarball — not `npx github:` — is the artifact
19
+ under test), and publishes to npm with provenance. Armed by RELEASE_ENABLED
20
+ and PUBLISH_NPMJS repository variables.
21
+ - Extend the validator: package.json joins the version sync, the files
22
+ whitelist and scoped-access rules are checked, and the new files are required.
23
+
24
+ ## 0.2.0 - 2026-08-27
25
+
26
+ - Add the `creating-fabric-agents` skill: the intake grill (capability, named
27
+ consumer, workflow-or-agent, profile, effect and tenancy declarations), the
28
+ knowledge intake whose recorded traps become planted eval fixtures, skeleton
29
+ and scaffold reuse of the pinned contract machinery, two-clock evals, and the
30
+ canary-binding expectation in the conformance report.
31
+ - Point the adapting skill's boundary at its new sibling for greenfield requests.
32
+ - Rework the repository validator for multiple skills with per-skill trigger and
33
+ scenario evals.
34
+
35
+ ## 0.1.0 - 2026-08-27
36
+
37
+ - Add the `adapting-projects-to-fabric` skill.
38
+ - Add evidence-based MCP, A2A, and local-runner profile selection.
39
+ - Add a standard-library project inspector, non-destructive scaffolder, and checker.
40
+ - Add contract pinning and independent conformance gate reporting.
41
+ - Add trigger/scenario evals, unit tests, repository validator, and plugin packaging.
42
+
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 passioncode-ai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # Fabric Agent Adapter
2
+
3
+ [![npm](https://img.shields.io/npm/v/%40passioncode-ai%2Ffabric-agent-adapter)](https://www.npmjs.com/package/@passioncode-ai/fabric-agent-adapter)
4
+ [![validate](https://github.com/passioncode-ai/fabric-agent-adapter/actions/workflows/validate.yml/badge.svg)](https://github.com/passioncode-ai/fabric-agent-adapter/actions/workflows/validate.yml)
5
+ [![license](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6
+
7
+ Private, portable Agent Skill for adapting an existing agent project to the
8
+ [Fabric Agent Contract](https://github.com/passioncode-ai/fabric-agent-contract).
9
+
10
+ It helps an agent author:
11
+
12
+ - inspect the project's stable integration surfaces without executing it;
13
+ - choose A2A `1.0`, MCP `2026-07-28`, or `fabric-local-runner/0.1` per capability;
14
+ - scaffold a version-pinned provider manifest, schemas, safe fixture, probes, and
15
+ conformance report;
16
+ - distinguish structural validation from live protocol negotiation, semantic
17
+ admission, and project binding.
18
+
19
+ The skill never treats generated files as admission. Fabric contract `0.1.0` does not
20
+ yet ship the host registry/runtime needed to connect and authorize a live provider.
21
+
22
+ ## Install
23
+
24
+ The repository is private; the npm package is public. The npm path needs no GitHub access — the GitHub paths do.
25
+
26
+ npm — no GitHub access required:
27
+
28
+ ```bash
29
+ npx @passioncode-ai/fabric-agent-adapter # installs both skills into ~/.claude/skills
30
+ ```
31
+
32
+ Generic Agent Skills clients:
33
+
34
+ ```bash
35
+ npx skills add passioncode-ai/fabric-agent-adapter --skill adapting-projects-to-fabric
36
+ npx skills add passioncode-ai/fabric-agent-adapter --skill creating-fabric-agents
37
+ ```
38
+
39
+ Claude Code plugin marketplace:
40
+
41
+ ```text
42
+ /plugin marketplace add passioncode-ai/fabric-agent-adapter
43
+ /plugin install fabric-agent-adapter@fabric-agent-adapter
44
+ ```
45
+
46
+ ## Use
47
+
48
+ Ask the agent explicitly:
49
+
50
+ ```text
51
+ Adapt this project for Fabric compatibility. Inspect it, choose the profile per
52
+ capability, scaffold the provider bundle, and report every conformance gate.
53
+ ```
54
+
55
+ Or, for an agent that does not exist yet:
56
+
57
+ ```text
58
+ Create a new fabric-compatible agent for <capability>; its consumer is <who calls it>.
59
+ ```
60
+
61
+ Or run the deterministic helper directly:
62
+
63
+ ```bash
64
+ SKILL_DIR=plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric
65
+ python3 "$SKILL_DIR/scripts/adapt_project.py" inspect /path/to/project --json
66
+ python3 "$SKILL_DIR/scripts/adapt_project.py" scaffold /path/to/project \
67
+ --profile mcp \
68
+ --provider-id https://agents.example/providers/demo \
69
+ --provider-name "Demo provider" \
70
+ --capability-id https://agents.example/capabilities/demo \
71
+ --capability-name demo.run \
72
+ --schema-base https://agents.example/fabric
73
+ python3 "$SKILL_DIR/scripts/adapt_project.py" check /path/to/project \
74
+ --contract /path/to/fabric-agent-contract --json
75
+ ```
76
+
77
+ Scaffolding is non-destructive by default. It writes only the paths declared in the
78
+ [delivery brief](docs/evidence/specs/2026-08-27-brief.md) and refuses collisions.
79
+
80
+ ## Validate this repository
81
+
82
+ ```bash
83
+ python3 -m unittest discover -s test -v
84
+ python3 test/validate.py
85
+ claude plugin validate ./plugins/fabric-agent-adapter --strict
86
+ claude plugin validate . --strict
87
+ ```
88
+
89
+ ## Contract pin
90
+
91
+ - version: `0.1.0`
92
+ - commit: `20a818e648a4c09a60df0126d11626922e8b9094`
93
+
94
+ The contract repository is normative. Updating the pin requires a new adapter release,
95
+ fixture review, and a complete validation run.
96
+
package/SECURITY.md ADDED
@@ -0,0 +1,10 @@
1
+ # Security
2
+
3
+ Report vulnerabilities privately to the maintainers of the `passioncode-ai`
4
+ organization. Do not open a public issue containing credentials, private provider URLs,
5
+ or customer project data.
6
+
7
+ The adapter must not write secret values to manifests, fixtures, probes, logs, or command
8
+ arguments. Generated and external provider outputs are untrusted. Live probes must be
9
+ bounded and non-publishing until explicit scoped grants exist in a project binding.
10
+
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * fabric-agent-adapter installer CLI.
4
+ *
5
+ * Installs every skill this plugin ships into ~/.claude/skills/<name>
6
+ * (same layout as install.sh). Idempotent: an existing install is skipped unless
7
+ * --force. Zero dependencies.
8
+ *
9
+ * For other agents (Cursor, Codex, 70+) use:
10
+ * npx skills add passioncode-ai/fabric-agent-adapter (needs GitHub access —
11
+ * the repository is private; the npm package needs none)
12
+ */
13
+ 'use strict';
14
+
15
+ const fs = require('fs');
16
+ const path = require('path');
17
+ const os = require('os');
18
+
19
+ const ROOT = path.resolve(__dirname, '..');
20
+ const REPO = 'passioncode-ai/fabric-agent-adapter';
21
+
22
+ function usage() {
23
+ console.log(`fabric-agent-adapter installer
24
+
25
+ Usage:
26
+ npx @passioncode-ai/fabric-agent-adapter [--force]
27
+ install every skill this plugin ships into ~/.claude
28
+ (skip existing unless --force)
29
+ npx @passioncode-ai/fabric-agent-adapter --help
30
+
31
+ Other install paths:
32
+ Claude Code plugin: /plugin marketplace add ${REPO}
33
+ /plugin install fabric-agent-adapter@fabric-agent-adapter
34
+ Any agent (70+): npx skills add ${REPO} (private repo — GitHub auth required)`);
35
+ }
36
+
37
+ function copyDir(src, dest) {
38
+ fs.mkdirSync(dest, { recursive: true });
39
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
40
+ const s = path.join(src, entry.name);
41
+ const d = path.join(dest, entry.name);
42
+ if (entry.isDirectory()) copyDir(s, d);
43
+ else fs.copyFileSync(s, d);
44
+ }
45
+ }
46
+
47
+ function installOne(label, src, dest, force) {
48
+ if (fs.existsSync(dest) && !force) {
49
+ console.log(`skip: ${label} already installed at ${dest} (rerun with --force to overwrite)`);
50
+ return;
51
+ }
52
+ fs.rmSync(dest, { recursive: true, force: true });
53
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
54
+ copyDir(src, dest);
55
+ console.log(`Installed ${label} -> ${dest}`);
56
+ }
57
+
58
+ function main(argv) {
59
+ const args = argv.slice(2);
60
+ if (args.includes('--help') || args.includes('-h')) {
61
+ usage();
62
+ return 0;
63
+ }
64
+ const force = args.includes('--force');
65
+ const unknown = args.filter((a) => a !== '--force');
66
+ if (unknown.length) {
67
+ console.error(`unknown argument(s): ${unknown.join(' ')}`);
68
+ usage();
69
+ return 2;
70
+ }
71
+
72
+ const skillRoot = path.join(ROOT, 'plugins/fabric-agent-adapter/skills');
73
+ if (!fs.existsSync(skillRoot)) {
74
+ console.error(`error: skill sources missing at ${skillRoot} — corrupted package?`);
75
+ return 1;
76
+ }
77
+
78
+ // Iterate rather than name one skill: a skill added to the plugin must not
79
+ // require an installer change to reach anybody.
80
+ const names = fs
81
+ .readdirSync(skillRoot, { withFileTypes: true })
82
+ .filter((e) => e.isDirectory())
83
+ .map((e) => e.name)
84
+ .sort();
85
+ if (!names.length) {
86
+ console.error(`error: no skills found under ${skillRoot} — corrupted package?`);
87
+ return 1;
88
+ }
89
+
90
+ const home = os.homedir();
91
+ for (const name of names) {
92
+ installOne(
93
+ `${name} skill`,
94
+ path.join(skillRoot, name),
95
+ path.join(home, '.claude', 'skills', name),
96
+ force
97
+ );
98
+ }
99
+ console.log('Restart your agent — skills load at session start.');
100
+ return 0;
101
+ }
102
+
103
+ process.exit(main(process.argv));
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@passioncode-ai/fabric-agent-adapter",
3
+ "version": "0.3.1",
4
+ "description": "Create new Fabric-compatible agents and adapt existing projects to the Fabric Agent Contract — evidence-backed MCP, A2A, or local-runner provider bundles. This package is the installer CLI.",
5
+ "scripts": {
6
+ "test": "python3 test/validate.py && python3 -m unittest discover -s test -q"
7
+ },
8
+ "bin": {
9
+ "fabric-agent-adapter": "bin/fabric-agent-adapter.js"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "files": [
15
+ "bin",
16
+ "plugins",
17
+ "README.md",
18
+ "LICENSE",
19
+ "CHANGELOG.md",
20
+ "SECURITY.md"
21
+ ],
22
+ "repository": "github:passioncode-ai/fabric-agent-adapter",
23
+ "homepage": "https://github.com/passioncode-ai/fabric-agent-adapter",
24
+ "license": "MIT",
25
+ "author": {
26
+ "name": "passioncode-ai",
27
+ "url": "https://github.com/passioncode-ai"
28
+ },
29
+ "engines": {
30
+ "node": ">=16"
31
+ },
32
+ "keywords": [
33
+ "fabric",
34
+ "agent",
35
+ "compatibility",
36
+ "mcp",
37
+ "a2a",
38
+ "local-runner",
39
+ "provider",
40
+ "conformance",
41
+ "claude-code",
42
+ "skill"
43
+ ]
44
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
+ "name": "fabric-agent-adapter",
4
+ "displayName": "Fabric Agent Adapter",
5
+ "description": "Create new Fabric-compatible agents and adapt existing projects to the Fabric Agent Contract through evidence-backed MCP, A2A, or local-runner provider bundles.",
6
+ "version": "0.3.1",
7
+ "author": {
8
+ "name": "passioncode-ai",
9
+ "url": "https://github.com/passioncode-ai"
10
+ },
11
+ "homepage": "https://github.com/passioncode-ai/fabric-agent-adapter",
12
+ "repository": "https://github.com/passioncode-ai/fabric-agent-adapter",
13
+ "license": "MIT",
14
+ "keywords": [
15
+ "fabric",
16
+ "agent",
17
+ "compatibility",
18
+ "mcp",
19
+ "a2a",
20
+ "local-runner",
21
+ "provider",
22
+ "conformance"
23
+ ]
24
+ }
25
+
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: adapting-projects-to-fabric
3
+ description: Use when adapting an existing agent, MCP server, A2A peer, HTTP service, or terminal CLI to the Fabric Agent Contract—choosing MCP/A2A/local-runner, scaffolding a provider bundle, or checking Fabric compatibility; also for «подключить проект к Fabric» or «сделать агента совместимым с Fabric». NOT for building the Fabric host/orchestrator, configuring an MCP client, or a brand-new agent — that is creating-fabric-agents.
4
+ license: MIT
5
+ compatibility: Requires filesystem access and Python 3.9+. Exact schema checks additionally need git, Node.js, pnpm, and the pinned private fabric-agent-contract checkout. Works without those tools in an explicitly degraded structural-check mode.
6
+ metadata:
7
+ author: passioncode-ai
8
+ version: "0.3.1"
9
+ contract-version: "0.1.0"
10
+ contract-commit: "20a818e648a4c09a60df0126d11626922e8b9094"
11
+ ---
12
+
13
+ # Adapting projects to Fabric
14
+
15
+ Turn an existing stable interface into a proposed Fabric provider bundle, then prove
16
+ only the compatibility gates for which receipts exist. The Fabric Agent Contract is
17
+ normative; this skill is an authoring workflow pinned to one immutable revision.
18
+
19
+ ## Boundary
20
+
21
+ Use this skill to adapt or assess a provider project. Do not use it to:
22
+
23
+ - design the Fabric host, registry, scheduler, admission service, or project binding runtime;
24
+ - add an MCP server to Claude Code, Codex, or an agent gateway;
25
+ - design a new agent from scratch — that is the sibling skill creating-fabric-agents;
26
+ - claim admission merely because generated files or a valid manifest exist.
27
+
28
+ If the project has only a browser interface and no stable API, MCP/A2A surface, or CLI,
29
+ stop with that missing prerequisite. Browser automation is not a base Fabric profile.
30
+
31
+ ## Required inputs
32
+
33
+ Establish these values from the request or target repository:
34
+
35
+ - project root;
36
+ - the one capability being adapted;
37
+ - stable provider and capability URIs;
38
+ - who owns the task lifecycle;
39
+ - the interface Fabric can actually reach;
40
+ - expected inputs, outputs, effects, data classes, and safe probe behaviour;
41
+ - a public or private immutable base URI for published schemas and fixtures.
42
+
43
+ Do not ask for all fields before inspecting. Discover safe facts first and ask only
44
+ for decisions that remain material. Never request or copy secret values into the bundle.
45
+
46
+ ## Workflow
47
+
48
+ ### 1. Inspect without execution
49
+
50
+ Resolve this skill's directory and run:
51
+
52
+ ```bash
53
+ python3 <skill-dir>/scripts/adapt_project.py inspect <project-root> --json
54
+ ```
55
+
56
+ The inspector samples repository files but does not execute the project. Verify its
57
+ evidence manually. Existing runtime documentation and code outrank filename heuristics.
58
+
59
+ If the inspector returns `undetermined`, answer its lifecycle question before creating
60
+ files. A repository can expose multiple surfaces; choose a profile per capability, not
61
+ per vendor. Load [profile selection](references/profile-selection.md) whenever choosing
62
+ or reviewing a profile.
63
+
64
+ ### 2. Pin the normative contract
65
+
66
+ Use exactly:
67
+
68
+ - contract version `0.1.0`;
69
+ - repository `https://github.com/passioncode-ai/fabric-agent-contract`;
70
+ - commit `20a818e648a4c09a60df0126d11626922e8b9094`.
71
+
72
+ Read the pinned contract's guide
73
+ `docs/guides/connecting-compatible-agents.md`, the selected profile specification, and
74
+ the referenced JSON Schemas before implementing protocol details. If the private checkout
75
+ is unavailable, continue only through local structure and mark exact schema validation
76
+ `NOT_RUN`; do not reconstruct missing normative rules from memory.
77
+
78
+ ### 3. Scaffold the provider bundle
79
+
80
+ Load [provider bundle](references/provider-bundle.md) before creating or mapping files.
81
+ Then run one explicit profile command:
82
+
83
+ ```bash
84
+ python3 <skill-dir>/scripts/adapt_project.py scaffold <project-root> \
85
+ --profile mcp \
86
+ --provider-id https://agents.example/providers/example \
87
+ --provider-name "Example provider" \
88
+ --capability-id https://agents.example/capabilities/example \
89
+ --capability-name example.run \
90
+ --schema-base https://agents.example/fabric
91
+ ```
92
+
93
+ Valid profiles are `mcp`, `a2a`, and `local-runner`. The helper creates only the locked
94
+ target paths. It refuses any collision. Do not use `--force` unless the user explicitly
95
+ authorizes replacement after the exact conflicting files and diff are shown.
96
+
97
+ The generated zero hash, `.invalid` endpoints, `replace-me` values, generic schemas, and
98
+ assertions are deliberate blockers. Replace them with implementation-backed facts. A
99
+ template that still contains one is not ready for admission.
100
+
101
+ ### 4. Implement the adapter seam
102
+
103
+ Preserve the chosen ownership boundary:
104
+
105
+ - A2A maps the provider's remote task, progress, artifact, cancellation, and terminal
106
+ states; Fabric does not take over its internal loop.
107
+ - MCP exposes bounded tools/resources/prompts while Fabric owns planning and retries.
108
+ - Local runner maps typed input, executable identity, result location, cancellation,
109
+ heartbeat, and partial results without relying on ambient accounts.
110
+
111
+ Keep model selection and provider-internal reasoning outside the Fabric contract. Expose
112
+ typed outcomes, evidence, artifacts, and protocol-visible state—not chain-of-thought.
113
+ Treat all provider output as untrusted until schemas and semantic assertions pass.
114
+
115
+ ### 5. Make probes safe and meaningful
116
+
117
+ For each capability, create at least one bounded fixture that:
118
+
119
+ - can run repeatedly;
120
+ - has an explicit timeout;
121
+ - cannot publish, charge, message real recipients, or mutate production;
122
+ - validates the declared output shape;
123
+ - tests a semantic property a fake or wrong implementation would fail;
124
+ - preserves a typed partial/stopped result on timeout or cancellation.
125
+
126
+ A transport success is not semantic success. Assertions such as “returns JSON” are too
127
+ weak; assert the capability's intended meaning and evidence obligations.
128
+
129
+ ### 6. Run independent checks
130
+
131
+ First run local structure:
132
+
133
+ ```bash
134
+ python3 <skill-dir>/scripts/adapt_project.py check <project-root> --json
135
+ ```
136
+
137
+ When the exact contract checkout and dependencies are available, run:
138
+
139
+ ```bash
140
+ python3 <skill-dir>/scripts/adapt_project.py check <project-root> \
141
+ --contract /path/to/fabric-agent-contract --json
142
+ ```
143
+
144
+ Load [verification](references/verification.md) before interpreting or publishing the
145
+ result. Fix every local error. Fix every placeholder warning or record why the bundle is
146
+ still a draft. Do not convert `NOT_RUN` or `NOT_VERIFIED` to `PASS` without the named
147
+ runtime receipt.
148
+
149
+ ### 7. Update the conformance report
150
+
151
+ Update `fabric/FABRIC-CONFORMANCE.md` with dated receipts for:
152
+
153
+ 1. declaration shape;
154
+ 2. exact protocol negotiation;
155
+ 3. bounded semantic probes;
156
+ 4. project-binding readiness.
157
+
158
+ Include commands and exit codes, immutable endpoint or artifact identities, and explicit
159
+ unverified surfaces. If live Fabric admission/runtime does not yet exist, the last gates
160
+ remain `NOT VERIFIED`; the completed deliverable is an adaptation-ready provider bundle,
161
+ not a connected provider.
162
+
163
+ ## Completion format
164
+
165
+ Report:
166
+
167
+ - selected capability and profile, with lifecycle-owner evidence;
168
+ - created or changed files;
169
+ - contract version and commit;
170
+ - gate table with `PASS`, `FAIL`, `NOT_RUN`, or `NOT_VERIFIED`;
171
+ - remaining placeholders and blockers;
172
+ - the exact next command or runtime action.
173
+
174
+ Never summarize the outcome as “Fabric-compatible” unless all required admission gates
175
+ passed against a real provider and the project binding is valid.
@@ -0,0 +1,71 @@
1
+ # Profile selection
2
+
3
+ Load this reference when choosing or reviewing a profile for one capability.
4
+
5
+ ## Decision
6
+
7
+ ```text
8
+ Does a remote peer accept an outcome and own task progress, artifacts,
9
+ cancellation, and terminal state?
10
+ yes -> A2A 1.0
11
+ no -> Does Fabric call a bounded remote or stdio capability?
12
+ yes -> MCP 2026-07-28
13
+ no -> Does Fabric start an installed terminal process?
14
+ yes -> fabric-local-runner/0.1
15
+ no -> unsupported until a stable surface exists
16
+ ```
17
+
18
+ The protocol is selected per capability. A provider may expose several capabilities
19
+ through different profiles, but one capability cannot change profile during a pinned run.
20
+
21
+ ## A2A
22
+
23
+ Use when the remote system owns an opaque autonomous task lifecycle. Require:
24
+
25
+ - HTTPS Agent Card and stable skill IDs;
26
+ - A2A `1.0` binding and authentication declaration;
27
+ - mapping for submitted, working, input-required, completed, failed, and cancelled states;
28
+ - artifact and evidence mapping;
29
+ - cancellation and safe semantic probes.
30
+
31
+ An ordinary job API may be wrapped as A2A only when the adapter faithfully owns these
32
+ task semantics. A long HTTP request alone is not proof of autonomy.
33
+
34
+ ## MCP
35
+
36
+ Use when Fabric owns planning, ordering, retries, and task completion while invoking
37
+ bounded provider features. Require:
38
+
39
+ - MCP `2026-07-28` over streamable HTTP or stdio;
40
+ - exact required feature names (`tool:`, `resource:`, or `prompt:`);
41
+ - typed inputs and outputs;
42
+ - idempotency and effect declarations;
43
+ - bounded feature-level probes.
44
+
45
+ An MCP server is a capability provider, not automatically an autonomous peer.
46
+
47
+ ## Local runner
48
+
49
+ Use when Fabric launches an installed process such as a coding CLI. Require:
50
+
51
+ - profile `fabric-local-runner/0.1`;
52
+ - stable `executableRef`, never a secret-bearing shell string;
53
+ - argument array and typed input mode;
54
+ - immutable result URI convention;
55
+ - signal or declared cancellation behaviour;
56
+ - heartbeat and partial-result behaviour;
57
+ - project-scoped account selection outside the manifest.
58
+
59
+ The user may choose the project's default terminal and override it per agent. Model choice
60
+ stays inside the selected agent/provider; the Fabric profile remains model-agnostic.
61
+
62
+ ## Reject or defer
63
+
64
+ Return `undetermined` or blocked when:
65
+
66
+ - more than one surface exists and the requested capability is unclear;
67
+ - task lifecycle ownership is not observable;
68
+ - the only integration surface is a browser UI;
69
+ - the provider cannot supply typed input/output boundaries;
70
+ - safe non-publishing probes cannot be defined.
71
+
@@ -0,0 +1,62 @@
1
+ # Provider bundle
2
+
3
+ Load this reference before scaffolding files or implementing the adapter mapping.
4
+
5
+ ## Files
6
+
7
+ | Path | Responsibility |
8
+ |---|---|
9
+ | `fabric-agent.json` | versioned provider identity, capabilities, effects, profile, and probes |
10
+ | `fabric-contract.lock.json` | normative repository, contract version, immutable commit, selected profile |
11
+ | `fabric/schemas/capability-input.schema.json` | provider-specific input boundary |
12
+ | `fabric/schemas/capability-output.schema.json` | provider-specific output boundary |
13
+ | `fabric/fixtures/admission-input.json` | bounded repeatable probe input |
14
+ | `fabric/probes/assertions.md` | semantic and safety properties checked by admission |
15
+ | `fabric/FABRIC-CONFORMANCE.md` | receipts and explicit unverified gates |
16
+
17
+ The layout packages an implementation; it does not replace the normative contract.
18
+
19
+ ## Manifest mapping
20
+
21
+ For every capability, establish:
22
+
23
+ - a stable provider URI, monotonic revision, immutable content hash, author, and identity method;
24
+ - a stable capability URI and semantic name independent of implementation or model;
25
+ - absolute, immutable input/output schema URIs;
26
+ - the real side-effect class and idempotency behaviour;
27
+ - every accepted data class;
28
+ - exactly one profile and exact revision;
29
+ - safe input fixture, output schema, timeout, effect ceiling, and semantic assertions.
30
+
31
+ Do not include tokens, passwords, cookies, account IDs selected from an ambient shell, raw
32
+ environment dumps, or chain-of-thought. A future project binding supplies allowlisted
33
+ secret references, account pools, grants, data policy, coordination, and checker policy.
34
+
35
+ ## Implementation seam
36
+
37
+ | Existing project | Adapter responsibility |
38
+ |---|---|
39
+ | Native MCP | map stable features directly and preserve MCP errors/cancellation |
40
+ | Native A2A | declare the Agent Card/skills and normalize artifacts/evidence |
41
+ | Terminal CLI | create typed input/result adapters and stable executable identity |
42
+ | Bounded HTTP API | wrap operations with MCP while Fabric owns the loop |
43
+ | Autonomous job API | map job lifecycle and artifacts to A2A tasks |
44
+ | Browser-only app | first add a supported stable API or CLI |
45
+
46
+ Completed and stopped invocations ultimately map to the Fabric result envelope: atomic
47
+ `done` claims, resolvable `proof`, pinned `scope`, `notVerified`, and immutable artifacts.
48
+ Provider-specific output schemas do not remove that normalization obligation.
49
+
50
+ ## Normative paths at the pinned commit
51
+
52
+ Read these from `fabric-agent-contract` rather than copying them here:
53
+
54
+ - `schemas/manifest.schema.json`
55
+ - `schemas/result.schema.json`
56
+ - `schemas/binding.schema.json`
57
+ - `docs/specification/profiles.md`
58
+ - `docs/specification/results-and-evidence.md`
59
+ - `docs/specification/registry.md`
60
+ - `docs/specification/versioning.md`
61
+ - `fixtures/positive/manifest-{mcp,a2a,local}.json`
62
+