@passioncode-ai/fabric-agent-adapter 0.83.1 → 0.84.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +2 -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 +1 -1
  6. package/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/scripts/fabric_identifiers.py +1 -0
  7. package/plugins/fabric-agent-adapter/skills/adapting-projects-to-fabric/scripts/fabric_secrets.py +1 -0
  8. package/plugins/fabric-agent-adapter/skills/building-fabric-services/SKILL.md +2 -2
  9. package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/fabric-button.js +3 -2
  10. package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/fabric-dashboard.css +2 -1
  11. package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/fabric-dashboard.js +3 -2
  12. package/plugins/fabric-agent-adapter/skills/building-fabric-services/assets/dashboard-kit/kit.json +9 -4
  13. package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/board.md +8 -3
  14. package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/dashboard-kit.md +1 -1
  15. package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/kit-modules.md +9 -1
  16. package/plugins/fabric-agent-adapter/skills/building-fabric-services/references/lifecycle.md +3 -2
  17. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-a2a-server.mjs +1 -0
  18. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-a2a.mjs +1 -0
  19. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-actions.mjs +1 -0
  20. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-auth.mjs +1 -0
  21. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-backups.mjs +1 -0
  22. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-base.mjs +1 -0
  23. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-board-fixture.mjs +1 -0
  24. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-board-link.mjs +1 -0
  25. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-board-session.mjs +2 -0
  26. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-board-shapes.mjs +1 -0
  27. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-board-slots.mjs +9 -1
  28. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-board.mjs +1 -0
  29. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-ceremonies.mjs +1 -0
  30. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-connections.mjs +1 -0
  31. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-context.mjs +1 -0
  32. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-crypto.mjs +1 -0
  33. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-delegation.mjs +1 -0
  34. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-descriptor.mjs +2 -1
  35. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-estate-rules.mjs +1 -0
  36. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-estate.mjs +1 -0
  37. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-events.mjs +1 -0
  38. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-holds.mjs +1 -0
  39. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-http.mjs +1 -0
  40. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-hub.mjs +1 -0
  41. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-identifiers.mjs +1 -0
  42. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-interop-rules.mjs +1 -0
  43. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-interop.mjs +1 -0
  44. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-jsvalue.mjs +1 -0
  45. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-load.mjs +1 -0
  46. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-lock.mjs +1 -0
  47. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-logs.mjs +1 -0
  48. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-mandate.mjs +1 -0
  49. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-openrouter.mjs +1 -0
  50. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-ops-digest.mjs +1 -0
  51. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-package-schema.mjs +1 -0
  52. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-package.mjs +1 -0
  53. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-page-links.mjs +1 -0
  54. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-paths.mjs +1 -0
  55. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-peer-owner.mjs +2 -1
  56. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-platform.mjs +1 -0
  57. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-profiles.mjs +1 -0
  58. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-protocols.mjs +1 -0
  59. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-secrets.mjs +1 -0
  60. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-service.mjs +1 -0
  61. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-share.mjs +1 -0
  62. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-socket-proof.mjs +1 -0
  63. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-supervisors.mjs +15 -3
  64. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-tailnet-identity.mjs +1 -0
  65. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-tailnet.mjs +1 -0
  66. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-time.mjs +1 -0
  67. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric-usage.mjs +1 -0
  68. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_a2a.py +1 -0
  69. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_a2a_server.py +1 -0
  70. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_actions.py +1 -0
  71. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_auth.py +1 -0
  72. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_backups.py +1 -0
  73. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_base.py +1 -0
  74. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_board.py +1 -0
  75. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_board_fixture.py +1 -0
  76. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_board_link.py +1 -0
  77. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_board_session.py +2 -0
  78. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_board_shapes.py +1 -0
  79. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_board_slots.py +10 -1
  80. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_ceremonies.py +1 -0
  81. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_connections.py +1 -0
  82. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_context.py +1 -0
  83. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_crypto.py +1 -0
  84. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_delegation.py +1 -0
  85. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_descriptor.py +2 -1
  86. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_estate.py +1 -0
  87. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_estate_rules.py +1 -0
  88. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_events.py +1 -0
  89. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_holds.py +1 -0
  90. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_http.py +1 -0
  91. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_hub.py +1 -0
  92. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_identifiers.py +1 -0
  93. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_interop.py +1 -0
  94. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_interop_rules.py +1 -0
  95. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_jsvalue.py +1 -0
  96. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_load.py +1 -0
  97. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_lock.py +1 -0
  98. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_logs.py +1 -0
  99. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_mandate.py +1 -0
  100. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_openrouter.py +1 -0
  101. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_ops_digest.py +1 -0
  102. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_package.py +1 -0
  103. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_package_schema.py +1 -0
  104. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_page_links.py +1 -0
  105. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_paths.py +1 -0
  106. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_peer_owner.py +47 -47
  107. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_platform.py +1 -0
  108. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_profiles.py +1 -0
  109. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_protocols.py +1 -0
  110. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_secrets.py +1 -0
  111. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_service.py +1 -0
  112. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_share.py +1 -0
  113. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_socket_proof.py +1 -0
  114. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_supervisors.py +16 -8
  115. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_tailnet.py +1 -0
  116. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_tailnet_identity.py +1 -0
  117. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_time.py +1 -0
  118. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/fabric_usage.py +1 -0
  119. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/kit.json +321 -105
  120. package/plugins/fabric-agent-adapter/skills/building-fabric-services/scripts/sample_service.py +2 -1
  121. package/plugins/fabric-agent-adapter/skills/creating-fabric-agents/SKILL.md +3 -3
  122. package/plugins/fabric-agent-adapter/skills/creating-fabric-agents/references/where-agents-run.md +2 -2
  123. package/plugins/fabric-agent-adapter/skills/creating-fabric-agents/scripts/admit.py +33 -13
  124. package/plugins/fabric-agent-adapter/skills/observing-products/SKILL.md +1 -1
  125. package/plugins/fabric-agent-adapter/skills/working-with-fabric/SKILL.md +1 -1
  126. package/plugins/fabric-agent-adapter/skills/working-with-fabric/scripts/fabric_session_env.py +1 -1
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // Which OS account owns each end of a loopback TCP connection (DEC-0154 HA-2, FAA-226, layer L0); the twin of
2
3
  // fabric_peer_owner.py, which is Project Observatory's peer_owner vendored by commit (its 1.3.1 line). Node 18+, no
3
4
  // dependency; the one kit module it may load is fabric-socket-proof.mjs beside it (DEC-0155 RT-2, FAA-292): on a
@@ -49,7 +50,7 @@ import net from 'node:net';
49
50
  import os from 'node:os';
50
51
  import { fileURLToPath } from 'node:url';
51
52
 
52
- export const PEER_OWNER_VERSION = '1.3.1+kit.7'; // the Python twin's, Observatory's 1.3.1 line with the kit's differences
53
+ export const PEER_OWNER_VERSION = '1.3.1+kit.8'; // the Python twin's, Observatory's 1.3.1 line with the kit's differences
53
54
  export const THIS_ACCOUNT = 'this-account';
54
55
  export const ANOTHER_ACCOUNT = 'another-account';
55
56
  export const SYSTEM = 'system';
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // Windows, where the kit needs it (DEC-0032): reading a file's ACL to refuse a token file others can read.
2
3
  // Part of the Node service kit (FAA-65, layer L1); the twin of fabric_platform.py. Node 20+, no dependency.
3
4
  import crypto from 'node:crypto';
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // Runner and model profiles in the kit (Fabric Agent Contract DEC-0046, Fabric ADR-0147). A port of the contract's
2
3
  // `src/profile-rules.ts` at the pin — resolveModelProfile and the FAC-SEM-058…060 checks — held to the contract's own
3
4
  // answers by test/fixtures/contract/profile-vectors.json; plus the doctor's runner and model checks (runners.md C2) and
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // Protocol revisions (DEC-0067) and an event's machine-readable data (DEC-0070, the feed-data protocols).
2
3
  // Part of the Node service kit (FAA-65, layer L3); the twin of fabric_protocols.py. Node 20+, no dependency.
3
4
  import { credentialName, secretArgument, secretUrl, secretValue } from './fabric-secrets.mjs';
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // The contract's one credential detector (Fabric Agent Contract DEC-0044, `src/secret-shape.ts` at the pin): a name
2
3
  // that can only carry a credential, a value shaped like one, a launch argument that carries one, and a URL that does
3
4
  // (LC-21). A port held to the contract's own answers by test/fixtures/contract/profile-vectors.json. No dependencies.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // Reference kit for the fabric-service/0.1 local service extension, Node: the facade (the twin of fabric_service.py).
2
3
  // Since 0.40.0 (FAA-65) the kit is a set of modules and this file re-exports everything it exported at 0.39.1, so
3
4
  // `import * as k from './fabric-service.mjs'` keeps working. Install it with `fabric_kit.py install <dir> --lang node`,
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // Share grants into an organization and their registrations (contract DEC-0086), the Node kit; the twin of
2
3
  // fabric_share.py, answer for answer (test/fixtures/contract/share-vectors.json). Node built-ins only.
3
4
  // FAC-SEM-117 (a share grant's id, window and agentRef, with parent), FAC-SEM-118 (a share-registration/1 document) and
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // This OS account's own TCP sockets, read from its own processes (layer L0; DEC-0155 RT-2, FAA-292; FAA-272); the twin
2
3
  // of fabric_socket_proof.py. Node 18+, no dependency; nothing here imports another kit module.
3
4
  //
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // Supervisors (DEC-0032, LC-14): systemd user units, Task Scheduler tasks and launchd plists, installed and removed without touching what the operator turned off; release pruning (LC-11, LC-15).
2
3
  // Part of the Node service kit (FAA-65, layer L3); the twin of fabric_supervisors.py. Node 20+, no dependency.
3
4
  import fs from 'node:fs';
@@ -11,6 +12,7 @@ import { SUPERVISOR_ARG, markerArguments } from './fabric-lock.mjs';
11
12
  import { URI } from './fabric-backups.mjs';
12
13
  import { CheckedAgent, ListenerRefused, PS, SERVER_NOT_OWN, TABLE_RESTRICTED, UNKNOWN, parsePsUid, pidListens,
13
14
  runProgram, serverEnd } from './fabric-peer-owner.mjs';
15
+ import { loopbackHost } from './fabric-socket-proof.mjs';
14
16
  import http from 'node:http';
15
17
  import net from 'node:net';
16
18
 
@@ -560,20 +562,30 @@ export class ForeignUserAnswer {
560
562
  // The well-known answer at a loopback origin, read only on a connection whose server end is this OS account's process
561
563
  // (DEC-0154 HA-2): null when nothing answers or the answer is not JSON, a ForeignUserAnswer when the listener is another
562
564
  // account's or its owner cannot be told.
563
- // Every loopback spelling (127.0.0.1, another 127/8 address, localhost, [::1]) goes on a checked connection, never the
565
+ // Every loopback spelling (127/8 in any form, localhost or a name under it, [::1]) goes on a checked connection, never the
564
566
  // unchecked way (FAA-257): the host, without brackets, and the port, or null.
565
567
  function loopbackOrigin(origin) {
566
568
  let url;
567
569
  try { url = new URL(String(origin)); } catch { return null; }
568
570
  const host = url.hostname.replace(/^\[|\]$/g, '');
569
- const loop = host === 'localhost' || host === '::1' || (net.isIPv4(host) && host.startsWith('127.'));
570
- if (url.protocol !== 'http:' || !loop) return null;
571
+ // the kit's one loopback rule (FAA-326): a name under .localhost too, as the Python twin reads it
572
+ if (url.protocol !== 'http:' || !loopbackHost(host)) return null;
571
573
  // new URL drops a default port: http://127.0.0.1:80 has port '', read as 80 as Python's urlsplit reads it (0.79.0 seam)
572
574
  return { host, port: Number(url.port || 80) };
573
575
  }
574
576
 
577
+ // An IPv4-mapped 127/8 origin (`new URL` writes it ::ffff:7f00:1): loopback the kit's rule does not take, which fetch would
578
+ // reach unchecked, so it is refused unread, as the Python twin refuses it (0.84.0 seam reading).
579
+ function mappedLoopback(origin) {
580
+ let host;
581
+ try { host = new URL(String(origin)).hostname; } catch { return false; }
582
+ const m = /^\[::ffff:([0-9a-f]{1,4}):[0-9a-f]{1,4}\]$/i.exec(host);
583
+ return !!m && parseInt(m[1], 16) >> 8 === 127;
584
+ }
585
+
575
586
  export async function wellKnownOf(origin, { vouchPid = null, ask = undefined } = {}) {
576
587
  const m = loopbackOrigin(origin);
588
+ if (!m && mappedLoopback(origin)) return null;
577
589
  if (!m) {
578
590
  try {
579
591
  const response = await fetch(`${origin}/.well-known/fabric-service`, { signal: AbortSignal.timeout(2000) });
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // A person's identity at every door of a service published through `tailscale serve` (FAA-324). The twin of
2
3
  // fabric_tailnet_identity.py; both answer test/fixtures/tailnet-identity/vectors.json alike. No dependencies beyond
3
4
  // node:fs, node:net and node:perf_hooks.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // Who is calling an agent that sits behind `tailscale serve`, and what that person may open (FAA-297). The twin of
2
3
  // fabric_tailnet.py; both answer test/fixtures/tailnet/vectors.json alike. No dependencies beyond node:crypto and
3
4
  // node:net.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // Dates and times the way the contract reads them, once for the whole Node kit (FAA-65, layer L0); the twin of
2
3
  // fabric_time.py. NaN, never an exception, answers what cannot be read: callers compare it and get a finding.
3
4
  // Node 20+, no dependency; nothing here imports another kit module.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  // What a service spends on models (DEC-0021, DEC-0065, DEC-0091): receipts, the ledger, the usage report and its rules (FAC-SEM-025), OpenRouter attribution (FAC-SEM-098), spending limits (DEC-0027).
2
3
  // Part of the Node service kit (FAA-65, layer L3); the twin of fabric_usage.py. Node 20+, no dependency.
3
4
  import fs from 'node:fs';
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The reading side of an A2A Agent Card (DEC-0122): the well-known document's `surfaces.a2a` member, read as the
2
3
  contract's schema reads it (`a2a_surface_findings`, `a2a_view`; `a2a_surface` builds one), and what a public card must
3
4
  not carry (`agent_card_findings`): no member about the running process, no secret, no `securitySchemes` entry naming
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The serving side and a bounded client of A2A 1.0 (FAA-10, DEC-0122): an Agent Card built from the service's
2
3
  capabilities (`agent_card`, every skill an A2A `AgentSkill`, checked by `fabric_a2a.agent_card_findings` before it is
3
4
  served), the JSON-RPC binding (`A2ABinding`: `SendMessage`, `SendStreamingMessage`, `GetTask`, `CancelTask`) mapped
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """Every action a person has, its agent tool and who decides it: `fabric-actions/0.1`, the extension keyed
2
3
  extensions/actions/0.1 (DEC-0121, FAC-SEM-142). Part of the service kit (layer L3); the twin of fabric-actions.mjs.
3
4
 
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """Who may call a service: the descriptor token, the network guard,
2
3
  the operator's one-time login and its session, remote placement (DEC-0019) and the feed client's token header.
3
4
  Part of the service kit (FAA-65, layer L3)."""
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """Settings backups (DEC-0025, FAC-SEM-035): the canonical form, the digest, writing, listing, checking and
2
3
  restoring them. Part of the service kit (FAA-65, layer L3)."""
3
4
  from __future__ import annotations
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """What every module of the service kit shares (FAA-65, layer L1): the protocol name, ServiceError, the
2
3
  platform, ids and now_iso. Standard library only."""
3
4
  from __future__ import annotations
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The project board connector, Python: the facade (fabric-project-comms/0.1).
2
3
 
3
4
  Since 0.40.0 (FAA-65) the connector is layered modules, lowest first: fabric_board_shapes (the wire), fabric_board_link
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """A fixture conversation for the probe (check_service.py, rule board.responder): a scripted board that a responder
2
3
  can be run against without Fabric. Part of the board connector (FAA-65, layer L4)."""
3
4
  from __future__ import annotations
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The board link (DEC-0078, FAA-12b): the board session over the hub, the fsynced checkpoint and a claimed request as
2
3
  data. Part of the board connector (FAA-65, layer L4), below the responder in fabric_board_session, which re-exports these
3
4
  names. Standard library only, Python 3.9+."""
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The board responder (DEC-0078, FAA-12b): the work context a handler sees and the responder loop (enroll, claim,
2
3
  accept the exact digest, effect, progress, complete; stop when fenced). The session, the checkpoint and the request live
3
4
  in fabric_board_link and are re-exported here. Part of the board connector (FAA-65, layer L4)."""
@@ -156,6 +157,7 @@ class Responder(SlotKeeper):
156
157
  #: The first pause under an operator's hold (DEC-0079); it doubles to HOLD_RETRY_MAX_SECONDS.
157
158
  self.hold_delay = POLL_SECONDS
158
159
  self._on_hold: set = set()
160
+ self._taken_back: set = set() # capabilities the operator took back, not yet held again (FAA-325)
159
161
  #: One fenced call at a time, and the entry edits beside them (FAA-77, finding 36).
160
162
  self._lock = threading.RLock()
161
163
  self._to_resume: List[str] = [] # transferred requests waiting until nothing runs (finding 39)
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The project board's wire (fabric-project-comms/0.1, DEC-0022, DEC-0073, DEC-0077): constants, the refusal codes, the
2
3
  contract's request digest, the closed shapes the kit reads back (receipts, refusals, directory pages, messages) and
3
4
  evidence. Part of the board connector (FAA-65, layer L4)."""
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The board responder's slot records (FAA-155, FAA-163): the generation it holds each slot at, a move to another
2
3
  session and its take-back, and a capability whose enroll was refused, retried on its own. Part of the board connector
3
4
  (FAA-65, layer L4); `Responder` (fabric_board_session) is a `SlotKeeper`."""
@@ -35,6 +36,10 @@ class SlotKeeper:
35
36
  self._confirmed[capability] = generation
36
37
  self._said.pop("board.slot.refused:" + capability, None) # held again: a later refusal is said again
37
38
  self._said.pop("board.slot.contested:" + capability, None) # and a later contest, by enroll or replace
39
+ if capability in self._taken_back: # FAA-325: held again after the operator's take-back, said once
40
+ self._taken_back.discard(capability)
41
+ self._emit("board.slot.returned", "info", "The %s slot on this Project is this service's again: the operator "
42
+ "took it back, and it answers it from now on." % capability, capability=capability, generation=generation)
38
43
 
39
44
  def _note(self, capability: str, record: Optional[Dict[str, Any]]) -> None:
40
45
  """The slot record, best effort: one that cannot be written now is written at the next receipt."""
@@ -206,6 +211,7 @@ class SlotKeeper:
206
211
  if self.checkpoint.slots.get(capability) != held:
207
212
  return False # take_back (an action thread) forgot the record meanwhile; its own next tick enrolls
208
213
  self.slots[capability] = {"state": "held", "generation": generation, "renewed_at": float("-inf")} # no lease yet
214
+ self._taken_back.discard(capability) # said below as a move back, once
209
215
  self._held_at(capability, generation)
210
216
  self._said.pop("board.slot.moved", None) # a later move is said again
211
217
  self._emit("board.slot.returned", "info", "The %s slot on this Project is this service's again: the operator moved it "
@@ -220,9 +226,12 @@ class SlotKeeper:
220
226
  self.checkpoint.slot(capability, None)
221
227
  self.claim_keys.pop(capability, None) # a receipt from before the take-back may be dead
222
228
  self._probing.discard(capability)
223
- if (self.slots.get(capability) or {}).get("state") == "moved":
229
+ state = (self.slots.get(capability) or {}).get("state")
230
+ if state == "moved":
224
231
  self.slots[capability] = {"state": "contested", "renewed_at": 0.0}
225
232
  self._said.pop("board.slot.moved", None)
233
+ if state != "held": # board.slot.returned is said once the slot is held again (FAA-325); held, nothing to say
234
+ self._taken_back.add(capability)
226
235
 
227
236
  # -- one capability's refusal (FAA-163) ------------------------------------------------------------------------
228
237
  def _retry_later(self, capability: str, entries: List[Dict[str, Any]], exc: BoardError) -> None:
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
2
3
  """The estate ceremonies' headless join (contract DEC-0084), the Python kit; the Node twin is fabric-ceremonies.mjs.
3
4
  Standard library only.
4
5
 
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """What an agent uses: `fabric-connections/0.1`, the extension keyed extensions/connections/0.1 (DEC-0096, FAC-SEM-127).
2
3
  `connections_view` reads a well-known document as the contract's `connectionsView` does (it never raises);
3
4
  `connections_extension` builds the `extensions` entry a service declares, `state` from its own checks and its
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """One instance per context (FAA-125, organization row N-11; contract DEC-0082, "One instance per context on a machine"):
2
3
  from a context, ``personal`` or ``org:<orgId>``, the service instance, its folders, descriptor and instance lock. Part of
3
4
  the service kit (layer L3, after fabric_descriptor); the twin of fabric-context.mjs. Standard library only.
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The kit's cryptography, once (FAA-65, layer L1): what the contract's verifiers need and nothing more.
2
3
 
3
4
  - ``ed25519_verify(public_key, message, signature)`` (RFC 8032) and ``is_small_order_key`` with
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
2
3
  """The callee's side of fabric-delegation/0.1 (Fabric Agent Contract DEC-0039, Fabric ADR-0144): check a
3
4
  delegation token or an approval offline against the estate's published keys, and answer `ok` or one refusal
4
5
  code. A port of the contract's `src/delegation.ts` at the pinned revision; the shared vectors in
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """How a service is found (fabric-service/0.1): its descriptor, peers and app descriptors (DEC-0061, DEC-0069),
2
3
  build identity and the well-known document, the loopback HTTP server. Part of the service kit (FAA-65, layer L3)."""
3
4
  # Example URLs write their scheme in angle brackets: read `<https>` as `https` (FAA-212).
@@ -55,7 +56,7 @@ from fabric_usage import (
55
56
  DASHBOARD_EXTENSION_KEY = "https://fabric.passioncode.ai/agent-contract/extensions/dashboard/0.1"
56
57
 
57
58
 
58
- DASHBOARD_KIT = "fabric-dashboard-kit@1.1.8"
59
+ DASHBOARD_KIT = "fabric-dashboard-kit@1.1.9"
59
60
 
60
61
 
61
62
  REFERENCE_THEMES = ("graphite", "fabric", "paper", "forest", "ocean", "ember", "contrast")
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
2
3
  """`estate-record/1` (Fabric Agent Contract DEC-0055): verify an estate revision and check its rules.
3
4
 
4
5
  One revision of one person's estate: the passkeys that sign it, the machines with their device keys and hub-key
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
2
3
  """`estate-record/1` (Fabric Agent Contract DEC-0055): the record's own rules, without a verifier.
3
4
 
4
5
  The contract's `src/estate-record-rules.ts` at the pin, ported answer for answer and held to the contract's own vectors
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """A service's events (DEC-0029): making them, paging them and the JSONL event log. Part of the service kit
2
3
  (FAA-65, layer L3)."""
3
4
  from __future__ import annotations
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """Work a service holds by its own limits, said to its caller and its operator (FAA-298). Part of the service kit
2
3
  (layer L3, after fabric_interop).
3
4
 
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """An outbound HTTP client for a service: one deadline across every attempt, bounded retries with jittered backoff,
2
3
  `Retry-After` honoured up to a cap, a response size cap, and no secret in an error.
3
4
 
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The Fabric hub's door, as a service agent reaches it (fabric-hub/0.1; Fabric ADR-0115 §1, ADR-0149 §4; FAA-12b).
2
3
 
3
4
  A service that answers a Project's requests on the board (`fabric-project-comms/0.1`) needs three things from Fabric's
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """Identifier equality (contract DEC-0076): two identifiers are the same when their normal forms are equal.
2
3
 
3
4
  A port of the contract's `src/identifiers.ts`, held to its `fixtures/vectors/identifiers.json`. The normal form of a URI
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
2
3
  """Reference kit for the fabric-interop/0.1 extension: how agents are called.
3
4
 
4
5
  Standard library only, Python 3.9+. It sits beside fabric_service.py and uses it for
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """fabric-interop/0.1, the rule layer: the extension's names and limits, its errors, the trace context (C3.4), a
2
3
  usage object's reading (C3.2) and the job limits and uncertain effects (DEC-0087). Every function answers by a rule
3
4
  and touches no file; fabric_interop builds the tools, the envelope, the job store and the MCP server on it and
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """JavaScript's view of JSON values, once for the whole kit (FAA-65, layer L0).
2
3
 
3
4
  The contract's answers are computed by TypeScript, so a kit that reads JSON the way Python does disagrees with them on
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The call queue and the load report of DEC-0104 (contract `src/agent-network.ts`, FAC-SEM-131 to FAC-SEM-133), as the
2
3
  contract's reference answers them: a node that hosts a job-backed agent queues its jobs per (agentRef, context) with
3
4
  these and reports its load as `service-load/1` under `extensions/load/0.1`. Part of the service kit (FAA-289, layer L3);
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """One copy of a service, locked before any side effect (LC-01, DEC-0057): the instance lock, the supervisor marker
2
3
  in both its forms, and the wait budget under a supervisor. Part of the service kit (FAA-65, layer L3).
3
4
 
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """Logs and stopping (LC-01, LC-12): a rotating log, a capped stdout log, the stop signal and the drain.
2
3
  Part of the service kit (FAA-65, layer L3)."""
3
4
  from __future__ import annotations
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """The operator's mandate, `mandate/1` (DEC-0125, FAC-SEM-144): the operator's instruction for one task travels with
2
3
  the task, narrowed at each hand-over. Part of the service kit (layer L2); the twin of fabric-mandate.mjs.
3
4
 
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """OpenRouter chat completions for a service: its own key, a spend ceiling checked before every attempt, a usage
2
3
  receipt for every answered call, and a fallback model of another vendor.
3
4
 
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """A service's operations digests (contract DEC-0153, `docs/specification/ops-digest.md` at the pin): every record of its
2
3
  operations log counted by operation and outcome in the hour it happened, one `ops.digest.hourly@1` line for each hour
3
4
  the service observed itself running in (an empty one included), and one `ops.digest.daily@1` line for each closed UTC
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
2
3
  """``fabric-package/1`` (contract DEC-0050, DEC-0051, DEC-0071, DEC-0074; FAA-27a): pack an agent or a skill set as one
3
4
  folder with ``fabric.package.json``, sign it, and verify it. The twin of ``fabric-package.mjs``.
4
5
 
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """fabric-package/1, the schema reading: the package schema bundled from the contract at the pin, read by a JSON Schema
2
3
  2020-12 subset with JavaScript's patterns, lengths in code points and the formats the contract uses, as
3
4
  fabric-package.mjs reads it. fabric_package checks, packs, signs and verifies on it and re-exports these names. Part of
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
2
3
  """A service's pages as Fabric Dashboards' open_link (Fabric Agent Contract DEC-0123, PL-1 to PL-4, FAC-SEM-143;
3
4
  `src/page-link-rules.ts` at the pin): build and read the open_link, tell a raw local address, and the findings on a
4
5
  link a document hands a person and on a URL-mode input request. A port held to the contract's answers by
@@ -1,3 +1,4 @@
1
+ # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-PassionCode-Commercial
1
2
  """Where a service's things live (fabric-service/0.1): the services directory, a service's data, config, logs and run
2
3
  directories per OS, private directories and atomic writes. Part of the service kit (FAA-65, layer L1)."""
3
4
  from __future__ import annotations