@six5536/smllm 0.4.1 → 0.6.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/README.md +38 -0
- package/bin/smllm.js +7 -0
- package/lib/binary.js +5 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ Claude Code, Codex, Gemini CLI, Cursor, and other agent harnesses.
|
|
|
13
13
|
- [Usage](#usage)
|
|
14
14
|
- [Documentation](#documentation)
|
|
15
15
|
- [Licence](#licence)
|
|
16
|
+
- [Third-party notices](#third-party-notices)
|
|
16
17
|
|
|
17
18
|
## Install
|
|
18
19
|
|
|
@@ -57,3 +58,40 @@ guide and the notes on development.
|
|
|
57
58
|
|
|
58
59
|
smllm is licensed under the MIT licence. The
|
|
59
60
|
[LICENSE](https://github.com/six5536/smllm/blob/main/LICENSE) file has the full text.
|
|
61
|
+
|
|
62
|
+
## Third-party notices
|
|
63
|
+
|
|
64
|
+
The smllm binary embeds the JSON Schema meta-schemas of draft-07 and draft 2020-12, which json-schema.org
|
|
65
|
+
publishes in the [json-schema-spec repository](https://github.com/json-schema-org/json-schema-spec),
|
|
66
|
+
to check the schema of each JSON param. They are under the BSD 3-Clause licence:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
Copyright (c) 2022 JSON Schema Specification Authors
|
|
70
|
+
|
|
71
|
+
Redistribution and use in source and binary forms, with or without
|
|
72
|
+
modification, are permitted provided that the following conditions are
|
|
73
|
+
met:
|
|
74
|
+
|
|
75
|
+
1. Redistributions of source code must retain the above copyright
|
|
76
|
+
notice, this list of conditions and the following disclaimer.
|
|
77
|
+
|
|
78
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
79
|
+
notice, this list of conditions and the following disclaimer in the
|
|
80
|
+
documentation and/or other materials provided with the distribution.
|
|
81
|
+
|
|
82
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
83
|
+
contributors may be used to endorse or promote products derived from
|
|
84
|
+
this software without specific prior written permission.
|
|
85
|
+
|
|
86
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
87
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
88
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
89
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
90
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
91
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
92
|
+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
93
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
94
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
95
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
96
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
97
|
+
```
|
package/bin/smllm.js
CHANGED
|
@@ -8,6 +8,9 @@ const { spawnSync } = require("node:child_process");
|
|
|
8
8
|
const { resolveBinary, exitCode } = require("../lib/binary");
|
|
9
9
|
|
|
10
10
|
let binary;
|
|
11
|
+
// sokf-implements: LNCH-1_AC-5
|
|
12
|
+
// sokf-implements: LNCH-1_AC-6
|
|
13
|
+
// sokf-implements: LNCH-1_AC-8
|
|
11
14
|
try {
|
|
12
15
|
binary = resolveBinary(process.platform, process.arch);
|
|
13
16
|
} catch (err) {
|
|
@@ -15,11 +18,15 @@ try {
|
|
|
15
18
|
process.exit(1);
|
|
16
19
|
}
|
|
17
20
|
|
|
21
|
+
// sokf-implements: LNCH-1_AC-1
|
|
18
22
|
const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
19
23
|
|
|
24
|
+
// sokf-implements: LNCH-1_AC-7
|
|
25
|
+
// sokf-implements: LNCH-1_AC-8
|
|
20
26
|
if (result.error) {
|
|
21
27
|
process.stderr.write(`failed to run smllm: ${result.error.message}\n`);
|
|
22
28
|
process.exit(1);
|
|
23
29
|
}
|
|
24
30
|
|
|
31
|
+
// sokf-implements: LNCH-1_AC-2
|
|
25
32
|
process.exit(exitCode(result));
|
package/lib/binary.js
CHANGED
|
@@ -34,6 +34,7 @@ function binaryName(platform) {
|
|
|
34
34
|
*/
|
|
35
35
|
function resolveBinary(platform, arch, requireResolve = require.resolve) {
|
|
36
36
|
const pkg = selectPackage(platform, arch);
|
|
37
|
+
// sokf-implements: LNCH-1_AC-5
|
|
37
38
|
if (!pkg) {
|
|
38
39
|
throw new Error(
|
|
39
40
|
`No prebuilt smllm binary for ${platform}-${arch}.\n` +
|
|
@@ -41,6 +42,7 @@ function resolveBinary(platform, arch, requireResolve = require.resolve) {
|
|
|
41
42
|
`Install from source instead: cargo install smllm`,
|
|
42
43
|
);
|
|
43
44
|
}
|
|
45
|
+
// sokf-implements: LNCH-1_AC-6
|
|
44
46
|
try {
|
|
45
47
|
return requireResolve(`${pkg}/bin/${binaryName(platform)}`);
|
|
46
48
|
} catch {
|
|
@@ -60,6 +62,9 @@ function resolveBinary(platform, arch, requireResolve = require.resolve) {
|
|
|
60
62
|
* than a misleading 1. `signals` is injected for testability and defaults to
|
|
61
63
|
* Node's own table.
|
|
62
64
|
*/
|
|
65
|
+
// sokf-implements: LNCH-1_AC-2
|
|
66
|
+
// sokf-implements: LNCH-1_AC-3
|
|
67
|
+
// sokf-implements: LNCH-1_AC-4
|
|
63
68
|
function exitCode(result, signals = require("node:os").constants.signals) {
|
|
64
69
|
if (result.signal) {
|
|
65
70
|
const signum = signals[result.signal];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@six5536/smllm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "State machines for LLM agents: declarative workflows that drive a coding agent through its hooks and one MCP tool.",
|
|
5
5
|
"homepage": "https://github.com/six5536/smllm#readme",
|
|
6
6
|
"repository": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"node": ">=18"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@six5536/smllm-linux-x64": "0.
|
|
38
|
-
"@six5536/smllm-linux-arm64": "0.
|
|
39
|
-
"@six5536/smllm-darwin-x64": "0.
|
|
40
|
-
"@six5536/smllm-darwin-arm64": "0.
|
|
41
|
-
"@six5536/smllm-win32-x64": "0.
|
|
37
|
+
"@six5536/smllm-linux-x64": "0.6.0",
|
|
38
|
+
"@six5536/smllm-linux-arm64": "0.6.0",
|
|
39
|
+
"@six5536/smllm-darwin-x64": "0.6.0",
|
|
40
|
+
"@six5536/smllm-darwin-arm64": "0.6.0",
|
|
41
|
+
"@six5536/smllm-win32-x64": "0.6.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"test": "node --test test/*.test.js"
|