@devflow-tools/database 0.17.0 → 0.17.2
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/CHANGELOG.md +30 -0
- package/dist/database.d.ts +51 -0
- package/dist/database.js +429 -29
- package/dist/index.d.ts +3 -1
- package/dist/index.js +10 -1
- package/dist/node-sqlite.d.ts +1 -1
- package/dist/node-sqlite.js +8 -4
- package/dist/task-semantic-control.d.ts +79 -0
- package/dist/task-semantic-control.js +196 -0
- package/dist/work-queue.d.ts +1 -0
- package/package.json +1 -1
- package/src/database.ts +548 -35
- package/src/index.ts +19 -0
- package/src/node-sqlite.ts +8 -4
- package/src/task-semantic-control.ts +270 -0
- package/src/work-queue.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.17.2](https://github.com/shilongfeicool/dev-flow/compare/v0.17.1...v0.17.2) (2026-08-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **reliability:** close semantic lifecycle gaps ([08bae87](https://github.com/shilongfeicool/dev-flow/commit/08bae8742c5907dffdd476679e70c86cc373a7e8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **reliability:** strengthen semantic retrieval closure ([b979ab3](https://github.com/shilongfeicool/dev-flow/commit/b979ab3ec790e3d7119db512902db90a9567667d))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.17.1](https://github.com/shilongfeicool/dev-flow/compare/v0.16.28...v0.17.1) (2026-07-31)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **context:** preserve immutable task intent ([249023d](https://github.com/shilongfeicool/dev-flow/commit/249023d091970bdb6a2744ac467cdf594c353d00))
|
|
28
|
+
* **control:** add task semantic identity contracts ([480d213](https://github.com/shilongfeicool/dev-flow/commit/480d2138e8408f25b888228d5e20050a938c50ec))
|
|
29
|
+
* **hooks:** close turns with canonical receipts ([69a577a](https://github.com/shilongfeicool/dev-flow/commit/69a577ada60abaf6c729f9722715bfe6f310bb2f))
|
|
30
|
+
* **retrieval:** enforce actions and track verified outcomes ([5e2756a](https://github.com/shilongfeicool/dev-flow/commit/5e2756ababaa246cd78ea7bc6877f59e5972e5db))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
# [0.17.0](https://github.com/shilongfeicool/dev-flow/compare/v0.16.28...v0.17.0) (2026-07-30)
|
|
7
37
|
|
|
8
38
|
|
package/dist/database.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type AppendRetrievalCycleInput, type CreateRetrievalSessionInput, type
|
|
|
5
5
|
import { type AddLearningCandidateEvidenceInput, type LearningCandidateEvidenceRecord, type LearningCandidateRecord, type LearningCandidateState, type LearningCandidateVersionRecord, type TransitionLearningCandidateInput, type UpsertLearningCandidateInput } from './learning-candidates';
|
|
6
6
|
import { type CreateWorkflowWorkerInput, type EnqueueWorkflowMergeInput, type TransitionWorkflowWorkerInput, type WorkflowMergeRecord, type WorkflowMergeState, type WorkflowWorkerEventRecord, type WorkflowWorkerRecord } from './workflow-workers';
|
|
7
7
|
import type { RetrievalLedgerEventRecord } from './retrieval-ledger';
|
|
8
|
+
import { type ChannelQueryPlanRecord, type TaskIntentArtifactRecord, type TerminalTransitionRecord, type ToolNameResolutionRecord, type TranscriptCheckpointRecord } from './task-semantic-control';
|
|
8
9
|
export interface BenchmarkReportRecord {
|
|
9
10
|
runId: string;
|
|
10
11
|
suiteId: string;
|
|
@@ -173,12 +174,17 @@ export interface HookFallbackRecord {
|
|
|
173
174
|
export declare function getGlobalDevFlowDbPath(home?: string): string;
|
|
174
175
|
export declare function openGlobalDevFlowDatabase(home?: string, options?: {
|
|
175
176
|
busyTimeoutMs?: number;
|
|
177
|
+
readonly?: boolean;
|
|
178
|
+
}): DevFlowDatabase;
|
|
179
|
+
export declare function openGlobalDevFlowReadOnlyDatabase(home?: string, options?: {
|
|
180
|
+
busyTimeoutMs?: number;
|
|
176
181
|
}): DevFlowDatabase;
|
|
177
182
|
export declare class DevFlowDatabase {
|
|
178
183
|
private db;
|
|
179
184
|
constructor(projectRoot: string, opts?: {
|
|
180
185
|
dbPath?: string;
|
|
181
186
|
busyTimeoutMs?: number;
|
|
187
|
+
readonly?: boolean;
|
|
182
188
|
});
|
|
183
189
|
private initializeSchema;
|
|
184
190
|
insertRun(run: any): void;
|
|
@@ -212,8 +218,10 @@ export declare class DevFlowDatabase {
|
|
|
212
218
|
listToolCallEventsBySession(sessionId: string): any[];
|
|
213
219
|
getToolCallEventByToolUseId(sessionId: string, toolUseId: string): {
|
|
214
220
|
eventId: string;
|
|
221
|
+
executionId: string;
|
|
215
222
|
timestamp: number;
|
|
216
223
|
duration: number;
|
|
224
|
+
input: Record<string, unknown>;
|
|
217
225
|
} | null;
|
|
218
226
|
listToolCallEventsBySessions(sessionIds: string[]): Record<string, any[]>;
|
|
219
227
|
insertSkillExecution(params: {
|
|
@@ -420,6 +428,44 @@ export declare class DevFlowDatabase {
|
|
|
420
428
|
getActiveContextReceipt(projectRoot: string, sessionId: string, executionId?: string, now?: number): ContextReceiptRecord | null;
|
|
421
429
|
recordContextSelectionEvent(event: ContextSelectionEventRecord): boolean;
|
|
422
430
|
appendRetrievalLedgerEvent(event: RetrievalLedgerEventRecord): boolean;
|
|
431
|
+
appendTaskIntentArtifact(record: TaskIntentArtifactRecord): TaskIntentArtifactRecord;
|
|
432
|
+
getTaskIntentArtifact(artifactHash: string): TaskIntentArtifactRecord | null;
|
|
433
|
+
getLatestTaskIntentArtifact(input: {
|
|
434
|
+
projectRoot: string;
|
|
435
|
+
sessionId: string;
|
|
436
|
+
turnId?: string;
|
|
437
|
+
requestId?: string;
|
|
438
|
+
}): TaskIntentArtifactRecord | null;
|
|
439
|
+
getTaskIntentArtifactBySource(input: {
|
|
440
|
+
projectRoot: string;
|
|
441
|
+
sessionId: string;
|
|
442
|
+
sourceHash: string;
|
|
443
|
+
}): TaskIntentArtifactRecord | null;
|
|
444
|
+
listLatestTaskIntentArtifacts(projectRoot: string, sessionId: string): TaskIntentArtifactRecord[];
|
|
445
|
+
appendChannelQueryPlan(record: ChannelQueryPlanRecord): ChannelQueryPlanRecord;
|
|
446
|
+
getChannelQueryPlan(planHash: string): ChannelQueryPlanRecord | null;
|
|
447
|
+
getChannelQueryPlanForIntent(input: {
|
|
448
|
+
projectRoot: string;
|
|
449
|
+
sessionId: string;
|
|
450
|
+
turnId: string;
|
|
451
|
+
sourceIntentHash: string;
|
|
452
|
+
}): ChannelQueryPlanRecord | null;
|
|
453
|
+
appendToolNameResolution(record: ToolNameResolutionRecord): boolean;
|
|
454
|
+
listToolNameResolutions(input: {
|
|
455
|
+
projectRoot: string;
|
|
456
|
+
sessionId: string;
|
|
457
|
+
requestId?: string;
|
|
458
|
+
}): ToolNameResolutionRecord[];
|
|
459
|
+
appendTerminalTransition(record: TerminalTransitionRecord): TerminalTransitionRecord;
|
|
460
|
+
getTerminalTransition(receiptId: string): TerminalTransitionRecord | null;
|
|
461
|
+
getLatestTerminalTransition(projectRoot: string, sessionId: string, turnId: string): TerminalTransitionRecord | null;
|
|
462
|
+
appendTranscriptCheckpoint(record: TranscriptCheckpointRecord): boolean;
|
|
463
|
+
getLatestTranscriptCheckpoint(input: {
|
|
464
|
+
projectRoot: string;
|
|
465
|
+
hostId: string;
|
|
466
|
+
sessionId: string;
|
|
467
|
+
sourcePath: string;
|
|
468
|
+
}): TranscriptCheckpointRecord | null;
|
|
423
469
|
listRetrievalLedgerEvents(options: {
|
|
424
470
|
projectRoot: string;
|
|
425
471
|
sessionId?: string;
|
|
@@ -460,6 +506,11 @@ export declare class DevFlowDatabase {
|
|
|
460
506
|
reason?: string;
|
|
461
507
|
decidedAt?: number;
|
|
462
508
|
}): MemoryTurnRecord;
|
|
509
|
+
updateCommittedMemoryTurnProjection(input: {
|
|
510
|
+
turnId: string;
|
|
511
|
+
memoryIds: string[];
|
|
512
|
+
reason?: string;
|
|
513
|
+
}): MemoryTurnRecord;
|
|
463
514
|
skipMemoryTurn(input: {
|
|
464
515
|
turnId: string;
|
|
465
516
|
receiptId: string;
|