@vimhead.dev/norn-cli 0.1.0-tip.35976246970.1 → 0.1.0-tip.36148588553.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/README.md +28 -2
- package/assets/package.json +1 -1
- package/assets/packages/cli/src/generated-build-info.ts +2 -2
- package/assets/packages/core/src/host-introduction.mjs +36 -0
- package/dist/generated-build-info.d.ts +2 -2
- package/dist/generated-build-info.js +2 -2
- package/package.json +2 -2
package/assets/README.md
CHANGED
|
@@ -149,9 +149,9 @@ methods, custom providers, and Norn's configuration directory, see
|
|
|
149
149
|
|
|
150
150
|
### 3. Optionally connect your harness
|
|
151
151
|
|
|
152
|
-
The shipped Pi and
|
|
152
|
+
The shipped Pi, Cursor, and Claude Code adapters deliver Norn documentation context and
|
|
153
153
|
[available workflow introductions](docs/cli.md#workflow-introduction) to your
|
|
154
|
-
harness at session start. Installing Norn alone does not register an adapter.
|
|
154
|
+
harness at session start. Installing Norn alone does not register an adapter. Codex
|
|
155
155
|
and other harnesses can [invoke the CLI directly](docs/cli.md#javascript-client-and-other-harnesses).
|
|
156
156
|
|
|
157
157
|
#### Pi
|
|
@@ -184,6 +184,32 @@ outside `PATH`, start Cursor with an executable path:
|
|
|
184
184
|
NORN_EXECUTABLE=/absolute/path/to/norn cursor .
|
|
185
185
|
```
|
|
186
186
|
|
|
187
|
+
#### Claude Code
|
|
188
|
+
|
|
189
|
+
With Node and `norn` available on `PATH`, run in your terminal:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
claude plugin marketplace add vimhead/norn
|
|
193
|
+
claude plugin install norn@norn-adapters
|
|
194
|
+
claude
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
To select a different runtime, launch Claude Code with
|
|
198
|
+
`NORN_EXECUTABLE=/absolute/path/to/norn claude`. The plugin uses that runtime's
|
|
199
|
+
documentation and the workflows in the session's working directory; it does not
|
|
200
|
+
install Norn or configure authentication for Norn agents.
|
|
201
|
+
|
|
202
|
+
Context is added on startup, `/clear`, and compaction, not again on resume or
|
|
203
|
+
fork. Named-agent sessions (`--agent`) and subagent hook calls are excluded.
|
|
204
|
+
Existing instructions and prompts are preserved. Introduction failures appear as
|
|
205
|
+
hook errors without falling back to another runtime.
|
|
206
|
+
|
|
207
|
+
To test a checkout without installing the marketplace:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
claude --plugin-dir /absolute/path/to/norn
|
|
211
|
+
```
|
|
212
|
+
|
|
187
213
|
Need an adapter for another harness? [Open an issue](https://github.com/vimhead/norn/issues/new)
|
|
188
214
|
with the harness name.
|
|
189
215
|
|
package/assets/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.1.0-tip.
|
|
1
|
+
{"version":"0.1.0-tip.36148588553.1"}
|
|
@@ -2,8 +2,8 @@ import type { NornBuildInfo } from "./build-info.ts";
|
|
|
2
2
|
|
|
3
3
|
export const NORN_GENERATED_BUILD_INFO = {
|
|
4
4
|
"kind": "npm-registry",
|
|
5
|
-
"version": "0.1.0-tip.
|
|
6
|
-
"commit": "
|
|
5
|
+
"version": "0.1.0-tip.36148588553.1",
|
|
6
|
+
"commit": "bef15bd5452b3202f93f33f0b33bdf07a48f7ffc",
|
|
7
7
|
"packageSpec": "@vimhead.dev/norn-cli@tip",
|
|
8
8
|
"upgrade": {
|
|
9
9
|
"supported": false,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { Buffer } from "node:buffer";
|
|
3
|
+
import { promisify } from "node:util";
|
|
4
|
+
|
|
5
|
+
const runExecutable = promisify(execFile);
|
|
6
|
+
const MAX_INTRO_BYTES = 16_384;
|
|
7
|
+
|
|
8
|
+
function readIntroResponse({ stdout, group }) {
|
|
9
|
+
const response = JSON.parse(stdout);
|
|
10
|
+
if (
|
|
11
|
+
!response ||
|
|
12
|
+
typeof response !== "object" ||
|
|
13
|
+
typeof response.intro !== "string" ||
|
|
14
|
+
(group === "docs" && response.intro.trim().length === 0) ||
|
|
15
|
+
Buffer.byteLength(response.intro, "utf8") > MAX_INTRO_BYTES
|
|
16
|
+
)
|
|
17
|
+
throw new Error("Invalid Norn introduction response");
|
|
18
|
+
return response.intro;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async function loadIntroduction({ executable, cwd, group }) {
|
|
22
|
+
const { stdout } = await runExecutable(executable, [group, "intro"], {
|
|
23
|
+
cwd,
|
|
24
|
+
timeout: 10_000,
|
|
25
|
+
maxBuffer: MAX_INTRO_BYTES * 2,
|
|
26
|
+
});
|
|
27
|
+
return readIntroResponse({ stdout, group });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function loadHostIntroduction({ executable, cwd }) {
|
|
31
|
+
const [intro, workflowsIntro] = await Promise.all([
|
|
32
|
+
loadIntroduction({ executable, cwd, group: "docs" }),
|
|
33
|
+
loadIntroduction({ executable, cwd, group: "workflows" }),
|
|
34
|
+
]);
|
|
35
|
+
return `<norn-docs-intro>\n${intro}\n</norn-docs-intro>${workflowsIntro ? `\n\n${workflowsIntro}` : ""}`;
|
|
36
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const NORN_GENERATED_BUILD_INFO: {
|
|
2
2
|
readonly kind: "npm-registry";
|
|
3
|
-
readonly version: "0.1.0-tip.
|
|
4
|
-
readonly commit: "
|
|
3
|
+
readonly version: "0.1.0-tip.36148588553.1";
|
|
4
|
+
readonly commit: "bef15bd5452b3202f93f33f0b33bdf07a48f7ffc";
|
|
5
5
|
readonly packageSpec: "@vimhead.dev/norn-cli@tip";
|
|
6
6
|
readonly upgrade: {
|
|
7
7
|
readonly supported: false;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/generated-build-info.ts
|
|
2
2
|
var NORN_GENERATED_BUILD_INFO = {
|
|
3
3
|
"kind": "npm-registry",
|
|
4
|
-
"version": "0.1.0-tip.
|
|
5
|
-
"commit": "
|
|
4
|
+
"version": "0.1.0-tip.36148588553.1",
|
|
5
|
+
"commit": "bef15bd5452b3202f93f33f0b33bdf07a48f7ffc",
|
|
6
6
|
"packageSpec": "@vimhead.dev/norn-cli@tip",
|
|
7
7
|
"upgrade": {
|
|
8
8
|
"supported": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vimhead.dev/norn-cli",
|
|
3
|
-
"version": "0.1.0-tip.
|
|
3
|
+
"version": "0.1.0-tip.36148588553.1",
|
|
4
4
|
"description": "Harness-agnostic runtime for agent-driven and code-driven workflows, built primarily for agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@earendil-works/pi-coding-agent": "0.85.1",
|
|
44
44
|
"jiti": "^2.7.0",
|
|
45
45
|
"typebox": "^1.3.34",
|
|
46
|
-
"@vimhead.dev/norn": "0.1.0-tip.
|
|
46
|
+
"@vimhead.dev/norn": "0.1.0-tip.36148588553.1"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "node ../../scripts/build-package.ts"
|