@coltonkirsten/a12s 0.8.1 → 0.10.0

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.
@@ -56,6 +56,9 @@ export interface AgentComputerSpec {
56
56
  from: string[];
57
57
  maxWakesPerHour?: number;
58
58
  };
59
+ compactBeforeSleep?: {
60
+ minTokens: number;
61
+ };
59
62
  };
60
63
  uses?: Array<string | {
61
64
  name: string;
@@ -79,6 +82,13 @@ export interface FleetSpec {
79
82
  defaults?: AgentComputerSpec;
80
83
  agent_computers: Record<string, AgentComputerSpec>;
81
84
  services?: Record<string, Record<string, unknown>>;
85
+ /** Where the Controller reads a credential's value itself, by credential name. */
86
+ credentials?: Record<string, CredentialSource>;
87
+ }
88
+ /** Where the Controller reads a credential's value. Exactly one field is set. */
89
+ export interface CredentialSource {
90
+ /** A Secret Manager secret, `projects/<project>/secrets/<name>`: its latest version, read with the Controller VM's service account. */
91
+ gcpSecret?: string;
82
92
  }
83
93
  export interface Change {
84
94
  op: "create" | "update" | "remove" | (string & {});
@@ -193,6 +203,8 @@ export interface ComputerStatus {
193
203
  image: string;
194
204
  /** The Fleet's security.seccomp path, when the Computer runs with a custom seccomp profile. */
195
205
  seccomp?: string;
206
+ /** The cloud principal it acts as (a GCE service account with per-computer identity), for your app to grant access to. */
207
+ identity?: string;
196
208
  generation: number;
197
209
  stagedGeneration?: number;
198
210
  credentialGeneration?: number;
@@ -203,8 +215,17 @@ export interface ComputerStatus {
203
215
  /** Set while the harness session runs background work (sub-agents, shells) between Turns; it is not idle then. */
204
216
  background?: {
205
217
  tasks: number;
218
+ items?: BackgroundTask[];
206
219
  };
207
220
  }
221
+ /** A running background task and when a12s stops it: 2 hours after it started unless the agent asked for more. */
222
+ export interface BackgroundTask {
223
+ id: string;
224
+ kind: string;
225
+ description: string;
226
+ startedAt: string;
227
+ deadline: string;
228
+ }
208
229
  export interface DriveRow {
209
230
  name: string;
210
231
  kind: "home" | "state" | "keep";
@@ -359,8 +380,16 @@ export interface TaskData {
359
380
  /** The harness's own kind: local_agent, local_bash, shell, … */
360
381
  kind: string;
361
382
  description: string;
383
+ /** The tool call that started it (Claude Code only): the `id` of its tool.started. */
384
+ toolUseId?: string;
362
385
  /** On task.finished. "killed": the session ended (stop, sleep, restart, a new session) while it ran. */
363
386
  status?: "completed" | "failed" | "stopped" | "killed";
387
+ /** On task.finished, when the harness reported one (Claude Code only). */
388
+ summary?: string;
389
+ /** On task.finished of a sub-agent: its last text, truncated to 2000 characters (Claude Code only). */
390
+ result?: string;
391
+ /** On task.finished when a12s stopped the task at its time limit: the limit, in seconds. */
392
+ timeLimit?: number;
364
393
  }
365
394
  /** POST /v1/agent-computers/{name}/stop: the Turns it stopped and how many background tasks it ended. */
366
395
  export interface StopResponse {
@@ -373,8 +402,15 @@ export interface TurnFinishedData {
373
402
  usage: unknown;
374
403
  /** The same usage, normalized across harnesses, when the harness reported it. */
375
404
  tokens?: TokenUsage;
405
+ /** Claude Code's fast mode for the Turn, when the CLI reported it. `usage.speed` says how the Turn ran. */
406
+ fastMode?: FastMode;
376
407
  error?: string;
377
408
  }
409
+ /** `state` is "on", "off" or "cooldown"; `disabledReason` (e.g. "extra_usage_disabled") says why it is not on. */
410
+ export interface FastMode {
411
+ state: string;
412
+ disabledReason?: string;
413
+ }
378
414
  /** A Turn's token usage, the same for every harness. `input` excludes cached input. */
379
415
  export interface TokenUsage {
380
416
  input: number;
@@ -415,12 +451,16 @@ export interface ToolStartedData {
415
451
  /** MCP tools are named `mcp__<server>__<tool>`, e.g. `mcp__a12s__send`. */
416
452
  name: string;
417
453
  input?: unknown;
454
+ /** A sub-agent's call (Claude Code only): the id of the tool call that started the sub-agent. Absent for the agent's own calls. */
455
+ parent?: string;
418
456
  }
419
457
  export interface ToolFinishedData {
420
458
  id: string;
421
459
  name: string;
422
460
  isError: boolean;
423
461
  output?: unknown;
462
+ /** As on tool.started. */
463
+ parent?: string;
424
464
  }
425
465
  export interface DiagnosticData {
426
466
  message: string;
@@ -553,6 +593,12 @@ export interface CredentialInfo {
553
593
  usedBy?: string[];
554
594
  /** When the value last changed (RFC 3339); absent if unknown. */
555
595
  updatedAt?: string;
596
+ /** Where the Controller reads the value, from the Fleet's `credentials`. */
597
+ source?: CredentialSource;
598
+ /** The source's version the value came from. */
599
+ sourceVersion?: string;
600
+ /** Why the last read of the source failed. The value in use stays, unless the source has none. */
601
+ sourceError?: string;
556
602
  }
557
603
  export interface CredentialsResponse {
558
604
  credentials: CredentialInfo[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coltonkirsten/a12s",
3
- "version": "0.8.1",
3
+ "version": "0.10.0",
4
4
  "description": "TypeScript client for a12s: send work to agent Computers, stream their events and Turns, in Node or the browser",
5
5
  "license": "MIT",
6
6
  "type": "module",