@passioncode-ai/fabric-agent-adapter 0.39.0 → 0.39.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 +47 -1
- package/README.md +16 -14
- package/bin/fabric-agent-adapter.js +6 -6
- package/package.json +1 -1
- package/plugins/fabric-agent-adapter/.claude-plugin/plugin.json +1 -1
- package/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/SKILL.md +13 -13
- package/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/references/dashboard-links.md +1 -1
- package/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/references/provider-entry.md +4 -4
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/SKILL.md +41 -41
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/demo.html +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/fabric-button.js +3 -3
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/fabric-dashboard.css +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/fabric-dashboard.js +2 -2
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/kit.json +9 -4
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/board.md +12 -12
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/dashboard-kit.md +4 -4
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/dashboard-links.md +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/dashboard.md +4 -4
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/delegation.md +13 -11
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/estate-record.md +10 -5
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/events-and-notifications.md +6 -6
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/interop.md +8 -6
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/lifecycle.md +26 -26
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/migrating-a-service.md +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/package.md +3 -2
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/profiles.md +10 -10
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/protocol.md +13 -13
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/remote-placement.md +4 -4
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/settings-backups.md +3 -3
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/surfaces-and-auth.md +5 -5
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/usage.md +5 -4
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/check_service.py +20 -45
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/dashboard_kit.py +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-board.mjs +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-delegation.mjs +2 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-package.mjs +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-service.mjs +28 -8
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_board.py +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_delegation.py +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_package.py +1 -1
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_service.py +34 -14
- package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/sample_service.py +1 -1
- package/plugins/fabric-agent-adapter/skills/creating-fabric-agents/SKILL.md +33 -33
- package/plugins/fabric-agent-adapter/skills/creating-fabric-agents/references/dashboard-links.md +1 -1
- package/plugins/fabric-agent-adapter/skills/creating-fabric-agents/references/resilience-and-autonomy.md +27 -27
- package/plugins/fabric-agent-adapter/skills/working-with-fabric/SKILL.md +31 -31
- package/plugins/fabric-agent-adapter/skills/working-with-fabric/references/project-board.md +9 -9
- package/plugins/fabric-agent-adapter/skills/working-with-fabric/references/session-hooks.md +8 -8
- package/plugins/fabric-agent-adapter/skills/working-with-fabric/scripts/fabric_session.py +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.39.1 - 2026-10-21
|
|
4
|
+
|
|
5
|
+
Fixes from two rounds of blind review of 0.39.0 (FAA-64).
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **The probe no longer crashes on a usage report it is checking.** `check_service.py` compared `unpricedCalls` and
|
|
10
|
+
`unmeasuredCalls` raw, so `null` or a string raised `TypeError`, and a 400-digit cost raised `OverflowError`; either
|
|
11
|
+
stopped the whole probe before its other rules ran. Its FAC-SEM-025 arithmetic is now the kit's `usage_findings`, one
|
|
12
|
+
implementation held to the contract's vectors.
|
|
13
|
+
- **The Python and Node kits answer FAC-SEM-025 as the contract does, message for message.** Both read each count as
|
|
14
|
+
the contract's `toNumber(x ?? 0)`, each date and project id with `show`, a cost as JavaScript holds the number (an
|
|
15
|
+
integer beyond a double is Infinity, which is never close to a sum), and a whole number written `5.0` as a count.
|
|
16
|
+
Python compared raw values and read `5.0` as 0; Node threw on an object such as `{"toString": 1}` in a count, a date
|
|
17
|
+
or a project id. The vectors now carry each finding's message and both kits compare it: 183 new report cases (208)
|
|
18
|
+
set every count and the cost of a day and of its first model to eleven values the schema refuses, plus three days
|
|
19
|
+
with no model rows and four dates and ids that are objects or numbers; eight new cases are the report's JSON text,
|
|
20
|
+
which each kit parses itself (a 400-digit integer, `1e400`, `2^53 + 1`, `5.0`). The field list is the contract's at this pin,
|
|
21
|
+
written in the generator.
|
|
22
|
+
- **Messages a person reads carry no em dash**: the probe, the dashboard-kit notice, the board's retry hint and the
|
|
23
|
+
package refusal (Python and Node alike), the installer and the `npx` CLI, the sample service's page, the session
|
|
24
|
+
hooks' unread and status lines (`2 unread on the project board: com.list`) and the dashboard kit's Fabric button
|
|
25
|
+
(`Fabric is not installed. Get it at passioncode.ai/fabric`; kit **1.1.1**, so a service's kit copy is offered the
|
|
26
|
+
upgrade). The live documentation, evals and the kit's demo page were rewritten the same way.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Tests for the producer side of DEC-0091 in both kits: receipts with `tokens_measured=False` through
|
|
31
|
+
`usage_report`, the day and model `unmeasuredCalls`, none on `byProject`, the probe clean, and the refusal of a
|
|
32
|
+
non-boolean flag.
|
|
33
|
+
- Evals: the spend scenario expects unknown tokens in `unmeasuredCalls`; a new scenario covers a partner's package
|
|
34
|
+
and calls (DEC-0090).
|
|
35
|
+
- `interop.md` and `usage.md` say a job whose usage is sent as `null` or `partial` is recorded with
|
|
36
|
+
`tokens_measured=False`; `estate-record.md` says a service updates its copied kit before a revision carries
|
|
37
|
+
`publisherScopes` (an older copy trusts a partner's key in every context); FAC-SEM-122 in its header and DEC-0091 in
|
|
38
|
+
protocol.md's FAC-SEM-025 row.
|
|
39
|
+
- `test/validate.py` fails on U+2014 in the live documentation, the evals, the installer, the CLI and the kit's demo,
|
|
40
|
+
and when README states which version a checkout is or which release is the latest (it said 0.21.0 until now); both
|
|
41
|
+
checks have tests. The compiled-revision tests name the two contract revisions they need when they skip.
|
|
42
|
+
|
|
43
|
+
### Raised with the contract (not changed here)
|
|
44
|
+
|
|
45
|
+
- `chainOf` names a `{sub, partner}` node by its `org:` id, and job ownership and idempotency keys do not include the
|
|
46
|
+
partner. The kits follow `c55f2d5` until the contract decides (board thread `6e66a023`, FAA-64).
|
|
47
|
+
|
|
3
48
|
## 0.39.0 - 2026-10-20
|
|
4
49
|
|
|
5
50
|
### Changed
|
|
@@ -12,7 +57,8 @@
|
|
|
12
57
|
- **Unmeasured tokens are named** (DEC-0091, contract CT-62). `make_usage_receipt(..., tokens_measured=False)` /
|
|
13
58
|
`makeUsageReceipt(..., { tokensMeasured: false })` writes `tokensMeasured: false`; the report counts such calls in
|
|
14
59
|
`unmeasuredCalls` on the day and the model row, and FAC-SEM-025 in both kits and `check_service.py` refuses a row
|
|
15
|
-
with more unmeasured calls than calls or a day whose count is not its models' sum.
|
|
60
|
+
with more unmeasured calls than calls or a day whose count is not its models' sum. Four new usage vectors (25; this
|
|
61
|
+
line said three until 0.39.1).
|
|
16
62
|
- **A partner in the delegation chain** (DEC-0090, contract CT-58). Both verifiers take `{partner: "org:<id>"}` as the
|
|
17
63
|
innermost actor under at least one agent: it counts toward the depth limit and ends the chain, and the checked chain
|
|
18
64
|
lists it by its `org:` id. Outermost, with an `act` beneath, `personal` or an `ORG:` prefix is `malformed-chain`.
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
**Fabric Agent Adapter** makes any agent Fabric-compatible. Fabric is PassionCode.ai's
|
|
10
10
|
product, the CEO AI agent: you talk to Fabric, and it chooses, binds and runs the agents that
|
|
11
|
-
do the work. This adapter is how an agent becomes one Fabric can bind
|
|
11
|
+
do the work. This adapter is how an agent becomes one Fabric can bind: four Agent Skills,
|
|
12
12
|
Python and Node reference kits and a live conformance probe for the
|
|
13
13
|
[Fabric Agent Contract](https://github.com/passioncode-ai/fabric-agent-contract). It also works
|
|
14
14
|
on its own: the skills, kits and probe need no Fabric install.
|
|
@@ -51,8 +51,8 @@ is the board-first workflow.
|
|
|
51
51
|
|
|
52
52
|
`building-fabric-services` makes an agent a long-lived local service with a dashboard
|
|
53
53
|
that is always alive, runs as one copy, keeps its state through a reinstall and appears
|
|
54
|
-
in Fabric Dashboards by itself
|
|
55
|
-
or dashboard
|
|
54
|
+
in Fabric Dashboards by itself: the `fabric-service/0.1` extension. It also makes an **online** agent
|
|
55
|
+
or dashboard (an `https` origin on a platform) a Fabric service (the remote placement, DEC-0019): the same
|
|
56
56
|
four routes behind the token, a `__Host-` session cookie, and one descriptor on the operator's computer;
|
|
57
57
|
`scripts/sample-remote-service.mjs` is the complete example. It ships Python and
|
|
58
58
|
Node reference kits (`scripts/fabric_service.py`, `scripts/fabric-service.mjs`), a
|
|
@@ -68,8 +68,8 @@ python3 plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/che
|
|
|
68
68
|
|
|
69
69
|
The dashboard itself is built from the **dashboard kit** (`assets/dashboard-kit/`, `fabric-dashboard/0.1`,
|
|
70
70
|
contract DEC-0036): one stylesheet and one script that keep the page usable from 360 CSS px inside a host
|
|
71
|
-
pane beside the agent console
|
|
72
|
-
box, sticky chrome at most 120 px
|
|
71
|
+
pane beside the agent console (navigation that folds into a More menu, wide tables in their own scroll
|
|
72
|
+
box, sticky chrome at most 120 px) with seven WCAG AA themes (light and dark) that follow the host's
|
|
73
73
|
`fabric_appearance` cookie. `scripts/dashboard_kit.py install|status` copies and checks it,
|
|
74
74
|
`scripts/check_dashboard_layout.mjs` measures a rendered page in WebKit at 360, 480, 768 and 1280 px
|
|
75
75
|
(Playwright; `NOT_RUN` without it), and the probe's `dashboard.declared` checks the declaration. The
|
|
@@ -117,7 +117,7 @@ yet ship the host registry/runtime needed to connect and authorize a live provid
|
|
|
117
117
|
### Install
|
|
118
118
|
|
|
119
119
|
With the [PassionCode.ai launcher](https://github.com/passioncode-ai/passioncode) the adapter
|
|
120
|
-
comes with every other PassionCode.ai skill
|
|
120
|
+
comes with every other PassionCode.ai skill: `npx @passioncode-ai/passioncode@latest update`,
|
|
121
121
|
then restart your agents. Alone, without any account:
|
|
122
122
|
|
|
123
123
|
```bash
|
|
@@ -175,8 +175,8 @@ kill %1
|
|
|
175
175
|
|
|
176
176
|
Verified 2026-10-01 from the published npm package 0.5.4 (`npx` into a throwaway hub, `KIT`
|
|
177
177
|
pointing at the installed skill) with Claude Code 2.1.286: the probe reported 27 rules, 0 FAIL;
|
|
178
|
-
the CLI connected to the sample over streamable HTTP, called `sample.echo` and printed `ping`. The probe prints one line per rule
|
|
179
|
-
`PASS`, `FAIL` or `NOT_RUN` with its evidence
|
|
178
|
+
the CLI connected to the sample over streamable HTTP, called `sample.echo` and printed `ping`. The probe prints one line per rule
|
|
179
|
+
(`PASS`, `FAIL` or `NOT_RUN` with its evidence) and exits 1 on any `FAIL`; run it against your
|
|
180
180
|
own service by its id once its installer has written the descriptor.
|
|
181
181
|
`FABRIC_REAL_CLIENT=1 python3 -m unittest discover -s test -p test_real_client.py` repeats the connection check
|
|
182
182
|
(every sample tool listed, no model call) in the test suite.
|
|
@@ -264,8 +264,8 @@ The default pin for new bundles is [`fabric-contract.lock.json`](fabric-contract
|
|
|
264
264
|
- version: `0.1.0`
|
|
265
265
|
- commit: `c55f2d5a11c9a0197e958e87212fca7ae1154769`
|
|
266
266
|
|
|
267
|
-
Every other mention of the default contract revision
|
|
268
|
-
skill card, `adapt_project.py`
|
|
267
|
+
Every other mention of the default contract revision (this section, the skills' metadata, the
|
|
268
|
+
skill card, `adapt_project.py`) must equal it; `python3 test/validate.py` fails a tree
|
|
269
269
|
where one does not. The sole live legacy exception is the immutable
|
|
270
270
|
`SUPPORTED_CONTRACT_COMMITS` declaration in the scaffolder: previously issued bundles
|
|
271
271
|
keep their selected legacy lock and require that exact clean contract checkout. The
|
|
@@ -288,14 +288,16 @@ FABRIC_CONTRACT_OLD=/path/to/legacy-contract FABRIC_CONTRACT_NEW=/path/to/curren
|
|
|
288
288
|
python3 -m unittest discover -s test -p test_contract_revisions.py -v
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
291
|
+
`FABRIC_CONTRACT_OLD` is a checkout of the legacy fixtures' revision (`OLD` in `test/test_contract_revisions.py`) and
|
|
292
|
+
`FABRIC_CONTRACT_NEW` one of the pin; each needs `pnpm install --frozen-lockfile` in its own folder (pnpm refuses a
|
|
293
|
+
symlinked `node_modules`). Without both environment variables, those tests explicitly skip as `NOT_RUN`, naming the
|
|
294
|
+
two revisions. What each version changed and when it was released is in [CHANGELOG.md](CHANGELOG.md). Source delivery
|
|
295
|
+
does not update installed skills or live sessions.
|
|
294
296
|
|
|
295
297
|
## License
|
|
296
298
|
|
|
297
299
|
Open source under the [GNU AGPL-3.0](LICENSE). A [commercial license](COMMERCIAL-LICENSE.md) is
|
|
298
|
-
available for use that does not meet the AGPL's terms
|
|
300
|
+
available for use that does not meet the AGPL's terms: [passioncode.ai/business](https://passioncode.ai/business/).
|
|
299
301
|
Versions before 0.5.3 were released under PolyForm Noncommercial or Internal Use (v0.4.3 to
|
|
300
302
|
v0.5.2) and MIT (v0.4.2 and earlier); each keeps the licence it was released under.
|
|
301
303
|
Contributions are accepted under [CLA.md](CLA.md) ([CONTRIBUTING.md](CONTRIBUTING.md)).
|
|
@@ -26,7 +26,7 @@ Usage:
|
|
|
26
26
|
npx @passioncode-ai/fabric-agent-adapter [--force]
|
|
27
27
|
install every skill into the agents hub ~/.agents/skills
|
|
28
28
|
npx @passioncode-ai/fabric-agent-adapter --target claude [--force]
|
|
29
|
-
plain copy into ~/.claude/skills
|
|
29
|
+
plain copy into ~/.claude/skills (refused while the plugin is installed)
|
|
30
30
|
npx @passioncode-ai/fabric-agent-adapter --prune-shadow
|
|
31
31
|
remove plain ~/.claude/skills copies that shadow the installed plugin
|
|
32
32
|
npx @passioncode-ai/fabric-agent-adapter --help
|
|
@@ -124,7 +124,7 @@ function main(argv) {
|
|
|
124
124
|
|
|
125
125
|
const { skillRoot, names } = skillNames();
|
|
126
126
|
if (!names.length) {
|
|
127
|
-
console.error(`error: no skills found under ${skillRoot}
|
|
127
|
+
console.error(`error: no skills found under ${skillRoot}; corrupted package?`);
|
|
128
128
|
return 1;
|
|
129
129
|
}
|
|
130
130
|
const home = os.homedir();
|
|
@@ -132,7 +132,7 @@ function main(argv) {
|
|
|
132
132
|
|
|
133
133
|
if (prune) {
|
|
134
134
|
if (!hasPlugin) {
|
|
135
|
-
console.error(`error: the ${PLUGIN_ID} plugin is not installed, so a copy in ~/.claude/skills is not a shadow
|
|
135
|
+
console.error(`error: the ${PLUGIN_ID} plugin is not installed, so a copy in ~/.claude/skills is not a shadow; nothing removed.`);
|
|
136
136
|
return 1;
|
|
137
137
|
}
|
|
138
138
|
pruneShadows(home, names);
|
|
@@ -151,8 +151,8 @@ function main(argv) {
|
|
|
151
151
|
// One owner per artefact on disk: a plain copy over someone else's link freezes the skill
|
|
152
152
|
// at this version, and its owner stops updating it. --force does not override this.
|
|
153
153
|
console.log(owner === 'launcher'
|
|
154
|
-
? `skip: ${name} at ${dest} is managed by the PassionCode launcher
|
|
155
|
-
: `skip: ${name} at ${dest} is a link managed elsewhere
|
|
154
|
+
? `skip: ${name} at ${dest} is managed by the PassionCode launcher; update it with: npx @passioncode-ai/passioncode@latest update`
|
|
155
|
+
: `skip: ${name} at ${dest} is a link managed elsewhere; remove the link first to install a copy here`);
|
|
156
156
|
continue;
|
|
157
157
|
}
|
|
158
158
|
if (fs.existsSync(dest) && !force) {
|
|
@@ -166,7 +166,7 @@ function main(argv) {
|
|
|
166
166
|
if (target === 'agents' && !hasPlugin) {
|
|
167
167
|
console.log(`Claude Code reads plugins, not the hub:\n claude plugin marketplace add ${REPO} && claude plugin install ${PLUGIN_ID}`);
|
|
168
168
|
}
|
|
169
|
-
console.log('Restart your agent
|
|
169
|
+
console.log('Restart your agent: skills load at session start.');
|
|
170
170
|
return 0;
|
|
171
171
|
}
|
|
172
172
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@passioncode-ai/fabric-agent-adapter",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.1",
|
|
4
4
|
"description": "Create Fabric-compatible agents, run them as always-alive local services with dashboards (fabric-service/0.1), and adapt existing projects to the Fabric Agent Contract. This package is the installer CLI.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "python3 test/validate.py && python3 -m unittest discover -s test -q && node --test 'test/*.test.mjs'"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "fabric-agent-adapter",
|
|
4
4
|
"displayName": "Fabric Agent Adapter",
|
|
5
5
|
"description": "Create new Fabric-compatible agents, build them as always-alive local services with dashboards (fabric-service/0.1), and adapt existing projects to the Fabric Agent Contract through evidence-backed MCP, A2A, or local-runner provider bundles; and teach a coding agent to work in a project through Fabric (fabric-mcp, fabric_whoami, claim and release), with Claude Code session hooks.",
|
|
6
|
-
"version": "0.39.
|
|
6
|
+
"version": "0.39.1",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "PassionCode.ai",
|
|
9
9
|
"url": "https://passioncode.ai/"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
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
|
|
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
4
|
license: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
|
|
5
5
|
compatibility: Requires filesystem access and Python 3.9+. Exact schema checks additionally need git, Node.js, pnpm, and the pinned fabric-agent-contract checkout (a public repository). Works without those tools in an explicitly degraded structural-check mode.
|
|
6
6
|
metadata:
|
|
7
7
|
author: PassionCode.ai
|
|
8
|
-
version: "0.39.
|
|
8
|
+
version: "0.39.1"
|
|
9
9
|
contract-version: "0.1.0"
|
|
10
10
|
contract-commit: "c55f2d5a11c9a0197e958e87212fca7ae1154769"
|
|
11
11
|
---
|
|
@@ -23,9 +23,9 @@ Use this skill to adapt or assess a provider project. Do not use it to:
|
|
|
23
23
|
- design the Fabric host, registry, scheduler, admission service, or project binding runtime;
|
|
24
24
|
- add an MCP server to Claude Code, Codex, or an agent gateway;
|
|
25
25
|
- answer wire-level MCP or A2A questions (transports, sessions, auth handshakes, task
|
|
26
|
-
states on the wire)
|
|
26
|
+
states on the wire): that is `agent-interop` (agent-stack); the pinned contract stays
|
|
27
27
|
normative for what Fabric requires;
|
|
28
|
-
- design a new agent from scratch
|
|
28
|
+
- design a new agent from scratch: that is the sibling skill creating-fabric-agents;
|
|
29
29
|
- claim admission merely because generated files or a valid manifest exist.
|
|
30
30
|
|
|
31
31
|
If the project has only a browser interface and no stable API, MCP/A2A surface, or CLI,
|
|
@@ -133,14 +133,14 @@ Preserve the chosen ownership boundary:
|
|
|
133
133
|
heartbeat, and partial results without relying on ambient accounts.
|
|
134
134
|
|
|
135
135
|
Keep model selection and provider-internal reasoning outside the Fabric contract. Expose
|
|
136
|
-
typed outcomes, evidence, artifacts, and protocol-visible state
|
|
136
|
+
typed outcomes, evidence, artifacts, and protocol-visible state, not chain-of-thought.
|
|
137
137
|
Treat all provider output as untrusted until schemas and semantic assertions pass.
|
|
138
138
|
|
|
139
139
|
### 4b. Announce an agent that is not a service
|
|
140
140
|
|
|
141
141
|
An agent Fabric reaches as a CLI or a stdio MCP server gets a provider entry, written by
|
|
142
142
|
its installer with [`scripts/fabric_provider.py`](scripts/fabric_provider.py) and removed
|
|
143
|
-
by its uninstaller
|
|
143
|
+
by its uninstaller: argv arrays only, env values as `secret-ref:` references, never the
|
|
144
144
|
id of an existing service, and a `providerId` equal to the manifest's `provider.id`. Load [provider entries](references/provider-entry.md). An
|
|
145
145
|
agent that runs as a service uses a descriptor instead (`building-fabric-services`).
|
|
146
146
|
|
|
@@ -174,8 +174,8 @@ python3 <skill-dir>/scripts/adapt_project.py check <project-root> \
|
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
The local check also refuses two lifecycle faults (LC-19, LC-21): a Claude Code plugin in
|
|
177
|
-
the project that declares a stdio MCP server
|
|
178
|
-
plugin; serve it over HTTP from one resident process or register it at project scope
|
|
177
|
+
the project that declares a stdio MCP server (it starts in every session that enables the
|
|
178
|
+
plugin; serve it over HTTP from one resident process or register it at project scope), and a
|
|
179
179
|
credential in a launch argument or a URL query, where every process and every log can read it.
|
|
180
180
|
Fix both at their cause; never weaken the check.
|
|
181
181
|
|
|
@@ -214,11 +214,11 @@ operator's four steps:
|
|
|
214
214
|
4. type the code it shows in the chat with the bot.
|
|
215
215
|
|
|
216
216
|
In a group shared with other bots the channel follows OC-14…OC-17 (DEC-0035): it stays silent
|
|
217
|
-
unless addressed
|
|
218
|
-
bare `/command` in a group is not addressed
|
|
217
|
+
unless addressed (`/command@ThisBot`, a reply to its own message or a press of its own button; a
|
|
218
|
+
bare `/command` in a group is not addressed), and a channel nobody receives on is `degraded`
|
|
219
219
|
(`receiver-missing`). Say so in the proposal when the operator means to bind a shared group.
|
|
220
220
|
|
|
221
|
-
Record the answer
|
|
221
|
+
Record the answer (`accepted`, `declined` or `later`) in the agent's state and the
|
|
222
222
|
conformance report, and do not ask again; an agent that serves `surfaces.operatorChannel` also
|
|
223
223
|
shows it as `proposal` in its status document. Creating the bot, storing the token and enabling the
|
|
224
224
|
channel are the operator's action: never create the bot, ask for or store the token's value, or
|
|
@@ -246,7 +246,7 @@ first commit:
|
|
|
246
246
|
org-index `scripts/check_format.py` reports 0 findings for it before it is called done. **An agent
|
|
247
247
|
someone builds for themselves is not a PassionCode.ai repository:** its licence is its owner's
|
|
248
248
|
choice, nothing about it is published or listed by the organization, and none of these files is
|
|
249
|
-
required of it
|
|
249
|
+
required of it, though the verified MCP quick start is still how anyone learns to drive it.
|
|
250
250
|
|
|
251
251
|
## Completion format
|
|
252
252
|
|
|
@@ -263,7 +263,7 @@ Report:
|
|
|
263
263
|
Never summarize the outcome as “Fabric-compatible” unless all required admission gates
|
|
264
264
|
passed against a real provider and the project binding is valid.
|
|
265
265
|
|
|
266
|
-
## Dashboard handoff
|
|
266
|
+
## Dashboard handoff: also for consumers
|
|
267
267
|
|
|
268
268
|
When handing a registered service dashboard to a person, or writing the generated
|
|
269
269
|
agent's completion/notification instructions, read and apply
|
package/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/references/provider-entry.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Normative source: the Fabric Agent Contract's `docs/specification/provider.md`
|
|
4
4
|
(`fabric-provider/0.1`, DEC-0016, rulings DEC-0017) at the commit this plugin pins.
|
|
5
5
|
|
|
6
|
-
An agent Fabric reaches as a CLI or a stdio MCP server
|
|
6
|
+
An agent Fabric reaches as a CLI or a stdio MCP server (not a long-running service)
|
|
7
7
|
is announced by one entry, `providers/<id>.json`, in the same root as the services
|
|
8
8
|
directory:
|
|
9
9
|
|
|
@@ -34,17 +34,17 @@ python3 scripts/fabric_provider.py remove example-agent # the uninstaller
|
|
|
34
34
|
|
|
35
35
|
`--stdio` takes the rest of the line as the argument array; there is no shell string. An entry may carry
|
|
36
36
|
`run.mcp.stdio.scope` (DEC-0044): `project` (started for the sessions of a project that binds it) or `on-demand`;
|
|
37
|
-
`session`
|
|
37
|
+
`session` (a server in every coding session) is refused (FAC-SEM-056, LC-19). The validator accepts the field; the
|
|
38
38
|
writer does not set it until Fabric reads it. An argument that carries a credential is refused
|
|
39
39
|
(LC-21, FAC-SEM-057): a key goes in `env` as a `secret-ref:<name>`, never in argv.
|
|
40
40
|
|
|
41
41
|
It refuses, with one sentence that never quotes a value:
|
|
42
42
|
|
|
43
43
|
- a manifest that does not resolve, or whose `provider.id` is not the entry's
|
|
44
|
-
`providerId
|
|
44
|
+
`providerId`: the two URIs are compared as URIs (FAC-SEM-014);
|
|
45
45
|
- an id that is already a service in `services/` (FAC-SEM-013);
|
|
46
46
|
- an env value that is not `secret-ref:<name>`, or a reference that has the shape of a
|
|
47
|
-
credential itself
|
|
47
|
+
credential itself: a token prefix, a private key, a JWT (FAC-SEM-015: a value is
|
|
48
48
|
checked by its form; name patterns apply to names);
|
|
49
49
|
- a URL other than `http://127.0.0.1:<port>/mcp`, a manifest path that is not an
|
|
50
50
|
absolute or `~/` path to `fabric-agent.json`, a shell-string command, unknown fields.
|
|
@@ -3,7 +3,7 @@ name: building-fabric-services
|
|
|
3
3
|
description: >-
|
|
4
4
|
Use when handing out or opening a Fabric service dashboard, building a local agent service on a
|
|
5
5
|
macOS machine, making an ONLINE agent or dashboard (https origin, the remote placement) a
|
|
6
|
-
Fabric service, or letting a service answer a Project's board requests
|
|
6
|
+
Fabric service, or letting a service answer a Project's board requests: «сделай агенту дашборд»,
|
|
7
7
|
«локальный сервис агента», «подключи агента к Fabric Dashboards», «отвечать на запросы с доски проекта»,
|
|
8
8
|
"make this agent a local service", "make an online dashboard a Fabric service", "add the
|
|
9
9
|
well-known endpoint", «расходы агента на модели». Covers fabric-service/0.1:
|
|
@@ -18,7 +18,7 @@ license: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
|
|
|
18
18
|
compatibility: Python 3.9+ or Node.js 20+ for the kits; the probe needs Python 3.9+. launchd steps are macOS-only; Linux services install a systemd user unit and Windows ones a per-user Scheduled Task with the kits' writers. Dashboard handoff optionally uses Fabric Dashboards MCP link/host_status/open; without it, report unresolved host capability. The contract checkout is optional.
|
|
19
19
|
metadata:
|
|
20
20
|
author: PassionCode.ai
|
|
21
|
-
version: "0.39.
|
|
21
|
+
version: "0.39.1"
|
|
22
22
|
contract-version: "0.1.0"
|
|
23
23
|
extension: "fabric-service/0.1"
|
|
24
24
|
extension-commit: "c55f2d5a11c9a0197e958e87212fca7ae1154769"
|
|
@@ -29,7 +29,7 @@ metadata:
|
|
|
29
29
|
A **service** is an agent that keeps running on the operator's computer: it holds
|
|
30
30
|
state, answers other agents, and shows a dashboard. This skill makes one that is
|
|
31
31
|
always alive, comes back after a restart, never runs twice, keeps its state through a
|
|
32
|
-
reinstall, and appears in Fabric Dashboards by itself
|
|
32
|
+
reinstall, and appears in Fabric Dashboards by itself: the `fabric-service/0.1`
|
|
33
33
|
extension of the Fabric Agent Contract (DEC-0015).
|
|
34
34
|
|
|
35
35
|
Every rule below exists because a real service on this estate broke it. Treat them as
|
|
@@ -41,15 +41,15 @@ re-deriving a rule.
|
|
|
41
41
|
Use it to create a service, to bring an existing local server under the protocol, or
|
|
42
42
|
to review one. Do not use it for:
|
|
43
43
|
|
|
44
|
-
- a script, a cron job or a one-shot CLI
|
|
44
|
+
- a script, a cron job or a one-shot CLI: nothing stays running, so there is nothing
|
|
45
45
|
to supervise; a launchd `StartInterval` job needs no descriptor;
|
|
46
46
|
- a hosted product with no agent behind it. An online agent or dashboard that should appear in
|
|
47
|
-
Fabric IS in scope: it is the remote placement
|
|
48
|
-
- the provider manifest and admission bundle
|
|
47
|
+
Fabric IS in scope: it is the remote placement; read [Online services](#online-services-the-remote-placement);
|
|
48
|
+
- the provider manifest and admission bundle: that is `adapting-projects-to-fabric`
|
|
49
49
|
(a service that is also a provider does both);
|
|
50
50
|
- the Fabric Dashboards app itself.
|
|
51
51
|
|
|
52
|
-
## Step 0
|
|
52
|
+
## Step 0: is it a service?
|
|
53
53
|
|
|
54
54
|
It is a service when at least one is true: other agents call it while the operator is
|
|
55
55
|
away; it runs jobs longer than one request; it owns a store other tools read; the
|
|
@@ -65,7 +65,7 @@ Answer before writing code, and record the answers in the project README:
|
|
|
65
65
|
| What it stores | the store, where it lives (Step 2, rule 5), and what survives uninstall |
|
|
66
66
|
| What it tells the operator | the events worth a notification (Step 5) |
|
|
67
67
|
|
|
68
|
-
## Step 1
|
|
68
|
+
## Step 1: choose the surfaces
|
|
69
69
|
|
|
70
70
|
| Caller | Surface | Why |
|
|
71
71
|
|---|---|---|
|
|
@@ -103,14 +103,14 @@ responder in its own process: [`scripts/fabric_hub.py`](scripts/fabric_hub.py) f
|
|
|
103
103
|
every step and stops on `fenced`, `lease_expired` or `authority_changed` (Node: `fabric-hub.mjs`, `fabric-board.mjs`).
|
|
104
104
|
The request body is data behind the service's own input gate. Read [the board reference](references/board.md).
|
|
105
105
|
|
|
106
|
-
## Step 2
|
|
106
|
+
## Step 2: the non-negotiables
|
|
107
107
|
|
|
108
108
|
1. **Loopback only.** Bind `127.0.0.1`. Refuse any `Host` other than
|
|
109
109
|
`127.0.0.1:<port>`, `localhost:<port>`, `[::1]:<port>`; refuse a foreign `Origin` and
|
|
110
|
-
`Sec-Fetch-Site: cross-site
|
|
110
|
+
`Sec-Fetch-Site: cross-site`, on every path, the well-known one included.
|
|
111
111
|
*(A throwaway `python -m http.server` bound to every interface served a source tree to the local network.)*
|
|
112
112
|
2. **One copy, locked before any side effect.** Take the exclusive lock on
|
|
113
|
-
`<data>/service.lock` first
|
|
113
|
+
`<data>/service.lock` first, before resuming jobs, starting a scheduler, migrating
|
|
114
114
|
a store or even creating a token. Held → print one sentence naming the holder's pid
|
|
115
115
|
and exit **75**. Binding the port is not a lock. Under launchd the kit backs off
|
|
116
116
|
in-process first (up to 300 s), so a duplicate is a few starts an hour, not a
|
|
@@ -127,11 +127,11 @@ The request body is data behind the service's own input gate. Read [the board re
|
|
|
127
127
|
5. **State outside code.** Data and config in `~/Library/Application Support/<id>/`,
|
|
128
128
|
logs in `~/Library/Logs/<id>/`, cache in `~/Library/Caches/<id>/`; the service's own
|
|
129
129
|
access token in a 0600 file it generates (principle 6). **Every provider credential the
|
|
130
|
-
service uses comes from Project Observatory, by name
|
|
130
|
+
service uses comes from Project Observatory, by name**: the plist starts the service
|
|
131
131
|
with `use_secret.py serve --consumer <label> <project> <NAME>[,<NAME>] -- <command>`, which
|
|
132
132
|
reads the vault only and records the consumer so a rotation names it; never a copy of a
|
|
133
133
|
key in a `.env`, a config file or the plist. Never inside the service's own code checkout or a release directory; a
|
|
134
|
-
repository that versions the data itself is a store and is fine
|
|
134
|
+
repository that versions the data itself is a store and is fine; declare
|
|
135
135
|
`source.repository` so the probe can tell them apart. *(Deleting a checkout left a
|
|
136
136
|
plist launchd retried every 10 s, and the data went with it.)*
|
|
137
137
|
6. **Tokens stay in files and headers.** Mode 0600, owner-checked, never a symlink;
|
|
@@ -139,16 +139,16 @@ The request body is data behind the service's own input gate. Read [the board re
|
|
|
139
139
|
one-time login code, never the token.
|
|
140
140
|
7. **`degraded` is always present.** An empty list asserts full health; `ready` with a
|
|
141
141
|
non-empty list is a lie the kit corrects to `degraded`.
|
|
142
|
-
8. **Atomic writes.** Temporary file, fsync, rename
|
|
142
|
+
8. **Atomic writes.** Temporary file, fsync, rename, for the store's side files, the
|
|
143
143
|
descriptor and the token.
|
|
144
144
|
|
|
145
|
-
## Step 3
|
|
145
|
+
## Step 3: build it with the kit
|
|
146
146
|
|
|
147
147
|
Copy the kit into the service (each is one self-contained file): Python
|
|
148
148
|
[`scripts/fabric_service.py`](scripts/fabric_service.py), Node
|
|
149
149
|
[`scripts/fabric-service.mjs`](scripts/fabric-service.mjs). Both share file formats, and
|
|
150
150
|
their locks exclude each other. The complete worked example is
|
|
151
|
-
[`scripts/sample_service.py`](scripts/sample_service.py)
|
|
151
|
+
[`scripts/sample_service.py`](scripts/sample_service.py); read it before writing a
|
|
152
152
|
handler.
|
|
153
153
|
|
|
154
154
|
Startup order is the part that goes wrong; keep it exactly:
|
|
@@ -157,7 +157,7 @@ Startup order is the part that goes wrong; keep it exactly:
|
|
|
157
157
|
import fabric_service as fs
|
|
158
158
|
|
|
159
159
|
dirs = fs.service_dirs("example-agent")
|
|
160
|
-
lock = fs.hold_single_instance(dirs["data"]) # 1. lock
|
|
160
|
+
lock = fs.hold_single_instance(dirs["data"]) # 1. lock: exits 75 if held (backs off first under launchd)
|
|
161
161
|
token = fs.ensure_token(dirs["data"] / "service.token") # 2. only now touch state
|
|
162
162
|
log = fs.JsonlEventLog(dirs["data"] / "events.jsonl") # (or a view over your own log)
|
|
163
163
|
codes = fs.LoginCodes(dirs["data"] / "auth")
|
|
@@ -172,12 +172,12 @@ On every request call `check_request(port, host, origin, sec_fetch_site)` and an
|
|
|
172
172
|
|
|
173
173
|
| Route | Auth | Kit |
|
|
174
174
|
|---|---|---|
|
|
175
|
-
| `GET /.well-known/fabric-service` | none, guard still applies | `build_well_known(...)
|
|
175
|
+
| `GET /.well-known/fabric-service` | none, guard still applies | `build_well_known(...)`, from memory, under 100 ms |
|
|
176
176
|
| `GET /fabric/v1/events?after=&limit=` | service token | `events_page(fetch, after, parse_limit(limit))` |
|
|
177
177
|
| `POST /fabric/v1/login-code` | service token | `LoginCodes.issue()` |
|
|
178
178
|
| `GET /fabric/v1/login?code=` | the code | `LoginCodes.redeem(code)` → `Set-Cookie: session_cookie_header(...)`, 302 to the dashboard |
|
|
179
179
|
|
|
180
|
-
`SIGTERM` drains in-flight work, then exits
|
|
180
|
+
`SIGTERM` drains in-flight work, then exits: 10 s at most, inside `ExitTimeOut`
|
|
181
181
|
(`fs.Drain` / `new Drain()`: `with drain.work():` refuses new work once a stop began);
|
|
182
182
|
interrupted work resumes on the next start. Log through `RotatingLog` (5 × 5 MB, 0600)
|
|
183
183
|
and call `cap_stdout_log` once at start.
|
|
@@ -187,18 +187,18 @@ in Python; jobs live in `fabric_interop.JobStore(dirs["data"] / "jobs")`, create
|
|
|
187
187
|
the lock like every other piece of state. Add `"mcp": {"path": "/mcp", "transport":
|
|
188
188
|
"streamable-http", "capabilities": [...]}` to the well-known surfaces, and point the
|
|
189
189
|
descriptor's `fabricManifest` at a manifest whose service key names this
|
|
190
|
-
`<id>.<instance
|
|
190
|
+
`<id>.<instance>`; `sample_service.py register` shows both.
|
|
191
191
|
|
|
192
|
-
## Step 4
|
|
192
|
+
## Step 4: install it
|
|
193
193
|
|
|
194
194
|
The installer, not the service, owns the plist and the descriptor. Sequence:
|
|
195
195
|
|
|
196
|
-
1. `write_descriptor(descriptor)
|
|
197
|
-
claims. A preview or branch copy is a second **instance**, never a second id
|
|
196
|
+
1. `write_descriptor(descriptor)`: refuses a port or `id.instance` another descriptor
|
|
197
|
+
claims. A preview or branch copy is a second **instance**, never a second id, and it is
|
|
198
198
|
one more service the operator sees, probes and gets notified by. Verify a release with its
|
|
199
199
|
own doctor or self-check before it replaces `default`; a temporary instance is uninstalled
|
|
200
200
|
(`launchd_uninstall`, `remove_descriptor`) as soon as its check is done, not left running.
|
|
201
|
-
2. `launchd_plist(...)` then `launchd_install(...)
|
|
201
|
+
2. `launchd_plist(...)` then `launchd_install(...)`: writes and lints the plist,
|
|
202
202
|
`bootout` and waits for the unload, `bootstrap` with retries on the transient I/O
|
|
203
203
|
error, then polls the well-known document until it answers with **this** identity.
|
|
204
204
|
A label the operator disabled stays disabled: only a first install enables.
|
|
@@ -217,7 +217,7 @@ rewrites the plist and restarts. Read [the lifecycle reference](references/lifec
|
|
|
217
217
|
for the plist fields, the release layout, log rotation, behaving under a host lifecycle broker
|
|
218
218
|
and the Linux and Windows supervisors.
|
|
219
219
|
|
|
220
|
-
## Step 5
|
|
220
|
+
## Step 5: the dashboard and the events
|
|
221
221
|
|
|
222
222
|
The dashboard is a same-origin page: no inline script, strict CSP, polling that pauses
|
|
223
223
|
while the operator types or a dialog is open, one panel's failure never blanks the
|
|
@@ -235,10 +235,10 @@ and declare it with `extensions=fs.dashboard_extension()`. Read
|
|
|
235
235
|
declaration and how to upgrade a dashboard built before the kit: an upgrade you may make yourself,
|
|
236
236
|
which the plugin's session-start notice offers in a repository that owns the service.
|
|
237
237
|
|
|
238
|
-
The events feed is a **view over the log you already keep**
|
|
239
|
-
journal
|
|
238
|
+
The events feed is a **view over the log you already keep** (a jobs table, a JSONL
|
|
239
|
+
journal), not a second store. Each event is one sentence a person reads; set
|
|
240
240
|
`notify: true` only when the operator must decide, or something failed or degrades their
|
|
241
|
-
work
|
|
241
|
+
work, once per episode, with a `subject` and a `link` to the page that resolves it. A
|
|
242
242
|
question's kind says so (`*.awaiting_*`, `*.approval_*`, `human_step.opened`). The service
|
|
243
243
|
raises no banners of its own: the host is the one channel. Read
|
|
244
244
|
[the events reference](references/events-and-notifications.md) for mapping an existing
|
|
@@ -253,9 +253,9 @@ A service whose store holds what the operator decided keeps **settings backups**
|
|
|
253
253
|
directory, restores only on a fresh database and never overwrites. Read
|
|
254
254
|
[the settings backups reference](references/settings-backups.md).
|
|
255
255
|
|
|
256
|
-
## Step 6
|
|
256
|
+
## Step 6: verify
|
|
257
257
|
|
|
258
|
-
Run the probe against the live service
|
|
258
|
+
Run the probe against the live service: it reads the descriptor, then checks every
|
|
259
259
|
rule it can reach and says which it could not:
|
|
260
260
|
|
|
261
261
|
```bash
|
|
@@ -268,7 +268,7 @@ events auth and shape, single-use login, state outside code, instance lock, plis
|
|
|
268
268
|
launchd pid equals answering pid, `dashboard.declared` (ED-9), and the `interop.*` rules:
|
|
269
269
|
manifest link, capability list, tools equal to the manifest, job tools, unknown job, trace
|
|
270
270
|
propagation, event trace pairs, and `board.responder` for a service that declares the project board) and exits 1 on
|
|
271
|
-
any `FAIL`. A `NOT_RUN` is not a pass
|
|
271
|
+
any `FAIL`. A `NOT_RUN` is not a pass;
|
|
272
272
|
name it in the report. A service with a dashboard also runs the layout probe,
|
|
273
273
|
`node <skill-dir>/scripts/check_dashboard_layout.mjs --service <id>` (WebKit at 360, 480, 768
|
|
274
274
|
and 1280 px; needs Playwright, else `NOT_RUN`).
|
|
@@ -277,7 +277,7 @@ Then prove the lock: start a second copy by hand against the same data directory
|
|
|
277
277
|
must exit 75 while the first keeps serving. Prove recovery: `kill -9` the launchd pid;
|
|
278
278
|
the well-known document must answer again with a new pid within about 15 seconds.
|
|
279
279
|
|
|
280
|
-
## Packing and signing it
|
|
280
|
+
## Packing and signing it: `fabric-package/1`
|
|
281
281
|
|
|
282
282
|
To hand an agent to another machine or an organization, pack it as one folder (contract DEC-0050, DEC-0051). Write the
|
|
283
283
|
author's `fabric.package.json` (the descriptive fields; for an agent `resultSignal` and `evals` with the receipt of the
|
|
@@ -313,11 +313,11 @@ first commit:
|
|
|
313
313
|
org-index `scripts/check_format.py` reports 0 findings for it before it is called done. **An agent
|
|
314
314
|
someone builds for themselves is not a PassionCode.ai repository:** its licence is its owner's
|
|
315
315
|
choice, nothing about it is published or listed by the organization, and none of these files is
|
|
316
|
-
required of it
|
|
316
|
+
required of it, though the verified MCP quick start is still how anyone learns to drive it.
|
|
317
317
|
|
|
318
|
-
## Online services
|
|
318
|
+
## Online services: the remote placement
|
|
319
319
|
|
|
320
|
-
An agent or a dashboard that runs online
|
|
320
|
+
An agent or a dashboard that runs online (on a platform, a server, a hosted app) becomes a
|
|
321
321
|
Fabric service with the same four routes and one descriptor on the operator's computer
|
|
322
322
|
(`placement: "remote"`, DEC-0019). Nothing about launchd, the lock or loopback applies; three
|
|
323
323
|
things change and the kits implement each:
|
|
@@ -328,7 +328,7 @@ things change and the kits implement each:
|
|
|
328
328
|
| Well-known | only for the token; otherwise `401` with an **empty** body | `wellKnownAllowed('remote', …)` / `well_known_allowed` |
|
|
329
329
|
| Session | `__Host-fabric_session`, `Secure`; codes in memory, the key from a platform secret so sessions survive a deploy | `remoteSessionCookieHeader`, `new LoginCodes(null, 120, { store: new MemoryCodeStore(), key })` |
|
|
330
330
|
|
|
331
|
-
1. **Serve the four routes** in the app that already exists
|
|
331
|
+
1. **Serve the four routes** in the app that already exists, not beside it. The complete worked
|
|
332
332
|
example is [`scripts/sample-remote-service.mjs`](scripts/sample-remote-service.mjs): it runs
|
|
333
333
|
with its own TLS or behind a platform router.
|
|
334
334
|
2. **Secrets live on the platform:** the service token and the session key (32 bytes) are
|
|
@@ -336,7 +336,7 @@ things change and the kits implement each:
|
|
|
336
336
|
remote service needs is issued and kept in Project Observatory, pushed to the platform, and
|
|
337
337
|
the movement recorded with `vault.py moved --at <provider>`, so the platform's copy is
|
|
338
338
|
known rather than invisible.
|
|
339
|
-
3. **Register it on the operator's computer
|
|
339
|
+
3. **Register it on the operator's computer**, the installer side, run there:
|
|
340
340
|
`registerRemote({ id, name, origin, token })` / `register_remote(...)` writes the token file
|
|
341
341
|
(0600) and the descriptor; pass the token from a file or stdin, never in argv. Public names
|
|
342
342
|
only in public artifacts: a private service is registered by a local descriptor and nowhere
|
|
@@ -350,7 +350,7 @@ behaviour a host shows, rotation, a multi-process platform, and what a host will
|
|
|
350
350
|
|
|
351
351
|
## Migrating an existing service
|
|
352
352
|
|
|
353
|
-
Read [the migration reference](references/migrating-a-service.md)
|
|
353
|
+
Read [the migration reference](references/migrating-a-service.md): the order of
|
|
354
354
|
changes that keeps the service answering throughout, and what each existing service on
|
|
355
355
|
this estate needs.
|
|
356
356
|
|
|
@@ -367,14 +367,14 @@ this estate needs.
|
|
|
367
367
|
against [the protocol reference](references/protocol.md); the probe is the judge.
|
|
368
368
|
- **No contract checkout:** the protocol reference is pinned to the extension commit
|
|
369
369
|
in this skill's metadata; do not reconstruct fields from memory.
|
|
370
|
-
- **Fabric Dashboards not installed:** nothing changes
|
|
370
|
+
- **Fabric Dashboards not installed:** nothing changes; the service is complete
|
|
371
371
|
without a host; the descriptor waits for one.
|
|
372
372
|
|
|
373
373
|
## Gotchas
|
|
374
374
|
|
|
375
375
|
- `lsof` shows `*:<port>` or `0.0.0.0` → the bind is wrong even if the Host check works.
|
|
376
376
|
- A health probe that only checks HTTP 200 accepts any program on the port. Compare
|
|
377
|
-
`service.id` and `service.instance
|
|
377
|
+
`service.id` and `service.instance`: two services here once defaulted to ports
|
|
378
378
|
another service already held.
|
|
379
379
|
- `launchctl bootstrap` right after `bootout` fails with I/O error 5 until the unload
|
|
380
380
|
finishes; wait, then retry.
|
|
@@ -397,7 +397,7 @@ the probe table verbatim with every `NOT_RUN` explained; the lock and kill-9 res
|
|
|
397
397
|
with pids; and the one next command. Never call a service conformant while the probe
|
|
398
398
|
reports a `FAIL`.
|
|
399
399
|
|
|
400
|
-
## Dashboard handoff
|
|
400
|
+
## Dashboard handoff: also for consumers
|
|
401
401
|
|
|
402
402
|
When handing a registered service dashboard to a person, or writing the generated
|
|
403
403
|
agent's completion/notification instructions, read and apply
|
package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/demo.html
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
<tbody>
|
|
66
66
|
<tr><td class="fd-mono">job-7f3a91</td><td>example.summarize</td><td><span class="fd-chip fd-s-info"><span class="fd-dot"></span>Running</span></td><td><time>2026-10-11 17:02</time></td><td class="fd-num">12 480</td><td class="fd-num">$0.031</td><td class="fd-mono">4bf92f3577b34da6a3ce929d0e0e4736</td></tr>
|
|
67
67
|
<tr><td class="fd-mono">job-7f3a90</td><td>example.translate</td><td><span class="fd-chip fd-s-ok"><span class="fd-dot"></span>Done</span></td><td><time>2026-10-11 16:40</time></td><td class="fd-num">8 002</td><td class="fd-num">$0.019</td><td class="fd-mono">00f067aa0ba902b74bf92f3577b34da6</td></tr>
|
|
68
|
-
<tr><td class="fd-mono">job-7f3a8f</td><td>example.review</td><td><span class="fd-chip fd-s-warn"><span class="fd-dot"></span>Needs you</span></td><td><time>2026-10-11 15:12</time></td><td class="fd-num">2 210</td><td class="fd-num"
|
|
68
|
+
<tr><td class="fd-mono">job-7f3a8f</td><td>example.review</td><td><span class="fd-chip fd-s-warn"><span class="fd-dot"></span>Needs you</span></td><td><time>2026-10-11 15:12</time></td><td class="fd-num">2 210</td><td class="fd-num">none</td><td class="fd-mono">a3ce929d0e0e47364bf92f3577b34da6</td></tr>
|
|
69
69
|
</tbody>
|
|
70
70
|
</table>
|
|
71
71
|
</div>
|