agent-message 0.1.4 → 0.2.0
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 +51 -8
- package/npm/bin/agent-message.mjs +2 -45
- package/npm/runtime/bin/agent-message-cli-darwin-amd64 +0 -0
- package/npm/runtime/bin/agent-message-cli-darwin-arm64 +0 -0
- package/npm/runtime/bin/agent-message-server-darwin-amd64 +0 -0
- package/npm/runtime/bin/agent-message-server-darwin-arm64 +0 -0
- package/npm/runtime/web-dist/assets/index-BIXs-4JX.js +195 -0
- package/npm/runtime/web-dist/assets/index-BdQqmJ4R.css +1 -0
- package/npm/runtime/web-dist/index.html +2 -2
- package/npm/runtime/web-dist/sw.js +1 -1
- package/package.json +4 -5
- package/codex-message/Cargo.lock +0 -1867
- package/codex-message/Cargo.toml +0 -17
- package/codex-message/README.md +0 -29
- package/codex-message/src/agent_message.rs +0 -205
- package/codex-message/src/app.rs +0 -857
- package/codex-message/src/codex.rs +0 -278
- package/codex-message/src/main.rs +0 -101
- package/codex-message/src/render.rs +0 -125
- package/npm/bin/codex-message.mjs +0 -41
- package/npm/runtime/web-dist/assets/index-AfnEJAni.css +0 -1
- package/npm/runtime/web-dist/assets/index-QUUfdfoN.js +0 -182
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@ Agent Message is a direct-message stack with three clients:
|
|
|
15
15
|
- Web app (`web/`)
|
|
16
16
|
- CLI (`cli/`)
|
|
17
17
|
|
|
18
|
+
The public deployment is available at `https://am.namjaeyoun.com`.
|
|
19
|
+
|
|
18
20
|
## Install With npm (macOS)
|
|
19
21
|
|
|
20
22
|
Install the packaged app from npm on macOS (`arm64` and `x64`).
|
|
@@ -34,15 +36,18 @@ Default ports:
|
|
|
34
36
|
For self-hosted local use, `agent-message start` creates and uses a local SQLite database by default.
|
|
35
37
|
Managed cloud deployments should run the server with `DB_DRIVER=postgres` and `POSTGRES_DSN`.
|
|
36
38
|
After `agent-message start`, open `http://127.0.0.1:45788` in your browser.
|
|
37
|
-
The bundled CLI uses `https://am.namjaeyoun.com` by default unless you override `server_url` for self-hosting.
|
|
39
|
+
The bundled CLI uses `https://am.namjaeyoun.com` by default unless you override `server_url` for self-hosting, which matches the public deployment web app.
|
|
40
|
+
Starting the local stack does not silently rewrite CLI traffic; regular commands still follow `server_url` in config unless you pass `--server-url`.
|
|
38
41
|
The bundled CLI continues to work from the same command:
|
|
39
42
|
|
|
40
43
|
```bash
|
|
41
|
-
agent-message register alice
|
|
42
|
-
agent-message login alice
|
|
44
|
+
agent-message register alice secret123
|
|
45
|
+
agent-message login alice secret123
|
|
46
|
+
agent-message config set master jay
|
|
43
47
|
agent-message ls
|
|
44
48
|
agent-message open bob
|
|
45
49
|
agent-message send bob "hello"
|
|
50
|
+
agent-message send "status update for master"
|
|
46
51
|
```
|
|
47
52
|
|
|
48
53
|
Port conventions:
|
|
@@ -255,14 +260,51 @@ Install the Agent Message CLI skill to give Claude Code full knowledge of this p
|
|
|
255
260
|
npx skills add https://github.com/siisee11/agent-message --skill agent-message-cli
|
|
256
261
|
```
|
|
257
262
|
|
|
263
|
+
## claude-message
|
|
264
|
+
|
|
265
|
+
`claude-message` is a companion wrapper for Claude Code, similar to `codex-message`, but it runs Claude through `claude -p --output-format json` and relays results over `agent-message`.
|
|
266
|
+
|
|
267
|
+
Behavior:
|
|
268
|
+
- Starts a fresh `agent-{chatId}` account with a generated password.
|
|
269
|
+
- Sends the `--to` user a startup message with the generated credentials.
|
|
270
|
+
- Reuses the returned Claude `session_id` and resumes later turns with `--resume`.
|
|
271
|
+
- Watches the DM thread for plain-text prompts, adds `👀` when a request is picked up, and posts the Claude result back as `json_render`.
|
|
272
|
+
- Replaces the inbound `👀` reaction with `✅` after a successful Claude turn.
|
|
273
|
+
|
|
274
|
+
Example:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
claude-message --to jay --model sonnet --permission-mode accept-edits
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Build from source:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
make claude-message-build
|
|
284
|
+
./claude-message/target/debug/claude-message --to jay --model sonnet
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Useful flags:
|
|
288
|
+
- `--to jay`
|
|
289
|
+
- `--cwd /path/to/worktree`
|
|
290
|
+
- `--model sonnet`
|
|
291
|
+
- `--permission-mode accept-edits`
|
|
292
|
+
- `--allowed-tools Read,Edit`
|
|
293
|
+
- `--bare`
|
|
294
|
+
|
|
295
|
+
Notes:
|
|
296
|
+
- `claude-message` depends on a working local `claude` install and authentication.
|
|
297
|
+
- `claude-message` always runs Claude with `--dangerously-skip-permissions`.
|
|
298
|
+
- `--permission-mode` and `--allowed-tools` can still be used to shape tool behavior, but the wrapper no longer waits on Claude permission prompts.
|
|
299
|
+
|
|
258
300
|
## CLI Quickstart
|
|
259
301
|
|
|
260
302
|
Run from `cli/`. By default the CLI talks to `https://am.namjaeyoun.com`. For self-hosting, pass `--server-url` or set `server_url` in config.
|
|
261
303
|
|
|
262
304
|
```bash
|
|
263
305
|
cd cli
|
|
264
|
-
go run . register alice
|
|
265
|
-
go run . login alice
|
|
306
|
+
go run . register alice secret123
|
|
307
|
+
go run . login alice secret123
|
|
266
308
|
go run . profile list
|
|
267
309
|
go run . profile switch alice
|
|
268
310
|
```
|
|
@@ -283,8 +325,8 @@ go run . edit 1 "edited text"
|
|
|
283
325
|
go run . delete 1
|
|
284
326
|
|
|
285
327
|
# Reactions
|
|
286
|
-
go run . react
|
|
287
|
-
go run . unreact
|
|
328
|
+
go run . react <message-id> 👍
|
|
329
|
+
go run . unreact <message-id> 👍
|
|
288
330
|
|
|
289
331
|
# Realtime watch
|
|
290
332
|
go run . watch bob
|
|
@@ -293,11 +335,12 @@ go run . watch bob
|
|
|
293
335
|
CLI config is stored at `~/.agent-message/config` by default.
|
|
294
336
|
Each successful `login` or `register` also saves a named profile, and `go run . profile switch <username>` swaps the active account locally.
|
|
295
337
|
For a self-hosted server, set `server_url` once with `go run . config set server_url http://localhost:8080` or use `--server-url` per command.
|
|
338
|
+
To set a default recipient for agent reports, run `go run . config set master jay`; after that, `go run . send "done"` sends to `jay`, and `go run . send --to bob "done"` overrides it for one command.
|
|
296
339
|
|
|
297
340
|
## Validation and Constraints (Phase 7)
|
|
298
341
|
|
|
299
342
|
- Username identity fields: `3-32` chars, allowed `[A-Za-z0-9._-]`
|
|
300
|
-
-
|
|
343
|
+
- Password: `4-72` characters
|
|
301
344
|
- Uploads:
|
|
302
345
|
- max file size: `20 MB`
|
|
303
346
|
- unsupported file types are rejected
|
|
@@ -430,6 +430,7 @@ function buildDevLaunchSpec(paths) {
|
|
|
430
430
|
if (!existsSync(join(sourceWebDir, 'node_modules'))) {
|
|
431
431
|
runForeground('npm', ['ci'], { cwd: sourceWebDir })
|
|
432
432
|
}
|
|
433
|
+
runForeground('node', ['./scripts/generate-message-json-render-catalog-prompt.mjs'], { cwd: packageRoot })
|
|
433
434
|
runForeground('npm', ['run', 'build'], { cwd: sourceWebDir })
|
|
434
435
|
|
|
435
436
|
const serverBinaryPath = join(paths.binDir, 'agent-message-server')
|
|
@@ -463,8 +464,7 @@ function ensureTunnelTargetMatchesDefaults(options) {
|
|
|
463
464
|
|
|
464
465
|
function delegateToBundledCli(args) {
|
|
465
466
|
const cliBinary = resolveBinaryPath('agent-message-cli')
|
|
466
|
-
const
|
|
467
|
-
const result = spawnSync(cliBinary, delegatedArgs, {
|
|
467
|
+
const result = spawnSync(cliBinary, args, {
|
|
468
468
|
stdio: 'inherit',
|
|
469
469
|
env: process.env,
|
|
470
470
|
})
|
|
@@ -481,49 +481,6 @@ function delegateToBundledCli(args) {
|
|
|
481
481
|
process.exit(result.status ?? 1)
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
function buildDelegatedCliArgs(args) {
|
|
485
|
-
if (shouldSkipLocalServerOverride(args) || hasExplicitServerURL(args)) {
|
|
486
|
-
return args
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
const localServerURL = readLocalServerURL()
|
|
490
|
-
if (!localServerURL) {
|
|
491
|
-
return args
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
return ['--server-url', localServerURL, ...args]
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
function shouldSkipLocalServerOverride(args) {
|
|
498
|
-
const [command] = args
|
|
499
|
-
return command === undefined || command === 'config' || command === 'profile'
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
function hasExplicitServerURL(args) {
|
|
503
|
-
return args.some((arg) => arg === '--server-url' || arg.startsWith('--server-url='))
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
function readLocalServerURL() {
|
|
507
|
-
const paths = runtimePaths(join(os.homedir(), '.agent-message'))
|
|
508
|
-
const serverPid = readPidfile(paths.serverPidfile)
|
|
509
|
-
if (serverPid === null || !isPidAlive(serverPid)) {
|
|
510
|
-
return null
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
try {
|
|
514
|
-
const raw = readFileSync(paths.stackMetadataPath, 'utf8')
|
|
515
|
-
const metadata = JSON.parse(raw)
|
|
516
|
-
const apiHost = typeof metadata.apiHost === 'string' ? metadata.apiHost.trim() : ''
|
|
517
|
-
const apiPort = metadata.apiPort
|
|
518
|
-
if (!apiHost || !Number.isInteger(apiPort) || apiPort <= 0 || apiPort > 65535) {
|
|
519
|
-
return null
|
|
520
|
-
}
|
|
521
|
-
return `http://${apiHost}:${apiPort}`
|
|
522
|
-
} catch {
|
|
523
|
-
return null
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
|
|
527
484
|
function writeStackMetadata(path, options) {
|
|
528
485
|
const metadata = {
|
|
529
486
|
apiHost: options.apiHost,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|