@feltdb/feltkit 0.3.12 → 0.3.13

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.
Files changed (97) hide show
  1. package/README.md +4 -3
  2. package/dist/app.d.ts +18 -0
  3. package/dist/app.js +22 -0
  4. package/dist/app.js.map +1 -1
  5. package/dist/appboundry/build.js +10 -2
  6. package/dist/appboundry/build.js.map +1 -1
  7. package/dist/appboundry/host.js +2 -2
  8. package/dist/appboundry/host.js.map +1 -1
  9. package/dist/cli/main.d.ts +5 -0
  10. package/dist/cli/main.js +139 -40
  11. package/dist/cli/main.js.map +1 -1
  12. package/dist/client/index.d.ts +3 -0
  13. package/dist/client/index.js +3 -0
  14. package/dist/client/index.js.map +1 -1
  15. package/dist/dashboard/assets/index-BSnW2DC-.js +15 -0
  16. package/dist/dashboard/assets/{index-91I1zDK-.css → index-BXTNQAg1.css} +1 -1
  17. package/dist/dashboard/index.html +3 -3
  18. package/dist/docs.d.ts +12 -0
  19. package/dist/docs.js +42 -0
  20. package/dist/docs.js.map +1 -0
  21. package/dist/errors.d.ts +15 -0
  22. package/dist/errors.js +9 -0
  23. package/dist/errors.js.map +1 -1
  24. package/dist/platform/changes.js +4 -2
  25. package/dist/platform/changes.js.map +1 -1
  26. package/dist/platform/deployments.js +8 -6
  27. package/dist/platform/deployments.js.map +1 -1
  28. package/dist/runtime/activity.d.ts +25 -0
  29. package/dist/runtime/activity.js +38 -12
  30. package/dist/runtime/activity.js.map +1 -1
  31. package/dist/runtime/agent.d.ts +16 -0
  32. package/dist/runtime/agent.js +92 -28
  33. package/dist/runtime/agent.js.map +1 -1
  34. package/dist/runtime/backup-environment.d.ts +8 -1
  35. package/dist/runtime/backup-environment.js +44 -12
  36. package/dist/runtime/backup-environment.js.map +1 -1
  37. package/dist/runtime/backup.d.ts +45 -3
  38. package/dist/runtime/backup.js +237 -68
  39. package/dist/runtime/backup.js.map +1 -1
  40. package/dist/runtime/capabilities.js +4 -2
  41. package/dist/runtime/capabilities.js.map +1 -1
  42. package/dist/runtime/changes.js +2 -2
  43. package/dist/runtime/changes.js.map +1 -1
  44. package/dist/runtime/data.d.ts +30 -3
  45. package/dist/runtime/data.js +136 -32
  46. package/dist/runtime/data.js.map +1 -1
  47. package/dist/runtime/decisions.js +2 -1
  48. package/dist/runtime/decisions.js.map +1 -1
  49. package/dist/runtime/integrations.js +14 -6
  50. package/dist/runtime/integrations.js.map +1 -1
  51. package/dist/runtime/loader.js +22 -2
  52. package/dist/runtime/loader.js.map +1 -1
  53. package/dist/runtime/readiness.js +6 -1
  54. package/dist/runtime/readiness.js.map +1 -1
  55. package/dist/runtime/runtime.d.ts +24 -6
  56. package/dist/runtime/runtime.js +75 -19
  57. package/dist/runtime/runtime.js.map +1 -1
  58. package/dist/runtime/services.d.ts +19 -5
  59. package/dist/runtime/services.js +14 -4
  60. package/dist/runtime/services.js.map +1 -1
  61. package/dist/runtime/sessions.js +4 -3
  62. package/dist/runtime/sessions.js.map +1 -1
  63. package/dist/runtime/state-contract.js +3 -3
  64. package/dist/runtime/state-contract.js.map +1 -1
  65. package/dist/server/admin.d.ts +2 -2
  66. package/dist/server/admin.js +37 -12
  67. package/dist/server/admin.js.map +1 -1
  68. package/dist/server/index.d.ts +2 -1
  69. package/dist/server/index.js +45 -8
  70. package/dist/server/index.js.map +1 -1
  71. package/dist/server/mcp.js +1 -1
  72. package/dist/server/mcp.js.map +1 -1
  73. package/dist/testing/index.d.ts +6 -2
  74. package/dist/testing/index.js +28 -4
  75. package/dist/testing/index.js.map +1 -1
  76. package/docs/AGENT-OPERATIONS.md +515 -0
  77. package/docs/APPBOUNDRY.md +240 -0
  78. package/docs/ARCHITECTURE.md +126 -0
  79. package/docs/BACKUP.md +115 -0
  80. package/docs/GUARANTEES.md +457 -0
  81. package/docs/PATH-TO-PRODUCTION.md +117 -0
  82. package/docs/README.md +15 -0
  83. package/docs/SECURITY.md +182 -0
  84. package/docs/TRANSACTIONS.md +216 -0
  85. package/docs/UPSTREAM-GAPS.md +270 -0
  86. package/docs/WHY-FELTKIT.md +64 -0
  87. package/docs/assets/feltkit-logo-dark.png +0 -0
  88. package/docs/assets/feltkit-logo.png +0 -0
  89. package/package.json +9 -7
  90. package/skills/.claude-plugin/marketplace.json +1 -1
  91. package/skills/.claude-plugin/plugin.json +3 -3
  92. package/skills/feltkit-agent/SKILL.md +9 -5
  93. package/skills/feltkit-build/SKILL.md +10 -1
  94. package/skills/feltkit-data/SKILL.md +9 -3
  95. package/skills/feltkit-services/SKILL.md +7 -3
  96. package/dist/dashboard/assets/index-BhFOquA7.js +0 -15
  97. package/dist/dashboard/theme.js +0 -11
@@ -0,0 +1,457 @@
1
+ # Guarantees and known limitations
2
+
3
+ This page states what FeltKit guarantees, what it inherits from FeltDB, AppPort, and
4
+ AppPort Services, and what it does not do yet.
5
+
6
+ ## State
7
+
8
+ | Guarantee | Scope |
9
+ |---|---|
10
+ | One FeltDB instance per environment per process | Enforced by `InstanceFactory`; verified by `shared-instance.test.ts` |
11
+ | Mutations are atomic | All writes through `ctx.db` in one mutation commit in one FeltDB transaction, or none do |
12
+ | Durability | The local runtime persists each commit before returning (FeltDB's file runtime). Verified across restarts. |
13
+ | Schema validation | Every write through `ctx.db` and the dashboard, with the full FeltKit schema. |
14
+ | Schema enforcement | On local and memory state, FeltDB enforces the state contract the collections compile to (types, required fields, no undeclared fields or collections, `s.ref` references with restrict on delete, unique constraints), on every write from any component. See "Schema lifecycle". |
15
+
16
+ ### Schema lifecycle
17
+
18
+ `runtime/state-contract.ts`; tests `schema-lifecycle.test.ts` (local state, across restarts)
19
+ and `schema-lifecycle-artifact.test.ts` (artifacts).
20
+
21
+ **Guaranteed:**
22
+
23
+ - **The installed contract is the declared one, or calls are refused.** At start and reload,
24
+ the store's active contract is compared with what `feltkit/` declares. When they differ
25
+ and the change can't be installed, no function runs: stored records are never handed to
26
+ code that declares a different schema.
27
+ - **A change is installed only over records that satisfy it.** FeltDB re-validates every
28
+ governed record (fields, references, unique constraints) inside one transaction. That
29
+ transaction holds the pending `app.migration()` writes, each conditioned on the version
30
+ of the record it read, plus the history record. It is refused as a whole otherwise.
31
+ - **A refused change leaves everything as it was.** The previous contract stays active, the
32
+ data is untouched, and code declaring the previous schema keeps working.
33
+ - **Removing a collection that still holds records is refused.** FeltDB itself would
34
+ accept it and leave the records unreachable (UPSTREAM-GAPS F18). Moving records out of a
35
+ collection being removed takes two evolutions:
36
+ 1. The new schema plus the collection, with every migration write.
37
+ 2. Drop the collection, now empty.
38
+
39
+ A stop between them leaves a valid, enforced schema, and the next start finishes the job.
40
+ - **Each migration runs once per store.** It is recorded by name in `_feltkit_migrations`,
41
+ in the same transaction as its writes.
42
+ - **Adoption.** A store written before schemas were enforced is adopted at the first start
43
+ when its records satisfy the declared schema; nothing is rewritten.
44
+
45
+ **Not guaranteed:**
46
+
47
+ - **Large migrations.** An evolution is one transaction, so a migration over a large
48
+ collection is bounded by what one transaction can hold. Split it: install an optional
49
+ field, backfill in batches, then require it.
50
+ - **A store whose old records do not satisfy the declared schema keeps serving without
51
+ enforcement.** It is flagged `unverified` in `feltkit dev`, readiness, `inspect` and
52
+ `feltkit migrate`, rather than taking an upgraded app down.
53
+ - **The structural subset only.** Length, range and nested-shape rules are FeltKit's
54
+ write-time validation, not the contract's.
55
+ - **FeltDB servers and Managed FeltDB** enforce the contract published to them; FeltKit
56
+ does not install it there.
57
+
58
+ ### Mutation isolation
59
+
60
+ A mutation commits only if everything it read is still as it read it. FeltDB checks
61
+ this inside its commit lock; a failed check rejects the whole transaction with
62
+ `CONFLICT` and nothing is written.
63
+
64
+ | Read inside a mutation | How it is checked at commit | Detects |
65
+ |---|---|---|
66
+ | `get(id)` | `ifVersion` / `requireAbsent` precondition on that record | The record changed, appeared, or was deleted |
67
+ | `find(filter)`, `count(filter)` with at least one field | FeltDB read basis on the equality predicate, captured before the read | Any matching record changed, appeared (phantom), disappeared, or stopped matching — by any writer |
68
+ | `query({ where })` with some `eq` clauses | Read basis on the `eq` clauses only (range clauses dropped) | Same as above, for a superset of the read: may report conflicts the range would have excluded, never misses one |
69
+ | `find()`/`count()` with no filter, or `query` with only range clauses | The collection's change marker (`_feltkit_collections`), touched by every commit made through `ctx.db` or the dashboard | Any commit to the collection through FeltKit. **Not** writes made through `ctx.unsafe.feltdb`. |
70
+ | Records the mutation wrote | `ifVersion` on updates and deletes, at the version the mutation **first read** (a `get` before the `patch`); `requireAbsent` on inserts | Lost updates, including a change committed between the handler's read and its write |
71
+
72
+ Records `ctx.db` returns (`get`, `find`, `query`, and the results of `patch`/`replace`) are
73
+ the handler's own copies, and so are the values it passes to `insert`, `patch` and
74
+ `replace`. Changing a returned record changes nothing stored and nothing another request
75
+ reads; only a write does. (Before this change `find` and `query` returned FeltDB's stored objects
76
+ on the local runtimes: changing one changed later reads in the process without a write and
77
+ failed the mutation's own read fence with a false `CONFLICT`.) Tests:
78
+ `packages/sdk/test/data-isolation.test.ts`.
79
+
80
+ Demonstrated in `packages/sdk/test/isolation.test.ts` with interleaved mutations:
81
+ lost update, phantom on a uniqueness check, write skew over a predicate, range and
82
+ unfiltered reads, a conflicting mutation writing nothing, and the corresponding cases
83
+ that must commit (disjoint predicates, concurrent blind inserts).
84
+
85
+ **What this is:** within FeltDB, a committed mutation's reads were all current at
86
+ commit time (optimistic concurrency with predicate fencing).
87
+
88
+ **What this is not:**
89
+
90
+ - A consistent snapshot across reads *while* the handler runs. Two reads in one
91
+ handler can observe different committed states; if either changed, the commit fails.
92
+ - Checked for read-only mutations. A mutation that writes nothing commits nothing, so
93
+ nothing is checked. Queries are never checked.
94
+ - Retried. A `CONFLICT` writes nothing; FeltKit leaves retries to the caller because
95
+ handlers may have side effects. A read-set conflict says `retryable: true` and can be retried as is. One with
96
+ `details.feltdbCode: REVISION_NOT_ACTIVE` means a FeltDB contract was promoted: the
97
+ request was built for the previous contract, so decide whether it still makes sense first.
98
+ - Conflict-free under contention. Fences are conservative: whole-collection reads
99
+ conflict with any concurrent commit to that collection.
100
+
101
+ ### Sequences
102
+
103
+ `ctx.db.sequence(name)` reads the sequence's committed value (`_feltkit_sequences`) and
104
+ writes the new one in the mutation's transaction, conditioned on the version it read. So:
105
+
106
+ - Two commits never get the same number, on any runtime and across processes: the second
107
+ of two mutations that read the same value fails with `CONFLICT` and writes nothing.
108
+ - Numbers follow commit order, and call order within one mutation, with no gaps; a
109
+ mutation that throws, is refused, or writes nothing else consumes none.
110
+ - Order is per stream (the name); there is no order between streams, and different streams
111
+ never contend.
112
+ - Not guaranteed: throughput under contention on one stream. Mutations drawing from one
113
+ stream serialize: the later gets `CONFLICT`, or is re-run when it opted in
114
+ (`retry: { sequenceConflicts }`) and used no `ctx.services`.
115
+ - The same on FeltKit's runtime and in AppBoundry artifacts (transactions@1, AppBoundry 1.5.0).
116
+
117
+ ### After-commit effects
118
+
119
+ `ctx.afterCommit.{notifications.send, webhooks.emit, jobs.enqueue}` writes an outbox record
120
+ (`_feltkit_outbox`) in the mutation's transaction:
121
+
122
+ - No effect for a mutation that threw or whose commit was refused.
123
+ - An effect for every committed mutation. It is performed right after the commit as the
124
+ caller, and otherwise by the services worker (as the caller's current principal) once a record
125
+ has been pending for 30 s, or performing for 5 min. A record is claimed with a version-checked
126
+ write, so two processes do not perform it together.
127
+ - A job or webhook delivery is created in the same FeltDB transaction that records the effect
128
+ done, so it exists once per committed effect, whatever stops when. Notifications carry the
129
+ outbox id as their idempotency key, so a repeat is not delivered twice.
130
+ - Creation is exactly once, not execution: a job's run and a webhook's delivery to its endpoint
131
+ are AppPort Services' own retries (at least once).
132
+ - The effect's own failure (a refused permission, a disabled service) does not undo the
133
+ commit: the record is `failed` with the error, and the log says so. A failed record is
134
+ never retried on its own; an operator retries it (`feltkit outbox retry <id>`, AppBoundry
135
+ `admin outbox retry <id>`), keeping its attempts.
136
+ - The same on FeltKit's runtime and in AppBoundry artifacts. Details: TRANSACTIONS.md.
137
+
138
+ ### Not guaranteed
139
+
140
+ - Service effects (`ctx.services.*`) and activity entries are separate commits from
141
+ the mutation's transaction. A mutation that uploads a file and then fails leaves the file.
142
+ Use `ctx.afterCommit` for notifications, webhook events and jobs that must not outlive a
143
+ failed mutation.
144
+ - Nothing is atomic across FeltDB and external systems.
145
+ - `ctx.unsafe.feltdb` writes are not validated, not transactional with the mutation,
146
+ not attributed to it in the activity log, and invisible to whole-collection fences.
147
+ - File bytes are stored in the same FeltDB instance (`_feltkit_file_content`, with
148
+ their SHA-256, re-hashed on every read) before the file record is committed, so a
149
+ record never points at bytes that were not stored; if the record cannot be committed
150
+ the bytes are removed. Deleting a file removes its bytes. FeltDB 0.15's content store
151
+ is not used: it cannot delete content, and the memory runtime has none (UPSTREAM-GAPS
152
+ F6, F8, F9).
153
+ - Files are capped at 1 MiB by default (`services.files.maxBytes`).
154
+ - A mutation called with an idempotency key commits under a FeltDB transaction id
155
+ derived from that key. If its commit is unconfirmed, a same-key retry is refused with
156
+ `OUTCOME_UNKNOWN` (`committed: true` when FeltDB shows the first attempt committed)
157
+ rather than written again; a retry with a new key is a new request.
158
+ - A FeltDB server that cannot issue read bases makes every mutation that uses
159
+ `find`/`query`/`count` fail with `UNAVAILABLE` rather than commit unchecked.
160
+
161
+ ## Errors
162
+
163
+ Every failure that reaches a caller has a stable `code`, the same HTTP status on FeltKit's
164
+ function API (`/api`) and on AppPort (`/appport`), and an explicit retry answer: `retryable:
165
+ true` in the error when sending the same request again can succeed without anything else
166
+ changing; absent (FeltKit) or `false` (AppPort) otherwise. MCP tool errors carry the AppPort
167
+ code in their text. `FeltKitClientError` exposes `code` and `retryable`.
168
+
169
+ | Failure | `/api` code | AppPort / MCP code | HTTP | Retryable |
170
+ | --- | --- | --- | --- | --- |
171
+ | Malformed input | `INVALID_ARGUMENT` | `INVALID_INPUT` | 400 | no |
172
+ | No or invalid session | `UNAUTHORIZED` | `UNAUTHORIZED` | 401 | no |
173
+ | The caller lacks the permission | `FORBIDDEN` | `FORBIDDEN` | 403 | no |
174
+ | A record or function of this app is missing | `NOT_FOUND` | `NOT_FOUND` | 404 | no |
175
+ | The current state does not allow it | `FAILED_PRECONDITION` | `feltkit.FAILED_PRECONDITION` | 409 | no |
176
+ | A record this mutation read changed before commit | `CONFLICT` | `CONFLICT` | 409 | **yes** |
177
+ | Any other state conflict (duplicate unique value, already applied) | `CONFLICT` | `CONFLICT` | 409 | no |
178
+ | An external API (`app.integration`) refused the request (4xx) | `UPSTREAM_REJECTED` | `UPSTREAM_REJECTED`, `details.status` = the API's status | 502 | no |
179
+ | The request was sent; the outcome is not known | `OUTCOME_UNKNOWN` | `OUTCOME_UNKNOWN` | 502 | no: verify it |
180
+ | A dependency is unreachable | `UNAVAILABLE` | `UNAVAILABLE` | 503 | **yes** |
181
+ | A credential or URL an operator must provide is missing | `CONFIGURATION` | `NOT_CONFIGURED` (`details.hint`) | 503 | no |
182
+ | Unexpected | `INTERNAL` | `INTERNAL_ERROR` | 500 | no |
183
+
184
+ An external API's 401 or 404 is `UPSTREAM_REJECTED`: it is about FeltKit's credential for that
185
+ API or the API's own records, never the caller's session or this application's data, so it is
186
+ never `UNAUTHORIZED`, `NOT_FOUND` or a retryable `CONFLICT`. It is the code the operation's
187
+ published contract declares (`appport.integration/1` `failures`). Tests:
188
+ `packages/sdk/test/error-contract.test.ts`.
189
+
190
+ ## Topology
191
+
192
+ - The local FeltDB runtime is a single-host, single-process store. FeltDB takes an
193
+ exclusive owner lock (`owner.lock` in the state directory) when FeltKit opens it; any
194
+ other process — a second `feltkit dev`/`start`, a CLI command, a script — is refused
195
+ with `DUPLICATE_INSTANCE` naming the owner, and nothing is read or written. FeltKit
196
+ never opens state in FeltDB's shared mode. CLI commands find a running server through
197
+ `.feltkit/<env>/runtime.json` and go through its admin API instead of opening the
198
+ state. Verified in `feltdb-release.test.ts` (F5) with a second real process.
199
+ - Production with a FeltDB server (`FELTDB_URL`) uses FeltDB's remote runtime. FeltKit's
200
+ change feed reads the instance's operation journal; whether a remote authority exposes
201
+ it fully is FeltDB's contract, and live updates across multiple FeltKit processes are
202
+ not provided.
203
+
204
+ ## Live queries
205
+
206
+ - The change stream requires a session unless the application has a public query.
207
+ - Within one server process, every committed write produces a change notification
208
+ naming its collection, at least once, typically within 150 ms. Notifications carry
209
+ collection names only; data is always re-read through the authorized query endpoint.
210
+ - After a reconnect, clients re-run every watched query.
211
+ - Queries are re-run per collection, not per record or predicate.
212
+
213
+ ## Queries
214
+
215
+ - Queries cannot write through `ctx.db`. FeltKit does not sandbox handlers, so a query
216
+ can still make network calls or other side effects; FeltKit does not claim purity.
217
+ - `count` reads all matching records.
218
+
219
+ ## Identity
220
+
221
+ - No built-in password or OAuth sign-in. Development sign-in exists only in
222
+ `development`/`test`. Production uses `auth.authenticate` (your identity provider) or
223
+ tokens from `feltkit session create`.
224
+ - Roles are fixed per session at issue time; permissions are resolved from the current
225
+ policy on every call.
226
+ - Session tokens are bearer tokens: anyone holding one acts as its principal until it
227
+ expires or is revoked.
228
+
229
+ ## AppPort Services
230
+
231
+ Services run on the application's FeltDB instance (`createServices({ db })`,
232
+ `@appport/services` 0.9.1). FeltKit refuses to start unless `services.usesInstance()`
233
+ confirms that instance. Service state is the package's own `health()`; effect evidence is
234
+ looked up with `services.evidence.findByRunId()`, and an effect with a `started` record and
235
+ no completion is reported as outcome unknown, never as success or failure. Enable each in
236
+ `feltkit({ services })`.
237
+
238
+ | Service | What runs | Verified (packages/sdk/test) |
239
+ |---|---|---|
240
+ | Files | records with audit; bytes in the same instance | persistence, authorization, upload/read/delete, restart (`services`) |
241
+ | Notifications | in-app channel, delivered inline; recipient-only | persistence, delivery, recipient-only access, restart (`services`) |
242
+ | Configuration | variables and credential references for the running environment | persistence, environment separation; the console page edits the environment the application reads (`services`, `console`) |
243
+ | API keys | created, rotated, revoked on the package's page; accepted on `/appport` and `/mcp` with `services.apiKeys.roles` | secret shown once, never listed, revocation → 401, survives restart (`console`) |
244
+ | Webhooks | signed delivery to registered endpoints; history | signed with the environment's secret, delivered as the emitter, secret in no record or log (`console`) |
245
+ | Jobs | job type → FeltKit function, run as the enqueuer, retries | executed as the enqueuer, refused for a weaker role, failure recorded, retry, refused after the enqueuer signs out (`console`) |
246
+ | Schedules | recurring jobs (needs jobs) | constructed and reported; not exercised end to end |
247
+ | Intelligence | provider/model configuration only (the package never runs a model) | selection + key stored through `credential.store` + Test against a local OpenAI-compatible and Anthropic-compatible server that checks the key header (`credential-custody`) |
248
+
249
+ - **States.** Each service is reported `unavailable` (cannot run here), `available` (not
250
+ enabled), `unconfigured`, `configured`, or `unhealthy` (its store failed a check, a
251
+ required secret does not resolve, or recent work failed), from the services' own
252
+ records. Nothing is shown as working because it is enabled.
253
+ - **Durable work.** Jobs, schedules, and deliveries re-authorize every attempt as the
254
+ principal that created them: an API key that still exists and is not revoked, or the
255
+ most recent active session. With neither, the work is refused (`DENIED`), never run
256
+ with less checking. Durable work is driven by the runtime's worker (every second) or
257
+ `runtime.runServices()`.
258
+ - **Secrets.** Services hold `credential-ref:<id>` only. Values are kept by FeltKit's
259
+ credential custody (below), resolved inside the effect, and are never stored in FeltDB,
260
+ logged, returned, or given to the agent.
261
+ - **The console** is development-only and loopback-only. It is the package's own
262
+ `createManagementRouter`; FeltKit supplies authentication and nothing else.
263
+ - FeltKit is single-tenant per application: the Services tenant is the application
264
+ name. Configuration environments map `development`/`test` → `development`,
265
+ `production` → `production`.
266
+ - Files are application-shared: any principal with `files.read` reads every file.
267
+
268
+ ## Agents
269
+
270
+ The FeltKit agent is FeltDB's agent runtime and agent state on the shared instance
271
+ (`runtime/agent.ts`). Verified in `packages/sdk/test/agent.test.ts`,
272
+ `agent-lifecycle.test.ts` (refusal, rejection, duplicates, concurrency, failure and
273
+ retry, timeout, cancellation, crashes, restart recovery), and, in a browser,
274
+ `studio.test.ts`.
275
+
276
+ | Guarantee | How |
277
+ |---|---|
278
+ | Durable | Tasks, checkpoints, actions, and handoffs are FeltDB agent state; each task has a FeltDB execution record. Every action state change is persisted before the next step. |
279
+ | Acts only through AppPort | Application capabilities via the application's dispatch pipeline; service operations via AppPort Services' `invoke()` and gateway. No other access to state. |
280
+ | Same authority as every interface | Actions run as the task owner. Before an approval changes anything, the owner is resolved and both the approver and the owner must be permitted to perform the action; otherwise the approval is refused, the reason is recorded in the action's history, and the action stays proposed. If the owner cannot be resolved (no session, not a dev identity), approval fails closed; no identity is substituted. |
281
+ | Approval | Consequential actions (AppPort's and AppPort Services' effect classes) wait for a person (`type: "user"`) who may perform them; agents cannot approve; there is no approve tool. |
282
+ | Mandatory approval | A mutation declared `approval: "required"` cannot be run directly by an agent, service or API key on any interface: FeltKit's HTTP API, AppPort, MCP, a job or schedule it queued. The refusal is `FORBIDDEN` with `details.approval: "required"`, recorded as a denial, before arguments are checked. It runs only inside the execution of an approved action for exactly that capability (an in-process context that no header, envelope field or transport name can set), as the proposer, whose own `access` is still checked, after a person who may perform it approves. The run's activity entry carries `authority.approval` (task, action, approver). People (`type: "user"`) call it directly. Discovery says so: the capability's description, and `feltkit_context` (`approval: "required"`, `invoke: "propose"`). An AppBoundry build refuses it. Tests: `packages/sdk/test/approval-required.test.ts`. |
283
+ | One run per approval | Each action state change is a compare-and-swap on the action's record (FeltDB `supersede` with the expected revision). Of concurrent or repeated approvals one wins; the others return the current state and run nothing. |
284
+ | Attribution | Each action records who proposed it, who approved or rejected it, the principal it ran as, the request id, timestamps, the outcome and how it was determined, and a history of every transition with its actor. Agent activity entries carry the owner as principal and the proposer and approver in their detail. |
285
+ | Evidence | Each action's activity record and its final action record are cited by a checkpoint and verified by FeltDB at commit. Pending work is rebuilt from the open actions at every checkpoint. |
286
+ | No secrets | Results are redacted before they are recorded or returned. |
287
+
288
+ **Action states.** `proposed → approved → executing → succeeded | failed | interrupted`;
289
+ `proposed → rejected | cancelled`; `approved → cancelled`; `interrupted → succeeded |
290
+ failed` (from evidence or a person); `failed → proposed` (retry, a new attempt).
291
+ `succeeded`, `rejected`, and `cancelled` are final. Other transitions are refused.
292
+
293
+ **Idempotency.** Every application mutation declares AppPort idempotency (an integration
294
+ operation does when it declares `idempotencyHeader`), and AppPort's idempotency entries
295
+ are kept in FeltDB (`_feltkit_idempotency`, 24 h). Before the handler runs, AppPort writes
296
+ a durable in-progress claim (key, request id, request digest, caller); FeltKit's store
297
+ makes it an atomic create-if-absent with a FeltDB transaction guard, so of concurrent
298
+ claimers exactly one runs. The completed record replaces the claim. A replay of the key
299
+ returns the stored response without running the handler; a replay that finds a claim
300
+ with no response (the original crashed, timed out, or is still running) is refused with
301
+ `CONFLICT` / `details.reason: "IDEMPOTENCY_OUTCOME_UNKNOWN"` and `details.requestId`, and
302
+ is not run again. The claim is released when the outcome is known (the handler threw or
303
+ never started) and otherwise kept until it expires or is resolved. A different request
304
+ under the same key is `IDEMPOTENCY_KEY_REUSED`. In development, a key sent to a capability
305
+ without idempotency support is refused (`INVALID_REQUEST` /
306
+ `IDEMPOTENCY_KEY_UNSUPPORTED`); production runs it and logs a warning. Each application
307
+ action attempt sends a stable key (`feltkit-agent:<task>:<action>:<attempt>`) to a
308
+ capability that supports it. AppPort Services' gateway records its effect evidence under
309
+ the action's request id. This is at-most-once per key, not exactly-once.
310
+
311
+ **Outcome unknown.** An action is `interrupted` when its outcome cannot be established:
312
+ it timed out (30 s by default) or was cancelled while running (FeltKit functions do not
313
+ observe the abort, so the call may still complete), or the process stopped after it
314
+ started. Interrupted actions are never replayed automatically. They keep the task
315
+ blocked until they are settled, from evidence or by a person (`resolve`, Studio "It
316
+ succeeded" / "It did not take effect"), who must be permitted to perform the action.
317
+
318
+ **Retry.** Only a `failed` action can be retried, by the owner or a person. A retry is a
319
+ new attempt with a new key and needs approval again. Nothing is retried automatically.
320
+
321
+ **Restart recovery.** When the runtime opens, it examines every open task once (FeltDB's
322
+ `listTasks`, paged)
323
+ (`agent.reconcile()`, also callable):
324
+ - `approved` with no execution started → back to `proposed`; the approval must be repeated.
325
+ - `executing` or `interrupted` → settled only from evidence of this exact request:
326
+ AppPort's idempotency record, the function's activity entry, or AppPort Services'
327
+ effect evidence (every effect completed). Without evidence: `interrupted`.
328
+
329
+ Recovery never runs an action. An AppPort claim without a response is not evidence
330
+ either way. **Not guaranteed:** an effect that committed but whose idempotency record,
331
+ activity entry, or service evidence was not written before a crash is reported as
332
+ interrupted, not as succeeded (a replay of its key is refused as outcome unknown). A
333
+ FeltKit mutation whose FeltDB commit fails reports an error, so AppPort releases its claim;
334
+ with a FeltDB server, a commit that failed in transit may still have applied. Cancelling a task cancels its queued
335
+ actions and aborts its running ones; while any action is interrupted, the cancellation is
336
+ refused until that action is settled. A cancelled task's FeltDB execution ends `Cancelled` with
337
+ the reason (`cancelReason`); a completed one `Completed`.
338
+
339
+ Not provided: a planner. Decisions are a playbook's (capabilities chosen by code), a
340
+ model's choice among options code built (below), or an external coding agent's, proposed
341
+ over MCP (`feltkit_agent_*` tools).
342
+
343
+ ## Model decisions
344
+
345
+ A `decide` task asks the environment's model to choose among options the application
346
+ built (`ctx.agent.start({ decision })` from a mutation, or `createTask`). Implemented in
347
+ `runtime/decisions.ts` and `runtime/agent.ts`; verified in
348
+ `packages/sdk/test/decisions.test.ts` and `examples/invoices/tests`.
349
+
350
+ | Guarantee | How |
351
+ |---|---|
352
+ | One contract | Every model is a FeltDB `DecisionRuntime` (`@feltdb/core`). Built in: OpenAI chat completions (OpenAI and any compatible server: Ollama, vLLM, llama.cpp) and Anthropic messages. Any other `DecisionRuntime` (e.g. `@feltdb/webllm`) is passed as `feltkit({ agent: { decisions } })`. |
353
+ | One selection | The environment's model is AppPort Services Intelligence's selection (`{ provider, model, endpoint }` + a credential reference). FeltKit adds no registry of its own. `feltkit model show`, Studio → Models, and `GET /_feltkit/api/models` report the source, the runtime's capabilities, whether the credential resolves, and each problem with its fix. |
354
+ | Bounded by authority | Options whose capability the task owner may not perform are removed before the model sees them, and recorded as excluded. "Escalate to a person" is always offered. A choice outside the offered labels is refused (`malformed`), never mapped to the nearest option. |
355
+ | A proposal, not proof | The choice is stored as memory kind `decision` with its runtime, provider, and model, and becomes a proposal in the action lifecycle (Agents, above). It is never evidence that anything happened. A consequential option still waits for a person. |
356
+ | No silent fallback | Any failure (not configured, credential missing or refused, unknown protocol, timeout — 20 s by default, `agent.decisionTimeoutMs` — unavailable, provider error, malformed answer, unsupported decision) blocks the task with the reason and the fix; nothing is proposed, no other model is tried. `decide(taskId)` (Studio "Ask the model again") asks again once fixed. |
357
+ | Credentials | Entered once (Studio → Models' API key field, `feltkit model set --api-key-stdin`, `feltkit credential set`), kept by FeltKit's credential custody, resolved only for the request; never in the selection, responses, checkpoints, activity, or logs. |
358
+
359
+ Not provided: multi-turn agents, tool calling by the model, streaming, or probability
360
+ distributions from the built-in runtimes (`capabilities()` reports what each supports).
361
+
362
+ ## Credential custody
363
+
364
+ AppPort Services (0.8.0) owns the collection contract for a credential value
365
+ (`credential.store`: authorized through its gateway as the caller, permission
366
+ `credential.store`; audited and versioned without the value; effect evidence records the
367
+ reference and version only; `credential.status` reports state without the value). It
368
+ contains no secret store: FeltKit is the host that keeps the material
369
+ (`runtime/credentials.ts`, a `SecretCustody`). Verified in
370
+ `packages/sdk/test/credentials.test.ts` and `credential-custody.test.ts`.
371
+
372
+ | Guarantee | How |
373
+ |---|---|
374
+ | One place to type a key | Studio → Models (Provider, Model, **API key**; the reference defaults to `credential-ref:<provider>` under "Advanced"), Studio → Integrations → **Set key**, Studio → Services → Credentials (set, replace, remove), `feltkit credential set <ref\|provider>` and `feltkit model set … --api-key-stdin` (hidden prompt or stdin; a value on the command line is refused). After saving, Studio shows "set (local encrypted vault, version N)", never the value. |
375
+ | Where it lives | `FELTKIT_CREDENTIAL_<ID>` wins when set (that reference is then read-only: `CUSTODY_READ_ONLY` names the variable). Otherwise, in development and test, `.feltkit/<env>/credentials.vault`: the whole document AES-256-GCM-encrypted (reference names too), bound to the application and environment, with one random 32-byte key in `.feltkit/<env>/credentials.key`; both 0600, written atomically (temporary file, fsync, rename) under a lock file shared by the server and the CLI. `.feltkit/` is gitignored and never part of `feltkit build`/`deploy` output. The test environment's vault sits beside its temporary state. |
376
+ | Production | Environment variables only: storing refuses with `CUSTODY_READ_ONLY` and says what to set. An operator may opt in to a vault with `FELTKIT_CREDENTIAL_VAULT=1` and `FELTKIT_CREDENTIAL_VAULT_KEY` (32 bytes, base64, from the host's secret manager; never written to disk; vault directory `FELTKIT_CREDENTIAL_VAULT_DIR`, else `.feltkit/production`). Then operators holding `feltkit.operations.write` and `credential.store` may store from Studio. |
377
+ | Never echoed | The value is not in FeltDB (any collection), activity, AppPort Services evidence or audit, the configuration export, server output, admin API responses, errors, or the dashboard bundle (scanned after storing through Studio and the CLI). Errors from the write path are scrubbed of the value before they are recorded or returned. A key pasted into a reference field is moved to the key field by Studio and refused by the server without being echoed. |
378
+ | Authorized | Studio stores as the chosen dev identity (`credential.store`, then `intelligence.write` for the selection); a viewer or agent role is refused. The CLI on the host stores as FeltKit's host custody principal (a system principal holding only `credential.store`/`credential.status`). Removing a stored value needs the same permission (AppPort Services 0.8.0 has no capability for it; FeltKit authorizes it with the application's policy and records it as activity). |
379
+ | Versions | Each store is a new version; earlier values are not kept (version numbers and times are). Remove erases the value and the reference reports `revoked`. |
380
+
381
+ ## Integrations
382
+
383
+ `app.integration(name, { baseUrl, credential, operations })` connects an existing HTTP
384
+ API. Implemented in `runtime/integrations.ts`; verified in
385
+ `packages/sdk/test/integrations.test.ts` and `examples/invoices/tests`.
386
+
387
+ | Guarantee | How |
388
+ |---|---|
389
+ | One protocol | Each operation is the AppPort capability `<name>.<operation>`: schemas, effect class, the permission that may invoke it (required, never public), idempotency, and an `appport.integration/1` descriptor (effects, verification, failure modes with `retry` and `effect`). AppPort validates and authorizes around the call. Discovery over AppPort or MCP shows the contract, never a credential; it grants nothing. |
390
+ | Recorded before sent | A call record (`_feltkit_integration_calls`, keyed by request id) is written `started` before the request leaves, then `succeeded` / `failed` / `unknown` with the HTTP status, redacted input, output, and how the outcome was determined (`response`, `verification`, `person`). Activity kind `integration`. |
391
+ | Honest classification | Unreachable before sending, or a 4xx other than 408 → `failed`. A consequential request with no answer (10 s default `timeoutMs`), a dropped connection, a 408, a 5xx, or a 2xx without a JSON body → `unknown` (`OUTCOME_UNKNOWN`). An agent action whose call is unknown is `interrupted`. |
392
+ | No automatic repeat | An unknown call is never re-sent. An idempotent operation sends the caller's idempotency key in its declared header. A replay of that key is never sent again while the earlier call is `started` or `unknown`, or was settled only by verification: AppPort answers it from its claim after a crash, and FeltKit from the call record otherwise (AppPort releases its claim when the handler reports `OUTCOME_UNKNOWN`), both as `CONFLICT` / `IDEMPOTENCY_OUTCOME_UNKNOWN`. Verification that finds no effect releases a claim a crash left. |
393
+ | Settled from the API's records | `verify` runs the declared probe (an observation of the same API) as the caller, through AppPort; `@appport/integration` evaluates it. Verified → `succeeded`; NOT_FOUND → `failed`; anything else stays `unknown`. The agent's restart recovery and `resolve` consult this evidence first. |
394
+ | Credentials | A reference (`credential-ref:<id>`), resolved only for the request; never recorded, returned, or logged (an error mentioning it is redacted). |
395
+ | Configuration | `baseUrl` is a literal, an environment variable, or a development default. Production never uses the development default; readiness fails a missing, non-HTTPS, or loopback production URL. |
396
+
397
+ **`onOutcome`.** When a call's outcome becomes known (from the response or verification),
398
+ the declared mutation runs as the original caller with the call record. It is a
399
+ notification, not part of the call: it can run more than once for the same call (e.g. a
400
+ verify after a restart), so make it idempotent (the example sets the invoice's status from
401
+ the call's state). A failing hook is logged; the call record stays authoritative.
402
+
403
+ Not provided: non-HTTP transports, OAuth flows, pagination, webhooks into integrations, or
404
+ a marketplace of connectors.
405
+
406
+ ## Production operations
407
+
408
+ Studio in production (`FELTKIT_DASHBOARD=1`) answers verified operators only
409
+ (docs/SECURITY.md, "Production operators"). Verified over HTTP and in a browser in
410
+ `packages/sdk/test/production-ops.test.ts`.
411
+
412
+ | Route (`/_feltkit/api`) | Needs | Notes |
413
+ |---|---|---|
414
+ | `GET /operator/session`, `POST /operator/signin`, `POST /operator/signout` | — / a grant / an operator | Sign-in is single-use per grant |
415
+ | `GET /overview`, `/capabilities`, `/services`, `/services/jobs`, `/services/deliveries`, `/agent`, `/agent/tasks/:id`, `/activity`, `/activity/:id`, `/events` | `feltkit.operations.read` | Credential references are shown with whether they resolve, never values |
416
+ | `POST /services/jobs`, `POST /services/webhooks` | `feltkit.operations.write` + `jobs.create` / `webhooks.register` | Queue a job of a declared type, or register a webhook endpoint, through AppPort Services' own invoke as the signed-in operator; the job runs as them. Recorded as activity. Webhook destinations on private networks need `FELTKIT_WEBHOOK_PRIVATE_NETWORKS=1` outside development |
417
+ | `POST /services/jobs/:id/retry` | `feltkit.operations.write` + `jobs.retry` | Failed jobs with a registered handler only; authorized and recorded as the operator; the job keeps its owner and runs as them, re-authorized. Concurrent retries: one wins, the other gets 409 |
418
+ | `POST /agent/tasks/:id/approve`, `/reject`, `/retry`, `/resolve` | `feltkit.operations.write` + the lifecycle's own checks | The action lifecycle (Agents, above) applies unchanged; additionally, in production the person who proposed an action cannot approve it |
419
+ | `GET /readiness`, `/models`, `/integrations` | `feltkit.operations.read` | Readiness checks, the model status (no credential value), integration contracts, configuration, and calls |
420
+ | `POST /models/test`, `/agent/tasks/:id/decide` | `feltkit.operations.write` (+ the agent's own checks for `decide`) | A test decision; asking the model again for a blocked review |
421
+ | `POST /integrations/:name/check`, `/integrations/calls/:id/verify` | `feltkit.operations.write` | The health path; verification runs the probe as the operator, who must hold its permission |
422
+
423
+ Intentionally **not available in production**:
424
+ - **Webhook replay.** AppPort Services makes the person replaying a delivery its new
425
+ owner and replays deliveries that already succeeded, so the original owner's authority
426
+ would not be preserved (docs/UPSTREAM-GAPS.md).
427
+ - **Selecting a model** (`POST /models`). Production's model is selected on the host
428
+ (`feltkit model set --env production`).
429
+ - Data browsing and editing, function runs, capability invocation, session management,
430
+ creating, completing, or cancelling agent tasks, "run due work now", and the AppPort
431
+ Services console (its pages need their own origin; upstream gap S7).
432
+
433
+ Settling an action whose outcome is unknown (`resolve`) always needs a note. Evidence
434
+ of that exact request (AppPort's idempotency record, the function's activity entry, the
435
+ services' effect evidence) is consulted first: if it exists, it decides the outcome and
436
+ a contradicting claim is refused (409). Without evidence, the outcome is recorded as the
437
+ person's decision (`determinedBy: "person"`, with their name and note), never as
438
+ execution evidence.
439
+
440
+ **Environment.** A production server opens only the production instance. Writes must
441
+ name the environment (`x-feltkit-environment`); a mismatch changes nothing. Ambiguous
442
+ configuration fails at startup: both `FELTDB_URL` and `FELTKIT_STATE_DIR`, or an
443
+ explicit environment that differs from `FELTKIT_ENV`. Operator sessions live in the
444
+ environment's own instance and operator keys are per environment, so neither carries
445
+ across environments. Nothing is copied from development.
446
+
447
+ ## Activity log
448
+
449
+ - Recorded after the operation; a crash between commit and recording can lose an entry
450
+ (FeltDB's commit is still durable). Recording failures are surfaced in `inspect` and
451
+ the dashboard, never thrown at callers.
452
+ - Keeps the most recent 2000 entries. Records argument names, never values.
453
+ - In production, successful queries are not recorded by default (`activity.record`).
454
+
455
+ ## Deployment
456
+
457
+ - `feltkit deploy` produces an artifact and verifies it boots; FeltKit does not host.
@@ -0,0 +1,117 @@
1
+ # From a local app to production
2
+
3
+ The path, what FeltKit does at each step, and what remains yours. `npx feltkit readiness`
4
+ (and Studio → Readiness) checks every step that can be checked; nothing here is reported as
5
+ done because a build passed.
6
+
7
+ ## 1. Create
8
+
9
+ ```bash
10
+ npm create feltkit@latest my-app && cd my-app && npm install && npm run dev
11
+ ```
12
+
13
+ ## 2. Configure a model
14
+
15
+ Decisions use the environment's model, selected in AppPort Services Intelligence (enable it
16
+ with `services: { intelligence: true }`):
17
+
18
+ ```bash
19
+ npx feltkit model set --provider ollama --model llama3.2 --endpoint http://localhost:11434/v1
20
+ npx feltkit model set --provider openai --model gpt-4o-mini --credential credential-ref:openai
21
+ npx feltkit model show
22
+ ```
23
+
24
+ Providers: `openai`, `anthropic`, `opencode`, `ollama`, `custom` (any OpenAI-compatible
25
+ endpoint). A credential is a reference; its value goes in `FELTKIT_CREDENTIAL_<ID>` in that
26
+ environment's process. Studio → Models shows what the runtime can decide (FeltDB
27
+ `DecisionRuntime` capabilities) and **Test** calls it. Or pass any `DecisionRuntime` as
28
+ `feltkit({ agent: { decisions } })`.
29
+
30
+ ## 3. Connect a tool
31
+
32
+ ```ts
33
+ export const payments = app.integration("payments", {
34
+ baseUrl: { env: "PAYMENTS_URL", development: "http://127.0.0.1:4010" },
35
+ credential: "credential-ref:payments",
36
+ operations: {
37
+ create: { method: "POST", path: "/payments", input: { … }, output: …, effect: "consequential",
38
+ access: "payments.write", idempotencyHeader: "Idempotency-Key",
39
+ verify: { operation: "lookup", input: { invoiceId: { $input: "/invoiceId" } }, expect: [ … ] } },
40
+ lookup: { method: "GET", path: "/payments/by-invoice/{invoiceId}", output: …, effect: "observation", access: "payments.read" },
41
+ },
42
+ });
43
+ ```
44
+
45
+ Studio → Integrations shows the published contract, configuration, **Check** (the health
46
+ path), and every call. Readiness warns about consequential operations that declare neither
47
+ idempotency nor verification.
48
+
49
+ ## 4. Build a workflow
50
+
51
+ Durable steps are application state, `ctx.services.jobs`, and agent tasks. From a mutation,
52
+ `ctx.agent.start({ objective, decision: { question, options, context } })` opens a review
53
+ task after commit; the model's choice becomes a proposal that waits for approval. See
54
+ `examples/invoices`.
55
+
56
+ ## 5. Test
57
+
58
+ ```bash
59
+ npx feltkit test # each test app gets its own FeltDB instance
60
+ ```
61
+
62
+ Use deterministic fixtures for models and APIs (`examples/invoices/fixtures`). No test
63
+ needs a paid account.
64
+
65
+ ## 6. Review readiness
66
+
67
+ ```bash
68
+ npx feltkit readiness --env production # on the production host, server stopped; exit 1 on failures
69
+ ```
70
+
71
+ It checks storage, every credential reference, end-user sign-in, wildcard roles, Studio
72
+ operators, the model selection, each integration's configuration (production never uses a
73
+ development default, HTTPS, no loopback), uncertain-outcome handling, open unknown
74
+ outcomes, background work, and the build. Failures say how to fix them.
75
+
76
+ ## 7. Deploy (supported path)
77
+
78
+ ```bash
79
+ npx feltkit deploy --out ./artifact # builds, boots the build against a temporary state, verifies health
80
+ cd artifact && npm ci --omit=dev
81
+ ```
82
+
83
+ Run it with the production environment:
84
+
85
+ | Variable | Purpose |
86
+ |---|---|
87
+ | `PORT` | listen port |
88
+ | `FELTDB_URL` + `FELTDB_TOKEN` | a FeltDB server, **or** `FELTKIT_STATE_DIR` for local state (setting both fails) |
89
+ | `FELTDB_APPLICATION_ID` (+ `FELTDB_ENVIRONMENT`) | Managed FeltDB: the application and environment, under the contract `feltkit contract` writes and `feltdb publish --contract` promotes. See the managed starter ([`examples/managed`](../examples/managed/README.md)) |
90
+ | `FELTKIT_API_KEY_VERIFIER_KEY` | required when API keys are enabled |
91
+ | `FELTKIT_CREDENTIAL_<ID>` | every credential reference (readiness lists them) |
92
+ | integration base URLs (e.g. `PAYMENTS_URL`) | production endpoints (HTTPS) |
93
+ | `FELTKIT_DASHBOARD=1` + `FELTKIT_OPERATOR_KEY` | production Studio for operators (`feltkit operator grant`) |
94
+
95
+ Select the production model on the host: `npx feltkit model set --env production …`.
96
+
97
+ ## 8. Operate
98
+
99
+ Production Studio (operators only): inspect jobs, deliveries, agent tasks, integrations,
100
+ readiness; approve, reject, retry, settle; verify unknown integration calls; ask a model
101
+ again. Development tools are not served in production (docs/GUARANTEES.md).
102
+
103
+ ## What FeltKit does not provide
104
+
105
+ These are listed by readiness as "outside FeltKit" and are yours:
106
+
107
+ - **TLS and a reverse proxy.** FeltKit serves HTTP. Production Studio's cookie is `Secure`,
108
+ so it needs HTTPS. Set `Host` / `X-Forwarded-Host` to the public host.
109
+ - **Rate limiting.** In the proxy or platform.
110
+ - **Backups and restore.** Of the state directory or the FeltDB server. Test restores.
111
+ - **Monitoring and alerting.** FeltKit offers `/_feltkit/health`, stdout logs, and the
112
+ activity log; no metrics endpoint or alerts.
113
+ - **Secret provisioning.** From a secret manager into the process environment.
114
+ - **Network access to `/_feltkit/`.** Allow-list or proxy rules, in addition to operator
115
+ sign-in.
116
+ - **Hosting, scaling, and high availability.** One process per environment; the local
117
+ runtime is single-host.
package/docs/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # FeltKit 0.3.13 documentation
2
+
3
+ Shipped with `@feltdb/feltkit`. In a project: `node_modules/@feltdb/feltkit/docs/`, or run `npx feltkit docs`.
4
+ Public copy: https://cdn.jsdelivr.net/npm/@feltdb/feltkit@0.3.13/docs/README.md
5
+
6
+ - [ARCHITECTURE.md](ARCHITECTURE.md): How FeltKit is put together: one FeltDB instance, AppPort, AppPort Services
7
+ - [GUARANTEES.md](GUARANTEES.md): What FeltKit guarantees, and its known limitations
8
+ - [TRANSACTIONS.md](TRANSACTIONS.md): Mutations, ctx.db.sequence and ctx.afterCommit: the transaction contract
9
+ - [SECURITY.md](SECURITY.md): Authorization, sessions, credentials, and production Studio
10
+ - [AGENT-OPERATIONS.md](AGENT-OPERATIONS.md): Agents: MCP, tasks, proposals, approvals, and evidence
11
+ - [PATH-TO-PRODUCTION.md](PATH-TO-PRODUCTION.md): From a local app to production: deploy targets and what you must provide
12
+ - [BACKUP.md](BACKUP.md): Backing up and restoring an environment's state
13
+ - [APPBOUNDRY.md](APPBOUNDRY.md): The AppBoundry artifact target
14
+ - [WHY-FELTKIT.md](WHY-FELTKIT.md): Design choices, compared with Convex
15
+ - [UPSTREAM-GAPS.md](UPSTREAM-GAPS.md): Known gaps in FeltDB, AppPort and AppPort Services, and their status