eversince 0.2.9 → 0.2.10
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 +7 -6
- package/dist/commands/init.js +6 -3
- package/dist/host-agent.js +6 -4
- package/dist/index.js +3 -2
- package/dist/local.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -173,12 +173,13 @@ The agent is the one named with `--agent` (`claude-code`, `codex`, `cursor`,
|
|
|
173
173
|
Code and Codex where they are installed. Run `init` again after moving Node or
|
|
174
174
|
the CLI. `--cloud` sets it up on eversince.ai instead.
|
|
175
175
|
|
|
176
|
-
Without the app, `init --agent` writes only that agent's settings
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
176
|
+
Without the app, `init --agent` writes only that agent's settings, in your
|
|
177
|
+
user-wide files by default (`--scope project` writes `.mcp.json` for Claude Code,
|
|
178
|
+
`.cursor/mcp.json` for Cursor and `.vscode/mcp.json` for VS Code in this folder
|
|
179
|
+
instead), and prints what to add for Codex, Claude Desktop and anything else.
|
|
180
|
+
With no agent named, `init` merges an `eversince` entry into the MCP config of
|
|
181
|
+
the agents on this machine, backing up anything it edits and keeping settings
|
|
182
|
+
that were already there. Codex keeps its
|
|
182
183
|
servers in TOML, so that one is printed for you to paste rather than parsed.
|
|
183
184
|
|
|
184
185
|
It also installs a skill at `.claude/skills/eversince-cli/SKILL.md` teaching an
|
package/dist/commands/init.js
CHANGED
|
@@ -7,7 +7,8 @@ import { Client } from '../client.js';
|
|
|
7
7
|
import { resolveBaseUrl, hostOf } from '../config.js';
|
|
8
8
|
import { line, note, printResult } from '../output.js';
|
|
9
9
|
import { cliLauncher, connectThroughApp, desktopInstalled, launchedFromTemporaryCopy, openApp } from '../local.js';
|
|
10
|
-
|
|
10
|
+
import { detectHostAgent } from '../host-agent.js';
|
|
11
|
+
export const APP_AGENTS = ['claude-code', 'codex', 'cursor', 'vscode', 'claude-desktop', 'other', 'cli'];
|
|
11
12
|
function checkAgent(given) {
|
|
12
13
|
if (given === undefined)
|
|
13
14
|
return undefined;
|
|
@@ -220,6 +221,8 @@ async function projectEntryShadows() {
|
|
|
220
221
|
}
|
|
221
222
|
async function initThroughApp(argv, scope, mode) {
|
|
222
223
|
const agents = agentsToConnect(argv.agent);
|
|
224
|
+
const host = detectHostAgent();
|
|
225
|
+
const name = argv.name ?? (argv.agent === 'cli' ? host?.name : undefined);
|
|
223
226
|
if (agents.length === 0) {
|
|
224
227
|
throw new Error(`Name the agent to connect with --agent: ${APP_AGENTS.join(', ')}.`);
|
|
225
228
|
}
|
|
@@ -233,10 +236,10 @@ async function initThroughApp(argv, scope, mode) {
|
|
|
233
236
|
note('Opening the Eversince app on this computer.'); });
|
|
234
237
|
const cli = cliLauncher();
|
|
235
238
|
for (const agent of agents)
|
|
236
|
-
connections.push(await connectThroughApp(agent, { cli }));
|
|
239
|
+
connections.push(await connectThroughApp(agent, { cli, ...(name ? { name } : {}) }));
|
|
237
240
|
}
|
|
238
241
|
const changes = [];
|
|
239
|
-
if (argv.skills !== false) {
|
|
242
|
+
if (argv.skills !== false && !agents.every((a) => a === 'cli')) {
|
|
240
243
|
const body = skillBody('through the Eversince desktop app on this computer');
|
|
241
244
|
for (const target of skillTargets(scope)) {
|
|
242
245
|
changes.push(await writeSkill(target, body, argv.force === true, dryRun));
|
package/dist/host-agent.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
const KNOWN = { 'Claude Code': 'claude-code', Cursor: 'cursor', 'VS Code': 'vscode', Codex: 'codex', 'Claude Desktop': 'claude-desktop' };
|
|
2
|
+
export function kindForName(name) {
|
|
3
|
+
return (name && KNOWN[name]) || 'cli';
|
|
4
|
+
}
|
|
1
5
|
export function detectHostAgent(env = process.env) {
|
|
2
6
|
const named = env.ES_AGENT_NAME?.trim();
|
|
3
7
|
if (named)
|
|
4
|
-
return { kind: 'other', name: named };
|
|
8
|
+
return { kind: kindForName(named) === 'cli' ? 'other' : kindForName(named), name: named };
|
|
5
9
|
if (env.CLAUDECODE)
|
|
6
10
|
return { kind: 'claude-code', name: 'Claude Code' };
|
|
7
11
|
if (env.CURSOR_TRACE_ID)
|
|
8
12
|
return { kind: 'cursor', name: 'Cursor' };
|
|
9
|
-
if (env.
|
|
13
|
+
if (Object.keys(env).some((key) => key.startsWith('CODEX_') && key !== 'CODEX_HOME'))
|
|
10
14
|
return { kind: 'codex', name: 'Codex' };
|
|
11
|
-
if (env.TERM_PROGRAM === 'vscode')
|
|
12
|
-
return { kind: 'vscode', name: 'VS Code' };
|
|
13
15
|
return null;
|
|
14
16
|
}
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,8 @@ Getting set up
|
|
|
20
20
|
eversince status
|
|
21
21
|
eversince init connect the agents found on this machine
|
|
22
22
|
eversince init --agent codex connect one agent (claude-code, codex,
|
|
23
|
-
cursor, vscode, claude-desktop, other
|
|
23
|
+
cursor, vscode, claude-desktop, other,
|
|
24
|
+
or cli: this terminal, after a disconnect)
|
|
24
25
|
eversince mcp --agent <agent> the desktop app as a stdio MCP server;
|
|
25
26
|
init writes this into the agent's settings
|
|
26
27
|
|
|
@@ -49,7 +50,7 @@ Options
|
|
|
49
50
|
--annotation <kind> with tools: only read, write or destructive tools
|
|
50
51
|
--name <agent> with login or init: the agent's name, shown in Settings
|
|
51
52
|
and on the feed (otherwise the agent whose shell this
|
|
52
|
-
is: Claude Code, Cursor
|
|
53
|
+
is: Claude Code, Cursor or Codex; else "CLI agent")
|
|
53
54
|
--scope <where> with init: user (default, once per machine) or project
|
|
54
55
|
(written into this folder, to commit with a repo)
|
|
55
56
|
--dry-run / --force with init: preview what would be written, or overwrite what is there
|
package/dist/local.js
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync, realpathSync } from 'node:fs';
|
|
|
2
2
|
import { delimiter, join } from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { DoorBlocked, probe, reachApp, readState } from './door.js';
|
|
5
|
-
import { detectHostAgent } from './host-agent.js';
|
|
5
|
+
import { detectHostAgent, kindForName } from './host-agent.js';
|
|
6
6
|
export function desktopInstalled() {
|
|
7
7
|
const state = readState();
|
|
8
8
|
return !!state && existsSync(state.app) && typeof state.connectKey === 'string';
|
|
@@ -69,8 +69,9 @@ export async function localDoor(onStart) {
|
|
|
69
69
|
const state = await reachApp(undefined, onStart);
|
|
70
70
|
if (!state)
|
|
71
71
|
throw new Error('The Eversince app on this computer did not open. Open it and try again, or run with --cloud.');
|
|
72
|
-
const
|
|
73
|
-
const
|
|
72
|
+
const host = detectHostAgent();
|
|
73
|
+
const label = host?.name ?? 'CLI agent';
|
|
74
|
+
const existing = state.connections?.find((c) => c?.label === label && c?.agent === kindForName(host?.name) && typeof c.token === 'string');
|
|
74
75
|
const token = typeof existing?.token === 'string' ? existing.token : await connect();
|
|
75
76
|
return {
|
|
76
77
|
baseUrl: `http://127.0.0.1:${state.port}`,
|
package/package.json
CHANGED