@devflow-tools/database 0.16.17 → 0.16.19

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/database.js CHANGED
@@ -9,6 +9,7 @@ const fs_1 = require("fs");
9
9
  const os_1 = require("os");
10
10
  const crypto_1 = require("crypto");
11
11
  const obligation_ledger_1 = require("./obligation-ledger");
12
+ const host_actions_1 = require("./host-actions");
12
13
  const CONTEXT_REQUIRED_SKILLS = new Set([
13
14
  'react', 'vue', 'nest', 'nextjs', 'graphql', 'typescript',
14
15
  ]);
@@ -430,6 +431,79 @@ class DevFlowDatabase {
430
431
 
431
432
  CREATE INDEX IF NOT EXISTS idx_session_closures_state
432
433
  ON devflow_session_closures(project_root, state, updated_at DESC);
434
+
435
+ CREATE TABLE IF NOT EXISTS devflow_host_actions (
436
+ action_id TEXT PRIMARY KEY,
437
+ run_id TEXT NOT NULL,
438
+ engine_run_id TEXT NOT NULL,
439
+ step_id TEXT NOT NULL,
440
+ project_root TEXT NOT NULL,
441
+ session_id TEXT,
442
+ execution_id TEXT,
443
+ context_receipt TEXT,
444
+ state TEXT NOT NULL DEFAULT 'waiting'
445
+ CHECK(state IN ('waiting', 'running', 'reported', 'verified', 'failed', 'cancelled', 'degraded')),
446
+ report_json TEXT NOT NULL DEFAULT '{}',
447
+ evidence_hash TEXT,
448
+ created_at INTEGER NOT NULL,
449
+ updated_at INTEGER NOT NULL,
450
+ finished_at INTEGER,
451
+ UNIQUE(run_id, step_id),
452
+ CHECK(
453
+ (state IN ('verified', 'failed', 'cancelled', 'degraded') AND finished_at IS NOT NULL)
454
+ OR (state IN ('waiting', 'running', 'reported') AND finished_at IS NULL)
455
+ )
456
+ );
457
+
458
+ CREATE INDEX IF NOT EXISTS idx_host_actions_project
459
+ ON devflow_host_actions(project_root, created_at DESC);
460
+ CREATE INDEX IF NOT EXISTS idx_host_actions_session
461
+ ON devflow_host_actions(project_root, session_id, created_at DESC);
462
+ CREATE INDEX IF NOT EXISTS idx_host_actions_run
463
+ ON devflow_host_actions(project_root, run_id, created_at, action_id);
464
+ CREATE INDEX IF NOT EXISTS idx_host_actions_action
465
+ ON devflow_host_actions(action_id);
466
+
467
+ CREATE TABLE IF NOT EXISTS devflow_host_action_events (
468
+ event_id TEXT PRIMARY KEY,
469
+ action_id TEXT NOT NULL,
470
+ project_root TEXT NOT NULL,
471
+ run_id TEXT NOT NULL,
472
+ step_id TEXT NOT NULL,
473
+ from_state TEXT
474
+ CHECK(from_state IS NULL OR from_state IN ('waiting', 'running', 'reported', 'verified', 'failed', 'cancelled', 'degraded')),
475
+ to_state TEXT NOT NULL
476
+ CHECK(to_state IN ('waiting', 'running', 'reported', 'verified', 'failed', 'cancelled', 'degraded')),
477
+ report_json TEXT NOT NULL DEFAULT '{}',
478
+ evidence_hash TEXT,
479
+ created_at INTEGER NOT NULL
480
+ );
481
+
482
+ CREATE INDEX IF NOT EXISTS idx_host_action_events_action
483
+ ON devflow_host_action_events(action_id, created_at, event_id);
484
+ CREATE INDEX IF NOT EXISTS idx_host_action_events_project_run
485
+ ON devflow_host_action_events(project_root, run_id, created_at, event_id);
486
+
487
+ CREATE TRIGGER IF NOT EXISTS prevent_host_action_event_replace
488
+ BEFORE INSERT ON devflow_host_action_events
489
+ WHEN EXISTS (
490
+ SELECT 1 FROM devflow_host_action_events WHERE event_id = NEW.event_id
491
+ )
492
+ BEGIN
493
+ SELECT RAISE(ABORT, 'devflow_host_action_events is append-only');
494
+ END;
495
+
496
+ CREATE TRIGGER IF NOT EXISTS prevent_host_action_event_update
497
+ BEFORE UPDATE ON devflow_host_action_events
498
+ BEGIN
499
+ SELECT RAISE(ABORT, 'devflow_host_action_events is append-only');
500
+ END;
501
+
502
+ CREATE TRIGGER IF NOT EXISTS prevent_host_action_event_delete
503
+ BEFORE DELETE ON devflow_host_action_events
504
+ BEGIN
505
+ SELECT RAISE(ABORT, 'devflow_host_action_events is append-only');
506
+ END;
433
507
  `);
434
508
  // Migration: add session_id to skill_executions (SQLite compat — ignore if exists)
435
509
  try {
@@ -2517,6 +2591,182 @@ class DevFlowDatabase {
2517
2591
  createdAt: Number(row.created_at),
2518
2592
  }));
2519
2593
  }
2594
+ // ---- Durable Host Actions ----
2595
+ requestHostAction(input) {
2596
+ this.validateHostActionIdentity(input);
2597
+ const actionId = input.actionId ?? (0, crypto_1.randomUUID)();
2598
+ if (!actionId.trim())
2599
+ throw new Error('Host action requires an action ID');
2600
+ return this.withImmediateTransaction(() => {
2601
+ const now = Date.now();
2602
+ const result = this.db.prepare(`
2603
+ INSERT INTO devflow_host_actions (
2604
+ action_id, run_id, engine_run_id, step_id, project_root, session_id,
2605
+ execution_id, context_receipt, state, report_json, evidence_hash,
2606
+ created_at, updated_at, finished_at
2607
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 'waiting', '{}', NULL, ?, ?, NULL)
2608
+ ON CONFLICT DO NOTHING
2609
+ `).run(actionId, input.runId, input.engineRunId, input.stepId, input.projectRoot, input.sessionId ?? null, input.executionId ?? null, input.contextReceipt ?? null, now, now);
2610
+ const rows = this.db.prepare(`
2611
+ SELECT * FROM devflow_host_actions
2612
+ WHERE action_id = ? OR (run_id = ? AND step_id = ?)
2613
+ `).all(actionId, input.runId, input.stepId);
2614
+ if (rows.length !== 1) {
2615
+ throw new Error(`HOST_ACTION_IDENTITY_CONFLICT:${input.runId}:${input.stepId}`);
2616
+ }
2617
+ const record = (0, host_actions_1.mapHostActionRow)(rows[0]);
2618
+ const sameIdentity = (input.actionId === undefined || record.actionId === input.actionId)
2619
+ && record.runId === input.runId
2620
+ && record.engineRunId === input.engineRunId
2621
+ && record.stepId === input.stepId
2622
+ && record.projectRoot === input.projectRoot
2623
+ && record.sessionId === input.sessionId
2624
+ && record.executionId === input.executionId
2625
+ && record.contextReceipt === input.contextReceipt;
2626
+ if (!sameIdentity) {
2627
+ throw new Error(`HOST_ACTION_IDENTITY_CONFLICT:${input.runId}:${input.stepId}`);
2628
+ }
2629
+ if (result.changes > 0)
2630
+ this.appendHostActionEvent(record, null, 'waiting', now);
2631
+ return record;
2632
+ });
2633
+ }
2634
+ startHostAction(input) {
2635
+ return this.transitionHostAction(input, 'running', {});
2636
+ }
2637
+ reportHostAction(input) {
2638
+ return this.transitionHostAction(input, 'reported', input.report, input.evidenceHash);
2639
+ }
2640
+ verifyHostAction(input) {
2641
+ if (typeof input.evidenceHash !== 'string' || !input.evidenceHash.trim()) {
2642
+ throw new Error('Host action verification requires a non-empty evidence hash');
2643
+ }
2644
+ return this.transitionHostAction(input, 'verified', input.report, input.evidenceHash, true);
2645
+ }
2646
+ failHostAction(input) {
2647
+ const outcome = input.outcome ?? 'failed';
2648
+ if (outcome !== 'failed' && outcome !== 'cancelled' && outcome !== 'degraded') {
2649
+ throw new Error(`Invalid host action failure outcome: ${String(outcome)}`);
2650
+ }
2651
+ return this.transitionHostAction(input, outcome, input.report, input.evidenceHash);
2652
+ }
2653
+ getHostAction(projectRoot, actionId) {
2654
+ const row = this.db.prepare(`
2655
+ SELECT * FROM devflow_host_actions
2656
+ WHERE project_root = ? AND action_id = ?
2657
+ `).get(projectRoot, actionId);
2658
+ return row ? (0, host_actions_1.mapHostActionRow)(row) : null;
2659
+ }
2660
+ listHostActionsForRun(projectRoot, runId) {
2661
+ const rows = this.db.prepare(`
2662
+ SELECT * FROM devflow_host_actions
2663
+ WHERE project_root = ? AND run_id = ?
2664
+ ORDER BY created_at ASC, action_id ASC
2665
+ `).all(projectRoot, runId);
2666
+ return rows.map(host_actions_1.mapHostActionRow);
2667
+ }
2668
+ transitionHostAction(identity, targetState, report, evidenceHash, requireNonEmptyReport = false) {
2669
+ if (!identity.actionId.trim())
2670
+ throw new Error('Host action requires an action ID');
2671
+ if (!identity.projectRoot.trim())
2672
+ throw new Error('Host action requires a project root');
2673
+ const reportJson = (0, host_actions_1.serializeHostActionReport)(report);
2674
+ if (requireNonEmptyReport && reportJson === '{}') {
2675
+ throw new Error('Host action verification requires a non-empty report');
2676
+ }
2677
+ return this.withImmediateTransaction(() => {
2678
+ const existing = this.getHostAction(identity.projectRoot, identity.actionId);
2679
+ if (!existing)
2680
+ throw new Error(`HOST_ACTION_NOT_FOUND:${identity.actionId}`);
2681
+ if (this.isTerminalHostActionState(existing.state)) {
2682
+ const identical = existing.state === targetState
2683
+ && existing.evidenceHash === evidenceHash
2684
+ && (0, host_actions_1.hostActionReportsEqual)(existing.report, report);
2685
+ if (identical)
2686
+ return existing;
2687
+ throw new Error(`HOST_ACTION_TERMINAL_CONFLICT:${identity.actionId}`);
2688
+ }
2689
+ if (!this.isLegalHostActionTransition(existing.state, targetState)) {
2690
+ throw new Error(`HOST_ACTION_INVALID_TRANSITION:${existing.state}->${targetState}`);
2691
+ }
2692
+ const now = Date.now();
2693
+ const finishedAt = this.isTerminalHostActionState(targetState) ? now : null;
2694
+ const result = this.db.prepare(`
2695
+ UPDATE devflow_host_actions
2696
+ SET state = ?, report_json = ?, evidence_hash = ?, updated_at = ?, finished_at = ?
2697
+ WHERE project_root = ? AND action_id = ? AND state = ?
2698
+ `).run(targetState, reportJson, evidenceHash ?? null, now, finishedAt, identity.projectRoot, identity.actionId, existing.state);
2699
+ if (result.changes !== 1) {
2700
+ throw new Error(`HOST_ACTION_UPDATE_CONFLICT:${identity.actionId}`);
2701
+ }
2702
+ const updated = this.getHostAction(identity.projectRoot, identity.actionId);
2703
+ this.appendHostActionEvent(updated, existing.state, targetState, now);
2704
+ return updated;
2705
+ });
2706
+ }
2707
+ appendHostActionEvent(record, fromState, toState, createdAt) {
2708
+ this.db.prepare(`
2709
+ INSERT INTO devflow_host_action_events (
2710
+ event_id, action_id, project_root, run_id, step_id, from_state,
2711
+ to_state, report_json, evidence_hash, created_at
2712
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2713
+ `).run((0, crypto_1.randomUUID)(), record.actionId, record.projectRoot, record.runId, record.stepId, fromState, toState, (0, host_actions_1.serializeHostActionReport)(record.report), record.evidenceHash ?? null, createdAt);
2714
+ }
2715
+ validateHostActionIdentity(input) {
2716
+ const fields = [
2717
+ ['run ID', input.runId],
2718
+ ['engine run ID', input.engineRunId],
2719
+ ['step ID', input.stepId],
2720
+ ['project root', input.projectRoot],
2721
+ ];
2722
+ for (const [name, value] of fields) {
2723
+ if (!value.trim())
2724
+ throw new Error(`Host action requires a ${name}`);
2725
+ }
2726
+ }
2727
+ withImmediateTransaction(operation) {
2728
+ this.db.exec('BEGIN IMMEDIATE');
2729
+ try {
2730
+ const result = operation();
2731
+ this.db.exec('COMMIT');
2732
+ return result;
2733
+ }
2734
+ catch (error) {
2735
+ try {
2736
+ this.db.exec('ROLLBACK');
2737
+ }
2738
+ catch { }
2739
+ throw error;
2740
+ }
2741
+ }
2742
+ isTerminalHostActionState(state) {
2743
+ return state === 'verified'
2744
+ || state === 'failed'
2745
+ || state === 'cancelled'
2746
+ || state === 'degraded';
2747
+ }
2748
+ isLegalHostActionTransition(fromState, toState) {
2749
+ if (fromState === 'waiting') {
2750
+ return toState === 'running'
2751
+ || toState === 'reported'
2752
+ || toState === 'failed'
2753
+ || toState === 'cancelled'
2754
+ || toState === 'degraded';
2755
+ }
2756
+ if (fromState === 'running') {
2757
+ return toState === 'reported'
2758
+ || toState === 'failed'
2759
+ || toState === 'cancelled'
2760
+ || toState === 'degraded';
2761
+ }
2762
+ if (fromState === 'reported') {
2763
+ return toState === 'verified'
2764
+ || toState === 'failed'
2765
+ || toState === 'cancelled'
2766
+ || toState === 'degraded';
2767
+ }
2768
+ return false;
2769
+ }
2520
2770
  // Convenience methods for raw SQL queries (used by AutoChecker)
2521
2771
  all(sql, ...params) {
2522
2772
  return this.db.prepare(sql).all(...params);
@@ -0,0 +1,47 @@
1
+ export type HostActionState = 'waiting' | 'running' | 'reported' | 'verified' | 'failed' | 'cancelled' | 'degraded';
2
+ export interface HostActionRecord {
3
+ actionId: string;
4
+ runId: string;
5
+ engineRunId: string;
6
+ stepId: string;
7
+ projectRoot: string;
8
+ sessionId?: string;
9
+ executionId?: string;
10
+ contextReceipt?: string;
11
+ state: HostActionState;
12
+ report: Record<string, unknown>;
13
+ evidenceHash?: string;
14
+ createdAt: number;
15
+ updatedAt: number;
16
+ finishedAt?: number;
17
+ }
18
+ export interface RequestHostActionInput {
19
+ actionId?: string;
20
+ runId: string;
21
+ engineRunId: string;
22
+ stepId: string;
23
+ projectRoot: string;
24
+ sessionId?: string;
25
+ executionId?: string;
26
+ contextReceipt?: string;
27
+ }
28
+ export interface StartHostActionInput {
29
+ actionId: string;
30
+ projectRoot: string;
31
+ }
32
+ export interface ReportHostActionInput {
33
+ actionId: string;
34
+ projectRoot: string;
35
+ report: Record<string, unknown>;
36
+ evidenceHash?: string;
37
+ }
38
+ export interface VerifyHostActionInput extends ReportHostActionInput {
39
+ evidenceHash: string;
40
+ }
41
+ export interface FailHostActionInput extends ReportHostActionInput {
42
+ outcome?: 'failed' | 'cancelled' | 'degraded';
43
+ }
44
+ export declare function isHostActionState(value: unknown): value is HostActionState;
45
+ export declare function mapHostActionRow(row: Record<string, unknown>): HostActionRecord;
46
+ export declare function serializeHostActionReport(report: Record<string, unknown>): string;
47
+ export declare function hostActionReportsEqual(left: Record<string, unknown>, right: Record<string, unknown>): boolean;
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isHostActionState = isHostActionState;
4
+ exports.mapHostActionRow = mapHostActionRow;
5
+ exports.serializeHostActionReport = serializeHostActionReport;
6
+ exports.hostActionReportsEqual = hostActionReportsEqual;
7
+ const HOST_ACTION_STATES = new Set([
8
+ 'waiting',
9
+ 'running',
10
+ 'reported',
11
+ 'verified',
12
+ 'failed',
13
+ 'cancelled',
14
+ 'degraded',
15
+ ]);
16
+ function isHostActionState(value) {
17
+ return typeof value === 'string' && HOST_ACTION_STATES.has(value);
18
+ }
19
+ function mapHostActionRow(row) {
20
+ if (!isHostActionState(row.state)) {
21
+ throw new Error(`Invalid persisted host action state: ${String(row.state)}`);
22
+ }
23
+ return {
24
+ actionId: asRequiredString(row.action_id, 'action_id'),
25
+ runId: asRequiredString(row.run_id, 'run_id'),
26
+ engineRunId: asRequiredString(row.engine_run_id, 'engine_run_id'),
27
+ stepId: asRequiredString(row.step_id, 'step_id'),
28
+ projectRoot: asRequiredString(row.project_root, 'project_root'),
29
+ sessionId: asOptionalString(row.session_id),
30
+ executionId: asOptionalString(row.execution_id),
31
+ contextReceipt: asOptionalString(row.context_receipt),
32
+ state: row.state,
33
+ report: parseReport(row.report_json),
34
+ evidenceHash: asOptionalString(row.evidence_hash),
35
+ createdAt: asFiniteNumber(row.created_at, 'created_at'),
36
+ updatedAt: asFiniteNumber(row.updated_at, 'updated_at'),
37
+ finishedAt: asOptionalFiniteNumber(row.finished_at),
38
+ };
39
+ }
40
+ function serializeHostActionReport(report) {
41
+ if (!isPlainObject(report))
42
+ throw new Error('Host action report must be a plain object');
43
+ return JSON.stringify(canonicalizeJson(report, '$', new WeakSet()));
44
+ }
45
+ function hostActionReportsEqual(left, right) {
46
+ return serializeHostActionReport(left) === serializeHostActionReport(right);
47
+ }
48
+ function parseReport(value) {
49
+ if (typeof value !== 'string') {
50
+ throw new Error('Invalid persisted host action report_json: expected JSON text');
51
+ }
52
+ try {
53
+ const parsed = JSON.parse(value);
54
+ if (!isPlainObject(parsed)) {
55
+ throw new Error('expected a JSON object');
56
+ }
57
+ serializeHostActionReport(parsed);
58
+ return parsed;
59
+ }
60
+ catch (error) {
61
+ const detail = error instanceof Error ? error.message : String(error);
62
+ throw new Error(`Invalid persisted host action report_json: ${detail}`);
63
+ }
64
+ }
65
+ function canonicalizeJson(value, path, ancestors) {
66
+ if (value === null || typeof value === 'string' || typeof value === 'boolean')
67
+ return value;
68
+ if (typeof value === 'number') {
69
+ if (!Number.isFinite(value) || Object.is(value, -0)) {
70
+ throw nonJsonValueError(path);
71
+ }
72
+ return value;
73
+ }
74
+ if (typeof value !== 'object')
75
+ throw nonJsonValueError(path);
76
+ if (ancestors.has(value))
77
+ throw new Error(`Host action report contains a cycle at ${path}`);
78
+ ancestors.add(value);
79
+ try {
80
+ if (Array.isArray(value))
81
+ return canonicalizeArray(value, path, ancestors);
82
+ if (!isPlainObject(value))
83
+ throw nonJsonValueError(path);
84
+ const result = Object.create(null);
85
+ const keys = Reflect.ownKeys(value);
86
+ for (const key of keys) {
87
+ if (typeof key !== 'string')
88
+ throw nonJsonValueError(`${path}[symbol]`);
89
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
90
+ if (!descriptor?.enumerable || !('value' in descriptor)) {
91
+ throw nonJsonValueError(`${path}.${key}`);
92
+ }
93
+ }
94
+ for (const key of keys.slice().sort(comparePropertyKeys)) {
95
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
96
+ result[key] = canonicalizeJson(descriptor.value, `${path}.${key}`, ancestors);
97
+ }
98
+ return result;
99
+ }
100
+ finally {
101
+ ancestors.delete(value);
102
+ }
103
+ }
104
+ function canonicalizeArray(value, path, ancestors) {
105
+ if (Object.getPrototypeOf(value) !== Array.prototype)
106
+ throw nonJsonValueError(path);
107
+ const keys = Reflect.ownKeys(value);
108
+ const expectedKeys = new Set(['length', ...Array.from({ length: value.length }, (_, index) => String(index))]);
109
+ if (keys.some(key => typeof key !== 'string' || !expectedKeys.has(key))) {
110
+ throw nonJsonValueError(path);
111
+ }
112
+ return Array.from({ length: value.length }, (_, index) => {
113
+ const descriptor = Object.getOwnPropertyDescriptor(value, String(index));
114
+ if (!descriptor?.enumerable || !('value' in descriptor)) {
115
+ throw nonJsonValueError(`${path}[${index}]`);
116
+ }
117
+ return canonicalizeJson(descriptor.value, `${path}[${index}]`, ancestors);
118
+ });
119
+ }
120
+ function comparePropertyKeys(left, right) {
121
+ return left < right ? -1 : left > right ? 1 : 0;
122
+ }
123
+ function nonJsonValueError(path) {
124
+ return new Error(`Host action report contains a non-JSON value at ${path}`);
125
+ }
126
+ function isPlainObject(value) {
127
+ if (value === null || typeof value !== 'object' || Array.isArray(value))
128
+ return false;
129
+ const prototype = Object.getPrototypeOf(value);
130
+ return prototype === Object.prototype || prototype === null;
131
+ }
132
+ function asRequiredString(value, column) {
133
+ if (typeof value !== 'string' || value.length === 0) {
134
+ throw new Error(`Invalid persisted host action ${column}`);
135
+ }
136
+ return value;
137
+ }
138
+ function asOptionalString(value) {
139
+ return typeof value === 'string' ? value : undefined;
140
+ }
141
+ function asFiniteNumber(value, column) {
142
+ const number = Number(value);
143
+ if (!Number.isFinite(number))
144
+ throw new Error(`Invalid persisted host action ${column}`);
145
+ return number;
146
+ }
147
+ function asOptionalFiniteNumber(value) {
148
+ if (value === null || value === undefined)
149
+ return undefined;
150
+ const number = Number(value);
151
+ return Number.isFinite(number) ? number : undefined;
152
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export { DevFlowDatabase, getGlobalDevFlowDbPath, openGlobalDevFlowDatabase, } from './database';
2
2
  export type { BenchmarkReportMetaRecord, BenchmarkReportRecord, FeedbackRecord, GovernanceAuditRecord, GovernanceRuleRecord, HookFallbackRecord, HookReceiptRecord, ContextReceiptRecord, ContextSelectionEventRecord, MemoryDistillCheckpointRecord, MemoryTurnRecord, MemoryTurnStatus, TelemetryFailureRecord, } from './database';
3
3
  export type { EnqueueWorkInput, LeaseWorkInput, RequestSessionClosureInput, SessionClosureRecord, SessionClosureState, WorkError, WorkItemRecord, WorkKind, WorkQueueHealth, WorkState, } from './work-queue';
4
+ export { hostActionReportsEqual, isHostActionState, mapHostActionRow, serializeHostActionReport, } from './host-actions';
5
+ export type { FailHostActionInput, HostActionRecord, HostActionState, ReportHostActionInput, RequestHostActionInput, StartHostActionInput, VerifyHostActionInput, } from './host-actions';
4
6
  export { mapSessionObligationRow, normalizeTurnId, } from './obligation-ledger';
5
7
  export type { SessionObligationKind, SessionObligationRecord, SessionObligationState, } from './obligation-ledger';
package/dist/index.js CHANGED
@@ -1,10 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizeTurnId = exports.mapSessionObligationRow = exports.openGlobalDevFlowDatabase = exports.getGlobalDevFlowDbPath = exports.DevFlowDatabase = void 0;
3
+ exports.normalizeTurnId = exports.mapSessionObligationRow = exports.serializeHostActionReport = exports.mapHostActionRow = exports.isHostActionState = exports.hostActionReportsEqual = exports.openGlobalDevFlowDatabase = exports.getGlobalDevFlowDbPath = exports.DevFlowDatabase = void 0;
4
4
  var database_1 = require("./database");
5
5
  Object.defineProperty(exports, "DevFlowDatabase", { enumerable: true, get: function () { return database_1.DevFlowDatabase; } });
6
6
  Object.defineProperty(exports, "getGlobalDevFlowDbPath", { enumerable: true, get: function () { return database_1.getGlobalDevFlowDbPath; } });
7
7
  Object.defineProperty(exports, "openGlobalDevFlowDatabase", { enumerable: true, get: function () { return database_1.openGlobalDevFlowDatabase; } });
8
+ var host_actions_1 = require("./host-actions");
9
+ Object.defineProperty(exports, "hostActionReportsEqual", { enumerable: true, get: function () { return host_actions_1.hostActionReportsEqual; } });
10
+ Object.defineProperty(exports, "isHostActionState", { enumerable: true, get: function () { return host_actions_1.isHostActionState; } });
11
+ Object.defineProperty(exports, "mapHostActionRow", { enumerable: true, get: function () { return host_actions_1.mapHostActionRow; } });
12
+ Object.defineProperty(exports, "serializeHostActionReport", { enumerable: true, get: function () { return host_actions_1.serializeHostActionReport; } });
8
13
  var obligation_ledger_1 = require("./obligation-ledger");
9
14
  Object.defineProperty(exports, "mapSessionObligationRow", { enumerable: true, get: function () { return obligation_ledger_1.mapSessionObligationRow; } });
10
15
  Object.defineProperty(exports, "normalizeTurnId", { enumerable: true, get: function () { return obligation_ledger_1.normalizeTurnId; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devflow-tools/database",
3
- "version": "0.16.17",
3
+ "version": "0.16.19",
4
4
  "description": "DevFlow SQLite database package",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",