@fungi.computer/puffball 0.0.0-stage → 0.0.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/LICENSE +21 -0
- package/README.md +443 -2
- package/dist/app-api.d.ts +7 -0
- package/dist/app-api.js +61 -0
- package/dist/app-backend-binding-vocabulary.d.ts +299 -0
- package/dist/app-backend-binding-vocabulary.js +257 -0
- package/dist/app-backend-bindings.d.ts +21 -0
- package/dist/app-backend-bindings.js +47 -0
- package/dist/app-declaration.d.ts +46 -0
- package/dist/app-declaration.js +115 -0
- package/dist/app-event-facts.d.ts +40 -0
- package/dist/app-event-facts.js +28 -0
- package/dist/app-method-context.d.ts +109 -0
- package/dist/app-method-context.js +9 -0
- package/dist/app-method-runtime.d.ts +86 -0
- package/dist/app-method-runtime.js +122 -0
- package/dist/app-origin-paths.d.ts +6 -0
- package/dist/app-origin-paths.js +6 -0
- package/dist/app-vocabulary.d.ts +189 -0
- package/dist/app-vocabulary.js +103 -0
- package/dist/app.d.ts +379 -0
- package/dist/app.js +71 -0
- package/dist/artifact-dispositions.d.ts +115 -0
- package/dist/artifact-dispositions.js +234 -0
- package/dist/assets.d.ts +54 -0
- package/dist/assets.js +89 -0
- package/dist/backend.d.ts +41 -0
- package/dist/backend.js +29 -0
- package/dist/background-replay.d.ts +115 -0
- package/dist/background-replay.js +175 -0
- package/dist/buyer-references.d.ts +69 -0
- package/dist/buyer-references.js +154 -0
- package/dist/cloudflare-assets.d.ts +48 -0
- package/dist/cloudflare-assets.js +105 -0
- package/dist/cloudflare.d.ts +254 -0
- package/dist/cloudflare.js +1619 -0
- package/dist/effect.d.ts +73 -0
- package/dist/effect.js +325 -0
- package/dist/git-representation.d.ts +13 -0
- package/dist/git-representation.js +16 -0
- package/dist/inbox.d.ts +132 -0
- package/dist/inbox.js +81 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +85 -0
- package/dist/internal/app-description.d.ts +14 -0
- package/dist/internal/app-description.js +98 -0
- package/dist/internal/app-release-artifact-reader.d.ts +26 -0
- package/dist/internal/app-release-artifact-reader.js +1 -0
- package/dist/internal/app-release-contract.d.ts +540 -0
- package/dist/internal/app-release-contract.js +169 -0
- package/dist/internal/app-release-schema.d.ts +1676 -0
- package/dist/internal/app-release-schema.js +386 -0
- package/dist/internal/app-release-store.d.ts +47 -0
- package/dist/internal/app-release-store.js +1 -0
- package/dist/internal/background-sync.d.ts +7 -0
- package/dist/internal/background-sync.js +10 -0
- package/dist/internal/deterministic-memory-app-release-store.d.ts +14 -0
- package/dist/internal/deterministic-memory-app-release-store.js +319 -0
- package/dist/internal/failure.d.ts +2 -0
- package/dist/internal/failure.js +9 -0
- package/dist/internal/immutable-release-material.d.ts +3 -0
- package/dist/internal/immutable-release-material.js +13 -0
- package/dist/internal/promise-app-release-store-adapter.d.ts +9 -0
- package/dist/internal/promise-app-release-store-adapter.js +65 -0
- package/dist/internal/promise-artifact-reader-adapter.d.ts +9 -0
- package/dist/internal/promise-artifact-reader-adapter.js +18 -0
- package/dist/internal/public-route-sql.d.ts +10 -0
- package/dist/internal/public-route-sql.js +239 -0
- package/dist/internal/public-website-authority.d.ts +338 -0
- package/dist/internal/public-website-authority.js +50 -0
- package/dist/internal/public-website-delivery.d.ts +59 -0
- package/dist/internal/public-website-delivery.js +232 -0
- package/dist/internal/public-website-fetch.d.ts +8 -0
- package/dist/internal/public-website-fetch.js +54 -0
- package/dist/internal/release-transition-material.d.ts +3 -0
- package/dist/internal/release-transition-material.js +11 -0
- package/dist/internal/verified-artifact-snapshot.d.ts +41 -0
- package/dist/internal/verified-artifact-snapshot.js +91 -0
- package/dist/public-route-moderation.d.ts +83 -0
- package/dist/public-route-moderation.js +236 -0
- package/dist/public-route-policy.d.ts +51 -0
- package/dist/public-route-policy.js +88 -0
- package/dist/public-routes.d.ts +34 -0
- package/dist/public-routes.js +136 -0
- package/dist/publisher.d.ts +61 -0
- package/dist/publisher.js +16 -0
- package/dist/safety-takedown.d.ts +56 -0
- package/dist/safety-takedown.js +146 -0
- package/dist/seller-closure-notice.d.ts +14 -0
- package/dist/seller-closure-notice.js +14 -0
- package/dist/seller-closure.d.ts +15 -0
- package/dist/seller-closure.js +31 -0
- package/dist/testing.d.ts +8 -0
- package/dist/testing.js +47 -0
- package/docs/api/README.md +26 -0
- package/docs/api/app-backend-binding-vocabulary.md +276 -0
- package/docs/api/app-backend-bindings.md +141 -0
- package/docs/api/app-event-facts.md +110 -0
- package/docs/api/app-method-context.md +166 -0
- package/docs/api/app-method-runtime.md +330 -0
- package/docs/api/backend.md +108 -0
- package/docs/api/background-replay.md +516 -0
- package/docs/api/cloudflare.md +1044 -0
- package/docs/api/effect.md +2429 -0
- package/docs/api/git-representation.md +56 -0
- package/docs/api/inbox.md +289 -0
- package/docs/api/index.md +2868 -0
- package/docs/api/publisher.md +147 -0
- package/docs/api/testing.md +31 -0
- package/package.json +158 -3
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/puffball**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/puffball](README.md) / app-method-context
|
|
8
|
+
|
|
9
|
+
# app-method-context
|
|
10
|
+
|
|
11
|
+
## Variables
|
|
12
|
+
|
|
13
|
+
### appMethodCallContextSchema
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const appMethodCallContextSchema: declareConstructor<
|
|
17
|
+
{
|
|
18
|
+
computerId: string | null;
|
|
19
|
+
actor:
|
|
20
|
+
| {
|
|
21
|
+
kind: "member";
|
|
22
|
+
memberId: string;
|
|
23
|
+
}
|
|
24
|
+
| {
|
|
25
|
+
kind: "agent";
|
|
26
|
+
agentId: string;
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
kind: "team-key";
|
|
30
|
+
keyId: string;
|
|
31
|
+
};
|
|
32
|
+
backgroundLane?: string;
|
|
33
|
+
backgroundOrigin?: {
|
|
34
|
+
method: string;
|
|
35
|
+
seal: string;
|
|
36
|
+
};
|
|
37
|
+
role?: "member" | "owner";
|
|
38
|
+
soleMember?: true;
|
|
39
|
+
workflow?: {
|
|
40
|
+
workflowId: string;
|
|
41
|
+
runId: string;
|
|
42
|
+
nodeId: string;
|
|
43
|
+
armedBy:
|
|
44
|
+
| {
|
|
45
|
+
kind: "member";
|
|
46
|
+
memberId: string;
|
|
47
|
+
}
|
|
48
|
+
| {
|
|
49
|
+
kind: "agent";
|
|
50
|
+
agentId: string;
|
|
51
|
+
}
|
|
52
|
+
| {
|
|
53
|
+
kind: "team-key";
|
|
54
|
+
keyId: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
idempotencyKey?: string;
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
computerId: string | null;
|
|
61
|
+
actor:
|
|
62
|
+
| {
|
|
63
|
+
kind: "member";
|
|
64
|
+
memberId: string;
|
|
65
|
+
}
|
|
66
|
+
| {
|
|
67
|
+
kind: "agent";
|
|
68
|
+
agentId: string;
|
|
69
|
+
}
|
|
70
|
+
| {
|
|
71
|
+
kind: "team-key";
|
|
72
|
+
keyId: string;
|
|
73
|
+
};
|
|
74
|
+
backgroundLane?: string;
|
|
75
|
+
backgroundOrigin?: {
|
|
76
|
+
method: string;
|
|
77
|
+
seal: string;
|
|
78
|
+
};
|
|
79
|
+
role?: "member" | "owner";
|
|
80
|
+
soleMember?: true;
|
|
81
|
+
workflow?: {
|
|
82
|
+
workflowId: string;
|
|
83
|
+
runId: string;
|
|
84
|
+
nodeId: string;
|
|
85
|
+
armedBy:
|
|
86
|
+
| {
|
|
87
|
+
kind: "member";
|
|
88
|
+
memberId: string;
|
|
89
|
+
}
|
|
90
|
+
| {
|
|
91
|
+
kind: "agent";
|
|
92
|
+
agentId: string;
|
|
93
|
+
}
|
|
94
|
+
| {
|
|
95
|
+
kind: "team-key";
|
|
96
|
+
keyId: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
idempotencyKey?: string;
|
|
100
|
+
},
|
|
101
|
+
readonly [],
|
|
102
|
+
{
|
|
103
|
+
computerId: string | null;
|
|
104
|
+
actor:
|
|
105
|
+
| {
|
|
106
|
+
kind: "member";
|
|
107
|
+
memberId: string;
|
|
108
|
+
}
|
|
109
|
+
| {
|
|
110
|
+
kind: "agent";
|
|
111
|
+
agentId: string;
|
|
112
|
+
}
|
|
113
|
+
| {
|
|
114
|
+
kind: "team-key";
|
|
115
|
+
keyId: string;
|
|
116
|
+
};
|
|
117
|
+
backgroundLane?: string;
|
|
118
|
+
backgroundOrigin?: {
|
|
119
|
+
method: string;
|
|
120
|
+
seal: string;
|
|
121
|
+
};
|
|
122
|
+
role?: "member" | "owner";
|
|
123
|
+
soleMember?: true;
|
|
124
|
+
workflow?: {
|
|
125
|
+
workflowId: string;
|
|
126
|
+
runId: string;
|
|
127
|
+
nodeId: string;
|
|
128
|
+
armedBy:
|
|
129
|
+
| {
|
|
130
|
+
kind: "member";
|
|
131
|
+
memberId: string;
|
|
132
|
+
}
|
|
133
|
+
| {
|
|
134
|
+
kind: "agent";
|
|
135
|
+
agentId: string;
|
|
136
|
+
}
|
|
137
|
+
| {
|
|
138
|
+
kind: "team-key";
|
|
139
|
+
keyId: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
idempotencyKey?: string;
|
|
143
|
+
}
|
|
144
|
+
>;
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Host attribution, including paired sealed enqueue origin, uses the sole
|
|
148
|
+
lightweight caller grammar.
|
|
149
|
+
|
|
150
|
+
## References
|
|
151
|
+
|
|
152
|
+
### AppMethodCallContext
|
|
153
|
+
|
|
154
|
+
Re-exports [AppMethodCallContext](app-method-runtime.md#appmethodcallcontext)
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
### HostActor
|
|
159
|
+
|
|
160
|
+
Re-exports [HostActor](app-method-runtime.md#hostactor)
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
### WorkflowAttestation
|
|
165
|
+
|
|
166
|
+
Re-exports [WorkflowAttestation](app-method-runtime.md#workflowattestation)
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/puffball**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/puffball](README.md) / app-method-runtime
|
|
8
|
+
|
|
9
|
+
# app-method-runtime
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### HostActor
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type HostActor = z.output<typeof hostActorSchema>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The host's verified member, Agent or Team-key identity.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### WorkflowAttestation
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
type WorkflowAttestation = z.output<typeof workflowAttestationSchema>;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Workflow attribution shared by invocation frames and Git writers.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### AppMethodCallContext
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
type AppMethodCallContext = z.output<typeof appMethodCallerSchema>;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Trusted attribution delivered separately from App method arguments.
|
|
40
|
+
|
|
41
|
+
## Variables
|
|
42
|
+
|
|
43
|
+
### appApiReservedMethodNames
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
const appApiReservedMethodNames: Readonly<{
|
|
47
|
+
intrinsic: readonly [
|
|
48
|
+
"constructor",
|
|
49
|
+
"toString",
|
|
50
|
+
"valueOf",
|
|
51
|
+
"hasOwnProperty",
|
|
52
|
+
"isPrototypeOf",
|
|
53
|
+
"propertyIsEnumerable",
|
|
54
|
+
"toLocaleString",
|
|
55
|
+
];
|
|
56
|
+
rpc: readonly ["then", "dup", "connect", "id", "name"];
|
|
57
|
+
instance: readonly ["ctx", "env"];
|
|
58
|
+
lifecycle: readonly [
|
|
59
|
+
"gill",
|
|
60
|
+
"onGitPush",
|
|
61
|
+
"syncRefused",
|
|
62
|
+
"authorizeGitPush",
|
|
63
|
+
"fetch",
|
|
64
|
+
"alarm",
|
|
65
|
+
"queue",
|
|
66
|
+
"scheduled",
|
|
67
|
+
"tail",
|
|
68
|
+
"trace",
|
|
69
|
+
"email",
|
|
70
|
+
"test",
|
|
71
|
+
"tailStream",
|
|
72
|
+
"webSocketMessage",
|
|
73
|
+
"webSocketClose",
|
|
74
|
+
"webSocketError",
|
|
75
|
+
];
|
|
76
|
+
}>;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Reserved JavaScript, RPC and lifecycle names are never App method names.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### hostActorSchema
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
const hostActorSchema: ZodMiniDiscriminatedUnion<
|
|
87
|
+
[
|
|
88
|
+
ZodMiniObject<
|
|
89
|
+
{
|
|
90
|
+
kind: ZodMiniLiteral<"member">;
|
|
91
|
+
memberId: ZodMiniString<string>;
|
|
92
|
+
},
|
|
93
|
+
$strip
|
|
94
|
+
>,
|
|
95
|
+
ZodMiniObject<
|
|
96
|
+
{
|
|
97
|
+
kind: ZodMiniLiteral<"agent">;
|
|
98
|
+
agentId: ZodMiniString<string>;
|
|
99
|
+
},
|
|
100
|
+
$strip
|
|
101
|
+
>,
|
|
102
|
+
ZodMiniObject<
|
|
103
|
+
{
|
|
104
|
+
kind: ZodMiniLiteral<"team-key">;
|
|
105
|
+
keyId: ZodMiniString<string>;
|
|
106
|
+
},
|
|
107
|
+
$strip
|
|
108
|
+
>,
|
|
109
|
+
],
|
|
110
|
+
"kind"
|
|
111
|
+
>;
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Actor identity attested by the host, shared by calls and Workflow arming.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### workflowAttestationSchema
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
const workflowAttestationSchema: ZodMiniObject<
|
|
122
|
+
{
|
|
123
|
+
workflowId: ZodMiniString<string>;
|
|
124
|
+
runId: ZodMiniString<string>;
|
|
125
|
+
nodeId: ZodMiniString<string>;
|
|
126
|
+
armedBy: ZodMiniDiscriminatedUnion<
|
|
127
|
+
[
|
|
128
|
+
ZodMiniObject<
|
|
129
|
+
{
|
|
130
|
+
kind: ZodMiniLiteral<"member">;
|
|
131
|
+
memberId: ZodMiniString<string>;
|
|
132
|
+
},
|
|
133
|
+
$strip
|
|
134
|
+
>,
|
|
135
|
+
ZodMiniObject<
|
|
136
|
+
{
|
|
137
|
+
kind: ZodMiniLiteral<"agent">;
|
|
138
|
+
agentId: ZodMiniString<string>;
|
|
139
|
+
},
|
|
140
|
+
$strip
|
|
141
|
+
>,
|
|
142
|
+
ZodMiniObject<
|
|
143
|
+
{
|
|
144
|
+
kind: ZodMiniLiteral<"team-key">;
|
|
145
|
+
keyId: ZodMiniString<string>;
|
|
146
|
+
},
|
|
147
|
+
$strip
|
|
148
|
+
>,
|
|
149
|
+
],
|
|
150
|
+
"kind"
|
|
151
|
+
>;
|
|
152
|
+
},
|
|
153
|
+
$strip
|
|
154
|
+
>;
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Host-held Workflow attribution, delivered separately from guest input.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### appMethodCallerSchema
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
const appMethodCallerSchema: ZodMiniObject<
|
|
165
|
+
{
|
|
166
|
+
computerId: ZodMiniNullable<ZodMiniString<string>>;
|
|
167
|
+
actor: ZodMiniDiscriminatedUnion<
|
|
168
|
+
[
|
|
169
|
+
ZodMiniObject<
|
|
170
|
+
{
|
|
171
|
+
kind: ZodMiniLiteral<"member">;
|
|
172
|
+
memberId: ZodMiniString<string>;
|
|
173
|
+
},
|
|
174
|
+
$strip
|
|
175
|
+
>,
|
|
176
|
+
ZodMiniObject<
|
|
177
|
+
{
|
|
178
|
+
kind: ZodMiniLiteral<"agent">;
|
|
179
|
+
agentId: ZodMiniString<string>;
|
|
180
|
+
},
|
|
181
|
+
$strip
|
|
182
|
+
>,
|
|
183
|
+
ZodMiniObject<
|
|
184
|
+
{
|
|
185
|
+
kind: ZodMiniLiteral<"team-key">;
|
|
186
|
+
keyId: ZodMiniString<string>;
|
|
187
|
+
},
|
|
188
|
+
$strip
|
|
189
|
+
>,
|
|
190
|
+
],
|
|
191
|
+
"kind"
|
|
192
|
+
>;
|
|
193
|
+
backgroundLane: ZodMiniOptional<ZodMiniString<string>>;
|
|
194
|
+
backgroundOrigin: ZodMiniOptional<
|
|
195
|
+
ZodMiniObject<
|
|
196
|
+
{
|
|
197
|
+
method: ZodMiniString<string>;
|
|
198
|
+
seal: ZodMiniString<string>;
|
|
199
|
+
},
|
|
200
|
+
$strict
|
|
201
|
+
>
|
|
202
|
+
>;
|
|
203
|
+
role: ZodMiniOptional<
|
|
204
|
+
ZodMiniEnum<{
|
|
205
|
+
member: "member";
|
|
206
|
+
owner: "owner";
|
|
207
|
+
}>
|
|
208
|
+
>;
|
|
209
|
+
soleMember: ZodMiniOptional<ZodMiniLiteral<true>>;
|
|
210
|
+
workflow: ZodMiniOptional<
|
|
211
|
+
ZodMiniObject<
|
|
212
|
+
{
|
|
213
|
+
workflowId: ZodMiniString<string>;
|
|
214
|
+
runId: ZodMiniString<string>;
|
|
215
|
+
nodeId: ZodMiniString<string>;
|
|
216
|
+
armedBy: ZodMiniDiscriminatedUnion<
|
|
217
|
+
[
|
|
218
|
+
ZodMiniObject<
|
|
219
|
+
{
|
|
220
|
+
kind: ZodMiniLiteral<"member">;
|
|
221
|
+
memberId: ZodMiniString<string>;
|
|
222
|
+
},
|
|
223
|
+
$strip
|
|
224
|
+
>,
|
|
225
|
+
ZodMiniObject<
|
|
226
|
+
{
|
|
227
|
+
kind: ZodMiniLiteral<"agent">;
|
|
228
|
+
agentId: ZodMiniString<string>;
|
|
229
|
+
},
|
|
230
|
+
$strip
|
|
231
|
+
>,
|
|
232
|
+
ZodMiniObject<
|
|
233
|
+
{
|
|
234
|
+
kind: ZodMiniLiteral<"team-key">;
|
|
235
|
+
keyId: ZodMiniString<string>;
|
|
236
|
+
},
|
|
237
|
+
$strip
|
|
238
|
+
>,
|
|
239
|
+
],
|
|
240
|
+
"kind"
|
|
241
|
+
>;
|
|
242
|
+
},
|
|
243
|
+
$strip
|
|
244
|
+
>
|
|
245
|
+
>;
|
|
246
|
+
idempotencyKey: ZodMiniOptional<ZodMiniString<string>>;
|
|
247
|
+
},
|
|
248
|
+
$strip
|
|
249
|
+
>;
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Sole grammar for the host-minted Computer pin and actor attribution.
|
|
253
|
+
|
|
254
|
+
## Functions
|
|
255
|
+
|
|
256
|
+
### parseAppMethodCallContext()
|
|
257
|
+
|
|
258
|
+
```ts
|
|
259
|
+
function parseAppMethodCallContext(value, rejectUnknownKeys?): object;
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Decode trusted host attribution through the sole runtime-neutral grammar.
|
|
263
|
+
|
|
264
|
+
#### Parameters
|
|
265
|
+
|
|
266
|
+
| Parameter | Type | Default value |
|
|
267
|
+
| ------------------- | --------- | ------------- |
|
|
268
|
+
| `value` | `unknown` | `undefined` |
|
|
269
|
+
| `rejectUnknownKeys` | `boolean` | `false` |
|
|
270
|
+
|
|
271
|
+
#### Returns
|
|
272
|
+
|
|
273
|
+
| Name | Type | Default value | Description |
|
|
274
|
+
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
275
|
+
| `computerId` | `string` \| `null` | - | - |
|
|
276
|
+
| `actor` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `hostActorSchema` | - |
|
|
277
|
+
| `backgroundLane?` | `string` | - | Host-attested enqueue eligibility for this ordinary write; absent otherwise. |
|
|
278
|
+
| `backgroundOrigin?` | `object` | - | Host-sealed foreground method for durable jobs; paired with backgroundLane. |
|
|
279
|
+
| `backgroundOrigin.method` | `string` | - | - |
|
|
280
|
+
| `backgroundOrigin.seal` | `string` | - | - |
|
|
281
|
+
| `role?` | `"member"` \| `"owner"` | - | Team role attested by the host, never selected by App method input. |
|
|
282
|
+
| `soleMember?` | `true` | - | The host attests that this member is currently the Team's only member. Present only on a member's own call; never on an Agent, Team key or Workflow node, and never selected by App method input. |
|
|
283
|
+
| `workflow?` | `object` | - | Present only on a Workflow node invocation admitted by its host. |
|
|
284
|
+
| `workflow.workflowId` | `string` | `identity` | Published Workflow selected by the run owner. |
|
|
285
|
+
| `workflow.runId` | `string` | `identity` | Run identity held by the run owner. |
|
|
286
|
+
| `workflow.nodeId` | `string` | `identity` | Node selected by the stored published Workflow. |
|
|
287
|
+
| `workflow.armedBy` | \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \} | `hostActorSchema` | Actor that armed the run, re-admitted by the host at dispatch. |
|
|
288
|
+
| `idempotencyKey?` | `string` | - | The host's stable key for this logical call (for example one Workflow node), the same on every retry. A method with side effects uses it to do its work at most once. Absent when the caller supplies its own request id. |
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### isAppApiMethodName()
|
|
293
|
+
|
|
294
|
+
```ts
|
|
295
|
+
function isAppApiMethodName(name): boolean;
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Shared domain grammar for generated RPC method names.
|
|
299
|
+
|
|
300
|
+
#### Parameters
|
|
301
|
+
|
|
302
|
+
| Parameter | Type |
|
|
303
|
+
| --------- | -------- |
|
|
304
|
+
| `name` | `string` |
|
|
305
|
+
|
|
306
|
+
#### Returns
|
|
307
|
+
|
|
308
|
+
`boolean`
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
### backgroundSyncAllowed()
|
|
313
|
+
|
|
314
|
+
```ts
|
|
315
|
+
function backgroundSyncAllowed(api, sync): boolean;
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
A continuation must cover every write method's requirements, and itself be a
|
|
319
|
+
write.
|
|
320
|
+
|
|
321
|
+
#### Parameters
|
|
322
|
+
|
|
323
|
+
| Parameter | Type |
|
|
324
|
+
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
325
|
+
| `api` | \| `Readonly`\<\{ `methods`: `Readonly`\<`Record`\<`string`, `Pick`\<[`AppApi`](index.md#appapi)\[`"methods"`\]\[`string`\], `"effect"` \| `"requires"`\>\>\>; \}\> \| `undefined` |
|
|
326
|
+
| `sync` | \| `Readonly`\<\{ `method`: `string`; \}\> \| `undefined` |
|
|
327
|
+
|
|
328
|
+
#### Returns
|
|
329
|
+
|
|
330
|
+
`boolean`
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/puffball**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/puffball](README.md) / backend
|
|
8
|
+
|
|
9
|
+
# backend
|
|
10
|
+
|
|
11
|
+
## Variables
|
|
12
|
+
|
|
13
|
+
### durableBackendSchema
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
const durableBackendSchema: Struct<{
|
|
17
|
+
runtime: Struct<{
|
|
18
|
+
kind: Literal<"durable-facet">;
|
|
19
|
+
stateSchema: Number;
|
|
20
|
+
}>;
|
|
21
|
+
compatibilityDate: String;
|
|
22
|
+
exportName: String;
|
|
23
|
+
code: String;
|
|
24
|
+
}>;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This immutable descriptor is stored inside the verified Release artifact.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### backendMediaType
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
const backendMediaType: "application/vnd.fungi.app-backend+json";
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Content type separating executable backend artifacts from website HTML.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### backendJsonSchema
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
const backendJsonSchema: fromJsonString<
|
|
45
|
+
Struct<{
|
|
46
|
+
runtime: Struct<{
|
|
47
|
+
kind: Literal<"durable-facet">;
|
|
48
|
+
stateSchema: Number;
|
|
49
|
+
}>;
|
|
50
|
+
compatibilityDate: String;
|
|
51
|
+
exportName: String;
|
|
52
|
+
code: String;
|
|
53
|
+
}>
|
|
54
|
+
>;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Maintained JSON codec for immutable backend bytes.
|
|
58
|
+
|
|
59
|
+
## Functions
|
|
60
|
+
|
|
61
|
+
### resolveDurableBackend()
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
function resolveDurableBackend(
|
|
65
|
+
catalog,
|
|
66
|
+
releaseId,
|
|
67
|
+
): Effect<
|
|
68
|
+
{
|
|
69
|
+
release: Release;
|
|
70
|
+
digest: Sha256Digest;
|
|
71
|
+
backend: Readonly<{
|
|
72
|
+
runtime: Readonly<{
|
|
73
|
+
kind: "durable-facet";
|
|
74
|
+
stateSchema: number;
|
|
75
|
+
}>;
|
|
76
|
+
compatibilityDate: string;
|
|
77
|
+
exportName: string;
|
|
78
|
+
code: string;
|
|
79
|
+
}>;
|
|
80
|
+
},
|
|
81
|
+
AppReleaseCoreFailure,
|
|
82
|
+
never
|
|
83
|
+
>;
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Resolve through catalog eligibility and digest verification before decoding
|
|
87
|
+
code.
|
|
88
|
+
|
|
89
|
+
#### Parameters
|
|
90
|
+
|
|
91
|
+
| Parameter | Type |
|
|
92
|
+
| ----------- | ------------------------------------------------------------------------------ |
|
|
93
|
+
| `catalog` | `Pick`\<[`AppReleaseCore`](effect.md#appreleasecore), `"resolveEligibleApp"`\> |
|
|
94
|
+
| `releaseId` | [`ReleaseId`](index.md#releaseid) |
|
|
95
|
+
|
|
96
|
+
#### Returns
|
|
97
|
+
|
|
98
|
+
`Effect`\<\{ `release`: [`Release`](index.md#release); `digest`:
|
|
99
|
+
[`Sha256Digest`](index.md#sha256digest); `backend`: `Readonly`\<\{ `runtime`:
|
|
100
|
+
`Readonly`\<\{ `kind`: `"durable-facet"`; `stateSchema`: `number`; \}\>;
|
|
101
|
+
`compatibilityDate`: `string`; `exportName`: `string`; `code`: `string`; \}\>;
|
|
102
|
+
\}, [`AppReleaseCoreFailure`](effect.md#appreleasecorefailure), `never`\>
|
|
103
|
+
|
|
104
|
+
## References
|
|
105
|
+
|
|
106
|
+
### DurableBackend
|
|
107
|
+
|
|
108
|
+
Re-exports [DurableBackend](index.md#durablebackend)
|