@synopackageland/cli 0.14.1 → 0.15.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/CHANGELOG.md +20 -1
- package/README.md +33 -18
- package/dist/build-spk/generator.d.ts +3 -2
- package/dist/build-spk/generator.js +6 -846
- package/dist/build-spk/resource-worker.d.ts +2 -14
- package/dist/build-spk/resource-worker.js +3 -166
- package/dist/cli.js +208 -56
- package/dist/compose/analyze.d.ts +3 -61
- package/dist/compose/analyze.js +35 -776
- package/dist/compose/env.d.ts +5 -3
- package/dist/compose/env.js +17 -25
- package/dist/compose/runner.js +23 -6
- package/dist/contract/unsupported-types.js +1 -1
- package/dist/contract/validate.js +2 -2
- package/dist/contract/web-launch.d.ts +1 -12
- package/dist/contract/web-launch.js +10 -74
- package/dist/ctl/cli.d.ts +36 -0
- package/dist/ctl/cli.js +218 -0
- package/dist/ctl/descriptor.d.ts +81 -0
- package/dist/ctl/descriptor.js +93 -0
- package/dist/ctl/dsm-auth.d.ts +10 -0
- package/dist/ctl/dsm-auth.js +30 -0
- package/dist/ctl/errors.d.ts +17 -0
- package/dist/ctl/errors.js +32 -0
- package/dist/ctl/flows.d.ts +11 -0
- package/dist/ctl/flows.js +52 -0
- package/dist/ctl/input.d.ts +20 -0
- package/dist/ctl/input.js +128 -0
- package/dist/ctl/json.d.ts +2 -0
- package/dist/ctl/json.js +38 -0
- package/dist/ctl/redaction.d.ts +15 -0
- package/dist/ctl/redaction.js +198 -0
- package/dist/ctl/service.d.ts +38 -0
- package/dist/ctl/service.js +156 -0
- package/dist/ctl/store.d.ts +51 -0
- package/dist/ctl/store.js +93 -0
- package/dist/ctl/transfers.d.ts +14 -0
- package/dist/ctl/transfers.js +74 -0
- package/dist/ctl/transport.d.ts +11 -0
- package/dist/ctl/transport.js +79 -0
- package/dist/deploy/deploy.d.ts +4 -3
- package/dist/deploy/deploy.js +5 -210
- package/dist/deploy/plan.js +26 -7
- package/dist/dev.js +5 -4
- package/dist/e2e/dsm.d.ts +2 -2
- package/dist/e2e/dsm.js +10 -6
- package/dist/error-registry.js +1020 -834
- package/dist/host/share-permission-lookup.d.ts +1 -1
- package/dist/host/share-permission.d.ts +1 -1
- package/dist/host/share-permission.js +1 -1
- package/dist/info.js +120 -28
- package/dist/init.js +188 -64
- package/dist/inspect.js +21 -6
- package/dist/runtime/executor-digests.json +5 -5
- package/dist/skill.js +51 -9
- package/dist/standalone/api-description-inspect.d.ts +4 -0
- package/dist/standalone/api-description-inspect.js +12 -0
- package/dist/standalone/api-description.d.ts +7 -0
- package/dist/standalone/api-description.js +73 -0
- package/dist/standalone/build.d.ts +3 -0
- package/dist/standalone/build.js +140 -33
- package/dist/standalone/compose-errors.d.ts +3 -0
- package/dist/standalone/compose-errors.js +243 -0
- package/dist/standalone/compose.d.ts +97 -10
- package/dist/standalone/compose.js +306 -75
- package/dist/standalone/daemon.js +111 -29
- package/dist/standalone/dsm-window.js +39 -8
- package/dist/standalone/identity-gateway.d.ts +9 -2
- package/dist/standalone/identity-gateway.js +282 -66
- package/dist/standalone/inspect-spk.d.ts +12 -0
- package/dist/standalone/inspect-spk.js +666 -136
- package/dist/standalone/lifecycle.js +124 -42
- package/dist/standalone/manifest.d.ts +8 -1
- package/dist/standalone/manifest.js +303 -86
- package/dist/standalone/resource.js +6 -2
- package/dist/standalone/spk.d.ts +4 -1
- package/dist/standalone/spk.js +138 -39
- package/dist/template-paths.d.ts +0 -2
- package/dist/template-paths.js +0 -5
- package/dist/test-command.d.ts +1 -1
- package/dist/test-command.js +1 -1
- package/dist/validate.d.ts +3 -3
- package/dist/validate.js +32 -140
- package/package.json +5 -3
- package/schema/synopkgland-api-v1.schema.json +423 -0
- package/skills/SKILL.md +4 -2
- package/skills/reference/compose.md +349 -0
- package/skills/reference/create.md +9 -18
- package/skills/reference/ctl.md +41 -0
- package/skills/reference/deploy.md +1 -1
- package/skills/reference/files.md +5 -1
- package/skills/reference/identity-gateway.md +8 -144
- package/skills/reference/wrap.md +10 -39
- package/assets/go/daemon/fixture_linux_test.go +0 -15
- package/assets/go/daemon/fixture_other_test.go +0 -7
- package/assets/go/daemon/go.mod +0 -5
- package/assets/go/daemon/main.go +0 -636
- package/assets/go/daemon/main_test.go +0 -315
- package/assets/go/daemon/network.go +0 -107
- package/assets/go/daemon/network_test.go +0 -86
- package/assets/go/daemon/process_linux.go +0 -55
- package/assets/go/daemon/process_linux_test.go +0 -161
- package/assets/go/daemon/process_other.go +0 -14
- package/assets/go/daemon/testdata/child.go +0 -44
- package/assets/go/gateway/auth.go +0 -101
- package/assets/go/gateway/auth_test.go +0 -216
- package/assets/go/gateway/cgi.go +0 -133
- package/assets/go/gateway/cgi_test.go +0 -156
- package/assets/go/gateway/csrf.go +0 -73
- package/assets/go/gateway/csrf_test.go +0 -155
- package/assets/go/gateway/directory.go +0 -108
- package/assets/go/gateway/directory_test.go +0 -202
- package/assets/go/gateway/gateway.go +0 -412
- package/assets/go/gateway/gateway_test.go +0 -676
- package/assets/go/gateway/go.mod +0 -5
- package/assets/go/gateway/groups.go +0 -66
- package/assets/go/gateway/main.go +0 -45
- package/dist/build-spk/gateway.d.ts +0 -31
- package/dist/build-spk/gateway.js +0 -60
- package/dist/compose/privilege.d.ts +0 -14
- package/dist/compose/privilege.js +0 -102
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.15.1 (2026-10-18)
|
|
4
|
+
|
|
5
|
+
- Require explicit `DSM_E2E_SSH` for e2e tunnels and use `dsm` as the default saved-profile target; set `DSM_E2E_TARGET` to reuse an earlier target name. Anonymize internal NAS fixtures and documentation.
|
|
6
|
+
- Pin templates and SDK fixtures/examples to 0.15.1. Add the 0.15.1 executor/lifecycle digest entry and retain the published 0.15.0 pins unchanged.
|
|
7
|
+
- Cover package-named control.sh refusal logs and rejected `.executor` / `.policy.json` staging cleanup.
|
|
8
|
+
- Executor task definitions change: Apps rebuilt with SDK 0.15.1 require one administrator reapproval after upgrade.
|
|
9
|
+
|
|
10
|
+
繁中摘要:e2e tunnel 必須明確設定 `DSM_E2E_SSH`,profile 預設 target 改為 `dsm`(沿用舊 profile 時設定 `DSM_E2E_TARGET`);清理內部 NAS 範例資訊。templates/SDK pins 同步 0.15.1;新增同版三架構 executor/lifecycle digest,保留 0.15.0 pins。驗證 control.sh 拒絕 log 的套件名與 runtime copies 清除。**task 定義改變:App 使用新 SDK 重建升級後,管理員需重新核准一次。**
|
|
11
|
+
|
|
12
|
+
## 0.15.0 (2026-10-18)
|
|
13
|
+
|
|
14
|
+
- Add `synopkgland ctl` host/session management, authenticated API v1 discovery, explicit command trust, typed invocation and fixed job/pagination/NDJSON/upload flows. Commands keep App backend authorization; writes require confirmation.
|
|
15
|
+
- Document resource/verb naming recommendations without a verb allowlist or effect inference; explicit effects remain mandatory and binding checks remain unchanged.
|
|
16
|
+
- Redact standard JSON Schema writeOnly values in dry-run/confirmation plans, schema errors, results, list/help and caches, including nested arrays/objects and multi-host output; keep outgoing requests unchanged.
|
|
17
|
+
- Pin templates and released executor digests to 0.15.0, retaining the same-minor digest selection rule.
|
|
18
|
+
- Breaking: remove the legacy Compose route and bridge publish mode. Migrate to schema 2 `dsm-package.yaml` with ordered `compose.files`, `compose.web` container port/health and `identity_gateway.sdk: 0.15.0`; remove old `integration.compose`/`integration.identity_gateway`. `web.host_port` is accepted but ignored. Build/check/inspect share the SDK planner. Rebuild with templates/SDK 0.15.0 and verify install/upgrade; historical `.sc` cleanup requires separate authorization. Changing subnet candidate requires a clean installation, not an automatic network migration.
|
|
19
|
+
|
|
20
|
+
繁中摘要:新增 writeOnly 敏感值遮罩(巢狀、陣列、多主機、計畫、錯誤及快取),實際請求保持原值。新增 `synopkgland ctl`,從已安裝 App 的 authenticated「Syno Package Land API 描述」v1 發現並執行明確 commands,支援多主機與固定任務流程。**不相容變更**:移除舊 Compose 打包路線及 publish 模式;改用 schema 2 `compose`/`identity_gateway`,固定 SDK/templates 0.15.0 並重建驗證。gateway 直接連固定 bridge IP 的 container port;`web.host_port` 僅解析相容、會忽略,歷史 `.sc` 與既有子網不自動清除或遷移。
|
|
21
|
+
|
|
3
22
|
## 0.14.1
|
|
4
23
|
|
|
5
24
|
- DSM 會改寫 standalone URL,因此沒有 SDK class 的 schema 1 web launcher 使用 url;schema 2 identity_gateway + compose 與原生 new-page 使用 standalone。兩條 Compose 路線共用預設解析。
|
|
@@ -319,7 +338,7 @@ before its timeout.
|
|
|
319
338
|
- The window approval of an upgrade (outdated tasks) makes 11 scheduler calls
|
|
320
339
|
instead of 12: the outdated boot task is deleted by the approval's own first
|
|
321
340
|
EventScheduler get, made moments before the password, instead of a second
|
|
322
|
-
get (2.9 s on
|
|
341
|
+
get (2.9 s on the test NAS in t-0484). The control task is still read again by id
|
|
323
342
|
before its delete (spec/scheduler/v1). A fresh approval stays at 8.
|
|
324
343
|
繁中:升級核准的排程呼叫由 12 降為 11(boot 任務不再於刪除前重讀)。
|
|
325
344
|
- A scope approval reads the executor's selection back every second at most
|
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ the SPK with Package Center's Manual Install.
|
|
|
36
36
|
| `native-go` | A Go backend with a Vue UI (or `--ui plain`) | `dsm-package.yaml` |
|
|
37
37
|
| `native-python`, `native-node`, `native-rust` | The `native-go` App with a Python, Node.js (TypeScript) or Rust backend | `dsm-package.yaml` |
|
|
38
38
|
| `binary` | A static Linux program you build yourself | `dsm-package.yaml` |
|
|
39
|
-
| `compose` |
|
|
39
|
+
| `compose` | Unchanged upstream Compose, generated override and SDK planner | `dsm-package.yaml` |
|
|
40
40
|
|
|
41
41
|
Existing native products with their own payload layout use `backend: {kind: native}` in
|
|
42
42
|
`dsm-package.yaml`.
|
|
@@ -150,12 +150,17 @@ await dismissNotifications(); // when a card shows later
|
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
`runWithTunnel` (the `tunnel --` command) opens an SSH tunnel to the NAS
|
|
153
|
-
(`DSM_E2E_SSH`,
|
|
153
|
+
(`DSM_E2E_SSH`, required, e.g. `admin@nas.example`) on a free loopback port and runs the
|
|
154
154
|
command with `DSM_E2E_URL` set. It masks DSM's session cookies (`id`, `did`,
|
|
155
155
|
`_SSID`), `X-SYNO-TOKEN`, `SynoToken` and `_sid` as `***` in the command's
|
|
156
156
|
output and in the files under `DSM_E2E_OUTPUT_DIR` (default `.e2e`), and makes
|
|
157
157
|
that directory private (700, files 600); saved sessions keep their cookies.
|
|
158
|
-
|
|
158
|
+
Set `DSM_E2E_SSH` to your NAS SSH destination in the environment or a local
|
|
159
|
+
untracked `.env`; an unset or blank value fails before SSH or the command starts.
|
|
160
|
+
`nas.example` is a fixture hostname; replace it with your own host. Accounts come
|
|
161
|
+
from mode 600 files named by `DSM_E2E_ACCOUNT_<USER>`. Saved profiles use
|
|
162
|
+
`DSM_E2E_TARGET` (default `dsm`) and the user as their names; set the target to
|
|
163
|
+
an existing profile's target name to keep reusing it.
|
|
159
164
|
`signIn` and `openDesktop` also register those values as e2e secrets in the
|
|
160
165
|
test's worker, so e2e masks them in its own report. A test that forwards
|
|
161
166
|
requests with `context.route` and `route.fetch` should end with
|
|
@@ -234,18 +239,28 @@ A full page does not need Application Portal. Omit `portal` unless an alias is
|
|
|
234
239
|
explicitly wanted; only that opt-in adds `defaultAlias`, login styling, Portal
|
|
235
240
|
panels and capabilities. No Portal is a healthy default for inspect/info/doctor.
|
|
236
241
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
242
|
+
Compose uses schema-2 `dsm-package.yaml` and `ui.launch`; the default is new-page.
|
|
243
|
+
Classless gateways use type url via the shared contract/app-launch resolver;
|
|
244
|
+
AppWindow wrappers use standalone. Headless projects have no launcher.
|
|
245
|
+
|
|
246
|
+
See [Compose](skills/reference/compose.md) for multiple upstream files,
|
|
247
|
+
generated override/worker artifacts, image proofs and the support matrix.
|
|
248
|
+
Containers use a fixed package identity and do not inherit a signed-in user's
|
|
249
|
+
File Station ACL. Shared Folder intent requires admin confirmation after
|
|
250
|
+
installation; official protected ACL/project control and bridge readback remain
|
|
251
|
+
blocked. No SSO Server or wrapper container is added. Linux tests do not prove
|
|
252
|
+
DSM readiness; inspect lists explicit acceptance blockers.
|
|
253
|
+
|
|
254
|
+
## Control installed Apps
|
|
255
|
+
|
|
256
|
+
Use `synopkgland ctl host add nas --url https://nas.example:5001 --username alice`
|
|
257
|
+
to register and authenticate a NAS in OS secure storage. `ctl host list --json`
|
|
258
|
+
checks sessions; `ctl list --host nas --json` discovers all approved task-level
|
|
259
|
+
commands and their schemas. Run the listed alias/command with typed flags,
|
|
260
|
+
`--help` and `--dry-run`; writes require `--yes`. There is no mutable current
|
|
261
|
+
context. Use `--host a,b` or `--all-hosts` for bounded parallel operations.
|
|
262
|
+
|
|
263
|
+
Read `synopkgland skill show ctl` for the AI workflow, batch discovery approval,
|
|
264
|
+
cache refresh, host removal/revocation and explicit `ctl.commands` authoring.
|
|
265
|
+
API descriptions are private SPK files named `synopkgland-api.json`, served
|
|
266
|
+
only by the authenticated fixed `synopkgland.describe` CGI operation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProjectRoot } from "../discovery.js";
|
|
2
|
+
import type { NativeArchFamily } from "./dsm-arch.js";
|
|
2
3
|
import type { CommandRunner } from "../standalone/build.js";
|
|
3
|
-
import { type NativeArchFamily } from "./dsm-arch.js";
|
|
4
4
|
export interface BuildSpkOptions {
|
|
5
5
|
project: ProjectRoot;
|
|
6
6
|
outputPath?: string;
|
|
@@ -19,7 +19,8 @@ export interface BuildSpkResult {
|
|
|
19
19
|
outputPath?: string;
|
|
20
20
|
errors: string[];
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
/** Legacy project detection supplies a migration error, never a second builder. */
|
|
23
|
+
export declare function buildSpk(_options: BuildSpkOptions): Promise<BuildSpkResult>;
|
|
23
24
|
export declare function walkFiles(root: string, prefix?: string): string[];
|
|
24
25
|
export declare function digestSpkPayload(spkPath: string): Promise<string>;
|
|
25
26
|
export declare function extractSpk(spkPath: string, targetDir: string): Promise<void>;
|