From 19fa0f1033fe550d6d1193d1fce729997803bbed Mon Sep 17 00:00:00 2001 From: Tawan Date: Fri, 26 Jun 2026 23:38:57 +0800 Subject: [PATCH 1/9] Align extension metadata with 0.20 rc --- CHANGELOG.md | 2 +- README.md | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b1426a..460e4ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 0.20.0-rc.2 - Added VS Code commands for the 0.20 action-builder workflow: entry-witness ABI, action build plans, TypeScript builder generation, diff --git a/README.md b/README.md index 044ec17..725e4f6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The extension talks to the CellScript compiler through `cellc --lsp`, so editor ## How It Fits Into The Toolchain -The extension is a thin editor layer over the compiler. Syntax highlighting, snippets, and VS Code integration live in this repository, but language semantics come from `cellc`. That split keeps the editor useful without creating a second, weaker implementation of CellScript. +The extension is a compiler-backed editor surface. Syntax highlighting, snippets, and VS Code integration live in this repository, but language semantics come from `cellc`. That split keeps the editor useful without creating a second, weaker implementation of CellScript. There are two feedback loops: @@ -101,7 +101,7 @@ For package-based projects, run package commands from a file under the nearest ` ## Authoring Model -This README documents the current 0.17 authoring surface. The extension follows the current CellScript action surface: +This README documents the current 0.20 authoring surface. The extension follows the current CellScript action surface: ```cellscript action fill_offer(input: Offer) -> output: Offer { diff --git a/package-lock.json b/package-lock.json index b252162..05667e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cellscript-vscode", - "version": "0.17.0", + "version": "0.20.0-rc.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cellscript-vscode", - "version": "0.17.0", + "version": "0.20.0-rc.2", "license": "MIT", "devDependencies": { "@vscode/vsce": "^3.9.1", diff --git a/package.json b/package.json index 84a29d4..5a1dfb8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cellscript-vscode", "displayName": "CellScript", "description": "Production-grade local VS Code tooling for CellScript (.cell) contracts.", - "version": "0.17.0", + "version": "0.20.0-rc.2", "publisher": "arthurzhang", "license": "MIT", "main": "./dist/extension.js", From d63524182ed64de74d059a2da36680e267a1d368 Mon Sep 17 00:00:00 2001 From: Tawan Date: Sun, 28 Jun 2026 19:57:08 +0800 Subject: [PATCH 2/9] Bump extension to 0.20.0 --- CHANGELOG.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 460e4ab..ed0a69f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.20.0-rc.2 +## 0.20.0 - Added VS Code commands for the 0.20 action-builder workflow: entry-witness ABI, action build plans, TypeScript builder generation, diff --git a/package-lock.json b/package-lock.json index 05667e2..519ae67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cellscript-vscode", - "version": "0.20.0-rc.2", + "version": "0.20.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cellscript-vscode", - "version": "0.20.0-rc.2", + "version": "0.20.0", "license": "MIT", "devDependencies": { "@vscode/vsce": "^3.9.1", diff --git a/package.json b/package.json index 5a1dfb8..ebf0f2a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cellscript-vscode", "displayName": "CellScript", "description": "Production-grade local VS Code tooling for CellScript (.cell) contracts.", - "version": "0.20.0-rc.2", + "version": "0.20.0", "publisher": "arthurzhang", "license": "MIT", "main": "./dist/extension.js", From ec0a05b933b594fed0541c2022cf1665183978ea Mon Sep 17 00:00:00 2001 From: Tawan Date: Wed, 1 Jul 2026 08:47:38 +0800 Subject: [PATCH 3/9] Prepare VS Code extension 0.21 RC --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed0a69f..c5eff14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.21.0-rc.1 + +- Aligned the extension package metadata with the CellScript 0.21 release + candidate. +- Kept the editor command surface on the compiler-backed package, registry, + builder, ABI, metadata, and production-report commands while the compiler + adds the 0.21 CLI, MCP, receipt, ProtocolGraph, TemplateLayout, and + aggregate-helper evidence surfaces. +- Refreshed README wording for the current 0.21 authoring surface. + ## 0.20.0 - Added VS Code commands for the 0.20 action-builder workflow: diff --git a/README.md b/README.md index 725e4f6..09371fe 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ For package-based projects, run package commands from a file under the nearest ` ## Authoring Model -This README documents the current 0.20 authoring surface. The extension follows the current CellScript action surface: +This README documents the current 0.21 authoring surface. The extension follows the current CellScript action surface: ```cellscript action fill_offer(input: Offer) -> output: Offer { diff --git a/package-lock.json b/package-lock.json index 519ae67..2443099 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cellscript-vscode", - "version": "0.20.0", + "version": "0.21.0-rc.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cellscript-vscode", - "version": "0.20.0", + "version": "0.21.0-rc.1", "license": "MIT", "devDependencies": { "@vscode/vsce": "^3.9.1", diff --git a/package.json b/package.json index ebf0f2a..b30cc72 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cellscript-vscode", "displayName": "CellScript", "description": "Production-grade local VS Code tooling for CellScript (.cell) contracts.", - "version": "0.20.0", + "version": "0.21.0-rc.1", "publisher": "arthurzhang", "license": "MIT", "main": "./dist/extension.js", From 979f1f5835b9a3fd9a3580cc39611233d54cbdd3 Mon Sep 17 00:00:00 2001 From: Tawan Date: Sat, 4 Jul 2026 12:58:08 +0800 Subject: [PATCH 4/9] Align extension with CellScript 0.21 docs --- CHANGELOG.md | 3 ++ README.md | 8 +++++ docs/Tutorial-07-LSP-and-Tooling.md | 9 ++++++ extension.js | 12 +++---- scripts/validate.mjs | 23 +++++++++++--- snippets/cellscript.json | 49 +++++++++++++++++++++++++++-- syntaxes/cellscript.tmLanguage.json | 4 +-- 7 files changed, 93 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5eff14..0ebddef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ builder, ABI, metadata, and production-report commands while the compiler adds the 0.21 CLI, MCP, receipt, ProtocolGraph, TemplateLayout, and aggregate-helper evidence surfaces. +- Switched builder assumptions, transaction template, and deploy plan commands + to the canonical nested `cellc explain assumptions`, `cellc tx solve`, and + `cellc deploy plan` forms. - Refreshed README wording for the current 0.21 authoring surface. ## 0.20.0 diff --git a/README.md b/README.md index 09371fe..24bc922 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,12 @@ The command palette includes: These commands spawn `cellc` for one-shot evidence and build tasks. They do not replace release gates, deployment checks, transaction signing, or CKB node acceptance. +The 0.21 compiler also ships `cellscript-mcp`, compile receipts +(`cellc receipt`, `cellc sign-receipt`, `cellc verify-receipt`), +ProtocolGraph, TemplateLayout, and helper-backed aggregate evidence. Those +surfaces remain compiler/MCP commands rather than VS Code command-palette +commands in this extension release. + ## Requirements Install `cellc` and make sure it is available on `PATH`: @@ -162,6 +168,8 @@ This extension displays compiler evidence. It does not: - create audit signatures; - publish packages; - deploy code Cells; +- run `cellscript-mcp`; +- create, sign, or verify compile receipts; - sign transactions; - submit transactions; - replace `cargo test`, `cargo clippy`, `cellc check --production`, or chain acceptance scripts. diff --git a/docs/Tutorial-07-LSP-and-Tooling.md b/docs/Tutorial-07-LSP-and-Tooling.md index b73e9cb..960655f 100644 --- a/docs/Tutorial-07-LSP-and-Tooling.md +++ b/docs/Tutorial-07-LSP-and-Tooling.md @@ -95,12 +95,21 @@ The extension contributes commands for the local compiler and builder loop: | `CellScript: Show Constraints` | `cellc constraints` | | `CellScript: Show Entry Witness ABI` | selects an action/lock, then runs `cellc abi` | | `CellScript: Show Action Build Plan` | selects an action, then runs `cellc action build --json` | +| `CellScript: Show Builder Assumptions` | `cellc explain assumptions --json` | +| `CellScript: Show Transaction Template` | `cellc tx solve --json` | +| `CellScript: Show Deploy Plan` | `cellc deploy plan --json` | +| `CellScript: Show Profile` | `cellc profile --json` | +| `CellScript: Generate Audit Bundle` | `cellc audit-bundle --output --json` | | `CellScript: Generate TypeScript Action Builder` | `cellc gen-builder --target typescript` | | `CellScript: Verify Package` | `cellc package verify --json` | | `CellScript: Verify Registry` | `cellc registry verify --json` | | `CellScript: Verify Live Registry` | `cellc registry verify --live --json` | | `CellScript: Show Production Report` | compiler version + metadata + constraints + release-audit boundary | +The 0.21 compiler also ships `cellscript-mcp`, compile receipts, ProtocolGraph, +TemplateLayout, and helper-backed aggregate evidence. Those remain compiler/MCP +surfaces in this extension release rather than command-palette entries. + `CellScript: Show Production Report` is useful while editing because it displays compiler version, metadata, constraints, and release-audit boundaries. diff --git a/extension.js b/extension.js index 48fa4ef..60ebc16 100644 --- a/extension.js +++ b/extension.js @@ -649,25 +649,25 @@ function buildReportPlan(document, kind, cwd) { if (kind === "builder-assumptions") { return { - args: ["explain-assumptions", document.uri.fsPath, ...targetProfileArgs(document), "--json"], + args: ["explain", "assumptions", document.uri.fsPath, ...targetProfileArgs(document), "--json"], outputPath: null, - source: "cellc explain-assumptions" + source: "cellc explain assumptions" }; } if (kind === "tx-template") { return { - args: ["solve-tx", document.uri.fsPath, ...targetProfileArgs(document), "--json"], + args: ["tx", "solve", document.uri.fsPath, ...targetProfileArgs(document), "--json"], outputPath: null, - source: "cellc solve-tx" + source: "cellc tx solve" }; } if (kind === "deploy-plan") { return { - args: ["deploy-plan", document.uri.fsPath, ...targetProfileArgs(document), "--json"], + args: ["deploy", "plan", document.uri.fsPath, ...targetProfileArgs(document), "--json"], outputPath: null, - source: "cellc deploy-plan" + source: "cellc deploy plan" }; } diff --git a/scripts/validate.mjs b/scripts/validate.mjs index 397ba6d..f3f6fc5 100644 --- a/scripts/validate.mjs +++ b/scripts/validate.mjs @@ -143,7 +143,12 @@ for (const token of [ "assert_delta", "assert_distinct", "assert_singleton", - "retarget_type" + "retarget_type", + "module", + "enum", + "invariant", + "by", + "i32" ]) { if (!grammarText.includes(token)) { throw new Error(`grammar is missing current CellScript editor surface token: ${token}`); @@ -160,7 +165,12 @@ for (const snippet of [ "assert_delta", "assert_distinct", "assert_singleton", - "#[type_id" + "#[type_id", + "module ", + "use ", + "enum ", + "flow-edge-by-action", + "invariant " ]) { if (!snippetsText.includes(snippet)) { throw new Error(`snippets are missing current CellScript authoring surface: ${snippet}`); @@ -175,9 +185,12 @@ for (const token of [ "LanguageClient", "vscode-languageclient/node", ...requiredCommands, - "explain-assumptions", - "solve-tx", - "deploy-plan", + "explain", + "assumptions", + "tx", + "solve", + "deploy", + "plan", "profile", "audit-bundle", "cellc", diff --git a/snippets/cellscript.json b/snippets/cellscript.json index 1007d22..800fc5f 100644 --- a/snippets/cellscript.json +++ b/snippets/cellscript.json @@ -47,6 +47,30 @@ ], "description": "Create a CellScript receipt" }, + "Module": { + "prefix": "module", + "body": [ + "module ${1:cellscript::package::contract}" + ], + "description": "Declare a CellScript module path" + }, + "Use": { + "prefix": "use", + "body": [ + "use ${1:cellscript::package::module}::${2:Type}" + ], + "description": "Import a symbol from another CellScript module" + }, + "Enum": { + "prefix": "enum", + "body": [ + "enum ${1:State} {", + " ${2:Created},", + " ${3:Live}", + "}" + ], + "description": "Declare a CellScript enum" + }, "Effect Attribute": { "prefix": "effect", "body": [ @@ -113,9 +137,9 @@ "Transition": { "prefix": "transition", "body": [ - "transition ${1:input} -> ${2:output}" + "transition ${1:input}.${2:state}: ${3:From} -> ${4:output}.${2:state}: ${5:To}" ], - "description": "Declare a one-to-one input-output state continuation" + "description": "Declare a field-path state continuation" }, "Flow": { "prefix": "flow", @@ -126,6 +150,27 @@ ], "description": "Declare valid state edges for a state field" }, + "Flow Edge By Action": { + "prefix": "flow-edge-by-action", + "body": [ + "flow ${1:Name} for ${2:Type}.${3:state} {", + " ${4:Created} -> ${5:Live} by ${6:activate};", + "}" + ], + "description": "Declare a flow edge bound to an action" + }, + "Invariant": { + "prefix": "invariant", + "body": [ + "invariant ${1:name} {", + " trigger: ${2:type_group}", + " scope: ${3:group}", + " reads: ${4:group_inputs.amount}, ${5:group_outputs.amount}", + " assert_sum(${5}) == assert_sum(${4})", + "}" + ], + "description": "Declare an invariant with explicit trigger, scope, reads, and proof relation" + }, "Read Parameter": { "prefix": "read", "body": [ diff --git a/syntaxes/cellscript.tmLanguage.json b/syntaxes/cellscript.tmLanguage.json index 795bd52..27d328a 100644 --- a/syntaxes/cellscript.tmLanguage.json +++ b/syntaxes/cellscript.tmLanguage.json @@ -167,7 +167,7 @@ }, { "name": "keyword.other.cellscript", - "match": "\\b(has|store|consume|create|create_unique|replace_unique|read|read_ref|launch|transition|self|env|with_lock|assert|assert_invariant|invariant|require|preserve|from|input|output|protected|witness|lock_args|script_args|transfer|claim|settle|destroy|destroy_singleton_type|destroy_unique|destroy_instance|burn_amount|std|replace|burn|relock|retarget_type|identity|ckb_type_id|singleton_type|with_default_hash_type|with_capacity_floor)\\b" + "match": "\\b(has|store|consume|create|create_unique|replace_unique|read|read_ref|launch|transition|by|self|env|with_lock|assert|assert_invariant|invariant|require|preserve|from|input|output|protected|witness|lock_args|script_args|transfer|claim|settle|destroy|destroy_singleton_type|destroy_unique|destroy_instance|burn_amount|std|replace|burn|relock|retarget_type|identity|ckb_type_id|singleton_type|with_default_hash_type|with_capacity_floor)\\b" }, { "name": "constant.language.boolean.cellscript", @@ -179,7 +179,7 @@ "patterns": [ { "name": "storage.type.primitive.cellscript", - "match": "\\b(u8|u16|u32|u64|u128|bool|Address|Hash)\\b" + "match": "\\b(u8|u16|u32|i32|u64|u128|bool|Address|Hash)\\b" }, { "name": "support.type.collection.cellscript", From c0e8159b51673f97090091ae89ce75e014125f69 Mon Sep 17 00:00:00 2001 From: Arthur Zhang Date: Sun, 19 Jul 2026 04:45:32 +0800 Subject: [PATCH 5/9] release: align extension with CellScript 0.22.0 --- CHANGELOG.md | 8 ++++++++ README.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ebddef..4f7940a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.22.0 + +- Aligned the extension package metadata with the CellScript 0.22 language + line and its compiler-backed type, set, flow, evidence, and protocol-role + surfaces. +- Kept editor diagnostics, hover, completion, formatting, metadata, ProofPlan, + and production-report commands on the same canonical 0.22 compiler boundary. + ## 0.21.0-rc.1 - Aligned the extension package metadata with the CellScript 0.21 release diff --git a/README.md b/README.md index 24bc922..e971025 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ For package-based projects, run package commands from a file under the nearest ` ## Authoring Model -This README documents the current 0.21 authoring surface. The extension follows the current CellScript action surface: +This README documents the current 0.22 authoring surface. The extension follows the current CellScript action surface: ```cellscript action fill_offer(input: Offer) -> output: Offer { diff --git a/package-lock.json b/package-lock.json index 2443099..919cce0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cellscript-vscode", - "version": "0.21.0-rc.1", + "version": "0.22.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cellscript-vscode", - "version": "0.21.0-rc.1", + "version": "0.22.0", "license": "MIT", "devDependencies": { "@vscode/vsce": "^3.9.1", diff --git a/package.json b/package.json index b30cc72..9fdeea9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cellscript-vscode", "displayName": "CellScript", "description": "Production-grade local VS Code tooling for CellScript (.cell) contracts.", - "version": "0.21.0-rc.1", + "version": "0.22.0", "publisher": "arthurzhang", "license": "MIT", "main": "./dist/extension.js", From 6dd68263cc8f3e583b774fdde7412e2c26b70173 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 21 Jul 2026 19:35:05 +0800 Subject: [PATCH 6/9] Align VS Code extension with CellScript 0.22 --- CHANGELOG.md | 12 +++++++ README.md | 4 +-- docs/Tutorial-07-LSP-and-Tooling.md | 13 +++++++ package-lock.json | 4 +-- package.json | 2 +- scripts/validate.mjs | 14 ++++++++ snippets/cellscript.json | 53 +++++++++++++++++++++++++++++ syntaxes/cellscript.tmLanguage.json | 10 +++--- 8 files changed, 102 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ebddef..b23b1b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 0.22.0 + +- Restored a remotely reachable 0.22 extension release commit and aligned the + manifest with CellScript 0.22.0. +- Added TextMate and snippet coverage for typed transaction views, finite + invariant quantifiers, source-aware bounded collections, type `validity`, + explicit borrow regions, and concrete payload enums. +- Kept compiler-backed commands on the canonical nested CLI tree and the + global `--json` machine-output contract. +- Documented stable `E2xxx` compiler diagnostics and LSP `codeDescription` + links. + ## 0.21.0-rc.1 - Aligned the extension package metadata with the CellScript 0.21 release diff --git a/README.md b/README.md index 24bc922..7b42ebc 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ The command palette includes: These commands spawn `cellc` for one-shot evidence and build tasks. They do not replace release gates, deployment checks, transaction signing, or CKB node acceptance. -The 0.21 compiler also ships `cellscript-mcp`, compile receipts +The 0.22 compiler also ships `cellscript-mcp`, compile receipts (`cellc receipt`, `cellc sign-receipt`, `cellc verify-receipt`), ProtocolGraph, TemplateLayout, and helper-backed aggregate evidence. Those surfaces remain compiler/MCP commands rather than VS Code command-palette @@ -107,7 +107,7 @@ For package-based projects, run package commands from a file under the nearest ` ## Authoring Model -This README documents the current 0.21 authoring surface. The extension follows the current CellScript action surface: +This README documents the current 0.22 authoring surface. The extension follows the current CellScript action surface, including typed transaction views, finite invariant quantifiers, bounded collections, type validity, explicit borrow regions, and concrete payload enums: ```cellscript action fill_offer(input: Offer) -> output: Offer { diff --git a/docs/Tutorial-07-LSP-and-Tooling.md b/docs/Tutorial-07-LSP-and-Tooling.md index 960655f..e8238e7 100644 --- a/docs/Tutorial-07-LSP-and-Tooling.md +++ b/docs/Tutorial-07-LSP-and-Tooling.md @@ -1,3 +1,5 @@ +# Tutorial 07: LSP and Tooling + You can write CellScript with any text editor and the `cellc` CLI. The LSP and VS Code extension make that loop shorter. Parse errors, type errors, flow mistakes, symbols, hovers, formatting, and compiler-backed reports @@ -13,6 +15,12 @@ making `ErrorReporter::has_errors()` true. Release gates and production commands remain error-gated, so a warning is a review signal rather than a deployment certificate. +Backend diagnostics use stable `E2xxx` codes. LSP clients receive the code in +the standard diagnostic `code` field and a `codeDescription` link to the +compiler registry, so diagnostic-detail UI can show the exact rule instead of +only the message. The same record is available through +`cellc explain E2202 --json`. + ## What You Will Learn - what the LSP server supports; @@ -52,6 +60,11 @@ cellc --lsp In practice you usually let the editor start it for you. +On 0.22, qualified enum completion includes concrete payload constructors. +Enum hover reads the same compiler metadata as `cellc metadata` and shows the +tagged-union layout, ABI, storage class, encoded width, and linear-payload flag. +Generic or variable-width payload ADTs remain unsupported. + ## VS Code Extension The extension lives in: diff --git a/package-lock.json b/package-lock.json index 2443099..919cce0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cellscript-vscode", - "version": "0.21.0-rc.1", + "version": "0.22.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cellscript-vscode", - "version": "0.21.0-rc.1", + "version": "0.22.0", "license": "MIT", "devDependencies": { "@vscode/vsce": "^3.9.1", diff --git a/package.json b/package.json index b30cc72..9fdeea9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cellscript-vscode", "displayName": "CellScript", "description": "Production-grade local VS Code tooling for CellScript (.cell) contracts.", - "version": "0.21.0-rc.1", + "version": "0.22.0", "publisher": "arthurzhang", "license": "MIT", "main": "./dist/extension.js", diff --git a/scripts/validate.mjs b/scripts/validate.mjs index f3f6fc5..8a170a0 100644 --- a/scripts/validate.mjs +++ b/scripts/validate.mjs @@ -147,6 +147,15 @@ for (const token of [ "module", "enum", "invariant", + "forall", + "validity", + "borrow", + "consume_each", + "create_each", + "BoundedCellSet", + "BoundedList", + "InputView", + "OutputView", "by", "i32" ]) { @@ -169,6 +178,11 @@ for (const snippet of [ "module ", "use ", "enum ", + "enum-payload", + "invariant-forall", + "bounded-collection-action", + "borrow-view", + "validity", "flow-edge-by-action", "invariant " ]) { diff --git a/snippets/cellscript.json b/snippets/cellscript.json index 800fc5f..39bba4f 100644 --- a/snippets/cellscript.json +++ b/snippets/cellscript.json @@ -71,6 +71,25 @@ ], "description": "Declare a CellScript enum" }, + "Payload Enum": { + "prefix": "enum-payload", + "body": [ + "enum ${1:Result} {", + " ${2:None},", + " ${3:Some}(${4:u64})", + "}" + ], + "description": "Declare a concrete fixed-width payload enum" + }, + "Type Validity": { + "prefix": "validity", + "body": [ + "validity", + " require ${1:amount} > 0", + " require ${2:locktime} > env::block_number()" + ], + "description": "Declare pure value predicates for a persistent type" + }, "Effect Attribute": { "prefix": "effect", "body": [ @@ -171,6 +190,40 @@ ], "description": "Declare an invariant with explicit trigger, scope, reads, and proof relation" }, + "Finite Invariant Quantifier": { + "prefix": "invariant-forall", + "body": [ + "forall ${1:output} ${2:item} in group_outputs<${3:Token}> {", + " require ${2:item}.${4:amount} > 0", + "}" + ], + "description": "Quantify over a finite typed transaction source view" + }, + "Bounded Collection Action": { + "prefix": "bounded-collection-action", + "body": [ + "action ${1:batch}(input ${2:inputs}: BoundedCellSet<${3:Token}, ${4:16}>, witness ${5:plans}: BoundedList<${6:Plan}, ${4:16}>) -> u64 {", + " verification", + " consume_each ${7:item} in ${2:inputs} {", + " require ${7:item}.${8:amount} > 0", + " }", + " create_each ${9:plan} in ${5:plans} {", + " require ${9:plan}.${8:amount} > 0", + " }", + " return 0", + "}" + ], + "description": "Declare finite input and witness collection iteration" + }, + "Borrow Region": { + "prefix": "borrow-view", + "body": [ + "borrow ${1:root} as ${2:view} {", + " require ${2:view}.${3:amount} > 0", + "}" + ], + "description": "Create a compile-time-only read view over a linear Cell" + }, "Read Parameter": { "prefix": "read", "body": [ diff --git a/syntaxes/cellscript.tmLanguage.json b/syntaxes/cellscript.tmLanguage.json index 27d328a..80836ce 100644 --- a/syntaxes/cellscript.tmLanguage.json +++ b/syntaxes/cellscript.tmLanguage.json @@ -159,7 +159,7 @@ "patterns": [ { "name": "keyword.control.cellscript", - "match": "\\b(module|use|if|else|for|in|while|match|return|let|mut|ref|as|verification)\\b" + "match": "\\b(module|use|if|else|for|forall|in|where|while|match|return|let|mut|ref|as|borrow|verification|validity)\\b" }, { "name": "keyword.declaration.cellscript", @@ -167,7 +167,7 @@ }, { "name": "keyword.other.cellscript", - "match": "\\b(has|store|consume|create|create_unique|replace_unique|read|read_ref|launch|transition|by|self|env|with_lock|assert|assert_invariant|invariant|require|preserve|from|input|output|protected|witness|lock_args|script_args|transfer|claim|settle|destroy|destroy_singleton_type|destroy_unique|destroy_instance|burn_amount|std|replace|burn|relock|retarget_type|identity|ckb_type_id|singleton_type|with_default_hash_type|with_capacity_floor)\\b" + "match": "\\b(has|store|consume|consume_each|create|create_each|create_unique|replace_unique|read|read_ref|launch|transition|by|self|env|with_lock|assert|assert_invariant|invariant|require|preserve|from|input|output|protected|witness|lock_args|script_args|transfer|claim|settle|destroy|destroy_singleton_type|destroy_unique|destroy_instance|burn_amount|std|replace|burn|relock|retarget_type|identity|ckb_type_id|singleton_type|with_default_hash_type|with_capacity_floor)\\b" }, { "name": "constant.language.boolean.cellscript", @@ -183,7 +183,7 @@ }, { "name": "support.type.collection.cellscript", - "match": "\\bVec\\b" + "match": "\\b(Vec|BoundedCellSet|BoundedList|View|InputView|OutputView|CellDepView|HeaderDepView|WitnessArgsView|OutPoint|ScriptView)\\b" }, { "name": "support.type.effect.cellscript", @@ -211,11 +211,11 @@ }, { "name": "support.function.builtin.cellscript", - "match": "\\b(assert|assert_invariant|invariant|require|preserve|create_unique|replace_unique|destroy_singleton_type|destroy_unique|destroy_instance|burn_amount|assert_sum|assert_conserved|assert_delta|assert_distinct|assert_singleton|retarget_type|min|max|isqrt)\\b" + "match": "\\b(assert|assert_invariant|invariant|require|preserve|create_unique|replace_unique|consume_each|create_each|destroy_singleton_type|destroy_unique|destroy_instance|burn_amount|assert_sum|assert_conserved|assert_delta|assert_distinct|assert_singleton|count|retarget_type|min|max|isqrt)\\b" }, { "name": "support.function.namespace.cellscript", - "match": "\\b(?:Address|Hash|Vec|env|source|witness|ckb|std(?:::[A-Za-z_][A-Za-z0-9_]*)*)::[A-Za-z_][A-Za-z0-9_]*\\b" + "match": "\\b(?:Address|Hash|Vec|BoundedCellSet|BoundedList|View|InputView|OutputView|env|source|witness|ckb|std(?:::[A-Za-z_][A-Za-z0-9_]*)*)::[A-Za-z_][A-Za-z0-9_]*\\b" } ] }, From bfe310a839c051ef6a1831eec3f21883071e6c76 Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 22 Jul 2026 13:31:14 +0800 Subject: [PATCH 7/9] Highlight 0.22 verifier namespaces --- CHANGELOG.md | 2 ++ syntaxes/cellscript.tmLanguage.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b23b1b2..cc86a7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 0.22.0 +- Highlight the `script::...` helpers and nested + `verifier::btc::bip340::...` runtime-verifier namespace. - Restored a remotely reachable 0.22 extension release commit and aligned the manifest with CellScript 0.22.0. - Added TextMate and snippet coverage for typed transaction views, finite diff --git a/syntaxes/cellscript.tmLanguage.json b/syntaxes/cellscript.tmLanguage.json index 80836ce..7eaff91 100644 --- a/syntaxes/cellscript.tmLanguage.json +++ b/syntaxes/cellscript.tmLanguage.json @@ -215,7 +215,7 @@ }, { "name": "support.function.namespace.cellscript", - "match": "\\b(?:Address|Hash|Vec|BoundedCellSet|BoundedList|View|InputView|OutputView|env|source|witness|ckb|std(?:::[A-Za-z_][A-Za-z0-9_]*)*)::[A-Za-z_][A-Za-z0-9_]*\\b" + "match": "\\b(?:Address|Hash|Vec|BoundedCellSet|BoundedList|View|InputView|OutputView|env|source|witness|ckb|script|std|verifier)(?:::[A-Za-z_][A-Za-z0-9_]*)*::[A-Za-z_][A-Za-z0-9_]*\\b" } ] }, From a54b06c00c5a774faeadc9a9ccf02280d53000ad Mon Sep 17 00:00:00 2001 From: Arthur Date: Wed, 12 Aug 2026 23:31:04 +0800 Subject: [PATCH 8/9] Highlight the 0.25 language surface --- README.md | 2 +- syntaxes/cellscript.tmLanguage.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7b42ebc..307ae6b 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ For package-based projects, run package commands from a file under the nearest ` ## Authoring Model -This README documents the current 0.22 authoring surface. The extension follows the current CellScript action surface, including typed transaction views, finite invariant quantifiers, bounded collections, type validity, explicit borrow regions, and concrete payload enums: +This README documents the 0.25 nightly authoring surface. The extension follows the current CellScript action surface, including typed transaction views, finite invariant quantifiers, bounded collections, type validity, explicit borrow regions, concrete payload enums, generic value declarations, explicit `public`/`public(package)`/`private` visibility, and labeled `break`/`continue` control flow: ```cellscript action fill_offer(input: Offer) -> output: Offer { diff --git a/syntaxes/cellscript.tmLanguage.json b/syntaxes/cellscript.tmLanguage.json index 7eaff91..1c6b84e 100644 --- a/syntaxes/cellscript.tmLanguage.json +++ b/syntaxes/cellscript.tmLanguage.json @@ -159,15 +159,15 @@ "patterns": [ { "name": "keyword.control.cellscript", - "match": "\\b(module|use|if|else|for|forall|in|where|while|match|return|let|mut|ref|as|borrow|verification|validity)\\b" + "match": "\\b(module|use|if|else|for|forall|in|where|while|match|return|break|continue|label|let|mut|ref|as|borrow|verification|validity)\\b" }, { "name": "keyword.declaration.cellscript", - "match": "\\b(resource|shared|receipt|struct|const|enum|flow|action|fn|lock)\\b" + "match": "\\b(public|private|package|resource|shared|receipt|struct|const|enum|flow|action|fn|lock)\\b" }, { "name": "keyword.other.cellscript", - "match": "\\b(has|store|consume|consume_each|create|create_each|create_unique|replace_unique|read|read_ref|launch|transition|by|self|env|with_lock|assert|assert_invariant|invariant|require|preserve|from|input|output|protected|witness|lock_args|script_args|transfer|claim|settle|destroy|destroy_singleton_type|destroy_unique|destroy_instance|burn_amount|std|replace|burn|relock|retarget_type|identity|ckb_type_id|singleton_type|with_default_hash_type|with_capacity_floor)\\b" + "match": "\\b(has|phantom|copy|drop|store|fixed|serializable|non_linear|cell|consume|consume_each|create|create_each|create_unique|replace_unique|read|read_ref|launch|transition|by|self|env|with_lock|assert|assert_invariant|invariant|require|preserve|from|input|output|protected|witness|lock_args|script_args|transfer|claim|settle|destroy|destroy_singleton_type|destroy_unique|destroy_instance|burn_amount|std|replace|burn|relock|retarget_type|identity|ckb_type_id|singleton_type|with_default_hash_type|with_capacity_floor)\\b" }, { "name": "constant.language.boolean.cellscript", @@ -183,7 +183,7 @@ }, { "name": "support.type.collection.cellscript", - "match": "\\b(Vec|BoundedCellSet|BoundedList|View|InputView|OutputView|CellDepView|HeaderDepView|WitnessArgsView|OutPoint|ScriptView)\\b" + "match": "\\b(Option|Vec|BoundedCellSet|BoundedList|View|InputView|OutputView|CellDepView|HeaderDepView|WitnessArgsView|OutPoint|ScriptView)\\b" }, { "name": "support.type.effect.cellscript", @@ -239,7 +239,7 @@ "patterns": [ { "name": "keyword.operator.cellscript", - "match": "->|=>|::|==|!=|<=|>=|&&|\\|\\||\\+=|[-+*/%=&|!<>]" + "match": "->|=>|::|<<|>>|==|!=|<=|>=|&&|\\|\\||\\+=|[-+*/%=&|!<>^]" }, { "name": "punctuation.separator.cellscript", From 54bd33d2de2e9fe508818cad622a00e96a69f47f Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 14 Aug 2026 10:22:40 +0800 Subject: [PATCH 9/9] Restore LS-IDL editor release surface --- CHANGELOG.md | 8 ++ README.md | 12 ++- docs/Tutorial-07-LSP-and-Tooling.md | 8 ++ extension.js | 143 ++++++++++++++++++++++++++++ package.json | 43 ++++++++- scripts/validate.mjs | 11 ++- 6 files changed, 222 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55e8aeb..1cff060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.24 development line + +- Added command-palette flows to validate LS-IDL, append the raw IDL SHA-256 + commitment to a CKB executable, and fetch exact IDL bytes by deployed Script + identity. +- Added an optional Registry API setting for private or test deployments and + documented the interface-identity trust boundary. + ## 0.22.0 - Aligned the extension package metadata with the CellScript 0.22 language diff --git a/README.md b/README.md index 307ae6b..208930a 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,18 @@ The command palette includes: - `CellScript: Show Profile` - `CellScript: Generate Audit Bundle` - `CellScript: Show Production Report` +- `CellScript: Validate LS-IDL` +- `CellScript: Bind LS-IDL to CKB Executable` +- `CellScript: Fetch LS-IDL by CKB Script` These commands spawn `cellc` for one-shot evidence and build tasks. They do not replace release gates, deployment checks, transaction signing, or CKB node acceptance. +The LS-IDL commands keep interface identity byte-exact: validation checks the +supported schema, binding appends `SHA-256(idl.json)` to the selected CKB +executable, and fetch saves the Registry response without parsing and +reserialising it. The commitment proves byte identity and placement; it does +not prove that a Lock Script implements the described interface correctly. + The 0.22 compiler also ships `cellscript-mcp`, compile receipts (`cellc receipt`, `cellc sign-receipt`, `cellc verify-receipt`), ProtocolGraph, TemplateLayout, and helper-backed aggregate evidence. Those @@ -102,12 +111,13 @@ For package-based projects, run package commands from a file under the nearest ` | `cellscript.builderOutputDir` | `target/cellscript-builder/typescript` | Output directory for generated TypeScript action builders. | | `cellscript.ckbRpcUrl` | empty | Optional CKB RPC URL for live registry verification. | | `cellscript.deploymentNetwork` | empty | Optional deployment network filter for live registry checks and builder identity binding. | +| `cellscript.registryApiUrl` | empty | Optional Registry API base URL for LS-IDL fetch; empty uses the compiler default. | | `cellscript.registryRequirePublisherSignature` | `false` | Adds the publisher-signature metadata gate to registry verification. | | `cellscript.registryRequireAuditReport` | `false` | Adds the audit-report metadata gate to registry verification. | ## Authoring Model -This README documents the 0.25 nightly authoring surface. The extension follows the current CellScript action surface, including typed transaction views, finite invariant quantifiers, bounded collections, type validity, explicit borrow regions, concrete payload enums, generic value declarations, explicit `public`/`public(package)`/`private` visibility, and labeled `break`/`continue` control flow: +This README documents the current 0.22 authoring surface. This 0.25 nightly branch also previews generic value declarations, explicit `public`/`public(package)`/`private` visibility, and labeled `break`/`continue` control flow. The extension follows the current CellScript action surface, including typed transaction views, finite invariant quantifiers, bounded collections, type validity, explicit borrow regions, and concrete payload enums: ```cellscript action fill_offer(input: Offer) -> output: Offer { diff --git a/docs/Tutorial-07-LSP-and-Tooling.md b/docs/Tutorial-07-LSP-and-Tooling.md index e8238e7..54a2041 100644 --- a/docs/Tutorial-07-LSP-and-Tooling.md +++ b/docs/Tutorial-07-LSP-and-Tooling.md @@ -96,6 +96,7 @@ Useful settings: | `cellscript.builderOutputDir` | Output directory for generated TypeScript action-builder packages. Relative paths resolve from the nearest package `Cell.toml`. | | `cellscript.ckbRpcUrl` | Optional CKB RPC URL for live registry verification. | | `cellscript.deploymentNetwork` | Optional network filter for live registry verification and generated builder deployment binding. | +| `cellscript.registryApiUrl` | Optional Registry API base URL used by LS-IDL fetch. | | `cellscript.registryRequirePublisherSignature` | Add `--require-publisher-signature` to registry verification commands. This is a metadata-presence gate, not cryptographic signature verification. | | `cellscript.registryRequireAuditReport` | Add `--require-audit-report` to registry verification commands. | @@ -118,6 +119,13 @@ The extension contributes commands for the local compiler and builder loop: | `CellScript: Verify Registry` | `cellc registry verify --json` | | `CellScript: Verify Live Registry` | `cellc registry verify --live --json` | | `CellScript: Show Production Report` | compiler version + metadata + constraints + release-audit boundary | +| `CellScript: Validate LS-IDL` | `cellc artifact ls-idl validate --idl ` | +| `CellScript: Bind LS-IDL to CKB Executable` | `cellc artifact ls-idl bind --idl --executable ` | +| `CellScript: Fetch LS-IDL by CKB Script` | `cellc artifact ls-idl fetch --code-hash --output idl.json` | + +The editor saves fetched IDL as the exact response bytes and leaves schema, +digest, and executable-suffix checks to `cellc`. This is an interface identity +check, not proof of implementation correctness or a security audit. The 0.21 compiler also ships `cellscript-mcp`, compile receipts, ProtocolGraph, TemplateLayout, and helper-backed aggregate evidence. Those remain compiler/MCP diff --git a/extension.js b/extension.js index 60ebc16..08d4943 100644 --- a/extension.js +++ b/extension.js @@ -116,6 +116,24 @@ function activate(context) { if (document) { await runProductionReport(document, output, status); } + }), + vscode.commands.registerCommand("cellscript.validateLsIdl", async () => { + const document = await activeLsIdlDocument(); + if (document) { + await runLsIdlValidate(document, output, status); + } + }), + vscode.commands.registerCommand("cellscript.bindLsIdl", async () => { + const document = await activeLsIdlDocument(); + if (document) { + await runLsIdlBind(document, output, status); + } + }), + vscode.commands.registerCommand("cellscript.fetchLsIdl", async () => { + const document = compilerContextDocument(); + if (document) { + await runLsIdlFetch(document, output, status); + } }) ); } @@ -232,6 +250,32 @@ function activeCellScriptDocument() { return editor.document; } +async function activeLsIdlDocument() { + const editor = vscode.window.activeTextEditor; + if (!editor || editor.document.uri.scheme !== "file" || !editor.document.uri.fsPath.endsWith(".json")) { + vscode.window.showWarningMessage("Open the LS-IDL JSON file first."); + return null; + } + if (editor.document.isDirty && !(await editor.document.save())) { + vscode.window.showErrorMessage("Save the LS-IDL file before validating or binding it."); + return null; + } + return editor.document; +} + +function compilerContextDocument() { + const document = vscode.window.activeTextEditor?.document; + if (document?.uri?.scheme === "file") { + return document; + } + const workspace = vscode.workspace.workspaceFolders?.[0]; + if (workspace) { + return { uri: workspace.uri }; + } + vscode.window.showWarningMessage("Open a workspace or file before fetching LS-IDL."); + return null; +} + async function resolveCompilerCommand(document) { const config = vscode.workspace.getConfiguration("cellscript", document.uri); const compilerPath = config.get("compilerPath", "cellc"); @@ -496,6 +540,105 @@ async function runRegistryVerify(document, output, status, live) { }); } +async function runLsIdlValidate(document, output, status) { + await runSingleCellcCommand(document, output, status, { + source: "cellc artifact ls-idl validate", + args: ["artifact", "ls-idl", "validate", "--idl", document.uri.fsPath, "--json"], + cwd: path.dirname(document.uri.fsPath), + input: document.uri.fsPath, + successMessage: "LS-IDL schema is valid.", + errorMessage: "LS-IDL validation" + }); +} + +async function runLsIdlBind(document, output, status) { + const executable = await vscode.window.showOpenDialog({ + canSelectFiles: true, + canSelectFolders: false, + canSelectMany: false, + title: "Select the CKB executable to bind", + filters: { "CKB executable": ["elf", "bin", "*"], "All files": ["*"] } + }); + if (!executable?.[0]) return; + const sourcePath = executable[0].fsPath; + const outputUri = await vscode.window.showSaveDialog({ + title: "Save the LS-IDL-bound executable", + defaultUri: vscode.Uri.file(`${sourcePath}.ls-idl`) + }); + if (!outputUri) return; + await runSingleCellcCommand(document, output, status, { + source: "cellc artifact ls-idl bind", + args: [ + "artifact", "ls-idl", "bind", + "--idl", document.uri.fsPath, + "--executable", sourcePath, + "--output", outputUri.fsPath, + "--json" + ], + cwd: path.dirname(document.uri.fsPath), + input: document.uri.fsPath, + outputPath: outputUri.fsPath, + successMessage: `LS-IDL digest appended to ${outputUri.fsPath}`, + errorMessage: "LS-IDL executable binding" + }); +} + +async function runLsIdlFetch(document, output, status) { + const codeHash = await vscode.window.showInputBox({ + title: "Fetch LS-IDL", + prompt: "CKB Script code hash", + placeHolder: "0x followed by 64 hexadecimal characters", + validateInput: (value) => /^0x[0-9a-fA-F]{64}$/.test(value.trim()) ? null : "Enter a 32-byte 0x-prefixed code hash." + }); + if (!codeHash) return; + const hashType = await vscode.window.showQuickPick(["data1", "data2", "data", "type"], { + title: "Select the Script hash type" + }); + if (!hashType) return; + let dataHash = ""; + if (hashType === "type") { + const selected = await vscode.window.showInputBox({ + title: "Disambiguate type-hash deployment", + prompt: "Code Cell data hash", + placeHolder: "0x followed by 64 hexadecimal characters", + validateInput: (value) => /^0x[0-9a-fA-F]{64}$/.test(value.trim()) ? null : "Enter a 32-byte 0x-prefixed data hash." + }); + if (!selected) return; + dataHash = selected.trim(); + } + const configuredNetwork = vscode.workspace.getConfiguration("cellscript", document.uri).get("deploymentNetwork", ""); + const network = configuredNetwork || await vscode.window.showQuickPick(["mainnet", "testnet"], { + title: "Select the Registry network" + }); + if (!network) return; + const workspace = vscode.workspace.getWorkspaceFolder(document.uri)?.uri; + const outputUri = await vscode.window.showSaveDialog({ + title: "Save exact LS-IDL bytes", + defaultUri: workspace ? vscode.Uri.joinPath(workspace, "idl.json") : vscode.Uri.file(path.join(os.tmpdir(), "idl.json")), + filters: { "JSON": ["json"] } + }); + if (!outputUri) return; + const args = [ + "artifact", "ls-idl", "fetch", + "--code-hash", codeHash.trim(), + "--hash-type", hashType, + "--network", network, + "--output", outputUri.fsPath, + "--json" + ]; + if (dataHash) args.push("--data-hash", dataHash); + const apiUrl = vscode.workspace.getConfiguration("cellscript", document.uri).get("registryApiUrl", "").trim(); + if (apiUrl) args.push("--api-url", apiUrl); + await runSingleCellcCommand(document, output, status, { + source: "cellc artifact ls-idl fetch", + args, + cwd: workspace?.fsPath, + outputPath: outputUri.fsPath, + successMessage: `Exact LS-IDL bytes saved to ${outputUri.fsPath}`, + errorMessage: "LS-IDL fetch" + }); +} + async function selectMetadataEntry(document, output, status, input, options) { const metadata = await loadMetadataForSelection(document, output, status, input, options.source); if (!metadata) { diff --git a/package.json b/package.json index 9fdeea9..bc34d8c 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,10 @@ "onCommand:cellscript.showDeployPlan", "onCommand:cellscript.showProfile", "onCommand:cellscript.generateAuditBundle", - "onCommand:cellscript.showProductionReport" + "onCommand:cellscript.showProductionReport", + "onCommand:cellscript.validateLsIdl", + "onCommand:cellscript.bindLsIdl", + "onCommand:cellscript.fetchLsIdl" ], "scripts": { "build": "esbuild extension.js --bundle --platform=node --format=cjs --external:vscode --minify --outfile=dist/extension.js", @@ -143,6 +146,18 @@ { "command": "cellscript.showProductionReport", "title": "CellScript: Show Production Report" + }, + { + "command": "cellscript.validateLsIdl", + "title": "CellScript: Validate LS-IDL" + }, + { + "command": "cellscript.bindLsIdl", + "title": "CellScript: Bind LS-IDL to CKB Executable" + }, + { + "command": "cellscript.fetchLsIdl", + "title": "CellScript: Fetch LS-IDL by CKB Script" } ], "menus": { @@ -221,6 +236,16 @@ "command": "cellscript.showProductionReport", "when": "resourceLangId == cellscript", "group": "cellscript@15" + }, + { + "command": "cellscript.validateLsIdl", + "when": "resourceLangId == json", + "group": "cellscript@16" + }, + { + "command": "cellscript.bindLsIdl", + "when": "resourceLangId == json", + "group": "cellscript@17" } ], "commandPalette": [ @@ -283,6 +308,17 @@ { "command": "cellscript.showProductionReport", "when": "editorLangId == cellscript" + }, + { + "command": "cellscript.validateLsIdl", + "when": "editorLangId == json" + }, + { + "command": "cellscript.bindLsIdl", + "when": "editorLangId == json" + }, + { + "command": "cellscript.fetchLsIdl" } ] }, @@ -335,6 +371,11 @@ "default": "", "description": "Optional deployment network filter for live registry verification and generated builder deployment identity binding." }, + "cellscript.registryApiUrl": { + "type": "string", + "default": "", + "description": "Optional Registry API base URL used by LS-IDL fetch. Empty uses the compiler's production default." + }, "cellscript.registryRequirePublisherSignature": { "type": "boolean", "default": false, diff --git a/scripts/validate.mjs b/scripts/validate.mjs index 8a170a0..f36b80b 100644 --- a/scripts/validate.mjs +++ b/scripts/validate.mjs @@ -77,7 +77,10 @@ const requiredCommands = [ "cellscript.showDeployPlan", "cellscript.showProfile", "cellscript.generateAuditBundle", - "cellscript.showProductionReport" + "cellscript.showProductionReport", + "cellscript.validateLsIdl", + "cellscript.bindLsIdl", + "cellscript.fetchLsIdl" ]; const commands = new Set((pkg.contributes?.commands || []).map((command) => command.command)); @@ -101,6 +104,7 @@ for (const setting of [ "cellscript.builderOutputDir", "cellscript.ckbRpcUrl", "cellscript.deploymentNetwork", + "cellscript.registryApiUrl", "cellscript.registryRequirePublisherSignature", "cellscript.registryRequireAuditReport" ]) { @@ -207,6 +211,11 @@ for (const token of [ "plan", "profile", "audit-bundle", + "artifact", + "ls-idl", + "validateLsIdl", + "bindLsIdl", + "fetchLsIdl", "cellc", "Cell.toml", "action",