@feltdb/feltkit 0.2.0 → 0.3.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.
Files changed (38) hide show
  1. package/dist/cli/deploy.js +9 -0
  2. package/dist/cli/deploy.js.map +1 -1
  3. package/dist/cli/main.js +128 -7
  4. package/dist/cli/main.js.map +1 -1
  5. package/dist/dashboard/assets/index-D9529PVz.js +15 -0
  6. package/dist/dashboard/index.html +1 -1
  7. package/dist/errors.d.ts +3 -1
  8. package/dist/errors.js +1 -0
  9. package/dist/errors.js.map +1 -1
  10. package/dist/runtime/authority.d.ts +1 -0
  11. package/dist/runtime/authority.js +3 -0
  12. package/dist/runtime/authority.js.map +1 -1
  13. package/dist/runtime/credentials.d.ts +159 -27
  14. package/dist/runtime/credentials.js +389 -14
  15. package/dist/runtime/credentials.js.map +1 -1
  16. package/dist/runtime/decisions.d.ts +20 -5
  17. package/dist/runtime/decisions.js +91 -22
  18. package/dist/runtime/decisions.js.map +1 -1
  19. package/dist/runtime/integrations.d.ts +5 -0
  20. package/dist/runtime/integrations.js +20 -3
  21. package/dist/runtime/integrations.js.map +1 -1
  22. package/dist/runtime/readiness.js +3 -3
  23. package/dist/runtime/readiness.js.map +1 -1
  24. package/dist/runtime/runtime.d.ts +3 -0
  25. package/dist/runtime/runtime.js +27 -0
  26. package/dist/runtime/runtime.js.map +1 -1
  27. package/dist/runtime/services.d.ts +23 -4
  28. package/dist/runtime/services.js +60 -1
  29. package/dist/runtime/services.js.map +1 -1
  30. package/dist/server/admin.d.ts +56 -2
  31. package/dist/server/admin.js +176 -9
  32. package/dist/server/admin.js.map +1 -1
  33. package/package.json +3 -3
  34. package/skills/.claude-plugin/marketplace.json +1 -1
  35. package/skills/.claude-plugin/plugin.json +1 -1
  36. package/skills/feltkit-build/SKILL.md +14 -4
  37. package/skills/feltkit-services/SKILL.md +29 -7
  38. package/dist/dashboard/assets/index-Bm4qCYpv.js +0 -15
@@ -30,7 +30,7 @@ export const app = feltkit({
30
30
  ```
31
31
 
32
32
  The permission for each operation is its AppPort Services capability name (`jobs.create`, `webhooks.register`,
33
- `apikeys.create`, `configuration.write`, `credential.attach`, …). Grant them to roles like any permission.
33
+ `apikeys.create`, `configuration.write`, `credential.attach`, `credential.store`, `intelligence.write`, …). Grant them to roles like any permission.
34
34
 
35
35
  ## Use a service from a function
36
36
 
@@ -56,11 +56,29 @@ Configuration happens in AppPort Services' own pages, opened from FeltKit Studio
56
56
  declared dev identity (development only). Those pages are the package's; FeltKit only signs you in. Do not write a
57
57
  second configuration form or store settings elsewhere.
58
58
 
59
- **Secrets.** Services store only references: `credential-ref:<id>`. FeltKit resolves a reference from the
60
- environment variable `FELTKIT_CREDENTIAL_<ID>` (non-alphanumerics → `_`, upper-cased), inside the one effect that
61
- needs it. Example: a webhook endpoint with `credential-ref:stripe-signing` signs with `FELTKIT_CREDENTIAL_STRIPE_SIGNING`.
62
- Never put a secret value in code, configuration variables, a commit, a log, or a reply. Ask the user to set the
63
- variable themselves. Studio's Services screen shows each reference as set or missing — never its value.
59
+ **Secrets and API keys for providers.** Services and configuration store only references: `credential-ref:<id>`.
60
+ The value is kept by FeltKit's credential custody, never in FeltDB, configuration, code, or a commit:
61
+
62
+ - `FELTKIT_CREDENTIAL_<ID>` (non-alphanumerics → `_`, upper-cased) wins when it is set; that reference is then
63
+ read-only in Studio. Example: `credential-ref:stripe-signing` → `FELTKIT_CREDENTIAL_STRIPE_SIGNING`.
64
+ - Otherwise, in development and test, the local encrypted vault `.feltkit/<env>/credentials.vault` (AES-256-GCM,
65
+ key in `.feltkit/<env>/credentials.key`, both 0600, gitignored, never in a build or deploy).
66
+ - Production uses environment variables only; storing a value there fails with `CUSTODY_READ_ONLY` unless the
67
+ operator opted in with `FELTKIT_CREDENTIAL_VAULT=1` and `FELTKIT_CREDENTIAL_VAULT_KEY` (32 bytes from their
68
+ secret manager).
69
+
70
+ Where a person enters a key (it goes through AppPort Services' `credential.store`, authorized as them, audited
71
+ without the value, and is never shown again): **Studio → Models** (API key field next to provider and model),
72
+ **Studio → Integrations → Set key**, **Studio → Services → Credentials** (set, replace, remove), or on the host
73
+ `npx feltkit credential set <provider|credential-ref:id>` (hidden prompt, or piped on stdin) and
74
+ `npx feltkit model set --provider … --model … --api-key-stdin`. `npx feltkit credential status` lists every
75
+ reference, what uses it, whether it is set, where, and its version.
76
+
77
+ As an agent: **never ask the user to paste a key into the chat, and never put one in a command line, a file, a
78
+ configuration variable, or a reply.** Tell them where to enter it (the Models screen, or `feltkit credential set`
79
+ in their own terminal). If a key appears in the conversation anyway, do not repeat it; tell the user to rotate it.
80
+ A value in a reference field is refused by Studio and the server. Storing needs the `credential.store` permission
81
+ (the starter's `admin` role grants `credential.*`).
64
82
 
65
83
  **API keys** are shown once when created (or rotated). FeltKit accepts them on `/appport` and `/mcp` as an identity
66
84
  holding `services.apiKeys.roles`. In production `FELTKIT_API_KEY_VERIFIER_KEY` (≥ 32 bytes) must be set; changing it
@@ -84,6 +102,9 @@ Service states in Studio and `npx feltkit inspect --json`: `available` (not enab
84
102
  | Delivery `failed` | Services → Webhook deliveries (`lastStatusCode`, `lastError`), Credentials | Signing credential not set; receiver returned 4xx (not retried); destination did not resolve |
85
103
  | Endpoint rejected on registration | the error | Private/loopback URLs are refused outside development |
86
104
  | Variable set in the page is missing in code | the environment | The page edits the running environment's scope; check `ctx.environment.name` |
105
+ | Models: "No API key is stored for credential-ref:…" | Studio → Models, `feltkit credential status` | Enter the key in the Models API key field (or `feltkit credential set <provider>`); production: set the variable on the host |
106
+ | `CUSTODY_READ_ONLY` | the message names the variable | The value comes from the host (`FELTKIT_CREDENTIAL_<ID>` is set, or production without the vault opt-in): change it there |
107
+ | `FORBIDDEN … credential.store` / `intelligence.write` | the dev identity's roles | Save as a dev user whose role grants `credential.*` and `intelligence.*` (the starter's Ada) |
87
108
 
88
109
  Durable work (jobs, schedules, deliveries) re-authorizes every attempt **as the principal that created it**. If
89
110
  that principal signs out everywhere or its key is revoked, its pending work is refused — by design.
@@ -98,5 +119,6 @@ affect other systems. Confirm with the user before doing any of them.
98
119
 
99
120
  ## Compatibility
100
121
 
101
- `@feltdb/feltkit` 0.1.x with `@appport/services` 0.7.0 (shared instance). The console is development-only.
122
+ `@feltdb/feltkit` 0.3.x with `@appport/services` 0.8.0 (shared instance; `credential.store` / `credential.status`).
123
+ The console is development-only.
102
124
  Verified in Claude Code only.