@tomradex/agent 0.17.0 → 0.17.1

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/dist/engine.d.ts CHANGED
@@ -75,8 +75,64 @@ export interface EngineSetup {
75
75
  /** Signing in starts the agent itself, which then asks (`/login`); otherwise the command signs in and returns. */
76
76
  signInRuns?: boolean;
77
77
  docs?: string;
78
+ /** The agent's official download page, opened in the system browser beside these commands, for those without the tools they need: one that offers the CLI. */
79
+ download?: string;
80
+ /** The agent's desktop app, when it has one: whether installing it puts the CLI where Tomrade finds it. */
81
+ desktop?: {
82
+ title: string;
83
+ shipsCli: boolean;
84
+ };
78
85
  /** Offered on setup screens before it is installed. */
79
86
  suggested?: boolean;
87
+ /** Installs Tomrade runs itself in the background, most reliable first; one that does not fit this machine is skipped. Absent, only the terminal commands remain. */
88
+ installers?: EngineInstaller[];
89
+ /** A sign-in command Tomrade runs and watches itself: it opens or prints a browser address and needs no typing. Without it, signing in happens in a terminal while Tomrade polls. */
90
+ signInRun?: {
91
+ args: string[];
92
+ };
93
+ }
94
+ /**
95
+ * One way Tomrade itself installs the CLI, no terminal and no admin rights.
96
+ * `npm` runs through the system npm when it answers, else the app's borrowed
97
+ * one; `script` is the agent's official installer for one platform family;
98
+ * `brew` is tried only where Homebrew is already installed.
99
+ */
100
+ export type EngineInstaller = {
101
+ kind: "npm";
102
+ package: string;
103
+ } | {
104
+ kind: "script";
105
+ url: string;
106
+ shell: "sh" | "powershell";
107
+ } | {
108
+ kind: "brew";
109
+ name: string;
110
+ cask?: boolean;
111
+ };
112
+ export type EngineSetupStep = "install" | "sign-in";
113
+ /** Why a setup step failed, sorted into a kind a screen can word in the person's language. */
114
+ export interface EngineSetupFailure {
115
+ kind: "network" | "registry" | "permission" | "disk-full" | "unsupported" | "not-found" | "not-on-path" | "timeout" | "exit" | "cancelled";
116
+ /** The underlying words, English or the tool's own, for the details view. */
117
+ message: string;
118
+ }
119
+ /** Where one engine's setup step stands; pushed as it moves. */
120
+ export interface EngineSetupProgress {
121
+ engineId: string;
122
+ step: EngineSetupStep;
123
+ /** `waiting`: a sign-in that needs the person — in the browser, or in the terminal when `terminal` is set. */
124
+ phase: "running" | "checking" | "waiting" | "done" | "failed";
125
+ /** Which installer is being tried ("script", "npm", "brew"). */
126
+ installer?: string;
127
+ /** The last lines of output, shown on a failure. */
128
+ output?: string;
129
+ failure?: EngineSetupFailure;
130
+ /** The version detection reported once the step was done; absent when the step was already satisfied. */
131
+ version?: string;
132
+ /** The sign-in address caught from the agent's output, for the screen to open when the agent did not. */
133
+ url?: string;
134
+ /** Signing in needs the agent's own terminal session (`setup.signIn`); Tomrade keeps watching until it is signed in. */
135
+ terminal?: boolean;
80
136
  }
81
137
  /**
82
138
  * Tomrade's MCP server in the agent's own user-level configuration, so a
@@ -295,6 +351,8 @@ export interface EnginePick {
295
351
  freeText?: boolean;
296
352
  /** The engine is still asking its agent for the choices; ask again shortly. */
297
353
  pending?: boolean;
354
+ /** The engine asked its agent for the choices and the agent could not answer: why. On the model pick, it cannot run a turn yet. */
355
+ failed?: string;
298
356
  }
299
357
  /** One real turn on an engine, asked for by the person: does it answer? */
300
358
  export interface EngineTry {
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export { carriedKits, deferredTools, kitLines } from "./kits.js";
15
15
  export { type AgentEvent, type Block, type CardAction, type CardView, type ChecklistCard, type FindingCard, type FocusRef, PANEL_SURFACES, type ParkView, type PendingView, type RunStatus, type RunView, type ThreadMessage, type ThreadSummary, type ThreadSurface, type UserInput } from "./thread.js";
16
16
  export { type OpenDependency, type RetryState, type TurnInput, type TurnIO, type TurnPurpose, type TurnResult } from "./turn.js";
17
17
  export { type FollowUpStart, type GeneralExecution, isSuspended, type Playbook, type PlaybookIndexEntry, type PlaybookSource, type Suspended, type TurnFollowUp, type WorkflowInfo, type WorkflowIO, type WorkflowQuestion, type WorkflowSpec, type WorkflowTransition } from "./workflow.js";
18
- export { type CliAttempt, type CliCheck, type CliSource, type CommandCheck, type CommandCheckOptions, type Engine, type EngineAvailability, type EngineCapability, type EngineCommands, type EngineDiagnostics, type EngineLocal, type EngineMcpLink, type EngineNeed, type EnginePick, type EngineRegistration, type EngineSetup, type EngineSteering, type EngineTerminal, type EngineTry, type EngineView, type FlatEngineMembers, type LocalCliStatus, type McpLinkView, type McpProjectApproval } from "./engine.js";
18
+ export { type CliAttempt, type CliCheck, type CliSource, type CommandCheck, type CommandCheckOptions, type Engine, type EngineAvailability, type EngineCapability, type EngineCommands, type EngineDiagnostics, type EngineLocal, type EngineMcpLink, type EngineNeed, type EnginePick, type EngineInstaller, type EngineRegistration, type EngineSetup, type EngineSetupFailure, type EngineSetupProgress, type EngineSetupStep, type EngineSteering, type EngineTerminal, type EngineTry, type EngineView, type FlatEngineMembers, type LocalCliStatus, type McpLinkView, type McpProjectApproval } from "./engine.js";
19
19
  export { type AgentPolicy, type AgentRequest, type AgentRequestFailure, type AgentRetry, type AgentTurnInfo, type CliHookAnswer, type CliHookCall, type CliHookEvent, type TurnEnding } from "./hooks.js";
20
20
  export { flatEngineView, normalizeEngine } from "./engine-shape.js";
21
21
  //# sourceMappingURL=index.d.ts.map
package/dist/service.d.ts CHANGED
@@ -341,7 +341,7 @@ export declare class Agent extends Service implements AgentReader {
341
341
  */
342
342
  tryEngine(projectId: string, engineId: string, signal?: AbortSignal): Promise<EngineTry>;
343
343
  /** The last try, while the engine's settings are the ones it ran with. */
344
- private triedWith;
344
+ triedWith(engineId: string): EngineTry | undefined;
345
345
  private runTry;
346
346
  deleteThread(projectId: string, threadId: string): boolean;
347
347
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomradex/agent",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "type": "module",
5
5
  "author": "Haoyuan Tang",
6
6
  "engines": {
@@ -27,17 +27,17 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@tomradex/contracts": "0.17.0",
31
- "@tomradex/db": "0.17.0",
32
- "@tomradex/domain": "0.2.24",
33
- "@tomradex/fields": "0.17.0",
34
- "@tomradex/hub": "0.17.0",
35
- "@tomradex/ipc": "0.17.0",
36
- "@tomradex/llm": "0.17.0",
37
- "@tomradex/oplog": "0.17.0",
38
- "@tomradex/settings": "0.17.0",
39
- "@tomradex/tools": "0.17.0",
40
- "@tomradex/write": "0.17.0",
30
+ "@tomradex/contracts": "0.17.1",
31
+ "@tomradex/db": "0.17.1",
32
+ "@tomradex/domain": "0.2.26",
33
+ "@tomradex/fields": "0.17.1",
34
+ "@tomradex/hub": "0.17.1",
35
+ "@tomradex/ipc": "0.17.1",
36
+ "@tomradex/llm": "0.17.1",
37
+ "@tomradex/oplog": "0.17.1",
38
+ "@tomradex/settings": "0.17.1",
39
+ "@tomradex/tools": "0.17.1",
40
+ "@tomradex/write": "0.17.1",
41
41
  "cordis": "4.0.0-rc.8",
42
42
  "zod": "^4.4.3"
43
43
  },