@synopackageland/cli 0.34.0 → 0.36.0

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/skills/SKILL.md CHANGED
@@ -5,7 +5,7 @@ description: Initialize, extend, check, build, inspect, and deploy Synology appl
5
5
 
6
6
  # Independent Synology SPKs
7
7
 
8
- CLI 0.33.1 installs templates through `~0.31.0`. A templates patch needs only a
8
+ CLI 0.36.0 installs templates through `~0.32.0`. A templates patch needs only a
9
9
  templates release; npm install/update selects a patch in that minor line. The CLI
10
10
  uses the locally installed templates and reads their SDK pin for defaults; it
11
11
  never downloads templates at runtime. Preserve the lockfile and use `npm ci` for
@@ -24,12 +24,52 @@ Use this guide to initialize, build and inspect own applications or upstream OSS
24
24
 
25
25
  For an existing open-source App, first read [reference/upstream-fork.md](reference/upstream-fork.md): upstream fork/history + untouched upstream files + all packaging in `synology/`, official container images pinned by tag/index digest, native official release binaries pinned by SHA-256 or a source build hook, and a single tag-merge upgrade command. Use `init --upstream-fork`; never rewrite the App as a component. Integrated upstream Apps require direct DSM administrator entry without a separate App password or an OIDC/SSO server: supported trusted headers first, disabling native login second; the shipped OpenList pattern uses the existing SDK 0.17.3 token adapter (`mode: token`, `access: dsm-admins`, `entry: admin-only`) with server-side Authorization injection. All DSM admins share one upstream admin; token reset requires package restart; WebDAV retains its native credentials.
26
26
 
27
- Use SDK 0.32.0 and CLI 0.34.0 for App entry enforcement. Declare every App method
28
- in the permissions table; dynamic names and custom HTTP dispatchers are rejected.
27
+ Use SDK/App 0.34.0 and CLI 0.36.0 for App entry enforcement. Declare every App method
28
+ in the permissions table; dynamic names and unregistered HTTP dispatchers are rejected.
29
29
  Use fixed SDK routes and `identity_gateway.upstream_auth_paths` for client API
30
30
  paths that rely on upstream authentication. Read
31
31
  [reference/identity.md](reference/identity.md) and
32
32
  [reference/identity-gateway.md](reference/identity-gateway.md) before migration.
33
+ For private worker HTTP, use `ipc.ServeUnix(ctx, path, handler)` and
34
+ `ipc.DialUnix`, never a custom listener. The helper requires an owned mode-0600
35
+ socket under the package's private `var/run`. For browser proxies, streams or
36
+ initial upgrades, register `api.HandleHTTP("/proxy/", "app.proxy", handler)`
37
+ in the same API registry and declare the method as authenticated or
38
+ administrators. Prefixes are literal, disjoint full segments outside reserved
39
+ SDK paths. Origin, entry, identity and permission checks still apply. CGI
40
+ cannot upgrade a connection; use an existing upgrade-capable deployment
41
+ transport. The audit follows each configured Go binary's Linux import graph,
42
+ including declared workers; unshipped dev commands are excluded.
43
+
44
+ Use `ipc.StartUnix(ctx, path, handler)` for multiple private data-plane sockets.
45
+ Each direct `.sock` child of the package `var/run` gets an independent handle
46
+ with Close, Shutdown and Wait. Stop/revoke closes active streams and hijacked
47
+ connections, including WebSocket; keep target approval and pin checks in the
48
+ handler. A private socket may serve the upstream root path without CGI.
49
+ For official supervised children use `ipc.ReserveLoopback(ctx, 0)` to hold a
50
+ 127.0.0.1 TCP port, read Port/Address and Release immediately before starting
51
+ the child. `ipc.ProbeLoopback(ctx, port)` checks a specific port without
52
+ retaining it. Check child readiness and retry bind conflicts: release-to-bind
53
+ is inherently racy. Never replace these with custom listeners or fixed ports.
54
+
55
+ An optional root helper is a separately approved executor payload.
56
+ `ipc.ServePeerUnix(ctx, path, ipc.PeerPolicy{UID: uid, GID: gid}, handler)`
57
+ supports a bounded raw JSON control protocol on a root-owned 0660 socket under
58
+ `/var/run/synopkgland/<package>/`. The SDK authenticates exactly the selected
59
+ UID with SO_PEERCRED; the handler validates bounded frames and current
60
+ authorization. `ipc.DialPeerUnix` verifies root ownership, protected ancestors,
61
+ mode and server UID zero. The server requires root AND the helper's explicit
62
+ `ipc.executorTier=executor` linker binding. Bind packageID in custom builds.
63
+ Generated CGI/workers bind tier `none`; never launch or install them as root.
64
+ The transport does not provide installation, approval or privilege elevation.
65
+
66
+ Audit every custom-hook Go payload with
67
+ `synopkgland audit-entry ./cmd/helper --dir backend --arch amd64,arm64,arm --json`
68
+ before packaging. Use `--permissions` when it registers App methods.
69
+ Each entry is checked against its actual target import graph, including every
70
+ file of shared packages. Unused server functions have no exemption. Use real
71
+ client/server packages or supported SDK boundaries; no App allowlists, hidden
72
+ directories, aliases or ABI workarounds.
33
73
 
34
74
  **If you package someone else's open-source project, set `maintainer` to the
35
75
  original project/owner (prefer the project's own team/org name, else the owner's