@phnx-labs/agents-cli 1.22.71 → 1.22.73
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/CHANGELOG.md +45 -0
- package/README.md +2 -0
- package/dist/cli/command-registry.d.ts +1 -1
- package/dist/cli/command-registry.js +2 -1
- package/dist/commands/packages-materialize.d.ts +17 -0
- package/dist/commands/packages-materialize.js +93 -0
- package/dist/commands/packages.d.ts +6 -4
- package/dist/commands/packages.js +8 -4
- package/dist/commands/repo.js +8 -8
- package/dist/commands/sessions-picker.js +38 -7
- package/dist/commands/sessions.js +6 -5
- package/dist/lib/actor.d.ts +36 -4
- package/dist/lib/actor.js +73 -9
- package/dist/lib/agent-spec/index.d.ts +4 -0
- package/dist/lib/agent-spec/index.js +5 -0
- package/dist/lib/agent-spec/materialize.d.ts +13 -0
- package/dist/lib/agent-spec/materialize.js +414 -0
- package/dist/lib/agent-spec/package-resolve.d.ts +12 -0
- package/dist/lib/agent-spec/package-resolve.js +274 -0
- package/dist/lib/agent-spec/package-schema.d.ts +5 -0
- package/dist/lib/agent-spec/package-schema.js +147 -0
- package/dist/lib/agent-spec/package-types.d.ts +121 -0
- package/dist/lib/agent-spec/package-types.js +11 -0
- package/dist/lib/daemon/usage-sync-service.d.ts +12 -5
- package/dist/lib/daemon/usage-sync-service.js +27 -5
- package/dist/lib/exec.js +3 -0
- package/dist/lib/fleet-shared-state.d.ts +30 -0
- package/dist/lib/fleet-shared-state.js +5 -0
- package/dist/lib/hooks/install.d.ts +31 -1
- package/dist/lib/hooks/install.js +44 -2
- package/dist/lib/mcp.d.ts +14 -2
- package/dist/lib/mcp.js +12 -2
- package/dist/lib/packages/output-home.d.ts +39 -0
- package/dist/lib/packages/output-home.js +203 -0
- package/dist/lib/paths.d.ts +9 -0
- package/dist/lib/paths.js +26 -0
- package/dist/lib/project-resources.js +14 -5
- package/dist/lib/session/active.d.ts +12 -0
- package/dist/lib/session/active.js +5 -1
- package/dist/lib/session/actor-sidecar.d.ts +7 -0
- package/dist/lib/session/actor-sidecar.js +2 -0
- package/dist/lib/session/db.d.ts +60 -1
- package/dist/lib/session/db.js +191 -6
- package/dist/lib/session/mirror.d.ts +67 -0
- package/dist/lib/session/mirror.js +158 -0
- package/dist/lib/session/types.d.ts +18 -0
- package/dist/lib/spinner.d.ts +39 -0
- package/dist/lib/spinner.js +41 -0
- package/dist/lib/startup/command-registry.js +1 -1
- package/dist/lib/types.d.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ctrl-C-safe spinner factory.
|
|
3
|
+
*
|
|
4
|
+
* `ora` defaults to `discardStdin: true`, which — on a TTY — flips stdin into
|
|
5
|
+
* raw mode for the lifetime of the spinner (via `stdin-discarder`). Raw mode
|
|
6
|
+
* disables the terminal's own ISIG translation, so a Ctrl-C keystroke no longer
|
|
7
|
+
* generates SIGINT; `stdin-discarder` tries to compensate by re-emitting SIGINT
|
|
8
|
+
* when it reads a 0x03 byte, but that read only happens when stdin is in
|
|
9
|
+
* *flowing* mode. At CLI startup a fresh `process.stdin` has `flowing === null`,
|
|
10
|
+
* so `stdin.isPaused()` returns false, the discarder skips its `stdin.resume()`,
|
|
11
|
+
* and its `prependListener('data')` never switches the stream to flowing —
|
|
12
|
+
* because Node's readable only auto-resumes for `on('data')`, not
|
|
13
|
+
* `prependListener('data')`. The net effect: while such a spinner is running,
|
|
14
|
+
* Ctrl-C is swallowed entirely — the terminal won't raise SIGINT and the
|
|
15
|
+
* discarder never sees the byte to re-raise it.
|
|
16
|
+
*
|
|
17
|
+
* That is invisible for a sub-second spinner, but any spinner wrapping a long
|
|
18
|
+
* idle wait — a cross-machine SSH fan-out, a fleet search — traps the user for
|
|
19
|
+
* the full duration (measured: `agents sessions --flat` could not be Ctrl-C'd
|
|
20
|
+
* for the entire ~12s+ sweep and had to be SIGKILLed). The global SIGINT handler
|
|
21
|
+
* in `index.ts` (`process.exit(130)`) is correct; it simply never fires because
|
|
22
|
+
* no SIGINT is ever raised.
|
|
23
|
+
*
|
|
24
|
+
* Setting `discardStdin: false` keeps the terminal in cooked mode, so Ctrl-C
|
|
25
|
+
* raises SIGINT normally (the terminal also SIGINTs the whole foreground process
|
|
26
|
+
* group, reaping the outstanding `ssh` children) and the global handler exits
|
|
27
|
+
* promptly. The only thing lost is cosmetic stray-keystroke discarding during
|
|
28
|
+
* the spin — a worthwhile trade for a spinner the user must be able to abort.
|
|
29
|
+
*
|
|
30
|
+
* Use this for any spinner that wraps a network / fleet / SSH wait. A truly
|
|
31
|
+
* instantaneous local spinner can still use `ora` directly, but preferring this
|
|
32
|
+
* everywhere is harmless.
|
|
33
|
+
*/
|
|
34
|
+
import ora from 'ora';
|
|
35
|
+
/**
|
|
36
|
+
* Build an interruptible spinner — a drop-in for `ora(text)` that keeps Ctrl-C
|
|
37
|
+
* working. Returns an unstarted {@link Ora}; call `.start()` as usual.
|
|
38
|
+
*/
|
|
39
|
+
export function interruptibleSpinner(text, options) {
|
|
40
|
+
return ora({ ...options, ...(text !== undefined ? { text } : {}), discardStdin: false });
|
|
41
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const LOADED_COMMAND_NAMES = [
|
|
2
2
|
'accounts', 'auth', 'view', 'inspect', 'feedback', 'commands', 'hooks', 'skills', 'rules', 'memory',
|
|
3
3
|
'permissions', 'mcp', 'clis', 'subagents', 'plugins', 'workflows', 'add', 'use',
|
|
4
|
-
'remove', 'rm', 'purge', 'update', 'prune', 'import', 'registry', 'search', 'install',
|
|
4
|
+
'remove', 'rm', 'purge', 'update', 'prune', 'import', 'registry', 'search', 'install', 'packages',
|
|
5
5
|
'routines', 'monitors', 'projects', 'run', 'open', 'reconnect', 'fork', 'config',
|
|
6
6
|
'models', 'modes', 'trash', 'restore', 'doctor',
|
|
7
7
|
'route', 'harness', 'harnesses', 'secrets', 'menubar', 'sync',
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -814,6 +814,12 @@ export interface ActorConfig {
|
|
|
814
814
|
github?: string;
|
|
815
815
|
/** Tailnet login-name this entry matches. Defaults to the map key. */
|
|
816
816
|
login?: string;
|
|
817
|
+
/**
|
|
818
|
+
* Phoenix (work) identity id — bridges this person's tailnet login (often a
|
|
819
|
+
* personal email) to their stable internal work identity, so session/commit
|
|
820
|
+
* attribution survives whichever email they are signed into tailscale with.
|
|
821
|
+
*/
|
|
822
|
+
phoenixId?: string;
|
|
817
823
|
}
|
|
818
824
|
/** Top-level structure of ~/.agents/.system/agents.yaml -- the CLI's persistent state. */
|
|
819
825
|
export interface Meta {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phnx-labs/agents-cli",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.73",
|
|
4
4
|
"description": "One CLI for all your AI coding agents - versions, config, cloud dispatch, sessions, and teams (now with first-class Grok Build CLI support)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|