pgbeam 0.4.3 → 0.4.9
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/LICENSE +1 -1
- package/README.md +16 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -30
- package/dist/index.d.mts +12 -30
- package/dist/index.mjs +1 -1
- package/dist/{operations-map.gen-g1lyg7rw.js → operations-map.gen-dojer3ji.js} +9 -0
- package/dist/{operations-map.gen-fpzclg56.cjs → operations-map.gen-gco09oqg.cjs} +9 -0
- package/dist/{operations-map.gen-koycyd31.d.ts → operations-map.gen-ltx3brqw.d.ts} +2850 -3352
- package/dist/operations.cjs +38 -4
- package/dist/operations.d.cts +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/operations.mjs +38 -4
- package/package.json +7 -7
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
|
-
var operationsMap_gen = require('./operations-map.gen-
|
|
3
|
+
var operationsMap_gen = require('./operations-map.gen-gco09oqg.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
|
@@ -407,7 +407,7 @@ var operationsMap_gen = require('./operations-map.gen-fpzclg56.cjs');
|
|
|
407
407
|
"in": "query",
|
|
408
408
|
"required": false,
|
|
409
409
|
"type": "\"allow\" | \"block\" | \"mask\" | \"truncate\"",
|
|
410
|
-
"description": "Coarse outcome filter that groups events. `allow` = query; `block` = blocked, budget_exhausted, auth_failed, credential_expired; `mask` = masked; `truncate` = truncated."
|
|
410
|
+
"description": "Coarse outcome filter that groups events. `allow` = query, auto_approved; `block` = blocked, budget_exhausted, auth_failed, credential_expired, canary_tripped, rejected, approval_expired; `mask` = masked; `truncate` = truncated."
|
|
411
411
|
},
|
|
412
412
|
{
|
|
413
413
|
"name": "source",
|
|
@@ -483,7 +483,7 @@ var operationsMap_gen = require('./operations-map.gen-fpzclg56.cjs');
|
|
|
483
483
|
"in": "query",
|
|
484
484
|
"required": false,
|
|
485
485
|
"type": "\"allow\" | \"block\" | \"mask\" | \"truncate\"",
|
|
486
|
-
"description": "Coarse outcome filter that groups events. `allow` = query; `block` = blocked, budget_exhausted, auth_failed, credential_expired; `mask` = masked; `truncate` = truncated."
|
|
486
|
+
"description": "Coarse outcome filter that groups events. `allow` = query, auto_approved; `block` = blocked, budget_exhausted, auth_failed, credential_expired, canary_tripped, rejected, approval_expired; `mask` = masked; `truncate` = truncated."
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
489
|
"name": "source",
|
|
@@ -584,7 +584,7 @@ var operationsMap_gen = require('./operations-map.gen-fpzclg56.cjs');
|
|
|
584
584
|
],
|
|
585
585
|
"requestBodyType": "",
|
|
586
586
|
"requestBodyRequired": false,
|
|
587
|
-
"responseType": "{ chain_end_seq?: number; chain_start_seq?: number; failure_reason?: string; first_broken_seq?: number; keyed_count: number; ok: boolean; unchained_count: number; verified_at: string; verified_count: number }",
|
|
587
|
+
"responseType": "{ anchor_status?: string; anchor_verified_from_seq?: number; anchor_verified_through_seq?: number; chain_end_seq?: number; chain_start_seq?: number; failure_reason?: string; first_broken_seq?: number; keyed_count: number; link_status?: string; link_verified_from_seq?: number; ok: boolean; unchained_count: number; verified_at: string; verified_count: number }",
|
|
588
588
|
"responseStatus": "200"
|
|
589
589
|
},
|
|
590
590
|
"listPlans": {
|
|
@@ -2218,6 +2218,40 @@ var operationsMap_gen = require('./operations-map.gen-fpzclg56.cjs');
|
|
|
2218
2218
|
"responseType": "{ usage: ({ bytes_transferred: number; cache_hits: number; cache_misses: number; connection_seconds: number; day: string; queries_total: number; region: string })[] }",
|
|
2219
2219
|
"responseStatus": "200"
|
|
2220
2220
|
},
|
|
2221
|
+
"getAgentUsageBreakdown": {
|
|
2222
|
+
"operationId": "getAgentUsageBreakdown",
|
|
2223
|
+
"method": "GET",
|
|
2224
|
+
"path": "/v1/projects/{project_id}/usage/agents",
|
|
2225
|
+
"summary": "Break down project usage by agent credential",
|
|
2226
|
+
"description": "Aggregates the audit trail into per-agent usage for a window: statements by decision, rows and bytes returned, the cache outcome breakdown, and latency percentiles. Read-only, derived entirely from entries the gateway already records.\n\nGrouped by credential, not by session. `session_id` is 32 bits of randomness minted per connection, so it identifies a connection rather than an agent or a run, and at scale it collides; the credential is the only stable identity in the trail.\n\nThis endpoint reports usage and deliberately attributes no dollar figure to an agent. Overage is computed on the organization's total against a plan limit, so no single agent causes it independently of the others, and any per-agent split of that bill is a policy choice rather than a measurement. The organization's limits and marginal rates are returned alongside the usage so a caller can apply its own policy, with both meanings of a zero limit already resolved.\n\nThree things are reported rather than assumed. Usage recorded against no credential is its own line, so agents plus unattributed equals totals exactly. Latency covers only entries that ran and carried a finite value: every refusal writes a literal zero because there was nothing to time, and counting those would drag an agent's percentiles toward zero in proportion to how often it was refused, so the heavily blocked agent would report the fastest queries. And gap markers left by undelivered entries set `complete` to false, since a total over a trail with holes in it is a floor, not a measurement.\n\nBoth `start` and `end` are optional. Omitting `end` means now; omitting `start` means 30 days before the end. The window is half-open and is capped at 92 days, because this aggregate reads every row in the window on the request path and an unbounded one would sort a year of latencies per group. `requested_start` and `requested_end` echo the window that was actually used, so a caller that pinned neither still knows what the totals cover.",
|
|
2227
|
+
"parameters": [
|
|
2228
|
+
{
|
|
2229
|
+
"name": "project_id",
|
|
2230
|
+
"in": "path",
|
|
2231
|
+
"required": true,
|
|
2232
|
+
"type": "string",
|
|
2233
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
"name": "start",
|
|
2237
|
+
"in": "query",
|
|
2238
|
+
"required": false,
|
|
2239
|
+
"type": "string",
|
|
2240
|
+
"description": "Return entries at or after this timestamp (inclusive lower bound)."
|
|
2241
|
+
},
|
|
2242
|
+
{
|
|
2243
|
+
"name": "end",
|
|
2244
|
+
"in": "query",
|
|
2245
|
+
"required": false,
|
|
2246
|
+
"type": "string",
|
|
2247
|
+
"description": "Return entries strictly older than this timestamp (cursor / upper bound)."
|
|
2248
|
+
}
|
|
2249
|
+
],
|
|
2250
|
+
"requestBodyType": "",
|
|
2251
|
+
"requestBodyRequired": false,
|
|
2252
|
+
"responseType": "{ agents: ({ allowed: number; blocked: number; bytes_out: number; cache_bypass: number; cache_hit: number; cache_miss: number; cache_none: number; cache_stale: number; credential_id?: string; entries: number; first_seen?: string; last_seen?: string; latency_measured: number; latency_ms_total: number; latency_p50_ms: number; latency_p95_ms: number; latency_p99_ms: number; latency_unmeasured: number; masked: number; rows_returned: number; truncated: number })[]; complete: boolean; drop_markers: { entries_dropped: number; markers: number; markers_unparsed: number; reasons: string[]; truncated: boolean }; marginal_rates: { bytes_overage_billable: boolean; bytes_per_month: number; overage_per_1k_queries: number; overage_per_gb: number; plan: string; queries_per_day: number; query_overage_billable: boolean }; project_id: string; requested_end: string; requested_start: string; totals: { allowed: number; blocked: number; bytes_out: number; cache_bypass: number; cache_hit: number; cache_miss: number; cache_none: number; cache_stale: number; credential_id?: string; entries: number; first_seen?: string; last_seen?: string; latency_measured: number; latency_ms_total: number; latency_p50_ms: number; latency_p95_ms: number; latency_p99_ms: number; latency_unmeasured: number; masked: number; rows_returned: number; truncated: number }; unattributed: { allowed: number; blocked: number; bytes_out: number; cache_bypass: number; cache_hit: number; cache_miss: number; cache_none: number; cache_stale: number; credential_id?: string; entries: number; first_seen?: string; last_seen?: string; latency_measured: number; latency_ms_total: number; latency_p50_ms: number; latency_p95_ms: number; latency_p99_ms: number; latency_unmeasured: number; masked: number; rows_returned: number; truncated: number }; window_end: string; window_start: string }",
|
|
2253
|
+
"responseStatus": "200"
|
|
2254
|
+
},
|
|
2221
2255
|
"listWebhookEndpoints": {
|
|
2222
2256
|
"operationId": "listWebhookEndpoints",
|
|
2223
2257
|
"method": "GET",
|
package/dist/operations.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { qd as ApiOperations, qe as ApiTag, qf as RequestMap, qg as Route, qh as operationsByPath, qi as operationsByTag } from './operations-map.gen-ltx3brqw.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
package/dist/operations.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { qd as ApiOperations, qe as ApiTag, qf as RequestMap, qg as Route, qh as operationsByPath, qi as operationsByTag } from './operations-map.gen-ltx3brqw.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
package/dist/operations.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-
|
|
1
|
+
export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-dojer3ji.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
|
@@ -405,7 +405,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
|
|
|
405
405
|
"in": "query",
|
|
406
406
|
"required": false,
|
|
407
407
|
"type": "\"allow\" | \"block\" | \"mask\" | \"truncate\"",
|
|
408
|
-
"description": "Coarse outcome filter that groups events. `allow` = query; `block` = blocked, budget_exhausted, auth_failed, credential_expired; `mask` = masked; `truncate` = truncated."
|
|
408
|
+
"description": "Coarse outcome filter that groups events. `allow` = query, auto_approved; `block` = blocked, budget_exhausted, auth_failed, credential_expired, canary_tripped, rejected, approval_expired; `mask` = masked; `truncate` = truncated."
|
|
409
409
|
},
|
|
410
410
|
{
|
|
411
411
|
"name": "source",
|
|
@@ -481,7 +481,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
|
|
|
481
481
|
"in": "query",
|
|
482
482
|
"required": false,
|
|
483
483
|
"type": "\"allow\" | \"block\" | \"mask\" | \"truncate\"",
|
|
484
|
-
"description": "Coarse outcome filter that groups events. `allow` = query; `block` = blocked, budget_exhausted, auth_failed, credential_expired; `mask` = masked; `truncate` = truncated."
|
|
484
|
+
"description": "Coarse outcome filter that groups events. `allow` = query, auto_approved; `block` = blocked, budget_exhausted, auth_failed, credential_expired, canary_tripped, rejected, approval_expired; `mask` = masked; `truncate` = truncated."
|
|
485
485
|
},
|
|
486
486
|
{
|
|
487
487
|
"name": "source",
|
|
@@ -582,7 +582,7 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
|
|
|
582
582
|
],
|
|
583
583
|
"requestBodyType": "",
|
|
584
584
|
"requestBodyRequired": false,
|
|
585
|
-
"responseType": "{ chain_end_seq?: number; chain_start_seq?: number; failure_reason?: string; first_broken_seq?: number; keyed_count: number; ok: boolean; unchained_count: number; verified_at: string; verified_count: number }",
|
|
585
|
+
"responseType": "{ anchor_status?: string; anchor_verified_from_seq?: number; anchor_verified_through_seq?: number; chain_end_seq?: number; chain_start_seq?: number; failure_reason?: string; first_broken_seq?: number; keyed_count: number; link_status?: string; link_verified_from_seq?: number; ok: boolean; unchained_count: number; verified_at: string; verified_count: number }",
|
|
586
586
|
"responseStatus": "200"
|
|
587
587
|
},
|
|
588
588
|
"listPlans": {
|
|
@@ -2216,6 +2216,40 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
|
|
|
2216
2216
|
"responseType": "{ usage: ({ bytes_transferred: number; cache_hits: number; cache_misses: number; connection_seconds: number; day: string; queries_total: number; region: string })[] }",
|
|
2217
2217
|
"responseStatus": "200"
|
|
2218
2218
|
},
|
|
2219
|
+
"getAgentUsageBreakdown": {
|
|
2220
|
+
"operationId": "getAgentUsageBreakdown",
|
|
2221
|
+
"method": "GET",
|
|
2222
|
+
"path": "/v1/projects/{project_id}/usage/agents",
|
|
2223
|
+
"summary": "Break down project usage by agent credential",
|
|
2224
|
+
"description": "Aggregates the audit trail into per-agent usage for a window: statements by decision, rows and bytes returned, the cache outcome breakdown, and latency percentiles. Read-only, derived entirely from entries the gateway already records.\n\nGrouped by credential, not by session. `session_id` is 32 bits of randomness minted per connection, so it identifies a connection rather than an agent or a run, and at scale it collides; the credential is the only stable identity in the trail.\n\nThis endpoint reports usage and deliberately attributes no dollar figure to an agent. Overage is computed on the organization's total against a plan limit, so no single agent causes it independently of the others, and any per-agent split of that bill is a policy choice rather than a measurement. The organization's limits and marginal rates are returned alongside the usage so a caller can apply its own policy, with both meanings of a zero limit already resolved.\n\nThree things are reported rather than assumed. Usage recorded against no credential is its own line, so agents plus unattributed equals totals exactly. Latency covers only entries that ran and carried a finite value: every refusal writes a literal zero because there was nothing to time, and counting those would drag an agent's percentiles toward zero in proportion to how often it was refused, so the heavily blocked agent would report the fastest queries. And gap markers left by undelivered entries set `complete` to false, since a total over a trail with holes in it is a floor, not a measurement.\n\nBoth `start` and `end` are optional. Omitting `end` means now; omitting `start` means 30 days before the end. The window is half-open and is capped at 92 days, because this aggregate reads every row in the window on the request path and an unbounded one would sort a year of latencies per group. `requested_start` and `requested_end` echo the window that was actually used, so a caller that pinned neither still knows what the totals cover.",
|
|
2225
|
+
"parameters": [
|
|
2226
|
+
{
|
|
2227
|
+
"name": "project_id",
|
|
2228
|
+
"in": "path",
|
|
2229
|
+
"required": true,
|
|
2230
|
+
"type": "string",
|
|
2231
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
"name": "start",
|
|
2235
|
+
"in": "query",
|
|
2236
|
+
"required": false,
|
|
2237
|
+
"type": "string",
|
|
2238
|
+
"description": "Return entries at or after this timestamp (inclusive lower bound)."
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
"name": "end",
|
|
2242
|
+
"in": "query",
|
|
2243
|
+
"required": false,
|
|
2244
|
+
"type": "string",
|
|
2245
|
+
"description": "Return entries strictly older than this timestamp (cursor / upper bound)."
|
|
2246
|
+
}
|
|
2247
|
+
],
|
|
2248
|
+
"requestBodyType": "",
|
|
2249
|
+
"requestBodyRequired": false,
|
|
2250
|
+
"responseType": "{ agents: ({ allowed: number; blocked: number; bytes_out: number; cache_bypass: number; cache_hit: number; cache_miss: number; cache_none: number; cache_stale: number; credential_id?: string; entries: number; first_seen?: string; last_seen?: string; latency_measured: number; latency_ms_total: number; latency_p50_ms: number; latency_p95_ms: number; latency_p99_ms: number; latency_unmeasured: number; masked: number; rows_returned: number; truncated: number })[]; complete: boolean; drop_markers: { entries_dropped: number; markers: number; markers_unparsed: number; reasons: string[]; truncated: boolean }; marginal_rates: { bytes_overage_billable: boolean; bytes_per_month: number; overage_per_1k_queries: number; overage_per_gb: number; plan: string; queries_per_day: number; query_overage_billable: boolean }; project_id: string; requested_end: string; requested_start: string; totals: { allowed: number; blocked: number; bytes_out: number; cache_bypass: number; cache_hit: number; cache_miss: number; cache_none: number; cache_stale: number; credential_id?: string; entries: number; first_seen?: string; last_seen?: string; latency_measured: number; latency_ms_total: number; latency_p50_ms: number; latency_p95_ms: number; latency_p99_ms: number; latency_unmeasured: number; masked: number; rows_returned: number; truncated: number }; unattributed: { allowed: number; blocked: number; bytes_out: number; cache_bypass: number; cache_hit: number; cache_miss: number; cache_none: number; cache_stale: number; credential_id?: string; entries: number; first_seen?: string; last_seen?: string; latency_measured: number; latency_ms_total: number; latency_p50_ms: number; latency_p95_ms: number; latency_p99_ms: number; latency_unmeasured: number; masked: number; rows_returned: number; truncated: number }; window_end: string; window_start: string }",
|
|
2251
|
+
"responseStatus": "200"
|
|
2252
|
+
},
|
|
2219
2253
|
"listWebhookEndpoints": {
|
|
2220
2254
|
"operationId": "listWebhookEndpoints",
|
|
2221
2255
|
"method": "GET",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgbeam",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "TypeScript SDK for the PgBeam API
|
|
3
|
+
"version": "0.4.9",
|
|
4
|
+
"description": "TypeScript SDK for the PgBeam API, a Postgres proxy for safe AI agent access with policy enforcement in the wire protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./package.json": "./package.json",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
],
|
|
48
48
|
"homepage": "https://pgbeam.com",
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@kubb/adapter-oas": "5.0.
|
|
50
|
+
"@kubb/adapter-oas": "5.0.6",
|
|
51
51
|
"@kubb/middleware-barrel": "5.0.0-beta.35",
|
|
52
|
-
"@kubb/plugin-ts": "5.0.0
|
|
52
|
+
"@kubb/plugin-ts": "5.0.0",
|
|
53
|
+
"@pgbeam/config": "0.0.1",
|
|
53
54
|
"@typescript/typescript6": "6.0.2",
|
|
54
55
|
"bunchee": "7.0.1",
|
|
55
|
-
"kubb": "5.0.
|
|
56
|
-
"typescript": "7.0.2"
|
|
57
|
-
"@pgbeam/config": "0.0.1"
|
|
56
|
+
"kubb": "5.0.6",
|
|
57
|
+
"typescript": "7.0.2"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "bunchee",
|