@kya-os/contracts 1.3.2 → 1.3.3

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 (82) hide show
  1. package/README.md +1 -1
  2. package/dist/agentshield-api/endpoints.d.ts +21 -0
  3. package/dist/agentshield-api/endpoints.js +20 -0
  4. package/dist/agentshield-api/index.d.ts +5 -0
  5. package/dist/agentshield-api/index.js +27 -0
  6. package/dist/agentshield-api/schemas.d.ts +9846 -0
  7. package/dist/agentshield-api/schemas.js +92 -0
  8. package/dist/agentshield-api/types.d.ts +92 -0
  9. package/dist/agentshield-api/types.js +12 -0
  10. package/dist/cli.d.ts +3 -6
  11. package/dist/cli.js +3 -10
  12. package/dist/config/base.d.ts +19 -0
  13. package/dist/config/base.js +2 -0
  14. package/dist/config/delegation.d.ts +46 -0
  15. package/dist/config/delegation.js +2 -0
  16. package/dist/config/identity.d.ts +22 -0
  17. package/dist/config/identity.js +2 -0
  18. package/dist/config/index.d.ts +17 -0
  19. package/dist/config/index.js +2 -0
  20. package/dist/config/proofing.d.ts +26 -0
  21. package/dist/config/proofing.js +2 -0
  22. package/dist/config/tool-protection.d.ts +36 -0
  23. package/dist/config/tool-protection.js +2 -0
  24. package/dist/delegation/constraints.d.ts +0 -266
  25. package/dist/delegation/constraints.js +3 -110
  26. package/dist/delegation/index.d.ts +0 -6
  27. package/dist/delegation/index.js +0 -6
  28. package/dist/delegation/schemas.d.ts +174 -514
  29. package/dist/delegation/schemas.js +3 -247
  30. package/dist/did/index.d.ts +0 -6
  31. package/dist/did/index.js +0 -6
  32. package/dist/did/resolve-contract.d.ts +0 -167
  33. package/dist/did/resolve-contract.js +0 -20
  34. package/dist/did/schemas.d.ts +0 -80
  35. package/dist/did/schemas.js +4 -97
  36. package/dist/did/types.d.ts +0 -126
  37. package/dist/did/types.js +0 -34
  38. package/dist/env/constants.d.ts +0 -45
  39. package/dist/env/constants.js +0 -45
  40. package/dist/env/index.d.ts +0 -4
  41. package/dist/env/index.js +0 -4
  42. package/dist/handshake.d.ts +0 -21
  43. package/dist/handshake.js +3 -11
  44. package/dist/index.d.ts +0 -15
  45. package/dist/index.js +0 -25
  46. package/dist/proof/index.d.ts +0 -7
  47. package/dist/proof/index.js +0 -7
  48. package/dist/proof/proof-record.d.ts +62 -172
  49. package/dist/proof/proof-record.js +0 -74
  50. package/dist/proof/signing-spec.d.ts +12 -86
  51. package/dist/proof/signing-spec.js +0 -71
  52. package/dist/proof.d.ts +16 -38
  53. package/dist/proof.js +3 -26
  54. package/dist/registry.d.ts +10 -27
  55. package/dist/registry.js +9 -30
  56. package/dist/runtime/errors.d.ts +0 -169
  57. package/dist/runtime/errors.js +0 -69
  58. package/dist/runtime/headers.d.ts +0 -50
  59. package/dist/runtime/headers.js +0 -30
  60. package/dist/runtime/index.d.ts +0 -4
  61. package/dist/runtime/index.js +0 -4
  62. package/dist/test.d.ts +0 -37
  63. package/dist/test.js +0 -37
  64. package/dist/tlkrc/index.d.ts +0 -4
  65. package/dist/tlkrc/index.js +0 -4
  66. package/dist/tlkrc/rotation.d.ts +12 -90
  67. package/dist/tlkrc/rotation.js +0 -72
  68. package/dist/tool-protection/index.d.ts +129 -0
  69. package/dist/tool-protection/index.js +80 -0
  70. package/dist/utils/validation.d.ts +0 -17
  71. package/dist/utils/validation.js +0 -14
  72. package/dist/vc/index.d.ts +0 -6
  73. package/dist/vc/index.js +0 -6
  74. package/dist/vc/schemas.d.ts +0 -596
  75. package/dist/vc/schemas.js +2 -111
  76. package/dist/vc/statuslist.d.ts +0 -202
  77. package/dist/vc/statuslist.js +1 -73
  78. package/dist/verifier.d.ts +9 -13
  79. package/dist/verifier.js +0 -8
  80. package/dist/well-known/index.d.ts +248 -0
  81. package/dist/well-known/index.js +104 -0
  82. package/package.json +27 -5
package/README.md CHANGED
@@ -120,7 +120,7 @@ export type ProofMeta = z.infer<typeof ProofMetaSchema>;
120
120
 
121
121
  This package is optimized for minimal bundle impact:
122
122
 
123
- - **Tarball size**: < 50 KB
123
+ - **Tarball size**: < 80 KB
124
124
  - **Side effects**: None (`"sideEffects": false`)
125
125
  - **Tree-shaking**: Full ESM support
126
126
  - **Dependencies**: Only Zod for schema validation
@@ -0,0 +1,21 @@
1
+ export declare const AGENTSHIELD_API_BASE: "/api/v1/bouncer";
2
+ export declare const AGENTSHIELD_ENDPOINTS: {
3
+ readonly PROOFS: "/api/v1/bouncer/proofs";
4
+ readonly DELEGATIONS_VERIFY: "/api/v1/bouncer/delegations/verify";
5
+ readonly DELEGATIONS_GET: (id: string) => `/api/v1/bouncer/delegations/${string}`;
6
+ readonly DELEGATIONS_CREATE: "/api/v1/bouncer/delegations";
7
+ readonly DELEGATIONS_REVOKE: (id: string) => `/api/v1/bouncer/delegations/${string}/revoke`;
8
+ readonly CONFIG: (projectId: string) => `/api/v1/bouncer/config/${string}`;
9
+ };
10
+ export declare const AGENTSHIELD_METHODS: {
11
+ readonly PROOFS: "POST";
12
+ readonly DELEGATIONS_VERIFY: "POST";
13
+ readonly DELEGATIONS_GET: "GET";
14
+ readonly DELEGATIONS_CREATE: "POST";
15
+ readonly DELEGATIONS_REVOKE: "POST";
16
+ readonly CONFIG: "GET";
17
+ };
18
+ export interface AgentShieldAPIHeaders {
19
+ 'Content-Type': 'application/json';
20
+ 'Authorization': `Bearer ${string}`;
21
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AGENTSHIELD_METHODS = exports.AGENTSHIELD_ENDPOINTS = exports.AGENTSHIELD_API_BASE = void 0;
4
+ exports.AGENTSHIELD_API_BASE = '/api/v1/bouncer';
5
+ exports.AGENTSHIELD_ENDPOINTS = {
6
+ PROOFS: `${exports.AGENTSHIELD_API_BASE}/proofs`,
7
+ DELEGATIONS_VERIFY: `${exports.AGENTSHIELD_API_BASE}/delegations/verify`,
8
+ DELEGATIONS_GET: (id) => `${exports.AGENTSHIELD_API_BASE}/delegations/${id}`,
9
+ DELEGATIONS_CREATE: `${exports.AGENTSHIELD_API_BASE}/delegations`,
10
+ DELEGATIONS_REVOKE: (id) => `${exports.AGENTSHIELD_API_BASE}/delegations/${id}/revoke`,
11
+ CONFIG: (projectId) => `${exports.AGENTSHIELD_API_BASE}/config/${projectId}`,
12
+ };
13
+ exports.AGENTSHIELD_METHODS = {
14
+ PROOFS: 'POST',
15
+ DELEGATIONS_VERIFY: 'POST',
16
+ DELEGATIONS_GET: 'GET',
17
+ DELEGATIONS_CREATE: 'POST',
18
+ DELEGATIONS_REVOKE: 'POST',
19
+ CONFIG: 'GET',
20
+ };
@@ -0,0 +1,5 @@
1
+ export type { AgentShieldAPIResponse, ProofSubmissionRequest, ProofSubmissionResponse, VerifyDelegationRequest, VerifyDelegationResponse, VerifyDelegationAPIResponse, DelegationCredential, AgentShieldToolProtection, ToolProtectionConfigResponse, ToolProtectionConfigAPIResponse, CreateDelegationRequest, CreateDelegationResponse, CreateDelegationAPIResponse, RevokeDelegationRequest, RevokeDelegationResponse, RevokeDelegationAPIResponse, } from './types.js';
2
+ export { AgentShieldAPIError } from './types.js';
3
+ export type { AgentShieldAPIHeaders } from './endpoints.js';
4
+ export { agentShieldAPIErrorSchema, agentShieldAPIResponseSchema, proofSubmissionRequestSchema, proofSubmissionResponseSchema, delegationCredentialSchema, verifyDelegationRequestSchema, verifyDelegationResponseSchema, verifyDelegationAPIResponseSchema, agentShieldToolProtectionSchema, toolProtectionConfigResponseSchema, toolProtectionConfigAPIResponseSchema, createDelegationRequestSchema, createDelegationResponseSchema, createDelegationAPIResponseSchema, revokeDelegationRequestSchema, revokeDelegationResponseSchema, revokeDelegationAPIResponseSchema, } from './schemas.js';
5
+ export { AGENTSHIELD_API_BASE, AGENTSHIELD_ENDPOINTS, AGENTSHIELD_METHODS, } from './endpoints.js';
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AGENTSHIELD_METHODS = exports.AGENTSHIELD_ENDPOINTS = exports.AGENTSHIELD_API_BASE = exports.revokeDelegationAPIResponseSchema = exports.revokeDelegationResponseSchema = exports.revokeDelegationRequestSchema = exports.createDelegationAPIResponseSchema = exports.createDelegationResponseSchema = exports.createDelegationRequestSchema = exports.toolProtectionConfigAPIResponseSchema = exports.toolProtectionConfigResponseSchema = exports.agentShieldToolProtectionSchema = exports.verifyDelegationAPIResponseSchema = exports.verifyDelegationResponseSchema = exports.verifyDelegationRequestSchema = exports.delegationCredentialSchema = exports.proofSubmissionResponseSchema = exports.proofSubmissionRequestSchema = exports.agentShieldAPIResponseSchema = exports.agentShieldAPIErrorSchema = exports.AgentShieldAPIError = void 0;
4
+ var types_js_1 = require("./types.js");
5
+ Object.defineProperty(exports, "AgentShieldAPIError", { enumerable: true, get: function () { return types_js_1.AgentShieldAPIError; } });
6
+ var schemas_js_1 = require("./schemas.js");
7
+ Object.defineProperty(exports, "agentShieldAPIErrorSchema", { enumerable: true, get: function () { return schemas_js_1.agentShieldAPIErrorSchema; } });
8
+ Object.defineProperty(exports, "agentShieldAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.agentShieldAPIResponseSchema; } });
9
+ Object.defineProperty(exports, "proofSubmissionRequestSchema", { enumerable: true, get: function () { return schemas_js_1.proofSubmissionRequestSchema; } });
10
+ Object.defineProperty(exports, "proofSubmissionResponseSchema", { enumerable: true, get: function () { return schemas_js_1.proofSubmissionResponseSchema; } });
11
+ Object.defineProperty(exports, "delegationCredentialSchema", { enumerable: true, get: function () { return schemas_js_1.delegationCredentialSchema; } });
12
+ Object.defineProperty(exports, "verifyDelegationRequestSchema", { enumerable: true, get: function () { return schemas_js_1.verifyDelegationRequestSchema; } });
13
+ Object.defineProperty(exports, "verifyDelegationResponseSchema", { enumerable: true, get: function () { return schemas_js_1.verifyDelegationResponseSchema; } });
14
+ Object.defineProperty(exports, "verifyDelegationAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.verifyDelegationAPIResponseSchema; } });
15
+ Object.defineProperty(exports, "agentShieldToolProtectionSchema", { enumerable: true, get: function () { return schemas_js_1.agentShieldToolProtectionSchema; } });
16
+ Object.defineProperty(exports, "toolProtectionConfigResponseSchema", { enumerable: true, get: function () { return schemas_js_1.toolProtectionConfigResponseSchema; } });
17
+ Object.defineProperty(exports, "toolProtectionConfigAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.toolProtectionConfigAPIResponseSchema; } });
18
+ Object.defineProperty(exports, "createDelegationRequestSchema", { enumerable: true, get: function () { return schemas_js_1.createDelegationRequestSchema; } });
19
+ Object.defineProperty(exports, "createDelegationResponseSchema", { enumerable: true, get: function () { return schemas_js_1.createDelegationResponseSchema; } });
20
+ Object.defineProperty(exports, "createDelegationAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.createDelegationAPIResponseSchema; } });
21
+ Object.defineProperty(exports, "revokeDelegationRequestSchema", { enumerable: true, get: function () { return schemas_js_1.revokeDelegationRequestSchema; } });
22
+ Object.defineProperty(exports, "revokeDelegationResponseSchema", { enumerable: true, get: function () { return schemas_js_1.revokeDelegationResponseSchema; } });
23
+ Object.defineProperty(exports, "revokeDelegationAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.revokeDelegationAPIResponseSchema; } });
24
+ var endpoints_js_1 = require("./endpoints.js");
25
+ Object.defineProperty(exports, "AGENTSHIELD_API_BASE", { enumerable: true, get: function () { return endpoints_js_1.AGENTSHIELD_API_BASE; } });
26
+ Object.defineProperty(exports, "AGENTSHIELD_ENDPOINTS", { enumerable: true, get: function () { return endpoints_js_1.AGENTSHIELD_ENDPOINTS; } });
27
+ Object.defineProperty(exports, "AGENTSHIELD_METHODS", { enumerable: true, get: function () { return endpoints_js_1.AGENTSHIELD_METHODS; } });