rigline 1.0.0-alpha.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/LICENSE +21 -0
- package/README.md +54 -0
- package/dist/build.js +37 -0
- package/dist/build.js.map +1 -0
- package/dist/index.js +614 -0
- package/dist/index.js.map +1 -0
- package/package.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lionell Pack
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# rigline
|
|
2
|
+
|
|
3
|
+
The command-line surface for [Rigline](https://github.com/Rigline/Rigline), a plugin layer for the
|
|
4
|
+
Claude Code VS Code extension.
|
|
5
|
+
|
|
6
|
+
Rigline injects a small loader into the installed extension's webview, gives plugins a
|
|
7
|
+
capability-scoped context to write against, and harvests the identifiers those plugins depend on
|
|
8
|
+
from whichever extension version you have installed — so an extension update is a diff to read
|
|
9
|
+
rather than a breakage to chase.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
npm install -g rigline
|
|
14
|
+
rigline install
|
|
15
|
+
|
|
16
|
+
`install` finds every installed version of the extension, harvests it, bakes the discovered plugins
|
|
17
|
+
into a payload and injects the loader. It keeps a byte-faithful backup of each bundle it touches,
|
|
18
|
+
and `rigline restore` puts everything back using nothing but Node and the backup.
|
|
19
|
+
|
|
20
|
+
The extension updates about weekly and an update installs a fresh directory, which silently reverts
|
|
21
|
+
the injection. Run `install` again afterwards; a window that is already open keeps running the old
|
|
22
|
+
directory until *Developer: Reload Window*.
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
rigline install inject every version, bake plugins, report drift, record the baseline
|
|
27
|
+
rigline check the same report, writing nothing
|
|
28
|
+
rigline status per version: vanilla or patched, by backup
|
|
29
|
+
rigline restore every version back to the extension's own bytes
|
|
30
|
+
|
|
31
|
+
rigline add SPEC install a plugin from a directory or npm, and re-inject
|
|
32
|
+
rigline remove N delete a plugin rigline installed, and re-inject
|
|
33
|
+
rigline update move each npm plugin to what its tag resolves to
|
|
34
|
+
rigline list every plugin, in load order: origin, source, switch, what it can do
|
|
35
|
+
|
|
36
|
+
rigline build build a plugin to one browser ES module
|
|
37
|
+
rigline dev rebuild and re-inject as you edit
|
|
38
|
+
rigline codegen write the harvested identifier types for a plugin workspace
|
|
39
|
+
rigline diff A B identifier drift between two extension directories
|
|
40
|
+
rigline doctor install state per version, as a pasteable report
|
|
41
|
+
|
|
42
|
+
`add` never runs a package manager: a published plugin is one bundled ES module and a manifest, so
|
|
43
|
+
there is nothing to resolve. A version must reach a minimum age (a day, by default) before `add` or
|
|
44
|
+
`update` will take it, and a withheld version is named rather than skipped in silence.
|
|
45
|
+
|
|
46
|
+
## Writing a plugin
|
|
47
|
+
|
|
48
|
+
npm create rigline-plugin
|
|
49
|
+
|
|
50
|
+
[The authoring guide](https://github.com/Rigline/Rigline/blob/main/docs/authoring.md) is the long
|
|
51
|
+
form. [Anchors](https://github.com/Rigline/Rigline/blob/main/docs/anchors.md) is what to read when
|
|
52
|
+
an extension update breaks a plugin and you would rather not wait for a release.
|
|
53
|
+
|
|
54
|
+
MIT.
|
package/dist/build.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `rigline build`: the convenience preset that turns a plugin's TypeScript into the one file its
|
|
3
|
+
* manifest points at.
|
|
4
|
+
*
|
|
5
|
+
* The contract a plugin meets is an output, not a toolchain (decisions.md, P6): one browser-target
|
|
6
|
+
* ES module plus rigline.json. This is the shortest way to produce that output and nothing more.
|
|
7
|
+
* Everything the entry imports is bundled in, `@rigline/plugin-api` included, because a plugin
|
|
8
|
+
* directory is copied into the extension as it stands and nothing there resolves a bare specifier.
|
|
9
|
+
* Source maps are inline for the same reason the loader's are: the webview's CSP makes a sibling
|
|
10
|
+
* `.map` fetch a gamble.
|
|
11
|
+
*/
|
|
12
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
13
|
+
import { join, relative, resolve } from "node:path";
|
|
14
|
+
import { UserError } from "@rigline/core";
|
|
15
|
+
import { build as bundle } from "rolldown";
|
|
16
|
+
/** Build one plugin from its source entry to the `entry` its manifest names. */
|
|
17
|
+
export async function buildPlugin(options = {}) {
|
|
18
|
+
const dir = resolve(options.dir ?? process.cwd());
|
|
19
|
+
const manifestPath = join(dir, "rigline.json");
|
|
20
|
+
if (!existsSync(manifestPath))
|
|
21
|
+
throw new UserError(`${dir} has no rigline.json`);
|
|
22
|
+
const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
23
|
+
if (typeof manifest.entry !== "string" || manifest.entry.length === 0) {
|
|
24
|
+
throw new UserError(`${manifestPath} has no "entry"`);
|
|
25
|
+
}
|
|
26
|
+
const input = resolve(dir, options.source ?? "src/index.ts");
|
|
27
|
+
if (!existsSync(input))
|
|
28
|
+
throw new UserError(`no plugin source at ${input}`);
|
|
29
|
+
const output = resolve(dir, manifest.entry);
|
|
30
|
+
await bundle({
|
|
31
|
+
input,
|
|
32
|
+
platform: "browser",
|
|
33
|
+
output: { file: output, format: "esm", sourcemap: "inline", codeSplitting: false },
|
|
34
|
+
});
|
|
35
|
+
return { input: relative(dir, input), output: relative(dir, output) };
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAS3C,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAO,GAAiB,EAAE;IAE1B,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAC/C,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,GAAG,GAAG,sBAAsB,CAAC,CAAC;IACjF,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAwB,CAAC;IACvF,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtE,MAAM,IAAI,SAAS,CAAC,GAAG,YAAY,iBAAiB,CAAC,CAAC;IACxD,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC;IAC7D,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAC;IAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,MAAM,MAAM,CAAC;QACX,KAAK;QACL,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE;KACnF,CAAC,CAAC;IACH,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC;AACxE,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* The rigline command: a thin surface over @rigline/core.
|
|
4
|
+
*
|
|
5
|
+
* Commands land here as core grows. Every command throws UserError for a problem a person must
|
|
6
|
+
* fix and lets anything else propagate with its stack, so a bug is never dressed up as advice.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync, watch as fsWatch, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
9
|
+
import { basename, dirname, join, relative, resolve } from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
import { parseArgs } from "node:util";
|
|
12
|
+
import { addFromNpm, addPlugin, CORE_VERSION, check, collect, diffScans, EXTENSIONS_DIR, extensionVersion, findExtension, formatDiff, formatDoctor, formatFlow, formatPlugins, formatUpdates, generate, harvestAll, hostVerdict, inspect, install, installedExtensions, listPlugins, readAnchorOverrides, readBundles, removePlugin, restoreAll, riglinePaths, scanOf, UserError, update, updatePlugins, verdict, watch, } from "@rigline/core";
|
|
13
|
+
import { buildPlugin } from "./build.js";
|
|
14
|
+
const USAGE = `rigline ${CORE_VERSION}
|
|
15
|
+
|
|
16
|
+
rigline codegen [DIR] [--check] [--out FILE]
|
|
17
|
+
Harvest the installed extension (or DIR) and write ./generated.ts: the identifier
|
|
18
|
+
augmentation your plugins compile against, and the baseline install diffs. Commit it.
|
|
19
|
+
--check compares instead of writing and exits 1 when the file is out of date. Either
|
|
20
|
+
way it exits 1 if a curated anchor claims to name one element and this version
|
|
21
|
+
applies its class in more than one place. It reads the shipped anchor table, never
|
|
22
|
+
~/.rigline/anchors.json: its verdict is about this repository's table.
|
|
23
|
+
|
|
24
|
+
rigline diff DIR_A DIR_B
|
|
25
|
+
Compare the identifier layers of two extension directories.
|
|
26
|
+
|
|
27
|
+
rigline build [DIR] [--source FILE]
|
|
28
|
+
Bundle a plugin's src/index.ts (or --source) into the entry its rigline.json names.
|
|
29
|
+
|
|
30
|
+
rigline install [--ext DIR] [--payload DIR]
|
|
31
|
+
Inject the loader into every installed extension version (or DIR), baking the enabled
|
|
32
|
+
plugins, and report what moved since the baseline and which plugins each version
|
|
33
|
+
refuses. Any entry in ~/.rigline/anchors.json is applied and named, with what this
|
|
34
|
+
version makes of it. Rewrites ./generated.ts when the directory has one and records
|
|
35
|
+
the new baseline; never commits either. Run it after an extension update, and reload
|
|
36
|
+
webviews afterwards. Exits 1 when a person is needed.
|
|
37
|
+
|
|
38
|
+
rigline check [--ext DIR]
|
|
39
|
+
Read-only. Per installed version (or DIR): what moved since the baseline, which
|
|
40
|
+
plugins this version would refuse and by which identifier, which curated anchors it
|
|
41
|
+
lacks, and what it makes of each entry in ~/.rigline/anchors.json. Exits 1 when a
|
|
42
|
+
person is needed.
|
|
43
|
+
|
|
44
|
+
rigline watch [--interval SECONDS]
|
|
45
|
+
install, and again whenever the set of installed extension directories changes,
|
|
46
|
+
which is what an extension update looks like from outside VS Code.
|
|
47
|
+
|
|
48
|
+
rigline dev [DIR...]
|
|
49
|
+
Build the named plugin directories (or every first-party one), re-inject, and rebuild
|
|
50
|
+
on every source change. Reload webviews after each one.
|
|
51
|
+
|
|
52
|
+
rigline add PATH|SPEC [--now]
|
|
53
|
+
Install a plugin into ~/.rigline/plugins, say what it can do, and re-inject. PATH is a
|
|
54
|
+
directory; SPEC is an npm package, optionally @version or @tag. A published version
|
|
55
|
+
must be a day old before it is installed; --now takes it anyway. No package manager
|
|
56
|
+
runs, nothing is resolved, and none of the plugin's own code is evaluated.
|
|
57
|
+
|
|
58
|
+
rigline update [NAME...] [--now]
|
|
59
|
+
Move each plugin installed from npm to whatever its tag resolves to now, and
|
|
60
|
+
re-inject. A plugin pinned to a version, added from a directory, or placed by hand is
|
|
61
|
+
reported and left alone, as is a newer version too young to install.
|
|
62
|
+
|
|
63
|
+
rigline remove NAME
|
|
64
|
+
Delete a plugin rigline installed, and re-inject. A plugin you did not install this
|
|
65
|
+
way is switched off in ~/.rigline/config.json instead; this will not delete it.
|
|
66
|
+
|
|
67
|
+
rigline list
|
|
68
|
+
Every plugin found, in the order they load: where it came from, whether it is
|
|
69
|
+
switched off, and what its manifest says it can do.
|
|
70
|
+
|
|
71
|
+
rigline status
|
|
72
|
+
Per installed version: is each bundle vanilla or patched, judged against its backup.
|
|
73
|
+
|
|
74
|
+
rigline restore
|
|
75
|
+
Every installed version back to the extension's own bytes. Needs neither VS Code nor
|
|
76
|
+
the extension to be working.
|
|
77
|
+
|
|
78
|
+
rigline doctor [--out FILE] [--ext DIR]
|
|
79
|
+
A markdown diagnostic to paste into a bug report: per installed version, whether it is
|
|
80
|
+
patched, what the payload holds, which plugins are baked in and what any host patch
|
|
81
|
+
did. For what the panel itself was doing, copy the probe's report from the RIG badge.
|
|
82
|
+
`;
|
|
83
|
+
/** The prebuilt pre.js and post.js, from the host package's build. */
|
|
84
|
+
function defaultPayloadDir() {
|
|
85
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
86
|
+
return resolve(here, "..", "..", "host", "dist");
|
|
87
|
+
}
|
|
88
|
+
/** The first-party plugins in this checkout. Plugins a person installs live under ~/.rigline. */
|
|
89
|
+
function repoPluginsDir() {
|
|
90
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
91
|
+
return resolve(here, "..", "..", "..", "plugins");
|
|
92
|
+
}
|
|
93
|
+
/** Where plugins are discovered from, and which of them a person has turned off. */
|
|
94
|
+
function pluginOptions() {
|
|
95
|
+
const paths = riglinePaths();
|
|
96
|
+
return { roots: [repoPluginsDir(), paths.plugins], last: ["probe"], configPath: paths.config };
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Inject into every installed version and print the report.
|
|
100
|
+
*
|
|
101
|
+
* `install` is this and nothing else; `add` and `remove` run it too, because they change the plugin
|
|
102
|
+
* set and leaving the payload stale behind them would mean a person who added a plugin has to know
|
|
103
|
+
* about a second command before anything appears (D56).
|
|
104
|
+
*
|
|
105
|
+
* No extension installed is not a failure here. `add` has already put the plugin where it belongs,
|
|
106
|
+
* and saying so and stopping is a better answer than an error about a directory the person may be
|
|
107
|
+
* about to create by installing the extension.
|
|
108
|
+
*/
|
|
109
|
+
function reinject(options = {}) {
|
|
110
|
+
const targets = options.exts ?? installedExtensions();
|
|
111
|
+
if (targets.length === 0) {
|
|
112
|
+
if (options.required)
|
|
113
|
+
throw new UserError("no Claude Code extension is installed");
|
|
114
|
+
console.log("No Claude Code extension is installed, so nothing was injected.");
|
|
115
|
+
return 0;
|
|
116
|
+
}
|
|
117
|
+
const report = update({
|
|
118
|
+
exts: targets,
|
|
119
|
+
payloadDir: options.payloadDir ?? defaultPayloadDir(),
|
|
120
|
+
plugins: pluginOptions(),
|
|
121
|
+
// Only where the directory already has one; this never creates a harvest for somebody who has
|
|
122
|
+
// not asked for one, and it never commits what it rewrites (D30).
|
|
123
|
+
codegen: true,
|
|
124
|
+
});
|
|
125
|
+
console.log(formatFlow(report));
|
|
126
|
+
console.log(report.versions.some((v) => v.hostChanged)
|
|
127
|
+
? `\nA host patch changed: run Developer: Reload Window (this ends the window's sessions).`
|
|
128
|
+
: `\nReload with Developer: Reload Webviews (current window only).`);
|
|
129
|
+
return report.attention.length > 0 ? 1 : 0;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Installs a plugin from a directory. No network and no package manager (D47): a plugin is a
|
|
133
|
+
* manifest and a built module, and everything `add` does is around the copy rather than inside it.
|
|
134
|
+
*
|
|
135
|
+
* What it can do is printed because this is the moment it means something (D26): installing a
|
|
136
|
+
* plugin is the act that says yes, and nothing after it asks again, so the sentences belong here
|
|
137
|
+
* rather than in a prompt nobody can answer usefully.
|
|
138
|
+
*/
|
|
139
|
+
async function addCommand(args) {
|
|
140
|
+
const { values, positionals } = parseArgs({
|
|
141
|
+
args,
|
|
142
|
+
options: { now: { type: "boolean", default: false } },
|
|
143
|
+
allowPositionals: true,
|
|
144
|
+
});
|
|
145
|
+
if (positionals.length !== 1) {
|
|
146
|
+
throw new UserError("add needs exactly one plugin directory or npm package");
|
|
147
|
+
}
|
|
148
|
+
const paths = riglinePaths();
|
|
149
|
+
const spec = positionals[0];
|
|
150
|
+
const common = {
|
|
151
|
+
pluginsDir: paths.plugins,
|
|
152
|
+
configPath: paths.config,
|
|
153
|
+
otherRoots: [repoPluginsDir()],
|
|
154
|
+
};
|
|
155
|
+
const result = isPathSpec(spec)
|
|
156
|
+
? addPlugin({ from: spec, ...common })
|
|
157
|
+
: await addFromNpm({ spec, ...common, registry: { ignoreReleaseAge: values.now } });
|
|
158
|
+
console.log(`${result.replaced ? "replaced" : "added"} ${result.name} — ${result.dir}`);
|
|
159
|
+
console.log(` from ${result.from}`);
|
|
160
|
+
if (result.manifest.description)
|
|
161
|
+
console.log(` ${result.manifest.description}`);
|
|
162
|
+
for (const sentence of result.can)
|
|
163
|
+
console.log(` - ${sentence}`);
|
|
164
|
+
for (const patch of result.manifest.patches) {
|
|
165
|
+
// Named apart, and never folded in with the capability sentences: a host patch is the one
|
|
166
|
+
// declaration that reaches outside the webview, into the extension's own bundle.
|
|
167
|
+
console.log(` - patches extension.js${patch.required ? " (required)" : ""}: ${patch.why}`);
|
|
168
|
+
}
|
|
169
|
+
if (result.disabled) {
|
|
170
|
+
console.log(` "${result.name}" is switched off in ${paths.config}, so it will not load until you remove it from "disabled"`);
|
|
171
|
+
}
|
|
172
|
+
console.log("");
|
|
173
|
+
return reinject();
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Whether this is a directory rather than an npm package.
|
|
177
|
+
*
|
|
178
|
+
* The same rule every package manager uses, said out loud: a leading dot or a path separator, or a
|
|
179
|
+
* directory that is simply there. An npm name cannot hold a separator except the one in a scope,
|
|
180
|
+
* and a scope starts with `@`, so the two vocabularies do not overlap.
|
|
181
|
+
*/
|
|
182
|
+
function isPathSpec(spec) {
|
|
183
|
+
if (spec.startsWith("@"))
|
|
184
|
+
return false;
|
|
185
|
+
if (spec.startsWith(".") || spec.includes("/") || spec.includes("\\"))
|
|
186
|
+
return true;
|
|
187
|
+
return existsSync(join(resolve(spec), "rigline.json"));
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Moves every plugin installed from npm to what its tag resolves to now (D49).
|
|
191
|
+
*
|
|
192
|
+
* `update` means plugins, which is the whole reason the injection flow is spelled `install` (D55).
|
|
193
|
+
*/
|
|
194
|
+
async function updateCommand(args) {
|
|
195
|
+
const { values, positionals } = parseArgs({
|
|
196
|
+
args,
|
|
197
|
+
options: { now: { type: "boolean", default: false } },
|
|
198
|
+
allowPositionals: true,
|
|
199
|
+
});
|
|
200
|
+
const paths = riglinePaths();
|
|
201
|
+
const updates = await updatePlugins({
|
|
202
|
+
pluginsDir: paths.plugins,
|
|
203
|
+
configPath: paths.config,
|
|
204
|
+
otherRoots: [repoPluginsDir()],
|
|
205
|
+
names: positionals.length > 0 ? positionals : undefined,
|
|
206
|
+
registry: { ignoreReleaseAge: values.now },
|
|
207
|
+
});
|
|
208
|
+
console.log(formatUpdates(updates));
|
|
209
|
+
const moved = updates.some((u) => u.outcome === "updated");
|
|
210
|
+
if (!moved) {
|
|
211
|
+
// Nothing changed on disk, so the payload is already what it should be and re-injecting would
|
|
212
|
+
// be a paragraph of report about a no-op.
|
|
213
|
+
return updates.some((u) => u.outcome === "failed") ? 1 : 0;
|
|
214
|
+
}
|
|
215
|
+
console.log("");
|
|
216
|
+
const code = reinject();
|
|
217
|
+
return updates.some((u) => u.outcome === "failed") ? 1 : code;
|
|
218
|
+
}
|
|
219
|
+
function removeCommand(args) {
|
|
220
|
+
const { positionals } = parseArgs({ args, options: {}, allowPositionals: true });
|
|
221
|
+
if (positionals.length !== 1)
|
|
222
|
+
throw new UserError("remove needs exactly one plugin name");
|
|
223
|
+
const paths = riglinePaths();
|
|
224
|
+
const result = removePlugin({
|
|
225
|
+
name: positionals[0],
|
|
226
|
+
pluginsDir: paths.plugins,
|
|
227
|
+
configPath: paths.config,
|
|
228
|
+
otherRoots: [repoPluginsDir()],
|
|
229
|
+
});
|
|
230
|
+
console.log(`removed ${result.name} — ${result.dir}`);
|
|
231
|
+
if (!result.hadSource)
|
|
232
|
+
console.log(" it had no source record, so it was placed here by hand");
|
|
233
|
+
if (result.wasDisabled)
|
|
234
|
+
console.log(` and dropped from "disabled" in ${paths.config}`);
|
|
235
|
+
console.log("");
|
|
236
|
+
return reinject();
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The one write command: inject into every installed version, say what moved since the baseline,
|
|
240
|
+
* record the new one. `check` is its read-only half. `update` means plugins, in phase 4 (D55).
|
|
241
|
+
*/
|
|
242
|
+
function installCommand(args) {
|
|
243
|
+
const { values } = parseArgs({
|
|
244
|
+
args,
|
|
245
|
+
options: { ext: { type: "string" }, payload: { type: "string" } },
|
|
246
|
+
allowPositionals: false,
|
|
247
|
+
});
|
|
248
|
+
return reinject({
|
|
249
|
+
exts: values.ext ? [values.ext] : undefined,
|
|
250
|
+
payloadDir: values.payload,
|
|
251
|
+
required: true,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/** The same roots `pluginOptions` discovers from, named for a report rather than for a loader. */
|
|
255
|
+
function listCommand() {
|
|
256
|
+
const paths = riglinePaths();
|
|
257
|
+
console.log(formatPlugins(listPlugins({
|
|
258
|
+
roots: [
|
|
259
|
+
{ label: "this checkout", path: repoPluginsDir() },
|
|
260
|
+
{ label: paths.plugins, path: paths.plugins, managed: true },
|
|
261
|
+
],
|
|
262
|
+
last: ["probe"],
|
|
263
|
+
configPath: paths.config,
|
|
264
|
+
})));
|
|
265
|
+
return 0;
|
|
266
|
+
}
|
|
267
|
+
function statusCommand() {
|
|
268
|
+
const targets = installedExtensions();
|
|
269
|
+
if (targets.length === 0)
|
|
270
|
+
throw new UserError("no Claude Code extension is installed");
|
|
271
|
+
for (const ext of targets) {
|
|
272
|
+
const state = inspect(ext);
|
|
273
|
+
console.log(`${extensionVersion(ext)}: webview ${verdict(state)}${state.markerPresent ? " (marker present)" : ""}` +
|
|
274
|
+
`${state.backupExists ? "" : ", no backup"}; host ${hostVerdict(state)}` +
|
|
275
|
+
`${state.hostBackupExists ? " (backup present)" : ""}`);
|
|
276
|
+
console.log(` ${ext}`);
|
|
277
|
+
}
|
|
278
|
+
return 0;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* The diagnostic collector (D53). Always exits 0: a machine with no VS Code logs, or none inside
|
|
282
|
+
* the window, still gets an install-state report, and a person whose panel has just frozen should
|
|
283
|
+
* not also have to work out why the tool that was meant to explain it failed.
|
|
284
|
+
*
|
|
285
|
+
* `--ext` and `--logs` point it at copies rather than at what is installed, which is how this gets
|
|
286
|
+
* rehearsed against somebody else's log bundle without a test ever touching a live directory (D39).
|
|
287
|
+
*/
|
|
288
|
+
function doctorCommand(args) {
|
|
289
|
+
const { values } = parseArgs({
|
|
290
|
+
args,
|
|
291
|
+
options: { out: { type: "string" }, ext: { type: "string" } },
|
|
292
|
+
allowPositionals: false,
|
|
293
|
+
});
|
|
294
|
+
const report = collect({ exts: values.ext ? [resolve(values.ext)] : undefined });
|
|
295
|
+
const markdown = formatDoctor(report);
|
|
296
|
+
if (values.out === undefined) {
|
|
297
|
+
// Straight to stdout, unadorned, so `rigline doctor | clip` and `> doctor.md` both produce the
|
|
298
|
+
// document and nothing else. Every other word this command has to say goes to stderr.
|
|
299
|
+
process.stdout.write(markdown);
|
|
300
|
+
return 0;
|
|
301
|
+
}
|
|
302
|
+
const out = resolve(values.out);
|
|
303
|
+
writeFileSync(out, markdown);
|
|
304
|
+
const versions = report.installs.length;
|
|
305
|
+
console.log(`wrote ${out}: ${versions} extension ${versions === 1 ? "version" : "versions"}`);
|
|
306
|
+
return 0;
|
|
307
|
+
}
|
|
308
|
+
function restoreCommand() {
|
|
309
|
+
const results = restoreAll(installedExtensions());
|
|
310
|
+
let noBackup = 0;
|
|
311
|
+
let hostFailed = 0;
|
|
312
|
+
for (const result of results) {
|
|
313
|
+
if (result.restored)
|
|
314
|
+
console.log(`restored: ${result.ext}`);
|
|
315
|
+
else {
|
|
316
|
+
noBackup++;
|
|
317
|
+
console.log(`NOT restored: ${result.ext} (${result.reason})`);
|
|
318
|
+
}
|
|
319
|
+
// Reported whichever way the webview side went: an extension host still carrying a
|
|
320
|
+
// substitution is the failure a person must know about, and it is invisible from the panel.
|
|
321
|
+
if (result.hostReason) {
|
|
322
|
+
hostFailed++;
|
|
323
|
+
console.log(` extension.js NOT restored: ${result.hostReason}`);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (noBackup > 0) {
|
|
327
|
+
console.log("\nA version without a backup is recovered by uninstalling and reinstalling Claude Code from the Extensions view.");
|
|
328
|
+
}
|
|
329
|
+
if (hostFailed > 0) {
|
|
330
|
+
console.log("\nAn extension.js left patched still runs the substitution a plugin declared. Reinstalling Claude Code from the Extensions view replaces it.");
|
|
331
|
+
}
|
|
332
|
+
console.log("Reload the window afterwards.");
|
|
333
|
+
return noBackup + hostFailed > 0 ? 1 : 0;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Where a harvest is committed: `generated.ts` in the directory the command was run from.
|
|
337
|
+
*
|
|
338
|
+
* The same rule for this repository and for an author's, which is the point — nothing here knows
|
|
339
|
+
* it is being run inside Rigline's own checkout. It is the working directory rather than a path
|
|
340
|
+
* derived from this file's location because the published CLI lives in `node_modules`, where a
|
|
341
|
+
* relative walk upwards means nothing.
|
|
342
|
+
*/
|
|
343
|
+
function defaultGeneratedPath() {
|
|
344
|
+
return resolve(process.cwd(), "generated.ts");
|
|
345
|
+
}
|
|
346
|
+
function codegen(args) {
|
|
347
|
+
const { values, positionals } = parseArgs({
|
|
348
|
+
args,
|
|
349
|
+
options: { check: { type: "boolean", default: false }, out: { type: "string" } },
|
|
350
|
+
allowPositionals: true,
|
|
351
|
+
});
|
|
352
|
+
if (positionals.length > 1)
|
|
353
|
+
throw new UserError(`expected at most one directory: ${positionals}`);
|
|
354
|
+
const ext = positionals[0] ?? findExtension();
|
|
355
|
+
const out = values.out ?? defaultGeneratedPath();
|
|
356
|
+
const generated = generate(harvestAll(readBundles(ext)));
|
|
357
|
+
const label = relative(process.cwd(), out) || out;
|
|
358
|
+
// Asked before the `--check` branch and again after the write, because it is a verdict about the
|
|
359
|
+
// anchor table and not about the file. Asking it only on the writing path let the one invocation
|
|
360
|
+
// that runs unattended go green over it: codegen writes `generated.ts` and *then* fails, so a
|
|
361
|
+
// maintainer who commits the file it just wrote leaves `--check` comparing equal and saying so.
|
|
362
|
+
const ambiguous = reportAmbiguousAnchors(generated);
|
|
363
|
+
if (values.check) {
|
|
364
|
+
const current = existsSync(out) ? readFileSync(out, "utf8") : "";
|
|
365
|
+
if (current !== generated.source) {
|
|
366
|
+
console.log(`${label} is out of date for ${generated.tables.version}. Run: rigline codegen`);
|
|
367
|
+
return 1;
|
|
368
|
+
}
|
|
369
|
+
console.log(`${label} is up to date for ${generated.tables.version}: ${generated.counts}`);
|
|
370
|
+
return ambiguous ? 1 : 0;
|
|
371
|
+
}
|
|
372
|
+
writeFileSync(out, generated.source);
|
|
373
|
+
console.log(`source: ${ext}`);
|
|
374
|
+
console.log(`${generated.tables.version}: ${generated.counts}`);
|
|
375
|
+
for (const module of generated.unreachableModules) {
|
|
376
|
+
console.log(` unreachable stylesheet module: ${module}`);
|
|
377
|
+
}
|
|
378
|
+
for (const name of generated.anchors.unverified) {
|
|
379
|
+
console.log(` unverified anchor: ${name} (its module's class map was never counted)`);
|
|
380
|
+
}
|
|
381
|
+
console.log(`wrote: ${label}`);
|
|
382
|
+
return ambiguous ? 1 : 0;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* Name every anchor that claims to be one element and is not, and say whether there were any.
|
|
386
|
+
*
|
|
387
|
+
* The one thing codegen fails over that is not a broken harvest, and it fails *here* rather than at
|
|
388
|
+
* install for a reason (D7): an ambiguous singleton means this repo's anchor table is wrong, the
|
|
389
|
+
* repair is a refinement somebody can write today, and a maintainer is standing here reading this.
|
|
390
|
+
* On a user's machine the same verdict is an attention line and a refusal of the plugins that
|
|
391
|
+
* declared the anchor, because an upstream release that starts reusing a class is not a reason to
|
|
392
|
+
* leave every other plugin uninjected.
|
|
393
|
+
*/
|
|
394
|
+
function reportAmbiguousAnchors(generated) {
|
|
395
|
+
if (generated.anchors.ambiguous.length === 0)
|
|
396
|
+
return false;
|
|
397
|
+
for (const { name, sites } of generated.anchors.ambiguous) {
|
|
398
|
+
console.error(` ambiguous anchor: ${name} names one element, and ${generated.tables.version} applies its class at ${sites} places`);
|
|
399
|
+
}
|
|
400
|
+
console.error("Refine each in packages/plugin-api/src/anchors.ts, or change its kind to collection if it was never one element.");
|
|
401
|
+
return true;
|
|
402
|
+
}
|
|
403
|
+
function diff(args) {
|
|
404
|
+
if (args.length !== 2)
|
|
405
|
+
throw new UserError("diff needs exactly two extension directories");
|
|
406
|
+
const [a, b] = args;
|
|
407
|
+
const from = scanOf(harvestAll(readBundles(a)));
|
|
408
|
+
const to = scanOf(harvestAll(readBundles(b)));
|
|
409
|
+
console.log(formatDiff(from, to, diffScans(from, to)));
|
|
410
|
+
return 0;
|
|
411
|
+
}
|
|
412
|
+
async function build(args) {
|
|
413
|
+
const { values, positionals } = parseArgs({
|
|
414
|
+
args,
|
|
415
|
+
options: { source: { type: "string" } },
|
|
416
|
+
allowPositionals: true,
|
|
417
|
+
});
|
|
418
|
+
if (positionals.length > 1)
|
|
419
|
+
throw new UserError(`expected at most one directory: ${positionals}`);
|
|
420
|
+
const built = await buildPlugin({ dir: positionals[0], source: values.source });
|
|
421
|
+
console.log(`built ${built.input} -> ${built.output}`);
|
|
422
|
+
return 0;
|
|
423
|
+
}
|
|
424
|
+
/** `--ext DIR`, for rehearsing against a copy rather than against what is installed (D39). */
|
|
425
|
+
function extOption(args) {
|
|
426
|
+
const { values } = parseArgs({ args, options: { ext: { type: "string" } } });
|
|
427
|
+
return values.ext ? [resolve(values.ext)] : undefined;
|
|
428
|
+
}
|
|
429
|
+
function checkCommand(args) {
|
|
430
|
+
const report = check({ exts: extOption(args), plugins: pluginOptions() });
|
|
431
|
+
console.log(formatFlow(report));
|
|
432
|
+
return report.attention.length > 0 ? 1 : 0;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Runs until interrupted. Its exit code is the last report's, so a watcher stopped after an update
|
|
436
|
+
* that needs a person still says so, and `rigline watch; echo $?` from a script is meaningful.
|
|
437
|
+
*/
|
|
438
|
+
function watchCommand(args) {
|
|
439
|
+
const { values } = parseArgs({
|
|
440
|
+
args,
|
|
441
|
+
options: { interval: { type: "string" } },
|
|
442
|
+
allowPositionals: false,
|
|
443
|
+
});
|
|
444
|
+
const seconds = values.interval === undefined ? 30 : Number(values.interval);
|
|
445
|
+
if (!Number.isFinite(seconds) || seconds < 1) {
|
|
446
|
+
throw new UserError(`--interval needs a number of seconds, got ${values.interval}`);
|
|
447
|
+
}
|
|
448
|
+
return new Promise((resolveWith) => {
|
|
449
|
+
let code = 0;
|
|
450
|
+
const watcher = watch({
|
|
451
|
+
payloadDir: defaultPayloadDir(),
|
|
452
|
+
plugins: pluginOptions(),
|
|
453
|
+
codegen: true,
|
|
454
|
+
intervalMs: seconds * 1000,
|
|
455
|
+
onReport(report) {
|
|
456
|
+
console.log(`
|
|
457
|
+
[${new Date().toISOString()}]`);
|
|
458
|
+
console.log(formatFlow(report));
|
|
459
|
+
code = report.attention.length > 0 ? 1 : 0;
|
|
460
|
+
},
|
|
461
|
+
onError(error) {
|
|
462
|
+
// Reported and survived, never fatal: a harvest run against a directory VS Code is still
|
|
463
|
+
// writing fails once and succeeds on the next pass, and a watcher that exits then is a
|
|
464
|
+
// watcher that is never running when it is needed.
|
|
465
|
+
console.error(`rigline watch: ${error instanceof Error ? error.message : String(error)}`);
|
|
466
|
+
code = 1;
|
|
467
|
+
},
|
|
468
|
+
});
|
|
469
|
+
console.log(`watching ${EXTENSIONS_DIR} every ${seconds}s; Ctrl-C to stop`);
|
|
470
|
+
const stop = () => {
|
|
471
|
+
watcher.stop();
|
|
472
|
+
resolveWith(code);
|
|
473
|
+
};
|
|
474
|
+
process.once("SIGINT", stop);
|
|
475
|
+
process.once("SIGTERM", stop);
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* The development loop: build, inject, and do it again on every source change.
|
|
480
|
+
*
|
|
481
|
+
* It rebuilds and re-injects rather than watching the injected copy, because a plugin's shipped
|
|
482
|
+
* form is a directory the installer copies; there is nothing on the other side to watch. Re-running
|
|
483
|
+
* the install refreshes the payload in place without rewriting the bundle, so the cost of a change
|
|
484
|
+
* is a rebuild and a webview reload.
|
|
485
|
+
*/
|
|
486
|
+
async function dev(args) {
|
|
487
|
+
const { positionals } = parseArgs({ args, options: {}, allowPositionals: true });
|
|
488
|
+
const dirs = positionals.length > 0
|
|
489
|
+
? positionals.map((d) => resolve(d))
|
|
490
|
+
: readdirSync(repoPluginsDir(), { withFileTypes: true })
|
|
491
|
+
.filter((e) => e.isDirectory() && existsSync(join(repoPluginsDir(), e.name, "rigline.json")))
|
|
492
|
+
.map((e) => join(repoPluginsDir(), e.name));
|
|
493
|
+
if (dirs.length === 0)
|
|
494
|
+
throw new UserError("no plugin directories to develop");
|
|
495
|
+
const exts = installedExtensions();
|
|
496
|
+
if (exts.length === 0)
|
|
497
|
+
throw new UserError("no Claude Code extension is installed");
|
|
498
|
+
// `install`, `check` and `watch` read `~/.rigline/anchors.json` through the flow, which owns user
|
|
499
|
+
// state. `dev` drives the installer directly, so it reads the file here: a development loop
|
|
500
|
+
// resolving anchors differently from the install it stands in for is a difference nobody would
|
|
501
|
+
// think to look for (D44).
|
|
502
|
+
const overrides = readAnchorOverrides();
|
|
503
|
+
for (const problem of overrides.problems)
|
|
504
|
+
console.error(`rigline dev: ${problem}`);
|
|
505
|
+
async function once() {
|
|
506
|
+
for (const dir of dirs) {
|
|
507
|
+
const built = await buildPlugin({ dir });
|
|
508
|
+
console.log(`built ${basename(dir)}: ${built.input} -> ${built.output}`);
|
|
509
|
+
}
|
|
510
|
+
let hostChanged = false;
|
|
511
|
+
for (const ext of exts) {
|
|
512
|
+
const report = install(ext, {
|
|
513
|
+
payloadDir: defaultPayloadDir(),
|
|
514
|
+
plugins: pluginOptions(),
|
|
515
|
+
anchors: overrides,
|
|
516
|
+
});
|
|
517
|
+
hostChanged ||= report.hostChanged;
|
|
518
|
+
for (const override of report.anchorOverrides) {
|
|
519
|
+
console.log(` anchor override ${override.name}: ${overrides.path}`);
|
|
520
|
+
}
|
|
521
|
+
for (const verdict of report.verdicts) {
|
|
522
|
+
if (verdict.refusal)
|
|
523
|
+
console.log(` REFUSED ${verdict.plugin}: ${verdict.refusal}`);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
console.log(hostChanged
|
|
527
|
+
? "Developer: Reload Window (a host patch changed; this ends the window's sessions)"
|
|
528
|
+
: "Developer: Reload Webviews");
|
|
529
|
+
}
|
|
530
|
+
await once();
|
|
531
|
+
// Debounced, because one editor save can be several filesystem events, and a rebuild racing its
|
|
532
|
+
// own re-install would leave the payload half from each.
|
|
533
|
+
let pending = null;
|
|
534
|
+
let building = false;
|
|
535
|
+
const schedule = () => {
|
|
536
|
+
if (pending)
|
|
537
|
+
clearTimeout(pending);
|
|
538
|
+
pending = setTimeout(() => {
|
|
539
|
+
pending = null;
|
|
540
|
+
if (building)
|
|
541
|
+
return;
|
|
542
|
+
building = true;
|
|
543
|
+
once()
|
|
544
|
+
.catch((error) => {
|
|
545
|
+
console.error(`rigline dev: ${error instanceof Error ? error.message : String(error)}`);
|
|
546
|
+
})
|
|
547
|
+
.finally(() => {
|
|
548
|
+
building = false;
|
|
549
|
+
});
|
|
550
|
+
}, 150);
|
|
551
|
+
};
|
|
552
|
+
for (const dir of dirs) {
|
|
553
|
+
const src = join(dir, "src");
|
|
554
|
+
if (!existsSync(src))
|
|
555
|
+
continue;
|
|
556
|
+
fsWatch(src, { recursive: true }, schedule);
|
|
557
|
+
}
|
|
558
|
+
console.log(`watching ${dirs.length} plugin source director${dirs.length === 1 ? "y" : "ies"}; Ctrl-C to stop`);
|
|
559
|
+
return new Promise((resolveWith) => {
|
|
560
|
+
process.once("SIGINT", () => resolveWith(0));
|
|
561
|
+
process.once("SIGTERM", () => resolveWith(0));
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
async function main(argv) {
|
|
565
|
+
const [command, ...rest] = argv;
|
|
566
|
+
switch (command) {
|
|
567
|
+
case "codegen":
|
|
568
|
+
return codegen(rest);
|
|
569
|
+
case "diff":
|
|
570
|
+
return diff(rest);
|
|
571
|
+
case "build":
|
|
572
|
+
return build(rest);
|
|
573
|
+
case "install":
|
|
574
|
+
return installCommand(rest);
|
|
575
|
+
case "check":
|
|
576
|
+
return checkCommand(rest);
|
|
577
|
+
case "watch":
|
|
578
|
+
return watchCommand(rest);
|
|
579
|
+
case "dev":
|
|
580
|
+
return dev(rest);
|
|
581
|
+
case "add":
|
|
582
|
+
return addCommand(rest);
|
|
583
|
+
case "update":
|
|
584
|
+
return updateCommand(rest);
|
|
585
|
+
case "remove":
|
|
586
|
+
return removeCommand(rest);
|
|
587
|
+
case "list":
|
|
588
|
+
return listCommand();
|
|
589
|
+
case "status":
|
|
590
|
+
return statusCommand();
|
|
591
|
+
case "restore":
|
|
592
|
+
return restoreCommand();
|
|
593
|
+
case "doctor":
|
|
594
|
+
return doctorCommand(rest);
|
|
595
|
+
case undefined:
|
|
596
|
+
case "--help":
|
|
597
|
+
case "-h":
|
|
598
|
+
console.log(USAGE);
|
|
599
|
+
return 0;
|
|
600
|
+
default:
|
|
601
|
+
throw new UserError(`unknown command "${command}"\n\n${USAGE}`);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
main(process.argv.slice(2)).then((code) => {
|
|
605
|
+
process.exitCode = code;
|
|
606
|
+
}, (error) => {
|
|
607
|
+
if (error instanceof UserError) {
|
|
608
|
+
console.error(`rigline: ${error.message}`);
|
|
609
|
+
process.exitCode = 1;
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
throw error;
|
|
613
|
+
});
|
|
614
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO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KAAK,KAAK;YACR,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;QAC1B,KAAK,QAAQ;YACX,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;QAC7B,KAAK,QAAQ;YACX,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;QAC7B,KAAK,MAAM;YACT,OAAO,WAAW,EAAE,CAAC;QACvB,KAAK,QAAQ;YACX,OAAO,aAAa,EAAE,CAAC;QACzB,KAAK,SAAS;YACZ,OAAO,cAAc,EAAE,CAAC;QAC1B,KAAK,QAAQ;YACX,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;QAC7B,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ,CAAC;QACd,KAAK,IAAI;YACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,CAAC,CAAC;QACX;YACE,MAAM,IAAI,SAAS,CAAC,oBAAoB,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC;IACpE,CAAC;AACH,CAAC;AAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAC9B,CAAC,IAAI,EAAE,EAAE;IACP,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC1B,CAAC,EACD,CAAC,KAAc,EAAE,EAAE;IACjB,IAAI,KAAK,YAAY,SAAS,EAAE,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC3C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IACD,MAAM,KAAK,CAAC;AACd,CAAC,CACF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rigline",
|
|
3
|
+
"version": "1.0.0-alpha.0",
|
|
4
|
+
"description": "Install, update and develop plugins for the Claude Code VS Code extension",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"rigline",
|
|
7
|
+
"claude-code",
|
|
8
|
+
"vscode",
|
|
9
|
+
"plugin",
|
|
10
|
+
"cli"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/Rigline/Rigline#readme",
|
|
13
|
+
"bugs": "https://github.com/Rigline/Rigline/issues",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/Rigline/Rigline.git",
|
|
17
|
+
"directory": "packages/cli"
|
|
18
|
+
},
|
|
19
|
+
"author": "Lionell Pack",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"bin": {
|
|
26
|
+
"rigline": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@rigline/core": "1.0.0-alpha.0",
|
|
30
|
+
"rolldown": "^1.2.8"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc -p tsconfig.build.json",
|
|
34
|
+
"typecheck": "tsc -p tsconfig.json"
|
|
35
|
+
}
|
|
36
|
+
}
|