@ghostpaw/questlog 0.3.0 → 0.5.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/dist/index.cjs +100 -14
- package/dist/index.d.cts +26 -3
- package/dist/index.d.ts +26 -3
- package/dist/index.js +100 -14
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2002,6 +2002,29 @@ function softDeleteRumor(db, rumorId, now) {
|
|
|
2002
2002
|
).run(deletedAt, deletedAt, rumorId);
|
|
2003
2003
|
}
|
|
2004
2004
|
|
|
2005
|
+
// src/rumors/update_rumor.ts
|
|
2006
|
+
function updateRumor(db, rumorId, input) {
|
|
2007
|
+
if (input.title == null && input.details == null) {
|
|
2008
|
+
throw new Error("At least one of title or details must be provided to update a rumor.");
|
|
2009
|
+
}
|
|
2010
|
+
const current = getRumorOrThrow(db, rumorId);
|
|
2011
|
+
if (current.settledAt != null) {
|
|
2012
|
+
throw new Error(`Rumor ${rumorId} is already settled and cannot be updated.`);
|
|
2013
|
+
}
|
|
2014
|
+
if (current.dismissedAt != null) {
|
|
2015
|
+
throw new Error(`Rumor ${rumorId} is dismissed and cannot be updated. Reopen it first.`);
|
|
2016
|
+
}
|
|
2017
|
+
const now = resolveNow(input.now);
|
|
2018
|
+
const nextTitle = input.title != null ? assertNonEmpty(input.title, "Rumor title") : current.title;
|
|
2019
|
+
const nextDetails = input.details != null ? input.details.trim() || null : current.details;
|
|
2020
|
+
db.prepare(
|
|
2021
|
+
`UPDATE rumors
|
|
2022
|
+
SET title = ?, details = ?, updated_at = ?
|
|
2023
|
+
WHERE id = ? AND deleted_at IS NULL`
|
|
2024
|
+
).run(nextTitle, nextDetails, now, rumorId);
|
|
2025
|
+
return getRumorOrThrow(db, rumorId);
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2005
2028
|
// src/search_questlog.ts
|
|
2006
2029
|
function searchQuestlog(db, query) {
|
|
2007
2030
|
const trimmed = query.trim();
|
|
@@ -5225,6 +5248,27 @@ function shapeWorkToolHandler(db, input) {
|
|
|
5225
5248
|
}
|
|
5226
5249
|
);
|
|
5227
5250
|
}
|
|
5251
|
+
case "update_rumor": {
|
|
5252
|
+
updateRumor(db, input.rumorId, {
|
|
5253
|
+
...input.title != null && { title: input.title },
|
|
5254
|
+
...input.details != null && { details: input.details },
|
|
5255
|
+
...input.now != null && { now: input.now }
|
|
5256
|
+
});
|
|
5257
|
+
const detail = getRumorDetail(db, input.rumorId);
|
|
5258
|
+
return toolSuccess(
|
|
5259
|
+
`Updated rumor \`${detail.title}\`.`,
|
|
5260
|
+
{
|
|
5261
|
+
action: input.action,
|
|
5262
|
+
primary: toRumorRef(detail),
|
|
5263
|
+
updated: [toRumorRef(detail)],
|
|
5264
|
+
rumor: detail
|
|
5265
|
+
},
|
|
5266
|
+
{
|
|
5267
|
+
entities: [toRumorRef(detail)],
|
|
5268
|
+
next: [inspectItemNext(toRumorRef(detail))]
|
|
5269
|
+
}
|
|
5270
|
+
);
|
|
5271
|
+
}
|
|
5228
5272
|
}
|
|
5229
5273
|
} catch (error) {
|
|
5230
5274
|
return translateToolError(error, {
|
|
@@ -5234,8 +5278,8 @@ function shapeWorkToolHandler(db, input) {
|
|
|
5234
5278
|
}
|
|
5235
5279
|
var shapeWorkTool = defineQuestlogTool({
|
|
5236
5280
|
name: shapeWorkToolName,
|
|
5237
|
-
description: "
|
|
5238
|
-
whenToUse: "Use this when deciding what real work exists and how it should be grouped before or around execution.",
|
|
5281
|
+
description: "Create a quest (with timing, tags, and objective in one call), create a questline, settle a rumor into concrete work, or manage quest-questline membership. Use create_quest for clear commitments \u2014 include tags and timing directly to avoid follow-up calls.",
|
|
5282
|
+
whenToUse: "Use this when deciding what real work exists and how it should be grouped before or around execution. Prefer a single create_quest call with all fields over separate create + plan_quest + tag_work calls.",
|
|
5239
5283
|
whenNotToUse: "Do not use this for quest execution steps like starting, finishing, abandoning, or logging effort.",
|
|
5240
5284
|
sideEffects: "writes_state",
|
|
5241
5285
|
readOnly: false,
|
|
@@ -5244,14 +5288,16 @@ var shapeWorkTool = defineQuestlogTool({
|
|
|
5244
5288
|
inputDescriptions: {
|
|
5245
5289
|
action: "Which structure-shaping action to perform, such as settling a rumor, creating a quest, or attaching a quest to a questline.",
|
|
5246
5290
|
rumorId: "The rumor to dismiss, reopen, or settle when the action targets intake.",
|
|
5247
|
-
questline: "Questline creation data used when creating a questline directly or as part of rumor settlement.",
|
|
5248
|
-
quests: "Concrete quest creation inputs
|
|
5291
|
+
questline: "Questline creation data used when creating a questline directly or as part of rumor settlement. Include description for context.",
|
|
5292
|
+
quests: "Concrete quest creation inputs when settling a rumor into real work. Each quest supports the same fields as the quest property \u2014 include timing and tags directly.",
|
|
5249
5293
|
settledAt: "Optional settlement timestamp for rumor settlement.",
|
|
5250
|
-
quest: "Quest creation input
|
|
5294
|
+
quest: "Quest creation input when directly creating one concrete quest. Include timing fields (dueAt, scheduledStartAt, etc.), tags, and rewards to create a fully specified quest in one call.",
|
|
5251
5295
|
questId: "The concrete quest being attached to or detached from a questline.",
|
|
5252
5296
|
questlineId: "The questline that should receive the quest for attach actions.",
|
|
5253
5297
|
dismissedAt: "Optional dismissal timestamp for dismissing a rumor.",
|
|
5254
|
-
now: "Optional timestamp for reopen
|
|
5298
|
+
now: "Optional timestamp for reopen, questline membership, or rumor update.",
|
|
5299
|
+
title: "New title for the update_rumor action.",
|
|
5300
|
+
details: "New or enriched context for the update_rumor action. Append evidence as rumors accumulate information across conversations."
|
|
5255
5301
|
},
|
|
5256
5302
|
outputDescription: "Returns the changed or created rumor, quest, questline, or created quest set for the selected shape-work action, plus purpose-shaped primary and created or updated refs. Repeated safe actions return structured no-op results, and rumor settlement can ask for missing structure instead of failing.",
|
|
5257
5303
|
inputSchema: objectSchema(
|
|
@@ -5263,20 +5309,40 @@ var shapeWorkTool = defineQuestlogTool({
|
|
|
5263
5309
|
"detach_quest_from_questline",
|
|
5264
5310
|
"dismiss_rumor",
|
|
5265
5311
|
"reopen_rumor",
|
|
5266
|
-
"settle_rumor"
|
|
5312
|
+
"settle_rumor",
|
|
5313
|
+
"update_rumor"
|
|
5267
5314
|
]),
|
|
5268
5315
|
questId: integerSchema("Quest to attach or detach."),
|
|
5269
5316
|
questlineId: integerSchema("Questline that should receive the quest."),
|
|
5270
5317
|
quest: objectSchema(
|
|
5271
5318
|
{
|
|
5272
5319
|
title: stringSchema("Title for the new quest."),
|
|
5273
|
-
objective: stringSchema("Objective for the new quest.")
|
|
5320
|
+
objective: stringSchema("Objective for the new quest."),
|
|
5321
|
+
questlineId: integerSchema("Optional questline to place the quest in."),
|
|
5322
|
+
tags: arraySchema(stringSchema("Tag name."), "Optional tags to apply at creation."),
|
|
5323
|
+
rewards: arraySchema(
|
|
5324
|
+
objectSchema(
|
|
5325
|
+
{
|
|
5326
|
+
kind: stringSchema("Reward kind."),
|
|
5327
|
+
name: stringSchema("Reward name.")
|
|
5328
|
+
},
|
|
5329
|
+
["kind", "name"]
|
|
5330
|
+
),
|
|
5331
|
+
"Optional rewards to attach at creation."
|
|
5332
|
+
),
|
|
5333
|
+
dueAt: integerSchema("Optional latest acceptable completion timestamp."),
|
|
5334
|
+
notBeforeAt: integerSchema("Optional earliest actionable timestamp."),
|
|
5335
|
+
scheduledStartAt: integerSchema("Optional planned schedule window start."),
|
|
5336
|
+
scheduledEndAt: integerSchema("Optional planned schedule window end."),
|
|
5337
|
+
allDay: booleanSchema("Whether the scheduled window is all-day."),
|
|
5338
|
+
estimateSeconds: integerSchema("Optional active-effort estimate in seconds.")
|
|
5274
5339
|
},
|
|
5275
5340
|
["title", "objective"]
|
|
5276
5341
|
),
|
|
5277
5342
|
questline: objectSchema(
|
|
5278
5343
|
{
|
|
5279
|
-
title: stringSchema("Questline title.")
|
|
5344
|
+
title: stringSchema("Questline title."),
|
|
5345
|
+
description: stringSchema("Optional questline description.")
|
|
5280
5346
|
},
|
|
5281
5347
|
[]
|
|
5282
5348
|
),
|
|
@@ -5287,16 +5353,35 @@ var shapeWorkTool = defineQuestlogTool({
|
|
|
5287
5353
|
objectSchema(
|
|
5288
5354
|
{
|
|
5289
5355
|
title: stringSchema("Title for a created quest."),
|
|
5290
|
-
objective: stringSchema("Objective for a created quest.")
|
|
5356
|
+
objective: stringSchema("Objective for a created quest."),
|
|
5357
|
+
tags: arraySchema(stringSchema("Tag name."), "Optional tags to apply at creation."),
|
|
5358
|
+
rewards: arraySchema(
|
|
5359
|
+
objectSchema(
|
|
5360
|
+
{
|
|
5361
|
+
kind: stringSchema("Reward kind."),
|
|
5362
|
+
name: stringSchema("Reward name.")
|
|
5363
|
+
},
|
|
5364
|
+
["kind", "name"]
|
|
5365
|
+
),
|
|
5366
|
+
"Optional rewards to attach at creation."
|
|
5367
|
+
),
|
|
5368
|
+
dueAt: integerSchema("Optional latest acceptable completion timestamp."),
|
|
5369
|
+
notBeforeAt: integerSchema("Optional earliest actionable timestamp."),
|
|
5370
|
+
scheduledStartAt: integerSchema("Optional planned schedule window start."),
|
|
5371
|
+
scheduledEndAt: integerSchema("Optional planned schedule window end."),
|
|
5372
|
+
allDay: booleanSchema("Whether the scheduled window is all-day."),
|
|
5373
|
+
estimateSeconds: integerSchema("Optional active-effort estimate in seconds.")
|
|
5291
5374
|
},
|
|
5292
5375
|
["title", "objective"]
|
|
5293
5376
|
),
|
|
5294
|
-
"Quests to create during rumor settlement."
|
|
5377
|
+
"Quests to create during rumor settlement. Include timing and tags directly."
|
|
5295
5378
|
),
|
|
5296
|
-
now: integerSchema("Optional timestamp for membership or
|
|
5379
|
+
now: integerSchema("Optional timestamp for membership, reopen, or rumor update."),
|
|
5380
|
+
title: stringSchema("New title for the update_rumor action."),
|
|
5381
|
+
details: stringSchema("New or enriched context text for the update_rumor action.")
|
|
5297
5382
|
},
|
|
5298
5383
|
["action"],
|
|
5299
|
-
"
|
|
5384
|
+
"Create quests with timing and tags, create questlines, settle rumors into work, manage quest-questline membership, or enrich open rumors with new context."
|
|
5300
5385
|
),
|
|
5301
5386
|
handler: shapeWorkToolHandler
|
|
5302
5387
|
});
|
|
@@ -5674,7 +5759,8 @@ __export(write_exports, {
|
|
|
5674
5759
|
untagQuest: () => untagQuest,
|
|
5675
5760
|
updateQuestReward: () => updateQuestReward,
|
|
5676
5761
|
updateQuestline: () => updateQuestline,
|
|
5677
|
-
updateRepeatableQuest: () => updateRepeatableQuest
|
|
5762
|
+
updateRepeatableQuest: () => updateRepeatableQuest,
|
|
5763
|
+
updateRumor: () => updateRumor
|
|
5678
5764
|
});
|
|
5679
5765
|
|
|
5680
5766
|
exports.initQuestlogTables = initQuestlogTables;
|
package/dist/index.d.cts
CHANGED
|
@@ -268,6 +268,15 @@ interface CaptureRumorInput {
|
|
|
268
268
|
details?: string | null;
|
|
269
269
|
now?: number;
|
|
270
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* Input for enriching an existing open rumor with new title or details.
|
|
273
|
+
* At least one of title or details must be provided.
|
|
274
|
+
*/
|
|
275
|
+
interface UpdateRumorInput {
|
|
276
|
+
title?: string;
|
|
277
|
+
details?: string;
|
|
278
|
+
now?: number;
|
|
279
|
+
}
|
|
271
280
|
/**
|
|
272
281
|
* A downstream artifact created from rumor settlement.
|
|
273
282
|
*/
|
|
@@ -653,6 +662,13 @@ declare function settleRumor(db: QuestlogDb, rumorId: number, input: SettleRumor
|
|
|
653
662
|
*/
|
|
654
663
|
declare function softDeleteRumor(db: QuestlogDb, rumorId: number, now?: number): void;
|
|
655
664
|
|
|
665
|
+
/**
|
|
666
|
+
* Enriches an existing open rumor with a new title and/or details.
|
|
667
|
+
* Advances updatedAt so downstream consumers can detect enrichment.
|
|
668
|
+
* Throws if the rumor is settled, dismissed, or deleted.
|
|
669
|
+
*/
|
|
670
|
+
declare function updateRumor(db: QuestlogDb, rumorId: number, input: UpdateRumorInput): Rumor;
|
|
671
|
+
|
|
656
672
|
/**
|
|
657
673
|
* Search result across questlog content.
|
|
658
674
|
*/
|
|
@@ -1474,7 +1490,13 @@ type ShapeWorkToolInput = {
|
|
|
1474
1490
|
} | ({
|
|
1475
1491
|
action: 'settle_rumor';
|
|
1476
1492
|
rumorId: number;
|
|
1477
|
-
} & SettleRumorInput)
|
|
1493
|
+
} & SettleRumorInput) | {
|
|
1494
|
+
action: 'update_rumor';
|
|
1495
|
+
rumorId: number;
|
|
1496
|
+
title?: string;
|
|
1497
|
+
details?: string;
|
|
1498
|
+
now?: number;
|
|
1499
|
+
};
|
|
1478
1500
|
interface ShapeWorkToolData {
|
|
1479
1501
|
action: ShapeWorkToolInput['action'];
|
|
1480
1502
|
primary?: ToolEntityRef | undefined;
|
|
@@ -1693,8 +1715,9 @@ declare const write_untagQuest: typeof untagQuest;
|
|
|
1693
1715
|
declare const write_updateQuestReward: typeof updateQuestReward;
|
|
1694
1716
|
declare const write_updateQuestline: typeof updateQuestline;
|
|
1695
1717
|
declare const write_updateRepeatableQuest: typeof updateRepeatableQuest;
|
|
1718
|
+
declare const write_updateRumor: typeof updateRumor;
|
|
1696
1719
|
declare namespace write {
|
|
1697
|
-
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 };
|
|
1720
|
+
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, write_updateRumor as updateRumor };
|
|
1698
1721
|
}
|
|
1699
1722
|
|
|
1700
|
-
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 };
|
|
1723
|
+
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, type UpdateRumorInput, 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, updateRumor, write };
|
package/dist/index.d.ts
CHANGED
|
@@ -268,6 +268,15 @@ interface CaptureRumorInput {
|
|
|
268
268
|
details?: string | null;
|
|
269
269
|
now?: number;
|
|
270
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* Input for enriching an existing open rumor with new title or details.
|
|
273
|
+
* At least one of title or details must be provided.
|
|
274
|
+
*/
|
|
275
|
+
interface UpdateRumorInput {
|
|
276
|
+
title?: string;
|
|
277
|
+
details?: string;
|
|
278
|
+
now?: number;
|
|
279
|
+
}
|
|
271
280
|
/**
|
|
272
281
|
* A downstream artifact created from rumor settlement.
|
|
273
282
|
*/
|
|
@@ -653,6 +662,13 @@ declare function settleRumor(db: QuestlogDb, rumorId: number, input: SettleRumor
|
|
|
653
662
|
*/
|
|
654
663
|
declare function softDeleteRumor(db: QuestlogDb, rumorId: number, now?: number): void;
|
|
655
664
|
|
|
665
|
+
/**
|
|
666
|
+
* Enriches an existing open rumor with a new title and/or details.
|
|
667
|
+
* Advances updatedAt so downstream consumers can detect enrichment.
|
|
668
|
+
* Throws if the rumor is settled, dismissed, or deleted.
|
|
669
|
+
*/
|
|
670
|
+
declare function updateRumor(db: QuestlogDb, rumorId: number, input: UpdateRumorInput): Rumor;
|
|
671
|
+
|
|
656
672
|
/**
|
|
657
673
|
* Search result across questlog content.
|
|
658
674
|
*/
|
|
@@ -1474,7 +1490,13 @@ type ShapeWorkToolInput = {
|
|
|
1474
1490
|
} | ({
|
|
1475
1491
|
action: 'settle_rumor';
|
|
1476
1492
|
rumorId: number;
|
|
1477
|
-
} & SettleRumorInput)
|
|
1493
|
+
} & SettleRumorInput) | {
|
|
1494
|
+
action: 'update_rumor';
|
|
1495
|
+
rumorId: number;
|
|
1496
|
+
title?: string;
|
|
1497
|
+
details?: string;
|
|
1498
|
+
now?: number;
|
|
1499
|
+
};
|
|
1478
1500
|
interface ShapeWorkToolData {
|
|
1479
1501
|
action: ShapeWorkToolInput['action'];
|
|
1480
1502
|
primary?: ToolEntityRef | undefined;
|
|
@@ -1693,8 +1715,9 @@ declare const write_untagQuest: typeof untagQuest;
|
|
|
1693
1715
|
declare const write_updateQuestReward: typeof updateQuestReward;
|
|
1694
1716
|
declare const write_updateQuestline: typeof updateQuestline;
|
|
1695
1717
|
declare const write_updateRepeatableQuest: typeof updateRepeatableQuest;
|
|
1718
|
+
declare const write_updateRumor: typeof updateRumor;
|
|
1696
1719
|
declare namespace write {
|
|
1697
|
-
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 };
|
|
1720
|
+
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, write_updateRumor as updateRumor };
|
|
1698
1721
|
}
|
|
1699
1722
|
|
|
1700
|
-
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 };
|
|
1723
|
+
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, type UpdateRumorInput, 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, updateRumor, write };
|
package/dist/index.js
CHANGED
|
@@ -2000,6 +2000,29 @@ function softDeleteRumor(db, rumorId, now) {
|
|
|
2000
2000
|
).run(deletedAt, deletedAt, rumorId);
|
|
2001
2001
|
}
|
|
2002
2002
|
|
|
2003
|
+
// src/rumors/update_rumor.ts
|
|
2004
|
+
function updateRumor(db, rumorId, input) {
|
|
2005
|
+
if (input.title == null && input.details == null) {
|
|
2006
|
+
throw new Error("At least one of title or details must be provided to update a rumor.");
|
|
2007
|
+
}
|
|
2008
|
+
const current = getRumorOrThrow(db, rumorId);
|
|
2009
|
+
if (current.settledAt != null) {
|
|
2010
|
+
throw new Error(`Rumor ${rumorId} is already settled and cannot be updated.`);
|
|
2011
|
+
}
|
|
2012
|
+
if (current.dismissedAt != null) {
|
|
2013
|
+
throw new Error(`Rumor ${rumorId} is dismissed and cannot be updated. Reopen it first.`);
|
|
2014
|
+
}
|
|
2015
|
+
const now = resolveNow(input.now);
|
|
2016
|
+
const nextTitle = input.title != null ? assertNonEmpty(input.title, "Rumor title") : current.title;
|
|
2017
|
+
const nextDetails = input.details != null ? input.details.trim() || null : current.details;
|
|
2018
|
+
db.prepare(
|
|
2019
|
+
`UPDATE rumors
|
|
2020
|
+
SET title = ?, details = ?, updated_at = ?
|
|
2021
|
+
WHERE id = ? AND deleted_at IS NULL`
|
|
2022
|
+
).run(nextTitle, nextDetails, now, rumorId);
|
|
2023
|
+
return getRumorOrThrow(db, rumorId);
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2003
2026
|
// src/search_questlog.ts
|
|
2004
2027
|
function searchQuestlog(db, query) {
|
|
2005
2028
|
const trimmed = query.trim();
|
|
@@ -5223,6 +5246,27 @@ function shapeWorkToolHandler(db, input) {
|
|
|
5223
5246
|
}
|
|
5224
5247
|
);
|
|
5225
5248
|
}
|
|
5249
|
+
case "update_rumor": {
|
|
5250
|
+
updateRumor(db, input.rumorId, {
|
|
5251
|
+
...input.title != null && { title: input.title },
|
|
5252
|
+
...input.details != null && { details: input.details },
|
|
5253
|
+
...input.now != null && { now: input.now }
|
|
5254
|
+
});
|
|
5255
|
+
const detail = getRumorDetail(db, input.rumorId);
|
|
5256
|
+
return toolSuccess(
|
|
5257
|
+
`Updated rumor \`${detail.title}\`.`,
|
|
5258
|
+
{
|
|
5259
|
+
action: input.action,
|
|
5260
|
+
primary: toRumorRef(detail),
|
|
5261
|
+
updated: [toRumorRef(detail)],
|
|
5262
|
+
rumor: detail
|
|
5263
|
+
},
|
|
5264
|
+
{
|
|
5265
|
+
entities: [toRumorRef(detail)],
|
|
5266
|
+
next: [inspectItemNext(toRumorRef(detail))]
|
|
5267
|
+
}
|
|
5268
|
+
);
|
|
5269
|
+
}
|
|
5226
5270
|
}
|
|
5227
5271
|
} catch (error) {
|
|
5228
5272
|
return translateToolError(error, {
|
|
@@ -5232,8 +5276,8 @@ function shapeWorkToolHandler(db, input) {
|
|
|
5232
5276
|
}
|
|
5233
5277
|
var shapeWorkTool = defineQuestlogTool({
|
|
5234
5278
|
name: shapeWorkToolName,
|
|
5235
|
-
description: "
|
|
5236
|
-
whenToUse: "Use this when deciding what real work exists and how it should be grouped before or around execution.",
|
|
5279
|
+
description: "Create a quest (with timing, tags, and objective in one call), create a questline, settle a rumor into concrete work, or manage quest-questline membership. Use create_quest for clear commitments \u2014 include tags and timing directly to avoid follow-up calls.",
|
|
5280
|
+
whenToUse: "Use this when deciding what real work exists and how it should be grouped before or around execution. Prefer a single create_quest call with all fields over separate create + plan_quest + tag_work calls.",
|
|
5237
5281
|
whenNotToUse: "Do not use this for quest execution steps like starting, finishing, abandoning, or logging effort.",
|
|
5238
5282
|
sideEffects: "writes_state",
|
|
5239
5283
|
readOnly: false,
|
|
@@ -5242,14 +5286,16 @@ var shapeWorkTool = defineQuestlogTool({
|
|
|
5242
5286
|
inputDescriptions: {
|
|
5243
5287
|
action: "Which structure-shaping action to perform, such as settling a rumor, creating a quest, or attaching a quest to a questline.",
|
|
5244
5288
|
rumorId: "The rumor to dismiss, reopen, or settle when the action targets intake.",
|
|
5245
|
-
questline: "Questline creation data used when creating a questline directly or as part of rumor settlement.",
|
|
5246
|
-
quests: "Concrete quest creation inputs
|
|
5289
|
+
questline: "Questline creation data used when creating a questline directly or as part of rumor settlement. Include description for context.",
|
|
5290
|
+
quests: "Concrete quest creation inputs when settling a rumor into real work. Each quest supports the same fields as the quest property \u2014 include timing and tags directly.",
|
|
5247
5291
|
settledAt: "Optional settlement timestamp for rumor settlement.",
|
|
5248
|
-
quest: "Quest creation input
|
|
5292
|
+
quest: "Quest creation input when directly creating one concrete quest. Include timing fields (dueAt, scheduledStartAt, etc.), tags, and rewards to create a fully specified quest in one call.",
|
|
5249
5293
|
questId: "The concrete quest being attached to or detached from a questline.",
|
|
5250
5294
|
questlineId: "The questline that should receive the quest for attach actions.",
|
|
5251
5295
|
dismissedAt: "Optional dismissal timestamp for dismissing a rumor.",
|
|
5252
|
-
now: "Optional timestamp for reopen
|
|
5296
|
+
now: "Optional timestamp for reopen, questline membership, or rumor update.",
|
|
5297
|
+
title: "New title for the update_rumor action.",
|
|
5298
|
+
details: "New or enriched context for the update_rumor action. Append evidence as rumors accumulate information across conversations."
|
|
5253
5299
|
},
|
|
5254
5300
|
outputDescription: "Returns the changed or created rumor, quest, questline, or created quest set for the selected shape-work action, plus purpose-shaped primary and created or updated refs. Repeated safe actions return structured no-op results, and rumor settlement can ask for missing structure instead of failing.",
|
|
5255
5301
|
inputSchema: objectSchema(
|
|
@@ -5261,20 +5307,40 @@ var shapeWorkTool = defineQuestlogTool({
|
|
|
5261
5307
|
"detach_quest_from_questline",
|
|
5262
5308
|
"dismiss_rumor",
|
|
5263
5309
|
"reopen_rumor",
|
|
5264
|
-
"settle_rumor"
|
|
5310
|
+
"settle_rumor",
|
|
5311
|
+
"update_rumor"
|
|
5265
5312
|
]),
|
|
5266
5313
|
questId: integerSchema("Quest to attach or detach."),
|
|
5267
5314
|
questlineId: integerSchema("Questline that should receive the quest."),
|
|
5268
5315
|
quest: objectSchema(
|
|
5269
5316
|
{
|
|
5270
5317
|
title: stringSchema("Title for the new quest."),
|
|
5271
|
-
objective: stringSchema("Objective for the new quest.")
|
|
5318
|
+
objective: stringSchema("Objective for the new quest."),
|
|
5319
|
+
questlineId: integerSchema("Optional questline to place the quest in."),
|
|
5320
|
+
tags: arraySchema(stringSchema("Tag name."), "Optional tags to apply at creation."),
|
|
5321
|
+
rewards: arraySchema(
|
|
5322
|
+
objectSchema(
|
|
5323
|
+
{
|
|
5324
|
+
kind: stringSchema("Reward kind."),
|
|
5325
|
+
name: stringSchema("Reward name.")
|
|
5326
|
+
},
|
|
5327
|
+
["kind", "name"]
|
|
5328
|
+
),
|
|
5329
|
+
"Optional rewards to attach at creation."
|
|
5330
|
+
),
|
|
5331
|
+
dueAt: integerSchema("Optional latest acceptable completion timestamp."),
|
|
5332
|
+
notBeforeAt: integerSchema("Optional earliest actionable timestamp."),
|
|
5333
|
+
scheduledStartAt: integerSchema("Optional planned schedule window start."),
|
|
5334
|
+
scheduledEndAt: integerSchema("Optional planned schedule window end."),
|
|
5335
|
+
allDay: booleanSchema("Whether the scheduled window is all-day."),
|
|
5336
|
+
estimateSeconds: integerSchema("Optional active-effort estimate in seconds.")
|
|
5272
5337
|
},
|
|
5273
5338
|
["title", "objective"]
|
|
5274
5339
|
),
|
|
5275
5340
|
questline: objectSchema(
|
|
5276
5341
|
{
|
|
5277
|
-
title: stringSchema("Questline title.")
|
|
5342
|
+
title: stringSchema("Questline title."),
|
|
5343
|
+
description: stringSchema("Optional questline description.")
|
|
5278
5344
|
},
|
|
5279
5345
|
[]
|
|
5280
5346
|
),
|
|
@@ -5285,16 +5351,35 @@ var shapeWorkTool = defineQuestlogTool({
|
|
|
5285
5351
|
objectSchema(
|
|
5286
5352
|
{
|
|
5287
5353
|
title: stringSchema("Title for a created quest."),
|
|
5288
|
-
objective: stringSchema("Objective for a created quest.")
|
|
5354
|
+
objective: stringSchema("Objective for a created quest."),
|
|
5355
|
+
tags: arraySchema(stringSchema("Tag name."), "Optional tags to apply at creation."),
|
|
5356
|
+
rewards: arraySchema(
|
|
5357
|
+
objectSchema(
|
|
5358
|
+
{
|
|
5359
|
+
kind: stringSchema("Reward kind."),
|
|
5360
|
+
name: stringSchema("Reward name.")
|
|
5361
|
+
},
|
|
5362
|
+
["kind", "name"]
|
|
5363
|
+
),
|
|
5364
|
+
"Optional rewards to attach at creation."
|
|
5365
|
+
),
|
|
5366
|
+
dueAt: integerSchema("Optional latest acceptable completion timestamp."),
|
|
5367
|
+
notBeforeAt: integerSchema("Optional earliest actionable timestamp."),
|
|
5368
|
+
scheduledStartAt: integerSchema("Optional planned schedule window start."),
|
|
5369
|
+
scheduledEndAt: integerSchema("Optional planned schedule window end."),
|
|
5370
|
+
allDay: booleanSchema("Whether the scheduled window is all-day."),
|
|
5371
|
+
estimateSeconds: integerSchema("Optional active-effort estimate in seconds.")
|
|
5289
5372
|
},
|
|
5290
5373
|
["title", "objective"]
|
|
5291
5374
|
),
|
|
5292
|
-
"Quests to create during rumor settlement."
|
|
5375
|
+
"Quests to create during rumor settlement. Include timing and tags directly."
|
|
5293
5376
|
),
|
|
5294
|
-
now: integerSchema("Optional timestamp for membership or
|
|
5377
|
+
now: integerSchema("Optional timestamp for membership, reopen, or rumor update."),
|
|
5378
|
+
title: stringSchema("New title for the update_rumor action."),
|
|
5379
|
+
details: stringSchema("New or enriched context text for the update_rumor action.")
|
|
5295
5380
|
},
|
|
5296
5381
|
["action"],
|
|
5297
|
-
"
|
|
5382
|
+
"Create quests with timing and tags, create questlines, settle rumors into work, manage quest-questline membership, or enrich open rumors with new context."
|
|
5298
5383
|
),
|
|
5299
5384
|
handler: shapeWorkToolHandler
|
|
5300
5385
|
});
|
|
@@ -5672,7 +5757,8 @@ __export(write_exports, {
|
|
|
5672
5757
|
untagQuest: () => untagQuest,
|
|
5673
5758
|
updateQuestReward: () => updateQuestReward,
|
|
5674
5759
|
updateQuestline: () => updateQuestline,
|
|
5675
|
-
updateRepeatableQuest: () => updateRepeatableQuest
|
|
5760
|
+
updateRepeatableQuest: () => updateRepeatableQuest,
|
|
5761
|
+
updateRumor: () => updateRumor
|
|
5676
5762
|
});
|
|
5677
5763
|
|
|
5678
5764
|
export { initQuestlogTables, markers_exports as markers, read_exports as read, skills_exports as skills, soul_exports as soul, tools_exports as tools, write_exports as write };
|