@kmmao/happy-wire 0.12.0 → 0.13.0
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/index.cjs +0 -174
- package/dist/index.d.cts +44 -422
- package/dist/index.d.mts +44 -422
- package/dist/index.mjs +1 -147
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1040,152 +1040,6 @@ const terminalExitPayloadSchema = z__namespace.object({
|
|
|
1040
1040
|
exitCode: z__namespace.number()
|
|
1041
1041
|
});
|
|
1042
1042
|
|
|
1043
|
-
const SUGGESTION_TYPES = ["suggested_goal", "suggested_task", "suggested_skill", "suggested_decision"];
|
|
1044
|
-
const SUGGESTION_STATUSES = ["open", "processing", "accepted", "suspended", "dismissed", "expired"];
|
|
1045
|
-
const SUGGESTION_BUCKETS = ["next_step", "needs_decision", "needs_human_input"];
|
|
1046
|
-
const SUGGESTION_ACCEPT_SOURCES = ["human", "system_auto"];
|
|
1047
|
-
const SUPERVISOR_MODES = ["disabled", "suggest", "semi-auto", "auto"];
|
|
1048
|
-
const WorldAutonomyPolicySchema = z.z.object({
|
|
1049
|
-
level: z.z.enum(SUPERVISOR_MODES),
|
|
1050
|
-
maxAutoAcceptsPerDay: z.z.number().int().positive().nullable(),
|
|
1051
|
-
maxConcurrentAutoTasks: z.z.number().int().positive().nullable(),
|
|
1052
|
-
autoAcceptTypes: z.z.array(z.z.string())
|
|
1053
|
-
});
|
|
1054
|
-
const SUGGESTION_ACCEPT_AUDIT_RULES = [
|
|
1055
|
-
"safe_suggested_task_auto_accept",
|
|
1056
|
-
"retryable_failed_task_auto_accept",
|
|
1057
|
-
"blocked_goal_supplement_auto_accept",
|
|
1058
|
-
"precedent_auto_resolve",
|
|
1059
|
-
"goal_replan_auto_accept"
|
|
1060
|
-
];
|
|
1061
|
-
const SuggestionAcceptAuditSchema = z.z.object({
|
|
1062
|
-
rule: z.z.enum(SUGGESTION_ACCEPT_AUDIT_RULES),
|
|
1063
|
-
checks: z.z.array(z.z.string()).min(1)
|
|
1064
|
-
});
|
|
1065
|
-
const SUGGESTION_AUTO_ACCEPT_STATUSES = ["skipped", "failed"];
|
|
1066
|
-
const SUGGESTION_AUTO_ACCEPT_REASON_CODES = [
|
|
1067
|
-
"quota_exhausted",
|
|
1068
|
-
"already_acted",
|
|
1069
|
-
"accept_failed",
|
|
1070
|
-
"concurrency_exceeded",
|
|
1071
|
-
"mode_disabled"
|
|
1072
|
-
];
|
|
1073
|
-
const SUGGESTION_AUTO_ACCEPT_FAILURE_DETAILS = [
|
|
1074
|
-
"dispatch_failed",
|
|
1075
|
-
"payload_invalid",
|
|
1076
|
-
"auto_accept_failed"
|
|
1077
|
-
];
|
|
1078
|
-
const EVIDENCE_KINDS = ["goal", "task", "decision", "message", "narrative"];
|
|
1079
|
-
const SuggestionEvidenceSchema = z.z.object({
|
|
1080
|
-
kind: z.z.enum(EVIDENCE_KINDS),
|
|
1081
|
-
id: z.z.string().optional(),
|
|
1082
|
-
label: z.z.string()
|
|
1083
|
-
});
|
|
1084
|
-
const SuggestionGoalPayloadSchema = z.z.object({
|
|
1085
|
-
title: z.z.string(),
|
|
1086
|
-
detail: z.z.string().optional(),
|
|
1087
|
-
priority: z.z.string().optional()
|
|
1088
|
-
});
|
|
1089
|
-
const SuggestionTaskPayloadSchema = z.z.object({
|
|
1090
|
-
title: z.z.string(),
|
|
1091
|
-
prompt: z.z.string(),
|
|
1092
|
-
roleType: z.z.string().optional(),
|
|
1093
|
-
goalId: z.z.string().optional(),
|
|
1094
|
-
priority: z.z.string().optional()
|
|
1095
|
-
});
|
|
1096
|
-
const SuggestionSkillPayloadSchema = z.z.object({
|
|
1097
|
-
title: z.z.string(),
|
|
1098
|
-
content: z.z.string(),
|
|
1099
|
-
sourceTaskId: z.z.string().optional()
|
|
1100
|
-
});
|
|
1101
|
-
const SuggestionDecisionPayloadSchema = z.z.object({
|
|
1102
|
-
question: z.z.string(),
|
|
1103
|
-
context: z.z.string().optional(),
|
|
1104
|
-
goalId: z.z.string().optional(),
|
|
1105
|
-
existingDecisionId: z.z.string().optional(),
|
|
1106
|
-
options: z.z.array(z.z.object({
|
|
1107
|
-
id: z.z.string(),
|
|
1108
|
-
description: z.z.string(),
|
|
1109
|
-
pros: z.z.string().optional(),
|
|
1110
|
-
cons: z.z.string().optional()
|
|
1111
|
-
})).min(2).max(10),
|
|
1112
|
-
precedentKey: z.z.string().optional()
|
|
1113
|
-
});
|
|
1114
|
-
function getSuggestionPayloadSchema(type) {
|
|
1115
|
-
if (type === "suggested_goal") {
|
|
1116
|
-
return z.z.object({ goal: SuggestionGoalPayloadSchema });
|
|
1117
|
-
}
|
|
1118
|
-
if (type === "suggested_task") {
|
|
1119
|
-
return z.z.object({ task: SuggestionTaskPayloadSchema });
|
|
1120
|
-
}
|
|
1121
|
-
if (type === "suggested_skill") {
|
|
1122
|
-
return z.z.object({ skill: SuggestionSkillPayloadSchema });
|
|
1123
|
-
}
|
|
1124
|
-
return z.z.object({ decision: SuggestionDecisionPayloadSchema });
|
|
1125
|
-
}
|
|
1126
|
-
const SuggestionPayloadSchema = z.z.union([
|
|
1127
|
-
z.z.object({ goal: SuggestionGoalPayloadSchema }),
|
|
1128
|
-
z.z.object({ task: SuggestionTaskPayloadSchema }),
|
|
1129
|
-
z.z.object({ skill: SuggestionSkillPayloadSchema }),
|
|
1130
|
-
z.z.object({ decision: SuggestionDecisionPayloadSchema })
|
|
1131
|
-
]);
|
|
1132
|
-
const AcceptBodySchema = z.z.object({
|
|
1133
|
-
machineId: z.z.string().optional(),
|
|
1134
|
-
priorityOverride: z.z.string().optional(),
|
|
1135
|
-
roleOverride: z.z.string().optional()
|
|
1136
|
-
});
|
|
1137
|
-
const WorldSuggestionUpdatedSchema = z.z.object({
|
|
1138
|
-
type: z.z.literal("world-suggestion-updated"),
|
|
1139
|
-
projectId: z.z.string(),
|
|
1140
|
-
suggestionId: z.z.string(),
|
|
1141
|
-
status: z.z.enum(SUGGESTION_STATUSES)
|
|
1142
|
-
});
|
|
1143
|
-
const AutonomyStatsRecentActionSchema = z.z.object({
|
|
1144
|
-
suggestionId: z.z.string(),
|
|
1145
|
-
title: z.z.string(),
|
|
1146
|
-
type: z.z.enum(SUGGESTION_TYPES),
|
|
1147
|
-
acceptedAt: z.z.number(),
|
|
1148
|
-
rule: z.z.string()
|
|
1149
|
-
});
|
|
1150
|
-
const AutonomyStatsSchema = z.z.object({
|
|
1151
|
-
mode: z.z.enum(SUPERVISOR_MODES),
|
|
1152
|
-
todayAutoAccepted: z.z.number().int(),
|
|
1153
|
-
todayQuota: z.z.number().int().nullable(),
|
|
1154
|
-
concurrentAutoTasks: z.z.number().int(),
|
|
1155
|
-
maxConcurrent: z.z.number().int().nullable(),
|
|
1156
|
-
recentAutoActions: z.z.array(AutonomyStatsRecentActionSchema)
|
|
1157
|
-
});
|
|
1158
|
-
|
|
1159
|
-
const AGENT_MSG_TYPES = [
|
|
1160
|
-
"request",
|
|
1161
|
-
"report",
|
|
1162
|
-
"conflict",
|
|
1163
|
-
"law_suggestion",
|
|
1164
|
-
"dependency_blocked",
|
|
1165
|
-
"handoff",
|
|
1166
|
-
"review_request",
|
|
1167
|
-
"decision_request"
|
|
1168
|
-
];
|
|
1169
|
-
const AgentMsgTypeSchema = z__namespace.enum(AGENT_MSG_TYPES);
|
|
1170
|
-
const AGENT_MSG_STATUSES = ["unread", "read", "resolved"];
|
|
1171
|
-
const AGENT_MSG_PRIORITIES = ["urgent", "normal", "low"];
|
|
1172
|
-
const AgentMessageSummarySchema = z__namespace.object({
|
|
1173
|
-
id: z__namespace.string(),
|
|
1174
|
-
projectId: z__namespace.string(),
|
|
1175
|
-
fromRole: z__namespace.string(),
|
|
1176
|
-
toRole: z__namespace.string().nullable(),
|
|
1177
|
-
msgType: AgentMsgTypeSchema,
|
|
1178
|
-
content: z__namespace.string(),
|
|
1179
|
-
status: z__namespace.enum(AGENT_MSG_STATUSES),
|
|
1180
|
-
sessionId: z__namespace.string().nullable(),
|
|
1181
|
-
decisionId: z__namespace.string().nullable(),
|
|
1182
|
-
relatedGoalId: z__namespace.string().nullable(),
|
|
1183
|
-
relatedTaskId: z__namespace.string().nullable(),
|
|
1184
|
-
priority: z__namespace.enum(AGENT_MSG_PRIORITIES),
|
|
1185
|
-
createdAt: z__namespace.number(),
|
|
1186
|
-
updatedAt: z__namespace.number()
|
|
1187
|
-
});
|
|
1188
|
-
|
|
1189
1043
|
const CODEX_APP_SERVER_BACKEND = "codex-app-server";
|
|
1190
1044
|
const CODEX_MCP_LEGACY_BACKEND = "codex-mcp-legacy";
|
|
1191
1045
|
const CodexBackendModeSchema = z__namespace.enum([
|
|
@@ -2079,15 +1933,9 @@ const CodexMetadataSchema = z__namespace.object({
|
|
|
2079
1933
|
mcpServers: z__namespace.array(CodexMcpServerSummarySchema).optional()
|
|
2080
1934
|
});
|
|
2081
1935
|
|
|
2082
|
-
exports.AGENT_MSG_PRIORITIES = AGENT_MSG_PRIORITIES;
|
|
2083
|
-
exports.AGENT_MSG_STATUSES = AGENT_MSG_STATUSES;
|
|
2084
|
-
exports.AGENT_MSG_TYPES = AGENT_MSG_TYPES;
|
|
2085
1936
|
exports.AIBackendProfileSchema = AIBackendProfileSchema;
|
|
2086
|
-
exports.AcceptBodySchema = AcceptBodySchema;
|
|
2087
1937
|
exports.AgentLoopSummarySchema = AgentLoopSummarySchema;
|
|
2088
1938
|
exports.AgentMessageSchema = AgentMessageSchema;
|
|
2089
|
-
exports.AgentMessageSummarySchema = AgentMessageSummarySchema;
|
|
2090
|
-
exports.AgentMsgTypeSchema = AgentMsgTypeSchema;
|
|
2091
1939
|
exports.AnthropicConfigSchema = AnthropicConfigSchema;
|
|
2092
1940
|
exports.ApiMessageSchema = ApiMessageSchema;
|
|
2093
1941
|
exports.ApiUpdateMachineStateSchema = ApiUpdateMachineStateSchema;
|
|
@@ -2104,8 +1952,6 @@ exports.AutomationJobStatusSchema = AutomationJobStatusSchema;
|
|
|
2104
1952
|
exports.AutomationJobSummarySchema = AutomationJobSummarySchema;
|
|
2105
1953
|
exports.AutomationPrioritySchema = AutomationPrioritySchema;
|
|
2106
1954
|
exports.AutomationStateSchema = AutomationStateSchema;
|
|
2107
|
-
exports.AutonomyStatsRecentActionSchema = AutonomyStatsRecentActionSchema;
|
|
2108
|
-
exports.AutonomyStatsSchema = AutonomyStatsSchema;
|
|
2109
1955
|
exports.AzureOpenAIConfigSchema = AzureOpenAIConfigSchema;
|
|
2110
1956
|
exports.BUILT_IN_AI_BACKEND_PROFILE_IDS = BUILT_IN_AI_BACKEND_PROFILE_IDS;
|
|
2111
1957
|
exports.BootstrapProfileSummarySchema = BootstrapProfileSummarySchema;
|
|
@@ -2140,7 +1986,6 @@ exports.CrossProjectSearchResultSchema = CrossProjectSearchResultSchema;
|
|
|
2140
1986
|
exports.CustomModelSchema = CustomModelSchema;
|
|
2141
1987
|
exports.DaemonStateSchema = DaemonStateSchema;
|
|
2142
1988
|
exports.DefaultPermissionModeSchema = DefaultPermissionModeSchema;
|
|
2143
|
-
exports.EVIDENCE_KINDS = EVIDENCE_KINDS;
|
|
2144
1989
|
exports.EnvironmentVariableSchema = EnvironmentVariableSchema;
|
|
2145
1990
|
exports.HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES = HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES;
|
|
2146
1991
|
exports.HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES = HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES;
|
|
@@ -2174,15 +2019,6 @@ exports.RESOLVED_RUNTIME_PROFILE_SCHEMA_VERSION = RESOLVED_RUNTIME_PROFILE_SCHEM
|
|
|
2174
2019
|
exports.ResolvedRuntimeProfileSchema = ResolvedRuntimeProfileSchema;
|
|
2175
2020
|
exports.RuntimeProfileSourceSchema = RuntimeProfileSourceSchema;
|
|
2176
2021
|
exports.RuntimeProfileTrustSchema = RuntimeProfileTrustSchema;
|
|
2177
|
-
exports.SUGGESTION_ACCEPT_AUDIT_RULES = SUGGESTION_ACCEPT_AUDIT_RULES;
|
|
2178
|
-
exports.SUGGESTION_ACCEPT_SOURCES = SUGGESTION_ACCEPT_SOURCES;
|
|
2179
|
-
exports.SUGGESTION_AUTO_ACCEPT_FAILURE_DETAILS = SUGGESTION_AUTO_ACCEPT_FAILURE_DETAILS;
|
|
2180
|
-
exports.SUGGESTION_AUTO_ACCEPT_REASON_CODES = SUGGESTION_AUTO_ACCEPT_REASON_CODES;
|
|
2181
|
-
exports.SUGGESTION_AUTO_ACCEPT_STATUSES = SUGGESTION_AUTO_ACCEPT_STATUSES;
|
|
2182
|
-
exports.SUGGESTION_BUCKETS = SUGGESTION_BUCKETS;
|
|
2183
|
-
exports.SUGGESTION_STATUSES = SUGGESTION_STATUSES;
|
|
2184
|
-
exports.SUGGESTION_TYPES = SUGGESTION_TYPES;
|
|
2185
|
-
exports.SUPERVISOR_MODES = SUPERVISOR_MODES;
|
|
2186
2022
|
exports.SessionEventCreatedSchema = SessionEventCreatedSchema;
|
|
2187
2023
|
exports.SessionEventReportSchema = SessionEventReportSchema;
|
|
2188
2024
|
exports.SessionEventSummarySchema = SessionEventSummarySchema;
|
|
@@ -2192,13 +2028,6 @@ exports.SessionMessageSchema = SessionMessageSchema;
|
|
|
2192
2028
|
exports.SessionProtocolMessageSchema = SessionProtocolMessageSchema;
|
|
2193
2029
|
exports.SkillContentSchema = SkillContentSchema;
|
|
2194
2030
|
exports.SkillSummarySchema = SkillSummarySchema;
|
|
2195
|
-
exports.SuggestionAcceptAuditSchema = SuggestionAcceptAuditSchema;
|
|
2196
|
-
exports.SuggestionDecisionPayloadSchema = SuggestionDecisionPayloadSchema;
|
|
2197
|
-
exports.SuggestionEvidenceSchema = SuggestionEvidenceSchema;
|
|
2198
|
-
exports.SuggestionGoalPayloadSchema = SuggestionGoalPayloadSchema;
|
|
2199
|
-
exports.SuggestionPayloadSchema = SuggestionPayloadSchema;
|
|
2200
|
-
exports.SuggestionSkillPayloadSchema = SuggestionSkillPayloadSchema;
|
|
2201
|
-
exports.SuggestionTaskPayloadSchema = SuggestionTaskPayloadSchema;
|
|
2202
2031
|
exports.TailscaleInfoSchema = TailscaleInfoSchema;
|
|
2203
2032
|
exports.TailscaleServeEntrySchema = TailscaleServeEntrySchema;
|
|
2204
2033
|
exports.TaskOutcomeSchema = TaskOutcomeSchema;
|
|
@@ -2229,8 +2058,6 @@ exports.VersionedNullableEncryptedValueSchema = VersionedNullableEncryptedValueS
|
|
|
2229
2058
|
exports.VoiceTokenAllowedSchema = VoiceTokenAllowedSchema;
|
|
2230
2059
|
exports.VoiceTokenDeniedSchema = VoiceTokenDeniedSchema;
|
|
2231
2060
|
exports.VoiceTokenResponseSchema = VoiceTokenResponseSchema;
|
|
2232
|
-
exports.WorldAutonomyPolicySchema = WorldAutonomyPolicySchema;
|
|
2233
|
-
exports.WorldSuggestionUpdatedSchema = WorldSuggestionUpdatedSchema;
|
|
2234
2061
|
exports.createEnvelope = createEnvelope;
|
|
2235
2062
|
exports.createResolvedRuntimeProfile = createResolvedRuntimeProfile;
|
|
2236
2063
|
exports.getBuiltInAIBackendProfile = getBuiltInAIBackendProfile;
|
|
@@ -2238,7 +2065,6 @@ exports.getHappyMcpToolAction = getHappyMcpToolAction;
|
|
|
2238
2065
|
exports.getHappyMcpToolAliases = getHappyMcpToolAliases;
|
|
2239
2066
|
exports.getHappyMcpToolTitle = getHappyMcpToolTitle;
|
|
2240
2067
|
exports.getProfileEnvironmentVariables = getProfileEnvironmentVariables;
|
|
2241
|
-
exports.getSuggestionPayloadSchema = getSuggestionPayloadSchema;
|
|
2242
2068
|
exports.isCodexAppServerBackend = isCodexAppServerBackend;
|
|
2243
2069
|
exports.isCodexLegacyBackend = isCodexLegacyBackend;
|
|
2244
2070
|
exports.isHappyMcpToolAlias = isHappyMcpToolAlias;
|