@kici-dev/engine 0.1.16 → 0.1.18
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.d.ts +1 -1
- package/dist/env/environment-allowlist.js +13 -2
- 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 +123 -0
- package/dist/fanout/materialize.js +176 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +9 -7
- package/dist/labels/compile.d.ts +40 -0
- package/dist/labels/compile.js +91 -0
- package/dist/labels-match.d.ts +32 -0
- package/dist/labels-match.js +55 -0
- package/dist/labels.js +1 -1
- package/dist/matrix/expand.d.ts +48 -0
- package/dist/matrix/expand.js +72 -0
- package/dist/matrix/format.d.ts +10 -0
- package/dist/matrix/format.js +20 -0
- package/dist/metrics/catalog-policy.js +8 -3
- package/dist/metrics/metric-catalog.generated.d.ts +11 -1
- package/dist/metrics/metric-catalog.generated.js +14 -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 +985 -57
- package/dist/protocol/messages/dashboard.js +368 -13
- 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 +56 -0
- package/dist/protocol/messages/orchestrator-agent.js +47 -2
- package/dist/protocol/messages/peer.d.ts +48 -0
- package/dist/protocol/messages/peer.js +12 -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 +76 -3
- package/dist/trigger/types.js +33 -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 +26 -3
- package/sbom.spdx.json +85 -10
- 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
|
@@ -13,6 +13,21 @@ export declare const CacheRefScope: z.ZodEnum<{
|
|
|
13
13
|
isolated: "isolated";
|
|
14
14
|
}>;
|
|
15
15
|
export type CacheRefScope = z.infer<typeof CacheRefScope>;
|
|
16
|
+
/**
|
|
17
|
+
* Frozen snapshot of upstream job outputs for a result-aware dynamic generator.
|
|
18
|
+
*
|
|
19
|
+
* Captured once when the deferred eval job is dispatched (its upstreams are
|
|
20
|
+
* terminal at that point) and replayed unchanged on agent-side re-eval, so the
|
|
21
|
+
* generator sees the same `ctx.needs` data on both passes.
|
|
22
|
+
*
|
|
23
|
+
* - `jobs` maps an upstream job name to its outputs record.
|
|
24
|
+
* - `groups` maps a dynamic group name to its ordered member job names.
|
|
25
|
+
*/
|
|
26
|
+
export declare const upstreamSnapshotSchema: z.ZodObject<{
|
|
27
|
+
jobs: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
28
|
+
groups: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type UpstreamSnapshot = z.infer<typeof upstreamSnapshotSchema>;
|
|
16
31
|
/**
|
|
17
32
|
* Structured git-clone auth material. Carries everything the agent needs to
|
|
18
33
|
* authenticate a single `git clone`:
|
|
@@ -352,6 +367,28 @@ export declare const cacheUserSaveCompleteSchema: z.ZodObject<{
|
|
|
352
367
|
tarHash: z.ZodString;
|
|
353
368
|
sizeBytes: z.ZodNumber;
|
|
354
369
|
}, z.core.$strip>;
|
|
370
|
+
/** Agent -> Orchestrator: request a presigned PUT URL for a provenance bundle. */
|
|
371
|
+
export declare const provenanceUploadRequestSchema: z.ZodObject<{
|
|
372
|
+
type: z.ZodLiteral<"provenance.upload.request">;
|
|
373
|
+
messageId: z.ZodString;
|
|
374
|
+
jobId: z.ZodString;
|
|
375
|
+
subjectDigest: z.ZodString;
|
|
376
|
+
}, z.core.$strip>;
|
|
377
|
+
/** Orchestrator -> Agent: presigned PUT URL for the provenance bundle. */
|
|
378
|
+
export declare const provenanceUploadResponseSchema: z.ZodObject<{
|
|
379
|
+
type: z.ZodLiteral<"provenance.upload.response">;
|
|
380
|
+
requestId: z.ZodString;
|
|
381
|
+
uploadUrl: z.ZodString;
|
|
382
|
+
}, z.core.$strip>;
|
|
383
|
+
/** Agent -> Orchestrator: confirm a provenance bundle upload (records an attestations row). */
|
|
384
|
+
export declare const provenanceUploadCompleteSchema: z.ZodObject<{
|
|
385
|
+
type: z.ZodLiteral<"provenance.upload.complete">;
|
|
386
|
+
messageId: z.ZodString;
|
|
387
|
+
jobId: z.ZodString;
|
|
388
|
+
subjectName: z.ZodString;
|
|
389
|
+
subjectDigest: z.ZodString;
|
|
390
|
+
mediaType: z.ZodString;
|
|
391
|
+
}, z.core.$strip>;
|
|
355
392
|
/** Agent -> Orchestrator: emit a custom event from a running workflow step. */
|
|
356
393
|
export declare const eventEmitSchema: z.ZodObject<{
|
|
357
394
|
type: z.ZodLiteral<"event.emit">;
|
|
@@ -601,6 +638,10 @@ export declare const orchestratorToAgentMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
601
638
|
requestId: z.ZodString;
|
|
602
639
|
uploadUrl: z.ZodOptional<z.ZodString>;
|
|
603
640
|
skip: z.ZodBoolean;
|
|
641
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
642
|
+
type: z.ZodLiteral<"provenance.upload.response">;
|
|
643
|
+
requestId: z.ZodString;
|
|
644
|
+
uploadUrl: z.ZodString;
|
|
604
645
|
}, z.core.$strip>, z.ZodObject<{
|
|
605
646
|
type: z.ZodLiteral<"event.emit.response">;
|
|
606
647
|
requestId: z.ZodString;
|
|
@@ -804,6 +845,18 @@ export declare const agentToOrchestratorMessageSchema: z.ZodDiscriminatedUnion<[
|
|
|
804
845
|
key: z.ZodString;
|
|
805
846
|
tarHash: z.ZodString;
|
|
806
847
|
sizeBytes: z.ZodNumber;
|
|
848
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
849
|
+
type: z.ZodLiteral<"provenance.upload.request">;
|
|
850
|
+
messageId: z.ZodString;
|
|
851
|
+
jobId: z.ZodString;
|
|
852
|
+
subjectDigest: z.ZodString;
|
|
853
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
854
|
+
type: z.ZodLiteral<"provenance.upload.complete">;
|
|
855
|
+
messageId: z.ZodString;
|
|
856
|
+
jobId: z.ZodString;
|
|
857
|
+
subjectName: z.ZodString;
|
|
858
|
+
subjectDigest: z.ZodString;
|
|
859
|
+
mediaType: z.ZodString;
|
|
807
860
|
}, z.core.$strip>, z.ZodObject<{
|
|
808
861
|
type: z.ZodLiteral<"event.emit">;
|
|
809
862
|
jobId: z.ZodString;
|
|
@@ -882,6 +935,9 @@ export type CacheUserRestoreResponse = z.infer<typeof cacheUserRestoreResponseSc
|
|
|
882
935
|
export type CacheUserSaveRequest = z.infer<typeof cacheUserSaveRequestSchema>;
|
|
883
936
|
export type CacheUserSaveResponse = z.infer<typeof cacheUserSaveResponseSchema>;
|
|
884
937
|
export type CacheUserSaveComplete = z.infer<typeof cacheUserSaveCompleteSchema>;
|
|
938
|
+
export type ProvenanceUploadRequest = z.infer<typeof provenanceUploadRequestSchema>;
|
|
939
|
+
export type ProvenanceUploadResponse = z.infer<typeof provenanceUploadResponseSchema>;
|
|
940
|
+
export type ProvenanceUploadComplete = z.infer<typeof provenanceUploadCompleteSchema>;
|
|
885
941
|
export type FleetLogsRequest = z.infer<typeof fleetLogsRequestSchema>;
|
|
886
942
|
export type FleetBundleChunk = z.infer<typeof fleetBundleChunkSchema>;
|
|
887
943
|
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";
|
|
@@ -14,6 +14,20 @@ import { z } from "zod";
|
|
|
14
14
|
*/
|
|
15
15
|
const CacheRefScope = z.enum(["shared", "isolated"]);
|
|
16
16
|
/**
|
|
17
|
+
* Frozen snapshot of upstream job outputs for a result-aware dynamic generator.
|
|
18
|
+
*
|
|
19
|
+
* Captured once when the deferred eval job is dispatched (its upstreams are
|
|
20
|
+
* terminal at that point) and replayed unchanged on agent-side re-eval, so the
|
|
21
|
+
* generator sees the same `ctx.needs` data on both passes.
|
|
22
|
+
*
|
|
23
|
+
* - `jobs` maps an upstream job name to its outputs record.
|
|
24
|
+
* - `groups` maps a dynamic group name to its ordered member job names.
|
|
25
|
+
*/
|
|
26
|
+
const upstreamSnapshotSchema = z.object({
|
|
27
|
+
jobs: z.record(z.string(), z.record(z.string(), z.unknown())),
|
|
28
|
+
groups: z.record(z.string(), z.array(z.string()))
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
17
31
|
* Structured git-clone auth material. Carries everything the agent needs to
|
|
18
32
|
* authenticate a single `git clone`:
|
|
19
33
|
*
|
|
@@ -471,6 +485,34 @@ const cacheUserSaveCompleteSchema = z.object({
|
|
|
471
485
|
/** Tarball size in bytes (drives quota accounting). */
|
|
472
486
|
sizeBytes: z.number().int().nonnegative()
|
|
473
487
|
});
|
|
488
|
+
/** Agent -> Orchestrator: request a presigned PUT URL for a provenance bundle. */
|
|
489
|
+
const provenanceUploadRequestSchema = z.object({
|
|
490
|
+
type: z.literal("provenance.upload.request"),
|
|
491
|
+
messageId: z.string(),
|
|
492
|
+
/** Job producing the attestation (ownership-checked; runId resolved server-side). */
|
|
493
|
+
jobId: z.string(),
|
|
494
|
+
/** Primary subject digest (lowercase hex) — the storage-key discriminator. */
|
|
495
|
+
subjectDigest: z.string()
|
|
496
|
+
});
|
|
497
|
+
/** Orchestrator -> Agent: presigned PUT URL for the provenance bundle. */
|
|
498
|
+
const provenanceUploadResponseSchema = z.object({
|
|
499
|
+
type: z.literal("provenance.upload.response"),
|
|
500
|
+
requestId: z.string(),
|
|
501
|
+
/** Presigned PUT URL, or '' when storage is unavailable. */
|
|
502
|
+
uploadUrl: z.string()
|
|
503
|
+
});
|
|
504
|
+
/** Agent -> Orchestrator: confirm a provenance bundle upload (records an attestations row). */
|
|
505
|
+
const provenanceUploadCompleteSchema = z.object({
|
|
506
|
+
type: z.literal("provenance.upload.complete"),
|
|
507
|
+
messageId: z.string(),
|
|
508
|
+
jobId: z.string(),
|
|
509
|
+
/** Caller-supplied artifact name. */
|
|
510
|
+
subjectName: z.string(),
|
|
511
|
+
/** Primary subject digest (lowercase hex). */
|
|
512
|
+
subjectDigest: z.string(),
|
|
513
|
+
/** Bundle media type. */
|
|
514
|
+
mediaType: z.string()
|
|
515
|
+
});
|
|
474
516
|
/** Agent -> Orchestrator: emit a custom event from a running workflow step. */
|
|
475
517
|
const eventEmitSchema = z.object({
|
|
476
518
|
type: z.literal("event.emit"),
|
|
@@ -640,6 +682,7 @@ const orchestratorToAgentMessageSchema = z.discriminatedUnion("type", [
|
|
|
640
682
|
cacheUploadResponseSchema,
|
|
641
683
|
cacheUserRestoreResponseSchema,
|
|
642
684
|
cacheUserSaveResponseSchema,
|
|
685
|
+
provenanceUploadResponseSchema,
|
|
643
686
|
eventEmitResponseSchema,
|
|
644
687
|
agentApiResponseSchema,
|
|
645
688
|
agentAuthSuccessSchema,
|
|
@@ -665,6 +708,8 @@ const agentToOrchestratorMessageSchema = z.discriminatedUnion("type", [
|
|
|
665
708
|
cacheUserRestoreRequestSchema,
|
|
666
709
|
cacheUserSaveRequestSchema,
|
|
667
710
|
cacheUserSaveCompleteSchema,
|
|
711
|
+
provenanceUploadRequestSchema,
|
|
712
|
+
provenanceUploadCompleteSchema,
|
|
668
713
|
eventEmitSchema,
|
|
669
714
|
agentApiRequestSchema,
|
|
670
715
|
agentMetricsSchema,
|
|
@@ -674,6 +719,6 @@ const agentToOrchestratorMessageSchema = z.discriminatedUnion("type", [
|
|
|
674
719
|
stepApprovalRequestSchema
|
|
675
720
|
]);
|
|
676
721
|
//#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 };
|
|
722
|
+
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, upstreamSnapshotSchema };
|
|
678
723
|
|
|
679
724
|
//# sourceMappingURL=orchestrator-agent.js.map
|
|
@@ -140,6 +140,22 @@ export declare const jobRerouteSchema: z.ZodObject<{
|
|
|
140
140
|
workflowName: z.ZodString;
|
|
141
141
|
runsOnLabels: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
142
142
|
excludeLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
143
|
+
runsOnPatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
144
|
+
kind: z.ZodLiteral<"exact">;
|
|
145
|
+
value: z.ZodString;
|
|
146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
+
kind: z.ZodLiteral<"regex">;
|
|
148
|
+
source: z.ZodString;
|
|
149
|
+
flags: z.ZodString;
|
|
150
|
+
}, z.core.$strip>], "kind">>>;
|
|
151
|
+
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
152
|
+
kind: z.ZodLiteral<"exact">;
|
|
153
|
+
value: z.ZodString;
|
|
154
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
155
|
+
kind: z.ZodLiteral<"regex">;
|
|
156
|
+
source: z.ZodString;
|
|
157
|
+
flags: z.ZodString;
|
|
158
|
+
}, z.core.$strip>], "kind">>>;
|
|
143
159
|
triedConnections: z.ZodArray<z.ZodString>;
|
|
144
160
|
maxHops: z.ZodNumber;
|
|
145
161
|
coordinatorId: z.ZodString;
|
|
@@ -488,6 +504,22 @@ export declare const peerToPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
488
504
|
workflowName: z.ZodString;
|
|
489
505
|
runsOnLabels: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
490
506
|
excludeLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
507
|
+
runsOnPatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
508
|
+
kind: z.ZodLiteral<"exact">;
|
|
509
|
+
value: z.ZodString;
|
|
510
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
511
|
+
kind: z.ZodLiteral<"regex">;
|
|
512
|
+
source: z.ZodString;
|
|
513
|
+
flags: z.ZodString;
|
|
514
|
+
}, z.core.$strip>], "kind">>>;
|
|
515
|
+
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
516
|
+
kind: z.ZodLiteral<"exact">;
|
|
517
|
+
value: z.ZodString;
|
|
518
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
519
|
+
kind: z.ZodLiteral<"regex">;
|
|
520
|
+
source: z.ZodString;
|
|
521
|
+
flags: z.ZodString;
|
|
522
|
+
}, z.core.$strip>], "kind">>>;
|
|
491
523
|
triedConnections: z.ZodArray<z.ZodString>;
|
|
492
524
|
maxHops: z.ZodNumber;
|
|
493
525
|
coordinatorId: z.ZodString;
|
|
@@ -756,6 +788,22 @@ export declare const peerFromPeerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
756
788
|
workflowName: z.ZodString;
|
|
757
789
|
runsOnLabels: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
758
790
|
excludeLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
791
|
+
runsOnPatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
792
|
+
kind: z.ZodLiteral<"exact">;
|
|
793
|
+
value: z.ZodString;
|
|
794
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
795
|
+
kind: z.ZodLiteral<"regex">;
|
|
796
|
+
source: z.ZodString;
|
|
797
|
+
flags: z.ZodString;
|
|
798
|
+
}, z.core.$strip>], "kind">>>;
|
|
799
|
+
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
800
|
+
kind: z.ZodLiteral<"exact">;
|
|
801
|
+
value: z.ZodString;
|
|
802
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
803
|
+
kind: z.ZodLiteral<"regex">;
|
|
804
|
+
source: z.ZodString;
|
|
805
|
+
flags: z.ZodString;
|
|
806
|
+
}, z.core.$strip>], "kind">>>;
|
|
759
807
|
triedConnections: z.ZodArray<z.ZodString>;
|
|
760
808
|
maxHops: z.ZodNumber;
|
|
761
809
|
coordinatorId: z.ZodString;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-BTugEXQM.js";
|
|
2
2
|
import { ExecutionJobStatus } from "./execution-status.js";
|
|
3
3
|
import { ScalerEventType } from "./scaler-event.js";
|
|
4
|
+
import { LabelMatcher } from "../../labels-match.js";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
//#region src/protocol/messages/peer.ts
|
|
6
7
|
/** Agent summary included in peer heartbeat and auth response messages. */
|
|
@@ -160,6 +161,16 @@ const jobRerouteSchema = z.object({
|
|
|
160
161
|
runsOnLabels: z.array(z.array(z.string())),
|
|
161
162
|
/** Labels that the dispatched agent must NOT have (optional for backward compatibility). */
|
|
162
163
|
excludeLabels: z.array(z.string()).optional(),
|
|
164
|
+
/**
|
|
165
|
+
* Glob/regex include matchers the receiving peer's agent labels must
|
|
166
|
+
* satisfy (JS post-filter, applied on top of the exact `runsOnLabels`
|
|
167
|
+
* prefilter — same semantics as the single-orchestrator dispatch path).
|
|
168
|
+
* Absent is treated as `[]`. A pure-pattern job (no exact labels) carries
|
|
169
|
+
* its selector here; dropping it would let the job match any local agent.
|
|
170
|
+
*/
|
|
171
|
+
runsOnPatterns: z.array(LabelMatcher).optional(),
|
|
172
|
+
/** Glob/regex matchers that disqualify a candidate agent (JS post-filter). Absent is `[]`. */
|
|
173
|
+
excludePatterns: z.array(LabelMatcher).optional(),
|
|
163
174
|
triedConnections: z.array(z.string()),
|
|
164
175
|
maxHops: z.number(),
|
|
165
176
|
coordinatorId: z.string(),
|
|
@@ -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