@lazyingart/agintiflow 0.8.2 → 0.8.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 CHANGED
@@ -54,7 +54,7 @@ aginti
54
54
  aginti chat
55
55
  ```
56
56
 
57
- Inside chat, type normal requests such as `write a small Python CLI app with tests`. The default is now Docker workspace mode with approved package installs, so coding, plotting, and LaTeX tasks can set up project-local tools without touching the host. Use `/help` for commands, `/latex on` for PDF work, `/docker off` only when you intentionally want host mode, `/sessions` to list project runs, and `/resume <session-id>` to continue work.
57
+ Inside chat, type normal requests such as `write a small Python CLI app with tests`. The default is now Docker workspace mode with approved package installs, so coding, plotting, and LaTeX tasks can set up project-local tools without touching the host. Use `/help` for commands, `/latex on` for PDF work, `/docker off` only when you intentionally want host mode, `/sessions` to list project runs, and `/resume <session-id>` to continue work. Ctrl+C exits cleanly and prints a resume command when a session exists.
58
58
 
59
59
  Launch the local web UI from an installed package:
60
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazyingart/agintiflow",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "type": "module",
5
5
  "description": "AgInTiFlow is a resumable Playwright website-control agent with OpenAI-compatible tool calling.",
6
6
  "license": "Apache-2.0",
package/public/styles.css CHANGED
@@ -536,21 +536,35 @@ button.danger {
536
536
  overflow: auto;
537
537
  display: grid;
538
538
  gap: 12px;
539
- padding: 6px 2px;
539
+ padding: 14px;
540
+ border: 1px solid rgba(15, 118, 110, 0.16);
541
+ border-radius: 18px;
542
+ background:
543
+ radial-gradient(circle at 14% 8%, rgba(20, 184, 166, 0.18), transparent 24%),
544
+ radial-gradient(circle at 86% 0%, rgba(245, 158, 11, 0.16), transparent 22%),
545
+ linear-gradient(180deg, rgba(255, 253, 250, 0.86), rgba(241, 245, 249, 0.72));
546
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
540
547
  }
541
548
 
542
549
  .chat-item {
550
+ width: fit-content;
551
+ max-width: min(780px, 88%);
543
552
  border: 1px solid var(--line);
544
- border-radius: 14px;
553
+ border-radius: 18px;
545
554
  padding: 12px 14px;
555
+ box-shadow: 0 12px 28px rgba(62, 49, 26, 0.08);
546
556
  }
547
557
 
548
558
  .chat-item.user {
559
+ justify-self: end;
549
560
  background: var(--user);
561
+ border-bottom-right-radius: 6px;
550
562
  }
551
563
 
552
564
  .chat-item.assistant {
565
+ justify-self: start;
553
566
  background: var(--assistant);
567
+ border-bottom-left-radius: 6px;
554
568
  }
555
569
 
556
570
  .chat-meta {
package/src/cli.js CHANGED
@@ -219,7 +219,7 @@ export function parseArgs(argv) {
219
219
 
220
220
  function printUsage() {
221
221
  console.log(
222
- 'Usage: aginti [chat] OR aginti web [--port 3210] OR aginti queue <session-id> "message" OR aginti [--latex] [--routing smart|fast|complex|manual] [--provider deepseek|openai|mock] [--sandbox-mode host|docker-readonly|docker-workspace] [--package-install-policy block|prompt|allow] [--approve-package-installs] [--allow-shell|--no-shell] [--allow-destructive] [--allow-file-tools|--no-file-tools] [--allow-wrappers --wrapper codex] [--sandbox-status|--sandbox-preflight] "your task"'
222
+ 'Usage: aginti [chat] OR aginti web [--port 3210] OR aginti resume <session-id> ["prompt"] OR aginti queue <session-id> "message" OR aginti [--latex] [--routing smart|fast|complex|manual] [--provider deepseek|openai|mock] [--sandbox-mode host|docker-readonly|docker-workspace] [--package-install-policy block|prompt|allow] [--approve-package-installs] [--allow-shell|--no-shell] [--allow-destructive] [--allow-file-tools|--no-file-tools] [--allow-wrappers --wrapper codex] [--sandbox-status|--sandbox-preflight] "your task"'
223
223
  );
224
224
  }
225
225
 
@@ -458,7 +458,18 @@ export async function main(argv = process.argv.slice(2)) {
458
458
  if (argv[0] === "resume") {
459
459
  const sessionId = argv[1] || "";
460
460
  const prompt = argv.slice(2).join(" ").trim();
461
- if (!sessionId || !prompt) {
461
+ if (!sessionId) {
462
+ console.error('Usage: aginti resume <session-id> ["new prompt"]');
463
+ process.exit(1);
464
+ }
465
+ if (!prompt && process.stdin.isTTY) {
466
+ await startInteractiveCli(agentDefaults({ ...parseArgs([]), resume: sessionId }), {
467
+ packageDir,
468
+ packageVersion: packageJson.version,
469
+ });
470
+ return;
471
+ }
472
+ if (!prompt) {
462
473
  console.error('Usage: aginti resume <session-id> "new prompt"');
463
474
  process.exit(1);
464
475
  }
@@ -45,6 +45,23 @@ function printStatus(state) {
45
45
  }
46
46
  }
47
47
 
48
+ function isAbortError(error) {
49
+ return error?.code === "ABORT_ERR" || error?.name === "AbortError";
50
+ }
51
+
52
+ function printResumeHint(state) {
53
+ const sessionId = state.sessionId || "";
54
+ console.log("");
55
+ if (sessionId) {
56
+ console.log("Interrupted. Session saved.");
57
+ console.log(`Resume: aginti resume ${sessionId}`);
58
+ console.log(`One-shot: aginti resume ${sessionId} "continue"`);
59
+ } else {
60
+ console.log("Interrupted. No active session yet.");
61
+ console.log("Restart: aginti");
62
+ }
63
+ }
64
+
48
65
  function createState(args = {}) {
49
66
  return {
50
67
  provider: args.provider || "",
@@ -219,6 +236,10 @@ export async function startInteractiveCli(args = {}, { packageDir, packageVersio
219
236
  answer = await rl.question("\naginti> ");
220
237
  } catch (error) {
221
238
  if (error?.code === "ERR_USE_AFTER_CLOSE") break;
239
+ if (isAbortError(error)) {
240
+ printResumeHint(state);
241
+ break;
242
+ }
222
243
  throw error;
223
244
  }
224
245
  const line = answer.trim();
@@ -232,6 +253,10 @@ export async function startInteractiveCli(args = {}, { packageDir, packageVersio
232
253
  try {
233
254
  await runPrompt(line, state, packageDir);
234
255
  } catch (error) {
256
+ if (isAbortError(error)) {
257
+ printResumeHint(state);
258
+ break;
259
+ }
235
260
  console.error(`error: ${error.message}`);
236
261
  }
237
262
  }