@peac/kernel 0.11.1 → 0.11.2
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 +9 -0
- package/dist/carrier.d.ts +14 -0
- package/dist/carrier.d.ts.map +1 -1
- package/dist/error-categories.generated.d.ts +1 -1
- package/dist/errors.cjs +295 -149
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.generated.d.ts +3 -3
- package/dist/errors.generated.d.ts.map +1 -1
- package/dist/errors.mjs +295 -149
- package/dist/errors.mjs.map +1 -1
- package/dist/index.cjs +297 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +296 -149
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,6 +12,15 @@ pnpm add @peac/kernel
|
|
|
12
12
|
|
|
13
13
|
See [peacprotocol.org](https://www.peacprotocol.org) for full documentation.
|
|
14
14
|
|
|
15
|
+
## For Agent Developers
|
|
16
|
+
|
|
17
|
+
If you are building an AI agent or MCP server that needs evidence receipts:
|
|
18
|
+
|
|
19
|
+
- Start with [`@peac/mcp-server`](https://www.npmjs.com/package/@peac/mcp-server) for a ready-to-use MCP tool server
|
|
20
|
+
- See the [llms.txt](https://github.com/peacprotocol/peac/blob/main/llms.txt) for a concise overview of all packages
|
|
21
|
+
- Use `@peac/protocol` for programmatic receipt issuance and verification
|
|
22
|
+
- Use `@peac/kernel` types (`PeacEvidenceCarrier`, `ErrorDefinition`) for type-safe integration
|
|
23
|
+
|
|
15
24
|
## License
|
|
16
25
|
|
|
17
26
|
Apache-2.0
|
package/dist/carrier.d.ts
CHANGED
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
* fixtures and attach() output MUST use this exact spelling.
|
|
17
17
|
*/
|
|
18
18
|
export declare const PEAC_RECEIPT_HEADER: "PEAC-Receipt";
|
|
19
|
+
/**
|
|
20
|
+
* Canonical HTTP header name for receipt URL locator hint (DD-135).
|
|
21
|
+
*
|
|
22
|
+
* HTTPS-only, max 2048 chars, no credentials.
|
|
23
|
+
* MUST NOT trigger implicit fetch (DD-55).
|
|
24
|
+
*/
|
|
25
|
+
export declare const PEAC_RECEIPT_URL_HEADER: "PEAC-Receipt-URL";
|
|
19
26
|
/** Content-addressed receipt reference: SHA-256 of the compact JWS bytes */
|
|
20
27
|
export type ReceiptRef = `sha256:${string}`;
|
|
21
28
|
/** Carrier format: embed (inline) or reference (URL/pointer) */
|
|
@@ -31,6 +38,13 @@ export interface PeacEvidenceCarrier {
|
|
|
31
38
|
receipt_ref: ReceiptRef;
|
|
32
39
|
/** Compact JWS of the signed receipt (SHOULD for embed format) */
|
|
33
40
|
receipt_jws?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Locator hint for detached receipt resolution (DD-135).
|
|
43
|
+
* HTTPS-only, max 2048 chars, no credentials.
|
|
44
|
+
* MUST NOT trigger implicit fetch (DD-55).
|
|
45
|
+
* If a caller fetches, it MUST verify sha256(receipt_jws) == receipt_ref.
|
|
46
|
+
*/
|
|
47
|
+
receipt_url?: string;
|
|
34
48
|
/** Policy binding hash for verification (MAY) */
|
|
35
49
|
policy_binding?: string;
|
|
36
50
|
/** Actor binding identifier (MAY) */
|
package/dist/carrier.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carrier.d.ts","sourceRoot":"","sources":["../src/carrier.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAG,cAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"carrier.d.ts","sourceRoot":"","sources":["../src/carrier.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;;;;;;GAOG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