@synopackageland/cli 0.52.1 → 0.52.2
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 +6 -0
- package/README.md +3 -2
- package/dist/error-registry.js +1 -1
- package/dist/native-http-schema/source.json +1 -1
- package/dist/runtime/sdk-source.d.ts +1 -1
- package/dist/runtime/sdk-source.js +1 -1
- package/dist/skill.js +1 -1
- package/dist/standalone/inspect-spk.d.ts +1 -1
- package/dist/standalone/tcp-listeners.d.ts +1 -1
- package/dist/standalone/tcp-listeners.js +4 -4
- package/package.json +1 -1
- package/schema/dsm-package.schema.json +1 -1
- package/skills/SKILL.md +2 -2
- package/skills/reference/raw-tcp.md +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.52.2
|
|
4
|
+
|
|
5
|
+
- Restore `tcp_listeners` scope `all` for IPv4 `0.0.0.0`; `loopback` remains the default
|
|
6
|
+
- Accept both scopes in manifest validation, the JSON schema, compiled policies and SPK inspection
|
|
7
|
+
- Pin CLI-owned SDK defaults to 0.53.2 and align raw TCP documentation with both scopes
|
|
8
|
+
|
|
3
9
|
## 0.52.1
|
|
4
10
|
|
|
5
11
|
- Pin CLI-owned SDK defaults and the packaged native HTTP contract to SDK 0.53.1
|
package/README.md
CHANGED
|
@@ -720,8 +720,9 @@ sections and keys per DSM language. See `synopkgland skill show dsm-texts` and
|
|
|
720
720
|
|
|
721
721
|
### Raw TCP protocols
|
|
722
722
|
|
|
723
|
-
Declare `tcp_listeners` for a native Go
|
|
723
|
+
Declare `tcp_listeners` for a native Go protocol listener, then call
|
|
724
724
|
`ipc.ListenTCP(ctx, "declared_id", port)` directly. Omit `scope` or set it to
|
|
725
|
-
`loopback` to bind IPv4 `127.0.0.1
|
|
725
|
+
`loopback` to bind IPv4 `127.0.0.1`; use `scope: all` to bind IPv4 `0.0.0.0`,
|
|
726
|
+
exposed on all IPv4 interfaces. `check` validates bind scope,
|
|
726
727
|
port bounds and SDK policy support; audit rejects undeclared/dynamic IDs and
|
|
727
728
|
constructor aliases. See `synopkgland skill show raw-tcp`.
|
package/dist/error-registry.js
CHANGED
|
@@ -716,7 +716,7 @@ export const ERROR_REGISTRY = {
|
|
|
716
716
|
STANDALONE_TCP_LISTENERS_INVALID: {
|
|
717
717
|
code: "STANDALONE_TCP_LISTENERS_INVALID",
|
|
718
718
|
description: "A raw TCP listener declaration has invalid names, fields, scopes or port bounds.",
|
|
719
|
-
suggestion: "Declare tcp_listeners.<id> with port 1024..65535, scope loopback (default
|
|
719
|
+
suggestion: "Declare tcp_listeners.<id> with port 1024..65535, scope loopback (default) or all, and optional port_range: [min,max] including port.",
|
|
720
720
|
},
|
|
721
721
|
STANDALONE_TCP_LISTENERS_UNSUPPORTED: {
|
|
722
722
|
code: "STANDALONE_TCP_LISTENERS_UNSUPPORTED",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"module":"github.com/synopackageland/syno-pkg-land-sdk","version":"0.53.
|
|
1
|
+
{"module":"github.com/synopackageland/syno-pkg-land-sdk","version":"0.53.2","local":false}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { goPrivateCovers } from './go-env.js';
|
|
2
2
|
import { type ExecutorManifest } from './sdk-executor-manifest.js';
|
|
3
3
|
/** Pinned SDK for CLI-owned controllers and Compose planning; App pins take precedence. */
|
|
4
|
-
export declare const DEFAULT_SDK_VERSION = "0.53.
|
|
4
|
+
export declare const DEFAULT_SDK_VERSION = "0.53.2";
|
|
5
5
|
export declare const SDK_PACKAGE = "@synopackageland/sdk";
|
|
6
6
|
export declare const SDK_MODULE = "github.com/synopackageland/syno-pkg-land-sdk";
|
|
7
7
|
export declare const EXECUTOR_MODULE = "github.com/synopackageland/syno-pkg-land-sdk/executor";
|
|
@@ -5,7 +5,7 @@ import { tmpdir } from 'node:os';
|
|
|
5
5
|
import { join } from 'node:path';
|
|
6
6
|
import { readExecutorManifest, predatesExecutorManifest } from './sdk-executor-manifest.js';
|
|
7
7
|
/** Pinned SDK for CLI-owned controllers and Compose planning; App pins take precedence. */
|
|
8
|
-
export const DEFAULT_SDK_VERSION = '0.53.
|
|
8
|
+
export const DEFAULT_SDK_VERSION = '0.53.2';
|
|
9
9
|
export const SDK_PACKAGE = '@synopackageland/sdk';
|
|
10
10
|
export const SDK_MODULE = 'github.com/synopackageland/syno-pkg-land-sdk';
|
|
11
11
|
export const EXECUTOR_MODULE = `${SDK_MODULE}/executor`;
|
package/dist/skill.js
CHANGED
|
@@ -33,7 +33,7 @@ const SKILL_CATALOG = [
|
|
|
33
33
|
when: "Needs a DSM sign-in",
|
|
34
34
|
},
|
|
35
35
|
{ id: "dsm-texts", file: "reference/dsm-texts.md", when: "Ship native DSM sections and fixed desktop notification strings" },
|
|
36
|
-
{ id: "raw-tcp", file: "reference/raw-tcp.md", when: "Declare loopback-
|
|
36
|
+
{ id: "raw-tcp", file: "reference/raw-tcp.md", when: "Declare loopback or all-interface raw TCP protocol listeners and their port boundary" },
|
|
37
37
|
{ id: "mobile", file: "reference/mobile.md", when: "Register an App for the mobile shell and generate its SDK entry page" },
|
|
38
38
|
{ id: "files", file: "reference/files.md", when: "Needs NAS files" },
|
|
39
39
|
{
|
|
@@ -14,7 +14,7 @@ export type SpkKind = "native-go" | "native-python" | "native-node" | "native-ru
|
|
|
14
14
|
export interface SpkInspection {
|
|
15
15
|
/** Archived DSM language -> native section -> sorted keys (no text values). */
|
|
16
16
|
nativeTexts?: Record<string, Record<string, string[]>>;
|
|
17
|
-
/**
|
|
17
|
+
/** Manifest policy recorded at build time; not proof of runtime listener health. */
|
|
18
18
|
tcpListeners?: TCPListeners;
|
|
19
19
|
dependencies?: PackageDependencies;
|
|
20
20
|
installSettings?: InstallSettings;
|
|
@@ -17,20 +17,20 @@ export function readTCPListeners(raw) {
|
|
|
17
17
|
invalid(`${id}: use a lowercase letter followed by lowercase letters, digits or underscores (max 64); accepted fields: scope, port, port_range.`);
|
|
18
18
|
const v = value;
|
|
19
19
|
const scope = v.scope === undefined ? 'loopback' : v.scope;
|
|
20
|
-
if (scope !== 'loopback')
|
|
21
|
-
invalid(`${id}.scope must be loopback (default,
|
|
20
|
+
if (scope !== 'loopback' && scope !== 'all')
|
|
21
|
+
invalid(`${id}.scope must be loopback (default, 127.0.0.1) or explicit all (0.0.0.0), IPv4 only.`);
|
|
22
22
|
if (!Number.isInteger(v.port) || Number(v.port) < 1024 || Number(v.port) > 65535)
|
|
23
23
|
invalid(`${id}.port must be an integer from 1024 to 65535.`);
|
|
24
24
|
const range = v.port_range;
|
|
25
25
|
if (range !== undefined && (!Array.isArray(range) || range.length !== 2 || range.some(p => !Number.isInteger(p) || p < 1024 || p > 65535) || range[0] > range[1] || Number(v.port) < range[0] || Number(v.port) > range[1]))
|
|
26
26
|
invalid(`${id}.port_range must be [min,max] within 1024..65535 and include port; omit it to allow only port.`);
|
|
27
|
-
result[id] = { scope:
|
|
27
|
+
result[id] = { scope: scope, port: v.port, ...(range !== undefined ? { port_range: range } : {}) };
|
|
28
28
|
}
|
|
29
29
|
const entries = Object.entries(result);
|
|
30
30
|
for (let i = 0; i < entries.length; i++)
|
|
31
31
|
for (let j = i + 1; j < entries.length; j++)
|
|
32
32
|
if (entries[i][1].port === entries[j][1].port)
|
|
33
|
-
invalid(`${entries[j][0]} default port conflicts with ${entries[i][0]}; loopback bindings share the IPv4 port space.`);
|
|
33
|
+
invalid(`${entries[j][0]} default port conflicts with ${entries[i][0]}; all and loopback bindings share the IPv4 port space.`);
|
|
34
34
|
return result;
|
|
35
35
|
}
|
|
36
36
|
export function tcpSDKProblem(backend) {
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"type": "object",
|
|
26
26
|
"required": ["port"],
|
|
27
27
|
"properties": {
|
|
28
|
-
"scope": {"enum": ["loopback"], "default": "loopback"},
|
|
28
|
+
"scope": {"enum": ["loopback", "all"], "default": "loopback"},
|
|
29
29
|
"port": {"type": "integer", "minimum": 1024, "maximum": 65535},
|
|
30
30
|
"port_range": {"type": "array", "minItems": 2, "maxItems": 2, "items": {"type": "integer", "minimum": 1024, "maximum": 65535}}
|
|
31
31
|
},
|
package/skills/SKILL.md
CHANGED
|
@@ -7,8 +7,8 @@ description: Initialize, extend, check, build, inspect, and deploy Synology appl
|
|
|
7
7
|
|
|
8
8
|
For native DSM strings and fixed desktop notifications, read
|
|
9
9
|
[reference/dsm-texts.md](reference/dsm-texts.md) (`synopkgland skill show dsm-texts`).
|
|
10
|
-
For
|
|
11
|
-
|
|
10
|
+
For raw TCP protocols (`scope: loopback` by default, or `scope: all` for all IPv4
|
|
11
|
+
interfaces), read [reference/raw-tcp.md](reference/raw-tcp.md)
|
|
12
12
|
(`synopkgland skill show raw-tcp`).
|
|
13
13
|
|
|
14
14
|
For mobile registration, entry pages and native-shell capabilities, read
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
the native Go package's build-bound manifest declaration. This supports private
|
|
5
5
|
protocols such as a loopback SMTP relay without permitting arbitrary `net.Listen`
|
|
6
6
|
constructors in shipped application binaries. The CLI and Go SDK use TCP policy
|
|
7
|
-
v1 with loopback-
|
|
7
|
+
v1 with loopback or all-interface declarations.
|
|
8
8
|
|
|
9
9
|
```yaml
|
|
10
10
|
# dsm-package.yaml, schema 2
|
|
@@ -26,9 +26,10 @@ defer listener.Close()
|
|
|
26
26
|
|
|
27
27
|
A zero requested port selects the manifest default, rather than an ephemeral
|
|
28
28
|
port. Without `port_range`, only that fixed default is allowed. All ports must
|
|
29
|
-
be unprivileged integers, 1024–65535.
|
|
30
|
-
`tcp4` on `127.0.0.1
|
|
31
|
-
|
|
29
|
+
be unprivileged integers, 1024–65535. Only the declaration selects the address:
|
|
30
|
+
`scope: loopback` (default) means `tcp4` on `127.0.0.1`; explicit `scope: all`
|
|
31
|
+
means `tcp4` on `0.0.0.0`, exposed on all IPv4 interfaces. IPv6, DNS names,
|
|
32
|
+
arbitrary host strings and privileged ports are unsupported. Names use lowercase ASCII letters, digits and underscores,
|
|
32
33
|
start with a letter and have at most 64 characters. At most 64 declarations are
|
|
33
34
|
allowed. Duplicate default ports fail CLI validation; overlapping configurable
|
|
34
35
|
ranges are allowed and runtime binding decides conflicts. No DSM firewall rule,
|