@milpa/comal 0.1.0 → 0.1.2
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 +30 -28
- package/backend/contracts/remote-commands-v1.json +125 -0
- package/bin/comal.mjs +16 -5
- package/docs/investigation.md +2 -2
- package/governance/chrome-task-v2.json +67 -0
- package/node_modules/@jitl/quickjs-ffi-types/LICENSE +21 -0
- package/node_modules/@jitl/quickjs-ffi-types/README.md +5 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.d.mts +549 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.d.ts +549 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.js +2 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.js.map +1 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.mjs +2 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.mjs.map +1 -0
- package/node_modules/@jitl/quickjs-ffi-types/package.json +36 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/LICENSE +47 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/README.md +93 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.browser.d.ts +15 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.browser.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.cjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.cloudflare.cjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.cloudflare.d.ts +15 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.d.ts +15 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.wasm +0 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.wasm.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.d.mts +94 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.d.ts +94 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.js.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.mjs.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.d.mts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.d.ts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.js.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.mjs.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/package.json +61 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/LICENSE +47 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/README.md +88 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.browser.d.ts +11 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.browser.mjs +5430 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.cjs +5485 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.cloudflare.cjs +5424 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.d.ts +11 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.mjs +5541 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.wasm +0 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.wasm.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.d.mts +85 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.d.ts +85 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.js.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.mjs.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.d.mts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.d.ts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.js.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.mjs.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-debug-sync/package.json +61 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/LICENSE +47 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/README.md +89 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.browser.d.ts +15 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.browser.mjs +26 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.cjs +25 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.cloudflare.cjs +25 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.cloudflare.d.ts +15 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.d.ts +15 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.mjs +30 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.wasm +0 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.d.mts +94 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.d.ts +94 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.js.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.mjs.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.d.mts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.d.ts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.js.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.mjs.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-asyncify/package.json +61 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/LICENSE +47 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/README.md +82 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.d.ts +11 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.mjs +22 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cjs +21 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.cjs +21 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.d.ts +11 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.mjs +25 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.wasm +0 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.mts +85 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.ts +85 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.mts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.ts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs.map +1 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/package.json +61 -0
- package/node_modules/quickjs-emscripten/LICENSE +21 -0
- package/node_modules/quickjs-emscripten/README.md +928 -0
- package/node_modules/quickjs-emscripten/dist/chunk-OHAYRCBA.mjs +2 -0
- package/node_modules/quickjs-emscripten/dist/chunk-OHAYRCBA.mjs.map +1 -0
- package/node_modules/quickjs-emscripten/dist/index.d.mts +57 -0
- package/node_modules/quickjs-emscripten/dist/index.d.ts +57 -0
- package/node_modules/quickjs-emscripten/dist/index.global.js +7309 -0
- package/node_modules/quickjs-emscripten/dist/index.js +2 -0
- package/node_modules/quickjs-emscripten/dist/index.js.map +1 -0
- package/node_modules/quickjs-emscripten/dist/index.mjs +2 -0
- package/node_modules/quickjs-emscripten/dist/index.mjs.map +1 -0
- package/node_modules/quickjs-emscripten/dist/variants.d.mts +39 -0
- package/node_modules/quickjs-emscripten/dist/variants.d.ts +39 -0
- package/node_modules/quickjs-emscripten/dist/variants.js +2 -0
- package/node_modules/quickjs-emscripten/dist/variants.js.map +1 -0
- package/node_modules/quickjs-emscripten/dist/variants.mjs +2 -0
- package/node_modules/quickjs-emscripten/dist/variants.mjs.map +1 -0
- package/node_modules/quickjs-emscripten/package.json +69 -0
- package/node_modules/quickjs-emscripten-core/LICENSE +21 -0
- package/node_modules/quickjs-emscripten-core/README.md +341 -0
- package/node_modules/quickjs-emscripten-core/README.template.md +70 -0
- package/node_modules/quickjs-emscripten-core/dist/chunk-TAV5CUKK.mjs +2 -0
- package/node_modules/quickjs-emscripten-core/dist/chunk-TAV5CUKK.mjs.map +1 -0
- package/node_modules/quickjs-emscripten-core/dist/chunk-V2S4ZYJR.mjs +7 -0
- package/node_modules/quickjs-emscripten-core/dist/chunk-V2S4ZYJR.mjs.map +1 -0
- package/node_modules/quickjs-emscripten-core/dist/index.d.mts +2033 -0
- package/node_modules/quickjs-emscripten-core/dist/index.d.ts +2033 -0
- package/node_modules/quickjs-emscripten-core/dist/index.js +7 -0
- package/node_modules/quickjs-emscripten-core/dist/index.js.map +1 -0
- package/node_modules/quickjs-emscripten-core/dist/index.mjs +2 -0
- package/node_modules/quickjs-emscripten-core/dist/index.mjs.map +1 -0
- package/node_modules/quickjs-emscripten-core/dist/module-ES6BEMUI.mjs +2 -0
- package/node_modules/quickjs-emscripten-core/dist/module-ES6BEMUI.mjs.map +1 -0
- package/node_modules/quickjs-emscripten-core/dist/module-asyncify-2EFITU5U.mjs +2 -0
- package/node_modules/quickjs-emscripten-core/dist/module-asyncify-2EFITU5U.mjs.map +1 -0
- package/node_modules/quickjs-emscripten-core/package.json +49 -0
- package/package.json +6 -2
- package/src/agent.mjs +17 -6
- package/src/artifact-tools.mjs +3 -2
- package/src/auto-guard.mjs +5 -1
- package/src/cli.mjs +267 -201
- package/src/cloud-client.mjs +58 -8
- package/src/code-run-worker.mjs +70 -0
- package/src/code-run.mjs +97 -0
- package/src/codex-provider.mjs +28 -28
- package/src/compaction.mjs +1 -1
- package/src/goals.mjs +2 -2
- package/src/house.mjs +24 -24
- package/src/i18n/cli-es.mjs +97 -0
- package/src/i18n/es.mjs +227 -0
- package/src/i18n/index.mjs +48 -0
- package/src/image-attachments.mjs +263 -0
- package/src/model-controls.mjs +4 -4
- package/src/onboarding.mjs +91 -0
- package/src/openai-provider.mjs +24 -24
- package/src/peer-tools.mjs +4 -3
- package/src/permissions.mjs +53 -17
- package/src/provider-auth.mjs +30 -30
- package/src/provider-profiles.mjs +27 -27
- package/src/provider.mjs +30 -30
- package/src/remote-commands.mjs +11 -0
- package/src/remote-control.mjs +180 -0
- package/src/sessions.mjs +3 -3
- package/src/subagents.mjs +7 -3
- package/src/tool-packs.mjs +5 -2
- package/src/tools.mjs +92 -34
- package/src/tui/brand.mjs +2 -1
- package/src/tui/clipboard.mjs +5 -4
- package/src/tui/composer.mjs +77 -11
- package/src/tui/controller.mjs +111 -29
- package/src/tui/discovery.mjs +105 -100
- package/src/tui/markdown.mjs +10 -9
- package/src/tui/message-queue.mjs +27 -9
- package/src/tui/screen.mjs +209 -118
- package/src/vision.mjs +31 -3
- package/src/work-assertions.mjs +7 -7
- package/src/work-plan.mjs +189 -21
- package/src/work-recovery-proof.mjs +13 -1
- package/src/workflows/chrome-task.mjs +24 -7
package/README.md
CHANGED
|
@@ -1,82 +1,84 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Install Comal
|
|
2
2
|
|
|
3
|
-
Comal
|
|
3
|
+
Comal is a terminal client. You need Node.js 22 or later and npm; for code searches also install `rg` (ripgrep). You do not need to deploy PHP, Docker, or the backend to use the CLI. Private Artifacts use Comal's public house.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Start with npx
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The `@milpa/comal` package includes its JavaScript dependencies; it has no installation scripts and contains no author credentials or sessions.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npx @milpa/comal
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
An interactive first start opens setup inside the TUI. Press Enter to try the offline demo, choose Codex to authorize the subscription in your browser, or enter an OpenAI-compatible endpoint and let Comal discover its model. A failed connection returns to setup in the same terminal. Successful connection routing is remembered in `~/.config/comal/connection.json` (or `$XDG_CONFIG_HOME/comal/connection.json`); keys are never stored there. Explicit flags, environment settings, profiles and resumed sessions take precedence. Noninteractive invocations retain plain output.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
npm keeps its cache; Comal's state and credentials remain in your workspace and your configuration, outside that cache. No repository checkout is required.
|
|
16
|
+
|
|
17
|
+
## Make the global comal command
|
|
16
18
|
|
|
17
19
|
```sh
|
|
18
20
|
npm install --global --ignore-scripts @milpa/comal
|
|
19
21
|
|
|
20
|
-
#
|
|
22
|
+
# If your global prefix requires permissions, use a user prefix:
|
|
21
23
|
# npm install --global --prefix "$HOME/.local" --ignore-scripts @milpa/comal
|
|
22
24
|
export PATH="$HOME/.local/bin:$PATH"
|
|
23
25
|
comal --version
|
|
24
26
|
comal --help
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
Keep the PATH line in your shell startup file if you use that prefix. If your Node manager already provides a user prefix, you can omit `--prefix "$HOME/.local"`. The package registers the `comal` executable; you do not need to create a shell alias.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
You can pin a version with `npx @milpa/comal@0.1.2` or `npm install --global @milpa/comal@0.1.2`. The local release manifest preserves SHA-256 and SHA-512 integrity is checked against npm at publish time. No independent publisher signature is claimed.
|
|
30
32
|
|
|
31
|
-
##
|
|
33
|
+
## Test without account or model
|
|
32
34
|
|
|
33
35
|
```sh
|
|
34
36
|
mkdir -p "$HOME/comal-practica"
|
|
35
37
|
cd "$HOME/comal-practica"
|
|
36
|
-
comal --demo -p '
|
|
38
|
+
comal --demo -p 'Show the tool cycle'
|
|
37
39
|
comal sessions
|
|
38
40
|
```
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
The demo is a deterministic script that uses real tools and creates a practice file. It is not inference and does not require payment. Your sessions are saved in the workspace, outside the installation.
|
|
41
43
|
|
|
42
|
-
##
|
|
44
|
+
## Connect your model
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
The legacy endpoint from the original environment is `http://llama.local:11438/`; it belongs to that network and no model is included with Comal. Explicitly select your connection:
|
|
45
47
|
|
|
46
48
|
```sh
|
|
47
|
-
#
|
|
48
|
-
comal --base-url http://127.0.0.1:8080/v1 --model
|
|
49
|
+
# OpenAI-compatible server you already have running.
|
|
50
|
+
comal --base-url http://127.0.0.1:8080/v1 --model YOUR_MODEL --name resident
|
|
49
51
|
|
|
50
|
-
#
|
|
52
|
+
# Or your compatible Codex access: authentication and selection are separate steps.
|
|
51
53
|
comal login codex
|
|
52
|
-
comal --auth-provider codex --name
|
|
54
|
+
comal --auth-provider codex --name resident
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
For APIs, set the key via the environment or your secrets manager. Do not paste it in the composer or as an argument. See https://comal.milpahq.com/academy/docs/modelos/ and https://comal.milpahq.com/academy/docs/login/ for profiles and providers.
|
|
56
58
|
|
|
57
|
-
##
|
|
59
|
+
## Connect your Artifacts account
|
|
58
60
|
|
|
59
61
|
```sh
|
|
60
62
|
comal cloud login
|
|
61
63
|
comal cloud status
|
|
62
64
|
```
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
Open the URL that Comal prints, sign in with Google or GitHub, and approve that CLI. In the current TUI you can also use `/cloud login`, or discover it with F6. `/rc` offers this login inline when needed and then opens the private remote session. Escape cancels login and returns to your composer. This account authorizes Artifacts and Remote Control; it is independent of your model login and billing. Your credentials remain in private files in your user directory, never in the package.
|
|
65
67
|
|
|
66
|
-
##
|
|
68
|
+
## Update or remove
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
Use `npx @milpa/comal@latest` for the latest release, or pin `npx @milpa/comal@VERSION`. For the optional global command, run `npm install --global @milpa/comal@latest` with the same prefix. Check `comal --version`. There is no silent update.
|
|
69
71
|
|
|
70
72
|
```sh
|
|
71
73
|
npm uninstall --global @milpa/comal
|
|
72
74
|
```
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
This removes the client; it keeps project sessions and user credentials. To disconnect Artifacts before removing it, use `comal cloud logout`; providers have their own `comal logout PROVIDER`.
|
|
75
77
|
|
|
76
|
-
##
|
|
78
|
+
## Scope of this first distribution
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
Installation is verified on Linux, from an empty prefix and HOME. macOS and Windows via WSL2 are paths pending verification in those environments; native Windows support is not claimed. Chrome Lab requires configuring your own SSH/CDP host. The package does not grant access to the author's lab.
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
The package belongs to the npm organization `@milpa`. `npx comal` corresponds to another project; use the full name `npx @milpa/comal`. A public license, native installers, and publisher signature will be resolved separately with the maintainer. Full documentation: https://comal.milpahq.com/academy/ .
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
Tarball transport and bundled dependencies use the documented mechanisms of [npm install](https://docs.npmjs.com/cli/v12/commands/npm-install/) and [bundledDependencies](https://docs.npmjs.com/files/package.json/).
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"protocol": "comal.remote.commands.v1",
|
|
3
|
+
"commands": [
|
|
4
|
+
{
|
|
5
|
+
"name": "help",
|
|
6
|
+
"arguments": "",
|
|
7
|
+
"description": "Commands available from this browser",
|
|
8
|
+
"argument_pattern": ""
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "status",
|
|
12
|
+
"arguments": "",
|
|
13
|
+
"description": "Session, provider and budget",
|
|
14
|
+
"argument_pattern": ""
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "context",
|
|
18
|
+
"arguments": "",
|
|
19
|
+
"description": "Context budget and provenance",
|
|
20
|
+
"argument_pattern": ""
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "tools",
|
|
24
|
+
"arguments": "",
|
|
25
|
+
"description": "Current tool catalog",
|
|
26
|
+
"argument_pattern": ""
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "house",
|
|
30
|
+
"arguments": "",
|
|
31
|
+
"description": "Receipts and interrupted operations",
|
|
32
|
+
"argument_pattern": ""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "operations",
|
|
36
|
+
"arguments": "",
|
|
37
|
+
"description": "Operation contracts and effects",
|
|
38
|
+
"argument_pattern": ""
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "state",
|
|
42
|
+
"arguments": "",
|
|
43
|
+
"description": "Request and current work",
|
|
44
|
+
"argument_pattern": ""
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "audit",
|
|
48
|
+
"arguments": "",
|
|
49
|
+
"description": "Verify the local ledger",
|
|
50
|
+
"argument_pattern": ""
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "board",
|
|
54
|
+
"arguments": "",
|
|
55
|
+
"description": "Task board",
|
|
56
|
+
"argument_pattern": ""
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "work",
|
|
60
|
+
"arguments": "[resume|recover]",
|
|
61
|
+
"description": "Inspect or continue accepted work",
|
|
62
|
+
"argument_pattern": "(?:resume|recover)?"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "compact",
|
|
66
|
+
"arguments": "",
|
|
67
|
+
"description": "Derive context without an LLM",
|
|
68
|
+
"argument_pattern": ""
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "models",
|
|
72
|
+
"arguments": "",
|
|
73
|
+
"description": "List models advertised by this provider",
|
|
74
|
+
"argument_pattern": ""
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "model",
|
|
78
|
+
"arguments": "[ID]",
|
|
79
|
+
"description": "Inspect or change the model at the next queue boundary",
|
|
80
|
+
"argument_pattern": "[^\\s\\x00-\\x1f]{1,160}"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "effort",
|
|
84
|
+
"arguments": "[LEVEL]",
|
|
85
|
+
"description": "Inspect or change reasoning effort",
|
|
86
|
+
"argument_pattern": "(?:auto|none|minimal|low|medium|high|xhigh|max)"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "capabilities",
|
|
90
|
+
"arguments": "[refresh]",
|
|
91
|
+
"description": "Model capability support and provenance",
|
|
92
|
+
"argument_pattern": "(?:refresh)?"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "plugins",
|
|
96
|
+
"arguments": "[status|list]",
|
|
97
|
+
"description": "Inspect plugins",
|
|
98
|
+
"argument_pattern": "(?:status|list)?"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "mcp",
|
|
102
|
+
"arguments": "[status|list]",
|
|
103
|
+
"description": "Inspect connected MCP servers",
|
|
104
|
+
"argument_pattern": "(?:status|list)?"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "agents",
|
|
108
|
+
"arguments": "",
|
|
109
|
+
"description": "Inspect child runs",
|
|
110
|
+
"argument_pattern": ""
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"local_only": [
|
|
114
|
+
"permissions",
|
|
115
|
+
"login",
|
|
116
|
+
"logout",
|
|
117
|
+
"cloud",
|
|
118
|
+
"resume",
|
|
119
|
+
"clear",
|
|
120
|
+
"exit",
|
|
121
|
+
"quit",
|
|
122
|
+
"rc",
|
|
123
|
+
"remote-control"
|
|
124
|
+
]
|
|
125
|
+
}
|
package/bin/comal.mjs
CHANGED
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
try {
|
|
3
|
-
const
|
|
3
|
+
const originalArgs=process.argv.slice(2);
|
|
4
4
|
const {readFile,access}=await import('node:fs/promises');
|
|
5
5
|
const {default:path}=await import('node:path');
|
|
6
6
|
const pkg=JSON.parse(await readFile(new URL('../package.json',import.meta.url),'utf8'));
|
|
7
|
+
// Exact version checks remain independent of CLI modules and UI configuration.
|
|
8
|
+
if(originalArgs.length===1 && ['--version','-v'].includes(originalArgs[0])) {
|
|
9
|
+
process.stdout.write(`Comal ${pkg.version}\n`);
|
|
10
|
+
} else if(pkg.name!=='@milpa/comal') {
|
|
11
|
+
const {main}=await import('../src/cli.mjs');
|
|
12
|
+
process.exitCode=await main(originalArgs);
|
|
13
|
+
} else {
|
|
14
|
+
const {t,configureLanguage,languageArguments}=await import('../src/i18n/index.mjs');
|
|
15
|
+
const {requested,remaining:args}=languageArguments(originalArgs);
|
|
16
|
+
configureLanguage({requested});
|
|
7
17
|
const configured=Object.entries(process.env).some(([key,value])=>value && /^(?:(?:COMAL|HARNESS)_(?:PROVIDER|BASE_URL|MODEL|PROVIDERS_CONFIG|PROFILE)|(?:OPENAI|ANTHROPIC|GEMINI)_(?:BASE_URL|MODEL|API_KEY))$/.test(key));
|
|
8
18
|
const hasProfile=await Promise.all(['.comal/providers.json','.harness/providers.json'].map(file=>access(path.resolve(file)).then(()=>true,()=>false)));
|
|
9
19
|
const firstRun=pkg.name==='@milpa/comal' && !args.length && !configured && !hasProfile.some(Boolean);
|
|
10
20
|
let pipedPrompt='';
|
|
11
|
-
if(firstRun && !process.stdin.isTTY)for await(const chunk of process.stdin){pipedPrompt+=chunk;if(Buffer.byteLength(pipedPrompt)>1024*1024)throw Error(
|
|
21
|
+
if(firstRun && !process.stdin.isTTY)for await(const chunk of process.stdin){pipedPrompt+=chunk;if(Buffer.byteLength(pipedPrompt)>1024*1024)throw Error(t("Prompt exceeds 1 MiB."));}
|
|
12
22
|
if(args.length===1 && ['--version','-v'].includes(args[0])) {
|
|
13
23
|
process.stdout.write(`Comal ${pkg.version}\n`);
|
|
14
|
-
} else if(firstRun && !pipedPrompt.trim()) {
|
|
24
|
+
} else if(firstRun && !pipedPrompt.trim() && !(process.stdin.isTTY && process.stdout.isTTY)) {
|
|
15
25
|
const command=process.env.npm_command==='exec'?'npx @milpa/comal':'comal';
|
|
16
|
-
process.stdout.write(
|
|
26
|
+
process.stdout.write(t("Comal {v0} · Your first turn\n\nChoose how to start from your project:\n\n Try without account or model:\n {v1} --demo\n\n Connect Codex:\n {v2} login codex\n {v3} --auth-provider codex\n\n Use your OpenAI-compatible server:\n {v4} --base-url http://127.0.0.1:8080/v1 --model YOUR_MODEL\n\n Connect your Artifacts account (optional):\n {v5} cloud login\n\nGuide: https://comal.milpahq.com/academy/\n", {v0: pkg.version, v1: command, v2: command, v3: command, v4: command, v5: command}));
|
|
17
27
|
} else {
|
|
18
28
|
const {main}=await import('../src/cli.mjs');
|
|
19
|
-
process.exitCode=await main(pipedPrompt.trim()?['--print','--',pipedPrompt]:
|
|
29
|
+
process.exitCode=await main(pipedPrompt.trim()?[...originalArgs,'--print','--',pipedPrompt]:originalArgs);
|
|
30
|
+
}
|
|
20
31
|
}
|
|
21
32
|
} catch(error){process.stderr.write(`Comal: ${error.message}\n`);process.exitCode=1;}
|
package/docs/investigation.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Comal provenance
|
|
2
2
|
|
|
3
|
-
Comal
|
|
3
|
+
Comal is an independent implementation researched using REA. The package includes the Node client, its tools, and shared contracts. It does not run Claude Code to produce responses. Documentation: https://comal.milpahq.com/academy/
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"profile": {
|
|
3
|
+
"name": "comal-chrome-task",
|
|
4
|
+
"version": "2",
|
|
5
|
+
"decisionIds": [
|
|
6
|
+
"COMAL-CHROME-002"
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"decisions": [
|
|
10
|
+
{
|
|
11
|
+
"id": "COMAL-CHROME-001",
|
|
12
|
+
"title": "La casa conserva el encargo y cierra con evidencia vigente",
|
|
13
|
+
"status": "accepted",
|
|
14
|
+
"supersedes": null,
|
|
15
|
+
"gates": [
|
|
16
|
+
{
|
|
17
|
+
"id": "task-scope",
|
|
18
|
+
"tier": "enforced",
|
|
19
|
+
"operations": [
|
|
20
|
+
"*"
|
|
21
|
+
],
|
|
22
|
+
"boundTo": "runtime:chrome-task.scope"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "current-evidence",
|
|
26
|
+
"tier": "enforced",
|
|
27
|
+
"operations": [
|
|
28
|
+
"WorkTaskUpdate"
|
|
29
|
+
],
|
|
30
|
+
"boundTo": "runtime:chrome-task.close"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "COMAL-CHROME-002",
|
|
36
|
+
"title": "The accepted Chrome task binds exact artifact bytes through a narrow host hash capability",
|
|
37
|
+
"status": "accepted",
|
|
38
|
+
"supersedes": "COMAL-CHROME-001",
|
|
39
|
+
"gates": [
|
|
40
|
+
{
|
|
41
|
+
"id": "task-scope",
|
|
42
|
+
"tier": "enforced",
|
|
43
|
+
"operations": [
|
|
44
|
+
"*"
|
|
45
|
+
],
|
|
46
|
+
"boundTo": "runtime:chrome-task.scope"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "current-evidence",
|
|
50
|
+
"tier": "enforced",
|
|
51
|
+
"operations": [
|
|
52
|
+
"WorkTaskUpdate"
|
|
53
|
+
],
|
|
54
|
+
"boundTo": "runtime:chrome-task.close"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "artifact-hash",
|
|
58
|
+
"tier": "enforced",
|
|
59
|
+
"operations": [
|
|
60
|
+
"FileInfo"
|
|
61
|
+
],
|
|
62
|
+
"boundTo": "runtime:chrome-task.artifact-hash"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
|
|
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.
|