moltblock 0.7.7 → 0.8.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/dist/cli.js CHANGED
@@ -7,10 +7,12 @@ import { program } from "commander";
7
7
  import { CodeEntity } from "./entity.js";
8
8
  import { defaultCodeEntityBindings } from "./config.js";
9
9
  import { validateTask } from "./validation.js";
10
+ import { VERSION } from "./index.js";
10
11
  async function main() {
11
12
  program
12
13
  .name("moltblock")
13
14
  .description("Moltblock Code Entity — one task through the loop.")
15
+ .version(VERSION, "-V, --version", "Output the current version")
14
16
  .argument("<task>", "Task description (e.g. 'Implement a function add(a,b) that returns a+b.')")
15
17
  .option("-t, --test <path>", "Path to file containing test code (e.g. vitest test module). If omitted, only syntax check.")
16
18
  .option("--json", "Output result as JSON (draft, critique, final, verification_passed, authoritative_artifact).")
package/dist/gateway.js CHANGED
@@ -49,11 +49,18 @@ export class LLMGateway {
49
49
  this.model = await resolveLocalModel(this.client, this.binding.baseUrl, this.model);
50
50
  this.modelResolved = true;
51
51
  }
52
- const resp = await this.client.chat.completions.create({
53
- model: this.model,
54
- messages: messages.map((m) => ({ role: m.role, content: m.content })),
55
- max_tokens: maxTokens,
56
- });
52
+ let resp;
53
+ try {
54
+ resp = await this.client.chat.completions.create({
55
+ model: this.model,
56
+ messages: messages.map((m) => ({ role: m.role, content: m.content })),
57
+ max_tokens: maxTokens,
58
+ });
59
+ }
60
+ catch (err) {
61
+ const base = this.binding.baseUrl;
62
+ throw new Error(`LLM request failed (model=${this.model}, baseUrl=${base}): ${err instanceof Error ? err.message : String(err)}`);
63
+ }
57
64
  const choice = resp.choices[0];
58
65
  if (!choice?.message) {
59
66
  return "";
@@ -52,7 +52,13 @@ export async function runEval(runTask, evalTasks, store) {
52
52
  let passed = 0;
53
53
  for (const task of evalTasks) {
54
54
  const t0 = performance.now();
55
- const ok = await runTask(task);
55
+ let ok;
56
+ try {
57
+ ok = await runTask(task);
58
+ }
59
+ catch {
60
+ ok = false;
61
+ }
56
62
  const latency = (performance.now() - t0) / 1000;
57
63
  if (store) {
58
64
  recordOutcome(store, ok, latency, task.slice(0, 100));
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.6.0";
4
+ export declare const VERSION = "0.8.0";
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Moltblock — framework for evolving composite intelligences (Entities).
3
3
  */
4
- export const VERSION = "0.6.0";
4
+ export const VERSION = "0.8.0";
5
5
  // Memory
6
6
  export { WorkingMemory } from "./memory.js";
7
7
  // Signing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moltblock",
3
- "version": "0.7.7",
3
+ "version": "0.8.0",
4
4
  "description": "Framework for building evolving composite AI intelligences (Entities)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,7 +31,11 @@
31
31
  "moltblock"
32
32
  ],
33
33
  "author": "",
34
- "license": "Apache-2.0",
34
+ "license": "MIT",
35
+ "homepage": "https://github.com/moltblock/moltblock",
36
+ "bugs": {
37
+ "url": "https://github.com/moltblock/moltblock/issues"
38
+ },
35
39
  "repository": {
36
40
  "type": "git",
37
41
  "url": "https://github.com/moltblock/moltblock"
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.7.7
4
+ version: 0.8.0
5
5
  metadata:
6
6
  openclaw:
7
7
  requires:
@@ -15,7 +15,7 @@ metadata:
15
15
  homepage: https://github.com/moltblock/moltblock
16
16
  install:
17
17
  - kind: node
18
- package: moltblock@0.7.7
18
+ package: moltblock@0.8.0
19
19
  bins: [moltblock]
20
20
  ---
21
21
 
@@ -46,7 +46,7 @@ Verify a task before execution.
46
46
  ### Usage
47
47
 
48
48
  ```bash
49
- npx moltblock@0.7.7 "<task description>" --provider <provider> --json
49
+ npx moltblock@0.8.0 "<task description>" --provider <provider> --json
50
50
  ```
51
51
 
52
52
  ### Parameters
@@ -71,10 +71,10 @@ No API key is required — moltblock falls back to a local LLM (localhost:1234)
71
71
 
72
72
  ```bash
73
73
  # Verify a task
74
- npx moltblock@0.7.7 "implement a function that validates email addresses" --json
74
+ npx moltblock@0.8.0 "implement a function that validates email addresses" --json
75
75
 
76
76
  # Verify code with tests
77
- npx moltblock@0.7.7 "implement a markdown-to-html converter" --test ./tests/markdown.test.ts --json
77
+ npx moltblock@0.8.0 "implement a markdown-to-html converter" --test ./tests/markdown.test.ts --json
78
78
  ```
79
79
 
80
80
  ### Output (JSON mode)
@@ -95,13 +95,13 @@ npx moltblock@0.7.7 "implement a markdown-to-html converter" --test ./tests/mark
95
95
  Use directly with npx (recommended, no install needed):
96
96
 
97
97
  ```bash
98
- npx moltblock@0.7.7 "your task" --json
98
+ npx moltblock@0.8.0 "your task" --json
99
99
  ```
100
100
 
101
101
  Or install globally:
102
102
 
103
103
  ```bash
104
- npm install -g moltblock@0.7.7
104
+ npm install -g moltblock@0.8.0
105
105
  ```
106
106
 
107
107
  ## Configuration
@@ -128,7 +128,7 @@ See the [full configuration docs](https://github.com/moltblock/moltblock#configu
128
128
 
129
129
  - Repository: [github.com/moltblock/moltblock](https://github.com/moltblock/moltblock)
130
130
  - npm: [npmjs.com/package/moltblock](https://www.npmjs.com/package/moltblock)
131
- - License: Apache-2.0
131
+ - License: MIT
132
132
 
133
133
  ## Disclaimer
134
134