@autohq/cli 0.1.543 → 0.1.545
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 +137 -3
- package/dist/index.js +142 -5
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -30870,7 +30870,7 @@ Object.assign(lookup, {
|
|
|
30870
30870
|
// package.json
|
|
30871
30871
|
var package_default = {
|
|
30872
30872
|
name: "@autohq/cli",
|
|
30873
|
-
version: "0.1.
|
|
30873
|
+
version: "0.1.545",
|
|
30874
30874
|
license: "SEE LICENSE IN README.md",
|
|
30875
30875
|
publishConfig: {
|
|
30876
30876
|
access: "public"
|
|
@@ -35789,6 +35789,20 @@ function agentIdentityDescriptionLength(value2) {
|
|
|
35789
35789
|
}
|
|
35790
35790
|
return length;
|
|
35791
35791
|
}
|
|
35792
|
+
function clampAgentIdentityDescription(value2) {
|
|
35793
|
+
if (agentIdentityDescriptionLength(value2) <= AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH) {
|
|
35794
|
+
return value2;
|
|
35795
|
+
}
|
|
35796
|
+
let clamped = "";
|
|
35797
|
+
let length = 0;
|
|
35798
|
+
for (const char of value2) {
|
|
35799
|
+
const charLength = agentIdentityDescriptionLength(char);
|
|
35800
|
+
if (length + charLength > AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH) break;
|
|
35801
|
+
clamped += char;
|
|
35802
|
+
length += charLength;
|
|
35803
|
+
}
|
|
35804
|
+
return clamped.trimEnd();
|
|
35805
|
+
}
|
|
35792
35806
|
var SHA256_HEX_PATTERN = /^[a-f0-9]{64}$/;
|
|
35793
35807
|
function isAvatarAssetPathShapeValid(asset) {
|
|
35794
35808
|
const normalized = asset.trim().replaceAll("\\", "/");
|
|
@@ -36048,6 +36062,30 @@ var AgentResourceSchema = resourceEnvelopeSchema(
|
|
|
36048
36062
|
status: AgentStatusSchema,
|
|
36049
36063
|
origin: AgentResourceOriginSchema.optional()
|
|
36050
36064
|
});
|
|
36065
|
+
var PersistedAgentResourceSchema = external_exports.preprocess(
|
|
36066
|
+
normalizePersistedAgentResource,
|
|
36067
|
+
AgentResourceSchema
|
|
36068
|
+
);
|
|
36069
|
+
function normalizePersistedAgentResource(value2) {
|
|
36070
|
+
if (typeof value2 !== "object" || value2 === null) return value2;
|
|
36071
|
+
const resource = value2;
|
|
36072
|
+
const identity = resource.spec?.identity;
|
|
36073
|
+
if (typeof identity?.description !== "string") return value2;
|
|
36074
|
+
if (agentIdentityDescriptionLength(identity.description) <= AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH) {
|
|
36075
|
+
return value2;
|
|
36076
|
+
}
|
|
36077
|
+
const clamped = clampAgentIdentityDescription(identity.description);
|
|
36078
|
+
const normalizedIdentity = { ...identity };
|
|
36079
|
+
if (clamped.length > 0) normalizedIdentity.description = clamped;
|
|
36080
|
+
else delete normalizedIdentity.description;
|
|
36081
|
+
return {
|
|
36082
|
+
...resource,
|
|
36083
|
+
spec: {
|
|
36084
|
+
...resource.spec,
|
|
36085
|
+
...Object.keys(normalizedIdentity).length > 0 ? { identity: normalizedIdentity } : { identity: void 0 }
|
|
36086
|
+
}
|
|
36087
|
+
};
|
|
36088
|
+
}
|
|
36051
36089
|
var AgentApplyRequestSchema = resourceApplySchema(AgentApplySpecSchema);
|
|
36052
36090
|
var ApplyTriggerReceiptSchema = external_exports.object({
|
|
36053
36091
|
event: external_exports.string().trim().min(1),
|
|
@@ -37024,6 +37062,7 @@ var SESSION_CHECK_STATUSES = [
|
|
|
37024
37062
|
var SESSION_CHECK_CONCLUSIONS = [
|
|
37025
37063
|
"success",
|
|
37026
37064
|
"failure",
|
|
37065
|
+
"action_required",
|
|
37027
37066
|
"skipped"
|
|
37028
37067
|
];
|
|
37029
37068
|
var SESSION_CHECK_TIMEOUT_PHASES = ["begin", "complete"];
|
|
@@ -37112,7 +37151,9 @@ var SessionRecordSchema = external_exports.object({
|
|
|
37112
37151
|
// Optional for replay/read compatibility with session.upsert payloads that
|
|
37113
37152
|
// predate the persisted snapshot column. Fresh DB reads always populate it.
|
|
37114
37153
|
spendCap: SessionSpendCapSnapshotSchema.optional(),
|
|
37115
|
-
|
|
37154
|
+
// Persisted-read variant: stored snapshots predate later-tightened
|
|
37155
|
+
// authoring refinements and must never fail a whole-session read.
|
|
37156
|
+
snapshot: PersistedAgentResourceSchema,
|
|
37116
37157
|
environmentSnapshot: EnvironmentResourceSchema,
|
|
37117
37158
|
toolSnapshots: external_exports.array(
|
|
37118
37159
|
external_exports.object({
|
|
@@ -37732,13 +37773,106 @@ var ProviderResourceOwnershipUpdateResponseSchema = external_exports.object({
|
|
|
37732
37773
|
|
|
37733
37774
|
// ../../packages/schemas/src/project-config.ts
|
|
37734
37775
|
var RESOURCE_KIND_CONFIG = "config";
|
|
37735
|
-
var
|
|
37776
|
+
var DashboardTextSchema = external_exports.string().trim().min(1).max(240);
|
|
37777
|
+
var DashboardViewKindSchema = external_exports.string().trim().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
37778
|
+
var DashboardViewSpecSchema = external_exports.object({
|
|
37779
|
+
kind: DashboardViewKindSchema,
|
|
37780
|
+
config: external_exports.record(external_exports.string(), JsonValueSchema2).optional()
|
|
37781
|
+
}).strict();
|
|
37782
|
+
var ProjectDashboardSpecSchema = external_exports.object({
|
|
37783
|
+
name: external_exports.string().trim().min(1).max(80).optional(),
|
|
37784
|
+
tagline: DashboardTextSchema.optional(),
|
|
37785
|
+
backdrop: DashboardViewKindSchema.optional(),
|
|
37786
|
+
pin: external_exports.object({
|
|
37787
|
+
agent: ResourceNameSchema
|
|
37788
|
+
}).strict().optional(),
|
|
37789
|
+
views: external_exports.array(DashboardViewSpecSchema).max(12).optional()
|
|
37790
|
+
}).strict();
|
|
37791
|
+
var ProjectConfigSpecSchema = external_exports.object({
|
|
37792
|
+
dashboard: ProjectDashboardSpecSchema.optional()
|
|
37793
|
+
}).strict();
|
|
37736
37794
|
var ProjectConfigResourceSchema = resourceEnvelopeSchema(
|
|
37737
37795
|
ProjectConfigSpecSchema
|
|
37738
37796
|
);
|
|
37739
37797
|
var ProjectConfigApplyRequestSchema = resourceApplySchema(
|
|
37740
37798
|
ProjectConfigSpecSchema
|
|
37741
37799
|
);
|
|
37800
|
+
var ProjectHomeAgentSchema = external_exports.object({
|
|
37801
|
+
uid: external_exports.string().trim().min(1),
|
|
37802
|
+
name: ResourceNameSchema,
|
|
37803
|
+
displayName: external_exports.string().trim().min(1),
|
|
37804
|
+
description: external_exports.string(),
|
|
37805
|
+
handle: external_exports.string().trim().min(1),
|
|
37806
|
+
initials: external_exports.string().trim().min(1),
|
|
37807
|
+
avatarUrl: external_exports.string().trim().min(1).nullable(),
|
|
37808
|
+
harness: external_exports.string().trim().min(1),
|
|
37809
|
+
model: external_exports.string().trim().min(1),
|
|
37810
|
+
environment: external_exports.string().trim().min(1),
|
|
37811
|
+
concurrency: external_exports.number().int().positive().nullable(),
|
|
37812
|
+
runCount: external_exports.number().int().nonnegative(),
|
|
37813
|
+
lastActivityAt: external_exports.string().datetime().nullable(),
|
|
37814
|
+
isDefault: external_exports.boolean(),
|
|
37815
|
+
isPinned: external_exports.boolean()
|
|
37816
|
+
}).strict();
|
|
37817
|
+
var ProjectHomeSessionSchema = external_exports.object({
|
|
37818
|
+
id: SessionIdSchema2,
|
|
37819
|
+
agentName: ResourceNameSchema,
|
|
37820
|
+
agentDisplayName: external_exports.string().trim().min(1),
|
|
37821
|
+
title: external_exports.string().trim().min(1),
|
|
37822
|
+
summary: external_exports.string(),
|
|
37823
|
+
status: SessionStatusSchema,
|
|
37824
|
+
lastActivityAt: external_exports.string().datetime()
|
|
37825
|
+
}).strict();
|
|
37826
|
+
var ProjectHomeResourceHealthSchema = external_exports.object({
|
|
37827
|
+
total: external_exports.number().int().nonnegative(),
|
|
37828
|
+
healthy: external_exports.number().int().nonnegative(),
|
|
37829
|
+
pending: external_exports.number().int().nonnegative(),
|
|
37830
|
+
failed: external_exports.number().int().nonnegative(),
|
|
37831
|
+
lastAppliedAt: external_exports.string().datetime().nullable()
|
|
37832
|
+
}).strict();
|
|
37833
|
+
var ProjectHomeReadyViewSchema = external_exports.object({
|
|
37834
|
+
kind: DashboardViewKindSchema,
|
|
37835
|
+
status: external_exports.literal("ready"),
|
|
37836
|
+
config: external_exports.record(external_exports.string(), JsonValueSchema2)
|
|
37837
|
+
}).strict();
|
|
37838
|
+
var ProjectHomeUnsupportedViewSchema = external_exports.object({
|
|
37839
|
+
kind: DashboardViewKindSchema,
|
|
37840
|
+
status: external_exports.literal("unsupported"),
|
|
37841
|
+
message: external_exports.string().trim().min(1)
|
|
37842
|
+
}).strict();
|
|
37843
|
+
var ProjectHomeInvalidViewSchema = external_exports.object({
|
|
37844
|
+
kind: DashboardViewKindSchema,
|
|
37845
|
+
status: external_exports.literal("invalid"),
|
|
37846
|
+
message: external_exports.string().trim().min(1)
|
|
37847
|
+
}).strict();
|
|
37848
|
+
var ProjectHomeReadModelSchema = external_exports.object({
|
|
37849
|
+
dashboard: external_exports.object({
|
|
37850
|
+
name: external_exports.string().trim().min(1),
|
|
37851
|
+
tagline: external_exports.string().trim().min(1).nullable(),
|
|
37852
|
+
backdrop: DashboardViewKindSchema.nullable(),
|
|
37853
|
+
pinnedAgentName: ResourceNameSchema.nullable()
|
|
37854
|
+
}).strict(),
|
|
37855
|
+
agents: external_exports.array(ProjectHomeAgentSchema),
|
|
37856
|
+
stats: external_exports.object({
|
|
37857
|
+
running: external_exports.number().int().nonnegative(),
|
|
37858
|
+
awaiting: external_exports.number().int().nonnegative(),
|
|
37859
|
+
completed24h: external_exports.number().int().nonnegative(),
|
|
37860
|
+
spend24hUsd: external_exports.number().nonnegative()
|
|
37861
|
+
}).strict(),
|
|
37862
|
+
sessions: external_exports.array(ProjectHomeSessionSchema).max(25),
|
|
37863
|
+
pinnedSession: external_exports.object({
|
|
37864
|
+
session: SessionRecordSchema,
|
|
37865
|
+
messages: external_exports.array(SessionUiMessageRecordSchema)
|
|
37866
|
+
}).strict().nullable().default(null),
|
|
37867
|
+
resources: ProjectHomeResourceHealthSchema,
|
|
37868
|
+
views: external_exports.array(
|
|
37869
|
+
external_exports.union([
|
|
37870
|
+
ProjectHomeReadyViewSchema,
|
|
37871
|
+
ProjectHomeUnsupportedViewSchema,
|
|
37872
|
+
ProjectHomeInvalidViewSchema
|
|
37873
|
+
])
|
|
37874
|
+
)
|
|
37875
|
+
}).strict();
|
|
37742
37876
|
var PROJECT_DEFAULT_AGENT_SOURCES = ["built_in"];
|
|
37743
37877
|
var ProjectDefaultAgentSourceSchema = external_exports.enum(
|
|
37744
37878
|
PROJECT_DEFAULT_AGENT_SOURCES
|
package/dist/index.js
CHANGED
|
@@ -19692,6 +19692,20 @@ function agentIdentityDescriptionLength(value) {
|
|
|
19692
19692
|
}
|
|
19693
19693
|
return length;
|
|
19694
19694
|
}
|
|
19695
|
+
function clampAgentIdentityDescription(value) {
|
|
19696
|
+
if (agentIdentityDescriptionLength(value) <= AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH) {
|
|
19697
|
+
return value;
|
|
19698
|
+
}
|
|
19699
|
+
let clamped = "";
|
|
19700
|
+
let length = 0;
|
|
19701
|
+
for (const char of value) {
|
|
19702
|
+
const charLength = agentIdentityDescriptionLength(char);
|
|
19703
|
+
if (length + charLength > AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH) break;
|
|
19704
|
+
clamped += char;
|
|
19705
|
+
length += charLength;
|
|
19706
|
+
}
|
|
19707
|
+
return clamped.trimEnd();
|
|
19708
|
+
}
|
|
19695
19709
|
function isAvatarAssetPathShapeValid(asset) {
|
|
19696
19710
|
const normalized = asset.trim().replaceAll("\\", "/");
|
|
19697
19711
|
if (normalized.length === 0) return false;
|
|
@@ -19840,6 +19854,26 @@ function validateTriggerObservedTargetConfig(spec, context) {
|
|
|
19840
19854
|
}
|
|
19841
19855
|
}
|
|
19842
19856
|
}
|
|
19857
|
+
function normalizePersistedAgentResource(value) {
|
|
19858
|
+
if (typeof value !== "object" || value === null) return value;
|
|
19859
|
+
const resource = value;
|
|
19860
|
+
const identity2 = resource.spec?.identity;
|
|
19861
|
+
if (typeof identity2?.description !== "string") return value;
|
|
19862
|
+
if (agentIdentityDescriptionLength(identity2.description) <= AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH) {
|
|
19863
|
+
return value;
|
|
19864
|
+
}
|
|
19865
|
+
const clamped = clampAgentIdentityDescription(identity2.description);
|
|
19866
|
+
const normalizedIdentity = { ...identity2 };
|
|
19867
|
+
if (clamped.length > 0) normalizedIdentity.description = clamped;
|
|
19868
|
+
else delete normalizedIdentity.description;
|
|
19869
|
+
return {
|
|
19870
|
+
...resource,
|
|
19871
|
+
spec: {
|
|
19872
|
+
...resource.spec,
|
|
19873
|
+
...Object.keys(normalizedIdentity).length > 0 ? { identity: normalizedIdentity } : { identity: void 0 }
|
|
19874
|
+
}
|
|
19875
|
+
};
|
|
19876
|
+
}
|
|
19843
19877
|
function validateAttachedUserPrompt(trigger, context, guard) {
|
|
19844
19878
|
if (guard === "authoring" && trigger.attachedUserPrompt !== void 0 && trigger.routing.kind !== "spawn") {
|
|
19845
19879
|
context.addIssue({
|
|
@@ -19972,7 +20006,7 @@ function isChatMessageEvent(trigger) {
|
|
|
19972
20006
|
function hasFilterValue(trigger, path2, expected) {
|
|
19973
20007
|
return trigger.where?.[path2] === expected;
|
|
19974
20008
|
}
|
|
19975
|
-
var RESOURCE_KIND_AGENT, AGENT_HARNESSES, AgentHarnessSchema, TriggerCheckTimeoutSchema, AgentArchiveAfterInactiveSchema, AgentSessionPolicySchema, AgentConcurrencySchema, AgentReplacePolicySchema, AgentManagesSchema, TriggerEventSchema, TriggerEventsSchema, PAYLOAD_PREFIXED_TEMPLATE_TOKEN, TriggerChecksField, TriggerEventSourceFields, TriggerSchema, ApplyTriggerSchema, HeartbeatTriggerSchema, ApplyHeartbeatTriggerSchema, TriggerDefinitionSchema, ApplyTriggerDefinitionSchema, TriggersSchema, ApplyTriggersSchema, AVATAR_ASSET_EXTENSIONS, MAX_AVATAR_ASSET_BYTES, MIN_AVATAR_ASSET_DIMENSION_PX, MAX_AVATAR_ASSET_DIMENSION_PX, PNG_SIGNATURE, AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH, SHA256_HEX_PATTERN, AgentIdentitySchema, BINDING_LIFECYCLE_VALUES, BindingLifecycleSpecSchema, AgentBindingsSchema, AgentSpecFieldsSchema, AgentSpecSchema, AgentApplySpecFieldsSchema, AgentApplySpecSchema, AgentStatusSchema, AgentResourceOriginSchema, AgentResourceSchema, AgentApplyRequestSchema, ApplyTriggerReceiptSchema, AgentApplyResponseSchema, AGENT_TELEGRAM_IDENTITY_STATUSES, AgentTelegramIdentityStatusSchema, AgentPresenceIdentitySchema, AgentPresenceResponseSchema, AgentPresenceConnectRequestSchema, AgentPresenceConnectPendingSchema, AgentPresenceConnectResponseSchema, AgentPresenceIconRequestSchema, AgentPresenceIconResponseSchema, AgentPresenceCompleteResponseSchema;
|
|
20009
|
+
var RESOURCE_KIND_AGENT, AGENT_HARNESSES, AgentHarnessSchema, TriggerCheckTimeoutSchema, AgentArchiveAfterInactiveSchema, AgentSessionPolicySchema, AgentConcurrencySchema, AgentReplacePolicySchema, AgentManagesSchema, TriggerEventSchema, TriggerEventsSchema, PAYLOAD_PREFIXED_TEMPLATE_TOKEN, TriggerChecksField, TriggerEventSourceFields, TriggerSchema, ApplyTriggerSchema, HeartbeatTriggerSchema, ApplyHeartbeatTriggerSchema, TriggerDefinitionSchema, ApplyTriggerDefinitionSchema, TriggersSchema, ApplyTriggersSchema, AVATAR_ASSET_EXTENSIONS, MAX_AVATAR_ASSET_BYTES, MIN_AVATAR_ASSET_DIMENSION_PX, MAX_AVATAR_ASSET_DIMENSION_PX, PNG_SIGNATURE, AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH, SHA256_HEX_PATTERN, AgentIdentitySchema, BINDING_LIFECYCLE_VALUES, BindingLifecycleSpecSchema, AgentBindingsSchema, AgentSpecFieldsSchema, AgentSpecSchema, AgentApplySpecFieldsSchema, AgentApplySpecSchema, AgentStatusSchema, AgentResourceOriginSchema, AgentResourceSchema, PersistedAgentResourceSchema, AgentApplyRequestSchema, ApplyTriggerReceiptSchema, AgentApplyResponseSchema, AGENT_TELEGRAM_IDENTITY_STATUSES, AgentTelegramIdentityStatusSchema, AgentPresenceIdentitySchema, AgentPresenceResponseSchema, AgentPresenceConnectRequestSchema, AgentPresenceConnectPendingSchema, AgentPresenceConnectResponseSchema, AgentPresenceIconRequestSchema, AgentPresenceIconResponseSchema, AgentPresenceCompleteResponseSchema;
|
|
19976
20010
|
var init_agents = __esm({
|
|
19977
20011
|
"../../packages/schemas/src/agents.ts"() {
|
|
19978
20012
|
"use strict";
|
|
@@ -20207,6 +20241,10 @@ var init_agents = __esm({
|
|
|
20207
20241
|
status: AgentStatusSchema,
|
|
20208
20242
|
origin: AgentResourceOriginSchema.optional()
|
|
20209
20243
|
});
|
|
20244
|
+
PersistedAgentResourceSchema = external_exports.preprocess(
|
|
20245
|
+
normalizePersistedAgentResource,
|
|
20246
|
+
AgentResourceSchema
|
|
20247
|
+
);
|
|
20210
20248
|
AgentApplyRequestSchema = resourceApplySchema(AgentApplySpecSchema);
|
|
20211
20249
|
ApplyTriggerReceiptSchema = external_exports.object({
|
|
20212
20250
|
event: external_exports.string().trim().min(1),
|
|
@@ -21152,6 +21190,7 @@ var init_sessions = __esm({
|
|
|
21152
21190
|
SESSION_CHECK_CONCLUSIONS = [
|
|
21153
21191
|
"success",
|
|
21154
21192
|
"failure",
|
|
21193
|
+
"action_required",
|
|
21155
21194
|
"skipped"
|
|
21156
21195
|
];
|
|
21157
21196
|
SESSION_CHECK_TIMEOUT_PHASES = ["begin", "complete"];
|
|
@@ -21240,7 +21279,9 @@ var init_sessions = __esm({
|
|
|
21240
21279
|
// Optional for replay/read compatibility with session.upsert payloads that
|
|
21241
21280
|
// predate the persisted snapshot column. Fresh DB reads always populate it.
|
|
21242
21281
|
spendCap: SessionSpendCapSnapshotSchema.optional(),
|
|
21243
|
-
|
|
21282
|
+
// Persisted-read variant: stored snapshots predate later-tightened
|
|
21283
|
+
// authoring refinements and must never fail a whole-session read.
|
|
21284
|
+
snapshot: PersistedAgentResourceSchema,
|
|
21244
21285
|
environmentSnapshot: EnvironmentResourceSchema,
|
|
21245
21286
|
toolSnapshots: external_exports.array(
|
|
21246
21287
|
external_exports.object({
|
|
@@ -21938,24 +21979,120 @@ var init_provider_resource_ownership = __esm({
|
|
|
21938
21979
|
});
|
|
21939
21980
|
|
|
21940
21981
|
// ../../packages/schemas/src/project-config.ts
|
|
21941
|
-
var RESOURCE_KIND_CONFIG, PROJECT_CONFIG_RESOURCE_NAME, PROJECT_CONFIG_FILE_NAME, ProjectConfigSpecSchema, ProjectConfigResourceSchema, ProjectConfigApplyRequestSchema, PROJECT_DEFAULT_AGENT_SOURCES, ProjectDefaultAgentSourceSchema, ProjectDefaultAgentSchema, UpdateProjectSettingsRequestSchema;
|
|
21982
|
+
var RESOURCE_KIND_CONFIG, PROJECT_CONFIG_RESOURCE_NAME, PROJECT_CONFIG_FILE_NAME, DashboardTextSchema, DashboardViewKindSchema, DashboardViewSpecSchema, ProjectDashboardSpecSchema, ProjectConfigSpecSchema, ProjectConfigResourceSchema, ProjectConfigApplyRequestSchema, ProjectHomeAgentSchema, ProjectHomeSessionSchema, ProjectHomeResourceHealthSchema, ProjectHomeReadyViewSchema, ProjectHomeUnsupportedViewSchema, ProjectHomeInvalidViewSchema, ProjectHomeReadModelSchema, PROJECT_DEFAULT_AGENT_SOURCES, ProjectDefaultAgentSourceSchema, ProjectDefaultAgentSchema, UpdateProjectSettingsRequestSchema;
|
|
21942
21983
|
var init_project_config = __esm({
|
|
21943
21984
|
"../../packages/schemas/src/project-config.ts"() {
|
|
21944
21985
|
"use strict";
|
|
21945
21986
|
init_zod();
|
|
21946
21987
|
init_agents();
|
|
21988
|
+
init_ids();
|
|
21989
|
+
init_primitives();
|
|
21947
21990
|
init_resources();
|
|
21991
|
+
init_sessions();
|
|
21948
21992
|
init_url_slugs();
|
|
21949
21993
|
RESOURCE_KIND_CONFIG = "config";
|
|
21950
21994
|
PROJECT_CONFIG_RESOURCE_NAME = "project";
|
|
21951
21995
|
PROJECT_CONFIG_FILE_NAME = "config.yaml";
|
|
21952
|
-
|
|
21996
|
+
DashboardTextSchema = external_exports.string().trim().min(1).max(240);
|
|
21997
|
+
DashboardViewKindSchema = external_exports.string().trim().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
21998
|
+
DashboardViewSpecSchema = external_exports.object({
|
|
21999
|
+
kind: DashboardViewKindSchema,
|
|
22000
|
+
config: external_exports.record(external_exports.string(), JsonValueSchema).optional()
|
|
22001
|
+
}).strict();
|
|
22002
|
+
ProjectDashboardSpecSchema = external_exports.object({
|
|
22003
|
+
name: external_exports.string().trim().min(1).max(80).optional(),
|
|
22004
|
+
tagline: DashboardTextSchema.optional(),
|
|
22005
|
+
backdrop: DashboardViewKindSchema.optional(),
|
|
22006
|
+
pin: external_exports.object({
|
|
22007
|
+
agent: ResourceNameSchema
|
|
22008
|
+
}).strict().optional(),
|
|
22009
|
+
views: external_exports.array(DashboardViewSpecSchema).max(12).optional()
|
|
22010
|
+
}).strict();
|
|
22011
|
+
ProjectConfigSpecSchema = external_exports.object({
|
|
22012
|
+
dashboard: ProjectDashboardSpecSchema.optional()
|
|
22013
|
+
}).strict();
|
|
21953
22014
|
ProjectConfigResourceSchema = resourceEnvelopeSchema(
|
|
21954
22015
|
ProjectConfigSpecSchema
|
|
21955
22016
|
);
|
|
21956
22017
|
ProjectConfigApplyRequestSchema = resourceApplySchema(
|
|
21957
22018
|
ProjectConfigSpecSchema
|
|
21958
22019
|
);
|
|
22020
|
+
ProjectHomeAgentSchema = external_exports.object({
|
|
22021
|
+
uid: external_exports.string().trim().min(1),
|
|
22022
|
+
name: ResourceNameSchema,
|
|
22023
|
+
displayName: external_exports.string().trim().min(1),
|
|
22024
|
+
description: external_exports.string(),
|
|
22025
|
+
handle: external_exports.string().trim().min(1),
|
|
22026
|
+
initials: external_exports.string().trim().min(1),
|
|
22027
|
+
avatarUrl: external_exports.string().trim().min(1).nullable(),
|
|
22028
|
+
harness: external_exports.string().trim().min(1),
|
|
22029
|
+
model: external_exports.string().trim().min(1),
|
|
22030
|
+
environment: external_exports.string().trim().min(1),
|
|
22031
|
+
concurrency: external_exports.number().int().positive().nullable(),
|
|
22032
|
+
runCount: external_exports.number().int().nonnegative(),
|
|
22033
|
+
lastActivityAt: external_exports.string().datetime().nullable(),
|
|
22034
|
+
isDefault: external_exports.boolean(),
|
|
22035
|
+
isPinned: external_exports.boolean()
|
|
22036
|
+
}).strict();
|
|
22037
|
+
ProjectHomeSessionSchema = external_exports.object({
|
|
22038
|
+
id: SessionIdSchema,
|
|
22039
|
+
agentName: ResourceNameSchema,
|
|
22040
|
+
agentDisplayName: external_exports.string().trim().min(1),
|
|
22041
|
+
title: external_exports.string().trim().min(1),
|
|
22042
|
+
summary: external_exports.string(),
|
|
22043
|
+
status: SessionStatusSchema,
|
|
22044
|
+
lastActivityAt: external_exports.string().datetime()
|
|
22045
|
+
}).strict();
|
|
22046
|
+
ProjectHomeResourceHealthSchema = external_exports.object({
|
|
22047
|
+
total: external_exports.number().int().nonnegative(),
|
|
22048
|
+
healthy: external_exports.number().int().nonnegative(),
|
|
22049
|
+
pending: external_exports.number().int().nonnegative(),
|
|
22050
|
+
failed: external_exports.number().int().nonnegative(),
|
|
22051
|
+
lastAppliedAt: external_exports.string().datetime().nullable()
|
|
22052
|
+
}).strict();
|
|
22053
|
+
ProjectHomeReadyViewSchema = external_exports.object({
|
|
22054
|
+
kind: DashboardViewKindSchema,
|
|
22055
|
+
status: external_exports.literal("ready"),
|
|
22056
|
+
config: external_exports.record(external_exports.string(), JsonValueSchema)
|
|
22057
|
+
}).strict();
|
|
22058
|
+
ProjectHomeUnsupportedViewSchema = external_exports.object({
|
|
22059
|
+
kind: DashboardViewKindSchema,
|
|
22060
|
+
status: external_exports.literal("unsupported"),
|
|
22061
|
+
message: external_exports.string().trim().min(1)
|
|
22062
|
+
}).strict();
|
|
22063
|
+
ProjectHomeInvalidViewSchema = external_exports.object({
|
|
22064
|
+
kind: DashboardViewKindSchema,
|
|
22065
|
+
status: external_exports.literal("invalid"),
|
|
22066
|
+
message: external_exports.string().trim().min(1)
|
|
22067
|
+
}).strict();
|
|
22068
|
+
ProjectHomeReadModelSchema = external_exports.object({
|
|
22069
|
+
dashboard: external_exports.object({
|
|
22070
|
+
name: external_exports.string().trim().min(1),
|
|
22071
|
+
tagline: external_exports.string().trim().min(1).nullable(),
|
|
22072
|
+
backdrop: DashboardViewKindSchema.nullable(),
|
|
22073
|
+
pinnedAgentName: ResourceNameSchema.nullable()
|
|
22074
|
+
}).strict(),
|
|
22075
|
+
agents: external_exports.array(ProjectHomeAgentSchema),
|
|
22076
|
+
stats: external_exports.object({
|
|
22077
|
+
running: external_exports.number().int().nonnegative(),
|
|
22078
|
+
awaiting: external_exports.number().int().nonnegative(),
|
|
22079
|
+
completed24h: external_exports.number().int().nonnegative(),
|
|
22080
|
+
spend24hUsd: external_exports.number().nonnegative()
|
|
22081
|
+
}).strict(),
|
|
22082
|
+
sessions: external_exports.array(ProjectHomeSessionSchema).max(25),
|
|
22083
|
+
pinnedSession: external_exports.object({
|
|
22084
|
+
session: SessionRecordSchema,
|
|
22085
|
+
messages: external_exports.array(SessionUiMessageRecordSchema)
|
|
22086
|
+
}).strict().nullable().default(null),
|
|
22087
|
+
resources: ProjectHomeResourceHealthSchema,
|
|
22088
|
+
views: external_exports.array(
|
|
22089
|
+
external_exports.union([
|
|
22090
|
+
ProjectHomeReadyViewSchema,
|
|
22091
|
+
ProjectHomeUnsupportedViewSchema,
|
|
22092
|
+
ProjectHomeInvalidViewSchema
|
|
22093
|
+
])
|
|
22094
|
+
)
|
|
22095
|
+
}).strict();
|
|
21959
22096
|
PROJECT_DEFAULT_AGENT_SOURCES = ["built_in"];
|
|
21960
22097
|
ProjectDefaultAgentSourceSchema = external_exports.enum(
|
|
21961
22098
|
PROJECT_DEFAULT_AGENT_SOURCES
|
|
@@ -81661,7 +81798,7 @@ var init_package = __esm({
|
|
|
81661
81798
|
"package.json"() {
|
|
81662
81799
|
package_default = {
|
|
81663
81800
|
name: "@autohq/cli",
|
|
81664
|
-
version: "0.1.
|
|
81801
|
+
version: "0.1.545",
|
|
81665
81802
|
license: "SEE LICENSE IN README.md",
|
|
81666
81803
|
publishConfig: {
|
|
81667
81804
|
access: "public"
|