@el4cteo/rbx-studio-mcp 0.6.1 → 0.6.7

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 (75) hide show
  1. package/README.md +28 -2
  2. package/dist/bridge/console.js +182 -0
  3. package/dist/bridge/console.js.map +1 -1
  4. package/dist/index.js +8 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/cloudassets.js +233 -0
  7. package/dist/lib/cloudassets.js.map +1 -0
  8. package/dist/lib/credentials.js +180 -0
  9. package/dist/lib/credentials.js.map +1 -0
  10. package/dist/lib/livedata.js +325 -0
  11. package/dist/lib/livedata.js.map +1 -0
  12. package/dist/lib/liveluau.js +83 -0
  13. package/dist/lib/liveluau.js.map +1 -0
  14. package/dist/lib/liveops.js +358 -0
  15. package/dist/lib/liveops.js.map +1 -0
  16. package/dist/lib/opencloud.js +235 -0
  17. package/dist/lib/opencloud.js.map +1 -0
  18. package/dist/tools/anim.js +159 -0
  19. package/dist/tools/anim.js.map +1 -0
  20. package/dist/tools/audio.js +96 -0
  21. package/dist/tools/audio.js.map +1 -0
  22. package/dist/tools/character.js +95 -5
  23. package/dist/tools/character.js.map +1 -1
  24. package/dist/tools/data.js +292 -0
  25. package/dist/tools/data.js.map +1 -0
  26. package/dist/tools/device.js +77 -7
  27. package/dist/tools/device.js.map +1 -1
  28. package/dist/tools/discover.js +80 -4
  29. package/dist/tools/discover.js.map +1 -1
  30. package/dist/tools/exec.js +96 -2
  31. package/dist/tools/exec.js.map +1 -1
  32. package/dist/tools/input.js +35 -9
  33. package/dist/tools/input.js.map +1 -1
  34. package/dist/tools/perf.js +74 -7
  35. package/dist/tools/perf.js.map +1 -1
  36. package/dist/tools/scripts.js +162 -6
  37. package/dist/tools/scripts.js.map +1 -1
  38. package/dist/tools/spatial.js +135 -0
  39. package/dist/tools/spatial.js.map +1 -0
  40. package/dist/tools/universe.js +177 -0
  41. package/dist/tools/universe.js.map +1 -0
  42. package/dist/tools/upload.js +294 -0
  43. package/dist/tools/upload.js.map +1 -0
  44. package/dist/tools/world.js +675 -51
  45. package/dist/tools/world.js.map +1 -1
  46. package/package.json +2 -2
  47. package/plugin/src/Commands.luau +31 -7
  48. package/plugin/src/Config.luau +65 -65
  49. package/plugin/src/Console.luau +1909 -1843
  50. package/plugin/src/Emulation.luau +172 -0
  51. package/plugin/src/Phrase.luau +816 -618
  52. package/plugin/src/Png.luau +8 -4
  53. package/plugin/src/Prompt.luau +965 -961
  54. package/plugin/src/Secret.luau +86 -0
  55. package/plugin/src/Serialize.luau +440 -8
  56. package/plugin/src/Undo.luau +94 -6
  57. package/plugin/src/handlers/Anim.luau +897 -0
  58. package/plugin/src/handlers/Assets.luau +286 -2
  59. package/plugin/src/handlers/Audio.luau +411 -0
  60. package/plugin/src/handlers/Capture.luau +155 -20
  61. package/plugin/src/handlers/Character.luau +823 -361
  62. package/plugin/src/handlers/Data.luau +539 -0
  63. package/plugin/src/handlers/Device.luau +394 -139
  64. package/plugin/src/handlers/Discover.luau +685 -363
  65. package/plugin/src/handlers/Geometry.luau +722 -450
  66. package/plugin/src/handlers/Instances.luau +84 -4
  67. package/plugin/src/handlers/Perf.luau +227 -0
  68. package/plugin/src/handlers/Scripts.luau +673 -539
  69. package/plugin/src/handlers/Session.luau +3 -0
  70. package/plugin/src/handlers/Spatial.luau +334 -0
  71. package/plugin/src/handlers/Viewport.luau +268 -0
  72. package/plugin/src/handlers/World.luau +89 -15
  73. package/plugin/src/init.server.luau +9 -1
  74. package/scripts/build-plugin.mjs +20 -0
  75. package/scripts/check-plugin.mjs +171 -124
@@ -0,0 +1,159 @@
1
+ import { z } from "zod";
2
+ import { json, table, text, textOf } from "../lib/format.js";
3
+ import { defineTool } from "../lib/tool.js";
4
+ /** Downloads go to Roblox's asset servers, which are not always quick. */
5
+ const TIMEOUT_MS = 45_000;
6
+ export function registerAnimTools(context) {
7
+ const { bridge } = context;
8
+ defineTool(context, {
9
+ name: "animation",
10
+ title: "Read and build animations",
11
+ description: "Reads an animation's actual keyframes, and builds new ones that play " +
12
+ "immediately in the open Studio.\n\n" +
13
+ "Animations are the one part of a place no other tool can see. " +
14
+ "`inspect` on an Animation instance returns an asset id and stops there " +
15
+ "— the poses live on Roblox's servers. `read` downloads them, so you can " +
16
+ "answer 'how long is it', 'which joints does it move', and 'does it end " +
17
+ "where it started' without opening the Animation Editor and scrubbing.\n\n" +
18
+ "`read` takes an asset id, an rbxassetid:// string, or the path of an " +
19
+ "Animation instance in the place — whichever you already have. It reports " +
20
+ "which RIG the animation was made for, which is the thing most worth " +
21
+ "knowing: an R15 animation on an R6 character does nothing at all — no " +
22
+ "error, no movement — and the asset id gives no hint either way.\n\n" +
23
+ "`build` goes the other way: give it keyframes and it returns a content " +
24
+ "id you can put straight into an Animation's AnimationId. Nothing is " +
25
+ "uploaded and nothing is moderated — the id works in this Studio session " +
26
+ "and nowhere else, which makes it the right way to try an idea and the " +
27
+ "wrong way to ship one.\n\n" +
28
+ "`preview` puts an animation ONTO a rig in the open place and freezes it " +
29
+ "at a chosen moment, so `screenshot` can show you the pose. It works in " +
30
+ "edit mode — no playtest. Ask for several moments in turn to compare " +
31
+ "poses across the animation; the rig stays posed until `stop`.\n\n" +
32
+ "Poses are written the way a CFrame property is: \"0, 1, 0\" for a " +
33
+ "position, \"0, 1, 0 | 0, 45, 0\" to rotate as well.\n\n" +
34
+ "The id `build` returns is a bare hash, not an rbxassetid:// URL. Use it " +
35
+ "exactly as given — prefixing it stops it working.",
36
+ inputSchema: {
37
+ op: z
38
+ .enum(["read", "preview", "build", "stop"])
39
+ .default("read")
40
+ .describe("'read' downloads an existing animation, 'preview' poses a rig at one " +
41
+ "moment of it so you can screenshot it, 'build' makes a new one " +
42
+ "playable here, 'stop' clears a preview."),
43
+ assetId: z
44
+ .union([z.number(), z.string()])
45
+ .optional()
46
+ .describe('read only: animation asset id (12345), "rbxassetid://12345", or the ' +
47
+ 'path of an Animation instance ("Workspace.Rig.Animate.run").'),
48
+ keyframes: z
49
+ .array(z.object({
50
+ time: z.number().min(0).describe("Seconds from the start of the animation."),
51
+ name: z.string().optional().describe('Keyframe name, e.g. "Start" or a marker name.'),
52
+ poses: z
53
+ .record(z.string(), z.string())
54
+ .optional()
55
+ .describe('Joint name → CFrame, e.g. { "Right Arm": "0, 0.5, 0 | 0, 0, 45" }. ' +
56
+ "Joint names must match the rig's parts."),
57
+ }))
58
+ .max(200)
59
+ .optional()
60
+ .describe("build only: the keyframes, in any order — they are sorted by time."),
61
+ name: z.string().optional().describe("build only: name for the sequence."),
62
+ root: z
63
+ .string()
64
+ .optional()
65
+ .describe('build only: the rig part every pose hangs from. Defaults to "HumanoidRootPart", ' +
66
+ "which is right for an R15 or R6 character."),
67
+ priority: z
68
+ .enum(["Idle", "Movement", "Action", "Core"])
69
+ .optional()
70
+ .describe("build only: which animations this one plays over."),
71
+ loop: z.boolean().optional().describe("build only: whether it repeats."),
72
+ rig: z
73
+ .string()
74
+ .optional()
75
+ .describe('The model, e.g. "Workspace.Dummy". For preview/stop it is the rig to ' +
76
+ "pose, and needs a Humanoid or an AnimationController inside it. For " +
77
+ "`build` it is optional and is read for its joint layout — pass it for " +
78
+ "anything that is not a standard R6 or R15 character (a custom rig, a " +
79
+ "weapon, a door, a Blender import), or the poses may be attached in the " +
80
+ "wrong order and the animation will move nothing."),
81
+ at: z
82
+ .number()
83
+ .min(0)
84
+ .optional()
85
+ .describe("preview only: the moment to freeze on, in seconds. Ask for several " +
86
+ "in turn to compare poses across the animation."),
87
+ hold: z
88
+ .boolean()
89
+ .default(true)
90
+ .describe("preview only: freeze on that frame. Turn off to let it play, but then " +
91
+ "a screenshot catches whatever pose it happens to be in."),
92
+ studioId: z.string().optional().describe("Target Studio; omit for the active one."),
93
+ },
94
+ readOnly: false,
95
+ destructive: false,
96
+ }, async (args) => {
97
+ if (args.op === "preview" || args.op === "stop") {
98
+ if (!args.rig)
99
+ return text("preview needs a `rig` — the model to pose.");
100
+ const posed = await bridge.call("anim.preview", { op: args.op, rig: args.rig, assetId: args.assetId, at: args.at, hold: args.hold }, { studioId: args.studioId, timeoutMs: TIMEOUT_MS });
101
+ return json(posed);
102
+ }
103
+ if (args.op === "build") {
104
+ if (!args.keyframes || args.keyframes.length === 0) {
105
+ return text("build needs a non-empty `keyframes` array.");
106
+ }
107
+ const built = await bridge.call("anim.build", {
108
+ keyframes: args.keyframes,
109
+ name: args.name,
110
+ root: args.root,
111
+ rig: args.rig,
112
+ priority: args.priority,
113
+ loop: args.loop,
114
+ }, { studioId: args.studioId, timeoutMs: TIMEOUT_MS });
115
+ return json(built, "Set this as an Animation's AnimationId with `modify`, exactly as it appears " +
116
+ "— it is a bare hash, and adding rbxassetid:// in front of it stops it " +
117
+ "working. Local to this Studio session: not uploaded, gone on restart.\n\n" +
118
+ "`hierarchy` says which joint layout the poses were nested against — the " +
119
+ "rig you named, or the R6/R15 standard guessed from the joint names. " +
120
+ "Anything in `unmatchedJoints` is a name that layout does not contain: " +
121
+ "those poses were attached to the root and will almost certainly do " +
122
+ "nothing. Pass `rig` to fix it.");
123
+ }
124
+ if (args.assetId === undefined) {
125
+ return text("read needs an `assetId` — a number, an rbxassetid:// string, or a path to an Animation.");
126
+ }
127
+ const found = await bridge.call("anim.read", { assetId: args.assetId }, { studioId: args.studioId, timeoutMs: TIMEOUT_MS });
128
+ /*
129
+ * A summary first, then the timeline. The three facts at the top are what
130
+ * the question was, and burying them under forty rows of keyframes would
131
+ * make the tool technically complete and practically unreadable.
132
+ */
133
+ const lines = [
134
+ `${found.name ?? found.assetId} — ${found.rig} rig, ${found.duration}s, ` +
135
+ `${found.keyframeCount} keyframes, ${found.jointCount} joints moved`,
136
+ `Priority ${found.priority}${found.looping ? ", loops" : ", does not loop"}` +
137
+ (found.rigNote !== undefined ? ` — ${found.rigNote}` : ""),
138
+ "",
139
+ `Joints: ${found.joints.join(", ") || "none"}` +
140
+ (found.jointsSampled ? ` … and ${found.jointCount - found.joints.length} more` : ""),
141
+ ];
142
+ if (found.rig === "R6" || found.rig === "R15") {
143
+ lines.push("", `This is an ${found.rig} animation. It will do NOTHING on an ${found.rig === "R6" ? "R15" : "R6"} character — no error, no movement, because the joint names do not exist ` +
144
+ "on the other rig. Check the character's rig type before using it.");
145
+ }
146
+ if (found.looping && found.endsWhereItStarted === false) {
147
+ lines.push("", "WARNING: this animation loops, but these joints do not end where they " +
148
+ `started: ${(found.driftingJoints ?? []).join(", ")}. That is what a ` +
149
+ "visible jump at the loop point looks like.");
150
+ }
151
+ lines.push("", textOf(table(["index", "time", "name", "poseCount"], found.keyframes, {
152
+ more: found.truncated
153
+ ? `poses expanded for the first 40 keyframes only`
154
+ : undefined,
155
+ })));
156
+ return text(lines.join("\n"));
157
+ });
158
+ }
159
+ //# sourceMappingURL=anim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anim.js","sourceRoot":"","sources":["../../src/tools/anim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAmB,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAoB,MAAM,gBAAgB,CAAC;AA2B9D,0EAA0E;AAC1E,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,MAAM,UAAU,iBAAiB,CAAC,OAAoB;IACpD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3B,UAAU,CACR,OAAO,EACP;QACE,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,2BAA2B;QAClC,WAAW,EACT,uEAAuE;YACvE,qCAAqC;YACrC,gEAAgE;YAChE,yEAAyE;YACzE,0EAA0E;YAC1E,yEAAyE;YACzE,2EAA2E;YAC3E,uEAAuE;YACvE,2EAA2E;YAC3E,sEAAsE;YACtE,wEAAwE;YACxE,qEAAqE;YACrE,yEAAyE;YACzE,sEAAsE;YACtE,0EAA0E;YAC1E,wEAAwE;YACxE,4B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AAc,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB;gBACtE,4CAA4C,CAC/C,CAAC;QACJ,CAAC;QAED,KAAK,CAAC,IAAI,CACR,EAAE,EACF,MAAM,CACJ,KAAK,CACH,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EACtC,KAAK,CAAC,SAAsD,EAC5D;YACE,IAAI,EAAE,KAAK,CAAC,SAAS;gBACnB,CAAC,CAAC,gDAAgD;gBAClD,CAAC,CAAC,SAAS;SACd,CACF,CACF,CACF,CAAC;QAEF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChC,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { z } from "zod";
2
+ import { json } from "../lib/format.js";
3
+ import { defineTool } from "../lib/tool.js";
4
+ export function registerAudioTools(context) {
5
+ const { bridge } = context;
6
+ defineTool(context, {
7
+ name: "audio",
8
+ title: "Wire up Roblox's audio graph",
9
+ description: "Builds and inspects the modern audio API — AudioPlayer, emitters, " +
10
+ "effects and the Wires between them.\n\n" +
11
+ "Roblox's modern audio is a signal graph, not one instance with a Play " +
12
+ "method. An `AudioPlayer` holds the asset, an `AudioEmitter` puts the " +
13
+ "sound in the world or an `AudioDeviceOutput` sends it to the player's " +
14
+ "speakers, effects sit in between, and NOTHING is connected until a " +
15
+ "`Wire` joins two named pins. A place can hold a perfectly configured " +
16
+ "AudioPlayer with the right asset and the right volume and be " +
17
+ "completely silent, with no error anywhere, because the wire was never " +
18
+ "made. That is what this tool is for: `create` can make each instance, " +
19
+ "but the pin names, the direction and the choice of sink are where it " +
20
+ "actually goes wrong.\n\n" +
21
+ "`graph` is the one to reach for: it builds a whole working chain in " +
22
+ "one undoable step. `kind=\"world\"` gives a sound that comes from a " +
23
+ "part; `kind=\"ui\"` gives one with no position, for menus and music. " +
24
+ "Add `effects` to splice reverb, EQ or a fader into the chain.\n\n" +
25
+ "`wire` joins two instances you already have. `inspect` reads an " +
26
+ "existing graph back and reports every connection — including the ones " +
27
+ "that report Connected = false, which the Explorer does not show and " +
28
+ "which are the usual reason for silence.\n\n" +
29
+ "The old `Sound` instance still works and is still shorter for a plain " +
30
+ "one-off noise; use `create` for that. Come here when the case needs " +
31
+ "effects, per-listener mixing, or one emitter fed by several sources.",
32
+ inputSchema: {
33
+ op: z
34
+ .enum(["graph", "wire", "inspect"])
35
+ .default("graph")
36
+ .describe("'graph' builds a whole working chain, 'wire' joins two existing " +
37
+ "instances, 'inspect' reads a graph back."),
38
+ kind: z
39
+ .enum(["world", "ui"])
40
+ .optional()
41
+ .describe("graph only: 'world' is a sound heard from a place — it needs a " +
42
+ "part to come from. 'ui' has no position: menu clicks, music. " +
43
+ "Defaults to 'world'."),
44
+ parent: z
45
+ .string()
46
+ .optional()
47
+ .describe('graph only: where the graph goes. For kind="world" this is the ' +
48
+ "part or attachment the sound comes from."),
49
+ asset: z
50
+ .string()
51
+ .optional()
52
+ .describe('graph only: the audio id, e.g. "rbxassetid://1234". Find one with ' +
53
+ '`assets op="search" kind="audio"`. Leave it out to build the ' +
54
+ "chain now and set the asset later."),
55
+ name: z.string().optional().describe("graph only: name for the AudioPlayer."),
56
+ effects: z
57
+ .array(z.string())
58
+ .optional()
59
+ .describe("graph only: effect classes to splice between the player and the " +
60
+ 'output, in order, e.g. ["AudioFader", "AudioReverb"]. Also ' +
61
+ "accepts AudioEqualizer, AudioCompressor, AudioEcho, " +
62
+ "AudioDistortion, AudioPitchShifter, AudioChorus, AudioFlanger " +
63
+ "and AudioLimiter."),
64
+ from: z.string().optional().describe("wire only: the instance sound comes OUT of."),
65
+ to: z.string().optional().describe("wire only: the instance sound goes INTO."),
66
+ fromPin: z
67
+ .string()
68
+ .optional()
69
+ .describe('wire only: the source\'s output pin. Defaults to "Output", which ' +
70
+ "is right for everything but a channel splitter."),
71
+ toPin: z
72
+ .string()
73
+ .optional()
74
+ .describe('wire only: the target\'s input pin. Defaults to "Input". A wrong ' +
75
+ "pin name is accepted by the engine and produces silence, so the " +
76
+ "name is checked against the instance before the wire is made."),
77
+ path: z
78
+ .string()
79
+ .optional()
80
+ .describe("inspect only: where to look. Omit to walk the whole place, which " +
81
+ "is the right call when tracking down silence of unknown origin."),
82
+ studioId: z.string().optional().describe("Target Studio; omit for the active one."),
83
+ },
84
+ }, async (args) => {
85
+ const { op, studioId, ...rest } = args;
86
+ const response = await bridge.call(op === "wire" ? "audio.wire" : op === "inspect" ? "audio.inspect" : "audio.graph", rest, { studioId, timeoutMs: 30_000 });
87
+ if (op === "graph") {
88
+ return json(response, "Nothing plays on its own — call `AudioPlayer:Play()` from a script, " +
89
+ "or set `Playing` with `modify`. Check the result's `note` and " +
90
+ "`warnings` first: they are the difference between a graph that is " +
91
+ "wired and one that is audible.");
92
+ }
93
+ return json(response);
94
+ });
95
+ }
96
+ //# sourceMappingURL=audio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/tools/audio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAmB,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAoB,MAAM,gBAAgB,CAAC;AAE9D,MAAM,UAAU,kBAAkB,CAAC,OAAoB;IACrD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3B,UAAU,CACR,OAAO,EACP;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,8BAA8B;QACrC,WAAW,EACT,oEAAoE;YACpE,yCAAyC;YACzC,wEAAwE;YACxE,uEAAuE;YACvE,wEAAwE;YACxE,qEAAqE;YACrE,uEAAuE;YACvE,+DAA+D;YAC/D,wEAAwE;YACxE,wEAAwE;YACxE,uEAAuE;YACvE,0BAA0B;YAC1B,sEAAsE;YACtE,sEAAsE;YACtE,uEAAuE;YACvE,mEAAmE;Y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QAAQ,CACP,mEAAmE;gBACjE,iDAAiD,CACpD;YACH,KAAK,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP,mEAAmE;gBACjE,kEAAkE;gBAClE,+DAA+D,CAClE;YACH,IAAI,EAAE,CAAC;iBACJ,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP,mEAAmE;gBACjE,iEAAiE,CACpE;YACH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;SACpF;KACF,EACD,KAAK,EAAE,IAAI,EAAuB,EAAE;QAClC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;QACvC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAChC,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,EACjF,IAAI,EACJ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,CAChC,CAAC;QAEF,IAAI,EAAE,KAAK,OAAO,EAAE,CAAC;YACnB,OAAO,IAAI,CACT,QAAQ,EACR,sEAAsE;gBACpE,gEAAgE;gBAChE,oEAAoE;gBACpE,gCAAgC,CACnC,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { json } from "../lib/format.js";
2
+ import { json, table, text, textOf } from "../lib/format.js";
3
3
  import { defineTool } from "../lib/tool.js";
4
4
  export function registerCharacterTools(context) {
5
5
  const { bridge } = context;
@@ -33,8 +33,9 @@ export function registerCharacterTools(context) {
33
33
  "use `playtest op=play`.",
34
34
  inputSchema: {
35
35
  op: z
36
- .enum(["moveTo", "act", "state"])
37
- .describe("'moveTo' walks somewhere, 'act' performs an action, 'state' only reports."),
36
+ .enum(["moveTo", "path", "act", "state"])
37
+ .describe("'moveTo' walks somewhere, 'path' checks a route without walking it, " +
38
+ "'act' performs an action, 'state' only reports."),
38
39
  to: z
39
40
  .string()
40
41
  .optional()
@@ -43,6 +44,46 @@ export function registerCharacterTools(context) {
43
44
  .string()
44
45
  .optional()
45
46
  .describe("moveTo only: walk to this instance instead of a coordinate."),
47
+ from: z
48
+ .string()
49
+ .optional()
50
+ .describe('path only: where the route starts, e.g. "0, 5, 0". Defaults to the character.'),
51
+ fromPath: z
52
+ .string()
53
+ .optional()
54
+ .describe('path only: an instance to start from, e.g. "Workspace.SpawnLocation".'),
55
+ toPath: z
56
+ .string()
57
+ .optional()
58
+ .describe("path only: an instance to end at instead of `to`."),
59
+ agentRadius: z
60
+ .number()
61
+ .min(0.1)
62
+ .max(50)
63
+ .optional()
64
+ .describe("How wide the walker is, in studs. Defaults to 2 — a standard " +
65
+ "character. Raise it to ask whether a bigger NPC fits through the " +
66
+ "same gaps a player does."),
67
+ agentHeight: z
68
+ .number()
69
+ .min(0.1)
70
+ .max(100)
71
+ .optional()
72
+ .describe("How tall the walker is. Defaults to 5, a standard character."),
73
+ canClimb: z.boolean().optional().describe("Whether it may climb truss. Off by default."),
74
+ spacing: z
75
+ .number()
76
+ .min(0.1)
77
+ .max(100)
78
+ .optional()
79
+ .describe("Studs between waypoints, default 4. Tighter follows the geometry more " +
80
+ "closely; wider is a coarser route."),
81
+ costs: z
82
+ .record(z.string(), z.number())
83
+ .optional()
84
+ .describe('Material or PathfindingModifier label → cost, e.g. { "Water": 20 } to ' +
85
+ "avoid swimming. Higher is more avoided; the route chosen is the " +
86
+ "cheapest total, not the shortest."),
46
87
  direct: z
47
88
  .boolean()
48
89
  .default(false)
@@ -69,15 +110,64 @@ export function registerCharacterTools(context) {
69
110
  },
70
111
  destructive: false,
71
112
  }, async (args) => {
113
+ /*
114
+ * Agent shape travels with both ops, from one place, so a route `path`
115
+ * reports as walkable is a route `moveTo` walks with the same body.
116
+ */
117
+ const agent = {
118
+ agentRadius: args.agentRadius,
119
+ agentHeight: args.agentHeight,
120
+ canJump: args.canJump,
121
+ canClimb: args.canClimb,
122
+ spacing: args.spacing,
123
+ costs: args.costs,
124
+ };
125
+ if (args.op === "path") {
126
+ const route = await bridge.call("character.path", { from: args.from, fromPath: args.fromPath, to: args.to, toPath: args.toPath, ...agent }, { studioId: args.studioId, timeoutMs: 30_000 });
127
+ if (!route.reachable) {
128
+ return text(`No route: ${route.status}.\n` +
129
+ `${route.from} → ${route.to} is ${route.straightLineDistance} studs apart in a ` +
130
+ `straight line, but nothing walkable connects them for an agent this size.\n\n` +
131
+ route.hint);
132
+ }
133
+ const lines = [
134
+ `Reachable — ${route.pathDistance} studs walked vs ${route.straightLineDistance} ` +
135
+ `straight (detour ${route.detour}x), ${route.waypointCount} waypoints, ${route.jumps} jump(s).`,
136
+ ];
137
+ if (route.detour > 2) {
138
+ lines.push("", `That is a long way round for the distance. Something between the two points ` +
139
+ "is forcing a detour — worth a look if it was meant to be a direct route.");
140
+ }
141
+ if (route.jumps > 0) {
142
+ lines.push("", `${route.jumps} jump(s) on this route. Anything that cannot jump — a vehicle, ` +
143
+ "an NPC with jumping disabled — cannot follow it.");
144
+ }
145
+ lines.push("", textOf(table(["index", "action", "position", "label"], route.waypoints, { more: "walking waypoints between these are omitted" })));
146
+ return text(lines.join("\n"));
147
+ }
72
148
  if (args.op === "moveTo") {
73
- const response = await bridge.call("character.moveTo", { to: args.to, path: args.path, direct: args.direct, canJump: args.canJump, player: args.player },
149
+ const response = await bridge.call("character.moveTo", { to: args.to, path: args.path, direct: args.direct, player: args.player, ...agent },
74
150
  // Walking a long route is genuinely slow, and the handler waits for
75
151
  // each waypoint rather than returning before it arrives.
76
152
  { studioId: args.studioId, timeoutMs: 60_000 });
77
153
  const notes = [];
78
154
  if (response.note)
79
155
  notes.push(response.note);
80
- if (!response.arrived && response.pathStatus === "Enum.PathStatus.Success") {
156
+ /*
157
+ * Only add the vague advice when the handler could not name a cause.
158
+ * With `blockedBy` set it already said which instance is in the way,
159
+ * and following that with "something is in the way" reads as if the
160
+ * tool did not know — which it did.
161
+ */
162
+ /*
163
+ * Only when the handler said nothing itself. It already explains what
164
+ * happened in `note`, and appending "something is physically in the
165
+ * way" after "nothing was in the ray's way" contradicts it in the same
166
+ * breath.
167
+ */
168
+ if (!response.arrived &&
169
+ response.note === undefined &&
170
+ response.pathStatus === "Enum.PathStatus.Success") {
81
171
  notes.push("The path was valid but the character did not reach the end — something " +
82
172
  "is physically in the way, or it fell. Take a `screenshot` to see where it stopped.");
83
173
  }
@@ -1 +1 @@
1
- {"version":3,"file":"character.js","sourceRoot":"","sources":["../../src/tools/character.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAmB,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAoB,MAAM,gBAAgB,CAAC;AAc9D,MAAM,UAAU,sBAAsB,CAAC,OAAoB;IACzD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3B,UAAU,CACR,OAAO,EACP;QACE,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,oCAAoC;QAC3C,WAAW,EACT,mEAAmE;YACnE,gEAAgE;YAChE,mEAAmE;YACnE,wEAAwE;YACxE,wEAAwE;YACxE,sEAAsE;YACtE,qCAAqC;YACrC,kEAAkE;YAClE,wEAAwE;YACxE,sEAAsE;YACtE,8DAA8D;YAC9D,wEAAwE;YACxE,kEAAkE;YAClE,wEAAwE;YACxE,yDAAyD;YACzD,uEAAuE;YACvE,yEAAyE;YACzE,qEAAqE;YACrE,wEAAwE;YACxE,mEAAmE;YACnE,qDAAqD;YACrD,yEAAyE;YACzE,6DAA6D;YAC7D,sEAAsE;YACtE,yBAAyB;QAC3B,WAAW,EA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