@relaycast/engine 8.1.3 → 8.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/node/realtime.d.ts +2 -2
- package/dist/adapters/node/realtime.d.ts.map +1 -1
- package/dist/adapters/node/realtime.js +6 -6
- package/dist/adapters/node/realtime.js.map +1 -1
- package/dist/auth/index.js +3 -3
- package/dist/auth/index.js.map +1 -1
- package/dist/db/migrations/0039_workspace_usage_attribution.sql +24 -0
- package/dist/db/migrations/0041_agent_identity_recovery.sql +40 -0
- package/dist/db/migrations/0042_d1_read_path_indexes.sql +13 -0
- package/dist/db/schema.d.ts +515 -0
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +75 -1
- package/dist/db/schema.js.map +1 -1
- package/dist/engine/action.d.ts +2 -2
- package/dist/engine/action.d.ts.map +1 -1
- package/dist/engine/action.js +4 -2
- package/dist/engine/action.js.map +1 -1
- package/dist/engine/agent.d.ts +3 -1
- package/dist/engine/agent.d.ts.map +1 -1
- package/dist/engine/agent.js +49 -14
- package/dist/engine/agent.js.map +1 -1
- package/dist/engine/agentIdentity.d.ts +49 -0
- package/dist/engine/agentIdentity.d.ts.map +1 -0
- package/dist/engine/agentIdentity.js +158 -0
- package/dist/engine/agentIdentity.js.map +1 -0
- package/dist/engine/delivery.d.ts.map +1 -1
- package/dist/engine/delivery.js +4 -1
- package/dist/engine/delivery.js.map +1 -1
- package/dist/engine/node.d.ts +9 -1
- package/dist/engine/node.d.ts.map +1 -1
- package/dist/engine/node.js +181 -62
- package/dist/engine/node.js.map +1 -1
- package/dist/engine/tokenRotate.d.ts +3 -4
- package/dist/engine/tokenRotate.d.ts.map +1 -1
- package/dist/engine/tokenRotate.js +4 -5
- package/dist/engine/tokenRotate.js.map +1 -1
- package/dist/engine/workspace.d.ts +36 -0
- package/dist/engine/workspace.d.ts.map +1 -1
- package/dist/engine/workspace.js +17 -1
- package/dist/engine/workspace.js.map +1 -1
- package/dist/lib/workspaceProvenance.d.ts +17 -0
- package/dist/lib/workspaceProvenance.d.ts.map +1 -0
- package/dist/lib/workspaceProvenance.js +41 -0
- package/dist/lib/workspaceProvenance.js.map +1 -0
- package/dist/ports/realtime.d.ts +7 -3
- package/dist/ports/realtime.d.ts.map +1 -1
- package/dist/ports/realtime.js.map +1 -1
- package/dist/routes/agent.d.ts.map +1 -1
- package/dist/routes/agent.js +223 -2
- package/dist/routes/agent.js.map +1 -1
- package/dist/routes/workspace.d.ts.map +1 -1
- package/dist/routes/workspace.js +28 -5
- package/dist/routes/workspace.js.map +1 -1
- package/package.json +3 -3
package/dist/db/schema.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WorkspaceProvenance } from '@relaycast/types';
|
|
1
2
|
/**
|
|
2
3
|
* Per-workspace retention TTLs (days), stored in `workspaces.retention`.
|
|
3
4
|
* `undefined` inherits the deployment default; explicit `null` disables
|
|
@@ -9,6 +10,7 @@ export interface WorkspaceRetentionSettings {
|
|
|
9
10
|
message_log_ttl_days?: number | null;
|
|
10
11
|
workspace_event_ttl_days?: number | null;
|
|
11
12
|
}
|
|
13
|
+
export type WorkspaceProvenanceRecord = WorkspaceProvenance;
|
|
12
14
|
export interface ObserverTokenFilters {
|
|
13
15
|
channel_ids?: string[];
|
|
14
16
|
channel_names?: string[];
|
|
@@ -189,6 +191,119 @@ export declare const workspaces: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
189
191
|
identity: undefined;
|
|
190
192
|
generated: undefined;
|
|
191
193
|
}, {}, {}>;
|
|
194
|
+
provenance: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
195
|
+
name: "provenance";
|
|
196
|
+
tableName: "workspaces";
|
|
197
|
+
dataType: "json";
|
|
198
|
+
columnType: "SQLiteTextJson";
|
|
199
|
+
data: {
|
|
200
|
+
source: "cli" | "api" | "sdk" | "mcp" | "ci" | "relayflow" | "dashboard" | "other";
|
|
201
|
+
source_basis: "default" | "declared" | "origin_client";
|
|
202
|
+
origin_id?: string | undefined;
|
|
203
|
+
classification?: "unknown" | "external" | "internal" | undefined;
|
|
204
|
+
origin_actor?: string | undefined;
|
|
205
|
+
actor_user_id?: string | undefined;
|
|
206
|
+
actor_machine_id?: string | undefined;
|
|
207
|
+
actor_org_id?: string | undefined;
|
|
208
|
+
actor_org_slug?: string | undefined;
|
|
209
|
+
};
|
|
210
|
+
driverParam: string;
|
|
211
|
+
notNull: false;
|
|
212
|
+
hasDefault: false;
|
|
213
|
+
isPrimaryKey: false;
|
|
214
|
+
isAutoincrement: false;
|
|
215
|
+
hasRuntimeDefault: false;
|
|
216
|
+
enumValues: undefined;
|
|
217
|
+
baseColumn: never;
|
|
218
|
+
identity: undefined;
|
|
219
|
+
generated: undefined;
|
|
220
|
+
}, {}, {
|
|
221
|
+
$type: {
|
|
222
|
+
source: "cli" | "api" | "sdk" | "mcp" | "ci" | "relayflow" | "dashboard" | "other";
|
|
223
|
+
source_basis: "default" | "declared" | "origin_client";
|
|
224
|
+
origin_id?: string | undefined;
|
|
225
|
+
classification?: "unknown" | "external" | "internal" | undefined;
|
|
226
|
+
origin_actor?: string | undefined;
|
|
227
|
+
actor_user_id?: string | undefined;
|
|
228
|
+
actor_machine_id?: string | undefined;
|
|
229
|
+
actor_org_id?: string | undefined;
|
|
230
|
+
actor_org_slug?: string | undefined;
|
|
231
|
+
};
|
|
232
|
+
}>;
|
|
233
|
+
usageClassification: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
234
|
+
name: "usage_classification";
|
|
235
|
+
tableName: "workspaces";
|
|
236
|
+
dataType: "string";
|
|
237
|
+
columnType: "SQLiteText";
|
|
238
|
+
data: string;
|
|
239
|
+
driverParam: string;
|
|
240
|
+
notNull: true;
|
|
241
|
+
hasDefault: true;
|
|
242
|
+
isPrimaryKey: false;
|
|
243
|
+
isAutoincrement: false;
|
|
244
|
+
hasRuntimeDefault: false;
|
|
245
|
+
enumValues: [string, ...string[]];
|
|
246
|
+
baseColumn: never;
|
|
247
|
+
identity: undefined;
|
|
248
|
+
generated: undefined;
|
|
249
|
+
}, {}, {
|
|
250
|
+
length: number | undefined;
|
|
251
|
+
}>;
|
|
252
|
+
classificationSource: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
253
|
+
name: "classification_source";
|
|
254
|
+
tableName: "workspaces";
|
|
255
|
+
dataType: "string";
|
|
256
|
+
columnType: "SQLiteText";
|
|
257
|
+
data: string;
|
|
258
|
+
driverParam: string;
|
|
259
|
+
notNull: true;
|
|
260
|
+
hasDefault: true;
|
|
261
|
+
isPrimaryKey: false;
|
|
262
|
+
isAutoincrement: false;
|
|
263
|
+
hasRuntimeDefault: false;
|
|
264
|
+
enumValues: [string, ...string[]];
|
|
265
|
+
baseColumn: never;
|
|
266
|
+
identity: undefined;
|
|
267
|
+
generated: undefined;
|
|
268
|
+
}, {}, {
|
|
269
|
+
length: number | undefined;
|
|
270
|
+
}>;
|
|
271
|
+
classificationReason: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
272
|
+
name: "classification_reason";
|
|
273
|
+
tableName: "workspaces";
|
|
274
|
+
dataType: "string";
|
|
275
|
+
columnType: "SQLiteText";
|
|
276
|
+
data: string;
|
|
277
|
+
driverParam: string;
|
|
278
|
+
notNull: false;
|
|
279
|
+
hasDefault: false;
|
|
280
|
+
isPrimaryKey: false;
|
|
281
|
+
isAutoincrement: false;
|
|
282
|
+
hasRuntimeDefault: false;
|
|
283
|
+
enumValues: [string, ...string[]];
|
|
284
|
+
baseColumn: never;
|
|
285
|
+
identity: undefined;
|
|
286
|
+
generated: undefined;
|
|
287
|
+
}, {}, {
|
|
288
|
+
length: number | undefined;
|
|
289
|
+
}>;
|
|
290
|
+
classifiedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
291
|
+
name: "classified_at";
|
|
292
|
+
tableName: "workspaces";
|
|
293
|
+
dataType: "date";
|
|
294
|
+
columnType: "SQLiteTimestamp";
|
|
295
|
+
data: Date;
|
|
296
|
+
driverParam: number;
|
|
297
|
+
notNull: false;
|
|
298
|
+
hasDefault: false;
|
|
299
|
+
isPrimaryKey: false;
|
|
300
|
+
isAutoincrement: false;
|
|
301
|
+
hasRuntimeDefault: false;
|
|
302
|
+
enumValues: undefined;
|
|
303
|
+
baseColumn: never;
|
|
304
|
+
identity: undefined;
|
|
305
|
+
generated: undefined;
|
|
306
|
+
}, {}, {}>;
|
|
192
307
|
};
|
|
193
308
|
dialect: "sqlite";
|
|
194
309
|
}>;
|
|
@@ -605,6 +720,406 @@ export declare const agents: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
|
|
|
605
720
|
};
|
|
606
721
|
dialect: "sqlite";
|
|
607
722
|
}>;
|
|
723
|
+
/**
|
|
724
|
+
* Server-owned verifier state for explicit identity recovery.
|
|
725
|
+
*
|
|
726
|
+
* This deliberately does not live in `agents.metadata`: generic metadata is a
|
|
727
|
+
* caller-facing document and therefore cannot be an authorization boundary.
|
|
728
|
+
* Raw recovery proofs are never stored; callers present the proof and the
|
|
729
|
+
* engine compares its SHA-256 verifier.
|
|
730
|
+
*/
|
|
731
|
+
export declare const agentRecoveryCredentials: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
732
|
+
name: "agent_recovery_credentials";
|
|
733
|
+
schema: undefined;
|
|
734
|
+
columns: {
|
|
735
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
736
|
+
name: "id";
|
|
737
|
+
tableName: "agent_recovery_credentials";
|
|
738
|
+
dataType: "string";
|
|
739
|
+
columnType: "SQLiteText";
|
|
740
|
+
data: string;
|
|
741
|
+
driverParam: string;
|
|
742
|
+
notNull: true;
|
|
743
|
+
hasDefault: false;
|
|
744
|
+
isPrimaryKey: true;
|
|
745
|
+
isAutoincrement: false;
|
|
746
|
+
hasRuntimeDefault: false;
|
|
747
|
+
enumValues: [string, ...string[]];
|
|
748
|
+
baseColumn: never;
|
|
749
|
+
identity: undefined;
|
|
750
|
+
generated: undefined;
|
|
751
|
+
}, {}, {
|
|
752
|
+
length: number | undefined;
|
|
753
|
+
}>;
|
|
754
|
+
workspaceId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
755
|
+
name: "workspace_id";
|
|
756
|
+
tableName: "agent_recovery_credentials";
|
|
757
|
+
dataType: "string";
|
|
758
|
+
columnType: "SQLiteText";
|
|
759
|
+
data: string;
|
|
760
|
+
driverParam: string;
|
|
761
|
+
notNull: true;
|
|
762
|
+
hasDefault: false;
|
|
763
|
+
isPrimaryKey: false;
|
|
764
|
+
isAutoincrement: false;
|
|
765
|
+
hasRuntimeDefault: false;
|
|
766
|
+
enumValues: [string, ...string[]];
|
|
767
|
+
baseColumn: never;
|
|
768
|
+
identity: undefined;
|
|
769
|
+
generated: undefined;
|
|
770
|
+
}, {}, {
|
|
771
|
+
length: number | undefined;
|
|
772
|
+
}>;
|
|
773
|
+
agentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
774
|
+
name: "agent_id";
|
|
775
|
+
tableName: "agent_recovery_credentials";
|
|
776
|
+
dataType: "string";
|
|
777
|
+
columnType: "SQLiteText";
|
|
778
|
+
data: string;
|
|
779
|
+
driverParam: string;
|
|
780
|
+
notNull: true;
|
|
781
|
+
hasDefault: false;
|
|
782
|
+
isPrimaryKey: false;
|
|
783
|
+
isAutoincrement: false;
|
|
784
|
+
hasRuntimeDefault: false;
|
|
785
|
+
enumValues: [string, ...string[]];
|
|
786
|
+
baseColumn: never;
|
|
787
|
+
identity: undefined;
|
|
788
|
+
generated: undefined;
|
|
789
|
+
}, {}, {
|
|
790
|
+
length: number | undefined;
|
|
791
|
+
}>;
|
|
792
|
+
proofKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
793
|
+
name: "proof_kind";
|
|
794
|
+
tableName: "agent_recovery_credentials";
|
|
795
|
+
dataType: "string";
|
|
796
|
+
columnType: "SQLiteText";
|
|
797
|
+
data: string;
|
|
798
|
+
driverParam: string;
|
|
799
|
+
notNull: true;
|
|
800
|
+
hasDefault: false;
|
|
801
|
+
isPrimaryKey: false;
|
|
802
|
+
isAutoincrement: false;
|
|
803
|
+
hasRuntimeDefault: false;
|
|
804
|
+
enumValues: [string, ...string[]];
|
|
805
|
+
baseColumn: never;
|
|
806
|
+
identity: undefined;
|
|
807
|
+
generated: undefined;
|
|
808
|
+
}, {}, {
|
|
809
|
+
length: number | undefined;
|
|
810
|
+
}>;
|
|
811
|
+
verifierHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
812
|
+
name: "verifier_hash";
|
|
813
|
+
tableName: "agent_recovery_credentials";
|
|
814
|
+
dataType: "string";
|
|
815
|
+
columnType: "SQLiteText";
|
|
816
|
+
data: string;
|
|
817
|
+
driverParam: string;
|
|
818
|
+
notNull: true;
|
|
819
|
+
hasDefault: false;
|
|
820
|
+
isPrimaryKey: false;
|
|
821
|
+
isAutoincrement: false;
|
|
822
|
+
hasRuntimeDefault: false;
|
|
823
|
+
enumValues: [string, ...string[]];
|
|
824
|
+
baseColumn: never;
|
|
825
|
+
identity: undefined;
|
|
826
|
+
generated: undefined;
|
|
827
|
+
}, {}, {
|
|
828
|
+
length: number | undefined;
|
|
829
|
+
}>;
|
|
830
|
+
workUnitId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
831
|
+
name: "work_unit_id";
|
|
832
|
+
tableName: "agent_recovery_credentials";
|
|
833
|
+
dataType: "string";
|
|
834
|
+
columnType: "SQLiteText";
|
|
835
|
+
data: string;
|
|
836
|
+
driverParam: string;
|
|
837
|
+
notNull: false;
|
|
838
|
+
hasDefault: false;
|
|
839
|
+
isPrimaryKey: false;
|
|
840
|
+
isAutoincrement: false;
|
|
841
|
+
hasRuntimeDefault: false;
|
|
842
|
+
enumValues: [string, ...string[]];
|
|
843
|
+
baseColumn: never;
|
|
844
|
+
identity: undefined;
|
|
845
|
+
generated: undefined;
|
|
846
|
+
}, {}, {
|
|
847
|
+
length: number | undefined;
|
|
848
|
+
}>;
|
|
849
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
850
|
+
name: "created_at";
|
|
851
|
+
tableName: "agent_recovery_credentials";
|
|
852
|
+
dataType: "date";
|
|
853
|
+
columnType: "SQLiteTimestamp";
|
|
854
|
+
data: Date;
|
|
855
|
+
driverParam: number;
|
|
856
|
+
notNull: true;
|
|
857
|
+
hasDefault: true;
|
|
858
|
+
isPrimaryKey: false;
|
|
859
|
+
isAutoincrement: false;
|
|
860
|
+
hasRuntimeDefault: false;
|
|
861
|
+
enumValues: undefined;
|
|
862
|
+
baseColumn: never;
|
|
863
|
+
identity: undefined;
|
|
864
|
+
generated: undefined;
|
|
865
|
+
}, {}, {}>;
|
|
866
|
+
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
867
|
+
name: "updated_at";
|
|
868
|
+
tableName: "agent_recovery_credentials";
|
|
869
|
+
dataType: "date";
|
|
870
|
+
columnType: "SQLiteTimestamp";
|
|
871
|
+
data: Date;
|
|
872
|
+
driverParam: number;
|
|
873
|
+
notNull: true;
|
|
874
|
+
hasDefault: true;
|
|
875
|
+
isPrimaryKey: false;
|
|
876
|
+
isAutoincrement: false;
|
|
877
|
+
hasRuntimeDefault: false;
|
|
878
|
+
enumValues: undefined;
|
|
879
|
+
baseColumn: never;
|
|
880
|
+
identity: undefined;
|
|
881
|
+
generated: undefined;
|
|
882
|
+
}, {}, {}>;
|
|
883
|
+
};
|
|
884
|
+
dialect: "sqlite";
|
|
885
|
+
}>;
|
|
886
|
+
/**
|
|
887
|
+
* Append-only security record. There is intentionally no agent foreign key:
|
|
888
|
+
* an identity audit must survive release/deletion and retention pruning.
|
|
889
|
+
*/
|
|
890
|
+
export declare const agentIdentityAudit: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
891
|
+
name: "agent_identity_audit";
|
|
892
|
+
schema: undefined;
|
|
893
|
+
columns: {
|
|
894
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
895
|
+
name: "id";
|
|
896
|
+
tableName: "agent_identity_audit";
|
|
897
|
+
dataType: "string";
|
|
898
|
+
columnType: "SQLiteText";
|
|
899
|
+
data: string;
|
|
900
|
+
driverParam: string;
|
|
901
|
+
notNull: true;
|
|
902
|
+
hasDefault: false;
|
|
903
|
+
isPrimaryKey: true;
|
|
904
|
+
isAutoincrement: false;
|
|
905
|
+
hasRuntimeDefault: false;
|
|
906
|
+
enumValues: [string, ...string[]];
|
|
907
|
+
baseColumn: never;
|
|
908
|
+
identity: undefined;
|
|
909
|
+
generated: undefined;
|
|
910
|
+
}, {}, {
|
|
911
|
+
length: number | undefined;
|
|
912
|
+
}>;
|
|
913
|
+
workspaceId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
914
|
+
name: "workspace_id";
|
|
915
|
+
tableName: "agent_identity_audit";
|
|
916
|
+
dataType: "string";
|
|
917
|
+
columnType: "SQLiteText";
|
|
918
|
+
data: string;
|
|
919
|
+
driverParam: string;
|
|
920
|
+
notNull: true;
|
|
921
|
+
hasDefault: false;
|
|
922
|
+
isPrimaryKey: false;
|
|
923
|
+
isAutoincrement: false;
|
|
924
|
+
hasRuntimeDefault: false;
|
|
925
|
+
enumValues: [string, ...string[]];
|
|
926
|
+
baseColumn: never;
|
|
927
|
+
identity: undefined;
|
|
928
|
+
generated: undefined;
|
|
929
|
+
}, {}, {
|
|
930
|
+
length: number | undefined;
|
|
931
|
+
}>;
|
|
932
|
+
agentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
933
|
+
name: "agent_id";
|
|
934
|
+
tableName: "agent_identity_audit";
|
|
935
|
+
dataType: "string";
|
|
936
|
+
columnType: "SQLiteText";
|
|
937
|
+
data: string;
|
|
938
|
+
driverParam: string;
|
|
939
|
+
notNull: true;
|
|
940
|
+
hasDefault: false;
|
|
941
|
+
isPrimaryKey: false;
|
|
942
|
+
isAutoincrement: false;
|
|
943
|
+
hasRuntimeDefault: false;
|
|
944
|
+
enumValues: [string, ...string[]];
|
|
945
|
+
baseColumn: never;
|
|
946
|
+
identity: undefined;
|
|
947
|
+
generated: undefined;
|
|
948
|
+
}, {}, {
|
|
949
|
+
length: number | undefined;
|
|
950
|
+
}>;
|
|
951
|
+
agentName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
952
|
+
name: "agent_name";
|
|
953
|
+
tableName: "agent_identity_audit";
|
|
954
|
+
dataType: "string";
|
|
955
|
+
columnType: "SQLiteText";
|
|
956
|
+
data: string;
|
|
957
|
+
driverParam: string;
|
|
958
|
+
notNull: true;
|
|
959
|
+
hasDefault: false;
|
|
960
|
+
isPrimaryKey: false;
|
|
961
|
+
isAutoincrement: false;
|
|
962
|
+
hasRuntimeDefault: false;
|
|
963
|
+
enumValues: [string, ...string[]];
|
|
964
|
+
baseColumn: never;
|
|
965
|
+
identity: undefined;
|
|
966
|
+
generated: undefined;
|
|
967
|
+
}, {}, {
|
|
968
|
+
length: number | undefined;
|
|
969
|
+
}>;
|
|
970
|
+
action: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
971
|
+
name: "action";
|
|
972
|
+
tableName: "agent_identity_audit";
|
|
973
|
+
dataType: "string";
|
|
974
|
+
columnType: "SQLiteText";
|
|
975
|
+
data: string;
|
|
976
|
+
driverParam: string;
|
|
977
|
+
notNull: true;
|
|
978
|
+
hasDefault: false;
|
|
979
|
+
isPrimaryKey: false;
|
|
980
|
+
isAutoincrement: false;
|
|
981
|
+
hasRuntimeDefault: false;
|
|
982
|
+
enumValues: [string, ...string[]];
|
|
983
|
+
baseColumn: never;
|
|
984
|
+
identity: undefined;
|
|
985
|
+
generated: undefined;
|
|
986
|
+
}, {}, {
|
|
987
|
+
length: number | undefined;
|
|
988
|
+
}>;
|
|
989
|
+
authority: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
990
|
+
name: "authority";
|
|
991
|
+
tableName: "agent_identity_audit";
|
|
992
|
+
dataType: "string";
|
|
993
|
+
columnType: "SQLiteText";
|
|
994
|
+
data: string;
|
|
995
|
+
driverParam: string;
|
|
996
|
+
notNull: true;
|
|
997
|
+
hasDefault: false;
|
|
998
|
+
isPrimaryKey: false;
|
|
999
|
+
isAutoincrement: false;
|
|
1000
|
+
hasRuntimeDefault: false;
|
|
1001
|
+
enumValues: [string, ...string[]];
|
|
1002
|
+
baseColumn: never;
|
|
1003
|
+
identity: undefined;
|
|
1004
|
+
generated: undefined;
|
|
1005
|
+
}, {}, {
|
|
1006
|
+
length: number | undefined;
|
|
1007
|
+
}>;
|
|
1008
|
+
actor: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
1009
|
+
name: "actor";
|
|
1010
|
+
tableName: "agent_identity_audit";
|
|
1011
|
+
dataType: "string";
|
|
1012
|
+
columnType: "SQLiteText";
|
|
1013
|
+
data: string;
|
|
1014
|
+
driverParam: string;
|
|
1015
|
+
notNull: true;
|
|
1016
|
+
hasDefault: false;
|
|
1017
|
+
isPrimaryKey: false;
|
|
1018
|
+
isAutoincrement: false;
|
|
1019
|
+
hasRuntimeDefault: false;
|
|
1020
|
+
enumValues: [string, ...string[]];
|
|
1021
|
+
baseColumn: never;
|
|
1022
|
+
identity: undefined;
|
|
1023
|
+
generated: undefined;
|
|
1024
|
+
}, {}, {
|
|
1025
|
+
length: number | undefined;
|
|
1026
|
+
}>;
|
|
1027
|
+
reason: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
1028
|
+
name: "reason";
|
|
1029
|
+
tableName: "agent_identity_audit";
|
|
1030
|
+
dataType: "string";
|
|
1031
|
+
columnType: "SQLiteText";
|
|
1032
|
+
data: string;
|
|
1033
|
+
driverParam: string;
|
|
1034
|
+
notNull: true;
|
|
1035
|
+
hasDefault: false;
|
|
1036
|
+
isPrimaryKey: false;
|
|
1037
|
+
isAutoincrement: false;
|
|
1038
|
+
hasRuntimeDefault: false;
|
|
1039
|
+
enumValues: [string, ...string[]];
|
|
1040
|
+
baseColumn: never;
|
|
1041
|
+
identity: undefined;
|
|
1042
|
+
generated: undefined;
|
|
1043
|
+
}, {}, {
|
|
1044
|
+
length: number | undefined;
|
|
1045
|
+
}>;
|
|
1046
|
+
sessionRef: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
1047
|
+
name: "session_ref";
|
|
1048
|
+
tableName: "agent_identity_audit";
|
|
1049
|
+
dataType: "string";
|
|
1050
|
+
columnType: "SQLiteText";
|
|
1051
|
+
data: string;
|
|
1052
|
+
driverParam: string;
|
|
1053
|
+
notNull: false;
|
|
1054
|
+
hasDefault: false;
|
|
1055
|
+
isPrimaryKey: false;
|
|
1056
|
+
isAutoincrement: false;
|
|
1057
|
+
hasRuntimeDefault: false;
|
|
1058
|
+
enumValues: [string, ...string[]];
|
|
1059
|
+
baseColumn: never;
|
|
1060
|
+
identity: undefined;
|
|
1061
|
+
generated: undefined;
|
|
1062
|
+
}, {}, {
|
|
1063
|
+
length: number | undefined;
|
|
1064
|
+
}>;
|
|
1065
|
+
nodeId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
1066
|
+
name: "node_id";
|
|
1067
|
+
tableName: "agent_identity_audit";
|
|
1068
|
+
dataType: "string";
|
|
1069
|
+
columnType: "SQLiteText";
|
|
1070
|
+
data: string;
|
|
1071
|
+
driverParam: string;
|
|
1072
|
+
notNull: false;
|
|
1073
|
+
hasDefault: false;
|
|
1074
|
+
isPrimaryKey: false;
|
|
1075
|
+
isAutoincrement: false;
|
|
1076
|
+
hasRuntimeDefault: false;
|
|
1077
|
+
enumValues: [string, ...string[]];
|
|
1078
|
+
baseColumn: never;
|
|
1079
|
+
identity: undefined;
|
|
1080
|
+
generated: undefined;
|
|
1081
|
+
}, {}, {
|
|
1082
|
+
length: number | undefined;
|
|
1083
|
+
}>;
|
|
1084
|
+
originActor: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
1085
|
+
name: "origin_actor";
|
|
1086
|
+
tableName: "agent_identity_audit";
|
|
1087
|
+
dataType: "string";
|
|
1088
|
+
columnType: "SQLiteText";
|
|
1089
|
+
data: string;
|
|
1090
|
+
driverParam: string;
|
|
1091
|
+
notNull: true;
|
|
1092
|
+
hasDefault: false;
|
|
1093
|
+
isPrimaryKey: false;
|
|
1094
|
+
isAutoincrement: false;
|
|
1095
|
+
hasRuntimeDefault: false;
|
|
1096
|
+
enumValues: [string, ...string[]];
|
|
1097
|
+
baseColumn: never;
|
|
1098
|
+
identity: undefined;
|
|
1099
|
+
generated: undefined;
|
|
1100
|
+
}, {}, {
|
|
1101
|
+
length: number | undefined;
|
|
1102
|
+
}>;
|
|
1103
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
1104
|
+
name: "created_at";
|
|
1105
|
+
tableName: "agent_identity_audit";
|
|
1106
|
+
dataType: "date";
|
|
1107
|
+
columnType: "SQLiteTimestamp";
|
|
1108
|
+
data: Date;
|
|
1109
|
+
driverParam: number;
|
|
1110
|
+
notNull: true;
|
|
1111
|
+
hasDefault: true;
|
|
1112
|
+
isPrimaryKey: false;
|
|
1113
|
+
isAutoincrement: false;
|
|
1114
|
+
hasRuntimeDefault: false;
|
|
1115
|
+
enumValues: undefined;
|
|
1116
|
+
baseColumn: never;
|
|
1117
|
+
identity: undefined;
|
|
1118
|
+
generated: undefined;
|
|
1119
|
+
}, {}, {}>;
|
|
1120
|
+
};
|
|
1121
|
+
dialect: "sqlite";
|
|
1122
|
+
}>;
|
|
608
1123
|
export declare const nodes: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
609
1124
|
name: "nodes";
|
|
610
1125
|
schema: undefined;
|
package/dist/db/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/db/schema.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAmB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK7E;;;;G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBzB,CAAC;AAKF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc3B,CAAC"}
|
package/dist/db/schema.js
CHANGED
|
@@ -12,7 +12,21 @@ export const workspaces = sqliteTable('workspaces', {
|
|
|
12
12
|
// A non-null deadline is an explicit, immutable opt-in to whole-workspace
|
|
13
13
|
// deletion. Persistent workspaces always leave this null.
|
|
14
14
|
expiresAt: integer('expires_at', { mode: 'timestamp' }),
|
|
15
|
-
|
|
15
|
+
provenance: text('provenance', { mode: 'json' }).$type(),
|
|
16
|
+
usageClassification: text('usage_classification').notNull().default('unknown'),
|
|
17
|
+
classificationSource: text('classification_source').notNull().default('unclassified'),
|
|
18
|
+
classificationReason: text('classification_reason'),
|
|
19
|
+
classifiedAt: integer('classified_at', { mode: 'timestamp' }),
|
|
20
|
+
}, (table) => [
|
|
21
|
+
index('idx_workspaces_expires_at').on(table.expiresAt),
|
|
22
|
+
check('workspaces_usage_classification_source_check', sql `(
|
|
23
|
+
(${table.usageClassification} = 'unknown' AND ${table.classificationSource} = 'unclassified')
|
|
24
|
+
OR (
|
|
25
|
+
${table.usageClassification} IN ('internal', 'external')
|
|
26
|
+
AND ${table.classificationSource} IN ('creator', 'operator')
|
|
27
|
+
)
|
|
28
|
+
)`),
|
|
29
|
+
]);
|
|
16
30
|
// ============================================
|
|
17
31
|
// Agents
|
|
18
32
|
// ============================================
|
|
@@ -54,6 +68,63 @@ export const agents = sqliteTable('agents', {
|
|
|
54
68
|
index('idx_agents_workspace').on(table.workspaceId),
|
|
55
69
|
index('idx_agents_token').on(table.tokenHash),
|
|
56
70
|
index('idx_agents_previous_token').on(table.previousTokenHash),
|
|
71
|
+
index('idx_agents_active_last_seen')
|
|
72
|
+
.on(table.lastSeen)
|
|
73
|
+
.where(sql `${table.status} IN ('active', 'online')`),
|
|
74
|
+
]);
|
|
75
|
+
// ============================================
|
|
76
|
+
// Agent Identity Recovery
|
|
77
|
+
// ============================================
|
|
78
|
+
/**
|
|
79
|
+
* Server-owned verifier state for explicit identity recovery.
|
|
80
|
+
*
|
|
81
|
+
* This deliberately does not live in `agents.metadata`: generic metadata is a
|
|
82
|
+
* caller-facing document and therefore cannot be an authorization boundary.
|
|
83
|
+
* Raw recovery proofs are never stored; callers present the proof and the
|
|
84
|
+
* engine compares its SHA-256 verifier.
|
|
85
|
+
*/
|
|
86
|
+
export const agentRecoveryCredentials = sqliteTable('agent_recovery_credentials', {
|
|
87
|
+
id: text('id').primaryKey(),
|
|
88
|
+
workspaceId: text('workspace_id')
|
|
89
|
+
.notNull()
|
|
90
|
+
.references(() => workspaces.id, { onDelete: 'cascade' }),
|
|
91
|
+
agentId: text('agent_id').notNull(),
|
|
92
|
+
proofKind: text('proof_kind').notNull(),
|
|
93
|
+
verifierHash: text('verifier_hash').notNull(),
|
|
94
|
+
workUnitId: text('work_unit_id'),
|
|
95
|
+
createdAt: integer('created_at', { mode: 'timestamp' }).notNull().default(sql `(unixepoch())`),
|
|
96
|
+
updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull().default(sql `(unixepoch())`),
|
|
97
|
+
}, (table) => [
|
|
98
|
+
uniqueIndex('agent_recovery_credentials_agent_unique').on(table.workspaceId, table.agentId),
|
|
99
|
+
uniqueIndex('agent_recovery_credentials_verifier_unique').on(table.verifierHash),
|
|
100
|
+
foreignKey({
|
|
101
|
+
columns: [table.workspaceId, table.agentId],
|
|
102
|
+
foreignColumns: [agents.workspaceId, agents.id],
|
|
103
|
+
name: 'agent_recovery_credentials_agent_fk',
|
|
104
|
+
}).onDelete('cascade'),
|
|
105
|
+
]);
|
|
106
|
+
/**
|
|
107
|
+
* Append-only security record. There is intentionally no agent foreign key:
|
|
108
|
+
* an identity audit must survive release/deletion and retention pruning.
|
|
109
|
+
*/
|
|
110
|
+
export const agentIdentityAudit = sqliteTable('agent_identity_audit', {
|
|
111
|
+
id: text('id').primaryKey(),
|
|
112
|
+
workspaceId: text('workspace_id')
|
|
113
|
+
.notNull()
|
|
114
|
+
.references(() => workspaces.id, { onDelete: 'cascade' }),
|
|
115
|
+
agentId: text('agent_id').notNull(),
|
|
116
|
+
agentName: text('agent_name').notNull(),
|
|
117
|
+
action: text('action').notNull(),
|
|
118
|
+
authority: text('authority').notNull(),
|
|
119
|
+
actor: text('actor').notNull(),
|
|
120
|
+
reason: text('reason').notNull(),
|
|
121
|
+
sessionRef: text('session_ref'),
|
|
122
|
+
nodeId: text('node_id'),
|
|
123
|
+
originActor: text('origin_actor').notNull(),
|
|
124
|
+
createdAt: integer('created_at', { mode: 'timestamp' }).notNull().default(sql `(unixepoch())`),
|
|
125
|
+
}, (table) => [
|
|
126
|
+
index('idx_agent_identity_audit_workspace').on(table.workspaceId, table.createdAt),
|
|
127
|
+
index('idx_agent_identity_audit_agent').on(table.workspaceId, table.agentId, table.createdAt),
|
|
57
128
|
]);
|
|
58
129
|
// ============================================
|
|
59
130
|
// Nodes
|
|
@@ -834,6 +905,9 @@ export const deliveries = sqliteTable('deliveries', {
|
|
|
834
905
|
uniqueIndex('deliveries_agent_seq_unique').on(table.workspaceId, table.agentId, table.seq),
|
|
835
906
|
index('idx_deliveries_agent').on(table.agentId, table.createdAt),
|
|
836
907
|
index('idx_deliveries_agent_status_seq').on(table.workspaceId, table.agentId, table.status, table.seq),
|
|
908
|
+
index('idx_deliveries_agent_active_created')
|
|
909
|
+
.on(table.workspaceId, table.agentId, table.createdAt, table.id)
|
|
910
|
+
.where(sql `${table.status} IN ('queued', 'delivered')`),
|
|
837
911
|
index('idx_deliveries_expires').on(table.workspaceId, table.status, table.expiresAt),
|
|
838
912
|
index('idx_deliveries_active_expiry')
|
|
839
913
|
.on(table.expiresAt, table.id)
|