@awak-app/simy-cli 0.1.3 → 0.1.5
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 +75 -7
- package/package.json +16 -4
- package/src/agent.js +306 -33
- package/src/auto-update.js +631 -0
- package/src/backend-executable.js +92 -6
- package/src/console/app.js +46 -8
- package/src/console/index.js +5 -4
- package/src/desktop-executor.js +137 -0
- package/src/index.js +40 -4
- package/src/local-attachments.js +2 -2
- package/src/orchestrator/audit.js +101 -7
- package/src/orchestrator/budget.js +112 -0
- package/src/orchestrator/contract.js +175 -27
- package/src/orchestrator/independent-audit.js +18 -4
- package/src/orchestrator/index.js +1 -0
- package/src/orchestrator/instruction.js +41 -5
- package/src/orchestrator/loop.js +181 -7
- package/src/orchestrator/presentation.js +2 -2
- package/src/orchestrator/problem-solving.js +129 -0
- package/src/orchestrator/recovery.js +271 -0
- package/src/orchestrator/result.js +2 -0
- package/src/orchestrator/retry.js +140 -0
- package/src/orchestrator/shared.js +87 -5
- package/src/repository-inventory.js +87 -0
- package/src/runner.js +76 -94
package/README.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
# SIMY CLI
|
|
2
2
|
|
|
3
|
-
Local execution agent for SIMY
|
|
3
|
+
Local execution agent for SIMY Agentic Loop runs.
|
|
4
|
+
|
|
5
|
+
For normal use, install SIMY globally and keep its background agent running:
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
|
-
npx @awak-app/simy-cli
|
|
7
8
|
npm install -g @awak-app/simy-cli
|
|
8
|
-
simy
|
|
9
9
|
simy --daemon
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
This is the recommended installation because the daemon can safely install
|
|
13
|
+
patch releases and restart itself when no Agentic Loop task is active. To run
|
|
14
|
+
the interactive chat after installation, use `simy`.
|
|
15
|
+
|
|
16
|
+
For a one-time evaluation or source development, these modes remain supported:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx @awak-app/simy-cli
|
|
20
|
+
npm start
|
|
10
21
|
simy --no-tui
|
|
11
22
|
simy --host https://simy.example.com
|
|
12
23
|
```
|
|
@@ -18,16 +29,73 @@ available for automation, but the command-line flag takes precedence.
|
|
|
18
29
|
|
|
19
30
|
The CLI starts a loopback HTTP agent on a random available port, keeps a
|
|
20
31
|
48-hour, origin-scoped local session, and opens a native coding chat. The first
|
|
21
|
-
chat message creates the remote audit ledger and starts the local
|
|
32
|
+
chat message creates the remote audit ledger and starts the local Agentic Loop
|
|
22
33
|
state machine; SIMY Web mirrors the lifecycle but is not required as the task
|
|
23
34
|
entry point. The CLI also accepts backend-issued launch challenges for Web-led
|
|
24
35
|
runs. It builds the requirement charter, runs Codex or Claude Code, audits
|
|
25
36
|
structured completion evidence, and re-instructs the executor within the
|
|
26
37
|
configured attempt budget.
|
|
27
38
|
|
|
39
|
+
## CLI updates
|
|
40
|
+
|
|
41
|
+
The CLI checks the npm registry at startup and once per hour while it is
|
|
42
|
+
running. A daemon installed with `npm install -g` automatically installs stable
|
|
43
|
+
patch releases only after a strict idle check confirms that there is no active,
|
|
44
|
+
paused, blocked, or human-waiting task, executor child process, or pending
|
|
45
|
+
ledger write. It stops accepting new work during installation, starts the new
|
|
46
|
+
daemon, verifies its version and local health handoff, and only then closes the
|
|
47
|
+
old process.
|
|
48
|
+
|
|
49
|
+
Foreground, `npx`, source-checkout, fixed-port, minor, and major updates are not
|
|
50
|
+
restarted silently. The CLI instead displays the exact command a normal user
|
|
51
|
+
can run:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install -g @awak-app/simy-cli@<version> && simy --daemon
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use `--no-auto-update` or `SIMY_AUTO_UPDATE=0` to disable background checks.
|
|
58
|
+
The current update state is also exposed by `GET /v1/health` as `cli_update`.
|
|
59
|
+
Auto-update E2E screenshots are generated locally under
|
|
60
|
+
`.artifacts/cli-auto-update/`; this ignored directory must not be committed.
|
|
61
|
+
|
|
62
|
+
## Executor compatibility
|
|
63
|
+
|
|
64
|
+
SIMY checks the selected executor with `--version` before an Agentic Loop can
|
|
65
|
+
start. The currently validated compatibility floors are Codex `0.144.0` and
|
|
66
|
+
Claude Code `2.1.200`. A missing, older, or unversioned executable fails the
|
|
67
|
+
preflight and returns the installed version, required version, and a recovery
|
|
68
|
+
command to SIMY Web. Update Codex with
|
|
69
|
+
`npm install -g @openai/codex@latest`; update Claude Code with `claude update`.
|
|
70
|
+
|
|
71
|
+
## Your Desktop executor
|
|
72
|
+
|
|
73
|
+
SIMY CLI is the `desktop` execution target, shown to users as **Your Desktop**.
|
|
74
|
+
It can run either Codex or Claude Code as a child process inside the verified
|
|
75
|
+
local Git checkout. Device heartbeats advertise both desktop provider
|
|
76
|
+
capabilities and their installed/required versions. Preflight and every standard
|
|
77
|
+
provider dispatch fail closed unless the selected binary is compatible; there
|
|
78
|
+
is no fallback to an unverified executable name.
|
|
79
|
+
|
|
80
|
+
Legacy local requests without `execution_target` continue to resolve to
|
|
81
|
+
`desktop`. A request marked for the hosted `simy` target is rejected by the
|
|
82
|
+
local CLI boundary so hosted and desktop execution cannot be confused. The
|
|
83
|
+
target and bound device id are preserved in the run Charter, redacted Web
|
|
84
|
+
ledger snapshot, and restored run.
|
|
85
|
+
|
|
86
|
+
## Blocked recovery contract
|
|
87
|
+
|
|
88
|
+
Every `waiting_human`, `blocked`, or `failed` lifecycle event includes a
|
|
89
|
+
versioned `detail.recovery` object. It provides a stable reason code, a
|
|
90
|
+
user-safe explanation, a primary action, executable action metadata, and
|
|
91
|
+
bounded technical details. Preflight failures use the same contract for
|
|
92
|
+
executor updates, repository selection, and CLI reconnection. Web clients must
|
|
93
|
+
validate the action type before rendering or executing it; raw local error text
|
|
94
|
+
is not copied into the recovery contract.
|
|
95
|
+
|
|
28
96
|
## Interactive console
|
|
29
97
|
|
|
30
|
-
Running `simy` in a terminal opens the
|
|
98
|
+
Running `simy` in a terminal opens the Agentic Loop chat. It discovers the
|
|
31
99
|
current GitHub repository and branch, selects an available executor, and keeps
|
|
32
100
|
the composer active so a natural-language request can start immediately. Each
|
|
33
101
|
run appears in a selectable list with its lifecycle state, process ID, and a
|
|
@@ -74,7 +142,7 @@ The local PR lifecycle is intentionally separate from deployment:
|
|
|
74
142
|
and human approval all pass.
|
|
75
143
|
|
|
76
144
|
The Web UI can refresh review and CI evidence with
|
|
77
|
-
`POST /v1/
|
|
145
|
+
`POST /v1/agentic-loop/:run_id/recheck`. Passing the local implementation gate
|
|
78
146
|
does not by itself make a PR merge-ready.
|
|
79
147
|
|
|
80
148
|
Start `simy` from the selected repository or a workspace containing it. Set
|
|
@@ -86,7 +154,7 @@ from an empty CLI chat, types repository, branch, executor, attachment, and task
|
|
|
86
154
|
input through a pseudoterminal, creates the Web ledger, spawns real child
|
|
87
155
|
processes, and exercises HIL plus lifecycle controls. It regenerates the
|
|
88
156
|
screenshots, terminal frames, raw transcript, and SHA-256 manifest under
|
|
89
|
-
`docs/pr-evidence/cli-
|
|
157
|
+
`docs/pr-evidence/cli-agentic-loop-console/`.
|
|
90
158
|
|
|
91
159
|
## Publishing
|
|
92
160
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awak-app/simy-cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Local SIMY
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Local SIMY Agentic Loop executor for Codex and Claude Code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"simy": "src/index.js"
|
|
@@ -14,11 +14,23 @@
|
|
|
14
14
|
"start": "node ./src/index.js",
|
|
15
15
|
"test": "node --test",
|
|
16
16
|
"test:e2e:console": "node ./scripts/console-e2e.js",
|
|
17
|
+
"test:e2e:auto-update": "node ./scripts/auto-update-e2e.js",
|
|
18
|
+
"test:e2e:audit-gate": "node ./scripts/audit-gate-e2e.js",
|
|
19
|
+
"test:e2e:retry-circuit": "node ./scripts/retry-circuit-e2e.js",
|
|
20
|
+
"test:e2e:follow-up-charter": "node ./scripts/follow-up-charter-e2e.js",
|
|
21
|
+
"test:e2e:task-routing": "node ./scripts/task-routing-e2e.js",
|
|
22
|
+
"test:e2e:executor-version-preflight": "node ./scripts/executor-version-preflight-e2e.js",
|
|
23
|
+
"test:e2e:blocked-recovery": "node ./scripts/blocked-recovery-e2e.js",
|
|
24
|
+
"test:e2e:process-localization": "node ./scripts/process-localization-e2e.js",
|
|
25
|
+
"test:e2e:hypothesis-retries": "node ./scripts/hypothesis-retries-e2e.js",
|
|
26
|
+
"test:e2e:budgets": "node ./scripts/budget-enforcement-e2e.js",
|
|
27
|
+
"test:e2e:desktop-executor": "node ./scripts/desktop-executor-e2e.js",
|
|
17
28
|
"test:e2e:console:real-provider": "node ./scripts/real-provider-console-e2e.js",
|
|
18
29
|
"test:e2e:console:fullstack": "node ./scripts/fullstack-cli-smoke.js",
|
|
19
|
-
"check": "npm run check:syntax && npm run check:real-provider-syntax && npm test && npm run check:package",
|
|
30
|
+
"check": "npm run check:auto-update && node --check ./src/desktop-executor.js && node --check ./scripts/desktop-executor-e2e.js && node --check ./scripts/fixtures/fake-desktop-provider.js && npm run check:syntax && npm run check:real-provider-syntax && npm test && npm run check:package",
|
|
31
|
+
"check:auto-update": "node --check ./src/auto-update.js && node --check ./scripts/auto-update-e2e.js",
|
|
20
32
|
"check:real-provider-syntax": "node --check ./scripts/real-codex-probe.js && node --check ./scripts/real-claude-probe.js && node --check ./scripts/real-provider-console-fixture.js && node --check ./scripts/real-provider-console-e2e.js",
|
|
21
|
-
"check:syntax": "node --check ./src/index.js && node --check ./src/agent.js && node --check ./src/browser.js && node --check ./src/web-api.js && node --check ./src/run-registry.js && node --check ./src/backend-executable.js && node --check ./src/provider-stream.js && node --check ./src/console/index.js && node --check ./src/console/app.js && node --check ./src/console/commands.js && node --check ./src/local-attachments.js && node --check ./src/repository-inventory.js && node --check ./src/session-store.js && node --check ./src/web-origin.js && node --check ./src/workspace-context.js && node --check ./src/orchestrator/index.js && node --check ./src/orchestrator/shared.js && node --check ./src/orchestrator/risk.js && node --check ./src/orchestrator/contract.js && node --check ./src/orchestrator/instruction.js && node --check ./src/orchestrator/execution-io.js && node --check ./src/orchestrator/presentation.js && node --check ./src/orchestrator/result.js && node --check ./src/orchestrator/evidence.js && node --check ./src/orchestrator/independent-audit.js && node --check ./src/orchestrator/audit.js && node --check ./src/orchestrator/loop.js && node --check ./src/runner.js && node --check ./scripts/fixtures/fake-coding-backend.js && node --check ./scripts/console-e2e-fixture.js && node --check ./scripts/console-e2e.js && node --check ./scripts/real-provider-console-fixture.js && node --check ./scripts/real-provider-console-e2e.js && node --check ./scripts/fullstack-cli-smoke.js && node --check ./scripts/check-package-contents.js",
|
|
33
|
+
"check:syntax": "node --check ./src/index.js && node --check ./src/agent.js && node --check ./src/browser.js && node --check ./src/web-api.js && node --check ./src/run-registry.js && node --check ./src/backend-executable.js && node --check ./src/provider-stream.js && node --check ./src/console/index.js && node --check ./src/console/app.js && node --check ./src/console/commands.js && node --check ./src/local-attachments.js && node --check ./src/repository-inventory.js && node --check ./src/session-store.js && node --check ./src/web-origin.js && node --check ./src/workspace-context.js && node --check ./src/orchestrator/index.js && node --check ./src/orchestrator/shared.js && node --check ./src/orchestrator/recovery.js && node --check ./src/orchestrator/risk.js && node --check ./src/orchestrator/contract.js && node --check ./src/orchestrator/instruction.js && node --check ./src/orchestrator/problem-solving.js && node --check ./src/orchestrator/budget.js && node --check ./src/orchestrator/execution-io.js && node --check ./src/orchestrator/presentation.js && node --check ./src/orchestrator/result.js && node --check ./src/orchestrator/retry.js && node --check ./src/orchestrator/evidence.js && node --check ./src/orchestrator/independent-audit.js && node --check ./src/orchestrator/audit.js && node --check ./src/orchestrator/loop.js && node --check ./src/runner.js && node --check ./scripts/fixtures/fake-coding-backend.js && node --check ./scripts/e2e-terminal-evidence.js && node --check ./scripts/audit-gate-e2e.js && node --check ./scripts/retry-circuit-e2e.js && node --check ./scripts/follow-up-charter-e2e.js && node --check ./scripts/task-routing-e2e.js && node --check ./scripts/executor-version-preflight-e2e.js && node --check ./scripts/blocked-recovery-e2e.js && node --check ./scripts/process-localization-e2e.js && node --check ./scripts/hypothesis-retries-e2e.js && node --check ./scripts/budget-enforcement-e2e.js && node --check ./scripts/console-e2e-fixture.js && node --check ./scripts/console-e2e.js && node --check ./scripts/real-provider-console-fixture.js && node --check ./scripts/real-provider-console-e2e.js && node --check ./scripts/fullstack-cli-smoke.js && node --check ./scripts/check-package-contents.js",
|
|
22
34
|
"check:package": "node ./scripts/check-package-contents.js"
|
|
23
35
|
},
|
|
24
36
|
"engines": {
|