@dudousxd/nestjs-agent-store-drizzle 0.24.0 → 0.26.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/README.md +128 -22
- package/dist/index.cjs +889 -171
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2047 -490
- package/dist/index.d.ts +2047 -490
- package/dist/index.js +832 -116
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import * as _dudousxd_nestjs_agent_core from '@dudousxd/nestjs-agent-core';
|
|
2
|
+
import { MessageRole, ToolCallRequest, ToolResult, MessageAttachment, MessageUsage, AgentUiComponent, MessageFeedback, Actor, PageContext, QueuePause, ActionProposal, ToolKind, ToolCallStatus, ToolConfirmation, UsagePurpose, AgentStore, ThreadTurnReader, ChatQueueStore, ActionProposalStore, ActionProposalWorkerStore, ActionProposalDiscoveryIndexStore, ActionProposalOutcomeStore, ActionProposalStoreOptions, ActionProposalSupersessionStore, CreateThreadInput, ThreadSummary, ThreadDetail, ThreadTurnQuery, ThreadTurnPage, ToolCallApprovalState, EnqueueMessageInput, QueuedMessage, QueuedMessagePatch, UpdateThreadInput, RecordRunStartInput, AppendMessageInput, StoredMessage, RecordToolCallInput, UpdateToolCallInput, ToolCallOutcome, RecordUsageInput, CreateActionProposal, CreateActionProposalResult, ActionProposalScope, ActionProposalMutationResult, ListActionProposals, ActionProposalDecisionCommand, ClaimActionProposal, ExtendActionProposalLease, SettleActionProposal, ActionProposalOutcomeLease, AgentGovernanceQueries, AgentPricingStore, GovernanceRange, ModelSpendRow, ActorSpendRow, ThreadSpendRow, UsageTrendPoint, ToolCallActivityRow, ThreadActivityRow, RunMetrics, RunAgentBreakdownRow, RunErrorBreakdownRow, RunTrendPoint, RecentRunRow, PendingApprovalRow, ToolStatRow, GovernancePageQuery, ToolCallWhere, GovernancePage, ThreadWhere, RunWhere, ApprovalWhere, GovernanceRunDetail, GovernanceThreadDetailQuery, GovernanceThreadDetail, MemoryProvider, ListMemoriesInput, MemoryRecord, ForgetMemoryInput, StoreMemoryInput, ModelPriceInput, CurrentModelPrice, StreamFrameTable, StreamFrameRow, SqlTokenStreamSink, SqlTokenStreamSinkOptions, ConfirmTokenStore, ConfirmTokenClaim } from '@dudousxd/nestjs-agent-core';
|
|
3
|
+
export { ThreadTurnPage, ThreadTurnQuery } from '@dudousxd/nestjs-agent-core';
|
|
1
4
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
2
5
|
import { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
3
|
-
import {
|
|
4
|
-
export { ThreadTurnPage, ThreadTurnQuery } from '@dudousxd/nestjs-agent-core';
|
|
6
|
+
import { UiCapabilities } from '@dudousxd/nestjs-agent-core/genui';
|
|
5
7
|
import { TablesRelationalConfig, SQL } from 'drizzle-orm';
|
|
6
8
|
import * as drizzle_orm_mysql_core from 'drizzle-orm/mysql-core';
|
|
7
9
|
import { MySqlDatabase, MySqlQueryResultHKT, PreparedQueryHKTBase } from 'drizzle-orm/mysql-core';
|
|
@@ -353,6 +355,25 @@ declare const agentMessage: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
353
355
|
length: number | undefined;
|
|
354
356
|
$type: MessageRole;
|
|
355
357
|
}>;
|
|
358
|
+
actionProposalOutcome: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
359
|
+
name: "action_proposal_outcome";
|
|
360
|
+
tableName: "agent_message";
|
|
361
|
+
dataType: "string";
|
|
362
|
+
columnType: "SQLiteText";
|
|
363
|
+
data: string;
|
|
364
|
+
driverParam: string;
|
|
365
|
+
notNull: false;
|
|
366
|
+
hasDefault: false;
|
|
367
|
+
isPrimaryKey: false;
|
|
368
|
+
isAutoincrement: false;
|
|
369
|
+
hasRuntimeDefault: false;
|
|
370
|
+
enumValues: [string, ...string[]];
|
|
371
|
+
baseColumn: never;
|
|
372
|
+
identity: undefined;
|
|
373
|
+
generated: undefined;
|
|
374
|
+
}, {}, {
|
|
375
|
+
length: number | undefined;
|
|
376
|
+
}>;
|
|
356
377
|
content: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
357
378
|
name: "content";
|
|
358
379
|
tableName: "agent_message";
|
|
@@ -646,6 +667,25 @@ declare const agentToolCall: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
646
667
|
name: "agent_tool_call";
|
|
647
668
|
schema: undefined;
|
|
648
669
|
columns: {
|
|
670
|
+
proposalId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
671
|
+
name: "proposal_id";
|
|
672
|
+
tableName: "agent_tool_call";
|
|
673
|
+
dataType: "string";
|
|
674
|
+
columnType: "SQLiteText";
|
|
675
|
+
data: string;
|
|
676
|
+
driverParam: string;
|
|
677
|
+
notNull: false;
|
|
678
|
+
hasDefault: false;
|
|
679
|
+
isPrimaryKey: false;
|
|
680
|
+
isAutoincrement: false;
|
|
681
|
+
hasRuntimeDefault: false;
|
|
682
|
+
enumValues: [string, ...string[]];
|
|
683
|
+
baseColumn: never;
|
|
684
|
+
identity: undefined;
|
|
685
|
+
generated: undefined;
|
|
686
|
+
}, {}, {
|
|
687
|
+
length: number | undefined;
|
|
688
|
+
}>;
|
|
649
689
|
id: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
650
690
|
name: "id";
|
|
651
691
|
tableName: "agent_tool_call";
|
|
@@ -885,6 +925,25 @@ declare const agentToolCall: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
885
925
|
}, {}, {
|
|
886
926
|
length: number | undefined;
|
|
887
927
|
}>;
|
|
928
|
+
confirmation: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
929
|
+
name: "confirmation";
|
|
930
|
+
tableName: "agent_tool_call";
|
|
931
|
+
dataType: "json";
|
|
932
|
+
columnType: "SQLiteTextJson";
|
|
933
|
+
data: ToolConfirmation;
|
|
934
|
+
driverParam: string;
|
|
935
|
+
notNull: false;
|
|
936
|
+
hasDefault: false;
|
|
937
|
+
isPrimaryKey: false;
|
|
938
|
+
isAutoincrement: false;
|
|
939
|
+
hasRuntimeDefault: false;
|
|
940
|
+
enumValues: undefined;
|
|
941
|
+
baseColumn: never;
|
|
942
|
+
identity: undefined;
|
|
943
|
+
generated: undefined;
|
|
944
|
+
}, {}, {
|
|
945
|
+
$type: ToolConfirmation;
|
|
946
|
+
}>;
|
|
888
947
|
approver: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
889
948
|
name: "approver";
|
|
890
949
|
tableName: "agent_tool_call";
|
|
@@ -970,6 +1029,25 @@ declare const agentQueuedMessage: drizzle_orm_sqlite_core.SQLiteTableWithColumns
|
|
|
970
1029
|
name: "agent_queued_message";
|
|
971
1030
|
schema: undefined;
|
|
972
1031
|
columns: {
|
|
1032
|
+
uiCapabilities: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1033
|
+
name: "ui_capabilities";
|
|
1034
|
+
tableName: "agent_queued_message";
|
|
1035
|
+
dataType: "json";
|
|
1036
|
+
columnType: "SQLiteTextJson";
|
|
1037
|
+
data: UiCapabilities;
|
|
1038
|
+
driverParam: string;
|
|
1039
|
+
notNull: false;
|
|
1040
|
+
hasDefault: false;
|
|
1041
|
+
isPrimaryKey: false;
|
|
1042
|
+
isAutoincrement: false;
|
|
1043
|
+
hasRuntimeDefault: false;
|
|
1044
|
+
enumValues: undefined;
|
|
1045
|
+
baseColumn: never;
|
|
1046
|
+
identity: undefined;
|
|
1047
|
+
generated: undefined;
|
|
1048
|
+
}, {}, {
|
|
1049
|
+
$type: UiCapabilities;
|
|
1050
|
+
}>;
|
|
973
1051
|
id: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
974
1052
|
name: "id";
|
|
975
1053
|
tableName: "agent_queued_message";
|
|
@@ -2546,196 +2624,799 @@ declare const agentStreamFrame: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
2546
2624
|
};
|
|
2547
2625
|
dialect: "sqlite";
|
|
2548
2626
|
}>;
|
|
2549
|
-
/**
|
|
2550
|
-
declare const
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2627
|
+
/** Independent action proposals; decision and execution work commit in one fenced row. */
|
|
2628
|
+
declare const agentActionProposal: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
2629
|
+
name: "agent_action_proposal";
|
|
2630
|
+
schema: undefined;
|
|
2631
|
+
columns: {
|
|
2632
|
+
id: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2633
|
+
name: "id";
|
|
2634
|
+
tableName: "agent_action_proposal";
|
|
2635
|
+
dataType: "string";
|
|
2636
|
+
columnType: "SQLiteText";
|
|
2637
|
+
data: string;
|
|
2638
|
+
driverParam: string;
|
|
2639
|
+
notNull: true;
|
|
2640
|
+
hasDefault: false;
|
|
2641
|
+
isPrimaryKey: true;
|
|
2642
|
+
isAutoincrement: false;
|
|
2643
|
+
hasRuntimeDefault: false;
|
|
2644
|
+
enumValues: [string, ...string[]];
|
|
2645
|
+
baseColumn: never;
|
|
2646
|
+
identity: undefined;
|
|
2647
|
+
generated: undefined;
|
|
2648
|
+
}, {}, {
|
|
2649
|
+
length: number | undefined;
|
|
2650
|
+
}>;
|
|
2651
|
+
scopeKey: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2652
|
+
name: "scope_key";
|
|
2653
|
+
tableName: "agent_action_proposal";
|
|
2654
|
+
dataType: "string";
|
|
2655
|
+
columnType: "SQLiteText";
|
|
2656
|
+
data: string;
|
|
2657
|
+
driverParam: string;
|
|
2658
|
+
notNull: true;
|
|
2659
|
+
hasDefault: false;
|
|
2660
|
+
isPrimaryKey: false;
|
|
2661
|
+
isAutoincrement: false;
|
|
2662
|
+
hasRuntimeDefault: false;
|
|
2663
|
+
enumValues: [string, ...string[]];
|
|
2664
|
+
baseColumn: never;
|
|
2665
|
+
identity: undefined;
|
|
2666
|
+
generated: undefined;
|
|
2667
|
+
}, {}, {
|
|
2668
|
+
length: number | undefined;
|
|
2669
|
+
}>;
|
|
2670
|
+
decision: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2671
|
+
name: "decision";
|
|
2672
|
+
tableName: "agent_action_proposal";
|
|
2673
|
+
dataType: "string";
|
|
2674
|
+
columnType: "SQLiteText";
|
|
2675
|
+
data: _dudousxd_nestjs_agent_core.ActionProposalDecision;
|
|
2676
|
+
driverParam: string;
|
|
2677
|
+
notNull: true;
|
|
2678
|
+
hasDefault: false;
|
|
2679
|
+
isPrimaryKey: false;
|
|
2680
|
+
isAutoincrement: false;
|
|
2681
|
+
hasRuntimeDefault: false;
|
|
2682
|
+
enumValues: [string, ...string[]];
|
|
2683
|
+
baseColumn: never;
|
|
2684
|
+
identity: undefined;
|
|
2685
|
+
generated: undefined;
|
|
2686
|
+
}, {}, {
|
|
2687
|
+
length: number | undefined;
|
|
2688
|
+
$type: _dudousxd_nestjs_agent_core.ActionProposalDecision;
|
|
2689
|
+
}>;
|
|
2690
|
+
logicalSort: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2691
|
+
name: "logical_sort";
|
|
2692
|
+
tableName: "agent_action_proposal";
|
|
2693
|
+
dataType: "string";
|
|
2694
|
+
columnType: "SQLiteText";
|
|
2695
|
+
data: string;
|
|
2696
|
+
driverParam: string;
|
|
2697
|
+
notNull: true;
|
|
2698
|
+
hasDefault: false;
|
|
2699
|
+
isPrimaryKey: false;
|
|
2700
|
+
isAutoincrement: false;
|
|
2701
|
+
hasRuntimeDefault: false;
|
|
2702
|
+
enumValues: [string, ...string[]];
|
|
2703
|
+
baseColumn: never;
|
|
2704
|
+
identity: undefined;
|
|
2705
|
+
generated: undefined;
|
|
2706
|
+
}, {}, {
|
|
2707
|
+
length: number | undefined;
|
|
2708
|
+
}>;
|
|
2709
|
+
createFingerprint: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2710
|
+
name: "create_fingerprint";
|
|
2711
|
+
tableName: "agent_action_proposal";
|
|
2712
|
+
dataType: "string";
|
|
2713
|
+
columnType: "SQLiteText";
|
|
2714
|
+
data: string;
|
|
2715
|
+
driverParam: string;
|
|
2716
|
+
notNull: true;
|
|
2717
|
+
hasDefault: false;
|
|
2718
|
+
isPrimaryKey: false;
|
|
2719
|
+
isAutoincrement: false;
|
|
2720
|
+
hasRuntimeDefault: false;
|
|
2721
|
+
enumValues: [string, ...string[]];
|
|
2722
|
+
baseColumn: never;
|
|
2723
|
+
identity: undefined;
|
|
2724
|
+
generated: undefined;
|
|
2725
|
+
}, {}, {
|
|
2726
|
+
length: number | undefined;
|
|
2727
|
+
}>;
|
|
2728
|
+
proposal: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2729
|
+
name: "proposal";
|
|
2730
|
+
tableName: "agent_action_proposal";
|
|
2731
|
+
dataType: "json";
|
|
2732
|
+
columnType: "SQLiteTextJson";
|
|
2733
|
+
data: ActionProposal;
|
|
2734
|
+
driverParam: string;
|
|
2735
|
+
notNull: true;
|
|
2736
|
+
hasDefault: false;
|
|
2737
|
+
isPrimaryKey: false;
|
|
2738
|
+
isAutoincrement: false;
|
|
2739
|
+
hasRuntimeDefault: false;
|
|
2740
|
+
enumValues: undefined;
|
|
2741
|
+
baseColumn: never;
|
|
2742
|
+
identity: undefined;
|
|
2743
|
+
generated: undefined;
|
|
2744
|
+
}, {}, {
|
|
2745
|
+
$type: ActionProposal;
|
|
2746
|
+
}>;
|
|
2747
|
+
version: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2748
|
+
name: "version";
|
|
2749
|
+
tableName: "agent_action_proposal";
|
|
2750
|
+
dataType: "number";
|
|
2751
|
+
columnType: "SQLiteInteger";
|
|
2752
|
+
data: number;
|
|
2753
|
+
driverParam: number;
|
|
2754
|
+
notNull: true;
|
|
2755
|
+
hasDefault: true;
|
|
2756
|
+
isPrimaryKey: false;
|
|
2757
|
+
isAutoincrement: false;
|
|
2758
|
+
hasRuntimeDefault: false;
|
|
2759
|
+
enumValues: undefined;
|
|
2760
|
+
baseColumn: never;
|
|
2761
|
+
identity: undefined;
|
|
2762
|
+
generated: undefined;
|
|
2763
|
+
}, {}, {}>;
|
|
2764
|
+
executionStatus: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2765
|
+
name: "execution_status";
|
|
2766
|
+
tableName: "agent_action_proposal";
|
|
2767
|
+
dataType: "string";
|
|
2768
|
+
columnType: "SQLiteText";
|
|
2769
|
+
data: "failed" | "queued" | "executing" | "succeeded";
|
|
2770
|
+
driverParam: string;
|
|
2771
|
+
notNull: false;
|
|
2772
|
+
hasDefault: false;
|
|
2773
|
+
isPrimaryKey: false;
|
|
2774
|
+
isAutoincrement: false;
|
|
2775
|
+
hasRuntimeDefault: false;
|
|
2776
|
+
enumValues: [string, ...string[]];
|
|
2777
|
+
baseColumn: never;
|
|
2778
|
+
identity: undefined;
|
|
2779
|
+
generated: undefined;
|
|
2780
|
+
}, {}, {
|
|
2781
|
+
length: number | undefined;
|
|
2782
|
+
$type: "failed" | "queued" | "executing" | "succeeded";
|
|
2783
|
+
}>;
|
|
2784
|
+
leaseExpiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2785
|
+
name: "lease_expires_at";
|
|
2786
|
+
tableName: "agent_action_proposal";
|
|
2787
|
+
dataType: "number";
|
|
2788
|
+
columnType: "SQLiteInteger";
|
|
2789
|
+
data: number;
|
|
2790
|
+
driverParam: number;
|
|
2791
|
+
notNull: false;
|
|
2792
|
+
hasDefault: false;
|
|
2793
|
+
isPrimaryKey: false;
|
|
2794
|
+
isAutoincrement: false;
|
|
2795
|
+
hasRuntimeDefault: false;
|
|
2796
|
+
enumValues: undefined;
|
|
2797
|
+
baseColumn: never;
|
|
2798
|
+
identity: undefined;
|
|
2799
|
+
generated: undefined;
|
|
2800
|
+
}, {}, {}>;
|
|
2801
|
+
deliveryStatus: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2802
|
+
name: "delivery_status";
|
|
2803
|
+
tableName: "agent_action_proposal";
|
|
2804
|
+
dataType: "string";
|
|
2805
|
+
columnType: "SQLiteText";
|
|
2806
|
+
data: string;
|
|
2807
|
+
driverParam: string;
|
|
2808
|
+
notNull: false;
|
|
2809
|
+
hasDefault: false;
|
|
2810
|
+
isPrimaryKey: false;
|
|
2811
|
+
isAutoincrement: false;
|
|
2812
|
+
hasRuntimeDefault: false;
|
|
2813
|
+
enumValues: [string, ...string[]];
|
|
2814
|
+
baseColumn: never;
|
|
2815
|
+
identity: undefined;
|
|
2816
|
+
generated: undefined;
|
|
2817
|
+
}, {}, {
|
|
2818
|
+
length: number | undefined;
|
|
2819
|
+
}>;
|
|
2820
|
+
deliveryLeaseExpiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2821
|
+
name: "delivery_lease_expires_at";
|
|
2822
|
+
tableName: "agent_action_proposal";
|
|
2823
|
+
dataType: "number";
|
|
2824
|
+
columnType: "SQLiteInteger";
|
|
2825
|
+
data: number;
|
|
2826
|
+
driverParam: number;
|
|
2827
|
+
notNull: false;
|
|
2828
|
+
hasDefault: false;
|
|
2829
|
+
isPrimaryKey: false;
|
|
2830
|
+
isAutoincrement: false;
|
|
2831
|
+
hasRuntimeDefault: false;
|
|
2832
|
+
enumValues: undefined;
|
|
2833
|
+
baseColumn: never;
|
|
2834
|
+
identity: undefined;
|
|
2835
|
+
generated: undefined;
|
|
2836
|
+
}, {}, {}>;
|
|
2837
|
+
replacementGroupKey: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2838
|
+
name: "replacement_group_key";
|
|
2839
|
+
tableName: "agent_action_proposal";
|
|
2840
|
+
dataType: "string";
|
|
2841
|
+
columnType: "SQLiteText";
|
|
2842
|
+
data: string;
|
|
2843
|
+
driverParam: string;
|
|
2844
|
+
notNull: false;
|
|
2845
|
+
hasDefault: false;
|
|
2846
|
+
isPrimaryKey: false;
|
|
2847
|
+
isAutoincrement: false;
|
|
2848
|
+
hasRuntimeDefault: false;
|
|
2849
|
+
enumValues: [string, ...string[]];
|
|
2850
|
+
baseColumn: never;
|
|
2851
|
+
identity: undefined;
|
|
2852
|
+
generated: undefined;
|
|
2853
|
+
}, {}, {
|
|
2854
|
+
length: number | undefined;
|
|
2855
|
+
}>;
|
|
2856
|
+
outcomeIdKey: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2857
|
+
name: "outcome_id_key";
|
|
2858
|
+
tableName: "agent_action_proposal";
|
|
2859
|
+
dataType: "string";
|
|
2860
|
+
columnType: "SQLiteText";
|
|
2861
|
+
data: string;
|
|
2862
|
+
driverParam: string;
|
|
2863
|
+
notNull: false;
|
|
2864
|
+
hasDefault: false;
|
|
2865
|
+
isPrimaryKey: false;
|
|
2866
|
+
isAutoincrement: false;
|
|
2867
|
+
hasRuntimeDefault: false;
|
|
2868
|
+
enumValues: [string, ...string[]];
|
|
2869
|
+
baseColumn: never;
|
|
2870
|
+
identity: undefined;
|
|
2871
|
+
generated: undefined;
|
|
2872
|
+
}, {}, {
|
|
2873
|
+
length: number | undefined;
|
|
2874
|
+
}>;
|
|
2875
|
+
proposalExpiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2876
|
+
name: "proposal_expires_at";
|
|
2877
|
+
tableName: "agent_action_proposal";
|
|
2878
|
+
dataType: "number";
|
|
2879
|
+
columnType: "SQLiteInteger";
|
|
2880
|
+
data: number;
|
|
2881
|
+
driverParam: number;
|
|
2882
|
+
notNull: false;
|
|
2883
|
+
hasDefault: false;
|
|
2884
|
+
isPrimaryKey: false;
|
|
2885
|
+
isAutoincrement: false;
|
|
2886
|
+
hasRuntimeDefault: false;
|
|
2887
|
+
enumValues: undefined;
|
|
2888
|
+
baseColumn: never;
|
|
2889
|
+
identity: undefined;
|
|
2890
|
+
generated: undefined;
|
|
2891
|
+
}, {}, {}>;
|
|
2892
|
+
discoveryIndexVersion: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2893
|
+
name: "discovery_index_version";
|
|
2894
|
+
tableName: "agent_action_proposal";
|
|
2895
|
+
dataType: "number";
|
|
2896
|
+
columnType: "SQLiteInteger";
|
|
2897
|
+
data: number;
|
|
2898
|
+
driverParam: number;
|
|
2899
|
+
notNull: true;
|
|
2900
|
+
hasDefault: true;
|
|
2901
|
+
isPrimaryKey: false;
|
|
2902
|
+
isAutoincrement: false;
|
|
2903
|
+
hasRuntimeDefault: false;
|
|
2904
|
+
enumValues: undefined;
|
|
2905
|
+
baseColumn: never;
|
|
2906
|
+
identity: undefined;
|
|
2907
|
+
generated: undefined;
|
|
2908
|
+
}, {}, {}>;
|
|
2909
|
+
createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2910
|
+
name: "created_at";
|
|
2911
|
+
tableName: "agent_action_proposal";
|
|
2912
|
+
dataType: "number";
|
|
2913
|
+
columnType: "SQLiteInteger";
|
|
2914
|
+
data: number;
|
|
2915
|
+
driverParam: number;
|
|
2916
|
+
notNull: true;
|
|
2917
|
+
hasDefault: false;
|
|
2918
|
+
isPrimaryKey: false;
|
|
2919
|
+
isAutoincrement: false;
|
|
2920
|
+
hasRuntimeDefault: false;
|
|
2921
|
+
enumValues: undefined;
|
|
2922
|
+
baseColumn: never;
|
|
2923
|
+
identity: undefined;
|
|
2924
|
+
generated: undefined;
|
|
2925
|
+
}, {}, {}>;
|
|
2926
|
+
};
|
|
2927
|
+
dialect: "sqlite";
|
|
2928
|
+
}>;
|
|
2929
|
+
/** The tables this store owns, as one schema object, ready for `drizzle(client, { schema })`. */
|
|
2930
|
+
declare const agentSchema: {
|
|
2931
|
+
agentActionProposal: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
2932
|
+
name: "agent_action_proposal";
|
|
2933
|
+
schema: undefined;
|
|
2934
|
+
columns: {
|
|
2935
|
+
id: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2936
|
+
name: "id";
|
|
2937
|
+
tableName: "agent_action_proposal";
|
|
2938
|
+
dataType: "string";
|
|
2939
|
+
columnType: "SQLiteText";
|
|
2940
|
+
data: string;
|
|
2941
|
+
driverParam: string;
|
|
2942
|
+
notNull: true;
|
|
2943
|
+
hasDefault: false;
|
|
2944
|
+
isPrimaryKey: true;
|
|
2945
|
+
isAutoincrement: false;
|
|
2946
|
+
hasRuntimeDefault: false;
|
|
2947
|
+
enumValues: [string, ...string[]];
|
|
2948
|
+
baseColumn: never;
|
|
2949
|
+
identity: undefined;
|
|
2950
|
+
generated: undefined;
|
|
2951
|
+
}, {}, {
|
|
2952
|
+
length: number | undefined;
|
|
2953
|
+
}>;
|
|
2954
|
+
scopeKey: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2955
|
+
name: "scope_key";
|
|
2956
|
+
tableName: "agent_action_proposal";
|
|
2957
|
+
dataType: "string";
|
|
2958
|
+
columnType: "SQLiteText";
|
|
2959
|
+
data: string;
|
|
2960
|
+
driverParam: string;
|
|
2961
|
+
notNull: true;
|
|
2962
|
+
hasDefault: false;
|
|
2963
|
+
isPrimaryKey: false;
|
|
2964
|
+
isAutoincrement: false;
|
|
2965
|
+
hasRuntimeDefault: false;
|
|
2966
|
+
enumValues: [string, ...string[]];
|
|
2967
|
+
baseColumn: never;
|
|
2968
|
+
identity: undefined;
|
|
2969
|
+
generated: undefined;
|
|
2970
|
+
}, {}, {
|
|
2971
|
+
length: number | undefined;
|
|
2972
|
+
}>;
|
|
2973
|
+
decision: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2974
|
+
name: "decision";
|
|
2975
|
+
tableName: "agent_action_proposal";
|
|
2976
|
+
dataType: "string";
|
|
2977
|
+
columnType: "SQLiteText";
|
|
2978
|
+
data: _dudousxd_nestjs_agent_core.ActionProposalDecision;
|
|
2979
|
+
driverParam: string;
|
|
2980
|
+
notNull: true;
|
|
2981
|
+
hasDefault: false;
|
|
2982
|
+
isPrimaryKey: false;
|
|
2983
|
+
isAutoincrement: false;
|
|
2984
|
+
hasRuntimeDefault: false;
|
|
2985
|
+
enumValues: [string, ...string[]];
|
|
2986
|
+
baseColumn: never;
|
|
2987
|
+
identity: undefined;
|
|
2988
|
+
generated: undefined;
|
|
2989
|
+
}, {}, {
|
|
2990
|
+
length: number | undefined;
|
|
2991
|
+
$type: _dudousxd_nestjs_agent_core.ActionProposalDecision;
|
|
2992
|
+
}>;
|
|
2993
|
+
logicalSort: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2994
|
+
name: "logical_sort";
|
|
2995
|
+
tableName: "agent_action_proposal";
|
|
2996
|
+
dataType: "string";
|
|
2997
|
+
columnType: "SQLiteText";
|
|
2998
|
+
data: string;
|
|
2999
|
+
driverParam: string;
|
|
3000
|
+
notNull: true;
|
|
3001
|
+
hasDefault: false;
|
|
3002
|
+
isPrimaryKey: false;
|
|
3003
|
+
isAutoincrement: false;
|
|
3004
|
+
hasRuntimeDefault: false;
|
|
3005
|
+
enumValues: [string, ...string[]];
|
|
3006
|
+
baseColumn: never;
|
|
3007
|
+
identity: undefined;
|
|
3008
|
+
generated: undefined;
|
|
3009
|
+
}, {}, {
|
|
3010
|
+
length: number | undefined;
|
|
3011
|
+
}>;
|
|
3012
|
+
createFingerprint: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3013
|
+
name: "create_fingerprint";
|
|
3014
|
+
tableName: "agent_action_proposal";
|
|
3015
|
+
dataType: "string";
|
|
3016
|
+
columnType: "SQLiteText";
|
|
3017
|
+
data: string;
|
|
3018
|
+
driverParam: string;
|
|
3019
|
+
notNull: true;
|
|
3020
|
+
hasDefault: false;
|
|
3021
|
+
isPrimaryKey: false;
|
|
3022
|
+
isAutoincrement: false;
|
|
3023
|
+
hasRuntimeDefault: false;
|
|
3024
|
+
enumValues: [string, ...string[]];
|
|
3025
|
+
baseColumn: never;
|
|
3026
|
+
identity: undefined;
|
|
3027
|
+
generated: undefined;
|
|
3028
|
+
}, {}, {
|
|
3029
|
+
length: number | undefined;
|
|
3030
|
+
}>;
|
|
3031
|
+
proposal: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3032
|
+
name: "proposal";
|
|
3033
|
+
tableName: "agent_action_proposal";
|
|
3034
|
+
dataType: "json";
|
|
3035
|
+
columnType: "SQLiteTextJson";
|
|
3036
|
+
data: ActionProposal;
|
|
3037
|
+
driverParam: string;
|
|
3038
|
+
notNull: true;
|
|
3039
|
+
hasDefault: false;
|
|
3040
|
+
isPrimaryKey: false;
|
|
3041
|
+
isAutoincrement: false;
|
|
3042
|
+
hasRuntimeDefault: false;
|
|
3043
|
+
enumValues: undefined;
|
|
3044
|
+
baseColumn: never;
|
|
3045
|
+
identity: undefined;
|
|
3046
|
+
generated: undefined;
|
|
3047
|
+
}, {}, {
|
|
3048
|
+
$type: ActionProposal;
|
|
3049
|
+
}>;
|
|
3050
|
+
version: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3051
|
+
name: "version";
|
|
3052
|
+
tableName: "agent_action_proposal";
|
|
3053
|
+
dataType: "number";
|
|
3054
|
+
columnType: "SQLiteInteger";
|
|
3055
|
+
data: number;
|
|
3056
|
+
driverParam: number;
|
|
3057
|
+
notNull: true;
|
|
3058
|
+
hasDefault: true;
|
|
3059
|
+
isPrimaryKey: false;
|
|
3060
|
+
isAutoincrement: false;
|
|
3061
|
+
hasRuntimeDefault: false;
|
|
3062
|
+
enumValues: undefined;
|
|
3063
|
+
baseColumn: never;
|
|
3064
|
+
identity: undefined;
|
|
3065
|
+
generated: undefined;
|
|
3066
|
+
}, {}, {}>;
|
|
3067
|
+
executionStatus: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3068
|
+
name: "execution_status";
|
|
3069
|
+
tableName: "agent_action_proposal";
|
|
3070
|
+
dataType: "string";
|
|
3071
|
+
columnType: "SQLiteText";
|
|
3072
|
+
data: "failed" | "queued" | "executing" | "succeeded";
|
|
3073
|
+
driverParam: string;
|
|
3074
|
+
notNull: false;
|
|
3075
|
+
hasDefault: false;
|
|
3076
|
+
isPrimaryKey: false;
|
|
3077
|
+
isAutoincrement: false;
|
|
3078
|
+
hasRuntimeDefault: false;
|
|
3079
|
+
enumValues: [string, ...string[]];
|
|
3080
|
+
baseColumn: never;
|
|
3081
|
+
identity: undefined;
|
|
3082
|
+
generated: undefined;
|
|
3083
|
+
}, {}, {
|
|
3084
|
+
length: number | undefined;
|
|
3085
|
+
$type: "failed" | "queued" | "executing" | "succeeded";
|
|
3086
|
+
}>;
|
|
3087
|
+
leaseExpiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3088
|
+
name: "lease_expires_at";
|
|
3089
|
+
tableName: "agent_action_proposal";
|
|
3090
|
+
dataType: "number";
|
|
3091
|
+
columnType: "SQLiteInteger";
|
|
3092
|
+
data: number;
|
|
3093
|
+
driverParam: number;
|
|
3094
|
+
notNull: false;
|
|
3095
|
+
hasDefault: false;
|
|
3096
|
+
isPrimaryKey: false;
|
|
3097
|
+
isAutoincrement: false;
|
|
3098
|
+
hasRuntimeDefault: false;
|
|
3099
|
+
enumValues: undefined;
|
|
3100
|
+
baseColumn: never;
|
|
3101
|
+
identity: undefined;
|
|
3102
|
+
generated: undefined;
|
|
3103
|
+
}, {}, {}>;
|
|
3104
|
+
deliveryStatus: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3105
|
+
name: "delivery_status";
|
|
3106
|
+
tableName: "agent_action_proposal";
|
|
3107
|
+
dataType: "string";
|
|
3108
|
+
columnType: "SQLiteText";
|
|
3109
|
+
data: string;
|
|
3110
|
+
driverParam: string;
|
|
3111
|
+
notNull: false;
|
|
3112
|
+
hasDefault: false;
|
|
3113
|
+
isPrimaryKey: false;
|
|
3114
|
+
isAutoincrement: false;
|
|
3115
|
+
hasRuntimeDefault: false;
|
|
3116
|
+
enumValues: [string, ...string[]];
|
|
3117
|
+
baseColumn: never;
|
|
3118
|
+
identity: undefined;
|
|
3119
|
+
generated: undefined;
|
|
3120
|
+
}, {}, {
|
|
3121
|
+
length: number | undefined;
|
|
3122
|
+
}>;
|
|
3123
|
+
deliveryLeaseExpiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3124
|
+
name: "delivery_lease_expires_at";
|
|
3125
|
+
tableName: "agent_action_proposal";
|
|
3126
|
+
dataType: "number";
|
|
3127
|
+
columnType: "SQLiteInteger";
|
|
3128
|
+
data: number;
|
|
3129
|
+
driverParam: number;
|
|
3130
|
+
notNull: false;
|
|
3131
|
+
hasDefault: false;
|
|
3132
|
+
isPrimaryKey: false;
|
|
3133
|
+
isAutoincrement: false;
|
|
3134
|
+
hasRuntimeDefault: false;
|
|
3135
|
+
enumValues: undefined;
|
|
3136
|
+
baseColumn: never;
|
|
3137
|
+
identity: undefined;
|
|
3138
|
+
generated: undefined;
|
|
3139
|
+
}, {}, {}>;
|
|
3140
|
+
replacementGroupKey: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3141
|
+
name: "replacement_group_key";
|
|
3142
|
+
tableName: "agent_action_proposal";
|
|
3143
|
+
dataType: "string";
|
|
3144
|
+
columnType: "SQLiteText";
|
|
3145
|
+
data: string;
|
|
3146
|
+
driverParam: string;
|
|
3147
|
+
notNull: false;
|
|
3148
|
+
hasDefault: false;
|
|
3149
|
+
isPrimaryKey: false;
|
|
3150
|
+
isAutoincrement: false;
|
|
3151
|
+
hasRuntimeDefault: false;
|
|
3152
|
+
enumValues: [string, ...string[]];
|
|
3153
|
+
baseColumn: never;
|
|
3154
|
+
identity: undefined;
|
|
3155
|
+
generated: undefined;
|
|
3156
|
+
}, {}, {
|
|
3157
|
+
length: number | undefined;
|
|
3158
|
+
}>;
|
|
3159
|
+
outcomeIdKey: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3160
|
+
name: "outcome_id_key";
|
|
3161
|
+
tableName: "agent_action_proposal";
|
|
3162
|
+
dataType: "string";
|
|
3163
|
+
columnType: "SQLiteText";
|
|
3164
|
+
data: string;
|
|
3165
|
+
driverParam: string;
|
|
3166
|
+
notNull: false;
|
|
3167
|
+
hasDefault: false;
|
|
3168
|
+
isPrimaryKey: false;
|
|
3169
|
+
isAutoincrement: false;
|
|
3170
|
+
hasRuntimeDefault: false;
|
|
3171
|
+
enumValues: [string, ...string[]];
|
|
3172
|
+
baseColumn: never;
|
|
3173
|
+
identity: undefined;
|
|
3174
|
+
generated: undefined;
|
|
3175
|
+
}, {}, {
|
|
3176
|
+
length: number | undefined;
|
|
3177
|
+
}>;
|
|
3178
|
+
proposalExpiresAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3179
|
+
name: "proposal_expires_at";
|
|
3180
|
+
tableName: "agent_action_proposal";
|
|
3181
|
+
dataType: "number";
|
|
3182
|
+
columnType: "SQLiteInteger";
|
|
3183
|
+
data: number;
|
|
3184
|
+
driverParam: number;
|
|
3185
|
+
notNull: false;
|
|
3186
|
+
hasDefault: false;
|
|
3187
|
+
isPrimaryKey: false;
|
|
3188
|
+
isAutoincrement: false;
|
|
3189
|
+
hasRuntimeDefault: false;
|
|
3190
|
+
enumValues: undefined;
|
|
3191
|
+
baseColumn: never;
|
|
3192
|
+
identity: undefined;
|
|
3193
|
+
generated: undefined;
|
|
3194
|
+
}, {}, {}>;
|
|
3195
|
+
discoveryIndexVersion: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3196
|
+
name: "discovery_index_version";
|
|
3197
|
+
tableName: "agent_action_proposal";
|
|
3198
|
+
dataType: "number";
|
|
3199
|
+
columnType: "SQLiteInteger";
|
|
3200
|
+
data: number;
|
|
3201
|
+
driverParam: number;
|
|
3202
|
+
notNull: true;
|
|
3203
|
+
hasDefault: true;
|
|
3204
|
+
isPrimaryKey: false;
|
|
3205
|
+
isAutoincrement: false;
|
|
3206
|
+
hasRuntimeDefault: false;
|
|
3207
|
+
enumValues: undefined;
|
|
3208
|
+
baseColumn: never;
|
|
3209
|
+
identity: undefined;
|
|
3210
|
+
generated: undefined;
|
|
3211
|
+
}, {}, {}>;
|
|
3212
|
+
createdAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3213
|
+
name: "created_at";
|
|
3214
|
+
tableName: "agent_action_proposal";
|
|
3215
|
+
dataType: "number";
|
|
3216
|
+
columnType: "SQLiteInteger";
|
|
3217
|
+
data: number;
|
|
3218
|
+
driverParam: number;
|
|
3219
|
+
notNull: true;
|
|
3220
|
+
hasDefault: false;
|
|
3221
|
+
isPrimaryKey: false;
|
|
3222
|
+
isAutoincrement: false;
|
|
3223
|
+
hasRuntimeDefault: false;
|
|
3224
|
+
enumValues: undefined;
|
|
3225
|
+
baseColumn: never;
|
|
3226
|
+
identity: undefined;
|
|
3227
|
+
generated: undefined;
|
|
3228
|
+
}, {}, {}>;
|
|
3229
|
+
};
|
|
3230
|
+
dialect: "sqlite";
|
|
3231
|
+
}>;
|
|
3232
|
+
agentThread: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
3233
|
+
name: "agent_thread";
|
|
3234
|
+
schema: undefined;
|
|
3235
|
+
columns: {
|
|
3236
|
+
id: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3237
|
+
name: "id";
|
|
3238
|
+
tableName: "agent_thread";
|
|
3239
|
+
dataType: "string";
|
|
3240
|
+
columnType: "SQLiteText";
|
|
3241
|
+
data: string;
|
|
3242
|
+
driverParam: string;
|
|
3243
|
+
notNull: true;
|
|
3244
|
+
hasDefault: false;
|
|
3245
|
+
isPrimaryKey: true;
|
|
3246
|
+
isAutoincrement: false;
|
|
3247
|
+
hasRuntimeDefault: false;
|
|
3248
|
+
enumValues: [string, ...string[]];
|
|
3249
|
+
baseColumn: never;
|
|
3250
|
+
identity: undefined;
|
|
3251
|
+
generated: undefined;
|
|
3252
|
+
}, {}, {
|
|
3253
|
+
length: number | undefined;
|
|
3254
|
+
}>;
|
|
3255
|
+
actorRef: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3256
|
+
name: "actor_ref";
|
|
3257
|
+
tableName: "agent_thread";
|
|
3258
|
+
dataType: "string";
|
|
3259
|
+
columnType: "SQLiteText";
|
|
3260
|
+
data: string;
|
|
3261
|
+
driverParam: string;
|
|
3262
|
+
notNull: true;
|
|
3263
|
+
hasDefault: false;
|
|
3264
|
+
isPrimaryKey: false;
|
|
3265
|
+
isAutoincrement: false;
|
|
3266
|
+
hasRuntimeDefault: false;
|
|
3267
|
+
enumValues: [string, ...string[]];
|
|
3268
|
+
baseColumn: never;
|
|
3269
|
+
identity: undefined;
|
|
3270
|
+
generated: undefined;
|
|
3271
|
+
}, {}, {
|
|
3272
|
+
length: number | undefined;
|
|
3273
|
+
}>;
|
|
3274
|
+
tenantRef: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3275
|
+
name: "tenant_ref";
|
|
3276
|
+
tableName: "agent_thread";
|
|
3277
|
+
dataType: "string";
|
|
3278
|
+
columnType: "SQLiteText";
|
|
3279
|
+
data: string;
|
|
3280
|
+
driverParam: string;
|
|
3281
|
+
notNull: false;
|
|
3282
|
+
hasDefault: false;
|
|
3283
|
+
isPrimaryKey: false;
|
|
3284
|
+
isAutoincrement: false;
|
|
3285
|
+
hasRuntimeDefault: false;
|
|
3286
|
+
enumValues: [string, ...string[]];
|
|
3287
|
+
baseColumn: never;
|
|
3288
|
+
identity: undefined;
|
|
3289
|
+
generated: undefined;
|
|
3290
|
+
}, {}, {
|
|
3291
|
+
length: number | undefined;
|
|
3292
|
+
}>;
|
|
3293
|
+
title: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3294
|
+
name: "title";
|
|
3295
|
+
tableName: "agent_thread";
|
|
3296
|
+
dataType: "string";
|
|
3297
|
+
columnType: "SQLiteText";
|
|
3298
|
+
data: string;
|
|
3299
|
+
driverParam: string;
|
|
3300
|
+
notNull: true;
|
|
3301
|
+
hasDefault: false;
|
|
3302
|
+
isPrimaryKey: false;
|
|
3303
|
+
isAutoincrement: false;
|
|
3304
|
+
hasRuntimeDefault: false;
|
|
3305
|
+
enumValues: [string, ...string[]];
|
|
3306
|
+
baseColumn: never;
|
|
3307
|
+
identity: undefined;
|
|
3308
|
+
generated: undefined;
|
|
3309
|
+
}, {}, {
|
|
3310
|
+
length: number | undefined;
|
|
3311
|
+
}>;
|
|
3312
|
+
transient: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3313
|
+
name: "transient";
|
|
3314
|
+
tableName: "agent_thread";
|
|
3315
|
+
dataType: "boolean";
|
|
3316
|
+
columnType: "SQLiteBoolean";
|
|
3317
|
+
data: boolean;
|
|
3318
|
+
driverParam: number;
|
|
3319
|
+
notNull: true;
|
|
3320
|
+
hasDefault: true;
|
|
3321
|
+
isPrimaryKey: false;
|
|
3322
|
+
isAutoincrement: false;
|
|
3323
|
+
hasRuntimeDefault: false;
|
|
3324
|
+
enumValues: undefined;
|
|
3325
|
+
baseColumn: never;
|
|
3326
|
+
identity: undefined;
|
|
3327
|
+
generated: undefined;
|
|
3328
|
+
}, {}, {}>;
|
|
3329
|
+
activeStreamId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3330
|
+
name: "active_stream_id";
|
|
3331
|
+
tableName: "agent_thread";
|
|
3332
|
+
dataType: "string";
|
|
3333
|
+
columnType: "SQLiteText";
|
|
3334
|
+
data: string;
|
|
3335
|
+
driverParam: string;
|
|
3336
|
+
notNull: false;
|
|
3337
|
+
hasDefault: false;
|
|
3338
|
+
isPrimaryKey: false;
|
|
3339
|
+
isAutoincrement: false;
|
|
3340
|
+
hasRuntimeDefault: false;
|
|
3341
|
+
enumValues: [string, ...string[]];
|
|
3342
|
+
baseColumn: never;
|
|
3343
|
+
identity: undefined;
|
|
3344
|
+
generated: undefined;
|
|
3345
|
+
}, {}, {
|
|
3346
|
+
length: number | undefined;
|
|
3347
|
+
}>;
|
|
3348
|
+
defaultAgent: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3349
|
+
name: "default_agent";
|
|
3350
|
+
tableName: "agent_thread";
|
|
3351
|
+
dataType: "string";
|
|
3352
|
+
columnType: "SQLiteText";
|
|
3353
|
+
data: string;
|
|
3354
|
+
driverParam: string;
|
|
3355
|
+
notNull: false;
|
|
3356
|
+
hasDefault: false;
|
|
3357
|
+
isPrimaryKey: false;
|
|
3358
|
+
isAutoincrement: false;
|
|
3359
|
+
hasRuntimeDefault: false;
|
|
3360
|
+
enumValues: [string, ...string[]];
|
|
3361
|
+
baseColumn: never;
|
|
3362
|
+
identity: undefined;
|
|
3363
|
+
generated: undefined;
|
|
3364
|
+
}, {}, {
|
|
3365
|
+
length: number | undefined;
|
|
3366
|
+
}>;
|
|
3367
|
+
model: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3368
|
+
name: "model";
|
|
3369
|
+
tableName: "agent_thread";
|
|
3370
|
+
dataType: "string";
|
|
3371
|
+
columnType: "SQLiteText";
|
|
3372
|
+
data: string;
|
|
3373
|
+
driverParam: string;
|
|
3374
|
+
notNull: false;
|
|
3375
|
+
hasDefault: false;
|
|
3376
|
+
isPrimaryKey: false;
|
|
3377
|
+
isAutoincrement: false;
|
|
3378
|
+
hasRuntimeDefault: false;
|
|
3379
|
+
enumValues: [string, ...string[]];
|
|
3380
|
+
baseColumn: never;
|
|
3381
|
+
identity: undefined;
|
|
3382
|
+
generated: undefined;
|
|
3383
|
+
}, {}, {
|
|
3384
|
+
length: number | undefined;
|
|
3385
|
+
}>;
|
|
3386
|
+
persona: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3387
|
+
name: "persona";
|
|
3388
|
+
tableName: "agent_thread";
|
|
3389
|
+
dataType: "string";
|
|
3390
|
+
columnType: "SQLiteText";
|
|
3391
|
+
data: string;
|
|
3392
|
+
driverParam: string;
|
|
3393
|
+
notNull: false;
|
|
3394
|
+
hasDefault: false;
|
|
3395
|
+
isPrimaryKey: false;
|
|
3396
|
+
isAutoincrement: false;
|
|
3397
|
+
hasRuntimeDefault: false;
|
|
3398
|
+
enumValues: [string, ...string[]];
|
|
3399
|
+
baseColumn: never;
|
|
3400
|
+
identity: undefined;
|
|
3401
|
+
generated: undefined;
|
|
3402
|
+
}, {}, {
|
|
3403
|
+
length: number | undefined;
|
|
3404
|
+
}>;
|
|
3405
|
+
queuePause: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3406
|
+
name: "queue_pause";
|
|
3407
|
+
tableName: "agent_thread";
|
|
3408
|
+
dataType: "json";
|
|
3409
|
+
columnType: "SQLiteTextJson";
|
|
3410
|
+
data: QueuePause;
|
|
3411
|
+
driverParam: string;
|
|
3412
|
+
notNull: false;
|
|
3413
|
+
hasDefault: false;
|
|
3414
|
+
isPrimaryKey: false;
|
|
3415
|
+
isAutoincrement: false;
|
|
3416
|
+
hasRuntimeDefault: false;
|
|
3417
|
+
enumValues: undefined;
|
|
3418
|
+
baseColumn: never;
|
|
3419
|
+
identity: undefined;
|
|
2739
3420
|
generated: undefined;
|
|
2740
3421
|
}, {}, {
|
|
2741
3422
|
$type: QueuePause;
|
|
@@ -2856,6 +3537,25 @@ declare const agentSchema: {
|
|
|
2856
3537
|
length: number | undefined;
|
|
2857
3538
|
$type: MessageRole;
|
|
2858
3539
|
}>;
|
|
3540
|
+
actionProposalOutcome: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3541
|
+
name: "action_proposal_outcome";
|
|
3542
|
+
tableName: "agent_message";
|
|
3543
|
+
dataType: "string";
|
|
3544
|
+
columnType: "SQLiteText";
|
|
3545
|
+
data: string;
|
|
3546
|
+
driverParam: string;
|
|
3547
|
+
notNull: false;
|
|
3548
|
+
hasDefault: false;
|
|
3549
|
+
isPrimaryKey: false;
|
|
3550
|
+
isAutoincrement: false;
|
|
3551
|
+
hasRuntimeDefault: false;
|
|
3552
|
+
enumValues: [string, ...string[]];
|
|
3553
|
+
baseColumn: never;
|
|
3554
|
+
identity: undefined;
|
|
3555
|
+
generated: undefined;
|
|
3556
|
+
}, {}, {
|
|
3557
|
+
length: number | undefined;
|
|
3558
|
+
}>;
|
|
2859
3559
|
content: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2860
3560
|
name: "content";
|
|
2861
3561
|
tableName: "agent_message";
|
|
@@ -3142,6 +3842,25 @@ declare const agentSchema: {
|
|
|
3142
3842
|
name: "agent_queued_message";
|
|
3143
3843
|
schema: undefined;
|
|
3144
3844
|
columns: {
|
|
3845
|
+
uiCapabilities: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3846
|
+
name: "ui_capabilities";
|
|
3847
|
+
tableName: "agent_queued_message";
|
|
3848
|
+
dataType: "json";
|
|
3849
|
+
columnType: "SQLiteTextJson";
|
|
3850
|
+
data: UiCapabilities;
|
|
3851
|
+
driverParam: string;
|
|
3852
|
+
notNull: false;
|
|
3853
|
+
hasDefault: false;
|
|
3854
|
+
isPrimaryKey: false;
|
|
3855
|
+
isAutoincrement: false;
|
|
3856
|
+
hasRuntimeDefault: false;
|
|
3857
|
+
enumValues: undefined;
|
|
3858
|
+
baseColumn: never;
|
|
3859
|
+
identity: undefined;
|
|
3860
|
+
generated: undefined;
|
|
3861
|
+
}, {}, {
|
|
3862
|
+
$type: UiCapabilities;
|
|
3863
|
+
}>;
|
|
3145
3864
|
id: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3146
3865
|
name: "id";
|
|
3147
3866
|
tableName: "agent_queued_message";
|
|
@@ -3388,6 +4107,25 @@ declare const agentSchema: {
|
|
|
3388
4107
|
name: "agent_tool_call";
|
|
3389
4108
|
schema: undefined;
|
|
3390
4109
|
columns: {
|
|
4110
|
+
proposalId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
4111
|
+
name: "proposal_id";
|
|
4112
|
+
tableName: "agent_tool_call";
|
|
4113
|
+
dataType: "string";
|
|
4114
|
+
columnType: "SQLiteText";
|
|
4115
|
+
data: string;
|
|
4116
|
+
driverParam: string;
|
|
4117
|
+
notNull: false;
|
|
4118
|
+
hasDefault: false;
|
|
4119
|
+
isPrimaryKey: false;
|
|
4120
|
+
isAutoincrement: false;
|
|
4121
|
+
hasRuntimeDefault: false;
|
|
4122
|
+
enumValues: [string, ...string[]];
|
|
4123
|
+
baseColumn: never;
|
|
4124
|
+
identity: undefined;
|
|
4125
|
+
generated: undefined;
|
|
4126
|
+
}, {}, {
|
|
4127
|
+
length: number | undefined;
|
|
4128
|
+
}>;
|
|
3391
4129
|
id: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3392
4130
|
name: "id";
|
|
3393
4131
|
tableName: "agent_tool_call";
|
|
@@ -3627,6 +4365,25 @@ declare const agentSchema: {
|
|
|
3627
4365
|
}, {}, {
|
|
3628
4366
|
length: number | undefined;
|
|
3629
4367
|
}>;
|
|
4368
|
+
confirmation: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
4369
|
+
name: "confirmation";
|
|
4370
|
+
tableName: "agent_tool_call";
|
|
4371
|
+
dataType: "json";
|
|
4372
|
+
columnType: "SQLiteTextJson";
|
|
4373
|
+
data: ToolConfirmation;
|
|
4374
|
+
driverParam: string;
|
|
4375
|
+
notNull: false;
|
|
4376
|
+
hasDefault: false;
|
|
4377
|
+
isPrimaryKey: false;
|
|
4378
|
+
isAutoincrement: false;
|
|
4379
|
+
hasRuntimeDefault: false;
|
|
4380
|
+
enumValues: undefined;
|
|
4381
|
+
baseColumn: never;
|
|
4382
|
+
identity: undefined;
|
|
4383
|
+
generated: undefined;
|
|
4384
|
+
}, {}, {
|
|
4385
|
+
$type: ToolConfirmation;
|
|
4386
|
+
}>;
|
|
3630
4387
|
approver: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
3631
4388
|
name: "approver";
|
|
3632
4389
|
tableName: "agent_tool_call";
|
|
@@ -5013,15 +5770,48 @@ declare function agentSchemaDdl(dialect: AgentDialect): string[];
|
|
|
5013
5770
|
|
|
5014
5771
|
/**
|
|
5015
5772
|
* {@link AgentStore} backed by Drizzle ORM — a second adapter alongside the MikroORM one, proving
|
|
5016
|
-
* the store SPI is ORM-portable. A POJO receiving a Drizzle
|
|
5017
|
-
* owns the connection). Behaviour mirrors {@link import('@dudousxd/nestjs-agent-store-mikro-orm')}
|
|
5773
|
+
* the store SPI is ORM-portable. A POJO receiving a Drizzle database handle — SQLite, Postgres or
|
|
5774
|
+
* MySQL (the host app owns the connection). Behaviour mirrors {@link import('@dudousxd/nestjs-agent-store-mikro-orm')}
|
|
5018
5775
|
* exactly (fork/truncate/quota/active-stream/soft-delete semantics) so the two are interchangeable.
|
|
5019
5776
|
*/
|
|
5020
|
-
declare class DrizzleAgentStore implements AgentStore, ThreadTurnReader, ChatQueueStore {
|
|
5777
|
+
declare class DrizzleAgentStore implements AgentStore, ThreadTurnReader, ChatQueueStore, ActionProposalStore, ActionProposalWorkerStore, ActionProposalDiscoveryIndexStore, ActionProposalOutcomeStore {
|
|
5021
5778
|
private readonly db;
|
|
5022
5779
|
private readonly dialect;
|
|
5023
5780
|
private readonly t;
|
|
5024
|
-
|
|
5781
|
+
private readonly proposals;
|
|
5782
|
+
constructor(db: AgentDrizzleDb, options?: ActionProposalStoreOptions);
|
|
5783
|
+
createActionProposal(...args: Parameters<ActionProposalStore['createActionProposal']>): ReturnType<ActionProposalStore['createActionProposal']>;
|
|
5784
|
+
getActionProposal(...args: Parameters<ActionProposalStore['getActionProposal']>): ReturnType<ActionProposalStore['getActionProposal']>;
|
|
5785
|
+
listActionProposals(...args: Parameters<ActionProposalStore['listActionProposals']>): ReturnType<ActionProposalStore['listActionProposals']>;
|
|
5786
|
+
decideActionProposal(...args: Parameters<ActionProposalStore['decideActionProposal']>): ReturnType<ActionProposalStore['decideActionProposal']>;
|
|
5787
|
+
claimActionProposal(...args: Parameters<ActionProposalStore['claimActionProposal']>): ReturnType<ActionProposalStore['claimActionProposal']>;
|
|
5788
|
+
extendActionProposalLease(...args: Parameters<ActionProposalStore['extendActionProposalLease']>): ReturnType<ActionProposalStore['extendActionProposalLease']>;
|
|
5789
|
+
claimNextActionProposal(...args: Parameters<ActionProposalWorkerStore['claimNextActionProposal']>): ReturnType<ActionProposalWorkerStore['claimNextActionProposal']>;
|
|
5790
|
+
expireActionProposals(...args: Parameters<ActionProposalWorkerStore['expireActionProposals']>): ReturnType<ActionProposalWorkerStore['expireActionProposals']>;
|
|
5791
|
+
backfillActionProposalDiscoveryIndex(command: {
|
|
5792
|
+
limit: number;
|
|
5793
|
+
}): Promise<number>;
|
|
5794
|
+
settleActionProposal(...args: Parameters<ActionProposalStore['settleActionProposal']>): ReturnType<ActionProposalStore['settleActionProposal']>;
|
|
5795
|
+
createReplacingActionProposal(...args: Parameters<ActionProposalSupersessionStore['createReplacingActionProposal']>): Promise<_dudousxd_nestjs_agent_core.CreateActionProposalResult>;
|
|
5796
|
+
supersedeActionProposal(...args: Parameters<ActionProposalSupersessionStore['supersedeActionProposal']>): Promise<_dudousxd_nestjs_agent_core.ActionProposalMutationResult>;
|
|
5797
|
+
get actionProposalAdmissionSupported(): boolean;
|
|
5798
|
+
getThreadActionProposalScope(threadId: string): Promise<{
|
|
5799
|
+
actorRef: string;
|
|
5800
|
+
tenantRef: string | null;
|
|
5801
|
+
threadId: string;
|
|
5802
|
+
} | null>;
|
|
5803
|
+
claimNextActionProposalOutcome(...args: Parameters<ActionProposalOutcomeStore['claimNextActionProposalOutcome']>): Promise<{
|
|
5804
|
+
outcome: _dudousxd_nestjs_agent_core.ActionProposalOutcome;
|
|
5805
|
+
lease: {
|
|
5806
|
+
outcomeId: string;
|
|
5807
|
+
token: string;
|
|
5808
|
+
generation: number;
|
|
5809
|
+
};
|
|
5810
|
+
} | null>;
|
|
5811
|
+
admitActionProposalOutcome(...args: Parameters<ActionProposalOutcomeStore['admitActionProposalOutcome']>): Promise<{
|
|
5812
|
+
status: "applied" | "unchanged" | "busy" | "conflict" | "not_found" | "discarded";
|
|
5813
|
+
messageId?: string;
|
|
5814
|
+
}>;
|
|
5025
5815
|
createThread(input: CreateThreadInput): Promise<ThreadSummary>;
|
|
5026
5816
|
getThread(threadId: string): Promise<ThreadDetail | null>;
|
|
5027
5817
|
/**
|
|
@@ -5171,6 +5961,61 @@ declare class DrizzleAgentStore implements AgentStore, ThreadTurnReader, ChatQue
|
|
|
5171
5961
|
private toStoredMessage;
|
|
5172
5962
|
}
|
|
5173
5963
|
|
|
5964
|
+
/**
|
|
5965
|
+
* Independent persisted proposals. Each decision and its durable execution work live in one row;
|
|
5966
|
+
* a version predicate fences every read/modify/write across connections and store instances.
|
|
5967
|
+
*/
|
|
5968
|
+
declare class DrizzleActionProposalStore implements ActionProposalStore, ActionProposalWorkerStore, ActionProposalDiscoveryIndexStore, ActionProposalSupersessionStore {
|
|
5969
|
+
private readonly db;
|
|
5970
|
+
private readonly rawDb;
|
|
5971
|
+
readonly actionProposalAdmissionSupported: boolean;
|
|
5972
|
+
private readonly synchronousSqlite;
|
|
5973
|
+
private readonly dialect;
|
|
5974
|
+
private readonly table;
|
|
5975
|
+
private readonly clock;
|
|
5976
|
+
constructor(db: AgentDrizzleDb, options?: ActionProposalStoreOptions);
|
|
5977
|
+
createActionProposal(input: CreateActionProposal): Promise<CreateActionProposalResult>;
|
|
5978
|
+
createReplacingActionProposal(input: CreateActionProposal): Promise<CreateActionProposalResult>;
|
|
5979
|
+
supersedeActionProposal(scope: ActionProposalScope, id: string, command: {
|
|
5980
|
+
replacementProposalId: string;
|
|
5981
|
+
actorRef: string;
|
|
5982
|
+
via: string;
|
|
5983
|
+
}): Promise<ActionProposalMutationResult>;
|
|
5984
|
+
private replacementSteps;
|
|
5985
|
+
getActionProposal(scope: ActionProposalScope, id: string): Promise<ActionProposal | null>;
|
|
5986
|
+
listActionProposals(scope: ActionProposalScope, query?: ListActionProposals): Promise<ActionProposal[]>;
|
|
5987
|
+
decideActionProposal(scope: ActionProposalScope, id: string, command: ActionProposalDecisionCommand): Promise<ActionProposalMutationResult>;
|
|
5988
|
+
claimActionProposal(scope: ActionProposalScope, id: string, command: ClaimActionProposal): Promise<ActionProposalMutationResult>;
|
|
5989
|
+
extendActionProposalLease(scope: ActionProposalScope, id: string, command: ExtendActionProposalLease): Promise<ActionProposalMutationResult>;
|
|
5990
|
+
settleActionProposal(scope: ActionProposalScope, id: string, command: SettleActionProposal): Promise<ActionProposalMutationResult>;
|
|
5991
|
+
claimNextActionProposal(command: ClaimActionProposal): Promise<ActionProposal | null>;
|
|
5992
|
+
expireActionProposals(command: {
|
|
5993
|
+
limit: number;
|
|
5994
|
+
}): Promise<number>;
|
|
5995
|
+
backfillActionProposalDiscoveryIndex(command: {
|
|
5996
|
+
limit: number;
|
|
5997
|
+
}): Promise<number>;
|
|
5998
|
+
rememberedActionProposalApprovals(scope: ActionProposalScope): Promise<string[]>;
|
|
5999
|
+
getThreadActionProposalScope(threadId: string): Promise<{
|
|
6000
|
+
actorRef: string;
|
|
6001
|
+
tenantRef: string | null;
|
|
6002
|
+
threadId: string;
|
|
6003
|
+
} | null>;
|
|
6004
|
+
claimNextActionProposalOutcome(command: ClaimActionProposal): Promise<{
|
|
6005
|
+
outcome: _dudousxd_nestjs_agent_core.ActionProposalOutcome;
|
|
6006
|
+
lease: {
|
|
6007
|
+
outcomeId: string;
|
|
6008
|
+
token: string;
|
|
6009
|
+
generation: number;
|
|
6010
|
+
};
|
|
6011
|
+
} | null>;
|
|
6012
|
+
admitActionProposalOutcome(command: ActionProposalOutcomeLease): ReturnType<ActionProposalOutcomeStore['admitActionProposalOutcome']>;
|
|
6013
|
+
private transactionSteps;
|
|
6014
|
+
private admissionSteps;
|
|
6015
|
+
private read;
|
|
6016
|
+
private mutate;
|
|
6017
|
+
}
|
|
6018
|
+
|
|
5174
6019
|
/**
|
|
5175
6020
|
* {@link AgentGovernanceQueries} backed by Drizzle ORM — the read/analytics half of the store SPI,
|
|
5176
6021
|
* mirroring {@link import('@dudousxd/nestjs-agent-store-mikro-orm')} exactly. Cost is the token
|
|
@@ -5446,204 +6291,489 @@ interface RagIngestionLogCursor {
|
|
|
5446
6291
|
}
|
|
5447
6292
|
interface RagIngestionLogIterateOptions {
|
|
5448
6293
|
/**
|
|
5449
|
-
* Rows fetched per round-trip. Defaults to 200; anything under 1 or non-finite falls back to
|
|
5450
|
-
* that default rather than being honoured — a batch of 0 would fetch nothing and never advance.
|
|
6294
|
+
* Rows fetched per round-trip. Defaults to 200; anything under 1 or non-finite falls back to
|
|
6295
|
+
* that default rather than being honoured — a batch of 0 would fetch nothing and never advance.
|
|
6296
|
+
*/
|
|
6297
|
+
batchSize?: number;
|
|
6298
|
+
/** Resume strictly after this point in the order, e.g. a cursor persisted by an earlier sweep. */
|
|
6299
|
+
after?: RagIngestionLogCursor;
|
|
6300
|
+
}
|
|
6301
|
+
/**
|
|
6302
|
+
* Records the outcome of every RAG ingestion into `rag_ingestion_log`, by subscribing to the
|
|
6303
|
+
* `aviary:rag:*` diagnostics channels `@dudousxd/nestjs-agent-rag-media` publishes — the Drizzle
|
|
6304
|
+
* counterpart of `MikroOrmRagIngestionLog`, with the same columns, ordering and write semantics, so
|
|
6305
|
+
* a console built on one adapter reads the other.
|
|
6306
|
+
*
|
|
6307
|
+
* It answers the question a vector store structurally cannot: *which documents failed to index, and
|
|
6308
|
+
* why*. A skipped or failed document produces no chunks, so it is invisible to
|
|
6309
|
+
* `VectorStore.listDocuments()` — the index only knows about successes. Pair the two for a complete
|
|
6310
|
+
* picture: the store is the truth about what is retrievable, this table is the truth about what was
|
|
6311
|
+
* attempted.
|
|
6312
|
+
*
|
|
6313
|
+
* Writes are best-effort and never throw: this runs detached from any request, on a diagnostics
|
|
6314
|
+
* channel, so a failed write must not take down the ingestion that triggered it. A lost row costs
|
|
6315
|
+
* observability, not data — the vector store remains the system of record.
|
|
6316
|
+
*/
|
|
6317
|
+
declare class DrizzleRagIngestionLog implements OnModuleInit, OnModuleDestroy {
|
|
6318
|
+
private readonly logger;
|
|
6319
|
+
private teardowns;
|
|
6320
|
+
private readonly inFlight;
|
|
6321
|
+
private readonly db;
|
|
6322
|
+
private readonly dialect;
|
|
6323
|
+
private readonly t;
|
|
6324
|
+
constructor(db: AgentDrizzleDb);
|
|
6325
|
+
onModuleInit(): void;
|
|
6326
|
+
onModuleDestroy(): Promise<void>;
|
|
6327
|
+
/** Await every in-flight write — for graceful shutdown and deterministic tests. */
|
|
6328
|
+
settle(): Promise<void>;
|
|
6329
|
+
/** The latest recorded outcome per document, newest first. */
|
|
6330
|
+
list(query?: RagIngestionLogQuery): Promise<RagIngestionLogRow[]>;
|
|
6331
|
+
/**
|
|
6332
|
+
* The same page plus the unpaginated total, so a caller can tell "these are all of them" from
|
|
6333
|
+
* "these are the first N". A list that silently truncates reads as complete when it isn't.
|
|
6334
|
+
*
|
|
6335
|
+
* Offset paging is only sound over a table nobody is deleting from underneath you: a row removed
|
|
6336
|
+
* behind the cursor shifts everything after it back by one, so the next page starts one row late
|
|
6337
|
+
* and that row is never seen. Use {@link iterate} for any sweep that deletes.
|
|
6338
|
+
*/
|
|
6339
|
+
listPage(query?: RagIngestionLogQuery): Promise<{
|
|
6340
|
+
rows: RagIngestionLogRow[];
|
|
6341
|
+
total: number;
|
|
6342
|
+
}>;
|
|
6343
|
+
/**
|
|
6344
|
+
* Every matching row, newest first, streamed in batches — the sweep-safe way to walk this table.
|
|
6345
|
+
*
|
|
6346
|
+
* Paging is *keyset*, not offset: each batch asks for the rows that sort strictly after the last
|
|
6347
|
+
* row yielded, using `(updatedAt, documentId)` — one point in
|
|
6348
|
+
* {@link RAG_INGESTION_LOG_PAGE_ORDER}, which is total because it ends in the primary key. A
|
|
6349
|
+
* cursor made of column values does not move when rows leave the table, which is what makes this
|
|
6350
|
+
* delete-safe *by construction* rather than by the caller carefully advancing an offset by only
|
|
6351
|
+
* the rows it kept.
|
|
6352
|
+
*
|
|
6353
|
+
* **The guarantee, stated once:** a row is yielded exactly when — at the moment the batch that
|
|
6354
|
+
* would contain it is fetched — the row exists, matches `where`, and sorts strictly after the
|
|
6355
|
+
* last row already yielded. Everything below is a consequence of that one sentence.
|
|
6356
|
+
*
|
|
6357
|
+
* What you can rely on:
|
|
6358
|
+
* - **Deleting rows while iterating is safe.** Delete any row you like — the one just yielded, the
|
|
6359
|
+
* whole batch, rows you have not reached yet — and every row that is still there when the sweep
|
|
6360
|
+
* reaches its position is visited exactly once. Nothing is skipped and nothing is repeated,
|
|
6361
|
+
* because deleting a row moves no *other* row's `(updatedAt, documentId)`. (Rows you delete
|
|
6362
|
+
* *ahead* of the cursor are simply never visited, which is the point of deleting them.)
|
|
6363
|
+
* - **Ties are safe.** A bulk upload stamps a whole batch with the same `updatedAt`; the
|
|
6364
|
+
* `documentId` tiebreaker keeps consecutive batches disjoint even when every row ties.
|
|
6365
|
+
* - **Each row is yielded at most once**, for as long as `updatedAt` only ever moves forward —
|
|
6366
|
+
* which is what `record()` does, since it always stamps `now`.
|
|
6367
|
+
*
|
|
6368
|
+
* What this is **not**: a snapshot, or a repeatable read. The sweep observes the table as it is
|
|
6369
|
+
* when each batch is fetched, so:
|
|
6370
|
+
* - A row **inserted** mid-sweep by `record()` is stamped `now`. The order is newest-first, so it
|
|
6371
|
+
* sorts ahead of a cursor the sweep has already moved past, and is not visited. A sweep
|
|
6372
|
+
* therefore never sees documents ingested after it started — the behaviour an orphan sweep
|
|
6373
|
+
* wants, since a document that arrived while you were sweeping is not an orphan. (A *direct*
|
|
6374
|
+
* insert with a backdated `updatedAt` lands ahead of the cursor and **is** visited; nothing in
|
|
6375
|
+
* this class writes one.)
|
|
6376
|
+
* - A row **re-ingested** mid-sweep has its `updatedAt` bumped to `now`, moving it ahead of the
|
|
6377
|
+
* cursor for the same reason. If the sweep had already passed it, it is not visited twice; if it
|
|
6378
|
+
* had not, it is **missed for this pass**. That is the honest limit: against a concurrent
|
|
6379
|
+
* writer `iterate` guarantees "at most once", not "at least once". Sweeps that must not miss a
|
|
6380
|
+
* concurrently-rewritten row should be idempotent and run again.
|
|
6381
|
+
* - Only a row whose `updatedAt` moves *backwards* — which needs a direct write — can be yielded
|
|
6382
|
+
* twice.
|
|
6383
|
+
* - `collection` / `status` are re-evaluated per batch, so a row that stops matching mid-sweep
|
|
6384
|
+
* stops being visited.
|
|
6385
|
+
*
|
|
6386
|
+
* There is no `limit`/`offset` here on purpose: `where` says *which* rows, `options` says how the
|
|
6387
|
+
* sweep is run. A sweep that stops early stops by `break`ing out of the `for await`.
|
|
6388
|
+
*/
|
|
6389
|
+
iterate(where?: RagIngestionLogWhere, options?: RagIngestionLogIterateOptions): AsyncGenerator<RagIngestionLogRow, void, undefined>;
|
|
6390
|
+
/**
|
|
6391
|
+
* Just the document ids of the matching rows, in {@link RAG_INGESTION_LOG_PAGE_ORDER}.
|
|
6392
|
+
*
|
|
6393
|
+
* Returns **all** of them — no 200-row cap, unlike `list` — by sweeping on {@link iterate}'s
|
|
6394
|
+
* keyset internally, so it is correct against concurrent deletes for the same reason `iterate`
|
|
6395
|
+
* is. What the cap protects against is hydrating an unbounded number of wide rows (`error` is a
|
|
6396
|
+
* TEXT column); this selects two columns — the id, plus the `updatedAt` the cursor needs — and
|
|
6397
|
+
* keeps only the ids, so the peak footprint is one batch of two-column rows plus a list of
|
|
6398
|
+
* strings whose size *is* the answer the caller asked for.
|
|
6399
|
+
*
|
|
6400
|
+
* For callers that need the id set of a collection and nothing else: an orphan sweep unioning the
|
|
6401
|
+
* log against the vector store's own document list.
|
|
6402
|
+
*/
|
|
6403
|
+
listDocumentIds(where?: RagIngestionLogWhere, options?: {
|
|
6404
|
+
batchSize?: number;
|
|
6405
|
+
}): Promise<string[]>;
|
|
6406
|
+
/** The latest recorded outcome for one document, or null if it was never attempted. */
|
|
6407
|
+
get(documentId: string): Promise<RagIngestionLogRow | null>;
|
|
6408
|
+
/** Forget one document's record. Returns whether a row was actually removed. */
|
|
6409
|
+
remove(documentId: string): Promise<boolean>;
|
|
6410
|
+
/** Forget every record for a collection — for when the collection itself is deleted. */
|
|
6411
|
+
removeByCollection(collection: string): Promise<number>;
|
|
6412
|
+
/**
|
|
6413
|
+
* The keyset sweep both {@link iterate} and {@link listDocumentIds} are made of. `page` decides
|
|
6414
|
+
* how wide a row is — whole rows for `iterate`, two columns for `listDocumentIds` — and the
|
|
6415
|
+
* `R extends RagIngestionLogCursor` bound says the only thing the sweep needs back: a row it can
|
|
6416
|
+
* read the next cursor off.
|
|
6417
|
+
*
|
|
6418
|
+
* The cursor advances **per yielded row**, not per batch, so a consumer that `break`s mid-batch
|
|
6419
|
+
* leaves it on the last row it actually saw. It is two column values read off that row, so a row
|
|
6420
|
+
* leaving the table cannot move it — the whole reason this is delete-safe by construction.
|
|
6421
|
+
*/
|
|
6422
|
+
private sweep;
|
|
6423
|
+
private where;
|
|
6424
|
+
/**
|
|
6425
|
+
* The coordinates filter AND'd with "strictly after `cursor` in
|
|
6426
|
+
* {@link RAG_INGESTION_LOG_PAGE_ORDER}".
|
|
6427
|
+
*
|
|
6428
|
+
* The order is `updatedAt desc, documentId asc`, so "after" means an older timestamp, or the same
|
|
6429
|
+
* timestamp and a larger id. Both halves are needed: the `<` alone would re-yield every row tied
|
|
6430
|
+
* with the cursor, and dropping the tie branch would skip them instead.
|
|
6431
|
+
*/
|
|
6432
|
+
private keyset;
|
|
6433
|
+
/**
|
|
6434
|
+
* Upsert one outcome. Keyed by document id so the row always reflects the *current* state — a
|
|
6435
|
+
* retry that succeeds overwrites the failure it replaces, rather than leaving a stale error next
|
|
6436
|
+
* to a working document.
|
|
6437
|
+
*/
|
|
6438
|
+
private record;
|
|
6439
|
+
private track;
|
|
6440
|
+
}
|
|
6441
|
+
|
|
6442
|
+
/** Options for {@link DrizzleAgentStoreModule.forRoot}. The app owns and supplies the db handle. */
|
|
6443
|
+
interface DrizzleAgentStoreModuleOptions {
|
|
6444
|
+
/**
|
|
6445
|
+
* A Drizzle database on SQLite, Postgres or MySQL — `drizzle(client, { schema: agentSchema })`,
|
|
6446
|
+
* `pgAgentSchema` or `mysqlAgentSchema`. The stores read the dialect off the handle.
|
|
5451
6447
|
*/
|
|
5452
|
-
|
|
5453
|
-
/**
|
|
5454
|
-
|
|
6448
|
+
db: AgentDrizzleDb;
|
|
6449
|
+
/**
|
|
6450
|
+
* Bind {@link AGENT_PRICING_STORE} (which {@link DrizzleGovernanceQueries} prices usage against) to
|
|
6451
|
+
* a host-supplied store instead of the default {@link DrizzlePricingStore} — make your OWN pricing
|
|
6452
|
+
* table the single source of cost truth without touching `agent_model_pricing`.
|
|
6453
|
+
*/
|
|
6454
|
+
pricingStore?: Type<AgentPricingStore>;
|
|
6455
|
+
/**
|
|
6456
|
+
* Record every RAG ingestion outcome into `rag_ingestion_log` by subscribing to the `aviary:rag:*`
|
|
6457
|
+
* diagnostics channels (default `true`, matching the MikroORM adapter). This is the only place a
|
|
6458
|
+
* *failed* or *skipped* document is visible — one that produced no chunks doesn't exist as far as
|
|
6459
|
+
* `VectorStore.listDocuments()` is concerned. Set `false` if you don't ingest media into RAG, or
|
|
6460
|
+
* record outcomes yourself.
|
|
6461
|
+
*
|
|
6462
|
+
* The table has to exist: `ensureAgentSchema` creates it, or write the `CREATE TABLE` into
|
|
6463
|
+
* your own migrations. Writes are best-effort, so a missing table costs a warning per ingestion
|
|
6464
|
+
* rather than a failed ingestion.
|
|
6465
|
+
*/
|
|
6466
|
+
ragIngestionLog?: boolean;
|
|
5455
6467
|
}
|
|
5456
6468
|
/**
|
|
5457
|
-
*
|
|
5458
|
-
*
|
|
5459
|
-
*
|
|
5460
|
-
*
|
|
6469
|
+
* Binds {@link DrizzleAgentStore} to the {@link AGENT_STORE} token consumed by
|
|
6470
|
+
* `@dudousxd/nestjs-agent`, plus {@link DrizzleGovernanceQueries} to
|
|
6471
|
+
* {@link AGENT_GOVERNANCE_QUERIES} (the read-model the dashboard/telescope surfaces consume) and
|
|
6472
|
+
* {@link DrizzlePricingStore} to {@link AGENT_PRICING_STORE} (the write side of that pricing table),
|
|
6473
|
+
* and {@link DrizzleConfirmTokenStore} to {@link AGENT_CONFIRM_TOKEN_STORE} (confirmed writes).
|
|
6474
|
+
* The host app supplies an already-opened Drizzle db — this module never opens a connection itself.
|
|
5461
6475
|
*
|
|
5462
|
-
*
|
|
5463
|
-
*
|
|
5464
|
-
* `
|
|
5465
|
-
*
|
|
5466
|
-
* attempted.
|
|
6476
|
+
* The returned module is global, so {@link AGENT_STORE}, {@link AGENT_GOVERNANCE_QUERIES} and
|
|
6477
|
+
* {@link AGENT_PRICING_STORE} are visible app-wide — `AgentModule` resolves the store without an
|
|
6478
|
+
* explicit `store` option, and the dashboard/telescope resolve {@link AGENT_GOVERNANCE_QUERIES}
|
|
6479
|
+
* without the host re-binding it.
|
|
5467
6480
|
*
|
|
5468
|
-
*
|
|
5469
|
-
*
|
|
5470
|
-
*
|
|
6481
|
+
* ```ts
|
|
6482
|
+
* @Module({ imports: [DrizzleAgentStoreModule.forRoot({ db })] })
|
|
6483
|
+
* export class AppModule {}
|
|
6484
|
+
* ```
|
|
5471
6485
|
*/
|
|
5472
|
-
declare class
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
6486
|
+
declare class DrizzleAgentStoreModule {
|
|
6487
|
+
static forRoot(options: DrizzleAgentStoreModuleOptions): DynamicModule;
|
|
6488
|
+
}
|
|
6489
|
+
|
|
6490
|
+
/** Every agent table, for `drizzle(pool, { schema: pgAgentSchema })` on Postgres. */
|
|
6491
|
+
declare const pgAgentSchema: {
|
|
6492
|
+
agentActionProposal: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
6493
|
+
name: "agent_action_proposal";
|
|
6494
|
+
schema: undefined;
|
|
6495
|
+
columns: {
|
|
6496
|
+
id: drizzle_orm_pg_core.PgColumn<{
|
|
6497
|
+
name: "id";
|
|
6498
|
+
tableName: "agent_action_proposal";
|
|
6499
|
+
dataType: "string";
|
|
6500
|
+
columnType: "PgText";
|
|
6501
|
+
data: string;
|
|
6502
|
+
driverParam: string;
|
|
6503
|
+
notNull: true;
|
|
6504
|
+
hasDefault: false;
|
|
6505
|
+
isPrimaryKey: true;
|
|
6506
|
+
isAutoincrement: false;
|
|
6507
|
+
hasRuntimeDefault: false;
|
|
6508
|
+
enumValues: [string, ...string[]];
|
|
6509
|
+
baseColumn: never;
|
|
6510
|
+
identity: undefined;
|
|
6511
|
+
generated: undefined;
|
|
6512
|
+
}, {}, {}>;
|
|
6513
|
+
scopeKey: drizzle_orm_pg_core.PgColumn<{
|
|
6514
|
+
name: "scope_key";
|
|
6515
|
+
tableName: "agent_action_proposal";
|
|
6516
|
+
dataType: "string";
|
|
6517
|
+
columnType: "PgText";
|
|
6518
|
+
data: string;
|
|
6519
|
+
driverParam: string;
|
|
6520
|
+
notNull: true;
|
|
6521
|
+
hasDefault: false;
|
|
6522
|
+
isPrimaryKey: false;
|
|
6523
|
+
isAutoincrement: false;
|
|
6524
|
+
hasRuntimeDefault: false;
|
|
6525
|
+
enumValues: [string, ...string[]];
|
|
6526
|
+
baseColumn: never;
|
|
6527
|
+
identity: undefined;
|
|
6528
|
+
generated: undefined;
|
|
6529
|
+
}, {}, {}>;
|
|
6530
|
+
decision: drizzle_orm_pg_core.PgColumn<{
|
|
6531
|
+
name: "decision";
|
|
6532
|
+
tableName: "agent_action_proposal";
|
|
6533
|
+
dataType: "string";
|
|
6534
|
+
columnType: "PgText";
|
|
6535
|
+
data: _dudousxd_nestjs_agent_core.ActionProposalDecision;
|
|
6536
|
+
driverParam: string;
|
|
6537
|
+
notNull: true;
|
|
6538
|
+
hasDefault: false;
|
|
6539
|
+
isPrimaryKey: false;
|
|
6540
|
+
isAutoincrement: false;
|
|
6541
|
+
hasRuntimeDefault: false;
|
|
6542
|
+
enumValues: [string, ...string[]];
|
|
6543
|
+
baseColumn: never;
|
|
6544
|
+
identity: undefined;
|
|
6545
|
+
generated: undefined;
|
|
6546
|
+
}, {}, {
|
|
6547
|
+
$type: _dudousxd_nestjs_agent_core.ActionProposalDecision;
|
|
6548
|
+
}>;
|
|
6549
|
+
logicalSort: drizzle_orm_pg_core.PgColumn<{
|
|
6550
|
+
name: "logical_sort";
|
|
6551
|
+
tableName: "agent_action_proposal";
|
|
6552
|
+
dataType: "string";
|
|
6553
|
+
columnType: "PgText";
|
|
6554
|
+
data: string;
|
|
6555
|
+
driverParam: string;
|
|
6556
|
+
notNull: true;
|
|
6557
|
+
hasDefault: false;
|
|
6558
|
+
isPrimaryKey: false;
|
|
6559
|
+
isAutoincrement: false;
|
|
6560
|
+
hasRuntimeDefault: false;
|
|
6561
|
+
enumValues: [string, ...string[]];
|
|
6562
|
+
baseColumn: never;
|
|
6563
|
+
identity: undefined;
|
|
6564
|
+
generated: undefined;
|
|
6565
|
+
}, {}, {}>;
|
|
6566
|
+
createFingerprint: drizzle_orm_pg_core.PgColumn<{
|
|
6567
|
+
name: "create_fingerprint";
|
|
6568
|
+
tableName: "agent_action_proposal";
|
|
6569
|
+
dataType: "string";
|
|
6570
|
+
columnType: "PgText";
|
|
6571
|
+
data: string;
|
|
6572
|
+
driverParam: string;
|
|
6573
|
+
notNull: true;
|
|
6574
|
+
hasDefault: false;
|
|
6575
|
+
isPrimaryKey: false;
|
|
6576
|
+
isAutoincrement: false;
|
|
6577
|
+
hasRuntimeDefault: false;
|
|
6578
|
+
enumValues: [string, ...string[]];
|
|
6579
|
+
baseColumn: never;
|
|
6580
|
+
identity: undefined;
|
|
6581
|
+
generated: undefined;
|
|
6582
|
+
}, {}, {}>;
|
|
6583
|
+
proposal: drizzle_orm_pg_core.PgColumn<{
|
|
6584
|
+
name: "proposal";
|
|
6585
|
+
tableName: "agent_action_proposal";
|
|
6586
|
+
dataType: "custom";
|
|
6587
|
+
columnType: "PgCustomColumn";
|
|
6588
|
+
data: ActionProposal;
|
|
6589
|
+
driverParam: string;
|
|
6590
|
+
notNull: true;
|
|
6591
|
+
hasDefault: false;
|
|
6592
|
+
isPrimaryKey: false;
|
|
6593
|
+
isAutoincrement: false;
|
|
6594
|
+
hasRuntimeDefault: false;
|
|
6595
|
+
enumValues: undefined;
|
|
6596
|
+
baseColumn: never;
|
|
6597
|
+
identity: undefined;
|
|
6598
|
+
generated: undefined;
|
|
6599
|
+
}, {}, {
|
|
6600
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
6601
|
+
}>;
|
|
6602
|
+
version: drizzle_orm_pg_core.PgColumn<{
|
|
6603
|
+
name: "version";
|
|
6604
|
+
tableName: "agent_action_proposal";
|
|
6605
|
+
dataType: "number";
|
|
6606
|
+
columnType: "PgBigInt53";
|
|
6607
|
+
data: number;
|
|
6608
|
+
driverParam: string | number;
|
|
6609
|
+
notNull: true;
|
|
6610
|
+
hasDefault: true;
|
|
6611
|
+
isPrimaryKey: false;
|
|
6612
|
+
isAutoincrement: false;
|
|
6613
|
+
hasRuntimeDefault: false;
|
|
6614
|
+
enumValues: undefined;
|
|
6615
|
+
baseColumn: never;
|
|
6616
|
+
identity: undefined;
|
|
6617
|
+
generated: undefined;
|
|
6618
|
+
}, {}, {}>;
|
|
6619
|
+
executionStatus: drizzle_orm_pg_core.PgColumn<{
|
|
6620
|
+
name: "execution_status";
|
|
6621
|
+
tableName: "agent_action_proposal";
|
|
6622
|
+
dataType: "string";
|
|
6623
|
+
columnType: "PgText";
|
|
6624
|
+
data: "failed" | "queued" | "executing" | "succeeded";
|
|
6625
|
+
driverParam: string;
|
|
6626
|
+
notNull: false;
|
|
6627
|
+
hasDefault: false;
|
|
6628
|
+
isPrimaryKey: false;
|
|
6629
|
+
isAutoincrement: false;
|
|
6630
|
+
hasRuntimeDefault: false;
|
|
6631
|
+
enumValues: [string, ...string[]];
|
|
6632
|
+
baseColumn: never;
|
|
6633
|
+
identity: undefined;
|
|
6634
|
+
generated: undefined;
|
|
6635
|
+
}, {}, {
|
|
6636
|
+
$type: "failed" | "queued" | "executing" | "succeeded";
|
|
6637
|
+
}>;
|
|
6638
|
+
leaseExpiresAt: drizzle_orm_pg_core.PgColumn<{
|
|
6639
|
+
name: "lease_expires_at";
|
|
6640
|
+
tableName: "agent_action_proposal";
|
|
6641
|
+
dataType: "number";
|
|
6642
|
+
columnType: "PgBigInt53";
|
|
6643
|
+
data: number;
|
|
6644
|
+
driverParam: string | number;
|
|
6645
|
+
notNull: false;
|
|
6646
|
+
hasDefault: false;
|
|
6647
|
+
isPrimaryKey: false;
|
|
6648
|
+
isAutoincrement: false;
|
|
6649
|
+
hasRuntimeDefault: false;
|
|
6650
|
+
enumValues: undefined;
|
|
6651
|
+
baseColumn: never;
|
|
6652
|
+
identity: undefined;
|
|
6653
|
+
generated: undefined;
|
|
6654
|
+
}, {}, {}>;
|
|
6655
|
+
deliveryStatus: drizzle_orm_pg_core.PgColumn<{
|
|
6656
|
+
name: "delivery_status";
|
|
6657
|
+
tableName: "agent_action_proposal";
|
|
6658
|
+
dataType: "string";
|
|
6659
|
+
columnType: "PgText";
|
|
6660
|
+
data: string;
|
|
6661
|
+
driverParam: string;
|
|
6662
|
+
notNull: false;
|
|
6663
|
+
hasDefault: false;
|
|
6664
|
+
isPrimaryKey: false;
|
|
6665
|
+
isAutoincrement: false;
|
|
6666
|
+
hasRuntimeDefault: false;
|
|
6667
|
+
enumValues: [string, ...string[]];
|
|
6668
|
+
baseColumn: never;
|
|
6669
|
+
identity: undefined;
|
|
6670
|
+
generated: undefined;
|
|
6671
|
+
}, {}, {}>;
|
|
6672
|
+
deliveryLeaseExpiresAt: drizzle_orm_pg_core.PgColumn<{
|
|
6673
|
+
name: "delivery_lease_expires_at";
|
|
6674
|
+
tableName: "agent_action_proposal";
|
|
6675
|
+
dataType: "number";
|
|
6676
|
+
columnType: "PgBigInt53";
|
|
6677
|
+
data: number;
|
|
6678
|
+
driverParam: string | number;
|
|
6679
|
+
notNull: false;
|
|
6680
|
+
hasDefault: false;
|
|
6681
|
+
isPrimaryKey: false;
|
|
6682
|
+
isAutoincrement: false;
|
|
6683
|
+
hasRuntimeDefault: false;
|
|
6684
|
+
enumValues: undefined;
|
|
6685
|
+
baseColumn: never;
|
|
6686
|
+
identity: undefined;
|
|
6687
|
+
generated: undefined;
|
|
6688
|
+
}, {}, {}>;
|
|
6689
|
+
replacementGroupKey: drizzle_orm_pg_core.PgColumn<{
|
|
6690
|
+
name: "replacement_group_key";
|
|
6691
|
+
tableName: "agent_action_proposal";
|
|
6692
|
+
dataType: "string";
|
|
6693
|
+
columnType: "PgText";
|
|
6694
|
+
data: string;
|
|
6695
|
+
driverParam: string;
|
|
6696
|
+
notNull: false;
|
|
6697
|
+
hasDefault: false;
|
|
6698
|
+
isPrimaryKey: false;
|
|
6699
|
+
isAutoincrement: false;
|
|
6700
|
+
hasRuntimeDefault: false;
|
|
6701
|
+
enumValues: [string, ...string[]];
|
|
6702
|
+
baseColumn: never;
|
|
6703
|
+
identity: undefined;
|
|
6704
|
+
generated: undefined;
|
|
6705
|
+
}, {}, {}>;
|
|
6706
|
+
outcomeIdKey: drizzle_orm_pg_core.PgColumn<{
|
|
6707
|
+
name: "outcome_id_key";
|
|
6708
|
+
tableName: "agent_action_proposal";
|
|
6709
|
+
dataType: "string";
|
|
6710
|
+
columnType: "PgText";
|
|
6711
|
+
data: string;
|
|
6712
|
+
driverParam: string;
|
|
6713
|
+
notNull: false;
|
|
6714
|
+
hasDefault: false;
|
|
6715
|
+
isPrimaryKey: false;
|
|
6716
|
+
isAutoincrement: false;
|
|
6717
|
+
hasRuntimeDefault: false;
|
|
6718
|
+
enumValues: [string, ...string[]];
|
|
6719
|
+
baseColumn: never;
|
|
6720
|
+
identity: undefined;
|
|
6721
|
+
generated: undefined;
|
|
6722
|
+
}, {}, {}>;
|
|
6723
|
+
proposalExpiresAt: drizzle_orm_pg_core.PgColumn<{
|
|
6724
|
+
name: "proposal_expires_at";
|
|
6725
|
+
tableName: "agent_action_proposal";
|
|
6726
|
+
dataType: "number";
|
|
6727
|
+
columnType: "PgBigInt53";
|
|
6728
|
+
data: number;
|
|
6729
|
+
driverParam: string | number;
|
|
6730
|
+
notNull: false;
|
|
6731
|
+
hasDefault: false;
|
|
6732
|
+
isPrimaryKey: false;
|
|
6733
|
+
isAutoincrement: false;
|
|
6734
|
+
hasRuntimeDefault: false;
|
|
6735
|
+
enumValues: undefined;
|
|
6736
|
+
baseColumn: never;
|
|
6737
|
+
identity: undefined;
|
|
6738
|
+
generated: undefined;
|
|
6739
|
+
}, {}, {}>;
|
|
6740
|
+
discoveryIndexVersion: drizzle_orm_pg_core.PgColumn<{
|
|
6741
|
+
name: "discovery_index_version";
|
|
6742
|
+
tableName: "agent_action_proposal";
|
|
6743
|
+
dataType: "number";
|
|
6744
|
+
columnType: "PgBigInt53";
|
|
6745
|
+
data: number;
|
|
6746
|
+
driverParam: string | number;
|
|
6747
|
+
notNull: true;
|
|
6748
|
+
hasDefault: true;
|
|
6749
|
+
isPrimaryKey: false;
|
|
6750
|
+
isAutoincrement: false;
|
|
6751
|
+
hasRuntimeDefault: false;
|
|
6752
|
+
enumValues: undefined;
|
|
6753
|
+
baseColumn: never;
|
|
6754
|
+
identity: undefined;
|
|
6755
|
+
generated: undefined;
|
|
6756
|
+
}, {}, {}>;
|
|
6757
|
+
createdAt: drizzle_orm_pg_core.PgColumn<{
|
|
6758
|
+
name: "created_at";
|
|
6759
|
+
tableName: "agent_action_proposal";
|
|
6760
|
+
dataType: "number";
|
|
6761
|
+
columnType: "PgBigInt53";
|
|
6762
|
+
data: number;
|
|
6763
|
+
driverParam: string | number;
|
|
6764
|
+
notNull: true;
|
|
6765
|
+
hasDefault: false;
|
|
6766
|
+
isPrimaryKey: false;
|
|
6767
|
+
isAutoincrement: false;
|
|
6768
|
+
hasRuntimeDefault: false;
|
|
6769
|
+
enumValues: undefined;
|
|
6770
|
+
baseColumn: never;
|
|
6771
|
+
identity: undefined;
|
|
6772
|
+
generated: undefined;
|
|
6773
|
+
}, {}, {}>;
|
|
6774
|
+
};
|
|
6775
|
+
dialect: "pg";
|
|
5497
6776
|
}>;
|
|
5498
|
-
/**
|
|
5499
|
-
* Every matching row, newest first, streamed in batches — the sweep-safe way to walk this table.
|
|
5500
|
-
*
|
|
5501
|
-
* Paging is *keyset*, not offset: each batch asks for the rows that sort strictly after the last
|
|
5502
|
-
* row yielded, using `(updatedAt, documentId)` — one point in
|
|
5503
|
-
* {@link RAG_INGESTION_LOG_PAGE_ORDER}, which is total because it ends in the primary key. A
|
|
5504
|
-
* cursor made of column values does not move when rows leave the table, which is what makes this
|
|
5505
|
-
* delete-safe *by construction* rather than by the caller carefully advancing an offset by only
|
|
5506
|
-
* the rows it kept.
|
|
5507
|
-
*
|
|
5508
|
-
* **The guarantee, stated once:** a row is yielded exactly when — at the moment the batch that
|
|
5509
|
-
* would contain it is fetched — the row exists, matches `where`, and sorts strictly after the
|
|
5510
|
-
* last row already yielded. Everything below is a consequence of that one sentence.
|
|
5511
|
-
*
|
|
5512
|
-
* What you can rely on:
|
|
5513
|
-
* - **Deleting rows while iterating is safe.** Delete any row you like — the one just yielded, the
|
|
5514
|
-
* whole batch, rows you have not reached yet — and every row that is still there when the sweep
|
|
5515
|
-
* reaches its position is visited exactly once. Nothing is skipped and nothing is repeated,
|
|
5516
|
-
* because deleting a row moves no *other* row's `(updatedAt, documentId)`. (Rows you delete
|
|
5517
|
-
* *ahead* of the cursor are simply never visited, which is the point of deleting them.)
|
|
5518
|
-
* - **Ties are safe.** A bulk upload stamps a whole batch with the same `updatedAt`; the
|
|
5519
|
-
* `documentId` tiebreaker keeps consecutive batches disjoint even when every row ties.
|
|
5520
|
-
* - **Each row is yielded at most once**, for as long as `updatedAt` only ever moves forward —
|
|
5521
|
-
* which is what `record()` does, since it always stamps `now`.
|
|
5522
|
-
*
|
|
5523
|
-
* What this is **not**: a snapshot, or a repeatable read. The sweep observes the table as it is
|
|
5524
|
-
* when each batch is fetched, so:
|
|
5525
|
-
* - A row **inserted** mid-sweep by `record()` is stamped `now`. The order is newest-first, so it
|
|
5526
|
-
* sorts ahead of a cursor the sweep has already moved past, and is not visited. A sweep
|
|
5527
|
-
* therefore never sees documents ingested after it started — the behaviour an orphan sweep
|
|
5528
|
-
* wants, since a document that arrived while you were sweeping is not an orphan. (A *direct*
|
|
5529
|
-
* insert with a backdated `updatedAt` lands ahead of the cursor and **is** visited; nothing in
|
|
5530
|
-
* this class writes one.)
|
|
5531
|
-
* - A row **re-ingested** mid-sweep has its `updatedAt` bumped to `now`, moving it ahead of the
|
|
5532
|
-
* cursor for the same reason. If the sweep had already passed it, it is not visited twice; if it
|
|
5533
|
-
* had not, it is **missed for this pass**. That is the honest limit: against a concurrent
|
|
5534
|
-
* writer `iterate` guarantees "at most once", not "at least once". Sweeps that must not miss a
|
|
5535
|
-
* concurrently-rewritten row should be idempotent and run again.
|
|
5536
|
-
* - Only a row whose `updatedAt` moves *backwards* — which needs a direct write — can be yielded
|
|
5537
|
-
* twice.
|
|
5538
|
-
* - `collection` / `status` are re-evaluated per batch, so a row that stops matching mid-sweep
|
|
5539
|
-
* stops being visited.
|
|
5540
|
-
*
|
|
5541
|
-
* There is no `limit`/`offset` here on purpose: `where` says *which* rows, `options` says how the
|
|
5542
|
-
* sweep is run. A sweep that stops early stops by `break`ing out of the `for await`.
|
|
5543
|
-
*/
|
|
5544
|
-
iterate(where?: RagIngestionLogWhere, options?: RagIngestionLogIterateOptions): AsyncGenerator<RagIngestionLogRow, void, undefined>;
|
|
5545
|
-
/**
|
|
5546
|
-
* Just the document ids of the matching rows, in {@link RAG_INGESTION_LOG_PAGE_ORDER}.
|
|
5547
|
-
*
|
|
5548
|
-
* Returns **all** of them — no 200-row cap, unlike `list` — by sweeping on {@link iterate}'s
|
|
5549
|
-
* keyset internally, so it is correct against concurrent deletes for the same reason `iterate`
|
|
5550
|
-
* is. What the cap protects against is hydrating an unbounded number of wide rows (`error` is a
|
|
5551
|
-
* TEXT column); this selects two columns — the id, plus the `updatedAt` the cursor needs — and
|
|
5552
|
-
* keeps only the ids, so the peak footprint is one batch of two-column rows plus a list of
|
|
5553
|
-
* strings whose size *is* the answer the caller asked for.
|
|
5554
|
-
*
|
|
5555
|
-
* For callers that need the id set of a collection and nothing else: an orphan sweep unioning the
|
|
5556
|
-
* log against the vector store's own document list.
|
|
5557
|
-
*/
|
|
5558
|
-
listDocumentIds(where?: RagIngestionLogWhere, options?: {
|
|
5559
|
-
batchSize?: number;
|
|
5560
|
-
}): Promise<string[]>;
|
|
5561
|
-
/** The latest recorded outcome for one document, or null if it was never attempted. */
|
|
5562
|
-
get(documentId: string): Promise<RagIngestionLogRow | null>;
|
|
5563
|
-
/** Forget one document's record. Returns whether a row was actually removed. */
|
|
5564
|
-
remove(documentId: string): Promise<boolean>;
|
|
5565
|
-
/** Forget every record for a collection — for when the collection itself is deleted. */
|
|
5566
|
-
removeByCollection(collection: string): Promise<number>;
|
|
5567
|
-
/**
|
|
5568
|
-
* The keyset sweep both {@link iterate} and {@link listDocumentIds} are made of. `page` decides
|
|
5569
|
-
* how wide a row is — whole rows for `iterate`, two columns for `listDocumentIds` — and the
|
|
5570
|
-
* `R extends RagIngestionLogCursor` bound says the only thing the sweep needs back: a row it can
|
|
5571
|
-
* read the next cursor off.
|
|
5572
|
-
*
|
|
5573
|
-
* The cursor advances **per yielded row**, not per batch, so a consumer that `break`s mid-batch
|
|
5574
|
-
* leaves it on the last row it actually saw. It is two column values read off that row, so a row
|
|
5575
|
-
* leaving the table cannot move it — the whole reason this is delete-safe by construction.
|
|
5576
|
-
*/
|
|
5577
|
-
private sweep;
|
|
5578
|
-
private where;
|
|
5579
|
-
/**
|
|
5580
|
-
* The coordinates filter AND'd with "strictly after `cursor` in
|
|
5581
|
-
* {@link RAG_INGESTION_LOG_PAGE_ORDER}".
|
|
5582
|
-
*
|
|
5583
|
-
* The order is `updatedAt desc, documentId asc`, so "after" means an older timestamp, or the same
|
|
5584
|
-
* timestamp and a larger id. Both halves are needed: the `<` alone would re-yield every row tied
|
|
5585
|
-
* with the cursor, and dropping the tie branch would skip them instead.
|
|
5586
|
-
*/
|
|
5587
|
-
private keyset;
|
|
5588
|
-
/**
|
|
5589
|
-
* Upsert one outcome. Keyed by document id so the row always reflects the *current* state — a
|
|
5590
|
-
* retry that succeeds overwrites the failure it replaces, rather than leaving a stale error next
|
|
5591
|
-
* to a working document.
|
|
5592
|
-
*/
|
|
5593
|
-
private record;
|
|
5594
|
-
private track;
|
|
5595
|
-
}
|
|
5596
|
-
|
|
5597
|
-
/** Options for {@link DrizzleAgentStoreModule.forRoot}. The app owns and supplies the db handle. */
|
|
5598
|
-
interface DrizzleAgentStoreModuleOptions {
|
|
5599
|
-
/**
|
|
5600
|
-
* A Drizzle database on SQLite, Postgres or MySQL — `drizzle(client, { schema: agentSchema })`,
|
|
5601
|
-
* `pgAgentSchema` or `mysqlAgentSchema`. The stores read the dialect off the handle.
|
|
5602
|
-
*/
|
|
5603
|
-
db: AgentDrizzleDb;
|
|
5604
|
-
/**
|
|
5605
|
-
* Bind {@link AGENT_PRICING_STORE} (which {@link DrizzleGovernanceQueries} prices usage against) to
|
|
5606
|
-
* a host-supplied store instead of the default {@link DrizzlePricingStore} — make your OWN pricing
|
|
5607
|
-
* table the single source of cost truth without touching `agent_model_pricing`.
|
|
5608
|
-
*/
|
|
5609
|
-
pricingStore?: Type<AgentPricingStore>;
|
|
5610
|
-
/**
|
|
5611
|
-
* Record every RAG ingestion outcome into `rag_ingestion_log` by subscribing to the `aviary:rag:*`
|
|
5612
|
-
* diagnostics channels (default `true`, matching the MikroORM adapter). This is the only place a
|
|
5613
|
-
* *failed* or *skipped* document is visible — one that produced no chunks doesn't exist as far as
|
|
5614
|
-
* `VectorStore.listDocuments()` is concerned. Set `false` if you don't ingest media into RAG, or
|
|
5615
|
-
* record outcomes yourself.
|
|
5616
|
-
*
|
|
5617
|
-
* The table has to exist: `ensureAgentSchema` creates it, or write the `CREATE TABLE` into
|
|
5618
|
-
* your own migrations. Writes are best-effort, so a missing table costs a warning per ingestion
|
|
5619
|
-
* rather than a failed ingestion.
|
|
5620
|
-
*/
|
|
5621
|
-
ragIngestionLog?: boolean;
|
|
5622
|
-
}
|
|
5623
|
-
/**
|
|
5624
|
-
* Binds {@link DrizzleAgentStore} to the {@link AGENT_STORE} token consumed by
|
|
5625
|
-
* `@dudousxd/nestjs-agent`, plus {@link DrizzleGovernanceQueries} to
|
|
5626
|
-
* {@link AGENT_GOVERNANCE_QUERIES} (the read-model the dashboard/telescope surfaces consume) and
|
|
5627
|
-
* {@link DrizzlePricingStore} to {@link AGENT_PRICING_STORE} (the write side of that pricing table),
|
|
5628
|
-
* and {@link DrizzleConfirmTokenStore} to {@link AGENT_CONFIRM_TOKEN_STORE} (confirmed writes).
|
|
5629
|
-
* The host app supplies an already-opened Drizzle db — this module never opens a connection itself.
|
|
5630
|
-
*
|
|
5631
|
-
* The returned module is global, so {@link AGENT_STORE}, {@link AGENT_GOVERNANCE_QUERIES} and
|
|
5632
|
-
* {@link AGENT_PRICING_STORE} are visible app-wide — `AgentModule` resolves the store without an
|
|
5633
|
-
* explicit `store` option, and the dashboard/telescope resolve {@link AGENT_GOVERNANCE_QUERIES}
|
|
5634
|
-
* without the host re-binding it.
|
|
5635
|
-
*
|
|
5636
|
-
* ```ts
|
|
5637
|
-
* @Module({ imports: [DrizzleAgentStoreModule.forRoot({ db })] })
|
|
5638
|
-
* export class AppModule {}
|
|
5639
|
-
* ```
|
|
5640
|
-
*/
|
|
5641
|
-
declare class DrizzleAgentStoreModule {
|
|
5642
|
-
static forRoot(options: DrizzleAgentStoreModuleOptions): DynamicModule;
|
|
5643
|
-
}
|
|
5644
|
-
|
|
5645
|
-
/** Every agent table, for `drizzle(pool, { schema: pgAgentSchema })` on Postgres. */
|
|
5646
|
-
declare const pgAgentSchema: {
|
|
5647
6777
|
agentThread: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
5648
6778
|
name: "agent_thread";
|
|
5649
6779
|
schema: undefined;
|
|
@@ -5931,6 +7061,23 @@ declare const pgAgentSchema: {
|
|
|
5931
7061
|
}, {}, {
|
|
5932
7062
|
$type: MessageRole;
|
|
5933
7063
|
}>;
|
|
7064
|
+
actionProposalOutcome: drizzle_orm_pg_core.PgColumn<{
|
|
7065
|
+
name: "action_proposal_outcome";
|
|
7066
|
+
tableName: "agent_message";
|
|
7067
|
+
dataType: "string";
|
|
7068
|
+
columnType: "PgText";
|
|
7069
|
+
data: string;
|
|
7070
|
+
driverParam: string;
|
|
7071
|
+
notNull: false;
|
|
7072
|
+
hasDefault: false;
|
|
7073
|
+
isPrimaryKey: false;
|
|
7074
|
+
isAutoincrement: false;
|
|
7075
|
+
hasRuntimeDefault: false;
|
|
7076
|
+
enumValues: [string, ...string[]];
|
|
7077
|
+
baseColumn: never;
|
|
7078
|
+
identity: undefined;
|
|
7079
|
+
generated: undefined;
|
|
7080
|
+
}, {}, {}>;
|
|
5934
7081
|
content: drizzle_orm_pg_core.PgColumn<{
|
|
5935
7082
|
name: "content";
|
|
5936
7083
|
tableName: "agent_message";
|
|
@@ -6207,6 +7354,25 @@ declare const pgAgentSchema: {
|
|
|
6207
7354
|
name: "agent_queued_message";
|
|
6208
7355
|
schema: undefined;
|
|
6209
7356
|
columns: {
|
|
7357
|
+
uiCapabilities: drizzle_orm_pg_core.PgColumn<{
|
|
7358
|
+
name: "ui_capabilities";
|
|
7359
|
+
tableName: "agent_queued_message";
|
|
7360
|
+
dataType: "json";
|
|
7361
|
+
columnType: "PgJsonb";
|
|
7362
|
+
data: UiCapabilities;
|
|
7363
|
+
driverParam: unknown;
|
|
7364
|
+
notNull: false;
|
|
7365
|
+
hasDefault: false;
|
|
7366
|
+
isPrimaryKey: false;
|
|
7367
|
+
isAutoincrement: false;
|
|
7368
|
+
hasRuntimeDefault: false;
|
|
7369
|
+
enumValues: undefined;
|
|
7370
|
+
baseColumn: never;
|
|
7371
|
+
identity: undefined;
|
|
7372
|
+
generated: undefined;
|
|
7373
|
+
}, {}, {
|
|
7374
|
+
$type: UiCapabilities;
|
|
7375
|
+
}>;
|
|
6210
7376
|
id: drizzle_orm_pg_core.PgColumn<{
|
|
6211
7377
|
name: "id";
|
|
6212
7378
|
tableName: "agent_queued_message";
|
|
@@ -6424,23 +7590,40 @@ declare const pgAgentSchema: {
|
|
|
6424
7590
|
columnType: "PgTimestamp";
|
|
6425
7591
|
data: Date;
|
|
6426
7592
|
driverParam: string;
|
|
6427
|
-
notNull: true;
|
|
7593
|
+
notNull: true;
|
|
7594
|
+
hasDefault: false;
|
|
7595
|
+
isPrimaryKey: false;
|
|
7596
|
+
isAutoincrement: false;
|
|
7597
|
+
hasRuntimeDefault: false;
|
|
7598
|
+
enumValues: undefined;
|
|
7599
|
+
baseColumn: never;
|
|
7600
|
+
identity: undefined;
|
|
7601
|
+
generated: undefined;
|
|
7602
|
+
}, {}, {}>;
|
|
7603
|
+
};
|
|
7604
|
+
dialect: "pg";
|
|
7605
|
+
}>;
|
|
7606
|
+
agentToolCall: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
7607
|
+
name: "agent_tool_call";
|
|
7608
|
+
schema: undefined;
|
|
7609
|
+
columns: {
|
|
7610
|
+
proposalId: drizzle_orm_pg_core.PgColumn<{
|
|
7611
|
+
name: "proposal_id";
|
|
7612
|
+
tableName: "agent_tool_call";
|
|
7613
|
+
dataType: "string";
|
|
7614
|
+
columnType: "PgText";
|
|
7615
|
+
data: string;
|
|
7616
|
+
driverParam: string;
|
|
7617
|
+
notNull: false;
|
|
6428
7618
|
hasDefault: false;
|
|
6429
7619
|
isPrimaryKey: false;
|
|
6430
7620
|
isAutoincrement: false;
|
|
6431
7621
|
hasRuntimeDefault: false;
|
|
6432
|
-
enumValues:
|
|
7622
|
+
enumValues: [string, ...string[]];
|
|
6433
7623
|
baseColumn: never;
|
|
6434
7624
|
identity: undefined;
|
|
6435
7625
|
generated: undefined;
|
|
6436
7626
|
}, {}, {}>;
|
|
6437
|
-
};
|
|
6438
|
-
dialect: "pg";
|
|
6439
|
-
}>;
|
|
6440
|
-
agentToolCall: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
6441
|
-
name: "agent_tool_call";
|
|
6442
|
-
schema: undefined;
|
|
6443
|
-
columns: {
|
|
6444
7627
|
id: drizzle_orm_pg_core.PgColumn<{
|
|
6445
7628
|
name: "id";
|
|
6446
7629
|
tableName: "agent_tool_call";
|
|
@@ -6666,6 +7849,25 @@ declare const pgAgentSchema: {
|
|
|
6666
7849
|
identity: undefined;
|
|
6667
7850
|
generated: undefined;
|
|
6668
7851
|
}, {}, {}>;
|
|
7852
|
+
confirmation: drizzle_orm_pg_core.PgColumn<{
|
|
7853
|
+
name: "confirmation";
|
|
7854
|
+
tableName: "agent_tool_call";
|
|
7855
|
+
dataType: "json";
|
|
7856
|
+
columnType: "PgJsonb";
|
|
7857
|
+
data: ToolConfirmation;
|
|
7858
|
+
driverParam: unknown;
|
|
7859
|
+
notNull: false;
|
|
7860
|
+
hasDefault: false;
|
|
7861
|
+
isPrimaryKey: false;
|
|
7862
|
+
isAutoincrement: false;
|
|
7863
|
+
hasRuntimeDefault: false;
|
|
7864
|
+
enumValues: undefined;
|
|
7865
|
+
baseColumn: never;
|
|
7866
|
+
identity: undefined;
|
|
7867
|
+
generated: undefined;
|
|
7868
|
+
}, {}, {
|
|
7869
|
+
$type: ToolConfirmation;
|
|
7870
|
+
}>;
|
|
6669
7871
|
approver: drizzle_orm_pg_core.PgColumn<{
|
|
6670
7872
|
name: "approver";
|
|
6671
7873
|
tableName: "agent_tool_call";
|
|
@@ -7690,21 +8892,267 @@ declare const pgAgentSchema: {
|
|
|
7690
8892
|
isPrimaryKey: false;
|
|
7691
8893
|
isAutoincrement: false;
|
|
7692
8894
|
hasRuntimeDefault: false;
|
|
7693
|
-
enumValues: [string, ...string[]];
|
|
8895
|
+
enumValues: [string, ...string[]];
|
|
8896
|
+
baseColumn: never;
|
|
8897
|
+
identity: undefined;
|
|
8898
|
+
generated: undefined;
|
|
8899
|
+
}, {}, {}>;
|
|
8900
|
+
error: drizzle_orm_pg_core.PgColumn<{
|
|
8901
|
+
name: "error";
|
|
8902
|
+
tableName: "rag_ingestion_log";
|
|
8903
|
+
dataType: "string";
|
|
8904
|
+
columnType: "PgText";
|
|
8905
|
+
data: string;
|
|
8906
|
+
driverParam: string;
|
|
8907
|
+
notNull: false;
|
|
8908
|
+
hasDefault: false;
|
|
8909
|
+
isPrimaryKey: false;
|
|
8910
|
+
isAutoincrement: false;
|
|
8911
|
+
hasRuntimeDefault: false;
|
|
8912
|
+
enumValues: [string, ...string[]];
|
|
8913
|
+
baseColumn: never;
|
|
8914
|
+
identity: undefined;
|
|
8915
|
+
generated: undefined;
|
|
8916
|
+
}, {}, {}>;
|
|
8917
|
+
createdAt: drizzle_orm_pg_core.PgColumn<{
|
|
8918
|
+
name: string;
|
|
8919
|
+
tableName: "rag_ingestion_log";
|
|
8920
|
+
dataType: "date";
|
|
8921
|
+
columnType: "PgTimestamp";
|
|
8922
|
+
data: Date;
|
|
8923
|
+
driverParam: string;
|
|
8924
|
+
notNull: true;
|
|
8925
|
+
hasDefault: false;
|
|
8926
|
+
isPrimaryKey: false;
|
|
8927
|
+
isAutoincrement: false;
|
|
8928
|
+
hasRuntimeDefault: false;
|
|
8929
|
+
enumValues: undefined;
|
|
8930
|
+
baseColumn: never;
|
|
8931
|
+
identity: undefined;
|
|
8932
|
+
generated: undefined;
|
|
8933
|
+
}, {}, {}>;
|
|
8934
|
+
updatedAt: drizzle_orm_pg_core.PgColumn<{
|
|
8935
|
+
name: string;
|
|
8936
|
+
tableName: "rag_ingestion_log";
|
|
8937
|
+
dataType: "date";
|
|
8938
|
+
columnType: "PgTimestamp";
|
|
8939
|
+
data: Date;
|
|
8940
|
+
driverParam: string;
|
|
8941
|
+
notNull: true;
|
|
8942
|
+
hasDefault: false;
|
|
8943
|
+
isPrimaryKey: false;
|
|
8944
|
+
isAutoincrement: false;
|
|
8945
|
+
hasRuntimeDefault: false;
|
|
8946
|
+
enumValues: undefined;
|
|
8947
|
+
baseColumn: never;
|
|
8948
|
+
identity: undefined;
|
|
8949
|
+
generated: undefined;
|
|
8950
|
+
}, {}, {}>;
|
|
8951
|
+
};
|
|
8952
|
+
dialect: "pg";
|
|
8953
|
+
}>;
|
|
8954
|
+
agentConfirmToken: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
8955
|
+
name: "agent_confirm_token";
|
|
8956
|
+
schema: undefined;
|
|
8957
|
+
columns: {
|
|
8958
|
+
hash: drizzle_orm_pg_core.PgColumn<{
|
|
8959
|
+
name: "hash";
|
|
8960
|
+
tableName: "agent_confirm_token";
|
|
8961
|
+
dataType: "string";
|
|
8962
|
+
columnType: "PgText";
|
|
8963
|
+
data: string;
|
|
8964
|
+
driverParam: string;
|
|
8965
|
+
notNull: true;
|
|
8966
|
+
hasDefault: false;
|
|
8967
|
+
isPrimaryKey: true;
|
|
8968
|
+
isAutoincrement: false;
|
|
8969
|
+
hasRuntimeDefault: false;
|
|
8970
|
+
enumValues: [string, ...string[]];
|
|
8971
|
+
baseColumn: never;
|
|
8972
|
+
identity: undefined;
|
|
8973
|
+
generated: undefined;
|
|
8974
|
+
}, {}, {}>;
|
|
8975
|
+
actorRef: drizzle_orm_pg_core.PgColumn<{
|
|
8976
|
+
name: "actor_ref";
|
|
8977
|
+
tableName: "agent_confirm_token";
|
|
8978
|
+
dataType: "string";
|
|
8979
|
+
columnType: "PgText";
|
|
8980
|
+
data: string;
|
|
8981
|
+
driverParam: string;
|
|
8982
|
+
notNull: true;
|
|
8983
|
+
hasDefault: false;
|
|
8984
|
+
isPrimaryKey: false;
|
|
8985
|
+
isAutoincrement: false;
|
|
8986
|
+
hasRuntimeDefault: false;
|
|
8987
|
+
enumValues: [string, ...string[]];
|
|
8988
|
+
baseColumn: never;
|
|
8989
|
+
identity: undefined;
|
|
8990
|
+
generated: undefined;
|
|
8991
|
+
}, {}, {}>;
|
|
8992
|
+
tool: drizzle_orm_pg_core.PgColumn<{
|
|
8993
|
+
name: "tool";
|
|
8994
|
+
tableName: "agent_confirm_token";
|
|
8995
|
+
dataType: "string";
|
|
8996
|
+
columnType: "PgText";
|
|
8997
|
+
data: string;
|
|
8998
|
+
driverParam: string;
|
|
8999
|
+
notNull: true;
|
|
9000
|
+
hasDefault: false;
|
|
9001
|
+
isPrimaryKey: false;
|
|
9002
|
+
isAutoincrement: false;
|
|
9003
|
+
hasRuntimeDefault: false;
|
|
9004
|
+
enumValues: [string, ...string[]];
|
|
9005
|
+
baseColumn: never;
|
|
9006
|
+
identity: undefined;
|
|
9007
|
+
generated: undefined;
|
|
9008
|
+
}, {}, {}>;
|
|
9009
|
+
expiresAt: drizzle_orm_pg_core.PgColumn<{
|
|
9010
|
+
name: "expires_at";
|
|
9011
|
+
tableName: "agent_confirm_token";
|
|
9012
|
+
dataType: "number";
|
|
9013
|
+
columnType: "PgBigInt53";
|
|
9014
|
+
data: number;
|
|
9015
|
+
driverParam: string | number;
|
|
9016
|
+
notNull: true;
|
|
9017
|
+
hasDefault: false;
|
|
9018
|
+
isPrimaryKey: false;
|
|
9019
|
+
isAutoincrement: false;
|
|
9020
|
+
hasRuntimeDefault: false;
|
|
9021
|
+
enumValues: undefined;
|
|
9022
|
+
baseColumn: never;
|
|
9023
|
+
identity: undefined;
|
|
9024
|
+
generated: undefined;
|
|
9025
|
+
}, {}, {}>;
|
|
9026
|
+
createdAt: drizzle_orm_pg_core.PgColumn<{
|
|
9027
|
+
name: "created_at";
|
|
9028
|
+
tableName: "agent_confirm_token";
|
|
9029
|
+
dataType: "number";
|
|
9030
|
+
columnType: "PgBigInt53";
|
|
9031
|
+
data: number;
|
|
9032
|
+
driverParam: string | number;
|
|
9033
|
+
notNull: true;
|
|
9034
|
+
hasDefault: false;
|
|
9035
|
+
isPrimaryKey: false;
|
|
9036
|
+
isAutoincrement: false;
|
|
9037
|
+
hasRuntimeDefault: false;
|
|
9038
|
+
enumValues: undefined;
|
|
9039
|
+
baseColumn: never;
|
|
9040
|
+
identity: undefined;
|
|
9041
|
+
generated: undefined;
|
|
9042
|
+
}, {}, {}>;
|
|
9043
|
+
};
|
|
9044
|
+
dialect: "pg";
|
|
9045
|
+
}>;
|
|
9046
|
+
agentStreamFrame: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
9047
|
+
name: "agent_stream_frame";
|
|
9048
|
+
schema: undefined;
|
|
9049
|
+
columns: {
|
|
9050
|
+
runId: drizzle_orm_pg_core.PgColumn<{
|
|
9051
|
+
name: "run_id";
|
|
9052
|
+
tableName: "agent_stream_frame";
|
|
9053
|
+
dataType: "string";
|
|
9054
|
+
columnType: "PgText";
|
|
9055
|
+
data: string;
|
|
9056
|
+
driverParam: string;
|
|
9057
|
+
notNull: true;
|
|
9058
|
+
hasDefault: false;
|
|
9059
|
+
isPrimaryKey: false;
|
|
9060
|
+
isAutoincrement: false;
|
|
9061
|
+
hasRuntimeDefault: false;
|
|
9062
|
+
enumValues: [string, ...string[]];
|
|
9063
|
+
baseColumn: never;
|
|
9064
|
+
identity: undefined;
|
|
9065
|
+
generated: undefined;
|
|
9066
|
+
}, {}, {}>;
|
|
9067
|
+
seq: drizzle_orm_pg_core.PgColumn<{
|
|
9068
|
+
name: "seq";
|
|
9069
|
+
tableName: "agent_stream_frame";
|
|
9070
|
+
dataType: "number";
|
|
9071
|
+
columnType: "PgInteger";
|
|
9072
|
+
data: number;
|
|
9073
|
+
driverParam: string | number;
|
|
9074
|
+
notNull: true;
|
|
9075
|
+
hasDefault: false;
|
|
9076
|
+
isPrimaryKey: false;
|
|
9077
|
+
isAutoincrement: false;
|
|
9078
|
+
hasRuntimeDefault: false;
|
|
9079
|
+
enumValues: undefined;
|
|
9080
|
+
baseColumn: never;
|
|
9081
|
+
identity: undefined;
|
|
9082
|
+
generated: undefined;
|
|
9083
|
+
}, {}, {}>;
|
|
9084
|
+
frame: drizzle_orm_pg_core.PgColumn<{
|
|
9085
|
+
name: "frame";
|
|
9086
|
+
tableName: "agent_stream_frame";
|
|
9087
|
+
dataType: "string";
|
|
9088
|
+
columnType: "PgText";
|
|
9089
|
+
data: string;
|
|
9090
|
+
driverParam: string;
|
|
9091
|
+
notNull: false;
|
|
9092
|
+
hasDefault: false;
|
|
9093
|
+
isPrimaryKey: false;
|
|
9094
|
+
isAutoincrement: false;
|
|
9095
|
+
hasRuntimeDefault: false;
|
|
9096
|
+
enumValues: [string, ...string[]];
|
|
9097
|
+
baseColumn: never;
|
|
9098
|
+
identity: undefined;
|
|
9099
|
+
generated: undefined;
|
|
9100
|
+
}, {}, {}>;
|
|
9101
|
+
error: drizzle_orm_pg_core.PgColumn<{
|
|
9102
|
+
name: "error";
|
|
9103
|
+
tableName: "agent_stream_frame";
|
|
9104
|
+
dataType: "string";
|
|
9105
|
+
columnType: "PgText";
|
|
9106
|
+
data: string;
|
|
9107
|
+
driverParam: string;
|
|
9108
|
+
notNull: false;
|
|
9109
|
+
hasDefault: false;
|
|
9110
|
+
isPrimaryKey: false;
|
|
9111
|
+
isAutoincrement: false;
|
|
9112
|
+
hasRuntimeDefault: false;
|
|
9113
|
+
enumValues: [string, ...string[]];
|
|
9114
|
+
baseColumn: never;
|
|
9115
|
+
identity: undefined;
|
|
9116
|
+
generated: undefined;
|
|
9117
|
+
}, {}, {}>;
|
|
9118
|
+
createdAt: drizzle_orm_pg_core.PgColumn<{
|
|
9119
|
+
name: "created_at";
|
|
9120
|
+
tableName: "agent_stream_frame";
|
|
9121
|
+
dataType: "number";
|
|
9122
|
+
columnType: "PgBigInt53";
|
|
9123
|
+
data: number;
|
|
9124
|
+
driverParam: string | number;
|
|
9125
|
+
notNull: true;
|
|
9126
|
+
hasDefault: false;
|
|
9127
|
+
isPrimaryKey: false;
|
|
9128
|
+
isAutoincrement: false;
|
|
9129
|
+
hasRuntimeDefault: false;
|
|
9130
|
+
enumValues: undefined;
|
|
7694
9131
|
baseColumn: never;
|
|
7695
9132
|
identity: undefined;
|
|
7696
9133
|
generated: undefined;
|
|
7697
9134
|
}, {}, {}>;
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
9135
|
+
};
|
|
9136
|
+
dialect: "pg";
|
|
9137
|
+
}>;
|
|
9138
|
+
};
|
|
9139
|
+
|
|
9140
|
+
/** Every agent table, for `drizzle(pool, { schema: mysqlAgentSchema, mode: 'default' })` on MySQL. */
|
|
9141
|
+
declare const mysqlAgentSchema: {
|
|
9142
|
+
agentActionProposal: drizzle_orm_mysql_core.MySqlTableWithColumns<{
|
|
9143
|
+
name: "agent_action_proposal";
|
|
9144
|
+
schema: undefined;
|
|
9145
|
+
columns: {
|
|
9146
|
+
id: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9147
|
+
name: string;
|
|
9148
|
+
tableName: "agent_action_proposal";
|
|
7701
9149
|
dataType: "string";
|
|
7702
|
-
columnType: "
|
|
9150
|
+
columnType: "MySqlVarChar";
|
|
7703
9151
|
data: string;
|
|
7704
|
-
driverParam: string;
|
|
7705
|
-
notNull:
|
|
9152
|
+
driverParam: string | number;
|
|
9153
|
+
notNull: true;
|
|
7706
9154
|
hasDefault: false;
|
|
7707
|
-
isPrimaryKey:
|
|
9155
|
+
isPrimaryKey: true;
|
|
7708
9156
|
isAutoincrement: false;
|
|
7709
9157
|
hasRuntimeDefault: false;
|
|
7710
9158
|
enumValues: [string, ...string[]];
|
|
@@ -7712,57 +9160,52 @@ declare const pgAgentSchema: {
|
|
|
7712
9160
|
identity: undefined;
|
|
7713
9161
|
generated: undefined;
|
|
7714
9162
|
}, {}, {}>;
|
|
7715
|
-
|
|
9163
|
+
scopeKey: drizzle_orm_mysql_core.MySqlColumn<{
|
|
7716
9164
|
name: string;
|
|
7717
|
-
tableName: "
|
|
7718
|
-
dataType: "
|
|
7719
|
-
columnType: "
|
|
7720
|
-
data:
|
|
7721
|
-
driverParam: string;
|
|
9165
|
+
tableName: "agent_action_proposal";
|
|
9166
|
+
dataType: "string";
|
|
9167
|
+
columnType: "MySqlVarChar";
|
|
9168
|
+
data: string;
|
|
9169
|
+
driverParam: string | number;
|
|
7722
9170
|
notNull: true;
|
|
7723
9171
|
hasDefault: false;
|
|
7724
9172
|
isPrimaryKey: false;
|
|
7725
9173
|
isAutoincrement: false;
|
|
7726
9174
|
hasRuntimeDefault: false;
|
|
7727
|
-
enumValues:
|
|
9175
|
+
enumValues: [string, ...string[]];
|
|
7728
9176
|
baseColumn: never;
|
|
7729
9177
|
identity: undefined;
|
|
7730
9178
|
generated: undefined;
|
|
7731
9179
|
}, {}, {}>;
|
|
7732
|
-
|
|
9180
|
+
decision: drizzle_orm_mysql_core.MySqlColumn<{
|
|
7733
9181
|
name: string;
|
|
7734
|
-
tableName: "
|
|
7735
|
-
dataType: "
|
|
7736
|
-
columnType: "
|
|
7737
|
-
data:
|
|
7738
|
-
driverParam: string;
|
|
9182
|
+
tableName: "agent_action_proposal";
|
|
9183
|
+
dataType: "string";
|
|
9184
|
+
columnType: "MySqlVarChar";
|
|
9185
|
+
data: _dudousxd_nestjs_agent_core.ActionProposalDecision;
|
|
9186
|
+
driverParam: string | number;
|
|
7739
9187
|
notNull: true;
|
|
7740
9188
|
hasDefault: false;
|
|
7741
9189
|
isPrimaryKey: false;
|
|
7742
9190
|
isAutoincrement: false;
|
|
7743
9191
|
hasRuntimeDefault: false;
|
|
7744
|
-
enumValues:
|
|
9192
|
+
enumValues: [string, ...string[]];
|
|
7745
9193
|
baseColumn: never;
|
|
7746
9194
|
identity: undefined;
|
|
7747
9195
|
generated: undefined;
|
|
7748
|
-
}, {}, {
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
schema: undefined;
|
|
7755
|
-
columns: {
|
|
7756
|
-
hash: drizzle_orm_pg_core.PgColumn<{
|
|
7757
|
-
name: "hash";
|
|
7758
|
-
tableName: "agent_confirm_token";
|
|
9196
|
+
}, {}, {
|
|
9197
|
+
$type: _dudousxd_nestjs_agent_core.ActionProposalDecision;
|
|
9198
|
+
}>;
|
|
9199
|
+
logicalSort: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9200
|
+
name: "logical_sort";
|
|
9201
|
+
tableName: "agent_action_proposal";
|
|
7759
9202
|
dataType: "string";
|
|
7760
|
-
columnType: "
|
|
9203
|
+
columnType: "MySqlVarChar";
|
|
7761
9204
|
data: string;
|
|
7762
|
-
driverParam: string;
|
|
9205
|
+
driverParam: string | number;
|
|
7763
9206
|
notNull: true;
|
|
7764
9207
|
hasDefault: false;
|
|
7765
|
-
isPrimaryKey:
|
|
9208
|
+
isPrimaryKey: false;
|
|
7766
9209
|
isAutoincrement: false;
|
|
7767
9210
|
hasRuntimeDefault: false;
|
|
7768
9211
|
enumValues: [string, ...string[]];
|
|
@@ -7770,11 +9213,11 @@ declare const pgAgentSchema: {
|
|
|
7770
9213
|
identity: undefined;
|
|
7771
9214
|
generated: undefined;
|
|
7772
9215
|
}, {}, {}>;
|
|
7773
|
-
|
|
7774
|
-
name: "
|
|
7775
|
-
tableName: "
|
|
9216
|
+
createFingerprint: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9217
|
+
name: "create_fingerprint";
|
|
9218
|
+
tableName: "agent_action_proposal";
|
|
7776
9219
|
dataType: "string";
|
|
7777
|
-
columnType: "
|
|
9220
|
+
columnType: "MySqlText";
|
|
7778
9221
|
data: string;
|
|
7779
9222
|
driverParam: string;
|
|
7780
9223
|
notNull: true;
|
|
@@ -7787,32 +9230,32 @@ declare const pgAgentSchema: {
|
|
|
7787
9230
|
identity: undefined;
|
|
7788
9231
|
generated: undefined;
|
|
7789
9232
|
}, {}, {}>;
|
|
7790
|
-
|
|
7791
|
-
name: "
|
|
7792
|
-
tableName: "
|
|
7793
|
-
dataType: "
|
|
7794
|
-
columnType: "
|
|
7795
|
-
data:
|
|
9233
|
+
proposal: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9234
|
+
name: "proposal";
|
|
9235
|
+
tableName: "agent_action_proposal";
|
|
9236
|
+
dataType: "custom";
|
|
9237
|
+
columnType: "MySqlCustomColumn";
|
|
9238
|
+
data: ActionProposal;
|
|
7796
9239
|
driverParam: string;
|
|
7797
9240
|
notNull: true;
|
|
7798
9241
|
hasDefault: false;
|
|
7799
9242
|
isPrimaryKey: false;
|
|
7800
9243
|
isAutoincrement: false;
|
|
7801
9244
|
hasRuntimeDefault: false;
|
|
7802
|
-
enumValues:
|
|
9245
|
+
enumValues: undefined;
|
|
7803
9246
|
baseColumn: never;
|
|
7804
9247
|
identity: undefined;
|
|
7805
9248
|
generated: undefined;
|
|
7806
9249
|
}, {}, {}>;
|
|
7807
|
-
|
|
7808
|
-
name: "
|
|
7809
|
-
tableName: "
|
|
9250
|
+
version: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9251
|
+
name: "version";
|
|
9252
|
+
tableName: "agent_action_proposal";
|
|
7810
9253
|
dataType: "number";
|
|
7811
|
-
columnType: "
|
|
9254
|
+
columnType: "MySqlBigInt53";
|
|
7812
9255
|
data: number;
|
|
7813
9256
|
driverParam: string | number;
|
|
7814
9257
|
notNull: true;
|
|
7815
|
-
hasDefault:
|
|
9258
|
+
hasDefault: true;
|
|
7816
9259
|
isPrimaryKey: false;
|
|
7817
9260
|
isAutoincrement: false;
|
|
7818
9261
|
hasRuntimeDefault: false;
|
|
@@ -7821,14 +9264,33 @@ declare const pgAgentSchema: {
|
|
|
7821
9264
|
identity: undefined;
|
|
7822
9265
|
generated: undefined;
|
|
7823
9266
|
}, {}, {}>;
|
|
7824
|
-
|
|
7825
|
-
name:
|
|
7826
|
-
tableName: "
|
|
9267
|
+
executionStatus: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9268
|
+
name: string;
|
|
9269
|
+
tableName: "agent_action_proposal";
|
|
9270
|
+
dataType: "string";
|
|
9271
|
+
columnType: "MySqlVarChar";
|
|
9272
|
+
data: "failed" | "queued" | "executing" | "succeeded";
|
|
9273
|
+
driverParam: string | number;
|
|
9274
|
+
notNull: false;
|
|
9275
|
+
hasDefault: false;
|
|
9276
|
+
isPrimaryKey: false;
|
|
9277
|
+
isAutoincrement: false;
|
|
9278
|
+
hasRuntimeDefault: false;
|
|
9279
|
+
enumValues: [string, ...string[]];
|
|
9280
|
+
baseColumn: never;
|
|
9281
|
+
identity: undefined;
|
|
9282
|
+
generated: undefined;
|
|
9283
|
+
}, {}, {
|
|
9284
|
+
$type: "failed" | "queued" | "executing" | "succeeded";
|
|
9285
|
+
}>;
|
|
9286
|
+
leaseExpiresAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9287
|
+
name: "lease_expires_at";
|
|
9288
|
+
tableName: "agent_action_proposal";
|
|
7827
9289
|
dataType: "number";
|
|
7828
|
-
columnType: "
|
|
9290
|
+
columnType: "MySqlBigInt53";
|
|
7829
9291
|
data: number;
|
|
7830
9292
|
driverParam: string | number;
|
|
7831
|
-
notNull:
|
|
9293
|
+
notNull: false;
|
|
7832
9294
|
hasDefault: false;
|
|
7833
9295
|
isPrimaryKey: false;
|
|
7834
9296
|
isAutoincrement: false;
|
|
@@ -7838,21 +9300,14 @@ declare const pgAgentSchema: {
|
|
|
7838
9300
|
identity: undefined;
|
|
7839
9301
|
generated: undefined;
|
|
7840
9302
|
}, {}, {}>;
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
agentStreamFrame: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
7845
|
-
name: "agent_stream_frame";
|
|
7846
|
-
schema: undefined;
|
|
7847
|
-
columns: {
|
|
7848
|
-
runId: drizzle_orm_pg_core.PgColumn<{
|
|
7849
|
-
name: "run_id";
|
|
7850
|
-
tableName: "agent_stream_frame";
|
|
9303
|
+
deliveryStatus: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9304
|
+
name: string;
|
|
9305
|
+
tableName: "agent_action_proposal";
|
|
7851
9306
|
dataType: "string";
|
|
7852
|
-
columnType: "
|
|
9307
|
+
columnType: "MySqlVarChar";
|
|
7853
9308
|
data: string;
|
|
7854
|
-
driverParam: string;
|
|
7855
|
-
notNull:
|
|
9309
|
+
driverParam: string | number;
|
|
9310
|
+
notNull: false;
|
|
7856
9311
|
hasDefault: false;
|
|
7857
9312
|
isPrimaryKey: false;
|
|
7858
9313
|
isAutoincrement: false;
|
|
@@ -7862,14 +9317,14 @@ declare const pgAgentSchema: {
|
|
|
7862
9317
|
identity: undefined;
|
|
7863
9318
|
generated: undefined;
|
|
7864
9319
|
}, {}, {}>;
|
|
7865
|
-
|
|
7866
|
-
name: "
|
|
7867
|
-
tableName: "
|
|
9320
|
+
deliveryLeaseExpiresAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9321
|
+
name: "delivery_lease_expires_at";
|
|
9322
|
+
tableName: "agent_action_proposal";
|
|
7868
9323
|
dataType: "number";
|
|
7869
|
-
columnType: "
|
|
9324
|
+
columnType: "MySqlBigInt53";
|
|
7870
9325
|
data: number;
|
|
7871
9326
|
driverParam: string | number;
|
|
7872
|
-
notNull:
|
|
9327
|
+
notNull: false;
|
|
7873
9328
|
hasDefault: false;
|
|
7874
9329
|
isPrimaryKey: false;
|
|
7875
9330
|
isAutoincrement: false;
|
|
@@ -7879,13 +9334,13 @@ declare const pgAgentSchema: {
|
|
|
7879
9334
|
identity: undefined;
|
|
7880
9335
|
generated: undefined;
|
|
7881
9336
|
}, {}, {}>;
|
|
7882
|
-
|
|
7883
|
-
name:
|
|
7884
|
-
tableName: "
|
|
9337
|
+
replacementGroupKey: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9338
|
+
name: string;
|
|
9339
|
+
tableName: "agent_action_proposal";
|
|
7885
9340
|
dataType: "string";
|
|
7886
|
-
columnType: "
|
|
9341
|
+
columnType: "MySqlVarChar";
|
|
7887
9342
|
data: string;
|
|
7888
|
-
driverParam: string;
|
|
9343
|
+
driverParam: string | number;
|
|
7889
9344
|
notNull: false;
|
|
7890
9345
|
hasDefault: false;
|
|
7891
9346
|
isPrimaryKey: false;
|
|
@@ -7896,13 +9351,13 @@ declare const pgAgentSchema: {
|
|
|
7896
9351
|
identity: undefined;
|
|
7897
9352
|
generated: undefined;
|
|
7898
9353
|
}, {}, {}>;
|
|
7899
|
-
|
|
7900
|
-
name:
|
|
7901
|
-
tableName: "
|
|
9354
|
+
outcomeIdKey: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9355
|
+
name: string;
|
|
9356
|
+
tableName: "agent_action_proposal";
|
|
7902
9357
|
dataType: "string";
|
|
7903
|
-
columnType: "
|
|
9358
|
+
columnType: "MySqlVarChar";
|
|
7904
9359
|
data: string;
|
|
7905
|
-
driverParam: string;
|
|
9360
|
+
driverParam: string | number;
|
|
7906
9361
|
notNull: false;
|
|
7907
9362
|
hasDefault: false;
|
|
7908
9363
|
isPrimaryKey: false;
|
|
@@ -7913,11 +9368,45 @@ declare const pgAgentSchema: {
|
|
|
7913
9368
|
identity: undefined;
|
|
7914
9369
|
generated: undefined;
|
|
7915
9370
|
}, {}, {}>;
|
|
7916
|
-
|
|
9371
|
+
proposalExpiresAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9372
|
+
name: "proposal_expires_at";
|
|
9373
|
+
tableName: "agent_action_proposal";
|
|
9374
|
+
dataType: "number";
|
|
9375
|
+
columnType: "MySqlBigInt53";
|
|
9376
|
+
data: number;
|
|
9377
|
+
driverParam: string | number;
|
|
9378
|
+
notNull: false;
|
|
9379
|
+
hasDefault: false;
|
|
9380
|
+
isPrimaryKey: false;
|
|
9381
|
+
isAutoincrement: false;
|
|
9382
|
+
hasRuntimeDefault: false;
|
|
9383
|
+
enumValues: undefined;
|
|
9384
|
+
baseColumn: never;
|
|
9385
|
+
identity: undefined;
|
|
9386
|
+
generated: undefined;
|
|
9387
|
+
}, {}, {}>;
|
|
9388
|
+
discoveryIndexVersion: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9389
|
+
name: "discovery_index_version";
|
|
9390
|
+
tableName: "agent_action_proposal";
|
|
9391
|
+
dataType: "number";
|
|
9392
|
+
columnType: "MySqlBigInt53";
|
|
9393
|
+
data: number;
|
|
9394
|
+
driverParam: string | number;
|
|
9395
|
+
notNull: true;
|
|
9396
|
+
hasDefault: true;
|
|
9397
|
+
isPrimaryKey: false;
|
|
9398
|
+
isAutoincrement: false;
|
|
9399
|
+
hasRuntimeDefault: false;
|
|
9400
|
+
enumValues: undefined;
|
|
9401
|
+
baseColumn: never;
|
|
9402
|
+
identity: undefined;
|
|
9403
|
+
generated: undefined;
|
|
9404
|
+
}, {}, {}>;
|
|
9405
|
+
createdAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
7917
9406
|
name: "created_at";
|
|
7918
|
-
tableName: "
|
|
9407
|
+
tableName: "agent_action_proposal";
|
|
7919
9408
|
dataType: "number";
|
|
7920
|
-
columnType: "
|
|
9409
|
+
columnType: "MySqlBigInt53";
|
|
7921
9410
|
data: number;
|
|
7922
9411
|
driverParam: string | number;
|
|
7923
9412
|
notNull: true;
|
|
@@ -7931,12 +9420,8 @@ declare const pgAgentSchema: {
|
|
|
7931
9420
|
generated: undefined;
|
|
7932
9421
|
}, {}, {}>;
|
|
7933
9422
|
};
|
|
7934
|
-
dialect: "
|
|
9423
|
+
dialect: "mysql";
|
|
7935
9424
|
}>;
|
|
7936
|
-
};
|
|
7937
|
-
|
|
7938
|
-
/** Every agent table, for `drizzle(pool, { schema: mysqlAgentSchema, mode: 'default' })` on MySQL. */
|
|
7939
|
-
declare const mysqlAgentSchema: {
|
|
7940
9425
|
agentThread: drizzle_orm_mysql_core.MySqlTableWithColumns<{
|
|
7941
9426
|
name: "agent_thread";
|
|
7942
9427
|
schema: undefined;
|
|
@@ -8224,6 +9709,23 @@ declare const mysqlAgentSchema: {
|
|
|
8224
9709
|
}, {}, {
|
|
8225
9710
|
$type: MessageRole;
|
|
8226
9711
|
}>;
|
|
9712
|
+
actionProposalOutcome: drizzle_orm_mysql_core.MySqlColumn<{
|
|
9713
|
+
name: "action_proposal_outcome";
|
|
9714
|
+
tableName: "agent_message";
|
|
9715
|
+
dataType: "string";
|
|
9716
|
+
columnType: "MySqlText";
|
|
9717
|
+
data: string;
|
|
9718
|
+
driverParam: string;
|
|
9719
|
+
notNull: false;
|
|
9720
|
+
hasDefault: false;
|
|
9721
|
+
isPrimaryKey: false;
|
|
9722
|
+
isAutoincrement: false;
|
|
9723
|
+
hasRuntimeDefault: false;
|
|
9724
|
+
enumValues: [string, ...string[]];
|
|
9725
|
+
baseColumn: never;
|
|
9726
|
+
identity: undefined;
|
|
9727
|
+
generated: undefined;
|
|
9728
|
+
}, {}, {}>;
|
|
8227
9729
|
content: drizzle_orm_mysql_core.MySqlColumn<{
|
|
8228
9730
|
name: "content";
|
|
8229
9731
|
tableName: "agent_message";
|
|
@@ -8500,6 +10002,25 @@ declare const mysqlAgentSchema: {
|
|
|
8500
10002
|
name: "agent_queued_message";
|
|
8501
10003
|
schema: undefined;
|
|
8502
10004
|
columns: {
|
|
10005
|
+
uiCapabilities: drizzle_orm_mysql_core.MySqlColumn<{
|
|
10006
|
+
name: "ui_capabilities";
|
|
10007
|
+
tableName: "agent_queued_message";
|
|
10008
|
+
dataType: "json";
|
|
10009
|
+
columnType: "MySqlJson";
|
|
10010
|
+
data: UiCapabilities;
|
|
10011
|
+
driverParam: string;
|
|
10012
|
+
notNull: false;
|
|
10013
|
+
hasDefault: false;
|
|
10014
|
+
isPrimaryKey: false;
|
|
10015
|
+
isAutoincrement: false;
|
|
10016
|
+
hasRuntimeDefault: false;
|
|
10017
|
+
enumValues: undefined;
|
|
10018
|
+
baseColumn: never;
|
|
10019
|
+
identity: undefined;
|
|
10020
|
+
generated: undefined;
|
|
10021
|
+
}, {}, {
|
|
10022
|
+
$type: UiCapabilities;
|
|
10023
|
+
}>;
|
|
8503
10024
|
id: drizzle_orm_mysql_core.MySqlColumn<{
|
|
8504
10025
|
name: string;
|
|
8505
10026
|
tableName: "agent_queued_message";
|
|
@@ -8734,6 +10255,23 @@ declare const mysqlAgentSchema: {
|
|
|
8734
10255
|
name: "agent_tool_call";
|
|
8735
10256
|
schema: undefined;
|
|
8736
10257
|
columns: {
|
|
10258
|
+
proposalId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
10259
|
+
name: string;
|
|
10260
|
+
tableName: "agent_tool_call";
|
|
10261
|
+
dataType: "string";
|
|
10262
|
+
columnType: "MySqlVarChar";
|
|
10263
|
+
data: string;
|
|
10264
|
+
driverParam: string | number;
|
|
10265
|
+
notNull: false;
|
|
10266
|
+
hasDefault: false;
|
|
10267
|
+
isPrimaryKey: false;
|
|
10268
|
+
isAutoincrement: false;
|
|
10269
|
+
hasRuntimeDefault: false;
|
|
10270
|
+
enumValues: [string, ...string[]];
|
|
10271
|
+
baseColumn: never;
|
|
10272
|
+
identity: undefined;
|
|
10273
|
+
generated: undefined;
|
|
10274
|
+
}, {}, {}>;
|
|
8737
10275
|
id: drizzle_orm_mysql_core.MySqlColumn<{
|
|
8738
10276
|
name: string;
|
|
8739
10277
|
tableName: "agent_tool_call";
|
|
@@ -8959,6 +10497,25 @@ declare const mysqlAgentSchema: {
|
|
|
8959
10497
|
identity: undefined;
|
|
8960
10498
|
generated: undefined;
|
|
8961
10499
|
}, {}, {}>;
|
|
10500
|
+
confirmation: drizzle_orm_mysql_core.MySqlColumn<{
|
|
10501
|
+
name: "confirmation";
|
|
10502
|
+
tableName: "agent_tool_call";
|
|
10503
|
+
dataType: "json";
|
|
10504
|
+
columnType: "MySqlJson";
|
|
10505
|
+
data: ToolConfirmation;
|
|
10506
|
+
driverParam: string;
|
|
10507
|
+
notNull: false;
|
|
10508
|
+
hasDefault: false;
|
|
10509
|
+
isPrimaryKey: false;
|
|
10510
|
+
isAutoincrement: false;
|
|
10511
|
+
hasRuntimeDefault: false;
|
|
10512
|
+
enumValues: undefined;
|
|
10513
|
+
baseColumn: never;
|
|
10514
|
+
identity: undefined;
|
|
10515
|
+
generated: undefined;
|
|
10516
|
+
}, {}, {
|
|
10517
|
+
$type: ToolConfirmation;
|
|
10518
|
+
}>;
|
|
8962
10519
|
approver: drizzle_orm_mysql_core.MySqlColumn<{
|
|
8963
10520
|
name: string;
|
|
8964
10521
|
tableName: "agent_tool_call";
|
|
@@ -10228,4 +11785,4 @@ declare const mysqlAgentSchema: {
|
|
|
10228
11785
|
}>;
|
|
10229
11786
|
};
|
|
10230
11787
|
|
|
10231
|
-
export { type AgentDialect, type AgentDrizzleDb, type AgentMemoryRow, type AgentMessageRow, type AgentMySqlDb, type AgentPgDb, type AgentQueuedMessageRow, type AgentRunRow, type AgentRunStatus, type AgentSqliteDb, type AgentThreadRow, DrizzleAgentStore, DrizzleAgentStoreModule, type DrizzleAgentStoreModuleOptions, DrizzleConfirmTokenStore, DrizzleGovernanceQueries, DrizzleMemoryProvider, DrizzlePricingStore, DrizzleRagIngestionLog, DrizzleStreamFrameTable, DrizzleTokenStreamSink, RAG_INGESTION_LOG_PAGE_ORDER, type RagIngestionLogCursor, type RagIngestionLogIterateOptions, type RagIngestionLogQuery, type RagIngestionLogRow, type RagIngestionLogWhere, type RagIngestionStatus, agentConfirmToken, agentDialectOf, agentMemory, agentMessage, agentModelPricing, agentQueuedMessage, agentRun, agentSchema, agentSchemaDdl, agentStreamFrame, agentThread, agentTokenUsage, agentToolCall, ensureAgentSchema, mysqlAgentSchema, pgAgentSchema, ragIngestionLog };
|
|
11788
|
+
export { type AgentDialect, type AgentDrizzleDb, type AgentMemoryRow, type AgentMessageRow, type AgentMySqlDb, type AgentPgDb, type AgentQueuedMessageRow, type AgentRunRow, type AgentRunStatus, type AgentSqliteDb, type AgentThreadRow, DrizzleActionProposalStore, DrizzleAgentStore, DrizzleAgentStoreModule, type DrizzleAgentStoreModuleOptions, DrizzleConfirmTokenStore, DrizzleGovernanceQueries, DrizzleMemoryProvider, DrizzlePricingStore, DrizzleRagIngestionLog, DrizzleStreamFrameTable, DrizzleTokenStreamSink, RAG_INGESTION_LOG_PAGE_ORDER, type RagIngestionLogCursor, type RagIngestionLogIterateOptions, type RagIngestionLogQuery, type RagIngestionLogRow, type RagIngestionLogWhere, type RagIngestionStatus, agentActionProposal, agentConfirmToken, agentDialectOf, agentMemory, agentMessage, agentModelPricing, agentQueuedMessage, agentRun, agentSchema, agentSchemaDdl, agentStreamFrame, agentThread, agentTokenUsage, agentToolCall, ensureAgentSchema, mysqlAgentSchema, pgAgentSchema, ragIngestionLog };
|