@coltonkirsten/a12s 0.9.0 → 0.11.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 & {});
@@ -205,8 +215,17 @@ export interface ComputerStatus {
205
215
  /** Set while the harness session runs background work (sub-agents, shells) between Turns; it is not idle then. */
206
216
  background?: {
207
217
  tasks: number;
218
+ items?: BackgroundTask[];
208
219
  };
209
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
+ }
210
229
  export interface DriveRow {
211
230
  name: string;
212
231
  kind: "home" | "state" | "keep";
@@ -226,6 +245,8 @@ export interface ServiceStatus {
226
245
  waiting?: Waiting;
227
246
  image: string;
228
247
  pin?: string;
248
+ /** The host the proxy dials an external Service at; it has no image or pin then. */
249
+ external?: string;
229
250
  generation: number;
230
251
  restarts: number;
231
252
  health?: string;
@@ -369,6 +390,8 @@ export interface TaskData {
369
390
  summary?: string;
370
391
  /** On task.finished of a sub-agent: its last text, truncated to 2000 characters (Claude Code only). */
371
392
  result?: string;
393
+ /** On task.finished when a12s stopped the task at its time limit: the limit, in seconds. */
394
+ timeLimit?: number;
372
395
  }
373
396
  /** POST /v1/agent-computers/{name}/stop: the Turns it stopped and how many background tasks it ended. */
374
397
  export interface StopResponse {
@@ -383,8 +406,22 @@ export interface TurnFinishedData {
383
406
  tokens?: TokenUsage;
384
407
  /** Claude Code's fast mode for the Turn, when the CLI reported it. `usage.speed` says how the Turn ran. */
385
408
  fastMode?: FastMode;
409
+ /** Claude Code: the model ids that answered the agent's own calls in the Turn, in order. */
410
+ models?: string[];
411
+ /** Claude Code: each response a model refused, and the model that re-ran it when there was a fallback. */
412
+ refusals?: Refusal[];
386
413
  error?: string;
387
414
  }
415
+ /**
416
+ * `scope` "session": the agent's own response fell back, and a12s sets the configured model back when the Turn ends.
417
+ * "local": one sub-agent's response did.
418
+ */
419
+ export interface Refusal {
420
+ model: string;
421
+ category: string | null;
422
+ fallbackModel?: string;
423
+ scope?: "session" | "local";
424
+ }
388
425
  /** `state` is "on", "off" or "cooldown"; `disabledReason` (e.g. "extra_usage_disabled") says why it is not on. */
389
426
  export interface FastMode {
390
427
  state: string;
@@ -572,6 +609,12 @@ export interface CredentialInfo {
572
609
  usedBy?: string[];
573
610
  /** When the value last changed (RFC 3339); absent if unknown. */
574
611
  updatedAt?: string;
612
+ /** Where the Controller reads the value, from the Fleet's `credentials`. */
613
+ source?: CredentialSource;
614
+ /** The source's version the value came from. */
615
+ sourceVersion?: string;
616
+ /** Why the last read of the source failed. The value in use stays, unless the source has none. */
617
+ sourceError?: string;
575
618
  }
576
619
  export interface CredentialsResponse {
577
620
  credentials: CredentialInfo[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coltonkirsten/a12s",
3
- "version": "0.9.0",
3
+ "version": "0.11.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",