@spectrum-ts/terminal 12.0.0 → 12.1.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.d.ts CHANGED
@@ -102,7 +102,7 @@ interface TerminalInboundMessage {
102
102
  };
103
103
  timestamp: Date;
104
104
  }
105
- declare const terminal: import("@spectrum-ts/core").Platform<import("@spectrum-ts/core").PlatformDef<"Terminal", z.ZodObject<{
105
+ declare const terminal: import("@spectrum-ts/core").Platform<import("@spectrum-ts/core").PlatformDef<"terminal", z.ZodObject<{
106
106
  commands: z.ZodOptional<z.ZodArray<z.ZodObject<{
107
107
  name: z.ZodString;
108
108
  description: z.ZodOptional<z.ZodString>;
package/dist/index.js CHANGED
@@ -257,6 +257,7 @@ async function resolveTuichatBinary(options = {}) {
257
257
  const SHUTDOWN_TIMEOUT_MS = 2e3;
258
258
  const SPAWN_CONNECT_TIMEOUT_MS = 1e4;
259
259
  const INITIALIZE_TIMEOUT_MS = 1e4;
260
+ const PLATFORM_ID = "terminal";
260
261
  const commandSchema = z.object({
261
262
  name: z.string().regex(/^\/[A-Za-z0-9_-]+$/, "command must start with /"),
262
263
  description: z.string().optional()
@@ -534,7 +535,7 @@ async function spectrumToProtocol(content) {
534
535
  type: "text",
535
536
  text: await content.url()
536
537
  };
537
- throw UnsupportedError.content(content.type, "Terminal");
538
+ throw UnsupportedError.content(content.type, PLATFORM_ID);
538
539
  }
539
540
  function protocolToSpectrum(p) {
540
541
  if (p.type === "text" || p.type === "custom") return p;
@@ -586,7 +587,7 @@ function protocolToSpectrum(p) {
586
587
  raw: p
587
588
  };
588
589
  }
589
- const terminal = definePlatform("Terminal", {
590
+ const terminal = definePlatform(PLATFORM_ID, {
590
591
  config: z.object({ commands: z.array(commandSchema).optional() }),
591
592
  message: { schema: z.object({ replyTo: z.object({ messageId: z.string() }).optional() }) },
592
593
  lifecycle: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-ts/terminal",
3
- "version": "12.0.0",
3
+ "version": "12.1.0",
4
4
  "description": "Terminal (tuichat) provider for spectrum-ts — chat with your agent from the command line.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "spectrum": {
29
29
  "key": "terminal",
30
30
  "import": "terminal",
31
- "label": "Terminal"
31
+ "label": "terminal"
32
32
  },
33
33
  "dependencies": {
34
34
  "zod": "^4.2.1"