@richhardry/codor 0.10.2 → 0.10.3
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 +15 -11
- package/node_modules/@codor/adapter-antigravity/package.json +2 -2
- package/node_modules/@codor/adapter-claude-code/package.json +2 -2
- package/node_modules/@codor/adapter-codex/package.json +2 -2
- package/node_modules/@codor/adapter-copilot/package.json +2 -2
- package/node_modules/@codor/adapter-cursor/package.json +2 -2
- package/node_modules/@codor/adapter-gemini/package.json +2 -2
- package/node_modules/@codor/adapter-opencode/package.json +2 -2
- package/node_modules/@codor/cli/dist/up.d.ts +2 -0
- package/node_modules/@codor/cli/dist/up.d.ts.map +1 -1
- package/node_modules/@codor/cli/dist/up.js +17 -2
- package/node_modules/@codor/cli/dist/up.js.map +1 -1
- package/node_modules/@codor/cli/package.json +3 -3
- package/node_modules/@codor/cli/runtime/web/assets/{LandingPage-BOmG5kSw.js → LandingPage-oLIz_H3H.js} +1 -1
- package/node_modules/@codor/cli/runtime/web/assets/{LedgerPage-CecuTS8-.js → LedgerPage-CDSjXPp5.js} +1 -1
- package/node_modules/@codor/cli/runtime/web/assets/NoChannels-yL8IGs8_.js +11 -0
- package/node_modules/@codor/cli/runtime/web/assets/{PairingCodeInput-Cr6XDWx-.js → PairingCodeInput-Bh2hzFji.js} +1 -1
- package/node_modules/@codor/cli/runtime/web/assets/{PairingPage-CQBWNA2L.js → PairingPage-CC8sVZit.js} +1 -1
- package/node_modules/@codor/cli/runtime/web/assets/{SettingsPage-DGLbSXE7.js → SettingsPage-Cl3O3UCt.js} +1 -1
- package/node_modules/@codor/cli/runtime/web/assets/{StartupUnavailable-DdQBHip_.js → StartupUnavailable-CHDoG9xu.js} +1 -1
- package/node_modules/@codor/cli/runtime/web/assets/{arrow-left-BOpjMuRi.js → arrow-left-CFyShOnS.js} +1 -1
- package/node_modules/@codor/cli/runtime/web/assets/{browser-BWQYNOsD.js → browser-BHgZ9Kl0.js} +1 -1
- package/node_modules/@codor/cli/runtime/web/assets/{index-DjwJakJC.css → index-BAZeDQCd.css} +1 -1
- package/node_modules/@codor/cli/runtime/web/assets/index-DWQr1Nx3.js +408 -0
- package/node_modules/@codor/cli/runtime/web/index.html +2 -2
- package/node_modules/@codor/cli/runtime/web/sw.js +1 -1
- package/node_modules/@codor/protocol/package.json +1 -1
- package/node_modules/@codor/switchboard/dist/adapter-registry.d.ts +45 -1
- package/node_modules/@codor/switchboard/dist/adapter-registry.d.ts.map +1 -1
- package/node_modules/@codor/switchboard/dist/adapter-registry.js +38 -11
- package/node_modules/@codor/switchboard/dist/adapter-registry.js.map +1 -1
- package/node_modules/@codor/switchboard/dist/daemon.d.ts +10 -0
- package/node_modules/@codor/switchboard/dist/daemon.d.ts.map +1 -1
- package/node_modules/@codor/switchboard/dist/daemon.js +55 -14
- package/node_modules/@codor/switchboard/dist/daemon.js.map +1 -1
- package/node_modules/@codor/switchboard/dist/server.d.ts.map +1 -1
- package/node_modules/@codor/switchboard/dist/server.js +11 -0
- package/node_modules/@codor/switchboard/dist/server.js.map +1 -1
- package/node_modules/@codor/switchboard/dist/store.d.ts +9 -0
- package/node_modules/@codor/switchboard/dist/store.d.ts.map +1 -1
- package/node_modules/@codor/switchboard/dist/store.js +16 -0
- package/node_modules/@codor/switchboard/dist/store.js.map +1 -1
- package/node_modules/@codor/switchboard/package.json +9 -9
- package/package.json +11 -11
- package/node_modules/@codor/cli/runtime/web/assets/NoChannels-CYiBXGQd.js +0 -11
- package/node_modules/@codor/cli/runtime/web/assets/index-Cxi54Xim.js +0 -408
package/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
<!-- harn:assume public-package-readme-renders-on-npm ref=readme-registry-logo -->
|
|
1
2
|
<p align="center">
|
|
2
3
|
<picture>
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" srcset="website/public/codor-mark-dark.svg">
|
|
4
|
-
<img src="website/public/codor-mark-light.svg" width="112" alt="Codor logo">
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/rjx18/codor/main/website/public/codor-mark-dark.svg">
|
|
5
|
+
<img src="https://raw.githubusercontent.com/rjx18/codor/main/website/public/codor-mark-light.svg" width="112" alt="Codor logo">
|
|
5
6
|
</picture>
|
|
6
7
|
</p>
|
|
8
|
+
<!-- harn:end public-package-readme-renders-on-npm -->
|
|
7
9
|
|
|
8
10
|
<h1 align="center">Codor</h1>
|
|
9
11
|
<p align="center"><strong>One channel. Every agent on the wire.</strong></p>
|
|
@@ -19,13 +21,13 @@
|
|
|
19
21
|
> broken or unfinished, along with frequent updates.
|
|
20
22
|
|
|
21
23
|
<!-- harn:assume operator-launches-serve-web-next ref=readme-current-web-client -->
|
|
22
|
-
<!-- harn:assume public-npx-
|
|
24
|
+
<!-- harn:assume public-npx-install-is-primary-install ref=readme-primary-install -->
|
|
23
25
|
## Install
|
|
24
26
|
|
|
25
27
|
Install and configure Codor in one command (Node.js 22.12.0 or newer):
|
|
26
28
|
|
|
27
29
|
```sh
|
|
28
|
-
npx @richhardry/codor
|
|
30
|
+
npx @richhardry/codor install
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
The interactive setup checks this computer, prepares private files, asks how the browser should
|
|
@@ -35,16 +37,18 @@ expiry. It never sends channel data through a Codor-hosted service.
|
|
|
35
37
|
Preview without changing the host:
|
|
36
38
|
|
|
37
39
|
```sh
|
|
38
|
-
npx @richhardry/codor
|
|
40
|
+
npx @richhardry/codor install --dry-run
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
For unattended setup, approve mutation and choose exposure explicitly:
|
|
42
44
|
|
|
43
45
|
```sh
|
|
44
|
-
npx @richhardry/codor
|
|
46
|
+
npx @richhardry/codor install --yes --access localhost
|
|
45
47
|
# or: --access tailscale
|
|
46
48
|
```
|
|
47
49
|
|
|
50
|
+
`npx @richhardry/codor setup` remains available as a backward-compatible alias.
|
|
51
|
+
|
|
48
52
|
- **Linux:** systemd user service.
|
|
49
53
|
- **macOS:** LaunchAgent after login—no Terminal window needs to stay open.
|
|
50
54
|
|
|
@@ -58,7 +62,7 @@ address in your Windows browser.
|
|
|
58
62
|
<!-- harn:end wsl-setup-keeps-private-windows-loopback -->
|
|
59
63
|
|
|
60
64
|
Open the pairing link. Codor is then available locally at <http://127.0.0.1:8137>.
|
|
61
|
-
<!-- harn:end public-npx-
|
|
65
|
+
<!-- harn:end public-npx-install-is-primary-install -->
|
|
62
66
|
|
|
63
67
|
<details>
|
|
64
68
|
<summary><strong>First time? Install prerequisites</strong></summary>
|
|
@@ -113,7 +117,7 @@ Tailscale lets you open Codor privately from your phone, tablet, or another comp
|
|
|
113
117
|
putting it on the public internet. [Install Tailscale](https://tailscale.com/download) and sign in
|
|
114
118
|
on both devices with the same account.
|
|
115
119
|
|
|
116
|
-
`codor
|
|
120
|
+
`codor install` can publish Codor privately over Tailscale automatically. If you skipped that step,
|
|
117
121
|
run:
|
|
118
122
|
|
|
119
123
|
```sh
|
|
@@ -166,7 +170,7 @@ resumable Claude Code, Codex, Gemini, OpenCode, and Copilot members. See the com
|
|
|
166
170
|
<details>
|
|
167
171
|
<summary><strong>Service checks, upgrades, and development mode</strong></summary>
|
|
168
172
|
|
|
169
|
-
Preview changes with `codor
|
|
173
|
+
Preview changes with `codor install --dry-run`.
|
|
170
174
|
|
|
171
175
|
```sh
|
|
172
176
|
# Linux service
|
|
@@ -178,7 +182,7 @@ launchctl print "gui/$(id -u)/app.codor.switchboard"
|
|
|
178
182
|
tail -f "$HOME/.codor/logs/codor.err.log"
|
|
179
183
|
```
|
|
180
184
|
|
|
181
|
-
For package upgrades, rerun `npx @richhardry/codor
|
|
185
|
+
For package upgrades, rerun `npx @richhardry/codor install`; it refreshes the user service against
|
|
182
186
|
the invoking installed runtime. Restart `codor.service` on Linux or
|
|
183
187
|
`app.codor.switchboard` with `launchctl kickstart -k` on macOS if the service manager has not
|
|
184
188
|
already restarted it.
|
|
@@ -216,7 +220,7 @@ machine.
|
|
|
216
220
|
|
|
217
221
|
<!-- harn:assume source-cli-installers-remain-idempotent-fallback ref=cli-install-docs -->
|
|
218
222
|
The source-checkout installers remain idempotent development fallbacks. Normal installation uses
|
|
219
|
-
`npx @richhardry/codor
|
|
223
|
+
`npx @richhardry/codor install`. Most use happens in the PWA, but these commands are useful from a
|
|
220
224
|
terminal:
|
|
221
225
|
|
|
222
226
|
```sh
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codor/adapter-antigravity",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@codor/protocol": "0.10.
|
|
15
|
+
"@codor/protocol": "0.10.3",
|
|
16
16
|
"cross-spawn": "^7.0.6"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codor/adapter-claude-code",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@anthropic-ai/claude-agent-sdk": "^0.3.212",
|
|
16
|
-
"@codor/protocol": "0.10.
|
|
16
|
+
"@codor/protocol": "0.10.3"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codor/adapter-codex",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@codor/protocol": "0.10.
|
|
15
|
+
"@codor/protocol": "0.10.3"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codor/adapter-copilot",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@codor/protocol": "0.10.
|
|
15
|
+
"@codor/protocol": "0.10.3",
|
|
16
16
|
"cross-spawn": "^7.0.6"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codor/adapter-cursor",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@codor/protocol": "0.10.
|
|
15
|
+
"@codor/protocol": "0.10.3"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codor/adapter-gemini",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@codor/protocol": "0.10.
|
|
15
|
+
"@codor/protocol": "0.10.3",
|
|
16
16
|
"cross-spawn": "^7.0.6"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codor/adapter-opencode",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@codor/protocol": "0.10.
|
|
15
|
+
"@codor/protocol": "0.10.3",
|
|
16
16
|
"cross-spawn": "^7.0.6"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CryptoVault, Daemon, HyperswarmTransport, ResidencyCoordinator, type AdapterModuleConfig, type LineConfig, type RunningServer } from '@codor/switchboard';
|
|
2
2
|
export interface UpOptions {
|
|
3
3
|
dataDir?: string;
|
|
4
|
+
/** Injectable only so bootstrap tests can prove which service home is used. */
|
|
5
|
+
homeDir?: string;
|
|
4
6
|
token: string;
|
|
5
7
|
host?: string;
|
|
6
8
|
port?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../src/up.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,WAAW,EACX,MAAM,EACN,mBAAmB,EAInB,oBAAoB,EAIpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAK5B,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../src/up.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,WAAW,EACX,MAAM,EACN,mBAAmB,EAInB,oBAAoB,EAIpB,KAAK,mBAAmB,EACxB,KAAK,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,EAAE,mBAAmB,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAMnD;AAkBD,wBAAsB,UAAU,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CA2G1E;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAsCnF;AAGD,wBAAsB,eAAe,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAW/E"}
|
|
@@ -22,6 +22,9 @@ function ownerHandle(value) {
|
|
|
22
22
|
}
|
|
23
23
|
return 'user';
|
|
24
24
|
}
|
|
25
|
+
// harn:assume empty-database-desk-seeds-tutorial-atomically ref=bootstrap-tutorial-seed
|
|
26
|
+
const DESK_TUTORIAL_MESSAGE = 'Welcome to Codor 👋 This is your Desk. Add an agent from the Members panel, then send a message here to start working. Use @mentions when you want a specific helper, and create another channel when you want a separate project.';
|
|
27
|
+
// harn:end empty-database-desk-seeds-tutorial-atomically
|
|
25
28
|
export async function startCodor(options) {
|
|
26
29
|
if (!options.token.trim())
|
|
27
30
|
throw new Error('--token or CODOR_TOKEN is required');
|
|
@@ -29,7 +32,10 @@ export async function startCodor(options) {
|
|
|
29
32
|
adapters: options.adapters,
|
|
30
33
|
baseDir: options.adapterBaseDir,
|
|
31
34
|
});
|
|
32
|
-
|
|
35
|
+
// harn:assume empty-database-desk-uses-service-home ref=bootstrap-service-home
|
|
36
|
+
const homeDir = resolve(options.homeDir ?? homedir());
|
|
37
|
+
const dataDir = resolve(options.dataDir ?? join(homeDir, '.codor'));
|
|
38
|
+
// harn:end empty-database-desk-uses-service-home
|
|
33
39
|
mkdirSync(dataDir, { recursive: true, mode: 0o700 });
|
|
34
40
|
const crypto = new CryptoVault(dataDir);
|
|
35
41
|
const transport = options.line ? new HyperswarmTransport({
|
|
@@ -64,11 +70,20 @@ export async function startCodor(options) {
|
|
|
64
70
|
if (daemon.store.listRooms().length === 0) {
|
|
65
71
|
const room = options.room ?? 'default';
|
|
66
72
|
const owner = ownerHandle(options.owner);
|
|
67
|
-
|
|
73
|
+
// harn:assume empty-database-desk-uses-service-home ref=bootstrap-service-home
|
|
74
|
+
// harn:assume empty-database-desk-seeds-tutorial-atomically ref=bootstrap-tutorial-seed
|
|
75
|
+
daemon.store.createRoom({
|
|
68
76
|
id: room,
|
|
69
77
|
name: options.roomName ?? 'Default',
|
|
70
78
|
owner: { handle: owner, display_name: owner },
|
|
79
|
+
config: { cwd: homeDir },
|
|
80
|
+
bootstrapWelcome: {
|
|
81
|
+
author: { handle: 'tutorial', display_name: 'Tutorial' },
|
|
82
|
+
body: DESK_TUTORIAL_MESSAGE,
|
|
83
|
+
},
|
|
71
84
|
});
|
|
85
|
+
// harn:end empty-database-desk-seeds-tutorial-atomically
|
|
86
|
+
// harn:end empty-database-desk-uses-service-home
|
|
72
87
|
}
|
|
73
88
|
for (const room of daemon.store.listRooms())
|
|
74
89
|
crypto.roomKeys.ensureRoom(room.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"up.js","sourceRoot":"","sources":["../src/up.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE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G,KAAK,CAAC;QACpB,MAAM,IAAI,GAAG,GAAS,EAAE;YACtB,IAAI,OAAO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,KAAK,KAAK,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codor/cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codor/protocol": "0.10.
|
|
19
|
-
"@codor/switchboard": "0.10.
|
|
18
|
+
"@codor/protocol": "0.10.3",
|
|
19
|
+
"@codor/switchboard": "0.10.3",
|
|
20
20
|
"commander": "^15.0.0",
|
|
21
21
|
"qrcode": "1.5.4",
|
|
22
22
|
"ws": "^8.21.0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c,a as i,v as g,j as e,z as y,y as f,B as v,w as N}from"./index-
|
|
1
|
+
import{c,a as i,v as g,j as e,z as y,y as f,B as v,w as N}from"./index-DWQr1Nx3.js";import{P as w}from"./PairingCodeInput-Bh2hzFji.js";import"./react-C8w-UNLI.js";import"./sodium-DtsvMzX9.js";/**
|
|
2
2
|
* @license lucide-react v1.24.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/node_modules/@codor/cli/runtime/web/assets/{LedgerPage-CecuTS8-.js → LedgerPage-CDSjXPp5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,b as P,q as Y,t as q,j as t,I as B,X,C as A}from"./index-
|
|
1
|
+
import{a as r,b as P,q as Y,t as q,j as t,I as B,X,C as A}from"./index-DWQr1Nx3.js";import{A as G}from"./arrow-left-CFyShOnS.js";import{f as H,a as R,b as z,c as D,d as W}from"./graph-toBZHlC0.js";import"./react-C8w-UNLI.js";import"./sodium-DtsvMzX9.js";const m=1e3,p=700;function u(l){return l.type??"note"}function U(l){const d=l.nodes.map(a=>({...a,x:Number.NaN,y:Number.NaN})),h=l.edges.map(a=>({...a})),o=H(d).force("link",R(h).id(a=>a.id).distance(120).strength(.35)).force("charge",z().strength(-310)).force("center",D(m/2,p/2)).force("collide",W().radius(58).strength(.8)).stop();for(let a=0;a<280;a++)o.tick();for(const a of d)a.x=Math.max(70,Math.min(m-70,a.x??m/2)),a.y=Math.max(50,Math.min(p-50,a.y??p/2));return{nodes:d,links:h}}const M={decision:"var(--c-agent)",constraint:"var(--c-warn)",contract:"var(--c-accent)",note:"var(--c-mark-faint)"};function K(l){const d={room:l.room},h=r.useMemo(()=>()=>P(l.token),[l.token]),[o,a]=r.useState(),[$,T]=r.useState(!1),[f,L]=r.useState(new Set),[i,y]=r.useState(),[b,w]=r.useState(),[c,k]=r.useState({x:0,y:0,w:m,h:p}),j=r.useRef();r.useEffect(()=>{Y(d.room,{token:h()}).then(a).catch(()=>T(!0))},[d.room,h]),r.useEffect(()=>{if(i===void 0){w(void 0);return}let e=!0;return q(d.room,i.name,{token:h()}).then(s=>{e&&w(s)}).catch(()=>{}),()=>{e=!1}},[i,d.room,h]);const x=r.useMemo(()=>o!==void 0?U(o):void 0,[o]),S=r.useMemo(()=>new Map(((x==null?void 0:x.nodes)??[]).map(e=>[e.id,e])),[x]),I=r.useMemo(()=>[...new Set(((o==null?void 0:o.nodes)??[]).map(u))],[o]),E=e=>{L(s=>{const n=new Set(s);return n.has(e)?n.delete(e):n.add(e),n})},N=(e,s=c.x+c.w/2,n=c.y+c.h/2)=>{k(g=>{const v=Math.min(m*2,Math.max(m/6,g.w*e)),C=v*(p/m);return{x:s-v/2,y:n-C/2,w:v,h:C}})};return t.jsx("main",{className:"nx-surface is-settings","aria-label":"Ledger","data-testid":"ledger-page",children:t.jsxs("div",{className:"nx-ledger",children:[t.jsxs("header",{className:"nx-settings-head",children:[t.jsxs("a",{className:"nx-btn is-quiet nx-settings-back",href:`/?room=${encodeURIComponent(d.room)}`,children:[t.jsx(G,{size:15,"aria-hidden":"true"})," Back to the channel"]}),t.jsx("h1",{children:"Ledger"}),t.jsx("p",{className:"nx-settings-sub",children:"Decisions, constraints, and contracts the agents committed to the vault — read-only."})]}),$&&t.jsx("p",{className:"nx-field-note is-error",children:"Couldn’t load this channel’s ledger."}),o!==void 0&&o.nodes.length===0&&t.jsxs("div",{className:"nx-context-empty","data-testid":"ledger-empty",children:[t.jsx("div",{className:"nx-dotgrid","aria-hidden":"true"}),t.jsx("p",{children:"No ledger notes yet — agents write them as they decide things."})]}),x!==void 0&&x.nodes.length>0&&t.jsxs("section",{className:"nx-settings-card nx-ledger-card",children:[t.jsxs("div",{className:"nx-ledger-filters","data-testid":"ledger-filters",children:[I.map(e=>t.jsxs("button",{className:`nx-limit nx-ledger-filter ${f.has(e)?"is-off":""}`,"aria-pressed":!f.has(e),"data-testid":`ledger-filter-${e}`,onClick:()=>E(e),children:[t.jsx("span",{className:"nx-ledger-dot",style:{background:M[e]}}),e]},e)),t.jsx("span",{className:"nx-composer-spacer"}),t.jsx("button",{className:"nx-btn is-quiet",onClick:()=>N(.8),"aria-label":"Zoom in",children:"+"}),t.jsx("button",{className:"nx-btn is-quiet",onClick:()=>N(1.25),"aria-label":"Zoom out",children:"−"})]}),t.jsxs("svg",{className:"nx-ledger-svg","data-testid":"ledger-svg",viewBox:`${c.x} ${c.y} ${c.w} ${c.h}`,role:"img","aria-label":"Ledger graph",onPointerDown:e=>{var s,n;(n=(s=e.target).setPointerCapture)==null||n.call(s,e.pointerId),j.current={startX:e.clientX,startY:e.clientY,view:c}},onPointerMove:e=>{const s=j.current;if(!s)return;const n=c.w/(e.currentTarget.clientWidth||m);k({...s.view,x:s.view.x-(e.clientX-s.startX)*n,y:s.view.y-(e.clientY-s.startY)*n})},onPointerUp:()=>{j.current=void 0},onWheel:e=>N(e.deltaY>0?1.1:.9),children:[x.links.map((e,s)=>{const n=typeof e.source=="object"?e.source:S.get(String(e.source)),g=typeof e.target=="object"?e.target:S.get(String(e.target));return!n||!g||f.has(u(n))||f.has(u(g))?null:t.jsx("line",{x1:n.x,y1:n.y,x2:g.x,y2:g.y,className:"nx-ledger-edge"},s)}),x.nodes.filter(e=>!f.has(u(e))).map(e=>t.jsxs("g",{className:`nx-ledger-node ${(i==null?void 0:i.id)===e.id?"is-selected":""}`,transform:`translate(${e.x}, ${e.y})`,"data-testid":`ledger-node-${e.id}`,onClick:()=>y(e),children:[t.jsx("circle",{r:"26",style:{fill:M[u(e)]}}),t.jsx("text",{y:"42",textAnchor:"middle",children:e.name})]},e.id))]})]}),i!==void 0&&t.jsxs("aside",{className:"nx-settings-card nx-ledger-note","data-testid":"ledger-note",children:[t.jsxs("div",{className:"nx-inspect-head",children:[t.jsx("h2",{className:"nx-dialog-title",children:i.name}),t.jsx(B,{icon:X,label:"Close note",size:"sm",variant:"quiet",onClick:()=>y(void 0)})]}),t.jsxs("p",{className:"nx-field-note",children:[t.jsx(A,{children:i.relative_path})," · ",u(i)]}),b!==void 0?t.jsx("pre",{className:"nx-inspect-block nx-ledger-body",children:b.content}):t.jsx("p",{className:"nx-field-note",children:"Loading note…"})]})]})})}export{K as LedgerPage};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{c as _,a,A as H,D as A,E,j as e,F as P,C as j,G as I,H as B,J as Y,K as D,L as O,B as T,N as $,O as U}from"./index-DWQr1Nx3.js";import"./react-C8w-UNLI.js";import"./sodium-DtsvMzX9.js";/**
|
|
2
|
+
* @license lucide-react v1.24.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const G=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],J=_("arrow-right",G);/**
|
|
7
|
+
* @license lucide-react v1.24.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const K=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Q=_("sparkles",K);function V(r){return(r.trim().replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean).at(-1)??"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim()}function ee(r){const N=a.useCallback(()=>r.token,[r.token]),l=H(N),d=l.installed,[c,v]=a.useState(""),[C,F]=a.useState(!1),[h,z]=a.useState(""),[m,M]=a.useState("You"),[g,q]=a.useState("Codor"),[s,u]=a.useState({harness:"",model:"",thinking:"",policy:A}),[y,b]=a.useState(!1),[k,w]=a.useState(),t=a.useMemo(()=>E(m.trim()),[m]),f=g.trim()===""?"Agent":g.trim(),i=a.useMemo(()=>E(f),[f]),o=s.harness!=="";a.useEffect(()=>{!o||d.some(n=>n.id===s.harness)||u({...s,harness:"",model:"",thinking:""})},[d,s,o]);const p=o&&t!==void 0&&i===t,S=c.trim()!==""&&h.trim()!==""&&t!==void 0&&!y&&(!o||i!==void 0&&!p),L=n=>{if(z(n),C)return;const x=V(n);x!==""&&v(x)},R=()=>{!S||t===void 0||(b(!0),w(void 0),$({name:c.trim(),owner:{handle:t,display_name:m.trim()},cwd:h.trim(),...o&&i!==void 0&&{starting_agent:{harness:s.harness,handle:i,display_name:f,policy:s.policy===""?A:s.policy,...s.model!==""&&{model:s.model},...(()=>{const n=U(d.find(x=>x.id===s.harness),s.thinking);return n===void 0?{}:{thinking:n}})()}}},{token:r.token}).then(n=>{window.location.assign(`/?room=${encodeURIComponent(n.id)}`)},n=>{w(n instanceof Error?n.message:String(n)),b(!1)}))};return e.jsxs("main",{className:"nx-onboarding","data-testid":"first-channel-onboarding",children:[e.jsxs("header",{className:"nx-onboarding-head",children:[e.jsx("span",{className:"nx-onboarding-mark","aria-hidden":"true"}),e.jsx("p",{className:"nx-eyebrow",children:"Paired successfully"}),e.jsx("h1",{children:"Create your first channel"}),e.jsx("p",{children:"Point Codor at a project, then bring in an agent now or add one later."})]}),e.jsxs("form",{className:"nx-onboarding-card",onSubmit:n=>{n.preventDefault(),R()},children:[e.jsxs(P,{n:1,title:"Channel",headingLevel:2,children:[e.jsxs("label",{className:"nx-field",children:[e.jsx("span",{className:"nx-label",children:"Channel name"}),e.jsx("input",{required:!0,autoFocus:!0,value:c,placeholder:"e.g. My project","data-testid":"first-channel-name",onChange:n=>{v(n.target.value),F(!0)}}),c.trim()!==""&&e.jsxs("span",{className:"nx-field-note",children:["id: ",e.jsx(j,{children:I(c)})]})]}),e.jsxs("label",{className:"nx-field",children:[e.jsx("span",{className:"nx-label",children:"Your name"}),e.jsx("input",{required:!0,value:m,"data-testid":"first-channel-owner",onChange:n=>M(n.target.value)}),t===void 0?e.jsx("span",{className:"nx-field-note is-error",children:"Choose a name that produces a usable handle."}):e.jsxs("span",{className:"nx-field-note",children:["you’ll join as ",e.jsxs(j,{children:["@",t]})]})]}),e.jsxs("div",{className:"nx-field",children:[e.jsxs("span",{className:"nx-label",children:["Project folder ",e.jsx("span",{className:"nx-req",children:"· required"})]}),e.jsx(B,{token:()=>r.token,value:h,onChange:L,idPrefix:"first"}),!C&&h!==""&&e.jsx("span",{className:"nx-field-note","data-testid":"first-channel-folder-suggestion",children:"Suggested the folder name above. Editing the name keeps your choice."})]})]}),e.jsx(P,{n:2,title:"Starting agent",headingLevel:2,children:e.jsxs("div",{className:"nx-first-agent",children:[e.jsx(Y,{adapters:d,config:s,onChange:u,allowNone:!0,optional:!0,idPrefix:"first",onRefresh:l.refresh,refreshing:l.refreshing,refreshError:l.refreshError}),o?e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"nx-field",children:[e.jsx("span",{className:"nx-label",children:"Agent name"}),e.jsx("input",{value:g,"data-testid":"first-agent-name",onChange:n=>q(n.target.value)}),i!==void 0&&!p&&e.jsxs("span",{className:"nx-field-note",children:["joins as ",e.jsxs(j,{children:["@",i]})]}),p&&e.jsx("span",{className:"nx-field-note is-error",children:"The owner and agent need different handles."})]}),e.jsx(D,{adapters:d,config:s,onChange:u,hideHarness:!0,embedded:!0,behaviourSection:3,permissionsSection:4,idPrefix:"first"})]}):e.jsxs("p",{className:"nx-first-later",children:[e.jsx(Q,{size:16,"aria-hidden":"true"})," You can add agents from the channel at any time."]})]})}),k!==void 0&&e.jsx("p",{className:"nx-field-note is-error nx-first-error",role:"alert",children:k}),e.jsxs("footer",{className:"nx-onboarding-actions",children:[e.jsxs("span",{children:[e.jsx(O,{size:15,"aria-hidden":"true"})," Creates a private workspace on this host."]}),e.jsx(T,{type:"submit",variant:"primary",disabled:!S,"data-testid":"first-channel-create",children:y?"Creating…":e.jsxs(e.Fragment,{children:["Create channel ",e.jsx(J,{size:15,"aria-hidden":"true"})]})})]})]})]})}export{ee as NoChannels,V as suggestedChannelName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g,j as u,B as v}from"./index-
|
|
1
|
+
import{a as g,j as u,B as v}from"./index-DWQr1Nx3.js";const n=8,j=/^[23456789ABCDEFGHJKLMNPQRSTUVWXYZ]$/;function f(a){return[...a.toUpperCase()].filter(h=>j.test(h)).slice(0,n).join("")}function P(a){const h=f(a.initialCode??""),[s,d]=g.useState(()=>Array.from({length:n},(e,t)=>h[t]??"")),[b,m]=g.useState(),c=g.useRef([]);g.useEffect(()=>{const e=f(a.initialCode??"");d(Array.from({length:n},(t,r)=>e[r]??""))},[a.initialCode]);const p=(e,t=!0)=>{var o;const r=f(e);d(Array.from({length:n},(l,i)=>r[i]??"")),m(void 0),t&&((o=c.current[Math.min(r.length,n-1)])==null||o.focus())},y=e=>{var r;e.preventDefault();const t=s.join("");if(t.length!==n){m("Enter the complete 8-character pairing code."),(r=c.current[s.findIndex(o=>o==="")])==null||r.focus();return}m(void 0),a.onSubmit(t)},D=e=>{const t=f(e.clipboardData.getData("text"));t!==""&&(e.preventDefault(),p(t))},E=(e,t)=>{var r,o,l;if(t.key==="ArrowLeft"&&e>0)t.preventDefault(),(r=c.current[e-1])==null||r.focus();else if(t.key==="ArrowRight"&&e<n-1)t.preventDefault(),(o=c.current[e+1])==null||o.focus();else if(t.key==="Backspace"&&s[e]===""&&e>0){t.preventDefault();const i=[...s];i[e-1]="",d(i),(l=c.current[e-1])==null||l.focus()}},C=a.error??b;return u.jsxs("form",{className:"nx-code-form",onSubmit:y,"data-testid":"pairing-code-form",children:[u.jsx("div",{className:"nx-code-cells",role:"group","aria-label":"Pairing code",children:s.map((e,t)=>u.jsx("input",{ref:r=>{c.current[t]=r},className:"nx-code-cell","data-testid":`pairing-code-${String(t)}`,value:e,inputMode:"text",autoComplete:"off",autoCapitalize:"characters",maxLength:1,disabled:a.busy,"aria-label":`Pairing code character ${String(t+1)}`,"aria-invalid":C!==void 0,onPaste:D,onKeyDown:r=>E(t,r),onChange:r=>{var i;const o=f(r.target.value).at(-1)??"",l=[...s];l[t]=o,d(l),m(void 0),o!==""&&t<n-1&&((i=c.current[t+1])==null||i.focus())}},t))}),u.jsx(v,{type:"submit",variant:"primary",disabled:a.busy,"data-testid":"pairing-code-submit",children:a.busy?"Checking…":a.submitLabel??"Pair this browser"}),C!==void 0&&u.jsx("p",{className:"nx-code-error",role:"alert",children:C})]})}export{P};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as k,a as s,v as y,j as e,w as l,B as p,x as v,y as w,C as P}from"./index-
|
|
1
|
+
import{c as k,a as s,v as y,j as e,w as l,B as p,x as v,y as w,C as P}from"./index-DWQr1Nx3.js";import{Q as N,S as b}from"./browser-BHgZ9Kl0.js";import{P as C}from"./PairingCodeInput-Bh2hzFji.js";import"./react-C8w-UNLI.js";import"./sodium-DtsvMzX9.js";import"./qr-DpynCwP9.js";/**
|
|
2
2
|
* @license lucide-react v1.24.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as y,r as P,a as i,b as T,d as E,j as e,e as R,S as B,M as A,f as U,g as z,B as p,u as S,h as I,i as C,T as q,m as D,k as j,C as _,l as L,n as K,s as O,o as Q,p as $}from"./index-
|
|
1
|
+
import{c as y,r as P,a as i,b as T,d as E,j as e,e as R,S as B,M as A,f as U,g as z,B as p,u as S,h as I,i as C,T as q,m as D,k as j,C as _,l as L,n as K,s as O,o as Q,p as $}from"./index-DWQr1Nx3.js";import{Q as H,S as W}from"./browser-BHgZ9Kl0.js";import{A as F}from"./arrow-left-CFyShOnS.js";import"./react-C8w-UNLI.js";import"./sodium-DtsvMzX9.js";import"./qr-DpynCwP9.js";/**
|
|
2
2
|
* @license lucide-react v1.24.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./index-
|
|
1
|
+
import{j as a}from"./index-DWQr1Nx3.js";import"./react-C8w-UNLI.js";import"./sodium-DtsvMzX9.js";function i(){return a.jsx("main",{className:"nx-upgrade","data-testid":"startup-unavailable",children:a.jsxs("section",{className:"nx-upgrade-card","aria-labelledby":"startup-unavailable-title",children:[a.jsx("p",{className:"nx-eyebrow",children:"Offline"}),a.jsx("h1",{id:"startup-unavailable-title",children:"Can’t reach your channels"}),a.jsx("p",{children:"This device is paired, but the channel list could not be loaded and it has no recent channel to reopen. Reconnect and try again."}),a.jsx("button",{type:"button",className:"nx-btn is-primary","data-testid":"startup-retry",onClick:()=>{window.location.reload()},children:"Try again"})]})})}export{i as StartupUnavailable};
|
package/node_modules/@codor/cli/runtime/web/assets/{browser-BWQYNOsD.js → browser-BHgZ9Kl0.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as o}from"./index-
|
|
1
|
+
import{c as o}from"./index-DWQr1Nx3.js";import{g as e}from"./react-C8w-UNLI.js";import{r}from"./qr-DpynCwP9.js";/**
|
|
2
2
|
* @license lucide-react v1.24.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|