@sixb/pg 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/dist/agents/agent-storage.d.ts +2 -1
- package/dist/agents/agent-storage.d.ts.map +1 -1
- package/dist/agents/rows.d.ts +4 -11
- package/dist/agents/rows.d.ts.map +1 -1
- package/dist/agents/runs.d.ts +3 -2
- package/dist/agents/runs.d.ts.map +1 -1
- package/dist/auth-storage/service-accounts.d.ts.map +1 -1
- package/dist/auth-storage/shared.d.ts +0 -4
- package/dist/auth-storage/shared.d.ts.map +1 -1
- package/dist/connector-connection-storage.d.ts +9 -0
- package/dist/connector-connection-storage.d.ts.map +1 -0
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3086 -730
- package/dist/index.js.map +28 -25
- package/dist/latest-run-query.d.ts.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/ontology-storage/materialization-session.d.ts.map +1 -1
- package/dist/ontology-storage/materialization-state.d.ts +0 -2
- package/dist/ontology-storage/materialization-state.d.ts.map +1 -1
- package/dist/ontology-storage/materialization-writer.d.ts.map +1 -1
- package/dist/ontology-storage/materializations.d.ts.map +1 -1
- package/dist/ontology-storage/outbox.d.ts.map +1 -1
- package/dist/ontology-storage/shared.d.ts +3 -6
- package/dist/ontology-storage/shared.d.ts.map +1 -1
- package/dist/pg-action-run-storage.d.ts +3 -2
- package/dist/pg-action-run-storage.d.ts.map +1 -1
- package/dist/pg-ai-usage-storage.d.ts +16 -0
- package/dist/pg-ai-usage-storage.d.ts.map +1 -0
- package/dist/pg-execution-storage.d.ts +14 -0
- package/dist/pg-execution-storage.d.ts.map +1 -0
- package/dist/pg-pipeline-run-storage.d.ts +5 -2
- package/dist/pg-pipeline-run-storage.d.ts.map +1 -1
- package/dist/pg-projection-run-storage.d.ts +5 -2
- package/dist/pg-projection-run-storage.d.ts.map +1 -1
- package/dist/pg-sync-run-storage.d.ts +5 -2
- package/dist/pg-sync-run-storage.d.ts.map +1 -1
- package/dist/pg-webhook-run-storage.d.ts +5 -2
- package/dist/pg-webhook-run-storage.d.ts.map +1 -1
- package/dist/pg-workflow-run-storage.d.ts +5 -3
- package/dist/pg-workflow-run-storage.d.ts.map +1 -1
- package/dist/run-list-query.d.ts +1 -1
- package/dist/run-list-query.d.ts.map +1 -1
- package/dist/testing.d.ts +6 -0
- package/dist/testing.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/agents/agent-storage.ts +3 -2
- package/src/agents/rows.ts +12 -43
- package/src/agents/runs.ts +29 -15
- package/src/auth-storage/service-accounts.ts +14 -15
- package/src/auth-storage/shared.ts +0 -8
- package/src/connector-connection-storage.ts +760 -0
- package/src/index.ts +32 -15
- package/src/latest-run-query.ts +7 -1
- package/src/migrations/004-executions.sql +140 -0
- package/src/migrations/005-workflow-executions.sql +10 -0
- package/src/migrations/006-narrow-ontology-source-root-index.sql +4 -0
- package/src/migrations/007-split-overrides.sql +153 -0
- package/src/migrations/008-action-executions.sql +7 -0
- package/src/migrations/009-agent-executions.sql +21 -0
- package/src/migrations/010-ai-usage-accounting-foundation.sql +76 -0
- package/src/migrations/011-sync-failure-record.sql +23 -0
- package/src/migrations/012-pipeline-failure-record.sql +47 -0
- package/src/migrations/013-workflow-failure-record.sql +45 -0
- package/src/migrations/014-agent-failure-record.sql +56 -0
- package/src/migrations/015-projection-failure-record.sql +20 -0
- package/src/migrations/016-webhook-run-failure-record.sql +19 -0
- package/src/migrations/017-action-failure-record.sql +65 -0
- package/src/migrations/018-ontology-outbox-failure-record.sql +29 -0
- package/src/migrations/019-webhook-delivery-failure-record.sql +27 -0
- package/src/migrations/020-drop-run-usage-projections.sql +8 -0
- package/src/migrations/021-sync-pipeline-executions.sql +50 -0
- package/src/migrations/022-projection-executions.sql +115 -0
- package/src/migrations/023-webhook-executions.sql +30 -0
- package/src/migrations/024-ontology-commit-executions.sql +12 -0
- package/src/migrations/025-connector-connections.sql +231 -0
- package/src/migrations.ts +72 -0
- package/src/ontology-storage/materialization-session.ts +25 -28
- package/src/ontology-storage/materialization-state.ts +159 -43
- package/src/ontology-storage/materialization-writer.ts +146 -75
- package/src/ontology-storage/materializations.ts +3 -1
- package/src/ontology-storage/outbox.ts +9 -2
- package/src/ontology-storage/shared.ts +10 -20
- package/src/pg-action-run-storage.ts +43 -67
- package/src/pg-ai-usage-storage.ts +290 -0
- package/src/pg-execution-storage.ts +147 -0
- package/src/pg-pipeline-run-storage.ts +107 -41
- package/src/pg-projection-run-storage.ts +159 -91
- package/src/pg-sync-run-storage.ts +100 -28
- package/src/pg-webhook-run-storage.ts +89 -57
- package/src/pg-workflow-run-storage.ts +97 -130
- package/src/run-list-query.ts +9 -4
- package/src/testing.ts +18 -0
- package/dist/pg-webhook-delivery-storage.d.ts +0 -17
- package/dist/pg-webhook-delivery-storage.d.ts.map +0 -1
- package/src/pg-webhook-delivery-storage.ts +0 -180
package/README.md
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
PostgreSQL storage provider for Sixb.
|
|
4
4
|
|
|
5
5
|
One shared connection pool (porsager `postgres`) backs every Sixb store: objects, ontology commits,
|
|
6
|
-
auth, agents, timeseries, and the run history for
|
|
7
|
-
|
|
6
|
+
auth, agents, the immutable execution and AI usage ledgers, timeseries, and the run history for
|
|
7
|
+
actions, syncs, pipelines, projections, workflows, webhooks, and managed connector connections.
|
|
8
|
+
This is the provider to use for anything you intend to operate.
|
|
8
9
|
|
|
9
10
|
## Install
|
|
10
11
|
|
|
@@ -33,10 +34,10 @@ other applications; it is pinned through `search_path` on every pooled connectio
|
|
|
33
34
|
`PostgresStorage` exposes core's `StorageMigrator` contract. The CLI runs it at startup and
|
|
34
35
|
`sixb db migrate` runs it on demand — you do not write migrations, they ship inside this package.
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
recreating the database. `dropSchema()` exists for exactly
|
|
39
|
-
every Sixb table and the schema itself.
|
|
37
|
+
Applied migrations are checksummed. Schema changes ship as new ordered steps; changing an already
|
|
38
|
+
applied step fails startup instead of silently rewriting migration history. Before 1.0, an explicitly
|
|
39
|
+
breaking migration may still require recreating the database. `dropSchema()` exists for exactly
|
|
40
|
+
that, and for test teardown — it deletes every Sixb table and the schema itself.
|
|
40
41
|
|
|
41
42
|
## Pooling and timeouts
|
|
42
43
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { AgentStorage } from "@sixb/core/storage";
|
|
1
|
+
import type { AgentStorage, ExecutionStorage } from "@sixb/core/storage";
|
|
2
2
|
import type { PgStoreClient } from "../transactions";
|
|
3
3
|
import { PgAgentMessageStore } from "./messages";
|
|
4
4
|
import { PgAgentRunStore } from "./runs";
|
|
5
5
|
import { PgAgentThreadStore } from "./threads";
|
|
6
6
|
export interface PgAgentStorageOptions {
|
|
7
7
|
readonly sql: PgStoreClient;
|
|
8
|
+
readonly executions: ExecutionStorage;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* PostgreSQL-backed agent persistence: thread / run / message sub-stores sharing one connection.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-storage.d.ts","sourceRoot":"","sources":["../../src/agents/agent-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"agent-storage.d.ts","sourceRoot":"","sources":["../../src/agents/agent-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAE9C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAA;IAC3B,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAA;CACtC;AAED;;;;GAIG;AACH,qBAAa,cAAe,YAAW,YAAY;IACjD,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAA;IACpC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;IAC9B,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAA;gBAE1B,OAAO,EAAE,qBAAqB;CAK3C"}
|
package/dist/agents/rows.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AgentMessagePart, JsonValue, Principal } from "@sixb/core";
|
|
2
2
|
import { type AgentMessageRecord, type AgentRunDiagnostic, type AgentRunRecord, type AgentThreadRecord } from "@sixb/core/storage";
|
|
3
3
|
import type { SQLClient, SqlParameter } from "../pg-client";
|
|
4
4
|
export interface AgentThreadRow {
|
|
@@ -18,22 +18,15 @@ export interface AgentThreadRow {
|
|
|
18
18
|
export interface AgentRunRow {
|
|
19
19
|
project_id: string;
|
|
20
20
|
id: string;
|
|
21
|
+
execution_id: string;
|
|
21
22
|
thread_id: string;
|
|
22
23
|
agent_id: string;
|
|
23
24
|
trigger_message_id: string;
|
|
24
|
-
|
|
25
|
-
requested_by_principal_id: string | null;
|
|
26
|
-
execution_principal_type: "serviceAccount" | null;
|
|
27
|
-
execution_principal_id: string | null;
|
|
25
|
+
requester_group_ids: string[] | string;
|
|
28
26
|
status: AgentRunRecord["status"];
|
|
29
27
|
model_id: string | null;
|
|
30
28
|
finish_reason: string | null;
|
|
31
|
-
|
|
32
|
-
usage_output_tokens: number | string | null;
|
|
33
|
-
usage_total_tokens: number | string | null;
|
|
34
|
-
usage_reasoning_tokens: number | string | null;
|
|
35
|
-
usage_cached_input_tokens: number | string | null;
|
|
36
|
-
error: string | null;
|
|
29
|
+
error: JsonValue | null;
|
|
37
30
|
diagnostics: AgentRunDiagnostic[] | string | null;
|
|
38
31
|
attempt: number | string;
|
|
39
32
|
execution_token: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../../src/agents/rows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../../src/agents/rows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAExE,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAEvB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAK3D,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IACvC,kBAAkB,EAAE,MAAM,CAAA;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAA;IACnC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,eAAe,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IACrC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B,UAAU,EAAE,IAAI,GAAG,MAAM,CAAA;IACzB,UAAU,EAAE,IAAI,GAAG,MAAM,CAAA;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,kBAAkB,E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Ac,GAAG,iBAAiB,CAcxE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,WAAW,GAAG,cAAc,CA6B/D;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,eAAe,GAAG,kBAAkB,CAkB3E;AA4BD,wBAAsB,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE;IAChD,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAAA;IAClD,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAA;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB,GAAG,OAAO,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAwBjG"}
|
package/dist/agents/runs.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type AgentRunRecord, type AgentRunStore, type ConfirmAgentRunExecutionOwnershipInput, type CreateAgentRunInput, type FinishAgentRunInput, type FinishQueuedAgentRunInput, type ListAgentRunsInput, type ListAgentRunsResult, type ReclaimAgentRunInput, type StartAgentRunInput } from "@sixb/core/storage";
|
|
1
|
+
import { type AgentRunRecord, type AgentRunStore, type ConfirmAgentRunExecutionOwnershipInput, type CreateAgentRunInput, type ExecutionStorage, type FinishAgentRunInput, type FinishQueuedAgentRunInput, type ListAgentRunsInput, type ListAgentRunsResult, type ReclaimAgentRunInput, type StartAgentRunInput } from "@sixb/core/storage";
|
|
2
2
|
import { type PgStoreClient } from "../transactions";
|
|
3
3
|
export declare class PgAgentRunStore implements AgentRunStore {
|
|
4
4
|
private readonly sql;
|
|
5
|
-
|
|
5
|
+
private readonly executions;
|
|
6
|
+
constructor(sql: PgStoreClient, executions: ExecutionStorage);
|
|
6
7
|
create(input: CreateAgentRunInput): Promise<AgentRunRecord>;
|
|
7
8
|
start(input: StartAgentRunInput): Promise<AgentRunRecord>;
|
|
8
9
|
finishQueued(input: FinishQueuedAgentRunInput): Promise<AgentRunRecord>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/agents/runs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/agents/runs.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,sCAAsC,EAC3C,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAA;AAI3B,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,iBAAiB,CAAA;AAKtE,qBAAa,eAAgB,YAAW,aAAa;IAEjD,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBADV,GAAG,EAAE,aAAa,EAClB,UAAU,EAAE,gBAAgB;IAGzC,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,CAAC;IA8E3D,KAAK,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC;IAoBzD,YAAY,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,cAAc,CAAC;IAkBvE,OAAO,CAAC,KAA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OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAUlC,MAAM,CAAC,KAAK,EAAE,6BAA6B,GAAG,OAAO,CAAC,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"service-accounts.d.ts","sourceRoot":"","sources":["../../src/auth-storage/service-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,oBAAoB,EACpB,6BAA6B,EAC9B,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAYpD,qBAAa,yBAA0B,YAAW,uBAAuB;IAC3D,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEzC,MAAM,CAAC,KAAK,EAAE,6BAA6B,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAiD3E,OAAO,CAAC,MAAM,EAAE;QACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;QAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KACpB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAUlC,MAAM,CAAC,KAAK,EAAE,6BAA6B,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA0B3E,IAAI,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,6BAA6B,CAAC;CAwCxF"}
|
|
@@ -30,10 +30,6 @@ export declare function getUserRowByEmail(sql: SQLClient, params: {
|
|
|
30
30
|
}, options?: {
|
|
31
31
|
readonly forUpdate?: boolean;
|
|
32
32
|
}): Promise<PgAuthUserRow | null>;
|
|
33
|
-
export declare function getUserByEmail(sql: SQLClient, params: {
|
|
34
|
-
readonly projectId: string;
|
|
35
|
-
readonly email: string;
|
|
36
|
-
}): Promise<UserRecord | null>;
|
|
37
33
|
export declare function requireUserById(sql: SQLClient, params: {
|
|
38
34
|
readonly projectId: string;
|
|
39
35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AE,MAAM,CAAA;CAAE,GAC9D,OAAO,CAAC,SAAS,qBAAqB,EAAE,CAAC,CAU3C;AAED,wBAAsB,8BAA8B,CAClD,GAAG,EAAE,SAAS,EACd,MAAM,EAAE;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAA;CAAE,GACvF,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CA8BrC;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,GAAG;IAC1E,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC,QAAQ,CAAC,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1C,CAMA;AAED,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,IAAI,EACR,GAAG,EAAE,kBAAkB,GACtB,IAAI,CAcN;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,IAAI,EACR,GAAG,EAAE,oBAAoB,GACxB,IAAI,CAcN;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,IAAI,EACA,wBAAwB,GACxB,oBAAoB,GACpB,sBAAsB,GACtB,sBAAsB,GACtB,wBAAwB,GACxB,2BAA2B,GAC3B,mBAAmB,GACnB,gBAAgB,EACpB,OAAO,EAAE,MAAM,GACd,KAAK,CAMP"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DurableConnectorConnectionStorage } from "@sixb/core/internal/connector-connection-storage-provider";
|
|
2
|
+
import { type PgStoreClient } from "./transactions";
|
|
3
|
+
export declare class PgConnectorConnectionStorage extends DurableConnectorConnectionStorage {
|
|
4
|
+
private readonly clock;
|
|
5
|
+
constructor(sql: PgStoreClient);
|
|
6
|
+
/** Internal deterministic clock control used only by the provider contract suite. */
|
|
7
|
+
advanceTimeForTesting(durationMs: number): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=connector-connection-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector-connection-storage.d.ts","sourceRoot":"","sources":["../src/connector-connection-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iCAAiC,EAClC,MAAM,2DAA2D,CAAA;AAWlE,OAAO,EAAoB,KAAK,aAAa,EAAoB,MAAM,gBAAgB,CAAA;AAEvF,qBAAa,4BAA6B,SAAQ,iCAAiC;IACjF,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA8B;gBAExC,GAAG,EAAE,aAAa;IAM9B,qFAAqF;IACrF,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;CAGhD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { MigrationCapableStorage, Storage, StorageMigrator, StorageTransactionOptions } from "@sixb/core";
|
|
2
|
-
import { type ObjectStorage } from "@sixb/core/storage";
|
|
2
|
+
import { type AiUsageStorage, type ObjectStorage } from "@sixb/core/storage";
|
|
3
3
|
import { PgAgentStorage } from "./agents";
|
|
4
4
|
import { PgAuthStorage } from "./auth-storage";
|
|
5
|
+
import { PgConnectorConnectionStorage } from "./connector-connection-storage";
|
|
5
6
|
import { PgOntologyStorage } from "./ontology-storage";
|
|
6
7
|
import { PgActionRunStorage } from "./pg-action-run-storage";
|
|
8
|
+
import { PgExecutionStorage } from "./pg-execution-storage";
|
|
7
9
|
import { PgPipelineRunStorage } from "./pg-pipeline-run-storage";
|
|
8
10
|
import { PgProjectionRunStorage } from "./pg-projection-run-storage";
|
|
9
11
|
import { PgRulesStorage } from "./pg-rules-storage";
|
|
10
12
|
import { PgSyncRunStorage } from "./pg-sync-run-storage";
|
|
11
|
-
import { PgWebhookDeliveryStorage } from "./pg-webhook-delivery-storage";
|
|
12
13
|
import { PgWebhookRunStorage } from "./pg-webhook-run-storage";
|
|
13
14
|
import { PgWorkflowInterventionStorage } from "./pg-workflow-intervention-storage";
|
|
14
15
|
import { PgWorkflowRunStorage } from "./pg-workflow-run-storage";
|
|
@@ -67,8 +68,8 @@ export interface PostgresStorageOptions {
|
|
|
67
68
|
/**
|
|
68
69
|
* PostgreSQL storage provider for Sixb.
|
|
69
70
|
*
|
|
70
|
-
* Bundles Sixb storage adapters
|
|
71
|
-
* `postgres`), which reliably reclaims connections under load.
|
|
71
|
+
* Bundles Sixb storage adapters, including the AI usage ledger, behind a shared PostgreSQL
|
|
72
|
+
* connection pool (porsager `postgres`), which reliably reclaims connections under load.
|
|
72
73
|
*
|
|
73
74
|
* The storage exposes a core `StorageMigrator`. Sixb CLI startup and
|
|
74
75
|
* `sixb db migrate` run it automatically through `migrateStorage(storage)`.
|
|
@@ -89,7 +90,9 @@ export declare class PostgresStorage implements MigrationCapableStorage {
|
|
|
89
90
|
readonly objects: ObjectStorage;
|
|
90
91
|
readonly ontology: PgOntologyStorage;
|
|
91
92
|
readonly auth: PgAuthStorage;
|
|
93
|
+
readonly executions: PgExecutionStorage;
|
|
92
94
|
readonly agents: PgAgentStorage;
|
|
95
|
+
readonly aiUsage: AiUsageStorage;
|
|
93
96
|
readonly actionRuns: PgActionRunStorage;
|
|
94
97
|
readonly pipelineRuns: PgPipelineRunStorage;
|
|
95
98
|
readonly workflowRuns: PgWorkflowRunStorage;
|
|
@@ -97,9 +100,9 @@ export declare class PostgresStorage implements MigrationCapableStorage {
|
|
|
97
100
|
readonly syncRuns: PgSyncRunStorage;
|
|
98
101
|
readonly projectionRuns: PgProjectionRunStorage;
|
|
99
102
|
readonly timeseries: Storage["timeseries"];
|
|
100
|
-
readonly webhookDeliveries: PgWebhookDeliveryStorage;
|
|
101
103
|
readonly webhookRuns: PgWebhookRunStorage;
|
|
102
104
|
readonly rules: PgRulesStorage;
|
|
105
|
+
readonly connectorConnections: PgConnectorConnectionStorage;
|
|
103
106
|
readonly migrators: readonly StorageMigrator[];
|
|
104
107
|
private readonly sql;
|
|
105
108
|
private readonly schemaName;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,uBAAuB,EACvB,OAAO,EACP,eAAe,EACf,yBAAyB,EAC1B,MAAM,YAAY,CAAA;AAUnB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,uBAAuB,EACvB,OAAO,EACP,eAAe,EACf,yBAAyB,EAC1B,MAAM,YAAY,CAAA;AAUnB,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAGnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAE7E,OAAO,EAAE,iBAAiB,EAAqC,MAAM,oBAAoB,CAAA;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAG5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAE,mBAAmB,EAAE,MA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