@wardby/cli 0.1.0 → 0.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/README.md +183 -96
- package/deploy/local/docker-compose.yml +5 -5
- package/dist/claude-coding-worker/driver.d.ts +1 -0
- package/dist/claude-coding-worker/driver.js +4 -1
- package/dist/claude-coding-worker/main.js +3 -2
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +5 -0
- package/dist/cli.js +0 -0
- package/dist/coding/protocol.d.ts +28 -3
- package/dist/coding/protocol.js +53 -2
- package/dist/coding-worker/artifact.d.ts +12 -0
- package/dist/coding-worker/artifact.js +48 -6
- package/dist/coding-worker/driver.d.ts +1 -0
- package/dist/coding-worker/driver.js +4 -1
- package/dist/coding-worker/errors.d.ts +7 -0
- package/dist/coding-worker/errors.js +18 -0
- package/dist/coding-worker/main.js +3 -2
- package/dist/core/budget-groups.d.ts +1 -1
- package/dist/core/coding-queue.d.ts +1 -1
- package/dist/core/datastores.d.ts +1 -1
- package/dist/core/db.d.ts +36 -2
- package/dist/core/db.js +69 -2
- package/dist/core/dispatch.d.ts +16 -1
- package/dist/core/dispatch.js +33 -5
- package/dist/core/http-runtime.js +3 -4
- package/dist/core/lease.d.ts +1 -1
- package/dist/core/private-directory.d.ts +20 -0
- package/dist/core/private-directory.js +36 -0
- package/dist/core/reconciler.d.ts +1 -1
- package/dist/core/runner.d.ts +1 -1
- package/dist/core/scheduler.d.ts +1 -1
- package/dist/core/secrets.d.ts +1 -1
- package/dist/core/subagent-memory-tools.d.ts +1 -1
- package/dist/core/webhooks.d.ts +1 -1
- package/dist/env.js +8 -1
- package/dist/generated/prisma/browser.d.ts +228 -0
- package/dist/generated/prisma/browser.js +17 -0
- package/dist/generated/prisma/client.d.ts +247 -0
- package/dist/generated/prisma/client.js +34 -0
- package/dist/generated/prisma/commonInputTypes.d.ts +809 -0
- package/dist/generated/prisma/commonInputTypes.js +10 -0
- package/dist/generated/prisma/enums.d.ts +53 -0
- package/dist/generated/prisma/enums.js +54 -0
- package/dist/generated/prisma/internal/class.d.ts +462 -0
- package/dist/generated/prisma/internal/class.js +49 -0
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +3325 -0
- package/dist/generated/prisma/internal/prismaNamespace.js +455 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +449 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +426 -0
- package/dist/generated/prisma/models/Agent.d.ts +3267 -0
- package/dist/generated/prisma/models/Agent.js +1 -0
- package/dist/generated/prisma/models/AgentDatastore.d.ts +1210 -0
- package/dist/generated/prisma/models/AgentDatastore.js +1 -0
- package/dist/generated/prisma/models/AgentMemory.d.ts +986 -0
- package/dist/generated/prisma/models/AgentMemory.js +1 -0
- package/dist/generated/prisma/models/AgentSecret.d.ts +1212 -0
- package/dist/generated/prisma/models/AgentSecret.js +1 -0
- package/dist/generated/prisma/models/AgentSubAgent.d.ts +1217 -0
- package/dist/generated/prisma/models/AgentSubAgent.js +1 -0
- package/dist/generated/prisma/models/AgentTool.d.ts +1309 -0
- package/dist/generated/prisma/models/AgentTool.js +1 -0
- package/dist/generated/prisma/models/AuthFormChallenge.d.ts +1298 -0
- package/dist/generated/prisma/models/AuthFormChallenge.js +1 -0
- package/dist/generated/prisma/models/AuthLoginKey.d.ts +1245 -0
- package/dist/generated/prisma/models/AuthLoginKey.js +1 -0
- package/dist/generated/prisma/models/AuthRateLimit.d.ts +979 -0
- package/dist/generated/prisma/models/AuthRateLimit.js +1 -0
- package/dist/generated/prisma/models/AuthSession.d.ts +1376 -0
- package/dist/generated/prisma/models/AuthSession.js +1 -0
- package/dist/generated/prisma/models/AuthUser.d.ts +1645 -0
- package/dist/generated/prisma/models/AuthUser.js +1 -0
- package/dist/generated/prisma/models/BudgetGroup.d.ts +1548 -0
- package/dist/generated/prisma/models/BudgetGroup.js +1 -0
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +1430 -0
- package/dist/generated/prisma/models/CodingAgentProfile.js +1 -0
- package/dist/generated/prisma/models/CodingProxyRequest.d.ts +1749 -0
- package/dist/generated/prisma/models/CodingProxyRequest.js +1 -0
- package/dist/generated/prisma/models/CodingProxySession.d.ts +1505 -0
- package/dist/generated/prisma/models/CodingProxySession.js +1 -0
- package/dist/generated/prisma/models/CodingRun.d.ts +2402 -0
- package/dist/generated/prisma/models/CodingRun.js +1 -0
- package/dist/generated/prisma/models/Datastore.d.ts +1434 -0
- package/dist/generated/prisma/models/Datastore.js +1 -0
- package/dist/generated/prisma/models/DatastoreEntry.d.ts +1314 -0
- package/dist/generated/prisma/models/DatastoreEntry.js +1 -0
- package/dist/generated/prisma/models/OAuthAuthorizationCode.d.ts +1526 -0
- package/dist/generated/prisma/models/OAuthAuthorizationCode.js +1 -0
- package/dist/generated/prisma/models/OAuthAuthorizationRequest.d.ts +1350 -0
- package/dist/generated/prisma/models/OAuthAuthorizationRequest.js +1 -0
- package/dist/generated/prisma/models/OAuthClient.d.ts +1289 -0
- package/dist/generated/prisma/models/OAuthClient.js +1 -0
- package/dist/generated/prisma/models/OAuthFamily.d.ts +1540 -0
- package/dist/generated/prisma/models/OAuthFamily.js +1 -0
- package/dist/generated/prisma/models/OAuthGrant.d.ts +1280 -0
- package/dist/generated/prisma/models/OAuthGrant.js +1 -0
- package/dist/generated/prisma/models/Principal.d.ts +1790 -0
- package/dist/generated/prisma/models/Principal.js +1 -0
- package/dist/generated/prisma/models/Run.d.ts +2281 -0
- package/dist/generated/prisma/models/Run.js +1 -0
- package/dist/generated/prisma/models/SchedulerLease.d.ts +970 -0
- package/dist/generated/prisma/models/SchedulerLease.js +1 -0
- package/dist/generated/prisma/models/Secret.d.ts +1399 -0
- package/dist/generated/prisma/models/Secret.js +1 -0
- package/dist/generated/prisma/models/SecretElicitationOutcome.d.ts +973 -0
- package/dist/generated/prisma/models/SecretElicitationOutcome.js +1 -0
- package/dist/generated/prisma/models/Task.d.ts +1176 -0
- package/dist/generated/prisma/models/Task.js +1 -0
- package/dist/generated/prisma/models/Tool.d.ts +1478 -0
- package/dist/generated/prisma/models/Tool.js +1 -0
- package/dist/generated/prisma/models/Webhook.d.ts +1386 -0
- package/dist/generated/prisma/models/Webhook.js +1 -0
- package/dist/generated/prisma/models.d.ts +32 -0
- package/dist/generated/prisma/models.js +1 -0
- package/dist/import/create.d.ts +1 -1
- package/dist/import/create.js +1 -1
- package/dist/import/index.d.ts +1 -1
- package/dist/mcp/auth/ownership.d.ts +19 -19
- package/dist/mcp/auth/principal.d.ts +1 -1
- package/dist/mcp/auth/resource-server.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/browser.js +20 -6
- package/dist/mcp/auth/self-hosted/cli.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/credentials.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/rate-limit.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/session.d.ts +1 -1
- package/dist/mcp/context.d.ts +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/shared/page-style.d.ts +16 -0
- package/dist/mcp/shared/page-style.js +129 -0
- package/dist/mcp/tasks/manager.d.ts +1 -1
- package/dist/mcp/tools/agents.js +1 -1
- package/dist/mcp/tools/datastore.js +1 -1
- package/dist/mcp/tools/scheduling.js +1 -1
- package/dist/mcp/tools/secret-elicitation-form.d.ts +1 -1
- package/dist/mcp/tools/secret-elicitation-form.js +10 -28
- package/dist/mcp/tools/secret-elicitation.d.ts +1 -1
- package/dist/mcp/tools/subagents.js +1 -1
- package/dist/mcp/tools/tools.js +1 -1
- package/dist/mcp/transport/streamable-http.d.ts +1 -1
- package/dist/mcp/unattended-schedules.d.ts +1 -1
- package/dist/mcp/webhooks/ingress.d.ts +1 -1
- package/dist/providers/auth/index.d.ts +1 -1
- package/dist/providers/auth/self-hosted.d.ts +2 -2
- package/dist/providers/coding-proxy/prisma-ledger.d.ts +1 -1
- package/dist/providers/coding-proxy/runtime.d.ts +1 -1
- package/dist/providers/datastore/postgres.d.ts +1 -1
- package/dist/providers/executor/build.d.ts +1 -1
- package/dist/providers/executor/composition.d.ts +1 -1
- package/dist/providers/executor/container.d.ts +1 -1
- package/dist/providers/executor/container.js +10 -3
- package/dist/providers/executor/dbos.d.ts +1 -1
- package/dist/providers/jobs/docker.d.ts +11 -0
- package/dist/providers/jobs/docker.js +34 -18
- package/dist/providers/jobs/kubernetes.js +5 -10
- package/dist/providers/jobs/types.d.ts +2 -0
- package/dist/providers/memory/postgres.d.ts +1 -1
- package/dist/providers/vcs/git.js +2 -1
- package/dist/quickstart/config.d.ts +30 -0
- package/dist/quickstart/config.js +106 -0
- package/dist/quickstart/index.d.ts +5 -0
- package/dist/quickstart/index.js +527 -0
- package/dist/quickstart/migrate.d.ts +23 -0
- package/dist/quickstart/migrate.js +125 -0
- package/dist/wardby-bin.js +35 -9
- package/package.json +22 -9
- package/prisma/migrate.config.mjs +20 -0
- package/prisma/schema.prisma +10 -2
- package/dist/providers/auth/release-gate.d.ts +0 -1
- package/dist/providers/auth/release-gate.js +0 -4
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import * as Prisma from './internal/prismaNamespaceBrowser.js';
|
|
2
|
+
export { Prisma };
|
|
3
|
+
export * as $Enums from './enums.js';
|
|
4
|
+
export * from './enums.js';
|
|
5
|
+
/**
|
|
6
|
+
* Model Agent
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export type Agent = Prisma.AgentModel;
|
|
10
|
+
/**
|
|
11
|
+
* Model AgentSubAgent
|
|
12
|
+
* Un-phased: agent-composition edge, referenced by agent name at the
|
|
13
|
+
* import boundary (capabilities/subagents.json) but id-based here to
|
|
14
|
+
* match that Tier-1 convention. Cycle-checked in the MCP tool handler at
|
|
15
|
+
* creation time, not enforced by the database (Postgres has no native
|
|
16
|
+
* "no cycles" constraint).
|
|
17
|
+
*/
|
|
18
|
+
export type AgentSubAgent = Prisma.AgentSubAgentModel;
|
|
19
|
+
/**
|
|
20
|
+
* Model BudgetGroup
|
|
21
|
+
* Phase 7: an optional recurring spend cap across a group of agents,
|
|
22
|
+
* layered on top of each agent's own per-run budgetUsd (which stays
|
|
23
|
+
* required and unchanged). All three period caps are independently
|
|
24
|
+
* optional -- unset means "no cap for that period." warnThresholdRatio
|
|
25
|
+
* is per-group so different groups can choose their own early-warning
|
|
26
|
+
* point; enforcement itself never lives here -- see
|
|
27
|
+
* src/core/budget-groups.ts and runner.ts's executeRun, which turn a
|
|
28
|
+
* group's remaining period budget into a tightened *effective* per-run
|
|
29
|
+
* budget the existing engine budget machinery enforces unchanged.
|
|
30
|
+
*/
|
|
31
|
+
export type BudgetGroup = Prisma.BudgetGroupModel;
|
|
32
|
+
/**
|
|
33
|
+
* Model Tool
|
|
34
|
+
* Phase 3: a WASM-sandboxed, Zod-validated tool a model can call.
|
|
35
|
+
*/
|
|
36
|
+
export type Tool = Prisma.ToolModel;
|
|
37
|
+
/**
|
|
38
|
+
* Model AgentTool
|
|
39
|
+
* Phase 3: explicit many-to-many join between Agent and Tool.
|
|
40
|
+
* Phase 6: per-attachment capability scoping (OWASP LLM08 fix — Excessive
|
|
41
|
+
* Agency). Empty array = no access to that resource class; a tool must be
|
|
42
|
+
* explicitly granted secrets/datastore-prefixes/hosts at attach time. A
|
|
43
|
+
* literal "*" element in allowedHosts lifts the fetch allowlist entirely
|
|
44
|
+
* (existing SSRF protection against private/link-local addresses still
|
|
45
|
+
* applies) — the back-compat escape hatch for pre-existing attachments and
|
|
46
|
+
* deliberate full-web-access tools. See src/sandbox/tool-capabilities.ts.
|
|
47
|
+
*/
|
|
48
|
+
export type AgentTool = Prisma.AgentToolModel;
|
|
49
|
+
/**
|
|
50
|
+
* Model Datastore
|
|
51
|
+
* Named, owned resource shared across agents via AgentDatastore (Un-phased
|
|
52
|
+
* roadmap item "Named / shared datastores"). Null ownerId = public/unowned,
|
|
53
|
+
* matching Tool's convention.
|
|
54
|
+
*/
|
|
55
|
+
export type Datastore = Prisma.DatastoreModel;
|
|
56
|
+
/**
|
|
57
|
+
* Model AgentDatastore
|
|
58
|
+
* Attaches a Datastore to an agent, addressed at sandbox point-of-use by
|
|
59
|
+
* `boundName` (sharedDatastore.get(boundName, key)) — same boundName
|
|
60
|
+
* convention as AgentSecret. Defaults to the datastore's own name.
|
|
61
|
+
*/
|
|
62
|
+
export type AgentDatastore = Prisma.AgentDatastoreModel;
|
|
63
|
+
/**
|
|
64
|
+
* Model DatastoreEntry
|
|
65
|
+
* Phase 3: the datastore seam's Postgres-backed default. Scoped by agentId
|
|
66
|
+
* (private, per-agent) or datastoreId (shared, see Datastore above) — a row
|
|
67
|
+
* carries exactly one, enforced by a hand-written CHECK in the migration
|
|
68
|
+
* (Prisma has no declarative "exactly one of two columns" constraint).
|
|
69
|
+
* Phase 6: optional per-entry PII encryption (see `pii`/`keyId` below).
|
|
70
|
+
*
|
|
71
|
+
* `id` is a surrogate key required by Prisma's schema validator: with
|
|
72
|
+
* agentId and datastoreId both optional, neither `@@unique` below has an
|
|
73
|
+
* all-required-fields criterion, and Prisma rejects a model with no such
|
|
74
|
+
* criterion (P1012, "Each model must have at least one unique criteria
|
|
75
|
+
* that has only required fields") — `prisma generate`/`validate` refuse to
|
|
76
|
+
* run at all without it. Point lookups still go through the
|
|
77
|
+
* agentId_key/datastoreId_key compound uniques; `id` is not otherwise used.
|
|
78
|
+
*/
|
|
79
|
+
export type DatastoreEntry = Prisma.DatastoreEntryModel;
|
|
80
|
+
/**
|
|
81
|
+
* Model AgentMemory
|
|
82
|
+
* Un-phased: agent-controlled persistent memory (key/content per agent),
|
|
83
|
+
* gated by Agent.memoryEnabled. Deliberately a separate table rather than a
|
|
84
|
+
* Datastore convention — memory has its own access surface (built-in
|
|
85
|
+
* memory_get/memory_set/memory_list/memory_search tools, not user-authored
|
|
86
|
+
* sandbox code) and its own full-text search index, which would be an odd
|
|
87
|
+
* fit bolted onto Datastore's opaque-JSON-value shape. No FK to Agent,
|
|
88
|
+
* matching DatastoreEntry: deleting an agent leaves orphaned rows today,
|
|
89
|
+
* same pre-existing gap, not a new one.
|
|
90
|
+
*
|
|
91
|
+
* `contentTsv` is maintained by application code (see
|
|
92
|
+
* PostgresAgentMemory.set), never a Postgres GENERATED column — a generated
|
|
93
|
+
* column's expression has no representation in `Unsupported()`, which risks
|
|
94
|
+
* the migration-vs-schema drift check (CLAUDE.md) never landing clean.
|
|
95
|
+
*/
|
|
96
|
+
export type AgentMemory = Prisma.AgentMemoryModel;
|
|
97
|
+
/**
|
|
98
|
+
* Model Run
|
|
99
|
+
*
|
|
100
|
+
*/
|
|
101
|
+
export type Run = Prisma.RunModel;
|
|
102
|
+
/**
|
|
103
|
+
* Model CodingAgentProfile
|
|
104
|
+
* Phase 5: owner-configured coding behavior. Runtime credentials and opaque
|
|
105
|
+
* launcher handles never live on the reusable profile.
|
|
106
|
+
*/
|
|
107
|
+
export type CodingAgentProfile = Prisma.CodingAgentProfileModel;
|
|
108
|
+
/**
|
|
109
|
+
* Model CodingRun
|
|
110
|
+
* Phase 5: immutable dispatch inputs plus opaque execution/result state for
|
|
111
|
+
* one coding run. Policy is copied from the profile before work starts.
|
|
112
|
+
*/
|
|
113
|
+
export type CodingRun = Prisma.CodingRunModel;
|
|
114
|
+
/**
|
|
115
|
+
* Model CodingProxySession
|
|
116
|
+
* Trusted-boundary state for one coding run. Only a capability digest and an
|
|
117
|
+
* upstream credential reference are persisted; neither secret value enters the DB.
|
|
118
|
+
*/
|
|
119
|
+
export type CodingProxySession = Prisma.CodingProxySessionModel;
|
|
120
|
+
/**
|
|
121
|
+
* Model CodingProxyRequest
|
|
122
|
+
* Monotonic per-upstream-call ledger. Uncertain reservations remain held so a
|
|
123
|
+
* crash or truncated provider stream can never create new spendable budget.
|
|
124
|
+
*/
|
|
125
|
+
export type CodingProxyRequest = Prisma.CodingProxyRequestModel;
|
|
126
|
+
/**
|
|
127
|
+
* Model SchedulerLease
|
|
128
|
+
* Phase 2: single-row-per-scope lease so exactly one scheduler process
|
|
129
|
+
* ticks at a time. `holder` is a process instance id (crypto.randomUUID()).
|
|
130
|
+
*/
|
|
131
|
+
export type SchedulerLease = Prisma.SchedulerLeaseModel;
|
|
132
|
+
/**
|
|
133
|
+
* Model Principal
|
|
134
|
+
* Phase 4: an authenticated caller. `subject` is the IdP subject claim
|
|
135
|
+
* (delegating mode) or the configured LOCAL_PRINCIPAL (stdio, no token).
|
|
136
|
+
* Created on first sight (find-or-create by subject).
|
|
137
|
+
*/
|
|
138
|
+
export type Principal = Prisma.PrincipalModel;
|
|
139
|
+
/**
|
|
140
|
+
* Model Task
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
143
|
+
export type Task = Prisma.TaskModel;
|
|
144
|
+
/**
|
|
145
|
+
* Model Secret
|
|
146
|
+
* Phase 4: a secret value, encrypted at rest via the SecretCipher seam.
|
|
147
|
+
* `ciphertext` is opaque to Prisma; only the cipher's decrypt() ever
|
|
148
|
+
* produces plaintext, and only at point-of-use inside the sandbox.
|
|
149
|
+
*/
|
|
150
|
+
export type Secret = Prisma.SecretModel;
|
|
151
|
+
/**
|
|
152
|
+
* Model AgentSecret
|
|
153
|
+
* Phase 4: attaches a secret to an agent, addressed at sandbox point-of-use
|
|
154
|
+
* by `boundName` (secrets.get(boundName)). `boundName` defaults to the
|
|
155
|
+
* secret's canonical name; it differs only when the agent binds the secret
|
|
156
|
+
* under an alias, letting two agents resolve the same logical name to
|
|
157
|
+
* different underlying secrets.
|
|
158
|
+
*/
|
|
159
|
+
export type AgentSecret = Prisma.AgentSecretModel;
|
|
160
|
+
/**
|
|
161
|
+
* Model SecretElicitationOutcome
|
|
162
|
+
* Cross-instance persistence for the out-of-band secret-entry flow
|
|
163
|
+
* (mcp/tools/secret-elicitation.ts) — was an in-process Map, which stranded
|
|
164
|
+
* a browser-form submission on the wrong instance under a multi-instance
|
|
165
|
+
* HTTP deployment. `outcome` holds the SecretElicitationOutcome JSON;
|
|
166
|
+
* `expiresAt` mirrors the old TTL sweep, now a `DELETE WHERE expiresAt <=
|
|
167
|
+
* now()` instead of a Map scan.
|
|
168
|
+
*/
|
|
169
|
+
export type SecretElicitationOutcome = Prisma.SecretElicitationOutcomeModel;
|
|
170
|
+
/**
|
|
171
|
+
* Model Webhook
|
|
172
|
+
* Phase 4: inbound trigger for an agent. `secretHash` is an HMAC/hash of
|
|
173
|
+
* the validation secret shown to the caller once at creation; the raw
|
|
174
|
+
* secret itself is never stored.
|
|
175
|
+
*/
|
|
176
|
+
export type Webhook = Prisma.WebhookModel;
|
|
177
|
+
/**
|
|
178
|
+
* Model OAuthClient
|
|
179
|
+
* Phase 4 (self-hosted AS only): a registered OAuth client. Created and
|
|
180
|
+
* used only under AUTH_PROVIDER=self-hosted; the delegating adapter never
|
|
181
|
+
* writes these tables even though the migration creates them unconditionally.
|
|
182
|
+
*/
|
|
183
|
+
export type OAuthClient = Prisma.OAuthClientModel;
|
|
184
|
+
/**
|
|
185
|
+
* Model OAuthGrant
|
|
186
|
+
* Phase 4 (self-hosted AS only): an issued authorization grant / refresh token.
|
|
187
|
+
*/
|
|
188
|
+
export type OAuthGrant = Prisma.OAuthGrantModel;
|
|
189
|
+
/**
|
|
190
|
+
* Model AuthUser
|
|
191
|
+
*
|
|
192
|
+
*/
|
|
193
|
+
export type AuthUser = Prisma.AuthUserModel;
|
|
194
|
+
/**
|
|
195
|
+
* Model AuthLoginKey
|
|
196
|
+
*
|
|
197
|
+
*/
|
|
198
|
+
export type AuthLoginKey = Prisma.AuthLoginKeyModel;
|
|
199
|
+
/**
|
|
200
|
+
* Model AuthSession
|
|
201
|
+
*
|
|
202
|
+
*/
|
|
203
|
+
export type AuthSession = Prisma.AuthSessionModel;
|
|
204
|
+
/**
|
|
205
|
+
* Model AuthFormChallenge
|
|
206
|
+
*
|
|
207
|
+
*/
|
|
208
|
+
export type AuthFormChallenge = Prisma.AuthFormChallengeModel;
|
|
209
|
+
/**
|
|
210
|
+
* Model OAuthAuthorizationRequest
|
|
211
|
+
*
|
|
212
|
+
*/
|
|
213
|
+
export type OAuthAuthorizationRequest = Prisma.OAuthAuthorizationRequestModel;
|
|
214
|
+
/**
|
|
215
|
+
* Model OAuthAuthorizationCode
|
|
216
|
+
*
|
|
217
|
+
*/
|
|
218
|
+
export type OAuthAuthorizationCode = Prisma.OAuthAuthorizationCodeModel;
|
|
219
|
+
/**
|
|
220
|
+
* Model OAuthFamily
|
|
221
|
+
*
|
|
222
|
+
*/
|
|
223
|
+
export type OAuthFamily = Prisma.OAuthFamilyModel;
|
|
224
|
+
/**
|
|
225
|
+
* Model AuthRateLimit
|
|
226
|
+
*
|
|
227
|
+
*/
|
|
228
|
+
export type AuthRateLimit = Prisma.AuthRateLimitModel;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// biome-ignore-all lint: generated file
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
/*
|
|
6
|
+
* This file should be your main import to use Prisma-related types and utilities in a browser.
|
|
7
|
+
* Use it to get access to models, enums, and input types.
|
|
8
|
+
*
|
|
9
|
+
* This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
|
|
10
|
+
* See `client.ts` for the standard, server-side entry point.
|
|
11
|
+
*
|
|
12
|
+
* 🟢 You can import this file directly.
|
|
13
|
+
*/
|
|
14
|
+
import * as Prisma from './internal/prismaNamespaceBrowser.js';
|
|
15
|
+
export { Prisma };
|
|
16
|
+
export * as $Enums from './enums.js';
|
|
17
|
+
export * from './enums.js';
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import * as runtime from "@prisma/client/runtime/client";
|
|
2
|
+
import * as $Class from "./internal/class.js";
|
|
3
|
+
import * as Prisma from "./internal/prismaNamespace.js";
|
|
4
|
+
export * as $Enums from './enums.js';
|
|
5
|
+
export * from "./enums.js";
|
|
6
|
+
/**
|
|
7
|
+
* ## Prisma Client
|
|
8
|
+
*
|
|
9
|
+
* Type-safe database client for TypeScript
|
|
10
|
+
* @example
|
|
11
|
+
* ```
|
|
12
|
+
* const prisma = new PrismaClient({
|
|
13
|
+
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
14
|
+
* })
|
|
15
|
+
* // Fetch zero or more Agents
|
|
16
|
+
* const agents = await prisma.agent.findMany()
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Read more in our [docs](https://pris.ly/d/client).
|
|
20
|
+
*/
|
|
21
|
+
export declare const PrismaClient: $Class.PrismaClientConstructor;
|
|
22
|
+
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>;
|
|
23
|
+
export { Prisma };
|
|
24
|
+
/**
|
|
25
|
+
* Model Agent
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export type Agent = Prisma.AgentModel;
|
|
29
|
+
/**
|
|
30
|
+
* Model AgentSubAgent
|
|
31
|
+
* Un-phased: agent-composition edge, referenced by agent name at the
|
|
32
|
+
* import boundary (capabilities/subagents.json) but id-based here to
|
|
33
|
+
* match that Tier-1 convention. Cycle-checked in the MCP tool handler at
|
|
34
|
+
* creation time, not enforced by the database (Postgres has no native
|
|
35
|
+
* "no cycles" constraint).
|
|
36
|
+
*/
|
|
37
|
+
export type AgentSubAgent = Prisma.AgentSubAgentModel;
|
|
38
|
+
/**
|
|
39
|
+
* Model BudgetGroup
|
|
40
|
+
* Phase 7: an optional recurring spend cap across a group of agents,
|
|
41
|
+
* layered on top of each agent's own per-run budgetUsd (which stays
|
|
42
|
+
* required and unchanged). All three period caps are independently
|
|
43
|
+
* optional -- unset means "no cap for that period." warnThresholdRatio
|
|
44
|
+
* is per-group so different groups can choose their own early-warning
|
|
45
|
+
* point; enforcement itself never lives here -- see
|
|
46
|
+
* src/core/budget-groups.ts and runner.ts's executeRun, which turn a
|
|
47
|
+
* group's remaining period budget into a tightened *effective* per-run
|
|
48
|
+
* budget the existing engine budget machinery enforces unchanged.
|
|
49
|
+
*/
|
|
50
|
+
export type BudgetGroup = Prisma.BudgetGroupModel;
|
|
51
|
+
/**
|
|
52
|
+
* Model Tool
|
|
53
|
+
* Phase 3: a WASM-sandboxed, Zod-validated tool a model can call.
|
|
54
|
+
*/
|
|
55
|
+
export type Tool = Prisma.ToolModel;
|
|
56
|
+
/**
|
|
57
|
+
* Model AgentTool
|
|
58
|
+
* Phase 3: explicit many-to-many join between Agent and Tool.
|
|
59
|
+
* Phase 6: per-attachment capability scoping (OWASP LLM08 fix — Excessive
|
|
60
|
+
* Agency). Empty array = no access to that resource class; a tool must be
|
|
61
|
+
* explicitly granted secrets/datastore-prefixes/hosts at attach time. A
|
|
62
|
+
* literal "*" element in allowedHosts lifts the fetch allowlist entirely
|
|
63
|
+
* (existing SSRF protection against private/link-local addresses still
|
|
64
|
+
* applies) — the back-compat escape hatch for pre-existing attachments and
|
|
65
|
+
* deliberate full-web-access tools. See src/sandbox/tool-capabilities.ts.
|
|
66
|
+
*/
|
|
67
|
+
export type AgentTool = Prisma.AgentToolModel;
|
|
68
|
+
/**
|
|
69
|
+
* Model Datastore
|
|
70
|
+
* Named, owned resource shared across agents via AgentDatastore (Un-phased
|
|
71
|
+
* roadmap item "Named / shared datastores"). Null ownerId = public/unowned,
|
|
72
|
+
* matching Tool's convention.
|
|
73
|
+
*/
|
|
74
|
+
export type Datastore = Prisma.DatastoreModel;
|
|
75
|
+
/**
|
|
76
|
+
* Model AgentDatastore
|
|
77
|
+
* Attaches a Datastore to an agent, addressed at sandbox point-of-use by
|
|
78
|
+
* `boundName` (sharedDatastore.get(boundName, key)) — same boundName
|
|
79
|
+
* convention as AgentSecret. Defaults to the datastore's own name.
|
|
80
|
+
*/
|
|
81
|
+
export type AgentDatastore = Prisma.AgentDatastoreModel;
|
|
82
|
+
/**
|
|
83
|
+
* Model DatastoreEntry
|
|
84
|
+
* Phase 3: the datastore seam's Postgres-backed default. Scoped by agentId
|
|
85
|
+
* (private, per-agent) or datastoreId (shared, see Datastore above) — a row
|
|
86
|
+
* carries exactly one, enforced by a hand-written CHECK in the migration
|
|
87
|
+
* (Prisma has no declarative "exactly one of two columns" constraint).
|
|
88
|
+
* Phase 6: optional per-entry PII encryption (see `pii`/`keyId` below).
|
|
89
|
+
*
|
|
90
|
+
* `id` is a surrogate key required by Prisma's schema validator: with
|
|
91
|
+
* agentId and datastoreId both optional, neither `@@unique` below has an
|
|
92
|
+
* all-required-fields criterion, and Prisma rejects a model with no such
|
|
93
|
+
* criterion (P1012, "Each model must have at least one unique criteria
|
|
94
|
+
* that has only required fields") — `prisma generate`/`validate` refuse to
|
|
95
|
+
* run at all without it. Point lookups still go through the
|
|
96
|
+
* agentId_key/datastoreId_key compound uniques; `id` is not otherwise used.
|
|
97
|
+
*/
|
|
98
|
+
export type DatastoreEntry = Prisma.DatastoreEntryModel;
|
|
99
|
+
/**
|
|
100
|
+
* Model AgentMemory
|
|
101
|
+
* Un-phased: agent-controlled persistent memory (key/content per agent),
|
|
102
|
+
* gated by Agent.memoryEnabled. Deliberately a separate table rather than a
|
|
103
|
+
* Datastore convention — memory has its own access surface (built-in
|
|
104
|
+
* memory_get/memory_set/memory_list/memory_search tools, not user-authored
|
|
105
|
+
* sandbox code) and its own full-text search index, which would be an odd
|
|
106
|
+
* fit bolted onto Datastore's opaque-JSON-value shape. No FK to Agent,
|
|
107
|
+
* matching DatastoreEntry: deleting an agent leaves orphaned rows today,
|
|
108
|
+
* same pre-existing gap, not a new one.
|
|
109
|
+
*
|
|
110
|
+
* `contentTsv` is maintained by application code (see
|
|
111
|
+
* PostgresAgentMemory.set), never a Postgres GENERATED column — a generated
|
|
112
|
+
* column's expression has no representation in `Unsupported()`, which risks
|
|
113
|
+
* the migration-vs-schema drift check (CLAUDE.md) never landing clean.
|
|
114
|
+
*/
|
|
115
|
+
export type AgentMemory = Prisma.AgentMemoryModel;
|
|
116
|
+
/**
|
|
117
|
+
* Model Run
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
export type Run = Prisma.RunModel;
|
|
121
|
+
/**
|
|
122
|
+
* Model CodingAgentProfile
|
|
123
|
+
* Phase 5: owner-configured coding behavior. Runtime credentials and opaque
|
|
124
|
+
* launcher handles never live on the reusable profile.
|
|
125
|
+
*/
|
|
126
|
+
export type CodingAgentProfile = Prisma.CodingAgentProfileModel;
|
|
127
|
+
/**
|
|
128
|
+
* Model CodingRun
|
|
129
|
+
* Phase 5: immutable dispatch inputs plus opaque execution/result state for
|
|
130
|
+
* one coding run. Policy is copied from the profile before work starts.
|
|
131
|
+
*/
|
|
132
|
+
export type CodingRun = Prisma.CodingRunModel;
|
|
133
|
+
/**
|
|
134
|
+
* Model CodingProxySession
|
|
135
|
+
* Trusted-boundary state for one coding run. Only a capability digest and an
|
|
136
|
+
* upstream credential reference are persisted; neither secret value enters the DB.
|
|
137
|
+
*/
|
|
138
|
+
export type CodingProxySession = Prisma.CodingProxySessionModel;
|
|
139
|
+
/**
|
|
140
|
+
* Model CodingProxyRequest
|
|
141
|
+
* Monotonic per-upstream-call ledger. Uncertain reservations remain held so a
|
|
142
|
+
* crash or truncated provider stream can never create new spendable budget.
|
|
143
|
+
*/
|
|
144
|
+
export type CodingProxyRequest = Prisma.CodingProxyRequestModel;
|
|
145
|
+
/**
|
|
146
|
+
* Model SchedulerLease
|
|
147
|
+
* Phase 2: single-row-per-scope lease so exactly one scheduler process
|
|
148
|
+
* ticks at a time. `holder` is a process instance id (crypto.randomUUID()).
|
|
149
|
+
*/
|
|
150
|
+
export type SchedulerLease = Prisma.SchedulerLeaseModel;
|
|
151
|
+
/**
|
|
152
|
+
* Model Principal
|
|
153
|
+
* Phase 4: an authenticated caller. `subject` is the IdP subject claim
|
|
154
|
+
* (delegating mode) or the configured LOCAL_PRINCIPAL (stdio, no token).
|
|
155
|
+
* Created on first sight (find-or-create by subject).
|
|
156
|
+
*/
|
|
157
|
+
export type Principal = Prisma.PrincipalModel;
|
|
158
|
+
/**
|
|
159
|
+
* Model Task
|
|
160
|
+
*
|
|
161
|
+
*/
|
|
162
|
+
export type Task = Prisma.TaskModel;
|
|
163
|
+
/**
|
|
164
|
+
* Model Secret
|
|
165
|
+
* Phase 4: a secret value, encrypted at rest via the SecretCipher seam.
|
|
166
|
+
* `ciphertext` is opaque to Prisma; only the cipher's decrypt() ever
|
|
167
|
+
* produces plaintext, and only at point-of-use inside the sandbox.
|
|
168
|
+
*/
|
|
169
|
+
export type Secret = Prisma.SecretModel;
|
|
170
|
+
/**
|
|
171
|
+
* Model AgentSecret
|
|
172
|
+
* Phase 4: attaches a secret to an agent, addressed at sandbox point-of-use
|
|
173
|
+
* by `boundName` (secrets.get(boundName)). `boundName` defaults to the
|
|
174
|
+
* secret's canonical name; it differs only when the agent binds the secret
|
|
175
|
+
* under an alias, letting two agents resolve the same logical name to
|
|
176
|
+
* different underlying secrets.
|
|
177
|
+
*/
|
|
178
|
+
export type AgentSecret = Prisma.AgentSecretModel;
|
|
179
|
+
/**
|
|
180
|
+
* Model SecretElicitationOutcome
|
|
181
|
+
* Cross-instance persistence for the out-of-band secret-entry flow
|
|
182
|
+
* (mcp/tools/secret-elicitation.ts) — was an in-process Map, which stranded
|
|
183
|
+
* a browser-form submission on the wrong instance under a multi-instance
|
|
184
|
+
* HTTP deployment. `outcome` holds the SecretElicitationOutcome JSON;
|
|
185
|
+
* `expiresAt` mirrors the old TTL sweep, now a `DELETE WHERE expiresAt <=
|
|
186
|
+
* now()` instead of a Map scan.
|
|
187
|
+
*/
|
|
188
|
+
export type SecretElicitationOutcome = Prisma.SecretElicitationOutcomeModel;
|
|
189
|
+
/**
|
|
190
|
+
* Model Webhook
|
|
191
|
+
* Phase 4: inbound trigger for an agent. `secretHash` is an HMAC/hash of
|
|
192
|
+
* the validation secret shown to the caller once at creation; the raw
|
|
193
|
+
* secret itself is never stored.
|
|
194
|
+
*/
|
|
195
|
+
export type Webhook = Prisma.WebhookModel;
|
|
196
|
+
/**
|
|
197
|
+
* Model OAuthClient
|
|
198
|
+
* Phase 4 (self-hosted AS only): a registered OAuth client. Created and
|
|
199
|
+
* used only under AUTH_PROVIDER=self-hosted; the delegating adapter never
|
|
200
|
+
* writes these tables even though the migration creates them unconditionally.
|
|
201
|
+
*/
|
|
202
|
+
export type OAuthClient = Prisma.OAuthClientModel;
|
|
203
|
+
/**
|
|
204
|
+
* Model OAuthGrant
|
|
205
|
+
* Phase 4 (self-hosted AS only): an issued authorization grant / refresh token.
|
|
206
|
+
*/
|
|
207
|
+
export type OAuthGrant = Prisma.OAuthGrantModel;
|
|
208
|
+
/**
|
|
209
|
+
* Model AuthUser
|
|
210
|
+
*
|
|
211
|
+
*/
|
|
212
|
+
export type AuthUser = Prisma.AuthUserModel;
|
|
213
|
+
/**
|
|
214
|
+
* Model AuthLoginKey
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
217
|
+
export type AuthLoginKey = Prisma.AuthLoginKeyModel;
|
|
218
|
+
/**
|
|
219
|
+
* Model AuthSession
|
|
220
|
+
*
|
|
221
|
+
*/
|
|
222
|
+
export type AuthSession = Prisma.AuthSessionModel;
|
|
223
|
+
/**
|
|
224
|
+
* Model AuthFormChallenge
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
227
|
+
export type AuthFormChallenge = Prisma.AuthFormChallengeModel;
|
|
228
|
+
/**
|
|
229
|
+
* Model OAuthAuthorizationRequest
|
|
230
|
+
*
|
|
231
|
+
*/
|
|
232
|
+
export type OAuthAuthorizationRequest = Prisma.OAuthAuthorizationRequestModel;
|
|
233
|
+
/**
|
|
234
|
+
* Model OAuthAuthorizationCode
|
|
235
|
+
*
|
|
236
|
+
*/
|
|
237
|
+
export type OAuthAuthorizationCode = Prisma.OAuthAuthorizationCodeModel;
|
|
238
|
+
/**
|
|
239
|
+
* Model OAuthFamily
|
|
240
|
+
*
|
|
241
|
+
*/
|
|
242
|
+
export type OAuthFamily = Prisma.OAuthFamilyModel;
|
|
243
|
+
/**
|
|
244
|
+
* Model AuthRateLimit
|
|
245
|
+
*
|
|
246
|
+
*/
|
|
247
|
+
export type AuthRateLimit = Prisma.AuthRateLimitModel;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// biome-ignore-all lint: generated file
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
/*
|
|
6
|
+
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
|
|
7
|
+
* If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
|
|
8
|
+
*
|
|
9
|
+
* 🟢 You can import this file directly.
|
|
10
|
+
*/
|
|
11
|
+
import * as path from 'node:path';
|
|
12
|
+
import { fileURLToPath } from 'node:url';
|
|
13
|
+
globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
import * as $Class from "./internal/class.js";
|
|
15
|
+
import * as Prisma from "./internal/prismaNamespace.js";
|
|
16
|
+
export * as $Enums from './enums.js';
|
|
17
|
+
export * from "./enums.js";
|
|
18
|
+
/**
|
|
19
|
+
* ## Prisma Client
|
|
20
|
+
*
|
|
21
|
+
* Type-safe database client for TypeScript
|
|
22
|
+
* @example
|
|
23
|
+
* ```
|
|
24
|
+
* const prisma = new PrismaClient({
|
|
25
|
+
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
26
|
+
* })
|
|
27
|
+
* // Fetch zero or more Agents
|
|
28
|
+
* const agents = await prisma.agent.findMany()
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* Read more in our [docs](https://pris.ly/d/client).
|
|
32
|
+
*/
|
|
33
|
+
export const PrismaClient = $Class.getPrismaClientClass();
|
|
34
|
+
export { Prisma };
|