@autohq/cli 0.1.269 → 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.
- package/dist/agent-bridge.js +18 -1
- package/dist/index.js +58 -2
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -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.
|
|
23356
|
+
version: "0.1.270",
|
|
23357
23357
|
license: "SEE LICENSE IN README.md",
|
|
23358
23358
|
publishConfig: {
|
|
23359
23359
|
access: "public"
|
|
@@ -27418,6 +27418,18 @@ var RunArtifactRecordSchema = external_exports.object({
|
|
|
27418
27418
|
var RunArtifactsResponseSchema = external_exports.object({
|
|
27419
27419
|
artifacts: external_exports.array(RunArtifactRecordSchema)
|
|
27420
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
|
+
});
|
|
27421
27433
|
var RunTurnSchema = external_exports.object({
|
|
27422
27434
|
startSequence: external_exports.number().int().nonnegative(),
|
|
27423
27435
|
endSequence: external_exports.number().int().nonnegative(),
|
|
@@ -27493,6 +27505,11 @@ var RunSummarySchema = external_exports.object({
|
|
|
27493
27505
|
count: external_exports.number().int().nonnegative(),
|
|
27494
27506
|
types: external_exports.array(external_exports.string())
|
|
27495
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
|
+
}),
|
|
27496
27513
|
/** Derived per-user-message turns, capped to the most recent. */
|
|
27497
27514
|
turns: external_exports.array(RunTurnSchema),
|
|
27498
27515
|
commands: external_exports.object({
|
package/dist/index.js
CHANGED
|
@@ -19101,7 +19101,7 @@ var init_sessions = __esm({
|
|
|
19101
19101
|
});
|
|
19102
19102
|
|
|
19103
19103
|
// ../../packages/schemas/src/session-introspection.ts
|
|
19104
|
-
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;
|
|
19105
19105
|
var init_session_introspection = __esm({
|
|
19106
19106
|
"../../packages/schemas/src/session-introspection.ts"() {
|
|
19107
19107
|
"use strict";
|
|
@@ -19110,6 +19110,7 @@ var init_session_introspection = __esm({
|
|
|
19110
19110
|
init_conversation();
|
|
19111
19111
|
init_ids();
|
|
19112
19112
|
init_primitives();
|
|
19113
|
+
init_session_bindings();
|
|
19113
19114
|
init_sessions();
|
|
19114
19115
|
TruncatedValueSchema = external_exports.object({
|
|
19115
19116
|
truncated: external_exports.literal(true),
|
|
@@ -19214,6 +19215,18 @@ var init_session_introspection = __esm({
|
|
|
19214
19215
|
RunArtifactsResponseSchema = external_exports.object({
|
|
19215
19216
|
artifacts: external_exports.array(RunArtifactRecordSchema)
|
|
19216
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
|
+
});
|
|
19217
19230
|
RunTurnSchema = external_exports.object({
|
|
19218
19231
|
startSequence: external_exports.number().int().nonnegative(),
|
|
19219
19232
|
endSequence: external_exports.number().int().nonnegative(),
|
|
@@ -19289,6 +19302,11 @@ var init_session_introspection = __esm({
|
|
|
19289
19302
|
count: external_exports.number().int().nonnegative(),
|
|
19290
19303
|
types: external_exports.array(external_exports.string())
|
|
19291
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
|
+
}),
|
|
19292
19310
|
/** Derived per-user-message turns, capped to the most recent. */
|
|
19293
19311
|
turns: external_exports.array(RunTurnSchema),
|
|
19294
19312
|
commands: external_exports.object({
|
|
@@ -22306,6 +22324,14 @@ function createApiClient(input) {
|
|
|
22306
22324
|
}
|
|
22307
22325
|
);
|
|
22308
22326
|
},
|
|
22327
|
+
async listRunBindings(sessionId, options = {}) {
|
|
22328
|
+
return requestJson(
|
|
22329
|
+
runApiPath(sessionId, "/bindings"),
|
|
22330
|
+
{
|
|
22331
|
+
apiBaseUrl: options.apiBaseUrl
|
|
22332
|
+
}
|
|
22333
|
+
);
|
|
22334
|
+
},
|
|
22309
22335
|
async listSessionCommands(sessionId, options = {}) {
|
|
22310
22336
|
return requestJson(
|
|
22311
22337
|
runApiPath(sessionId, "/commands"),
|
|
@@ -22926,7 +22952,7 @@ var init_package = __esm({
|
|
|
22926
22952
|
"package.json"() {
|
|
22927
22953
|
package_default = {
|
|
22928
22954
|
name: "@autohq/cli",
|
|
22929
|
-
version: "0.1.
|
|
22955
|
+
version: "0.1.270",
|
|
22930
22956
|
license: "SEE LICENSE IN README.md",
|
|
22931
22957
|
publishConfig: {
|
|
22932
22958
|
access: "public"
|
|
@@ -39654,6 +39680,13 @@ function formatRunShowText(result, writeLine, style) {
|
|
|
39654
39680
|
)}`
|
|
39655
39681
|
);
|
|
39656
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
|
+
}
|
|
39657
39690
|
writeLine(
|
|
39658
39691
|
`${style.label("commands:")} ${summary.commands.total} ${style.dim(
|
|
39659
39692
|
`failed=${summary.commands.failed}`
|
|
@@ -39854,6 +39887,26 @@ function formatArtifactsText(result, writeLine, style) {
|
|
|
39854
39887
|
);
|
|
39855
39888
|
}
|
|
39856
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
|
+
}
|
|
39857
39910
|
async function handleRunsCommands(context, sessionId, options = {}) {
|
|
39858
39911
|
const client = createContextApiClient(context);
|
|
39859
39912
|
const response = await client.listSessionCommands(sessionId, {
|
|
@@ -39991,6 +40044,9 @@ function registerSessionCommands(program, context) {
|
|
|
39991
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) => {
|
|
39992
40045
|
await handleRunsArtifacts(context, sessionId, commandOptions);
|
|
39993
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
|
+
});
|
|
39994
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) => {
|
|
39995
40051
|
await handleRunsCommands(context, sessionId, commandOptions);
|
|
39996
40052
|
});
|