@haaaiawd/second-nature 0.1.22 → 0.1.23
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/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/runtime/cli/commands/connector-init.d.ts +19 -0
- package/runtime/cli/commands/connector-init.js +168 -0
- package/runtime/cli/commands/connector-status.d.ts +12 -0
- package/runtime/cli/commands/connector-status.js +156 -0
- package/runtime/cli/commands/index.js +40 -0
- package/runtime/cli/ops/ops-router.d.ts +5 -0
- package/runtime/cli/ops/ops-router.js +34 -0
- package/runtime/cli/ops/workspace-heartbeat-runner.js +22 -0
- package/runtime/connectors/base/manifest.d.ts +13 -0
- package/runtime/connectors/base/manifest.js +47 -0
- package/runtime/connectors/manifest/manifest-parser.d.ts +16 -0
- package/runtime/connectors/manifest/manifest-parser.js +35 -0
- package/runtime/connectors/manifest/manifest-schema.d.ts +145 -0
- package/runtime/connectors/manifest/manifest-schema.js +51 -0
- package/runtime/connectors/registry/dynamic-connector-registry.d.ts +29 -0
- package/runtime/connectors/registry/dynamic-connector-registry.js +123 -0
- package/runtime/connectors/registry/index.d.ts +3 -0
- package/runtime/connectors/registry/index.js +3 -0
- package/runtime/connectors/registry/manifest-scanner.d.ts +9 -0
- package/runtime/connectors/registry/manifest-scanner.js +29 -0
- package/runtime/connectors/registry/trust-policy.d.ts +13 -0
- package/runtime/connectors/registry/trust-policy.js +37 -0
- package/runtime/core/second-nature/heartbeat/heartbeat-loop.d.ts +3 -0
- package/runtime/core/second-nature/heartbeat/heartbeat-loop.js +52 -1
- package/runtime/core/second-nature/heartbeat/snapshot-builder.d.ts +3 -0
- package/runtime/core/second-nature/orchestrator/goal-priority.d.ts +19 -0
- package/runtime/core/second-nature/orchestrator/goal-priority.js +67 -0
- package/runtime/core/second-nature/orchestrator/intent-planner.js +8 -0
- package/runtime/core/second-nature/orchestrator/narrative-update.d.ts +27 -0
- package/runtime/core/second-nature/orchestrator/narrative-update.js +107 -0
- package/runtime/core/second-nature/types.d.ts +4 -0
- package/runtime/guidance/draft-narrative-outreach.d.ts +36 -0
- package/runtime/guidance/draft-narrative-outreach.js +84 -0
- package/runtime/guidance/index.d.ts +1 -0
- package/runtime/guidance/index.js +1 -0
- package/runtime/guidance/outreach-draft-schema.d.ts +3 -3
- package/runtime/observability/connector-inventory-ledger.d.ts +45 -0
- package/runtime/observability/connector-inventory-ledger.js +72 -0
- package/runtime/observability/db/index.js +13 -0
- package/runtime/observability/db/schema/connector-inventory.d.ts +174 -0
- package/runtime/observability/db/schema/connector-inventory.js +15 -0
- package/runtime/observability/db/schema/index.d.ts +1 -0
- package/runtime/observability/db/schema/index.js +1 -0
- package/runtime/storage/chronicle/session-chronicle-store.d.ts +42 -0
- package/runtime/storage/chronicle/session-chronicle-store.js +66 -0
- package/runtime/storage/db/index.js +75 -0
- package/runtime/storage/db/schema/agent-goal.d.ts +235 -0
- package/runtime/storage/db/schema/agent-goal.js +19 -0
- package/runtime/storage/db/schema/index.d.ts +5 -0
- package/runtime/storage/db/schema/index.js +5 -0
- package/runtime/storage/db/schema/memory-store.d.ts +199 -0
- package/runtime/storage/db/schema/memory-store.js +18 -0
- package/runtime/storage/db/schema/narrative-state.d.ts +195 -0
- package/runtime/storage/db/schema/narrative-state.js +16 -0
- package/runtime/storage/db/schema/relationship-memory.d.ts +174 -0
- package/runtime/storage/db/schema/relationship-memory.js +14 -0
- package/runtime/storage/db/schema/session-chronicle.d.ts +199 -0
- package/runtime/storage/db/schema/session-chronicle.js +18 -0
- package/runtime/storage/goal/agent-goal-store.d.ts +57 -0
- package/runtime/storage/goal/agent-goal-store.js +109 -0
- package/runtime/storage/index.d.ts +5 -0
- package/runtime/storage/index.js +5 -0
- package/runtime/storage/memory-store/memory-store-lifecycle.d.ts +70 -0
- package/runtime/storage/memory-store/memory-store-lifecycle.js +113 -0
- package/runtime/storage/narrative/narrative-state-store.d.ts +40 -0
- package/runtime/storage/narrative/narrative-state-store.js +79 -0
- package/runtime/storage/relationship/relationship-memory-store.d.ts +42 -0
- package/runtime/storage/relationship/relationship-memory-store.js +76 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export declare const memoryStore: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "memory_store";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
memoryStoreId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: "memory_store_id";
|
|
7
|
+
tableName: "memory_store";
|
|
8
|
+
dataType: "string";
|
|
9
|
+
columnType: "SQLiteText";
|
|
10
|
+
data: string;
|
|
11
|
+
driverParam: string;
|
|
12
|
+
notNull: true;
|
|
13
|
+
hasDefault: false;
|
|
14
|
+
isPrimaryKey: true;
|
|
15
|
+
isAutoincrement: false;
|
|
16
|
+
hasRuntimeDefault: false;
|
|
17
|
+
enumValues: [string, ...string[]];
|
|
18
|
+
baseColumn: never;
|
|
19
|
+
identity: undefined;
|
|
20
|
+
generated: undefined;
|
|
21
|
+
}, {}, {
|
|
22
|
+
length: number | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
lifecycleStatus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
25
|
+
name: "lifecycle_status";
|
|
26
|
+
tableName: "memory_store";
|
|
27
|
+
dataType: "string";
|
|
28
|
+
columnType: "SQLiteText";
|
|
29
|
+
data: string;
|
|
30
|
+
driverParam: string;
|
|
31
|
+
notNull: true;
|
|
32
|
+
hasDefault: false;
|
|
33
|
+
isPrimaryKey: false;
|
|
34
|
+
isAutoincrement: false;
|
|
35
|
+
hasRuntimeDefault: false;
|
|
36
|
+
enumValues: [string, ...string[]];
|
|
37
|
+
baseColumn: never;
|
|
38
|
+
identity: undefined;
|
|
39
|
+
generated: undefined;
|
|
40
|
+
}, {}, {
|
|
41
|
+
length: number | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
44
|
+
name: "created_at";
|
|
45
|
+
tableName: "memory_store";
|
|
46
|
+
dataType: "string";
|
|
47
|
+
columnType: "SQLiteText";
|
|
48
|
+
data: string;
|
|
49
|
+
driverParam: string;
|
|
50
|
+
notNull: true;
|
|
51
|
+
hasDefault: false;
|
|
52
|
+
isPrimaryKey: false;
|
|
53
|
+
isAutoincrement: false;
|
|
54
|
+
hasRuntimeDefault: false;
|
|
55
|
+
enumValues: [string, ...string[]];
|
|
56
|
+
baseColumn: never;
|
|
57
|
+
identity: undefined;
|
|
58
|
+
generated: undefined;
|
|
59
|
+
}, {}, {
|
|
60
|
+
length: number | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
inputMemoryStoreId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
63
|
+
name: "input_memory_store_id";
|
|
64
|
+
tableName: "memory_store";
|
|
65
|
+
dataType: "string";
|
|
66
|
+
columnType: "SQLiteText";
|
|
67
|
+
data: string;
|
|
68
|
+
driverParam: string;
|
|
69
|
+
notNull: false;
|
|
70
|
+
hasDefault: false;
|
|
71
|
+
isPrimaryKey: false;
|
|
72
|
+
isAutoincrement: false;
|
|
73
|
+
hasRuntimeDefault: false;
|
|
74
|
+
enumValues: [string, ...string[]];
|
|
75
|
+
baseColumn: never;
|
|
76
|
+
identity: undefined;
|
|
77
|
+
generated: undefined;
|
|
78
|
+
}, {}, {
|
|
79
|
+
length: number | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
dreamRunId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
82
|
+
name: "dream_run_id";
|
|
83
|
+
tableName: "memory_store";
|
|
84
|
+
dataType: "string";
|
|
85
|
+
columnType: "SQLiteText";
|
|
86
|
+
data: string;
|
|
87
|
+
driverParam: string;
|
|
88
|
+
notNull: false;
|
|
89
|
+
hasDefault: false;
|
|
90
|
+
isPrimaryKey: false;
|
|
91
|
+
isAutoincrement: false;
|
|
92
|
+
hasRuntimeDefault: false;
|
|
93
|
+
enumValues: [string, ...string[]];
|
|
94
|
+
baseColumn: never;
|
|
95
|
+
identity: undefined;
|
|
96
|
+
generated: undefined;
|
|
97
|
+
}, {}, {
|
|
98
|
+
length: number | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
canonicalEntriesJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
101
|
+
name: "canonical_entries_json";
|
|
102
|
+
tableName: "memory_store";
|
|
103
|
+
dataType: "string";
|
|
104
|
+
columnType: "SQLiteText";
|
|
105
|
+
data: string;
|
|
106
|
+
driverParam: string;
|
|
107
|
+
notNull: true;
|
|
108
|
+
hasDefault: false;
|
|
109
|
+
isPrimaryKey: false;
|
|
110
|
+
isAutoincrement: false;
|
|
111
|
+
hasRuntimeDefault: false;
|
|
112
|
+
enumValues: [string, ...string[]];
|
|
113
|
+
baseColumn: never;
|
|
114
|
+
identity: undefined;
|
|
115
|
+
generated: undefined;
|
|
116
|
+
}, {}, {
|
|
117
|
+
length: number | undefined;
|
|
118
|
+
}>;
|
|
119
|
+
insightsJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
120
|
+
name: "insights_json";
|
|
121
|
+
tableName: "memory_store";
|
|
122
|
+
dataType: "string";
|
|
123
|
+
columnType: "SQLiteText";
|
|
124
|
+
data: string;
|
|
125
|
+
driverParam: string;
|
|
126
|
+
notNull: true;
|
|
127
|
+
hasDefault: false;
|
|
128
|
+
isPrimaryKey: false;
|
|
129
|
+
isAutoincrement: false;
|
|
130
|
+
hasRuntimeDefault: false;
|
|
131
|
+
enumValues: [string, ...string[]];
|
|
132
|
+
baseColumn: never;
|
|
133
|
+
identity: undefined;
|
|
134
|
+
generated: undefined;
|
|
135
|
+
}, {}, {
|
|
136
|
+
length: number | undefined;
|
|
137
|
+
}>;
|
|
138
|
+
narrativeSnapshotJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
139
|
+
name: "narrative_snapshot_json";
|
|
140
|
+
tableName: "memory_store";
|
|
141
|
+
dataType: "string";
|
|
142
|
+
columnType: "SQLiteText";
|
|
143
|
+
data: string;
|
|
144
|
+
driverParam: string;
|
|
145
|
+
notNull: false;
|
|
146
|
+
hasDefault: false;
|
|
147
|
+
isPrimaryKey: false;
|
|
148
|
+
isAutoincrement: false;
|
|
149
|
+
hasRuntimeDefault: false;
|
|
150
|
+
enumValues: [string, ...string[]];
|
|
151
|
+
baseColumn: never;
|
|
152
|
+
identity: undefined;
|
|
153
|
+
generated: undefined;
|
|
154
|
+
}, {}, {
|
|
155
|
+
length: number | undefined;
|
|
156
|
+
}>;
|
|
157
|
+
relationshipSnapshotJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
158
|
+
name: "relationship_snapshot_json";
|
|
159
|
+
tableName: "memory_store";
|
|
160
|
+
dataType: "string";
|
|
161
|
+
columnType: "SQLiteText";
|
|
162
|
+
data: string;
|
|
163
|
+
driverParam: string;
|
|
164
|
+
notNull: false;
|
|
165
|
+
hasDefault: false;
|
|
166
|
+
isPrimaryKey: false;
|
|
167
|
+
isAutoincrement: false;
|
|
168
|
+
hasRuntimeDefault: false;
|
|
169
|
+
enumValues: [string, ...string[]];
|
|
170
|
+
baseColumn: never;
|
|
171
|
+
identity: undefined;
|
|
172
|
+
generated: undefined;
|
|
173
|
+
}, {}, {
|
|
174
|
+
length: number | undefined;
|
|
175
|
+
}>;
|
|
176
|
+
validationJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
177
|
+
name: "validation_json";
|
|
178
|
+
tableName: "memory_store";
|
|
179
|
+
dataType: "string";
|
|
180
|
+
columnType: "SQLiteText";
|
|
181
|
+
data: string;
|
|
182
|
+
driverParam: string;
|
|
183
|
+
notNull: true;
|
|
184
|
+
hasDefault: false;
|
|
185
|
+
isPrimaryKey: false;
|
|
186
|
+
isAutoincrement: false;
|
|
187
|
+
hasRuntimeDefault: false;
|
|
188
|
+
enumValues: [string, ...string[]];
|
|
189
|
+
baseColumn: never;
|
|
190
|
+
identity: undefined;
|
|
191
|
+
generated: undefined;
|
|
192
|
+
}, {}, {
|
|
193
|
+
length: number | undefined;
|
|
194
|
+
}>;
|
|
195
|
+
};
|
|
196
|
+
dialect: "sqlite";
|
|
197
|
+
}>;
|
|
198
|
+
export type MemoryStoreRow = typeof memoryStore.$inferSelect;
|
|
199
|
+
export type NewMemoryStoreRow = typeof memoryStore.$inferInsert;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { index, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
2
|
+
export const memoryStore = sqliteTable("memory_store", {
|
|
3
|
+
memoryStoreId: text("memory_store_id").primaryKey(),
|
|
4
|
+
lifecycleStatus: text("lifecycle_status").notNull(),
|
|
5
|
+
createdAt: text("created_at").notNull(),
|
|
6
|
+
inputMemoryStoreId: text("input_memory_store_id"),
|
|
7
|
+
dreamRunId: text("dream_run_id"),
|
|
8
|
+
canonicalEntriesJson: text("canonical_entries_json").notNull(),
|
|
9
|
+
insightsJson: text("insights_json").notNull(),
|
|
10
|
+
narrativeSnapshotJson: text("narrative_snapshot_json"),
|
|
11
|
+
relationshipSnapshotJson: text("relationship_snapshot_json"),
|
|
12
|
+
validationJson: text("validation_json").notNull(),
|
|
13
|
+
}, (table) => [
|
|
14
|
+
index("memory_store_lifecycle_idx").on(table.lifecycleStatus),
|
|
15
|
+
index("memory_store_created_at_idx").on(table.createdAt),
|
|
16
|
+
index("memory_store_input_idx").on(table.inputMemoryStoreId),
|
|
17
|
+
index("memory_store_dream_run_idx").on(table.dreamRunId),
|
|
18
|
+
]);
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
export declare const narrativeState: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "narrative_state";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
narrativeId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: "narrative_id";
|
|
7
|
+
tableName: "narrative_state";
|
|
8
|
+
dataType: "string";
|
|
9
|
+
columnType: "SQLiteText";
|
|
10
|
+
data: string;
|
|
11
|
+
driverParam: string;
|
|
12
|
+
notNull: true;
|
|
13
|
+
hasDefault: false;
|
|
14
|
+
isPrimaryKey: true;
|
|
15
|
+
isAutoincrement: false;
|
|
16
|
+
hasRuntimeDefault: false;
|
|
17
|
+
enumValues: [string, ...string[]];
|
|
18
|
+
baseColumn: never;
|
|
19
|
+
identity: undefined;
|
|
20
|
+
generated: undefined;
|
|
21
|
+
}, {}, {
|
|
22
|
+
length: number | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
revision: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
25
|
+
name: "revision";
|
|
26
|
+
tableName: "narrative_state";
|
|
27
|
+
dataType: "number";
|
|
28
|
+
columnType: "SQLiteInteger";
|
|
29
|
+
data: number;
|
|
30
|
+
driverParam: number;
|
|
31
|
+
notNull: true;
|
|
32
|
+
hasDefault: true;
|
|
33
|
+
isPrimaryKey: false;
|
|
34
|
+
isAutoincrement: false;
|
|
35
|
+
hasRuntimeDefault: false;
|
|
36
|
+
enumValues: undefined;
|
|
37
|
+
baseColumn: never;
|
|
38
|
+
identity: undefined;
|
|
39
|
+
generated: undefined;
|
|
40
|
+
}, {}, {}>;
|
|
41
|
+
focus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
42
|
+
name: "focus";
|
|
43
|
+
tableName: "narrative_state";
|
|
44
|
+
dataType: "string";
|
|
45
|
+
columnType: "SQLiteText";
|
|
46
|
+
data: string;
|
|
47
|
+
driverParam: string;
|
|
48
|
+
notNull: true;
|
|
49
|
+
hasDefault: false;
|
|
50
|
+
isPrimaryKey: false;
|
|
51
|
+
isAutoincrement: false;
|
|
52
|
+
hasRuntimeDefault: false;
|
|
53
|
+
enumValues: [string, ...string[]];
|
|
54
|
+
baseColumn: never;
|
|
55
|
+
identity: undefined;
|
|
56
|
+
generated: undefined;
|
|
57
|
+
}, {}, {
|
|
58
|
+
length: number | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
progressJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
61
|
+
name: "progress_json";
|
|
62
|
+
tableName: "narrative_state";
|
|
63
|
+
dataType: "string";
|
|
64
|
+
columnType: "SQLiteText";
|
|
65
|
+
data: string;
|
|
66
|
+
driverParam: string;
|
|
67
|
+
notNull: true;
|
|
68
|
+
hasDefault: false;
|
|
69
|
+
isPrimaryKey: false;
|
|
70
|
+
isAutoincrement: false;
|
|
71
|
+
hasRuntimeDefault: false;
|
|
72
|
+
enumValues: [string, ...string[]];
|
|
73
|
+
baseColumn: never;
|
|
74
|
+
identity: undefined;
|
|
75
|
+
generated: undefined;
|
|
76
|
+
}, {}, {
|
|
77
|
+
length: number | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
nextIntent: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
80
|
+
name: "next_intent";
|
|
81
|
+
tableName: "narrative_state";
|
|
82
|
+
dataType: "string";
|
|
83
|
+
columnType: "SQLiteText";
|
|
84
|
+
data: string;
|
|
85
|
+
driverParam: string;
|
|
86
|
+
notNull: true;
|
|
87
|
+
hasDefault: false;
|
|
88
|
+
isPrimaryKey: false;
|
|
89
|
+
isAutoincrement: false;
|
|
90
|
+
hasRuntimeDefault: false;
|
|
91
|
+
enumValues: [string, ...string[]];
|
|
92
|
+
baseColumn: never;
|
|
93
|
+
identity: undefined;
|
|
94
|
+
generated: undefined;
|
|
95
|
+
}, {}, {
|
|
96
|
+
length: number | undefined;
|
|
97
|
+
}>;
|
|
98
|
+
confidence: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
99
|
+
name: "confidence";
|
|
100
|
+
tableName: "narrative_state";
|
|
101
|
+
dataType: "number";
|
|
102
|
+
columnType: "SQLiteInteger";
|
|
103
|
+
data: number;
|
|
104
|
+
driverParam: number;
|
|
105
|
+
notNull: true;
|
|
106
|
+
hasDefault: true;
|
|
107
|
+
isPrimaryKey: false;
|
|
108
|
+
isAutoincrement: false;
|
|
109
|
+
hasRuntimeDefault: false;
|
|
110
|
+
enumValues: undefined;
|
|
111
|
+
baseColumn: never;
|
|
112
|
+
identity: undefined;
|
|
113
|
+
generated: undefined;
|
|
114
|
+
}, {}, {}>;
|
|
115
|
+
sourceRefsJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
116
|
+
name: "source_refs_json";
|
|
117
|
+
tableName: "narrative_state";
|
|
118
|
+
dataType: "string";
|
|
119
|
+
columnType: "SQLiteText";
|
|
120
|
+
data: string;
|
|
121
|
+
driverParam: string;
|
|
122
|
+
notNull: true;
|
|
123
|
+
hasDefault: false;
|
|
124
|
+
isPrimaryKey: false;
|
|
125
|
+
isAutoincrement: false;
|
|
126
|
+
hasRuntimeDefault: false;
|
|
127
|
+
enumValues: [string, ...string[]];
|
|
128
|
+
baseColumn: never;
|
|
129
|
+
identity: undefined;
|
|
130
|
+
generated: undefined;
|
|
131
|
+
}, {}, {
|
|
132
|
+
length: number | undefined;
|
|
133
|
+
}>;
|
|
134
|
+
unsupportedClaimsJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
135
|
+
name: "unsupported_claims_json";
|
|
136
|
+
tableName: "narrative_state";
|
|
137
|
+
dataType: "string";
|
|
138
|
+
columnType: "SQLiteText";
|
|
139
|
+
data: string;
|
|
140
|
+
driverParam: string;
|
|
141
|
+
notNull: true;
|
|
142
|
+
hasDefault: false;
|
|
143
|
+
isPrimaryKey: false;
|
|
144
|
+
isAutoincrement: false;
|
|
145
|
+
hasRuntimeDefault: false;
|
|
146
|
+
enumValues: [string, ...string[]];
|
|
147
|
+
baseColumn: never;
|
|
148
|
+
identity: undefined;
|
|
149
|
+
generated: undefined;
|
|
150
|
+
}, {}, {
|
|
151
|
+
length: number | undefined;
|
|
152
|
+
}>;
|
|
153
|
+
status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
154
|
+
name: "status";
|
|
155
|
+
tableName: "narrative_state";
|
|
156
|
+
dataType: "string";
|
|
157
|
+
columnType: "SQLiteText";
|
|
158
|
+
data: string;
|
|
159
|
+
driverParam: string;
|
|
160
|
+
notNull: true;
|
|
161
|
+
hasDefault: false;
|
|
162
|
+
isPrimaryKey: false;
|
|
163
|
+
isAutoincrement: false;
|
|
164
|
+
hasRuntimeDefault: false;
|
|
165
|
+
enumValues: [string, ...string[]];
|
|
166
|
+
baseColumn: never;
|
|
167
|
+
identity: undefined;
|
|
168
|
+
generated: undefined;
|
|
169
|
+
}, {}, {
|
|
170
|
+
length: number | undefined;
|
|
171
|
+
}>;
|
|
172
|
+
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
173
|
+
name: "updated_at";
|
|
174
|
+
tableName: "narrative_state";
|
|
175
|
+
dataType: "string";
|
|
176
|
+
columnType: "SQLiteText";
|
|
177
|
+
data: string;
|
|
178
|
+
driverParam: string;
|
|
179
|
+
notNull: true;
|
|
180
|
+
hasDefault: false;
|
|
181
|
+
isPrimaryKey: false;
|
|
182
|
+
isAutoincrement: false;
|
|
183
|
+
hasRuntimeDefault: false;
|
|
184
|
+
enumValues: [string, ...string[]];
|
|
185
|
+
baseColumn: never;
|
|
186
|
+
identity: undefined;
|
|
187
|
+
generated: undefined;
|
|
188
|
+
}, {}, {
|
|
189
|
+
length: number | undefined;
|
|
190
|
+
}>;
|
|
191
|
+
};
|
|
192
|
+
dialect: "sqlite";
|
|
193
|
+
}>;
|
|
194
|
+
export type NarrativeStateRow = typeof narrativeState.$inferSelect;
|
|
195
|
+
export type NewNarrativeStateRow = typeof narrativeState.$inferInsert;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { index, sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
|
|
2
|
+
export const narrativeState = sqliteTable("narrative_state", {
|
|
3
|
+
narrativeId: text("narrative_id").primaryKey(),
|
|
4
|
+
revision: integer("revision").notNull().default(1),
|
|
5
|
+
focus: text("focus").notNull(),
|
|
6
|
+
progressJson: text("progress_json").notNull(),
|
|
7
|
+
nextIntent: text("next_intent").notNull(),
|
|
8
|
+
confidence: integer("confidence").notNull().default(0),
|
|
9
|
+
sourceRefsJson: text("source_refs_json").notNull(),
|
|
10
|
+
unsupportedClaimsJson: text("unsupported_claims_json").notNull(),
|
|
11
|
+
status: text("status").notNull(),
|
|
12
|
+
updatedAt: text("updated_at").notNull(),
|
|
13
|
+
}, (table) => [
|
|
14
|
+
index("narrative_state_status_idx").on(table.status),
|
|
15
|
+
index("narrative_state_updated_at_idx").on(table.updatedAt),
|
|
16
|
+
]);
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
export declare const relationshipMemory: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "relationship_memory";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
relationshipId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: "relationship_id";
|
|
7
|
+
tableName: "relationship_memory";
|
|
8
|
+
dataType: "string";
|
|
9
|
+
columnType: "SQLiteText";
|
|
10
|
+
data: string;
|
|
11
|
+
driverParam: string;
|
|
12
|
+
notNull: true;
|
|
13
|
+
hasDefault: false;
|
|
14
|
+
isPrimaryKey: true;
|
|
15
|
+
isAutoincrement: false;
|
|
16
|
+
hasRuntimeDefault: false;
|
|
17
|
+
enumValues: [string, ...string[]];
|
|
18
|
+
baseColumn: never;
|
|
19
|
+
identity: undefined;
|
|
20
|
+
generated: undefined;
|
|
21
|
+
}, {}, {
|
|
22
|
+
length: number | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
revision: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
25
|
+
name: "revision";
|
|
26
|
+
tableName: "relationship_memory";
|
|
27
|
+
dataType: "number";
|
|
28
|
+
columnType: "SQLiteInteger";
|
|
29
|
+
data: number;
|
|
30
|
+
driverParam: number;
|
|
31
|
+
notNull: true;
|
|
32
|
+
hasDefault: true;
|
|
33
|
+
isPrimaryKey: false;
|
|
34
|
+
isAutoincrement: false;
|
|
35
|
+
hasRuntimeDefault: false;
|
|
36
|
+
enumValues: undefined;
|
|
37
|
+
baseColumn: never;
|
|
38
|
+
identity: undefined;
|
|
39
|
+
generated: undefined;
|
|
40
|
+
}, {}, {}>;
|
|
41
|
+
tonePreference: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
42
|
+
name: "tone_preference";
|
|
43
|
+
tableName: "relationship_memory";
|
|
44
|
+
dataType: "string";
|
|
45
|
+
columnType: "SQLiteText";
|
|
46
|
+
data: string;
|
|
47
|
+
driverParam: string;
|
|
48
|
+
notNull: true;
|
|
49
|
+
hasDefault: false;
|
|
50
|
+
isPrimaryKey: false;
|
|
51
|
+
isAutoincrement: false;
|
|
52
|
+
hasRuntimeDefault: false;
|
|
53
|
+
enumValues: [string, ...string[]];
|
|
54
|
+
baseColumn: never;
|
|
55
|
+
identity: undefined;
|
|
56
|
+
generated: undefined;
|
|
57
|
+
}, {}, {
|
|
58
|
+
length: number | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
averageReplyDelayMinutes: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
61
|
+
name: "average_reply_delay_minutes";
|
|
62
|
+
tableName: "relationship_memory";
|
|
63
|
+
dataType: "number";
|
|
64
|
+
columnType: "SQLiteInteger";
|
|
65
|
+
data: number;
|
|
66
|
+
driverParam: number;
|
|
67
|
+
notNull: false;
|
|
68
|
+
hasDefault: false;
|
|
69
|
+
isPrimaryKey: false;
|
|
70
|
+
isAutoincrement: false;
|
|
71
|
+
hasRuntimeDefault: false;
|
|
72
|
+
enumValues: undefined;
|
|
73
|
+
baseColumn: never;
|
|
74
|
+
identity: undefined;
|
|
75
|
+
generated: undefined;
|
|
76
|
+
}, {}, {}>;
|
|
77
|
+
noReplyCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
78
|
+
name: "no_reply_count";
|
|
79
|
+
tableName: "relationship_memory";
|
|
80
|
+
dataType: "number";
|
|
81
|
+
columnType: "SQLiteInteger";
|
|
82
|
+
data: number;
|
|
83
|
+
driverParam: number;
|
|
84
|
+
notNull: true;
|
|
85
|
+
hasDefault: true;
|
|
86
|
+
isPrimaryKey: false;
|
|
87
|
+
isAutoincrement: false;
|
|
88
|
+
hasRuntimeDefault: false;
|
|
89
|
+
enumValues: undefined;
|
|
90
|
+
baseColumn: never;
|
|
91
|
+
identity: undefined;
|
|
92
|
+
generated: undefined;
|
|
93
|
+
}, {}, {}>;
|
|
94
|
+
topicAffinitiesJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
95
|
+
name: "topic_affinities_json";
|
|
96
|
+
tableName: "relationship_memory";
|
|
97
|
+
dataType: "string";
|
|
98
|
+
columnType: "SQLiteText";
|
|
99
|
+
data: string;
|
|
100
|
+
driverParam: string;
|
|
101
|
+
notNull: true;
|
|
102
|
+
hasDefault: false;
|
|
103
|
+
isPrimaryKey: false;
|
|
104
|
+
isAutoincrement: false;
|
|
105
|
+
hasRuntimeDefault: false;
|
|
106
|
+
enumValues: [string, ...string[]];
|
|
107
|
+
baseColumn: never;
|
|
108
|
+
identity: undefined;
|
|
109
|
+
generated: undefined;
|
|
110
|
+
}, {}, {
|
|
111
|
+
length: number | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
lastInteractionAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
114
|
+
name: "last_interaction_at";
|
|
115
|
+
tableName: "relationship_memory";
|
|
116
|
+
dataType: "string";
|
|
117
|
+
columnType: "SQLiteText";
|
|
118
|
+
data: string;
|
|
119
|
+
driverParam: string;
|
|
120
|
+
notNull: false;
|
|
121
|
+
hasDefault: false;
|
|
122
|
+
isPrimaryKey: false;
|
|
123
|
+
isAutoincrement: false;
|
|
124
|
+
hasRuntimeDefault: false;
|
|
125
|
+
enumValues: [string, ...string[]];
|
|
126
|
+
baseColumn: never;
|
|
127
|
+
identity: undefined;
|
|
128
|
+
generated: undefined;
|
|
129
|
+
}, {}, {
|
|
130
|
+
length: number | undefined;
|
|
131
|
+
}>;
|
|
132
|
+
sourceRefsJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
133
|
+
name: "source_refs_json";
|
|
134
|
+
tableName: "relationship_memory";
|
|
135
|
+
dataType: "string";
|
|
136
|
+
columnType: "SQLiteText";
|
|
137
|
+
data: string;
|
|
138
|
+
driverParam: string;
|
|
139
|
+
notNull: true;
|
|
140
|
+
hasDefault: false;
|
|
141
|
+
isPrimaryKey: false;
|
|
142
|
+
isAutoincrement: false;
|
|
143
|
+
hasRuntimeDefault: false;
|
|
144
|
+
enumValues: [string, ...string[]];
|
|
145
|
+
baseColumn: never;
|
|
146
|
+
identity: undefined;
|
|
147
|
+
generated: undefined;
|
|
148
|
+
}, {}, {
|
|
149
|
+
length: number | undefined;
|
|
150
|
+
}>;
|
|
151
|
+
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
152
|
+
name: "updated_at";
|
|
153
|
+
tableName: "relationship_memory";
|
|
154
|
+
dataType: "string";
|
|
155
|
+
columnType: "SQLiteText";
|
|
156
|
+
data: string;
|
|
157
|
+
driverParam: string;
|
|
158
|
+
notNull: true;
|
|
159
|
+
hasDefault: false;
|
|
160
|
+
isPrimaryKey: false;
|
|
161
|
+
isAutoincrement: false;
|
|
162
|
+
hasRuntimeDefault: false;
|
|
163
|
+
enumValues: [string, ...string[]];
|
|
164
|
+
baseColumn: never;
|
|
165
|
+
identity: undefined;
|
|
166
|
+
generated: undefined;
|
|
167
|
+
}, {}, {
|
|
168
|
+
length: number | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
};
|
|
171
|
+
dialect: "sqlite";
|
|
172
|
+
}>;
|
|
173
|
+
export type RelationshipMemoryRow = typeof relationshipMemory.$inferSelect;
|
|
174
|
+
export type NewRelationshipMemoryRow = typeof relationshipMemory.$inferInsert;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { index, sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
|
|
2
|
+
export const relationshipMemory = sqliteTable("relationship_memory", {
|
|
3
|
+
relationshipId: text("relationship_id").primaryKey(),
|
|
4
|
+
revision: integer("revision").notNull().default(1),
|
|
5
|
+
tonePreference: text("tone_preference").notNull(),
|
|
6
|
+
averageReplyDelayMinutes: integer("average_reply_delay_minutes"),
|
|
7
|
+
noReplyCount: integer("no_reply_count").notNull().default(0),
|
|
8
|
+
topicAffinitiesJson: text("topic_affinities_json").notNull(),
|
|
9
|
+
lastInteractionAt: text("last_interaction_at"),
|
|
10
|
+
sourceRefsJson: text("source_refs_json").notNull(),
|
|
11
|
+
updatedAt: text("updated_at").notNull(),
|
|
12
|
+
}, (table) => [
|
|
13
|
+
index("relationship_memory_updated_at_idx").on(table.updatedAt),
|
|
14
|
+
]);
|