@kya-os/cli 2.0.3 → 2.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/node_modules/@kya-os/contracts/dist/agent-deployment-utils.d.ts +1 -1
- package/node_modules/@kya-os/contracts/dist/agent-deployment-utils.js +1 -1
- package/node_modules/@kya-os/contracts/dist/agent-deployment.d.ts +10 -10
- package/node_modules/@kya-os/contracts/dist/agent-deployment.js +2 -2
- package/node_modules/@kya-os/contracts/dist/agentshield-api/index.d.ts +116 -11
- package/node_modules/@kya-os/contracts/dist/agentshield-api/index.js +38 -40
- package/node_modules/@kya-os/contracts/dist/{agentshield-api → checkpoint-api}/admin-schemas.d.ts +3 -3
- package/node_modules/@kya-os/contracts/dist/{agentshield-api → checkpoint-api}/admin-schemas.js +3 -3
- package/node_modules/@kya-os/contracts/dist/{agentshield-api → checkpoint-api}/admin-types.d.ts +4 -4
- package/node_modules/@kya-os/contracts/dist/checkpoint-api/admin-types.js +10 -0
- package/node_modules/@kya-os/contracts/dist/{agentshield-api → checkpoint-api}/endpoints.d.ts +10 -10
- package/node_modules/@kya-os/contracts/dist/checkpoint-api/endpoints.js +49 -0
- package/node_modules/@kya-os/contracts/dist/checkpoint-api/index.d.ts +15 -0
- package/node_modules/@kya-os/contracts/dist/checkpoint-api/index.js +46 -0
- package/node_modules/@kya-os/contracts/dist/{agentshield-api → checkpoint-api}/schemas.d.ts +10 -10
- package/node_modules/@kya-os/contracts/dist/{agentshield-api → checkpoint-api}/schemas.js +24 -24
- package/node_modules/@kya-os/contracts/dist/{agentshield-api → checkpoint-api}/types.d.ts +27 -27
- package/node_modules/@kya-os/contracts/dist/checkpoint-api/types.js +26 -0
- package/node_modules/@kya-os/contracts/dist/compute.d.ts +5 -5
- package/node_modules/@kya-os/contracts/dist/compute.js +5 -5
- package/node_modules/@kya-os/contracts/dist/config/builder.js +2 -0
- package/node_modules/@kya-os/contracts/dist/config/delegation.d.ts +1 -1
- package/node_modules/@kya-os/contracts/dist/config/identity.d.ts +4 -4
- package/node_modules/@kya-os/contracts/dist/config/index.d.ts +1 -1
- package/node_modules/@kya-os/contracts/dist/config/proofing.d.ts +3 -2
- package/node_modules/@kya-os/contracts/dist/config/tool-protection.d.ts +34 -26
- package/node_modules/@kya-os/contracts/dist/consent/schemas.d.ts +5 -5
- package/node_modules/@kya-os/contracts/dist/consent/schemas.js +1 -1
- package/node_modules/@kya-os/contracts/dist/consent/types.d.ts +2 -2
- package/node_modules/@kya-os/contracts/dist/dashboard-config/default-config.d.ts +3 -1
- package/node_modules/@kya-os/contracts/dist/dashboard-config/default-config.js +3 -1
- package/node_modules/@kya-os/contracts/dist/dashboard-config/schemas.d.ts +479 -197
- package/node_modules/@kya-os/contracts/dist/dashboard-config/schemas.js +10 -3
- package/node_modules/@kya-os/contracts/dist/dashboard-config/types.d.ts +19 -9
- package/node_modules/@kya-os/contracts/dist/dashboard-config/types.js +2 -2
- package/node_modules/@kya-os/contracts/dist/delegation/schemas.d.ts +19 -19
- package/node_modules/@kya-os/contracts/dist/delegation/schemas.js +4 -4
- package/node_modules/@kya-os/contracts/dist/deploy/index.d.ts +1 -1
- package/node_modules/@kya-os/contracts/dist/deploy/index.js +1 -1
- package/node_modules/@kya-os/contracts/dist/deploy/schemas.d.ts +7 -7
- package/node_modules/@kya-os/contracts/dist/deploy/schemas.js +3 -3
- package/node_modules/@kya-os/contracts/dist/deploy/types.d.ts +8 -8
- package/node_modules/@kya-os/contracts/dist/deploy/types.js +1 -1
- package/node_modules/@kya-os/contracts/dist/handshake/schemas.d.ts +1 -1
- package/node_modules/@kya-os/contracts/dist/handshake/schemas.js +1 -1
- package/node_modules/@kya-os/contracts/dist/identity/schemas.d.ts +1 -1
- package/node_modules/@kya-os/contracts/dist/identity/schemas.js +1 -1
- package/node_modules/@kya-os/contracts/dist/index.js +1 -1
- package/node_modules/@kya-os/contracts/dist/molti/schemas.d.ts +6 -6
- package/node_modules/@kya-os/contracts/dist/molti/schemas.js +2 -2
- package/node_modules/@kya-os/contracts/dist/molti/types.d.ts +9 -9
- package/node_modules/@kya-os/contracts/dist/molti/types.js +1 -1
- package/node_modules/@kya-os/contracts/dist/policy/schemas.d.ts +1 -1
- package/node_modules/@kya-os/contracts/dist/policy/schemas.js +1 -1
- package/node_modules/@kya-os/contracts/dist/proof/detached-proof.d.ts +3 -3
- package/node_modules/@kya-os/contracts/dist/proof/detached-proof.js +3 -3
- package/node_modules/@kya-os/contracts/dist/skills/schemas.d.ts +1 -1
- package/node_modules/@kya-os/contracts/dist/vault/schemas.d.ts +1 -1
- package/node_modules/@kya-os/contracts/dist/vault/schemas.js +1 -1
- package/node_modules/@kya-os/contracts/dist/well-known/index.d.ts +4 -4
- package/node_modules/@kya-os/contracts/dist/workbench/execution.d.ts +13 -0
- package/node_modules/@kya-os/contracts/dist/workbench/execution.js +12 -1
- package/node_modules/@kya-os/contracts/dist/workbench/governed.d.ts +52 -0
- package/node_modules/@kya-os/contracts/dist/workbench/lead-planner.d.ts +11 -0
- package/node_modules/@kya-os/contracts/dist/workbench/linear-installation.d.ts +29 -0
- package/node_modules/@kya-os/contracts/dist/workbench/mailbox.d.ts +77 -0
- package/node_modules/@kya-os/contracts/dist/workbench/mailbox.js +7 -0
- package/node_modules/@kya-os/contracts/dist/workbench/review.d.ts +9 -0
- package/node_modules/@kya-os/contracts/package.json +5 -1
- package/package.json +6 -6
- package/node_modules/@kya-os/contracts/dist/agentshield-api/admin-types.js +0 -10
- package/node_modules/@kya-os/contracts/dist/agentshield-api/endpoints.js +0 -49
- package/node_modules/@kya-os/contracts/dist/agentshield-api/types.js +0 -26
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Checkpoint/Bouncer API Zod Validation Schemas
|
|
3
3
|
*
|
|
4
4
|
* Runtime validation schemas matching the API contract types.
|
|
5
5
|
* These schemas ensure request/response validation before sending/receiving.
|
|
6
6
|
*
|
|
7
|
-
* @package @kya-os/contracts/
|
|
7
|
+
* @package @kya-os/contracts/checkpoint-api
|
|
8
8
|
*/
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
/**
|
|
11
11
|
* Standard error schema
|
|
12
12
|
*/
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const checkpointAPIErrorSchema: z.ZodObject<{
|
|
14
14
|
code: z.ZodString;
|
|
15
15
|
message: z.ZodString;
|
|
16
16
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -26,7 +26,7 @@ export declare const agentShieldAPIErrorSchema: z.ZodObject<{
|
|
|
26
26
|
/**
|
|
27
27
|
* Standard API response wrapper schema
|
|
28
28
|
*/
|
|
29
|
-
export declare const
|
|
29
|
+
export declare const checkpointAPIResponseSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodObject<{
|
|
30
30
|
success: z.ZodBoolean;
|
|
31
31
|
data: T;
|
|
32
32
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
@@ -5895,10 +5895,10 @@ export declare const verifyDelegationAPIResponseSchema: z.ZodObject<{
|
|
|
5895
5895
|
} | undefined;
|
|
5896
5896
|
}>;
|
|
5897
5897
|
/**
|
|
5898
|
-
*
|
|
5898
|
+
* Checkpoint tool protection schema (supports both snake_case and camelCase)
|
|
5899
5899
|
* This is the API-specific format, not the MCP-I spec schema
|
|
5900
5900
|
*/
|
|
5901
|
-
export declare const
|
|
5901
|
+
export declare const checkpointToolProtectionSchema: z.ZodObject<{
|
|
5902
5902
|
scopes: z.ZodArray<z.ZodString, "many">;
|
|
5903
5903
|
requires_delegation: z.ZodOptional<z.ZodBoolean>;
|
|
5904
5904
|
requiresDelegation: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -6120,7 +6120,7 @@ export declare const toolProtectionConfigAPIResponseSchema: z.ZodObject<{
|
|
|
6120
6120
|
/**
|
|
6121
6121
|
* Create delegation request schema
|
|
6122
6122
|
*
|
|
6123
|
-
* Note:
|
|
6123
|
+
* Note: Checkpoint API accepts a simplified format, not the full DelegationRecord.
|
|
6124
6124
|
* The API accepts: agent_did, scopes, expires_in_days, expires_at, session_id, project_id, user_identifier, custom_fields
|
|
6125
6125
|
*
|
|
6126
6126
|
* IMPORTANT: expires_in_days and expires_at are mutually exclusive - use one or the other, not both.
|
|
@@ -6176,7 +6176,7 @@ export declare const createDelegationRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
6176
6176
|
*
|
|
6177
6177
|
* Canonical format returned by POST /api/v1/bouncer/delegations
|
|
6178
6178
|
*
|
|
6179
|
-
* As of
|
|
6179
|
+
* As of Checkpoint v2.x, delegation_token (JWT) IS returned for stateless verification.
|
|
6180
6180
|
* The JWT enables MCP-I servers to verify delegations without database lookups.
|
|
6181
6181
|
*/
|
|
6182
6182
|
export declare const createDelegationResponseSchema: z.ZodObject<{
|
|
@@ -6476,7 +6476,6 @@ export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
|
6476
6476
|
}, "strip", z.ZodTypeAny, {
|
|
6477
6477
|
session_id: string;
|
|
6478
6478
|
agent_did: string;
|
|
6479
|
-
project_id: string;
|
|
6480
6479
|
created_at: number;
|
|
6481
6480
|
client_info: {
|
|
6482
6481
|
name: string;
|
|
@@ -6485,6 +6484,7 @@ export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
|
6485
6484
|
vendor?: string | undefined;
|
|
6486
6485
|
protocol_version?: string | undefined;
|
|
6487
6486
|
};
|
|
6487
|
+
project_id: string;
|
|
6488
6488
|
agent_name?: string | undefined;
|
|
6489
6489
|
client_identity?: {
|
|
6490
6490
|
registered: boolean;
|
|
@@ -6496,7 +6496,6 @@ export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
|
6496
6496
|
}, {
|
|
6497
6497
|
session_id: string;
|
|
6498
6498
|
agent_did: string;
|
|
6499
|
-
project_id: string;
|
|
6500
6499
|
created_at: number;
|
|
6501
6500
|
client_info: {
|
|
6502
6501
|
name: string;
|
|
@@ -6505,6 +6504,7 @@ export declare const registerSessionRequestSchema: z.ZodObject<{
|
|
|
6505
6504
|
vendor?: string | undefined;
|
|
6506
6505
|
protocol_version?: string | undefined;
|
|
6507
6506
|
};
|
|
6507
|
+
project_id: string;
|
|
6508
6508
|
agent_name?: string | undefined;
|
|
6509
6509
|
client_identity?: {
|
|
6510
6510
|
registered: boolean;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Checkpoint/Bouncer API Zod Validation Schemas
|
|
4
4
|
*
|
|
5
5
|
* Runtime validation schemas matching the API contract types.
|
|
6
6
|
* These schemas ensure request/response validation before sending/receiving.
|
|
7
7
|
*
|
|
8
|
-
* @package @kya-os/contracts/
|
|
8
|
+
* @package @kya-os/contracts/checkpoint-api
|
|
9
9
|
*/
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.registerSessionAPIResponseSchema = exports.registerSessionResponseSchema = exports.registerSessionRequestSchema = exports.sessionClientIdentitySchema = exports.sessionClientInfoSchema = exports.revokeDelegationAPIResponseSchema = exports.revokeDelegationResponseSchema = exports.revokeDelegationRequestSchema = exports.createDelegationAPIResponseSchema = exports.createDelegationResponseSchema = exports.createDelegationRequestSchema = exports.toolProtectionConfigAPIResponseSchema = exports.toolProtectionConfigResponseSchema = exports.
|
|
11
|
+
exports.registerSessionAPIResponseSchema = exports.registerSessionResponseSchema = exports.registerSessionRequestSchema = exports.sessionClientIdentitySchema = exports.sessionClientInfoSchema = exports.revokeDelegationAPIResponseSchema = exports.revokeDelegationResponseSchema = exports.revokeDelegationRequestSchema = exports.createDelegationAPIResponseSchema = exports.createDelegationResponseSchema = exports.createDelegationRequestSchema = exports.toolProtectionConfigAPIResponseSchema = exports.toolProtectionConfigResponseSchema = exports.checkpointToolProtectionSchema = exports.verifyDelegationAPIResponseSchema = exports.verifyDelegationResponseSchema = exports.verifyDelegationRequestSchema = exports.delegationCredentialSchema = exports.proofSubmissionResponseSchema = exports.proofSubmissionRequestSchema = exports.checkpointAPIResponseSchema = exports.checkpointAPIErrorSchema = void 0;
|
|
12
12
|
const zod_1 = require("zod");
|
|
13
13
|
const index_js_1 = require("../proof/index.js");
|
|
14
14
|
const index_js_2 = require("../delegation/index.js");
|
|
15
15
|
/**
|
|
16
16
|
* Standard error schema
|
|
17
17
|
*/
|
|
18
|
-
exports.
|
|
18
|
+
exports.checkpointAPIErrorSchema = zod_1.z.object({
|
|
19
19
|
code: zod_1.z.string(),
|
|
20
20
|
message: zod_1.z.string(),
|
|
21
21
|
details: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
@@ -23,7 +23,7 @@ exports.agentShieldAPIErrorSchema = zod_1.z.object({
|
|
|
23
23
|
/**
|
|
24
24
|
* Standard API response wrapper schema
|
|
25
25
|
*/
|
|
26
|
-
const
|
|
26
|
+
const checkpointAPIResponseSchema = (dataSchema) => zod_1.z.object({
|
|
27
27
|
success: zod_1.z.boolean(),
|
|
28
28
|
data: dataSchema,
|
|
29
29
|
metadata: zod_1.z
|
|
@@ -33,12 +33,12 @@ const agentShieldAPIResponseSchema = (dataSchema) => zod_1.z.object({
|
|
|
33
33
|
})
|
|
34
34
|
.optional(),
|
|
35
35
|
});
|
|
36
|
-
exports.
|
|
36
|
+
exports.checkpointAPIResponseSchema = checkpointAPIResponseSchema;
|
|
37
37
|
// ============================================================================
|
|
38
38
|
// Proof Submission Schemas
|
|
39
39
|
// ============================================================================
|
|
40
40
|
/**
|
|
41
|
-
* Tool Call Context Schema (
|
|
41
|
+
* Tool Call Context Schema (Checkpoint Extension)
|
|
42
42
|
* Optional plaintext context for dashboard enrichment
|
|
43
43
|
*/
|
|
44
44
|
const toolCallContextSchema = zod_1.z.object({
|
|
@@ -82,10 +82,10 @@ const consentEventContextSchema = zod_1.z.object({
|
|
|
82
82
|
* Proof submission request schema
|
|
83
83
|
*/
|
|
84
84
|
exports.proofSubmissionRequestSchema = zod_1.z.object({
|
|
85
|
-
session_id: zod_1.z.string().max(100), //
|
|
85
|
+
session_id: zod_1.z.string().max(100), // Checkpoint session ID (may differ from MCP-I sessionId)
|
|
86
86
|
delegation_id: zod_1.z.string().uuid().nullish(),
|
|
87
87
|
proofs: zod_1.z.array(index_js_1.DetachedProofSchema).min(1),
|
|
88
|
-
//
|
|
88
|
+
// Checkpoint extension: Optional context for dashboard enrichment
|
|
89
89
|
context: zod_1.z
|
|
90
90
|
.object({
|
|
91
91
|
toolCalls: zod_1.z.array(toolCallContextSchema).optional(),
|
|
@@ -171,21 +171,21 @@ exports.verifyDelegationResponseSchema = zod_1.z.object({
|
|
|
171
171
|
delegation: index_js_2.DelegationRecordSchema.optional(),
|
|
172
172
|
delegation_id: zod_1.z.string().uuid().optional(),
|
|
173
173
|
credential: exports.delegationCredentialSchema.optional(),
|
|
174
|
-
error: exports.
|
|
174
|
+
error: exports.checkpointAPIErrorSchema.optional(),
|
|
175
175
|
reason: zod_1.z.string().optional(),
|
|
176
176
|
});
|
|
177
177
|
/**
|
|
178
178
|
* Wrapped verification response schema
|
|
179
179
|
*/
|
|
180
|
-
exports.verifyDelegationAPIResponseSchema = (0, exports.
|
|
180
|
+
exports.verifyDelegationAPIResponseSchema = (0, exports.checkpointAPIResponseSchema)(exports.verifyDelegationResponseSchema);
|
|
181
181
|
// ============================================================================
|
|
182
182
|
// Tool Protection Configuration Schemas
|
|
183
183
|
// ============================================================================
|
|
184
184
|
/**
|
|
185
|
-
*
|
|
185
|
+
* Checkpoint tool protection schema (supports both snake_case and camelCase)
|
|
186
186
|
* This is the API-specific format, not the MCP-I spec schema
|
|
187
187
|
*/
|
|
188
|
-
exports.
|
|
188
|
+
exports.checkpointToolProtectionSchema = zod_1.z
|
|
189
189
|
.object({
|
|
190
190
|
scopes: zod_1.z.array(zod_1.z.string()),
|
|
191
191
|
requires_delegation: zod_1.z.boolean().optional(),
|
|
@@ -198,7 +198,7 @@ exports.agentShieldToolProtectionSchema = zod_1.z
|
|
|
198
198
|
*/
|
|
199
199
|
exports.toolProtectionConfigResponseSchema = zod_1.z.object({
|
|
200
200
|
agent_did: zod_1.z.string(),
|
|
201
|
-
tools: zod_1.z.record(zod_1.z.string(), exports.
|
|
201
|
+
tools: zod_1.z.record(zod_1.z.string(), exports.checkpointToolProtectionSchema),
|
|
202
202
|
reputation_threshold: zod_1.z.number().min(0).max(1).optional(),
|
|
203
203
|
denied_agents: zod_1.z.array(zod_1.z.string()).optional(),
|
|
204
204
|
crisp_budget: zod_1.z
|
|
@@ -213,14 +213,14 @@ exports.toolProtectionConfigResponseSchema = zod_1.z.object({
|
|
|
213
213
|
/**
|
|
214
214
|
* Wrapped config response schema
|
|
215
215
|
*/
|
|
216
|
-
exports.toolProtectionConfigAPIResponseSchema = (0, exports.
|
|
216
|
+
exports.toolProtectionConfigAPIResponseSchema = (0, exports.checkpointAPIResponseSchema)(exports.toolProtectionConfigResponseSchema);
|
|
217
217
|
// ============================================================================
|
|
218
218
|
// Delegation Management Schemas
|
|
219
219
|
// ============================================================================
|
|
220
220
|
/**
|
|
221
221
|
* Create delegation request schema
|
|
222
222
|
*
|
|
223
|
-
* Note:
|
|
223
|
+
* Note: Checkpoint API accepts a simplified format, not the full DelegationRecord.
|
|
224
224
|
* The API accepts: agent_did, scopes, expires_in_days, expires_at, session_id, project_id, user_identifier, custom_fields
|
|
225
225
|
*
|
|
226
226
|
* IMPORTANT: expires_in_days and expires_at are mutually exclusive - use one or the other, not both.
|
|
@@ -233,7 +233,7 @@ exports.createDelegationRequestSchema = zod_1.z
|
|
|
233
233
|
expires_at: zod_1.z.string().datetime().optional(),
|
|
234
234
|
session_id: zod_1.z.string().optional(),
|
|
235
235
|
project_id: zod_1.z.string().uuid().optional(),
|
|
236
|
-
user_identifier: zod_1.z.string().max(200).optional(), // Matches
|
|
236
|
+
user_identifier: zod_1.z.string().max(200).optional(), // Matches Checkpoint's max(200)
|
|
237
237
|
custom_fields: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
238
238
|
})
|
|
239
239
|
.passthrough()
|
|
@@ -251,7 +251,7 @@ exports.createDelegationRequestSchema = zod_1.z
|
|
|
251
251
|
*
|
|
252
252
|
* Canonical format returned by POST /api/v1/bouncer/delegations
|
|
253
253
|
*
|
|
254
|
-
* As of
|
|
254
|
+
* As of Checkpoint v2.x, delegation_token (JWT) IS returned for stateless verification.
|
|
255
255
|
* The JWT enables MCP-I servers to verify delegations without database lookups.
|
|
256
256
|
*/
|
|
257
257
|
exports.createDelegationResponseSchema = zod_1.z.object({
|
|
@@ -260,11 +260,11 @@ exports.createDelegationResponseSchema = zod_1.z.object({
|
|
|
260
260
|
user_id: zod_1.z.string().optional(),
|
|
261
261
|
user_identifier: zod_1.z.string().optional(),
|
|
262
262
|
scopes: zod_1.z.array(zod_1.z.string()),
|
|
263
|
-
status: zod_1.z.enum(['active', 'expired', 'revoked']), // Matches
|
|
263
|
+
status: zod_1.z.enum(['active', 'expired', 'revoked']), // Matches Checkpoint's actual API behavior
|
|
264
264
|
issued_at: zod_1.z.string().datetime(),
|
|
265
|
-
expires_at: zod_1.z.string().datetime().nullable().optional(), //
|
|
265
|
+
expires_at: zod_1.z.string().datetime().nullable().optional(), // Checkpoint allows null values
|
|
266
266
|
created_at: zod_1.z.string().datetime(),
|
|
267
|
-
// JWT for stateless verification (added in
|
|
267
|
+
// JWT for stateless verification (added in Checkpoint v2.x)
|
|
268
268
|
delegation_token: zod_1.z.string().optional(),
|
|
269
269
|
token_type: zod_1.z.string().optional(), // "Bearer"
|
|
270
270
|
expires_in: zod_1.z.number().int().positive().optional(), // Seconds until token expiry
|
|
@@ -272,7 +272,7 @@ exports.createDelegationResponseSchema = zod_1.z.object({
|
|
|
272
272
|
/**
|
|
273
273
|
* Wrapped creation response schema
|
|
274
274
|
*/
|
|
275
|
-
exports.createDelegationAPIResponseSchema = (0, exports.
|
|
275
|
+
exports.createDelegationAPIResponseSchema = (0, exports.checkpointAPIResponseSchema)(exports.createDelegationResponseSchema);
|
|
276
276
|
/**
|
|
277
277
|
* Revoke delegation request schema
|
|
278
278
|
*/
|
|
@@ -290,7 +290,7 @@ exports.revokeDelegationResponseSchema = zod_1.z.object({
|
|
|
290
290
|
/**
|
|
291
291
|
* Wrapped revocation response schema
|
|
292
292
|
*/
|
|
293
|
-
exports.revokeDelegationAPIResponseSchema = (0, exports.
|
|
293
|
+
exports.revokeDelegationAPIResponseSchema = (0, exports.checkpointAPIResponseSchema)(exports.revokeDelegationResponseSchema);
|
|
294
294
|
// ============================================================================
|
|
295
295
|
// Session Registration Schemas
|
|
296
296
|
// ============================================================================
|
|
@@ -337,4 +337,4 @@ exports.registerSessionResponseSchema = zod_1.z.object({
|
|
|
337
337
|
/**
|
|
338
338
|
* Wrapped session registration response schema
|
|
339
339
|
*/
|
|
340
|
-
exports.registerSessionAPIResponseSchema = (0, exports.
|
|
340
|
+
exports.registerSessionAPIResponseSchema = (0, exports.checkpointAPIResponseSchema)(exports.registerSessionResponseSchema);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Checkpoint/Bouncer API Type Definitions
|
|
3
3
|
*
|
|
4
|
-
* TypeScript interfaces matching the
|
|
5
|
-
* These types ensure parity between xmcp-i clients and the
|
|
4
|
+
* TypeScript interfaces matching the Checkpoint dashboard API contract.
|
|
5
|
+
* These types ensure parity between xmcp-i clients and the Checkpoint service.
|
|
6
6
|
*
|
|
7
|
-
* @package @kya-os/contracts/
|
|
7
|
+
* @package @kya-os/contracts/checkpoint-api
|
|
8
8
|
*/
|
|
9
9
|
import type { DetachedProof } from "../proof/index.js";
|
|
10
10
|
import type { DelegationRecord } from "../delegation/index.js";
|
|
11
11
|
/**
|
|
12
|
-
* Standard
|
|
12
|
+
* Standard Checkpoint API response wrapper
|
|
13
13
|
*/
|
|
14
|
-
export interface
|
|
14
|
+
export interface CheckpointAPIResponse<T> {
|
|
15
15
|
success: boolean;
|
|
16
16
|
data: T;
|
|
17
17
|
metadata?: {
|
|
@@ -20,16 +20,16 @@ export interface AgentShieldAPIResponse<T> {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Standard
|
|
24
|
-
* (Use
|
|
23
|
+
* Standard Checkpoint API error response structure
|
|
24
|
+
* (Use CheckpointAPIError class for runtime errors)
|
|
25
25
|
*/
|
|
26
|
-
export interface
|
|
26
|
+
export interface CheckpointAPIErrorResponse {
|
|
27
27
|
code: string;
|
|
28
28
|
message: string;
|
|
29
29
|
details?: Record<string, unknown>;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* Tool Call Context (
|
|
32
|
+
* Tool Call Context (Checkpoint Extension to MCP-I)
|
|
33
33
|
*
|
|
34
34
|
* Optional plaintext context for dashboard enrichment.
|
|
35
35
|
* Links to MCP-I proof via scopeId.
|
|
@@ -72,11 +72,11 @@ export interface ConsentEventContext {
|
|
|
72
72
|
export interface ProofSubmissionRequest {
|
|
73
73
|
/** Delegation ID (nullable, optional - null if no delegation context) */
|
|
74
74
|
delegation_id?: string | null;
|
|
75
|
-
/** Session ID for grouping proofs (
|
|
75
|
+
/** Session ID for grouping proofs (Checkpoint session ID, may differ from MCP-I sessionId) */
|
|
76
76
|
session_id: string;
|
|
77
77
|
/** Array of proofs to submit */
|
|
78
78
|
proofs: DetachedProof[];
|
|
79
|
-
/**
|
|
79
|
+
/** Checkpoint extension: Optional context for dashboard enrichment */
|
|
80
80
|
context?: {
|
|
81
81
|
toolCalls?: ToolCallContext[];
|
|
82
82
|
consentEvents?: ConsentEventContext[];
|
|
@@ -114,7 +114,7 @@ export interface VerifyDelegationRequest {
|
|
|
114
114
|
/**
|
|
115
115
|
* User DID for user-scoped delegation verification (RECOMMENDED)
|
|
116
116
|
*
|
|
117
|
-
* When provided,
|
|
117
|
+
* When provided, Checkpoint validates that the delegation belongs to this specific user.
|
|
118
118
|
* This prevents cross-user delegation leakage where User B could use User A's delegation.
|
|
119
119
|
*
|
|
120
120
|
* Without user_did, verification relies on delegation_token alone which may not provide
|
|
@@ -167,18 +167,18 @@ export interface VerifyDelegationResponse {
|
|
|
167
167
|
delegation?: DelegationRecord;
|
|
168
168
|
delegation_id?: string;
|
|
169
169
|
credential?: DelegationCredential;
|
|
170
|
-
error?:
|
|
170
|
+
error?: CheckpointAPIErrorResponse;
|
|
171
171
|
reason?: string;
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
174
|
-
* Wrapped verification response (
|
|
174
|
+
* Wrapped verification response (Checkpoint wraps in success/data)
|
|
175
175
|
*/
|
|
176
|
-
export type VerifyDelegationAPIResponse =
|
|
176
|
+
export type VerifyDelegationAPIResponse = CheckpointAPIResponse<VerifyDelegationResponse>;
|
|
177
177
|
/**
|
|
178
|
-
*
|
|
178
|
+
* Checkpoint API tool protection format for a single tool
|
|
179
179
|
* This is the API-specific format, not the MCP-I spec type
|
|
180
180
|
*/
|
|
181
|
-
export interface
|
|
181
|
+
export interface CheckpointToolProtection {
|
|
182
182
|
scopes: string[];
|
|
183
183
|
requires_delegation?: boolean;
|
|
184
184
|
requiresDelegation?: boolean;
|
|
@@ -190,7 +190,7 @@ export interface AgentShieldToolProtection {
|
|
|
190
190
|
*/
|
|
191
191
|
export interface ToolProtectionConfigResponse {
|
|
192
192
|
agent_did: string;
|
|
193
|
-
tools: Record<string,
|
|
193
|
+
tools: Record<string, CheckpointToolProtection>;
|
|
194
194
|
reputation_threshold?: number;
|
|
195
195
|
denied_agents?: string[];
|
|
196
196
|
crisp_budget?: {
|
|
@@ -203,12 +203,12 @@ export interface ToolProtectionConfigResponse {
|
|
|
203
203
|
/**
|
|
204
204
|
* Wrapped config response
|
|
205
205
|
*/
|
|
206
|
-
export type ToolProtectionConfigAPIResponse =
|
|
206
|
+
export type ToolProtectionConfigAPIResponse = CheckpointAPIResponse<ToolProtectionConfigResponse>;
|
|
207
207
|
/**
|
|
208
208
|
* Request body for creating a delegation
|
|
209
209
|
* POST /api/v1/bouncer/delegations
|
|
210
210
|
*
|
|
211
|
-
* Note:
|
|
211
|
+
* Note: Checkpoint API accepts a simplified format, not the full DelegationRecord.
|
|
212
212
|
* The API accepts: agent_did, scopes, expires_in_days, expires_at, session_id, project_id, user_identifier, custom_fields
|
|
213
213
|
*
|
|
214
214
|
* IMPORTANT: expires_in_days and expires_at are mutually exclusive - use one or the other, not both.
|
|
@@ -249,7 +249,7 @@ export interface CreateDelegationResponse {
|
|
|
249
249
|
/**
|
|
250
250
|
* Wrapped creation response
|
|
251
251
|
*/
|
|
252
|
-
export type CreateDelegationAPIResponse =
|
|
252
|
+
export type CreateDelegationAPIResponse = CheckpointAPIResponse<CreateDelegationResponse>;
|
|
253
253
|
/**
|
|
254
254
|
* Request body for revoking a delegation
|
|
255
255
|
* POST /api/v1/bouncer/delegations/{id}/revoke
|
|
@@ -268,7 +268,7 @@ export interface RevokeDelegationResponse {
|
|
|
268
268
|
/**
|
|
269
269
|
* Wrapped revocation response
|
|
270
270
|
*/
|
|
271
|
-
export type RevokeDelegationAPIResponse =
|
|
271
|
+
export type RevokeDelegationAPIResponse = CheckpointAPIResponse<RevokeDelegationResponse>;
|
|
272
272
|
/**
|
|
273
273
|
* MCP Client information from the initialize message
|
|
274
274
|
*/
|
|
@@ -306,7 +306,7 @@ export interface RegisterSessionRequest {
|
|
|
306
306
|
agent_did: string;
|
|
307
307
|
/** Human-readable agent name for dashboard display (optional) */
|
|
308
308
|
agent_name?: string;
|
|
309
|
-
/**
|
|
309
|
+
/** Checkpoint project ID */
|
|
310
310
|
project_id: string;
|
|
311
311
|
/** Unix timestamp in milliseconds when session was created */
|
|
312
312
|
created_at: number;
|
|
@@ -333,11 +333,11 @@ export interface RegisterSessionResponse {
|
|
|
333
333
|
/**
|
|
334
334
|
* Wrapped session registration response
|
|
335
335
|
*/
|
|
336
|
-
export type RegisterSessionAPIResponse =
|
|
336
|
+
export type RegisterSessionAPIResponse = CheckpointAPIResponse<RegisterSessionResponse>;
|
|
337
337
|
/**
|
|
338
|
-
*
|
|
338
|
+
* Checkpoint API error class
|
|
339
339
|
*/
|
|
340
|
-
export declare class
|
|
340
|
+
export declare class CheckpointAPIError extends Error {
|
|
341
341
|
readonly code: string;
|
|
342
342
|
readonly details?: Record<string, unknown> | undefined;
|
|
343
343
|
constructor(code: string, message: string, details?: Record<string, unknown> | undefined);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Checkpoint/Bouncer API Type Definitions
|
|
4
|
+
*
|
|
5
|
+
* TypeScript interfaces matching the Checkpoint dashboard API contract.
|
|
6
|
+
* These types ensure parity between xmcp-i clients and the Checkpoint service.
|
|
7
|
+
*
|
|
8
|
+
* @package @kya-os/contracts/checkpoint-api
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.CheckpointAPIError = void 0;
|
|
12
|
+
// ============================================================================
|
|
13
|
+
// Error Types
|
|
14
|
+
// ============================================================================
|
|
15
|
+
/**
|
|
16
|
+
* Checkpoint API error class
|
|
17
|
+
*/
|
|
18
|
+
class CheckpointAPIError extends Error {
|
|
19
|
+
constructor(code, message, details) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.code = code;
|
|
22
|
+
this.details = details;
|
|
23
|
+
this.name = "CheckpointAPIError";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.CheckpointAPIError = CheckpointAPIError;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Compute Process Contracts
|
|
3
3
|
*
|
|
4
|
-
* Schemas for the @kya-os/compute <->
|
|
4
|
+
* Schemas for the @kya-os/compute <-> Checkpoint API communication.
|
|
5
5
|
* These define the heartbeat protocol, config bundle format,
|
|
6
6
|
* and control server status frames.
|
|
7
7
|
*
|
|
@@ -101,7 +101,7 @@ export declare const UpdateVersionCommandSchema: z.ZodObject<{
|
|
|
101
101
|
};
|
|
102
102
|
}>;
|
|
103
103
|
/**
|
|
104
|
-
* Command that
|
|
104
|
+
* Command that Checkpoint can send to the compute process
|
|
105
105
|
* via the heartbeat response.
|
|
106
106
|
*
|
|
107
107
|
* Discriminated union by `type` field:
|
|
@@ -149,7 +149,7 @@ export declare const ComputeCommandSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
149
149
|
}>]>;
|
|
150
150
|
export type ComputeCommand = z.infer<typeof ComputeCommandSchema>;
|
|
151
151
|
/**
|
|
152
|
-
* Heartbeat response from
|
|
152
|
+
* Heartbeat response from Checkpoint.
|
|
153
153
|
* Returned by: POST /api/v1/molti/agents/{did}/heartbeat
|
|
154
154
|
*/
|
|
155
155
|
export declare const HeartbeatResponseSchema: z.ZodObject<{
|
|
@@ -230,7 +230,7 @@ export declare const HeartbeatResponseSchema: z.ZodObject<{
|
|
|
230
230
|
}>;
|
|
231
231
|
export type HeartbeatResponse = z.infer<typeof HeartbeatResponseSchema>;
|
|
232
232
|
/**
|
|
233
|
-
* Config bundle returned by
|
|
233
|
+
* Config bundle returned by Checkpoint to the compute process.
|
|
234
234
|
* Fetched on boot: GET /api/v1/molti/deployments/{did}/config-bundle
|
|
235
235
|
* Auth: X-Heartbeat-Token header (for managed) or X-API-Key (for BYOK)
|
|
236
236
|
*
|
|
@@ -338,7 +338,7 @@ export declare const ConfigBundleSchema: z.ZodObject<{
|
|
|
338
338
|
/**
|
|
339
339
|
* Optional base URL override. When set, OpenClaw routes all provider
|
|
340
340
|
* traffic through this URL instead of the provider's default endpoint.
|
|
341
|
-
* Used by managed deployments where
|
|
341
|
+
* Used by managed deployments where Checkpoint issues a per-deployment
|
|
342
342
|
* gateway token and proxies to the upstream provider with budget tracking.
|
|
343
343
|
*/
|
|
344
344
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Compute Process Contracts
|
|
4
4
|
*
|
|
5
|
-
* Schemas for the @kya-os/compute <->
|
|
5
|
+
* Schemas for the @kya-os/compute <-> Checkpoint API communication.
|
|
6
6
|
* These define the heartbeat protocol, config bundle format,
|
|
7
7
|
* and control server status frames.
|
|
8
8
|
*
|
|
@@ -76,7 +76,7 @@ exports.UpdateVersionCommandSchema = zod_1.z
|
|
|
76
76
|
})
|
|
77
77
|
.strict();
|
|
78
78
|
/**
|
|
79
|
-
* Command that
|
|
79
|
+
* Command that Checkpoint can send to the compute process
|
|
80
80
|
* via the heartbeat response.
|
|
81
81
|
*
|
|
82
82
|
* Discriminated union by `type` field:
|
|
@@ -90,7 +90,7 @@ exports.ComputeCommandSchema = zod_1.z.discriminatedUnion("type", [
|
|
|
90
90
|
exports.UpdateVersionCommandSchema,
|
|
91
91
|
]);
|
|
92
92
|
/**
|
|
93
|
-
* Heartbeat response from
|
|
93
|
+
* Heartbeat response from Checkpoint.
|
|
94
94
|
* Returned by: POST /api/v1/molti/agents/{did}/heartbeat
|
|
95
95
|
*/
|
|
96
96
|
exports.HeartbeatResponseSchema = zod_1.z.object({
|
|
@@ -105,7 +105,7 @@ exports.HeartbeatResponseSchema = zod_1.z.object({
|
|
|
105
105
|
// Config Bundle
|
|
106
106
|
// ============================================================================
|
|
107
107
|
/**
|
|
108
|
-
* Config bundle returned by
|
|
108
|
+
* Config bundle returned by Checkpoint to the compute process.
|
|
109
109
|
* Fetched on boot: GET /api/v1/molti/deployments/{did}/config-bundle
|
|
110
110
|
* Auth: X-Heartbeat-Token header (for managed) or X-API-Key (for BYOK)
|
|
111
111
|
*
|
|
@@ -164,7 +164,7 @@ exports.ConfigBundleSchema = zod_1.z.object({
|
|
|
164
164
|
/**
|
|
165
165
|
* Optional base URL override. When set, OpenClaw routes all provider
|
|
166
166
|
* traffic through this URL instead of the provider's default endpoint.
|
|
167
|
-
* Used by managed deployments where
|
|
167
|
+
* Used by managed deployments where Checkpoint issues a per-deployment
|
|
168
168
|
* gateway token and proxies to the upstream provider with budget tracking.
|
|
169
169
|
*/
|
|
170
170
|
baseUrl: zod_1.z.string().url().optional(),
|
|
@@ -30,6 +30,8 @@ function buildBaseConfig(env) {
|
|
|
30
30
|
environment,
|
|
31
31
|
devIdentityPath: '.mcpi/identity.json'
|
|
32
32
|
},
|
|
33
|
+
// Destinations and the verifier keep the former type name 'agentshield':
|
|
34
|
+
// runtimes released before 'checkpoint' existed read this config too.
|
|
33
35
|
proofing: {
|
|
34
36
|
enabled: true,
|
|
35
37
|
batchQueue: {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/**
|
|
10
10
|
* Delegation verifier types
|
|
11
11
|
*/
|
|
12
|
-
export type DelegationVerifierType = 'agentshield' | 'kta' | 'memory' | 'cloudflare-kv' | 'redis' | 'dynamodb' | 'custom';
|
|
12
|
+
export type DelegationVerifierType = 'checkpoint' | 'agentshield' | 'kta' | 'memory' | 'cloudflare-kv' | 'redis' | 'dynamodb' | 'custom';
|
|
13
13
|
/**
|
|
14
14
|
* Delegation verifier configuration
|
|
15
15
|
* Controls how delegations are verified and cached
|
|
@@ -357,7 +357,7 @@ export interface OAuthProvider {
|
|
|
357
357
|
scopes?: string[];
|
|
358
358
|
/** Default scopes to request */
|
|
359
359
|
defaultScopes?: string[];
|
|
360
|
-
/** Whether provider uses proxy mode (via
|
|
360
|
+
/** Whether provider uses proxy mode (via Checkpoint) */
|
|
361
361
|
proxyMode?: boolean;
|
|
362
362
|
/** Custom OAuth parameters to include in authorization URL (e.g., audience, acr_values) */
|
|
363
363
|
customParams?: Record<string, string>;
|
|
@@ -382,11 +382,11 @@ export interface OAuthProvider {
|
|
|
382
382
|
/**
|
|
383
383
|
* OAuth Configuration
|
|
384
384
|
*
|
|
385
|
-
* Configuration for OAuth providers fetched from
|
|
385
|
+
* Configuration for OAuth providers fetched from Checkpoint API.
|
|
386
386
|
* Contains all available providers for a project.
|
|
387
387
|
*
|
|
388
388
|
* The `configuredProvider` field indicates which provider (if any) has been
|
|
389
|
-
* explicitly configured in the
|
|
389
|
+
* explicitly configured in the Checkpoint dashboard for this project.
|
|
390
390
|
* Phase 2+ requires tools to explicitly specify oauthProvider.
|
|
391
391
|
*/
|
|
392
392
|
export interface OAuthConfig {
|
|
@@ -394,7 +394,7 @@ export interface OAuthConfig {
|
|
|
394
394
|
providers: Record<string, OAuthProvider>;
|
|
395
395
|
/**
|
|
396
396
|
* The explicitly configured OAuth provider for this project.
|
|
397
|
-
* Null if no provider has been configured in
|
|
397
|
+
* Null if no provider has been configured in Checkpoint dashboard.
|
|
398
398
|
* Used by ProviderResolver as fallback when tool doesn't specify oauthProvider.
|
|
399
399
|
*/
|
|
400
400
|
configuredProvider?: string | null;
|
|
@@ -24,7 +24,7 @@ export type { ToolExecutionContext, VerifiedDelegation, } from "./tool-context.j
|
|
|
24
24
|
export type IdentityConfig = RuntimeIdentityConfig;
|
|
25
25
|
export { ProofingConfig, ProofBatchQueueConfig, ProofDestination, ProofDestinationType, } from "./proofing.js";
|
|
26
26
|
export { DelegationConfig, DelegationVerifierConfig, DelegationVerifierType, AuthorizationConfig, DelegationRecord, } from "./delegation.js";
|
|
27
|
-
export { ToolProtection, ToolProtectionMap, ToolProtectionSourceConfig, ToolProtectionSourceType, ToolProtectionServiceConfig, DelegationRequiredErrorData, ToolProtectionResponse, } from "./tool-protection.js";
|
|
27
|
+
export { ToolProtection, ToolProtectionMap, ToolProtectionSourceConfig, ToolProtectionCheckpointConfig, ToolProtectionSourceType, ToolProtectionServiceConfig, DelegationRequiredErrorData, ToolProtectionResponse, } from "./tool-protection.js";
|
|
28
28
|
export { buildBaseConfig } from "./builder.js";
|
|
29
29
|
export { DELEGATION_DENIAL_CODES, type DelegationDenialCode, } from "./delegation-denial.js";
|
|
30
30
|
export { TOOL_REFUSAL_META_KEY, markToolRefusal, readToolRefusal, type ToolRefusal, type ToolRefusalMeta, } from "./tool-refusal.js";
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
/**
|
|
10
10
|
* Proof destination types
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
/** `'agentshield'` is the former name of `'checkpoint'` and selects the same destination. */
|
|
13
|
+
export type ProofDestinationType = 'checkpoint' | 'agentshield' | 'kta' | 'custom';
|
|
13
14
|
/**
|
|
14
15
|
* Proof destination configuration
|
|
15
16
|
* Defines where proofs should be submitted
|
|
@@ -80,7 +81,7 @@ export interface ProofBatchQueueConfig {
|
|
|
80
81
|
* Proofing configuration (platform-agnostic)
|
|
81
82
|
*
|
|
82
83
|
* Controls proof generation, batching, and submission to external services
|
|
83
|
-
* like
|
|
84
|
+
* like Checkpoint or Know That AI (KTA).
|
|
84
85
|
*/
|
|
85
86
|
export interface ProofingConfig {
|
|
86
87
|
/**
|