moltblock 0.6.3 → 0.7.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/README.md CHANGED
@@ -116,7 +116,7 @@ npx moltblock "Implement add(a, b)." --json
116
116
 
117
117
  Override with CLI flags: `--provider google --model gemini-2.0-flash` or `-p zai -m glm-4.7`.
118
118
 
119
- Detection priority: `OPENAI_API_KEY` > `GOOGLE_API_KEY` > `MOLTBLOCK_ZAI_API_KEY` > localhost.
119
+ Detection priority: `OPENAI_API_KEY` > `GOOGLE_API_KEY` > `ZAI_API_KEY` > localhost.
120
120
 
121
121
  ### Quick setup
122
122
 
@@ -181,7 +181,7 @@ Set API keys via environment variables (never in config files):
181
181
  | OpenAI | `OPENAI_API_KEY` |
182
182
  | Anthropic Claude | `ANTHROPIC_API_KEY` |
183
183
  | Google Gemini | `GOOGLE_API_KEY` |
184
- | Z.ai | `MOLTBLOCK_ZAI_API_KEY` |
184
+ | Z.ai | `ZAI_API_KEY` |
185
185
  | Artifact signing | `MOLTBLOCK_SIGNING_KEY` (required in production) |
186
186
 
187
187
  ### Check which config is being used
package/dist/config.d.ts CHANGED
@@ -90,7 +90,7 @@ export interface BindingOverrides {
90
90
  }
91
91
  /**
92
92
  * Auto-detect the best available provider from environment variables.
93
- * Priority: explicit override > OPENAI_API_KEY > GOOGLE_API_KEY > MOLTBLOCK_ZAI_API_KEY/ZAI_API_KEY > local.
93
+ * Priority: explicit override > OPENAI_API_KEY > GOOGLE_API_KEY > ZAI_API_KEY > local.
94
94
  */
95
95
  export declare function detectProvider(overrideProvider?: string, overrideModel?: string): {
96
96
  backend: string;
package/dist/config.js CHANGED
@@ -15,7 +15,7 @@ function safeJsonParse(text) {
15
15
  return value;
16
16
  });
17
17
  }
18
- // Load .env so MOLTBLOCK_ZAI_API_KEY etc. can be set there
18
+ // Load .env so ZAI_API_KEY etc. can be set there
19
19
  try {
20
20
  const dotenv = await import("dotenv");
21
21
  dotenv.config({ quiet: true });
@@ -27,7 +27,7 @@ catch {
27
27
  const PROVIDER_DEFAULTS = {
28
28
  openai: { baseUrl: "https://api.openai.com/v1", model: "gpt-4o", envKey: "OPENAI_API_KEY" },
29
29
  google: { baseUrl: "https://generativelanguage.googleapis.com/v1beta/openai/", model: "gemini-2.0-flash", envKey: "GOOGLE_API_KEY" },
30
- zai: { baseUrl: "https://api.z.ai/api/paas/v4", model: "glm-4.7-flash", envKey: "MOLTBLOCK_ZAI_API_KEY" },
30
+ zai: { baseUrl: "https://api.z.ai/api/paas/v4", model: "glm-4.7-flash", envKey: "ZAI_API_KEY" },
31
31
  local: { baseUrl: "http://localhost:1234/v1", model: "local", envKey: "" },
32
32
  };
33
33
  // --- Zod schemas (OpenClaw-style config) ---
@@ -292,13 +292,13 @@ function getApiKeyForBackend(backend) {
292
292
  return env("GOOGLE_API_KEY") || null;
293
293
  }
294
294
  if (backendLower === "zai") {
295
- return env("MOLTBLOCK_ZAI_API_KEY") || env("ZAI_API_KEY") || null;
295
+ return env("ZAI_API_KEY") || null;
296
296
  }
297
297
  return null;
298
298
  }
299
299
  /**
300
300
  * Auto-detect the best available provider from environment variables.
301
- * Priority: explicit override > OPENAI_API_KEY > GOOGLE_API_KEY > MOLTBLOCK_ZAI_API_KEY/ZAI_API_KEY > local.
301
+ * Priority: explicit override > OPENAI_API_KEY > GOOGLE_API_KEY > ZAI_API_KEY > local.
302
302
  */
303
303
  export function detectProvider(overrideProvider, overrideModel) {
304
304
  if (overrideProvider) {
@@ -318,7 +318,6 @@ export function detectProvider(overrideProvider, overrideModel) {
318
318
  const priority = [
319
319
  { name: "openai", envKey: "OPENAI_API_KEY" },
320
320
  { name: "google", envKey: "GOOGLE_API_KEY" },
321
- { name: "zai", envKey: "MOLTBLOCK_ZAI_API_KEY" },
322
321
  { name: "zai", envKey: "ZAI_API_KEY" },
323
322
  ];
324
323
  for (const { name, envKey } of priority) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moltblock",
3
- "version": "0.6.3",
3
+ "version": "0.7.1",
4
4
  "description": "Framework for building evolving composite AI intelligences (Entities)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/skill/SKILL.md CHANGED
@@ -1,6 +1,17 @@
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
+ homepage: https://github.com/moltblock/moltblock
5
+ metadata:
6
+ openclaw:
7
+ requires:
8
+ env:
9
+ - OPENAI_API_KEY
10
+ bins:
11
+ - node
12
+ - npx
13
+ primaryEnv: OPENAI_API_KEY
14
+ install: npm install -g moltblock@0.7.1
4
15
  ---
5
16
 
6
17
  # moltblock — Trust Layer for AI Agents
@@ -41,8 +52,9 @@ npx moltblock "<task description>" --provider <provider> --json
41
52
 
42
53
  Set one of these for provider auto-detection:
43
54
  - `OPENAI_API_KEY` — OpenAI
55
+ - `ANTHROPIC_API_KEY` — Anthropic/Claude
44
56
  - `GOOGLE_API_KEY` — Google/Gemini
45
- - `MOLTBLOCK_ZAI_API_KEY` — ZAI
57
+ - `ZAI_API_KEY` — ZAI
46
58
 
47
59
  ### Example
48
60
 
@@ -81,7 +93,9 @@ npx moltblock "your task" --json
81
93
 
82
94
  ## Configuration
83
95
 
84
- Optional. Place `moltblock.json` in your project root or `~/.moltblock/moltblock.json`:
96
+ No configuration file is required. Moltblock auto-detects your LLM provider from environment variables and falls back to sensible defaults. If you use OpenClaw, moltblock will also read your `openclaw.json` automatically.
97
+
98
+ Optionally, place `moltblock.json` in your project root or `~/.moltblock/moltblock.json` to customize bindings or policy rules:
85
99
 
86
100
  ```json
87
101
  {