@honcho-ai/claude-honcho 0.3.3 → 0.3.4
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/.claude-plugin/plugin.json +1 -1
- package/dist/hooks/post-tool-use.js +62 -43
- package/dist/hooks/post-tool-use.js.map +5 -5
- package/dist/hooks/pre-compact.js +70 -46
- package/dist/hooks/pre-compact.js.map +6 -6
- package/dist/hooks/pre-tool-honcho.js +17 -5
- package/dist/hooks/pre-tool-honcho.js.map +4 -4
- package/dist/hooks/save-user-message.js +39 -10
- package/dist/hooks/save-user-message.js.map +5 -5
- package/dist/hooks/session-end.js +18 -5
- package/dist/hooks/session-end.js.map +4 -4
- package/dist/hooks/session-start.js +65 -43
- package/dist/hooks/session-start.js.map +8 -8
- package/dist/hooks/stop.js +82 -36
- package/dist/hooks/stop.js.map +7 -6
- package/dist/hooks/user-prompt.js +122 -76
- package/dist/hooks/user-prompt.js.map +8 -8
- package/dist/mcp-server.js +119 -89
- package/dist/mcp-server.js.map +5 -5
- package/dist/skills/backfill-runner.js +24 -8
- package/dist/skills/backfill-runner.js.map +7 -6
- package/dist/skills/setup-runner.js +27 -9
- package/dist/skills/setup-runner.js.map +7 -6
- package/dist/skills/status-runner.js +14 -5
- package/dist/skills/status-runner.js.map +4 -4
- package/hooks/hooks.json +9 -9
- package/package.json +1 -1
- package/skills/status/SKILL.md +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -25266,7 +25266,7 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
25266
25266
|
inst.partial = (...args) => partial(ZodOptional, inst, args[0]);
|
|
25267
25267
|
inst.required = (...args) => required(ZodNonOptional, inst, args[0]);
|
|
25268
25268
|
});
|
|
25269
|
-
function
|
|
25269
|
+
function object(shape, params) {
|
|
25270
25270
|
const def = {
|
|
25271
25271
|
type: "object",
|
|
25272
25272
|
get shape() {
|
|
@@ -25591,31 +25591,31 @@ var TaskCreationParamsSchema = looseObject({
|
|
|
25591
25591
|
ttl: number2().optional(),
|
|
25592
25592
|
pollInterval: number2().optional()
|
|
25593
25593
|
});
|
|
25594
|
-
var TaskMetadataSchema =
|
|
25594
|
+
var TaskMetadataSchema = object({
|
|
25595
25595
|
ttl: number2().optional()
|
|
25596
25596
|
});
|
|
25597
|
-
var RelatedTaskMetadataSchema =
|
|
25597
|
+
var RelatedTaskMetadataSchema = object({
|
|
25598
25598
|
taskId: string2()
|
|
25599
25599
|
});
|
|
25600
25600
|
var RequestMetaSchema = looseObject({
|
|
25601
25601
|
progressToken: ProgressTokenSchema.optional(),
|
|
25602
25602
|
[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
|
|
25603
25603
|
});
|
|
25604
|
-
var BaseRequestParamsSchema =
|
|
25604
|
+
var BaseRequestParamsSchema = object({
|
|
25605
25605
|
_meta: RequestMetaSchema.optional()
|
|
25606
25606
|
});
|
|
25607
25607
|
var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
25608
25608
|
task: TaskMetadataSchema.optional()
|
|
25609
25609
|
});
|
|
25610
25610
|
var isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
|
|
25611
|
-
var RequestSchema =
|
|
25611
|
+
var RequestSchema = object({
|
|
25612
25612
|
method: string2(),
|
|
25613
25613
|
params: BaseRequestParamsSchema.loose().optional()
|
|
25614
25614
|
});
|
|
25615
|
-
var NotificationsParamsSchema =
|
|
25615
|
+
var NotificationsParamsSchema = object({
|
|
25616
25616
|
_meta: RequestMetaSchema.optional()
|
|
25617
25617
|
});
|
|
25618
|
-
var NotificationSchema =
|
|
25618
|
+
var NotificationSchema = object({
|
|
25619
25619
|
method: string2(),
|
|
25620
25620
|
params: NotificationsParamsSchema.loose().optional()
|
|
25621
25621
|
});
|
|
@@ -25623,18 +25623,18 @@ var ResultSchema = looseObject({
|
|
|
25623
25623
|
_meta: RequestMetaSchema.optional()
|
|
25624
25624
|
});
|
|
25625
25625
|
var RequestIdSchema = union([string2(), number2().int()]);
|
|
25626
|
-
var JSONRPCRequestSchema =
|
|
25626
|
+
var JSONRPCRequestSchema = object({
|
|
25627
25627
|
jsonrpc: literal(JSONRPC_VERSION),
|
|
25628
25628
|
id: RequestIdSchema,
|
|
25629
25629
|
...RequestSchema.shape
|
|
25630
25630
|
}).strict();
|
|
25631
25631
|
var isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
|
|
25632
|
-
var JSONRPCNotificationSchema =
|
|
25632
|
+
var JSONRPCNotificationSchema = object({
|
|
25633
25633
|
jsonrpc: literal(JSONRPC_VERSION),
|
|
25634
25634
|
...NotificationSchema.shape
|
|
25635
25635
|
}).strict();
|
|
25636
25636
|
var isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
|
|
25637
|
-
var JSONRPCResultResponseSchema =
|
|
25637
|
+
var JSONRPCResultResponseSchema = object({
|
|
25638
25638
|
jsonrpc: literal(JSONRPC_VERSION),
|
|
25639
25639
|
id: RequestIdSchema,
|
|
25640
25640
|
result: ResultSchema
|
|
@@ -25651,10 +25651,10 @@ var ErrorCode;
|
|
|
25651
25651
|
ErrorCode[ErrorCode["InternalError"] = -32603] = "InternalError";
|
|
25652
25652
|
ErrorCode[ErrorCode["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
|
|
25653
25653
|
})(ErrorCode || (ErrorCode = {}));
|
|
25654
|
-
var JSONRPCErrorResponseSchema =
|
|
25654
|
+
var JSONRPCErrorResponseSchema = object({
|
|
25655
25655
|
jsonrpc: literal(JSONRPC_VERSION),
|
|
25656
25656
|
id: RequestIdSchema.optional(),
|
|
25657
|
-
error:
|
|
25657
|
+
error: object({
|
|
25658
25658
|
code: number2().int(),
|
|
25659
25659
|
message: string2(),
|
|
25660
25660
|
data: unknown().optional()
|
|
@@ -25677,16 +25677,16 @@ var CancelledNotificationSchema = NotificationSchema.extend({
|
|
|
25677
25677
|
method: literal("notifications/cancelled"),
|
|
25678
25678
|
params: CancelledNotificationParamsSchema
|
|
25679
25679
|
});
|
|
25680
|
-
var IconSchema =
|
|
25680
|
+
var IconSchema = object({
|
|
25681
25681
|
src: string2(),
|
|
25682
25682
|
mimeType: string2().optional(),
|
|
25683
25683
|
sizes: array(string2()).optional(),
|
|
25684
25684
|
theme: _enum(["light", "dark"]).optional()
|
|
25685
25685
|
});
|
|
25686
|
-
var IconsSchema =
|
|
25686
|
+
var IconsSchema = object({
|
|
25687
25687
|
icons: array(IconSchema).optional()
|
|
25688
25688
|
});
|
|
25689
|
-
var BaseMetadataSchema =
|
|
25689
|
+
var BaseMetadataSchema = object({
|
|
25690
25690
|
name: string2(),
|
|
25691
25691
|
title: string2().optional()
|
|
25692
25692
|
});
|
|
@@ -25697,7 +25697,7 @@ var ImplementationSchema = BaseMetadataSchema.extend({
|
|
|
25697
25697
|
websiteUrl: string2().optional(),
|
|
25698
25698
|
description: string2().optional()
|
|
25699
25699
|
});
|
|
25700
|
-
var FormElicitationCapabilitySchema = intersection(
|
|
25700
|
+
var FormElicitationCapabilitySchema = intersection(object({
|
|
25701
25701
|
applyDefaults: boolean2().optional()
|
|
25702
25702
|
}), record(string2(), unknown()));
|
|
25703
25703
|
var ElicitationCapabilitySchema = preprocess((value) => {
|
|
@@ -25707,7 +25707,7 @@ var ElicitationCapabilitySchema = preprocess((value) => {
|
|
|
25707
25707
|
}
|
|
25708
25708
|
}
|
|
25709
25709
|
return value;
|
|
25710
|
-
}, intersection(
|
|
25710
|
+
}, intersection(object({
|
|
25711
25711
|
form: FormElicitationCapabilitySchema.optional(),
|
|
25712
25712
|
url: AssertObjectSchema.optional()
|
|
25713
25713
|
}), record(string2(), unknown()).optional()));
|
|
@@ -25732,14 +25732,14 @@ var ServerTasksCapabilitySchema = looseObject({
|
|
|
25732
25732
|
}).optional()
|
|
25733
25733
|
}).optional()
|
|
25734
25734
|
});
|
|
25735
|
-
var ClientCapabilitiesSchema =
|
|
25735
|
+
var ClientCapabilitiesSchema = object({
|
|
25736
25736
|
experimental: record(string2(), AssertObjectSchema).optional(),
|
|
25737
|
-
sampling:
|
|
25737
|
+
sampling: object({
|
|
25738
25738
|
context: AssertObjectSchema.optional(),
|
|
25739
25739
|
tools: AssertObjectSchema.optional()
|
|
25740
25740
|
}).optional(),
|
|
25741
25741
|
elicitation: ElicitationCapabilitySchema.optional(),
|
|
25742
|
-
roots:
|
|
25742
|
+
roots: object({
|
|
25743
25743
|
listChanged: boolean2().optional()
|
|
25744
25744
|
}).optional(),
|
|
25745
25745
|
tasks: ClientTasksCapabilitySchema.optional(),
|
|
@@ -25754,18 +25754,18 @@ var InitializeRequestSchema = RequestSchema.extend({
|
|
|
25754
25754
|
method: literal("initialize"),
|
|
25755
25755
|
params: InitializeRequestParamsSchema
|
|
25756
25756
|
});
|
|
25757
|
-
var ServerCapabilitiesSchema =
|
|
25757
|
+
var ServerCapabilitiesSchema = object({
|
|
25758
25758
|
experimental: record(string2(), AssertObjectSchema).optional(),
|
|
25759
25759
|
logging: AssertObjectSchema.optional(),
|
|
25760
25760
|
completions: AssertObjectSchema.optional(),
|
|
25761
|
-
prompts:
|
|
25761
|
+
prompts: object({
|
|
25762
25762
|
listChanged: boolean2().optional()
|
|
25763
25763
|
}).optional(),
|
|
25764
|
-
resources:
|
|
25764
|
+
resources: object({
|
|
25765
25765
|
subscribe: boolean2().optional(),
|
|
25766
25766
|
listChanged: boolean2().optional()
|
|
25767
25767
|
}).optional(),
|
|
25768
|
-
tools:
|
|
25768
|
+
tools: object({
|
|
25769
25769
|
listChanged: boolean2().optional()
|
|
25770
25770
|
}).optional(),
|
|
25771
25771
|
tasks: ServerTasksCapabilitySchema.optional(),
|
|
@@ -25785,12 +25785,12 @@ var PingRequestSchema = RequestSchema.extend({
|
|
|
25785
25785
|
method: literal("ping"),
|
|
25786
25786
|
params: BaseRequestParamsSchema.optional()
|
|
25787
25787
|
});
|
|
25788
|
-
var ProgressSchema =
|
|
25788
|
+
var ProgressSchema = object({
|
|
25789
25789
|
progress: number2(),
|
|
25790
25790
|
total: optional(number2()),
|
|
25791
25791
|
message: optional(string2())
|
|
25792
25792
|
});
|
|
25793
|
-
var ProgressNotificationParamsSchema =
|
|
25793
|
+
var ProgressNotificationParamsSchema = object({
|
|
25794
25794
|
...NotificationsParamsSchema.shape,
|
|
25795
25795
|
...ProgressSchema.shape,
|
|
25796
25796
|
progressToken: ProgressTokenSchema
|
|
@@ -25809,7 +25809,7 @@ var PaginatedResultSchema = ResultSchema.extend({
|
|
|
25809
25809
|
nextCursor: CursorSchema.optional()
|
|
25810
25810
|
});
|
|
25811
25811
|
var TaskStatusSchema = _enum(["working", "input_required", "completed", "failed", "cancelled"]);
|
|
25812
|
-
var TaskSchema =
|
|
25812
|
+
var TaskSchema = object({
|
|
25813
25813
|
taskId: string2(),
|
|
25814
25814
|
status: TaskStatusSchema,
|
|
25815
25815
|
ttl: union([number2(), _null3()]),
|
|
@@ -25853,7 +25853,7 @@ var CancelTaskRequestSchema = RequestSchema.extend({
|
|
|
25853
25853
|
})
|
|
25854
25854
|
});
|
|
25855
25855
|
var CancelTaskResultSchema = ResultSchema.merge(TaskSchema);
|
|
25856
|
-
var ResourceContentsSchema =
|
|
25856
|
+
var ResourceContentsSchema = object({
|
|
25857
25857
|
uri: string2(),
|
|
25858
25858
|
mimeType: optional(string2()),
|
|
25859
25859
|
_meta: record(string2(), unknown()).optional()
|
|
@@ -25873,12 +25873,12 @@ var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
|
25873
25873
|
blob: Base64Schema
|
|
25874
25874
|
});
|
|
25875
25875
|
var RoleSchema = _enum(["user", "assistant"]);
|
|
25876
|
-
var AnnotationsSchema =
|
|
25876
|
+
var AnnotationsSchema = object({
|
|
25877
25877
|
audience: array(RoleSchema).optional(),
|
|
25878
25878
|
priority: number2().min(0).max(1).optional(),
|
|
25879
25879
|
lastModified: datetime2({ offset: true }).optional()
|
|
25880
25880
|
});
|
|
25881
|
-
var ResourceSchema =
|
|
25881
|
+
var ResourceSchema = object({
|
|
25882
25882
|
...BaseMetadataSchema.shape,
|
|
25883
25883
|
...IconsSchema.shape,
|
|
25884
25884
|
uri: string2(),
|
|
@@ -25888,7 +25888,7 @@ var ResourceSchema = object2({
|
|
|
25888
25888
|
annotations: AnnotationsSchema.optional(),
|
|
25889
25889
|
_meta: optional(looseObject({}))
|
|
25890
25890
|
});
|
|
25891
|
-
var ResourceTemplateSchema =
|
|
25891
|
+
var ResourceTemplateSchema = object({
|
|
25892
25892
|
...BaseMetadataSchema.shape,
|
|
25893
25893
|
...IconsSchema.shape,
|
|
25894
25894
|
uriTemplate: string2(),
|
|
@@ -25941,12 +25941,12 @@ var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
|
25941
25941
|
method: literal("notifications/resources/updated"),
|
|
25942
25942
|
params: ResourceUpdatedNotificationParamsSchema
|
|
25943
25943
|
});
|
|
25944
|
-
var PromptArgumentSchema =
|
|
25944
|
+
var PromptArgumentSchema = object({
|
|
25945
25945
|
name: string2(),
|
|
25946
25946
|
description: optional(string2()),
|
|
25947
25947
|
required: optional(boolean2())
|
|
25948
25948
|
});
|
|
25949
|
-
var PromptSchema =
|
|
25949
|
+
var PromptSchema = object({
|
|
25950
25950
|
...BaseMetadataSchema.shape,
|
|
25951
25951
|
...IconsSchema.shape,
|
|
25952
25952
|
description: optional(string2()),
|
|
@@ -25967,34 +25967,34 @@ var GetPromptRequestSchema = RequestSchema.extend({
|
|
|
25967
25967
|
method: literal("prompts/get"),
|
|
25968
25968
|
params: GetPromptRequestParamsSchema
|
|
25969
25969
|
});
|
|
25970
|
-
var TextContentSchema =
|
|
25970
|
+
var TextContentSchema = object({
|
|
25971
25971
|
type: literal("text"),
|
|
25972
25972
|
text: string2(),
|
|
25973
25973
|
annotations: AnnotationsSchema.optional(),
|
|
25974
25974
|
_meta: record(string2(), unknown()).optional()
|
|
25975
25975
|
});
|
|
25976
|
-
var ImageContentSchema =
|
|
25976
|
+
var ImageContentSchema = object({
|
|
25977
25977
|
type: literal("image"),
|
|
25978
25978
|
data: Base64Schema,
|
|
25979
25979
|
mimeType: string2(),
|
|
25980
25980
|
annotations: AnnotationsSchema.optional(),
|
|
25981
25981
|
_meta: record(string2(), unknown()).optional()
|
|
25982
25982
|
});
|
|
25983
|
-
var AudioContentSchema =
|
|
25983
|
+
var AudioContentSchema = object({
|
|
25984
25984
|
type: literal("audio"),
|
|
25985
25985
|
data: Base64Schema,
|
|
25986
25986
|
mimeType: string2(),
|
|
25987
25987
|
annotations: AnnotationsSchema.optional(),
|
|
25988
25988
|
_meta: record(string2(), unknown()).optional()
|
|
25989
25989
|
});
|
|
25990
|
-
var ToolUseContentSchema =
|
|
25990
|
+
var ToolUseContentSchema = object({
|
|
25991
25991
|
type: literal("tool_use"),
|
|
25992
25992
|
name: string2(),
|
|
25993
25993
|
id: string2(),
|
|
25994
25994
|
input: record(string2(), unknown()),
|
|
25995
25995
|
_meta: record(string2(), unknown()).optional()
|
|
25996
25996
|
});
|
|
25997
|
-
var EmbeddedResourceSchema =
|
|
25997
|
+
var EmbeddedResourceSchema = object({
|
|
25998
25998
|
type: literal("resource"),
|
|
25999
25999
|
resource: union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
26000
26000
|
annotations: AnnotationsSchema.optional(),
|
|
@@ -26010,7 +26010,7 @@ var ContentBlockSchema = union([
|
|
|
26010
26010
|
ResourceLinkSchema,
|
|
26011
26011
|
EmbeddedResourceSchema
|
|
26012
26012
|
]);
|
|
26013
|
-
var PromptMessageSchema =
|
|
26013
|
+
var PromptMessageSchema = object({
|
|
26014
26014
|
role: RoleSchema,
|
|
26015
26015
|
content: ContentBlockSchema
|
|
26016
26016
|
});
|
|
@@ -26022,26 +26022,26 @@ var PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
|
26022
26022
|
method: literal("notifications/prompts/list_changed"),
|
|
26023
26023
|
params: NotificationsParamsSchema.optional()
|
|
26024
26024
|
});
|
|
26025
|
-
var ToolAnnotationsSchema =
|
|
26025
|
+
var ToolAnnotationsSchema = object({
|
|
26026
26026
|
title: string2().optional(),
|
|
26027
26027
|
readOnlyHint: boolean2().optional(),
|
|
26028
26028
|
destructiveHint: boolean2().optional(),
|
|
26029
26029
|
idempotentHint: boolean2().optional(),
|
|
26030
26030
|
openWorldHint: boolean2().optional()
|
|
26031
26031
|
});
|
|
26032
|
-
var ToolExecutionSchema =
|
|
26032
|
+
var ToolExecutionSchema = object({
|
|
26033
26033
|
taskSupport: _enum(["required", "optional", "forbidden"]).optional()
|
|
26034
26034
|
});
|
|
26035
|
-
var ToolSchema =
|
|
26035
|
+
var ToolSchema = object({
|
|
26036
26036
|
...BaseMetadataSchema.shape,
|
|
26037
26037
|
...IconsSchema.shape,
|
|
26038
26038
|
description: string2().optional(),
|
|
26039
|
-
inputSchema:
|
|
26039
|
+
inputSchema: object({
|
|
26040
26040
|
type: literal("object"),
|
|
26041
26041
|
properties: record(string2(), AssertObjectSchema).optional(),
|
|
26042
26042
|
required: array(string2()).optional()
|
|
26043
26043
|
}).catchall(unknown()),
|
|
26044
|
-
outputSchema:
|
|
26044
|
+
outputSchema: object({
|
|
26045
26045
|
type: literal("object"),
|
|
26046
26046
|
properties: record(string2(), AssertObjectSchema).optional(),
|
|
26047
26047
|
required: array(string2()).optional()
|
|
@@ -26076,7 +26076,7 @@ var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
|
26076
26076
|
method: literal("notifications/tools/list_changed"),
|
|
26077
26077
|
params: NotificationsParamsSchema.optional()
|
|
26078
26078
|
});
|
|
26079
|
-
var ListChangedOptionsBaseSchema =
|
|
26079
|
+
var ListChangedOptionsBaseSchema = object({
|
|
26080
26080
|
autoRefresh: boolean2().default(true),
|
|
26081
26081
|
debounceMs: number2().int().nonnegative().default(300)
|
|
26082
26082
|
});
|
|
@@ -26097,23 +26097,23 @@ var LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
|
26097
26097
|
method: literal("notifications/message"),
|
|
26098
26098
|
params: LoggingMessageNotificationParamsSchema
|
|
26099
26099
|
});
|
|
26100
|
-
var ModelHintSchema =
|
|
26100
|
+
var ModelHintSchema = object({
|
|
26101
26101
|
name: string2().optional()
|
|
26102
26102
|
});
|
|
26103
|
-
var ModelPreferencesSchema =
|
|
26103
|
+
var ModelPreferencesSchema = object({
|
|
26104
26104
|
hints: array(ModelHintSchema).optional(),
|
|
26105
26105
|
costPriority: number2().min(0).max(1).optional(),
|
|
26106
26106
|
speedPriority: number2().min(0).max(1).optional(),
|
|
26107
26107
|
intelligencePriority: number2().min(0).max(1).optional()
|
|
26108
26108
|
});
|
|
26109
|
-
var ToolChoiceSchema =
|
|
26109
|
+
var ToolChoiceSchema = object({
|
|
26110
26110
|
mode: _enum(["auto", "required", "none"]).optional()
|
|
26111
26111
|
});
|
|
26112
|
-
var ToolResultContentSchema =
|
|
26112
|
+
var ToolResultContentSchema = object({
|
|
26113
26113
|
type: literal("tool_result"),
|
|
26114
26114
|
toolUseId: string2().describe("The unique identifier for the corresponding tool call."),
|
|
26115
26115
|
content: array(ContentBlockSchema).default([]),
|
|
26116
|
-
structuredContent:
|
|
26116
|
+
structuredContent: object({}).loose().optional(),
|
|
26117
26117
|
isError: boolean2().optional(),
|
|
26118
26118
|
_meta: record(string2(), unknown()).optional()
|
|
26119
26119
|
});
|
|
@@ -26125,7 +26125,7 @@ var SamplingMessageContentBlockSchema = discriminatedUnion("type", [
|
|
|
26125
26125
|
ToolUseContentSchema,
|
|
26126
26126
|
ToolResultContentSchema
|
|
26127
26127
|
]);
|
|
26128
|
-
var SamplingMessageSchema =
|
|
26128
|
+
var SamplingMessageSchema = object({
|
|
26129
26129
|
role: RoleSchema,
|
|
26130
26130
|
content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)]),
|
|
26131
26131
|
_meta: record(string2(), unknown()).optional()
|
|
@@ -26158,13 +26158,13 @@ var CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
|
26158
26158
|
role: RoleSchema,
|
|
26159
26159
|
content: union([SamplingMessageContentBlockSchema, array(SamplingMessageContentBlockSchema)])
|
|
26160
26160
|
});
|
|
26161
|
-
var BooleanSchemaSchema =
|
|
26161
|
+
var BooleanSchemaSchema = object({
|
|
26162
26162
|
type: literal("boolean"),
|
|
26163
26163
|
title: string2().optional(),
|
|
26164
26164
|
description: string2().optional(),
|
|
26165
26165
|
default: boolean2().optional()
|
|
26166
26166
|
});
|
|
26167
|
-
var StringSchemaSchema =
|
|
26167
|
+
var StringSchemaSchema = object({
|
|
26168
26168
|
type: literal("string"),
|
|
26169
26169
|
title: string2().optional(),
|
|
26170
26170
|
description: string2().optional(),
|
|
@@ -26173,7 +26173,7 @@ var StringSchemaSchema = object2({
|
|
|
26173
26173
|
format: _enum(["email", "uri", "date", "date-time"]).optional(),
|
|
26174
26174
|
default: string2().optional()
|
|
26175
26175
|
});
|
|
26176
|
-
var NumberSchemaSchema =
|
|
26176
|
+
var NumberSchemaSchema = object({
|
|
26177
26177
|
type: _enum(["number", "integer"]),
|
|
26178
26178
|
title: string2().optional(),
|
|
26179
26179
|
description: string2().optional(),
|
|
@@ -26181,24 +26181,24 @@ var NumberSchemaSchema = object2({
|
|
|
26181
26181
|
maximum: number2().optional(),
|
|
26182
26182
|
default: number2().optional()
|
|
26183
26183
|
});
|
|
26184
|
-
var UntitledSingleSelectEnumSchemaSchema =
|
|
26184
|
+
var UntitledSingleSelectEnumSchemaSchema = object({
|
|
26185
26185
|
type: literal("string"),
|
|
26186
26186
|
title: string2().optional(),
|
|
26187
26187
|
description: string2().optional(),
|
|
26188
26188
|
enum: array(string2()),
|
|
26189
26189
|
default: string2().optional()
|
|
26190
26190
|
});
|
|
26191
|
-
var TitledSingleSelectEnumSchemaSchema =
|
|
26191
|
+
var TitledSingleSelectEnumSchemaSchema = object({
|
|
26192
26192
|
type: literal("string"),
|
|
26193
26193
|
title: string2().optional(),
|
|
26194
26194
|
description: string2().optional(),
|
|
26195
|
-
oneOf: array(
|
|
26195
|
+
oneOf: array(object({
|
|
26196
26196
|
const: string2(),
|
|
26197
26197
|
title: string2()
|
|
26198
26198
|
})),
|
|
26199
26199
|
default: string2().optional()
|
|
26200
26200
|
});
|
|
26201
|
-
var LegacyTitledEnumSchemaSchema =
|
|
26201
|
+
var LegacyTitledEnumSchemaSchema = object({
|
|
26202
26202
|
type: literal("string"),
|
|
26203
26203
|
title: string2().optional(),
|
|
26204
26204
|
description: string2().optional(),
|
|
@@ -26207,26 +26207,26 @@ var LegacyTitledEnumSchemaSchema = object2({
|
|
|
26207
26207
|
default: string2().optional()
|
|
26208
26208
|
});
|
|
26209
26209
|
var SingleSelectEnumSchemaSchema = union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
|
|
26210
|
-
var UntitledMultiSelectEnumSchemaSchema =
|
|
26210
|
+
var UntitledMultiSelectEnumSchemaSchema = object({
|
|
26211
26211
|
type: literal("array"),
|
|
26212
26212
|
title: string2().optional(),
|
|
26213
26213
|
description: string2().optional(),
|
|
26214
26214
|
minItems: number2().optional(),
|
|
26215
26215
|
maxItems: number2().optional(),
|
|
26216
|
-
items:
|
|
26216
|
+
items: object({
|
|
26217
26217
|
type: literal("string"),
|
|
26218
26218
|
enum: array(string2())
|
|
26219
26219
|
}),
|
|
26220
26220
|
default: array(string2()).optional()
|
|
26221
26221
|
});
|
|
26222
|
-
var TitledMultiSelectEnumSchemaSchema =
|
|
26222
|
+
var TitledMultiSelectEnumSchemaSchema = object({
|
|
26223
26223
|
type: literal("array"),
|
|
26224
26224
|
title: string2().optional(),
|
|
26225
26225
|
description: string2().optional(),
|
|
26226
26226
|
minItems: number2().optional(),
|
|
26227
26227
|
maxItems: number2().optional(),
|
|
26228
|
-
items:
|
|
26229
|
-
anyOf: array(
|
|
26228
|
+
items: object({
|
|
26229
|
+
anyOf: array(object({
|
|
26230
26230
|
const: string2(),
|
|
26231
26231
|
title: string2()
|
|
26232
26232
|
}))
|
|
@@ -26239,7 +26239,7 @@ var PrimitiveSchemaDefinitionSchema = union([EnumSchemaSchema, BooleanSchemaSche
|
|
|
26239
26239
|
var ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
26240
26240
|
mode: literal("form").optional(),
|
|
26241
26241
|
message: string2(),
|
|
26242
|
-
requestedSchema:
|
|
26242
|
+
requestedSchema: object({
|
|
26243
26243
|
type: literal("object"),
|
|
26244
26244
|
properties: record(string2(), PrimitiveSchemaDefinitionSchema),
|
|
26245
26245
|
required: array(string2()).optional()
|
|
@@ -26267,21 +26267,21 @@ var ElicitResultSchema = ResultSchema.extend({
|
|
|
26267
26267
|
action: _enum(["accept", "decline", "cancel"]),
|
|
26268
26268
|
content: preprocess((val) => val === null ? undefined : val, record(string2(), union([string2(), number2(), boolean2(), array(string2())])).optional())
|
|
26269
26269
|
});
|
|
26270
|
-
var ResourceTemplateReferenceSchema =
|
|
26270
|
+
var ResourceTemplateReferenceSchema = object({
|
|
26271
26271
|
type: literal("ref/resource"),
|
|
26272
26272
|
uri: string2()
|
|
26273
26273
|
});
|
|
26274
|
-
var PromptReferenceSchema =
|
|
26274
|
+
var PromptReferenceSchema = object({
|
|
26275
26275
|
type: literal("ref/prompt"),
|
|
26276
26276
|
name: string2()
|
|
26277
26277
|
});
|
|
26278
26278
|
var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
26279
26279
|
ref: union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
26280
|
-
argument:
|
|
26280
|
+
argument: object({
|
|
26281
26281
|
name: string2(),
|
|
26282
26282
|
value: string2()
|
|
26283
26283
|
}),
|
|
26284
|
-
context:
|
|
26284
|
+
context: object({
|
|
26285
26285
|
arguments: record(string2(), string2()).optional()
|
|
26286
26286
|
}).optional()
|
|
26287
26287
|
});
|
|
@@ -26296,7 +26296,7 @@ var CompleteResultSchema = ResultSchema.extend({
|
|
|
26296
26296
|
hasMore: optional(boolean2())
|
|
26297
26297
|
})
|
|
26298
26298
|
});
|
|
26299
|
-
var RootSchema =
|
|
26299
|
+
var RootSchema = object({
|
|
26300
26300
|
uri: string2().startsWith("file://"),
|
|
26301
26301
|
name: string2().optional(),
|
|
26302
26302
|
_meta: record(string2(), unknown()).optional()
|
|
@@ -27870,7 +27870,7 @@ import { readFileSync as readFileSync3 } from "fs";
|
|
|
27870
27870
|
import { homedir as homedir2 } from "os";
|
|
27871
27871
|
import { join as join3, basename, dirname, resolve, sep } from "path";
|
|
27872
27872
|
import { fileURLToPath } from "url";
|
|
27873
|
-
import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, statSync, writeFileSync as writeFileSync2 } from "fs";
|
|
27873
|
+
import { chmodSync, existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, statSync, writeFileSync as writeFileSync2 } from "fs";
|
|
27874
27874
|
|
|
27875
27875
|
// src/git.ts
|
|
27876
27876
|
import { execSync } from "child_process";
|
|
@@ -28411,6 +28411,9 @@ function mergeWithEnvVars(config) {
|
|
|
28411
28411
|
if (process.env.HONCHO_LOGGING === "false") {
|
|
28412
28412
|
config.logging = false;
|
|
28413
28413
|
}
|
|
28414
|
+
if (process.env.HONCHO_SAVE_MESSAGES === "false") {
|
|
28415
|
+
config.saveMessages = false;
|
|
28416
|
+
}
|
|
28414
28417
|
if (process.env.HONCHO_SAVE_TOOL_USE !== undefined) {
|
|
28415
28418
|
config.saveToolUse = process.env.HONCHO_SAVE_TOOL_USE === "true";
|
|
28416
28419
|
}
|
|
@@ -28419,6 +28422,11 @@ function mergeWithEnvVars(config) {
|
|
|
28419
28422
|
}
|
|
28420
28423
|
return config;
|
|
28421
28424
|
}
|
|
28425
|
+
function writeConfigFile(data) {
|
|
28426
|
+
if (existsSync3(CONFIG_FILE))
|
|
28427
|
+
chmodSync(CONFIG_FILE, 384);
|
|
28428
|
+
writeFileSync2(CONFIG_FILE, JSON.stringify(data, null, 2), { mode: 384 });
|
|
28429
|
+
}
|
|
28422
28430
|
function saveConfig(config) {
|
|
28423
28431
|
if (!existsSync3(CONFIG_DIR)) {
|
|
28424
28432
|
mkdirSync2(CONFIG_DIR, { recursive: true });
|
|
@@ -28449,9 +28457,10 @@ function saveConfig(config) {
|
|
|
28449
28457
|
setHostIfExplicit("aiPeer", config.aiPeer, existing.aiPeer ?? DEFAULT_AI_PEER[host]);
|
|
28450
28458
|
const enabledForSave = process.env.HONCHO_ENABLED === "false" && config.enabled === false ? existingHost.enabled : config.enabled;
|
|
28451
28459
|
const loggingForSave = process.env.HONCHO_LOGGING === "false" && config.logging === false ? existingHost.logging : config.logging;
|
|
28460
|
+
const saveMessagesForSave = process.env.HONCHO_SAVE_MESSAGES === "false" && config.saveMessages === false ? existingHost.saveMessages : config.saveMessages;
|
|
28452
28461
|
setHostIfExplicit("enabled", enabledForSave, existing.enabled);
|
|
28453
28462
|
setHostIfExplicit("logging", loggingForSave, existing.logging);
|
|
28454
|
-
setHostIfExplicit("saveMessages",
|
|
28463
|
+
setHostIfExplicit("saveMessages", saveMessagesForSave, existing.saveMessages);
|
|
28455
28464
|
setHostIfExplicit("sessionStrategy", config.sessionStrategy, existing.sessionStrategy);
|
|
28456
28465
|
setHostIfExplicit("sessionPeerPrefix", config.sessionPeerPrefix, existing.sessionPeerPrefix);
|
|
28457
28466
|
setHostIfExplicit("reasoningLevel", config.reasoningLevel, existing.reasoningLevel);
|
|
@@ -28466,7 +28475,7 @@ function saveConfig(config) {
|
|
|
28466
28475
|
hostEntry.apiKey = existingHost.apiKey;
|
|
28467
28476
|
}
|
|
28468
28477
|
existing.hosts[host] = hostEntry;
|
|
28469
|
-
|
|
28478
|
+
writeConfigFile(existing);
|
|
28470
28479
|
}
|
|
28471
28480
|
function saveRootField(field, value) {
|
|
28472
28481
|
if (!existsSync3(CONFIG_DIR)) {
|
|
@@ -28479,7 +28488,7 @@ function saveRootField(field, value) {
|
|
|
28479
28488
|
} catch {}
|
|
28480
28489
|
}
|
|
28481
28490
|
existing[field] = value;
|
|
28482
|
-
|
|
28491
|
+
writeConfigFile(existing);
|
|
28483
28492
|
}
|
|
28484
28493
|
function resolveWorktreeMainRoot(dir) {
|
|
28485
28494
|
try {
|
|
@@ -28644,6 +28653,9 @@ function getHonchoClientOptions(config) {
|
|
|
28644
28653
|
defaultHeaders: getTelemetryHeaders()
|
|
28645
28654
|
};
|
|
28646
28655
|
}
|
|
28656
|
+
function isProductionEndpoint(config) {
|
|
28657
|
+
return getHonchoBaseUrl(config) === HONCHO_BASE_URLS.production;
|
|
28658
|
+
}
|
|
28647
28659
|
function getEndpointInfo(config) {
|
|
28648
28660
|
if (config.endpoint?.baseUrl) {
|
|
28649
28661
|
return { type: "custom", url: config.endpoint.baseUrl };
|
|
@@ -28716,8 +28728,10 @@ var symbols = {
|
|
|
28716
28728
|
pipe: String.fromCodePoint(9474),
|
|
28717
28729
|
sparkle: String.fromCodePoint(10022)
|
|
28718
28730
|
};
|
|
28719
|
-
function honchoSessionUrl(
|
|
28720
|
-
|
|
28731
|
+
function honchoSessionUrl(config, sessionName) {
|
|
28732
|
+
if (!isProductionEndpoint(config))
|
|
28733
|
+
return null;
|
|
28734
|
+
return `https://app.honcho.dev/explore?workspace=${encodeURIComponent(config.workspace)}&view=sessions&session=${encodeURIComponent(sessionName)}`;
|
|
28721
28735
|
}
|
|
28722
28736
|
|
|
28723
28737
|
// src/mcp/server.ts
|
|
@@ -28794,7 +28808,7 @@ function handleGetConfig(cwd) {
|
|
|
28794
28808
|
const sessionName = cfg ? getSessionName(cwd) : null;
|
|
28795
28809
|
const endpointInfo = cfg ? getEndpointInfo(cfg) : null;
|
|
28796
28810
|
const endpointLabel = endpointInfo ? endpointInfo.type === "production" ? "platform" : endpointInfo.type : null;
|
|
28797
|
-
const sessionUrl = cfg && sessionName ? honchoSessionUrl(cfg
|
|
28811
|
+
const sessionUrl = cfg && sessionName ? honchoSessionUrl(cfg, sessionName) : null;
|
|
28798
28812
|
const current = cfg ? {
|
|
28799
28813
|
workspace: cfg.workspace,
|
|
28800
28814
|
session: sessionName,
|
|
@@ -29269,7 +29283,7 @@ function handleSetConfig(args) {
|
|
|
29269
29283
|
const restartWarning = SESSION_AFFECTING_FIELDS.has(field) ? "Close and restart all active Claude Code sessions. Open sessions still use the previous config and will write to the wrong Honcho session." : undefined;
|
|
29270
29284
|
const cwd = getLastActiveCwd() || process.cwd();
|
|
29271
29285
|
const newSessionName = SESSION_AFFECTING_FIELDS.has(field) ? getSessionName(cwd) : undefined;
|
|
29272
|
-
const sessionUrl = newSessionName ? honchoSessionUrl(cfg
|
|
29286
|
+
const sessionUrl = newSessionName ? honchoSessionUrl(cfg, newSessionName) ?? undefined : undefined;
|
|
29273
29287
|
return {
|
|
29274
29288
|
content: [{
|
|
29275
29289
|
type: "text",
|
|
@@ -29312,12 +29326,29 @@ var REMEMBER_TOOL = {
|
|
|
29312
29326
|
required: ["queries", "reasoning_level"]
|
|
29313
29327
|
}
|
|
29314
29328
|
};
|
|
29329
|
+
var NOT_CONFIGURED_RESULT = {
|
|
29330
|
+
content: [{ type: "text", text: "Honcho isn't configured; run /honcho:setup to connect it, then try again." }],
|
|
29331
|
+
isError: true
|
|
29332
|
+
};
|
|
29333
|
+
function createClients() {
|
|
29334
|
+
const config = loadConfig2();
|
|
29335
|
+
if (!config)
|
|
29336
|
+
return null;
|
|
29337
|
+
return {
|
|
29338
|
+
config,
|
|
29339
|
+
honcho: new import_sdk.Honcho(getHonchoClientOptions(config)),
|
|
29340
|
+
honchoDialectic: new import_sdk.Honcho({
|
|
29341
|
+
...getHonchoClientOptions(config),
|
|
29342
|
+
timeout: DIALECTIC_TIMEOUT_MS,
|
|
29343
|
+
maxRetries: 0
|
|
29344
|
+
})
|
|
29345
|
+
};
|
|
29346
|
+
}
|
|
29315
29347
|
async function runMcpServer() {
|
|
29316
29348
|
setDetectedHost("claude_code");
|
|
29317
|
-
|
|
29318
|
-
if (!
|
|
29319
|
-
console.error("[honcho-mcp] Not configured. Run
|
|
29320
|
-
process.exit(1);
|
|
29349
|
+
let clients = createClients();
|
|
29350
|
+
if (!clients) {
|
|
29351
|
+
console.error("[honcho-mcp] Not configured. Run /honcho:setup");
|
|
29321
29352
|
}
|
|
29322
29353
|
const server = new Server({
|
|
29323
29354
|
name: "honcho",
|
|
@@ -29327,13 +29358,7 @@ async function runMcpServer() {
|
|
|
29327
29358
|
tools: {}
|
|
29328
29359
|
}
|
|
29329
29360
|
});
|
|
29330
|
-
const
|
|
29331
|
-
const honchoDialectic = new import_sdk.Honcho({
|
|
29332
|
-
...getHonchoClientOptions(config),
|
|
29333
|
-
timeout: DIALECTIC_TIMEOUT_MS,
|
|
29334
|
-
maxRetries: 0
|
|
29335
|
-
});
|
|
29336
|
-
const rememberEnabled = config.rememberTool === true;
|
|
29361
|
+
const rememberEnabled = clients?.config.rememberTool === true;
|
|
29337
29362
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
29338
29363
|
return {
|
|
29339
29364
|
tools: [
|
|
@@ -29548,6 +29573,11 @@ async function runMcpServer() {
|
|
|
29548
29573
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
29549
29574
|
const { name, arguments: args } = request.params;
|
|
29550
29575
|
const cwd = getLastActiveCwd() || process.cwd();
|
|
29576
|
+
clients ??= createClients();
|
|
29577
|
+
if (!clients) {
|
|
29578
|
+
return NOT_CONFIGURED_RESULT;
|
|
29579
|
+
}
|
|
29580
|
+
const { config, honcho, honchoDialectic } = clients;
|
|
29551
29581
|
if (name === "get_config") {
|
|
29552
29582
|
return handleGetConfig(cwd);
|
|
29553
29583
|
}
|
|
@@ -29826,5 +29856,5 @@ ${card.map((item) => `- ${item}`).join(`
|
|
|
29826
29856
|
// mcp-server.ts
|
|
29827
29857
|
await runMcpServer();
|
|
29828
29858
|
|
|
29829
|
-
//# debugId=
|
|
29859
|
+
//# debugId=A2E951249EB71D3C64756E2164756E21
|
|
29830
29860
|
//# sourceMappingURL=mcp-server.js.map
|