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

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.
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAgE,MAAM,MAAM,CAAC;AAC9G,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAW1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAaxD,MAAM,IAAI,GAAG,4CAAqD,CAAC;AACnE,MAAM,SAAS,GAAG,oEAA6E,CAAC;AAkBhG,MAAM,OAAO,wBAAwB;IAId;IAHJ,YAAY,CAAe;IAC3B,aAAa,CAAU;IAExC,YAAqB,IAAsC;QAAtC,SAAI,GAAJ,IAAI,CAAkC;QACzD,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3E,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC1E,CAAC;QACD,IAAI,CAAC,YAAY,GAAG,kBAAkB,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACzE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;I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C,MAAoB;QAC9B,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,SAAS;QACvC,YAAY,EAAE,CAAC,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY;QACvE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;KAC/B,CAAC;AACJ,CAAC"}
@@ -18,7 +18,36 @@ export declare function hashRole(name: string): `0x${string}`;
18
18
  * Naming hierarchy lives in agent-naming via a parent-pointer, NOT
19
19
  * via a relationships-edge.
20
20
  */
21
+ /**
22
+ * Derive a relationship-type ID from an ONTOLOGY IRI — the convention for every type added after
23
+ * spec 355. The bytes32 on chain then names a term with an `rdfs:comment` that says what it means and
24
+ * what it does not, instead of a short string whose meaning lives in whoever wrote it.
25
+ *
26
+ * The older constants below hash short names (`HAS_MEMBER`) and keep doing so: their IDs are on chain
27
+ * already and re-hashing them would orphan every existing edge. New terms name their IRI.
28
+ */
29
+ export declare function ontologyRelationshipType(iri: string): `0x${string}`;
30
+ /** The ontology IRIs that back the IRI-derived relationship types, for `check:ontology-bindings`. */
31
+ export declare const RELATIONSHIP_TYPE_IRI: {
32
+ readonly CHARTERED_UNDER: "https://agenticprimitives.dev/ns/core#charteredUnder";
33
+ };
34
+ /** Ontology IRIs backing the IRI-derived ROLES. Same convention and same reason as the types above. */
35
+ export declare const ROLE_IRI: {
36
+ /** `ap:primaryPayee` — the agent its owner wants paid into. A preference, never authority. */
37
+ readonly PRIMARY_PAYEE: "https://agenticprimitives.dev/ns/core#primaryPayee";
38
+ /** `ap:primaryPayer` — the account its owner usually pays FROM. The mirror, and never the same thing:
39
+ * the account you publish to be paid into and the one you spend from are often different. */
40
+ readonly PRIMARY_PAYER: "https://agenticprimitives.dev/ns/core#primaryPayer";
41
+ };
21
42
  export declare const RELATIONSHIP_TYPE: {
43
+ /**
44
+ * `ap:charteredUnder` — subject was created under object and BELONGS TO it: a treasury under the
45
+ * person or organization that holds it, a team under its workspace, a workspace under its
46
+ * organization. NEVER AUTHORITY (ADR-0010): the subject is a distinct custodied agent, and the
47
+ * authority to act for it is granted elsewhere and never by this edge. Recorded so a third party can
48
+ * answer "which treasury does alice hold" — which no public source could answer before (spec 355 §3).
49
+ */
50
+ readonly CHARTERED_UNDER: `0x${string}`;
22
51
  /** Membership: subject is a member of object (org / DAO / collective). */
23
52
  readonly HAS_MEMBER: `0x${string}`;
24
53
  /** Governance: subject has governance authority over object. */
@@ -34,6 +63,18 @@ export declare const RELATIONSHIP_TYPE: {
34
63
  };
35
64
  /** Well-known role labels (bytes32-hashed). */
36
65
  export declare const ROLE: {
66
+ /**
67
+ * `ap:primaryPayee` — on an `ap:charteredUnder` edge, marks the child as the one its owner wants paid
68
+ * into. Set by either end (the contract allows subject or object; in practice the owner). A PREFERENCE:
69
+ * it stops a payer having to guess or be asked, and permits nothing.
70
+ */
71
+ readonly PRIMARY_PAYEE: `0x${string}`;
72
+ /**
73
+ * `ap:primaryPayer` — on the same `ap:charteredUnder` edge, marks the child as the account its owner
74
+ * usually SPENDS from. It permits nothing: a payment from it still needs a mandate signed for that
75
+ * request. What it removes is a question the owner is the only one who can answer, asked every time.
76
+ */
77
+ readonly PRIMARY_PAYER: `0x${string}`;
37
78
  /** Generic member role. */
38
79
  readonly MEMBER: `0x${string}`;
39
80
  /** Board / governance member. */
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,CAEhE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,CAEpD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB;IAC5B,0EAA0E;;IAE1E,gEAAgE;;IAEhE,yEAAyE;;IAEzE,iDAAiD;;IAEjD,oDAAoD;;IAEpD,4DAA4D;;CAEpD,CAAC;AAEX,+CAA+C;AAC/C,eAAO,MAAM,IAAI;IACf,2BAA2B;;IAE3B,iCAAiC;;IAEjC,4BAA4B;;IAE5B,4BAA4B;;IAE5B,2CAA2C;;IAE3C,wBAAwB;;CAEhB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,CAEhE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,CAEpD;AAED;;;;;;;;GAQG;AACH;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,CAEnE;AAED,qGAAqG;AACrG,eAAO,MAAM,qBAAqB;;CAExB,CAAC;AAEX,uGAAuG;AACvG,eAAO,MAAM,QAAQ;IACnB,8FAA8F;;IAE9F;kGAC8F;;CAEtF,CAAC;AAEX,eAAO,MAAM,iBAAiB;IAC5B;;;;;;OAMG;;IAEH,0EAA0E;;IAE1E,gEAAgE;;IAEhE,yEAAyE;;IAEzE,iDAAiD;;IAEjD,oDAAoD;;IAEpD,4DAA4D;;CAEpD,CAAC;AAEX,+CAA+C;AAC/C,eAAO,MAAM,IAAI;IACf;;;;OAIG;;IAEH;;;;OAIG;;IAEH,2BAA2B;;IAE3B,iCAAiC;;IAEjC,4BAA4B;;IAE5B,4BAA4B;;IAE5B,2CAA2C;;IAE3C,wBAAwB;;CAEhB,CAAC"}
package/dist/constants.js CHANGED
@@ -23,7 +23,38 @@ export function hashRole(name) {
23
23
  * Naming hierarchy lives in agent-naming via a parent-pointer, NOT
24
24
  * via a relationships-edge.
25
25
  */
26
+ /**
27
+ * Derive a relationship-type ID from an ONTOLOGY IRI — the convention for every type added after
28
+ * spec 355. The bytes32 on chain then names a term with an `rdfs:comment` that says what it means and
29
+ * what it does not, instead of a short string whose meaning lives in whoever wrote it.
30
+ *
31
+ * The older constants below hash short names (`HAS_MEMBER`) and keep doing so: their IDs are on chain
32
+ * already and re-hashing them would orphan every existing edge. New terms name their IRI.
33
+ */
34
+ export function ontologyRelationshipType(iri) {
35
+ return hashRelationshipType(iri);
36
+ }
37
+ /** The ontology IRIs that back the IRI-derived relationship types, for `check:ontology-bindings`. */
38
+ export const RELATIONSHIP_TYPE_IRI = {
39
+ CHARTERED_UNDER: 'https://agenticprimitives.dev/ns/core#charteredUnder',
40
+ };
41
+ /** Ontology IRIs backing the IRI-derived ROLES. Same convention and same reason as the types above. */
42
+ export const ROLE_IRI = {
43
+ /** `ap:primaryPayee` — the agent its owner wants paid into. A preference, never authority. */
44
+ PRIMARY_PAYEE: 'https://agenticprimitives.dev/ns/core#primaryPayee',
45
+ /** `ap:primaryPayer` — the account its owner usually pays FROM. The mirror, and never the same thing:
46
+ * the account you publish to be paid into and the one you spend from are often different. */
47
+ PRIMARY_PAYER: 'https://agenticprimitives.dev/ns/core#primaryPayer',
48
+ };
26
49
  export const RELATIONSHIP_TYPE = {
50
+ /**
51
+ * `ap:charteredUnder` — subject was created under object and BELONGS TO it: a treasury under the
52
+ * person or organization that holds it, a team under its workspace, a workspace under its
53
+ * organization. NEVER AUTHORITY (ADR-0010): the subject is a distinct custodied agent, and the
54
+ * authority to act for it is granted elsewhere and never by this edge. Recorded so a third party can
55
+ * answer "which treasury does alice hold" — which no public source could answer before (spec 355 §3).
56
+ */
57
+ CHARTERED_UNDER: hashRelationshipType(RELATIONSHIP_TYPE_IRI.CHARTERED_UNDER),
27
58
  /** Membership: subject is a member of object (org / DAO / collective). */
28
59
  HAS_MEMBER: hashRelationshipType('HAS_MEMBER'),
29
60
  /** Governance: subject has governance authority over object. */
@@ -39,6 +70,18 @@ export const RELATIONSHIP_TYPE = {
39
70
  };
40
71
  /** Well-known role labels (bytes32-hashed). */
41
72
  export const ROLE = {
73
+ /**
74
+ * `ap:primaryPayee` — on an `ap:charteredUnder` edge, marks the child as the one its owner wants paid
75
+ * into. Set by either end (the contract allows subject or object; in practice the owner). A PREFERENCE:
76
+ * it stops a payer having to guess or be asked, and permits nothing.
77
+ */
78
+ PRIMARY_PAYEE: hashRole(ROLE_IRI.PRIMARY_PAYEE),
79
+ /**
80
+ * `ap:primaryPayer` — on the same `ap:charteredUnder` edge, marks the child as the account its owner
81
+ * usually SPENDS from. It permits nothing: a payment from it still needs a mandate signed for that
82
+ * request. What it removes is a question the owner is the only one who can answer, asked every time.
83
+ */
84
+ PRIMARY_PAYER: hashRole(ROLE_IRI.PRIMARY_PAYER),
42
85
  /** Generic member role. */
43
86
  MEMBER: hashRole('MEMBER'),
44
87
  /** Board / governance member. */
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAExC;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAChC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,0EAA0E;IAC1E,UAAU,EAAE,oBAAoB,CAAC,YAAY,CAAC;IAC9C,gEAAgE;IAChE,mBAAmB,EAAE,oBAAoB,CAAC,qBAAqB,CAAC;IAChE,yEAAyE;IACzE,gBAAgB,EAAE,oBAAoB,CAAC,kBAAkB,CAAC;IAC1D,iDAAiD;IACjD,WAAW,EAAE,oBAAoB,CAAC,aAAa,CAAC;IAChD,oDAAoD;IACpD,qBAAqB,EAAE,oBAAoB,CAAC,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AE,oDAAoD;CAC3D,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B;;;;;;OAMG;IACH,eAAe,EAAE,oBAAoB,CAAC,qBAAqB,CAAC,eAAe,CAAC;IAC5E,0EAA0E;IAC1E,UAAU,EAAE,oBAAoB,CAAC,YAAY,CAAC;IAC9C,gEAAgE;IAChE,mBAAmB,EAAE,oBAAoB,CAAC,qBAAqB,CAAC;IAChE,yEAAyE;IACzE,gBAAgB,EAAE,oBAAoB,CAAC,kBAAkB,CAAC;IAC1D,iDAAiD;IACjD,WAAW,EAAE,oBAAoB,CAAC,aAAa,CAAC;IAChD,oDAAoD;IACpD,qBAAqB,EAAE,oBAAoB,CAAC,uBAAuB,CAAC;IACpE,4DAA4D;IAC5D,UAAU,EAAE,oBAAoB,CAAC,YAAY,CAAC;CACtC,CAAC;AAEX,+CAA+C;AAC/C,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB;;;;OAIG;IACH,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC/C;;;;OAIG;IACH,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC/C,2BAA2B;IAC3B,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC1B,iCAAiC;IACjC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC;IACtC,4BAA4B;IAC5B,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC;IAC9B,4BAA4B;IAC5B,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC;IAChC,2CAA2C;IAC3C,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC;IAChC,wBAAwB;IACxB,gBAAgB,EAAE,QAAQ,CAAC,kBAAkB,CAAC;CACtC,CAAC"}
@@ -0,0 +1,110 @@
1
+ import { type Address, type Hex } from 'viem';
2
+ export type RelationshipKind = 'has-member' | 'steward-of' | 'chartered-under';
3
+ /** What both parties sign. `termsDigest`, never the terms: a presentation may withhold them. */
4
+ export interface RelationshipCredentialBodyV1 {
5
+ type: 'ap.relationship-credential.v1';
6
+ kind: RelationshipKind;
7
+ /** The party the relation is OF (the member, the steward, the chartered agent). */
8
+ subject: Address;
9
+ /** The party it is TO (the organization, the stewarded agent, the charterer). */
10
+ object: Address;
11
+ chainId: number;
12
+ issuedAt: string;
13
+ /** keccak256 of the RFC 8785 canonical terms; `0x00…` when there are none. */
14
+ termsDigest: Hex;
15
+ /** The chain edge this credential is the private side of, when one exists (the edge carries this credential's digest). */
16
+ edgeRef?: Hex;
17
+ }
18
+ export interface RelationshipCredentialV1 extends RelationshipCredentialBodyV1 {
19
+ /** The holder's copy keeps the terms; a presentation may omit them. */
20
+ terms?: Record<string, unknown>;
21
+ signatures: {
22
+ subject: Hex;
23
+ object: Hex;
24
+ };
25
+ }
26
+ export interface RelationshipRevocationV1 {
27
+ type: 'ap.relationship-revocation.v1';
28
+ /** The credential digest this revokes. */
29
+ credential: Hex;
30
+ revokedAt: string;
31
+ /** Both when both are present to sign; the object's alone when the member is gone — said, not hidden. */
32
+ signatures: {
33
+ subject?: Hex;
34
+ object?: Hex;
35
+ };
36
+ unilateral?: 'subject' | 'object';
37
+ reason?: string;
38
+ }
39
+ export declare const ZERO_DIGEST: Hex;
40
+ export declare const RELATIONSHIP_CREDENTIAL_PREFIX: "relationships.credential:";
41
+ export declare const RELATIONSHIP_REVOCATION_PREFIX: "relationships.revocation:";
42
+ export declare const relationshipCredentialRecordType: (digest: Hex) => string;
43
+ export declare const relationshipRevocationRecordType: (digest: Hex) => string;
44
+ export declare const termsDigestOf: (terms: Record<string, unknown> | undefined) => Hex;
45
+ /** THE ONE digest both parties sign: RFC 8785 over the body (the terms by digest, never inline). */
46
+ export declare function relationshipCredentialDigest(body: RelationshipCredentialBodyV1): Hex;
47
+ export declare function relationshipRevocationDigest(r: Omit<RelationshipRevocationV1, 'signatures'>): Hex;
48
+ /** Issue: build the body, have BOTH sides sign its digest, keep the terms on the holders' copies. */
49
+ export declare function issueRelationshipCredential(input: {
50
+ kind: RelationshipKind;
51
+ subject: Address;
52
+ object: Address;
53
+ chainId: number;
54
+ terms?: Record<string, unknown>;
55
+ edgeRef?: Hex;
56
+ signSubject: (digest: Hex) => Promise<Hex>;
57
+ signObject: (digest: Hex) => Promise<Hex>;
58
+ now?: () => Date;
59
+ }): Promise<{
60
+ credential: RelationshipCredentialV1;
61
+ digest: Hex;
62
+ }>;
63
+ export type SignatureCheck = (signer: Address, digest: Hex, signature: Hex) => Promise<boolean>;
64
+ /**
65
+ * What the VERIFIER expects, stated by the verifier (spec 445 / NAME-13). A credential is self-consistent by
66
+ * construction — its chain, subject and object are whatever its author wrote — so checking only its signatures
67
+ * answers "is this a valid credential about SOMEBODY, SOMEWHERE". `chainId` is required: `verifySig` reads one
68
+ * chain, and a credential that names another must not verify against it. `subject` / `object` are checked when
69
+ * the caller is asking about a particular party.
70
+ */
71
+ export interface RelationshipExpectation {
72
+ chainId: number;
73
+ subject?: Address;
74
+ object?: Address;
75
+ kind?: RelationshipKind;
76
+ }
77
+ /**
78
+ * Verify a credential (or a presentation of one): both signatures over the body's digest, each against its own
79
+ * party's Smart Agent; when the terms travel, they must hash to the body's `termsDigest`. Nothing here reads a
80
+ * chain edge — the signatures are the evidence, and the chain is consulted only for THEIR validity.
81
+ */
82
+ export declare function verifyRelationshipCredential(c: RelationshipCredentialV1, verifySig: SignatureCheck, expected: RelationshipExpectation): Promise<{
83
+ ok: true;
84
+ digest: Hex;
85
+ } | {
86
+ ok: false;
87
+ reason: string;
88
+ }>;
89
+ /** A presentation: the credential with the terms WITHHELD. Verifies exactly as the full copy does. */
90
+ export declare function presentRelationship(c: RelationshipCredentialV1): RelationshipCredentialV1;
91
+ /** The §4 membership-root leaf: a blinded commitment to the credential's digest — proves membership in the set
92
+ * without naming which credential. `blind` is the holder's secret; the projection keeps the pair. */
93
+ export declare function relationshipCommitment(digest: Hex, blind: Hex): Hex;
94
+ export declare function issueRelationshipRevocation(input: {
95
+ credential: Hex;
96
+ reason?: string;
97
+ now?: () => Date;
98
+ signSubject?: (digest: Hex) => Promise<Hex>;
99
+ signObject?: (digest: Hex) => Promise<Hex>;
100
+ }): Promise<{
101
+ revocation: RelationshipRevocationV1;
102
+ digest: Hex;
103
+ }>;
104
+ export declare function verifyRelationshipRevocation(r: RelationshipRevocationV1, credential: RelationshipCredentialBodyV1, verifySig: SignatureCheck): Promise<{
105
+ ok: true;
106
+ } | {
107
+ ok: false;
108
+ reason: string;
109
+ }>;
110
+ //# sourceMappingURL=credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential.d.ts","sourceRoot":"","sources":["../src/credential.ts"],"names":[],"mappings":"AA2BA,OAAO,EAA4B,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAGxE,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,YAAY,GAAG,iBAAiB,CAAC;AAE/E,gGAAgG;AAChG,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,+BAA+B,CAAC;IACtC,IAAI,EAAE,gBAAgB,CAAC;IACvB,mFAAmF;IACnF,OAAO,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,WAAW,EAAE,GAAG,CAAC;IACjB,0HAA0H;IAC1H,OAAO,CAAC,EAAE,GAAG,CAAC;CACf;AAED,MAAM,WAAW,wBAAyB,SAAQ,4BAA4B;IAC5E,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,UAAU,EAAE;QAAE,OAAO,EAAE,GAAG,CAAC;QAAC,MAAM,EAAE,GAAG,CAAA;KAAE,CAAC;CAC3C;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,+BAA+B,CAAC;IACtC,0CAA0C;IAC1C,UAA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AAO,CAAC,GAAG,CAAC,CAAC;CACzF,GAAG,OAAO,CAAC;IAAE,UAAU,EAAE,wBAAwB,CAAC;IAAC,MAAM,EAAE,GAAG,CAAA;CAAE,CAAC,CASjE;AAED,wBAAsB,4BAA4B,CAAC,CAAC,EAAE,wBAAwB,EAAE,UAAU,EAAE,4BAA4B,EAAE,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAgB1M"}
@@ -0,0 +1,154 @@
1
+ // THE VAULT FORM OF A RELATIONSHIP — spec 410 §8 (THESIS-7).
2
+ //
3
+ // A relationship has three forms (the thesis): a chain record (`AgentRelationship.sol`, right for enforcement), a
4
+ // public commitment (the membership root of spec 410 §4), and a VAULT CREDENTIAL — the one that was missing as a
5
+ // COUNTERSIGNED thing. `relationships.data` (ADR-0025) is the person's private index of her links, issued and held
6
+ // by her alone; nobody else's signature is on it, so it proves what she says, not what the organization agreed.
7
+ //
8
+ // This is the countersigned form: one credential, two signatures, two copies.
9
+ //
10
+ // THE RULE FOR SHARED RECORDS, IN CODE: each principal holds its side; nothing is one party's alone if two signed
11
+ // it. `issueRelationshipCredential` produces the object BOTH sign; the runtime writes one copy into each party's
12
+ // vault under that party's own key as one logical operation (spec 410 §3's `operationId`) — if the second write
13
+ // cannot be reconciled the first is compensated. The chain edge, where a gate must follow it, carries only the
14
+ // credential's digest. Read is from the holder's vantage point only.
15
+ //
16
+ // PRESENTATION UNDER GRANT. The signed body commits to the terms by DIGEST, so a holder presents `kind`, `object`,
17
+ // `issuedAt` and both signatures while WITHHOLDING the terms — the counterparty verifies the organization's
18
+ // signature against its Smart Agent (ERC-1271 / 6492) and never reads `AgentRelationship.sol`. The chain is consulted
19
+ // only for the signature's validity, as for any signature.
20
+ //
21
+ // DEPARTURE. A revocation is a new two-sided record — or the organization's alone when the member is gone, labelled
22
+ // `unilateral` — written to both vaults. The departing member keeps her copy, her receipts and the revocation; she
23
+ // does not keep the organization's records (its vault was never hers). The §4 membership root drops the leaf.
24
+ //
25
+ // Kinds are the T-box relations the chain already hashes: `has-member` (aporg:OrganizationMembership),
26
+ // `steward-of` (ap:Stewardship — the oversight grant is the evidence; this is the two-sided record of it),
27
+ // `chartered-under` (ap:charteredUnder). Bound by IRI in `packages/ontology/src/vault-records.ts`.
28
+ import { keccak256, stringToBytes } from 'viem';
29
+ import { jcsCanonicalize } from '@agenticprimitives/types';
30
+ export const ZERO_DIGEST = `0x${'00'.repeat(32)}`;
31
+ export const RELATIONSHIP_CREDENTIAL_PREFIX = 'relationships.credential:';
32
+ export const RELATIONSHIP_REVOCATION_PREFIX = 'relationships.revocation:';
33
+ export const relationshipCredentialRecordType = (digest) => `${RELATIONSHIP_CREDENTIAL_PREFIX}${digest.toLowerCase()}`;
34
+ export const relationshipRevocationRecordType = (digest) => `${RELATIONSHIP_REVOCATION_PREFIX}${digest.toLowerCase()}`;
35
+ const digestOf = (v) => keccak256(stringToBytes(jcsCanonicalize(v)));
36
+ export const termsDigestOf = (terms) => (terms && Object.keys(terms).length ? digestOf(terms) : ZERO_DIGEST);
37
+ /** THE ONE digest both parties sign: RFC 8785 over the body (the terms by digest, never inline). */
38
+ export function relationshipCredentialDigest(body) {
39
+ const { type, kind, subject, object, chainId, issuedAt, termsDigest, edgeRef } = body;
40
+ return digestOf({ type, kind, subject: subject.toLowerCase(), object: object.toLowerCase(), chainId, issuedAt, termsDigest: termsDigest.toLowerCase(), ...(edgeRef ? { edgeRef: edgeRef.toLowerCase() } : {}) });
41
+ }
42
+ export function relationshipRevocationDigest(r) {
43
+ const { type, credential, revokedAt, unilateral, reason } = r;
44
+ return digestOf({ type, credential: credential.toLowerCase(), revokedAt, ...(unilateral ? { unilateral } : {}), ...(reason ? { reason } : {}) });
45
+ }
46
+ /** Issue: build the body, have BOTH sides sign its digest, keep the terms on the holders' copies. */
47
+ export async function issueRelationshipCredential(input) {
48
+ // A relationship is between TWO agents on a DECLARED chain (spec 445 / NAME-13): never an agent with itself,
49
+ // never a chain id that is absent, zero or not an integer.
50
+ if (!ADDRESS_RE.test(input.subject) || !ADDRESS_RE.test(input.object))
51
+ throw new Error('issueRelationshipCredential: subject and object are 20-byte addresses');
52
+ if (input.subject.toLowerCase() === input.object.toLowerCase())
53
+ throw new Error('issueRelationshipCredential: subject and object are the same agent');
54
+ if (!Number.isSafeInteger(input.chainId) || input.chainId <= 0)
55
+ throw new Error('issueRelationshipCredential: chainId is declared — a positive integer');
56
+ const body = {
57
+ type: 'ap.relationship-credential.v1', kind: input.kind, subject: input.subject.toLowerCase(), object: input.object.toLowerCase(),
58
+ chainId: input.chainId, issuedAt: (input.now ?? (() => new Date()))().toISOString(), termsDigest: termsDigestOf(input.terms), ...(input.edgeRef ? { edgeRef: input.edgeRef } : {}),
59
+ };
60
+ const digest = relationshipCredentialDigest(body);
61
+ const [subject, object] = await Promise.all([input.signSubject(digest), input.signObject(digest)]);
62
+ return { credential: { ...body, ...(input.terms ? { terms: input.terms } : {}), signatures: { subject, object } }, digest };
63
+ }
64
+ const ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
65
+ /**
66
+ * Verify a credential (or a presentation of one): both signatures over the body's digest, each against its own
67
+ * party's Smart Agent; when the terms travel, they must hash to the body's `termsDigest`. Nothing here reads a
68
+ * chain edge — the signatures are the evidence, and the chain is consulted only for THEIR validity.
69
+ */
70
+ export async function verifyRelationshipCredential(c, verifySig, expected) {
71
+ if (c === null || typeof c !== 'object' || c.type !== 'ap.relationship-credential.v1')
72
+ return { ok: false, reason: 'not a relationship credential' };
73
+ if (!['has-member', 'steward-of', 'chartered-under'].includes(c.kind))
74
+ return { ok: false, reason: `unknown kind ${String(c.kind)}` };
75
+ if (!expected || !Number.isSafeInteger(expected.chainId) || expected.chainId <= 0)
76
+ return { ok: false, reason: 'the verifier did not declare the chain it verifies on' };
77
+ if (typeof c.subject !== 'string' || typeof c.object !== 'string' || !ADDRESS_RE.test(c.subject) || !ADDRESS_RE.test(c.object))
78
+ return { ok: false, reason: 'subject and object are 20-byte addresses' };
79
+ if (typeof c.termsDigest !== 'string' || typeof c.issuedAt !== 'string')
80
+ return { ok: false, reason: 'malformed credential body' };
81
+ if (c.signatures === null || typeof c.signatures !== 'object' || typeof c.signatures.subject !== 'string' || typeof c.signatures.object !== 'string')
82
+ return { ok: false, reason: 'a relationship credential carries both signatures' };
83
+ if (c.chainId !== expected.chainId)
84
+ return { ok: false, reason: `the credential is for chain ${String(c.chainId)}, not ${expected.chainId}` };
85
+ if (c.subject.toLowerCase() === c.object.toLowerCase())
86
+ return { ok: false, reason: 'subject and object are the same agent' };
87
+ if (expected.subject !== undefined && expected.subject.toLowerCase() !== c.subject.toLowerCase())
88
+ return { ok: false, reason: 'the credential is about another subject' };
89
+ if (expected.object !== undefined && expected.object.toLowerCase() !== c.object.toLowerCase())
90
+ return { ok: false, reason: 'the credential is with another object' };
91
+ if (expected.kind !== undefined && expected.kind !== c.kind)
92
+ return { ok: false, reason: `the credential is a ${c.kind} relationship, not ${expected.kind}` };
93
+ if (c.terms !== undefined && termsDigestOf(c.terms).toLowerCase() !== c.termsDigest.toLowerCase())
94
+ return { ok: false, reason: 'the terms do not hash to the signed termsDigest' };
95
+ const digest = relationshipCredentialDigest(c);
96
+ const [s, o] = await Promise.all([verifySig(c.subject, digest, c.signatures.subject).catch(() => false), verifySig(c.object, digest, c.signatures.object).catch(() => false)]);
97
+ if (!s)
98
+ return { ok: false, reason: 'the subject\'s signature did not verify' };
99
+ if (!o)
100
+ return { ok: false, reason: 'the object\'s signature did not verify' };
101
+ return { ok: true, digest };
102
+ }
103
+ /** A presentation: the credential with the terms WITHHELD. Verifies exactly as the full copy does. */
104
+ export function presentRelationship(c) {
105
+ const { terms: _t, ...rest } = c;
106
+ void _t;
107
+ return rest;
108
+ }
109
+ /** The §4 membership-root leaf: a blinded commitment to the credential's digest — proves membership in the set
110
+ * without naming which credential. `blind` is the holder's secret; the projection keeps the pair. */
111
+ export function relationshipCommitment(digest, blind) {
112
+ return keccak256(`0x${digest.slice(2)}${blind.slice(2)}`);
113
+ }
114
+ export async function issueRelationshipRevocation(input) {
115
+ if (!input.signSubject && !input.signObject)
116
+ throw new Error('issueRelationshipRevocation: at least one side signs');
117
+ const unilateral = input.signSubject && input.signObject ? undefined : input.signSubject ? 'subject' : 'object';
118
+ const base = { type: 'ap.relationship-revocation.v1', credential: input.credential.toLowerCase(), revokedAt: (input.now ?? (() => new Date()))().toISOString(), ...(unilateral ? { unilateral } : {}), ...(input.reason ? { reason: input.reason } : {}) };
119
+ const digest = relationshipRevocationDigest(base);
120
+ const signatures = {};
121
+ if (input.signSubject)
122
+ signatures.subject = await input.signSubject(digest);
123
+ if (input.signObject)
124
+ signatures.object = await input.signObject(digest);
125
+ return { revocation: { ...base, signatures }, digest };
126
+ }
127
+ export async function verifyRelationshipRevocation(r, credential, verifySig) {
128
+ if (r === null || typeof r !== 'object' || r.type !== 'ap.relationship-revocation.v1')
129
+ return { ok: false, reason: 'not a relationship revocation' };
130
+ if (typeof r.credential !== 'string' || r.signatures === null || typeof r.signatures !== 'object')
131
+ return { ok: false, reason: 'malformed revocation' };
132
+ if (r.credential.toLowerCase() !== relationshipCredentialDigest(credential).toLowerCase())
133
+ return { ok: false, reason: 'the revocation names another credential' };
134
+ const digest = relationshipRevocationDigest(r);
135
+ const checks = [];
136
+ if (r.signatures.subject)
137
+ checks.push(verifySig(credential.subject, digest, r.signatures.subject).catch(() => false));
138
+ if (r.signatures.object)
139
+ checks.push(verifySig(credential.object, digest, r.signatures.object).catch(() => false));
140
+ if (!checks.length)
141
+ return { ok: false, reason: 'unsigned' };
142
+ if (r.unilateral && r.signatures.subject && r.signatures.object)
143
+ return { ok: false, reason: 'labelled unilateral but both sides signed' };
144
+ // The label says WHICH side left alone; it is checked against the side that signed (spec 445 / NAME-13).
145
+ if (r.unilateral && r.unilateral !== 'subject' && r.unilateral !== 'object')
146
+ return { ok: false, reason: 'unknown unilateral label' };
147
+ if (r.unilateral && !r.signatures[r.unilateral])
148
+ return { ok: false, reason: `labelled unilateral by the ${r.unilateral}, but the ${r.unilateral} did not sign` };
149
+ if (!r.unilateral && !(r.signatures.subject && r.signatures.object))
150
+ return { ok: false, reason: 'one side signed and it is not labelled unilateral' };
151
+ const ok = (await Promise.all(checks)).every(Boolean);
152
+ return ok ? { ok: true } : { ok: false, reason: 'a signature did not verify' };
153
+ }
154
+ //# sourceMappingURL=credential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential.js","sourceRoot":"","sources":["../src/credential.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,EAAE;AACF,kHAAkH;AAClH,iHAAiH;AACjH,mHAAmH;AACnH,gHAAgH;AAChH,EAAE;AACF,8EAA8E;AAC9E,EAAE;AACF,oHAAoH;AACpH,mHAAmH;AACnH,kHAAkH;AAClH,iHAAiH;AACjH,uEAAuE;AACvE,EAAE;AACF,qHAAqH;AACrH,8GAA8G;AAC9G,wHAAwH;AACxH,6DAA6D;AAC7D,EAAE;AACF,sHAAsH;AACtH,qHAAqH;AACrH,gHAAgH;AAChH,EAAE;AACF,uGAAuG;AACvG,2GAA2G;AAC3G,mGAAmG;AACnG,OAAO,EAAE,SAAS,EAAE,aAAa,EAA0B,MAAM,MAAM,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAqC3D,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAS,CAAC;AACzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,2BAAoC,CAAC;AACnF,MAAM,CAAC,MAAM,8BAA8B,GAAG,2BAAoC,CAAC;AACnF,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,MAAW,EAAU,EAAE,CAAC,GAAG,8BAA8B,GAAG,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;AACpI,MAAM,C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AU,aAAa,CAAC,CAAC,UAAU,eAAe,EAAE,CAAC;IAClK,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,mDAAmD,EAAE,CAAC;IACvJ,MAAM,EAAE,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtD,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,4BAA4B,EAAE,CAAC;AACjF,CAAC"}
package/dist/edge-id.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Address, Hex } from '@agenticprimitives/types';
2
- import type { RelationshipType } from './types';
2
+ import type { RelationshipType } from './types.js';
3
3
  /**
4
4
  * Deterministic edge-ID derivation. Matches the on-chain port that
5
5
  * will land in `packages/contracts/src/relationships/AgentRelationship.sol`
@@ -1 +1 @@
1
- {"version":3,"file":"edge-id.d.ts","sourceRoot":"","sources":["../src/edge-id.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKhD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,EACf,gBAAgB,EAAE,gBAAgB,GACjC,GAAG,CAcL"}
1
+ {"version":3,"file":"edge-id.d.ts","sourceRoot":"","sources":["../src/edge-id.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKnD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,EACf,gBAAgB,EAAE,gBAAgB,GACjC,GAAG,CAmBL"}
package/dist/edge-id.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { keccak256, concat } from 'viem';
2
- import { InvalidEdgeError } from './errors';
2
+ import { InvalidEdgeError } from './errors.js';
3
3
  const ADDRESS_RE = /^0x[0-9a-fA-F]{40}$/;
4
4
  /**
5
5
  * Deterministic edge-ID derivation. Matches the on-chain port that
@@ -24,11 +24,16 @@ export function computeEdgeId(subject, object, relationshipType) {
24
24
  throw new InvalidEdgeError(`malformed subject ${subject}`, 'subject');
25
25
  if (!ADDRESS_RE.test(object))
26
26
  throw new InvalidEdgeError(`malformed object ${object}`, 'object');
27
+ // A relationship type is a bytes32 (spec 445 / COV-21): a shorter hex string packs to a different preimage
28
+ // than the contract's `abi.encodePacked(address, address, bytes32)` and yields an id no edge has.
29
+ if (!/^0x[0-9a-fA-F]{64}$/.test(relationshipType)) {
30
+ throw new InvalidEdgeError(`malformed relationshipType ${String(relationshipType)}`, 'relationshipType');
31
+ }
27
32
  if (subject.toLowerCase() === object.toLowerCase()) {
28
33
  throw new InvalidEdgeError('subject and object must differ — self-edges not allowed');
29
34
  }
30
35
  const s = subject.toLowerCase();
31
36
  const o = object.toLowerCase();
32
- return keccak256(concat([s, o, relationshipType]));
37
+ return keccak256(concat([s, o, relationshipType.toLowerCase()]));
33
38
  }
34
39
  //# sourceMappingURL=edge-id.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"edge-id.js","sourceRoot":"","sources":["../src/edge-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,U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,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- export { RELATIONSHIP_TYPE, ROLE, hashRelationshipType, hashRole, } from './constants';
2
- export { computeEdgeId } from './edge-id';
3
- export { TYPE_SEMANTICS, type RelationshipTypeSemantics, } from './taxonomy';
4
- export { InvalidEdgeError, UnauthorizedActorError, UnknownRelationshipTypeError, } from './errors';
5
- export { EdgeStatus, type RelationshipType, type Role, type Edge, type ProposeEdgeInput, type ConfirmEdgeInput, type RevokeEdgeInput, type SetRolesInput, type AgentRelationshipsClientOpts, } from './types';
6
- export { AgentRelationshipsClient, type WriteContext } from './client';
7
- export { agentRelationshipAbi, relationshipTypeRegistryAbi, } from './abis';
8
- export { buildProposeEdgeCall, buildConfirmEdgeCall, buildActivateEdgeCall, buildRevokeEdgeCall, buildAddRoleCall, buildRemoveRoleCall, buildSetMetadataCall, type ContractCall, } from './calls';
1
+ export { RELATIONSHIP_TYPE, ROLE, ROLE_IRI, RELATIONSHIP_TYPE_IRI, hashRelationshipType, hashRole, } from './constants.js';
2
+ export { computeEdgeId } from './edge-id.js';
3
+ export { TYPE_SEMANTICS, type RelationshipTypeSemantics, } from './taxonomy.js';
4
+ export { InvalidEdgeError, UnauthorizedActorError, UnknownRelationshipTypeError, } from './errors.js';
5
+ export { EdgeStatus, type RelationshipType, type Role, type Edge, type ProposeEdgeInput, type ConfirmEdgeInput, type RevokeEdgeInput, type SetRolesInput, type AgentRelationshipsClientOpts, } from './types.js';
6
+ export { AgentRelationshipsClient, type WriteContext } from './client.js';
7
+ export { agentRelationshipAbi, relationshipTypeRegistryAbi, } from './abis.js';
8
+ export { buildProposeEdgeCall, buildConfirmEdgeCall, buildActivateEdgeCall, buildRevokeEdgeCall, buildAddRoleCall, buildRemoveRoleCall, buildSetMetadataCall, type ContractCall, } from './calls.js';
9
+ export { type RelationshipExpectation, issueRelationshipCredential, verifyRelationshipCredential, presentRelationship, relationshipCredentialDigest, termsDigestOf, issueRelationshipRevocation, verifyRelationshipRevocation, relationshipRevocationDigest, relationshipCommitment, RELATIONSHIP_CREDENTIAL_PREFIX, RELATIONSHIP_REVOCATION_PREFIX, relationshipCredentialRecordType, relationshipRevocationRecordType, ZERO_DIGEST, type RelationshipKind, type RelationshipCredentialBodyV1, type RelationshipCredentialV1, type RelationshipRevocationV1, type SignatureCheck, } from './credential.js';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,EACjB,IAAI,EACJ,oBAAoB,EACpB,QAAQ,GACT,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,cAAc,EACd,KAAK,yBAAyB,GAC/B,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,4BAA4B,GAClC,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,wBAAwB,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAIvE,OAAO,EACL,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,QAAQ,CAAC;AAIhB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,YAAY,GAClB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,iBAAiB,EACjB,I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// - docs/architecture/decisions/0007-agent-identity-stack-three-packages.md
8
- export { RELATIONSHIP_TYPE, ROLE, hashRelationshipType, hashRole, } from './constants';
9
- export { computeEdgeId } from './edge-id';
10
- export { TYPE_SEMANTICS, } from './taxonomy';
11
- export { InvalidEdgeError, UnauthorizedActorError, UnknownRelationshipTypeError, } from './errors';
12
- export { EdgeStatus, } from './types';
13
- export { AgentRelationshipsClient } from './client';
8
+ export { RELATIONSHIP_TYPE, ROLE,
9
+ // The IRIs the roles are DERIVED from — a caller that reads roles by their modelled name (the decision
10
+ // plane, spec 363) needs the term, not only its hash.
11
+ ROLE_IRI, RELATIONSHIP_TYPE_IRI, hashRelationshipType, hashRole, } from './constants.js';
12
+ export { computeEdgeId } from './edge-id.js';
13
+ export { TYPE_SEMANTICS, } from './taxonomy.js';
14
+ export { InvalidEdgeError, UnauthorizedActorError, UnknownRelationshipTypeError, } from './errors.js';
15
+ export { EdgeStatus, } from './types.js';
16
+ export { AgentRelationshipsClient } from './client.js';
14
17
  // Phase 3 contract ABIs (live at deployed addresses recorded in
15
18
  // packages/contracts/deployments-<network>.json).
16
- export { agentRelationshipAbi, relationshipTypeRegistryAbi, } from './abis';
19
+ export { agentRelationshipAbi, relationshipTypeRegistryAbi, } from './abis.js';
17
20
  // Phase 4 pure call builders. Compose into AgentAccount.execute /
18
21
  // CustodyPolicy ceremonies / ERC-4337 UserOps as needed.
19
- export { buildProposeEdgeCall, buildConfirmEdgeCall, buildActivateEdgeCall, buildRevokeEdgeCall, buildAddRoleCall, buildRemoveRoleCall, buildSetMetadataCall, } from './calls';
22
+ export { buildProposeEdgeCall, buildConfirmEdgeCall, buildActivateEdgeCall, buildRevokeEdgeCall, buildAddRoleCall, buildRemoveRoleCall, buildSetMetadataCall, } from './calls.js';
23
+ // Spec 410 §8 — the VAULT form of a relationship: one credential, two signatures, two copies.
24
+ export { issueRelationshipCredential, verifyRelationshipCredential, presentRelationship, relationshipCredentialDigest, termsDigestOf, issueRelationshipRevocation, verifyRelationshipRevocation, relationshipRevocationDigest, relationshipCommitment, RELATIONSHIP_CREDENTIAL_PREFIX, RELATIONSHIP_REVOCATION_PREFIX, relationshipCredentialRecordType, relationshipRevocationRecordType, ZERO_DIGEST, } from './credential.js';
20
25
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,EAAE;AACF,OAAO;AACP,0CAA0C;AAC1C,2BAA2B;AAC3B,sDAAsD;AACtD,8EAA8E;AAE9E,OAAO,EACL,iBAAiB,EACjB,IAAI,EACJ,oBAAoB,EACpB,QAAQ,GACT,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,cAAc,GAEf,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,UAAU,GASX,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,wBAAwB,EAAqB,MAAM,UAAU,CAAC;AAEvE,gEAAgE;AAChE,kDAAkD;AAClD,OAAO,EACL,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,QAAQ,CAAC;AAEhB,kEAAkE;AAClE,yDAAyD;AACzD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,GAErB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,EAAE;AACF,OAAO;AACP,0CAA0C;AAC1C,2BAA2B;AAC3B,sDAAsD;AACtD,8EAA8E;AAE9E,OAAO,EACL,iBAAiB,EACjB,IAAI;AACJ,uGAAuG;AACvG,sDAAsD;AACtD,QAAQ,EACR,qBAAqB,EACrB,oBAAoB,EACpB,QAAQ,GACT,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EACL,cAAc,GAEf,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,GASX,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,wBAAwB,EAAqB,MAAM,aAAa,CAAC;AAE1E,gEAAgE;AAChE,kDAAkD;AAClD,OAAO,EACL,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,WAAW,CAAC;AAEnB,kEAAkE;AAClE,yDAAyD;AACzD,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,GAErB,MAAM,YAAY,CAAC;AACpB,8FAA8F;AAC9F,OAAO,EAEL,2BAA2B,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,aAAa,EAC3H,2BAA2B,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,sBAAsB,EAC/G,8BAA8B,EAAE,8BAA8B,EAAE,gCAAgC,EAAE,gCAAgC,EAAE,WAAW,GAEhJ,MAAM,iBAAiB,CAAC"}
@@ -16,7 +16,7 @@
16
16
  * on-chain contract (Phase 3) enforces the two-side-confirmation
17
17
  * rule independently for non-symmetric types.
18
18
  */
19
- import { RELATIONSHIP_TYPE, ROLE, hashRelationshipType, hashRole } from './constants';
19
+ import { RELATIONSHIP_TYPE, ROLE, hashRelationshipType, hashRole } from './constants.js';
20
20
  import type { Hex } from '@agenticprimitives/types';
21
21
  export { RELATIONSHIP_TYPE, ROLE, hashRelationshipType, hashRole };
22
22
  export interface RelationshipTypeSemantics {
@@ -1 +1 @@
1
- {"version":3,"file":"taxonomy.d.ts","sourceRoot":"","sources":["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