@haaaiawd/second-nature 0.1.1 → 0.1.3
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/index.ts +64 -21
- package/openclaw.plugin.json +1 -1
- package/package.json +8 -2
- package/runtime/cli/action-bridge.d.ts +11 -0
- package/runtime/cli/action-bridge.js +27 -0
- package/runtime/cli/commands/credential.d.ts +2 -0
- package/runtime/cli/commands/credential.js +40 -0
- package/runtime/cli/commands/index.d.ts +12 -0
- package/runtime/cli/commands/index.js +138 -0
- package/runtime/cli/commands/policy.d.ts +12 -0
- package/runtime/cli/commands/policy.js +43 -0
- package/runtime/cli/explain/format-explanation.d.ts +10 -0
- package/runtime/cli/explain/format-explanation.js +10 -0
- package/runtime/cli/explain/resolve-subject.d.ts +2 -0
- package/runtime/cli/explain/resolve-subject.js +26 -0
- package/runtime/cli/index.d.ts +25 -0
- package/runtime/cli/index.js +36 -0
- package/runtime/cli/read-models/index.d.ts +20 -0
- package/runtime/cli/read-models/index.js +161 -0
- package/runtime/cli/read-models/types.d.ts +75 -0
- package/runtime/cli/read-models/types.js +1 -0
- package/runtime/connectors/agent-network/evomap/adapter.d.ts +23 -0
- package/runtime/connectors/agent-network/evomap/adapter.js +69 -0
- package/runtime/connectors/agent-network/evomap/index.d.ts +2 -0
- package/runtime/connectors/agent-network/evomap/index.js +2 -0
- package/runtime/connectors/agent-network/evomap/manifest.d.ts +2 -0
- package/runtime/connectors/agent-network/evomap/manifest.js +7 -0
- package/runtime/connectors/base/channel-health.d.ts +29 -0
- package/runtime/connectors/base/channel-health.js +23 -0
- package/runtime/connectors/base/contract.d.ts +81 -0
- package/runtime/connectors/base/contract.js +71 -0
- package/runtime/connectors/base/failure-taxonomy.d.ts +13 -0
- package/runtime/connectors/base/failure-taxonomy.js +105 -0
- package/runtime/connectors/base/index.d.ts +6 -0
- package/runtime/connectors/base/index.js +6 -0
- package/runtime/connectors/base/manifest.d.ts +11 -0
- package/runtime/connectors/base/manifest.js +36 -0
- package/runtime/connectors/base/policy-layer.d.ts +27 -0
- package/runtime/connectors/base/policy-layer.js +213 -0
- package/runtime/connectors/base/route-planner.d.ts +10 -0
- package/runtime/connectors/base/route-planner.js +98 -0
- package/runtime/connectors/index.d.ts +4 -0
- package/runtime/connectors/index.js +4 -0
- package/runtime/connectors/social-community/instreet/adapter.d.ts +32 -0
- package/runtime/connectors/social-community/instreet/adapter.js +79 -0
- package/runtime/connectors/social-community/instreet/index.d.ts +2 -0
- package/runtime/connectors/social-community/instreet/index.js +2 -0
- package/runtime/connectors/social-community/instreet/manifest.d.ts +2 -0
- package/runtime/connectors/social-community/instreet/manifest.js +7 -0
- package/runtime/connectors/social-community/moltbook/adapter.d.ts +15 -0
- package/runtime/connectors/social-community/moltbook/adapter.js +48 -0
- package/runtime/connectors/social-community/moltbook/index.d.ts +2 -0
- package/runtime/connectors/social-community/moltbook/index.js +2 -0
- package/runtime/connectors/social-community/moltbook/manifest.d.ts +7 -0
- package/runtime/connectors/social-community/moltbook/manifest.js +12 -0
- package/runtime/core/second-nature/guidance/apply-guidance.d.ts +10 -0
- package/runtime/core/second-nature/guidance/apply-guidance.js +10 -0
- package/runtime/core/second-nature/guidance/request-guidance.d.ts +18 -0
- package/runtime/core/second-nature/guidance/request-guidance.js +22 -0
- package/runtime/core/second-nature/index.d.ts +14 -0
- package/runtime/core/second-nature/index.js +14 -0
- package/runtime/core/second-nature/orchestrator/effect-dispatcher.d.ts +100 -0
- package/runtime/core/second-nature/orchestrator/effect-dispatcher.js +139 -0
- package/runtime/core/second-nature/orchestrator/guard-layer.d.ts +2 -0
- package/runtime/core/second-nature/orchestrator/guard-layer.js +54 -0
- package/runtime/core/second-nature/orchestrator/intent-planner.d.ts +3 -0
- package/runtime/core/second-nature/orchestrator/intent-planner.js +92 -0
- package/runtime/core/second-nature/orchestrator/lease-manager.d.ts +14 -0
- package/runtime/core/second-nature/orchestrator/lease-manager.js +58 -0
- package/runtime/core/second-nature/orchestrator/resume-from-checkpoint.d.ts +32 -0
- package/runtime/core/second-nature/orchestrator/resume-from-checkpoint.js +23 -0
- package/runtime/core/second-nature/outreach/build-message.d.ts +16 -0
- package/runtime/core/second-nature/outreach/build-message.js +27 -0
- package/runtime/core/second-nature/outreach/evaluate-outreach.d.ts +13 -0
- package/runtime/core/second-nature/outreach/evaluate-outreach.js +41 -0
- package/runtime/core/second-nature/quiet/quiet-pipeline.d.ts +34 -0
- package/runtime/core/second-nature/quiet/quiet-pipeline.js +35 -0
- package/runtime/core/second-nature/reflection/run-narrative-reflection.d.ts +39 -0
- package/runtime/core/second-nature/reflection/run-narrative-reflection.js +29 -0
- package/runtime/core/second-nature/rhythm/rhythm-policy.d.ts +18 -0
- package/runtime/core/second-nature/rhythm/rhythm-policy.js +24 -0
- package/runtime/core/second-nature/rhythm/select-window.d.ts +3 -0
- package/runtime/core/second-nature/rhythm/select-window.js +50 -0
- package/runtime/core/second-nature/runtime/lifecycle-service.d.ts +26 -0
- package/runtime/core/second-nature/runtime/lifecycle-service.js +38 -0
- package/runtime/core/second-nature/runtime/service-entry.d.ts +36 -0
- package/runtime/core/second-nature/runtime/service-entry.js +44 -0
- package/runtime/core/second-nature/types.d.ts +37 -0
- package/runtime/core/second-nature/types.js +1 -0
- package/runtime/guidance/contracts.d.ts +48 -0
- package/runtime/guidance/contracts.js +54 -0
- package/runtime/guidance/fallback.d.ts +2 -0
- package/runtime/guidance/fallback.js +17 -0
- package/runtime/guidance/guidance-assembler.d.ts +5 -0
- package/runtime/guidance/guidance-assembler.js +62 -0
- package/runtime/guidance/index.d.ts +8 -0
- package/runtime/guidance/index.js +8 -0
- package/runtime/guidance/output-guard.d.ts +10 -0
- package/runtime/guidance/output-guard.js +29 -0
- package/runtime/guidance/persona-selection.d.ts +11 -0
- package/runtime/guidance/persona-selection.js +90 -0
- package/runtime/guidance/review-workflow.d.ts +15 -0
- package/runtime/guidance/review-workflow.js +60 -0
- package/runtime/guidance/template-registry.d.ts +3 -0
- package/runtime/guidance/template-registry.js +45 -0
- package/runtime/guidance/types.d.ts +72 -0
- package/runtime/guidance/types.js +1 -0
- package/runtime/observability/db/index.d.ts +10 -0
- package/runtime/observability/db/index.js +17 -0
- package/runtime/observability/db/schema/index.d.ts +946 -0
- package/runtime/observability/db/schema/index.js +70 -0
- package/runtime/observability/index.d.ts +12 -0
- package/runtime/observability/index.js +11 -0
- package/runtime/observability/projections/guidance-audit.d.ts +16 -0
- package/runtime/observability/projections/guidance-audit.js +35 -0
- package/runtime/observability/projections/outreach-quality-audit.d.ts +15 -0
- package/runtime/observability/projections/outreach-quality-audit.js +9 -0
- package/runtime/observability/projections/reflection-audit.d.ts +17 -0
- package/runtime/observability/projections/reflection-audit.js +9 -0
- package/runtime/observability/query/compose-evidence.d.ts +56 -0
- package/runtime/observability/query/compose-evidence.js +43 -0
- package/runtime/observability/query/evidence-query-engine.d.ts +17 -0
- package/runtime/observability/query/evidence-query-engine.js +166 -0
- package/runtime/observability/redaction/manifest.d.ts +18 -0
- package/runtime/observability/redaction/manifest.js +109 -0
- package/runtime/observability/redaction/policy.d.ts +19 -0
- package/runtime/observability/redaction/policy.js +71 -0
- package/runtime/observability/services/decision-ledger.d.ts +33 -0
- package/runtime/observability/services/decision-ledger.js +115 -0
- package/runtime/observability/services/execution-telemetry.d.ts +32 -0
- package/runtime/observability/services/execution-telemetry.js +126 -0
- package/runtime/observability/services/governance-audit.d.ts +27 -0
- package/runtime/observability/services/governance-audit.js +139 -0
- package/runtime/observability/services/redaction-store.d.ts +3 -0
- package/runtime/observability/services/redaction-store.js +20 -0
- package/runtime/setup/HOST_SETUP.md +112 -0
- package/runtime/shared/types/continuity.d.ts +69 -0
- package/runtime/shared/types/continuity.js +1 -0
- package/runtime/shared/types/credential.d.ts +22 -0
- package/runtime/shared/types/credential.js +1 -0
- package/runtime/shared/types/index.d.ts +3 -0
- package/runtime/shared/types/index.js +3 -0
- package/runtime/shared/types/outreach.d.ts +19 -0
- package/runtime/shared/types/outreach.js +1 -0
- package/runtime/storage/bootstrap/repair.d.ts +3 -0
- package/runtime/storage/bootstrap/repair.js +5 -0
- package/runtime/storage/db/index.d.ts +10 -0
- package/runtime/storage/db/index.js +17 -0
- package/runtime/storage/db/schema/assets.d.ts +140 -0
- package/runtime/storage/db/schema/assets.js +10 -0
- package/runtime/storage/db/schema/credentials.d.ts +178 -0
- package/runtime/storage/db/schema/credentials.js +12 -0
- package/runtime/storage/db/schema/index.d.ts +6 -0
- package/runtime/storage/db/schema/index.js +6 -0
- package/runtime/storage/db/schema/intent-commits.d.ts +161 -0
- package/runtime/storage/db/schema/intent-commits.js +11 -0
- package/runtime/storage/db/schema/policies.d.ts +81 -0
- package/runtime/storage/db/schema/policies.js +7 -0
- package/runtime/storage/db/schema/proposals.d.ts +216 -0
- package/runtime/storage/db/schema/proposals.js +14 -0
- package/runtime/storage/db/schema/provenance.d.ts +104 -0
- package/runtime/storage/db/schema/provenance.js +8 -0
- package/runtime/storage/index.d.ts +16 -0
- package/runtime/storage/index.js +16 -0
- package/runtime/storage/memory/workspace/paths.d.ts +62 -0
- package/runtime/storage/memory/workspace/paths.js +160 -0
- package/runtime/storage/memory/workspace/store.d.ts +26 -0
- package/runtime/storage/memory/workspace/store.js +153 -0
- package/runtime/storage/memory/workspace/types.d.ts +45 -0
- package/runtime/storage/memory/workspace/types.js +1 -0
- package/runtime/storage/repositories/asset-repository.d.ts +8 -0
- package/runtime/storage/repositories/asset-repository.js +19 -0
- package/runtime/storage/repositories/credential-repository.d.ts +8 -0
- package/runtime/storage/repositories/credential-repository.js +19 -0
- package/runtime/storage/repositories/index.d.ts +6 -0
- package/runtime/storage/repositories/index.js +6 -0
- package/runtime/storage/repositories/intent-commit-repository.d.ts +10 -0
- package/runtime/storage/repositories/intent-commit-repository.js +35 -0
- package/runtime/storage/repositories/policy-repository.d.ts +8 -0
- package/runtime/storage/repositories/policy-repository.js +19 -0
- package/runtime/storage/repositories/proposal-repository.d.ts +9 -0
- package/runtime/storage/repositories/proposal-repository.js +26 -0
- package/runtime/storage/repositories/provenance-repository.d.ts +20 -0
- package/runtime/storage/repositories/provenance-repository.js +41 -0
- package/runtime/storage/services/credential-vault.d.ts +8 -0
- package/runtime/storage/services/credential-vault.js +78 -0
- package/runtime/storage/services/daily-log-pipeline.d.ts +47 -0
- package/runtime/storage/services/daily-log-pipeline.js +86 -0
- package/runtime/storage/services/effect-commit-store.d.ts +11 -0
- package/runtime/storage/services/effect-commit-store.js +93 -0
- package/runtime/storage/services/governance-layer.d.ts +40 -0
- package/runtime/storage/services/governance-layer.js +103 -0
- package/runtime/storage/services/persona-candidate-loader.d.ts +5 -0
- package/runtime/storage/services/persona-candidate-loader.js +41 -0
- package/runtime/storage/services/provenance-service.d.ts +40 -0
- package/runtime/storage/services/provenance-service.js +43 -0
- package/runtime/storage/services/quiet-input-loader.d.ts +40 -0
- package/runtime/storage/services/quiet-input-loader.js +131 -0
- package/runtime/storage/services/repair-and-backup.d.ts +22 -0
- package/runtime/storage/services/repair-and-backup.js +73 -0
- package/runtime/storage/state-api.d.ts +46 -0
- package/runtime/storage/state-api.js +73 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
export declare const intentCommitRecords: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "intent_commit_records";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: "id";
|
|
7
|
+
tableName: "intent_commit_records";
|
|
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
|
+
intentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
25
|
+
name: "intent_id";
|
|
26
|
+
tableName: "intent_commit_records";
|
|
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
|
+
decisionId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
44
|
+
name: "decision_id";
|
|
45
|
+
tableName: "intent_commit_records";
|
|
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
|
+
checkpointId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
63
|
+
name: "checkpoint_id";
|
|
64
|
+
tableName: "intent_commit_records";
|
|
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
|
+
state: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
82
|
+
name: "state";
|
|
83
|
+
tableName: "intent_commit_records";
|
|
84
|
+
dataType: "string";
|
|
85
|
+
columnType: "SQLiteText";
|
|
86
|
+
data: string;
|
|
87
|
+
driverParam: string;
|
|
88
|
+
notNull: true;
|
|
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
|
+
outcomeRef: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
101
|
+
name: "outcome_ref";
|
|
102
|
+
tableName: "intent_commit_records";
|
|
103
|
+
dataType: "string";
|
|
104
|
+
columnType: "SQLiteText";
|
|
105
|
+
data: string;
|
|
106
|
+
driverParam: string;
|
|
107
|
+
notNull: false;
|
|
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
|
+
metadataJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
120
|
+
name: "metadata_json";
|
|
121
|
+
tableName: "intent_commit_records";
|
|
122
|
+
dataType: "string";
|
|
123
|
+
columnType: "SQLiteText";
|
|
124
|
+
data: string;
|
|
125
|
+
driverParam: string;
|
|
126
|
+
notNull: false;
|
|
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
|
+
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
139
|
+
name: "updated_at";
|
|
140
|
+
tableName: "intent_commit_records";
|
|
141
|
+
dataType: "string";
|
|
142
|
+
columnType: "SQLiteText";
|
|
143
|
+
data: string;
|
|
144
|
+
driverParam: string;
|
|
145
|
+
notNull: true;
|
|
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
|
+
};
|
|
158
|
+
dialect: "sqlite";
|
|
159
|
+
}>;
|
|
160
|
+
export type IntentCommitDbRecord = typeof intentCommitRecords.$inferSelect;
|
|
161
|
+
export type NewIntentCommitDbRecord = typeof intentCommitRecords.$inferInsert;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
2
|
+
export const intentCommitRecords = sqliteTable("intent_commit_records", {
|
|
3
|
+
id: text("id").primaryKey(),
|
|
4
|
+
intentId: text("intent_id").notNull(),
|
|
5
|
+
decisionId: text("decision_id").notNull(),
|
|
6
|
+
checkpointId: text("checkpoint_id"),
|
|
7
|
+
state: text("state").notNull(),
|
|
8
|
+
outcomeRef: text("outcome_ref"),
|
|
9
|
+
metadataJson: text("metadata_json"),
|
|
10
|
+
updatedAt: text("updated_at").notNull(),
|
|
11
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const policyRecords: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "policy_records";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
platformId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: "platform_id";
|
|
7
|
+
tableName: "policy_records";
|
|
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
|
+
socialDailyLimit: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
25
|
+
name: "social_daily_limit";
|
|
26
|
+
tableName: "policy_records";
|
|
27
|
+
dataType: "number";
|
|
28
|
+
columnType: "SQLiteInteger";
|
|
29
|
+
data: number;
|
|
30
|
+
driverParam: number;
|
|
31
|
+
notNull: true;
|
|
32
|
+
hasDefault: false;
|
|
33
|
+
isPrimaryKey: false;
|
|
34
|
+
isAutoincrement: false;
|
|
35
|
+
hasRuntimeDefault: false;
|
|
36
|
+
enumValues: undefined;
|
|
37
|
+
baseColumn: never;
|
|
38
|
+
identity: undefined;
|
|
39
|
+
generated: undefined;
|
|
40
|
+
}, {}, {}>;
|
|
41
|
+
quietEnabled: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
42
|
+
name: "quiet_enabled";
|
|
43
|
+
tableName: "policy_records";
|
|
44
|
+
dataType: "boolean";
|
|
45
|
+
columnType: "SQLiteBoolean";
|
|
46
|
+
data: boolean;
|
|
47
|
+
driverParam: number;
|
|
48
|
+
notNull: true;
|
|
49
|
+
hasDefault: false;
|
|
50
|
+
isPrimaryKey: false;
|
|
51
|
+
isAutoincrement: false;
|
|
52
|
+
hasRuntimeDefault: false;
|
|
53
|
+
enumValues: undefined;
|
|
54
|
+
baseColumn: never;
|
|
55
|
+
identity: undefined;
|
|
56
|
+
generated: undefined;
|
|
57
|
+
}, {}, {}>;
|
|
58
|
+
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
59
|
+
name: "updated_at";
|
|
60
|
+
tableName: "policy_records";
|
|
61
|
+
dataType: "string";
|
|
62
|
+
columnType: "SQLiteText";
|
|
63
|
+
data: string;
|
|
64
|
+
driverParam: string;
|
|
65
|
+
notNull: true;
|
|
66
|
+
hasDefault: false;
|
|
67
|
+
isPrimaryKey: false;
|
|
68
|
+
isAutoincrement: false;
|
|
69
|
+
hasRuntimeDefault: false;
|
|
70
|
+
enumValues: [string, ...string[]];
|
|
71
|
+
baseColumn: never;
|
|
72
|
+
identity: undefined;
|
|
73
|
+
generated: undefined;
|
|
74
|
+
}, {}, {
|
|
75
|
+
length: number | undefined;
|
|
76
|
+
}>;
|
|
77
|
+
};
|
|
78
|
+
dialect: "sqlite";
|
|
79
|
+
}>;
|
|
80
|
+
export type PolicyRecord = typeof policyRecords.$inferSelect;
|
|
81
|
+
export type NewPolicyRecord = typeof policyRecords.$inferInsert;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
2
|
+
export const policyRecords = sqliteTable("policy_records", {
|
|
3
|
+
platformId: text("platform_id").primaryKey(),
|
|
4
|
+
socialDailyLimit: integer("social_daily_limit").notNull(),
|
|
5
|
+
quietEnabled: integer("quiet_enabled", { mode: "boolean" }).notNull(),
|
|
6
|
+
updatedAt: text("updated_at").notNull(),
|
|
7
|
+
});
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
export declare const proposalRecords: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "proposal_records";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: "id";
|
|
7
|
+
tableName: "proposal_records";
|
|
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
|
+
targetAssetId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
25
|
+
name: "target_asset_id";
|
|
26
|
+
tableName: "proposal_records";
|
|
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
|
+
beforeHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
44
|
+
name: "before_hash";
|
|
45
|
+
tableName: "proposal_records";
|
|
46
|
+
dataType: "string";
|
|
47
|
+
columnType: "SQLiteText";
|
|
48
|
+
data: string;
|
|
49
|
+
driverParam: string;
|
|
50
|
+
notNull: false;
|
|
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
|
+
afterHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
63
|
+
name: "after_hash";
|
|
64
|
+
tableName: "proposal_records";
|
|
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
|
+
status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
82
|
+
name: "status";
|
|
83
|
+
tableName: "proposal_records";
|
|
84
|
+
dataType: "string";
|
|
85
|
+
columnType: "SQLiteText";
|
|
86
|
+
data: string;
|
|
87
|
+
driverParam: string;
|
|
88
|
+
notNull: true;
|
|
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
|
+
proposedDiff: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
101
|
+
name: "proposed_diff";
|
|
102
|
+
tableName: "proposal_records";
|
|
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
|
+
reason: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
120
|
+
name: "reason";
|
|
121
|
+
tableName: "proposal_records";
|
|
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
|
+
supportingSources: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
139
|
+
name: "supporting_sources";
|
|
140
|
+
tableName: "proposal_records";
|
|
141
|
+
dataType: "string";
|
|
142
|
+
columnType: "SQLiteText";
|
|
143
|
+
data: string;
|
|
144
|
+
driverParam: string;
|
|
145
|
+
notNull: true;
|
|
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
|
+
confidence: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
158
|
+
name: "confidence";
|
|
159
|
+
tableName: "proposal_records";
|
|
160
|
+
dataType: "number";
|
|
161
|
+
columnType: "SQLiteReal";
|
|
162
|
+
data: number;
|
|
163
|
+
driverParam: number;
|
|
164
|
+
notNull: true;
|
|
165
|
+
hasDefault: false;
|
|
166
|
+
isPrimaryKey: false;
|
|
167
|
+
isAutoincrement: false;
|
|
168
|
+
hasRuntimeDefault: false;
|
|
169
|
+
enumValues: undefined;
|
|
170
|
+
baseColumn: never;
|
|
171
|
+
identity: undefined;
|
|
172
|
+
generated: undefined;
|
|
173
|
+
}, {}, {}>;
|
|
174
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
175
|
+
name: "created_at";
|
|
176
|
+
tableName: "proposal_records";
|
|
177
|
+
dataType: "string";
|
|
178
|
+
columnType: "SQLiteText";
|
|
179
|
+
data: string;
|
|
180
|
+
driverParam: string;
|
|
181
|
+
notNull: true;
|
|
182
|
+
hasDefault: false;
|
|
183
|
+
isPrimaryKey: false;
|
|
184
|
+
isAutoincrement: false;
|
|
185
|
+
hasRuntimeDefault: false;
|
|
186
|
+
enumValues: [string, ...string[]];
|
|
187
|
+
baseColumn: never;
|
|
188
|
+
identity: undefined;
|
|
189
|
+
generated: undefined;
|
|
190
|
+
}, {}, {
|
|
191
|
+
length: number | undefined;
|
|
192
|
+
}>;
|
|
193
|
+
appliedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
194
|
+
name: "applied_at";
|
|
195
|
+
tableName: "proposal_records";
|
|
196
|
+
dataType: "string";
|
|
197
|
+
columnType: "SQLiteText";
|
|
198
|
+
data: string;
|
|
199
|
+
driverParam: string;
|
|
200
|
+
notNull: false;
|
|
201
|
+
hasDefault: false;
|
|
202
|
+
isPrimaryKey: false;
|
|
203
|
+
isAutoincrement: false;
|
|
204
|
+
hasRuntimeDefault: false;
|
|
205
|
+
enumValues: [string, ...string[]];
|
|
206
|
+
baseColumn: never;
|
|
207
|
+
identity: undefined;
|
|
208
|
+
generated: undefined;
|
|
209
|
+
}, {}, {
|
|
210
|
+
length: number | undefined;
|
|
211
|
+
}>;
|
|
212
|
+
};
|
|
213
|
+
dialect: "sqlite";
|
|
214
|
+
}>;
|
|
215
|
+
export type ProposalRecord = typeof proposalRecords.$inferSelect;
|
|
216
|
+
export type NewProposalRecord = typeof proposalRecords.$inferInsert;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { real, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
2
|
+
export const proposalRecords = sqliteTable("proposal_records", {
|
|
3
|
+
id: text("id").primaryKey(),
|
|
4
|
+
targetAssetId: text("target_asset_id").notNull(),
|
|
5
|
+
beforeHash: text("before_hash"),
|
|
6
|
+
afterHash: text("after_hash"),
|
|
7
|
+
status: text("status").notNull(),
|
|
8
|
+
proposedDiff: text("proposed_diff").notNull(),
|
|
9
|
+
reason: text("reason").notNull(),
|
|
10
|
+
supportingSources: text("supporting_sources").notNull(),
|
|
11
|
+
confidence: real("confidence").notNull(),
|
|
12
|
+
createdAt: text("created_at").notNull(),
|
|
13
|
+
appliedAt: text("applied_at"),
|
|
14
|
+
});
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export declare const provenanceEdges: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "provenance_edges";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: "id";
|
|
7
|
+
tableName: "provenance_edges";
|
|
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
|
+
fromId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
25
|
+
name: "from_id";
|
|
26
|
+
tableName: "provenance_edges";
|
|
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
|
+
toId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
44
|
+
name: "to_id";
|
|
45
|
+
tableName: "provenance_edges";
|
|
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
|
+
kind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
63
|
+
name: "kind";
|
|
64
|
+
tableName: "provenance_edges";
|
|
65
|
+
dataType: "string";
|
|
66
|
+
columnType: "SQLiteText";
|
|
67
|
+
data: string;
|
|
68
|
+
driverParam: string;
|
|
69
|
+
notNull: true;
|
|
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
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
82
|
+
name: "created_at";
|
|
83
|
+
tableName: "provenance_edges";
|
|
84
|
+
dataType: "string";
|
|
85
|
+
columnType: "SQLiteText";
|
|
86
|
+
data: string;
|
|
87
|
+
driverParam: string;
|
|
88
|
+
notNull: true;
|
|
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
|
+
};
|
|
101
|
+
dialect: "sqlite";
|
|
102
|
+
}>;
|
|
103
|
+
export type ProvenanceEdgeRecord = typeof provenanceEdges.$inferSelect;
|
|
104
|
+
export type NewProvenanceEdgeRecord = typeof provenanceEdges.$inferInsert;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
2
|
+
export const provenanceEdges = sqliteTable("provenance_edges", {
|
|
3
|
+
id: text("id").primaryKey(),
|
|
4
|
+
fromId: text("from_id").notNull(),
|
|
5
|
+
toId: text("to_id").notNull(),
|
|
6
|
+
kind: text("kind").notNull(),
|
|
7
|
+
createdAt: text("created_at").notNull(),
|
|
8
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { createStateDatabase, type StateDatabase } from "./db/index.js";
|
|
2
|
+
export * as storageSchema from "./db/schema/index.js";
|
|
3
|
+
export * from "./repositories/index.js";
|
|
4
|
+
export { createWorkspaceArtifactStore, type WorkspaceArtifactStore } from "./memory/workspace/store.js";
|
|
5
|
+
export * from "./memory/workspace/paths.js";
|
|
6
|
+
export * from "./memory/workspace/types.js";
|
|
7
|
+
export { createCredentialVault, type CredentialVault } from "./services/credential-vault.js";
|
|
8
|
+
export { createEffectCommitStore, type EffectCommitStore } from "./services/effect-commit-store.js";
|
|
9
|
+
export { createDailyLogPipeline, type DailyLogPipeline } from "./services/daily-log-pipeline.js";
|
|
10
|
+
export { createQuietInputLoader, type QuietInputLoader } from "./services/quiet-input-loader.js";
|
|
11
|
+
export { createPersonaCandidateLoader, type PersonaCandidateLoader } from "./services/persona-candidate-loader.js";
|
|
12
|
+
export { createGovernanceLayer, type GovernanceLayer, type AnchorWriteProposal, type ProposalAck, type ApplyAck } from "./services/governance-layer.js";
|
|
13
|
+
export { createProvenanceService, type ProvenanceService, type ProvenanceTrace, type ProvenanceDetail } from "./services/provenance-service.js";
|
|
14
|
+
export { createRepairAndBackupService, type RepairAndBackupService, type RepairAndBackupOptions, type RepairAndBackupResult, } from "./services/repair-and-backup.js";
|
|
15
|
+
export { runStartupRepairAndBackup } from "./bootstrap/repair.js";
|
|
16
|
+
export { createStateAPI, type StateAPI, type MemoryReadPort, type MemoryWritePort, type CredentialContextPort, type IntentCommitPort, type ProvenancePort } from "./state-api.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { createStateDatabase } from "./db/index.js";
|
|
2
|
+
export * as storageSchema from "./db/schema/index.js";
|
|
3
|
+
export * from "./repositories/index.js";
|
|
4
|
+
export { createWorkspaceArtifactStore } from "./memory/workspace/store.js";
|
|
5
|
+
export * from "./memory/workspace/paths.js";
|
|
6
|
+
export * from "./memory/workspace/types.js";
|
|
7
|
+
export { createCredentialVault } from "./services/credential-vault.js";
|
|
8
|
+
export { createEffectCommitStore } from "./services/effect-commit-store.js";
|
|
9
|
+
export { createDailyLogPipeline } from "./services/daily-log-pipeline.js";
|
|
10
|
+
export { createQuietInputLoader } from "./services/quiet-input-loader.js";
|
|
11
|
+
export { createPersonaCandidateLoader } from "./services/persona-candidate-loader.js";
|
|
12
|
+
export { createGovernanceLayer } from "./services/governance-layer.js";
|
|
13
|
+
export { createProvenanceService } from "./services/provenance-service.js";
|
|
14
|
+
export { createRepairAndBackupService, } from "./services/repair-and-backup.js";
|
|
15
|
+
export { runStartupRepairAndBackup } from "./bootstrap/repair.js";
|
|
16
|
+
export { createStateAPI } from "./state-api.js";
|