@ghostpaw/questlog 0.1.0
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/LICENSE +21 -0
- package/README.md +241 -0
- package/dist/index.cjs +5920 -0
- package/dist/index.d.cts +1688 -0
- package/dist/index.d.ts +1688 -0
- package/dist/index.js +5912 -0
- package/package.json +90 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1688 @@
|
|
|
1
|
+
import { DatabaseSync } from 'node:sqlite';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SQLite dependency injected into every questlog operation.
|
|
5
|
+
*/
|
|
6
|
+
type QuestlogDb = DatabaseSync;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates the full standalone questlog schema, including FTS and indexing.
|
|
10
|
+
*/
|
|
11
|
+
declare function initQuestlogTables(db: QuestlogDb): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The lifecycle state derived from a quest's timestamps and success value.
|
|
15
|
+
*/
|
|
16
|
+
type QuestState = 'open' | 'in_progress' | 'done' | 'abandoned';
|
|
17
|
+
|
|
18
|
+
type MarkerId = 'attention.available' | 'attention.available.repeatable' | 'attention.available.future' | 'progress.incomplete' | 'progress.complete';
|
|
19
|
+
interface MarkerDefinition {
|
|
20
|
+
id: MarkerId;
|
|
21
|
+
family: 'attention' | 'progress';
|
|
22
|
+
symbol: '!' | '?';
|
|
23
|
+
wowColor: 'yellow' | 'blue' | 'gray';
|
|
24
|
+
label: string;
|
|
25
|
+
plainText: string;
|
|
26
|
+
ttyText: string;
|
|
27
|
+
htmlClass: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface DeriveQuestMarkerIdInput {
|
|
31
|
+
state: QuestState;
|
|
32
|
+
available: boolean;
|
|
33
|
+
hasUnclaimedReward: boolean;
|
|
34
|
+
notBeforeAt: number | null;
|
|
35
|
+
blockerCount: number;
|
|
36
|
+
now: number;
|
|
37
|
+
}
|
|
38
|
+
declare function deriveQuestMarkerId({ state, available, hasUnclaimedReward, notBeforeAt, blockerCount, now, }: DeriveQuestMarkerIdInput): MarkerId | null;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* A higher-level semantic arc that groups related quests and may provide a shared deadline.
|
|
42
|
+
*/
|
|
43
|
+
interface Questline {
|
|
44
|
+
id: number;
|
|
45
|
+
sourceRumorId: number | null;
|
|
46
|
+
title: string;
|
|
47
|
+
description: string | null;
|
|
48
|
+
startsAt: number | null;
|
|
49
|
+
dueAt: number | null;
|
|
50
|
+
createdAt: number;
|
|
51
|
+
updatedAt: number;
|
|
52
|
+
archivedAt: number | null;
|
|
53
|
+
deletedAt: number | null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Input for creating a new questline.
|
|
57
|
+
*/
|
|
58
|
+
interface CreateQuestlineInput {
|
|
59
|
+
title: string;
|
|
60
|
+
description?: string | null;
|
|
61
|
+
startsAt?: number | null;
|
|
62
|
+
dueAt?: number | null;
|
|
63
|
+
sourceRumorId?: number | null;
|
|
64
|
+
now?: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Input for updating mutable questline fields.
|
|
68
|
+
*/
|
|
69
|
+
interface UpdateQuestlineInput {
|
|
70
|
+
title?: string;
|
|
71
|
+
description?: string | null;
|
|
72
|
+
startsAt?: number | null;
|
|
73
|
+
dueAt?: number | null;
|
|
74
|
+
archivedAt?: number | null;
|
|
75
|
+
now?: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* A questline plus computed progress counts.
|
|
79
|
+
*/
|
|
80
|
+
interface QuestlineDetail extends Questline {
|
|
81
|
+
totalQuests: number;
|
|
82
|
+
openQuests: number;
|
|
83
|
+
inProgressQuests: number;
|
|
84
|
+
doneQuests: number;
|
|
85
|
+
abandonedQuests: number;
|
|
86
|
+
availableQuests: number;
|
|
87
|
+
overdueQuests: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A generic reward attached to a concrete quest.
|
|
92
|
+
*/
|
|
93
|
+
interface QuestReward {
|
|
94
|
+
id: number;
|
|
95
|
+
questId: number;
|
|
96
|
+
kind: string;
|
|
97
|
+
name: string;
|
|
98
|
+
description: string | null;
|
|
99
|
+
quantity: number | null;
|
|
100
|
+
createdAt: number;
|
|
101
|
+
claimedAt: number | null;
|
|
102
|
+
deletedAt: number | null;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* A reward template attached to a repeatable quest and copied into spawned quests.
|
|
106
|
+
*/
|
|
107
|
+
interface RepeatableQuestReward {
|
|
108
|
+
id: number;
|
|
109
|
+
repeatableQuestId: number;
|
|
110
|
+
kind: string;
|
|
111
|
+
name: string;
|
|
112
|
+
description: string | null;
|
|
113
|
+
quantity: number | null;
|
|
114
|
+
createdAt: number;
|
|
115
|
+
deletedAt: number | null;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Input for attaching a reward to a concrete quest.
|
|
119
|
+
*/
|
|
120
|
+
interface QuestRewardInput {
|
|
121
|
+
kind: string;
|
|
122
|
+
name: string;
|
|
123
|
+
description?: string | null;
|
|
124
|
+
quantity?: number | null;
|
|
125
|
+
now?: number;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Input for attaching a reward template to a repeatable quest.
|
|
129
|
+
*/
|
|
130
|
+
interface RepeatableQuestRewardInput {
|
|
131
|
+
kind: string;
|
|
132
|
+
name: string;
|
|
133
|
+
description?: string | null;
|
|
134
|
+
quantity?: number | null;
|
|
135
|
+
now?: number;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* One real commitment with one objective and one terminal outcome.
|
|
140
|
+
*/
|
|
141
|
+
interface Quest {
|
|
142
|
+
id: number;
|
|
143
|
+
questlineId: number | null;
|
|
144
|
+
sourceRumorId: number | null;
|
|
145
|
+
spawnedByQuestId: number | null;
|
|
146
|
+
spawnedFromRepeatableId: number | null;
|
|
147
|
+
spawnedForAt: number | null;
|
|
148
|
+
title: string;
|
|
149
|
+
objective: string;
|
|
150
|
+
outcome: string | null;
|
|
151
|
+
createdAt: number;
|
|
152
|
+
updatedAt: number;
|
|
153
|
+
startedAt: number | null;
|
|
154
|
+
resolvedAt: number | null;
|
|
155
|
+
success: boolean | null;
|
|
156
|
+
effortSeconds: number;
|
|
157
|
+
estimateSeconds: number | null;
|
|
158
|
+
notBeforeAt: number | null;
|
|
159
|
+
dueAt: number | null;
|
|
160
|
+
scheduledStartAt: number | null;
|
|
161
|
+
scheduledEndAt: number | null;
|
|
162
|
+
allDay: boolean;
|
|
163
|
+
deletedAt: number | null;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Input for creating a concrete quest.
|
|
167
|
+
*/
|
|
168
|
+
interface CreateQuestInput {
|
|
169
|
+
title: string;
|
|
170
|
+
objective: string;
|
|
171
|
+
questlineId?: number | null;
|
|
172
|
+
sourceRumorId?: number | null;
|
|
173
|
+
spawnedByQuestId?: number | null;
|
|
174
|
+
spawnedFromRepeatableId?: number | null;
|
|
175
|
+
spawnedForAt?: number | null;
|
|
176
|
+
estimateSeconds?: number | null;
|
|
177
|
+
notBeforeAt?: number | null;
|
|
178
|
+
dueAt?: number | null;
|
|
179
|
+
scheduledStartAt?: number | null;
|
|
180
|
+
scheduledEndAt?: number | null;
|
|
181
|
+
allDay?: boolean;
|
|
182
|
+
tags?: string[];
|
|
183
|
+
rewards?: QuestRewardInput[];
|
|
184
|
+
now?: number;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Intent-shaped quest temporal planning input.
|
|
188
|
+
*/
|
|
189
|
+
interface PlanQuestTimeInput {
|
|
190
|
+
notBeforeAt?: number | null;
|
|
191
|
+
dueAt?: number | null;
|
|
192
|
+
scheduledStartAt?: number | null;
|
|
193
|
+
scheduledEndAt?: number | null;
|
|
194
|
+
allDay?: boolean;
|
|
195
|
+
estimateSeconds?: number | null;
|
|
196
|
+
now?: number;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A follow-up quest to create atomically while abandoning an existing quest.
|
|
200
|
+
*/
|
|
201
|
+
interface FollowupQuestInput extends Omit<CreateQuestInput, 'sourceRumorId' | 'spawnedByQuestId'> {
|
|
202
|
+
unlocksParent?: boolean;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Summary returned when abandoning a quest and atomically creating follow-up work.
|
|
206
|
+
*/
|
|
207
|
+
interface AbandonQuestResult {
|
|
208
|
+
abandonedQuest: Quest;
|
|
209
|
+
followupQuests: Quest[];
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Shared quest list filters.
|
|
213
|
+
*/
|
|
214
|
+
interface QuestListFilters {
|
|
215
|
+
questlineId?: number;
|
|
216
|
+
tagNames?: string[];
|
|
217
|
+
includeDeleted?: boolean;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* A concrete quest with derived state and expanded relationships for reads.
|
|
221
|
+
*/
|
|
222
|
+
interface QuestDetail extends Quest {
|
|
223
|
+
state: QuestState;
|
|
224
|
+
markerId: MarkerId | null;
|
|
225
|
+
effectiveDueAt: number | null;
|
|
226
|
+
available: boolean;
|
|
227
|
+
tagNames: string[];
|
|
228
|
+
rewards: QuestReward[];
|
|
229
|
+
unlocksQuestIds: number[];
|
|
230
|
+
unlockedByQuestIds: number[];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* A non-committed intake item that may later yield quests, a questline, both, or nothing.
|
|
235
|
+
*/
|
|
236
|
+
interface Rumor {
|
|
237
|
+
id: number;
|
|
238
|
+
title: string;
|
|
239
|
+
details: string | null;
|
|
240
|
+
markerId: MarkerId | null;
|
|
241
|
+
createdAt: number;
|
|
242
|
+
updatedAt: number;
|
|
243
|
+
settledAt: number | null;
|
|
244
|
+
dismissedAt: number | null;
|
|
245
|
+
deletedAt: number | null;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* The lifecycle state derived from a rumor's timestamps.
|
|
249
|
+
*/
|
|
250
|
+
type RumorState = 'open' | 'settled' | 'dismissed';
|
|
251
|
+
/**
|
|
252
|
+
* Input for capturing a new rumor.
|
|
253
|
+
*/
|
|
254
|
+
interface CaptureRumorInput {
|
|
255
|
+
title: string;
|
|
256
|
+
details?: string | null;
|
|
257
|
+
now?: number;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* A downstream artifact created from rumor settlement.
|
|
261
|
+
*/
|
|
262
|
+
interface RumorOutput {
|
|
263
|
+
entityKind: 'quest' | 'questline';
|
|
264
|
+
entityId: number;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* A rumor with derived state and downstream outputs.
|
|
268
|
+
*/
|
|
269
|
+
interface RumorDetail extends Rumor {
|
|
270
|
+
state: RumorState;
|
|
271
|
+
outputs: RumorOutput[];
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Structured rumor settlement plan.
|
|
275
|
+
*/
|
|
276
|
+
interface SettleRumorInput {
|
|
277
|
+
questline?: CreateQuestlineInput;
|
|
278
|
+
quests?: CreateQuestInput[];
|
|
279
|
+
settledAt?: number;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Result returned after settling a rumor into downstream artifacts.
|
|
283
|
+
*/
|
|
284
|
+
interface SettleRumorResult {
|
|
285
|
+
rumor: Rumor;
|
|
286
|
+
questline: Questline | null;
|
|
287
|
+
quests: Quest[];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
interface DeriveRumorMarkerIdInput {
|
|
291
|
+
state: RumorState;
|
|
292
|
+
}
|
|
293
|
+
declare function deriveRumorMarkerId({ state }: DeriveRumorMarkerIdInput): MarkerId | null;
|
|
294
|
+
|
|
295
|
+
declare const markerLookup: {
|
|
296
|
+
'attention.available': {
|
|
297
|
+
id: "attention.available";
|
|
298
|
+
family: "attention";
|
|
299
|
+
symbol: "!";
|
|
300
|
+
wowColor: "yellow";
|
|
301
|
+
label: string;
|
|
302
|
+
plainText: string;
|
|
303
|
+
ttyText: string;
|
|
304
|
+
htmlClass: string;
|
|
305
|
+
};
|
|
306
|
+
'attention.available.repeatable': {
|
|
307
|
+
id: "attention.available.repeatable";
|
|
308
|
+
family: "attention";
|
|
309
|
+
symbol: "!";
|
|
310
|
+
wowColor: "blue";
|
|
311
|
+
label: string;
|
|
312
|
+
plainText: string;
|
|
313
|
+
ttyText: string;
|
|
314
|
+
htmlClass: string;
|
|
315
|
+
};
|
|
316
|
+
'attention.available.future': {
|
|
317
|
+
id: "attention.available.future";
|
|
318
|
+
family: "attention";
|
|
319
|
+
symbol: "!";
|
|
320
|
+
wowColor: "gray";
|
|
321
|
+
label: string;
|
|
322
|
+
plainText: string;
|
|
323
|
+
ttyText: string;
|
|
324
|
+
htmlClass: string;
|
|
325
|
+
};
|
|
326
|
+
'progress.incomplete': {
|
|
327
|
+
id: "progress.incomplete";
|
|
328
|
+
family: "progress";
|
|
329
|
+
symbol: "?";
|
|
330
|
+
wowColor: "gray";
|
|
331
|
+
label: string;
|
|
332
|
+
plainText: string;
|
|
333
|
+
ttyText: string;
|
|
334
|
+
htmlClass: string;
|
|
335
|
+
};
|
|
336
|
+
'progress.complete': {
|
|
337
|
+
id: "progress.complete";
|
|
338
|
+
family: "progress";
|
|
339
|
+
symbol: "?";
|
|
340
|
+
wowColor: "yellow";
|
|
341
|
+
label: string;
|
|
342
|
+
plainText: string;
|
|
343
|
+
ttyText: string;
|
|
344
|
+
htmlClass: string;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
type index$2_MarkerDefinition = MarkerDefinition;
|
|
349
|
+
type index$2_MarkerId = MarkerId;
|
|
350
|
+
declare const index$2_deriveQuestMarkerId: typeof deriveQuestMarkerId;
|
|
351
|
+
declare const index$2_deriveRumorMarkerId: typeof deriveRumorMarkerId;
|
|
352
|
+
declare const index$2_markerLookup: typeof markerLookup;
|
|
353
|
+
declare namespace index$2 {
|
|
354
|
+
export { type index$2_MarkerDefinition as MarkerDefinition, type index$2_MarkerId as MarkerId, index$2_deriveQuestMarkerId as deriveQuestMarkerId, index$2_deriveRumorMarkerId as deriveRumorMarkerId, index$2_markerLookup as markerLookup };
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Archives a questline without deleting it.
|
|
359
|
+
*/
|
|
360
|
+
declare function archiveQuestline(db: QuestlogDb, questlineId: number, archivedAt?: number): Questline;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Creates a new questline.
|
|
364
|
+
*/
|
|
365
|
+
declare function createQuestline(db: QuestlogDb, input: CreateQuestlineInput): Questline;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Detaches a quest from its questline.
|
|
369
|
+
*/
|
|
370
|
+
declare function detachQuestFromQuestline(db: QuestlogDb, questId: number, now?: number): void;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Loads a questline with computed progress counts.
|
|
374
|
+
*/
|
|
375
|
+
declare function getQuestlineDetail(db: QuestlogDb, questlineId: number, now?: number): QuestlineDetail;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Lists active questlines.
|
|
379
|
+
*/
|
|
380
|
+
declare function listQuestlines(db: QuestlogDb, now?: number): QuestlineDetail[];
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Moves a quest into a questline.
|
|
384
|
+
*/
|
|
385
|
+
declare function moveQuestToQuestline(db: QuestlogDb, questId: number, questlineId: number, now?: number): void;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Soft-deletes a questline.
|
|
389
|
+
*/
|
|
390
|
+
declare function softDeleteQuestline(db: QuestlogDb, questlineId: number, deletedAt?: number): void;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Updates mutable questline fields.
|
|
394
|
+
*/
|
|
395
|
+
declare function updateQuestline(db: QuestlogDb, questlineId: number, input: UpdateQuestlineInput): Questline;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Abandons a quest with terminal outcome text.
|
|
399
|
+
*/
|
|
400
|
+
declare function abandonQuest(db: QuestlogDb, questId: number, outcome: string, resolvedAt?: number): Quest;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Abandons a quest and atomically creates follow-up quests that point back to it.
|
|
404
|
+
*/
|
|
405
|
+
declare function abandonQuestAndSpawnFollowups(db: QuestlogDb, questId: number, outcome: string, followups: FollowupQuestInput[], resolvedAt?: number): AbandonQuestResult;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Creates a concrete quest commitment.
|
|
409
|
+
*/
|
|
410
|
+
declare function createQuest(db: QuestlogDb, input: CreateQuestInput): Quest;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Resolves a quest successfully.
|
|
414
|
+
*/
|
|
415
|
+
declare function finishQuest(db: QuestlogDb, questId: number, outcome: string, resolvedAt?: number): Quest;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Loads a quest with derived state, rewards, tags, and dependency context.
|
|
419
|
+
*/
|
|
420
|
+
declare function getQuestDetail(db: QuestlogDb, questId: number, now?: number): QuestDetail;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Lists all non-terminal quests, whether open or already in progress.
|
|
424
|
+
*/
|
|
425
|
+
declare function listActiveQuests(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Lists quests that are available to work on now.
|
|
429
|
+
*/
|
|
430
|
+
declare function listAvailableQuests(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Lists unresolved quests that are blocked by unmet unlock prerequisites.
|
|
434
|
+
*/
|
|
435
|
+
declare function listBlockedQuests(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Lists quests deferred until a future moment.
|
|
439
|
+
*/
|
|
440
|
+
declare function listDeferredQuests(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Lists quests due before the provided horizon.
|
|
444
|
+
*/
|
|
445
|
+
declare function listDueSoonQuests(db: QuestlogDb, horizonMs: number, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Lists in-progress quests.
|
|
449
|
+
*/
|
|
450
|
+
declare function listInProgressQuests(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Lists unresolved quests whose scheduled window has already been missed.
|
|
454
|
+
*/
|
|
455
|
+
declare function listMissedScheduledQuests(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Lists open quests.
|
|
459
|
+
*/
|
|
460
|
+
declare function listOpenQuests(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Lists quests that are overdue by their effective due date.
|
|
464
|
+
*/
|
|
465
|
+
declare function listOverdueQuests(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Lists resolved quests.
|
|
469
|
+
*/
|
|
470
|
+
declare function listResolvedQuests(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Lists quests scheduled for a UTC day window.
|
|
474
|
+
*/
|
|
475
|
+
declare function listScheduledForDay(db: QuestlogDb, dayStart: number, dayEnd: number, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Lists quests whose scheduled window overlaps now.
|
|
479
|
+
*/
|
|
480
|
+
declare function listScheduledNow(db: QuestlogDb, filters?: QuestListFilters, now?: number): QuestDetail[];
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Adds active effort time to a quest.
|
|
484
|
+
*/
|
|
485
|
+
declare function logQuestEffort(db: QuestlogDb, questId: number, effortSeconds: number, now?: number): Quest;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Updates a quest's temporal planning fields.
|
|
489
|
+
*/
|
|
490
|
+
declare function planQuestTime(db: QuestlogDb, questId: number, input: PlanQuestTimeInput): Quest;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Revises a quest objective while the quest has not actually started.
|
|
494
|
+
*/
|
|
495
|
+
declare function reviseQuestObjective(db: QuestlogDb, questId: number, objective: string, now?: number): Quest;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Soft-deletes a quest.
|
|
499
|
+
*/
|
|
500
|
+
declare function softDeleteQuest(db: QuestlogDb, questId: number, now?: number): void;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Marks actual work on a quest as started.
|
|
504
|
+
*/
|
|
505
|
+
declare function startQuest(db: QuestlogDb, questId: number, startedAt?: number): Quest;
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* A recurring definition that spawns concrete quest instances for due anchors.
|
|
509
|
+
*/
|
|
510
|
+
interface RepeatableQuest {
|
|
511
|
+
id: number;
|
|
512
|
+
questlineId: number | null;
|
|
513
|
+
title: string;
|
|
514
|
+
objective: string;
|
|
515
|
+
rrule: string;
|
|
516
|
+
anchorAt: number;
|
|
517
|
+
notBeforeOffsetSeconds: number | null;
|
|
518
|
+
dueOffsetSeconds: number | null;
|
|
519
|
+
scheduledStartOffsetSeconds: number | null;
|
|
520
|
+
scheduledEndOffsetSeconds: number | null;
|
|
521
|
+
allDay: boolean;
|
|
522
|
+
estimateSeconds: number | null;
|
|
523
|
+
createdAt: number;
|
|
524
|
+
updatedAt: number;
|
|
525
|
+
archivedAt: number | null;
|
|
526
|
+
deletedAt: number | null;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Input for creating a recurring quest definition.
|
|
530
|
+
*/
|
|
531
|
+
interface CreateRepeatableQuestInput {
|
|
532
|
+
title: string;
|
|
533
|
+
objective: string;
|
|
534
|
+
questlineId?: number | null;
|
|
535
|
+
rrule: string;
|
|
536
|
+
anchorAt: number;
|
|
537
|
+
notBeforeOffsetSeconds?: number | null;
|
|
538
|
+
dueOffsetSeconds?: number | null;
|
|
539
|
+
scheduledStartOffsetSeconds?: number | null;
|
|
540
|
+
scheduledEndOffsetSeconds?: number | null;
|
|
541
|
+
allDay?: boolean;
|
|
542
|
+
estimateSeconds?: number | null;
|
|
543
|
+
tags?: string[];
|
|
544
|
+
rewards?: RepeatableQuestRewardInput[];
|
|
545
|
+
now?: number;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Input for updating a repeatable quest definition.
|
|
549
|
+
*/
|
|
550
|
+
interface UpdateRepeatableQuestInput {
|
|
551
|
+
title?: string;
|
|
552
|
+
objective?: string;
|
|
553
|
+
questlineId?: number | null;
|
|
554
|
+
rrule?: string;
|
|
555
|
+
anchorAt?: number;
|
|
556
|
+
notBeforeOffsetSeconds?: number | null;
|
|
557
|
+
dueOffsetSeconds?: number | null;
|
|
558
|
+
scheduledStartOffsetSeconds?: number | null;
|
|
559
|
+
scheduledEndOffsetSeconds?: number | null;
|
|
560
|
+
allDay?: boolean;
|
|
561
|
+
estimateSeconds?: number | null;
|
|
562
|
+
archivedAt?: number | null;
|
|
563
|
+
now?: number;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* A recurrence anchor that is due for materialization.
|
|
567
|
+
*/
|
|
568
|
+
interface DueRepeatableAnchor {
|
|
569
|
+
repeatableQuestId: number;
|
|
570
|
+
anchorAt: number;
|
|
571
|
+
markerId: MarkerId;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Archives a repeatable quest definition.
|
|
576
|
+
*/
|
|
577
|
+
declare function archiveRepeatableQuest(db: QuestlogDb, repeatableQuestId: number, archivedAt?: number): RepeatableQuest;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Creates a repeatable quest definition.
|
|
581
|
+
*/
|
|
582
|
+
declare function createRepeatableQuest(db: QuestlogDb, input: CreateRepeatableQuestInput): RepeatableQuest;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Lists recurrence anchors that should be materialized into concrete quests.
|
|
586
|
+
*/
|
|
587
|
+
declare function listDueRepeatableQuestAnchors(db: QuestlogDb, now: number): DueRepeatableAnchor[];
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Soft-deletes a repeatable quest definition.
|
|
591
|
+
*/
|
|
592
|
+
declare function softDeleteRepeatableQuest(db: QuestlogDb, repeatableQuestId: number, deletedAt?: number): void;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Materializes all due repeatable quest anchors into concrete quests.
|
|
596
|
+
*/
|
|
597
|
+
declare function spawnDueRepeatableQuests(db: QuestlogDb, now: number): Quest[];
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Updates a repeatable quest definition for future materializations only.
|
|
601
|
+
*/
|
|
602
|
+
declare function updateRepeatableQuest(db: QuestlogDb, repeatableQuestId: number, input: UpdateRepeatableQuestInput): RepeatableQuest;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Captures a new rumor for later triage.
|
|
606
|
+
*/
|
|
607
|
+
declare function captureRumor(db: QuestlogDb, input: CaptureRumorInput): Rumor;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Dismisses a rumor without producing downstream artifacts.
|
|
611
|
+
*/
|
|
612
|
+
declare function dismissRumor(db: QuestlogDb, rumorId: number, dismissedAt?: number): Rumor;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Loads a rumor with derived state and downstream outputs.
|
|
616
|
+
*/
|
|
617
|
+
declare function getRumorDetail(db: QuestlogDb, rumorId: number): RumorDetail;
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Lists outputs that a rumor produced.
|
|
621
|
+
*/
|
|
622
|
+
declare function getRumorOutputs(db: QuestlogDb, rumorId: number): RumorOutput[];
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Lists all active rumors.
|
|
626
|
+
*/
|
|
627
|
+
declare function listRumors(db: QuestlogDb): Rumor[];
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Reopens a previously dismissed or settled rumor.
|
|
631
|
+
*/
|
|
632
|
+
declare function reopenRumor(db: QuestlogDb, rumorId: number, now?: number): Rumor;
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Canonically settles a rumor into zero or more downstream artifacts.
|
|
636
|
+
*/
|
|
637
|
+
declare function settleRumor(db: QuestlogDb, rumorId: number, input: SettleRumorInput): SettleRumorResult;
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Soft-deletes a rumor.
|
|
641
|
+
*/
|
|
642
|
+
declare function softDeleteRumor(db: QuestlogDb, rumorId: number, now?: number): void;
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Search result across questlog content.
|
|
646
|
+
*/
|
|
647
|
+
interface QuestlogSearchResult {
|
|
648
|
+
entityKind: 'quest' | 'rumor';
|
|
649
|
+
entityId: number;
|
|
650
|
+
title: string;
|
|
651
|
+
snippet: string;
|
|
652
|
+
markerId: MarkerId | null;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Full-text search across quest and rumor content.
|
|
657
|
+
*/
|
|
658
|
+
declare function searchQuestlog(db: QuestlogDb, query: string): QuestlogSearchResult[];
|
|
659
|
+
|
|
660
|
+
declare const read_getQuestDetail: typeof getQuestDetail;
|
|
661
|
+
declare const read_getQuestlineDetail: typeof getQuestlineDetail;
|
|
662
|
+
declare const read_getRumorDetail: typeof getRumorDetail;
|
|
663
|
+
declare const read_getRumorOutputs: typeof getRumorOutputs;
|
|
664
|
+
declare const read_listActiveQuests: typeof listActiveQuests;
|
|
665
|
+
declare const read_listAvailableQuests: typeof listAvailableQuests;
|
|
666
|
+
declare const read_listBlockedQuests: typeof listBlockedQuests;
|
|
667
|
+
declare const read_listDeferredQuests: typeof listDeferredQuests;
|
|
668
|
+
declare const read_listDueRepeatableQuestAnchors: typeof listDueRepeatableQuestAnchors;
|
|
669
|
+
declare const read_listDueSoonQuests: typeof listDueSoonQuests;
|
|
670
|
+
declare const read_listInProgressQuests: typeof listInProgressQuests;
|
|
671
|
+
declare const read_listMissedScheduledQuests: typeof listMissedScheduledQuests;
|
|
672
|
+
declare const read_listOpenQuests: typeof listOpenQuests;
|
|
673
|
+
declare const read_listOverdueQuests: typeof listOverdueQuests;
|
|
674
|
+
declare const read_listQuestlines: typeof listQuestlines;
|
|
675
|
+
declare const read_listResolvedQuests: typeof listResolvedQuests;
|
|
676
|
+
declare const read_listRumors: typeof listRumors;
|
|
677
|
+
declare const read_listScheduledForDay: typeof listScheduledForDay;
|
|
678
|
+
declare const read_listScheduledNow: typeof listScheduledNow;
|
|
679
|
+
declare const read_searchQuestlog: typeof searchQuestlog;
|
|
680
|
+
declare namespace read {
|
|
681
|
+
export { read_getQuestDetail as getQuestDetail, read_getQuestlineDetail as getQuestlineDetail, read_getRumorDetail as getRumorDetail, read_getRumorOutputs as getRumorOutputs, read_listActiveQuests as listActiveQuests, read_listAvailableQuests as listAvailableQuests, read_listBlockedQuests as listBlockedQuests, read_listDeferredQuests as listDeferredQuests, read_listDueRepeatableQuestAnchors as listDueRepeatableQuestAnchors, read_listDueSoonQuests as listDueSoonQuests, read_listInProgressQuests as listInProgressQuests, read_listMissedScheduledQuests as listMissedScheduledQuests, read_listOpenQuests as listOpenQuests, read_listOverdueQuests as listOverdueQuests, read_listQuestlines as listQuestlines, read_listResolvedQuests as listResolvedQuests, read_listRumors as listRumors, read_listScheduledForDay as listScheduledForDay, read_listScheduledNow as listScheduledNow, read_searchQuestlog as searchQuestlog };
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Attaches a reward to a concrete quest.
|
|
686
|
+
*/
|
|
687
|
+
declare function addQuestReward(db: QuestlogDb, questId: number, input: QuestRewardInput): QuestReward;
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* Claims a reward exactly once for a successfully resolved quest.
|
|
691
|
+
*/
|
|
692
|
+
declare function claimQuestReward(db: QuestlogDb, rewardId: number, claimedAt?: number): QuestReward;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Soft-deletes an unclaimed reward.
|
|
696
|
+
*/
|
|
697
|
+
declare function removeQuestReward(db: QuestlogDb, rewardId: number, now?: number): void;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Replaces the active reward templates on a repeatable quest definition.
|
|
701
|
+
*/
|
|
702
|
+
declare function replaceRepeatableQuestRewards(db: QuestlogDb, repeatableQuestId: number, rewards: RepeatableQuestRewardInput[], now?: number): void;
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Updates an unclaimed quest reward.
|
|
706
|
+
*/
|
|
707
|
+
declare function updateQuestReward(db: QuestlogDb, rewardId: number, input: Omit<QuestRewardInput, 'now'> & {
|
|
708
|
+
now?: number;
|
|
709
|
+
}): QuestReward;
|
|
710
|
+
|
|
711
|
+
declare const archiveDeleteAndPruneSkill: {
|
|
712
|
+
name: string;
|
|
713
|
+
description: string;
|
|
714
|
+
content: string;
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
declare const chooseWorkShapeSkill: {
|
|
718
|
+
name: string;
|
|
719
|
+
description: string;
|
|
720
|
+
content: string;
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
declare const clarifyAmbiguousRequestsSkill: {
|
|
724
|
+
name: string;
|
|
725
|
+
description: string;
|
|
726
|
+
content: string;
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
declare const closeWorkAndClaimOutcomesSkill: {
|
|
730
|
+
name: string;
|
|
731
|
+
description: string;
|
|
732
|
+
content: string;
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
declare const createConcreteQuestSkill: {
|
|
736
|
+
name: string;
|
|
737
|
+
description: string;
|
|
738
|
+
content: string;
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
declare const detectSlipsAndStalenessSkill: {
|
|
742
|
+
name: string;
|
|
743
|
+
description: string;
|
|
744
|
+
content: string;
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
declare const escalateAndUnblockSkill: {
|
|
748
|
+
name: string;
|
|
749
|
+
description: string;
|
|
750
|
+
content: string;
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
declare const frameInitiativeQuestlineSkill: {
|
|
754
|
+
name: string;
|
|
755
|
+
description: string;
|
|
756
|
+
content: string;
|
|
757
|
+
};
|
|
758
|
+
|
|
759
|
+
declare const handleExceptionsAndWeirdCasesSkill: {
|
|
760
|
+
name: string;
|
|
761
|
+
description: string;
|
|
762
|
+
content: string;
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
declare const intakeTriageSkill: {
|
|
766
|
+
name: string;
|
|
767
|
+
description: string;
|
|
768
|
+
content: string;
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
declare const maintainClearOwnershipSkill: {
|
|
772
|
+
name: string;
|
|
773
|
+
description: string;
|
|
774
|
+
content: string;
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
declare const manageApprovalsAndPromisesSkill: {
|
|
778
|
+
name: string;
|
|
779
|
+
description: string;
|
|
780
|
+
content: string;
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
declare const planSuccessorWorkSkill: {
|
|
784
|
+
name: string;
|
|
785
|
+
description: string;
|
|
786
|
+
content: string;
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
declare const planTimeCorrectlySkill: {
|
|
790
|
+
name: string;
|
|
791
|
+
description: string;
|
|
792
|
+
content: string;
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
declare const prioritizeAcrossStreamsSkill: {
|
|
796
|
+
name: string;
|
|
797
|
+
description: string;
|
|
798
|
+
content: string;
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
declare const protectCapacityAndFocusSkill: {
|
|
802
|
+
name: string;
|
|
803
|
+
description: string;
|
|
804
|
+
content: string;
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
declare const recoverFromModelingMistakesSkill: {
|
|
808
|
+
name: string;
|
|
809
|
+
description: string;
|
|
810
|
+
content: string;
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
declare const reportStatusAndManageExpectationsSkill: {
|
|
814
|
+
name: string;
|
|
815
|
+
description: string;
|
|
816
|
+
content: string;
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
declare const reviseOrReshapeCommitmentSkill: {
|
|
820
|
+
name: string;
|
|
821
|
+
description: string;
|
|
822
|
+
content: string;
|
|
823
|
+
};
|
|
824
|
+
|
|
825
|
+
declare const runOperationalReviewSkill: {
|
|
826
|
+
name: string;
|
|
827
|
+
description: string;
|
|
828
|
+
content: string;
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
declare const runRecurringRhythmsSkill: {
|
|
832
|
+
name: string;
|
|
833
|
+
description: string;
|
|
834
|
+
content: string;
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
declare const searchAndRetrieveContextSkill: {
|
|
838
|
+
name: string;
|
|
839
|
+
description: string;
|
|
840
|
+
content: string;
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
declare const sequenceWithUnlocksSkill: {
|
|
844
|
+
name: string;
|
|
845
|
+
description: string;
|
|
846
|
+
content: string;
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
declare const settleRumorIntoStructureSkill: {
|
|
850
|
+
name: string;
|
|
851
|
+
description: string;
|
|
852
|
+
content: string;
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
declare const questlogSkills: {
|
|
856
|
+
name: string;
|
|
857
|
+
description: string;
|
|
858
|
+
content: string;
|
|
859
|
+
}[];
|
|
860
|
+
declare function listQuestlogSkills(): {
|
|
861
|
+
name: string;
|
|
862
|
+
description: string;
|
|
863
|
+
content: string;
|
|
864
|
+
}[];
|
|
865
|
+
declare function getQuestlogSkillByName(name: string): {
|
|
866
|
+
name: string;
|
|
867
|
+
description: string;
|
|
868
|
+
content: string;
|
|
869
|
+
} | null;
|
|
870
|
+
|
|
871
|
+
interface QuestlogSkill {
|
|
872
|
+
name: string;
|
|
873
|
+
description: string;
|
|
874
|
+
content: string;
|
|
875
|
+
}
|
|
876
|
+
type QuestlogSkillRegistry = readonly QuestlogSkill[];
|
|
877
|
+
declare function defineQuestlogSkill<TSkill extends QuestlogSkill>(skill: TSkill): TSkill;
|
|
878
|
+
|
|
879
|
+
declare const tagAndFilterPortfoliosSkill: {
|
|
880
|
+
name: string;
|
|
881
|
+
description: string;
|
|
882
|
+
content: string;
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
type index$1_QuestlogSkill = QuestlogSkill;
|
|
886
|
+
type index$1_QuestlogSkillRegistry = QuestlogSkillRegistry;
|
|
887
|
+
declare const index$1_archiveDeleteAndPruneSkill: typeof archiveDeleteAndPruneSkill;
|
|
888
|
+
declare const index$1_chooseWorkShapeSkill: typeof chooseWorkShapeSkill;
|
|
889
|
+
declare const index$1_clarifyAmbiguousRequestsSkill: typeof clarifyAmbiguousRequestsSkill;
|
|
890
|
+
declare const index$1_closeWorkAndClaimOutcomesSkill: typeof closeWorkAndClaimOutcomesSkill;
|
|
891
|
+
declare const index$1_createConcreteQuestSkill: typeof createConcreteQuestSkill;
|
|
892
|
+
declare const index$1_defineQuestlogSkill: typeof defineQuestlogSkill;
|
|
893
|
+
declare const index$1_detectSlipsAndStalenessSkill: typeof detectSlipsAndStalenessSkill;
|
|
894
|
+
declare const index$1_escalateAndUnblockSkill: typeof escalateAndUnblockSkill;
|
|
895
|
+
declare const index$1_frameInitiativeQuestlineSkill: typeof frameInitiativeQuestlineSkill;
|
|
896
|
+
declare const index$1_getQuestlogSkillByName: typeof getQuestlogSkillByName;
|
|
897
|
+
declare const index$1_handleExceptionsAndWeirdCasesSkill: typeof handleExceptionsAndWeirdCasesSkill;
|
|
898
|
+
declare const index$1_intakeTriageSkill: typeof intakeTriageSkill;
|
|
899
|
+
declare const index$1_listQuestlogSkills: typeof listQuestlogSkills;
|
|
900
|
+
declare const index$1_maintainClearOwnershipSkill: typeof maintainClearOwnershipSkill;
|
|
901
|
+
declare const index$1_manageApprovalsAndPromisesSkill: typeof manageApprovalsAndPromisesSkill;
|
|
902
|
+
declare const index$1_planSuccessorWorkSkill: typeof planSuccessorWorkSkill;
|
|
903
|
+
declare const index$1_planTimeCorrectlySkill: typeof planTimeCorrectlySkill;
|
|
904
|
+
declare const index$1_prioritizeAcrossStreamsSkill: typeof prioritizeAcrossStreamsSkill;
|
|
905
|
+
declare const index$1_protectCapacityAndFocusSkill: typeof protectCapacityAndFocusSkill;
|
|
906
|
+
declare const index$1_questlogSkills: typeof questlogSkills;
|
|
907
|
+
declare const index$1_recoverFromModelingMistakesSkill: typeof recoverFromModelingMistakesSkill;
|
|
908
|
+
declare const index$1_reportStatusAndManageExpectationsSkill: typeof reportStatusAndManageExpectationsSkill;
|
|
909
|
+
declare const index$1_reviseOrReshapeCommitmentSkill: typeof reviseOrReshapeCommitmentSkill;
|
|
910
|
+
declare const index$1_runOperationalReviewSkill: typeof runOperationalReviewSkill;
|
|
911
|
+
declare const index$1_runRecurringRhythmsSkill: typeof runRecurringRhythmsSkill;
|
|
912
|
+
declare const index$1_searchAndRetrieveContextSkill: typeof searchAndRetrieveContextSkill;
|
|
913
|
+
declare const index$1_sequenceWithUnlocksSkill: typeof sequenceWithUnlocksSkill;
|
|
914
|
+
declare const index$1_settleRumorIntoStructureSkill: typeof settleRumorIntoStructureSkill;
|
|
915
|
+
declare const index$1_tagAndFilterPortfoliosSkill: typeof tagAndFilterPortfoliosSkill;
|
|
916
|
+
declare namespace index$1 {
|
|
917
|
+
export { type index$1_QuestlogSkill as QuestlogSkill, type index$1_QuestlogSkillRegistry as QuestlogSkillRegistry, index$1_archiveDeleteAndPruneSkill as archiveDeleteAndPruneSkill, index$1_chooseWorkShapeSkill as chooseWorkShapeSkill, index$1_clarifyAmbiguousRequestsSkill as clarifyAmbiguousRequestsSkill, index$1_closeWorkAndClaimOutcomesSkill as closeWorkAndClaimOutcomesSkill, index$1_createConcreteQuestSkill as createConcreteQuestSkill, index$1_defineQuestlogSkill as defineQuestlogSkill, index$1_detectSlipsAndStalenessSkill as detectSlipsAndStalenessSkill, index$1_escalateAndUnblockSkill as escalateAndUnblockSkill, index$1_frameInitiativeQuestlineSkill as frameInitiativeQuestlineSkill, index$1_getQuestlogSkillByName as getQuestlogSkillByName, index$1_handleExceptionsAndWeirdCasesSkill as handleExceptionsAndWeirdCasesSkill, index$1_intakeTriageSkill as intakeTriageSkill, index$1_listQuestlogSkills as listQuestlogSkills, index$1_maintainClearOwnershipSkill as maintainClearOwnershipSkill, index$1_manageApprovalsAndPromisesSkill as manageApprovalsAndPromisesSkill, index$1_planSuccessorWorkSkill as planSuccessorWorkSkill, index$1_planTimeCorrectlySkill as planTimeCorrectlySkill, index$1_prioritizeAcrossStreamsSkill as prioritizeAcrossStreamsSkill, index$1_protectCapacityAndFocusSkill as protectCapacityAndFocusSkill, index$1_questlogSkills as questlogSkills, index$1_recoverFromModelingMistakesSkill as recoverFromModelingMistakesSkill, index$1_reportStatusAndManageExpectationsSkill as reportStatusAndManageExpectationsSkill, index$1_reviseOrReshapeCommitmentSkill as reviseOrReshapeCommitmentSkill, index$1_runOperationalReviewSkill as runOperationalReviewSkill, index$1_runRecurringRhythmsSkill as runRecurringRhythmsSkill, index$1_searchAndRetrieveContextSkill as searchAndRetrieveContextSkill, index$1_sequenceWithUnlocksSkill as sequenceWithUnlocksSkill, index$1_settleRumorIntoStructureSkill as settleRumorIntoStructureSkill, index$1_tagAndFilterPortfoliosSkill as tagAndFilterPortfoliosSkill };
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
interface QuestlogSoulTrait {
|
|
921
|
+
principle: string;
|
|
922
|
+
provenance: string;
|
|
923
|
+
}
|
|
924
|
+
interface QuestlogSoul {
|
|
925
|
+
slug: string;
|
|
926
|
+
name: string;
|
|
927
|
+
description: string;
|
|
928
|
+
essence: string;
|
|
929
|
+
traits: readonly QuestlogSoulTrait[];
|
|
930
|
+
}
|
|
931
|
+
declare const questlogSoulEssence = "You think like a disciplined manager whose main instrument is Questlog. Your job is not to sound organized. Your job is to keep the system's representation of work true enough that decisions made from it stay good over time. You see work as a progression: uncertainty enters, shape is clarified, commitments are formed, execution begins, blockers appear or clear, outcomes resolve, and closure either happens properly or leaks into the future as hidden debt. You are always asking: what state is this really in, what is the least distorted way to represent it, and what move keeps tomorrow simpler instead of messier.\n\nYour first boundary is between uncertainty and commitment. Not everything that arrives deserves to become executable work. Some things should remain rumors, some need clarification, some deserve a full questline, some are only one concrete quest, and some are rhythms that belong in repeatables. You do not rush past that boundary just to feel decisive. Premature commitment is one of the main ways systems become noisy and untrustworthy. Once vague work is stored as execution truth, every later decision is forced to work around that distortion. You would rather delay commitment by one step than pollute the model by one bad shape.\n\nYour second boundary is between derived truth and improvised interpretation. You trust the system to compute what it already knows how to compute. Available is not the same as open. Blocked is not the same as deferred. Missed schedule is not the same as overdue. Done is not the same as fully closed. You read those distinctions before you act, because each one points to a different treatment. When work is slipping, you do not settle for vague concern. You determine whether the problem is timing, shape, dependency, approval, staleness, or simple overload. The system becomes powerful only when those meanings stay separate.\n\nYour third boundary is historical truth. Once work has actually started, you do not rewrite it to make the present look cleaner. If the objective changed, the model must show that reality changed. If a path failed, the system must show failure or abandonment, not a cosmetically updated objective that pretends the original commitment never existed. You prefer finishing honestly, abandoning honestly, or spawning the next truthful work.\n\nYou also think in terms of delayed failure. Many bad outcomes do not come from dramatic mistakes. They come from quiet ones: stale work left open too long, dependencies never modeled, approvals left implicit, recurring work handled manually, items that are technically resolved but not actually closed. You use Questlog well by choosing the right representation, reading the right slice, and making the smallest honest write that improves the future instead of merely tidying the present.";
|
|
932
|
+
declare const questlogSoulTraits: {
|
|
933
|
+
principle: string;
|
|
934
|
+
provenance: string;
|
|
935
|
+
}[];
|
|
936
|
+
declare const questlogSoul: QuestlogSoul;
|
|
937
|
+
declare function renderQuestlogSoulPromptFoundation(soul?: QuestlogSoul): string;
|
|
938
|
+
|
|
939
|
+
type soul_QuestlogSoul = QuestlogSoul;
|
|
940
|
+
type soul_QuestlogSoulTrait = QuestlogSoulTrait;
|
|
941
|
+
declare const soul_questlogSoul: typeof questlogSoul;
|
|
942
|
+
declare const soul_questlogSoulEssence: typeof questlogSoulEssence;
|
|
943
|
+
declare const soul_questlogSoulTraits: typeof questlogSoulTraits;
|
|
944
|
+
declare const soul_renderQuestlogSoulPromptFoundation: typeof renderQuestlogSoulPromptFoundation;
|
|
945
|
+
declare namespace soul {
|
|
946
|
+
export { type soul_QuestlogSoul as QuestlogSoul, type soul_QuestlogSoulTrait as QuestlogSoulTrait, soul_questlogSoul as questlogSoul, soul_questlogSoulEssence as questlogSoulEssence, soul_questlogSoulTraits as questlogSoulTraits, soul_renderQuestlogSoulPromptFoundation as renderQuestlogSoulPromptFoundation };
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Replaces the active tags on a concrete quest.
|
|
951
|
+
*/
|
|
952
|
+
declare function replaceQuestTags(db: QuestlogDb, questId: number, tagNames: string[], now?: number): void;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Replaces the active tag templates on a repeatable quest definition.
|
|
956
|
+
*/
|
|
957
|
+
declare function replaceRepeatableQuestTags(db: QuestlogDb, repeatableQuestId: number, tagNames: string[], now?: number): void;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Adds tags to a concrete quest without disturbing existing active tags.
|
|
961
|
+
*/
|
|
962
|
+
declare function tagQuest(db: QuestlogDb, questId: number, tagNames: string[], now?: number): void;
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* A normalized cross-cutting label for concrete quests.
|
|
966
|
+
*/
|
|
967
|
+
interface Tag {
|
|
968
|
+
id: number;
|
|
969
|
+
name: string;
|
|
970
|
+
normalizedName: string;
|
|
971
|
+
createdAt: number;
|
|
972
|
+
deletedAt: number | null;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Removes tags from a concrete quest.
|
|
977
|
+
*/
|
|
978
|
+
declare function untagQuest(db: QuestlogDb, questId: number, tagNames: string[], now?: number): void;
|
|
979
|
+
|
|
980
|
+
type ToolEntityKind = 'quest' | 'questline' | 'repeatable_quest' | 'reward' | 'rumor' | 'tag';
|
|
981
|
+
type ToolOutcomeKind = 'success' | 'no_op' | 'needs_clarification' | 'error';
|
|
982
|
+
type ToolErrorCode = 'clarification_needed' | 'conflict' | 'constraint_violation' | 'invalid_input' | 'invalid_state' | 'not_found' | 'system_error' | 'unsupported_target';
|
|
983
|
+
type ToolErrorKind = 'domain' | 'protocol' | 'system';
|
|
984
|
+
type ToolWarningCode = 'already_in_state' | 'derived_value_used' | 'empty_result' | 'future_only_effect' | 'partial_match' | 'unchanged';
|
|
985
|
+
type ToolClarificationCode = 'ambiguous_action' | 'ambiguous_target' | 'missing_required_choice' | 'multiple_plausible_matches';
|
|
986
|
+
type ToolNextStepHintKind = 'ask_user' | 'inspect_item' | 'review_view' | 'retry_with' | 'use_tool';
|
|
987
|
+
interface ToolEntityRef {
|
|
988
|
+
kind: ToolEntityKind;
|
|
989
|
+
id: number;
|
|
990
|
+
title?: string | undefined;
|
|
991
|
+
markerId?: MarkerId | null | undefined;
|
|
992
|
+
state?: string | null | undefined;
|
|
993
|
+
}
|
|
994
|
+
interface ToolListItem extends ToolEntityRef {
|
|
995
|
+
subtitle?: string | undefined;
|
|
996
|
+
snippet?: string | undefined;
|
|
997
|
+
dueAt?: number | null | undefined;
|
|
998
|
+
available?: boolean | undefined;
|
|
999
|
+
}
|
|
1000
|
+
interface ToolWarning {
|
|
1001
|
+
code: ToolWarningCode;
|
|
1002
|
+
message: string;
|
|
1003
|
+
}
|
|
1004
|
+
interface ToolNextStepHint {
|
|
1005
|
+
kind: ToolNextStepHintKind;
|
|
1006
|
+
message: string;
|
|
1007
|
+
tool?: string;
|
|
1008
|
+
suggestedInput?: Record<string, unknown>;
|
|
1009
|
+
}
|
|
1010
|
+
interface ToolBaseResult {
|
|
1011
|
+
ok: boolean;
|
|
1012
|
+
outcome: ToolOutcomeKind;
|
|
1013
|
+
summary: string;
|
|
1014
|
+
entities: ToolEntityRef[];
|
|
1015
|
+
warnings?: ToolWarning[] | undefined;
|
|
1016
|
+
next?: ToolNextStepHint[] | undefined;
|
|
1017
|
+
}
|
|
1018
|
+
interface ToolSuccess<TData> extends ToolBaseResult {
|
|
1019
|
+
ok: true;
|
|
1020
|
+
outcome: 'success' | 'no_op';
|
|
1021
|
+
data: TData;
|
|
1022
|
+
}
|
|
1023
|
+
interface ToolNeedsClarification extends ToolBaseResult {
|
|
1024
|
+
ok: false;
|
|
1025
|
+
outcome: 'needs_clarification';
|
|
1026
|
+
clarification: {
|
|
1027
|
+
code: ToolClarificationCode;
|
|
1028
|
+
question: string;
|
|
1029
|
+
missing: string[];
|
|
1030
|
+
options?: Array<{
|
|
1031
|
+
label: string;
|
|
1032
|
+
value: number | string;
|
|
1033
|
+
}> | undefined;
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
interface ToolFailure extends ToolBaseResult {
|
|
1037
|
+
ok: false;
|
|
1038
|
+
outcome: 'error';
|
|
1039
|
+
error: {
|
|
1040
|
+
kind: ToolErrorKind;
|
|
1041
|
+
code: ToolErrorCode;
|
|
1042
|
+
message: string;
|
|
1043
|
+
recovery?: string | undefined;
|
|
1044
|
+
details?: Record<string, unknown> | undefined;
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
type ToolResult<TData> = ToolFailure | ToolNeedsClarification | ToolSuccess<TData>;
|
|
1048
|
+
interface ToolResultOptions {
|
|
1049
|
+
entities?: ToolEntityRef[] | undefined;
|
|
1050
|
+
next?: ToolNextStepHint[] | undefined;
|
|
1051
|
+
warnings?: ToolWarning[] | undefined;
|
|
1052
|
+
}
|
|
1053
|
+
declare function toolWarning(code: ToolWarningCode, message: string): ToolWarning;
|
|
1054
|
+
declare function toolSuccess<TData>(summary: string, data: TData, options?: ToolResultOptions): ToolSuccess<TData>;
|
|
1055
|
+
declare function toolNoOp<TData>(summary: string, data: TData, options?: ToolResultOptions): ToolSuccess<TData>;
|
|
1056
|
+
interface ToolClarificationOptions extends ToolResultOptions {
|
|
1057
|
+
options?: Array<{
|
|
1058
|
+
label: string;
|
|
1059
|
+
value: number | string;
|
|
1060
|
+
}> | undefined;
|
|
1061
|
+
}
|
|
1062
|
+
declare function toolNeedsClarification(code: ToolClarificationCode, question: string, missing: string[], options?: ToolClarificationOptions): ToolNeedsClarification;
|
|
1063
|
+
interface ToolFailureOptions extends ToolResultOptions {
|
|
1064
|
+
details?: Record<string, unknown> | undefined;
|
|
1065
|
+
recovery?: string | undefined;
|
|
1066
|
+
}
|
|
1067
|
+
declare function toolFailure(kind: ToolErrorKind, code: ToolErrorCode, summary: string, message: string, options?: ToolFailureOptions): ToolFailure;
|
|
1068
|
+
|
|
1069
|
+
type ToolInputDescriptions = Readonly<Record<string, string>>;
|
|
1070
|
+
type ToolOutputDescription = string;
|
|
1071
|
+
type JsonSchemaType = 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';
|
|
1072
|
+
interface JsonSchema {
|
|
1073
|
+
type?: JsonSchemaType | undefined;
|
|
1074
|
+
description?: string | undefined;
|
|
1075
|
+
enum?: ReadonlyArray<boolean | number | string | null> | undefined;
|
|
1076
|
+
const?: boolean | number | string | null;
|
|
1077
|
+
items?: JsonSchema | undefined;
|
|
1078
|
+
properties?: Readonly<Record<string, JsonSchema>> | undefined;
|
|
1079
|
+
required?: ReadonlyArray<string> | undefined;
|
|
1080
|
+
additionalProperties?: boolean | undefined;
|
|
1081
|
+
oneOf?: ReadonlyArray<JsonSchema> | undefined;
|
|
1082
|
+
anyOf?: ReadonlyArray<JsonSchema> | undefined;
|
|
1083
|
+
}
|
|
1084
|
+
type ToolSideEffects = 'none' | 'writes_state';
|
|
1085
|
+
interface QuestlogToolDefinition<TInput, TResult extends ToolResult<unknown>> {
|
|
1086
|
+
name: string;
|
|
1087
|
+
description: string;
|
|
1088
|
+
whenToUse: string;
|
|
1089
|
+
whenNotToUse?: string | undefined;
|
|
1090
|
+
sideEffects: ToolSideEffects;
|
|
1091
|
+
readOnly: boolean;
|
|
1092
|
+
supportsClarification: boolean;
|
|
1093
|
+
targetKinds: readonly string[];
|
|
1094
|
+
inputDescriptions: ToolInputDescriptions;
|
|
1095
|
+
outputDescription: ToolOutputDescription;
|
|
1096
|
+
inputSchema: JsonSchema;
|
|
1097
|
+
handler: (db: QuestlogDb, input: TInput) => TResult;
|
|
1098
|
+
}
|
|
1099
|
+
type ToolDefinitionRegistry = readonly QuestlogToolDefinition<never, ToolResult<unknown>>[];
|
|
1100
|
+
declare function defineQuestlogTool<TInput, TResult extends ToolResult<unknown>>(definition: QuestlogToolDefinition<TInput, TResult>): QuestlogToolDefinition<TInput, TResult>;
|
|
1101
|
+
declare function stringSchema(description: string, options?: Partial<JsonSchema>): JsonSchema;
|
|
1102
|
+
declare function numberSchema(description: string, options?: Partial<JsonSchema>): JsonSchema;
|
|
1103
|
+
declare function integerSchema(description: string, options?: Partial<JsonSchema>): JsonSchema;
|
|
1104
|
+
declare function booleanSchema(description: string, options?: Partial<JsonSchema>): JsonSchema;
|
|
1105
|
+
declare function enumSchema(description: string, values: ReadonlyArray<boolean | number | string | null>): JsonSchema;
|
|
1106
|
+
declare function literalSchema(value: boolean | number | string | null, description?: string): JsonSchema;
|
|
1107
|
+
declare function arraySchema(items: JsonSchema, description: string): JsonSchema;
|
|
1108
|
+
declare function objectSchema(properties: Record<string, JsonSchema>, required: ReadonlyArray<string>, description?: string): JsonSchema;
|
|
1109
|
+
declare function oneOfSchema(schemas: ReadonlyArray<JsonSchema>, description?: string): JsonSchema;
|
|
1110
|
+
|
|
1111
|
+
interface CaptureRumorToolData {
|
|
1112
|
+
rumor: ReturnType<typeof captureRumor>;
|
|
1113
|
+
}
|
|
1114
|
+
type CaptureRumorToolResult = ToolResult<CaptureRumorToolData>;
|
|
1115
|
+
declare function captureRumorToolHandler(db: Parameters<typeof captureRumor>[0], input: CaptureRumorInput): CaptureRumorToolResult;
|
|
1116
|
+
declare const captureRumorTool: QuestlogToolDefinition<CaptureRumorInput, CaptureRumorToolResult>;
|
|
1117
|
+
|
|
1118
|
+
interface InspectQuestlogItemToolInput {
|
|
1119
|
+
target: {
|
|
1120
|
+
kind: 'quest';
|
|
1121
|
+
id: number;
|
|
1122
|
+
} | {
|
|
1123
|
+
kind: 'questline';
|
|
1124
|
+
id: number;
|
|
1125
|
+
} | {
|
|
1126
|
+
kind: 'repeatable_quest';
|
|
1127
|
+
id: number;
|
|
1128
|
+
} | {
|
|
1129
|
+
kind: 'rumor';
|
|
1130
|
+
id: number;
|
|
1131
|
+
};
|
|
1132
|
+
detailLevel?: 'compact' | 'full';
|
|
1133
|
+
now?: number;
|
|
1134
|
+
}
|
|
1135
|
+
interface InspectQuestlogItemToolData {
|
|
1136
|
+
item: QuestInspectItem;
|
|
1137
|
+
related: ToolEntityRef[];
|
|
1138
|
+
detailLevel: 'compact' | 'full';
|
|
1139
|
+
}
|
|
1140
|
+
interface QuestCompactDetail {
|
|
1141
|
+
id: number;
|
|
1142
|
+
title: string;
|
|
1143
|
+
objective: string;
|
|
1144
|
+
state: ReturnType<typeof getQuestDetail>['state'];
|
|
1145
|
+
markerId: ReturnType<typeof getQuestDetail>['markerId'];
|
|
1146
|
+
available: boolean;
|
|
1147
|
+
effectiveDueAt: number | null;
|
|
1148
|
+
tagNames: string[];
|
|
1149
|
+
questlineId: number | null;
|
|
1150
|
+
sourceRumorId: number | null;
|
|
1151
|
+
spawnedFromRepeatableId: number | null;
|
|
1152
|
+
}
|
|
1153
|
+
interface QuestlineCompactDetail {
|
|
1154
|
+
id: number;
|
|
1155
|
+
title: string;
|
|
1156
|
+
description: string | null;
|
|
1157
|
+
dueAt: number | null;
|
|
1158
|
+
archivedAt: number | null;
|
|
1159
|
+
totalQuests: number;
|
|
1160
|
+
availableQuests: number;
|
|
1161
|
+
overdueQuests: number;
|
|
1162
|
+
sourceRumorId: number | null;
|
|
1163
|
+
}
|
|
1164
|
+
interface RepeatableQuestCompactDetail {
|
|
1165
|
+
id: number;
|
|
1166
|
+
title: string;
|
|
1167
|
+
objective: string;
|
|
1168
|
+
rrule: string;
|
|
1169
|
+
anchorAt: number;
|
|
1170
|
+
questlineId: number | null;
|
|
1171
|
+
archivedAt: number | null;
|
|
1172
|
+
deletedAt: number | null;
|
|
1173
|
+
}
|
|
1174
|
+
interface RumorCompactDetail {
|
|
1175
|
+
id: number;
|
|
1176
|
+
title: string;
|
|
1177
|
+
details: string | null;
|
|
1178
|
+
state: RumorDetail['state'];
|
|
1179
|
+
markerId: RumorDetail['markerId'];
|
|
1180
|
+
outputs: RumorDetail['outputs'];
|
|
1181
|
+
}
|
|
1182
|
+
type QuestInspectItem = {
|
|
1183
|
+
kind: 'quest';
|
|
1184
|
+
detail: QuestCompactDetail | ReturnType<typeof getQuestDetail>;
|
|
1185
|
+
} | {
|
|
1186
|
+
kind: 'questline';
|
|
1187
|
+
detail: QuestlineCompactDetail | ReturnType<typeof getQuestlineDetail>;
|
|
1188
|
+
} | {
|
|
1189
|
+
kind: 'repeatable_quest';
|
|
1190
|
+
detail: RepeatableQuestCompactDetail | RepeatableQuest;
|
|
1191
|
+
} | {
|
|
1192
|
+
kind: 'rumor';
|
|
1193
|
+
detail: RumorCompactDetail | RumorDetail;
|
|
1194
|
+
};
|
|
1195
|
+
type InspectQuestlogItemToolResult = ToolResult<InspectQuestlogItemToolData>;
|
|
1196
|
+
declare function inspectQuestlogItemToolHandler(db: Parameters<typeof getQuestDetail>[0], input: InspectQuestlogItemToolInput): InspectQuestlogItemToolResult;
|
|
1197
|
+
declare const inspectQuestlogItemTool: QuestlogToolDefinition<InspectQuestlogItemToolInput, InspectQuestlogItemToolResult>;
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* Loads a single active repeatable quest or throws.
|
|
1201
|
+
*/
|
|
1202
|
+
declare function getRepeatableQuestOrThrow(db: QuestlogDb, repeatableQuestId: number): RepeatableQuest;
|
|
1203
|
+
|
|
1204
|
+
type ManageRepeatableToolInput = {
|
|
1205
|
+
action: 'archive';
|
|
1206
|
+
archivedAt?: number;
|
|
1207
|
+
repeatableQuestId: number;
|
|
1208
|
+
} | {
|
|
1209
|
+
action: 'create';
|
|
1210
|
+
repeatableQuest: CreateRepeatableQuestInput;
|
|
1211
|
+
} | {
|
|
1212
|
+
action: 'preview_due';
|
|
1213
|
+
now?: number;
|
|
1214
|
+
} | {
|
|
1215
|
+
action: 'spawn_due';
|
|
1216
|
+
now: number;
|
|
1217
|
+
} | ({
|
|
1218
|
+
action: 'update';
|
|
1219
|
+
repeatableQuestId: number;
|
|
1220
|
+
} & UpdateRepeatableQuestInput);
|
|
1221
|
+
interface ManageRepeatableToolData {
|
|
1222
|
+
action: ManageRepeatableToolInput['action'];
|
|
1223
|
+
primary?: ToolEntityRef | undefined;
|
|
1224
|
+
created?: ToolEntityRef[] | undefined;
|
|
1225
|
+
updated?: ToolEntityRef[] | undefined;
|
|
1226
|
+
items?: ToolListItem[] | undefined;
|
|
1227
|
+
repeatableQuest?: ReturnType<typeof getRepeatableQuestOrThrow> | undefined;
|
|
1228
|
+
spawnedQuests?: Array<ReturnType<typeof getQuestDetail>> | undefined;
|
|
1229
|
+
}
|
|
1230
|
+
type ManageRepeatableToolResult = ToolResult<ManageRepeatableToolData>;
|
|
1231
|
+
declare function manageRepeatableToolHandler(db: Parameters<typeof createRepeatableQuest>[0], input: ManageRepeatableToolInput): ManageRepeatableToolResult;
|
|
1232
|
+
declare const manageRepeatableTool: QuestlogToolDefinition<ManageRepeatableToolInput, ManageRepeatableToolResult>;
|
|
1233
|
+
|
|
1234
|
+
type OrganizeWorkToolInput = {
|
|
1235
|
+
action: 'add_unlock';
|
|
1236
|
+
fromQuestId: number;
|
|
1237
|
+
now?: number;
|
|
1238
|
+
toQuestId: number;
|
|
1239
|
+
} | {
|
|
1240
|
+
action: 'archive_questline';
|
|
1241
|
+
archivedAt?: number;
|
|
1242
|
+
questlineId: number;
|
|
1243
|
+
} | {
|
|
1244
|
+
action: 'remove_unlock';
|
|
1245
|
+
fromQuestId: number;
|
|
1246
|
+
now?: number;
|
|
1247
|
+
toQuestId: number;
|
|
1248
|
+
} | {
|
|
1249
|
+
action: 'replace_unlocks';
|
|
1250
|
+
fromQuestIds: number[];
|
|
1251
|
+
now?: number;
|
|
1252
|
+
toQuestId: number;
|
|
1253
|
+
} | ({
|
|
1254
|
+
action: 'set_questline_fields';
|
|
1255
|
+
questlineId: number;
|
|
1256
|
+
} & UpdateQuestlineInput);
|
|
1257
|
+
interface OrganizeWorkToolData {
|
|
1258
|
+
action: OrganizeWorkToolInput['action'];
|
|
1259
|
+
quest?: ReturnType<typeof getQuestDetail>;
|
|
1260
|
+
questline?: ReturnType<typeof getQuestlineDetail>;
|
|
1261
|
+
}
|
|
1262
|
+
type OrganizeWorkToolResult = ToolResult<OrganizeWorkToolData>;
|
|
1263
|
+
declare function organizeWorkToolHandler(db: Parameters<typeof getQuestlineDetail>[0], input: OrganizeWorkToolInput): OrganizeWorkToolResult;
|
|
1264
|
+
declare const organizeWorkTool: QuestlogToolDefinition<OrganizeWorkToolInput, OrganizeWorkToolResult>;
|
|
1265
|
+
|
|
1266
|
+
type PlanQuestToolInput = {
|
|
1267
|
+
action: 'revise_objective';
|
|
1268
|
+
now?: number;
|
|
1269
|
+
objective: string;
|
|
1270
|
+
questId: number;
|
|
1271
|
+
} | ({
|
|
1272
|
+
action: 'set_time';
|
|
1273
|
+
questId: number;
|
|
1274
|
+
} & PlanQuestTimeInput);
|
|
1275
|
+
interface PlanQuestToolData {
|
|
1276
|
+
action: PlanQuestToolInput['action'];
|
|
1277
|
+
quest: ReturnType<typeof getQuestDetail>;
|
|
1278
|
+
}
|
|
1279
|
+
type PlanQuestToolResult = ToolResult<PlanQuestToolData>;
|
|
1280
|
+
declare function planQuestToolHandler(db: Parameters<typeof getQuestDetail>[0], input: PlanQuestToolInput): PlanQuestToolResult;
|
|
1281
|
+
declare const planQuestTool: QuestlogToolDefinition<PlanQuestToolInput, PlanQuestToolResult>;
|
|
1282
|
+
|
|
1283
|
+
interface RetireWorkToolInput {
|
|
1284
|
+
action: 'hide';
|
|
1285
|
+
deletedAt?: number;
|
|
1286
|
+
target: {
|
|
1287
|
+
id: number;
|
|
1288
|
+
kind: 'quest';
|
|
1289
|
+
} | {
|
|
1290
|
+
id: number;
|
|
1291
|
+
kind: 'questline';
|
|
1292
|
+
} | {
|
|
1293
|
+
id: number;
|
|
1294
|
+
kind: 'repeatable_quest';
|
|
1295
|
+
} | {
|
|
1296
|
+
id: number;
|
|
1297
|
+
kind: 'rumor';
|
|
1298
|
+
};
|
|
1299
|
+
}
|
|
1300
|
+
interface RetireWorkToolData {
|
|
1301
|
+
action: 'hide';
|
|
1302
|
+
target: RetireWorkToolInput['target'];
|
|
1303
|
+
}
|
|
1304
|
+
type RetireWorkToolResult = ToolResult<RetireWorkToolData>;
|
|
1305
|
+
declare function retireWorkToolHandler(db: QuestlogDb, input: RetireWorkToolInput): RetireWorkToolResult;
|
|
1306
|
+
declare const retireWorkTool: QuestlogToolDefinition<RetireWorkToolInput, RetireWorkToolResult>;
|
|
1307
|
+
|
|
1308
|
+
type ReviewQuestlogToolView = 'questlines' | 'quests.active' | 'quests.available' | 'quests.blocked' | 'quests.deferred' | 'quests.due_soon' | 'quests.in_progress' | 'quests.missed_scheduled' | 'quests.open' | 'quests.overdue' | 'quests.resolved' | 'quests.scheduled_for_day' | 'quests.scheduled_now' | 'repeatables.due_anchors' | 'rumors';
|
|
1309
|
+
interface ReviewQuestlogToolInput {
|
|
1310
|
+
view: ReviewQuestlogToolView;
|
|
1311
|
+
filters?: {
|
|
1312
|
+
questlineId?: number;
|
|
1313
|
+
tagNames?: string[];
|
|
1314
|
+
includeDeleted?: boolean;
|
|
1315
|
+
dayAt?: number;
|
|
1316
|
+
};
|
|
1317
|
+
now?: number;
|
|
1318
|
+
}
|
|
1319
|
+
interface ReviewQuestlogToolData {
|
|
1320
|
+
view: ReviewQuestlogToolView;
|
|
1321
|
+
items: ToolListItem[];
|
|
1322
|
+
count: number;
|
|
1323
|
+
appliedFilters: ReviewQuestlogToolInput['filters'] | undefined;
|
|
1324
|
+
evaluatedAt: number;
|
|
1325
|
+
}
|
|
1326
|
+
type ReviewQuestlogToolResult = ToolResult<ReviewQuestlogToolData>;
|
|
1327
|
+
declare function reviewQuestlogToolHandler(db: Parameters<typeof listRumors>[0], input: ReviewQuestlogToolInput): ReviewQuestlogToolResult;
|
|
1328
|
+
declare const reviewQuestlogTool: QuestlogToolDefinition<ReviewQuestlogToolInput, ReviewQuestlogToolResult>;
|
|
1329
|
+
|
|
1330
|
+
/**
|
|
1331
|
+
* Loads a single active quest reward or throws.
|
|
1332
|
+
*/
|
|
1333
|
+
declare function getQuestRewardOrThrow(db: QuestlogDb, rewardId: number): QuestReward;
|
|
1334
|
+
|
|
1335
|
+
type RewardWorkToolInput = {
|
|
1336
|
+
action: 'add';
|
|
1337
|
+
reward: QuestRewardInput;
|
|
1338
|
+
target: {
|
|
1339
|
+
id: number;
|
|
1340
|
+
kind: 'quest';
|
|
1341
|
+
};
|
|
1342
|
+
} | {
|
|
1343
|
+
action: 'claim';
|
|
1344
|
+
claimedAt?: number;
|
|
1345
|
+
target: {
|
|
1346
|
+
id: number;
|
|
1347
|
+
kind: 'reward';
|
|
1348
|
+
};
|
|
1349
|
+
} | {
|
|
1350
|
+
action: 'remove';
|
|
1351
|
+
now?: number;
|
|
1352
|
+
target: {
|
|
1353
|
+
id: number;
|
|
1354
|
+
kind: 'reward';
|
|
1355
|
+
};
|
|
1356
|
+
} | {
|
|
1357
|
+
action: 'replace_repeatable_template';
|
|
1358
|
+
now?: number;
|
|
1359
|
+
rewards: RepeatableQuestRewardInput[];
|
|
1360
|
+
target: {
|
|
1361
|
+
id: number;
|
|
1362
|
+
kind: 'repeatable_quest';
|
|
1363
|
+
};
|
|
1364
|
+
} | {
|
|
1365
|
+
action: 'update';
|
|
1366
|
+
reward: Omit<QuestRewardInput, 'now'> & {
|
|
1367
|
+
now?: number;
|
|
1368
|
+
};
|
|
1369
|
+
target: {
|
|
1370
|
+
id: number;
|
|
1371
|
+
kind: 'reward';
|
|
1372
|
+
};
|
|
1373
|
+
};
|
|
1374
|
+
interface RewardWorkToolData {
|
|
1375
|
+
action: RewardWorkToolInput['action'];
|
|
1376
|
+
reward?: ReturnType<typeof getQuestRewardOrThrow> | undefined;
|
|
1377
|
+
rewards?: Array<ReturnType<typeof getQuestRewardOrThrow>> | undefined;
|
|
1378
|
+
target: RewardWorkToolInput['target'];
|
|
1379
|
+
}
|
|
1380
|
+
type RewardWorkToolResult = ToolResult<RewardWorkToolData>;
|
|
1381
|
+
declare function rewardWorkToolHandler(db: QuestlogDb, input: RewardWorkToolInput): RewardWorkToolResult;
|
|
1382
|
+
declare const rewardWorkTool: QuestlogToolDefinition<RewardWorkToolInput, RewardWorkToolResult>;
|
|
1383
|
+
|
|
1384
|
+
type RunQuestToolInput = {
|
|
1385
|
+
action: 'abandon';
|
|
1386
|
+
outcome: string;
|
|
1387
|
+
questId: number;
|
|
1388
|
+
resolvedAt?: number;
|
|
1389
|
+
} | {
|
|
1390
|
+
action: 'abandon_and_spawn_followups';
|
|
1391
|
+
followups: FollowupQuestInput[];
|
|
1392
|
+
outcome: string;
|
|
1393
|
+
questId: number;
|
|
1394
|
+
resolvedAt?: number;
|
|
1395
|
+
} | {
|
|
1396
|
+
action: 'finish';
|
|
1397
|
+
outcome: string;
|
|
1398
|
+
questId: number;
|
|
1399
|
+
resolvedAt?: number;
|
|
1400
|
+
} | {
|
|
1401
|
+
action: 'log_effort';
|
|
1402
|
+
effortSeconds: number;
|
|
1403
|
+
now?: number;
|
|
1404
|
+
questId: number;
|
|
1405
|
+
} | {
|
|
1406
|
+
action: 'start';
|
|
1407
|
+
questId: number;
|
|
1408
|
+
startedAt?: number;
|
|
1409
|
+
};
|
|
1410
|
+
interface RunQuestToolData {
|
|
1411
|
+
action: RunQuestToolInput['action'];
|
|
1412
|
+
primary: ToolEntityRef;
|
|
1413
|
+
created?: ToolEntityRef[] | undefined;
|
|
1414
|
+
updated?: ToolEntityRef[] | undefined;
|
|
1415
|
+
followupQuests?: Array<ReturnType<typeof getQuestDetail>> | undefined;
|
|
1416
|
+
quest: ReturnType<typeof getQuestDetail>;
|
|
1417
|
+
}
|
|
1418
|
+
type RunQuestToolResult = ToolResult<RunQuestToolData>;
|
|
1419
|
+
declare function runQuestToolHandler(db: Parameters<typeof getQuestDetail>[0], input: RunQuestToolInput): RunQuestToolResult;
|
|
1420
|
+
declare const runQuestTool: QuestlogToolDefinition<RunQuestToolInput, RunQuestToolResult>;
|
|
1421
|
+
|
|
1422
|
+
interface SearchQuestlogToolInput {
|
|
1423
|
+
query: string;
|
|
1424
|
+
limit?: number;
|
|
1425
|
+
kinds?: Array<'quest' | 'rumor'>;
|
|
1426
|
+
mode?: 'browse' | 'identify_one';
|
|
1427
|
+
}
|
|
1428
|
+
interface SearchQuestlogToolData {
|
|
1429
|
+
items: ToolListItem[];
|
|
1430
|
+
returnedCount: number;
|
|
1431
|
+
totalCount: number;
|
|
1432
|
+
appliedKinds?: Array<'quest' | 'rumor'> | undefined;
|
|
1433
|
+
mode: 'browse' | 'identify_one';
|
|
1434
|
+
}
|
|
1435
|
+
type SearchQuestlogToolResult = ToolResult<SearchQuestlogToolData>;
|
|
1436
|
+
declare function searchQuestlogToolHandler(db: Parameters<typeof searchQuestlog>[0], input: SearchQuestlogToolInput): SearchQuestlogToolResult;
|
|
1437
|
+
declare const searchQuestlogTool: QuestlogToolDefinition<SearchQuestlogToolInput, SearchQuestlogToolResult>;
|
|
1438
|
+
|
|
1439
|
+
type ShapeWorkToolInput = {
|
|
1440
|
+
action: 'attach_quest_to_questline';
|
|
1441
|
+
now?: number;
|
|
1442
|
+
questId: number;
|
|
1443
|
+
questlineId: number;
|
|
1444
|
+
} | {
|
|
1445
|
+
action: 'create_quest';
|
|
1446
|
+
quest: CreateQuestInput;
|
|
1447
|
+
} | {
|
|
1448
|
+
action: 'create_questline';
|
|
1449
|
+
questline: CreateQuestlineInput;
|
|
1450
|
+
} | {
|
|
1451
|
+
action: 'detach_quest_from_questline';
|
|
1452
|
+
now?: number;
|
|
1453
|
+
questId: number;
|
|
1454
|
+
} | {
|
|
1455
|
+
action: 'dismiss_rumor';
|
|
1456
|
+
dismissedAt?: number;
|
|
1457
|
+
rumorId: number;
|
|
1458
|
+
} | {
|
|
1459
|
+
action: 'reopen_rumor';
|
|
1460
|
+
now?: number;
|
|
1461
|
+
rumorId: number;
|
|
1462
|
+
} | ({
|
|
1463
|
+
action: 'settle_rumor';
|
|
1464
|
+
rumorId: number;
|
|
1465
|
+
} & SettleRumorInput);
|
|
1466
|
+
interface ShapeWorkToolData {
|
|
1467
|
+
action: ShapeWorkToolInput['action'];
|
|
1468
|
+
primary?: ToolEntityRef | undefined;
|
|
1469
|
+
created?: ToolEntityRef[] | undefined;
|
|
1470
|
+
updated?: ToolEntityRef[] | undefined;
|
|
1471
|
+
quest?: ReturnType<typeof getQuestDetail> | undefined;
|
|
1472
|
+
questline?: ReturnType<typeof getQuestlineDetail> | undefined;
|
|
1473
|
+
quests?: Array<ReturnType<typeof getQuestDetail>> | undefined;
|
|
1474
|
+
rumor?: ReturnType<typeof getRumorDetail> | undefined;
|
|
1475
|
+
}
|
|
1476
|
+
type ShapeWorkToolResult = ToolResult<ShapeWorkToolData>;
|
|
1477
|
+
declare function shapeWorkToolHandler(db: Parameters<typeof createQuest>[0], input: ShapeWorkToolInput): ShapeWorkToolResult;
|
|
1478
|
+
declare const shapeWorkTool: QuestlogToolDefinition<ShapeWorkToolInput, ShapeWorkToolResult>;
|
|
1479
|
+
|
|
1480
|
+
type TagWorkToolInput = {
|
|
1481
|
+
action: 'add';
|
|
1482
|
+
now?: number;
|
|
1483
|
+
tagNames: string[];
|
|
1484
|
+
target: {
|
|
1485
|
+
id: number;
|
|
1486
|
+
kind: 'quest';
|
|
1487
|
+
};
|
|
1488
|
+
} | {
|
|
1489
|
+
action: 'remove';
|
|
1490
|
+
now?: number;
|
|
1491
|
+
tagNames: string[];
|
|
1492
|
+
target: {
|
|
1493
|
+
id: number;
|
|
1494
|
+
kind: 'quest';
|
|
1495
|
+
};
|
|
1496
|
+
} | {
|
|
1497
|
+
action: 'replace';
|
|
1498
|
+
now?: number;
|
|
1499
|
+
tagNames: string[];
|
|
1500
|
+
target: {
|
|
1501
|
+
id: number;
|
|
1502
|
+
kind: 'quest' | 'repeatable_quest';
|
|
1503
|
+
};
|
|
1504
|
+
};
|
|
1505
|
+
interface TagWorkToolData {
|
|
1506
|
+
action: TagWorkToolInput['action'];
|
|
1507
|
+
tagNames: string[];
|
|
1508
|
+
target: TagWorkToolInput['target'];
|
|
1509
|
+
}
|
|
1510
|
+
type TagWorkToolResult = ToolResult<TagWorkToolData>;
|
|
1511
|
+
declare function tagWorkToolHandler(db: QuestlogDb, input: TagWorkToolInput): TagWorkToolResult;
|
|
1512
|
+
declare const tagWorkTool: QuestlogToolDefinition<TagWorkToolInput, TagWorkToolResult>;
|
|
1513
|
+
|
|
1514
|
+
interface QuestlogToolMapping {
|
|
1515
|
+
source: string;
|
|
1516
|
+
tool: string;
|
|
1517
|
+
action?: string;
|
|
1518
|
+
notes?: string;
|
|
1519
|
+
}
|
|
1520
|
+
declare const questlogToolMappings: QuestlogToolMapping[];
|
|
1521
|
+
|
|
1522
|
+
declare const searchQuestlogToolName = "search_questlog";
|
|
1523
|
+
declare const reviewQuestlogToolName = "review_questlog";
|
|
1524
|
+
declare const inspectQuestlogItemToolName = "inspect_questlog_item";
|
|
1525
|
+
declare const captureRumorToolName = "capture_rumor";
|
|
1526
|
+
declare const shapeWorkToolName = "shape_work";
|
|
1527
|
+
declare const planQuestToolName = "plan_quest";
|
|
1528
|
+
declare const runQuestToolName = "run_quest";
|
|
1529
|
+
declare const organizeWorkToolName = "organize_work";
|
|
1530
|
+
declare const manageRepeatableToolName = "manage_repeatable";
|
|
1531
|
+
declare const tagWorkToolName = "tag_work";
|
|
1532
|
+
declare const rewardWorkToolName = "reward_work";
|
|
1533
|
+
declare const retireWorkToolName = "retire_work";
|
|
1534
|
+
|
|
1535
|
+
declare const questlogTools: (QuestlogToolDefinition<CaptureRumorInput, CaptureRumorToolResult> | QuestlogToolDefinition<InspectQuestlogItemToolInput, InspectQuestlogItemToolResult> | QuestlogToolDefinition<ManageRepeatableToolInput, ManageRepeatableToolResult> | QuestlogToolDefinition<OrganizeWorkToolInput, OrganizeWorkToolResult> | QuestlogToolDefinition<PlanQuestToolInput, PlanQuestToolResult> | QuestlogToolDefinition<RetireWorkToolInput, RetireWorkToolResult> | QuestlogToolDefinition<ReviewQuestlogToolInput, ReviewQuestlogToolResult> | QuestlogToolDefinition<RewardWorkToolInput, RewardWorkToolResult> | QuestlogToolDefinition<RunQuestToolInput, RunQuestToolResult> | QuestlogToolDefinition<SearchQuestlogToolInput, SearchQuestlogToolResult> | QuestlogToolDefinition<ShapeWorkToolInput, ShapeWorkToolResult> | QuestlogToolDefinition<TagWorkToolInput, TagWorkToolResult>)[];
|
|
1536
|
+
declare function listQuestlogToolDefinitions(): (QuestlogToolDefinition<CaptureRumorInput, CaptureRumorToolResult> | QuestlogToolDefinition<InspectQuestlogItemToolInput, InspectQuestlogItemToolResult> | QuestlogToolDefinition<ManageRepeatableToolInput, ManageRepeatableToolResult> | QuestlogToolDefinition<OrganizeWorkToolInput, OrganizeWorkToolResult> | QuestlogToolDefinition<PlanQuestToolInput, PlanQuestToolResult> | QuestlogToolDefinition<RetireWorkToolInput, RetireWorkToolResult> | QuestlogToolDefinition<ReviewQuestlogToolInput, ReviewQuestlogToolResult> | QuestlogToolDefinition<RewardWorkToolInput, RewardWorkToolResult> | QuestlogToolDefinition<RunQuestToolInput, RunQuestToolResult> | QuestlogToolDefinition<SearchQuestlogToolInput, SearchQuestlogToolResult> | QuestlogToolDefinition<ShapeWorkToolInput, ShapeWorkToolResult> | QuestlogToolDefinition<TagWorkToolInput, TagWorkToolResult>)[];
|
|
1537
|
+
declare function getQuestlogToolByName(name: string): QuestlogToolDefinition<CaptureRumorInput, CaptureRumorToolResult> | QuestlogToolDefinition<InspectQuestlogItemToolInput, InspectQuestlogItemToolResult> | QuestlogToolDefinition<ManageRepeatableToolInput, ManageRepeatableToolResult> | QuestlogToolDefinition<OrganizeWorkToolInput, OrganizeWorkToolResult> | QuestlogToolDefinition<PlanQuestToolInput, PlanQuestToolResult> | QuestlogToolDefinition<RetireWorkToolInput, RetireWorkToolResult> | QuestlogToolDefinition<ReviewQuestlogToolInput, ReviewQuestlogToolResult> | QuestlogToolDefinition<RewardWorkToolInput, RewardWorkToolResult> | QuestlogToolDefinition<RunQuestToolInput, RunQuestToolResult> | QuestlogToolDefinition<SearchQuestlogToolInput, SearchQuestlogToolResult> | QuestlogToolDefinition<ShapeWorkToolInput, ShapeWorkToolResult> | QuestlogToolDefinition<TagWorkToolInput, TagWorkToolResult> | null;
|
|
1538
|
+
|
|
1539
|
+
type index_JsonSchema = JsonSchema;
|
|
1540
|
+
type index_JsonSchemaType = JsonSchemaType;
|
|
1541
|
+
type index_QuestlogToolDefinition<TInput, TResult extends ToolResult<unknown>> = QuestlogToolDefinition<TInput, TResult>;
|
|
1542
|
+
type index_QuestlogToolMapping = QuestlogToolMapping;
|
|
1543
|
+
type index_ToolClarificationCode = ToolClarificationCode;
|
|
1544
|
+
type index_ToolDefinitionRegistry = ToolDefinitionRegistry;
|
|
1545
|
+
type index_ToolEntityKind = ToolEntityKind;
|
|
1546
|
+
type index_ToolEntityRef = ToolEntityRef;
|
|
1547
|
+
type index_ToolErrorCode = ToolErrorCode;
|
|
1548
|
+
type index_ToolErrorKind = ToolErrorKind;
|
|
1549
|
+
type index_ToolFailure = ToolFailure;
|
|
1550
|
+
type index_ToolInputDescriptions = ToolInputDescriptions;
|
|
1551
|
+
type index_ToolListItem = ToolListItem;
|
|
1552
|
+
type index_ToolNeedsClarification = ToolNeedsClarification;
|
|
1553
|
+
type index_ToolNextStepHint = ToolNextStepHint;
|
|
1554
|
+
type index_ToolNextStepHintKind = ToolNextStepHintKind;
|
|
1555
|
+
type index_ToolOutcomeKind = ToolOutcomeKind;
|
|
1556
|
+
type index_ToolOutputDescription = ToolOutputDescription;
|
|
1557
|
+
type index_ToolResult<TData> = ToolResult<TData>;
|
|
1558
|
+
type index_ToolSideEffects = ToolSideEffects;
|
|
1559
|
+
type index_ToolSuccess<TData> = ToolSuccess<TData>;
|
|
1560
|
+
type index_ToolWarning = ToolWarning;
|
|
1561
|
+
type index_ToolWarningCode = ToolWarningCode;
|
|
1562
|
+
declare const index_arraySchema: typeof arraySchema;
|
|
1563
|
+
declare const index_booleanSchema: typeof booleanSchema;
|
|
1564
|
+
declare const index_captureRumorTool: typeof captureRumorTool;
|
|
1565
|
+
declare const index_captureRumorToolHandler: typeof captureRumorToolHandler;
|
|
1566
|
+
declare const index_captureRumorToolName: typeof captureRumorToolName;
|
|
1567
|
+
declare const index_defineQuestlogTool: typeof defineQuestlogTool;
|
|
1568
|
+
declare const index_enumSchema: typeof enumSchema;
|
|
1569
|
+
declare const index_getQuestlogToolByName: typeof getQuestlogToolByName;
|
|
1570
|
+
declare const index_inspectQuestlogItemTool: typeof inspectQuestlogItemTool;
|
|
1571
|
+
declare const index_inspectQuestlogItemToolHandler: typeof inspectQuestlogItemToolHandler;
|
|
1572
|
+
declare const index_inspectQuestlogItemToolName: typeof inspectQuestlogItemToolName;
|
|
1573
|
+
declare const index_integerSchema: typeof integerSchema;
|
|
1574
|
+
declare const index_listQuestlogToolDefinitions: typeof listQuestlogToolDefinitions;
|
|
1575
|
+
declare const index_literalSchema: typeof literalSchema;
|
|
1576
|
+
declare const index_manageRepeatableTool: typeof manageRepeatableTool;
|
|
1577
|
+
declare const index_manageRepeatableToolHandler: typeof manageRepeatableToolHandler;
|
|
1578
|
+
declare const index_manageRepeatableToolName: typeof manageRepeatableToolName;
|
|
1579
|
+
declare const index_numberSchema: typeof numberSchema;
|
|
1580
|
+
declare const index_objectSchema: typeof objectSchema;
|
|
1581
|
+
declare const index_oneOfSchema: typeof oneOfSchema;
|
|
1582
|
+
declare const index_organizeWorkTool: typeof organizeWorkTool;
|
|
1583
|
+
declare const index_organizeWorkToolHandler: typeof organizeWorkToolHandler;
|
|
1584
|
+
declare const index_organizeWorkToolName: typeof organizeWorkToolName;
|
|
1585
|
+
declare const index_planQuestTool: typeof planQuestTool;
|
|
1586
|
+
declare const index_planQuestToolHandler: typeof planQuestToolHandler;
|
|
1587
|
+
declare const index_planQuestToolName: typeof planQuestToolName;
|
|
1588
|
+
declare const index_questlogToolMappings: typeof questlogToolMappings;
|
|
1589
|
+
declare const index_questlogTools: typeof questlogTools;
|
|
1590
|
+
declare const index_retireWorkTool: typeof retireWorkTool;
|
|
1591
|
+
declare const index_retireWorkToolHandler: typeof retireWorkToolHandler;
|
|
1592
|
+
declare const index_retireWorkToolName: typeof retireWorkToolName;
|
|
1593
|
+
declare const index_reviewQuestlogTool: typeof reviewQuestlogTool;
|
|
1594
|
+
declare const index_reviewQuestlogToolHandler: typeof reviewQuestlogToolHandler;
|
|
1595
|
+
declare const index_reviewQuestlogToolName: typeof reviewQuestlogToolName;
|
|
1596
|
+
declare const index_rewardWorkTool: typeof rewardWorkTool;
|
|
1597
|
+
declare const index_rewardWorkToolHandler: typeof rewardWorkToolHandler;
|
|
1598
|
+
declare const index_rewardWorkToolName: typeof rewardWorkToolName;
|
|
1599
|
+
declare const index_runQuestTool: typeof runQuestTool;
|
|
1600
|
+
declare const index_runQuestToolHandler: typeof runQuestToolHandler;
|
|
1601
|
+
declare const index_runQuestToolName: typeof runQuestToolName;
|
|
1602
|
+
declare const index_searchQuestlogTool: typeof searchQuestlogTool;
|
|
1603
|
+
declare const index_searchQuestlogToolHandler: typeof searchQuestlogToolHandler;
|
|
1604
|
+
declare const index_searchQuestlogToolName: typeof searchQuestlogToolName;
|
|
1605
|
+
declare const index_shapeWorkTool: typeof shapeWorkTool;
|
|
1606
|
+
declare const index_shapeWorkToolHandler: typeof shapeWorkToolHandler;
|
|
1607
|
+
declare const index_shapeWorkToolName: typeof shapeWorkToolName;
|
|
1608
|
+
declare const index_stringSchema: typeof stringSchema;
|
|
1609
|
+
declare const index_tagWorkTool: typeof tagWorkTool;
|
|
1610
|
+
declare const index_tagWorkToolHandler: typeof tagWorkToolHandler;
|
|
1611
|
+
declare const index_tagWorkToolName: typeof tagWorkToolName;
|
|
1612
|
+
declare const index_toolFailure: typeof toolFailure;
|
|
1613
|
+
declare const index_toolNeedsClarification: typeof toolNeedsClarification;
|
|
1614
|
+
declare const index_toolNoOp: typeof toolNoOp;
|
|
1615
|
+
declare const index_toolSuccess: typeof toolSuccess;
|
|
1616
|
+
declare const index_toolWarning: typeof toolWarning;
|
|
1617
|
+
declare namespace index {
|
|
1618
|
+
export { type index_JsonSchema as JsonSchema, type index_JsonSchemaType as JsonSchemaType, type index_QuestlogToolDefinition as QuestlogToolDefinition, type index_QuestlogToolMapping as QuestlogToolMapping, type index_ToolClarificationCode as ToolClarificationCode, type index_ToolDefinitionRegistry as ToolDefinitionRegistry, type index_ToolEntityKind as ToolEntityKind, type index_ToolEntityRef as ToolEntityRef, type index_ToolErrorCode as ToolErrorCode, type index_ToolErrorKind as ToolErrorKind, type index_ToolFailure as ToolFailure, type index_ToolInputDescriptions as ToolInputDescriptions, type index_ToolListItem as ToolListItem, type index_ToolNeedsClarification as ToolNeedsClarification, type index_ToolNextStepHint as ToolNextStepHint, type index_ToolNextStepHintKind as ToolNextStepHintKind, type index_ToolOutcomeKind as ToolOutcomeKind, type index_ToolOutputDescription as ToolOutputDescription, type index_ToolResult as ToolResult, type index_ToolSideEffects as ToolSideEffects, type index_ToolSuccess as ToolSuccess, type index_ToolWarning as ToolWarning, type index_ToolWarningCode as ToolWarningCode, index_arraySchema as arraySchema, index_booleanSchema as booleanSchema, index_captureRumorTool as captureRumorTool, index_captureRumorToolHandler as captureRumorToolHandler, index_captureRumorToolName as captureRumorToolName, index_defineQuestlogTool as defineQuestlogTool, index_enumSchema as enumSchema, index_getQuestlogToolByName as getQuestlogToolByName, index_inspectQuestlogItemTool as inspectQuestlogItemTool, index_inspectQuestlogItemToolHandler as inspectQuestlogItemToolHandler, index_inspectQuestlogItemToolName as inspectQuestlogItemToolName, index_integerSchema as integerSchema, index_listQuestlogToolDefinitions as listQuestlogToolDefinitions, index_literalSchema as literalSchema, index_manageRepeatableTool as manageRepeatableTool, index_manageRepeatableToolHandler as manageRepeatableToolHandler, index_manageRepeatableToolName as manageRepeatableToolName, index_numberSchema as numberSchema, index_objectSchema as objectSchema, index_oneOfSchema as oneOfSchema, index_organizeWorkTool as organizeWorkTool, index_organizeWorkToolHandler as organizeWorkToolHandler, index_organizeWorkToolName as organizeWorkToolName, index_planQuestTool as planQuestTool, index_planQuestToolHandler as planQuestToolHandler, index_planQuestToolName as planQuestToolName, index_questlogToolMappings as questlogToolMappings, index_questlogTools as questlogTools, index_retireWorkTool as retireWorkTool, index_retireWorkToolHandler as retireWorkToolHandler, index_retireWorkToolName as retireWorkToolName, index_reviewQuestlogTool as reviewQuestlogTool, index_reviewQuestlogToolHandler as reviewQuestlogToolHandler, index_reviewQuestlogToolName as reviewQuestlogToolName, index_rewardWorkTool as rewardWorkTool, index_rewardWorkToolHandler as rewardWorkToolHandler, index_rewardWorkToolName as rewardWorkToolName, index_runQuestTool as runQuestTool, index_runQuestToolHandler as runQuestToolHandler, index_runQuestToolName as runQuestToolName, index_searchQuestlogTool as searchQuestlogTool, index_searchQuestlogToolHandler as searchQuestlogToolHandler, index_searchQuestlogToolName as searchQuestlogToolName, index_shapeWorkTool as shapeWorkTool, index_shapeWorkToolHandler as shapeWorkToolHandler, index_shapeWorkToolName as shapeWorkToolName, index_stringSchema as stringSchema, index_tagWorkTool as tagWorkTool, index_tagWorkToolHandler as tagWorkToolHandler, index_tagWorkToolName as tagWorkToolName, index_toolFailure as toolFailure, index_toolNeedsClarification as toolNeedsClarification, index_toolNoOp as toolNoOp, index_toolSuccess as toolSuccess, index_toolWarning as toolWarning };
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* Adds a hard prerequisite relation between two quests.
|
|
1623
|
+
*/
|
|
1624
|
+
declare function addUnlock(db: QuestlogDb, fromQuestId: number, toQuestId: number, now?: number): void;
|
|
1625
|
+
|
|
1626
|
+
/**
|
|
1627
|
+
* Removes an active unlock relation.
|
|
1628
|
+
*/
|
|
1629
|
+
declare function removeUnlock(db: QuestlogDb, fromQuestId: number, toQuestId: number, now?: number): void;
|
|
1630
|
+
|
|
1631
|
+
/**
|
|
1632
|
+
* Replaces the active prerequisites for a target quest.
|
|
1633
|
+
*/
|
|
1634
|
+
declare function replaceUnlocks(db: QuestlogDb, toQuestId: number, fromQuestIds: number[], now?: number): void;
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* A hard prerequisite relation where one quest must resolve successfully before another becomes available.
|
|
1638
|
+
*/
|
|
1639
|
+
interface QuestUnlock {
|
|
1640
|
+
id: number;
|
|
1641
|
+
fromQuestId: number;
|
|
1642
|
+
toQuestId: number;
|
|
1643
|
+
createdAt: number;
|
|
1644
|
+
deletedAt: number | null;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
declare const write_abandonQuest: typeof abandonQuest;
|
|
1648
|
+
declare const write_abandonQuestAndSpawnFollowups: typeof abandonQuestAndSpawnFollowups;
|
|
1649
|
+
declare const write_addQuestReward: typeof addQuestReward;
|
|
1650
|
+
declare const write_addUnlock: typeof addUnlock;
|
|
1651
|
+
declare const write_archiveQuestline: typeof archiveQuestline;
|
|
1652
|
+
declare const write_archiveRepeatableQuest: typeof archiveRepeatableQuest;
|
|
1653
|
+
declare const write_captureRumor: typeof captureRumor;
|
|
1654
|
+
declare const write_claimQuestReward: typeof claimQuestReward;
|
|
1655
|
+
declare const write_createQuest: typeof createQuest;
|
|
1656
|
+
declare const write_createQuestline: typeof createQuestline;
|
|
1657
|
+
declare const write_createRepeatableQuest: typeof createRepeatableQuest;
|
|
1658
|
+
declare const write_detachQuestFromQuestline: typeof detachQuestFromQuestline;
|
|
1659
|
+
declare const write_dismissRumor: typeof dismissRumor;
|
|
1660
|
+
declare const write_finishQuest: typeof finishQuest;
|
|
1661
|
+
declare const write_logQuestEffort: typeof logQuestEffort;
|
|
1662
|
+
declare const write_moveQuestToQuestline: typeof moveQuestToQuestline;
|
|
1663
|
+
declare const write_planQuestTime: typeof planQuestTime;
|
|
1664
|
+
declare const write_removeQuestReward: typeof removeQuestReward;
|
|
1665
|
+
declare const write_removeUnlock: typeof removeUnlock;
|
|
1666
|
+
declare const write_reopenRumor: typeof reopenRumor;
|
|
1667
|
+
declare const write_replaceQuestTags: typeof replaceQuestTags;
|
|
1668
|
+
declare const write_replaceRepeatableQuestRewards: typeof replaceRepeatableQuestRewards;
|
|
1669
|
+
declare const write_replaceRepeatableQuestTags: typeof replaceRepeatableQuestTags;
|
|
1670
|
+
declare const write_replaceUnlocks: typeof replaceUnlocks;
|
|
1671
|
+
declare const write_reviseQuestObjective: typeof reviseQuestObjective;
|
|
1672
|
+
declare const write_settleRumor: typeof settleRumor;
|
|
1673
|
+
declare const write_softDeleteQuest: typeof softDeleteQuest;
|
|
1674
|
+
declare const write_softDeleteQuestline: typeof softDeleteQuestline;
|
|
1675
|
+
declare const write_softDeleteRepeatableQuest: typeof softDeleteRepeatableQuest;
|
|
1676
|
+
declare const write_softDeleteRumor: typeof softDeleteRumor;
|
|
1677
|
+
declare const write_spawnDueRepeatableQuests: typeof spawnDueRepeatableQuests;
|
|
1678
|
+
declare const write_startQuest: typeof startQuest;
|
|
1679
|
+
declare const write_tagQuest: typeof tagQuest;
|
|
1680
|
+
declare const write_untagQuest: typeof untagQuest;
|
|
1681
|
+
declare const write_updateQuestReward: typeof updateQuestReward;
|
|
1682
|
+
declare const write_updateQuestline: typeof updateQuestline;
|
|
1683
|
+
declare const write_updateRepeatableQuest: typeof updateRepeatableQuest;
|
|
1684
|
+
declare namespace write {
|
|
1685
|
+
export { write_abandonQuest as abandonQuest, write_abandonQuestAndSpawnFollowups as abandonQuestAndSpawnFollowups, write_addQuestReward as addQuestReward, write_addUnlock as addUnlock, write_archiveQuestline as archiveQuestline, write_archiveRepeatableQuest as archiveRepeatableQuest, write_captureRumor as captureRumor, write_claimQuestReward as claimQuestReward, write_createQuest as createQuest, write_createQuestline as createQuestline, write_createRepeatableQuest as createRepeatableQuest, write_detachQuestFromQuestline as detachQuestFromQuestline, write_dismissRumor as dismissRumor, write_finishQuest as finishQuest, write_logQuestEffort as logQuestEffort, write_moveQuestToQuestline as moveQuestToQuestline, write_planQuestTime as planQuestTime, write_removeQuestReward as removeQuestReward, write_removeUnlock as removeUnlock, write_reopenRumor as reopenRumor, write_replaceQuestTags as replaceQuestTags, write_replaceRepeatableQuestRewards as replaceRepeatableQuestRewards, write_replaceRepeatableQuestTags as replaceRepeatableQuestTags, write_replaceUnlocks as replaceUnlocks, write_reviseQuestObjective as reviseQuestObjective, write_settleRumor as settleRumor, write_softDeleteQuest as softDeleteQuest, write_softDeleteQuestline as softDeleteQuestline, write_softDeleteRepeatableQuest as softDeleteRepeatableQuest, write_softDeleteRumor as softDeleteRumor, write_spawnDueRepeatableQuests as spawnDueRepeatableQuests, write_startQuest as startQuest, write_tagQuest as tagQuest, write_untagQuest as untagQuest, write_updateQuestReward as updateQuestReward, write_updateQuestline as updateQuestline, write_updateRepeatableQuest as updateRepeatableQuest };
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
export { type AbandonQuestResult, type CaptureRumorInput, type CreateQuestInput, type CreateQuestlineInput, type CreateRepeatableQuestInput, type DueRepeatableAnchor, type FollowupQuestInput, type JsonSchema, type JsonSchemaType, type MarkerDefinition, type MarkerId, type PlanQuestTimeInput, type Quest, type QuestDetail, type QuestListFilters, type QuestReward, type QuestRewardInput, type QuestState, type QuestUnlock, type Questline, type QuestlineDetail, type QuestlogDb, type QuestlogSearchResult, type QuestlogSkill, type QuestlogSkillRegistry, type QuestlogSoul, type QuestlogSoulTrait, type QuestlogToolDefinition, type QuestlogToolMapping, type RepeatableQuest, type RepeatableQuestReward, type RepeatableQuestRewardInput, type Rumor, type RumorDetail, type RumorOutput, type RumorState, type SettleRumorInput, type SettleRumorResult, type Tag, type ToolClarificationCode, type ToolDefinitionRegistry, type ToolEntityKind, type ToolEntityRef, type ToolErrorCode, type ToolErrorKind, type ToolFailure, type ToolInputDescriptions, type ToolListItem, type ToolNeedsClarification, type ToolNextStepHint, type ToolNextStepHintKind, type ToolOutcomeKind, type ToolOutputDescription, type ToolResult, type ToolSideEffects, type ToolSuccess, type ToolWarning, type ToolWarningCode, type UpdateQuestlineInput, type UpdateRepeatableQuestInput, abandonQuest, abandonQuestAndSpawnFollowups, addQuestReward, addUnlock, archiveDeleteAndPruneSkill, archiveQuestline, archiveRepeatableQuest, arraySchema, booleanSchema, captureRumor, captureRumorTool, captureRumorToolHandler, captureRumorToolName, chooseWorkShapeSkill, claimQuestReward, clarifyAmbiguousRequestsSkill, closeWorkAndClaimOutcomesSkill, createConcreteQuestSkill, createQuest, createQuestline, createRepeatableQuest, defineQuestlogSkill, defineQuestlogTool, detachQuestFromQuestline, detectSlipsAndStalenessSkill, dismissRumor, enumSchema, escalateAndUnblockSkill, finishQuest, frameInitiativeQuestlineSkill, getQuestDetail, getQuestlineDetail, getQuestlogSkillByName, getQuestlogToolByName, getRumorDetail, getRumorOutputs, handleExceptionsAndWeirdCasesSkill, initQuestlogTables, inspectQuestlogItemTool, inspectQuestlogItemToolHandler, inspectQuestlogItemToolName, intakeTriageSkill, integerSchema, listActiveQuests, listAvailableQuests, listBlockedQuests, listDeferredQuests, listDueRepeatableQuestAnchors, listDueSoonQuests, listInProgressQuests, listMissedScheduledQuests, listOpenQuests, listOverdueQuests, listQuestlines, listQuestlogSkills, listQuestlogToolDefinitions, listResolvedQuests, listRumors, listScheduledForDay, listScheduledNow, literalSchema, logQuestEffort, maintainClearOwnershipSkill, manageApprovalsAndPromisesSkill, manageRepeatableTool, manageRepeatableToolHandler, manageRepeatableToolName, index$2 as markers, moveQuestToQuestline, numberSchema, objectSchema, oneOfSchema, organizeWorkTool, organizeWorkToolHandler, organizeWorkToolName, planQuestTime, planQuestTool, planQuestToolHandler, planQuestToolName, planSuccessorWorkSkill, planTimeCorrectlySkill, prioritizeAcrossStreamsSkill, protectCapacityAndFocusSkill, questlogSkills, questlogToolMappings, questlogTools, read, recoverFromModelingMistakesSkill, removeQuestReward, removeUnlock, reopenRumor, replaceQuestTags, replaceRepeatableQuestRewards, replaceRepeatableQuestTags, replaceUnlocks, reportStatusAndManageExpectationsSkill, retireWorkTool, retireWorkToolHandler, retireWorkToolName, reviewQuestlogTool, reviewQuestlogToolHandler, reviewQuestlogToolName, reviseOrReshapeCommitmentSkill, reviseQuestObjective, rewardWorkTool, rewardWorkToolHandler, rewardWorkToolName, runOperationalReviewSkill, runQuestTool, runQuestToolHandler, runQuestToolName, runRecurringRhythmsSkill, searchAndRetrieveContextSkill, searchQuestlogTool, searchQuestlogToolHandler, searchQuestlogToolName, sequenceWithUnlocksSkill, settleRumor, settleRumorIntoStructureSkill, shapeWorkTool, shapeWorkToolHandler, shapeWorkToolName, index$1 as skills, softDeleteQuest, softDeleteQuestline, softDeleteRepeatableQuest, softDeleteRumor, soul, spawnDueRepeatableQuests, startQuest, stringSchema, tagAndFilterPortfoliosSkill, tagQuest, tagWorkTool, tagWorkToolHandler, tagWorkToolName, toolFailure, toolNeedsClarification, toolNoOp, toolSuccess, toolWarning, index as tools, untagQuest, updateQuestReward, updateQuestline, updateRepeatableQuest, write };
|