@synopackageland/sdk 0.49.3 → 0.49.5

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.
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "formatVersion": 1,
3
- "sdkVersion": "0.49.3",
4
- "executorVersion": "0.48.0",
3
+ "sdkVersion": "0.49.5",
4
+ "executorVersion": "0.49.5",
5
5
  "executorDigests": {
6
- "x86_64": "60b4e1c0c44beabf38ad7845321a67993680936c1a64610f36d3bf8d9b4ae126",
7
- "aarch64": "cbb450caaf46dc617a0f91ab719d1c93f7f470d69035cbec45cd0a90b9779840",
8
- "armv7": "f4640814747eaf7ba68dea95158d3bd2a88bab717a7c8c49f78defcffb8b4d21",
6
+ "x86_64": "1a2dbb1c93a5d7cf5c4d5cafd2526c152e1cc21611649875db8e1c23837c2874",
7
+ "aarch64": "faabdeb1db9467d82997d8398e90203799c6ca5dddaaa383ed8bdb75534a6b2d",
8
+ "armv7": "6a0256fd2e2f093c154421bbc6323b715c324411b25c7794be92c73bbc59271f",
9
9
  "lifecycle": {
10
- "x86_64": "a15525016e72ecac7715b47f17e0636c671c04c0990e2d0a999ce36c71ad4cca",
11
- "aarch64": "39d796f57976c1b0df14aa507c82747d74899551d8dece1791cf6b61d1eb443d",
12
- "armv7": "334971cf03569a62b1a1b8762f444d58a8857a78ac23e446406491fa0a131d98"
10
+ "x86_64": "3b2720a4d093aeaa82674a75f16e3adc0bfaa76b8357e58ef591d1f15a73a5c0",
11
+ "aarch64": "f8a9bb0e69dd380d993fcc89cf19e9e3a526a76bdc24c97d53f01001953aad0d",
12
+ "armv7": "118edf2426e8aaeeea66d1b3b114c86d0aa680c02449755fc37b0d5a288dc430"
13
13
  },
14
14
  "goToolchain": "go1.26.10"
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/sdk",
3
- "version": "0.49.3",
3
+ "version": "0.49.5",
4
4
  "description": "Frontend SDK for DSM packages built with synopkgland: headless client and Vue components",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/synopackageland/syno-pkg-land-sdk/tree/main/ts#readme",
@@ -36,32 +36,20 @@ arrives before the outer layer gives up. The margin is 10 seconds between
36
36
  the executor and its client and between the client and the request; the
37
37
  browser waits 2 seconds past the request (`timeouts.json` holds the values).
38
38
 
39
- | Layer | Waits for | Bound |
40
- |---|---|---|
41
- | Root program (`run.timeout_s`) | its own work | 1–120 s, default 20; the process group is then killed |
42
- | Executor, `root.run` | the program, then its reply | answers within 130 s (120 + 10) |
43
- | Executor, raw `webapi.call` | its streaming DSM call | executes within 1800 s, answers within 1810 s |
44
- | Executor, other ops | its DSM calls | answers within 30 s |
45
- | Executor client (Go `delegate.Client`, the bridge runtime's `root.*` and `delegate.*`) | the executor | `root.run` 140 s (`delegate.RootRunTimeout`); Go raw WebAPI 1820 s; other ops 40 s (`delegate.ExecutorTimeout`) |
46
- | Request (`api.Timeout`, manifest `timeout_seconds`) | the App's backend | default 300 s (`api.DefaultRequestTimeout`), 1–3600 |
47
- | Browser (`clientTimeout`, the CLI window's `call`) | the request | the request's deadline + 2 s |
48
-
49
- - The request's deadline ends every inner wait: a client never waits past it.
50
- An App whose backend awaits `root.run` therefore needs a deadline of at
51
- least the program's `run.timeout_s` + 20 seconds (the executor's 10 and the
52
- client's 10), so a 120-second program needs `timeout_seconds` 140; a build
53
- tool SHOULD refuse less. The default 300 covers the maximum synchronous
54
- program and its response reserve. Longer privileged work uses root jobs;
55
- request time never enlarges an approved program budget.
56
- - A client that gave up does not stop the work: `root.run` runs on (it cannot
57
- be canceled), and `portal.register` and `portal.unregister` finish their
58
- steps within 2 minutes. The client reads the result again (`status`,
59
- `root.jobs.get`) instead of repeating the work.
60
- - The start step (Package start step) is waited on by no request: while it
61
- runs (at most 60 seconds) every op but `status` is refused at once with
62
- `EXECUTOR_STARTING` (retryable). A window that waits for the executor to
63
- become ready polls `status` for longer than 60 seconds before it reports
64
- the start step as still running.
39
+ | Layer | Allowance |
40
+ | --- | --- |
41
+ | Operation, JSON/raw WebAPI, command, lifecycle default | 300 s, from `runtimebudget.Operation` |
42
+ | Root program | 300 s default; explicit approved `run.timeout_s` 1–3600 s |
43
+ | Executor root answer | Explicit maximum program ceiling + 10 s reply reserve |
44
+ | Executor client | 10 s beyond executor work/answer; earlier caller deadline wins |
45
+ | Request | 300 s default; explicit `api.Timeout` / manifest setting remains effective |
46
+ | Browser | Request allowance + 2000 ms response reserve |
47
+
48
+ Every layer consumes remaining caller time; margins never enlarge authority.
49
+ A lost reply leaves a dispatched mutation uncertain and must not cause replay.
50
+ Startup availability remains starting while the owned supervisor waits; policy
51
+ and lifecycle validation failures still fail closed. Non-failure clocks and their
52
+ reasons are recorded in `scripts/timeout-allowlist.json`.
65
53
 
66
54
  ## Request
67
55
 
@@ -185,9 +173,8 @@ Since 0.10.0. Each `root` entry pins a program by its SHA-256 digest; a bare
185
173
  digest is a script `root.run` may run with the defaults. The object form is
186
174
  `{"digest", "kind", "schema", "run"}`: `kind` `script` (`root/<name>.sh`) or
187
175
  `binary` (`root/<name>`), `schema` a closed JSON Schema subset for its params,
188
- `run` its `timeout_s` (1–120, default 20) and `max_output` (≤ 64 MiB,
189
- default 1 MiB), `job` its background limits: `timeout_s` (1–604800, default
190
- 86400), `grace_s` (1–60, default 10), `max_concurrent` (1–4, default 1) and
176
+ `run` its `timeout_s` (1–3600, default 300) and `max_output` (≤ 64 MiB,
177
+ default 1 MiB), `job` its background limits: `timeout_s` (legacy compatibility metadata, no elapsed kill timer), `grace_s` (1–60, default 10), `max_concurrent` (1–4, default 1) and
191
178
  `nice` (0–19, default 10). `executor/README.md` lists the schema keywords.
192
179
  `root.run` needs `run`, `root.start` needs `job`; an entry may have both.
193
180
 
@@ -301,8 +288,9 @@ The job reports on fd 5 and is told to stop on fd 4; both are pipes.
301
288
  means the executor ended: the job should stop too. The job ends
302
289
  gracefully; `grace_s` after the cancel (at most 15 seconds on package stop,
303
290
  upgrade and uninstall) the executor kills its process group.
304
- - **Timeout**: `timeout_s` after the start the process group is killed
305
- without a cancel (`timed-out`).
291
+ - **Runtime**: a live job keeps running regardless of elapsed time. Legacy
292
+ `timeout_s` does not kill it. Process exit, explicit cancellation, lifecycle
293
+ stop and ownership/authority failure still end it.
306
294
  - A job MAY also keep its own progress files (for example in
307
295
  `SYNOPKGLAND_ROOT_STATE`) for its App to read; the executor does not
308
296
  interpret them.
@@ -345,7 +333,7 @@ the executor runs once after each install or upgrade, with no session:
345
333
  - It runs only while the approval is live (as for the purge step); otherwise
346
334
  it MUST log `start root step skipped: not approved` and run at the next
347
335
  start. A step cut short because the executor ended also runs again.
348
- - It runs for at most 60 seconds; its exit and output go to the executor log,
336
+ - It runs with the shared operation allowance; its exit and output go to the executor log,
349
337
  and the executor MUST become ready whatever it answers. A failure is the result of
350
338
  that version: the step does not run again until the next upgrade or
351
339
  reinstall, so the program should be idempotent.
@@ -394,7 +382,7 @@ runs as root at uninstall, with no session.
394
382
  - The op gets the argument `delete-state` when the package account wrote
395
383
  `delete-state` to `var/executor/uninstall` before its request (the
396
384
  `executor/lifecycle purge --delete-state` helper does), and `keep-state`
397
- otherwise. It runs for at most 60 seconds; its exit status and output go to
385
+ otherwise. It runs with the shared operation allowance; its exit status and output go to
398
386
  the purge log, and a failure MUST NOT stop the rest of the purge.
399
387
 
400
388
  ## Grants
@@ -2,18 +2,18 @@
2
2
  "$comment": "Timeouts on the call chain to the executor, in seconds unless the name says ms. Each layer waits margin_s longer than the layer it calls, so the inner answer arrives first; README.md, Timeouts.",
3
3
  "margin_s": 10,
4
4
  "executor": {
5
- "op_s": 30,
6
- "webapi_raw_execution_s": 10800,
7
- "webapi_raw_answer_s": 10810,
8
- "root_run_program_default_s": 20,
9
- "root_run_program_max_s": 120,
10
- "root_run_answer_s": 130,
11
- "start_step_s": 60
5
+ "op_s": 300,
6
+ "webapi_raw_execution_s": 300,
7
+ "webapi_raw_answer_s": 310,
8
+ "root_run_program_default_s": 300,
9
+ "root_run_program_max_s": 3600,
10
+ "root_run_answer_s": 3610,
11
+ "start_step_s": 300
12
12
  },
13
13
  "client": {
14
- "op_s": 40,
15
- "webapi_raw_s": 10820,
16
- "root_run_s": 140
14
+ "op_s": 310,
15
+ "webapi_raw_s": 320,
16
+ "root_run_s": 3620
17
17
  },
18
18
  "request": {
19
19
  "default_s": 300