@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.
- package/README.md +8 -0
- package/dist/context-DWEbBTIr.js +15 -0
- package/dist/index.js +437 -440
- package/dist/native.js +8 -7
- package/dist/src/delegate/use-scope-approval.d.ts +2 -2
- package/dist/src/dsm/service-ports.d.ts +2 -2
- package/dist/src/shell/AppShell.vue.d.ts +0 -1
- package/dist/src/shell/app-pages.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/vue.js +343 -342
- package/executor-manifest.json +8 -8
- package/package.json +1 -1
- package/spec/protocol/v1/README.md +21 -33
- package/spec/protocol/v1/timeouts.json +10 -10
package/executor-manifest.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"formatVersion": 1,
|
|
3
|
-
"sdkVersion": "0.49.
|
|
4
|
-
"executorVersion": "0.
|
|
3
|
+
"sdkVersion": "0.49.5",
|
|
4
|
+
"executorVersion": "0.49.5",
|
|
5
5
|
"executorDigests": {
|
|
6
|
-
"x86_64": "
|
|
7
|
-
"aarch64": "
|
|
8
|
-
"armv7": "
|
|
6
|
+
"x86_64": "1a2dbb1c93a5d7cf5c4d5cafd2526c152e1cc21611649875db8e1c23837c2874",
|
|
7
|
+
"aarch64": "faabdeb1db9467d82997d8398e90203799c6ca5dddaaa383ed8bdb75534a6b2d",
|
|
8
|
+
"armv7": "6a0256fd2e2f093c154421bbc6323b715c324411b25c7794be92c73bbc59271f",
|
|
9
9
|
"lifecycle": {
|
|
10
|
-
"x86_64": "
|
|
11
|
-
"aarch64": "
|
|
12
|
-
"armv7": "
|
|
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
|
+
"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 |
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
| Executor
|
|
44
|
-
| Executor
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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–
|
|
189
|
-
default 1 MiB), `job` its background limits: `timeout_s` (1–
|
|
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
|
-
- **
|
|
305
|
-
|
|
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
|
|
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
|
|
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":
|
|
6
|
-
"webapi_raw_execution_s":
|
|
7
|
-
"webapi_raw_answer_s":
|
|
8
|
-
"root_run_program_default_s":
|
|
9
|
-
"root_run_program_max_s":
|
|
10
|
-
"root_run_answer_s":
|
|
11
|
-
"start_step_s":
|
|
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":
|
|
15
|
-
"webapi_raw_s":
|
|
16
|
-
"root_run_s":
|
|
14
|
+
"op_s": 310,
|
|
15
|
+
"webapi_raw_s": 320,
|
|
16
|
+
"root_run_s": 3620
|
|
17
17
|
},
|
|
18
18
|
"request": {
|
|
19
19
|
"default_s": 300
|