@autohq/cli 0.1.547 → 0.1.548
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 +24 -11
- package/dist/index.js +25 -12
- 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.548",
|
|
30874
30874
|
license: "SEE LICENSE IN README.md",
|
|
30875
30875
|
publishConfig: {
|
|
30876
30876
|
access: "public"
|
|
@@ -35837,6 +35837,23 @@ var AgentIdentitySchema = external_exports.object({
|
|
|
35837
35837
|
}).strict().refine((identity) => Object.keys(identity).length > 0, {
|
|
35838
35838
|
message: "Identity requires at least one field"
|
|
35839
35839
|
});
|
|
35840
|
+
var PersistedAgentIdentitySchema = external_exports.preprocess(
|
|
35841
|
+
normalizePersistedAgentIdentity,
|
|
35842
|
+
AgentIdentitySchema.optional()
|
|
35843
|
+
);
|
|
35844
|
+
function normalizePersistedAgentIdentity(value2) {
|
|
35845
|
+
if (typeof value2 !== "object" || value2 === null) return value2;
|
|
35846
|
+
const identity = value2;
|
|
35847
|
+
if (typeof identity.description !== "string") return value2;
|
|
35848
|
+
if (agentIdentityDescriptionLength(identity.description) <= AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH) {
|
|
35849
|
+
return value2;
|
|
35850
|
+
}
|
|
35851
|
+
const clamped = clampAgentIdentityDescription(identity.description);
|
|
35852
|
+
const normalizedIdentity = { ...identity };
|
|
35853
|
+
if (clamped.length > 0) normalizedIdentity.description = clamped;
|
|
35854
|
+
else delete normalizedIdentity.description;
|
|
35855
|
+
return Object.keys(normalizedIdentity).length > 0 ? normalizedIdentity : void 0;
|
|
35856
|
+
}
|
|
35840
35857
|
var BINDING_LIFECYCLE_VALUES = ["manual", "held"];
|
|
35841
35858
|
var BindingLifecycleSpecSchema = external_exports.object({
|
|
35842
35859
|
lifecycle: external_exports.enum(BINDING_LIFECYCLE_VALUES).default("manual"),
|
|
@@ -36069,20 +36086,16 @@ var PersistedAgentResourceSchema = external_exports.preprocess(
|
|
|
36069
36086
|
function normalizePersistedAgentResource(value2) {
|
|
36070
36087
|
if (typeof value2 !== "object" || value2 === null) return value2;
|
|
36071
36088
|
const resource = value2;
|
|
36072
|
-
|
|
36073
|
-
|
|
36074
|
-
|
|
36075
|
-
|
|
36076
|
-
|
|
36077
|
-
const clamped = clampAgentIdentityDescription(identity.description);
|
|
36078
|
-
const normalizedIdentity = { ...identity };
|
|
36079
|
-
if (clamped.length > 0) normalizedIdentity.description = clamped;
|
|
36080
|
-
else delete normalizedIdentity.description;
|
|
36089
|
+
if (resource.spec?.identity === void 0) return value2;
|
|
36090
|
+
const normalizedIdentity = normalizePersistedAgentIdentity(
|
|
36091
|
+
resource.spec.identity
|
|
36092
|
+
);
|
|
36093
|
+
if (normalizedIdentity === resource.spec.identity) return value2;
|
|
36081
36094
|
return {
|
|
36082
36095
|
...resource,
|
|
36083
36096
|
spec: {
|
|
36084
36097
|
...resource.spec,
|
|
36085
|
-
|
|
36098
|
+
identity: normalizedIdentity
|
|
36086
36099
|
}
|
|
36087
36100
|
};
|
|
36088
36101
|
}
|
package/dist/index.js
CHANGED
|
@@ -19716,6 +19716,19 @@ function isAvatarAssetPathShapeValid(asset) {
|
|
|
19716
19716
|
const lower = normalized.toLowerCase();
|
|
19717
19717
|
return AVATAR_ASSET_EXTENSIONS.some((ext) => lower.endsWith(ext));
|
|
19718
19718
|
}
|
|
19719
|
+
function normalizePersistedAgentIdentity(value) {
|
|
19720
|
+
if (typeof value !== "object" || value === null) return value;
|
|
19721
|
+
const identity2 = value;
|
|
19722
|
+
if (typeof identity2.description !== "string") return value;
|
|
19723
|
+
if (agentIdentityDescriptionLength(identity2.description) <= AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH) {
|
|
19724
|
+
return value;
|
|
19725
|
+
}
|
|
19726
|
+
const clamped = clampAgentIdentityDescription(identity2.description);
|
|
19727
|
+
const normalizedIdentity = { ...identity2 };
|
|
19728
|
+
if (clamped.length > 0) normalizedIdentity.description = clamped;
|
|
19729
|
+
else delete normalizedIdentity.description;
|
|
19730
|
+
return Object.keys(normalizedIdentity).length > 0 ? normalizedIdentity : void 0;
|
|
19731
|
+
}
|
|
19719
19732
|
function validateRunnableConfig(spec, context) {
|
|
19720
19733
|
if (!spec.harness) {
|
|
19721
19734
|
context.addIssue({
|
|
@@ -19857,20 +19870,16 @@ function validateTriggerObservedTargetConfig(spec, context) {
|
|
|
19857
19870
|
function normalizePersistedAgentResource(value) {
|
|
19858
19871
|
if (typeof value !== "object" || value === null) return value;
|
|
19859
19872
|
const resource = value;
|
|
19860
|
-
|
|
19861
|
-
|
|
19862
|
-
|
|
19863
|
-
|
|
19864
|
-
|
|
19865
|
-
const clamped = clampAgentIdentityDescription(identity2.description);
|
|
19866
|
-
const normalizedIdentity = { ...identity2 };
|
|
19867
|
-
if (clamped.length > 0) normalizedIdentity.description = clamped;
|
|
19868
|
-
else delete normalizedIdentity.description;
|
|
19873
|
+
if (resource.spec?.identity === void 0) return value;
|
|
19874
|
+
const normalizedIdentity = normalizePersistedAgentIdentity(
|
|
19875
|
+
resource.spec.identity
|
|
19876
|
+
);
|
|
19877
|
+
if (normalizedIdentity === resource.spec.identity) return value;
|
|
19869
19878
|
return {
|
|
19870
19879
|
...resource,
|
|
19871
19880
|
spec: {
|
|
19872
19881
|
...resource.spec,
|
|
19873
|
-
|
|
19882
|
+
identity: normalizedIdentity
|
|
19874
19883
|
}
|
|
19875
19884
|
};
|
|
19876
19885
|
}
|
|
@@ -20006,7 +20015,7 @@ function isChatMessageEvent(trigger) {
|
|
|
20006
20015
|
function hasFilterValue(trigger, path2, expected) {
|
|
20007
20016
|
return trigger.where?.[path2] === expected;
|
|
20008
20017
|
}
|
|
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;
|
|
20018
|
+
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, PersistedAgentIdentitySchema, 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;
|
|
20010
20019
|
var init_agents = __esm({
|
|
20011
20020
|
"../../packages/schemas/src/agents.ts"() {
|
|
20012
20021
|
"use strict";
|
|
@@ -20154,6 +20163,10 @@ var init_agents = __esm({
|
|
|
20154
20163
|
}).strict().refine((identity2) => Object.keys(identity2).length > 0, {
|
|
20155
20164
|
message: "Identity requires at least one field"
|
|
20156
20165
|
});
|
|
20166
|
+
PersistedAgentIdentitySchema = external_exports.preprocess(
|
|
20167
|
+
normalizePersistedAgentIdentity,
|
|
20168
|
+
AgentIdentitySchema.optional()
|
|
20169
|
+
);
|
|
20157
20170
|
BINDING_LIFECYCLE_VALUES = ["manual", "held"];
|
|
20158
20171
|
BindingLifecycleSpecSchema = external_exports.object({
|
|
20159
20172
|
lifecycle: external_exports.enum(BINDING_LIFECYCLE_VALUES).default("manual"),
|
|
@@ -82264,7 +82277,7 @@ var init_package = __esm({
|
|
|
82264
82277
|
"package.json"() {
|
|
82265
82278
|
package_default = {
|
|
82266
82279
|
name: "@autohq/cli",
|
|
82267
|
-
version: "0.1.
|
|
82280
|
+
version: "0.1.548",
|
|
82268
82281
|
license: "SEE LICENSE IN README.md",
|
|
82269
82282
|
publishConfig: {
|
|
82270
82283
|
access: "public"
|