@foldrun/core 13.0.0 → 13.1.0

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.
@@ -7,9 +7,6 @@ export interface SupplyProvider {
7
7
  format: WireFormat;
8
8
  /** The one host the key is granted to. */
9
9
  host: string;
10
- /** Where the platform's key lives, in the worker's and the proxy's
11
- * environment. Never in the vault, never in a lease. */
12
- env: string;
13
10
  /** The header the key may be filled in, and its exact shape: the whole
14
11
  * value of x-api-key, or "Bearer <key>" in authorization. Anywhere else —
15
12
  * the URL, the body, another header — is refused. */
@@ -9,8 +9,9 @@
9
9
  // that grant only in the provider's auth header, on the provider's model
10
10
  // routes, and meters every call — the bill comes from the gateway.
11
11
  //
12
- // A provider here is offered only where the platform holds its key
13
- // (`env`), the operator lists it, and the price list names the model.
12
+ // A provider here is offered only where the platform holds its key (set by
13
+ // an operator in the console, sealed in the platform's store — never in the
14
+ // environment), the operator lists it, and the price list names the model.
14
15
  import { providerPreset } from "./providers.js";
15
16
  export const SUPPLY_PROVIDERS = {
16
17
  anthropic: {
@@ -18,7 +19,6 @@ export const SUPPLY_PROVIDERS = {
18
19
  preset: "anthropic",
19
20
  format: "anthropic",
20
21
  host: "api.anthropic.com",
21
- env: "FOLDRUN_SUPPLY_ANTHROPIC_API_KEY",
22
22
  auth: "x-api-key",
23
23
  metered: ["/v1/messages"],
24
24
  free: [
@@ -31,7 +31,6 @@ export const SUPPLY_PROVIDERS = {
31
31
  preset: "openrouter",
32
32
  format: "anthropic",
33
33
  host: "openrouter.ai",
34
- env: "FOLDRUN_SUPPLY_OPENROUTER_API_KEY",
35
34
  auth: "bearer",
36
35
  metered: ["/api/v1/messages"],
37
36
  free: [{ method: "GET", path: "/api/v1/models" }],
@@ -41,7 +40,6 @@ export const SUPPLY_PROVIDERS = {
41
40
  preset: "openai",
42
41
  format: "openai",
43
42
  host: "api.openai.com",
44
- env: "FOLDRUN_SUPPLY_OPENAI_API_KEY",
45
43
  auth: "bearer",
46
44
  metered: ["/v1/chat/completions"],
47
45
  free: [{ method: "GET", path: "/v1/models" }],
@@ -51,7 +49,6 @@ export const SUPPLY_PROVIDERS = {
51
49
  preset: "gemini",
52
50
  format: "openai",
53
51
  host: "generativelanguage.googleapis.com",
54
- env: "FOLDRUN_SUPPLY_GEMINI_API_KEY",
55
52
  auth: "bearer",
56
53
  metered: ["/v1beta/openai/chat/completions"],
57
54
  free: [{ method: "GET", path: "/v1beta/openai/models" }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldrun/core",
3
- "version": "13.0.0",
3
+ "version": "13.1.0",
4
4
  "description": "Agents are just folders. The format, the runner, the checks.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",
@@ -9,8 +9,9 @@
9
9
  // that grant only in the provider's auth header, on the provider's model
10
10
  // routes, and meters every call — the bill comes from the gateway.
11
11
  //
12
- // A provider here is offered only where the platform holds its key
13
- // (`env`), the operator lists it, and the price list names the model.
12
+ // A provider here is offered only where the platform holds its key (set by
13
+ // an operator in the console, sealed in the platform's store — never in the
14
+ // environment), the operator lists it, and the price list names the model.
14
15
 
15
16
  import { providerPreset, type WireFormat } from "./providers.ts";
16
17
 
@@ -23,9 +24,6 @@ export interface SupplyProvider {
23
24
  format: WireFormat;
24
25
  /** The one host the key is granted to. */
25
26
  host: string;
26
- /** Where the platform's key lives, in the worker's and the proxy's
27
- * environment. Never in the vault, never in a lease. */
28
- env: string;
29
27
  /** The header the key may be filled in, and its exact shape: the whole
30
28
  * value of x-api-key, or "Bearer <key>" in authorization. Anywhere else —
31
29
  * the URL, the body, another header — is refused. */
@@ -43,7 +41,6 @@ export const SUPPLY_PROVIDERS: Record<SupplyProviderName, SupplyProvider> = {
43
41
  preset: "anthropic",
44
42
  format: "anthropic",
45
43
  host: "api.anthropic.com",
46
- env: "FOLDRUN_SUPPLY_ANTHROPIC_API_KEY",
47
44
  auth: "x-api-key",
48
45
  metered: ["/v1/messages"],
49
46
  free: [
@@ -56,7 +53,6 @@ export const SUPPLY_PROVIDERS: Record<SupplyProviderName, SupplyProvider> = {
56
53
  preset: "openrouter",
57
54
  format: "anthropic",
58
55
  host: "openrouter.ai",
59
- env: "FOLDRUN_SUPPLY_OPENROUTER_API_KEY",
60
56
  auth: "bearer",
61
57
  metered: ["/api/v1/messages"],
62
58
  free: [{ method: "GET", path: "/api/v1/models" }],
@@ -66,7 +62,6 @@ export const SUPPLY_PROVIDERS: Record<SupplyProviderName, SupplyProvider> = {
66
62
  preset: "openai",
67
63
  format: "openai",
68
64
  host: "api.openai.com",
69
- env: "FOLDRUN_SUPPLY_OPENAI_API_KEY",
70
65
  auth: "bearer",
71
66
  metered: ["/v1/chat/completions"],
72
67
  free: [{ method: "GET", path: "/v1/models" }],
@@ -76,7 +71,6 @@ export const SUPPLY_PROVIDERS: Record<SupplyProviderName, SupplyProvider> = {
76
71
  preset: "gemini",
77
72
  format: "openai",
78
73
  host: "generativelanguage.googleapis.com",
79
- env: "FOLDRUN_SUPPLY_GEMINI_API_KEY",
80
74
  auth: "bearer",
81
75
  metered: ["/v1beta/openai/chat/completions"],
82
76
  free: [{ method: "GET", path: "/v1beta/openai/models" }],