@ainecto/cli 0.16.3 → 0.16.4
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 +5 -1
- package/dist/bin/ainecto.js +22 -7
- package/dist/bin/ainecto.js.map +1 -1
- package/dist/bin/mcp.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -208,6 +208,7 @@ the last point below.
|
|
|
208
208
|
|
|
209
209
|
```bash
|
|
210
210
|
ainecto term new api --cwd ~/code/api -- claude # start a session (without a command: your login shell)
|
|
211
|
+
ainecto term new api --project <project-uuid> -- claude # file it under that AiNecto project in Terminal on the web
|
|
211
212
|
ainecto term ls [--json]
|
|
212
213
|
ainecto term send api "run the tests" # types the text, without Enter
|
|
213
214
|
ainecto term key api enter # one key — see below
|
|
@@ -226,6 +227,9 @@ ainecto term restore # after a reboot: start again
|
|
|
226
227
|
- `send --paste` sends the text as a bracketed paste when the app asked for one. To send text that starts
|
|
227
228
|
with `-`, put it after `--`.
|
|
228
229
|
- In `attach`, press `Ctrl-\` twice to send one `Ctrl-\` to the app.
|
|
230
|
+
- `--project` takes the project UUID from the project's web address (`…/projects/<uuid>`). Terminal on the web
|
|
231
|
+
lists the session under that project; without it, the session shows as outside any project. The tag stays
|
|
232
|
+
for the life of the session.
|
|
229
233
|
- Inside a session, `AINECTO_TERM_SESSION` holds its name. A name does not change; renaming on the web
|
|
230
234
|
changes only the name you see (`term ls` shows it as the label).
|
|
231
235
|
- `restore` starts again each session that was running (name, folder, command) with the environment of the
|
|
@@ -272,7 +276,7 @@ This is the entry `setup --local` and `init --mcp --local` write — you normall
|
|
|
272
276
|
"mcpServers": {
|
|
273
277
|
"ainecto": {
|
|
274
278
|
"command": "npx",
|
|
275
|
-
"args": ["-y", "@ainecto/mcp@0.16.
|
|
279
|
+
"args": ["-y", "@ainecto/mcp@0.16.4"]
|
|
276
280
|
}
|
|
277
281
|
}
|
|
278
282
|
}
|
package/dist/bin/ainecto.js
CHANGED
|
@@ -5699,8 +5699,8 @@ function legacyRoleInput(flag, envVars = process.env) {
|
|
|
5699
5699
|
|
|
5700
5700
|
// src/core/version.ts
|
|
5701
5701
|
var UNBUNDLED_VERSION = "dev";
|
|
5702
|
-
var CLI_VERSION = true ? "0.16.
|
|
5703
|
-
var CLI_BUILD = true ? "
|
|
5702
|
+
var CLI_VERSION = true ? "0.16.4" : UNBUNDLED_VERSION;
|
|
5703
|
+
var CLI_BUILD = true ? "ef54410" : void 0;
|
|
5704
5704
|
function cliVersionLabel(version, build, release2) {
|
|
5705
5705
|
return release2 || build === void 0 ? version : `${version}-dev+${build}`;
|
|
5706
5706
|
}
|
|
@@ -13274,7 +13274,7 @@ async function waitForMatch(paths, name, pattern, range, timeoutMs) {
|
|
|
13274
13274
|
|
|
13275
13275
|
// src/adapters/cli/termCommand.ts
|
|
13276
13276
|
var TERM_HELP_LINES = [
|
|
13277
|
-
" ainecto term new <name> [--cwd DIR] [-- command args\u2026] start a session (default: your login shell); AINECTO_TERM_SESSION=<name> inside",
|
|
13277
|
+
" ainecto term new <name> [--cwd DIR] [--project UUID] [-- command args\u2026] start a session (default: your login shell); AINECTO_TERM_SESSION=<name> inside; --project files it under that AiNecto project on the web",
|
|
13278
13278
|
" ainecto term ls [--json] list sessions",
|
|
13279
13279
|
" ainecto term send <name> [--paste] [--] <text> type text (no Enter; --paste wraps it as a bracketed paste when the app asked for it)",
|
|
13280
13280
|
` ainecto term key <name> <key> press one key: ${KEY_NAMES.join(", ")}`,
|
|
@@ -13344,8 +13344,9 @@ async function executeTermCommand(input) {
|
|
|
13344
13344
|
}
|
|
13345
13345
|
}
|
|
13346
13346
|
async function newSession(paths, argv, input) {
|
|
13347
|
-
const args = parseArgs(argv, { cwd: "string" });
|
|
13348
|
-
const name = singleName(args.positionals, "term new <name> [--cwd DIR] [-- command args\u2026]");
|
|
13347
|
+
const args = parseArgs(argv, { cwd: "string", project: "string" });
|
|
13348
|
+
const name = singleName(args.positionals, "term new <name> [--cwd DIR] [--project UUID] [-- command args\u2026]");
|
|
13349
|
+
const project = typeof args.flags.project === "string" ? projectFlag(args.flags.project) : void 0;
|
|
13349
13350
|
const tty = input.io.stdout.isTTY ? { cols: input.io.stdout.columns, rows: input.io.stdout.rows } : {};
|
|
13350
13351
|
const result = await termRequest(paths, {
|
|
13351
13352
|
op: "new",
|
|
@@ -13353,10 +13354,21 @@ async function newSession(paths, argv, input) {
|
|
|
13353
13354
|
cwd: resolve3(typeof args.flags.cwd === "string" ? args.flags.cwd : process.cwd()),
|
|
13354
13355
|
command: args.afterDashes.length > 0 ? args.afterDashes : null,
|
|
13355
13356
|
env: stringEnv(),
|
|
13356
|
-
...tty
|
|
13357
|
+
...tty,
|
|
13358
|
+
...project ? { project } : {}
|
|
13357
13359
|
}, { start: true });
|
|
13358
13360
|
const data = result.daemon ? result.data : void 0;
|
|
13359
|
-
|
|
13361
|
+
const dropped = project !== void 0 && keptProject(data) !== project;
|
|
13362
|
+
const started = `Started ${name}. Attach with: ainecto term attach ${name}`;
|
|
13363
|
+
return print(input, data, dropped ? `${started}
|
|
13364
|
+
The running term background process is older and did not keep --project; the session has no project. Run \`ainecto term kill-server\` when no session needs it, then start the session again.` : started);
|
|
13365
|
+
}
|
|
13366
|
+
function projectFlag(value) {
|
|
13367
|
+
const uuid = value.trim().toLowerCase();
|
|
13368
|
+
if (!isUuid(uuid)) {
|
|
13369
|
+
throw new TermError("TERM_USAGE", `--project needs an AiNecto project UUID (the part after projects/ in its web address), not "${value}".`);
|
|
13370
|
+
}
|
|
13371
|
+
return uuid;
|
|
13360
13372
|
}
|
|
13361
13373
|
async function listSessions(paths, argv, input) {
|
|
13362
13374
|
parseArgs(argv, {});
|
|
@@ -13575,6 +13587,9 @@ function linesField(data) {
|
|
|
13575
13587
|
}
|
|
13576
13588
|
return [];
|
|
13577
13589
|
}
|
|
13590
|
+
function keptProject(data) {
|
|
13591
|
+
return data && typeof data === "object" && "project" in data && typeof data.project === "string" ? data.project : void 0;
|
|
13592
|
+
}
|
|
13578
13593
|
function resetField(data) {
|
|
13579
13594
|
return data && typeof data === "object" && "reset" in data && typeof data.reset === "string" ? data.reset : void 0;
|
|
13580
13595
|
}
|