@kitman-sh/sdk 0.10.82 → 0.10.84
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/build/index.js +2 -2
- package/dist/{chunk-fc5r66fq.js → chunk-3pz068kn.js} +11 -5
- package/dist/{chunk-0f530caz.js → chunk-cqknxyv9.js} +88 -47
- package/dist/loop/index.js +7 -1
- package/dist/program/index.js +2 -2
- package/package.json +1 -1
- package/types/packages/core/src/a2a.d.ts +577 -0
- package/types/packages/core/src/agent-capabilities.d.ts +1434 -0
- package/types/packages/core/src/agent-launch-snapshot.d.ts +44 -0
- package/types/packages/core/src/approval-queue.d.ts +126 -0
- package/types/packages/core/src/audit.d.ts +52 -0
- package/types/packages/core/src/change-delivery.d.ts +39 -0
- package/types/packages/core/src/change-request-review.d.ts +361 -0
- package/types/packages/core/src/change-request.d.ts +288 -0
- package/types/packages/core/src/connection.d.ts +33 -0
- package/types/packages/core/src/context-feedback.d.ts +89 -0
- package/types/packages/core/src/data-lifecycle.d.ts +195 -0
- package/types/packages/core/src/decision.d.ts +48 -0
- package/types/packages/core/src/delivery-operation.d.ts +125 -0
- package/types/packages/core/src/delivery-policy.d.ts +174 -0
- package/types/packages/core/src/enterprise-forge.d.ts +19 -0
- package/types/packages/core/src/epic-delivery.d.ts +38 -0
- package/types/packages/core/src/external-effect.d.ts +313 -0
- package/types/packages/core/src/fix-flow.d.ts +149 -0
- package/types/packages/core/src/following.d.ts +59 -0
- package/types/packages/core/src/github-delivery-fixtures.d.ts +28 -0
- package/types/packages/core/src/github-delivery.d.ts +78 -0
- package/types/packages/core/src/gitlab-delivery-fixtures.d.ts +26 -0
- package/types/packages/core/src/gitlab-delivery.d.ts +76 -0
- package/types/packages/core/src/global-search.d.ts +42 -0
- package/types/packages/core/src/id.d.ts +1 -0
- package/types/packages/core/src/integration.d.ts +276 -0
- package/types/packages/core/src/intent.d.ts +260 -0
- package/types/packages/core/src/kit-install.d.ts +130 -0
- package/types/packages/core/src/live.d.ts +8231 -0
- package/types/packages/core/src/marketplace.d.ts +168 -0
- package/types/packages/core/src/me.d.ts +31 -0
- package/types/packages/core/src/memory.d.ts +93 -0
- package/types/packages/core/src/my-teams.d.ts +1599 -0
- package/types/packages/core/src/notification.d.ts +250 -0
- package/types/packages/core/src/observability.d.ts +175 -0
- package/types/packages/core/src/owner.d.ts +15 -0
- package/types/packages/core/src/personal-development-profile.d.ts +11 -0
- package/types/packages/core/src/platform-release.d.ts +60 -0
- package/types/packages/core/src/program-credential.d.ts +10 -0
- package/types/packages/core/src/provider-safe-text.d.ts +2 -0
- package/types/packages/core/src/push.d.ts +68 -0
- package/types/packages/core/src/run-display.d.ts +22 -0
- package/types/packages/core/src/run-file.d.ts +190 -0
- package/types/packages/core/src/run-graph.d.ts +67 -0
- package/types/packages/core/src/run-journal.d.ts +28 -0
- package/types/packages/core/src/run-launch.d.ts +82 -0
- package/types/packages/core/src/runner-eligibility.d.ts +62 -0
- package/types/packages/core/src/runner-routing.d.ts +11 -0
- package/types/packages/core/src/runner-trust.d.ts +67 -0
- package/types/packages/core/src/runner.d.ts +4076 -0
- package/types/packages/core/src/scope-directory.d.ts +100 -0
- package/types/packages/core/src/session.d.ts +90 -0
- package/types/packages/core/src/step-brief.d.ts +70 -0
- package/types/packages/core/src/storage.d.ts +49 -0
- package/types/packages/core/src/sync-kit.d.ts +595 -0
- package/types/packages/core/src/task-detail.d.ts +511 -0
- package/types/packages/core/src/task-execution-record.d.ts +620 -0
- package/types/packages/core/src/task-key.d.ts +9 -0
- package/types/packages/core/src/task.d.ts +588 -0
- package/types/packages/core/src/team-context.d.ts +43 -0
- package/types/packages/core/src/transcript.d.ts +250 -0
- package/types/packages/core/src/trust-panel.d.ts +27 -0
- package/types/packages/core/src/work-unit.d.ts +33 -1
- package/types/packages/core/src/workspace.d.ts +167 -0
- package/types/packages/live/src/rpc/runner-client.d.ts +15 -0
- package/types/packages/live/src/rpc/runner-group.d.ts +1699 -1670
- package/types/packages/sdk/src/loop/activities.d.ts +3 -0
- package/types/packages/sdk/src/loop/index.d.ts +1 -0
- package/types/packages/sdk/src/loop/resolve.d.ts +13 -0
- package/types/packages/sdk/src/loop/steps.d.ts +5 -0
- package/types/packages/sdk/src/loop/sync.d.ts +8 -1
- package/types/packages/sdk/src/loop/test-loop.d.ts +7 -0
- package/types/packages/sdk/src/program/engine.d.ts +2 -1
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import type { WorkspaceNotificationPreferences } from './workspace';
|
|
3
|
+
export declare const NotificationKinds: readonly ['question_waiting', 'run_failed', 'review_ready', 'no_runner', 'proposal_waiting', 'approval_waiting', 'assigned', 'mentioned', 'commented', 'state_changed', 'run_finished', 'drift_unresolved', 'run_progress', 'change_request_update', 'start_blocked', 'update_drafted', 'runner_problem'];
|
|
4
|
+
export type NotificationKind = (typeof NotificationKinds)[number];
|
|
5
|
+
/** The facts a Notification's fixed templates render; never Outputs, transcripts, source or secrets. */
|
|
6
|
+
export declare const NotificationPayload: Schema.Struct<{
|
|
7
|
+
readonly taskKey: Schema.optionalKey<Schema.String>;
|
|
8
|
+
readonly taskTitle: Schema.optionalKey<Schema.String>;
|
|
9
|
+
readonly loopTitle: Schema.optionalKey<Schema.String>;
|
|
10
|
+
readonly proposalTitle: Schema.optionalKey<Schema.String>;
|
|
11
|
+
/** The Code Mode operation a hosted MCP approval waits on. */
|
|
12
|
+
readonly toolName: Schema.optionalKey<Schema.String>;
|
|
13
|
+
readonly workspaceName: Schema.optionalKey<Schema.String>;
|
|
14
|
+
/** The Question's name, the Run's status, or the drifted constraint. */
|
|
15
|
+
readonly cause: Schema.optionalKey<Schema.String>;
|
|
16
|
+
/** The state a Task moved to. */
|
|
17
|
+
readonly state: Schema.optionalKey<Schema.String>;
|
|
18
|
+
readonly changeRequestUrl: Schema.optionalKey<Schema.String>;
|
|
19
|
+
/** What a Run needs that Kitman could not choose, such as its Loop or repository. */
|
|
20
|
+
readonly missing: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
21
|
+
/** The ChangeRequests a person can choose between for a missing `changeRequestId`, as links. */
|
|
22
|
+
readonly choices: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
23
|
+
readonly projectId: Schema.optionalKey<Schema.String>;
|
|
24
|
+
readonly projectName: Schema.optionalKey<Schema.String>;
|
|
25
|
+
/** What a drafted Project Update was written from, since the Update before it. */
|
|
26
|
+
readonly writtenFrom: Schema.optionalKey<Schema.Struct<{
|
|
27
|
+
readonly runs: Schema.Int;
|
|
28
|
+
readonly taskChanges: Schema.Int;
|
|
29
|
+
readonly since: Schema.optionalKey<Schema.String>;
|
|
30
|
+
}>>;
|
|
31
|
+
readonly runnerName: Schema.optionalKey<Schema.String>;
|
|
32
|
+
/** A Runner Problem and the one command or action that fixes it. */
|
|
33
|
+
readonly problem: Schema.optionalKey<Schema.String>;
|
|
34
|
+
readonly fix: Schema.optionalKey<Schema.String>;
|
|
35
|
+
}>;
|
|
36
|
+
export type NotificationPayload = (typeof NotificationPayload)['Type'];
|
|
37
|
+
export declare const NotificationSubject: Schema.Struct<{
|
|
38
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"task">, Schema.Literal<"run">, Schema.Literal<"proposal">, Schema.Literal<"memory">, Schema.Literal<"mcp_approval">, Schema.Literal<"project_update">, Schema.Literal<"runner">]>;
|
|
39
|
+
readonly id: Schema.String;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const Notification: Schema.Struct<{
|
|
42
|
+
readonly id: Schema.String;
|
|
43
|
+
readonly workspaceId: Schema.String;
|
|
44
|
+
readonly recipientUserId: Schema.String;
|
|
45
|
+
readonly kind: Schema.Literals<readonly ["question_waiting", "run_failed", "review_ready", "no_runner", "proposal_waiting", "approval_waiting", "assigned", "mentioned", "commented", "state_changed", "run_finished", "drift_unresolved", "run_progress", "change_request_update", "start_blocked", "update_drafted", "runner_problem"]>;
|
|
46
|
+
readonly subject: Schema.Struct<{
|
|
47
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"task">, Schema.Literal<"run">, Schema.Literal<"proposal">, Schema.Literal<"memory">, Schema.Literal<"mcp_approval">, Schema.Literal<"project_update">, Schema.Literal<"runner">]>;
|
|
48
|
+
readonly id: Schema.String;
|
|
49
|
+
}>;
|
|
50
|
+
/** Empty when Kitman acted. */
|
|
51
|
+
readonly actorId: Schema.optionalKey<Schema.String>;
|
|
52
|
+
readonly actorName: Schema.optionalKey<Schema.String>;
|
|
53
|
+
readonly payload: Schema.Struct<{
|
|
54
|
+
readonly taskKey: Schema.optionalKey<Schema.String>;
|
|
55
|
+
readonly taskTitle: Schema.optionalKey<Schema.String>;
|
|
56
|
+
readonly loopTitle: Schema.optionalKey<Schema.String>;
|
|
57
|
+
readonly proposalTitle: Schema.optionalKey<Schema.String>;
|
|
58
|
+
/** The Code Mode operation a hosted MCP approval waits on. */
|
|
59
|
+
readonly toolName: Schema.optionalKey<Schema.String>;
|
|
60
|
+
readonly workspaceName: Schema.optionalKey<Schema.String>;
|
|
61
|
+
/** The Question's name, the Run's status, or the drifted constraint. */
|
|
62
|
+
readonly cause: Schema.optionalKey<Schema.String>;
|
|
63
|
+
/** The state a Task moved to. */
|
|
64
|
+
readonly state: Schema.optionalKey<Schema.String>;
|
|
65
|
+
readonly changeRequestUrl: Schema.optionalKey<Schema.String>;
|
|
66
|
+
/** What a Run needs that Kitman could not choose, such as its Loop or repository. */
|
|
67
|
+
readonly missing: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
68
|
+
/** The ChangeRequests a person can choose between for a missing `changeRequestId`, as links. */
|
|
69
|
+
readonly choices: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
70
|
+
readonly projectId: Schema.optionalKey<Schema.String>;
|
|
71
|
+
readonly projectName: Schema.optionalKey<Schema.String>;
|
|
72
|
+
/** What a drafted Project Update was written from, since the Update before it. */
|
|
73
|
+
readonly writtenFrom: Schema.optionalKey<Schema.Struct<{
|
|
74
|
+
readonly runs: Schema.Int;
|
|
75
|
+
readonly taskChanges: Schema.Int;
|
|
76
|
+
readonly since: Schema.optionalKey<Schema.String>;
|
|
77
|
+
}>>;
|
|
78
|
+
readonly runnerName: Schema.optionalKey<Schema.String>;
|
|
79
|
+
/** A Runner Problem and the one command or action that fixes it. */
|
|
80
|
+
readonly problem: Schema.optionalKey<Schema.String>;
|
|
81
|
+
readonly fix: Schema.optionalKey<Schema.String>;
|
|
82
|
+
}>;
|
|
83
|
+
readonly title: Schema.String;
|
|
84
|
+
readonly body: Schema.String;
|
|
85
|
+
readonly link: Schema.String;
|
|
86
|
+
readonly createdAt: Schema.String;
|
|
87
|
+
readonly readAt: Schema.optionalKey<Schema.String>;
|
|
88
|
+
}>;
|
|
89
|
+
export type Notification = (typeof Notification)['Type'];
|
|
90
|
+
export declare const InboxActions: readonly ['answer', 'review', 'decide', 'retry', 'runner_offline', 'start'];
|
|
91
|
+
export declare const InboxFilters: readonly ['inbox', 'unread', 'snoozed', 'done'];
|
|
92
|
+
export type InboxFilter = (typeof InboxFilters)[number];
|
|
93
|
+
/** One subject's Notifications for its recipient, newest first; the item a person works in their Inbox. */
|
|
94
|
+
export declare const InboxItem: Schema.Struct<{
|
|
95
|
+
readonly subject: Schema.Struct<{
|
|
96
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"task">, Schema.Literal<"run">, Schema.Literal<"proposal">, Schema.Literal<"memory">, Schema.Literal<"mcp_approval">, Schema.Literal<"project_update">, Schema.Literal<"runner">]>;
|
|
97
|
+
readonly id: Schema.String;
|
|
98
|
+
}>;
|
|
99
|
+
/** What the item asks of its recipient, until it is done. */
|
|
100
|
+
readonly action: Schema.optionalKey<Schema.Literals<readonly ["answer", "review", "decide", "retry", "runner_offline", "start"]>>;
|
|
101
|
+
readonly unread: Schema.Int;
|
|
102
|
+
readonly latestAt: Schema.String;
|
|
103
|
+
readonly doneAt: Schema.optionalKey<Schema.String>;
|
|
104
|
+
readonly snoozedUntil: Schema.optionalKey<Schema.String>;
|
|
105
|
+
readonly notifications: Schema.$Array<Schema.Struct<{
|
|
106
|
+
readonly id: Schema.String;
|
|
107
|
+
readonly workspaceId: Schema.String;
|
|
108
|
+
readonly recipientUserId: Schema.String;
|
|
109
|
+
readonly kind: Schema.Literals<readonly ["question_waiting", "run_failed", "review_ready", "no_runner", "proposal_waiting", "approval_waiting", "assigned", "mentioned", "commented", "state_changed", "run_finished", "drift_unresolved", "run_progress", "change_request_update", "start_blocked", "update_drafted", "runner_problem"]>;
|
|
110
|
+
readonly subject: Schema.Struct<{
|
|
111
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"task">, Schema.Literal<"run">, Schema.Literal<"proposal">, Schema.Literal<"memory">, Schema.Literal<"mcp_approval">, Schema.Literal<"project_update">, Schema.Literal<"runner">]>;
|
|
112
|
+
readonly id: Schema.String;
|
|
113
|
+
}>;
|
|
114
|
+
/** Empty when Kitman acted. */
|
|
115
|
+
readonly actorId: Schema.optionalKey<Schema.String>;
|
|
116
|
+
readonly actorName: Schema.optionalKey<Schema.String>;
|
|
117
|
+
readonly payload: Schema.Struct<{
|
|
118
|
+
readonly taskKey: Schema.optionalKey<Schema.String>;
|
|
119
|
+
readonly taskTitle: Schema.optionalKey<Schema.String>;
|
|
120
|
+
readonly loopTitle: Schema.optionalKey<Schema.String>;
|
|
121
|
+
readonly proposalTitle: Schema.optionalKey<Schema.String>;
|
|
122
|
+
/** The Code Mode operation a hosted MCP approval waits on. */
|
|
123
|
+
readonly toolName: Schema.optionalKey<Schema.String>;
|
|
124
|
+
readonly workspaceName: Schema.optionalKey<Schema.String>;
|
|
125
|
+
/** The Question's name, the Run's status, or the drifted constraint. */
|
|
126
|
+
readonly cause: Schema.optionalKey<Schema.String>;
|
|
127
|
+
/** The state a Task moved to. */
|
|
128
|
+
readonly state: Schema.optionalKey<Schema.String>;
|
|
129
|
+
readonly changeRequestUrl: Schema.optionalKey<Schema.String>;
|
|
130
|
+
/** What a Run needs that Kitman could not choose, such as its Loop or repository. */
|
|
131
|
+
readonly missing: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
132
|
+
/** The ChangeRequests a person can choose between for a missing `changeRequestId`, as links. */
|
|
133
|
+
readonly choices: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
134
|
+
readonly projectId: Schema.optionalKey<Schema.String>;
|
|
135
|
+
readonly projectName: Schema.optionalKey<Schema.String>;
|
|
136
|
+
/** What a drafted Project Update was written from, since the Update before it. */
|
|
137
|
+
readonly writtenFrom: Schema.optionalKey<Schema.Struct<{
|
|
138
|
+
readonly runs: Schema.Int;
|
|
139
|
+
readonly taskChanges: Schema.Int;
|
|
140
|
+
readonly since: Schema.optionalKey<Schema.String>;
|
|
141
|
+
}>>;
|
|
142
|
+
readonly runnerName: Schema.optionalKey<Schema.String>;
|
|
143
|
+
/** A Runner Problem and the one command or action that fixes it. */
|
|
144
|
+
readonly problem: Schema.optionalKey<Schema.String>;
|
|
145
|
+
readonly fix: Schema.optionalKey<Schema.String>;
|
|
146
|
+
}>;
|
|
147
|
+
readonly title: Schema.String;
|
|
148
|
+
readonly body: Schema.String;
|
|
149
|
+
readonly link: Schema.String;
|
|
150
|
+
readonly createdAt: Schema.String;
|
|
151
|
+
readonly readAt: Schema.optionalKey<Schema.String>;
|
|
152
|
+
}>>;
|
|
153
|
+
}>;
|
|
154
|
+
export type InboxItem = (typeof InboxItem)['Type'];
|
|
155
|
+
export declare const InboxList: Schema.Struct<{
|
|
156
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
157
|
+
readonly subject: Schema.Struct<{
|
|
158
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"task">, Schema.Literal<"run">, Schema.Literal<"proposal">, Schema.Literal<"memory">, Schema.Literal<"mcp_approval">, Schema.Literal<"project_update">, Schema.Literal<"runner">]>;
|
|
159
|
+
readonly id: Schema.String;
|
|
160
|
+
}>;
|
|
161
|
+
/** What the item asks of its recipient, until it is done. */
|
|
162
|
+
readonly action: Schema.optionalKey<Schema.Literals<readonly ["answer", "review", "decide", "retry", "runner_offline", "start"]>>;
|
|
163
|
+
readonly unread: Schema.Int;
|
|
164
|
+
readonly latestAt: Schema.String;
|
|
165
|
+
readonly doneAt: Schema.optionalKey<Schema.String>;
|
|
166
|
+
readonly snoozedUntil: Schema.optionalKey<Schema.String>;
|
|
167
|
+
readonly notifications: Schema.$Array<Schema.Struct<{
|
|
168
|
+
readonly id: Schema.String;
|
|
169
|
+
readonly workspaceId: Schema.String;
|
|
170
|
+
readonly recipientUserId: Schema.String;
|
|
171
|
+
readonly kind: Schema.Literals<readonly ["question_waiting", "run_failed", "review_ready", "no_runner", "proposal_waiting", "approval_waiting", "assigned", "mentioned", "commented", "state_changed", "run_finished", "drift_unresolved", "run_progress", "change_request_update", "start_blocked", "update_drafted", "runner_problem"]>;
|
|
172
|
+
readonly subject: Schema.Struct<{
|
|
173
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"task">, Schema.Literal<"run">, Schema.Literal<"proposal">, Schema.Literal<"memory">, Schema.Literal<"mcp_approval">, Schema.Literal<"project_update">, Schema.Literal<"runner">]>;
|
|
174
|
+
readonly id: Schema.String;
|
|
175
|
+
}>;
|
|
176
|
+
/** Empty when Kitman acted. */
|
|
177
|
+
readonly actorId: Schema.optionalKey<Schema.String>;
|
|
178
|
+
readonly actorName: Schema.optionalKey<Schema.String>;
|
|
179
|
+
readonly payload: Schema.Struct<{
|
|
180
|
+
readonly taskKey: Schema.optionalKey<Schema.String>;
|
|
181
|
+
readonly taskTitle: Schema.optionalKey<Schema.String>;
|
|
182
|
+
readonly loopTitle: Schema.optionalKey<Schema.String>;
|
|
183
|
+
readonly proposalTitle: Schema.optionalKey<Schema.String>;
|
|
184
|
+
/** The Code Mode operation a hosted MCP approval waits on. */
|
|
185
|
+
readonly toolName: Schema.optionalKey<Schema.String>;
|
|
186
|
+
readonly workspaceName: Schema.optionalKey<Schema.String>;
|
|
187
|
+
/** The Question's name, the Run's status, or the drifted constraint. */
|
|
188
|
+
readonly cause: Schema.optionalKey<Schema.String>;
|
|
189
|
+
/** The state a Task moved to. */
|
|
190
|
+
readonly state: Schema.optionalKey<Schema.String>;
|
|
191
|
+
readonly changeRequestUrl: Schema.optionalKey<Schema.String>;
|
|
192
|
+
/** What a Run needs that Kitman could not choose, such as its Loop or repository. */
|
|
193
|
+
readonly missing: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
194
|
+
/** The ChangeRequests a person can choose between for a missing `changeRequestId`, as links. */
|
|
195
|
+
readonly choices: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
196
|
+
readonly projectId: Schema.optionalKey<Schema.String>;
|
|
197
|
+
readonly projectName: Schema.optionalKey<Schema.String>;
|
|
198
|
+
/** What a drafted Project Update was written from, since the Update before it. */
|
|
199
|
+
readonly writtenFrom: Schema.optionalKey<Schema.Struct<{
|
|
200
|
+
readonly runs: Schema.Int;
|
|
201
|
+
readonly taskChanges: Schema.Int;
|
|
202
|
+
readonly since: Schema.optionalKey<Schema.String>;
|
|
203
|
+
}>>;
|
|
204
|
+
readonly runnerName: Schema.optionalKey<Schema.String>;
|
|
205
|
+
/** A Runner Problem and the one command or action that fixes it. */
|
|
206
|
+
readonly problem: Schema.optionalKey<Schema.String>;
|
|
207
|
+
readonly fix: Schema.optionalKey<Schema.String>;
|
|
208
|
+
}>;
|
|
209
|
+
readonly title: Schema.String;
|
|
210
|
+
readonly body: Schema.String;
|
|
211
|
+
readonly link: Schema.String;
|
|
212
|
+
readonly createdAt: Schema.String;
|
|
213
|
+
readonly readAt: Schema.optionalKey<Schema.String>;
|
|
214
|
+
}>>;
|
|
215
|
+
}>>;
|
|
216
|
+
}>;
|
|
217
|
+
export type InboxList = (typeof InboxList)['Type'];
|
|
218
|
+
/** How many items the Inbox shows, and how many of them have something unread. */
|
|
219
|
+
export declare const InboxCounts: Schema.Struct<{
|
|
220
|
+
readonly items: Schema.Int;
|
|
221
|
+
readonly unread: Schema.Int;
|
|
222
|
+
}>;
|
|
223
|
+
export type InboxCounts = (typeof InboxCounts)['Type'];
|
|
224
|
+
export declare const InboxSubjects: Schema.Struct<{
|
|
225
|
+
readonly subjects: Schema.$Array<Schema.Struct<{
|
|
226
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"task">, Schema.Literal<"run">, Schema.Literal<"proposal">, Schema.Literal<"memory">, Schema.Literal<"mcp_approval">, Schema.Literal<"project_update">, Schema.Literal<"runner">]>;
|
|
227
|
+
readonly id: Schema.String;
|
|
228
|
+
}>>;
|
|
229
|
+
}>;
|
|
230
|
+
export type InboxSubjects = (typeof InboxSubjects)['Type'];
|
|
231
|
+
export declare const InboxSnooze: Schema.Struct<{
|
|
232
|
+
readonly subjects: Schema.$Array<Schema.Struct<{
|
|
233
|
+
readonly kind: Schema.Union<readonly [Schema.Literal<"task">, Schema.Literal<"run">, Schema.Literal<"proposal">, Schema.Literal<"memory">, Schema.Literal<"mcp_approval">, Schema.Literal<"project_update">, Schema.Literal<"runner">]>;
|
|
234
|
+
readonly id: Schema.String;
|
|
235
|
+
}>>;
|
|
236
|
+
readonly until: Schema.String;
|
|
237
|
+
}>;
|
|
238
|
+
export type InboxSnooze = (typeof InboxSnooze)['Type'];
|
|
239
|
+
export declare const InboxUnsubscribe: Schema.Struct<{
|
|
240
|
+
readonly taskIds: Schema.$Array<Schema.String>;
|
|
241
|
+
}>;
|
|
242
|
+
export type InboxUnsubscribe = (typeof InboxUnsubscribe)['Type'];
|
|
243
|
+
export declare const notificationPreferenceOf: (kind: NotificationKind) => keyof WorkspaceNotificationPreferences;
|
|
244
|
+
export type RenderedNotification = Pick<Notification, 'title' | 'body' | 'link'>;
|
|
245
|
+
export declare const renderNotification: (notification: {
|
|
246
|
+
readonly kind: NotificationKind;
|
|
247
|
+
readonly subject: (typeof NotificationSubject)['Type'];
|
|
248
|
+
readonly payload: NotificationPayload;
|
|
249
|
+
}) => RenderedNotification;
|
|
250
|
+
export declare const writtenFromText: (from: NotificationPayload['writtenFrom']) => string;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import * as Config from 'effect/Config';
|
|
2
|
+
import * as Context from 'effect/Context';
|
|
3
|
+
import * as Layer from 'effect/Layer';
|
|
4
|
+
import * as Metric from 'effect/Metric';
|
|
5
|
+
import * as Tracer from 'effect/Tracer';
|
|
6
|
+
import type { JsonValue } from './runtime-type';
|
|
7
|
+
/**
|
|
8
|
+
* Shared telemetry contract for the control plane and customer-managed runners.
|
|
9
|
+
*
|
|
10
|
+
* `Telemetry` is the bounded, redacting front of Effect's own observability: metrics live in an Effect metric
|
|
11
|
+
* registry and render through `PrometheusMetrics`, spans come from the Effect `Tracer`, and logs go to the Effect
|
|
12
|
+
* loggers. A process exports all three over OTLP through {@link layerProcessTelemetryExport}.
|
|
13
|
+
*/
|
|
14
|
+
export declare const TraceparentHeader: 'traceparent';
|
|
15
|
+
export declare const RequestIdHeader: 'x-request-id';
|
|
16
|
+
/**
|
|
17
|
+
* Only route families registered here may become HTTP metric labels. Unknown
|
|
18
|
+
* paths intentionally collapse to `/unknown`; path-derived values never reach
|
|
19
|
+
* the metrics registry.
|
|
20
|
+
*/
|
|
21
|
+
export declare const TrustedRoutePrefixes: readonly string[];
|
|
22
|
+
export type TraceContext = {
|
|
23
|
+
readonly traceId: string;
|
|
24
|
+
readonly spanId: string;
|
|
25
|
+
readonly traceFlags: string;
|
|
26
|
+
readonly traceState?: string;
|
|
27
|
+
};
|
|
28
|
+
type SpanStatus = 'unset' | 'ok' | 'error';
|
|
29
|
+
type TelemetryAttributeValue = string | number | boolean;
|
|
30
|
+
type TelemetryAttributes = Readonly<{
|
|
31
|
+
readonly [key: string]: JsonValue;
|
|
32
|
+
}>;
|
|
33
|
+
type TelemetryLabelInput = Readonly<{
|
|
34
|
+
readonly [key: string]: JsonValue;
|
|
35
|
+
}>;
|
|
36
|
+
type SpanRecord = {
|
|
37
|
+
readonly traceId: string;
|
|
38
|
+
readonly spanId: string;
|
|
39
|
+
readonly parentSpanId?: string;
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly serviceName: string;
|
|
42
|
+
readonly startTimeUnixMs: number;
|
|
43
|
+
readonly endTimeUnixMs: number;
|
|
44
|
+
readonly status: SpanStatus;
|
|
45
|
+
readonly attributes: Readonly<Record<string, TelemetryAttributeValue>>;
|
|
46
|
+
readonly events: readonly SpanEvent[];
|
|
47
|
+
};
|
|
48
|
+
type SpanEvent = {
|
|
49
|
+
readonly name: string;
|
|
50
|
+
readonly timeUnixMs: number;
|
|
51
|
+
readonly attributes: Readonly<Record<string, TelemetryAttributeValue>>;
|
|
52
|
+
};
|
|
53
|
+
type MetricType = 'counter' | 'gauge' | 'histogram';
|
|
54
|
+
type MetricDefinition = {
|
|
55
|
+
readonly name: string;
|
|
56
|
+
readonly help: string;
|
|
57
|
+
readonly type: MetricType;
|
|
58
|
+
readonly labelNames: readonly string[];
|
|
59
|
+
readonly maxSeries?: number;
|
|
60
|
+
readonly buckets?: readonly number[];
|
|
61
|
+
};
|
|
62
|
+
type MetricSeriesSnapshot = {
|
|
63
|
+
readonly name: string;
|
|
64
|
+
readonly type: MetricType;
|
|
65
|
+
readonly labels: Readonly<Record<string, string>>;
|
|
66
|
+
readonly value?: number;
|
|
67
|
+
readonly count?: number;
|
|
68
|
+
readonly sum?: number;
|
|
69
|
+
readonly buckets?: Readonly<Record<string, number>>;
|
|
70
|
+
};
|
|
71
|
+
type TelemetrySnapshot = {
|
|
72
|
+
readonly serviceName: string;
|
|
73
|
+
readonly spans: readonly SpanRecord[];
|
|
74
|
+
readonly metrics: {
|
|
75
|
+
readonly series: readonly MetricSeriesSnapshot[];
|
|
76
|
+
readonly seriesCount: number;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export declare const MetricDefinitions: readonly MetricDefinition[];
|
|
80
|
+
export declare function parseTraceparent(value: string | undefined | null): TraceContext | undefined;
|
|
81
|
+
export declare function formatTraceparent(context: TraceContext): string;
|
|
82
|
+
export declare function injectTraceContext(headers: Headers | Record<string, string>, context: TraceContext, requestId?: string): void;
|
|
83
|
+
export declare function normalizeRequestId(value: string | undefined | null): string;
|
|
84
|
+
export declare function statusClass(status: number): `${1 | 2 | 3 | 4 | 5}xx` | 'unknown';
|
|
85
|
+
export declare function templateRoute(pathname: string): string;
|
|
86
|
+
export declare function safeOperation(value: string, fallback?: string): string;
|
|
87
|
+
/** Attach the span created at an HTTP boundary for downstream application seams. */
|
|
88
|
+
export declare function attachRequestTraceContext<RequestObject extends object>(request: RequestObject, context: TraceContext): void;
|
|
89
|
+
export declare function requestTraceContext<RequestObject extends object>(request: RequestObject): TraceContext | undefined;
|
|
90
|
+
/** An Effect `Tracer` span behind the same attribute, event and redaction bounds as every other signal. */
|
|
91
|
+
export declare class TelemetrySpan {
|
|
92
|
+
private readonly telemetry;
|
|
93
|
+
readonly name: string;
|
|
94
|
+
readonly span: Tracer.Span;
|
|
95
|
+
readonly parentSpanId: string | undefined;
|
|
96
|
+
readonly startTimeUnixMs: number;
|
|
97
|
+
private readonly order;
|
|
98
|
+
readonly context: TraceContext;
|
|
99
|
+
private readonly attributes;
|
|
100
|
+
private readonly events;
|
|
101
|
+
private ended;
|
|
102
|
+
private status;
|
|
103
|
+
private errorType;
|
|
104
|
+
constructor(telemetry: Telemetry, name: string, span: Tracer.Span, parentSpanId: string | undefined, traceFlags: string, startTimeUnixMs: number, order: number, attributes: TelemetryAttributes);
|
|
105
|
+
setAttribute<ValueType>(key: string, value: ValueType): this;
|
|
106
|
+
setAttributes(attributes: TelemetryAttributes): this;
|
|
107
|
+
addEvent(name: string, attributes?: TelemetryAttributes): this;
|
|
108
|
+
recordException<ErrorType>(error: ErrorType): this;
|
|
109
|
+
end(status?: SpanStatus): void;
|
|
110
|
+
}
|
|
111
|
+
/** The process's Effect services that receive spans and logs: an OTLP tracer and loggers, or JSON log lines. */
|
|
112
|
+
type TelemetryExport = Context.Context<never>;
|
|
113
|
+
export declare class Telemetry {
|
|
114
|
+
readonly serviceName: string;
|
|
115
|
+
readonly metricRegistry: Metric.MetricRegistry;
|
|
116
|
+
private readonly metricServices;
|
|
117
|
+
/** The latest finished spans with their start order, written round the ring. */
|
|
118
|
+
private readonly spans;
|
|
119
|
+
private finishedSpans;
|
|
120
|
+
private readonly series;
|
|
121
|
+
private readonly maxSpans;
|
|
122
|
+
private readonly maxSeries;
|
|
123
|
+
private readonly reservedSeriesLimit;
|
|
124
|
+
private reservedSeries;
|
|
125
|
+
private readonly clock;
|
|
126
|
+
private exportServices;
|
|
127
|
+
private recordSpans;
|
|
128
|
+
private recordMetrics;
|
|
129
|
+
private recordLogs;
|
|
130
|
+
private propagateTrace;
|
|
131
|
+
private nextSpanOrder;
|
|
132
|
+
private recordingOverflow;
|
|
133
|
+
constructor(input: {
|
|
134
|
+
readonly serviceName: string;
|
|
135
|
+
readonly clock?: () => number;
|
|
136
|
+
readonly maxSpans?: number;
|
|
137
|
+
readonly maxMetricSeries?: number;
|
|
138
|
+
readonly metricRegistry?: Metric.MetricRegistry;
|
|
139
|
+
});
|
|
140
|
+
setExport(services: TelemetryExport | undefined): void;
|
|
141
|
+
/** Disable span retention/export while keeping trace context propagation and RED metrics available. */
|
|
142
|
+
setSpanRecordingEnabled(enabled: boolean): void;
|
|
143
|
+
setMetricsEnabled(enabled: boolean): void;
|
|
144
|
+
setLogRecordingEnabled(enabled: boolean): void;
|
|
145
|
+
setTracePropagationEnabled(enabled: boolean): void;
|
|
146
|
+
isTracePropagationEnabled(): boolean;
|
|
147
|
+
now(): number;
|
|
148
|
+
startSpan(name: string, options?: {
|
|
149
|
+
readonly parent?: TraceContext | string | null;
|
|
150
|
+
readonly attributes?: TelemetryAttributes;
|
|
151
|
+
}): TelemetrySpan;
|
|
152
|
+
counter(name: string, labels?: TelemetryLabelInput, value?: number): void;
|
|
153
|
+
gauge(name: string, value: number, labels?: TelemetryLabelInput): void;
|
|
154
|
+
histogram(name: string, value: number, labels?: TelemetryLabelInput): void;
|
|
155
|
+
log(event: string, fields?: TelemetryAttributes, span?: TelemetrySpan): void;
|
|
156
|
+
overflow(signal: string, reason: string): void;
|
|
157
|
+
prometheus(): string;
|
|
158
|
+
snapshot(): TelemetrySnapshot;
|
|
159
|
+
finishSpan(span: SpanRecord, order: number): void;
|
|
160
|
+
private record;
|
|
161
|
+
/** Admits a new label set while the series bounds hold, keeping room for the non-HTTP metrics. */
|
|
162
|
+
private admitSeries;
|
|
163
|
+
}
|
|
164
|
+
export declare function registerProcessTelemetry(telemetry: Telemetry): Telemetry;
|
|
165
|
+
/** Returns one bounded recorder per service process for library seams. */
|
|
166
|
+
export declare function getProcessTelemetry(serviceName: string): Telemetry;
|
|
167
|
+
/** Prometheus exposition of every registered service, each metric family once. */
|
|
168
|
+
export declare function processTelemetryPrometheus(): string;
|
|
169
|
+
/**
|
|
170
|
+
* Exports the process's telemetry while the layer is alive, and provides the same tracer and loggers to the effects
|
|
171
|
+
* it is provided to. With `OTEL_EXPORTER_OTLP_ENDPOINT` set, spans, logs and the process metric registry go to that
|
|
172
|
+
* OTLP/HTTP collector; otherwise logs are written to stdout as JSON lines and spans stay in process.
|
|
173
|
+
*/
|
|
174
|
+
export declare const layerProcessTelemetryExport: (serviceName: string) => Layer.Layer<never, Config.ConfigError>;
|
|
175
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
/** What can move between the Workspace and one of its Teams. */
|
|
3
|
+
export declare const OwnedKind: Schema.Literals<readonly ["repository", "memory", "decision", "secret"]>;
|
|
4
|
+
/** The new owner: a Team, or the Workspace when `team` is null. */
|
|
5
|
+
export declare const OwnerChange: Schema.Struct<{
|
|
6
|
+
readonly team: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const OwnerMoved: Schema.Struct<{
|
|
9
|
+
readonly kind: Schema.Literals<readonly ["repository", "memory", "decision", "secret"]>;
|
|
10
|
+
readonly id: Schema.String;
|
|
11
|
+
readonly team: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
12
|
+
}>;
|
|
13
|
+
export type OwnedKind = (typeof OwnedKind)['Type'];
|
|
14
|
+
export type OwnerChange = (typeof OwnerChange)['Type'];
|
|
15
|
+
export type OwnerMoved = (typeof OwnerMoved)['Type'];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A deliberately frozen, non-administrative capability set for a human's
|
|
3
|
+
* foreground development runner. New capabilities require a new profile.
|
|
4
|
+
*/
|
|
5
|
+
export declare const PersonalDevelopmentProfileName: 'personal_development_v1';
|
|
6
|
+
export declare const PersonalDevelopmentProfileCapabilityNames: readonly ["kitman_resolve_team_context", "kitman_list_accessible_teams", "kitman_get_task", "kitman_search_tasks", "kitman_list_task_dependencies", "kitman_list_repo_bindings", "kitman_list_task_members", "kitman_list_task_thread_entries", "kitman_list_task_sessions", "kitman_get_session", "kitman_list_session_updates", "kitman_get_context_pack_snapshot", "kitman_get_latest_context_pack", "kitman_get_context_pack_retrieval_ref", "kitman_get_context_pack", "kitman_record_context_relevance_feedback", "kitman_get_task_execution_record", "kitman_list_memories", "kitman_get_memory", "kitman_record_session_update", "kitman_record_task_thread_entry", "kitman_post_task_question", "kitman_record_decision", "kitman_record_blocker", "kitman_link_task_artifact", "kitman_create_task_asset_upload", "kitman_complete_task_asset_upload", "kitman_get_task_asset_download_url", "kitman_generate_handoff"];
|
|
7
|
+
export declare const PersonalDevelopmentProfile: {
|
|
8
|
+
readonly name: "personal_development_v1";
|
|
9
|
+
readonly capabilityNames: readonly ["kitman_resolve_team_context", "kitman_list_accessible_teams", "kitman_get_task", "kitman_search_tasks", "kitman_list_task_dependencies", "kitman_list_repo_bindings", "kitman_list_task_members", "kitman_list_task_thread_entries", "kitman_list_task_sessions", "kitman_get_session", "kitman_list_session_updates", "kitman_get_context_pack_snapshot", "kitman_get_latest_context_pack", "kitman_get_context_pack_retrieval_ref", "kitman_get_context_pack", "kitman_record_context_relevance_feedback", "kitman_get_task_execution_record", "kitman_list_memories", "kitman_get_memory", "kitman_record_session_update", "kitman_record_task_thread_entry", "kitman_post_task_question", "kitman_record_decision", "kitman_record_blocker", "kitman_link_task_artifact", "kitman_create_task_asset_upload", "kitman_complete_task_asset_upload", "kitman_get_task_asset_download_url", "kitman_generate_handoff"];
|
|
10
|
+
};
|
|
11
|
+
export type PersonalDevelopmentProfileName = typeof PersonalDevelopmentProfileName;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type RunnerArtifactManifest, type RunnerArchitecture, type RunnerOciIndex } from './runner-trust';
|
|
2
|
+
declare const PlatformComponents: readonly ['api', 'web', 'worker', 'mcp', 'runner'];
|
|
3
|
+
type PlatformComponent = (typeof PlatformComponents)[number];
|
|
4
|
+
export type PlatformReleaseArtifactInput = {
|
|
5
|
+
readonly component: PlatformComponent;
|
|
6
|
+
readonly architecture: RunnerArchitecture;
|
|
7
|
+
readonly imageDigest: string;
|
|
8
|
+
readonly imageSize: number;
|
|
9
|
+
readonly sbomDigest: string;
|
|
10
|
+
readonly provenanceDigest: string;
|
|
11
|
+
readonly runnerPackageDigest?: string;
|
|
12
|
+
readonly runnerPackageSize?: number;
|
|
13
|
+
};
|
|
14
|
+
type PlatformReleaseArtifact = PlatformReleaseArtifactInput & {
|
|
15
|
+
readonly image: RunnerArtifactManifest;
|
|
16
|
+
readonly runnerPackage?: RunnerArtifactManifest;
|
|
17
|
+
};
|
|
18
|
+
type PlatformNativeSmokeEvidence = {
|
|
19
|
+
readonly architecture: RunnerArchitecture;
|
|
20
|
+
readonly status: 'verified' | 'not_run';
|
|
21
|
+
readonly executionMode: 'native' | 'emulated' | 'not_run';
|
|
22
|
+
readonly runnerId?: string;
|
|
23
|
+
readonly note: string;
|
|
24
|
+
};
|
|
25
|
+
export type PlatformReleaseManifest = {
|
|
26
|
+
readonly contractVersion: 'platform-release.v1';
|
|
27
|
+
readonly version: string;
|
|
28
|
+
readonly sourceCommit: string;
|
|
29
|
+
readonly lockfileDigest: string;
|
|
30
|
+
readonly baseImage: string;
|
|
31
|
+
readonly profileDigest: string;
|
|
32
|
+
readonly certificationDigest: string;
|
|
33
|
+
readonly components: Readonly<Record<PlatformComponent, {
|
|
34
|
+
readonly imageIndex: RunnerOciIndex;
|
|
35
|
+
}>>;
|
|
36
|
+
readonly artifacts: readonly PlatformReleaseArtifact[];
|
|
37
|
+
readonly nativeSmoke: readonly PlatformNativeSmokeEvidence[];
|
|
38
|
+
readonly signing: {
|
|
39
|
+
readonly required: true;
|
|
40
|
+
readonly configured: boolean;
|
|
41
|
+
readonly note: string;
|
|
42
|
+
};
|
|
43
|
+
readonly manifestDigest: string;
|
|
44
|
+
};
|
|
45
|
+
type CreatePlatformReleaseManifestInput = {
|
|
46
|
+
readonly version: string;
|
|
47
|
+
readonly sourceCommit: string;
|
|
48
|
+
readonly lockfileDigest: string;
|
|
49
|
+
readonly baseImage: string;
|
|
50
|
+
readonly profileDigest: string;
|
|
51
|
+
readonly certificationDigest: string;
|
|
52
|
+
readonly artifacts: readonly PlatformReleaseArtifactInput[];
|
|
53
|
+
readonly nativeSmoke?: readonly PlatformNativeSmokeEvidence[];
|
|
54
|
+
readonly signingConfigured?: boolean;
|
|
55
|
+
readonly signedAt?: Date | string;
|
|
56
|
+
readonly expiresAt?: Date | string;
|
|
57
|
+
};
|
|
58
|
+
export declare function createPlatformReleaseManifest(input: CreatePlatformReleaseManifestInput): PlatformReleaseManifest;
|
|
59
|
+
export declare function verifyPlatformReleaseManifest(manifest: PlatformReleaseManifest): boolean;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type ProgramCredentialLease = {
|
|
2
|
+
readonly workUnitId: string;
|
|
3
|
+
readonly leaseId: string;
|
|
4
|
+
readonly fencingToken: string;
|
|
5
|
+
};
|
|
6
|
+
/** A program process's credential for the Runner RPC; it is valid only for the orchestration lease it was minted for. */
|
|
7
|
+
export declare function mintProgramCredential(secret: string, lease: ProgramCredentialLease): string;
|
|
8
|
+
export declare function programCredentialWorkUnitId(credential: string): string | undefined;
|
|
9
|
+
export declare function programCredentialMatches(secret: string, credential: string, lease: ProgramCredentialLease): boolean;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import type { NotificationKind } from './notification';
|
|
3
|
+
/** What a device can be pushed about; a Question is on by default, the others are opt-in. */
|
|
4
|
+
export declare const PushEvents: readonly ['question_asked', 'run_failed', 'run_done'];
|
|
5
|
+
export type PushEvent = (typeof PushEvents)[number];
|
|
6
|
+
export declare const defaultPushEvents: readonly PushEvent[];
|
|
7
|
+
export declare const pushEventOf: (kind: NotificationKind) => PushEvent | undefined;
|
|
8
|
+
/** A browser's PushSubscription as `toJSON()` gives it, with what the person chose for that device. */
|
|
9
|
+
export declare const PushDeviceInput: Schema.Struct<{
|
|
10
|
+
readonly endpoint: Schema.String;
|
|
11
|
+
readonly keys: Schema.Struct<{
|
|
12
|
+
readonly p256dh: Schema.String;
|
|
13
|
+
readonly auth: Schema.String;
|
|
14
|
+
}>;
|
|
15
|
+
/** How the person tells their devices apart, such as the browser and platform. */
|
|
16
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
17
|
+
readonly events: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["question_asked", "run_failed", "run_done"]>>>;
|
|
18
|
+
}>;
|
|
19
|
+
export type PushDeviceInput = (typeof PushDeviceInput)['Type'];
|
|
20
|
+
export declare const PushDeviceChange: Schema.Struct<{
|
|
21
|
+
readonly enabled: Schema.optionalKey<Schema.Boolean>;
|
|
22
|
+
readonly events: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["question_asked", "run_failed", "run_done"]>>>;
|
|
23
|
+
}>;
|
|
24
|
+
export type PushDeviceChange = (typeof PushDeviceChange)['Type'];
|
|
25
|
+
/** One of a person's devices; its endpoint and keys stay on the server. */
|
|
26
|
+
export declare const PushDevice: Schema.Struct<{
|
|
27
|
+
readonly id: Schema.String;
|
|
28
|
+
readonly label: Schema.String;
|
|
29
|
+
readonly enabled: Schema.Boolean;
|
|
30
|
+
readonly events: Schema.$Array<Schema.Literals<readonly ["question_asked", "run_failed", "run_done"]>>;
|
|
31
|
+
/** Lets a browser find its own device among the person's. */
|
|
32
|
+
readonly endpointHash: Schema.String;
|
|
33
|
+
readonly createdAt: Schema.String;
|
|
34
|
+
readonly lastPushedAt: Schema.optionalKey<Schema.String>;
|
|
35
|
+
}>;
|
|
36
|
+
export type PushDevice = (typeof PushDevice)['Type'];
|
|
37
|
+
export declare const PushSettings: Schema.Struct<{
|
|
38
|
+
/** The VAPID public key a browser subscribes with; absent when this Kitman cannot send pushes. */
|
|
39
|
+
readonly publicKey: Schema.optionalKey<Schema.String>;
|
|
40
|
+
readonly devices: Schema.$Array<Schema.Struct<{
|
|
41
|
+
readonly id: Schema.String;
|
|
42
|
+
readonly label: Schema.String;
|
|
43
|
+
readonly enabled: Schema.Boolean;
|
|
44
|
+
readonly events: Schema.$Array<Schema.Literals<readonly ["question_asked", "run_failed", "run_done"]>>;
|
|
45
|
+
/** Lets a browser find its own device among the person's. */
|
|
46
|
+
readonly endpointHash: Schema.String;
|
|
47
|
+
readonly createdAt: Schema.String;
|
|
48
|
+
readonly lastPushedAt: Schema.optionalKey<Schema.String>;
|
|
49
|
+
}>>;
|
|
50
|
+
}>;
|
|
51
|
+
export type PushSettings = (typeof PushSettings)['Type'];
|
|
52
|
+
/** What a push carries to the service worker: a short summary and a link, never source, Outputs or secrets. */
|
|
53
|
+
export type PushMessage = {
|
|
54
|
+
readonly title: string;
|
|
55
|
+
readonly body: string;
|
|
56
|
+
/** Same tag, same notification: a later push about the Run replaces the earlier one on the device. */
|
|
57
|
+
readonly tag: string;
|
|
58
|
+
/** The page that tapping opens, relative to the web app. */
|
|
59
|
+
readonly url: string;
|
|
60
|
+
/** Replaces the device's notification without alerting again: one within the minute already did. */
|
|
61
|
+
readonly quiet?: true;
|
|
62
|
+
/** Offered as "Accept recommendation" where the platform shows notification actions. */
|
|
63
|
+
readonly accept?: {
|
|
64
|
+
readonly runId: string;
|
|
65
|
+
readonly questionId: string;
|
|
66
|
+
readonly value: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Run, RunDisplay, RunDisplayState, RunShow, RunWaiting } from './loop';
|
|
2
|
+
export type RunDisplayInput = Pick<RunShow, 'run' | 'steps' | 'questions' | 'children' | 'waiting'> & {
|
|
3
|
+
/** A Runner has leased one of the Run's orchestration Work Units. */
|
|
4
|
+
readonly claimed: boolean;
|
|
5
|
+
/** An eligible Runner is online for the Run's Team, or for no Team. */
|
|
6
|
+
readonly runnerOnline: boolean;
|
|
7
|
+
/** The `verify` Steps whose verification failed. */
|
|
8
|
+
readonly failedChecks: readonly string[];
|
|
9
|
+
};
|
|
10
|
+
export declare const runDisplayLabels: Record<RunDisplayState, string>;
|
|
11
|
+
/** A resource the Run waits its turn for, and who holds it. */
|
|
12
|
+
export declare const turnWords: (entry: Extract<RunWaiting, {
|
|
13
|
+
readonly kind: 'claim';
|
|
14
|
+
}>) => string;
|
|
15
|
+
/** What a Run's output says it left open: any Loop's `unsettled` list. `displayFacts` in run-list.ts reads the same. */
|
|
16
|
+
export declare const reportedUnsettled: (output: Run['output']) => readonly string[] | undefined;
|
|
17
|
+
/** What a Run and the Child Runs below it report left open. */
|
|
18
|
+
export declare const unsettledItems: ({ run, children }: Pick<RunDisplayInput, 'run' | 'children'>) => string[];
|
|
19
|
+
/** A display summary for a list row: one line, cut short. */
|
|
20
|
+
export declare const listedSummary: (summary: string) => string;
|
|
21
|
+
/** The one display state every surface shows for a Run (ADR-0072). */
|
|
22
|
+
export declare const runDisplay: (input: RunDisplayInput) => RunDisplay;
|