@kici-dev/engine 0.1.16 → 0.1.17
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/dist/approval/types.js +1 -1
- package/dist/audit/access-log-policy.js +3 -1
- package/dist/audit/activity.js +1 -1
- package/dist/audit/retention-policy.js +5 -1
- package/dist/bundler/index.js +1 -1
- package/dist/bundler/rolldown-config.js +1 -1
- package/dist/env/environment-allowlist.js +1 -1
- package/dist/environment/index.js +1 -1
- package/dist/environment/scope-resolver.js +1 -1
- package/dist/environment/types.js +1 -1
- package/dist/fanout/materialize.d.ts +67 -0
- package/dist/fanout/materialize.js +119 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +8 -7
- package/dist/labels.js +1 -1
- package/dist/matrix/expand.d.ts +43 -0
- package/dist/matrix/expand.js +66 -0
- package/dist/matrix/format.d.ts +10 -0
- package/dist/matrix/format.js +19 -0
- package/dist/metrics/catalog-policy.js +8 -3
- package/dist/metrics/metric-catalog.generated.d.ts +1 -1
- package/dist/metrics/metric-catalog.generated.js +2 -2
- package/dist/protocol/analytics-events.js +1 -1
- package/dist/protocol/cluster-name.js +1 -1
- package/dist/protocol/dashboard-global-workflows.js +1 -1
- package/dist/protocol/dashboard-write-operations.js +1 -1
- package/dist/protocol/event-log-payload.js +1 -1
- package/dist/protocol/messages/access-log.d.ts +15 -5
- package/dist/protocol/messages/access-log.js +3 -1
- package/dist/protocol/messages/actor.js +1 -1
- package/dist/protocol/messages/auth.d.ts +1 -0
- package/dist/protocol/messages/auth.js +11 -2
- package/dist/protocol/messages/browser.js +1 -1
- package/dist/protocol/messages/capabilities.js +1 -1
- package/dist/protocol/messages/common.js +1 -1
- package/dist/protocol/messages/dashboard-global-workflows.js +1 -1
- package/dist/protocol/messages/dashboard.d.ts +976 -56
- package/dist/protocol/messages/dashboard.js +362 -6
- package/dist/protocol/messages/event-log.js +1 -1
- package/dist/protocol/messages/execution-status.d.ts +13 -1
- package/dist/protocol/messages/execution-status.js +13 -3
- package/dist/protocol/messages/join.js +1 -1
- package/dist/protocol/messages/log-pull.js +1 -1
- package/dist/protocol/messages/observe.d.ts +1 -0
- package/dist/protocol/messages/oidc-token-relay.d.ts +31 -0
- package/dist/protocol/messages/oidc-token-relay.js +34 -0
- package/dist/protocol/messages/orchestrator-agent.d.ts +41 -0
- package/dist/protocol/messages/orchestrator-agent.js +33 -2
- package/dist/protocol/messages/peer.js +1 -1
- package/dist/protocol/messages/platform-orchestrator.d.ts +171 -4
- package/dist/protocol/messages/platform-orchestrator.js +1 -1
- package/dist/protocol/messages/run-events.js +1 -1
- package/dist/protocol/messages/scaler-event.js +1 -1
- package/dist/protocol/messages/source-registration.d.ts +7 -6
- package/dist/protocol/messages/source-registration.js +7 -6
- package/dist/protocol/version.js +1 -1
- package/dist/provenance/bundle.d.ts +54 -0
- package/dist/provenance/bundle.js +53 -0
- package/dist/provenance/dsse.d.ts +39 -0
- package/dist/provenance/dsse.js +53 -0
- package/dist/provenance/schema.js +1 -1
- package/dist/provenance/verify.d.ts +71 -0
- package/dist/provenance/verify.js +135 -0
- package/dist/provider/changed-files-fetcher.js +1 -1
- package/dist/provider/check-run-conclusion.js +1 -1
- package/dist/provider/check-status-poster.js +1 -1
- package/dist/provider/clone-token-provider.js +1 -1
- package/dist/provider/contributor-resolver.js +1 -1
- package/dist/provider/index.js +1 -1
- package/dist/provider/lock-file-fetcher.js +1 -1
- package/dist/provider/lock-file-parse-error.js +3 -1
- package/dist/provider/repo-url-builder.js +1 -1
- package/dist/provider/types.d.ts +2 -2
- package/dist/provider/types.js +1 -1
- package/dist/provider/webhook-normalizer.js +1 -1
- package/dist/registration/registerable-trigger-type.js +1 -1
- package/dist/scaler/resource-types.js +1 -1
- package/dist/scaler/scaler-backend-type.js +1 -1
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/types.js +1 -1
- package/dist/state-machine/index.js +1 -1
- package/dist/state-machine/machine.js +1 -1
- package/dist/state-machine/types.js +1 -1
- package/dist/trigger/decision-trace.js +1 -1
- package/dist/trigger/jsonpath-matcher.js +1 -1
- package/dist/trigger/matcher.js +1 -1
- package/dist/trigger/trigger-event-type.js +1 -1
- package/dist/trigger/types.d.ts +13 -1
- package/dist/trigger/types.js +13 -5
- package/dist/webhook/signature.js +1 -1
- package/dist/ws/close-codes.js +1 -1
- package/dist/ws/rate-limiter.js +3 -1
- package/dist/ws/ws-like.js +1 -1
- package/package.json +19 -1
- package/sbom.spdx.json +55 -5
- package/dist/protocol/messages/observe.js +0 -70
- package/dist/protocol/messages/test-run.js +0 -52
- /package/dist/{chunk-gOLHoazu.js → chunk-BTugEXQM.js} +0 -0
|
@@ -352,6 +352,28 @@ export declare const cacheUserSaveCompleteSchema: z.ZodObject<{
|
|
|
352
352
|
tarHash: z.ZodString;
|
|
353
353
|
sizeBytes: z.ZodNumber;
|
|
354
354
|
}, z.core.$strip>;
|
|
355
|
+
/** Agent -> Orchestrator: request a presigned PUT URL for a provenance bundle. */
|
|
356
|
+
export declare const provenanceUploadRequestSchema: z.ZodObject<{
|
|
357
|
+
type: z.ZodLiteral<"provenance.upload.request">;
|
|
358
|
+
messageId: z.ZodString;
|
|
359
|
+
jobId: z.ZodString;
|
|
360
|
+
subjectDigest: z.ZodString;
|
|
361
|
+
}, z.core.$strip>;
|
|
362
|
+
/** Orchestrator -> Agent: presigned PUT URL for the provenance bundle. */
|
|
363
|
+
export declare const provenanceUploadResponseSchema: z.ZodObject<{
|
|
364
|
+
type: z.ZodLiteral<"provenance.upload.response">;
|
|
365
|
+
requestId: z.ZodString;
|
|
366
|
+
uploadUrl: z.ZodString;
|
|
367
|
+
}, z.core.$strip>;
|
|
368
|
+
/** Agent -> Orchestrator: confirm a provenance bundle upload (records an attestations row). */
|
|
369
|
+
export declare const provenanceUploadCompleteSchema: z.ZodObject<{
|
|
370
|
+
type: z.ZodLiteral<"provenance.upload.complete">;
|
|
371
|
+
messageId: z.ZodString;
|
|
372
|
+
jobId: z.ZodString;
|
|
373
|
+
subjectName: z.ZodString;
|
|
374
|
+
subjectDigest: z.ZodString;
|
|
375
|
+
mediaType: z.ZodString;
|
|
376
|
+
}, z.core.$strip>;
|
|
355
377
|
/** Agent -> Orchestrator: emit a custom event from a running workflow step. */
|
|
356
378
|
export declare const eventEmitSchema: z.ZodObject<{
|
|
357
379
|
type: z.ZodLiteral<"event.emit">;
|
|
@@ -601,6 +623,10 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
601
623
|
requestId: z.ZodString;
|
|
602
624
|
uploadUrl: z.ZodOptional<z.ZodString>;
|
|
603
625
|
skip: z.ZodBoolean;
|
|
626
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
627
|
+
type: z.ZodLiteral<"provenance.upload.response">;
|
|
628
|
+
requestId: z.ZodString;
|
|
629
|
+
uploadUrl: z.ZodString;
|
|
604
630
|
}, z.core.$strip>, z.ZodObject<{
|
|
605
631
|
type: z.ZodLiteral<"event.emit.response">;
|
|
606
632
|
requestId: z.ZodString;
|
|
@@ -804,6 +830,18 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
804
830
|
key: z.ZodString;
|
|
805
831
|
tarHash: z.ZodString;
|
|
806
832
|
sizeBytes: z.ZodNumber;
|
|
833
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
834
|
+
type: z.ZodLiteral<"provenance.upload.request">;
|
|
835
|
+
messageId: z.ZodString;
|
|
836
|
+
jobId: z.ZodString;
|
|
837
|
+
subjectDigest: z.ZodString;
|
|
838
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
839
|
+
type: z.ZodLiteral<"provenance.upload.complete">;
|
|
840
|
+
messageId: z.ZodString;
|
|
841
|
+
jobId: z.ZodString;
|
|
842
|
+
subjectName: z.ZodString;
|
|
843
|
+
subjectDigest: z.ZodString;
|
|
844
|
+
mediaType: z.ZodString;
|
|
807
845
|
}, z.core.$strip>, z.ZodObject<{
|
|
808
846
|
type: z.ZodLiteral<"event.emit">;
|
|
809
847
|
jobId: z.ZodString;
|
|
@@ -882,6 +920,9 @@ export type CacheUserRestoreResponse = z.infer<typeof cacheUserRestoreResponseSc
|
|
|
882
920
|
export type CacheUserSaveRequest = z.infer<typeof cacheUserSaveRequestSchema>;
|
|
883
921
|
export type CacheUserSaveResponse = z.infer<typeof cacheUserSaveResponseSchema>;
|
|
884
922
|
export type CacheUserSaveComplete = z.infer<typeof cacheUserSaveCompleteSchema>;
|
|
923
|
+
export type ProvenanceUploadRequest = z.infer<typeof provenanceUploadRequestSchema>;
|
|
924
|
+
export type ProvenanceUploadResponse = z.infer<typeof provenanceUploadResponseSchema>;
|
|
925
|
+
export type ProvenanceUploadComplete = z.infer<typeof provenanceUploadCompleteSchema>;
|
|
885
926
|
export type FleetLogsRequest = z.infer<typeof fleetLogsRequestSchema>;
|
|
886
927
|
export type FleetBundleChunk = z.infer<typeof fleetBundleChunkSchema>;
|
|
887
928
|
export type FleetBundleError = z.infer<typeof fleetBundleErrorSchema>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-BTugEXQM.js";
|
|
2
2
|
import { ExecutionJobStatus, ExecutionStepStatus } from "./execution-status.js";
|
|
3
3
|
import { approverClauseSchema } from "../../approval/types.js";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -471,6 +471,34 @@ const cacheUserSaveCompleteSchema = z.object({
|
|
|
471
471
|
/** Tarball size in bytes (drives quota accounting). */
|
|
472
472
|
sizeBytes: z.number().int().nonnegative()
|
|
473
473
|
});
|
|
474
|
+
/** Agent -> Orchestrator: request a presigned PUT URL for a provenance bundle. */
|
|
475
|
+
const provenanceUploadRequestSchema = z.object({
|
|
476
|
+
type: z.literal("provenance.upload.request"),
|
|
477
|
+
messageId: z.string(),
|
|
478
|
+
/** Job producing the attestation (ownership-checked; runId resolved server-side). */
|
|
479
|
+
jobId: z.string(),
|
|
480
|
+
/** Primary subject digest (lowercase hex) — the storage-key discriminator. */
|
|
481
|
+
subjectDigest: z.string()
|
|
482
|
+
});
|
|
483
|
+
/** Orchestrator -> Agent: presigned PUT URL for the provenance bundle. */
|
|
484
|
+
const provenanceUploadResponseSchema = z.object({
|
|
485
|
+
type: z.literal("provenance.upload.response"),
|
|
486
|
+
requestId: z.string(),
|
|
487
|
+
/** Presigned PUT URL, or '' when storage is unavailable. */
|
|
488
|
+
uploadUrl: z.string()
|
|
489
|
+
});
|
|
490
|
+
/** Agent -> Orchestrator: confirm a provenance bundle upload (records an attestations row). */
|
|
491
|
+
const provenanceUploadCompleteSchema = z.object({
|
|
492
|
+
type: z.literal("provenance.upload.complete"),
|
|
493
|
+
messageId: z.string(),
|
|
494
|
+
jobId: z.string(),
|
|
495
|
+
/** Caller-supplied artifact name. */
|
|
496
|
+
subjectName: z.string(),
|
|
497
|
+
/** Primary subject digest (lowercase hex). */
|
|
498
|
+
subjectDigest: z.string(),
|
|
499
|
+
/** Bundle media type. */
|
|
500
|
+
mediaType: z.string()
|
|
501
|
+
});
|
|
474
502
|
/** Agent -> Orchestrator: emit a custom event from a running workflow step. */
|
|
475
503
|
const eventEmitSchema = z.object({
|
|
476
504
|
type: z.literal("event.emit"),
|
|
@@ -640,6 +668,7 @@ const orchestratorToAgentMessageSchema = z.discriminatedUnion("type", [
|
|
|
640
668
|
cacheUploadResponseSchema,
|
|
641
669
|
cacheUserRestoreResponseSchema,
|
|
642
670
|
cacheUserSaveResponseSchema,
|
|
671
|
+
provenanceUploadResponseSchema,
|
|
643
672
|
eventEmitResponseSchema,
|
|
644
673
|
agentApiResponseSchema,
|
|
645
674
|
agentAuthSuccessSchema,
|
|
@@ -665,6 +694,8 @@ const agentToOrchestratorMessageSchema = z.discriminatedUnion("type", [
|
|
|
665
694
|
cacheUserRestoreRequestSchema,
|
|
666
695
|
cacheUserSaveRequestSchema,
|
|
667
696
|
cacheUserSaveCompleteSchema,
|
|
697
|
+
provenanceUploadRequestSchema,
|
|
698
|
+
provenanceUploadCompleteSchema,
|
|
668
699
|
eventEmitSchema,
|
|
669
700
|
agentApiRequestSchema,
|
|
670
701
|
agentMetricsSchema,
|
|
@@ -674,6 +705,6 @@ const agentToOrchestratorMessageSchema = z.discriminatedUnion("type", [
|
|
|
674
705
|
stepApprovalRequestSchema
|
|
675
706
|
]);
|
|
676
707
|
//#endregion
|
|
677
|
-
export { CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, gitAuthSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, registerAckSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema };
|
|
708
|
+
export { CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, gitAuthSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, provenanceUploadCompleteSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, registerAckSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema };
|
|
678
709
|
|
|
679
710
|
//# sourceMappingURL=orchestrator-agent.js.map
|
|
@@ -410,6 +410,7 @@ export declare const platformToOrchestratorMessageSchema: z.ZodDiscriminatedUnio
|
|
|
410
410
|
type: z.ZodLiteral<"auth.success">;
|
|
411
411
|
connectionId: z.ZodString;
|
|
412
412
|
orgPublicAlias: z.ZodOptional<z.ZodString>;
|
|
413
|
+
orgId: z.ZodOptional<z.ZodString>;
|
|
413
414
|
}, z.core.$strip>, z.ZodObject<{
|
|
414
415
|
type: z.ZodLiteral<"auth.failure">;
|
|
415
416
|
reason: z.ZodString;
|
|
@@ -492,6 +493,29 @@ export declare const platformToOrchestratorMessageSchema: z.ZodDiscriminatedUnio
|
|
|
492
493
|
runId: z.ZodString;
|
|
493
494
|
jobId: z.ZodString;
|
|
494
495
|
stepIndex: z.ZodNumber;
|
|
496
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
497
|
+
type: z.ZodLiteral<"dashboard.attestations.list">;
|
|
498
|
+
requestId: z.ZodString;
|
|
499
|
+
actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
500
|
+
type: z.ZodLiteral<"user">;
|
|
501
|
+
sub: z.ZodString;
|
|
502
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
503
|
+
type: z.ZodLiteral<"api_key">;
|
|
504
|
+
keyId: z.ZodString;
|
|
505
|
+
ownerSub: z.ZodString;
|
|
506
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
507
|
+
type: z.ZodLiteral<"service_account">;
|
|
508
|
+
id: z.ZodString;
|
|
509
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
510
|
+
type: z.ZodLiteral<"platform_operator">;
|
|
511
|
+
sub: z.ZodString;
|
|
512
|
+
reason: z.ZodString;
|
|
513
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
514
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
515
|
+
type: z.ZodLiteral<"system">;
|
|
516
|
+
component: z.ZodString;
|
|
517
|
+
}, z.core.$strip>], "type">;
|
|
518
|
+
runId: z.ZodString;
|
|
495
519
|
}, z.core.$strip>, z.ZodObject<{
|
|
496
520
|
type: z.ZodLiteral<"dashboard.runs.list">;
|
|
497
521
|
requestId: z.ZodString;
|
|
@@ -702,6 +726,8 @@ export declare const platformToOrchestratorMessageSchema: z.ZodDiscriminatedUnio
|
|
|
702
726
|
type: z.ZodLiteral<"system">;
|
|
703
727
|
component: z.ZodString;
|
|
704
728
|
}, z.core.$strip>], "type">;
|
|
729
|
+
includeSecrets: z.ZodOptional<z.ZodBoolean>;
|
|
730
|
+
orgId: z.ZodOptional<z.ZodString>;
|
|
705
731
|
}, z.core.$strip>, z.ZodObject<{
|
|
706
732
|
type: z.ZodLiteral<"dashboard.environments.get">;
|
|
707
733
|
requestId: z.ZodString;
|
|
@@ -749,8 +775,8 @@ export declare const platformToOrchestratorMessageSchema: z.ZodDiscriminatedUnio
|
|
|
749
775
|
}, z.core.$strip>], "type">;
|
|
750
776
|
name: z.ZodString;
|
|
751
777
|
envType: z.ZodEnum<{
|
|
752
|
-
fixed: "fixed";
|
|
753
778
|
glob: "glob";
|
|
779
|
+
fixed: "fixed";
|
|
754
780
|
}>;
|
|
755
781
|
globPattern: z.ZodOptional<z.ZodString>;
|
|
756
782
|
branchRestrictions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -789,8 +815,8 @@ export declare const platformToOrchestratorMessageSchema: z.ZodDiscriminatedUnio
|
|
|
789
815
|
updates: z.ZodObject<{
|
|
790
816
|
name: z.ZodOptional<z.ZodString>;
|
|
791
817
|
envType: z.ZodOptional<z.ZodEnum<{
|
|
792
|
-
fixed: "fixed";
|
|
793
818
|
glob: "glob";
|
|
819
|
+
fixed: "fixed";
|
|
794
820
|
}>>;
|
|
795
821
|
globPattern: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
796
822
|
branchRestrictions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
@@ -1830,9 +1856,11 @@ export declare const platformToOrchestratorMessageSchema: z.ZodDiscriminatedUnio
|
|
|
1830
1856
|
"run.payload.read": "run.payload.read";
|
|
1831
1857
|
"run.orch_logs.read": "run.orch_logs.read";
|
|
1832
1858
|
"step.logs.read": "step.logs.read";
|
|
1859
|
+
"attestations.read": "attestations.read";
|
|
1833
1860
|
"run.cancel": "run.cancel";
|
|
1834
1861
|
"run.rerun": "run.rerun";
|
|
1835
1862
|
"run.manual_schedule": "run.manual_schedule";
|
|
1863
|
+
"run.trigger": "run.trigger";
|
|
1836
1864
|
"job.cancel": "job.cancel";
|
|
1837
1865
|
"event_log.list.read": "event_log.list.read";
|
|
1838
1866
|
"event_log.detail.read": "event_log.detail.read";
|
|
@@ -1893,8 +1921,8 @@ export declare const platformToOrchestratorMessageSchema: z.ZodDiscriminatedUnio
|
|
|
1893
1921
|
targetType: z.ZodOptional<z.ZodEnum<{
|
|
1894
1922
|
run: "run";
|
|
1895
1923
|
job: "job";
|
|
1896
|
-
step: "step";
|
|
1897
1924
|
payload: "payload";
|
|
1925
|
+
step: "step";
|
|
1898
1926
|
event_log: "event_log";
|
|
1899
1927
|
event_log_payload: "event_log_payload";
|
|
1900
1928
|
secret_scope: "secret_scope";
|
|
@@ -1915,6 +1943,143 @@ export declare const platformToOrchestratorMessageSchema: z.ZodDiscriminatedUnio
|
|
|
1915
1943
|
q: z.ZodOptional<z.ZodString>;
|
|
1916
1944
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
1917
1945
|
cursor: z.ZodOptional<z.ZodString>;
|
|
1946
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1947
|
+
type: z.ZodLiteral<"test.relay.uploads.init">;
|
|
1948
|
+
requestId: z.ZodString;
|
|
1949
|
+
actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1950
|
+
type: z.ZodLiteral<"user">;
|
|
1951
|
+
sub: z.ZodString;
|
|
1952
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1953
|
+
type: z.ZodLiteral<"api_key">;
|
|
1954
|
+
keyId: z.ZodString;
|
|
1955
|
+
ownerSub: z.ZodString;
|
|
1956
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1957
|
+
type: z.ZodLiteral<"service_account">;
|
|
1958
|
+
id: z.ZodString;
|
|
1959
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1960
|
+
type: z.ZodLiteral<"platform_operator">;
|
|
1961
|
+
sub: z.ZodString;
|
|
1962
|
+
reason: z.ZodString;
|
|
1963
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1964
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1965
|
+
type: z.ZodLiteral<"system">;
|
|
1966
|
+
component: z.ZodString;
|
|
1967
|
+
}, z.core.$strip>], "type">;
|
|
1968
|
+
routingKey: z.ZodString;
|
|
1969
|
+
sha: z.ZodOptional<z.ZodString>;
|
|
1970
|
+
fileCount: z.ZodOptional<z.ZodNumber>;
|
|
1971
|
+
compressedSize: z.ZodOptional<z.ZodNumber>;
|
|
1972
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1973
|
+
type: z.ZodLiteral<"test.relay.trigger">;
|
|
1974
|
+
requestId: z.ZodString;
|
|
1975
|
+
actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1976
|
+
type: z.ZodLiteral<"user">;
|
|
1977
|
+
sub: z.ZodString;
|
|
1978
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1979
|
+
type: z.ZodLiteral<"api_key">;
|
|
1980
|
+
keyId: z.ZodString;
|
|
1981
|
+
ownerSub: z.ZodString;
|
|
1982
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1983
|
+
type: z.ZodLiteral<"service_account">;
|
|
1984
|
+
id: z.ZodString;
|
|
1985
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1986
|
+
type: z.ZodLiteral<"platform_operator">;
|
|
1987
|
+
sub: z.ZodString;
|
|
1988
|
+
reason: z.ZodString;
|
|
1989
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1990
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1991
|
+
type: z.ZodLiteral<"system">;
|
|
1992
|
+
component: z.ZodString;
|
|
1993
|
+
}, z.core.$strip>], "type">;
|
|
1994
|
+
routingKey: z.ZodString;
|
|
1995
|
+
fixtureId: z.ZodString;
|
|
1996
|
+
event: z.ZodObject<{
|
|
1997
|
+
type: z.ZodString;
|
|
1998
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1999
|
+
targetBranch: z.ZodString;
|
|
2000
|
+
sourceBranch: z.ZodOptional<z.ZodString>;
|
|
2001
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2002
|
+
changedFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2003
|
+
}, z.core.$strip>;
|
|
2004
|
+
workflowName: z.ZodOptional<z.ZodString>;
|
|
2005
|
+
uploadId: z.ZodOptional<z.ZodString>;
|
|
2006
|
+
cliPublicKey: z.ZodOptional<z.ZodString>;
|
|
2007
|
+
inlineLockFile: z.ZodOptional<z.ZodString>;
|
|
2008
|
+
fullRepo: z.ZodOptional<z.ZodBoolean>;
|
|
2009
|
+
secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2010
|
+
encryptedSecrets: z.ZodOptional<z.ZodString>;
|
|
2011
|
+
encryptedSecretsKey: z.ZodOptional<z.ZodString>;
|
|
2012
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2013
|
+
type: z.ZodLiteral<"test.relay.run.status">;
|
|
2014
|
+
requestId: z.ZodString;
|
|
2015
|
+
actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2016
|
+
type: z.ZodLiteral<"user">;
|
|
2017
|
+
sub: z.ZodString;
|
|
2018
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2019
|
+
type: z.ZodLiteral<"api_key">;
|
|
2020
|
+
keyId: z.ZodString;
|
|
2021
|
+
ownerSub: z.ZodString;
|
|
2022
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2023
|
+
type: z.ZodLiteral<"service_account">;
|
|
2024
|
+
id: z.ZodString;
|
|
2025
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2026
|
+
type: z.ZodLiteral<"platform_operator">;
|
|
2027
|
+
sub: z.ZodString;
|
|
2028
|
+
reason: z.ZodString;
|
|
2029
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
2030
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2031
|
+
type: z.ZodLiteral<"system">;
|
|
2032
|
+
component: z.ZodString;
|
|
2033
|
+
}, z.core.$strip>], "type">;
|
|
2034
|
+
runId: z.ZodString;
|
|
2035
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2036
|
+
type: z.ZodLiteral<"test.relay.run.logs">;
|
|
2037
|
+
requestId: z.ZodString;
|
|
2038
|
+
actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2039
|
+
type: z.ZodLiteral<"user">;
|
|
2040
|
+
sub: z.ZodString;
|
|
2041
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2042
|
+
type: z.ZodLiteral<"api_key">;
|
|
2043
|
+
keyId: z.ZodString;
|
|
2044
|
+
ownerSub: z.ZodString;
|
|
2045
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2046
|
+
type: z.ZodLiteral<"service_account">;
|
|
2047
|
+
id: z.ZodString;
|
|
2048
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2049
|
+
type: z.ZodLiteral<"platform_operator">;
|
|
2050
|
+
sub: z.ZodString;
|
|
2051
|
+
reason: z.ZodString;
|
|
2052
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
2053
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2054
|
+
type: z.ZodLiteral<"system">;
|
|
2055
|
+
component: z.ZodString;
|
|
2056
|
+
}, z.core.$strip>], "type">;
|
|
2057
|
+
runId: z.ZodString;
|
|
2058
|
+
cursor: z.ZodNumber;
|
|
2059
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2060
|
+
type: z.ZodLiteral<"test.relay.cancel">;
|
|
2061
|
+
requestId: z.ZodString;
|
|
2062
|
+
actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2063
|
+
type: z.ZodLiteral<"user">;
|
|
2064
|
+
sub: z.ZodString;
|
|
2065
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2066
|
+
type: z.ZodLiteral<"api_key">;
|
|
2067
|
+
keyId: z.ZodString;
|
|
2068
|
+
ownerSub: z.ZodString;
|
|
2069
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2070
|
+
type: z.ZodLiteral<"service_account">;
|
|
2071
|
+
id: z.ZodString;
|
|
2072
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2073
|
+
type: z.ZodLiteral<"platform_operator">;
|
|
2074
|
+
sub: z.ZodString;
|
|
2075
|
+
reason: z.ZodString;
|
|
2076
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
2077
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2078
|
+
type: z.ZodLiteral<"system">;
|
|
2079
|
+
component: z.ZodString;
|
|
2080
|
+
}, z.core.$strip>], "type">;
|
|
2081
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
2082
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
1918
2083
|
}, z.core.$strip>], "type">;
|
|
1919
2084
|
/** All messages that flow from Orchestrator to Platform.
|
|
1920
2085
|
*
|
|
@@ -1966,6 +2131,7 @@ export declare const orchestratorToPlatformMessageSchema: z.ZodDiscriminatedUnio
|
|
|
1966
2131
|
failed: "failed";
|
|
1967
2132
|
cancelled: "cancelled";
|
|
1968
2133
|
cancelling: "cancelling";
|
|
2134
|
+
held: "held";
|
|
1969
2135
|
}>;
|
|
1970
2136
|
repoIdentifier: z.ZodOptional<z.ZodString>;
|
|
1971
2137
|
sha: z.ZodOptional<z.ZodString>;
|
|
@@ -2077,6 +2243,7 @@ export declare const orchestratorToPlatformMessageSchema: z.ZodDiscriminatedUnio
|
|
|
2077
2243
|
failed: "failed";
|
|
2078
2244
|
cancelled: "cancelled";
|
|
2079
2245
|
cancelling: "cancelling";
|
|
2246
|
+
held: "held";
|
|
2080
2247
|
}>;
|
|
2081
2248
|
routingKey: z.ZodOptional<z.ZodString>;
|
|
2082
2249
|
repoIdentifier: z.ZodOptional<z.ZodString>;
|
|
@@ -2155,7 +2322,7 @@ export declare const orchestratorToPlatformMessageSchema: z.ZodDiscriminatedUnio
|
|
|
2155
2322
|
github_app: "github_app";
|
|
2156
2323
|
generic_webhook: "generic_webhook";
|
|
2157
2324
|
universal_git: "universal_git";
|
|
2158
|
-
|
|
2325
|
+
local: "local";
|
|
2159
2326
|
}>;
|
|
2160
2327
|
}, z.core.$strip>>;
|
|
2161
2328
|
instanceId: z.ZodOptional<z.ZodString>;
|
|
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
* grouping logic) to render an icon and friendly label for each source.
|
|
5
5
|
*
|
|
6
6
|
* Distinct from `provider` (which collapses universal-git, generic_webhook, and
|
|
7
|
-
*
|
|
7
|
+
* local into the single value `'generic'`): subtype keeps the "what kind of
|
|
8
8
|
* orchestrator-side wiring is this?" distinction visible all the way through
|
|
9
9
|
* the API and UI.
|
|
10
10
|
*
|
|
@@ -13,19 +13,20 @@ import { z } from 'zod';
|
|
|
13
13
|
* - `generic_webhook` — `generic_webhook_sources` row with `provider_type='generic'`.
|
|
14
14
|
* - `universal_git` — `generic_webhook_sources` row with a non-null `git_config`
|
|
15
15
|
* (universal-git provider — gitea, gitlab, forgejo, etc.).
|
|
16
|
-
* - `
|
|
17
|
-
* (
|
|
16
|
+
* - `local` — `generic_webhook_sources` row with `provider_type='local'`
|
|
17
|
+
* (a git repository present on the agent's filesystem,
|
|
18
|
+
* cloned via `file://`).
|
|
18
19
|
*/
|
|
19
20
|
export declare const SourceSubtype: z.ZodEnum<{
|
|
20
21
|
github_app: "github_app";
|
|
21
22
|
generic_webhook: "generic_webhook";
|
|
22
23
|
universal_git: "universal_git";
|
|
23
|
-
|
|
24
|
+
local: "local";
|
|
24
25
|
}>;
|
|
25
26
|
export type SourceSubtype = z.infer<typeof SourceSubtype>;
|
|
26
27
|
/**
|
|
27
28
|
* Source provider family used by Platform's webhook router. Coarser-grained
|
|
28
|
-
* than `SourceSubtype` — every universal-git / generic_webhook /
|
|
29
|
+
* than `SourceSubtype` — every universal-git / generic_webhook / local row
|
|
29
30
|
* collapses to `'generic'` here because Platform routes them through the same
|
|
30
31
|
* generic webhook ingress.
|
|
31
32
|
*/
|
|
@@ -53,7 +54,7 @@ export declare const sourceRegistrationSchema: z.ZodObject<{
|
|
|
53
54
|
github_app: "github_app";
|
|
54
55
|
generic_webhook: "generic_webhook";
|
|
55
56
|
universal_git: "universal_git";
|
|
56
|
-
|
|
57
|
+
local: "local";
|
|
57
58
|
}>;
|
|
58
59
|
}, z.core.$strip>>;
|
|
59
60
|
instanceId: z.ZodOptional<z.ZodString>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-BTugEXQM.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/protocol/messages/source-registration.ts
|
|
4
4
|
/**
|
|
@@ -6,7 +6,7 @@ import { z } from "zod";
|
|
|
6
6
|
* grouping logic) to render an icon and friendly label for each source.
|
|
7
7
|
*
|
|
8
8
|
* Distinct from `provider` (which collapses universal-git, generic_webhook, and
|
|
9
|
-
*
|
|
9
|
+
* local into the single value `'generic'`): subtype keeps the "what kind of
|
|
10
10
|
* orchestrator-side wiring is this?" distinction visible all the way through
|
|
11
11
|
* the API and UI.
|
|
12
12
|
*
|
|
@@ -15,18 +15,19 @@ import { z } from "zod";
|
|
|
15
15
|
* - `generic_webhook` — `generic_webhook_sources` row with `provider_type='generic'`.
|
|
16
16
|
* - `universal_git` — `generic_webhook_sources` row with a non-null `git_config`
|
|
17
17
|
* (universal-git provider — gitea, gitlab, forgejo, etc.).
|
|
18
|
-
* - `
|
|
19
|
-
* (
|
|
18
|
+
* - `local` — `generic_webhook_sources` row with `provider_type='local'`
|
|
19
|
+
* (a git repository present on the agent's filesystem,
|
|
20
|
+
* cloned via `file://`).
|
|
20
21
|
*/
|
|
21
22
|
const SourceSubtype = z.enum([
|
|
22
23
|
"github_app",
|
|
23
24
|
"generic_webhook",
|
|
24
25
|
"universal_git",
|
|
25
|
-
"
|
|
26
|
+
"local"
|
|
26
27
|
]);
|
|
27
28
|
/**
|
|
28
29
|
* Source provider family used by Platform's webhook router. Coarser-grained
|
|
29
|
-
* than `SourceSubtype` — every universal-git / generic_webhook /
|
|
30
|
+
* than `SourceSubtype` — every universal-git / generic_webhook / local row
|
|
30
31
|
* collapses to `'generic'` here because Platform routes them through the same
|
|
31
32
|
* generic webhook ingress.
|
|
32
33
|
*/
|
package/dist/protocol/version.js
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KiCI provenance bundle: the Mode-A (KiCI-signed) attestation package.
|
|
3
|
+
*
|
|
4
|
+
* A KiCI bundle is the Sigstore model with the KiCI identity JWT standing in
|
|
5
|
+
* for the Fulcio certificate and no transparency log: it carries the DSSE
|
|
6
|
+
* envelope over the in-toto statement, the ephemeral public key that signed it,
|
|
7
|
+
* and the identity JWT that anchors the statement's build context to a
|
|
8
|
+
* KiCI-minted identity (verified offline against the Platform JWKS).
|
|
9
|
+
*
|
|
10
|
+
* Pure schema + constants, browser-safe — the agent producer and the verifier
|
|
11
|
+
* both import it. Exported at `@kici-dev/engine/provenance/bundle`.
|
|
12
|
+
*/
|
|
13
|
+
import { z } from 'zod';
|
|
14
|
+
/** Versioned media type for the KiCI-custom Mode-A bundle (verifier dispatches on it). */
|
|
15
|
+
export declare const KICI_PROVENANCE_BUNDLE_MEDIA_TYPE = "application/vnd.kici.provenance.bundle+json;version=0.1";
|
|
16
|
+
/** OIDC audience the agent requests for the identity token bound into a bundle. */
|
|
17
|
+
export declare const KICI_PROVENANCE_AUDIENCE = "kici-provenance";
|
|
18
|
+
/** in-toto DSSE payload type for the signed statement. */
|
|
19
|
+
export declare const IN_TOTO_PAYLOAD_TYPE = "application/vnd.in-toto+json";
|
|
20
|
+
/** Signing mode of a stored attestation. Mode A = KiCI-signed (the only mode today). */
|
|
21
|
+
export declare const AttestationMode: z.ZodEnum<{
|
|
22
|
+
kici: "kici";
|
|
23
|
+
}>;
|
|
24
|
+
export type AttestationMode = z.infer<typeof AttestationMode>;
|
|
25
|
+
/** Object-storage prefix for provenance bundles. */
|
|
26
|
+
export declare const PROVENANCE_STORAGE_PREFIX = "provenance";
|
|
27
|
+
/**
|
|
28
|
+
* Storage key for a provenance bundle:
|
|
29
|
+
* `provenance/{runId}/{jobId}/{subjectDigest}.kici.json`. Shared by the agent
|
|
30
|
+
* producer and the orchestrator persistence path so the two never drift.
|
|
31
|
+
*/
|
|
32
|
+
export declare function provenanceStorageKey(runId: string, jobId: string, subjectDigest: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Mode-A (KiCI-signed) bundle: the DSSE envelope over the statement plus the
|
|
35
|
+
* verification material (the ephemeral signing public key as a JWK + the
|
|
36
|
+
* identity JWT).
|
|
37
|
+
*/
|
|
38
|
+
export declare const kiciBundleSchema: z.ZodObject<{
|
|
39
|
+
mediaType: z.ZodLiteral<"application/vnd.kici.provenance.bundle+json;version=0.1">;
|
|
40
|
+
dsseEnvelope: z.ZodObject<{
|
|
41
|
+
payloadType: z.ZodString;
|
|
42
|
+
payload: z.ZodString;
|
|
43
|
+
signatures: z.ZodArray<z.ZodObject<{
|
|
44
|
+
keyid: z.ZodString;
|
|
45
|
+
sig: z.ZodString;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
verificationMaterial: z.ZodObject<{
|
|
49
|
+
publicKey: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
50
|
+
identityToken: z.ZodString;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type KiciBundle = z.infer<typeof kiciBundleSchema>;
|
|
54
|
+
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
|
+
import { dsseEnvelopeSchema } from "./dsse.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/provenance/bundle.ts
|
|
5
|
+
/**
|
|
6
|
+
* KiCI provenance bundle: the Mode-A (KiCI-signed) attestation package.
|
|
7
|
+
*
|
|
8
|
+
* A KiCI bundle is the Sigstore model with the KiCI identity JWT standing in
|
|
9
|
+
* for the Fulcio certificate and no transparency log: it carries the DSSE
|
|
10
|
+
* envelope over the in-toto statement, the ephemeral public key that signed it,
|
|
11
|
+
* and the identity JWT that anchors the statement's build context to a
|
|
12
|
+
* KiCI-minted identity (verified offline against the Platform JWKS).
|
|
13
|
+
*
|
|
14
|
+
* Pure schema + constants, browser-safe — the agent producer and the verifier
|
|
15
|
+
* both import it. Exported at `@kici-dev/engine/provenance/bundle`.
|
|
16
|
+
*/
|
|
17
|
+
/** Versioned media type for the KiCI-custom Mode-A bundle (verifier dispatches on it). */
|
|
18
|
+
const KICI_PROVENANCE_BUNDLE_MEDIA_TYPE = "application/vnd.kici.provenance.bundle+json;version=0.1";
|
|
19
|
+
/** OIDC audience the agent requests for the identity token bound into a bundle. */
|
|
20
|
+
const KICI_PROVENANCE_AUDIENCE = "kici-provenance";
|
|
21
|
+
/** in-toto DSSE payload type for the signed statement. */
|
|
22
|
+
const IN_TOTO_PAYLOAD_TYPE = "application/vnd.in-toto+json";
|
|
23
|
+
/** Signing mode of a stored attestation. Mode A = KiCI-signed (the only mode today). */
|
|
24
|
+
const AttestationMode = z.enum(["kici"]);
|
|
25
|
+
/** Object-storage prefix for provenance bundles. */
|
|
26
|
+
const PROVENANCE_STORAGE_PREFIX = "provenance";
|
|
27
|
+
/**
|
|
28
|
+
* Storage key for a provenance bundle:
|
|
29
|
+
* `provenance/{runId}/{jobId}/{subjectDigest}.kici.json`. Shared by the agent
|
|
30
|
+
* producer and the orchestrator persistence path so the two never drift.
|
|
31
|
+
*/
|
|
32
|
+
function provenanceStorageKey(runId, jobId, subjectDigest) {
|
|
33
|
+
return `${PROVENANCE_STORAGE_PREFIX}/${runId}/${jobId}/${subjectDigest}.kici.json`;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Mode-A (KiCI-signed) bundle: the DSSE envelope over the statement plus the
|
|
37
|
+
* verification material (the ephemeral signing public key as a JWK + the
|
|
38
|
+
* identity JWT).
|
|
39
|
+
*/
|
|
40
|
+
const kiciBundleSchema = z.object({
|
|
41
|
+
mediaType: z.literal(KICI_PROVENANCE_BUNDLE_MEDIA_TYPE),
|
|
42
|
+
dsseEnvelope: dsseEnvelopeSchema,
|
|
43
|
+
verificationMaterial: z.object({
|
|
44
|
+
/** JWK of the ephemeral ES256 key that signed the DSSE envelope. */
|
|
45
|
+
publicKey: z.record(z.string(), z.unknown()),
|
|
46
|
+
/** The KiCI ID token (verified against the Platform JWKS). */
|
|
47
|
+
identityToken: z.string()
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
export { AttestationMode, IN_TOTO_PAYLOAD_TYPE, KICI_PROVENANCE_AUDIENCE, KICI_PROVENANCE_BUNDLE_MEDIA_TYPE, PROVENANCE_STORAGE_PREFIX, kiciBundleSchema, provenanceStorageKey };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=bundle.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSSE (Dead Simple Signing Envelope) helpers for KiCI provenance.
|
|
3
|
+
*
|
|
4
|
+
* Provides the in-toto pre-authentication encoding (PAE) and the envelope
|
|
5
|
+
* assembly used by the agent producer and the verifier. Pure byte / base64
|
|
6
|
+
* assembly with no Node-only crypto, so this module stays browser-safe and is
|
|
7
|
+
* exported at the subpath `@kici-dev/engine/provenance/dsse`.
|
|
8
|
+
*
|
|
9
|
+
* Spec reference: https://github.com/secure-systems-lab/dsse/blob/master/protocol.md
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
/** A single DSSE signature: a key id plus the base64 signature bytes. */
|
|
13
|
+
export declare const dsseSignatureSchema: z.ZodObject<{
|
|
14
|
+
keyid: z.ZodString;
|
|
15
|
+
sig: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type DsseSignature = z.infer<typeof dsseSignatureSchema>;
|
|
18
|
+
/** A DSSE envelope: the payload type, the base64 payload, and ≥1 signature. */
|
|
19
|
+
export declare const dsseEnvelopeSchema: z.ZodObject<{
|
|
20
|
+
payloadType: z.ZodString;
|
|
21
|
+
payload: z.ZodString;
|
|
22
|
+
signatures: z.ZodArray<z.ZodObject<{
|
|
23
|
+
keyid: z.ZodString;
|
|
24
|
+
sig: z.ZodString;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type DsseEnvelope = z.infer<typeof dsseEnvelopeSchema>;
|
|
28
|
+
/**
|
|
29
|
+
* DSSE pre-authentication encoding: `"DSSEv1 <lenType> <type> <lenBody> <body>"`.
|
|
30
|
+
* The length fields count bytes (UTF-8 for the type, raw bytes for the payload).
|
|
31
|
+
* This is the exact byte sequence that gets signed and verified.
|
|
32
|
+
*/
|
|
33
|
+
export declare function dssePae(payloadType: string, payload: Uint8Array): Uint8Array;
|
|
34
|
+
/** Assemble a {@link DsseEnvelope} from the payload bytes + raw signature bytes. */
|
|
35
|
+
export declare function buildDsseEnvelope(payloadType: string, payloadBytes: Uint8Array, signatures: {
|
|
36
|
+
keyid: string;
|
|
37
|
+
sig: Uint8Array;
|
|
38
|
+
}[]): DsseEnvelope;
|
|
39
|
+
//# sourceMappingURL=dsse.d.ts.map
|