@agenticprimitives/agent-relationships 1.0.0-alpha.5 → 1.0.0-alpha.7

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 (2) hide show
  1. package/README.md +32 -51
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @agenticprimitives/agent-relationships
2
2
 
3
- > ⚠️ **Experimental — do NOT use for confidential edges.**
3
+ > **EXPERIMENTAL — do NOT use for confidential edges.**
4
4
  >
5
5
  > This package writes the trust-fabric edge graph **publicly on-chain**.
6
6
  > Every edge — its endpoints, type, role set, and status — is visible to
@@ -20,6 +20,9 @@
20
20
  > on each side, `EdgeStatus` lifecycle (proposed/confirmed/active/revoked),
21
21
  > and the actor address that submitted each state transition.
22
22
  >
23
+ > Private links — including every person↔org link — belong in
24
+ > [`related-agents`](../related-agents) (holder-resident vault credentials,
25
+ > [ADR-0025](../../docs/architecture/decisions/0025-related-agent-links-are-private.md)).
23
26
  > A future v2 private-edge variant (commitment-based, with
24
27
  > selective-disclosure proofs) will live alongside this package. Until it
25
28
  > ships, **adopters requiring confidentiality should not use this
@@ -29,43 +32,18 @@
29
32
  > Tracked as the **Privacy Fork** (audit `PKG-agent-relationships-001` /
30
33
  > `EXT-019`). `capability.manifest.json` sets `"stability": "experimental"`.
31
34
 
32
- Trust-fabric edge primitive for Smart Agents. An `Edge` is a
33
- `(subject, object, relationshipType)` triple with a role set on each
34
- side, a status lifecycle (`PROPOSED → CONFIRMED → ACTIVE → REVOKED`),
35
- and optional off-chain metadata anchored by a deterministic
36
- content-hash.
35
+ **A trust graph between addresses, not accounts in someone's database.** As agents take on real work, the question moves from "who is this agent?" to "who stands behind it — which org is it a member of, who governs it, who vouches for it?" Most systems answer with rows in a vendor database that vanish when the vendor does. This package answers with on-chain edges between canonical Smart Agent addresses: an `Edge` is a `(subject, object, relationshipType)` triple with a role set on each side, a status lifecycle (`PROPOSED → CONFIRMED → ACTIVE → REVOKED`), and optional off-chain metadata anchored by a deterministic content hash. Because the endpoints are the canonical identities themselves ([ADR-0010](../../docs/architecture/decisions/0010-smart-agent-canonical-identifier.md)), edges survive credential rotation, name changes, and every other facet swap.
37
36
 
38
- Where [`agent-naming`](../agent-naming) resolves *names → addresses*
39
- and [`agent-profile`](../agent-profile) owns the *profile layer*,
40
- this package owns the **relationship layer**: the on-chain graph of
41
- who-knows-whom that other layers compose against (org membership,
42
- governance assertions, validation trust, etc.).
37
+ Part of [agenticprimitives](../../README.md) — the trust substrate for the agent economy: one canonical Smart Agent identity with custody, delegation, naming, credentials, and audit evidence designed as one system.
38
+
39
+ Where [`agent-naming`](../agent-naming) resolves *names → addresses* and [`agent-profile`](../agent-profile) owns the *profile layer*, this package owns the **relationship layer**: the public graph of org membership, governance assertions, partnerships, and validation trust that other layers compose against.
43
40
 
44
41
  > **Layer:** Discover — the trust **graph** (not canonical identity — that is `agent-account`).
45
42
  > **Canonical key:** Smart Agent addresses. An edge connects anchors; an edge is **not** a delegation.
46
43
 
47
- ## Status
48
-
49
- **Phase 1** — pure SDK + spec + API skeleton. Read methods on the
50
- client throw `R Phase 2`; write methods throw `R Phase 4`. Contracts
51
- (`AgentRelationship.sol` + `RelationshipTypeRegistry.sol`) land in
52
- Phase 3. `AgentAssertion` (signed-claim layer) and
53
- `AgentRelationshipResolver` (policy layer) are **deferred to v2** per
54
- ADR-0007.
55
-
56
- See [`specs/216-agent-relationships.md`](../../specs/216-agent-relationships.md)
57
- for the full design + the phase plan, and:
58
-
59
- - [ADR-0006](../../docs/architecture/decisions/0006-agent-naming-as-resolution-layer.md)
60
- — why naming hierarchy is parent-pointer-based, NOT a
61
- `NAMESPACE_CONTAINS` edge.
62
- - [ADR-0007](../../docs/architecture/decisions/0007-agent-identity-stack-three-packages.md)
63
- — why the identity stack is three packages, not one.
64
-
65
44
  ## Install
66
45
 
67
- This package is workspace-internal in the agenticprimitives monorepo
68
- and not yet published.
46
+ Workspace-internal in the agenticprimitives monorepo; not yet published.
69
47
 
70
48
  ## Usage
71
49
 
@@ -85,8 +63,7 @@ const id = computeEdgeId(
85
63
  // 0x… — keccak256 of packed (subject || object || typeId)
86
64
  ```
87
65
 
88
- Same triple → same edge ID. Direction matters for non-symmetric types
89
- (`HAS_MEMBER(A→B)` ≠ `HAS_MEMBER(B→A)`).
66
+ Same triple → same edge ID; idempotent propose comes for free. Direction matters for non-symmetric types (`HAS_MEMBER(A→B)` ≠ `HAS_MEMBER(B→A)`), and self-edges are refused.
90
67
 
91
68
  ### Relationship type + role taxonomy
92
69
 
@@ -108,9 +85,7 @@ TYPE_SEMANTICS[RELATIONSHIP_TYPE.PARTNERSHIP].symmetric; // true
108
85
  TYPE_SEMANTICS[RELATIONSHIP_TYPE.HAS_GOVERNANCE_OVER].hierarchical; // true
109
86
  ```
110
87
 
111
- `NAMESPACE_CONTAINS` is **intentionally absent** — naming hierarchy
112
- lives in [`agent-naming`](../agent-naming) via parent-pointer per
113
- ADR-0006.
88
+ `NAMESPACE_CONTAINS` is **intentionally absent** — naming hierarchy lives in [`agent-naming`](../agent-naming) via parent-pointer per [ADR-0006](../../docs/architecture/decisions/0006-agent-naming-as-resolution-layer.md), so no parallel authority can drift.
114
89
 
115
90
  ### Relationships client (Phase 2+)
116
91
 
@@ -139,31 +114,37 @@ await rel.proposeEdge({
139
114
  await rel.confirmEdge({ edgeId: '0x…', selfRoles: [] });
140
115
  ```
141
116
 
142
- Each write is authorized via the actor's Smart Agent ERC-1271 →
143
- its CustodyPolicy module. The relationships package itself stays
144
- custody-agnostic (no `@agenticprimitives/account-custody` import).
117
+ Each write is authorized via the actor's Smart Agent ERC-1271 → its CustodyPolicy module. The relationships package itself stays custody-agnostic (no `@agenticprimitives/account-custody` import).
118
+
119
+ ## How it's different
120
+
121
+ The competing category is **social/trust-graph products and registry "endorsement" features** — follower edges, attestation lists, org charts held in an app database:
122
+
123
+ - **Bilateral by construction.** A non-symmetric edge requires confirmation from both sides before it can influence anything (Phase 3+ contract enforcement); a `PROPOSED` edge is a claim, not a fact. Either party can revoke unilaterally, permissionlessly.
124
+ - **Edges connect identities, not handles.** Both endpoints are canonical Smart Agent addresses, so the graph cannot be orphaned by a renamed handle or a rotated key.
125
+ - **An edge is not authority.** `HAS_GOVERNANCE_OVER` asserts a relationship; it grants nothing. Authority is always a delegation or a custody-policy operation — separate primitives, separate packages. Graph products routinely blur this line; the package boundary here makes the blur impossible.
145
126
 
146
127
  ## Subpath exports
147
128
 
148
- - `@agenticprimitives/agent-relationships/taxonomy` —
149
- relationship-type + role constants + semantics map.
129
+ - `@agenticprimitives/agent-relationships/taxonomy` — relationship-type + role constants + semantics map.
150
130
 
151
131
  ## Security invariants
152
132
 
153
- - Edge ID is **deterministic** —
154
- `keccak256(subject || object || relationshipType)`. Off-chain and
155
- on-chain derivations always match.
133
+ - Edge ID is **deterministic** — `keccak256(subject || object || relationshipType)`; off-chain and on-chain derivations always match.
156
134
  - `computeEdgeId` refuses self-edges (subject === object).
157
- - Relationship-type + role IDs are `keccak256(name)` (matches
158
- Solidity `keccak256(bytes(name))`).
159
- - Two-side confirmation for non-symmetric types (Phase 3+ contract
160
- enforcement).
135
+ - Relationship-type + role IDs are `keccak256(name)` (matches Solidity `keccak256(bytes(name))`) — bytes32 hashes, not raw strings, preventing cross-namespace collisions.
136
+ - Two-side confirmation for non-symmetric types (Phase 3+ contract enforcement).
161
137
  - Permissionless revocation from either side (Phase 3+).
162
- - Custody-agnostic — authority always routes through the actor's
163
- Smart Agent ERC-1271.
138
+ - Custody-agnostic — authority always routes through the actor's Smart Agent ERC-1271.
164
139
  - `NAMESPACE_CONTAINS` is intentionally absent (ADR-0006).
165
140
 
166
- See `AUDIT.md` for the package audit + open findings.
141
+ See [`AUDIT.md`](AUDIT.md) for the package audit + open findings.
142
+
143
+ ## Status
144
+
145
+ **Experimental, and Phase 1** — pure SDK + spec + API skeleton. The pure layer (`computeEdgeId`, taxonomy, semantics map) is real and tested; client read methods throw `R Phase 2` and write methods throw `R Phase 4` — stubs by design. Contracts (`AgentRelationship.sol` + `RelationshipTypeRegistry.sol`) land in Phase 3. `AgentAssertion` (signed-claim layer) and `AgentRelationshipResolver` (policy layer) are deferred to v2 per [ADR-0007](../../docs/architecture/decisions/0007-agent-identity-stack-three-packages.md). Full design + phase plan: [`specs/216-agent-relationships.md`](../../specs/216-agent-relationships.md).
146
+
147
+ Beyond the package phases: testnet/pilot-ready posture only; production launch is gated on the public checklist in the root [`README.md`](../../README.md#status--honest-version). Track every security finding live in [`docs/audits/findings.yaml`](../../docs/audits/findings.yaml) — and re-read the confidentiality warning at the top before adopting.
167
148
 
168
149
  ## License
169
150
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticprimitives/agent-relationships",
3
- "version": "1.0.0-alpha.5",
3
+ "version": "1.0.0-alpha.7",
4
4
  "description": "Agent relationships SDK: trust-fabric edge store (subject, object, relationshipType) with role taxonomy. Phase 1 ships edge-ID derivation + relationship-type constants + client skeleton; AgentRelationship.sol + RelationshipTypeRegistry.sol ports land in Phase 3. AgentAssertion + AgentRelationshipResolver deferred to v2.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,9 +36,9 @@
36
36
  },
37
37
  "peerDependencies": {
38
38
  "viem": "^2.52.2",
39
- "@agenticprimitives/agent-account": "1.0.0-alpha.5",
40
- "@agenticprimitives/connect-auth": "1.0.0-alpha.5",
41
- "@agenticprimitives/types": "1.0.0-alpha.5"
39
+ "@agenticprimitives/agent-account": "1.0.0-alpha.7",
40
+ "@agenticprimitives/connect-auth": "1.0.0-alpha.7",
41
+ "@agenticprimitives/types": "1.0.0-alpha.7"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^22.7.0",