jig-console 0.0.0-stage → 0.1.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 +21 -0
- package/README.md +77 -2
- package/dist/commands/config.d.ts +8 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +224 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/convert.d.ts +10 -0
- package/dist/commands/convert.d.ts.map +1 -0
- package/dist/commands/convert.js +40 -0
- package/dist/commands/convert.js.map +1 -0
- package/dist/commands/history.d.ts +8 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +112 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +225 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/pipeline.d.ts +17 -0
- package/dist/commands/pipeline.d.ts.map +1 -0
- package/dist/commands/pipeline.js +137 -0
- package/dist/commands/pipeline.js.map +1 -0
- package/dist/commands/play.d.ts +13 -0
- package/dist/commands/play.d.ts.map +1 -0
- package/dist/commands/play.js +109 -0
- package/dist/commands/play.js.map +1 -0
- package/dist/commands/providers.d.ts +17 -0
- package/dist/commands/providers.d.ts.map +1 -0
- package/dist/commands/providers.js +161 -0
- package/dist/commands/providers.js.map +1 -0
- package/dist/commands/recipes.d.ts +16 -0
- package/dist/commands/recipes.d.ts.map +1 -0
- package/dist/commands/recipes.js +135 -0
- package/dist/commands/recipes.js.map +1 -0
- package/dist/commands/replay.d.ts +40 -0
- package/dist/commands/replay.d.ts.map +1 -0
- package/dist/commands/replay.js +206 -0
- package/dist/commands/replay.js.map +1 -0
- package/dist/commands/run.d.ts +3 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +14 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/show.d.ts +15 -0
- package/dist/commands/show.d.ts.map +1 -0
- package/dist/commands/show.js +39 -0
- package/dist/commands/show.js.map +1 -0
- package/dist/commands/status.d.ts +6 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +77 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/validate.d.ts +6 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +36 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/help/jig-help.d.ts +25 -0
- package/dist/help/jig-help.d.ts.map +1 -0
- package/dist/help/jig-help.js +147 -0
- package/dist/help/jig-help.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +216 -0
- package/dist/index.js.map +1 -0
- package/dist/keys.d.ts +14 -0
- package/dist/keys.d.ts.map +1 -0
- package/dist/keys.js +68 -0
- package/dist/keys.js.map +1 -0
- package/dist/live-view.d.ts +90 -0
- package/dist/live-view.d.ts.map +1 -0
- package/dist/live-view.js +239 -0
- package/dist/live-view.js.map +1 -0
- package/dist/permissions.d.ts +40 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +88 -0
- package/dist/permissions.js.map +1 -0
- package/dist/providers.d.ts +68 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +230 -0
- package/dist/providers.js.map +1 -0
- package/dist/session/app.d.ts +28 -0
- package/dist/session/app.d.ts.map +1 -0
- package/dist/session/app.js +458 -0
- package/dist/session/app.js.map +1 -0
- package/dist/session/ascii.d.ts +5 -0
- package/dist/session/ascii.d.ts.map +1 -0
- package/dist/session/ascii.js +39 -0
- package/dist/session/ascii.js.map +1 -0
- package/dist/session/commands.d.ts +26 -0
- package/dist/session/commands.d.ts.map +1 -0
- package/dist/session/commands.js +828 -0
- package/dist/session/commands.js.map +1 -0
- package/dist/session/controller.d.ts +291 -0
- package/dist/session/controller.d.ts.map +1 -0
- package/dist/session/controller.js +779 -0
- package/dist/session/controller.js.map +1 -0
- package/dist/session/editor.d.ts +60 -0
- package/dist/session/editor.d.ts.map +1 -0
- package/dist/session/editor.js +128 -0
- package/dist/session/editor.js.map +1 -0
- package/dist/session/jig-theme.json +1 -0
- package/dist/session/keys.d.ts +26 -0
- package/dist/session/keys.d.ts.map +1 -0
- package/dist/session/keys.js +95 -0
- package/dist/session/keys.js.map +1 -0
- package/dist/session/lines.d.ts +65 -0
- package/dist/session/lines.d.ts.map +1 -0
- package/dist/session/lines.js +370 -0
- package/dist/session/lines.js.map +1 -0
- package/dist/session/markdown.d.ts +13 -0
- package/dist/session/markdown.d.ts.map +1 -0
- package/dist/session/markdown.js +188 -0
- package/dist/session/markdown.js.map +1 -0
- package/dist/session/models.d.ts +24 -0
- package/dist/session/models.d.ts.map +1 -0
- package/dist/session/models.js +17 -0
- package/dist/session/models.js.map +1 -0
- package/dist/session/start.d.ts +27 -0
- package/dist/session/start.d.ts.map +1 -0
- package/dist/session/start.js +140 -0
- package/dist/session/start.js.map +1 -0
- package/dist/session/theme.d.ts +137 -0
- package/dist/session/theme.d.ts.map +1 -0
- package/dist/session/theme.js +129 -0
- package/dist/session/theme.js.map +1 -0
- package/dist/session-runner.d.ts +107 -0
- package/dist/session-runner.d.ts.map +1 -0
- package/dist/session-runner.js +463 -0
- package/dist/session-runner.js.map +1 -0
- package/dist/terminal-width.d.ts +7 -0
- package/dist/terminal-width.d.ts.map +1 -0
- package/dist/terminal-width.js +45 -0
- package/dist/terminal-width.js.map +1 -0
- package/dist/topology-arg.d.ts +12 -0
- package/dist/topology-arg.d.ts.map +1 -0
- package/dist/topology-arg.js +26 -0
- package/dist/topology-arg.js.map +1 -0
- package/docs/jig-help.md +70 -0
- package/package.json +73 -4
package/docs/jig-help.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Jig's own documentation
|
|
2
|
+
|
|
3
|
+
The jig_help tool searches this file, with the slash commands, the built-in topologies and the version added from the code when it runs. Each part starts with a level-two heading.
|
|
4
|
+
|
|
5
|
+
## What Jig is
|
|
6
|
+
|
|
7
|
+
Jig is a Joint Inference Graph: several models reasoning together, arranged as a graph you define. A topology names the roles (Plan, Do, Check, Critique, Decide, an Advisor that another role may consult), the order they work in, the ways the work goes back (Check fails: back to Do), and the limits. Each role runs on a model from any provider you have, or on a brain, a named chain of models. You use it for real work in your own project, and every run is recorded so it can be replayed and measured.
|
|
8
|
+
|
|
9
|
+
`jig` with nothing after it opens a session in your terminal, the way `claude` does: each message you send is a task your topology runs, drawn live on its grid. `jig run` runs one task from a script. The packages are jig-console (the `jig` command) and jig-core (the engine, for building your own harness in code).
|
|
10
|
+
|
|
11
|
+
## The session and its keys
|
|
12
|
+
|
|
13
|
+
The topology sits at the top, drawn on its grid; the conversation is in the middle; the input is in its own box near the bottom, with the run's activity line just above it while a task runs; the footer is under the box: the topology, its roles, the model and the permission mode, then each role's state.
|
|
14
|
+
|
|
15
|
+
- Enter sends. Alt+Enter, Ctrl+J or a backslash before Enter start a new line. A paste goes in whole.
|
|
16
|
+
- Up and down walk your earlier messages. Tab completes a slash command and its arguments.
|
|
17
|
+
- Typing while a run goes sends a note Do reads on its next turn. Esc stops the run.
|
|
18
|
+
- Shift+Tab cycles the permission mode: default, accept edits, plan.
|
|
19
|
+
- Ctrl+T folds the topology to one line. PgUp and PgDn scroll the conversation. Ctrl+D quits.
|
|
20
|
+
- `jig --resume` opens your last session again, with its conversation and settings.
|
|
21
|
+
- A command that takes a choice opens a picker when you type it alone (arrows, Enter, Esc, the current value marked, typing filters a long list), and acts at once when you give it the choice.
|
|
22
|
+
|
|
23
|
+
## Switching the topology, a role's model or its brain
|
|
24
|
+
|
|
25
|
+
- To switch the topology, type `/topology` alone and pick one with the arrows and Enter, or type `/topology <id>`, for example `/topology deep-reasoning`. A `.yaml` or `.json` definition file in your project works too: `/topology my-flow.yaml`. `/topology list` prints them all.
|
|
26
|
+
- To change one role's model, type `/models` alone: pick the role (Check, for example), then pick a model or a brain from the live lists. Or give it at once: `/models <role id> <entry>/<model>`, for example `/models eval ollama/qwen2.5:14b` gives Check (its id is eval) that model. `/models default <entry>/<model>` changes every role not named. A role can also take a brain: `/models eval strong`.
|
|
27
|
+
- `/models table` shows each role with its model or brain; `/models list` shows the models each provider has now.
|
|
28
|
+
- From a script: `jig run --topology <id> --model <name> --provider <entry>`.
|
|
29
|
+
- The role ids of the built-in topologies are listed below under the built-in topologies; Do is usually exec, Check is eval, Plan is plan, Critique is critic, Decide is refine.
|
|
30
|
+
|
|
31
|
+
## Permissions and modes
|
|
32
|
+
|
|
33
|
+
Jig decides every tool call a role makes before it runs, as Claude Code does.
|
|
34
|
+
|
|
35
|
+
- Reads inside the working directories run without asking; a read outside asks.
|
|
36
|
+
- A write asks, with the diff of what would change: Yes, Yes and allow all edits for this session, or No.
|
|
37
|
+
- A shell command runs without asking when every part only reads (ls, cat, grep, git status, a cd inside); anything else asks, part by part. The wider yes keeps the command's prefix as a rule for the project, in `.jig/settings.local.json`.
|
|
38
|
+
- No opens a field for what to do instead; the role reads it and goes on. A plain No, or Esc, stops the run.
|
|
39
|
+
- Modes, cycled with Shift+Tab: default asks as above; accept edits runs writes (and mkdir, touch, mv, cp) inside the working directories without asking; plan only reads. `--dangerously-skip-permissions` skips the questions for one session or run, except deny rules, ask rules and dangerous removals.
|
|
40
|
+
- Rules look like `Shell(npm test *)`, `Write(src/**)`, `Read(./.env)`, in `~/.config/jig/config.json`, the project's `jig.config.json` or `.jig/settings.local.json`. Deny beats ask, and ask beats allow. `/permissions` lists and changes them; `/add-dir` adds a working directory.
|
|
41
|
+
- `jig run` has nobody to ask, so what would ask is denied: allow it with `--permission-mode acceptEdits`, `--allow 'Shell(npm test *)'` or a rule.
|
|
42
|
+
|
|
43
|
+
## Providers, keys and brains
|
|
44
|
+
|
|
45
|
+
- Jig finds the model servers running on this computer by itself, in the background when a session opens: Ollama (11434, or OLLAMA_HOST), LM Studio (1234), llama.cpp or llamafile (8080), vLLM (8000), Jan (1337), text-generation-webui (5000), KoboldCpp (5001), LiteLLM (4000), GPT4All (4891) and Docker Model Runner (12434). It only asks 127.0.0.1, never the network. What answers can be used at once and joins the local brains; `/providers keep <name>` or `jig providers discover --save` writes it to your config, and `/providers discover` asks again.
|
|
46
|
+
- Provider entries live in `~/.config/jig/config.json` under "providers": Ollama (the default, `http://localhost:11434`), Anthropic, OpenAI, Gemini, OpenRouter, or any server that speaks OpenAI's API (presets for LM Studio, llama.cpp, vLLM, Jan, Groq, Mistral, DeepSeek, Together).
|
|
47
|
+
- A key is always a reference, never written by Jig: `env:NAME`, `keychain` (your OS keychain) or `command:<program>`. `/providers` in the session, or `jig providers list|add|test|remove`, administers them.
|
|
48
|
+
- A role names a model as `<entry>/<model>`, for example `ollama/qwen2.5:7b`.
|
|
49
|
+
- A brain is a named chain of models: `default`, `strong`, `fast` and `local` come with Jig, and you can set your own under "brains". A role on a brain moves to the next model only when a provider is unavailable, never on a bad answer, and the screen marks it with ↪. `/brains` and `jig brains` show which model would answer now; `jig doctor` checks everything.
|
|
50
|
+
- The built-in topologies give roles that produce work `fast` and roles that judge `strong`; with only Ollama they are all your local model.
|
|
51
|
+
|
|
52
|
+
## Where files live: sessions, runs, settings
|
|
53
|
+
|
|
54
|
+
- Sessions, runs and your history are kept in `.jig/` in the folder you run Jig in: `sessions/` (each session's conversation and settings, which `jig --resume` opens), `runs/` (each run's steps and record, for /replay), `history.jsonl` (your input history) and `settings.local.json` (your own permission rules). It has its own .gitignore, so none of it lands in a commit.
|
|
55
|
+
- `~/.config/jig/config.json` (or under `XDG_CONFIG_HOME`): your providers, brains and settings. A project's `jig.config.json` goes over it.
|
|
56
|
+
- A topology file (`.yaml` or `.json`) can sit anywhere in your project; `jig validate <file>` checks it and `jig convert <file>` converts it.
|
|
57
|
+
|
|
58
|
+
## Checks and outcomes
|
|
59
|
+
|
|
60
|
+
- `/checks add <command>` gives the next task a check the lab runs itself, where no role can write: it passes when the command exits 0. `jig run --check "<command>"` does the same.
|
|
61
|
+
- A run ends passed, failed, inconclusive, stopped or not verified. Not verified means nothing could check the answer: nothing changed, there were no checks, and no role gave a verdict.
|
|
62
|
+
- `/runs` and `/replay` play a past run again on the same screen; `/budget` sets the tokens a task may spend; `/memory` sets how far back recall reaches.
|
|
63
|
+
|
|
64
|
+
## Scripts and other commands
|
|
65
|
+
|
|
66
|
+
- `jig run --topology <id> --task "<text>"` runs one task and exits 0 when it passed.
|
|
67
|
+
- `jig show <topology>` draws a topology; `--play` runs it on a scripted model, with no tokens.
|
|
68
|
+
- `jig replay <run-id>` plays a recorded run.
|
|
69
|
+
- `jig validate <file>` and `jig convert <file>` check and convert topology files.
|
|
70
|
+
- `jig --help` lists everything.
|
package/package.json
CHANGED
|
@@ -1,6 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jig-console",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "jig, the terminal for Jig: an interactive session where each message is a task your topology of models runs, drawn live on its grid; and run, show, replay, validate and convert for scripts.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"llm",
|
|
7
|
+
"agents",
|
|
8
|
+
"multi-agent",
|
|
9
|
+
"cli",
|
|
10
|
+
"terminal",
|
|
11
|
+
"tui",
|
|
12
|
+
"ink",
|
|
13
|
+
"topology",
|
|
14
|
+
"ollama",
|
|
15
|
+
"harness",
|
|
16
|
+
"jig"
|
|
17
|
+
],
|
|
18
|
+
"author": "David Estevez",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"homepage": "https://github.com/destbreso/jig/tree/main/packages/cli#readme",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/destbreso/jig.git",
|
|
24
|
+
"directory": "packages/cli"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/destbreso/jig/issues"
|
|
28
|
+
},
|
|
29
|
+
"type": "module",
|
|
30
|
+
"main": "dist/index.js",
|
|
31
|
+
"types": "dist/index.d.ts",
|
|
32
|
+
"bin": {
|
|
33
|
+
"jig": "dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"docs",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=20"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc && node -e \"require('fs').chmodSync('dist/index.js', 0o755)\"",
|
|
46
|
+
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
47
|
+
"dev": "tsc --watch",
|
|
48
|
+
"start": "node dist/index.js",
|
|
49
|
+
"lint": "eslint src/",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"prepack": "npm run clean && npm run build"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"chalk": "^5.4.1",
|
|
55
|
+
"cli-table3": "^0.6.5",
|
|
56
|
+
"commander": "^13.0.0",
|
|
57
|
+
"dotenv": "^16.4.7",
|
|
58
|
+
"eventemitter3": "^5.0.1",
|
|
59
|
+
"ink": "^6.8.0",
|
|
60
|
+
"inquirer": "^12.3.0",
|
|
61
|
+
"jig-core": "^0.1.2",
|
|
62
|
+
"marked": "^18.1.3",
|
|
63
|
+
"nanoid": "^5.0.9",
|
|
64
|
+
"ora": "^8.1.0",
|
|
65
|
+
"react": "^19.2.4"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@types/node": "^22.0.0",
|
|
69
|
+
"@types/react": "^19.2.13",
|
|
70
|
+
"get-east-asian-width": "^1.7.0",
|
|
71
|
+
"ink-testing-library": "^4.0.0",
|
|
72
|
+
"typescript": "^5.7.0",
|
|
73
|
+
"vitest": "^3.0.0"
|
|
74
|
+
}
|
|
75
|
+
}
|