@kya-os/contracts 1.3.4 → 1.4.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.
Files changed (87) hide show
  1. package/dist/agentshield-api/endpoints.d.ts +50 -0
  2. package/dist/agentshield-api/endpoints.js +46 -0
  3. package/dist/agentshield-api/index.d.ts +13 -0
  4. package/dist/agentshield-api/index.js +38 -0
  5. package/dist/agentshield-api/schemas.d.ts +9914 -0
  6. package/dist/agentshield-api/schemas.js +165 -0
  7. package/dist/agentshield-api/types.d.ts +168 -0
  8. package/dist/agentshield-api/types.js +27 -0
  9. package/dist/cli.d.ts +388 -0
  10. package/dist/cli.js +121 -0
  11. package/dist/config/base.d.ts +96 -0
  12. package/dist/config/base.js +11 -0
  13. package/dist/config/delegation.d.ts +194 -0
  14. package/dist/config/delegation.js +10 -0
  15. package/dist/config/identity.d.ts +117 -0
  16. package/dist/config/identity.js +11 -0
  17. package/dist/config/index.d.ts +33 -0
  18. package/dist/config/index.js +11 -0
  19. package/dist/config/proofing.d.ts +120 -0
  20. package/dist/config/proofing.js +10 -0
  21. package/dist/config/tool-protection.d.ts +139 -0
  22. package/dist/config/tool-protection.js +10 -0
  23. package/dist/dashboard-config/index.d.ts +10 -0
  24. package/dist/dashboard-config/index.js +31 -0
  25. package/dist/dashboard-config/schemas.d.ts +5847 -0
  26. package/dist/dashboard-config/schemas.js +251 -0
  27. package/dist/dashboard-config/types.d.ts +331 -0
  28. package/dist/dashboard-config/types.js +11 -0
  29. package/dist/delegation/constraints.d.ts +991 -0
  30. package/dist/delegation/constraints.js +209 -0
  31. package/dist/delegation/index.d.ts +7 -0
  32. package/dist/delegation/index.js +23 -0
  33. package/dist/delegation/schemas.d.ts +8381 -0
  34. package/dist/delegation/schemas.js +475 -0
  35. package/dist/did/index.d.ts +8 -0
  36. package/dist/did/index.js +24 -0
  37. package/dist/did/resolve-contract.d.ts +219 -0
  38. package/dist/did/resolve-contract.js +31 -0
  39. package/dist/did/schemas.d.ts +112 -0
  40. package/dist/did/schemas.js +172 -0
  41. package/dist/did/types.d.ts +163 -0
  42. package/dist/did/types.js +70 -0
  43. package/dist/env/constants.d.ts +57 -0
  44. package/dist/env/constants.js +59 -0
  45. package/dist/env/index.d.ts +4 -0
  46. package/dist/env/index.js +20 -0
  47. package/dist/handshake.d.ts +158 -0
  48. package/dist/handshake.js +57 -0
  49. package/dist/index.d.ts +25 -0
  50. package/dist/index.js +56 -0
  51. package/dist/proof/index.d.ts +8 -0
  52. package/dist/proof/index.js +24 -0
  53. package/dist/proof/proof-record.d.ts +837 -0
  54. package/dist/proof/proof-record.js +133 -0
  55. package/dist/proof/signing-spec.d.ts +146 -0
  56. package/dist/proof/signing-spec.js +122 -0
  57. package/dist/proof.d.ts +415 -0
  58. package/dist/proof.js +83 -0
  59. package/dist/registry.d.ts +342 -0
  60. package/dist/registry.js +118 -0
  61. package/dist/runtime/errors.d.ts +347 -0
  62. package/dist/runtime/errors.js +119 -0
  63. package/dist/runtime/headers.d.ts +83 -0
  64. package/dist/runtime/headers.js +81 -0
  65. package/dist/runtime/index.d.ts +5 -0
  66. package/dist/runtime/index.js +21 -0
  67. package/dist/test.d.ts +251 -0
  68. package/dist/test.js +119 -0
  69. package/dist/tlkrc/index.d.ts +4 -0
  70. package/dist/tlkrc/index.js +20 -0
  71. package/dist/tlkrc/rotation.d.ts +245 -0
  72. package/dist/tlkrc/rotation.js +126 -0
  73. package/dist/tool-protection/index.d.ts +227 -0
  74. package/dist/tool-protection/index.js +113 -0
  75. package/dist/utils/validation.d.ts +30 -0
  76. package/dist/utils/validation.js +69 -0
  77. package/dist/vc/index.d.ts +7 -0
  78. package/dist/vc/index.js +23 -0
  79. package/dist/vc/schemas.d.ts +2483 -0
  80. package/dist/vc/schemas.js +224 -0
  81. package/dist/vc/statuslist.d.ts +493 -0
  82. package/dist/vc/statuslist.js +132 -0
  83. package/dist/verifier.d.ts +205 -0
  84. package/dist/verifier.js +83 -0
  85. package/dist/well-known/index.d.ts +308 -0
  86. package/dist/well-known/index.js +134 -0
  87. package/package.json +6 -1
@@ -0,0 +1,50 @@
1
+ /**
2
+ * AgentShield/Bouncer API Endpoint Constants
3
+ *
4
+ * Centralized endpoint definitions to prevent hardcoded URLs
5
+ * and ensure consistency across all API clients.
6
+ *
7
+ * @package @kya-os/contracts/agentshield-api
8
+ */
9
+ /**
10
+ * Base path for all AgentShield/Bouncer API endpoints
11
+ */
12
+ export declare const AGENTSHIELD_API_BASE: "/api/v1/bouncer";
13
+ /**
14
+ * AgentShield API endpoint paths
15
+ *
16
+ * These are relative paths that should be appended to the base API URL.
17
+ * Example: `${apiUrl}${AGENTSHIELD_ENDPOINTS.PROOFS}`
18
+ */
19
+ export declare const AGENTSHIELD_ENDPOINTS: {
20
+ /** Submit proofs in batch */
21
+ readonly PROOFS: "/api/v1/bouncer/proofs";
22
+ /** Verify delegation by agent DID and scopes */
23
+ readonly DELEGATIONS_VERIFY: "/api/v1/bouncer/delegations/verify";
24
+ /** Get delegation by ID */
25
+ readonly DELEGATIONS_GET: (id: string) => `/api/v1/bouncer/delegations/${string}`;
26
+ /** Create new delegation */
27
+ readonly DELEGATIONS_CREATE: "/api/v1/bouncer/delegations";
28
+ /** Revoke delegation */
29
+ readonly DELEGATIONS_REVOKE: (id: string) => `/api/v1/bouncer/delegations/${string}/revoke`;
30
+ /** Get tool protection configuration */
31
+ readonly CONFIG: (projectId: string) => `/api/v1/bouncer/config/${string}`;
32
+ };
33
+ /**
34
+ * HTTP methods for each endpoint
35
+ */
36
+ export declare const AGENTSHIELD_METHODS: {
37
+ readonly PROOFS: "POST";
38
+ readonly DELEGATIONS_VERIFY: "POST";
39
+ readonly DELEGATIONS_GET: "GET";
40
+ readonly DELEGATIONS_CREATE: "POST";
41
+ readonly DELEGATIONS_REVOKE: "POST";
42
+ readonly CONFIG: "GET";
43
+ };
44
+ /**
45
+ * Required headers for AgentShield API requests
46
+ */
47
+ export interface AgentShieldAPIHeaders {
48
+ 'Content-Type': 'application/json';
49
+ 'Authorization': `Bearer ${string}`;
50
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /**
3
+ * AgentShield/Bouncer API Endpoint Constants
4
+ *
5
+ * Centralized endpoint definitions to prevent hardcoded URLs
6
+ * and ensure consistency across all API clients.
7
+ *
8
+ * @package @kya-os/contracts/agentshield-api
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.AGENTSHIELD_METHODS = exports.AGENTSHIELD_ENDPOINTS = exports.AGENTSHIELD_API_BASE = void 0;
12
+ /**
13
+ * Base path for all AgentShield/Bouncer API endpoints
14
+ */
15
+ exports.AGENTSHIELD_API_BASE = '/api/v1/bouncer';
16
+ /**
17
+ * AgentShield API endpoint paths
18
+ *
19
+ * These are relative paths that should be appended to the base API URL.
20
+ * Example: `${apiUrl}${AGENTSHIELD_ENDPOINTS.PROOFS}`
21
+ */
22
+ exports.AGENTSHIELD_ENDPOINTS = {
23
+ /** Submit proofs in batch */
24
+ PROOFS: `${exports.AGENTSHIELD_API_BASE}/proofs`,
25
+ /** Verify delegation by agent DID and scopes */
26
+ DELEGATIONS_VERIFY: `${exports.AGENTSHIELD_API_BASE}/delegations/verify`,
27
+ /** Get delegation by ID */
28
+ DELEGATIONS_GET: (id) => `${exports.AGENTSHIELD_API_BASE}/delegations/${id}`,
29
+ /** Create new delegation */
30
+ DELEGATIONS_CREATE: `${exports.AGENTSHIELD_API_BASE}/delegations`,
31
+ /** Revoke delegation */
32
+ DELEGATIONS_REVOKE: (id) => `${exports.AGENTSHIELD_API_BASE}/delegations/${id}/revoke`,
33
+ /** Get tool protection configuration */
34
+ CONFIG: (projectId) => `${exports.AGENTSHIELD_API_BASE}/config/${projectId}`,
35
+ };
36
+ /**
37
+ * HTTP methods for each endpoint
38
+ */
39
+ exports.AGENTSHIELD_METHODS = {
40
+ PROOFS: 'POST',
41
+ DELEGATIONS_VERIFY: 'POST',
42
+ DELEGATIONS_GET: 'GET',
43
+ DELEGATIONS_CREATE: 'POST',
44
+ DELEGATIONS_REVOKE: 'POST',
45
+ CONFIG: 'GET',
46
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * AgentShield/Bouncer API Contracts
3
+ *
4
+ * Centralized type definitions, validation schemas, and endpoint constants
5
+ * for the AgentShield dashboard API integration.
6
+ *
7
+ * @package @kya-os/contracts/agentshield-api
8
+ */
9
+ export type { AgentShieldAPIResponse, ProofSubmissionRequest, ProofSubmissionResponse, VerifyDelegationRequest, VerifyDelegationResponse, VerifyDelegationAPIResponse, DelegationCredential, AgentShieldToolProtection, ToolProtectionConfigResponse, ToolProtectionConfigAPIResponse, CreateDelegationRequest, CreateDelegationResponse, CreateDelegationAPIResponse, RevokeDelegationRequest, RevokeDelegationResponse, RevokeDelegationAPIResponse, } from './types.js';
10
+ export { AgentShieldAPIError } from './types.js';
11
+ export type { AgentShieldAPIHeaders } from './endpoints.js';
12
+ export { agentShieldAPIErrorSchema, agentShieldAPIResponseSchema, proofSubmissionRequestSchema, proofSubmissionResponseSchema, delegationCredentialSchema, verifyDelegationRequestSchema, verifyDelegationResponseSchema, verifyDelegationAPIResponseSchema, agentShieldToolProtectionSchema, toolProtectionConfigResponseSchema, toolProtectionConfigAPIResponseSchema, createDelegationRequestSchema, createDelegationResponseSchema, createDelegationAPIResponseSchema, revokeDelegationRequestSchema, revokeDelegationResponseSchema, revokeDelegationAPIResponseSchema, } from './schemas.js';
13
+ export { AGENTSHIELD_API_BASE, AGENTSHIELD_ENDPOINTS, AGENTSHIELD_METHODS, } from './endpoints.js';
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * AgentShield/Bouncer API Contracts
4
+ *
5
+ * Centralized type definitions, validation schemas, and endpoint constants
6
+ * for the AgentShield dashboard API integration.
7
+ *
8
+ * @package @kya-os/contracts/agentshield-api
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ 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;
12
+ var types_js_1 = require("./types.js");
13
+ Object.defineProperty(exports, "AgentShieldAPIError", { enumerable: true, get: function () { return types_js_1.AgentShieldAPIError; } });
14
+ // Schema exports
15
+ var schemas_js_1 = require("./schemas.js");
16
+ Object.defineProperty(exports, "agentShieldAPIErrorSchema", { enumerable: true, get: function () { return schemas_js_1.agentShieldAPIErrorSchema; } });
17
+ Object.defineProperty(exports, "agentShieldAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.agentShieldAPIResponseSchema; } });
18
+ Object.defineProperty(exports, "proofSubmissionRequestSchema", { enumerable: true, get: function () { return schemas_js_1.proofSubmissionRequestSchema; } });
19
+ Object.defineProperty(exports, "proofSubmissionResponseSchema", { enumerable: true, get: function () { return schemas_js_1.proofSubmissionResponseSchema; } });
20
+ Object.defineProperty(exports, "delegationCredentialSchema", { enumerable: true, get: function () { return schemas_js_1.delegationCredentialSchema; } });
21
+ Object.defineProperty(exports, "verifyDelegationRequestSchema", { enumerable: true, get: function () { return schemas_js_1.verifyDelegationRequestSchema; } });
22
+ Object.defineProperty(exports, "verifyDelegationResponseSchema", { enumerable: true, get: function () { return schemas_js_1.verifyDelegationResponseSchema; } });
23
+ Object.defineProperty(exports, "verifyDelegationAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.verifyDelegationAPIResponseSchema; } });
24
+ Object.defineProperty(exports, "agentShieldToolProtectionSchema", { enumerable: true, get: function () { return schemas_js_1.agentShieldToolProtectionSchema; } });
25
+ Object.defineProperty(exports, "toolProtectionConfigResponseSchema", { enumerable: true, get: function () { return schemas_js_1.toolProtectionConfigResponseSchema; } });
26
+ Object.defineProperty(exports, "toolProtectionConfigAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.toolProtectionConfigAPIResponseSchema; } });
27
+ Object.defineProperty(exports, "createDelegationRequestSchema", { enumerable: true, get: function () { return schemas_js_1.createDelegationRequestSchema; } });
28
+ Object.defineProperty(exports, "createDelegationResponseSchema", { enumerable: true, get: function () { return schemas_js_1.createDelegationResponseSchema; } });
29
+ Object.defineProperty(exports, "createDelegationAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.createDelegationAPIResponseSchema; } });
30
+ Object.defineProperty(exports, "revokeDelegationRequestSchema", { enumerable: true, get: function () { return schemas_js_1.revokeDelegationRequestSchema; } });
31
+ Object.defineProperty(exports, "revokeDelegationResponseSchema", { enumerable: true, get: function () { return schemas_js_1.revokeDelegationResponseSchema; } });
32
+ Object.defineProperty(exports, "revokeDelegationAPIResponseSchema", { enumerable: true, get: function () { return schemas_js_1.revokeDelegationAPIResponseSchema; } });
33
+ // Endpoint exports
34
+ var endpoints_js_1 = require("./endpoints.js");
35
+ Object.defineProperty(exports, "AGENTSHIELD_API_BASE", { enumerable: true, get: function () { return endpoints_js_1.AGENTSHIELD_API_BASE; } });
36
+ Object.defineProperty(exports, "AGENTSHIELD_ENDPOINTS", { enumerable: true, get: function () { return endpoints_js_1.AGENTSHIELD_ENDPOINTS; } });
37
+ Object.defineProperty(exports, "AGENTSHIELD_METHODS", { enumerable: true, get: function () { return endpoints_js_1.AGENTSHIELD_METHODS; } });
38
+ //# sourceMappingURL=index.js.map