hackshop-mcp 0.0.3 → 0.0.5

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.
Files changed (74) hide show
  1. package/README.md +88 -34
  2. package/catalog.json +1584 -25
  3. package/dist/build-plan/index.d.ts +10 -0
  4. package/dist/build-plan/index.js +550 -0
  5. package/dist/build-plan/index.js.map +1 -0
  6. package/dist/build-plan/types.d.ts +153 -0
  7. package/dist/build-plan/types.js +2 -0
  8. package/dist/build-plan/types.js.map +1 -0
  9. package/dist/catalog/schema.d.ts +523 -7
  10. package/dist/catalog/schema.js +49 -0
  11. package/dist/catalog/schema.js.map +1 -1
  12. package/dist/core/assess.d.ts +36 -0
  13. package/dist/core/assess.js +100 -0
  14. package/dist/core/assess.js.map +1 -0
  15. package/dist/core/errors.d.ts +2 -0
  16. package/dist/core/errors.js +70 -0
  17. package/dist/core/errors.js.map +1 -0
  18. package/dist/core/links.d.ts +3 -0
  19. package/dist/core/links.js +19 -0
  20. package/dist/core/links.js.map +1 -0
  21. package/dist/core/plan-gadget.d.ts +85 -0
  22. package/dist/core/plan-gadget.js +619 -0
  23. package/dist/core/plan-gadget.js.map +1 -0
  24. package/dist/core/resources.d.ts +37 -0
  25. package/dist/core/resources.js +143 -0
  26. package/dist/core/resources.js.map +1 -0
  27. package/dist/core/safety.d.ts +7 -0
  28. package/dist/core/safety.js +28 -0
  29. package/dist/core/safety.js.map +1 -0
  30. package/dist/core/tools.d.ts +247 -0
  31. package/dist/core/tools.js +164 -0
  32. package/dist/core/tools.js.map +1 -0
  33. package/dist/core/types.d.ts +163 -0
  34. package/dist/core/types.js +17 -0
  35. package/dist/core/types.js.map +1 -0
  36. package/dist/platforms/index.d.ts +26 -0
  37. package/dist/platforms/index.js +52 -0
  38. package/dist/platforms/index.js.map +1 -0
  39. package/dist/platforms/load.d.ts +4 -0
  40. package/dist/platforms/load.js +78 -0
  41. package/dist/platforms/load.js.map +1 -0
  42. package/dist/platforms/schema.d.ts +587 -0
  43. package/dist/platforms/schema.js +64 -0
  44. package/dist/platforms/schema.js.map +1 -0
  45. package/dist/sampling.d.ts +5 -0
  46. package/dist/sampling.js +44 -21
  47. package/dist/sampling.js.map +1 -1
  48. package/dist/server.d.ts +14 -1
  49. package/dist/server.js +164 -40
  50. package/dist/server.js.map +1 -1
  51. package/dist/site-url.d.ts +1 -0
  52. package/dist/site-url.js +4 -0
  53. package/dist/site-url.js.map +1 -0
  54. package/dist/telemetry.d.ts +29 -0
  55. package/dist/telemetry.js +100 -0
  56. package/dist/telemetry.js.map +1 -0
  57. package/dist/tools/assess_hackability.d.ts +2 -29
  58. package/dist/tools/assess_hackability.js +11 -43
  59. package/dist/tools/assess_hackability.js.map +1 -1
  60. package/dist/tools/get_build_plan.d.ts +6 -0
  61. package/dist/tools/get_build_plan.js +16 -0
  62. package/dist/tools/get_build_plan.js.map +1 -0
  63. package/dist/tools/plan_gadget.d.ts +4 -0
  64. package/dist/tools/plan_gadget.js +14 -0
  65. package/dist/tools/plan_gadget.js.map +1 -0
  66. package/dist/tools/propose_hardware.d.ts +5 -0
  67. package/dist/tools/propose_hardware.js +57 -8
  68. package/dist/tools/propose_hardware.js.map +1 -1
  69. package/dist/tools/simulate_assembly.d.ts +315 -0
  70. package/dist/tools/simulate_assembly.js +145 -0
  71. package/dist/tools/simulate_assembly.js.map +1 -0
  72. package/package.json +4 -1
  73. package/platforms.json +779 -0
  74. package/tags.md +1 -0
@@ -0,0 +1,37 @@
1
+ import type { CoreContext } from "./types.js";
2
+ export interface CoreResource {
3
+ uri: string;
4
+ name: string;
5
+ title: string;
6
+ description: string;
7
+ mimeType: string;
8
+ }
9
+ export interface CorePrompt {
10
+ name: string;
11
+ title: string;
12
+ description: string;
13
+ arguments: Array<{
14
+ name: string;
15
+ description: string;
16
+ required: boolean;
17
+ }>;
18
+ }
19
+ export declare const CORE_RESOURCES: CoreResource[];
20
+ export declare const CORE_PROMPTS: CorePrompt[];
21
+ export declare function listCoreResources(): CoreResource[];
22
+ export declare function readCoreResource(uri: string, ctx: CoreContext): {
23
+ uri: string;
24
+ mimeType: string;
25
+ text: string;
26
+ } | null;
27
+ export declare function listCorePrompts(): CorePrompt[];
28
+ export declare function getCorePrompt(name: string, args: Record<string, unknown> | undefined): {
29
+ description: string;
30
+ messages: Array<{
31
+ role: "user";
32
+ content: {
33
+ type: "text";
34
+ text: string;
35
+ };
36
+ }>;
37
+ } | null;
@@ -0,0 +1,143 @@
1
+ import { buildUrls } from "../build-plan/index.js";
2
+ export const CORE_RESOURCES = [
3
+ {
4
+ uri: "hackshop://muse/boards",
5
+ name: "muse-boards",
6
+ title: "Muse boards",
7
+ description: "Every Hackshop Muse board with features, price and build-page URL.",
8
+ mimeType: "application/json",
9
+ },
10
+ {
11
+ uri: "hackshop://muse/sdk-terms",
12
+ name: "muse-sdk-terms",
13
+ title: "Muse SDK terms",
14
+ description: "Plain-English summary of the Muse SDK token terms.",
15
+ mimeType: "text/plain",
16
+ },
17
+ {
18
+ uri: "hackshop://catalog/tags",
19
+ name: "catalog-tags",
20
+ title: "Catalog tags",
21
+ description: "The Hackshop catalog tag list.",
22
+ mimeType: "text/plain",
23
+ },
24
+ ];
25
+ export const CORE_PROMPTS = [
26
+ {
27
+ name: "plan-muse-gadget",
28
+ title: "Plan a Muse gadget",
29
+ description: "Guide an agent through intake, Muse gadget planning, shopping-list approval and assembly.",
30
+ arguments: [
31
+ {
32
+ name: "idea",
33
+ description: "The human's desired agent body or Muse gadget idea.",
34
+ required: true,
35
+ },
36
+ {
37
+ name: "budget_usd",
38
+ description: "Optional budget in USD.",
39
+ required: false,
40
+ },
41
+ ],
42
+ },
43
+ ];
44
+ export function listCoreResources() {
45
+ return CORE_RESOURCES;
46
+ }
47
+ export function readCoreResource(uri, ctx) {
48
+ if (uri === "hackshop://muse/boards") {
49
+ return {
50
+ uri,
51
+ mimeType: "application/json",
52
+ text: JSON.stringify(museBoards(ctx), null, 2),
53
+ };
54
+ }
55
+ if (uri === "hackshop://muse/sdk-terms") {
56
+ return {
57
+ uri,
58
+ mimeType: "text/plain",
59
+ text: sdkTermsText(ctx.platforms),
60
+ };
61
+ }
62
+ if (uri === "hackshop://catalog/tags") {
63
+ return {
64
+ uri,
65
+ mimeType: "text/plain",
66
+ text: ctx.tagsText ?? (ctx.tags ?? []).map((tag) => `- \`${tag}\``).join("\n"),
67
+ };
68
+ }
69
+ return null;
70
+ }
71
+ export function listCorePrompts() {
72
+ return CORE_PROMPTS;
73
+ }
74
+ export function getCorePrompt(name, args) {
75
+ if (name !== "plan-muse-gadget")
76
+ return null;
77
+ const idea = typeof args?.idea === "string" && args.idea.trim().length > 0
78
+ ? args.idea.trim()
79
+ : "";
80
+ const budget = typeof args?.budget_usd === "number"
81
+ ? ` Budget: $${args.budget_usd}.`
82
+ : "";
83
+ return {
84
+ description: "Plan and build a Muse gadget body with explicit human purchase approval.",
85
+ messages: [
86
+ {
87
+ role: "user",
88
+ content: {
89
+ type: "text",
90
+ text: `Help me build a physical body for my AI agent. Idea: ${idea || "<ask me for the idea>"}.${budget}\n\n` +
91
+ "Flow: ask at most four intake questions if the idea is vague, using `plan_gadget.questions`. Then call `plan_gadget` (or POST /api/plan) and let the human choose a board. Call `get_build_plan` for the chosen board, show the shopping list and get explicit approval before buying anything. Follow the machine-readable `assembly` steps, then flash and pair it. Tell the human to click Start a build on the build page so progress is saved.",
92
+ },
93
+ },
94
+ ],
95
+ };
96
+ }
97
+ function museBoards(ctx) {
98
+ const catalogById = new Map(ctx.catalog.map((device) => [device.id, device]));
99
+ return ctx.platforms.flatMap((platform) => platform.boards.flatMap((board) => {
100
+ const device = catalogById.get(board.device_id);
101
+ if (!device)
102
+ return [];
103
+ return [{
104
+ device_id: device.id,
105
+ name: device.name,
106
+ platform: platform.id,
107
+ platform_name: platform.name,
108
+ tier: board.tier,
109
+ support: board.support,
110
+ price: {
111
+ min_usd: device.est_used_price_usd_min ?? null,
112
+ max_usd: device.est_used_price_usd_max ?? null,
113
+ label: priceLabel(device),
114
+ },
115
+ features: board.features,
116
+ build_command: board.build,
117
+ build_page_url: buildUrls(device.id, ctx.siteUrl, true).build_page,
118
+ }];
119
+ }));
120
+ }
121
+ function sdkTermsText(platforms) {
122
+ const seen = new Set();
123
+ const lines = [];
124
+ for (const platform of platforms) {
125
+ const key = `${platform.terms.summary}|${platform.terms.url}`;
126
+ if (seen.has(key))
127
+ continue;
128
+ seen.add(key);
129
+ lines.push(`${platform.name}: ${platform.terms.summary}`);
130
+ lines.push(`Terms URL: ${platform.terms.url}`);
131
+ }
132
+ return lines.join("\n\n");
133
+ }
134
+ function priceLabel(device) {
135
+ const min = device.est_used_price_usd_min;
136
+ const max = device.est_used_price_usd_max;
137
+ if (min === undefined && max === undefined)
138
+ return null;
139
+ if (min !== undefined && max !== undefined && min !== max)
140
+ return `$${min}-${max}`;
141
+ return `~$${min ?? max}`;
142
+ }
143
+ //# sourceMappingURL=resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/core/resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAsBnD,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C;QACE,GAAG,EAAE,wBAAwB;QAC7B,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,oEAAoE;QACjF,QAAQ,EAAE,kBAAkB;KAC7B;IACD;QACE,GAAG,EAAE,2BAA2B;QAChC,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,oDAAoD;QACjE,QAAQ,EAAE,YAAY;KACvB;IACD;QACE,GAAG,EAAE,yBAAyB;QAC9B,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,YAAY;KACvB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC;QACE,I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U,CAAC,MAAmB;IACrC,MAAM,GAAG,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAC1C,MAAM,GAAG,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAC1C,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACxD,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,GAAG;QAAE,OAAO,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC;IACnF,OAAO,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type DeviceEntry } from "./types.js";
2
+ export interface BrickRiskOutput {
3
+ brick_risk: number | null;
4
+ brick_risk_label: string;
5
+ brick_risk_disclaimer: string | null;
6
+ }
7
+ export declare function applyBrickRiskSafety(device: DeviceEntry): BrickRiskOutput;
@@ -0,0 +1,28 @@
1
+ import { UNRECOVERABLE_BRICK_CATEGORIES, } from "./types.js";
2
+ export function applyBrickRiskSafety(device) {
3
+ const isLlmInferred = device.brick_provenance === "llm-inferred";
4
+ const isUnrecoverable = UNRECOVERABLE_BRICK_CATEGORIES.has(device.category);
5
+ if (isLlmInferred && isUnrecoverable) {
6
+ return {
7
+ brick_risk: null,
8
+ brick_risk_label: "brick-risk unknown - research before flashing",
9
+ brick_risk_disclaimer: null,
10
+ };
11
+ }
12
+ if (isLlmInferred) {
13
+ return {
14
+ brick_risk: device.brick_risk,
15
+ brick_risk_label: `${device.brick_risk}/5 (LLM-inferred, unverified)`,
16
+ brick_risk_disclaimer: "Brick risk for this device is LLM-inferred and unverified. Confirm with the linked community before flashing.",
17
+ };
18
+ }
19
+ const provenance = device.brick_provenance === "vendor-docs"
20
+ ? "vendor docs; brick risk estimated"
21
+ : device.brick_provenance;
22
+ return {
23
+ brick_risk: device.brick_risk,
24
+ brick_risk_label: `${device.brick_risk}/5 (${provenance})`,
25
+ brick_risk_disclaimer: null,
26
+ };
27
+ }
28
+ //# sourceMappingURL=safety.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safety.js","sourceRoot":"","sources":["../../src/core/safety.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,GAE/B,MAAM,YAAY,CAAC;AAQpB,MAAM,UAAU,oBAAoB,CAAC,MAAmB;IACtD,MAAM,aAAa,GAAG,MAAM,CAAC,gBAAgB,KAAK,cAAc,CAAC;IACjE,MAAM,eAAe,GAAG,8BAA8B,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE5E,IAAI,aAAa,IAAI,eAAe,EAAE,CAAC;QACrC,OAAO;YACL,UAAU,EAAE,IAAI;YAChB,gBAAgB,EAAE,+CAA+C;YACjE,qBAAqB,EAAE,IAAI;SAC5B,CAAC;IACJ,CAAC;IAED,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO;YACL,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,gBAAgB,EAAE,GAAG,MAAM,CAAC,UAAU,+BAA+B;YACrE,qBAAqB,EACnB,+GAA+G;SAClH,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GACd,MAAM,CAAC,gBAAgB,KAAK,aAAa;QACvC,CAAC,CAAC,mCAAmC;QACrC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC;IAE9B,OAAO;QACL,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,gBAAgB,EAAE,GAAG,MAAM,CAAC,UAAU,OAAO,UAAU,GAAG;QAC1D,qBAAqB,EAAE,IAAI;KAC5B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,247 @@
1
+ import { z } from "zod";
2
+ import type { BuildPlan } from "../build-plan/types.js";
3
+ import { assessHackability } from "./assess.js";
4
+ import { planGadget } from "./plan-gadget.js";
5
+ import type { CoreContext } from "./types.js";
6
+ export declare const getBuildPlanInput: z.ZodObject<{
7
+ device_id: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ device_id: string;
10
+ }, {
11
+ device_id: string;
12
+ }>;
13
+ export type GetBuildPlanInput = z.infer<typeof getBuildPlanInput>;
14
+ type JsonSchema = Record<string, unknown>;
15
+ export interface CoreTool<Input, Output> {
16
+ name: "plan_gadget" | "get_build_plan" | "assess_hackability";
17
+ title: string;
18
+ description: string;
19
+ inputSchema: JsonSchema;
20
+ zodSchema: z.ZodTypeAny;
21
+ run(input: Input, ctx: CoreContext): Output | CoreToolError;
22
+ }
23
+ export interface CoreToolError {
24
+ isError: true;
25
+ text: string;
26
+ }
27
+ export interface CoreToolSuccess {
28
+ isError?: false;
29
+ output: unknown;
30
+ }
31
+ export type CoreToolResult = CoreToolSuccess | CoreToolError;
32
+ export declare const CORE_TOOLS: readonly [{
33
+ name: "plan_gadget";
34
+ title: string;
35
+ description: string;
36
+ inputSchema: {
37
+ type: string;
38
+ properties: {
39
+ idea: {
40
+ type: string;
41
+ minLength: number;
42
+ maxLength: number;
43
+ description: string;
44
+ };
45
+ platform: {
46
+ type: string;
47
+ enum: string[];
48
+ default: string;
49
+ description: string;
50
+ };
51
+ budget_usd: {
52
+ type: string;
53
+ minimum: number;
54
+ maximum: number;
55
+ description: string;
56
+ };
57
+ owned_device_ids: {
58
+ type: string;
59
+ items: {
60
+ type: string;
61
+ };
62
+ maxItems: number;
63
+ description: string;
64
+ };
65
+ needs: {
66
+ type: string;
67
+ items: {
68
+ type: string;
69
+ enum: readonly ["voice", "screen", "images", "touch", "camera", "air-sensors", "e-ink", "battery", "round", "home-tunnel", "big-screen", "compute", "linux"];
70
+ };
71
+ description: string;
72
+ };
73
+ size: {
74
+ type: string;
75
+ enum: string[];
76
+ default: string;
77
+ description: string;
78
+ };
79
+ limit: {
80
+ type: string;
81
+ minimum: number;
82
+ maximum: number;
83
+ default: number;
84
+ description: string;
85
+ };
86
+ };
87
+ required: string[];
88
+ };
89
+ zodSchema: z.ZodObject<{
90
+ idea: z.ZodString;
91
+ platform: z.ZodDefault<z.ZodEnum<["muse-esp32", "muse-linux", "any"]>>;
92
+ budget_usd: z.ZodOptional<z.ZodNumber>;
93
+ owned_device_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
94
+ needs: z.ZodOptional<z.ZodArray<z.ZodEnum<["voice", "screen", "images", "touch", "camera", "air-sensors", "e-ink", "battery", "round", "home-tunnel", "big-screen", "compute", "linux"]>, "many">>;
95
+ size: z.ZodDefault<z.ZodEnum<["pocket", "desk", "wall", "any"]>>;
96
+ limit: z.ZodDefault<z.ZodNumber>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ size: "pocket" | "desk" | "wall" | "any";
99
+ idea: string;
100
+ platform: "any" | "muse-esp32" | "muse-linux";
101
+ limit: number;
102
+ budget_usd?: number | undefined;
103
+ needs?: ("round" | "e-ink" | "battery" | "voice" | "compute" | "linux" | "screen" | "images" | "touch" | "camera" | "air-sensors" | "home-tunnel" | "big-screen")[] | undefined;
104
+ owned_device_ids?: string[] | undefined;
105
+ }, {
106
+ idea: string;
107
+ size?: "pocket" | "desk" | "wall" | "any" | undefined;
108
+ budget_usd?: number | undefined;
109
+ platform?: "any" | "muse-esp32" | "muse-linux" | undefined;
110
+ limit?: number | undefined;
111
+ needs?: ("round" | "e-ink" | "battery" | "voice" | "compute" | "linux" | "screen" | "images" | "touch" | "camera" | "air-sensors" | "home-tunnel" | "big-screen")[] | undefined;
112
+ owned_device_ids?: string[] | undefined;
113
+ }>;
114
+ run: typeof planGadget;
115
+ }, {
116
+ name: "get_build_plan";
117
+ title: string;
118
+ description: string;
119
+ inputSchema: {
120
+ type: string;
121
+ properties: {
122
+ device_id: {
123
+ type: string;
124
+ minLength: number;
125
+ maxLength: number;
126
+ description: string;
127
+ };
128
+ };
129
+ required: string[];
130
+ };
131
+ zodSchema: z.ZodObject<{
132
+ device_id: z.ZodString;
133
+ }, "strip", z.ZodTypeAny, {
134
+ device_id: string;
135
+ }, {
136
+ device_id: string;
137
+ }>;
138
+ run: typeof getBuildPlan;
139
+ }, {
140
+ name: "assess_hackability";
141
+ title: string;
142
+ description: string;
143
+ inputSchema: {
144
+ type: string;
145
+ properties: {
146
+ device_name: {
147
+ type: string;
148
+ minLength: number;
149
+ maxLength: number;
150
+ description: string;
151
+ };
152
+ };
153
+ required: string[];
154
+ };
155
+ zodSchema: z.ZodObject<{
156
+ device_name: z.ZodString;
157
+ }, "strip", z.ZodTypeAny, {
158
+ device_name: string;
159
+ }, {
160
+ device_name: string;
161
+ }>;
162
+ run: typeof assessHackability;
163
+ }];
164
+ export type CoreToolName = (typeof CORE_TOOLS)[number]["name"];
165
+ export declare function coreToolDefinitions(): {
166
+ name: "plan_gadget" | "assess_hackability" | "get_build_plan";
167
+ title: string;
168
+ description: string;
169
+ inputSchema: {
170
+ type: string;
171
+ properties: {
172
+ idea: {
173
+ type: string;
174
+ minLength: number;
175
+ maxLength: number;
176
+ description: string;
177
+ };
178
+ platform: {
179
+ type: string;
180
+ enum: string[];
181
+ default: string;
182
+ description: string;
183
+ };
184
+ budget_usd: {
185
+ type: string;
186
+ minimum: number;
187
+ maximum: number;
188
+ description: string;
189
+ };
190
+ owned_device_ids: {
191
+ type: string;
192
+ items: {
193
+ type: string;
194
+ };
195
+ maxItems: number;
196
+ description: string;
197
+ };
198
+ needs: {
199
+ type: string;
200
+ items: {
201
+ type: string;
202
+ enum: readonly ["voice", "screen", "images", "touch", "camera", "air-sensors", "e-ink", "battery", "round", "home-tunnel", "big-screen", "compute", "linux"];
203
+ };
204
+ description: string;
205
+ };
206
+ size: {
207
+ type: string;
208
+ enum: string[];
209
+ default: string;
210
+ description: string;
211
+ };
212
+ limit: {
213
+ type: string;
214
+ minimum: number;
215
+ maximum: number;
216
+ default: number;
217
+ description: string;
218
+ };
219
+ };
220
+ required: string[];
221
+ } | {
222
+ type: string;
223
+ properties: {
224
+ device_id: {
225
+ type: string;
226
+ minLength: number;
227
+ maxLength: number;
228
+ description: string;
229
+ };
230
+ };
231
+ required: string[];
232
+ } | {
233
+ type: string;
234
+ properties: {
235
+ device_name: {
236
+ type: string;
237
+ minLength: number;
238
+ maxLength: number;
239
+ description: string;
240
+ };
241
+ };
242
+ required: string[];
243
+ };
244
+ }[];
245
+ export declare function executeCoreTool(toolName: string, args: unknown, ctx: CoreContext): CoreToolResult;
246
+ export declare function getBuildPlan(input: GetBuildPlanInput, ctx: CoreContext): BuildPlan | CoreToolError;
247
+ export {};
@@ -0,0 +1,164 @@
1
+ import { z } from "zod";
2
+ import { buildPlan } from "../build-plan/index.js";
3
+ import { assessHackability, assessHackabilityInput, } from "./assess.js";
4
+ import { formatInputError } from "./errors.js";
5
+ import { NEED_VALUES, planGadget, planGadgetInput, } from "./plan-gadget.js";
6
+ export const getBuildPlanInput = z.object({
7
+ device_id: z.string().min(1).max(200),
8
+ });
9
+ export const CORE_TOOLS = [
10
+ {
11
+ name: "plan_gadget",
12
+ title: "Plan a Muse gadget",
13
+ description: "Deterministically plan a physical body for an AI agent using Meta Muse boards. Inputs: `idea` 3-2000 chars; `platform` one of muse-esp32, muse-linux, any (default any); `budget_usd` positive number up to 100000; `owned_device_ids` up to 50 catalog ids; `needs` values: " +
14
+ `${NEED_VALUES.join(", ")}; ` +
15
+ "`size` one of pocket, desk, wall, any (default any); `limit` 1-5 (default 3). Returns fit, notes, warnings, intake questions, picks, terms and next steps.",
16
+ inputSchema: {
17
+ type: "object",
18
+ properties: {
19
+ idea: {
20
+ type: "string",
21
+ minLength: 3,
22
+ maxLength: 2000,
23
+ description: "Gadget idea or use case, 3-2000 characters.",
24
+ },
25
+ platform: {
26
+ type: "string",
27
+ enum: ["muse-esp32", "muse-linux", "any"],
28
+ default: "any",
29
+ description: "Platform filter: muse-esp32, muse-linux, or any. Default any.",
30
+ },
31
+ budget_usd: {
32
+ type: "number",
33
+ minimum: 0,
34
+ maximum: 100000,
35
+ description: "Optional hardware budget in USD. Positive, max 100000.",
36
+ },
37
+ owned_device_ids: {
38
+ type: "array",
39
+ items: { type: "string" },
40
+ maxItems: 50,
41
+ description: "Catalog device ids the user already owns. Max 50.",
42
+ },
43
+ needs: {
44
+ type: "array",
45
+ items: { type: "string", enum: NEED_VALUES },
46
+ description: `Optional explicit needs. Allowed: ${NEED_VALUES.join(", ")}.`,
47
+ },
48
+ size: {
49
+ type: "string",
50
+ enum: ["pocket", "desk", "wall", "any"],
51
+ default: "any",
52
+ description: "Preferred size or placement: pocket, desk, wall, any. Default any.",
53
+ },
54
+ limit: {
55
+ type: "number",
56
+ minimum: 1,
57
+ maximum: 5,
58
+ default: 3,
59
+ description: "Number of picks to return: 1-5, default 3.",
60
+ },
61
+ },
62
+ required: ["idea"],
63
+ },
64
+ zodSchema: planGadgetInput,
65
+ run: planGadget,
66
+ },
67
+ {
68
+ name: "get_build_plan",
69
+ title: "Get a build plan",
70
+ description: "Return the complete deterministic build plan for a catalog device id: parts, shopping list, steps, machine-readable assembly, commands, links, caveats and an agent-ready brief. Input: `device_id` 1-200 chars.",
71
+ inputSchema: {
72
+ type: "object",
73
+ properties: {
74
+ device_id: {
75
+ type: "string",
76
+ minLength: 1,
77
+ maxLength: 200,
78
+ description: "Catalog device id, 1-200 characters.",
79
+ },
80
+ },
81
+ required: ["device_id"],
82
+ },
83
+ zodSchema: getBuildPlanInput,
84
+ run: getBuildPlan,
85
+ },
86
+ {
87
+ name: "assess_hackability",
88
+ title: "Assess hackability",
89
+ description: "Look up a device by id, exact name or substring and return hackability, brick risk, firmware links, community size, build page and agent platform support. Input: `device_name` 1-200 chars.",
90
+ inputSchema: {
91
+ type: "object",
92
+ properties: {
93
+ device_name: {
94
+ type: "string",
95
+ minLength: 1,
96
+ maxLength: 200,
97
+ description: "Device name or id, 1-200 characters.",
98
+ },
99
+ },
100
+ required: ["device_name"],
101
+ },
102
+ zodSchema: assessHackabilityInput,
103
+ run: assessHackability,
104
+ },
105
+ ];
106
+ export function coreToolDefinitions() {
107
+ return CORE_TOOLS.map((tool) => ({
108
+ name: tool.name,
109
+ title: tool.title,
110
+ description: tool.description,
111
+ inputSchema: tool.inputSchema,
112
+ }));
113
+ }
114
+ export function executeCoreTool(toolName, args, ctx) {
115
+ const tool = CORE_TOOLS.find((candidate) => candidate.name === toolName);
116
+ if (!tool) {
117
+ return { isError: true, text: `Unknown tool: ${toolName}` };
118
+ }
119
+ const parsed = tool.zodSchema.safeParse(args);
120
+ if (!parsed.success) {
121
+ return {
122
+ isError: true,
123
+ text: formatInputError(tool.name, parsed.error),
124
+ };
125
+ }
126
+ const result = tool.run(parsed.data, ctx);
127
+ if (isCoreToolError(result))
128
+ return result;
129
+ return { output: result };
130
+ }
131
+ export function getBuildPlan(input, ctx) {
132
+ const device = ctx.catalog.find((candidate) => candidate.id === input.device_id);
133
+ if (!device) {
134
+ // Suggest supported agent-gadget boards first; they are what people ask for.
135
+ const boardIds = ctx.platforms.flatMap((platform) => platform.boards.filter((board) => board.support === "official").map((board) => board.device_id));
136
+ const examples = (boardIds.length > 0 ? boardIds : ctx.catalog.map((candidate) => candidate.id))
137
+ .slice(0, 4)
138
+ .join(", ");
139
+ return {
140
+ isError: true,
141
+ text: `Unknown device_id "${input.device_id}". It isn't in the hackshop catalog. Try one of: ${examples}, or call plan_gadget to find a board for an idea.`,
142
+ };
143
+ }
144
+ const { platform, board } = platformAndBoardFor(device.id, ctx.platforms);
145
+ return buildPlan({
146
+ device,
147
+ platform,
148
+ board,
149
+ printables: ctx.printablesFor(device, ctx.siteUrl),
150
+ siteUrl: ctx.siteUrl,
151
+ });
152
+ }
153
+ function platformAndBoardFor(deviceId, platforms) {
154
+ for (const platform of platforms) {
155
+ const board = platform.boards.find((candidate) => candidate.device_id === deviceId);
156
+ if (board)
157
+ return { platform, board };
158
+ }
159
+ return { platform: null, board: null };
160
+ }
161
+ function isCoreToolError(value) {
162
+ return Boolean(value && typeof value === "object" && "isError" in value);
163
+ }
164
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/core/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EA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