agentful 0.4.5 → 0.4.6
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 +6 -0
- package/dist/index.cjs +13 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,6 +80,12 @@ Actions have **no staging**: they run from your project's source, so a push can
|
|
|
80
80
|
change what the published app does immediately, while warm instances may serve
|
|
81
81
|
the previous code for up to five minutes.
|
|
82
82
|
|
|
83
|
+
Actions run **only while the managed server is switched on** in the Backend tab
|
|
84
|
+
(`agentful backend` opens it). A push stores your action files either way, but
|
|
85
|
+
until the server is on every call answers `404 server_not_enabled`. The CLI can
|
|
86
|
+
enable the database for you — not the server. Switching on takes effect on the
|
|
87
|
+
next call; switching off takes effect within 60 seconds.
|
|
88
|
+
|
|
83
89
|
The figures above are rendered into `AGENTFUL_CLOUD.md` from the machine-readable
|
|
84
90
|
contract at <https://app.agentful.dev/cli/platform-contract.json>
|
|
85
91
|
(`server_side`); the full picture for humans is at
|
package/dist/index.cjs
CHANGED
|
@@ -3044,7 +3044,7 @@ var VERSION, brand, useColor, wrap, paint, tuiDesign, sym, ui;
|
|
|
3044
3044
|
var init_branding = __esm({
|
|
3045
3045
|
"src/branding.ts"() {
|
|
3046
3046
|
"use strict";
|
|
3047
|
-
VERSION = "0.4.
|
|
3047
|
+
VERSION = "0.4.6" ? "0.4.6" : null.version;
|
|
3048
3048
|
brand = {
|
|
3049
3049
|
name: "agentful",
|
|
3050
3050
|
// the command users type
|
|
@@ -5618,10 +5618,11 @@ var contract_default = {
|
|
|
5618
5618
|
$comment_limits: "Compressed zip bytes. Enforced server-side as MAX_TEMPLATE_ZIP_UPLOAD_BYTES (aws-services/workspace-manager/handler.py); ~8 MB as base64, under the API Gateway 10 MB request cap."
|
|
5619
5619
|
},
|
|
5620
5620
|
server_side: {
|
|
5621
|
-
$comment: "What 'server' means on this platform (server-option plan 2026-09-18, AP2). THREE separate tracks with separate limits \u2014 never quote one track's limits for another. managed_actions.limits is pinned against the source constants by check-parity.py (check 10) and against the agent instructions (check 11); the behaviour behind action_timeout_budget_s is pinned in aws-services/action-runner/tests/sandbox_contract.test.js. Additive block: no schema_version bump.",
|
|
5621
|
+
$comment: "What 'server' means on this platform (server-option plan 2026-09-18, AP2). THREE separate tracks with separate limits \u2014 never quote one track's limits for another. managed_actions.limits is pinned against the source constants by check-parity.py (check 10) and against the agent instructions (check 11); the behaviour behind action_timeout_budget_s is pinned in aws-services/action-runner/tests/sandbox_contract.test.js, the one behind switch_off_delay_s (and the refusal itself) in tests/server_switch.test.js. The switch is enforced only while infrastructure/lib/s3-lambda-stack.ts says SERVER_SWITCH_ENFORCEMENT 'enforce' \u2014 check 12 fails if switch_note promises it under any other mode. Additive block: no schema_version bump.",
|
|
5622
5622
|
managed_actions: {
|
|
5623
5623
|
label: "Managed Server Actions",
|
|
5624
5624
|
summary: "Short request/response functions the platform runs for the project. One file is one endpoint; JSON in, JSON out. Backend tab: Server \u2192 Managed.",
|
|
5625
|
+
switch_note: 'Actions run only while the managed server is switched on in the Backend tab (Server \u2192 Managed). A managed database alone does not switch it on. While it is off, every action of the project answers 404 server_not_enabled. Switching on takes effect on the next call; switching off takes effect after the switch-off delay given under Limits at the latest, because warm instances remember "on" for that long. Storing is not running: uploading or pushing action files is not gated by the switch.',
|
|
5625
5626
|
offers: [
|
|
5626
5627
|
"One file = one endpoint: .server/actions/<name>.js is served at /api/p/{projectId}/actions/{name}, any HTTP method, JSON in, JSON out",
|
|
5627
5628
|
"Runtime secrets that never reach the browser: await ctx.secrets.get('server.<name>')",
|
|
@@ -5674,7 +5675,8 @@ var contract_default = {
|
|
|
5674
5675
|
max_body_bytes: 1048576,
|
|
5675
5676
|
max_code_bytes: 262144,
|
|
5676
5677
|
project_concurrency: 10,
|
|
5677
|
-
max_action_depth: 5
|
|
5678
|
+
max_action_depth: 5,
|
|
5679
|
+
switch_off_delay_s: 60
|
|
5678
5680
|
},
|
|
5679
5681
|
limits_note: "The per-action budget is a figure to plan with, not a guaranteed stop: an action still waiting on ctx.fetch or ctx.data when the budget runs out is answered with 408 timeout, synchronous code runs on until the hard limit, and after a 408 the action may still complete calls it had already started. Build actions so that a repeated call ends in the same state."
|
|
5680
5682
|
},
|
|
@@ -6118,6 +6120,7 @@ function checkBackendDeclaration(rootDir = process.cwd()) {
|
|
|
6118
6120
|
}
|
|
6119
6121
|
|
|
6120
6122
|
// src/lib/backendSync.ts
|
|
6123
|
+
var SWITCH_OFF_DELAY_S = contract_default.server_side.managed_actions.limits.switch_off_delay_s;
|
|
6121
6124
|
var joinMethods = (methods) => methods && methods.length ? methods.join(" + ") : "none";
|
|
6122
6125
|
function purposeOf(declaration, key) {
|
|
6123
6126
|
const entry = (declaration?.secrets ?? []).find((s) => s.key === key);
|
|
@@ -6260,9 +6263,9 @@ async function fetchBackendSessionState(auth, userId, projectId, opts = {}) {
|
|
|
6260
6263
|
}
|
|
6261
6264
|
function describeServerState(state) {
|
|
6262
6265
|
if (state.serverEnabled) {
|
|
6263
|
-
return
|
|
6266
|
+
return `Server: managed, enabled (Server Actions \u2014 functions we run for you). There is no activation point: pushed action code can change what the published app does immediately; warm instances may serve the previous code for up to five minutes. Switching it off in the Backend tab stops every action within ${SWITCH_OFF_DELAY_S} s.`;
|
|
6264
6267
|
}
|
|
6265
|
-
const notOn = "Action files you push are
|
|
6268
|
+
const notOn = "Action files you push are stored, but calls to them answer 404 server_not_enabled until you switch the managed server on in the Backend tab (`agentful backend` opens it \u2014 the CLI can enable the database, not the server). Switching on takes effect on the next call.";
|
|
6266
6269
|
if (state.serverMode === "byo") {
|
|
6267
6270
|
return `Server: your own API (${state.serverStatus || "not active"}) \u2014 /api/* on the app's domain is forwarded to it. Managed server: not switched on. ${notOn}`;
|
|
6268
6271
|
}
|
|
@@ -7115,11 +7118,12 @@ function backendSessionLines(backend) {
|
|
|
7115
7118
|
return lines.join("\n");
|
|
7116
7119
|
}
|
|
7117
7120
|
function managedServerLine(backend) {
|
|
7121
|
+
const delay2 = contract_default.server_side.managed_actions.limits.switch_off_delay_s;
|
|
7118
7122
|
if (backend.serverEnabled) {
|
|
7119
|
-
return
|
|
7123
|
+
return `Managed server: **enabled**. **There is no activation point:** pushed action source can change what the published app does immediately, while warm instances may keep serving the previous code for up to five minutes. Switching the server off in the Backend tab stops every action within ${delay2} s.`;
|
|
7120
7124
|
}
|
|
7121
7125
|
const ownApi = backend.serverMode === "byo" ? "Server: the owner connected **an API of their own** \u2014 `/api/*` on the app's domain is forwarded to it, and the platform adds no secret and authorizes nobody. " : "";
|
|
7122
|
-
return `${ownApi}Managed server: **not switched on** in the Backend tab. **Action files you push are
|
|
7126
|
+
return `${ownApi}Managed server: **not switched on** in the Backend tab. **Action files you push are stored, but every call to them answers \`404 server_not_enabled\`** until the owner switches the managed server on (\`agentful backend\` opens the tab; the CLI can enable the database, NOT the server). Switching on takes effect on the next call. Never tell the user an action works before the server is on.`;
|
|
7123
7127
|
}
|
|
7124
7128
|
var bytes = (n) => n >= 1024 * 1024 ? `${n / (1024 * 1024)} MB` : `${n / 1024} KB`;
|
|
7125
7129
|
function serverSideSection() {
|
|
@@ -7130,6 +7134,7 @@ function serverSideSection() {
|
|
|
7130
7134
|
`### ${heading} ${t.label}`,
|
|
7131
7135
|
"",
|
|
7132
7136
|
t.summary,
|
|
7137
|
+
...t.switch_note ? ["", t.switch_note] : [],
|
|
7133
7138
|
"",
|
|
7134
7139
|
"Offers:",
|
|
7135
7140
|
...t.offers.map((o) => `- ${o}`),
|
|
@@ -7147,7 +7152,7 @@ function serverSideSection() {
|
|
|
7147
7152
|
track(
|
|
7148
7153
|
"managed_actions",
|
|
7149
7154
|
"(a)",
|
|
7150
|
-
`${a.action_timeout_budget_s} s budget per action, ${a.hard_timeout_s} s hard limit, ${a.memory_mb} MB memory, request body \u2264 ${bytes(a.max_body_bytes)}, action source \u2264 ${bytes(a.max_code_bytes)}, ${a.project_concurrency} concurrent calls per project, self-call depth \u2264 ${a.max_action_depth}.`
|
|
7155
|
+
`${a.action_timeout_budget_s} s budget per action, ${a.hard_timeout_s} s hard limit, ${a.memory_mb} MB memory, request body \u2264 ${bytes(a.max_body_bytes)}, action source \u2264 ${bytes(a.max_code_bytes)}, ${a.project_concurrency} concurrent calls per project, self-call depth \u2264 ${a.max_action_depth}, switch-off delay \u2264 ${a.switch_off_delay_s} s.`
|
|
7151
7156
|
),
|
|
7152
7157
|
track("own_api", "(b)", null),
|
|
7153
7158
|
track(
|