@vimhead.dev/norn-cli 0.1.0-tip.35347037721.1 → 0.1.0-tip.35359392805.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aleksandr Zub
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/assets/README.md CHANGED
@@ -1,21 +1,64 @@
1
1
  # Norn
2
2
 
3
- Norn is a harness-agnostic workflow framework and runtime built primarily for
4
- agents. Use the Norn SDK to write reusable agent-driven and code-driven TypeScript
5
- workflows, then discover, run, inspect, and recover them through the CLI.
6
-
7
- Norn is intended as a portable replacement for harness-specific subagents and
8
- workflow extensions. Use it from Claude Code, Pi, Codex, or any other harness
9
- that can invoke its CLI.
10
-
11
- Norn agents are powered by the bundled, open-source and extensible
12
- [Pi coding agent](https://pi.dev). Your outer harness does not need to be Pi,
13
- and code-only workflows do not require a model.
14
-
15
- - [Documentation index](docs/README.md) focused references by capability
16
- - [Create run change a workflow](examples/minimal-workflow/README.md) — code-driven, no model required
17
- - [Norn agent → saved artifact → analysis](examples/agent-then-analysis/README.md) — agent-driven, with a recoverable transition
18
- - [Norn SDK types](packages/sdk/src/api.ts)
3
+ Norn is a portable runtime for reusable agent-driven and code-driven TypeScript
4
+ workflows. Author them with the SDK, then discover, run, inspect, and recover them
5
+ through the CLI from any harness. Agents run on the bundled
6
+ [Pi coding agent](https://pi.dev); code-only workflows need no model.
7
+
8
+ ## Getting started
9
+
10
+ 1. [Install Norn](#installation), including agent authentication.
11
+
12
+ 2. **Combine an agent with code.** The agent writes a summary; code saves it as an artifact.
13
+
14
+ ```ts
15
+ import { definePlugin, definePluginManifest } from "@vimhead.dev/norn";
16
+ import { Type } from "typebox";
17
+
18
+ const manifest = definePluginManifest({
19
+ id: "summary",
20
+ workflows: {
21
+ write: {
22
+ isEntrypoint: true,
23
+ instructions: "Summarize supplied text and save the result.",
24
+ params: Type.Object({ text: Type.String() }),
25
+ },
26
+ },
27
+ });
28
+
29
+ export default definePlugin(manifest, {
30
+ workflows: {
31
+ write: {
32
+ async execute(run, { text }) {
33
+ const summary = await run.agents.prompt({
34
+ label: "summarize",
35
+ tools: [],
36
+ prompt: `Summarize this text in one sentence:\n${text}`,
37
+ response: Type.Object({ text: Type.String() }),
38
+ });
39
+ const artifact = await run.artifacts.write("summary.txt", summary.text);
40
+ return run.complete({ artifacts: { summary: artifact } });
41
+ },
42
+ },
43
+ },
44
+ });
45
+ ```
46
+
47
+ [Full example and project configuration](examples/getting-started/README.md)
48
+
49
+ 3. **Run it** from the example directory:
50
+
51
+ ```sh
52
+ printf '%s\n' '{"params":{"text":"Norn workflows combine agents and code. They run from any harness through the CLI."}}' \
53
+ | norn runs start summary.write
54
+
55
+ norn runs wait <run-id>
56
+ ```
57
+
58
+ Replace `<run-id>` with the ID returned by `start`.
59
+
60
+ See the [documentation index](docs/README.md) for focused references and the
61
+ [SDK types](packages/sdk/src/api.ts) for API details.
19
62
 
20
63
  ## Installation
21
64
 
@@ -0,0 +1,26 @@
1
+ # Combine an agent with code
2
+
3
+ The agent summarizes supplied text; code saves the summary as `summary.txt`.
4
+ The complete workflow is in [plugin.ts](plugin.ts), registered by
5
+ [norn.project.json](norn.project.json).
6
+
7
+ ## Setup and run
8
+
9
+ [Install Norn](../../README.md#installation), including agent authentication and a
10
+ default model. This example makes a live model call. No local SDK installation or
11
+ compilation step is required.
12
+
13
+ Copy this directory to a writable task directory and `cd` into the copy, keeping
14
+ [the runtime matched to the example](../../docs/cli.md#select-the-runtime).
15
+ Then follow [Getting started, step 3](../../README.md#getting-started) to run it.
16
+
17
+ ## Inspect the result
18
+
19
+ `runs wait` returns the run details. Check that `run.status` is `completed`;
20
+ a successful CLI exit alone does not mean the workflow succeeded. The outcome's
21
+ `metadata.artifacts.summary` refers to `summary.txt` under
22
+ `.norn/runs/<run-id>/current/artifacts/`. Read it to assess the summary itself.
23
+
24
+ Change the prompt or supply different text to reuse the workflow.
25
+ [Norn agents](../../docs/agents.md) covers structured responses, model selection,
26
+ and inherited resources; `tools: []` is not a security sandbox.
@@ -0,0 +1,4 @@
1
+ {
2
+ "version": 1,
3
+ "plugins": ["./plugin.ts"]
4
+ }
@@ -0,0 +1,30 @@
1
+ import { definePlugin, definePluginManifest } from "@vimhead.dev/norn";
2
+ import { Type } from "typebox";
3
+
4
+ const manifest = definePluginManifest({
5
+ id: "summary",
6
+ workflows: {
7
+ write: {
8
+ isEntrypoint: true,
9
+ instructions: "Summarize supplied text and save the result.",
10
+ params: Type.Object({ text: Type.String() }),
11
+ },
12
+ },
13
+ });
14
+
15
+ export default definePlugin(manifest, {
16
+ workflows: {
17
+ write: {
18
+ async execute(run, { text }) {
19
+ const summary = await run.agents.prompt({
20
+ label: "summarize",
21
+ tools: [],
22
+ prompt: `Summarize this text in one sentence:\n${text}`,
23
+ response: Type.Object({ text: Type.String() }),
24
+ });
25
+ const artifact = await run.artifacts.write("summary.txt", summary.text);
26
+ return run.complete({ artifacts: { summary: artifact } });
27
+ },
28
+ },
29
+ },
30
+ });
@@ -1 +1 @@
1
- {"version":"0.1.0-tip.35347037721.1"}
1
+ {"version":"0.1.0-tip.35359392805.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.35347037721.1",
6
- "commit": "6b26f2586addf47108400ac882c53288788e187d",
5
+ "version": "0.1.0-tip.35359392805.1",
6
+ "commit": "f958006ca0ae3752060727c5b76b2ac1a008b103",
7
7
  "packageSpec": "@vimhead.dev/norn-cli@tip",
8
8
  "upgrade": {
9
9
  "supported": false,
@@ -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.35347037721.1";
4
- readonly commit: "6b26f2586addf47108400ac882c53288788e187d";
3
+ readonly version: "0.1.0-tip.35359392805.1";
4
+ readonly commit: "f958006ca0ae3752060727c5b76b2ac1a008b103";
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.35347037721.1",
5
- "commit": "6b26f2586addf47108400ac882c53288788e187d",
4
+ "version": "0.1.0-tip.35359392805.1",
5
+ "commit": "f958006ca0ae3752060727c5b76b2ac1a008b103",
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.35347037721.1",
3
+ "version": "0.1.0-tip.35359392805.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",
@@ -42,8 +42,8 @@
42
42
  "dependencies": {
43
43
  "@earendil-works/pi-coding-agent": "0.85.1",
44
44
  "jiti": "^2.7.0",
45
- "typebox": "^1.3.33",
46
- "@vimhead.dev/norn": "0.1.0-tip.35347037721.1"
45
+ "typebox": "^1.3.34",
46
+ "@vimhead.dev/norn": "0.1.0-tip.35359392805.1"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "node ../../scripts/build-package.ts"