@kici-dev/engine 0.1.24 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/approval/types.d.ts +1 -1
  2. package/dist/approval/types.js +1 -1
  3. package/dist/audit/access-log-policy.js +3 -2
  4. package/dist/audit/activity.d.ts +2 -0
  5. package/dist/audit/activity.js +15 -1
  6. package/dist/audit/retention-policy.js +3 -3
  7. package/dist/bundler/index.js +1 -1
  8. package/dist/bundler/rolldown-config.js +1 -1
  9. package/dist/check-mode.js +1 -1
  10. package/dist/dev-ops/operations.d.ts +56 -0
  11. package/dist/dev-ops/operations.js +135 -0
  12. package/dist/env/environment-allowlist.js +1 -1
  13. package/dist/environment/host-match.js +1 -1
  14. package/dist/environment/index.js +1 -1
  15. package/dist/environment/multi-env.js +1 -1
  16. package/dist/environment/scope-resolver.js +1 -1
  17. package/dist/environment/scope-template.js +1 -1
  18. package/dist/environment/types.js +1 -1
  19. package/dist/fanout/materialize.js +3 -3
  20. package/dist/index.d.ts +7 -1
  21. package/dist/index.js +16 -10
  22. package/dist/inputs/build.js +1 -1
  23. package/dist/inputs/coerce.js +1 -1
  24. package/dist/inputs/descriptor.js +1 -1
  25. package/dist/inputs/extract.js +1 -1
  26. package/dist/inputs/index.js +1 -1
  27. package/dist/inputs/schedule.js +1 -1
  28. package/dist/inventory.js +1 -1
  29. package/dist/labels/compile.js +1 -1
  30. package/dist/labels-match.js +1 -1
  31. package/dist/labels.js +2 -2
  32. package/dist/matrix/expand.js +1 -1
  33. package/dist/matrix/format.js +1 -1
  34. package/dist/mcp/fence.d.ts +22 -0
  35. package/dist/mcp/fence.js +65 -0
  36. package/dist/mcp/held-run-resolve.d.ts +52 -0
  37. package/dist/mcp/held-run-resolve.js +53 -0
  38. package/dist/mcp/tool-schemas.d.ts +38 -5
  39. package/dist/mcp/tool-schemas.js +38 -9
  40. package/dist/metrics/catalog-policy.js +1 -1
  41. package/dist/metrics/metric-catalog.generated.d.ts +85 -0
  42. package/dist/metrics/metric-catalog.generated.js +103 -1
  43. package/dist/protocol/analytics-events.js +1 -1
  44. package/dist/protocol/cluster-name.js +1 -1
  45. package/dist/protocol/dashboard-global-workflows.js +1 -1
  46. package/dist/protocol/dashboard-write-operations.d.ts +5 -1
  47. package/dist/protocol/dashboard-write-operations.js +13 -2
  48. package/dist/protocol/event-log-payload.js +1 -1
  49. package/dist/protocol/messages/access-log.d.ts +14 -5
  50. package/dist/protocol/messages/access-log.js +13 -1
  51. package/dist/protocol/messages/actor.d.ts +13 -0
  52. package/dist/protocol/messages/actor.js +25 -5
  53. package/dist/protocol/messages/agent-dev-ops.d.ts +118 -0
  54. package/dist/protocol/messages/agent-dev-ops.js +89 -0
  55. package/dist/protocol/messages/agent-run-result.d.ts +77 -2
  56. package/dist/protocol/messages/agent-run-result.js +44 -2
  57. package/dist/protocol/messages/auth.d.ts +1 -0
  58. package/dist/protocol/messages/auth.js +1 -1
  59. package/dist/protocol/messages/browser.js +1 -1
  60. package/dist/protocol/messages/capabilities.d.ts +1 -0
  61. package/dist/protocol/messages/capabilities.js +1 -1
  62. package/dist/protocol/messages/common.js +1 -1
  63. package/dist/protocol/messages/dashboard-global-workflows.d.ts +6 -0
  64. package/dist/protocol/messages/dashboard-global-workflows.js +1 -1
  65. package/dist/protocol/messages/dashboard.d.ts +634 -18
  66. package/dist/protocol/messages/dashboard.js +111 -12
  67. package/dist/protocol/messages/deployment-identity.js +1 -1
  68. package/dist/protocol/messages/event-log.js +1 -1
  69. package/dist/protocol/messages/execution-status.d.ts +15 -3
  70. package/dist/protocol/messages/execution-status.js +19 -4
  71. package/dist/protocol/messages/join.js +1 -1
  72. package/dist/protocol/messages/log-pull.js +1 -1
  73. package/dist/protocol/messages/oidc-mint.d.ts +51 -0
  74. package/dist/protocol/messages/oidc-mint.js +55 -0
  75. package/dist/protocol/messages/oidc-token-relay.d.ts +31 -4
  76. package/dist/protocol/messages/oidc-token-relay.js +22 -7
  77. package/dist/protocol/messages/orchestrator-agent.d.ts +45 -0
  78. package/dist/protocol/messages/orchestrator-agent.js +30 -2
  79. package/dist/protocol/messages/pat-kind.js +1 -1
  80. package/dist/protocol/messages/peer.js +1 -1
  81. package/dist/protocol/messages/platform-orchestrator.d.ts +292 -10
  82. package/dist/protocol/messages/platform-orchestrator.js +5 -2
  83. package/dist/protocol/messages/run-events.d.ts +3 -0
  84. package/dist/protocol/messages/run-events.js +1 -1
  85. package/dist/protocol/messages/scaler-event.js +1 -1
  86. package/dist/protocol/messages/source-registration.js +1 -1
  87. package/dist/protocol/source-origin.d.ts +20 -0
  88. package/dist/protocol/source-origin.js +21 -0
  89. package/dist/protocol/version.js +1 -1
  90. package/dist/provenance/attestation-origin.d.ts +18 -0
  91. package/dist/provenance/attestation-origin.js +22 -0
  92. package/dist/provenance/bundle.js +1 -1
  93. package/dist/provenance/dsse.js +1 -1
  94. package/dist/provenance/schema.d.ts +48 -0
  95. package/dist/provenance/schema.js +21 -7
  96. package/dist/provenance/statement-hash.d.ts +9 -0
  97. package/dist/provenance/statement-hash.js +17 -0
  98. package/dist/provenance/verify.d.ts +7 -0
  99. package/dist/provenance/verify.js +49 -10
  100. package/dist/provider/changed-files-fetcher.js +1 -1
  101. package/dist/provider/check-run-conclusion.js +1 -1
  102. package/dist/provider/check-status-poster.js +1 -1
  103. package/dist/provider/clone-token-provider.js +1 -1
  104. package/dist/provider/contributor-resolver.js +1 -1
  105. package/dist/provider/index.js +1 -1
  106. package/dist/provider/lock-file-fetcher.js +1 -1
  107. package/dist/provider/lock-file-parse-error.js +1 -1
  108. package/dist/provider/repo-url-builder.js +1 -1
  109. package/dist/provider/types.js +1 -1
  110. package/dist/provider/webhook-normalizer.js +1 -1
  111. package/dist/registration/registerable-trigger-type.d.ts +1 -1
  112. package/dist/registration/registerable-trigger-type.js +1 -1
  113. package/dist/{chunk-BTugEXQM.js → rolldown-runtime-ClRpJifh.js} +0 -1
  114. package/dist/scaler/resource-types.js +1 -1
  115. package/dist/scaler/scaler-backend-type.js +1 -1
  116. package/dist/secrets/index.d.ts +1 -1
  117. package/dist/secrets/index.js +1 -1
  118. package/dist/secrets/types.d.ts +0 -24
  119. package/dist/secrets/types.js +1 -1
  120. package/dist/state-machine/index.js +1 -1
  121. package/dist/state-machine/machine.js +1 -1
  122. package/dist/state-machine/types.js +1 -1
  123. package/dist/trigger/decision-trace.js +1 -1
  124. package/dist/trigger/jsonpath-matcher.js +1 -1
  125. package/dist/trigger/matcher.js +1 -1
  126. package/dist/trigger/trigger-event-type.js +1 -1
  127. package/dist/trigger/types.js +1 -1
  128. package/dist/webhook/signature.js +1 -1
  129. package/dist/webhook/webhook-url-format.d.ts +7 -0
  130. package/dist/webhook/webhook-url-format.js +11 -2
  131. package/dist/ws/close-codes.d.ts +8 -2
  132. package/dist/ws/close-codes.js +10 -4
  133. package/dist/ws/rate-limiter.js +1 -1
  134. package/dist/ws/ws-like.js +1 -1
  135. package/package.json +9 -1
  136. package/sbom.spdx.json +5 -5
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Agent-facing, provenance-tagged shapes for the developer MCP's read tools
3
+ * beyond runs: organizations, connected orchestrators, diagnostics, and secret
4
+ * scope key names. Same discipline as {@link ./agent-run-result.js}: every
5
+ * user/process-controlled value (org and cluster names, routing keys, scope and
6
+ * secret key names) is wrapped in an {@link untrusted} envelope so the fencing
7
+ * renderer keeps it out of an agent's instruction channel; KiCI-generated ids,
8
+ * enum statuses, counts, and timestamps stay plain (trusted).
9
+ *
10
+ * Browser-safe (zod only) so it can ride the engine barrel alongside the rest
11
+ * of the agent-facing read contract.
12
+ */
13
+ import { z } from 'zod';
14
+ /**
15
+ * Organization the calling user belongs to. `displayName` / `publicAlias` are
16
+ * user-chosen → untrusted; the id, the owner flag, and the creation timestamp
17
+ * are trusted.
18
+ */
19
+ export declare const agentOrgSummarySchema: z.ZodObject<{
20
+ id: z.ZodString;
21
+ publicAlias: z.ZodNullable<z.ZodObject<{
22
+ untrusted: z.ZodLiteral<true>;
23
+ value: z.ZodString;
24
+ }, z.core.$strip>>;
25
+ displayName: z.ZodObject<{
26
+ untrusted: z.ZodLiteral<true>;
27
+ value: z.ZodString;
28
+ }, z.core.$strip>;
29
+ isOwner: z.ZodBoolean;
30
+ createdAt: z.ZodNullable<z.ZodString>;
31
+ }, z.core.$strip>;
32
+ export type AgentOrgSummary = z.infer<typeof agentOrgSummarySchema>;
33
+ /**
34
+ * Connected orchestrator cluster (the customer-deployed data plane the org's
35
+ * runs execute on). The cluster name and routing keys carry user/source-derived
36
+ * content → untrusted; versions, modes, roles, scaler-backend enum tags, the S3
37
+ * flag, ids, and timestamps are trusted.
38
+ */
39
+ export declare const agentOrchestratorSummarySchema: z.ZodObject<{
40
+ connectionId: z.ZodString;
41
+ clusterName: z.ZodNullable<z.ZodObject<{
42
+ untrusted: z.ZodLiteral<true>;
43
+ value: z.ZodString;
44
+ }, z.core.$strip>>;
45
+ routingKeys: z.ZodArray<z.ZodObject<{
46
+ untrusted: z.ZodLiteral<true>;
47
+ value: z.ZodString;
48
+ }, z.core.$strip>>;
49
+ orchVersion: z.ZodNullable<z.ZodString>;
50
+ orchMode: z.ZodNullable<z.ZodString>;
51
+ orchRole: z.ZodNullable<z.ZodString>;
52
+ scalerBackends: z.ZodArray<z.ZodString>;
53
+ s3LogAccess: z.ZodBoolean;
54
+ connectedAt: z.ZodString;
55
+ lastHeartbeatAt: z.ZodString;
56
+ }, z.core.$strip>;
57
+ export type AgentOrchestratorSummary = z.infer<typeof agentOrchestratorSummarySchema>;
58
+ /** One orchestrator connection row inside the diagnostics summary. */
59
+ export declare const agentDiagnosticsConnectionSchema: z.ZodObject<{
60
+ connectionId: z.ZodString;
61
+ healthBadge: z.ZodEnum<{
62
+ stale: "stale";
63
+ connected: "connected";
64
+ unhealthy: "unhealthy";
65
+ }>;
66
+ routingKeys: z.ZodArray<z.ZodObject<{
67
+ untrusted: z.ZodLiteral<true>;
68
+ value: z.ZodString;
69
+ }, z.core.$strip>>;
70
+ lastHeartbeatAt: z.ZodNullable<z.ZodString>;
71
+ }, z.core.$strip>;
72
+ /**
73
+ * Org diagnostics summary: execution metrics over the last 24h plus per-orch
74
+ * connection health. All metrics/counts/badges are KiCI-computed (trusted); only
75
+ * the routing keys carry user content.
76
+ */
77
+ export declare const agentDiagnosticsSchema: z.ZodObject<{
78
+ executionMetrics: z.ZodObject<{
79
+ totalRuns: z.ZodNumber;
80
+ successRate: z.ZodNumber;
81
+ avgDurationSeconds: z.ZodNumber;
82
+ queuedJobs: z.ZodNumber;
83
+ runningJobs: z.ZodNumber;
84
+ }, z.core.$strip>;
85
+ orchestrators: z.ZodArray<z.ZodObject<{
86
+ connectionId: z.ZodString;
87
+ healthBadge: z.ZodEnum<{
88
+ stale: "stale";
89
+ connected: "connected";
90
+ unhealthy: "unhealthy";
91
+ }>;
92
+ routingKeys: z.ZodArray<z.ZodObject<{
93
+ untrusted: z.ZodLiteral<true>;
94
+ value: z.ZodString;
95
+ }, z.core.$strip>>;
96
+ lastHeartbeatAt: z.ZodNullable<z.ZodString>;
97
+ }, z.core.$strip>>;
98
+ orphanedConnections: z.ZodNumber;
99
+ }, z.core.$strip>;
100
+ export type AgentDiagnostics = z.infer<typeof agentDiagnosticsSchema>;
101
+ /**
102
+ * A secret scope and the key NAMES it holds — never values. Both the scope name
103
+ * and each key name are user-chosen → untrusted. This is the read contract for
104
+ * `list_secrets`: an agent can discover which secret keys exist without ever
105
+ * being handed a secret value.
106
+ */
107
+ export declare const agentSecretScopeSchema: z.ZodObject<{
108
+ scope: z.ZodObject<{
109
+ untrusted: z.ZodLiteral<true>;
110
+ value: z.ZodString;
111
+ }, z.core.$strip>;
112
+ keys: z.ZodArray<z.ZodObject<{
113
+ untrusted: z.ZodLiteral<true>;
114
+ value: z.ZodString;
115
+ }, z.core.$strip>>;
116
+ }, z.core.$strip>;
117
+ export type AgentSecretScope = z.infer<typeof agentSecretScopeSchema>;
118
+ //# sourceMappingURL=agent-dev-ops.d.ts.map
@@ -0,0 +1,89 @@
1
+ import "../../rolldown-runtime-ClRpJifh.js";
2
+ import { untrusted } from "./agent-run-result.js";
3
+ import { z } from "zod";
4
+ //#region src/protocol/messages/agent-dev-ops.ts
5
+ /**
6
+ * Agent-facing, provenance-tagged shapes for the developer MCP's read tools
7
+ * beyond runs: organizations, connected orchestrators, diagnostics, and secret
8
+ * scope key names. Same discipline as {@link ./agent-run-result.js}: every
9
+ * user/process-controlled value (org and cluster names, routing keys, scope and
10
+ * secret key names) is wrapped in an {@link untrusted} envelope so the fencing
11
+ * renderer keeps it out of an agent's instruction channel; KiCI-generated ids,
12
+ * enum statuses, counts, and timestamps stay plain (trusted).
13
+ *
14
+ * Browser-safe (zod only) so it can ride the engine barrel alongside the rest
15
+ * of the agent-facing read contract.
16
+ */
17
+ const untrustedString = untrusted(z.string());
18
+ const untrustedStringNullable = untrusted(z.string()).nullable();
19
+ /**
20
+ * Organization the calling user belongs to. `displayName` / `publicAlias` are
21
+ * user-chosen → untrusted; the id, the owner flag, and the creation timestamp
22
+ * are trusted.
23
+ */
24
+ const agentOrgSummarySchema = z.object({
25
+ id: z.string(),
26
+ publicAlias: untrustedStringNullable,
27
+ displayName: untrustedString,
28
+ isOwner: z.boolean(),
29
+ createdAt: z.string().nullable()
30
+ });
31
+ /**
32
+ * Connected orchestrator cluster (the customer-deployed data plane the org's
33
+ * runs execute on). The cluster name and routing keys carry user/source-derived
34
+ * content → untrusted; versions, modes, roles, scaler-backend enum tags, the S3
35
+ * flag, ids, and timestamps are trusted.
36
+ */
37
+ const agentOrchestratorSummarySchema = z.object({
38
+ connectionId: z.string(),
39
+ clusterName: untrustedStringNullable,
40
+ routingKeys: z.array(untrustedString),
41
+ orchVersion: z.string().nullable(),
42
+ orchMode: z.string().nullable(),
43
+ orchRole: z.string().nullable(),
44
+ scalerBackends: z.array(z.string()),
45
+ s3LogAccess: z.boolean(),
46
+ connectedAt: z.string(),
47
+ lastHeartbeatAt: z.string()
48
+ });
49
+ /** One orchestrator connection row inside the diagnostics summary. */
50
+ const agentDiagnosticsConnectionSchema = z.object({
51
+ connectionId: z.string(),
52
+ healthBadge: z.enum([
53
+ "connected",
54
+ "unhealthy",
55
+ "stale"
56
+ ]),
57
+ routingKeys: z.array(untrustedString),
58
+ lastHeartbeatAt: z.string().nullable()
59
+ });
60
+ /**
61
+ * Org diagnostics summary: execution metrics over the last 24h plus per-orch
62
+ * connection health. All metrics/counts/badges are KiCI-computed (trusted); only
63
+ * the routing keys carry user content.
64
+ */
65
+ const agentDiagnosticsSchema = z.object({
66
+ executionMetrics: z.object({
67
+ totalRuns: z.number().int(),
68
+ successRate: z.number(),
69
+ avgDurationSeconds: z.number(),
70
+ queuedJobs: z.number().int(),
71
+ runningJobs: z.number().int()
72
+ }),
73
+ orchestrators: z.array(agentDiagnosticsConnectionSchema),
74
+ orphanedConnections: z.number().int()
75
+ });
76
+ /**
77
+ * A secret scope and the key NAMES it holds — never values. Both the scope name
78
+ * and each key name are user-chosen → untrusted. This is the read contract for
79
+ * `list_secrets`: an agent can discover which secret keys exist without ever
80
+ * being handed a secret value.
81
+ */
82
+ const agentSecretScopeSchema = z.object({
83
+ scope: untrustedString,
84
+ keys: z.array(untrustedString)
85
+ });
86
+ //#endregion
87
+ export { agentDiagnosticsConnectionSchema, agentDiagnosticsSchema, agentOrchestratorSummarySchema, agentOrgSummarySchema, agentSecretScopeSchema };
88
+
89
+ //# sourceMappingURL=agent-dev-ops.js.map
@@ -102,8 +102,8 @@ export declare const agentJobResultSchema: z.ZodObject<{
102
102
  }, z.core.$strip>>;
103
103
  initFailure: z.ZodNullable<z.ZodObject<{
104
104
  scope: z.ZodEnum<{
105
- run: "run";
106
105
  job: "job";
106
+ run: "run";
107
107
  }>;
108
108
  category: z.ZodEnum<{
109
109
  secret_resolution: "secret_resolution";
@@ -229,6 +229,7 @@ export declare const agentRunResultSchema: z.ZodObject<{
229
229
  value: z.ZodString;
230
230
  }, z.core.$strip>>;
231
231
  triggeredBy: z.ZodNullable<z.ZodString>;
232
+ triggeredByAgentLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
233
  jobs: z.ZodArray<z.ZodObject<{
233
234
  jobId: z.ZodString;
234
235
  jobName: z.ZodObject<{
@@ -258,8 +259,8 @@ export declare const agentRunResultSchema: z.ZodObject<{
258
259
  }, z.core.$strip>>;
259
260
  initFailure: z.ZodNullable<z.ZodObject<{
260
261
  scope: z.ZodEnum<{
261
- run: "run";
262
262
  job: "job";
263
+ run: "run";
263
264
  }>;
264
265
  category: z.ZodEnum<{
265
266
  secret_resolution: "secret_resolution";
@@ -347,4 +348,78 @@ export declare const agentStepLogsSchema: z.ZodObject<{
347
348
  nextCursor: z.ZodNullable<z.ZodString>;
348
349
  }, z.core.$strip>;
349
350
  export type AgentStepLogs = z.infer<typeof agentStepLogsSchema>;
351
+ /**
352
+ * Compact run-list row for the agent surface. KiCI ids/status/hashes are trusted
353
+ * (plain); the workflow name, repo identifier, and ref are user-controlled and
354
+ * wrapped untrusted so the fencing renderer keeps them out of the instruction
355
+ * channel.
356
+ */
357
+ export declare const agentRunListItemSchema: z.ZodObject<{
358
+ runId: z.ZodString;
359
+ status: z.ZodEnum<{
360
+ success: "success";
361
+ pending: "pending";
362
+ running: "running";
363
+ failed: "failed";
364
+ cancelled: "cancelled";
365
+ cancelling: "cancelling";
366
+ held: "held";
367
+ }>;
368
+ sha: z.ZodNullable<z.ZodString>;
369
+ createdAt: z.ZodNullable<z.ZodString>;
370
+ workflowName: z.ZodObject<{
371
+ untrusted: z.ZodLiteral<true>;
372
+ value: z.ZodString;
373
+ }, z.core.$strip>;
374
+ repoIdentifier: z.ZodNullable<z.ZodObject<{
375
+ untrusted: z.ZodLiteral<true>;
376
+ value: z.ZodString;
377
+ }, z.core.$strip>>;
378
+ ref: z.ZodNullable<z.ZodObject<{
379
+ untrusted: z.ZodLiteral<true>;
380
+ value: z.ZodString;
381
+ }, z.core.$strip>>;
382
+ }, z.core.$strip>;
383
+ export type AgentRunListItem = z.infer<typeof agentRunListItemSchema>;
384
+ /**
385
+ * Agent-facing workflow registration summary. Ids, flags, the commit sha, the
386
+ * KiCI trigger-type tags, and timestamps are trusted (plain); the workflow name,
387
+ * repo identifier, source repos, source file path, and friendly source name are
388
+ * user-controlled and wrapped untrusted.
389
+ */
390
+ export declare const agentWorkflowSummarySchema: z.ZodObject<{
391
+ id: z.ZodString;
392
+ workflowName: z.ZodObject<{
393
+ untrusted: z.ZodLiteral<true>;
394
+ value: z.ZodString;
395
+ }, z.core.$strip>;
396
+ repoIdentifier: z.ZodObject<{
397
+ untrusted: z.ZodLiteral<true>;
398
+ value: z.ZodString;
399
+ }, z.core.$strip>;
400
+ triggerTypes: z.ZodArray<z.ZodString>;
401
+ sourceRepos: z.ZodArray<z.ZodObject<{
402
+ untrusted: z.ZodLiteral<true>;
403
+ value: z.ZodString;
404
+ }, z.core.$strip>>;
405
+ disabled: z.ZodBoolean;
406
+ commitSha: z.ZodNullable<z.ZodString>;
407
+ sourceFile: z.ZodNullable<z.ZodObject<{
408
+ untrusted: z.ZodLiteral<true>;
409
+ value: z.ZodString;
410
+ }, z.core.$strip>>;
411
+ createdAt: z.ZodString;
412
+ updatedAt: z.ZodString;
413
+ lastTriggeredAt: z.ZodNullable<z.ZodString>;
414
+ nextFireAt: z.ZodNullable<z.ZodString>;
415
+ source: z.ZodNullable<z.ZodObject<{
416
+ routingKey: z.ZodString;
417
+ name: z.ZodNullable<z.ZodObject<{
418
+ untrusted: z.ZodLiteral<true>;
419
+ value: z.ZodString;
420
+ }, z.core.$strip>>;
421
+ provider: z.ZodString;
422
+ }, z.core.$strip>>;
423
+ }, z.core.$strip>;
424
+ export type AgentWorkflowSummary = z.infer<typeof agentWorkflowSummarySchema>;
350
425
  //# sourceMappingURL=agent-run-result.d.ts.map
@@ -1,4 +1,4 @@
1
- import "../../chunk-BTugEXQM.js";
1
+ import "../../rolldown-runtime-ClRpJifh.js";
2
2
  import { CheckStepOutcome } from "../../check-mode.js";
3
3
  import { ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory } from "./execution-status.js";
4
4
  import { TrustTierSchema } from "../../environment/types.js";
@@ -106,6 +106,8 @@ const agentRunResultSchema = z.object({
106
106
  failureReason: untrustedStringNullable,
107
107
  /** Identity that triggered a re-run (null for webhook-triggered runs). */
108
108
  triggeredBy: z.string().nullable(),
109
+ /** Agent provenance label when the run was triggered through an agent credential. */
110
+ triggeredByAgentLabel: z.string().nullable().optional(),
109
111
  jobs: z.array(agentJobResultSchema)
110
112
  });
111
113
  const agentStepLogsSchema = z.object({
@@ -117,7 +119,47 @@ const agentStepLogsSchema = z.object({
117
119
  lines: z.array(untrustedString),
118
120
  nextCursor: z.string().nullable()
119
121
  });
122
+ /**
123
+ * Compact run-list row for the agent surface. KiCI ids/status/hashes are trusted
124
+ * (plain); the workflow name, repo identifier, and ref are user-controlled and
125
+ * wrapped untrusted so the fencing renderer keeps them out of the instruction
126
+ * channel.
127
+ */
128
+ const agentRunListItemSchema = z.object({
129
+ runId: z.string(),
130
+ status: ExecutionRunStatus,
131
+ sha: z.string().nullable(),
132
+ createdAt: z.string().nullable(),
133
+ workflowName: untrustedString,
134
+ repoIdentifier: untrustedStringNullable,
135
+ ref: untrustedStringNullable
136
+ });
137
+ /**
138
+ * Agent-facing workflow registration summary. Ids, flags, the commit sha, the
139
+ * KiCI trigger-type tags, and timestamps are trusted (plain); the workflow name,
140
+ * repo identifier, source repos, source file path, and friendly source name are
141
+ * user-controlled and wrapped untrusted.
142
+ */
143
+ const agentWorkflowSummarySchema = z.object({
144
+ id: z.string(),
145
+ workflowName: untrustedString,
146
+ repoIdentifier: untrustedString,
147
+ triggerTypes: z.array(z.string()),
148
+ sourceRepos: z.array(untrustedString),
149
+ disabled: z.boolean(),
150
+ commitSha: z.string().nullable(),
151
+ sourceFile: untrustedStringNullable,
152
+ createdAt: z.string(),
153
+ updatedAt: z.string(),
154
+ lastTriggeredAt: z.string().nullable(),
155
+ nextFireAt: z.string().nullable(),
156
+ source: z.object({
157
+ routingKey: z.string(),
158
+ name: untrustedStringNullable,
159
+ provider: z.string()
160
+ }).nullable()
161
+ });
120
162
  //#endregion
121
- export { AgentFailureCategory, agentJobResultSchema, agentRunResultSchema, agentStepLogsSchema, agentStepResultSchema, untrusted, wrapUntrusted };
163
+ export { AgentFailureCategory, agentJobResultSchema, agentRunListItemSchema, agentRunResultSchema, agentStepLogsSchema, agentStepResultSchema, agentWorkflowSummarySchema, untrusted, wrapUntrusted };
122
164
 
123
165
  //# sourceMappingURL=agent-run-result.js.map
@@ -28,6 +28,7 @@ export declare const authRequestSchema: z.ZodObject<{
28
28
  "held_runs.reject": "held_runs.reject";
29
29
  "event_dlq.retry": "event_dlq.retry";
30
30
  "event_dlq.discard": "event_dlq.discard";
31
+ "attestations.retry": "attestations.retry";
31
32
  "registration.disable": "registration.disable";
32
33
  "registration.delete": "registration.delete";
33
34
  "global_workflows.update": "global_workflows.update";
@@ -1,4 +1,4 @@
1
- import "../../chunk-BTugEXQM.js";
1
+ import "../../rolldown-runtime-ClRpJifh.js";
2
2
  import { orchCapabilitiesSchema } from "./capabilities.js";
3
3
  import { z } from "zod";
4
4
  //#region src/protocol/messages/auth.ts
@@ -1,4 +1,4 @@
1
- import "../../chunk-BTugEXQM.js";
1
+ import "../../rolldown-runtime-ClRpJifh.js";
2
2
  import { browserJobContextSchema, browserRunEventSchema } from "./run-events.js";
3
3
  import { browserEventLogPayloadChunkSchema } from "./dashboard.js";
4
4
  import { z } from "zod";
@@ -47,6 +47,7 @@ export declare const orchCapabilitiesSchema: z.ZodObject<{
47
47
  "held_runs.reject": "held_runs.reject";
48
48
  "event_dlq.retry": "event_dlq.retry";
49
49
  "event_dlq.discard": "event_dlq.discard";
50
+ "attestations.retry": "attestations.retry";
50
51
  "registration.disable": "registration.disable";
51
52
  "registration.delete": "registration.delete";
52
53
  "global_workflows.update": "global_workflows.update";
@@ -1,4 +1,4 @@
1
- import "../../chunk-BTugEXQM.js";
1
+ import "../../rolldown-runtime-ClRpJifh.js";
2
2
  import { dashboardWritePolicyMap } from "../dashboard-write-operations.js";
3
3
  import { DASHBOARD_REQUEST_TYPES } from "./dashboard.js";
4
4
  import { z } from "zod";
@@ -1,4 +1,4 @@
1
- import "../../chunk-BTugEXQM.js";
1
+ import "../../rolldown-runtime-ClRpJifh.js";
2
2
  import { z } from "zod";
3
3
  //#region src/protocol/messages/common.ts
4
4
  /**
@@ -64,6 +64,9 @@ export declare const globalWorkflowsGetRequestSchema: z.ZodObject<{
64
64
  type: z.ZodLiteral<"api_key">;
65
65
  keyId: z.ZodString;
66
66
  ownerSub: z.ZodString;
67
+ agent: z.ZodOptional<z.ZodObject<{
68
+ label: z.ZodString;
69
+ }, z.core.$strip>>;
67
70
  }, z.core.$strip>, z.ZodObject<{
68
71
  type: z.ZodLiteral<"service_account">;
69
72
  id: z.ZodString;
@@ -97,6 +100,9 @@ export declare const globalWorkflowsUpdateRequestSchema: z.ZodObject<{
97
100
  type: z.ZodLiteral<"api_key">;
98
101
  keyId: z.ZodString;
99
102
  ownerSub: z.ZodString;
103
+ agent: z.ZodOptional<z.ZodObject<{
104
+ label: z.ZodString;
105
+ }, z.core.$strip>>;
100
106
  }, z.core.$strip>, z.ZodObject<{
101
107
  type: z.ZodLiteral<"service_account">;
102
108
  id: z.ZodString;
@@ -1,4 +1,4 @@
1
- import "../../chunk-BTugEXQM.js";
1
+ import "../../rolldown-runtime-ClRpJifh.js";
2
2
  import { actorPrincipalSchema } from "./actor.js";
3
3
  import { z } from "zod";
4
4
  //#region src/protocol/messages/dashboard-global-workflows.ts