@passioncode-ai/fabric-agent-adapter 0.35.4 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/plugins/fabric-agent-adapter/.claude-plugin/plugin.json +1 -1
  5. package/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/SKILL.md +3 -3
  6. package/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/scripts/adapt_project.py +2 -2
  7. package/plugins/fabric-agent-adapter/skills/building-fabric-services/SKILL.md +7 -4
  8. package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/estate-record.md +45 -0
  9. package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/interop.md +37 -1
  10. package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/package.md +13 -0
  11. package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/protocol.md +1 -1
  12. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-ceremonies.mjs +129 -0
  13. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-estate.mjs +67 -4
  14. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-interop.mjs +252 -5
  15. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-profiles.mjs +5 -4
  16. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-service.mjs +4 -3
  17. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-share.mjs +109 -0
  18. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_ceremonies.py +194 -0
  19. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_estate.py +82 -4
  20. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_interop.py +356 -9
  21. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_profiles.py +10 -4
  22. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_service.py +6 -4
  23. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_share.py +173 -0
  24. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/share-registration.schema.json +218 -0
  25. package/plugins/fabric-agent-adapter/skills/creating-fabric-agents/SKILL.md +3 -3
  26. package/plugins/fabric-agent-adapter/skills/working-with-fabric/SKILL.md +1 -1
  27. package/plugins/fabric-agent-adapter/skills/working-with-fabric/scripts/fabric_session.py +1 -1
@@ -0,0 +1,218 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://fabric.passioncode.ai/agent-contract/0.1.0/schemas/share-registration.schema.json",
4
+ "title": "Share registration, share-registration/1, and its receipt (DEC-0086)",
5
+ "description": "How an organization server learns which agent a share grant into it runs: the sharer's enrolled node registers each such grant over the device transport (devices.md, the DEC-0056 signature by the enrollment's #sig key), and the server answers a receipt or a typed refusal. The server takes the organization from the certificate and the registrant from the user bound to its epoch, never from the body, and keys what it holds by (that user, grantId). docs/specification/share-registration.md.",
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/$defs/registration"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/receipt"
12
+ },
13
+ {
14
+ "$ref": "#/$defs/refusal"
15
+ }
16
+ ],
17
+ "$defs": {
18
+ "registration": {
19
+ "type": "object",
20
+ "description": "What the sharer's enrolled node sends to the organization server of one of its enrollments for one share grant into that organization (DEC-0086 items 1 to 3): active, with the grant's revision, the agentRef its placements run and the grant's window; or withdrawn, with the time it ended. Nothing else: no estate id or revision, machine, principal, issuer, project, capability, spend or free text.",
21
+ "required": [
22
+ "type",
23
+ "grantId",
24
+ "context",
25
+ "state"
26
+ ],
27
+ "properties": {
28
+ "type": {
29
+ "const": "share-registration/1"
30
+ },
31
+ "grantId": {
32
+ "$ref": "#/$defs/shareGrantId",
33
+ "description": "The share grant's meta.id, compared as written (FAC-SEM-117)."
34
+ },
35
+ "context": {
36
+ "$ref": "#/$defs/orgContextId",
37
+ "description": "The grant's own context, org:<orgId>: the receiver refuses one that is not org: and its certificate's org.id as written (wrong-organization)."
38
+ },
39
+ "state": {
40
+ "enum": [
41
+ "active",
42
+ "withdrawn"
43
+ ]
44
+ },
45
+ "grantRevision": {
46
+ "type": "integer",
47
+ "minimum": 1,
48
+ "maximum": 9007199254740991,
49
+ "description": "The grant's meta.revision in the estate revision the node applied. A higher one replaces the held registration; a lower one is stale-revision; the same one with other bytes revision-conflict."
50
+ },
51
+ "agentRef": {
52
+ "$ref": "#/$defs/agentRef",
53
+ "description": "The one agentRef every placement of the revision in this context that names the grant runs (FAC-SEM-117)."
54
+ },
55
+ "startsAt": {
56
+ "$ref": "#/$defs/instant",
57
+ "description": "The grant's startsAt, as written."
58
+ },
59
+ "expiresAt": {
60
+ "$ref": "#/$defs/instant",
61
+ "description": "The grant's expiresAt, as written; after startsAt (FAC-SEM-118)."
62
+ },
63
+ "withdrawnAt": {
64
+ "$ref": "#/$defs/instant",
65
+ "description": "When the share ended: the earliest revokedAt of the grant's revocations in the revision or the applied delta entries, or the issuedAt of the revision that no longer lists the grant."
66
+ }
67
+ },
68
+ "allOf": [
69
+ {
70
+ "if": {
71
+ "properties": {
72
+ "state": {
73
+ "const": "active"
74
+ }
75
+ },
76
+ "required": [
77
+ "state"
78
+ ]
79
+ },
80
+ "then": {
81
+ "required": [
82
+ "grantRevision",
83
+ "agentRef",
84
+ "startsAt",
85
+ "expiresAt"
86
+ ],
87
+ "properties": {
88
+ "grantRevision": true,
89
+ "agentRef": true,
90
+ "startsAt": true,
91
+ "expiresAt": true,
92
+ "withdrawnAt": false
93
+ }
94
+ }
95
+ },
96
+ {
97
+ "if": {
98
+ "properties": {
99
+ "state": {
100
+ "const": "withdrawn"
101
+ }
102
+ },
103
+ "required": [
104
+ "state"
105
+ ]
106
+ },
107
+ "then": {
108
+ "required": [
109
+ "withdrawnAt"
110
+ ],
111
+ "properties": {
112
+ "withdrawnAt": true,
113
+ "grantRevision": false,
114
+ "agentRef": false,
115
+ "startsAt": false,
116
+ "expiresAt": false
117
+ }
118
+ }
119
+ }
120
+ ],
121
+ "additionalProperties": false
122
+ },
123
+ "receipt": {
124
+ "type": "object",
125
+ "description": "The receiver's 200 answer: what it holds now for the device's bound user and the grant.",
126
+ "required": [
127
+ "type",
128
+ "grantId",
129
+ "state",
130
+ "digest"
131
+ ],
132
+ "properties": {
133
+ "type": {
134
+ "const": "share-registration-receipt/1"
135
+ },
136
+ "grantId": {
137
+ "$ref": "#/$defs/shareGrantId"
138
+ },
139
+ "state": {
140
+ "enum": [
141
+ "registered",
142
+ "unchanged",
143
+ "withdrawn"
144
+ ],
145
+ "description": "registered: an active registration was taken; withdrawn: a withdrawal was taken; unchanged: the same bytes again, or a second withdrawal (of two, the earliest withdrawnAt is kept)."
146
+ },
147
+ "digest": {
148
+ "$ref": "#/$defs/sha256",
149
+ "description": "sha256: and the hex SHA-256 of the UTF-8 RFC 8785 form of the registration the receiver holds after this request (shareRegistrationDigest)."
150
+ }
151
+ },
152
+ "additionalProperties": false
153
+ },
154
+ "refusal": {
155
+ "type": "object",
156
+ "description": "The receiver's refusal of a registration after the request authenticated (devices.md transport steps 0 to 8) and its revision is one it reads: 400 malformed, 403 wrong-organization or unassigned-device, 409 already-withdrawn, agent-mismatch, stale-revision or revision-conflict.",
157
+ "required": [
158
+ "error"
159
+ ],
160
+ "properties": {
161
+ "error": {
162
+ "type": "object",
163
+ "required": [
164
+ "code",
165
+ "message"
166
+ ],
167
+ "properties": {
168
+ "code": {
169
+ "enum": [
170
+ "malformed",
171
+ "wrong-organization",
172
+ "unassigned-device",
173
+ "already-withdrawn",
174
+ "agent-mismatch",
175
+ "stale-revision",
176
+ "revision-conflict"
177
+ ]
178
+ },
179
+ "message": {
180
+ "type": "string",
181
+ "minLength": 1,
182
+ "maxLength": 200
183
+ }
184
+ },
185
+ "additionalProperties": false
186
+ }
187
+ },
188
+ "additionalProperties": false
189
+ },
190
+ "instant": {
191
+ "type": "string",
192
+ "format": "date-time",
193
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}[Tt][0-9]{2}:[0-9]{2}:[0-5][0-9](\\.[0-9]{1,3})?([Zz]|[+-][0-9]{2}:[0-9]{2})$",
194
+ "description": "An RFC 3339 date-time with an offset, seconds 00 to 59 (no leap second, which date-time admits) and at most three fraction digits: every port compares the same instants, at millisecond precision (DEC-0085, DEC-0086)."
195
+ },
196
+ "orgContextId": {
197
+ "type": "string",
198
+ "pattern": "^org:[A-Za-z0-9][A-Za-z0-9_-]{0,127}$",
199
+ "description": "DEC-0086: an organization's context, org:<orgId>: contextId without personal. What a share registration and a grant.usage carry, the grant's own context. Compared as written (docs/specification/contexts.md)."
200
+ },
201
+ "sha256": {
202
+ "type": "string",
203
+ "pattern": "^sha256:[a-f0-9]{64}$"
204
+ },
205
+ "shareGrantId": {
206
+ "type": "string",
207
+ "format": "uri",
208
+ "pattern": "^urn:fabric:share:(?!0{32}$)[0-9a-f]{32}$",
209
+ "description": "DEC-0086, FAC-SEM-117: the meta.id of a share grant into an organization: urn:fabric:share: and 32 lower-case hex digits, 128 bits from a CSPRNG, never derived from a name, an address, an estate id, an agentRef or the organization, and never all zeros. The pattern admits only its own normal form (DEC-0076), so it is compared as written; it holds no person's name, address or estate id (docs/specification/share-registration.md)."
210
+ },
211
+ "agentRef": {
212
+ "type": "string",
213
+ "maxLength": 146,
214
+ "pattern": "^urn:fabric:agent:[a-z][a-z0-9]*(?:-[a-z0-9]+)*:[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
215
+ "description": "urn:fabric:agent:<publisher>:<id> — one agent across its versions (FAC-SEM-066)."
216
+ }
217
+ }
218
+ }
@@ -5,9 +5,9 @@ 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. Ships in one plugin with adapting-projects-to-fabric, whose scripts it reuses.
6
6
  metadata:
7
7
  author: PassionCode.ai
8
- version: "0.35.4"
8
+ version: "0.36.0"
9
9
  contract-version: "0.1.0"
10
- contract-commit: "d8146cfb0a1c74fc6432284c4356bb0c864b37b5"
10
+ contract-commit: "07042181bfae2a481aa0da1a5651f24c76669c48"
11
11
  ---
12
12
 
13
13
  # Creating Fabric-compatible agents
@@ -124,7 +124,7 @@ python3 <plugin-dir>/skills/adapting-projects-to-fabric/scripts/adapt_project.py
124
124
  The effect class is declared, never defaulted: ask the author what the agent does outside itself when the request
125
125
  does not say. Cost presets are only for a run whose cost varies; their amounts come from the author or measured runs.
126
126
 
127
- Pin exactly contract `0.1.0` at commit `d8146cfb0a1c74fc6432284c4356bb0c864b37b5` and
127
+ Pin exactly contract `0.1.0` at commit `07042181bfae2a481aa0da1a5651f24c76669c48` and
128
128
  read the pinned guide before implementing protocol details. If this skill is installed
129
129
  without its sibling, the scaffolder is absent: create the bundle by hand from the pinned
130
130
  contract's `docs/guides/connecting-compatible-agents.md` and mark the structural check
@@ -19,7 +19,7 @@ compatibility: >-
19
19
  this plugin; Codex/Kimi use command hooks; Hermes/OpenCode/OpenClaw/Pi use native context plugins after opt-in.
20
20
  metadata:
21
21
  author: PassionCode.ai
22
- version: "0.35.4"
22
+ version: "0.36.0"
23
23
  ---
24
24
 
25
25
  # Working with Fabric
@@ -66,7 +66,7 @@ WATCH_MAX_BACKOFF_S = 900
66
66
  SESSION_ID = re.compile(r"[A-Za-z0-9._:-]{1,128}")
67
67
  LOOPBACK_ORIGIN = re.compile(r"http://127\.0\.0\.1:(\d{1,5})")
68
68
  LOCAL_ORIGIN = re.compile(r'"origin": "http://(?:127\.0\.0\.1|localhost)')
69
- VERSION = "0.35.4"
69
+ VERSION = "0.36.0"
70
70
  HOSTS = {"claude": "Claude Code", "codex": "Codex", "kimi": "Kimi Code",
71
71
  "hermes": "Hermes", "opencode": "OpenCode", "openclaw": "OpenClaw", "pi": "Pi"}
72
72
  NATIVE_PLUGIN_HOSTS = frozenset(("hermes", "opencode", "openclaw", "pi"))