@autohq/cli 0.1.325 → 0.1.326

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.
@@ -23434,7 +23434,7 @@ Object.assign(lookup, {
23434
23434
  // package.json
23435
23435
  var package_default = {
23436
23436
  name: "@autohq/cli",
23437
- version: "0.1.325",
23437
+ version: "0.1.326",
23438
23438
  license: "SEE LICENSE IN README.md",
23439
23439
  publishConfig: {
23440
23440
  access: "public"
@@ -28061,6 +28061,68 @@ var SessionDiagnosticEventSchema = external_exports.object({
28061
28061
  createdAt: external_exports.string().datetime()
28062
28062
  });
28063
28063
 
28064
+ // ../../packages/schemas/src/runtime-restart-diagnostics.ts
28065
+ var SANDBOX_CLASSIFICATIONS = [
28066
+ "running",
28067
+ "paused",
28068
+ "finished",
28069
+ "missing"
28070
+ ];
28071
+ var SandboxClassificationSchema = external_exports.enum(SANDBOX_CLASSIFICATIONS);
28072
+ var RUNTIME_RESTART_CAUSES = [
28073
+ // No active, unexpired bridge lease row exists for the session's runtime.
28074
+ "lease_missing",
28075
+ // The provider no longer knows the sandbox (killed, expired, host recycled).
28076
+ "sandbox_missing",
28077
+ // The provider paused the sandbox while the lease stayed current.
28078
+ "sandbox_paused",
28079
+ // The provider reports the sandbox finished.
28080
+ "sandbox_finished",
28081
+ // The sandbox is running but the bridge wrapper process is not.
28082
+ "wrapper_not_running",
28083
+ // The wrapper is running under a different lease than the current one.
28084
+ "lease_mismatch",
28085
+ // Socket delivery on an apparently healthy lease threw.
28086
+ "delivery_failed"
28087
+ ];
28088
+ var RuntimeRestartCauseSchema = external_exports.enum(RUNTIME_RESTART_CAUSES);
28089
+ var RuntimeRestartLeaseSnapshotSchema = external_exports.object({
28090
+ id: RuntimeBridgeLeaseIdSchema2,
28091
+ status: external_exports.enum(["active", "revoked"]),
28092
+ accessExpiresAt: external_exports.string().datetime(),
28093
+ lastUsedAt: external_exports.string().datetime().nullable(),
28094
+ revokedAt: external_exports.string().datetime().nullable(),
28095
+ createdAt: external_exports.string().datetime()
28096
+ });
28097
+ var RuntimeRestartInspectionSnapshotSchema = external_exports.object({
28098
+ sandboxClassification: SandboxClassificationSchema,
28099
+ sandboxId: external_exports.string().nullable(),
28100
+ wrapperRunning: external_exports.boolean(),
28101
+ wrapperBridgeLeaseId: external_exports.string().nullable()
28102
+ });
28103
+ var RuntimeRestartDiagnosticRecordSchema = external_exports.object({
28104
+ id: external_exports.string(),
28105
+ sessionId: SessionIdSchema2,
28106
+ runtimeId: RuntimeIdSchema2,
28107
+ providerId: external_exports.string(),
28108
+ cause: RuntimeRestartCauseSchema,
28109
+ /** Free-form detection detail, e.g. the delivery error message. */
28110
+ detail: external_exports.string().nullable(),
28111
+ sandboxId: external_exports.string().nullable(),
28112
+ /** The lease the restart decision was made against, when one existed. */
28113
+ bridgeLeaseId: RuntimeBridgeLeaseIdSchema2.nullable(),
28114
+ lease: RuntimeRestartLeaseSnapshotSchema.nullable(),
28115
+ inspection: RuntimeRestartInspectionSnapshotSchema.nullable(),
28116
+ /**
28117
+ * Bounded, secret-redacted tail of the durable in-sandbox runtime log,
28118
+ * captured only when the sandbox was still running. Contains the bridge
28119
+ * supervisor's `agent_bridge_exited status=N` markers when the wrapper died.
28120
+ */
28121
+ logTail: external_exports.string().nullable(),
28122
+ detectedAt: external_exports.string().datetime(),
28123
+ createdAt: external_exports.string().datetime()
28124
+ });
28125
+
28064
28126
  // ../../packages/schemas/src/session-introspection.ts
28065
28127
  var TruncatedValueSchema = external_exports.object({
28066
28128
  truncated: external_exports.literal(true),
@@ -28190,6 +28252,16 @@ var SessionToolStatSchema = external_exports.object({
28190
28252
  max: external_exports.number().nonnegative().nullable()
28191
28253
  })
28192
28254
  });
28255
+ var RunRuntimeRestartSchema = external_exports.object({
28256
+ cause: RuntimeRestartCauseSchema,
28257
+ detail: external_exports.string().nullable(),
28258
+ sandboxId: external_exports.string().nullable(),
28259
+ sandboxClassification: SandboxClassificationSchema.nullable(),
28260
+ wrapperRunning: external_exports.boolean().nullable(),
28261
+ detectedAt: external_exports.string().datetime(),
28262
+ logTail: external_exports.string().nullable(),
28263
+ logTailTruncated: external_exports.boolean()
28264
+ });
28193
28265
  var RunSummarySchema = external_exports.object({
28194
28266
  session: external_exports.object({
28195
28267
  id: SessionIdSchema2,
@@ -28259,7 +28331,12 @@ var RunSummarySchema = external_exports.object({
28259
28331
  conclusion: SessionCheckConclusionSchema.nullable(),
28260
28332
  completedAt: external_exports.string().datetime().nullable()
28261
28333
  })
28262
- )
28334
+ ),
28335
+ /** Runtime restart diagnostics, newest first, capped to the most recent. */
28336
+ runtimeRestarts: external_exports.object({
28337
+ count: external_exports.number().int().nonnegative(),
28338
+ recent: external_exports.array(RunRuntimeRestartSchema)
28339
+ })
28263
28340
  });
28264
28341
 
28265
28342
  // ../../packages/schemas/src/session-turns.ts
package/dist/index.js CHANGED
@@ -19787,8 +19787,78 @@ var init_session_diagnostics = __esm({
19787
19787
  }
19788
19788
  });
19789
19789
 
19790
+ // ../../packages/schemas/src/runtime-restart-diagnostics.ts
19791
+ var SANDBOX_CLASSIFICATIONS, SandboxClassificationSchema, RUNTIME_RESTART_CAUSES, RuntimeRestartCauseSchema, RuntimeRestartLeaseSnapshotSchema, RuntimeRestartInspectionSnapshotSchema, RuntimeRestartDiagnosticRecordSchema;
19792
+ var init_runtime_restart_diagnostics = __esm({
19793
+ "../../packages/schemas/src/runtime-restart-diagnostics.ts"() {
19794
+ "use strict";
19795
+ init_zod();
19796
+ init_ids();
19797
+ SANDBOX_CLASSIFICATIONS = [
19798
+ "running",
19799
+ "paused",
19800
+ "finished",
19801
+ "missing"
19802
+ ];
19803
+ SandboxClassificationSchema = external_exports.enum(SANDBOX_CLASSIFICATIONS);
19804
+ RUNTIME_RESTART_CAUSES = [
19805
+ // No active, unexpired bridge lease row exists for the session's runtime.
19806
+ "lease_missing",
19807
+ // The provider no longer knows the sandbox (killed, expired, host recycled).
19808
+ "sandbox_missing",
19809
+ // The provider paused the sandbox while the lease stayed current.
19810
+ "sandbox_paused",
19811
+ // The provider reports the sandbox finished.
19812
+ "sandbox_finished",
19813
+ // The sandbox is running but the bridge wrapper process is not.
19814
+ "wrapper_not_running",
19815
+ // The wrapper is running under a different lease than the current one.
19816
+ "lease_mismatch",
19817
+ // Socket delivery on an apparently healthy lease threw.
19818
+ "delivery_failed"
19819
+ ];
19820
+ RuntimeRestartCauseSchema = external_exports.enum(RUNTIME_RESTART_CAUSES);
19821
+ RuntimeRestartLeaseSnapshotSchema = external_exports.object({
19822
+ id: RuntimeBridgeLeaseIdSchema,
19823
+ status: external_exports.enum(["active", "revoked"]),
19824
+ accessExpiresAt: external_exports.string().datetime(),
19825
+ lastUsedAt: external_exports.string().datetime().nullable(),
19826
+ revokedAt: external_exports.string().datetime().nullable(),
19827
+ createdAt: external_exports.string().datetime()
19828
+ });
19829
+ RuntimeRestartInspectionSnapshotSchema = external_exports.object({
19830
+ sandboxClassification: SandboxClassificationSchema,
19831
+ sandboxId: external_exports.string().nullable(),
19832
+ wrapperRunning: external_exports.boolean(),
19833
+ wrapperBridgeLeaseId: external_exports.string().nullable()
19834
+ });
19835
+ RuntimeRestartDiagnosticRecordSchema = external_exports.object({
19836
+ id: external_exports.string(),
19837
+ sessionId: SessionIdSchema,
19838
+ runtimeId: RuntimeIdSchema,
19839
+ providerId: external_exports.string(),
19840
+ cause: RuntimeRestartCauseSchema,
19841
+ /** Free-form detection detail, e.g. the delivery error message. */
19842
+ detail: external_exports.string().nullable(),
19843
+ sandboxId: external_exports.string().nullable(),
19844
+ /** The lease the restart decision was made against, when one existed. */
19845
+ bridgeLeaseId: RuntimeBridgeLeaseIdSchema.nullable(),
19846
+ lease: RuntimeRestartLeaseSnapshotSchema.nullable(),
19847
+ inspection: RuntimeRestartInspectionSnapshotSchema.nullable(),
19848
+ /**
19849
+ * Bounded, secret-redacted tail of the durable in-sandbox runtime log,
19850
+ * captured only when the sandbox was still running. Contains the bridge
19851
+ * supervisor's `agent_bridge_exited status=N` markers when the wrapper died.
19852
+ */
19853
+ logTail: external_exports.string().nullable(),
19854
+ detectedAt: external_exports.string().datetime(),
19855
+ createdAt: external_exports.string().datetime()
19856
+ });
19857
+ }
19858
+ });
19859
+
19790
19860
  // ../../packages/schemas/src/session-introspection.ts
19791
- var TruncatedValueSchema, RunConversationSearchSnippetSchema, RunConversationSearchMatchSchema, RunConversationSearchResponseSchema, SessionToolExchangeSchema, SessionToolExchangesResponseSchema, SESSION_TRIGGER_DELIVERY_ACTIONS, SessionTriggerDeliveryActionSchema, SESSION_EVENT_ORIGIN_KINDS, SessionEventOriginKindSchema, SessionTriggerDeliveryRecordSchema, SessionTriggersResponseSchema, RunBindingRecordSchema, RunBindingsResponseSchema, RunTurnSchema, SessionToolStatSchema, RunSummarySchema;
19861
+ var TruncatedValueSchema, RunConversationSearchSnippetSchema, RunConversationSearchMatchSchema, RunConversationSearchResponseSchema, SessionToolExchangeSchema, SessionToolExchangesResponseSchema, SESSION_TRIGGER_DELIVERY_ACTIONS, SessionTriggerDeliveryActionSchema, SESSION_EVENT_ORIGIN_KINDS, SessionEventOriginKindSchema, SessionTriggerDeliveryRecordSchema, SessionTriggersResponseSchema, RunBindingRecordSchema, RunBindingsResponseSchema, RunTurnSchema, SessionToolStatSchema, RunRuntimeRestartSchema, RunSummarySchema;
19792
19862
  var init_session_introspection = __esm({
19793
19863
  "../../packages/schemas/src/session-introspection.ts"() {
19794
19864
  "use strict";
@@ -19797,6 +19867,7 @@ var init_session_introspection = __esm({
19797
19867
  init_conversation();
19798
19868
  init_ids();
19799
19869
  init_primitives();
19870
+ init_runtime_restart_diagnostics();
19800
19871
  init_session_bindings();
19801
19872
  init_sessions();
19802
19873
  TruncatedValueSchema = external_exports.object({
@@ -19927,6 +19998,16 @@ var init_session_introspection = __esm({
19927
19998
  max: external_exports.number().nonnegative().nullable()
19928
19999
  })
19929
20000
  });
20001
+ RunRuntimeRestartSchema = external_exports.object({
20002
+ cause: RuntimeRestartCauseSchema,
20003
+ detail: external_exports.string().nullable(),
20004
+ sandboxId: external_exports.string().nullable(),
20005
+ sandboxClassification: SandboxClassificationSchema.nullable(),
20006
+ wrapperRunning: external_exports.boolean().nullable(),
20007
+ detectedAt: external_exports.string().datetime(),
20008
+ logTail: external_exports.string().nullable(),
20009
+ logTailTruncated: external_exports.boolean()
20010
+ });
19930
20011
  RunSummarySchema = external_exports.object({
19931
20012
  session: external_exports.object({
19932
20013
  id: SessionIdSchema,
@@ -19996,7 +20077,12 @@ var init_session_introspection = __esm({
19996
20077
  conclusion: SessionCheckConclusionSchema.nullable(),
19997
20078
  completedAt: external_exports.string().datetime().nullable()
19998
20079
  })
19999
- )
20080
+ ),
20081
+ /** Runtime restart diagnostics, newest first, capped to the most recent. */
20082
+ runtimeRestarts: external_exports.object({
20083
+ count: external_exports.number().int().nonnegative(),
20084
+ recent: external_exports.array(RunRuntimeRestartSchema)
20085
+ })
20000
20086
  });
20001
20087
  }
20002
20088
  });
@@ -25731,6 +25817,7 @@ var init_src = __esm({
25731
25817
  init_pool_replace();
25732
25818
  init_runtime_log();
25733
25819
  init_runtime_log_tailer();
25820
+ init_runtime_restart_diagnostics();
25734
25821
  init_runtimes();
25735
25822
  init_sessions();
25736
25823
  init_agents();
@@ -28471,7 +28558,7 @@ var init_package = __esm({
28471
28558
  "package.json"() {
28472
28559
  package_default = {
28473
28560
  name: "@autohq/cli",
28474
- version: "0.1.325",
28561
+ version: "0.1.326",
28475
28562
  license: "SEE LICENSE IN README.md",
28476
28563
  publishConfig: {
28477
28564
  access: "public"
@@ -47144,6 +47231,18 @@ function formatRunShowText(result, writeLine, style) {
47144
47231
  `${style.label("check:")} ${check2.name} ${check2.status}${check2.conclusion ? ` ${styleCheckConclusion(style, check2.conclusion)}` : ""}`
47145
47232
  );
47146
47233
  }
47234
+ if ((summary.runtimeRestarts?.count ?? 0) > 0) {
47235
+ writeLine(
47236
+ `${style.label("runtime restarts:")} ${summary.runtimeRestarts.count}`
47237
+ );
47238
+ for (const restart of summary.runtimeRestarts.recent ?? []) {
47239
+ writeLine(
47240
+ ` ${restart.detectedAt} ${restart.cause}${style.dim(
47241
+ `${restart.sandboxId ? ` sandbox=${restart.sandboxId}` : ""}${restart.detail ? ` ${restart.detail}` : ""}${restart.logTail ? " (log tail captured)" : ""}`
47242
+ )}`
47243
+ );
47244
+ }
47245
+ }
47147
47246
  if (summary.session.error !== null) {
47148
47247
  writeLine(style.error(`error: ${JSON.stringify(summary.session.error)}`));
47149
47248
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.325",
3
+ "version": "0.1.326",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"