create-rigline-plugin 1.0.0-alpha.5 → 1.0.0-alpha.8

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
@@ -5,6 +5,10 @@ Claude Code VS Code extension.
5
5
 
6
6
  npm create rigline-plugin my-plugins
7
7
 
8
+ A plugin runs inside a modification of Anthropic's extension, so the
9
+ [plugin policy](https://github.com/Rigline/Rigline/blob/main/docs/plugin-policy.md) applies to it —
10
+ whether or not you ever publish it. One page, and the scaffolded README points at it too.
11
+
8
12
  ## What you get
9
13
 
10
14
  A pnpm workspace with `plugins/*` and one plugin in it, rather than a single-plugin repository. The
@@ -29,6 +33,11 @@ Then:
29
33
 
30
34
  and *Developer: Reload Webviews*.
31
35
 
36
+ The workspace declares `@rigline/core` — the engine, which carries the `rigline-engine` command its
37
+ `build` and `codegen` scripts run — and never `rigline`, which is the layer a *user* installs to
38
+ fetch that engine. `pnpm rigline <verb>` here is a script forwarding to the engine in your own
39
+ `node_modules`, so the loop above needs nothing installed globally.
40
+
32
41
  `generated.ts` ships as a placeholder so a fresh scaffold typechecks before `codegen` has ever run.
33
42
  Once you run `codegen` it holds the identifiers *your* extension version actually has; commit it,
34
43
  and the diff when you run against a newer extension is how you find out what moved.
package/dist/index.js CHANGED
@@ -30,10 +30,12 @@ export function scaffold(options) {
30
30
  if (!existsSync(templateDir)) {
31
31
  throw new ScaffoldError(`the template is missing from this package: ${templateDir}`);
32
32
  }
33
+ const range = options.riglineRange ?? riglineRange();
33
34
  const substitutions = {
34
35
  NAME: name,
35
36
  DESCRIPTION: options.description ?? `A Rigline plugin called ${name}.`,
36
- RIGLINE_RANGE: options.riglineRange ?? riglineRange(),
37
+ RIGLINE_RANGE: range,
38
+ RIGLINE_VERSION: range.replace(/^\^/, ""),
37
39
  };
38
40
  const files = [];
39
41
  for (const source of walk(templateDir)) {
@@ -81,6 +83,10 @@ export function nextSteps(result) {
81
83
  "Then reload the webview: Developer: Reload Webviews.",
82
84
  "",
83
85
  `${join(here, "README.md")} has the rest, including the four rules worth reading first.`,
86
+ "",
87
+ "Read the plugin policy once — what Rigline promises Anthropic, and the part your plugin has",
88
+ "to hold up. It applies whether or not you ever publish this:",
89
+ " https://github.com/Rigline/Rigline/blob/main/docs/plugin-policy.md",
84
90
  ].join("\n");
85
91
  }
86
92
  export function main(argv) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rigline-plugin",
3
- "version": "1.0.0-alpha.5",
3
+ "version": "1.0.0-alpha.8",
4
4
  "description": "Scaffold a workspace for Claude Code VS Code extension plugins",
5
5
  "keywords": [
6
6
  "rigline",
@@ -32,10 +32,10 @@
32
32
  "create-rigline-plugin": "./dist/index.js"
33
33
  },
34
34
  "devDependencies": {
35
- "@rigline/plugin-api": "1.0.0-alpha.5"
35
+ "@rigline/plugin-api": "1.0.0-alpha.8"
36
36
  },
37
37
  "scripts": {
38
- "build": "tsc -p tsconfig.build.json",
38
+ "build": "node ../../scripts/clean-dist.mjs && tsc -p tsconfig.build.json",
39
39
  "typecheck": "tsc -p tsconfig.json"
40
40
  }
41
41
  }
@@ -37,6 +37,23 @@ which is the whole reason to declare rather than to reach.
37
37
  Put a dependency you can do without under `uses.optional`: it is checked the same way and costs the
38
38
  plugin that one decoration rather than the whole plugin.
39
39
 
40
+ ## The plugin policy
41
+
42
+ **This applies whether or not you ever publish.** A plugin you wrote for yourself and will never
43
+ share still runs inside a modification of Anthropic's extension, and Anthropic's terms still apply
44
+ to what it does on your machine. Read it once, at
45
+ [docs/plugin-policy.md](https://github.com/Rigline/Rigline/blob/main/docs/plugin-policy.md); it
46
+ takes a minute.
47
+
48
+ Rigline modifies Anthropic's extension and publishes a compliance position saying what it does and
49
+ does not do. Your plugin runs inside that modification, so the position has to hold for it too.
50
+
51
+ Most of it is not left to you — the webview has no network egress, no filesystem, and no way into
52
+ the extension host, so the usual ways to do harm are absent rather than forbidden. What the policy
53
+ asks is the part the architecture cannot cover: do not deceive the person using it, do not reach for
54
+ credentials, do not carry conversation content off the machine by a path the closed network does not
55
+ cover, and keep any host patch to switching on a capability the extension already has.
56
+
40
57
  ## Testing
41
58
 
42
59
  `pnpm test` runs the pure half — the functions that do not touch the DOM. Whether a decoration
@@ -51,9 +68,9 @@ says rather than resolving its own.
51
68
  ## Publishing
52
69
 
53
70
  A plugin is published as an ordinary npm package carrying `rigline.json` and its built entry, and
54
- installed with `rigline add <name>`. Nothing about publishing is special: `rigline build` bundles
55
- everything the entry imports, so a published plugin has no runtime dependency to install, and
56
- `@rigline/plugin-api` stays a *devDependency*.
71
+ installed with `rigline add <name>`. Nothing about publishing is special: `rigline-engine build`
72
+ bundles everything the entry imports, so a published plugin has no runtime dependency to install,
73
+ and both `@rigline/core` and `@rigline/plugin-api` stay *devDependencies*.
57
74
 
58
75
  `.github/workflows/release.yml` does it from CI, with no npm token stored anywhere: GitHub
59
76
  authenticates to npm over OIDC, and what the workflow does is *stage* — a version nobody can
@@ -5,14 +5,15 @@
5
5
  "packageManager": "pnpm@12.3.4",
6
6
  "engines": { "node": ">=22.12.0" },
7
7
  "scripts": {
8
- "codegen": "rigline codegen",
8
+ "rigline": "rigline-engine",
9
+ "codegen": "rigline-engine codegen",
9
10
  "build": "pnpm -r build",
10
11
  "typecheck": "pnpm -r typecheck",
11
12
  "test": "vitest run"
12
13
  },
13
14
  "devDependencies": {
15
+ "@rigline/core": "__RIGLINE_RANGE__",
14
16
  "@rigline/plugin-api": "__RIGLINE_RANGE__",
15
- "rigline": "__RIGLINE_RANGE__",
16
17
  "rolldown": "^1.2.8",
17
18
  "typescript": "^7.0.2",
18
19
  "vitest": "^5.0.0"
@@ -8,11 +8,11 @@
8
8
  "publishConfig": { "access": "public" },
9
9
  "files": ["dist", "rigline.json"],
10
10
  "scripts": {
11
- "build": "rigline build",
11
+ "build": "rigline-engine build",
12
12
  "typecheck": "tsc -p tsconfig.json"
13
13
  },
14
14
  "devDependencies": {
15
- "@rigline/plugin-api": "__RIGLINE_RANGE__",
16
- "rigline": "__RIGLINE_RANGE__"
15
+ "@rigline/core": "__RIGLINE_RANGE__",
16
+ "@rigline/plugin-api": "__RIGLINE_RANGE__"
17
17
  }
18
18
  }
@@ -4,7 +4,7 @@
4
4
  * Verification splits three ways, and knowing which tier a question belongs to is most of writing
5
5
  * a test that is worth having. A pure function is this tier. Whether a decoration lands in the
6
6
  * right place, survives a re-render, or costs the row a line of height is a question about the app,
7
- * and only the app can answer it: build, `rigline add`, reload the webview, look.
7
+ * and only the app can answer it: `pnpm build`, `pnpm rigline add`, reload the webview, look.
8
8
  */
9
9
  import { describe, expect, it } from "vitest";
10
10
  import { badgeText } from "./index.ts";
@@ -3,14 +3,24 @@ packages:
3
3
 
4
4
  # Supply-chain settings, written down rather than inherited.
5
5
  #
6
- # Three of these are pnpm's own defaults today. They are stated anyway, because a default is not a
7
- # position: a fresh clone on a different pnpm, or a default that moves, would quietly change what
8
- # this repository is willing to install without anyone deciding to.
6
+ # Two of these restate a pnpm default. They are stated anyway, because a default is not a position:
7
+ # a fresh clone on a different pnpm, or a default that moves, would quietly change what this
8
+ # repository is willing to install without anyone deciding to.
9
9
  #
10
- # minimumReleaseAge is the rule rigline applies to plugins, applied here to your own dependencies:
11
- # a day is where a compromised publish is usually caught, and a day of latency costs nothing.
10
+ # minimumReleaseAge is the third and is not a restatement. pnpm applies the same cutoff by default
11
+ # but merely records anything younger; writing it down is what makes it refuse. That is the rule
12
+ # rigline applies to plugins, applied here to your own dependencies: a day is where a compromised
13
+ # publish is usually caught.
12
14
  minimumReleaseAge: 1440
13
15
 
16
+ # The exception, and the reason for it: pnpm resolves to the newest version in range that is old
17
+ # enough, and these two ranges have no older version in them to fall back on. Scaffolding you ran
18
+ # minutes ago is this same release, so waiting a day for the rest of it protects nothing. Drop these
19
+ # once the versions are a day old; a later Rigline release is gated like anything else.
20
+ minimumReleaseAgeExclude:
21
+ - "@rigline/core@__RIGLINE_VERSION__"
22
+ - "@rigline/plugin-api@__RIGLINE_VERSION__"
23
+
14
24
  # Only a direct dependency may come from a git repository or a tarball URL. A transitive dependency
15
25
  # that resolves outside the registry is the shape of a supply-chain problem rather than of an
16
26
  # ordinary package.