@autohq/cli 0.1.268 → 0.1.270

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.
@@ -23353,7 +23353,7 @@ Object.assign(lookup, {
23353
23353
  // package.json
23354
23354
  var package_default = {
23355
23355
  name: "@autohq/cli",
23356
- version: "0.1.268",
23356
+ version: "0.1.270",
23357
23357
  license: "SEE LICENSE IN README.md",
23358
23358
  publishConfig: {
23359
23359
  access: "public"
@@ -26265,6 +26265,13 @@ function triggerSharedFields(guard) {
26265
26265
  return {
26266
26266
  message: templateField(guard),
26267
26267
  checks: TriggerChecksField,
26268
+ // Catch-all flag: a `fallback` trigger fires only when no normal (non-
26269
+ // fallback) trigger on the same endpoint + eventKey matched its `where`.
26270
+ // It is the one cross-trigger negation the per-payload matcher cannot
26271
+ // express, so it must be an explicit flag rather than overloaded empty
26272
+ // `where` (which already means match-all). See the trigger-router partition
26273
+ // in packages/db/src/trigger-router/triggers.ts.
26274
+ fallback: external_exports.boolean().default(false),
26268
26275
  routing: TriggerRoutingSchema
26269
26276
  };
26270
26277
  }
@@ -27411,6 +27418,18 @@ var RunArtifactRecordSchema = external_exports.object({
27411
27418
  var RunArtifactsResponseSchema = external_exports.object({
27412
27419
  artifacts: external_exports.array(RunArtifactRecordSchema)
27413
27420
  });
27421
+ var RunBindingRecordSchema = external_exports.object({
27422
+ targetType: BindingTargetTypeSchema,
27423
+ externalId: external_exports.string(),
27424
+ source: SessionBindingSourceSchema,
27425
+ status: SessionBindingStatusSchema,
27426
+ payload: JsonValueSchema2.nullable(),
27427
+ createdAt: external_exports.string().datetime(),
27428
+ updatedAt: external_exports.string().datetime()
27429
+ });
27430
+ var RunBindingsResponseSchema = external_exports.object({
27431
+ bindings: external_exports.array(RunBindingRecordSchema)
27432
+ });
27414
27433
  var RunTurnSchema = external_exports.object({
27415
27434
  startSequence: external_exports.number().int().nonnegative(),
27416
27435
  endSequence: external_exports.number().int().nonnegative(),
@@ -27486,6 +27505,11 @@ var RunSummarySchema = external_exports.object({
27486
27505
  count: external_exports.number().int().nonnegative(),
27487
27506
  types: external_exports.array(external_exports.string())
27488
27507
  }),
27508
+ /** Active session bindings, counted with their distinct target types. */
27509
+ bindings: external_exports.object({
27510
+ count: external_exports.number().int().nonnegative(),
27511
+ targetTypes: external_exports.array(BindingTargetTypeSchema)
27512
+ }),
27489
27513
  /** Derived per-user-message turns, capped to the most recent. */
27490
27514
  turns: external_exports.array(RunTurnSchema),
27491
27515
  commands: external_exports.object({
package/dist/index.js CHANGED
@@ -17801,6 +17801,13 @@ function triggerSharedFields(guard) {
17801
17801
  return {
17802
17802
  message: templateField(guard),
17803
17803
  checks: TriggerChecksField,
17804
+ // Catch-all flag: a `fallback` trigger fires only when no normal (non-
17805
+ // fallback) trigger on the same endpoint + eventKey matched its `where`.
17806
+ // It is the one cross-trigger negation the per-payload matcher cannot
17807
+ // express, so it must be an explicit flag rather than overloaded empty
17808
+ // `where` (which already means match-all). See the trigger-router partition
17809
+ // in packages/db/src/trigger-router/triggers.ts.
17810
+ fallback: external_exports.boolean().default(false),
17804
17811
  routing: TriggerRoutingSchema
17805
17812
  };
17806
17813
  }
@@ -19094,7 +19101,7 @@ var init_sessions = __esm({
19094
19101
  });
19095
19102
 
19096
19103
  // ../../packages/schemas/src/session-introspection.ts
19097
- var TruncatedValueSchema, RunConversationSearchSnippetSchema, RunConversationSearchMatchSchema, RunConversationSearchResponseSchema, SessionToolExchangeSchema, SessionToolExchangesResponseSchema, SESSION_TRIGGER_DELIVERY_ACTIONS, SessionTriggerDeliveryActionSchema, SESSION_EVENT_ORIGIN_KINDS, SessionEventOriginKindSchema, SessionTriggerDeliveryRecordSchema, SessionTriggersResponseSchema, RunArtifactRecordSchema, RunArtifactsResponseSchema, RunTurnSchema, SessionToolStatSchema, RunSummarySchema;
19104
+ var TruncatedValueSchema, RunConversationSearchSnippetSchema, RunConversationSearchMatchSchema, RunConversationSearchResponseSchema, SessionToolExchangeSchema, SessionToolExchangesResponseSchema, SESSION_TRIGGER_DELIVERY_ACTIONS, SessionTriggerDeliveryActionSchema, SESSION_EVENT_ORIGIN_KINDS, SessionEventOriginKindSchema, SessionTriggerDeliveryRecordSchema, SessionTriggersResponseSchema, RunArtifactRecordSchema, RunArtifactsResponseSchema, RunBindingRecordSchema, RunBindingsResponseSchema, RunTurnSchema, SessionToolStatSchema, RunSummarySchema;
19098
19105
  var init_session_introspection = __esm({
19099
19106
  "../../packages/schemas/src/session-introspection.ts"() {
19100
19107
  "use strict";
@@ -19103,6 +19110,7 @@ var init_session_introspection = __esm({
19103
19110
  init_conversation();
19104
19111
  init_ids();
19105
19112
  init_primitives();
19113
+ init_session_bindings();
19106
19114
  init_sessions();
19107
19115
  TruncatedValueSchema = external_exports.object({
19108
19116
  truncated: external_exports.literal(true),
@@ -19207,6 +19215,18 @@ var init_session_introspection = __esm({
19207
19215
  RunArtifactsResponseSchema = external_exports.object({
19208
19216
  artifacts: external_exports.array(RunArtifactRecordSchema)
19209
19217
  });
19218
+ RunBindingRecordSchema = external_exports.object({
19219
+ targetType: BindingTargetTypeSchema,
19220
+ externalId: external_exports.string(),
19221
+ source: SessionBindingSourceSchema,
19222
+ status: SessionBindingStatusSchema,
19223
+ payload: JsonValueSchema.nullable(),
19224
+ createdAt: external_exports.string().datetime(),
19225
+ updatedAt: external_exports.string().datetime()
19226
+ });
19227
+ RunBindingsResponseSchema = external_exports.object({
19228
+ bindings: external_exports.array(RunBindingRecordSchema)
19229
+ });
19210
19230
  RunTurnSchema = external_exports.object({
19211
19231
  startSequence: external_exports.number().int().nonnegative(),
19212
19232
  endSequence: external_exports.number().int().nonnegative(),
@@ -19282,6 +19302,11 @@ var init_session_introspection = __esm({
19282
19302
  count: external_exports.number().int().nonnegative(),
19283
19303
  types: external_exports.array(external_exports.string())
19284
19304
  }),
19305
+ /** Active session bindings, counted with their distinct target types. */
19306
+ bindings: external_exports.object({
19307
+ count: external_exports.number().int().nonnegative(),
19308
+ targetTypes: external_exports.array(BindingTargetTypeSchema)
19309
+ }),
19285
19310
  /** Derived per-user-message turns, capped to the most recent. */
19286
19311
  turns: external_exports.array(RunTurnSchema),
19287
19312
  commands: external_exports.object({
@@ -22299,6 +22324,14 @@ function createApiClient(input) {
22299
22324
  }
22300
22325
  );
22301
22326
  },
22327
+ async listRunBindings(sessionId, options = {}) {
22328
+ return requestJson(
22329
+ runApiPath(sessionId, "/bindings"),
22330
+ {
22331
+ apiBaseUrl: options.apiBaseUrl
22332
+ }
22333
+ );
22334
+ },
22302
22335
  async listSessionCommands(sessionId, options = {}) {
22303
22336
  return requestJson(
22304
22337
  runApiPath(sessionId, "/commands"),
@@ -22919,7 +22952,7 @@ var init_package = __esm({
22919
22952
  "package.json"() {
22920
22953
  package_default = {
22921
22954
  name: "@autohq/cli",
22922
- version: "0.1.268",
22955
+ version: "0.1.270",
22923
22956
  license: "SEE LICENSE IN README.md",
22924
22957
  publishConfig: {
22925
22958
  access: "public"
@@ -39647,6 +39680,13 @@ function formatRunShowText(result, writeLine, style) {
39647
39680
  )}`
39648
39681
  );
39649
39682
  }
39683
+ if (summary.bindings.count > 0) {
39684
+ writeLine(
39685
+ `${style.label("bindings:")} ${summary.bindings.count} ${style.dim(
39686
+ `(${summary.bindings.targetTypes.join(", ")})`
39687
+ )}`
39688
+ );
39689
+ }
39650
39690
  writeLine(
39651
39691
  `${style.label("commands:")} ${summary.commands.total} ${style.dim(
39652
39692
  `failed=${summary.commands.failed}`
@@ -39847,6 +39887,26 @@ function formatArtifactsText(result, writeLine, style) {
39847
39887
  );
39848
39888
  }
39849
39889
  }
39890
+ async function handleRunsBindings(context, sessionId, options = {}) {
39891
+ const client = createContextApiClient(context);
39892
+ const response = await client.listRunBindings(sessionId, {
39893
+ apiBaseUrl: apiUrlFromOptions(context, options)
39894
+ });
39895
+ context.io.writeResult({ sessionId, ...response }, formatBindingsText);
39896
+ }
39897
+ function formatBindingsText(result, writeLine, style) {
39898
+ if (result.bindings.length === 0) {
39899
+ writeLine(style.dim("No active bindings."));
39900
+ return;
39901
+ }
39902
+ for (const binding of result.bindings) {
39903
+ writeLine(
39904
+ `${style.label(binding.targetType)} ${style.id(binding.externalId)} ${style.dim(
39905
+ `source=${binding.source} created=${binding.createdAt}`
39906
+ )}`
39907
+ );
39908
+ }
39909
+ }
39850
39910
  async function handleRunsCommands(context, sessionId, options = {}) {
39851
39911
  const client = createContextApiClient(context);
39852
39912
  const response = await client.listSessionCommands(sessionId, {
@@ -39984,6 +40044,9 @@ function registerSessionCommands(program, context) {
39984
40044
  sessions.command("artifacts").description("List artifacts a session currently owns.").argument("<session-id>", "session id").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (sessionId, commandOptions) => {
39985
40045
  await handleRunsArtifacts(context, sessionId, commandOptions);
39986
40046
  });
40047
+ sessions.command("bindings").description("List the active bindings a session owns.").argument("<session-id>", "session id").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (sessionId, commandOptions) => {
40048
+ await handleRunsBindings(context, sessionId, commandOptions);
40049
+ });
39987
40050
  sessions.command("commands").description("List a session's inbound command history.").argument("<session-id>", "session id").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (sessionId, commandOptions) => {
39988
40051
  await handleRunsCommands(context, sessionId, commandOptions);
39989
40052
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.268",
3
+ "version": "0.1.270",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"