Skip to content

Commit 7ab7671

Browse files
committed
fix(cli): restore the init emission lost to an ablation restore leg
The `initialize` -> `init` change and its header paragraph were uncommitted when an ablation's restore leg ran `git checkout HEAD -- create.ts`, which is a normal, silent, exit-0 discard of a working tree that was the only copy. Both edits are re-applied here, byte for byte, and the tree is committed before the ablation is repeated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
1 parent 81afc66 commit 7ab7671

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/cli/src/commands/create.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
* or `examples/`, so the command only did anything sensible when it was run
2424
* from a checkout of ObjectStack itself.
2525
*
26+
* A fourth followed from making the emission real: the `plugin` template wrote
27+
* an `initialize` method, which is not part of the `Plugin` contract. `Plugin`
28+
* carries an index signature, so the excess property was accepted but got no
29+
* contextual type — the scaffold failed its own `strict` type-check with TS7006
30+
* — and the kernel loader refuses a plugin without `init` outright. It emits
31+
* `init` now; the warning the kernel protocol docs carried about renaming it is
32+
* gone with the defect.
33+
*
2634
* The fix is not to narrow the promise but to deliver it, so the DEFAULT is now
2735
* a standalone project:
2836
*
@@ -234,7 +242,7 @@ export const ${toCamelCase(name)}Plugin: Plugin = {
234242
name: '${name}',
235243
version: '0.1.0',
236244
237-
async initialize(context) {
245+
async init(context) {
238246
console.log('Initializing ${name} plugin...');
239247
// Plugin initialization logic
240248
},

0 commit comments

Comments
 (0)