@agentbond/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/dist/action.d.ts +18 -0
- package/dist/action.d.ts.map +1 -0
- package/dist/action.js +2 -0
- package/dist/action.js.map +1 -0
- package/dist/audit.d.ts +24 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +2 -0
- package/dist/audit.js.map +1 -0
- package/dist/authorization.d.ts +47 -0
- package/dist/authorization.d.ts.map +1 -0
- package/dist/authorization.js +2 -0
- package/dist/authorization.js.map +1 -0
- package/dist/contract.d.ts +22 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +2 -0
- package/dist/contract.js.map +1 -0
- package/dist/identity.d.ts +7 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +2 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/intent.d.ts +16 -0
- package/dist/intent.d.ts.map +1 -0
- package/dist/intent.js +2 -0
- package/dist/intent.js.map +1 -0
- package/dist/settlement.d.ts +15 -0
- package/dist/settlement.d.ts.map +1 -0
- package/dist/settlement.js +2 -0
- package/dist/settlement.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @agentbond/core
|
|
2
|
+
|
|
3
|
+
Core type definitions for [agentbond](https://github.com/wharfe/agentbond) — agent-first governance infrastructure for AI agents.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @agentbond/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## What's Included
|
|
12
|
+
|
|
13
|
+
This package provides TypeScript interfaces and types shared across the agentbond ecosystem:
|
|
14
|
+
|
|
15
|
+
- **`AgentIdentity`** — Agent identification
|
|
16
|
+
- **`AgentAction`** / **`ActionScope`** — Action representation
|
|
17
|
+
- **`AuthorizationToken`** / **`AuthorizationDecision`** — Authorization primitives
|
|
18
|
+
- **`Budget`** / **`BudgetLedgerEntry`** — Budget management
|
|
19
|
+
- **`IntentRecord`** / **`IntentPolicy`** — Intent proof (future)
|
|
20
|
+
- **`Contract`** / **`ContractParty`** — Inter-agent contracts (future)
|
|
21
|
+
- **`SettlementHook`** / **`SettlementRecord`** — Settlement (future)
|
|
22
|
+
- **`AuditRecord`** — Audit trail
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import type { AuthorizationToken, AgentIdentity } from "@agentbond/core";
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT
|
package/dist/action.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IsoDatetime } from "./types.js";
|
|
2
|
+
import type { AgentIdentity } from "./identity.js";
|
|
3
|
+
export interface ActionScope {
|
|
4
|
+
domain: string;
|
|
5
|
+
operations: string[];
|
|
6
|
+
resources?: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface AgentAction {
|
|
9
|
+
id: string;
|
|
10
|
+
actor: AgentIdentity;
|
|
11
|
+
scope: ActionScope;
|
|
12
|
+
timestamp: IsoDatetime;
|
|
13
|
+
authorizationRef?: string;
|
|
14
|
+
intentRef?: string;
|
|
15
|
+
contractRef?: string;
|
|
16
|
+
settlementRef?: string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../src/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,WAAW,CAAC;IAGvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
package/dist/action.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["../src/action.ts"],"names":[],"mappings":""}
|
package/dist/audit.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IsoDatetime } from "./types.js";
|
|
2
|
+
export interface AuditRecord {
|
|
3
|
+
id: string;
|
|
4
|
+
actionId: string;
|
|
5
|
+
authorizationTokenId?: string;
|
|
6
|
+
layer: "authorization" | "intent" | "contract" | "settlement";
|
|
7
|
+
outcome: "allowed" | "denied" | "pending";
|
|
8
|
+
reason?: string;
|
|
9
|
+
timestamp: IsoDatetime;
|
|
10
|
+
}
|
|
11
|
+
export interface AuditRecordStore {
|
|
12
|
+
append(record: AuditRecord): Promise<void>;
|
|
13
|
+
findByActionId(actionId: string): Promise<AuditRecord[]>;
|
|
14
|
+
findByTokenId(tokenId: string): Promise<AuditRecord[]>;
|
|
15
|
+
list(options?: AuditQueryOptions): Promise<AuditRecord[]>;
|
|
16
|
+
}
|
|
17
|
+
export interface AuditQueryOptions {
|
|
18
|
+
layer?: AuditRecord["layer"];
|
|
19
|
+
outcome?: AuditRecord["outcome"];
|
|
20
|
+
since?: IsoDatetime;
|
|
21
|
+
until?: IsoDatetime;
|
|
22
|
+
limit?: number;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,EAAE,eAAe,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,CAAC;IAC9D,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC;CACxB;AAGD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACzD,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACvD,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
package/dist/audit.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../src/audit.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { IsoDatetime } from "./types.js";
|
|
2
|
+
import type { AgentIdentity } from "./identity.js";
|
|
3
|
+
import type { ActionScope } from "./action.js";
|
|
4
|
+
import type { IntentPolicy } from "./intent.js";
|
|
5
|
+
import type { SettlementHook } from "./settlement.js";
|
|
6
|
+
export interface Budget {
|
|
7
|
+
limit: string;
|
|
8
|
+
currency: "credits";
|
|
9
|
+
resetPolicy?: "per-task" | "per-session" | "never";
|
|
10
|
+
}
|
|
11
|
+
export interface AuthorizationToken {
|
|
12
|
+
id: string;
|
|
13
|
+
parentTokenId?: string;
|
|
14
|
+
issuedBy: AgentIdentity;
|
|
15
|
+
issuedTo: AgentIdentity;
|
|
16
|
+
scopes: ActionScope[];
|
|
17
|
+
budget: Budget;
|
|
18
|
+
expiry: IsoDatetime;
|
|
19
|
+
status: "active" | "suspended" | "revoked";
|
|
20
|
+
intentPolicy?: IntentPolicy;
|
|
21
|
+
contractRef?: string;
|
|
22
|
+
settlementHook?: SettlementHook;
|
|
23
|
+
}
|
|
24
|
+
export interface AuthorizationDecision {
|
|
25
|
+
allowed: boolean;
|
|
26
|
+
reasonCode: AuthorizationReasonCode;
|
|
27
|
+
message: string;
|
|
28
|
+
retryable: boolean;
|
|
29
|
+
evaluatedAt: IsoDatetime;
|
|
30
|
+
tokenId?: string;
|
|
31
|
+
}
|
|
32
|
+
export type AuthorizationReasonCode = "ALLOWED" | "TOKEN_NOT_FOUND" | "TOKEN_EXPIRED" | "TOKEN_REVOKED" | "TOKEN_SUSPENDED" | "SCOPE_MISMATCH" | "BUDGET_EXCEEDED" | "PARENT_TOKEN_INACTIVE" | "PARENT_SCOPE_EXCEEDED" | "PARENT_BUDGET_EXCEEDED";
|
|
33
|
+
export interface BudgetLedgerEntry {
|
|
34
|
+
id: string;
|
|
35
|
+
tokenId: string;
|
|
36
|
+
amount: string;
|
|
37
|
+
actionId: string;
|
|
38
|
+
timestamp: IsoDatetime;
|
|
39
|
+
}
|
|
40
|
+
export interface BudgetLedgerStore {
|
|
41
|
+
append(entry: BudgetLedgerEntry): Promise<void>;
|
|
42
|
+
sumByTokenId(tokenId: string): Promise<string>;
|
|
43
|
+
}
|
|
44
|
+
export interface BudgetService {
|
|
45
|
+
consumeIfAvailable(tokenId: string, amount: string, actionId: string): Promise<AuthorizationDecision>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=authorization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.d.ts","sourceRoot":"","sources":["../src/authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,UAAU,GAAG,aAAa,GAAG,OAAO,CAAC;CACpD;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;IAK3C,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,uBAAuB,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,iBAAiB,GACjB,gBAAgB,GAChB,iBAAiB,GACjB,uBAAuB,GACvB,uBAAuB,GACvB,wBAAwB,CAAC;AAE7B,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,WAAW,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,aAAa;IAC5B,kBAAkB,CAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.js","sourceRoot":"","sources":["../src/authorization.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AgentIdentity } from "./identity.js";
|
|
2
|
+
export interface ContractParty {
|
|
3
|
+
agent: AgentIdentity;
|
|
4
|
+
role: "principal" | "executor" | "approver" | "payer" | "payee";
|
|
5
|
+
}
|
|
6
|
+
export interface Contract {
|
|
7
|
+
id: string;
|
|
8
|
+
parties: ContractParty[];
|
|
9
|
+
deliverable: DeliverableSpec;
|
|
10
|
+
conditions: ContractCondition[];
|
|
11
|
+
status: "draft" | "active" | "completed" | "disputed";
|
|
12
|
+
}
|
|
13
|
+
export interface DeliverableSpec {
|
|
14
|
+
description: string;
|
|
15
|
+
schema?: Record<string, unknown>;
|
|
16
|
+
acceptanceCriteria: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface ContractCondition {
|
|
19
|
+
type: "budget_cap" | "time_limit" | "approval_gate" | "custom";
|
|
20
|
+
value: unknown;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;CACjE;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,WAAW,EAAE,eAAe,CAAC;IAC7B,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;CACvD;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,YAAY,GAAG,YAAY,GAAG,eAAe,GAAG,QAAQ,CAAC;IAC/D,KAAK,EAAE,OAAO,CAAC;CAChB"}
|
package/dist/contract.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
|
package/dist/identity.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { IsoDatetime } from "./types.js";
|
|
2
|
+
export type { AgentIdentity } from "./identity.js";
|
|
3
|
+
export type { ActionScope, AgentAction } from "./action.js";
|
|
4
|
+
export type { Budget, AuthorizationToken, AuthorizationDecision, AuthorizationReasonCode, BudgetLedgerEntry, BudgetLedgerStore, BudgetService, } from "./authorization.js";
|
|
5
|
+
export type { IntentRecord, IntentPolicy } from "./intent.js";
|
|
6
|
+
export type { ContractParty, Contract, DeliverableSpec, ContractCondition, } from "./contract.js";
|
|
7
|
+
export type { SettlementHook, SettlementRecord } from "./settlement.js";
|
|
8
|
+
export type { AuditRecord, AuditRecordStore, AuditQueryOptions } from "./audit.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5D,YAAY,EACV,MAAM,EACN,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9D,YAAY,EACV,aAAa,EACb,QAAQ,EACR,eAAe,EACf,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/intent.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AgentAction } from "./action.js";
|
|
2
|
+
export interface IntentRecord {
|
|
3
|
+
id: string;
|
|
4
|
+
action: AgentAction;
|
|
5
|
+
evidence: {
|
|
6
|
+
type: "human-instruction" | "model-summary" | "system-rule";
|
|
7
|
+
content: string;
|
|
8
|
+
}[];
|
|
9
|
+
triggeredBy?: string;
|
|
10
|
+
confidence?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface IntentPolicy {
|
|
13
|
+
requireReasoning: boolean;
|
|
14
|
+
auditLevel: "none" | "summary" | "full";
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../src/intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,WAAW,CAAC;IAEpB,QAAQ,EAAE;QACR,IAAI,EAAE,mBAAmB,GAAG,eAAe,GAAG,aAAa,CAAC;QAC5D,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;IACJ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;CACzC"}
|
package/dist/intent.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.js","sourceRoot":"","sources":["../src/intent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AgentIdentity } from "./identity.js";
|
|
2
|
+
export interface SettlementHook {
|
|
3
|
+
provider: "mock" | "stripe" | "coinbase" | "onchain" | `custom:${string}`;
|
|
4
|
+
endpoint?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SettlementRecord {
|
|
7
|
+
id: string;
|
|
8
|
+
from: AgentIdentity;
|
|
9
|
+
to: AgentIdentity;
|
|
10
|
+
amount: string;
|
|
11
|
+
currency: string;
|
|
12
|
+
trigger: "task_complete" | "budget_depleted" | "manual";
|
|
13
|
+
txHash?: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=settlement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlement.d.ts","sourceRoot":"","sources":["../src/settlement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,MAAM,EAAE,CAAC;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,aAAa,CAAC;IACpB,EAAE,EAAE,aAAa,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,GAAG,iBAAiB,GAAG,QAAQ,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settlement.js","sourceRoot":"","sources":["../src/settlement.ts"],"names":[],"mappings":""}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentbond/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Core type definitions for agentbond — agent-first governance infrastructure",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/wharfe/agentbond.git",
|
|
20
|
+
"directory": "packages/core"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/wharfe/agentbond/tree/main/packages/core",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"lint": "eslint src/",
|
|
27
|
+
"lint:fix": "eslint src/ --fix",
|
|
28
|
+
"test": "echo \"No tests for core (type-only package)\""
|
|
29
|
+
}
|
|
30
|
+
}
|