@kitman-sh/sdk 0.7.2 → 0.7.4

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 (69) hide show
  1. package/dist/build/index.js +2 -2
  2. package/dist/{chunk-zp7s46pz.js → chunk-7jc5y0mj.js} +2 -2
  3. package/dist/{chunk-7hwhxthh.js → chunk-p8v1smcg.js} +1 -1
  4. package/dist/loop/index.js +1 -1
  5. package/dist/program/index.js +2 -2
  6. package/package.json +1 -1
  7. package/types/packages/core/src/a2a.d.ts +577 -0
  8. package/types/packages/core/src/agent-capabilities.d.ts +1434 -0
  9. package/types/packages/core/src/agent-environment.d.ts +16 -16
  10. package/types/packages/core/src/agent-launch-snapshot.d.ts +44 -0
  11. package/types/packages/core/src/approval-queue.d.ts +126 -0
  12. package/types/packages/core/src/audit.d.ts +52 -0
  13. package/types/packages/core/src/change-delivery.d.ts +39 -0
  14. package/types/packages/core/src/change-request-review.d.ts +146 -0
  15. package/types/packages/core/src/change-request.d.ts +432 -0
  16. package/types/packages/core/src/connection.d.ts +33 -0
  17. package/types/packages/core/src/context-feedback.d.ts +89 -0
  18. package/types/packages/core/src/data-lifecycle.d.ts +195 -0
  19. package/types/packages/core/src/decision.d.ts +48 -0
  20. package/types/packages/core/src/delivery-operation.d.ts +125 -0
  21. package/types/packages/core/src/delivery-policy.d.ts +174 -0
  22. package/types/packages/core/src/engineering-resources.d.ts +24 -0
  23. package/types/packages/core/src/enterprise-code-host.d.ts +18 -0
  24. package/types/packages/core/src/epic-delivery.d.ts +38 -0
  25. package/types/packages/core/src/external-effect.d.ts +313 -0
  26. package/types/packages/core/src/fix-flow.d.ts +149 -0
  27. package/types/packages/core/src/following.d.ts +59 -0
  28. package/types/packages/core/src/github-delivery-fixtures.d.ts +28 -0
  29. package/types/packages/core/src/github-delivery.d.ts +78 -0
  30. package/types/packages/core/src/gitlab-delivery-fixtures.d.ts +26 -0
  31. package/types/packages/core/src/gitlab-delivery.d.ts +76 -0
  32. package/types/packages/core/src/global-search.d.ts +42 -0
  33. package/types/packages/core/src/id.d.ts +1 -0
  34. package/types/packages/core/src/index.d.ts +0 -1
  35. package/types/packages/core/src/integration.d.ts +275 -0
  36. package/types/packages/core/src/intent.d.ts +260 -0
  37. package/types/packages/core/src/json.d.ts +10 -0
  38. package/types/packages/core/src/kit.d.ts +12 -12
  39. package/types/packages/core/src/live.d.ts +8318 -0
  40. package/types/packages/core/src/me.d.ts +31 -0
  41. package/types/packages/core/src/memory.d.ts +88 -0
  42. package/types/packages/core/src/my-teams.d.ts +1230 -0
  43. package/types/packages/core/src/notification.d.ts +181 -0
  44. package/types/packages/core/src/observability.d.ts +175 -0
  45. package/types/packages/core/src/package.d.ts +369 -0
  46. package/types/packages/core/src/personal-development-profile.d.ts +11 -0
  47. package/types/packages/core/src/platform-release.d.ts +60 -0
  48. package/types/packages/core/src/program-credential.d.ts +10 -0
  49. package/types/packages/core/src/project.d.ts +66 -0
  50. package/types/packages/core/src/provider-safe-text.d.ts +2 -0
  51. package/types/packages/core/src/repo-binding.d.ts +131 -0
  52. package/types/packages/core/src/run-journal.d.ts +28 -0
  53. package/types/packages/core/src/run-launch.d.ts +67 -0
  54. package/types/packages/core/src/runner-eligibility.d.ts +43 -0
  55. package/types/packages/core/src/runner-routing.d.ts +11 -0
  56. package/types/packages/core/src/runner-trust.d.ts +67 -0
  57. package/types/packages/core/src/runner.d.ts +3776 -0
  58. package/types/packages/core/src/scope-directory.d.ts +100 -0
  59. package/types/packages/core/src/secret.d.ts +37 -0
  60. package/types/packages/core/src/session.d.ts +90 -0
  61. package/types/packages/core/src/step-brief.d.ts +50 -0
  62. package/types/packages/core/src/sync-kit.d.ts +587 -0
  63. package/types/packages/core/src/task-detail.d.ts +491 -0
  64. package/types/packages/core/src/task-execution-record.d.ts +620 -0
  65. package/types/packages/core/src/task-key.d.ts +9 -0
  66. package/types/packages/core/src/task.d.ts +543 -0
  67. package/types/packages/core/src/work-unit.d.ts +740 -0
  68. package/types/packages/core/src/workspace.d.ts +96 -0
  69. package/types/packages/live/src/rpc/runner-group.d.ts +216 -216
@@ -0,0 +1,195 @@
1
+ import * as Schema from 'effect/Schema';
2
+ declare const DataLifecycleSubjectKinds: readonly ['workspace', 'project', 'task', 'runner', 'runner_replica'];
3
+ export type DataLifecycleSubjectKind = (typeof DataLifecycleSubjectKinds)[number];
4
+ export declare const DataLifecycleStates: readonly ['active', 'requested', 'draining', 'export_evaluated', 'erased', 'tombstoned', 'blocked_by_hold', 'residue_unknown', 'rejected', 'canceled'];
5
+ export type DataLifecycleState = (typeof DataLifecycleStates)[number];
6
+ declare const DataLifecycleDispositions: readonly ['retain', 'erase', 'tombstone'];
7
+ export type DataLifecycleDisposition = (typeof DataLifecycleDispositions)[number];
8
+ declare const DataLifecycleHoldStatuses: readonly ['active', 'released', 'superseded'];
9
+ export type DataLifecycleHoldStatus = (typeof DataLifecycleHoldStatuses)[number];
10
+ declare const DataLifecycleCaseHoldStatuses: readonly ['none', 'active', 'released'];
11
+ export type DataLifecycleCaseHoldStatus = (typeof DataLifecycleCaseHoldStatuses)[number];
12
+ declare const DataLifecycleResidueDispositions: readonly ['deleted', 'quarantined', 'retained_until', 'unknown'];
13
+ export type DataLifecycleResidueDisposition = (typeof DataLifecycleResidueDispositions)[number];
14
+ export declare const DataLifecycleSubjectKind: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"runner">, Schema.Literal<"runner_replica">]>;
15
+ export declare const DataLifecycleState: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"requested">, Schema.Literal<"draining">, Schema.Literal<"export_evaluated">, Schema.Literal<"erased">, Schema.Literal<"tombstoned">, Schema.Literal<"blocked_by_hold">, Schema.Literal<"residue_unknown">, Schema.Literal<"rejected">, Schema.Literal<"canceled">]>;
16
+ export declare const DataLifecycleDisposition: Schema.Union<readonly [Schema.Literal<"retain">, Schema.Literal<"erase">, Schema.Literal<"tombstone">]>;
17
+ export declare const DataLifecycleHoldStatus: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"released">, Schema.Literal<"superseded">]>;
18
+ export declare const DataLifecycleCaseHoldStatus: Schema.Union<readonly [Schema.Literal<"none">, Schema.Literal<"active">, Schema.Literal<"released">]>;
19
+ export declare const DataLifecycleResidueDisposition: Schema.Union<readonly [Schema.Literal<"deleted">, Schema.Literal<"quarantined">, Schema.Literal<"retained_until">, Schema.Literal<"unknown">]>;
20
+ export declare const DataLifecycleCase: Schema.Struct<{
21
+ readonly contractVersion: Schema.Literal<"data-lifecycle.v1">;
22
+ readonly id: Schema.String;
23
+ readonly subjectKind: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"runner">, Schema.Literal<"runner_replica">]>;
24
+ readonly subjectId: Schema.String;
25
+ readonly workspaceId: Schema.String;
26
+ readonly projectId: Schema.optionalKey<Schema.String>;
27
+ readonly requestedDisposition: Schema.Union<readonly [Schema.Literal<"retain">, Schema.Literal<"erase">, Schema.Literal<"tombstone">]>;
28
+ readonly policyDigest: Schema.String;
29
+ readonly state: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"requested">, Schema.Literal<"draining">, Schema.Literal<"export_evaluated">, Schema.Literal<"erased">, Schema.Literal<"tombstoned">, Schema.Literal<"blocked_by_hold">, Schema.Literal<"residue_unknown">, Schema.Literal<"rejected">, Schema.Literal<"canceled">]>;
30
+ readonly holdStatus: Schema.Union<readonly [Schema.Literal<"none">, Schema.Literal<"active">, Schema.Literal<"released">]>;
31
+ readonly resourceVersion: Schema.Int;
32
+ readonly containmentVersion: Schema.Int;
33
+ readonly exportManifestId: Schema.optionalKey<Schema.String>;
34
+ readonly erasureId: Schema.optionalKey<Schema.String>;
35
+ readonly tombstoneId: Schema.optionalKey<Schema.String>;
36
+ readonly residueUnknown: Schema.Boolean;
37
+ readonly owner: Schema.Struct<{
38
+ readonly actorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
39
+ readonly actorId: Schema.String;
40
+ readonly delegatedByUserId: Schema.optionalKey<Schema.String>;
41
+ }>;
42
+ readonly createdAt: Schema.String;
43
+ readonly updatedAt: Schema.String;
44
+ }>;
45
+ export type DataLifecycleCase = (typeof DataLifecycleCase)['Type'];
46
+ export declare const DataLifecycleRequest: Schema.Struct<{
47
+ readonly subjectKind: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"runner">, Schema.Literal<"runner_replica">]>;
48
+ readonly subjectId: Schema.String;
49
+ readonly workspaceId: Schema.String;
50
+ readonly projectId: Schema.optionalKey<Schema.String>;
51
+ readonly requestedDisposition: Schema.Union<readonly [Schema.Literal<"retain">, Schema.Literal<"erase">, Schema.Literal<"tombstone">]>;
52
+ readonly policyDigest: Schema.String;
53
+ readonly reasonClass: Schema.String;
54
+ readonly expectedResourceVersion: Schema.optionalKey<Schema.Int>;
55
+ }>;
56
+ export type DataLifecycleRequest = (typeof DataLifecycleRequest)['Type'];
57
+ export declare const DataLifecycleHoldRequest: Schema.Struct<{
58
+ readonly scopeKind: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"runner">, Schema.Literal<"runner_replica">]>;
59
+ readonly scopeRef: Schema.String;
60
+ readonly categories: Schema.$Array<Schema.String>;
61
+ readonly authorityRef: Schema.String;
62
+ readonly reasonClass: Schema.String;
63
+ readonly reviewAt: Schema.String;
64
+ readonly policyDigest: Schema.String;
65
+ }>;
66
+ export type DataLifecycleHoldRequest = (typeof DataLifecycleHoldRequest)['Type'];
67
+ export declare const DataLifecycleHold: Schema.Struct<{
68
+ readonly contractVersion: Schema.Literal<"data-lifecycle.v1">;
69
+ readonly id: Schema.String;
70
+ readonly caseId: Schema.String;
71
+ readonly scopeKind: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"runner">, Schema.Literal<"runner_replica">]>;
72
+ readonly scopeRef: Schema.String;
73
+ readonly categories: Schema.$Array<Schema.String>;
74
+ readonly authorityRef: Schema.String;
75
+ readonly reasonClass: Schema.String;
76
+ readonly openedAt: Schema.String;
77
+ readonly reviewAt: Schema.String;
78
+ readonly releasedAt: Schema.optionalKey<Schema.String>;
79
+ readonly policyDigest: Schema.String;
80
+ readonly actor: Schema.Struct<{
81
+ readonly actorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
82
+ readonly actorId: Schema.String;
83
+ readonly delegatedByUserId: Schema.optionalKey<Schema.String>;
84
+ }>;
85
+ readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"released">, Schema.Literal<"superseded">]>;
86
+ }>;
87
+ export type DataLifecycleHold = (typeof DataLifecycleHold)['Type'];
88
+ export declare const DataLifecycleExportManifest: Schema.Struct<{
89
+ readonly contractVersion: Schema.Literal<"data-lifecycle.v1">;
90
+ readonly id: Schema.String;
91
+ readonly caseId: Schema.String;
92
+ readonly subjectKind: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"runner">, Schema.Literal<"runner_replica">]>;
93
+ readonly subjectId: Schema.String;
94
+ readonly workspaceId: Schema.String;
95
+ readonly policyDigest: Schema.String;
96
+ readonly memberDigests: Schema.$Array<Schema.String>;
97
+ readonly omissions: Schema.$Array<Schema.Struct<{
98
+ readonly category: Schema.String;
99
+ readonly reason: Schema.Union<readonly [Schema.Literal<"authorization">, Schema.Literal<"redaction">, Schema.Literal<"retention">, Schema.Literal<"legal_hold">, Schema.Literal<"raw_local">, Schema.Literal<"provider_owned">]>;
100
+ }>>;
101
+ readonly manifestDigest: Schema.String;
102
+ readonly createdAt: Schema.String;
103
+ readonly actor: Schema.Struct<{
104
+ readonly actorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
105
+ readonly actorId: Schema.String;
106
+ readonly delegatedByUserId: Schema.optionalKey<Schema.String>;
107
+ }>;
108
+ }>;
109
+ export type DataLifecycleExportManifest = (typeof DataLifecycleExportManifest)['Type'];
110
+ export declare const DataLifecycleExportRequest: Schema.Struct<{
111
+ readonly memberDigests: Schema.$Array<Schema.String>;
112
+ readonly omissions: Schema.$Array<Schema.Struct<{
113
+ readonly category: Schema.String;
114
+ readonly reason: Schema.Union<readonly [Schema.Literal<"authorization">, Schema.Literal<"redaction">, Schema.Literal<"retention">, Schema.Literal<"legal_hold">, Schema.Literal<"raw_local">, Schema.Literal<"provider_owned">]>;
115
+ }>>;
116
+ }>;
117
+ export type DataLifecycleExportRequest = (typeof DataLifecycleExportRequest)['Type'];
118
+ export declare const DataLifecycleErasure: Schema.Struct<{
119
+ readonly id: Schema.String;
120
+ readonly caseId: Schema.String;
121
+ readonly status: Schema.Union<readonly [Schema.Literal<"requested">, Schema.Literal<"blocked_by_hold">, Schema.Literal<"approved">, Schema.Literal<"completed">, Schema.Literal<"provider_owned_nonclaim">]>;
122
+ readonly reasonClass: Schema.String;
123
+ readonly policyDigest: Schema.String;
124
+ readonly holdSummary: Schema.String;
125
+ readonly finalRedactionEpoch: Schema.Int;
126
+ readonly tombstoneId: Schema.optionalKey<Schema.String>;
127
+ readonly providerOwnedNonclaim: Schema.Boolean;
128
+ readonly actor: Schema.optionalKey<Schema.Struct<{
129
+ readonly actorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
130
+ readonly actorId: Schema.String;
131
+ readonly delegatedByUserId: Schema.optionalKey<Schema.String>;
132
+ }>>;
133
+ readonly createdAt: Schema.String;
134
+ readonly updatedAt: Schema.String;
135
+ }>;
136
+ export type DataLifecycleErasure = (typeof DataLifecycleErasure)['Type'];
137
+ export declare const DataLifecycleResidueResource: Schema.Struct<{
138
+ readonly resourceKind: Schema.String;
139
+ readonly resourceRef: Schema.String;
140
+ readonly disposition: Schema.Union<readonly [Schema.Literal<"deleted">, Schema.Literal<"quarantined">, Schema.Literal<"retained_until">, Schema.Literal<"unknown">]>;
141
+ readonly retainedUntil: Schema.optionalKey<Schema.String>;
142
+ readonly ownerRef: Schema.optionalKey<Schema.String>;
143
+ readonly policyDigest: Schema.String;
144
+ readonly nextCheckAt: Schema.optionalKey<Schema.String>;
145
+ readonly receiptDigest: Schema.optionalKey<Schema.String>;
146
+ }>;
147
+ export type DataLifecycleResidueResource = (typeof DataLifecycleResidueResource)['Type'];
148
+ export declare const DataLifecycleResidueRequest: Schema.Struct<{
149
+ readonly resources: Schema.$Array<Schema.Struct<{
150
+ readonly resourceKind: Schema.String;
151
+ readonly resourceRef: Schema.String;
152
+ readonly disposition: Schema.Union<readonly [Schema.Literal<"deleted">, Schema.Literal<"quarantined">, Schema.Literal<"retained_until">, Schema.Literal<"unknown">]>;
153
+ readonly retainedUntil: Schema.optionalKey<Schema.String>;
154
+ readonly ownerRef: Schema.optionalKey<Schema.String>;
155
+ readonly policyDigest: Schema.String;
156
+ readonly nextCheckAt: Schema.optionalKey<Schema.String>;
157
+ readonly receiptDigest: Schema.optionalKey<Schema.String>;
158
+ }>>;
159
+ }>;
160
+ export type DataLifecycleResidueRequest = (typeof DataLifecycleResidueRequest)['Type'];
161
+ export declare const DataLifecycleTombstone: Schema.Struct<{
162
+ readonly contractVersion: Schema.Literal<"data-lifecycle.v1">;
163
+ readonly id: Schema.String;
164
+ readonly caseId: Schema.String;
165
+ readonly subjectKind: Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"runner">, Schema.Literal<"runner_replica">]>;
166
+ readonly subjectId: Schema.String;
167
+ readonly workspaceId: Schema.String;
168
+ readonly projectId: Schema.optionalKey<Schema.String>;
169
+ readonly taskId: Schema.optionalKey<Schema.String>;
170
+ readonly priorSafeDigest: Schema.optionalKey<Schema.String>;
171
+ readonly finalRedactionEpoch: Schema.Int;
172
+ readonly disposition: Schema.Union<readonly [Schema.Literal<"retain">, Schema.Literal<"erase">, Schema.Literal<"tombstone">]>;
173
+ readonly erasureReasonClass: Schema.String;
174
+ readonly retentionPolicyDigest: Schema.String;
175
+ readonly holdSummary: Schema.String;
176
+ readonly residueDisposition: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"deleted">, Schema.Literal<"quarantined">, Schema.Literal<"retained_until">, Schema.Literal<"unknown">]>>;
177
+ readonly createdAt: Schema.String;
178
+ readonly eventRef: Schema.String;
179
+ }>;
180
+ export type DataLifecycleTombstone = (typeof DataLifecycleTombstone)['Type'];
181
+ export declare function isDataLifecycleTransitionAllowed(from: DataLifecycleState, to: DataLifecycleState): boolean;
182
+ export declare function assertDataLifecycleTransition(from: DataLifecycleState, to: DataLifecycleState): void;
183
+ export declare function isDataLifecycleSecurityContained(state: DataLifecycleState): boolean;
184
+ export declare function lifecycleRequestDigest(input: {
185
+ readonly subjectKind: DataLifecycleSubjectKind;
186
+ readonly subjectId: string;
187
+ readonly workspaceId: string;
188
+ readonly projectId?: string;
189
+ readonly requestedDisposition: DataLifecycleDisposition;
190
+ readonly policyDigest: string;
191
+ readonly reasonClass: string;
192
+ }): string;
193
+ export declare function assertSafeDataLifecycleText(value: string, path?: string): void;
194
+ export declare function assertSafeDataLifecycleMetadata<ValueType>(value: ValueType, path?: string): void;
195
+ export {};
@@ -0,0 +1,48 @@
1
+ import * as Schema from 'effect/Schema';
2
+ export declare const DecisionStatuses: readonly ['active', 'superseded', 'deprecated'];
3
+ export declare const DecisionChangeOperations: readonly ['create', 'update', 'supersede', 'deprecate'];
4
+ export declare const DecisionStatus: Schema.Literals<readonly ["active", "superseded", "deprecated"]>;
5
+ export declare const DecisionScopeType: Schema.Literals<readonly ["workspace", "project", "task", "kit"]>;
6
+ export declare const DecisionContent: Schema.Struct<{
7
+ readonly title: Schema.String;
8
+ readonly decision: Schema.String;
9
+ readonly rationale: Schema.String;
10
+ readonly alternatives: Schema.$Array<Schema.String>;
11
+ readonly consequences: Schema.$Array<Schema.String>;
12
+ }>;
13
+ export declare const Decision: Schema.Struct<{
14
+ readonly id: Schema.String;
15
+ readonly workspaceId: Schema.String;
16
+ readonly scopeType: Schema.Literals<readonly ["workspace", "project", "task", "kit"]>;
17
+ readonly scopeId: Schema.String;
18
+ readonly title: Schema.String;
19
+ readonly status: Schema.Literals<readonly ["active", "superseded", "deprecated"]>;
20
+ readonly decision: Schema.String;
21
+ readonly rationale: Schema.String;
22
+ readonly alternatives: Schema.$Array<Schema.String>;
23
+ readonly consequences: Schema.$Array<Schema.String>;
24
+ readonly sourceProposalId: Schema.optionalKey<Schema.String>;
25
+ readonly sourceTaskId: Schema.optionalKey<Schema.String>;
26
+ readonly supersedesDecisionId: Schema.optionalKey<Schema.String>;
27
+ readonly approvedByActorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
28
+ readonly approvedByActorId: Schema.String;
29
+ readonly createdAt: Schema.String;
30
+ readonly updatedAt: Schema.String;
31
+ }>;
32
+ export declare const DecisionChange: Schema.Struct<{
33
+ readonly operation: Schema.Literals<readonly ["create", "update", "supersede", "deprecate"]>;
34
+ readonly decisionId: Schema.optionalKey<Schema.String>;
35
+ readonly expectedStatus: Schema.optionalKey<Schema.Literals<readonly ["active", "superseded", "deprecated"]>>;
36
+ readonly decision: Schema.optionalKey<Schema.Struct<{
37
+ readonly title: Schema.String;
38
+ readonly decision: Schema.String;
39
+ readonly rationale: Schema.String;
40
+ readonly alternatives: Schema.$Array<Schema.String>;
41
+ readonly consequences: Schema.$Array<Schema.String>;
42
+ }>>;
43
+ }>;
44
+ export type DecisionStatus = (typeof DecisionStatus)['Type'];
45
+ export type DecisionScopeType = (typeof DecisionScopeType)['Type'];
46
+ export type DecisionContent = (typeof DecisionContent)['Type'];
47
+ export type Decision = (typeof Decision)['Type'];
48
+ export type DecisionChange = (typeof DecisionChange)['Type'];
@@ -0,0 +1,125 @@
1
+ import * as Schema from 'effect/Schema';
2
+ import type { DeliveryPolicyOperation } from './delivery-policy';
3
+ import type { LoopCapabilityKind } from './loop';
4
+ export declare const DeliveryOperationRequest: Schema.Union<readonly [Schema.Struct<{
5
+ readonly deliveryAttemptId: Schema.String;
6
+ readonly idempotencyKey: Schema.String;
7
+ readonly operation: Schema.Literal<"create_branch">;
8
+ }>, Schema.Struct<{
9
+ readonly deliveryAttemptId: Schema.String;
10
+ readonly idempotencyKey: Schema.String;
11
+ readonly operation: Schema.Literal<"push_commit">;
12
+ }>, Schema.Struct<{
13
+ readonly deliveryAttemptId: Schema.String;
14
+ readonly idempotencyKey: Schema.String;
15
+ readonly operation: Schema.Literal<"create_change_request">;
16
+ readonly title: Schema.String;
17
+ readonly managedContent: Schema.optionalKey<Schema.String>;
18
+ readonly draft: Schema.optionalKey<Schema.Boolean>;
19
+ }>, Schema.Struct<{
20
+ readonly deliveryAttemptId: Schema.String;
21
+ readonly idempotencyKey: Schema.String;
22
+ readonly operation: Schema.Literal<"update_target">;
23
+ }>, Schema.Struct<{
24
+ readonly deliveryAttemptId: Schema.String;
25
+ readonly idempotencyKey: Schema.String;
26
+ readonly operation: Schema.Literal<"request_review">;
27
+ readonly reviewers: Schema.optionalKey<Schema.$Array<Schema.String>>;
28
+ readonly teamReviewers: Schema.optionalKey<Schema.$Array<Schema.String>>;
29
+ }>, Schema.Struct<{
30
+ readonly deliveryAttemptId: Schema.String;
31
+ readonly idempotencyKey: Schema.String;
32
+ readonly operation: Schema.Literal<"record_review">;
33
+ }>, Schema.Struct<{
34
+ readonly deliveryAttemptId: Schema.String;
35
+ readonly idempotencyKey: Schema.String;
36
+ readonly operation: Schema.Literal<"update_description">;
37
+ readonly expectedBodyDigest: Schema.String;
38
+ readonly managedContent: Schema.String;
39
+ }>, Schema.Struct<{
40
+ readonly deliveryAttemptId: Schema.String;
41
+ readonly idempotencyKey: Schema.String;
42
+ readonly operation: Schema.Literal<"reply_review_thread">;
43
+ readonly commentId: Schema.String;
44
+ readonly body: Schema.String;
45
+ }>, Schema.Struct<{
46
+ readonly deliveryAttemptId: Schema.String;
47
+ readonly idempotencyKey: Schema.String;
48
+ readonly operation: Schema.Literal<"set_draft_state">;
49
+ readonly draft: Schema.Boolean;
50
+ }>, Schema.Struct<{
51
+ readonly deliveryAttemptId: Schema.String;
52
+ readonly idempotencyKey: Schema.String;
53
+ readonly operation: Schema.Literal<"publish_check">;
54
+ readonly name: Schema.String;
55
+ readonly status: Schema.Literals<readonly ["queued", "in_progress", "completed"]>;
56
+ readonly conclusion: Schema.optionalKey<Schema.Literals<readonly ["success", "failure", "neutral", "cancelled", "skipped", "timed_out", "action_required"]>>;
57
+ readonly title: Schema.String;
58
+ readonly summary: Schema.String;
59
+ }>, Schema.Struct<{
60
+ readonly deliveryAttemptId: Schema.String;
61
+ readonly idempotencyKey: Schema.String;
62
+ readonly operation: Schema.Literal<"set_change_request_state">;
63
+ readonly state: Schema.Literals<readonly ["open", "closed"]>;
64
+ }>, Schema.Struct<{
65
+ readonly deliveryAttemptId: Schema.String;
66
+ readonly idempotencyKey: Schema.String;
67
+ readonly operation: Schema.Literal<"enqueue_merge_queue">;
68
+ }>, Schema.Struct<{
69
+ readonly deliveryAttemptId: Schema.String;
70
+ readonly idempotencyKey: Schema.String;
71
+ readonly operation: Schema.Literal<"delete_merged_branch">;
72
+ }>, Schema.Struct<{
73
+ readonly deliveryAttemptId: Schema.String;
74
+ readonly idempotencyKey: Schema.String;
75
+ readonly operation: Schema.Literal<"merge_intermediate">;
76
+ }>, Schema.Struct<{
77
+ readonly deliveryAttemptId: Schema.String;
78
+ readonly idempotencyKey: Schema.String;
79
+ readonly operation: Schema.Literal<"create_final_change_request">;
80
+ readonly title: Schema.String;
81
+ }>, Schema.Struct<{
82
+ readonly deliveryAttemptId: Schema.String;
83
+ readonly idempotencyKey: Schema.String;
84
+ readonly operation: Schema.Literal<"merge_final">;
85
+ }>]>;
86
+ export declare const DeliveryOperationResult: Schema.Struct<{
87
+ readonly deliveryAttemptId: Schema.String;
88
+ readonly operation: Schema.Literals<readonly ["create_branch", "push_commit", "create_change_request", "update_target", "request_review", "record_review", "update_description", "reply_review_thread", "set_draft_state", "publish_check", "set_change_request_state", "enqueue_merge_queue", "delete_merged_branch", "merge_intermediate", "create_final_change_request", "merge_final", "reconcile", "revert"]>;
89
+ readonly changeRequestId: Schema.optionalKey<Schema.String>;
90
+ readonly expectedBodyDigest: Schema.optionalKey<Schema.String>;
91
+ readonly draft: Schema.optionalKey<Schema.Boolean>;
92
+ readonly changeRequestState: Schema.optionalKey<Schema.Literals<readonly ["open", "closed", "merged"]>>;
93
+ readonly externalEffectId: Schema.String;
94
+ readonly disposition: Schema.Literals<readonly ["applied", "unknown", "reconciled_absent", "reconciled_applied", "conflict", "manual"]>;
95
+ readonly state: Schema.Literals<readonly ["prepared", "executing", "confirmed_applied", "confirmed_absent", "unknown", "reconciling", "manual"]>;
96
+ readonly reasonCode: Schema.optionalKey<Schema.String>;
97
+ readonly observedAt: Schema.String;
98
+ }>;
99
+ export declare const DeliveryOperationAvailability: Schema.Struct<{
100
+ readonly deliveryAttemptId: Schema.String;
101
+ readonly operation: Schema.Literals<readonly ["create_branch", "push_commit", "create_change_request", "update_target", "request_review", "record_review", "update_description", "reply_review_thread", "set_draft_state", "publish_check", "set_change_request_state", "enqueue_merge_queue", "delete_merged_branch", "merge_intermediate", "create_final_change_request", "merge_final", "reconcile", "revert"]>;
102
+ readonly available: Schema.Boolean;
103
+ readonly reasons: Schema.$Array<Schema.String>;
104
+ readonly changeRequestId: Schema.optionalKey<Schema.String>;
105
+ readonly expectedBodyDigest: Schema.optionalKey<Schema.String>;
106
+ readonly draft: Schema.optionalKey<Schema.Boolean>;
107
+ readonly changeRequestState: Schema.optionalKey<Schema.Literals<readonly ["draft", "open", "closed", "merged"]>>;
108
+ }>;
109
+ export declare const TaskDeliveryOperations: Schema.Struct<{
110
+ readonly items: Schema.$Array<Schema.Struct<{
111
+ readonly deliveryAttemptId: Schema.String;
112
+ readonly operation: Schema.Literals<readonly ["create_branch", "push_commit", "create_change_request", "update_target", "request_review", "record_review", "update_description", "reply_review_thread", "set_draft_state", "publish_check", "set_change_request_state", "enqueue_merge_queue", "delete_merged_branch", "merge_intermediate", "create_final_change_request", "merge_final", "reconcile", "revert"]>;
113
+ readonly available: Schema.Boolean;
114
+ readonly reasons: Schema.$Array<Schema.String>;
115
+ readonly changeRequestId: Schema.optionalKey<Schema.String>;
116
+ readonly expectedBodyDigest: Schema.optionalKey<Schema.String>;
117
+ readonly draft: Schema.optionalKey<Schema.Boolean>;
118
+ readonly changeRequestState: Schema.optionalKey<Schema.Literals<readonly ["draft", "open", "closed", "merged"]>>;
119
+ }>>;
120
+ }>;
121
+ export type DeliveryOperationRequest = (typeof DeliveryOperationRequest)['Type'];
122
+ export type DeliveryOperationResult = (typeof DeliveryOperationResult)['Type'];
123
+ export type DeliveryOperationAvailability = (typeof DeliveryOperationAvailability)['Type'];
124
+ export type TaskDeliveryOperations = (typeof TaskDeliveryOperations)['Type'];
125
+ export declare function deliveryOperationLoopCapability(operation: DeliveryPolicyOperation): LoopCapabilityKind;
@@ -0,0 +1,174 @@
1
+ import type { ActorType } from './common';
2
+ import type { RepoBindingProvider } from './repo-binding';
3
+ declare const DeliveryPolicyTopologies: readonly ['epic_integration', 'direct_to_default'];
4
+ export type DeliveryPolicyTopology = (typeof DeliveryPolicyTopologies)[number];
5
+ export declare const DeliveryPolicyOperations: readonly ['create_branch', 'push_commit', 'create_change_request', 'update_target', 'request_review', 'record_review', 'update_description', 'reply_review_thread', 'set_draft_state', 'publish_check', 'set_change_request_state', 'enqueue_merge_queue', 'delete_merged_branch', 'merge_intermediate', 'create_final_change_request', 'merge_final', 'reconcile', 'revert'];
6
+ export type DeliveryPolicyOperation = (typeof DeliveryPolicyOperations)[number];
7
+ export declare const DeliveryAttemptStatuses: readonly ['prepared', 'running', 'succeeded', 'failed', 'blocked', 'canceled', 'unknown_reconciliation_required', 'superseded'];
8
+ export type DeliveryAttemptStatus = (typeof DeliveryAttemptStatuses)[number];
9
+ export declare const DeliveryReconciliationStates: readonly ['not_required', 'pending', 'reconciling', 'resolved', 'manual'];
10
+ export type DeliveryReconciliationState = (typeof DeliveryReconciliationStates)[number];
11
+ declare const DeliveryFinalReviewAuthorities: readonly ['human_required', 'qualified_independent_agent'];
12
+ type DeliveryFinalReviewAuthority = (typeof DeliveryFinalReviewAuthorities)[number];
13
+ type DeliveryDigest = string;
14
+ type CommitSha = string;
15
+ export interface DeliveryRepositoryIdentity {
16
+ readonly provider: RepoBindingProvider;
17
+ readonly host: string;
18
+ readonly providerRepositoryId: string;
19
+ readonly owner: string;
20
+ readonly repositoryName: string;
21
+ }
22
+ export interface DeliveryBranchPin {
23
+ readonly ref: string;
24
+ readonly sha: CommitSha;
25
+ }
26
+ export interface DeliveryIntegrationBranchPolicy {
27
+ readonly generatedRefTemplate: string;
28
+ readonly ref?: string;
29
+ readonly creationBase: DeliveryBranchPin;
30
+ readonly deletionForbiddenUntilEpicClosure: boolean;
31
+ }
32
+ interface DeliveryVerificationPolicy {
33
+ readonly commandProfileDigest: DeliveryDigest;
34
+ readonly requiredChecks: readonly string[];
35
+ readonly freshnessSeconds: number;
36
+ readonly bindSourceSha: boolean;
37
+ readonly bindTargetSha: boolean;
38
+ readonly missingCheck: 'block' | 'manual';
39
+ readonly staleCheck: 'block' | 'manual';
40
+ }
41
+ interface DeliveryReviewPolicy {
42
+ readonly requiredApprovals: number;
43
+ readonly reviewerQualification: string;
44
+ readonly excludeAuthorLineage: boolean;
45
+ readonly unresolvedThreads: 'block' | 'allow';
46
+ }
47
+ interface DeliveryFinalReviewPolicy extends DeliveryReviewPolicy {
48
+ readonly authority: DeliveryFinalReviewAuthority;
49
+ readonly qualification?: string;
50
+ }
51
+ interface DeliveryDirectDefaultRisk {
52
+ readonly explicitlyOptedIn: boolean;
53
+ readonly reason?: string;
54
+ readonly approverClass?: 'human_owner' | 'human_admin' | 'qualified_independent_agent';
55
+ readonly extraVerificationDigest?: DeliveryDigest;
56
+ }
57
+ export interface DeliveryPolicy {
58
+ readonly id: string;
59
+ readonly version: number;
60
+ readonly digest: DeliveryDigest;
61
+ readonly workspaceId: string;
62
+ readonly projectId?: string;
63
+ readonly repoBindingId: string;
64
+ readonly epicTaskId: string;
65
+ readonly childTaskId?: string;
66
+ readonly providerHostClass: 'gitlab_com' | 'gitlab_self_managed' | 'github_com' | 'github_enterprise_server';
67
+ readonly repositoryIdentity: DeliveryRepositoryIdentity;
68
+ readonly topology: DeliveryPolicyTopology;
69
+ readonly integrationBranch?: DeliveryIntegrationBranchPolicy;
70
+ readonly defaultBranch: DeliveryBranchPin;
71
+ readonly taskBranchNamespace: string;
72
+ readonly allowStackedBranches: boolean;
73
+ readonly operations: readonly DeliveryPolicyOperation[];
74
+ readonly verification: DeliveryVerificationPolicy;
75
+ readonly intermediateReview: DeliveryReviewPolicy;
76
+ readonly finalReview: DeliveryFinalReviewPolicy;
77
+ readonly directDefaultRisk: DeliveryDirectDefaultRisk;
78
+ readonly conflicts: Readonly<Record<string, 'block' | 'manual' | 'new_attempt'>>;
79
+ readonly maxActiveWriteAttempts: number;
80
+ readonly singleWriterIntegrationBranch: boolean;
81
+ readonly allowedDeliveryAgentIdentityId?: string;
82
+ readonly accountScopeReference: string;
83
+ readonly evidenceRetentionClass: string;
84
+ readonly createdByActorType: ActorType;
85
+ readonly createdByActorId: string;
86
+ readonly createdAt: string;
87
+ }
88
+ export interface DeliveryPolicyDraft extends Omit<DeliveryPolicy, 'digest'> {
89
+ readonly digest?: DeliveryDigest;
90
+ }
91
+ export interface DeliveryAttempt {
92
+ readonly id: string;
93
+ readonly workspaceId: string;
94
+ readonly projectId: string;
95
+ readonly taskId: string;
96
+ readonly deliveryId: string;
97
+ readonly workUnitId: string;
98
+ readonly attemptNumber: number;
99
+ readonly policyId: string;
100
+ readonly policyDigest: DeliveryDigest;
101
+ readonly snapshotDigest: DeliveryDigest;
102
+ readonly operation: DeliveryPolicyOperation;
103
+ readonly repositoryIdentity: DeliveryRepositoryIdentity;
104
+ readonly source: DeliveryBranchPin;
105
+ readonly target: DeliveryBranchPin;
106
+ readonly integrationBranch?: DeliveryBranchPin;
107
+ readonly verificationSnapshotDigest: DeliveryDigest;
108
+ readonly reviewPolicyDigest: DeliveryDigest;
109
+ readonly effectKeys: readonly string[];
110
+ readonly authorActorType: ActorType;
111
+ readonly authorActorId: string;
112
+ readonly authorAgentIdentityId?: string;
113
+ /** Immutable actor/AgentIdentity/Loop lineage used to exclude alternate author credentials. */
114
+ readonly authorLineage?: readonly string[];
115
+ readonly status: DeliveryAttemptStatus;
116
+ readonly reconciliationState: DeliveryReconciliationState;
117
+ readonly failureCode?: string;
118
+ readonly createdAt: string;
119
+ }
120
+ export interface DeliveryChangeRequest {
121
+ readonly id: string;
122
+ readonly deliveryAttemptId: string;
123
+ readonly workspaceId: string;
124
+ readonly projectId?: string;
125
+ readonly taskId: string;
126
+ readonly repoBindingId: string;
127
+ readonly provider: RepoBindingProvider;
128
+ readonly host: string;
129
+ readonly owner: string;
130
+ readonly repositoryName: string;
131
+ readonly providerRepositoryId: string;
132
+ readonly externalId: string;
133
+ readonly url: string;
134
+ readonly title: string;
135
+ readonly source: DeliveryBranchPin;
136
+ readonly target: DeliveryBranchPin;
137
+ readonly status: 'draft' | 'open' | 'closed' | 'merged';
138
+ readonly headSha: CommitSha;
139
+ readonly baseSha: CommitSha;
140
+ readonly verificationSnapshotDigest: DeliveryDigest;
141
+ readonly reviewSnapshotDigest: DeliveryDigest;
142
+ readonly reconciliationState: DeliveryReconciliationState;
143
+ readonly providerObjectDigest: DeliveryDigest;
144
+ readonly createdByActorType: ActorType;
145
+ readonly createdByActorId: string;
146
+ readonly createdAt: string;
147
+ }
148
+ export interface DeliveryReviewEvidence {
149
+ readonly reviewerActorType: string;
150
+ readonly reviewerActorId: string;
151
+ readonly reviewerAgentIdentityId?: string;
152
+ readonly sourceSha: CommitSha;
153
+ readonly targetSha: CommitSha;
154
+ readonly inspectedExactRevision: boolean;
155
+ readonly qualified: boolean;
156
+ readonly authorLineage: readonly string[];
157
+ readonly outcome: 'approved' | 'changes_requested' | 'commented';
158
+ }
159
+ export interface DeliveryGateEvidence {
160
+ readonly checksPassed: boolean;
161
+ readonly checksCurrent: boolean;
162
+ readonly noBlockingThreads: boolean;
163
+ readonly mergeable: boolean;
164
+ readonly targetSha: CommitSha;
165
+ readonly sourceSha: CommitSha;
166
+ readonly reviews: readonly DeliveryReviewEvidence[];
167
+ }
168
+ export declare function createDeliveryPolicy(draft: DeliveryPolicyDraft): DeliveryPolicy;
169
+ export declare function assertDeliveryPolicy(policy: DeliveryPolicyDraft | DeliveryPolicy): void;
170
+ export declare function assertTargetSha(attempt: DeliveryAttempt, observedTargetSha: CommitSha): void;
171
+ export declare function assertIndependentReview(attempt: Pick<DeliveryAttempt, 'authorActorId' | 'authorAgentIdentityId' | 'authorActorType' | 'source' | 'target'>, review: DeliveryReviewEvidence): void;
172
+ export declare function assertIntermediateMergeGate(policy: DeliveryPolicy, attempt: DeliveryAttempt, evidence: DeliveryGateEvidence): void;
173
+ export declare function assertFinalMergeGate(policy: DeliveryPolicy, attempt: DeliveryAttempt, evidence: DeliveryGateEvidence): void;
174
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { KitCreate } from './kit';
2
+ declare const marketplace: {
3
+ readonly source: 'kitman-engineering-loop';
4
+ readonly publisher: 'Kitman Platform';
5
+ readonly visibility: 'public';
6
+ readonly trusted: true;
7
+ readonly reviewStatus: 'approved';
8
+ readonly installable: true;
9
+ readonly rollout: {
10
+ readonly channel: 'default';
11
+ readonly installDefault: true;
12
+ readonly preservesExistingInstallations: true;
13
+ };
14
+ };
15
+ type ShippedKit = Omit<KitCreate, 'metadata' | 'kind' | 'slug'> & {
16
+ readonly slug: string;
17
+ readonly kind: 'process' | 'technology';
18
+ readonly metadata: {
19
+ readonly marketplace: typeof marketplace;
20
+ };
21
+ };
22
+ /** The Kits every Workspace gets by default: the owner's Claude Code setup, for every Harness, at the latest versions. */
23
+ export declare const ShippedKitCatalog: readonly ShippedKit[];
24
+ export {};
@@ -0,0 +1,18 @@
1
+ import { type CodeHostCapability } from './integration';
2
+ type EnterpriseCodeHostSetup = {
3
+ readonly provider: 'github' | 'gitlab';
4
+ readonly host: string;
5
+ readonly tls?: {
6
+ readonly customCaRef?: string;
7
+ };
8
+ readonly capabilities: readonly CodeHostCapability[];
9
+ };
10
+ type EnterpriseSupportEvidence = {
11
+ readonly provider: 'github' | 'gitlab';
12
+ readonly host: string;
13
+ readonly capability: CodeHostCapability;
14
+ readonly support: 'certified' | 'detected' | 'unsupported';
15
+ readonly evidenceDigest: string;
16
+ };
17
+ export declare function certifyEnterpriseCodeHostSetup(setup: EnterpriseCodeHostSetup): readonly EnterpriseSupportEvidence[];
18
+ export {};
@@ -0,0 +1,38 @@
1
+ import { type DeliveryPolicy } from './delivery-policy';
2
+ declare const EpicDeliveryFactKinds: readonly ['integration_branch_observed', 'task_branch_observed', 'task_change_request_opened', 'task_intermediate_merged', 'shared_branch_contribution_accepted', 'shared_branch_contribution_lost', 'task_failed', 'task_reverted', 'effect_unknown', 'target_moved', 'review_invalidated', 'final_change_request_opened', 'final_change_request_closed', 'final_merge_reconciled'];
3
+ export type EpicDeliveryFactKind = (typeof EpicDeliveryFactKinds)[number];
4
+ /** The immutable WorkUnit lease tuple required by every delivery mutation. */
5
+ export interface DeliveryWorkUnitFence {
6
+ readonly leaseOwnerId: string;
7
+ readonly runnerReplicaId: string;
8
+ readonly leaseId: string;
9
+ readonly attempt: number;
10
+ readonly fencingToken: string;
11
+ readonly capacitySlot: string;
12
+ readonly leaseExpiresAt: string;
13
+ }
14
+ export interface EpicDeliveryWriterLease {
15
+ readonly key: string;
16
+ readonly workspaceId: string;
17
+ readonly projectId: string;
18
+ readonly epicTaskId: string;
19
+ readonly repoBindingId: string;
20
+ readonly provider: DeliveryPolicy['repositoryIdentity']['provider'];
21
+ readonly host: string;
22
+ readonly providerRepositoryId: string;
23
+ readonly policyDigest: string;
24
+ readonly integrationBranchRef: string;
25
+ readonly integrationBranchSha: string;
26
+ readonly ownerId: string;
27
+ readonly workUnitId: string;
28
+ readonly fence: DeliveryWorkUnitFence;
29
+ readonly resourceVersion: number;
30
+ readonly status: 'held' | 'released';
31
+ readonly expiresAt: string;
32
+ readonly createdAt: string;
33
+ readonly updatedAt: string;
34
+ }
35
+ export type { DeliveryAttempt, DeliveryPolicy } from './delivery-policy';
36
+ export type SafeDeliveryEvidence = {
37
+ readonly [key: string]: string | number | boolean | null;
38
+ };