@kindgi/client 0.1.4 → 0.1.5-rc.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 +5 -4
- package/dist/index.cjs +906 -418
- package/dist/index.d.cts +9856 -5971
- package/dist/index.d.ts +9856 -5971
- package/dist/index.js +905 -419
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -49,6 +49,8 @@ function classify(body, status) {
|
|
|
49
49
|
case "auth-revoked":
|
|
50
50
|
return { code: "auth", message, reason: "unauthenticated" };
|
|
51
51
|
case "permission-denied":
|
|
52
|
+
case "role-exceeds-principal":
|
|
53
|
+
case "key-project-mismatch":
|
|
52
54
|
return { code: "auth", message, reason: "forbidden" };
|
|
53
55
|
case "rate-limited":
|
|
54
56
|
case "rate-limit-exceeded":
|
|
@@ -77,11 +79,15 @@ function classify(body, status) {
|
|
|
77
79
|
case "token-not-found":
|
|
78
80
|
case "agent-version-not-found":
|
|
79
81
|
case "promotion-not-found":
|
|
82
|
+
case "principal-not-found":
|
|
83
|
+
case "service-account-not-found":
|
|
80
84
|
return notFound(code, message, details);
|
|
81
85
|
case "conflict":
|
|
82
86
|
case "already-terminal":
|
|
83
87
|
case "run-already-terminal":
|
|
84
88
|
case "idempotency-key-body-mismatch":
|
|
89
|
+
case "idempotency-key-in-flight":
|
|
90
|
+
case "idempotency-key-replay-withheld":
|
|
85
91
|
case "hitl-required":
|
|
86
92
|
case "agent-already-registered":
|
|
87
93
|
case "tool-already-registered":
|
|
@@ -113,8 +119,18 @@ function classify(body, status) {
|
|
|
113
119
|
case "gate-policy-scope-changed":
|
|
114
120
|
case "gate-policy-scope-unpinned":
|
|
115
121
|
case "gate-policy-needs-pin":
|
|
122
|
+
case "fact-changed":
|
|
123
|
+
case "legal-hold":
|
|
124
|
+
case "erasure-in-progress":
|
|
116
125
|
case "gate-policy-descendant-unpinned":
|
|
117
|
-
|
|
126
|
+
case "service-account-name-taken":
|
|
127
|
+
case "service-account-unregistered":
|
|
128
|
+
case "identity-user-email-taken":
|
|
129
|
+
case "last-tenant-admin":
|
|
130
|
+
case "seed-user-admin":
|
|
131
|
+
case "identity-user-unregister-refused":
|
|
132
|
+
case "identity-user-unregistered":
|
|
133
|
+
return conflict(code, message, details);
|
|
118
134
|
case "invalid-request":
|
|
119
135
|
case "validation-failed":
|
|
120
136
|
case "unknown-field":
|
|
@@ -128,8 +144,11 @@ function classify(body, status) {
|
|
|
128
144
|
case "unknown-effect":
|
|
129
145
|
case "invalid-guardrail":
|
|
130
146
|
case "invalid-provider":
|
|
147
|
+
case "guardrail-config-invalid":
|
|
148
|
+
case "provider-config-invalid":
|
|
131
149
|
case "supervisor-header-missing":
|
|
132
150
|
case "scope-invalid":
|
|
151
|
+
case "artifact-too-large":
|
|
133
152
|
return invalidRequest(message, obj, details);
|
|
134
153
|
case "guardrail-violation":
|
|
135
154
|
return {
|
|
@@ -142,13 +161,24 @@ function classify(body, status) {
|
|
|
142
161
|
return byStatus(status, code, message, obj, details);
|
|
143
162
|
}
|
|
144
163
|
}
|
|
164
|
+
function conflict(code, message, details) {
|
|
165
|
+
return {
|
|
166
|
+
code: "conflict",
|
|
167
|
+
message,
|
|
168
|
+
reason: code,
|
|
169
|
+
...details !== void 0 ? { fields: details } : {}
|
|
170
|
+
};
|
|
171
|
+
}
|
|
145
172
|
function byStatus(status, code, message, obj, details) {
|
|
146
173
|
switch (status) {
|
|
147
174
|
case 404:
|
|
148
175
|
case 410:
|
|
149
176
|
return notFound(code, message, details);
|
|
150
177
|
case 400:
|
|
178
|
+
case 413:
|
|
151
179
|
return invalidRequest(message, obj, details);
|
|
180
|
+
case 409:
|
|
181
|
+
return conflict(code, message, details);
|
|
152
182
|
case 401:
|
|
153
183
|
return { code: "auth", message, reason: "unauthenticated" };
|
|
154
184
|
case 403:
|
|
@@ -212,10 +242,10 @@ function readStringField(obj, ...keys) {
|
|
|
212
242
|
function asRecord(value) {
|
|
213
243
|
return value !== null && typeof value === "object" ? value : void 0;
|
|
214
244
|
}
|
|
215
|
-
function readGuardrailViolations(
|
|
216
|
-
if (!Array.isArray(
|
|
245
|
+
function readGuardrailViolations(raw2) {
|
|
246
|
+
if (!Array.isArray(raw2)) return [];
|
|
217
247
|
const out = [];
|
|
218
|
-
for (const entry of
|
|
248
|
+
for (const entry of raw2) {
|
|
219
249
|
const v = asRecord(entry);
|
|
220
250
|
if (v === void 0 || typeof v.guardrailId !== "string") continue;
|
|
221
251
|
const reason = asRecord(v.result)?.reason;
|
|
@@ -228,10 +258,10 @@ function readGuardrailViolations(raw) {
|
|
|
228
258
|
}
|
|
229
259
|
return out;
|
|
230
260
|
}
|
|
231
|
-
function readEvaluationErrors(
|
|
232
|
-
if (!Array.isArray(
|
|
261
|
+
function readEvaluationErrors(raw2) {
|
|
262
|
+
if (!Array.isArray(raw2)) return [];
|
|
233
263
|
const out = [];
|
|
234
|
-
for (const entry of
|
|
264
|
+
for (const entry of raw2) {
|
|
235
265
|
const e = asRecord(entry);
|
|
236
266
|
if (e === void 0 || typeof e.guardrailId !== "string") continue;
|
|
237
267
|
out.push({
|
|
@@ -332,9 +362,9 @@ async function* parseSseStream(body) {
|
|
|
332
362
|
newlineIdx = buffer.indexOf("\n");
|
|
333
363
|
if (line === "") {
|
|
334
364
|
if (dataLines.length > 0) {
|
|
335
|
-
const
|
|
365
|
+
const raw2 = dataLines.join("\n");
|
|
336
366
|
try {
|
|
337
|
-
const data = JSON.parse(
|
|
367
|
+
const data = JSON.parse(raw2);
|
|
338
368
|
yield { event: eventName, data, ...eventId !== void 0 ? { id: eventId } : {} };
|
|
339
369
|
} catch {
|
|
340
370
|
}
|
|
@@ -472,12 +502,12 @@ function makeAdaptersClient(transport) {
|
|
|
472
502
|
|
|
473
503
|
// src/resources/agents.ts
|
|
474
504
|
function makeAgentsClient(transport) {
|
|
475
|
-
const
|
|
505
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
476
506
|
const versions = {
|
|
477
507
|
async list(agentId, filter) {
|
|
478
508
|
return transport.request({
|
|
479
509
|
method: "GET",
|
|
480
|
-
path: `/v1/agents/${
|
|
510
|
+
path: `/v1/agents/${seg2(agentId)}/versions`,
|
|
481
511
|
query: {
|
|
482
512
|
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
483
513
|
...filter?.cursor !== void 0 && { cursor: filter.cursor }
|
|
@@ -487,13 +517,13 @@ function makeAgentsClient(transport) {
|
|
|
487
517
|
async get(agentId, version) {
|
|
488
518
|
return transport.request({
|
|
489
519
|
method: "GET",
|
|
490
|
-
path: `/v1/agents/${
|
|
520
|
+
path: `/v1/agents/${seg2(agentId)}/versions/${seg2(version)}`
|
|
491
521
|
});
|
|
492
522
|
},
|
|
493
523
|
async unregister(agentId, version, options) {
|
|
494
524
|
return transport.request({
|
|
495
525
|
method: "POST",
|
|
496
|
-
path: `/v1/agents/${
|
|
526
|
+
path: `/v1/agents/${seg2(agentId)}/versions/${seg2(version)}/unregister`,
|
|
497
527
|
...options?.idempotencyKey !== void 0 && {
|
|
498
528
|
idempotencyKey: options.idempotencyKey
|
|
499
529
|
}
|
|
@@ -502,7 +532,7 @@ function makeAgentsClient(transport) {
|
|
|
502
532
|
async derive(agentId, input, options) {
|
|
503
533
|
return transport.request({
|
|
504
534
|
method: "POST",
|
|
505
|
-
path: `/v1/agents/${
|
|
535
|
+
path: `/v1/agents/${seg2(agentId)}/versions`,
|
|
506
536
|
body: input,
|
|
507
537
|
...options?.idempotencyKey !== void 0 && {
|
|
508
538
|
idempotencyKey: options.idempotencyKey
|
|
@@ -512,7 +542,7 @@ function makeAgentsClient(transport) {
|
|
|
512
542
|
async reinstate(agentId, version, options) {
|
|
513
543
|
const wire = await transport.request({
|
|
514
544
|
method: "POST",
|
|
515
|
-
path: `/v1/agents/${
|
|
545
|
+
path: `/v1/agents/${seg2(agentId)}/versions/${seg2(version)}/reinstate`,
|
|
516
546
|
...options?.idempotencyKey !== void 0 && {
|
|
517
547
|
idempotencyKey: options.idempotencyKey
|
|
518
548
|
}
|
|
@@ -550,7 +580,7 @@ function makeAgentsClient(transport) {
|
|
|
550
580
|
async get(agentId) {
|
|
551
581
|
return transport.request({
|
|
552
582
|
method: "GET",
|
|
553
|
-
path: `/v1/agents/${
|
|
583
|
+
path: `/v1/agents/${seg2(agentId)}`
|
|
554
584
|
});
|
|
555
585
|
},
|
|
556
586
|
versions,
|
|
@@ -559,7 +589,7 @@ function makeAgentsClient(transport) {
|
|
|
559
589
|
async resolve(agentId, where) {
|
|
560
590
|
return transport.request({
|
|
561
591
|
method: "GET",
|
|
562
|
-
path: `/v1/agents/${
|
|
592
|
+
path: `/v1/agents/${seg2(agentId)}/live`,
|
|
563
593
|
query: {
|
|
564
594
|
...where?.projectId !== void 0 && { projectId: where.projectId },
|
|
565
595
|
...where?.segments !== void 0 && { segment: where.segments.map(segmentParam) }
|
|
@@ -569,13 +599,13 @@ function makeAgentsClient(transport) {
|
|
|
569
599
|
async list(agentId) {
|
|
570
600
|
return transport.request({
|
|
571
601
|
method: "GET",
|
|
572
|
-
path: `/v1/agents/${
|
|
602
|
+
path: `/v1/agents/${seg2(agentId)}/live-versions`
|
|
573
603
|
});
|
|
574
604
|
},
|
|
575
605
|
async rollback(agentId, input, options) {
|
|
576
606
|
return transport.request({
|
|
577
607
|
method: "POST",
|
|
578
|
-
path: `/v1/agents/${
|
|
608
|
+
path: `/v1/agents/${seg2(agentId)}/live/rollback`,
|
|
579
609
|
body: input,
|
|
580
610
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
581
611
|
});
|
|
@@ -583,7 +613,7 @@ function makeAgentsClient(transport) {
|
|
|
583
613
|
async unpin(agentId, input, options) {
|
|
584
614
|
return transport.request({
|
|
585
615
|
method: "POST",
|
|
586
|
-
path: `/v1/agents/${
|
|
616
|
+
path: `/v1/agents/${seg2(agentId)}/live/unpin`,
|
|
587
617
|
body: input,
|
|
588
618
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
589
619
|
});
|
|
@@ -593,7 +623,7 @@ function makeAgentsClient(transport) {
|
|
|
593
623
|
async create(agentId, input, options) {
|
|
594
624
|
return transport.request({
|
|
595
625
|
method: "POST",
|
|
596
|
-
path: `/v1/agents/${
|
|
626
|
+
path: `/v1/agents/${seg2(agentId)}/promotions`,
|
|
597
627
|
body: input,
|
|
598
628
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
599
629
|
});
|
|
@@ -601,14 +631,14 @@ function makeAgentsClient(transport) {
|
|
|
601
631
|
async check(agentId, input) {
|
|
602
632
|
return transport.request({
|
|
603
633
|
method: "POST",
|
|
604
|
-
path: `/v1/agents/${
|
|
634
|
+
path: `/v1/agents/${seg2(agentId)}/promotions/check`,
|
|
605
635
|
body: input
|
|
606
636
|
});
|
|
607
637
|
},
|
|
608
638
|
async list(agentId, filter) {
|
|
609
639
|
return transport.request({
|
|
610
640
|
method: "GET",
|
|
611
|
-
path: `/v1/agents/${
|
|
641
|
+
path: `/v1/agents/${seg2(agentId)}/promotions`,
|
|
612
642
|
query: {
|
|
613
643
|
...filter?.scope !== void 0 && scopeQuery(filter.scope),
|
|
614
644
|
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
@@ -619,7 +649,7 @@ function makeAgentsClient(transport) {
|
|
|
619
649
|
async get(agentId, promotionId) {
|
|
620
650
|
return transport.request({
|
|
621
651
|
method: "GET",
|
|
622
|
-
path: `/v1/agents/${
|
|
652
|
+
path: `/v1/agents/${seg2(agentId)}/promotions/${seg2(promotionId)}`
|
|
623
653
|
});
|
|
624
654
|
}
|
|
625
655
|
},
|
|
@@ -627,7 +657,7 @@ function makeAgentsClient(transport) {
|
|
|
627
657
|
async resolve(agentId, scope) {
|
|
628
658
|
return transport.request({
|
|
629
659
|
method: "GET",
|
|
630
|
-
path: `/v1/agents/${
|
|
660
|
+
path: `/v1/agents/${seg2(agentId)}/gate-policy`,
|
|
631
661
|
query: scopeQuery(scope)
|
|
632
662
|
});
|
|
633
663
|
}
|
|
@@ -682,6 +712,106 @@ function singleStatusQuery(method, status) {
|
|
|
682
712
|
throw new KindgiApiError(error);
|
|
683
713
|
}
|
|
684
714
|
|
|
715
|
+
// src/verify-export.ts
|
|
716
|
+
var ALGORITHMS = {
|
|
717
|
+
ed25519: { key: { name: "Ed25519" }, verify: { name: "Ed25519" } },
|
|
718
|
+
"ecdsa-p256-sha256": {
|
|
719
|
+
key: { name: "ECDSA", namedCurve: "P-256" },
|
|
720
|
+
verify: { name: "ECDSA", hash: "SHA-256" }
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
var SIGNED_EXPORT_ALGORITHMS = Object.keys(
|
|
724
|
+
ALGORITHMS
|
|
725
|
+
);
|
|
726
|
+
async function verifySignedExport(envelope, options = {}) {
|
|
727
|
+
const issues = [];
|
|
728
|
+
const checkedAgainst = options.trustedKeys !== void 0 ? "trusted-keys" : "its-own-key";
|
|
729
|
+
const fail = () => ({
|
|
730
|
+
valid: false,
|
|
731
|
+
issues,
|
|
732
|
+
checkedAgainst,
|
|
733
|
+
signingKeyId: envelope.signingKeyId
|
|
734
|
+
});
|
|
735
|
+
const algorithm = Object.hasOwn(ALGORITHMS, envelope.algorithm) ? ALGORITHMS[envelope.algorithm] : void 0;
|
|
736
|
+
if (algorithm === void 0) {
|
|
737
|
+
issues.push(
|
|
738
|
+
`algorithm "${envelope.algorithm}" isn't one this verifier knows (${SIGNED_EXPORT_ALGORITHMS.join(", ")}): a newer verifier may check it`
|
|
739
|
+
);
|
|
740
|
+
}
|
|
741
|
+
if (envelope.canonicalization !== "sorted-key-json") {
|
|
742
|
+
issues.push(`canonicalization "${envelope.canonicalization}" isn't sorted-key-json`);
|
|
743
|
+
}
|
|
744
|
+
if (options.trustedKeys !== void 0 && !options.trustedKeys.some((pem) => samePem(pem, envelope.publicKey))) {
|
|
745
|
+
issues.push(`it was signed with key "${envelope.signingKeyId}", which isn't one you trust`);
|
|
746
|
+
}
|
|
747
|
+
if (issues.length > 0 || algorithm === void 0) return fail();
|
|
748
|
+
let bytes;
|
|
749
|
+
let signed;
|
|
750
|
+
try {
|
|
751
|
+
bytes = fromBase64(envelope.bundle);
|
|
752
|
+
const key = await crypto.subtle.importKey(
|
|
753
|
+
"spki",
|
|
754
|
+
toArrayBuffer(fromPem(envelope.publicKey)),
|
|
755
|
+
algorithm.key,
|
|
756
|
+
false,
|
|
757
|
+
["verify"]
|
|
758
|
+
);
|
|
759
|
+
signed = await crypto.subtle.verify(
|
|
760
|
+
algorithm.verify,
|
|
761
|
+
key,
|
|
762
|
+
toArrayBuffer(fromBase64(envelope.signature)),
|
|
763
|
+
toArrayBuffer(bytes)
|
|
764
|
+
);
|
|
765
|
+
} catch (cause) {
|
|
766
|
+
issues.push(`it can't be checked: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
767
|
+
return fail();
|
|
768
|
+
}
|
|
769
|
+
if (!signed) {
|
|
770
|
+
issues.push(
|
|
771
|
+
"the signature doesn't match the bundle: it was changed, or signed with another key"
|
|
772
|
+
);
|
|
773
|
+
return fail();
|
|
774
|
+
}
|
|
775
|
+
const body = JSON.parse(new TextDecoder().decode(bytes));
|
|
776
|
+
const notes = [];
|
|
777
|
+
if (body.exportedAt !== void 0 && body.exportedAt !== envelope.exportedAt) {
|
|
778
|
+
if (!madeByKindgi014(envelope, body)) {
|
|
779
|
+
issues.push(
|
|
780
|
+
`the envelope's exportedAt (${envelope.exportedAt}) isn't the signed one (${String(body.exportedAt)})`
|
|
781
|
+
);
|
|
782
|
+
return fail();
|
|
783
|
+
}
|
|
784
|
+
notes.push(
|
|
785
|
+
`made by Kindgi 0.1.4, which stamped the envelope's exportedAt separately: the signed export time is ${String(body.exportedAt)} (the envelope says ${envelope.exportedAt})`
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
return {
|
|
789
|
+
valid: true,
|
|
790
|
+
checkedAgainst,
|
|
791
|
+
body,
|
|
792
|
+
signingKeyId: envelope.signingKeyId,
|
|
793
|
+
...notes.length > 0 && { notes }
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
function madeByKindgi014(envelope, body) {
|
|
797
|
+
return envelope.bundleSchemaVersion === 1 && body.bundleVersion === 1 && body.bundleSchemaVersion === void 0;
|
|
798
|
+
}
|
|
799
|
+
function samePem(a, b) {
|
|
800
|
+
return a.replace(/\s+/g, "") === b.replace(/\s+/g, "");
|
|
801
|
+
}
|
|
802
|
+
function fromPem(pem) {
|
|
803
|
+
return fromBase64(pem.replace(/-----(BEGIN|END) [A-Z ]+-----/g, "").replace(/\s+/g, ""));
|
|
804
|
+
}
|
|
805
|
+
function fromBase64(b64) {
|
|
806
|
+
const binary = atob(b64);
|
|
807
|
+
const out = new Uint8Array(binary.length);
|
|
808
|
+
for (let i = 0; i < binary.length; i += 1) out[i] = binary.charCodeAt(i);
|
|
809
|
+
return out;
|
|
810
|
+
}
|
|
811
|
+
function toArrayBuffer(bytes) {
|
|
812
|
+
return bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
|
|
813
|
+
}
|
|
814
|
+
|
|
685
815
|
// src/resources/approvals.ts
|
|
686
816
|
function makeApprovalsClient(transport) {
|
|
687
817
|
return {
|
|
@@ -803,7 +933,7 @@ function makeApprovalsClient(transport) {
|
|
|
803
933
|
method: "POST",
|
|
804
934
|
path: `/v1/approvals/${encodeURIComponent(input.approvalId)}/audit-bundle`,
|
|
805
935
|
body: {
|
|
806
|
-
signingKeyId: input.signingKeyId,
|
|
936
|
+
...input.signingKeyId !== void 0 && { signingKeyId: input.signingKeyId },
|
|
807
937
|
...input.includeMessages !== void 0 && {
|
|
808
938
|
includeMessages: input.includeMessages
|
|
809
939
|
}
|
|
@@ -827,26 +957,231 @@ function makeApprovalsClient(transport) {
|
|
|
827
957
|
)
|
|
828
958
|
);
|
|
829
959
|
},
|
|
830
|
-
async verify(
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
960
|
+
async verify(bundle, publicKey) {
|
|
961
|
+
const checked = await verifySignedExport(bundle, { trustedKeys: [publicKey] });
|
|
962
|
+
return checked.valid ? { valid: true } : { valid: false, issues: checked.issues ?? [] };
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
// src/transport.ts
|
|
969
|
+
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
970
|
+
var MUTATING = /* @__PURE__ */ new Set([
|
|
971
|
+
"POST",
|
|
972
|
+
"PUT",
|
|
973
|
+
"PATCH",
|
|
974
|
+
"DELETE"
|
|
975
|
+
]);
|
|
976
|
+
function createTransport(options) {
|
|
977
|
+
const apiUrl = options.apiUrl.replace(/\/+$/u, "");
|
|
978
|
+
const fetchImpl = options.fetch ?? fetch;
|
|
979
|
+
const clientTimeoutMs = checkedTimeoutMs(
|
|
980
|
+
options.timeoutMs ?? DEFAULT_TIMEOUT_MS,
|
|
981
|
+
"ClientOptions.timeoutMs"
|
|
982
|
+
);
|
|
983
|
+
return {
|
|
984
|
+
apiUrl,
|
|
985
|
+
fetchImpl,
|
|
986
|
+
authHeaders() {
|
|
987
|
+
return { Authorization: `Bearer ${authTokenFor(options.auth)}` };
|
|
988
|
+
},
|
|
989
|
+
async request(input) {
|
|
990
|
+
const url = buildUrl(apiUrl, input.path, input.query);
|
|
991
|
+
const headers = buildHeaders(input, options.auth);
|
|
992
|
+
const timeoutMs = input.timeoutMs === void 0 ? clientTimeoutMs : checkedTimeoutMs(input.timeoutMs, "timeoutMs");
|
|
993
|
+
const ac = new AbortController();
|
|
994
|
+
let timedOut = false;
|
|
995
|
+
const timer = setTimeout(() => {
|
|
996
|
+
timedOut = true;
|
|
997
|
+
ac.abort(new Error("timeout"));
|
|
998
|
+
}, timeoutMs);
|
|
999
|
+
let response;
|
|
1000
|
+
try {
|
|
1001
|
+
response = await fetchImpl(url, {
|
|
1002
|
+
method: input.method,
|
|
1003
|
+
headers,
|
|
1004
|
+
...input.body !== void 0 && { body: JSON.stringify(input.body) },
|
|
1005
|
+
signal: ac.signal
|
|
1006
|
+
});
|
|
1007
|
+
} catch (cause) {
|
|
1008
|
+
clearTimeout(timer);
|
|
1009
|
+
const err = timedOut ? {
|
|
1010
|
+
code: "network",
|
|
1011
|
+
message: `No answer within ${seconds(timeoutMs)}, the client's timeout (timeoutMs).`,
|
|
1012
|
+
cause,
|
|
1013
|
+
timeoutMs
|
|
1014
|
+
} : {
|
|
1015
|
+
code: "network",
|
|
1016
|
+
message: cause instanceof Error ? cause.message : "network request failed",
|
|
1017
|
+
cause
|
|
1018
|
+
};
|
|
1019
|
+
throw new KindgiApiError(err);
|
|
1020
|
+
}
|
|
1021
|
+
clearTimeout(timer);
|
|
1022
|
+
if (response.ok) {
|
|
1023
|
+
if (input.discardResponse === true || response.status === 204) {
|
|
1024
|
+
try {
|
|
1025
|
+
await response.arrayBuffer();
|
|
1026
|
+
} catch {
|
|
1027
|
+
}
|
|
1028
|
+
return void 0;
|
|
1029
|
+
}
|
|
1030
|
+
try {
|
|
1031
|
+
return await response.json();
|
|
1032
|
+
} catch (cause) {
|
|
1033
|
+
const err = {
|
|
1034
|
+
code: "network",
|
|
1035
|
+
message: "Response body was not valid JSON",
|
|
1036
|
+
cause
|
|
1037
|
+
};
|
|
1038
|
+
throw new KindgiApiError(err);
|
|
1039
|
+
}
|
|
837
1040
|
}
|
|
1041
|
+
let body;
|
|
1042
|
+
try {
|
|
1043
|
+
body = await response.json();
|
|
1044
|
+
} catch {
|
|
1045
|
+
body = void 0;
|
|
1046
|
+
}
|
|
1047
|
+
throw new KindgiApiError(
|
|
1048
|
+
fromWire(unwrapErrorEnvelope(body, response.status), response.status)
|
|
1049
|
+
);
|
|
838
1050
|
}
|
|
839
1051
|
};
|
|
840
1052
|
}
|
|
1053
|
+
function checkedTimeoutMs(value, name) {
|
|
1054
|
+
if (!Number.isFinite(value) || value <= 0) {
|
|
1055
|
+
throw new TypeError(`${name} must be a positive number of milliseconds. Got ${String(value)}.`);
|
|
1056
|
+
}
|
|
1057
|
+
return value;
|
|
1058
|
+
}
|
|
1059
|
+
function seconds(ms) {
|
|
1060
|
+
return `${ms / 1e3} s`;
|
|
1061
|
+
}
|
|
1062
|
+
function buildUrl(apiUrl, path, query) {
|
|
1063
|
+
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
|
|
1064
|
+
const base = `${apiUrl}${normalizedPath}`;
|
|
1065
|
+
if (query === void 0) return base;
|
|
1066
|
+
const params = [];
|
|
1067
|
+
for (const key of Object.keys(query)) {
|
|
1068
|
+
const value = query[key];
|
|
1069
|
+
if (value === void 0) continue;
|
|
1070
|
+
const values = typeof value === "object" ? value : [String(value)];
|
|
1071
|
+
for (const v of values) params.push(`${encodeURIComponent(key)}=${encodeURIComponent(v)}`);
|
|
1072
|
+
}
|
|
1073
|
+
return params.length === 0 ? base : `${base}?${params.join("&")}`;
|
|
1074
|
+
}
|
|
1075
|
+
function buildHeaders(input, auth) {
|
|
1076
|
+
const headers = {
|
|
1077
|
+
Accept: "application/json",
|
|
1078
|
+
Authorization: `Bearer ${authTokenFor(auth)}`
|
|
1079
|
+
};
|
|
1080
|
+
if (input.body !== void 0) {
|
|
1081
|
+
headers["Content-Type"] = "application/json; charset=utf-8";
|
|
1082
|
+
}
|
|
1083
|
+
if (input.idempotencyKey !== void 0 && MUTATING.has(input.method)) {
|
|
1084
|
+
headers["Idempotency-Key"] = input.idempotencyKey;
|
|
1085
|
+
}
|
|
1086
|
+
if (input.headers !== void 0) {
|
|
1087
|
+
for (const key of Object.keys(input.headers)) {
|
|
1088
|
+
headers[key] = input.headers[key];
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
return headers;
|
|
1092
|
+
}
|
|
1093
|
+
function authTokenFor(auth) {
|
|
1094
|
+
if (auth.kind === "apiToken") return auth.token;
|
|
1095
|
+
return auth.accessToken;
|
|
1096
|
+
}
|
|
1097
|
+
function unwrapErrorEnvelope(body, status) {
|
|
1098
|
+
if (body !== null && typeof body === "object" && !Array.isArray(body)) {
|
|
1099
|
+
const inner = body.error;
|
|
1100
|
+
if (inner !== null && typeof inner === "object" && !Array.isArray(inner)) {
|
|
1101
|
+
return inner;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
return { code: "unknown", message: `HTTP ${status} without recognizable error envelope` };
|
|
1105
|
+
}
|
|
841
1106
|
|
|
842
1107
|
// src/resources/artifacts.ts
|
|
1108
|
+
async function raw(transport, req) {
|
|
1109
|
+
const res = await transport.fetchImpl(`${transport.apiUrl}${req.path}`, {
|
|
1110
|
+
method: req.method,
|
|
1111
|
+
headers: { ...transport.authHeaders(), ...req.headers ?? {} },
|
|
1112
|
+
...req.body !== void 0 && { body: req.body }
|
|
1113
|
+
});
|
|
1114
|
+
if (!res.ok) {
|
|
1115
|
+
const body = req.method === "HEAD" ? {
|
|
1116
|
+
error: {
|
|
1117
|
+
code: res.status === 404 ? "blob-not-found" : "unknown",
|
|
1118
|
+
message: res.status === 404 ? "No such artifact, or it's in a project you can't read" : `HTTP ${res.status}`
|
|
1119
|
+
}
|
|
1120
|
+
} : await res.json().catch(() => null);
|
|
1121
|
+
throw new KindgiApiError(fromWire(unwrapErrorEnvelope(body, res.status), res.status));
|
|
1122
|
+
}
|
|
1123
|
+
return res;
|
|
1124
|
+
}
|
|
1125
|
+
function headOf(blobId, res) {
|
|
1126
|
+
const name = res.headers.get("X-Kindgi-Blob-Name");
|
|
1127
|
+
return {
|
|
1128
|
+
blobId,
|
|
1129
|
+
name: name !== null ? decodeURIComponent(name) : "",
|
|
1130
|
+
contentType: res.headers.get("Content-Type") ?? "application/octet-stream",
|
|
1131
|
+
size: Number(res.headers.get("Content-Length") ?? "0"),
|
|
1132
|
+
hash: res.headers.get("X-Kindgi-Blob-Hash") ?? ""
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
function uploadForm(input) {
|
|
1136
|
+
const contentType = input.contentType ?? (input.body instanceof Blob && input.body.type !== "" ? input.body.type : "application/octet-stream");
|
|
1137
|
+
const blob = input.body instanceof Blob ? input.body : new Blob([input.body], {
|
|
1138
|
+
type: contentType
|
|
1139
|
+
});
|
|
1140
|
+
const form = new FormData();
|
|
1141
|
+
form.set("file", blob, input.name ?? "file");
|
|
1142
|
+
form.set("contentType", contentType);
|
|
1143
|
+
if (input.name !== void 0) form.set("name", input.name);
|
|
1144
|
+
if (input.tags !== void 0) form.set("tags", JSON.stringify(input.tags));
|
|
1145
|
+
if (input.ownerRunId !== void 0) form.set("ownerRunId", input.ownerRunId);
|
|
1146
|
+
if (input.projectId !== void 0) form.set("projectId", input.projectId);
|
|
1147
|
+
if (input.expectedHash !== void 0) form.set("expectedHash", input.expectedHash);
|
|
1148
|
+
return form;
|
|
1149
|
+
}
|
|
843
1150
|
function makeArtifactsClient(transport) {
|
|
844
1151
|
return {
|
|
1152
|
+
async upload(input, options) {
|
|
1153
|
+
const res = await raw(transport, {
|
|
1154
|
+
method: "POST",
|
|
1155
|
+
path: "/v1/artifacts",
|
|
1156
|
+
body: uploadForm(input),
|
|
1157
|
+
...options?.idempotencyKey !== void 0 && {
|
|
1158
|
+
headers: { "Idempotency-Key": options.idempotencyKey }
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
return await res.json();
|
|
1162
|
+
},
|
|
1163
|
+
async download(blobId) {
|
|
1164
|
+
const res = await raw(transport, {
|
|
1165
|
+
method: "GET",
|
|
1166
|
+
path: `/v1/artifacts/${encodeURIComponent(blobId)}`
|
|
1167
|
+
});
|
|
1168
|
+
return {
|
|
1169
|
+
...headOf(blobId, res),
|
|
1170
|
+
body: res.body ?? new Response("").body
|
|
1171
|
+
};
|
|
1172
|
+
},
|
|
1173
|
+
async head(blobId) {
|
|
1174
|
+
const res = await raw(transport, {
|
|
1175
|
+
method: "HEAD",
|
|
1176
|
+
path: `/v1/artifacts/${encodeURIComponent(blobId)}`
|
|
1177
|
+
});
|
|
1178
|
+
return headOf(blobId, res);
|
|
1179
|
+
},
|
|
845
1180
|
async put(_input) {
|
|
846
1181
|
throw new KindgiApiError(
|
|
847
1182
|
notYetWired(
|
|
848
1183
|
"artifacts.put",
|
|
849
|
-
"
|
|
1184
|
+
"no route takes a content-addressed BlobRef: use artifacts.upload, which returns the artifact metadata"
|
|
850
1185
|
)
|
|
851
1186
|
);
|
|
852
1187
|
},
|
|
@@ -854,7 +1189,7 @@ function makeArtifactsClient(transport) {
|
|
|
854
1189
|
throw new KindgiApiError(
|
|
855
1190
|
notYetWired(
|
|
856
1191
|
"artifacts.get",
|
|
857
|
-
"
|
|
1192
|
+
"no route takes a content-addressed BlobRef: use artifacts.download(blobId)"
|
|
858
1193
|
)
|
|
859
1194
|
);
|
|
860
1195
|
},
|
|
@@ -868,7 +1203,8 @@ function makeArtifactsClient(transport) {
|
|
|
868
1203
|
...filter?.ownerRunId !== void 0 && {
|
|
869
1204
|
ownerRunId: filter.ownerRunId
|
|
870
1205
|
},
|
|
871
|
-
...filter?.contentType !== void 0 && { contentType: filter.contentType }
|
|
1206
|
+
...filter?.contentType !== void 0 && { contentType: filter.contentType },
|
|
1207
|
+
...filter?.projectId !== void 0 && { projectId: filter.projectId }
|
|
872
1208
|
}
|
|
873
1209
|
});
|
|
874
1210
|
return listPage(page);
|
|
@@ -930,7 +1266,7 @@ function makeAuditClient(transport) {
|
|
|
930
1266
|
|
|
931
1267
|
// src/resources/auth.ts
|
|
932
1268
|
function makeAuthClient(transport) {
|
|
933
|
-
const
|
|
1269
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
934
1270
|
return {
|
|
935
1271
|
providers: {
|
|
936
1272
|
async list() {
|
|
@@ -951,15 +1287,43 @@ function makeAuthClient(transport) {
|
|
|
951
1287
|
async unregister(providerId, options) {
|
|
952
1288
|
return transport.request({
|
|
953
1289
|
method: "POST",
|
|
954
|
-
path: `/v1/auth/providers/${
|
|
1290
|
+
path: `/v1/auth/providers/${seg2(providerId)}/unregister`,
|
|
1291
|
+
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
1292
|
+
});
|
|
1293
|
+
},
|
|
1294
|
+
async get(providerId) {
|
|
1295
|
+
return transport.request({
|
|
1296
|
+
method: "GET",
|
|
1297
|
+
path: `/v1/auth/providers/${seg2(providerId)}`
|
|
1298
|
+
});
|
|
1299
|
+
},
|
|
1300
|
+
async signIn(providerId, input) {
|
|
1301
|
+
return transport.request({
|
|
1302
|
+
method: "GET",
|
|
1303
|
+
path: `/v1/auth/providers/${seg2(providerId)}/sign-in`,
|
|
1304
|
+
...input?.kind !== void 0 && { query: { kind: input.kind } }
|
|
1305
|
+
});
|
|
1306
|
+
},
|
|
1307
|
+
async update(providerId, changes, options) {
|
|
1308
|
+
return transport.request({
|
|
1309
|
+
method: "PATCH",
|
|
1310
|
+
path: `/v1/auth/providers/${seg2(providerId)}`,
|
|
1311
|
+
body: changes,
|
|
955
1312
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
956
1313
|
});
|
|
957
1314
|
}
|
|
958
1315
|
},
|
|
1316
|
+
async signInOptions(input) {
|
|
1317
|
+
return transport.request({
|
|
1318
|
+
method: "GET",
|
|
1319
|
+
path: "/v1/auth/sign-in-options",
|
|
1320
|
+
...input?.email !== void 0 && { query: { email: input.email } }
|
|
1321
|
+
});
|
|
1322
|
+
},
|
|
959
1323
|
async login(providerId, input, options) {
|
|
960
1324
|
return transport.request({
|
|
961
1325
|
method: "POST",
|
|
962
|
-
path: `/v1/auth/login/${
|
|
1326
|
+
path: `/v1/auth/login/${seg2(providerId)}`,
|
|
963
1327
|
...input !== void 0 && { body: input },
|
|
964
1328
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
965
1329
|
});
|
|
@@ -967,7 +1331,7 @@ function makeAuthClient(transport) {
|
|
|
967
1331
|
async callback(providerId, input) {
|
|
968
1332
|
return transport.request({
|
|
969
1333
|
method: "POST",
|
|
970
|
-
path: `/v1/auth/callback/${
|
|
1334
|
+
path: `/v1/auth/callback/${seg2(providerId)}`,
|
|
971
1335
|
body: input
|
|
972
1336
|
});
|
|
973
1337
|
},
|
|
@@ -978,6 +1342,12 @@ function makeAuthClient(transport) {
|
|
|
978
1342
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
979
1343
|
});
|
|
980
1344
|
},
|
|
1345
|
+
async tokenSignIn() {
|
|
1346
|
+
return transport.request({
|
|
1347
|
+
method: "POST",
|
|
1348
|
+
path: "/v1/auth/token-sign-in"
|
|
1349
|
+
});
|
|
1350
|
+
},
|
|
981
1351
|
async logout(options) {
|
|
982
1352
|
return transport.request({
|
|
983
1353
|
method: "POST",
|
|
@@ -990,7 +1360,7 @@ function makeAuthClient(transport) {
|
|
|
990
1360
|
|
|
991
1361
|
// src/resources/blocks.ts
|
|
992
1362
|
function makeBlocksClient(transport) {
|
|
993
|
-
const
|
|
1363
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
994
1364
|
return {
|
|
995
1365
|
async publish(input, options) {
|
|
996
1366
|
return transport.request({
|
|
@@ -1014,13 +1384,13 @@ function makeBlocksClient(transport) {
|
|
|
1014
1384
|
});
|
|
1015
1385
|
},
|
|
1016
1386
|
async get(blockId) {
|
|
1017
|
-
return transport.request({ method: "GET", path: `/v1/blocks/${
|
|
1387
|
+
return transport.request({ method: "GET", path: `/v1/blocks/${seg2(blockId)}` });
|
|
1018
1388
|
},
|
|
1019
1389
|
versions: {
|
|
1020
1390
|
async list(blockId, filter) {
|
|
1021
1391
|
return transport.request({
|
|
1022
1392
|
method: "GET",
|
|
1023
|
-
path: `/v1/blocks/${
|
|
1393
|
+
path: `/v1/blocks/${seg2(blockId)}/versions`,
|
|
1024
1394
|
query: {
|
|
1025
1395
|
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
1026
1396
|
...filter?.cursor !== void 0 && { cursor: filter.cursor },
|
|
@@ -1033,20 +1403,20 @@ function makeBlocksClient(transport) {
|
|
|
1033
1403
|
async get(blockId, version) {
|
|
1034
1404
|
return transport.request({
|
|
1035
1405
|
method: "GET",
|
|
1036
|
-
path: `/v1/blocks/${
|
|
1406
|
+
path: `/v1/blocks/${seg2(blockId)}/versions/${seg2(version)}`
|
|
1037
1407
|
});
|
|
1038
1408
|
},
|
|
1039
1409
|
async unregister(blockId, version, options) {
|
|
1040
1410
|
return transport.request({
|
|
1041
1411
|
method: "POST",
|
|
1042
|
-
path: `/v1/blocks/${
|
|
1412
|
+
path: `/v1/blocks/${seg2(blockId)}/versions/${seg2(version)}/unregister`,
|
|
1043
1413
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
1044
1414
|
});
|
|
1045
1415
|
},
|
|
1046
1416
|
async reinstate(blockId, version, options) {
|
|
1047
1417
|
return transport.request({
|
|
1048
1418
|
method: "POST",
|
|
1049
|
-
path: `/v1/blocks/${
|
|
1419
|
+
path: `/v1/blocks/${seg2(blockId)}/versions/${seg2(version)}/reinstate`,
|
|
1050
1420
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
1051
1421
|
});
|
|
1052
1422
|
}
|
|
@@ -1182,7 +1552,8 @@ function makeComplianceClient(transport) {
|
|
|
1182
1552
|
body: input,
|
|
1183
1553
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
1184
1554
|
});
|
|
1185
|
-
}
|
|
1555
|
+
},
|
|
1556
|
+
verify: (bundle, publicKey) => verifySignedExport(bundle, { trustedKeys: [publicKey] })
|
|
1186
1557
|
}
|
|
1187
1558
|
};
|
|
1188
1559
|
}
|
|
@@ -1240,6 +1611,16 @@ function makeConversationsClient(transport) {
|
|
|
1240
1611
|
}
|
|
1241
1612
|
});
|
|
1242
1613
|
},
|
|
1614
|
+
async unregister(id, options) {
|
|
1615
|
+
return transport.request({
|
|
1616
|
+
method: "POST",
|
|
1617
|
+
path: `/v1/conversations/${encodeURIComponent(id)}/unregister`,
|
|
1618
|
+
body: {},
|
|
1619
|
+
...options?.idempotencyKey !== void 0 && {
|
|
1620
|
+
idempotencyKey: options.idempotencyKey
|
|
1621
|
+
}
|
|
1622
|
+
});
|
|
1623
|
+
},
|
|
1243
1624
|
async messages(id, filter) {
|
|
1244
1625
|
const page = await transport.request({
|
|
1245
1626
|
method: "GET",
|
|
@@ -1450,9 +1831,9 @@ function makeEnvClient(transport) {
|
|
|
1450
1831
|
});
|
|
1451
1832
|
return { kind: "ok", record };
|
|
1452
1833
|
} catch (err) {
|
|
1453
|
-
const
|
|
1454
|
-
if (
|
|
1455
|
-
return { kind: "revision-conflict", currentRevision:
|
|
1834
|
+
const conflict2 = tryReadRevisionConflict(err);
|
|
1835
|
+
if (conflict2 !== null) {
|
|
1836
|
+
return { kind: "revision-conflict", currentRevision: conflict2 };
|
|
1456
1837
|
}
|
|
1457
1838
|
throw err;
|
|
1458
1839
|
}
|
|
@@ -1505,12 +1886,12 @@ function comparisonOf(run) {
|
|
|
1505
1886
|
return run.kind === "judged" && result?.summary !== void 0 && Array.isArray(result.perCase) ? result : void 0;
|
|
1506
1887
|
}
|
|
1507
1888
|
function makeEvalRunsClient(transport) {
|
|
1508
|
-
const
|
|
1889
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
1509
1890
|
return {
|
|
1510
1891
|
async start(suiteId, input, options) {
|
|
1511
1892
|
return transport.request({
|
|
1512
1893
|
method: "POST",
|
|
1513
|
-
path: `/v1/eval-suites/${
|
|
1894
|
+
path: `/v1/eval-suites/${seg2(suiteId)}/runs`,
|
|
1514
1895
|
body: { ...input, projectId: options.projectId },
|
|
1515
1896
|
...options.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
1516
1897
|
});
|
|
@@ -1531,17 +1912,17 @@ function makeEvalRunsClient(transport) {
|
|
|
1531
1912
|
async get(runId) {
|
|
1532
1913
|
return transport.request({
|
|
1533
1914
|
method: "GET",
|
|
1534
|
-
path: `/v1/eval-runs/${
|
|
1915
|
+
path: `/v1/eval-runs/${seg2(runId)}`
|
|
1535
1916
|
});
|
|
1536
1917
|
},
|
|
1537
1918
|
async cancel(runId) {
|
|
1538
1919
|
return transport.request({
|
|
1539
1920
|
method: "POST",
|
|
1540
|
-
path: `/v1/eval-runs/${
|
|
1921
|
+
path: `/v1/eval-runs/${seg2(runId)}/cancel`
|
|
1541
1922
|
});
|
|
1542
1923
|
},
|
|
1543
1924
|
events(runId, options) {
|
|
1544
|
-
const url = `${transport.apiUrl}/v1/eval-runs/${
|
|
1925
|
+
const url = `${transport.apiUrl}/v1/eval-runs/${seg2(runId)}/events`;
|
|
1545
1926
|
const source = readSse({
|
|
1546
1927
|
url,
|
|
1547
1928
|
headers: transport.authHeaders(),
|
|
@@ -1561,7 +1942,7 @@ function makeEvalRunsClient(transport) {
|
|
|
1561
1942
|
|
|
1562
1943
|
// src/resources/eval-suites.ts
|
|
1563
1944
|
function makeEvalSuitesClient(transport) {
|
|
1564
|
-
const
|
|
1945
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
1565
1946
|
return {
|
|
1566
1947
|
async publish(input, options) {
|
|
1567
1948
|
return transport.request({
|
|
@@ -1589,13 +1970,13 @@ function makeEvalSuitesClient(transport) {
|
|
|
1589
1970
|
async get(suiteId) {
|
|
1590
1971
|
return transport.request({
|
|
1591
1972
|
method: "GET",
|
|
1592
|
-
path: `/v1/eval-suites/${
|
|
1973
|
+
path: `/v1/eval-suites/${seg2(suiteId)}`
|
|
1593
1974
|
});
|
|
1594
1975
|
},
|
|
1595
1976
|
async buildFromJudgments(suiteId, input, options) {
|
|
1596
1977
|
return transport.request({
|
|
1597
1978
|
method: "POST",
|
|
1598
|
-
path: `/v1/eval-suites/${
|
|
1979
|
+
path: `/v1/eval-suites/${seg2(suiteId)}/versions/from-judgments`,
|
|
1599
1980
|
body: input,
|
|
1600
1981
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
1601
1982
|
});
|
|
@@ -1603,7 +1984,7 @@ function makeEvalSuitesClient(transport) {
|
|
|
1603
1984
|
async listCases(suiteId, version, query) {
|
|
1604
1985
|
return transport.request({
|
|
1605
1986
|
method: "GET",
|
|
1606
|
-
path: `/v1/eval-suites/${
|
|
1987
|
+
path: `/v1/eval-suites/${seg2(suiteId)}/versions/${seg2(version)}/cases`,
|
|
1607
1988
|
query: {
|
|
1608
1989
|
...query?.limit !== void 0 && { limit: query.limit },
|
|
1609
1990
|
...query?.cursor !== void 0 && { cursor: query.cursor }
|
|
@@ -1614,7 +1995,7 @@ function makeEvalSuitesClient(transport) {
|
|
|
1614
1995
|
async list(suiteId, filter) {
|
|
1615
1996
|
return transport.request({
|
|
1616
1997
|
method: "GET",
|
|
1617
|
-
path: `/v1/eval-suites/${
|
|
1998
|
+
path: `/v1/eval-suites/${seg2(suiteId)}/versions`,
|
|
1618
1999
|
query: {
|
|
1619
2000
|
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
1620
2001
|
...filter?.cursor !== void 0 && { cursor: filter.cursor }
|
|
@@ -1624,20 +2005,20 @@ function makeEvalSuitesClient(transport) {
|
|
|
1624
2005
|
async get(suiteId, version) {
|
|
1625
2006
|
return transport.request({
|
|
1626
2007
|
method: "GET",
|
|
1627
|
-
path: `/v1/eval-suites/${
|
|
2008
|
+
path: `/v1/eval-suites/${seg2(suiteId)}/versions/${seg2(version)}`
|
|
1628
2009
|
});
|
|
1629
2010
|
},
|
|
1630
2011
|
async unregister(suiteId, version, options) {
|
|
1631
2012
|
return transport.request({
|
|
1632
2013
|
method: "POST",
|
|
1633
|
-
path: `/v1/eval-suites/${
|
|
2014
|
+
path: `/v1/eval-suites/${seg2(suiteId)}/versions/${seg2(version)}/unregister`,
|
|
1634
2015
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
1635
2016
|
});
|
|
1636
2017
|
},
|
|
1637
2018
|
async reinstate(suiteId, version, options) {
|
|
1638
2019
|
return transport.request({
|
|
1639
2020
|
method: "POST",
|
|
1640
|
-
path: `/v1/eval-suites/${
|
|
2021
|
+
path: `/v1/eval-suites/${seg2(suiteId)}/versions/${seg2(version)}/reinstate`,
|
|
1641
2022
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
1642
2023
|
});
|
|
1643
2024
|
}
|
|
@@ -1760,7 +2141,7 @@ function makeEventsClient(_transport) {
|
|
|
1760
2141
|
new KindgiApiError(
|
|
1761
2142
|
notYetWired(
|
|
1762
2143
|
"events.stream",
|
|
1763
|
-
"no GET /v1/events/subscriptions/{id}/stream route on the API \u2014 subscription-scoped SSE surface has not landed (runtime event bus is live; SDK-side SSE reader is ready via readSse; HTTP route pending). Use client.runs.
|
|
2144
|
+
"no GET /v1/events/subscriptions/{id}/stream route on the API \u2014 subscription-scoped SSE surface has not landed (runtime event bus is live; SDK-side SSE reader is ready via readSse; HTTP route pending). Use client.runs.follow(runId) for live run-scoped events."
|
|
1764
2145
|
)
|
|
1765
2146
|
)
|
|
1766
2147
|
);
|
|
@@ -1781,6 +2162,19 @@ function makeEventsClient(_transport) {
|
|
|
1781
2162
|
};
|
|
1782
2163
|
}
|
|
1783
2164
|
|
|
2165
|
+
// src/resources/export-signing-keys.ts
|
|
2166
|
+
function makeExportSigningKeysClient(transport) {
|
|
2167
|
+
return {
|
|
2168
|
+
async list() {
|
|
2169
|
+
const page = await transport.request({
|
|
2170
|
+
method: "GET",
|
|
2171
|
+
path: "/v1/export-signing-keys"
|
|
2172
|
+
});
|
|
2173
|
+
return page.data;
|
|
2174
|
+
}
|
|
2175
|
+
};
|
|
2176
|
+
}
|
|
2177
|
+
|
|
1784
2178
|
// src/resources/flows.ts
|
|
1785
2179
|
function makeFlowsClient(transport) {
|
|
1786
2180
|
const list = async (id, filter) => {
|
|
@@ -1887,7 +2281,7 @@ function makeFlowsClient(transport) {
|
|
|
1887
2281
|
|
|
1888
2282
|
// src/resources/gate-policies.ts
|
|
1889
2283
|
function makeGatePoliciesClient(transport) {
|
|
1890
|
-
const
|
|
2284
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
1891
2285
|
return {
|
|
1892
2286
|
async list(filter) {
|
|
1893
2287
|
return transport.request({
|
|
@@ -1904,7 +2298,7 @@ function makeGatePoliciesClient(transport) {
|
|
|
1904
2298
|
async get(policyId) {
|
|
1905
2299
|
return transport.request({
|
|
1906
2300
|
method: "GET",
|
|
1907
|
-
path: `/v1/gate-policies/${
|
|
2301
|
+
path: `/v1/gate-policies/${seg2(policyId)}`
|
|
1908
2302
|
});
|
|
1909
2303
|
},
|
|
1910
2304
|
async publish(input, options) {
|
|
@@ -1919,25 +2313,25 @@ function makeGatePoliciesClient(transport) {
|
|
|
1919
2313
|
async list(policyId) {
|
|
1920
2314
|
return transport.request({
|
|
1921
2315
|
method: "GET",
|
|
1922
|
-
path: `/v1/gate-policies/${
|
|
2316
|
+
path: `/v1/gate-policies/${seg2(policyId)}/versions`
|
|
1923
2317
|
});
|
|
1924
2318
|
},
|
|
1925
2319
|
async get(policyId, version) {
|
|
1926
2320
|
return transport.request({
|
|
1927
2321
|
method: "GET",
|
|
1928
|
-
path: `/v1/gate-policies/${
|
|
2322
|
+
path: `/v1/gate-policies/${seg2(policyId)}/versions/${seg2(version)}`
|
|
1929
2323
|
});
|
|
1930
2324
|
},
|
|
1931
2325
|
async unregister(policyId, version) {
|
|
1932
2326
|
return transport.request({
|
|
1933
2327
|
method: "POST",
|
|
1934
|
-
path: `/v1/gate-policies/${
|
|
2328
|
+
path: `/v1/gate-policies/${seg2(policyId)}/versions/${seg2(version)}/unregister`
|
|
1935
2329
|
});
|
|
1936
2330
|
},
|
|
1937
2331
|
async reinstate(policyId, version) {
|
|
1938
2332
|
return transport.request({
|
|
1939
2333
|
method: "POST",
|
|
1940
|
-
path: `/v1/gate-policies/${
|
|
2334
|
+
path: `/v1/gate-policies/${seg2(policyId)}/versions/${seg2(version)}/reinstate`
|
|
1941
2335
|
});
|
|
1942
2336
|
}
|
|
1943
2337
|
}
|
|
@@ -2010,7 +2404,7 @@ function makeGuardrailsClient(transport) {
|
|
|
2010
2404
|
|
|
2011
2405
|
// src/resources/identity.ts
|
|
2012
2406
|
function makeIdentityClient(transport) {
|
|
2013
|
-
const
|
|
2407
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
2014
2408
|
return {
|
|
2015
2409
|
async whoami() {
|
|
2016
2410
|
return transport.request({
|
|
@@ -2033,19 +2427,19 @@ function makeIdentityClient(transport) {
|
|
|
2033
2427
|
async get(userId) {
|
|
2034
2428
|
return transport.request({
|
|
2035
2429
|
method: "GET",
|
|
2036
|
-
path: `/v1/identity/users/${
|
|
2430
|
+
path: `/v1/identity/users/${seg2(userId)}`
|
|
2037
2431
|
});
|
|
2038
2432
|
},
|
|
2039
2433
|
async listSessions(userId) {
|
|
2040
2434
|
return transport.request({
|
|
2041
2435
|
method: "GET",
|
|
2042
|
-
path: `/v1/identity/users/${
|
|
2436
|
+
path: `/v1/identity/users/${seg2(userId)}/sessions`
|
|
2043
2437
|
});
|
|
2044
2438
|
},
|
|
2045
2439
|
async revokeSessions(userId, options) {
|
|
2046
2440
|
return transport.request({
|
|
2047
2441
|
method: "POST",
|
|
2048
|
-
path: `/v1/identity/users/${
|
|
2442
|
+
path: `/v1/identity/users/${seg2(userId)}/revoke-sessions`,
|
|
2049
2443
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
2050
2444
|
});
|
|
2051
2445
|
}
|
|
@@ -2053,31 +2447,63 @@ function makeIdentityClient(transport) {
|
|
|
2053
2447
|
};
|
|
2054
2448
|
}
|
|
2055
2449
|
|
|
2056
|
-
// src/resources/
|
|
2057
|
-
function
|
|
2058
|
-
if (scope.kind === "tenant") return { scopeKind: "tenant" };
|
|
2059
|
-
if (scope.kind === "project") return { scopeKind: "project", projectId: scope.projectId };
|
|
2060
|
-
return { scopeKind: "agent", projectId: scope.projectId, agentId: scope.agentId };
|
|
2061
|
-
}
|
|
2062
|
-
function makeJudgeClassesClient(transport) {
|
|
2063
|
-
const withKey = (options) => options?.idempotencyKey !== void 0 ? { idempotencyKey: options.idempotencyKey } : {};
|
|
2450
|
+
// src/resources/improvement-passes.ts
|
|
2451
|
+
function makeImprovementPassesClient(transport) {
|
|
2064
2452
|
return {
|
|
2065
|
-
async
|
|
2066
|
-
return transport.request({
|
|
2067
|
-
method: "POST",
|
|
2068
|
-
path: "/v1/judge-classes",
|
|
2069
|
-
body: input,
|
|
2070
|
-
...withKey(options)
|
|
2071
|
-
});
|
|
2072
|
-
},
|
|
2073
|
-
async list(filter) {
|
|
2453
|
+
async list(input = {}) {
|
|
2074
2454
|
const page = await transport.request({
|
|
2075
2455
|
method: "GET",
|
|
2076
|
-
path: "/v1/
|
|
2456
|
+
path: "/v1/improvement-passes",
|
|
2077
2457
|
query: {
|
|
2078
|
-
...
|
|
2079
|
-
...
|
|
2080
|
-
...
|
|
2458
|
+
...input.limit !== void 0 && { limit: input.limit },
|
|
2459
|
+
...input.cursor !== void 0 && { cursor: input.cursor },
|
|
2460
|
+
...input.agentId !== void 0 && { agentId: input.agentId }
|
|
2461
|
+
}
|
|
2462
|
+
});
|
|
2463
|
+
return listPage(page);
|
|
2464
|
+
},
|
|
2465
|
+
async get(passId) {
|
|
2466
|
+
return transport.request({
|
|
2467
|
+
method: "GET",
|
|
2468
|
+
path: `/v1/improvement-passes/${encodeURIComponent(passId)}`
|
|
2469
|
+
});
|
|
2470
|
+
},
|
|
2471
|
+
async cancel(passId, input = {}) {
|
|
2472
|
+
return transport.request({
|
|
2473
|
+
method: "POST",
|
|
2474
|
+
path: `/v1/improvement-passes/${encodeURIComponent(passId)}/cancel`,
|
|
2475
|
+
body: {},
|
|
2476
|
+
...input.idempotencyKey !== void 0 && { idempotencyKey: input.idempotencyKey }
|
|
2477
|
+
});
|
|
2478
|
+
}
|
|
2479
|
+
};
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
// src/resources/judge-classes.ts
|
|
2483
|
+
function scopeQuery2(scope) {
|
|
2484
|
+
if (scope.kind === "tenant") return { scopeKind: "tenant" };
|
|
2485
|
+
if (scope.kind === "project") return { scopeKind: "project", projectId: scope.projectId };
|
|
2486
|
+
return { scopeKind: "agent", projectId: scope.projectId, agentId: scope.agentId };
|
|
2487
|
+
}
|
|
2488
|
+
function makeJudgeClassesClient(transport) {
|
|
2489
|
+
const withKey = (options) => options?.idempotencyKey !== void 0 ? { idempotencyKey: options.idempotencyKey } : {};
|
|
2490
|
+
return {
|
|
2491
|
+
async create(input, options) {
|
|
2492
|
+
return transport.request({
|
|
2493
|
+
method: "POST",
|
|
2494
|
+
path: "/v1/judge-classes",
|
|
2495
|
+
body: input,
|
|
2496
|
+
...withKey(options)
|
|
2497
|
+
});
|
|
2498
|
+
},
|
|
2499
|
+
async list(filter) {
|
|
2500
|
+
const page = await transport.request({
|
|
2501
|
+
method: "GET",
|
|
2502
|
+
path: "/v1/judge-classes",
|
|
2503
|
+
query: {
|
|
2504
|
+
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
2505
|
+
...filter?.cursor !== void 0 && { cursor: filter.cursor },
|
|
2506
|
+
...filter?.scope !== void 0 && scopeQuery2(filter.scope)
|
|
2081
2507
|
}
|
|
2082
2508
|
});
|
|
2083
2509
|
return listPage(page);
|
|
@@ -2280,6 +2706,56 @@ function makeMcpClient(transport) {
|
|
|
2280
2706
|
// src/resources/memory.ts
|
|
2281
2707
|
function makeMemoryClient(transport) {
|
|
2282
2708
|
return {
|
|
2709
|
+
erasures: {
|
|
2710
|
+
async create(selector, options) {
|
|
2711
|
+
return transport.request({
|
|
2712
|
+
method: "POST",
|
|
2713
|
+
path: "/v1/memory/erasures",
|
|
2714
|
+
body: selector,
|
|
2715
|
+
...options?.idempotencyKey !== void 0 && {
|
|
2716
|
+
idempotencyKey: options.idempotencyKey
|
|
2717
|
+
}
|
|
2718
|
+
});
|
|
2719
|
+
},
|
|
2720
|
+
async get(id) {
|
|
2721
|
+
return transport.request({
|
|
2722
|
+
method: "GET",
|
|
2723
|
+
path: `/v1/memory/erasures/${encodeURIComponent(id)}`
|
|
2724
|
+
});
|
|
2725
|
+
},
|
|
2726
|
+
async list(filter) {
|
|
2727
|
+
const page = await transport.request({
|
|
2728
|
+
method: "GET",
|
|
2729
|
+
path: "/v1/memory/erasures",
|
|
2730
|
+
query: {
|
|
2731
|
+
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
2732
|
+
...filter?.cursor !== void 0 && { cursor: filter.cursor }
|
|
2733
|
+
}
|
|
2734
|
+
});
|
|
2735
|
+
return listPage(page);
|
|
2736
|
+
},
|
|
2737
|
+
async resume(id, options) {
|
|
2738
|
+
return transport.request({
|
|
2739
|
+
method: "POST",
|
|
2740
|
+
path: `/v1/memory/erasures/${encodeURIComponent(id)}/resume`,
|
|
2741
|
+
body: { ...options?.force === true && { force: true } }
|
|
2742
|
+
});
|
|
2743
|
+
},
|
|
2744
|
+
async export() {
|
|
2745
|
+
const ledger = await transport.request({ method: "GET", path: "/v1/memory/erasures/export" });
|
|
2746
|
+
return ledger.data;
|
|
2747
|
+
},
|
|
2748
|
+
async replay(erasures, options) {
|
|
2749
|
+
return transport.request({
|
|
2750
|
+
method: "POST",
|
|
2751
|
+
path: "/v1/memory/erasures/replay",
|
|
2752
|
+
body: { erasures },
|
|
2753
|
+
...options?.idempotencyKey !== void 0 && {
|
|
2754
|
+
idempotencyKey: options.idempotencyKey
|
|
2755
|
+
}
|
|
2756
|
+
});
|
|
2757
|
+
}
|
|
2758
|
+
},
|
|
2283
2759
|
facts: {
|
|
2284
2760
|
async write(input, options) {
|
|
2285
2761
|
return transport.request({
|
|
@@ -2291,11 +2767,22 @@ function makeMemoryClient(transport) {
|
|
|
2291
2767
|
}
|
|
2292
2768
|
});
|
|
2293
2769
|
},
|
|
2294
|
-
async read(id) {
|
|
2770
|
+
async read(id, options) {
|
|
2295
2771
|
return transport.request({
|
|
2296
2772
|
method: "GET",
|
|
2297
|
-
path: `/v1/memory/facts/${encodeURIComponent(id)}
|
|
2773
|
+
path: `/v1/memory/facts/${encodeURIComponent(id)}`,
|
|
2774
|
+
query: {
|
|
2775
|
+
...options?.version !== void 0 && { version: options.version },
|
|
2776
|
+
...options?.asOf !== void 0 && { asOf: options.asOf }
|
|
2777
|
+
}
|
|
2778
|
+
});
|
|
2779
|
+
},
|
|
2780
|
+
async revisions(id) {
|
|
2781
|
+
const envelope = await transport.request({
|
|
2782
|
+
method: "GET",
|
|
2783
|
+
path: `/v1/memory/facts/${encodeURIComponent(id)}/revisions`
|
|
2298
2784
|
});
|
|
2785
|
+
return envelope.data;
|
|
2299
2786
|
},
|
|
2300
2787
|
async list(filter) {
|
|
2301
2788
|
const page = await transport.request({
|
|
@@ -2305,16 +2792,38 @@ function makeMemoryClient(transport) {
|
|
|
2305
2792
|
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
2306
2793
|
...filter?.cursor !== void 0 && { cursor: filter.cursor },
|
|
2307
2794
|
...filter?.type !== void 0 && { type: filter.type },
|
|
2308
|
-
...filter?.scope !== void 0 && { scope: JSON.stringify(filter.scope) }
|
|
2795
|
+
...filter?.scope !== void 0 && { scope: JSON.stringify(filter.scope) },
|
|
2796
|
+
...filter?.asOf !== void 0 && { asOf: filter.asOf }
|
|
2309
2797
|
}
|
|
2310
2798
|
});
|
|
2311
2799
|
return listPage(page);
|
|
2312
2800
|
},
|
|
2313
|
-
async
|
|
2801
|
+
async supersede(id, input, options) {
|
|
2314
2802
|
return transport.request({
|
|
2315
2803
|
method: "POST",
|
|
2316
2804
|
path: `/v1/memory/facts/${encodeURIComponent(id)}/supersede`,
|
|
2317
|
-
body:
|
|
2805
|
+
body: input,
|
|
2806
|
+
...options?.idempotencyKey !== void 0 && {
|
|
2807
|
+
idempotencyKey: options.idempotencyKey
|
|
2808
|
+
}
|
|
2809
|
+
});
|
|
2810
|
+
},
|
|
2811
|
+
async delete(id, options) {
|
|
2812
|
+
return transport.request({
|
|
2813
|
+
method: "DELETE",
|
|
2814
|
+
path: `/v1/memory/facts/${encodeURIComponent(id)}`,
|
|
2815
|
+
query: {
|
|
2816
|
+
...options?.expectVersion !== void 0 && { expectVersion: options.expectVersion }
|
|
2817
|
+
}
|
|
2818
|
+
});
|
|
2819
|
+
},
|
|
2820
|
+
async verify(id, options) {
|
|
2821
|
+
return transport.request({
|
|
2822
|
+
method: "POST",
|
|
2823
|
+
path: `/v1/memory/facts/${encodeURIComponent(id)}/verify`,
|
|
2824
|
+
body: {
|
|
2825
|
+
...options?.expectVersion !== void 0 && { expectVersion: options.expectVersion }
|
|
2826
|
+
},
|
|
2318
2827
|
...options?.idempotencyKey !== void 0 && {
|
|
2319
2828
|
idempotencyKey: options.idempotencyKey
|
|
2320
2829
|
}
|
|
@@ -2404,7 +2913,7 @@ function makeObservationsClient(transport) {
|
|
|
2404
2913
|
|
|
2405
2914
|
// src/resources/orgs.ts
|
|
2406
2915
|
function makeOrgsClient(transport) {
|
|
2407
|
-
const
|
|
2916
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
2408
2917
|
return {
|
|
2409
2918
|
async create(input, options) {
|
|
2410
2919
|
return transport.request({
|
|
@@ -2427,13 +2936,13 @@ function makeOrgsClient(transport) {
|
|
|
2427
2936
|
async get(orgId) {
|
|
2428
2937
|
return transport.request({
|
|
2429
2938
|
method: "GET",
|
|
2430
|
-
path: `/v1/orgs/${
|
|
2939
|
+
path: `/v1/orgs/${seg2(orgId)}`
|
|
2431
2940
|
});
|
|
2432
2941
|
},
|
|
2433
2942
|
async update(orgId, input, options) {
|
|
2434
2943
|
return transport.request({
|
|
2435
2944
|
method: "PATCH",
|
|
2436
|
-
path: `/v1/orgs/${
|
|
2945
|
+
path: `/v1/orgs/${seg2(orgId)}`,
|
|
2437
2946
|
body: input,
|
|
2438
2947
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
2439
2948
|
});
|
|
@@ -2441,7 +2950,7 @@ function makeOrgsClient(transport) {
|
|
|
2441
2950
|
async delete(orgId) {
|
|
2442
2951
|
return transport.request({
|
|
2443
2952
|
method: "DELETE",
|
|
2444
|
-
path: `/v1/orgs/${
|
|
2953
|
+
path: `/v1/orgs/${seg2(orgId)}`,
|
|
2445
2954
|
discardResponse: true
|
|
2446
2955
|
});
|
|
2447
2956
|
}
|
|
@@ -2608,7 +3117,7 @@ function makePoliciesClient(transport) {
|
|
|
2608
3117
|
|
|
2609
3118
|
// src/resources/projects.ts
|
|
2610
3119
|
function makeProjectsClient(transport) {
|
|
2611
|
-
const
|
|
3120
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
2612
3121
|
return {
|
|
2613
3122
|
async create(input, options) {
|
|
2614
3123
|
return transport.request({
|
|
@@ -2637,13 +3146,13 @@ function makeProjectsClient(transport) {
|
|
|
2637
3146
|
async get(projectId) {
|
|
2638
3147
|
return transport.request({
|
|
2639
3148
|
method: "GET",
|
|
2640
|
-
path: `/v1/projects/${
|
|
3149
|
+
path: `/v1/projects/${seg2(projectId)}`
|
|
2641
3150
|
});
|
|
2642
3151
|
},
|
|
2643
3152
|
async update(projectId, input, options) {
|
|
2644
3153
|
return transport.request({
|
|
2645
3154
|
method: "PATCH",
|
|
2646
|
-
path: `/v1/projects/${
|
|
3155
|
+
path: `/v1/projects/${seg2(projectId)}`,
|
|
2647
3156
|
body: input,
|
|
2648
3157
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
2649
3158
|
});
|
|
@@ -2651,7 +3160,7 @@ function makeProjectsClient(transport) {
|
|
|
2651
3160
|
async delete(projectId) {
|
|
2652
3161
|
return transport.request({
|
|
2653
3162
|
method: "DELETE",
|
|
2654
|
-
path: `/v1/projects/${
|
|
3163
|
+
path: `/v1/projects/${seg2(projectId)}`,
|
|
2655
3164
|
discardResponse: true
|
|
2656
3165
|
});
|
|
2657
3166
|
},
|
|
@@ -2659,7 +3168,7 @@ function makeProjectsClient(transport) {
|
|
|
2659
3168
|
async list(projectId, filter) {
|
|
2660
3169
|
return transport.request({
|
|
2661
3170
|
method: "GET",
|
|
2662
|
-
path: `/v1/projects/${
|
|
3171
|
+
path: `/v1/projects/${seg2(projectId)}/memberships`,
|
|
2663
3172
|
query: {
|
|
2664
3173
|
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
2665
3174
|
...filter?.cursor !== void 0 && { cursor: filter.cursor }
|
|
@@ -2669,7 +3178,7 @@ function makeProjectsClient(transport) {
|
|
|
2669
3178
|
async add(projectId, input, options) {
|
|
2670
3179
|
return transport.request({
|
|
2671
3180
|
method: "POST",
|
|
2672
|
-
path: `/v1/projects/${
|
|
3181
|
+
path: `/v1/projects/${seg2(projectId)}/memberships`,
|
|
2673
3182
|
body: input,
|
|
2674
3183
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
2675
3184
|
});
|
|
@@ -2677,7 +3186,7 @@ function makeProjectsClient(transport) {
|
|
|
2677
3186
|
async updateRole(projectId, userId, role, options) {
|
|
2678
3187
|
return transport.request({
|
|
2679
3188
|
method: "PATCH",
|
|
2680
|
-
path: `/v1/projects/${
|
|
3189
|
+
path: `/v1/projects/${seg2(projectId)}/memberships/${seg2(userId)}`,
|
|
2681
3190
|
body: { role },
|
|
2682
3191
|
discardResponse: true,
|
|
2683
3192
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
@@ -2686,7 +3195,7 @@ function makeProjectsClient(transport) {
|
|
|
2686
3195
|
async remove(projectId, userId, options) {
|
|
2687
3196
|
return transport.request({
|
|
2688
3197
|
method: "DELETE",
|
|
2689
|
-
path: `/v1/projects/${
|
|
3198
|
+
path: `/v1/projects/${seg2(projectId)}/memberships/${seg2(userId)}`,
|
|
2690
3199
|
discardResponse: true,
|
|
2691
3200
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
2692
3201
|
});
|
|
@@ -2695,6 +3204,71 @@ function makeProjectsClient(transport) {
|
|
|
2695
3204
|
};
|
|
2696
3205
|
}
|
|
2697
3206
|
|
|
3207
|
+
// src/resources/proposals.ts
|
|
3208
|
+
var seg = (id) => encodeURIComponent(id);
|
|
3209
|
+
function makeProposalsClient(transport) {
|
|
3210
|
+
const post = (req) => transport.request({
|
|
3211
|
+
method: "POST",
|
|
3212
|
+
path: req.path,
|
|
3213
|
+
body: req.body,
|
|
3214
|
+
...req.idempotencyKey !== void 0 && { idempotencyKey: req.idempotencyKey }
|
|
3215
|
+
});
|
|
3216
|
+
return {
|
|
3217
|
+
async list(input = {}) {
|
|
3218
|
+
const page = await transport.request({
|
|
3219
|
+
method: "GET",
|
|
3220
|
+
path: "/v1/proposals",
|
|
3221
|
+
query: {
|
|
3222
|
+
...input.limit !== void 0 && { limit: input.limit },
|
|
3223
|
+
...input.cursor !== void 0 && { cursor: input.cursor },
|
|
3224
|
+
...input.agentId !== void 0 && { agentId: input.agentId },
|
|
3225
|
+
...input.tier !== void 0 && { tier: input.tier },
|
|
3226
|
+
...input.status !== void 0 && { status: input.status },
|
|
3227
|
+
...input.scope !== void 0 && scopeQuery(input.scope)
|
|
3228
|
+
}
|
|
3229
|
+
});
|
|
3230
|
+
return listPage(page);
|
|
3231
|
+
},
|
|
3232
|
+
async get(id) {
|
|
3233
|
+
return transport.request({ method: "GET", path: `/v1/proposals/${seg(id)}` });
|
|
3234
|
+
},
|
|
3235
|
+
async create(input) {
|
|
3236
|
+
const { idempotencyKey, ...body } = input;
|
|
3237
|
+
return transport.request({
|
|
3238
|
+
method: "POST",
|
|
3239
|
+
path: "/v1/proposals",
|
|
3240
|
+
body,
|
|
3241
|
+
...idempotencyKey !== void 0 && { idempotencyKey }
|
|
3242
|
+
});
|
|
3243
|
+
},
|
|
3244
|
+
async evaluate(id, input) {
|
|
3245
|
+
const { idempotencyKey, ...body } = input;
|
|
3246
|
+
return post({ path: `/v1/proposals/${seg(id)}/evaluate`, body, idempotencyKey });
|
|
3247
|
+
},
|
|
3248
|
+
async request(id, input = {}) {
|
|
3249
|
+
const { idempotencyKey, ...body } = input;
|
|
3250
|
+
return post({ path: `/v1/proposals/${seg(id)}/request`, body, idempotencyKey });
|
|
3251
|
+
},
|
|
3252
|
+
async rollback(id, input = {}) {
|
|
3253
|
+
const { idempotencyKey, ...body } = input;
|
|
3254
|
+
return post({ path: `/v1/proposals/${seg(id)}/rollback`, body, idempotencyKey });
|
|
3255
|
+
},
|
|
3256
|
+
async withdraw(id, input) {
|
|
3257
|
+
const { idempotencyKey, ...body } = input;
|
|
3258
|
+
return post({ path: `/v1/proposals/${seg(id)}/withdraw`, body, idempotencyKey });
|
|
3259
|
+
},
|
|
3260
|
+
async improve(input) {
|
|
3261
|
+
const { idempotencyKey, ...body } = input;
|
|
3262
|
+
return transport.request({
|
|
3263
|
+
method: "POST",
|
|
3264
|
+
path: "/v1/proposals/improve",
|
|
3265
|
+
body,
|
|
3266
|
+
...idempotencyKey !== void 0 && { idempotencyKey }
|
|
3267
|
+
});
|
|
3268
|
+
}
|
|
3269
|
+
};
|
|
3270
|
+
}
|
|
3271
|
+
|
|
2698
3272
|
// src/resources/provenance.ts
|
|
2699
3273
|
function makeProvenanceClient(transport) {
|
|
2700
3274
|
return {
|
|
@@ -2728,26 +3302,22 @@ function makeProvenanceClient(transport) {
|
|
|
2728
3302
|
method: "POST",
|
|
2729
3303
|
path: `/v1/provenance/${encodeURIComponent(input.runId)}/export`,
|
|
2730
3304
|
body: {
|
|
2731
|
-
signingKeyId: input.signingKeyId,
|
|
3305
|
+
...input.signingKeyId !== void 0 && { signingKeyId: input.signingKeyId },
|
|
2732
3306
|
...input.includeMessages !== void 0 && { includeMessages: input.includeMessages }
|
|
2733
3307
|
},
|
|
2734
3308
|
...input.idempotencyKey !== void 0 && { idempotencyKey: input.idempotencyKey }
|
|
2735
3309
|
});
|
|
2736
3310
|
},
|
|
2737
|
-
async verify(
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
"provenance.verify",
|
|
2741
|
-
"client-side ed25519 verification requires the crypto module subpackage to be reachable from the SDK"
|
|
2742
|
-
)
|
|
2743
|
-
);
|
|
3311
|
+
async verify(exported, publicKey) {
|
|
3312
|
+
const checked = await verifySignedExport(exported, { trustedKeys: [publicKey] });
|
|
3313
|
+
return checked.valid ? { valid: true } : { valid: false, issues: checked.issues ?? [] };
|
|
2744
3314
|
}
|
|
2745
3315
|
};
|
|
2746
3316
|
}
|
|
2747
3317
|
|
|
2748
3318
|
// src/resources/providers.ts
|
|
2749
3319
|
function makeProvidersClient(transport) {
|
|
2750
|
-
const
|
|
3320
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
2751
3321
|
return {
|
|
2752
3322
|
async register(input, options) {
|
|
2753
3323
|
return transport.request({
|
|
@@ -2771,19 +3341,25 @@ function makeProvidersClient(transport) {
|
|
|
2771
3341
|
async get(providerId) {
|
|
2772
3342
|
return transport.request({
|
|
2773
3343
|
method: "GET",
|
|
2774
|
-
path: `/v1/providers/${
|
|
3344
|
+
path: `/v1/providers/${seg2(providerId)}`
|
|
2775
3345
|
});
|
|
2776
3346
|
},
|
|
2777
3347
|
async capabilities(providerId) {
|
|
2778
3348
|
return transport.request({
|
|
2779
3349
|
method: "GET",
|
|
2780
|
-
path: `/v1/providers/${
|
|
3350
|
+
path: `/v1/providers/${seg2(providerId)}/capabilities`
|
|
3351
|
+
});
|
|
3352
|
+
},
|
|
3353
|
+
async check(providerId) {
|
|
3354
|
+
return transport.request({
|
|
3355
|
+
method: "GET",
|
|
3356
|
+
path: `/v1/providers/${seg2(providerId)}/check`
|
|
2781
3357
|
});
|
|
2782
3358
|
},
|
|
2783
3359
|
async unregister(providerId, options) {
|
|
2784
3360
|
return transport.request({
|
|
2785
3361
|
method: "POST",
|
|
2786
|
-
path: `/v1/providers/${
|
|
3362
|
+
path: `/v1/providers/${seg2(providerId)}/unregister`,
|
|
2787
3363
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
2788
3364
|
});
|
|
2789
3365
|
}
|
|
@@ -2894,145 +3470,6 @@ function subscribeToRun(options) {
|
|
|
2894
3470
|
});
|
|
2895
3471
|
}
|
|
2896
3472
|
|
|
2897
|
-
// src/transport.ts
|
|
2898
|
-
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
2899
|
-
var MUTATING = /* @__PURE__ */ new Set([
|
|
2900
|
-
"POST",
|
|
2901
|
-
"PUT",
|
|
2902
|
-
"PATCH",
|
|
2903
|
-
"DELETE"
|
|
2904
|
-
]);
|
|
2905
|
-
function createTransport(options) {
|
|
2906
|
-
const apiUrl = options.apiUrl.replace(/\/+$/u, "");
|
|
2907
|
-
const fetchImpl = options.fetch ?? fetch;
|
|
2908
|
-
const clientTimeoutMs = checkedTimeoutMs(
|
|
2909
|
-
options.timeoutMs ?? DEFAULT_TIMEOUT_MS,
|
|
2910
|
-
"ClientOptions.timeoutMs"
|
|
2911
|
-
);
|
|
2912
|
-
return {
|
|
2913
|
-
apiUrl,
|
|
2914
|
-
fetchImpl,
|
|
2915
|
-
authHeaders() {
|
|
2916
|
-
return { Authorization: `Bearer ${authTokenFor(options.auth)}` };
|
|
2917
|
-
},
|
|
2918
|
-
async request(input) {
|
|
2919
|
-
const url = buildUrl(apiUrl, input.path, input.query);
|
|
2920
|
-
const headers = buildHeaders(input, options.auth);
|
|
2921
|
-
const timeoutMs = input.timeoutMs === void 0 ? clientTimeoutMs : checkedTimeoutMs(input.timeoutMs, "timeoutMs");
|
|
2922
|
-
const ac = new AbortController();
|
|
2923
|
-
let timedOut = false;
|
|
2924
|
-
const timer = setTimeout(() => {
|
|
2925
|
-
timedOut = true;
|
|
2926
|
-
ac.abort(new Error("timeout"));
|
|
2927
|
-
}, timeoutMs);
|
|
2928
|
-
let response;
|
|
2929
|
-
try {
|
|
2930
|
-
response = await fetchImpl(url, {
|
|
2931
|
-
method: input.method,
|
|
2932
|
-
headers,
|
|
2933
|
-
...input.body !== void 0 && { body: JSON.stringify(input.body) },
|
|
2934
|
-
signal: ac.signal
|
|
2935
|
-
});
|
|
2936
|
-
} catch (cause) {
|
|
2937
|
-
clearTimeout(timer);
|
|
2938
|
-
const err = timedOut ? {
|
|
2939
|
-
code: "network",
|
|
2940
|
-
message: `No answer within ${seconds(timeoutMs)}, the client's timeout (timeoutMs).`,
|
|
2941
|
-
cause,
|
|
2942
|
-
timeoutMs
|
|
2943
|
-
} : {
|
|
2944
|
-
code: "network",
|
|
2945
|
-
message: cause instanceof Error ? cause.message : "network request failed",
|
|
2946
|
-
cause
|
|
2947
|
-
};
|
|
2948
|
-
throw new KindgiApiError(err);
|
|
2949
|
-
}
|
|
2950
|
-
clearTimeout(timer);
|
|
2951
|
-
if (response.ok) {
|
|
2952
|
-
if (input.discardResponse === true || response.status === 204) {
|
|
2953
|
-
try {
|
|
2954
|
-
await response.arrayBuffer();
|
|
2955
|
-
} catch {
|
|
2956
|
-
}
|
|
2957
|
-
return void 0;
|
|
2958
|
-
}
|
|
2959
|
-
try {
|
|
2960
|
-
return await response.json();
|
|
2961
|
-
} catch (cause) {
|
|
2962
|
-
const err = {
|
|
2963
|
-
code: "network",
|
|
2964
|
-
message: "Response body was not valid JSON",
|
|
2965
|
-
cause
|
|
2966
|
-
};
|
|
2967
|
-
throw new KindgiApiError(err);
|
|
2968
|
-
}
|
|
2969
|
-
}
|
|
2970
|
-
let body;
|
|
2971
|
-
try {
|
|
2972
|
-
body = await response.json();
|
|
2973
|
-
} catch {
|
|
2974
|
-
body = void 0;
|
|
2975
|
-
}
|
|
2976
|
-
throw new KindgiApiError(
|
|
2977
|
-
fromWire(unwrapErrorEnvelope(body, response.status), response.status)
|
|
2978
|
-
);
|
|
2979
|
-
}
|
|
2980
|
-
};
|
|
2981
|
-
}
|
|
2982
|
-
function checkedTimeoutMs(value, name) {
|
|
2983
|
-
if (!Number.isFinite(value) || value <= 0) {
|
|
2984
|
-
throw new TypeError(`${name} must be a positive number of milliseconds. Got ${String(value)}.`);
|
|
2985
|
-
}
|
|
2986
|
-
return value;
|
|
2987
|
-
}
|
|
2988
|
-
function seconds(ms) {
|
|
2989
|
-
return `${ms / 1e3} s`;
|
|
2990
|
-
}
|
|
2991
|
-
function buildUrl(apiUrl, path, query) {
|
|
2992
|
-
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
|
|
2993
|
-
const base = `${apiUrl}${normalizedPath}`;
|
|
2994
|
-
if (query === void 0) return base;
|
|
2995
|
-
const params = [];
|
|
2996
|
-
for (const key of Object.keys(query)) {
|
|
2997
|
-
const value = query[key];
|
|
2998
|
-
if (value === void 0) continue;
|
|
2999
|
-
const values = typeof value === "object" ? value : [String(value)];
|
|
3000
|
-
for (const v of values) params.push(`${encodeURIComponent(key)}=${encodeURIComponent(v)}`);
|
|
3001
|
-
}
|
|
3002
|
-
return params.length === 0 ? base : `${base}?${params.join("&")}`;
|
|
3003
|
-
}
|
|
3004
|
-
function buildHeaders(input, auth) {
|
|
3005
|
-
const headers = {
|
|
3006
|
-
Accept: "application/json",
|
|
3007
|
-
Authorization: `Bearer ${authTokenFor(auth)}`
|
|
3008
|
-
};
|
|
3009
|
-
if (input.body !== void 0) {
|
|
3010
|
-
headers["Content-Type"] = "application/json; charset=utf-8";
|
|
3011
|
-
}
|
|
3012
|
-
if (input.idempotencyKey !== void 0 && MUTATING.has(input.method)) {
|
|
3013
|
-
headers["Idempotency-Key"] = input.idempotencyKey;
|
|
3014
|
-
}
|
|
3015
|
-
if (input.headers !== void 0) {
|
|
3016
|
-
for (const key of Object.keys(input.headers)) {
|
|
3017
|
-
headers[key] = input.headers[key];
|
|
3018
|
-
}
|
|
3019
|
-
}
|
|
3020
|
-
return headers;
|
|
3021
|
-
}
|
|
3022
|
-
function authTokenFor(auth) {
|
|
3023
|
-
if (auth.kind === "apiToken") return auth.token;
|
|
3024
|
-
return auth.accessToken;
|
|
3025
|
-
}
|
|
3026
|
-
function unwrapErrorEnvelope(body, status) {
|
|
3027
|
-
if (body !== null && typeof body === "object" && !Array.isArray(body)) {
|
|
3028
|
-
const inner = body.error;
|
|
3029
|
-
if (inner !== null && typeof inner === "object" && !Array.isArray(inner)) {
|
|
3030
|
-
return inner;
|
|
3031
|
-
}
|
|
3032
|
-
}
|
|
3033
|
-
return { code: "unknown", message: `HTTP ${status} without recognizable error envelope` };
|
|
3034
|
-
}
|
|
3035
|
-
|
|
3036
3473
|
// src/resources/runs.ts
|
|
3037
3474
|
function waitedStartTimeout(e) {
|
|
3038
3475
|
if (!(e instanceof KindgiApiError) || e.error.code !== "network") return e;
|
|
@@ -3046,6 +3483,30 @@ function waitedStartTimeout(e) {
|
|
|
3046
3483
|
});
|
|
3047
3484
|
}
|
|
3048
3485
|
function makeRunsClient(transport) {
|
|
3486
|
+
const followEvents = (runId, options) => followRun({
|
|
3487
|
+
url: `${transport.apiUrl}/v1/runs/${encodeURIComponent(runId)}/stream`,
|
|
3488
|
+
headers: () => transport.authHeaders(),
|
|
3489
|
+
fetchImpl: transport.fetchImpl,
|
|
3490
|
+
...options?.signal !== void 0 && { signal: options.signal },
|
|
3491
|
+
...options?.initialBackoffMs !== void 0 && {
|
|
3492
|
+
initialBackoffMs: options.initialBackoffMs
|
|
3493
|
+
},
|
|
3494
|
+
...options?.maxBackoffMs !== void 0 && {
|
|
3495
|
+
maxBackoffMs: options.maxBackoffMs
|
|
3496
|
+
}
|
|
3497
|
+
});
|
|
3498
|
+
const followProgressEvents = (runId, options) => followRun({
|
|
3499
|
+
url: `${transport.apiUrl}/v1/runs/${encodeURIComponent(runId)}/progress/stream`,
|
|
3500
|
+
headers: () => transport.authHeaders(),
|
|
3501
|
+
fetchImpl: transport.fetchImpl,
|
|
3502
|
+
...options?.signal !== void 0 && { signal: options.signal },
|
|
3503
|
+
...options?.initialBackoffMs !== void 0 && {
|
|
3504
|
+
initialBackoffMs: options.initialBackoffMs
|
|
3505
|
+
},
|
|
3506
|
+
...options?.maxBackoffMs !== void 0 && {
|
|
3507
|
+
maxBackoffMs: options.maxBackoffMs
|
|
3508
|
+
}
|
|
3509
|
+
});
|
|
3049
3510
|
return {
|
|
3050
3511
|
async start(input) {
|
|
3051
3512
|
const body = "agent" in input ? {
|
|
@@ -3091,34 +3552,10 @@ function makeRunsClient(transport) {
|
|
|
3091
3552
|
path: `/v1/runs/${encodeURIComponent(runId)}/progress`
|
|
3092
3553
|
});
|
|
3093
3554
|
},
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
fetchImpl: transport.fetchImpl,
|
|
3099
|
-
...options?.signal !== void 0 && { signal: options.signal },
|
|
3100
|
-
...options?.initialBackoffMs !== void 0 && {
|
|
3101
|
-
initialBackoffMs: options.initialBackoffMs
|
|
3102
|
-
},
|
|
3103
|
-
...options?.maxBackoffMs !== void 0 && {
|
|
3104
|
-
maxBackoffMs: options.maxBackoffMs
|
|
3105
|
-
}
|
|
3106
|
-
});
|
|
3107
|
-
},
|
|
3108
|
-
stream(runId, options) {
|
|
3109
|
-
return followRun({
|
|
3110
|
-
url: `${transport.apiUrl}/v1/runs/${encodeURIComponent(runId)}/stream`,
|
|
3111
|
-
headers: () => transport.authHeaders(),
|
|
3112
|
-
fetchImpl: transport.fetchImpl,
|
|
3113
|
-
...options?.signal !== void 0 && { signal: options.signal },
|
|
3114
|
-
...options?.initialBackoffMs !== void 0 && {
|
|
3115
|
-
initialBackoffMs: options.initialBackoffMs
|
|
3116
|
-
},
|
|
3117
|
-
...options?.maxBackoffMs !== void 0 && {
|
|
3118
|
-
maxBackoffMs: options.maxBackoffMs
|
|
3119
|
-
}
|
|
3120
|
-
});
|
|
3121
|
-
},
|
|
3555
|
+
followProgress: followProgressEvents,
|
|
3556
|
+
follow: followEvents,
|
|
3557
|
+
streamProgress: followProgressEvents,
|
|
3558
|
+
stream: followEvents,
|
|
3122
3559
|
async get(runId) {
|
|
3123
3560
|
return transport.request({
|
|
3124
3561
|
method: "GET",
|
|
@@ -3163,6 +3600,7 @@ function makeRunsClient(transport) {
|
|
|
3163
3600
|
...filter?.agentId !== void 0 && { agentId: filter.agentId },
|
|
3164
3601
|
...filter?.replays !== void 0 && { replays: filter.replays },
|
|
3165
3602
|
...filter?.evalRunId !== void 0 && { evalRunId: filter.evalRunId },
|
|
3603
|
+
...filter?.triggerId !== void 0 && { triggerId: filter.triggerId },
|
|
3166
3604
|
...filter?.includeOutput === true && { include: "output" }
|
|
3167
3605
|
}
|
|
3168
3606
|
});
|
|
@@ -3203,10 +3641,11 @@ function makeSchedulesClient(transport) {
|
|
|
3203
3641
|
}
|
|
3204
3642
|
});
|
|
3205
3643
|
},
|
|
3206
|
-
async get(triggerId) {
|
|
3644
|
+
async get(triggerId, options) {
|
|
3207
3645
|
return transport.request({
|
|
3208
3646
|
method: "GET",
|
|
3209
|
-
path: `/v1/schedules/${encodeURIComponent(triggerId)}
|
|
3647
|
+
path: `/v1/schedules/${encodeURIComponent(triggerId)}`,
|
|
3648
|
+
...options?.upcoming !== void 0 && { query: { upcoming: options.upcoming } }
|
|
3210
3649
|
});
|
|
3211
3650
|
},
|
|
3212
3651
|
async update(triggerId, input, options) {
|
|
@@ -3237,6 +3676,30 @@ function makeSchedulesClient(transport) {
|
|
|
3237
3676
|
path: `/v1/schedules/${encodeURIComponent(triggerId)}/unregister`,
|
|
3238
3677
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
3239
3678
|
});
|
|
3679
|
+
},
|
|
3680
|
+
async fires(triggerId, filter) {
|
|
3681
|
+
return transport.request({
|
|
3682
|
+
method: "GET",
|
|
3683
|
+
path: `/v1/schedules/${encodeURIComponent(triggerId)}/fires`,
|
|
3684
|
+
query: {
|
|
3685
|
+
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
3686
|
+
...filter?.cursor !== void 0 && { cursor: filter.cursor }
|
|
3687
|
+
}
|
|
3688
|
+
});
|
|
3689
|
+
},
|
|
3690
|
+
async runNow(triggerId, options) {
|
|
3691
|
+
return transport.request({
|
|
3692
|
+
method: "POST",
|
|
3693
|
+
path: `/v1/schedules/${encodeURIComponent(triggerId)}/run-now`,
|
|
3694
|
+
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
3695
|
+
});
|
|
3696
|
+
},
|
|
3697
|
+
async takeOwnership(triggerId, options) {
|
|
3698
|
+
return transport.request({
|
|
3699
|
+
method: "POST",
|
|
3700
|
+
path: `/v1/schedules/${encodeURIComponent(triggerId)}/owner`,
|
|
3701
|
+
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
3702
|
+
});
|
|
3240
3703
|
}
|
|
3241
3704
|
};
|
|
3242
3705
|
}
|
|
@@ -3398,8 +3861,8 @@ function makeSecretsClient(transport) {
|
|
|
3398
3861
|
});
|
|
3399
3862
|
return { kind: "ok", record: ok.record, versionId: ok.versionId };
|
|
3400
3863
|
} catch (err) {
|
|
3401
|
-
const
|
|
3402
|
-
if (
|
|
3864
|
+
const conflict2 = tryReadVersionConflict(err);
|
|
3865
|
+
if (conflict2 !== null) return conflict2;
|
|
3403
3866
|
throw err;
|
|
3404
3867
|
}
|
|
3405
3868
|
},
|
|
@@ -3519,6 +3982,63 @@ function tryReadVersionConflict(err) {
|
|
|
3519
3982
|
return { kind: "version-conflict", currentVersion: current };
|
|
3520
3983
|
}
|
|
3521
3984
|
|
|
3985
|
+
// src/resources/service-accounts.ts
|
|
3986
|
+
function makeServiceAccountsClient(transport) {
|
|
3987
|
+
const withKey = (options) => options?.idempotencyKey !== void 0 ? { idempotencyKey: options.idempotencyKey } : {};
|
|
3988
|
+
return {
|
|
3989
|
+
async create(input, options) {
|
|
3990
|
+
return transport.request({
|
|
3991
|
+
method: "POST",
|
|
3992
|
+
path: "/v1/service-accounts",
|
|
3993
|
+
body: input,
|
|
3994
|
+
...withKey(options)
|
|
3995
|
+
});
|
|
3996
|
+
},
|
|
3997
|
+
async list(filter) {
|
|
3998
|
+
const page = await transport.request({
|
|
3999
|
+
method: "GET",
|
|
4000
|
+
path: "/v1/service-accounts",
|
|
4001
|
+
query: {
|
|
4002
|
+
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
4003
|
+
...filter?.cursor !== void 0 && { cursor: filter.cursor },
|
|
4004
|
+
...filter?.includeUnregistered === true && { includeUnregistered: "true" }
|
|
4005
|
+
}
|
|
4006
|
+
});
|
|
4007
|
+
return listPage(page);
|
|
4008
|
+
},
|
|
4009
|
+
async get(serviceAccountId) {
|
|
4010
|
+
return transport.request({
|
|
4011
|
+
method: "GET",
|
|
4012
|
+
path: `/v1/service-accounts/${encodeURIComponent(serviceAccountId)}`
|
|
4013
|
+
});
|
|
4014
|
+
},
|
|
4015
|
+
async grant(serviceAccountId, grant, options) {
|
|
4016
|
+
return transport.request({
|
|
4017
|
+
method: "POST",
|
|
4018
|
+
path: `/v1/service-accounts/${encodeURIComponent(serviceAccountId)}/grant`,
|
|
4019
|
+
body: grant,
|
|
4020
|
+
...withKey(options)
|
|
4021
|
+
});
|
|
4022
|
+
},
|
|
4023
|
+
async ungrant(serviceAccountId, grant, options) {
|
|
4024
|
+
return transport.request({
|
|
4025
|
+
method: "POST",
|
|
4026
|
+
path: `/v1/service-accounts/${encodeURIComponent(serviceAccountId)}/ungrant`,
|
|
4027
|
+
body: grant,
|
|
4028
|
+
...withKey(options)
|
|
4029
|
+
});
|
|
4030
|
+
},
|
|
4031
|
+
async unregister(serviceAccountId, options) {
|
|
4032
|
+
return transport.request({
|
|
4033
|
+
method: "POST",
|
|
4034
|
+
path: `/v1/service-accounts/${encodeURIComponent(serviceAccountId)}/unregister`,
|
|
4035
|
+
body: {},
|
|
4036
|
+
...withKey(options)
|
|
4037
|
+
});
|
|
4038
|
+
}
|
|
4039
|
+
};
|
|
4040
|
+
}
|
|
4041
|
+
|
|
3522
4042
|
// src/resources/signing-keys.ts
|
|
3523
4043
|
function makeSigningKeysClient(transport) {
|
|
3524
4044
|
return {
|
|
@@ -3561,10 +4081,17 @@ function makeSigningKeysClient(transport) {
|
|
|
3561
4081
|
|
|
3562
4082
|
// src/resources/supervisor.ts
|
|
3563
4083
|
var REASON_NO_SUPERVISOR_CRUD = "no /v1/supervisors CRUD routes on the API \u2014 supervisor persistence is caller-plugged via SupervisorBinding at deployment boot (framework does NOT own supervisor storage; analogous to the identity-directory pattern for users)";
|
|
3564
|
-
function
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
4084
|
+
function removed(method, replacement) {
|
|
4085
|
+
return async () => {
|
|
4086
|
+
throw new KindgiApiError(
|
|
4087
|
+
notYetWired(
|
|
4088
|
+
`supervisor.proposals.${method}`,
|
|
4089
|
+
`removed in 0.1.5: proposals now change data blocks; use client.proposals.${replacement} (see client.proposals.create, evaluate and request)`
|
|
4090
|
+
)
|
|
4091
|
+
);
|
|
4092
|
+
};
|
|
4093
|
+
}
|
|
4094
|
+
function makeSupervisorClient(_transport) {
|
|
3568
4095
|
return {
|
|
3569
4096
|
async define(_spec) {
|
|
3570
4097
|
throw new KindgiApiError(notYetWired("supervisor.define", REASON_NO_SUPERVISOR_CRUD));
|
|
@@ -3582,114 +4109,22 @@ function makeSupervisorClient(transport) {
|
|
|
3582
4109
|
throw new KindgiApiError(notYetWired("supervisor.delete", REASON_NO_SUPERVISOR_CRUD));
|
|
3583
4110
|
},
|
|
3584
4111
|
proposals: {
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
change: input.change,
|
|
3595
|
-
patternRefs: input.patternRefs,
|
|
3596
|
-
hypothesis: input.hypothesis,
|
|
3597
|
-
proposerRuleId: input.proposerRuleId
|
|
3598
|
-
},
|
|
3599
|
-
...input.idempotencyKey !== void 0 && { idempotencyKey: input.idempotencyKey }
|
|
3600
|
-
});
|
|
3601
|
-
},
|
|
3602
|
-
async list(input) {
|
|
3603
|
-
const page = await transport.request({
|
|
3604
|
-
method: "GET",
|
|
3605
|
-
path: "/v1/proposals",
|
|
3606
|
-
headers: supervisorHeader(input.supervisorId),
|
|
3607
|
-
query: {
|
|
3608
|
-
...input.limit !== void 0 && { limit: input.limit },
|
|
3609
|
-
...input.cursor !== void 0 && { cursor: input.cursor },
|
|
3610
|
-
...input.status !== void 0 && { status: input.status },
|
|
3611
|
-
...input.agentId !== void 0 && { agentId: input.agentId },
|
|
3612
|
-
...input.tier !== void 0 && { tier: input.tier }
|
|
3613
|
-
}
|
|
3614
|
-
});
|
|
3615
|
-
return listPage(page);
|
|
3616
|
-
},
|
|
3617
|
-
async get(supervisorId, id) {
|
|
3618
|
-
return transport.request({
|
|
3619
|
-
method: "GET",
|
|
3620
|
-
path: `/v1/proposals/${encodeURIComponent(id)}`,
|
|
3621
|
-
headers: supervisorHeader(supervisorId)
|
|
3622
|
-
});
|
|
3623
|
-
},
|
|
3624
|
-
async dryRun(supervisorId, id, input) {
|
|
3625
|
-
return transport.request({
|
|
3626
|
-
method: "POST",
|
|
3627
|
-
path: `/v1/proposals/${encodeURIComponent(id)}/dry-run`,
|
|
3628
|
-
headers: supervisorHeader(supervisorId),
|
|
3629
|
-
body: {
|
|
3630
|
-
datasetId: input.datasetId,
|
|
3631
|
-
datasetVersion: input.datasetVersion,
|
|
3632
|
-
criterion: input.criterion
|
|
3633
|
-
},
|
|
3634
|
-
...input.idempotencyKey !== void 0 && { idempotencyKey: input.idempotencyKey }
|
|
3635
|
-
});
|
|
3636
|
-
},
|
|
3637
|
-
async submitForReview(supervisorId, id, input) {
|
|
3638
|
-
const body = {};
|
|
3639
|
-
if (input?.requiredRole !== void 0) body.requiredRole = input.requiredRole;
|
|
3640
|
-
if (input?.expiresAt !== void 0) body.expiresAt = input.expiresAt;
|
|
3641
|
-
return transport.request({
|
|
3642
|
-
method: "POST",
|
|
3643
|
-
path: `/v1/proposals/${encodeURIComponent(id)}/submit-review`,
|
|
3644
|
-
headers: supervisorHeader(supervisorId),
|
|
3645
|
-
body,
|
|
3646
|
-
...input?.idempotencyKey !== void 0 && { idempotencyKey: input.idempotencyKey }
|
|
3647
|
-
});
|
|
3648
|
-
},
|
|
3649
|
-
async reflectReview(_supervisorId, _id, _input) {
|
|
3650
|
-
throw new KindgiApiError(
|
|
3651
|
-
notYetWired(
|
|
3652
|
-
"supervisor.proposals.reflectReview",
|
|
3653
|
-
"no POST /v1/proposals/{id}/reflect-review route on the API \u2014 review reflection is atomic with POST /v1/approvals/{id}/complete (wire detects the linked proposal + updates status alongside the decision)"
|
|
3654
|
-
)
|
|
3655
|
-
);
|
|
3656
|
-
},
|
|
3657
|
-
async apply(supervisorId, id, input) {
|
|
3658
|
-
const body = {};
|
|
3659
|
-
if (input?.newVersion !== void 0) body.newVersion = input.newVersion;
|
|
3660
|
-
return transport.request({
|
|
3661
|
-
method: "POST",
|
|
3662
|
-
path: `/v1/proposals/${encodeURIComponent(id)}/apply`,
|
|
3663
|
-
headers: supervisorHeader(supervisorId),
|
|
3664
|
-
body,
|
|
3665
|
-
...input?.idempotencyKey !== void 0 && { idempotencyKey: input.idempotencyKey }
|
|
3666
|
-
});
|
|
3667
|
-
},
|
|
3668
|
-
async rollback(supervisorId, id, input) {
|
|
3669
|
-
return transport.request({
|
|
3670
|
-
method: "POST",
|
|
3671
|
-
path: `/v1/proposals/${encodeURIComponent(id)}/rollback`,
|
|
3672
|
-
headers: supervisorHeader(supervisorId),
|
|
3673
|
-
body: { reason: input.reason },
|
|
3674
|
-
...input.idempotencyKey !== void 0 && { idempotencyKey: input.idempotencyKey }
|
|
3675
|
-
});
|
|
3676
|
-
},
|
|
3677
|
-
async withdraw(supervisorId, id, input) {
|
|
3678
|
-
return transport.request({
|
|
3679
|
-
method: "POST",
|
|
3680
|
-
path: `/v1/proposals/${encodeURIComponent(id)}/withdraw`,
|
|
3681
|
-
headers: supervisorHeader(supervisorId),
|
|
3682
|
-
body: { reason: input.reason },
|
|
3683
|
-
...input.idempotencyKey !== void 0 && { idempotencyKey: input.idempotencyKey }
|
|
3684
|
-
});
|
|
3685
|
-
}
|
|
4112
|
+
draft: removed("draft", "create"),
|
|
4113
|
+
list: removed("list", "list"),
|
|
4114
|
+
get: removed("get", "get"),
|
|
4115
|
+
dryRun: removed("dryRun", "evaluate"),
|
|
4116
|
+
submitForReview: removed("submitForReview", "request"),
|
|
4117
|
+
reflectReview: removed("reflectReview", "request"),
|
|
4118
|
+
apply: removed("apply", "request"),
|
|
4119
|
+
rollback: removed("rollback", "rollback"),
|
|
4120
|
+
withdraw: removed("withdraw", "withdraw")
|
|
3686
4121
|
}
|
|
3687
4122
|
};
|
|
3688
4123
|
}
|
|
3689
4124
|
|
|
3690
4125
|
// src/resources/teams.ts
|
|
3691
4126
|
function makeTeamsClient(transport) {
|
|
3692
|
-
const
|
|
4127
|
+
const seg2 = (s) => encodeURIComponent(s);
|
|
3693
4128
|
return {
|
|
3694
4129
|
async create(input, options) {
|
|
3695
4130
|
return transport.request({
|
|
@@ -3712,13 +4147,13 @@ function makeTeamsClient(transport) {
|
|
|
3712
4147
|
async get(teamId) {
|
|
3713
4148
|
return transport.request({
|
|
3714
4149
|
method: "GET",
|
|
3715
|
-
path: `/v1/teams/${
|
|
4150
|
+
path: `/v1/teams/${seg2(teamId)}`
|
|
3716
4151
|
});
|
|
3717
4152
|
},
|
|
3718
4153
|
async update(teamId, input, options) {
|
|
3719
4154
|
return transport.request({
|
|
3720
4155
|
method: "PATCH",
|
|
3721
|
-
path: `/v1/teams/${
|
|
4156
|
+
path: `/v1/teams/${seg2(teamId)}`,
|
|
3722
4157
|
body: input,
|
|
3723
4158
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
3724
4159
|
});
|
|
@@ -3726,7 +4161,7 @@ function makeTeamsClient(transport) {
|
|
|
3726
4161
|
async delete(teamId) {
|
|
3727
4162
|
return transport.request({
|
|
3728
4163
|
method: "DELETE",
|
|
3729
|
-
path: `/v1/teams/${
|
|
4164
|
+
path: `/v1/teams/${seg2(teamId)}`,
|
|
3730
4165
|
discardResponse: true
|
|
3731
4166
|
});
|
|
3732
4167
|
},
|
|
@@ -3734,7 +4169,7 @@ function makeTeamsClient(transport) {
|
|
|
3734
4169
|
async list(teamId, filter) {
|
|
3735
4170
|
return transport.request({
|
|
3736
4171
|
method: "GET",
|
|
3737
|
-
path: `/v1/teams/${
|
|
4172
|
+
path: `/v1/teams/${seg2(teamId)}/memberships`,
|
|
3738
4173
|
query: {
|
|
3739
4174
|
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
3740
4175
|
...filter?.cursor !== void 0 && { cursor: filter.cursor }
|
|
@@ -3744,7 +4179,7 @@ function makeTeamsClient(transport) {
|
|
|
3744
4179
|
async add(teamId, input, options) {
|
|
3745
4180
|
return transport.request({
|
|
3746
4181
|
method: "POST",
|
|
3747
|
-
path: `/v1/teams/${
|
|
4182
|
+
path: `/v1/teams/${seg2(teamId)}/memberships`,
|
|
3748
4183
|
body: input,
|
|
3749
4184
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
3750
4185
|
});
|
|
@@ -3752,7 +4187,7 @@ function makeTeamsClient(transport) {
|
|
|
3752
4187
|
async updateRole(teamId, userId, role, options) {
|
|
3753
4188
|
return transport.request({
|
|
3754
4189
|
method: "PATCH",
|
|
3755
|
-
path: `/v1/teams/${
|
|
4190
|
+
path: `/v1/teams/${seg2(teamId)}/memberships/${seg2(userId)}`,
|
|
3756
4191
|
body: { role },
|
|
3757
4192
|
discardResponse: true,
|
|
3758
4193
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
@@ -3761,7 +4196,7 @@ function makeTeamsClient(transport) {
|
|
|
3761
4196
|
async remove(teamId, userId, options) {
|
|
3762
4197
|
return transport.request({
|
|
3763
4198
|
method: "DELETE",
|
|
3764
|
-
path: `/v1/teams/${
|
|
4199
|
+
path: `/v1/teams/${seg2(teamId)}/memberships/${seg2(userId)}`,
|
|
3765
4200
|
discardResponse: true,
|
|
3766
4201
|
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
3767
4202
|
});
|
|
@@ -3808,6 +4243,7 @@ function makeTenantClient(transport) {
|
|
|
3808
4243
|
function fromWire2(wire) {
|
|
3809
4244
|
return {
|
|
3810
4245
|
id: wire.tokenId,
|
|
4246
|
+
...wire.principal !== void 0 && { principal: wire.principal },
|
|
3811
4247
|
role: wire.role,
|
|
3812
4248
|
capabilities: wire.capabilities,
|
|
3813
4249
|
...wire.label !== void 0 && { label: wire.label },
|
|
@@ -3825,6 +4261,7 @@ function makeTokensClient(transport) {
|
|
|
3825
4261
|
return {
|
|
3826
4262
|
async create(spec, options) {
|
|
3827
4263
|
const body = {};
|
|
4264
|
+
if (spec?.for !== void 0) body.for = { kind: spec.for.kind, id: spec.for.id };
|
|
3828
4265
|
if (spec?.role !== void 0) body.role = spec.role;
|
|
3829
4266
|
if (spec?.capabilities !== void 0) body.capabilities = spec.capabilities;
|
|
3830
4267
|
if (spec?.label !== void 0) body.label = spec.label;
|
|
@@ -3847,7 +4284,10 @@ function makeTokensClient(transport) {
|
|
|
3847
4284
|
path: "/v1/tokens",
|
|
3848
4285
|
query: {
|
|
3849
4286
|
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
3850
|
-
...filter?.cursor !== void 0 && { cursor: filter.cursor }
|
|
4287
|
+
...filter?.cursor !== void 0 && { cursor: filter.cursor },
|
|
4288
|
+
...filter?.principal !== void 0 && {
|
|
4289
|
+
principal: `${filter.principal.kind}:${filter.principal.id}`
|
|
4290
|
+
}
|
|
3851
4291
|
}
|
|
3852
4292
|
});
|
|
3853
4293
|
return listPage({ ...page, data: page.data.map(fromWire2) });
|
|
@@ -3990,13 +4430,24 @@ function makeToolsClient(transport) {
|
|
|
3990
4430
|
// src/resources/users.ts
|
|
3991
4431
|
function makeUsersClient(transport) {
|
|
3992
4432
|
return {
|
|
3993
|
-
async create(
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
"users.create",
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4433
|
+
async create(spec, options) {
|
|
4434
|
+
if (spec.orgId !== void 0 || spec.metadata !== void 0) {
|
|
4435
|
+
throw new KindgiApiError(
|
|
4436
|
+
notYetWired("users.create", "`orgId` and `metadata` are not on the wire")
|
|
4437
|
+
);
|
|
4438
|
+
}
|
|
4439
|
+
const created = await transport.request({
|
|
4440
|
+
method: "POST",
|
|
4441
|
+
path: "/v1/identity/users",
|
|
4442
|
+
body: {
|
|
4443
|
+
displayName: spec.displayName,
|
|
4444
|
+
...spec.email !== void 0 && { primaryEmail: spec.email }
|
|
4445
|
+
},
|
|
4446
|
+
...options?.idempotencyKey !== void 0 && {
|
|
4447
|
+
idempotencyKey: options.idempotencyKey
|
|
4448
|
+
}
|
|
4449
|
+
});
|
|
4450
|
+
return created.userId;
|
|
4000
4451
|
},
|
|
4001
4452
|
async get(id) {
|
|
4002
4453
|
return transport.request({
|
|
@@ -4017,11 +4468,42 @@ function makeUsersClient(transport) {
|
|
|
4017
4468
|
query: {
|
|
4018
4469
|
...filter?.limit !== void 0 && { limit: filter.limit },
|
|
4019
4470
|
...filter?.cursor !== void 0 && { cursor: filter.cursor },
|
|
4020
|
-
...filter?.query !== void 0 && { query: filter.query }
|
|
4471
|
+
...filter?.query !== void 0 && { query: filter.query },
|
|
4472
|
+
...filter?.includeUnregistered === true && { includeUnregistered: "true" }
|
|
4021
4473
|
}
|
|
4022
4474
|
});
|
|
4023
4475
|
return listPage(page);
|
|
4024
4476
|
},
|
|
4477
|
+
async grants(id) {
|
|
4478
|
+
return transport.request({
|
|
4479
|
+
method: "GET",
|
|
4480
|
+
path: `/v1/identity/users/${encodeURIComponent(id)}/grants`
|
|
4481
|
+
});
|
|
4482
|
+
},
|
|
4483
|
+
async grant(id, grant, options) {
|
|
4484
|
+
return transport.request({
|
|
4485
|
+
method: "POST",
|
|
4486
|
+
path: `/v1/identity/users/${encodeURIComponent(id)}/grant`,
|
|
4487
|
+
body: grant,
|
|
4488
|
+
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
4489
|
+
});
|
|
4490
|
+
},
|
|
4491
|
+
async ungrant(id, grant, options) {
|
|
4492
|
+
return transport.request({
|
|
4493
|
+
method: "POST",
|
|
4494
|
+
path: `/v1/identity/users/${encodeURIComponent(id)}/ungrant`,
|
|
4495
|
+
body: grant,
|
|
4496
|
+
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
4497
|
+
});
|
|
4498
|
+
},
|
|
4499
|
+
async unregister(id, options) {
|
|
4500
|
+
return transport.request({
|
|
4501
|
+
method: "POST",
|
|
4502
|
+
path: `/v1/identity/users/${encodeURIComponent(id)}/unregister`,
|
|
4503
|
+
body: {},
|
|
4504
|
+
...options?.idempotencyKey !== void 0 && { idempotencyKey: options.idempotencyKey }
|
|
4505
|
+
});
|
|
4506
|
+
},
|
|
4025
4507
|
async update(_id, _patch) {
|
|
4026
4508
|
throw new KindgiApiError(
|
|
4027
4509
|
notYetWired(
|
|
@@ -4218,7 +4700,9 @@ function createClient(options) {
|
|
|
4218
4700
|
conversations: makeConversationsClient(transport),
|
|
4219
4701
|
memory: makeMemoryClient(transport),
|
|
4220
4702
|
provenance: makeProvenanceClient(transport),
|
|
4221
|
-
supervisor: makeSupervisorClient(
|
|
4703
|
+
supervisor: makeSupervisorClient(),
|
|
4704
|
+
proposals: makeProposalsClient(transport),
|
|
4705
|
+
improvementPasses: makeImprovementPassesClient(transport),
|
|
4222
4706
|
observations: makeObservationsClient(transport),
|
|
4223
4707
|
approvals: makeApprovalsClient(transport),
|
|
4224
4708
|
tenant: makeTenantClient(transport),
|
|
@@ -4246,7 +4730,9 @@ function createClient(options) {
|
|
|
4246
4730
|
teams: makeTeamsClient(transport),
|
|
4247
4731
|
orgs: makeOrgsClient(transport),
|
|
4248
4732
|
signingKeys: makeSigningKeysClient(transport),
|
|
4733
|
+
exportSigningKeys: makeExportSigningKeysClient(transport),
|
|
4249
4734
|
tokens: makeTokensClient(transport),
|
|
4735
|
+
serviceAccounts: makeServiceAccountsClient(transport),
|
|
4250
4736
|
mcp: makeMcpClient(transport),
|
|
4251
4737
|
events: makeEventsClient(),
|
|
4252
4738
|
eventTriggers: makeEventTriggersClient(transport),
|
|
@@ -4258,6 +4744,7 @@ function createClient(options) {
|
|
|
4258
4744
|
}
|
|
4259
4745
|
|
|
4260
4746
|
exports.KindgiApiError = KindgiApiError;
|
|
4747
|
+
exports.SIGNED_EXPORT_ALGORITHMS = SIGNED_EXPORT_ALGORITHMS;
|
|
4261
4748
|
exports.SseHttpError = SseHttpError;
|
|
4262
4749
|
exports.comparisonOf = comparisonOf;
|
|
4263
4750
|
exports.createClient = createClient;
|
|
@@ -4268,5 +4755,6 @@ exports.notYetWired = notYetWired;
|
|
|
4268
4755
|
exports.readSse = readSse;
|
|
4269
4756
|
exports.subscribeToRun = subscribeToRun;
|
|
4270
4757
|
exports.unwrapSseData = unwrapSseData;
|
|
4758
|
+
exports.verifySignedExport = verifySignedExport;
|
|
4271
4759
|
//# sourceMappingURL=index.cjs.map
|
|
4272
4760
|
//# sourceMappingURL=index.cjs.map
|