@passioncode-ai/passioncode 0.1.4

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/LICENSE +22 -0
  3. package/README.md +69 -0
  4. package/SECURITY.md +42 -0
  5. package/bin/passioncode.js +65 -0
  6. package/family.json +45 -0
  7. package/lib/launcher.js +361 -0
  8. package/package.json +48 -0
  9. package/payload/.claude-plugin/marketplace.json +47 -0
  10. package/payload/manifest.json +77 -0
  11. package/payload/plugins/fabric-agent-adapter/.claude-plugin/plugin.json +24 -0
  12. package/payload/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/SKILL.md +175 -0
  13. package/payload/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/references/profile-selection.md +71 -0
  14. package/payload/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/references/provider-bundle.md +62 -0
  15. package/payload/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/references/verification.md +55 -0
  16. package/payload/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/scripts/adapt_project.py +537 -0
  17. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/SKILL.md +240 -0
  18. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/references/dashboard.md +32 -0
  19. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/references/events-and-notifications.md +44 -0
  20. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/references/lifecycle.md +63 -0
  21. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/references/migrating-a-service.md +32 -0
  22. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/references/protocol.md +83 -0
  23. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/references/surfaces-and-auth.md +58 -0
  24. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/check_service.py +373 -0
  25. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-service.mjs +380 -0
  26. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_service.py +663 -0
  27. package/payload/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/sample_service.py +226 -0
  28. package/payload/plugins/fabric-agent-adapter/skills/creating-fabric-agents/SKILL.md +126 -0
  29. package/payload/plugins/observatory-log/.claude-plugin/plugin.json +19 -0
  30. package/payload/plugins/observatory-log/hooks/ask-why.py +98 -0
  31. package/payload/plugins/observatory-log/hooks/hooks.json +31 -0
  32. package/payload/plugins/observatory-log/hooks/record-turn.sh +81 -0
  33. package/payload/plugins/observatory-log/hooks/session-start.sh +27 -0
  34. package/payload/plugins/observatory-log/skills/explaining-changes/SKILL.md +111 -0
  35. package/payload/plugins/observatory-log/skills/handling-secrets/SKILL.md +115 -0
  36. package/payload/plugins/observatory-log/skills/tracking-resources/SKILL.md +87 -0
  37. package/payload/plugins/passioncode/.claude-plugin/plugin.json +13 -0
  38. package/payload/plugins/passioncode/hooks/hooks.json +10 -0
  39. package/payload/plugins/passioncode/hooks/probe.js +23 -0
  40. package/payload/plugins/passioncode/hooks/session-start.js +45 -0
  41. package/payload/plugins/passioncode/hooks/update-check.js +126 -0
  42. package/payload/plugins/passioncode/trust.json +6 -0
@@ -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.4.2"
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
+
@@ -0,0 +1,55 @@
1
+ # Verification and verdicts
2
+
3
+ Load this reference before interpreting checks or writing a conformance claim.
4
+
5
+ ## Independent gates
6
+
7
+ | Gate | PASS requires | Does not prove |
8
+ |---|---|---|
9
+ | Local structure | expected files parse, lock matches, revision fields are exact, no forbidden secret-like fields | normative JSON Schema validity |
10
+ | Declaration shape | pinned contract validator accepts the real manifest | endpoint identity, reachability, or behaviour |
11
+ | Protocol negotiation | live provider accepts the exact MCP/A2A/local-runner revision and identity checks | semantic correctness |
12
+ | Semantic probes | bounded fixtures produce typed outputs and satisfy meaning/evidence assertions | authorization for a project |
13
+ | Binding readiness | admitted capability can be pinned with project context, pool, grants, policies, and checker | that a binding has been activated |
14
+
15
+ Use only `PASS`, `FAIL`, `NOT_RUN`, and `NOT_VERIFIED`:
16
+
17
+ - `NOT_RUN`: the check exists but its required tool, checkout, endpoint, or credential was unavailable.
18
+ - `NOT_VERIFIED`: no implemented verifier/runtime currently exists for the claim.
19
+ - Never relabel either as a warning-level pass.
20
+
21
+ ## Receipts
22
+
23
+ A receipt names what ran and what identity was tested:
24
+
25
+ - command and exit code;
26
+ - contract commit and schema ID;
27
+ - provider revision/content hash;
28
+ - endpoint or executable identity;
29
+ - fixture and immutable result/artifact URI;
30
+ - assertion results and unverified surfaces;
31
+ - admission and binding revisions when they exist.
32
+
33
+ Transport logs without semantic assertions are insufficient. A prose statement without a
34
+ resolvable receipt remains unverified.
35
+
36
+ ## Degraded operation
37
+
38
+ If the pinned contract checkout or its dependencies are absent:
39
+
40
+ 1. run local structure only;
41
+ 2. retain declaration shape as `NOT_RUN`;
42
+ 3. name the exact pinned checkout and command needed;
43
+ 4. continue implementation only as a draft.
44
+
45
+ If the Fabric host/admission runtime is absent, protocol, semantics, and binding remain
46
+ `NOT_VERIFIED`. Deliver the provider bundle and adapter tests, but do not claim it is
47
+ connected or admitted.
48
+
49
+ ## Replacement and rollback
50
+
51
+ Any manifest change produces a new provider revision and content hash. It must receive a
52
+ new admission decision and a new project-binding revision. Existing runs stay pinned.
53
+ Rollback creates another binding revision based on known-good immutable inputs; it never
54
+ rewrites history.
55
+