moltblock 0.11.0 → 0.11.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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/skill/SKILL.md +29 -14
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Moltblock — framework for evolving composite intelligences (Entities).
|
|
3
3
|
*/
|
|
4
|
-
export declare const VERSION = "0.11.
|
|
4
|
+
export declare const VERSION = "0.11.1";
|
|
5
5
|
export type { ModelBinding, BindingEntry, AgentConfig, MoltblockConfig, ChatMessage, VerifiedMemoryEntry, CheckpointEntry, OutcomeEntry, InboxEntry, StrategySuggestion, ReceivedArtifact, GovernanceConfig, } from "./types.js";
|
|
6
6
|
export { WorkingMemory } from "./memory.js";
|
|
7
7
|
export { signArtifact, verifyArtifact, artifactHash } from "./signing.js";
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: moltblock - Trust Layer for AI Agents
|
|
3
3
|
description: Verification gating for AI-generated artifacts. Policy checks and code verification to catch dangerous patterns before execution.
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
metadata:
|
|
6
6
|
openclaw:
|
|
7
7
|
requires:
|
|
@@ -12,10 +12,14 @@ metadata:
|
|
|
12
12
|
- moltblock.json
|
|
13
13
|
- ~/.moltblock/moltblock.json
|
|
14
14
|
primaryEnv: OPENAI_API_KEY
|
|
15
|
+
optionalEnv:
|
|
16
|
+
- ANTHROPIC_API_KEY
|
|
17
|
+
- GOOGLE_API_KEY
|
|
18
|
+
- ZAI_API_KEY
|
|
15
19
|
homepage: https://github.com/moltblock/moltblock
|
|
16
20
|
install:
|
|
17
21
|
- kind: node
|
|
18
|
-
package: moltblock@0.
|
|
22
|
+
package: moltblock@0.11.0
|
|
19
23
|
bins: [moltblock]
|
|
20
24
|
---
|
|
21
25
|
|
|
@@ -27,9 +31,9 @@ Moltblock provides verification gating for AI-generated artifacts. It runs polic
|
|
|
27
31
|
|
|
28
32
|
**What moltblock does:**
|
|
29
33
|
- Generates code via LLM API calls, then runs policy checks against the output
|
|
30
|
-
- When `--test` is provided, executes vitest to verify generated code against
|
|
34
|
+
- When `--test` is provided, executes vitest to verify generated code against a user-provided test file (see **Security: Test Execution** below)
|
|
31
35
|
- Reads its own config files (`moltblock.json`, `~/.moltblock/moltblock.json`) if present
|
|
32
|
-
- API keys are read from environment variables at runtime
|
|
36
|
+
- API keys are read from environment variables at runtime and sent only to the configured LLM provider endpoint
|
|
33
37
|
|
|
34
38
|
## When to Use
|
|
35
39
|
|
|
@@ -46,7 +50,7 @@ Verify a task before execution.
|
|
|
46
50
|
### Usage
|
|
47
51
|
|
|
48
52
|
```bash
|
|
49
|
-
npx moltblock@0.
|
|
53
|
+
npx moltblock@0.11.0 "<task description>" --provider <provider> --json
|
|
50
54
|
```
|
|
51
55
|
|
|
52
56
|
### Parameters
|
|
@@ -61,20 +65,20 @@ npx moltblock@0.8.0 "<task description>" --provider <provider> --json
|
|
|
61
65
|
|
|
62
66
|
### Environment Variables
|
|
63
67
|
|
|
64
|
-
|
|
65
|
-
- `OPENAI_API_KEY` — OpenAI
|
|
66
|
-
- `ANTHROPIC_API_KEY` — Anthropic/Claude
|
|
67
|
-
- `GOOGLE_API_KEY` — Google/Gemini
|
|
68
|
-
- `ZAI_API_KEY` — ZAI
|
|
68
|
+
Moltblock auto-detects the LLM provider from whichever API key is set. If no key is set, it falls back to a local LLM at `localhost:1234`. Set **one** of these for a cloud provider:
|
|
69
|
+
- `OPENAI_API_KEY` — OpenAI (primary)
|
|
70
|
+
- `ANTHROPIC_API_KEY` — Anthropic/Claude (optional)
|
|
71
|
+
- `GOOGLE_API_KEY` — Google/Gemini (optional)
|
|
72
|
+
- `ZAI_API_KEY` — ZAI (optional)
|
|
69
73
|
|
|
70
74
|
### Example
|
|
71
75
|
|
|
72
76
|
```bash
|
|
73
77
|
# Verify a task
|
|
74
|
-
npx moltblock@0.
|
|
78
|
+
npx moltblock@0.11.0 "implement a function that validates email addresses" --json
|
|
75
79
|
|
|
76
80
|
# Verify code with tests
|
|
77
|
-
npx moltblock@0.
|
|
81
|
+
npx moltblock@0.11.0 "implement a markdown-to-html converter" --test ./tests/markdown.test.ts --json
|
|
78
82
|
```
|
|
79
83
|
|
|
80
84
|
### Output (JSON mode)
|
|
@@ -95,13 +99,13 @@ npx moltblock@0.8.0 "implement a markdown-to-html converter" --test ./tests/mark
|
|
|
95
99
|
Use directly with npx (recommended, no install needed):
|
|
96
100
|
|
|
97
101
|
```bash
|
|
98
|
-
npx moltblock@0.
|
|
102
|
+
npx moltblock@0.11.0 "your task" --json
|
|
99
103
|
```
|
|
100
104
|
|
|
101
105
|
Or install globally:
|
|
102
106
|
|
|
103
107
|
```bash
|
|
104
|
-
npm install -g moltblock@0.
|
|
108
|
+
npm install -g moltblock@0.11.0
|
|
105
109
|
```
|
|
106
110
|
|
|
107
111
|
## Configuration
|
|
@@ -130,6 +134,17 @@ See the [full configuration docs](https://github.com/moltblock/moltblock#configu
|
|
|
130
134
|
- npm: [npmjs.com/package/moltblock](https://www.npmjs.com/package/moltblock)
|
|
131
135
|
- License: MIT
|
|
132
136
|
|
|
137
|
+
## Security: Test Execution
|
|
138
|
+
|
|
139
|
+
When `--test` is used, moltblock writes LLM-generated code to a temporary file and runs vitest against it using the user-provided test file. **This executes LLM-generated code in a Node.js process on the host machine.** Mitigations:
|
|
140
|
+
|
|
141
|
+
- The test file path must be provided explicitly by the user — moltblock does not select or generate test files
|
|
142
|
+
- Generated code is written to `os.tmpdir()` and cleaned up after execution
|
|
143
|
+
- Policy rules run **before** test execution to deny known dangerous patterns (e.g. `rm -rf`, `eval`, `child_process`, filesystem writes)
|
|
144
|
+
- Without `--test`, no code execution occurs — only policy checks run against the generated artifact
|
|
145
|
+
|
|
146
|
+
**Residual risk:** Policy rules are pattern-based and cannot catch all dangerous code. LLM-generated code executed via `--test` may perform arbitrary actions within the permissions of the Node.js process. Users should review generated code or run moltblock in a sandboxed environment when verifying untrusted tasks.
|
|
147
|
+
|
|
133
148
|
## Disclaimer
|
|
134
149
|
|
|
135
150
|
Moltblock reduces risk but does not eliminate it. Verification is best-effort — policy rules and LLM-based checks can miss dangerous patterns. Always review generated artifacts before executing them. The authors and contributors are not responsible for any damage, data loss, or security incidents resulting from the use of this tool. Use at your own risk.
|