terse-types 0.0.51 → 0.0.53

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.
@@ -148,7 +148,15 @@ export declare const ApiRoutes: {
148
148
  TOOL_EXECUTE: string;
149
149
  TOOL_DEFINITIONS: string;
150
150
  RUN_TRIGGER_EVENT: string;
151
+ TEST_RUN: string;
152
+ TEST_RUN_FINALIZE: string;
151
153
  AGENT_RUN: string;
154
+ MEMORY_LIST: string;
155
+ MEMORY_GET: string;
156
+ MEMORY_PUT: string;
157
+ MEMORY_DELETE: string;
158
+ STATE_GET: string;
159
+ STATE_PUT: string;
152
160
  APPROVAL_DECISION: string;
153
161
  SESSION_EVENTS: string;
154
162
  LISTEN: string;
@@ -148,7 +148,15 @@
148
148
  "TOOL_EXECUTE": "/sdk/tool-execute",
149
149
  "TOOL_DEFINITIONS": "/sdk/tool-definitions",
150
150
  "RUN_TRIGGER_EVENT": "/sdk/runs/:runId/trigger-event",
151
+ "TEST_RUN": "/sdk/test-run",
152
+ "TEST_RUN_FINALIZE": "/sdk/test-run/:runId/finalize",
151
153
  "AGENT_RUN": "/sdk/agent-run",
154
+ "MEMORY_LIST": "/sdk/memory/list",
155
+ "MEMORY_GET": "/sdk/memory/get",
156
+ "MEMORY_PUT": "/sdk/memory/put",
157
+ "MEMORY_DELETE": "/sdk/memory/delete",
158
+ "STATE_GET": "/sdk/state/get",
159
+ "STATE_PUT": "/sdk/state/put",
152
160
  "APPROVAL_DECISION": "/sdk/approval-decision",
153
161
  "SESSION_EVENTS": "/sdk/session-events",
154
162
  "LISTEN": "/sdk/listen",
package/dist/Configs.d.ts CHANGED
@@ -16,6 +16,7 @@ export declare enum ConfigType {
16
16
  LAUNCHDARKLY = "launchdarkly",
17
17
  WEB = "web",
18
18
  IMAGE_EDIT = "image_edit",
19
+ MEMORY = "memory",
19
20
  WORKOS_INPUT = "workos_input",
20
21
  WORKOS_OUTPUT = "workos_output",
21
22
  ATTIO_INPUT = "attio_input",
@@ -160,6 +161,14 @@ export declare const ImageEditConfigMetadata: {
160
161
  readonly isInput: false;
161
162
  readonly isOutput: true;
162
163
  };
164
+ export declare const MemoryConfigMetadata: {
165
+ readonly configType: ConfigType.MEMORY;
166
+ readonly name: "Memory";
167
+ readonly description: "Built-in persistent memory the agent can read and write across runs";
168
+ readonly integrationType: IntegrationType.TERSE;
169
+ readonly isInput: false;
170
+ readonly isOutput: true;
171
+ };
163
172
  export declare const WorkOSInputConfigMetadata: {
164
173
  readonly configType: ConfigType.WORKOS_INPUT;
165
174
  readonly name: "WorkOS";
@@ -702,6 +711,18 @@ export declare class ImageEditConfig extends BaseConfigInstance<IntegrationType.
702
711
  isComplete(): boolean;
703
712
  formatForAgent(): string;
704
713
  }
714
+ export declare const MemoryConfigSchema: z.ZodObject<{
715
+ integrationId: z.ZodLiteral<"system">;
716
+ integrationType: z.ZodLiteral<IntegrationType.TERSE>;
717
+ configType: z.ZodLiteral<ConfigType.MEMORY>;
718
+ }, z.core.$strip>;
719
+ export type MemoryConfigData = z.infer<typeof MemoryConfigSchema>;
720
+ export type MemoryConfigInstance = MemoryConfigData & ConfigBehavior;
721
+ export declare class MemoryConfig extends BaseConfigInstance<IntegrationType.TERSE, ConfigType.MEMORY, "system"> implements MemoryConfigInstance {
722
+ constructor();
723
+ isComplete(): boolean;
724
+ formatForAgent(): string;
725
+ }
705
726
  export declare const WorkOSInputConfigSchema: z.ZodObject<{
706
727
  integrationId: z.ZodString;
707
728
  integrationType: z.ZodLiteral<IntegrationType.WORKOS>;
@@ -1086,6 +1107,10 @@ export declare const configDataSchema: z.ZodUnion<readonly [z.ZodObject<{
1086
1107
  integrationId: z.ZodLiteral<"system">;
1087
1108
  integrationType: z.ZodLiteral<IntegrationType.TERSE>;
1088
1109
  configType: z.ZodLiteral<ConfigType.IMAGE_EDIT>;
1110
+ }, z.core.$strip>, z.ZodObject<{
1111
+ integrationId: z.ZodLiteral<"system">;
1112
+ integrationType: z.ZodLiteral<IntegrationType.TERSE>;
1113
+ configType: z.ZodLiteral<ConfigType.MEMORY>;
1089
1114
  }, z.core.$strip>, z.ZodObject<{
1090
1115
  integrationId: z.ZodString;
1091
1116
  integrationType: z.ZodLiteral<IntegrationType.WORKOS>;
@@ -1443,6 +1468,10 @@ export declare const skillConfigDataSchema: z.ZodUnion<readonly [z.ZodObject<{
1443
1468
  integrationId: z.ZodLiteral<"system">;
1444
1469
  integrationType: z.ZodLiteral<IntegrationType.TERSE>;
1445
1470
  configType: z.ZodLiteral<ConfigType.IMAGE_EDIT>;
1471
+ }, z.core.$strip>, z.ZodObject<{
1472
+ integrationId: z.ZodLiteral<"system">;
1473
+ integrationType: z.ZodLiteral<IntegrationType.TERSE>;
1474
+ configType: z.ZodLiteral<ConfigType.MEMORY>;
1446
1475
  }, z.core.$strip>, z.ZodObject<{
1447
1476
  integrationId: z.ZodString;
1448
1477
  integrationType: z.ZodLiteral<IntegrationType.WORKOS>;
@@ -1477,6 +1506,7 @@ export type ConfigMetadataMap = EnsureExhaustiveMetadata<{
1477
1506
  [ConfigType.LAUNCHDARKLY]: typeof LaunchDarklyConfig;
1478
1507
  [ConfigType.WEB]: typeof WebConfig;
1479
1508
  [ConfigType.IMAGE_EDIT]: typeof ImageEditConfig;
1509
+ [ConfigType.MEMORY]: typeof MemoryConfig;
1480
1510
  [ConfigType.WORKOS_INPUT]: typeof WorkOSInputConfig;
1481
1511
  [ConfigType.WORKOS_OUTPUT]: typeof WorkOSOutputConfig;
1482
1512
  [ConfigType.ATTIO_INPUT]: typeof AttioInputConfig;
package/dist/Configs.js CHANGED
@@ -17,6 +17,7 @@ export var ConfigType;
17
17
  ConfigType["LAUNCHDARKLY"] = "launchdarkly";
18
18
  ConfigType["WEB"] = "web";
19
19
  ConfigType["IMAGE_EDIT"] = "image_edit";
20
+ ConfigType["MEMORY"] = "memory";
20
21
  ConfigType["WORKOS_INPUT"] = "workos_input";
21
22
  ConfigType["WORKOS_OUTPUT"] = "workos_output";
22
23
  ConfigType["ATTIO_INPUT"] = "attio_input";
@@ -149,6 +150,14 @@ export const ImageEditConfigMetadata = {
149
150
  isInput: false,
150
151
  isOutput: true
151
152
  };
153
+ export const MemoryConfigMetadata = {
154
+ configType: ConfigType.MEMORY,
155
+ name: "Memory",
156
+ description: "Built-in persistent memory the agent can read and write across runs",
157
+ integrationType: IntegrationType.TERSE,
158
+ isInput: false,
159
+ isOutput: true
160
+ };
152
161
  export const WorkOSInputConfigMetadata = {
153
162
  configType: ConfigType.WORKOS_INPUT,
154
163
  name: "WorkOS",
@@ -229,6 +238,7 @@ export const CONFIG_DETAILS = {
229
238
  [ConfigType.LAUNCHDARKLY]: LaunchDarklyConfigMetadata,
230
239
  [ConfigType.WEB]: WebConfigMetadata,
231
240
  [ConfigType.IMAGE_EDIT]: ImageEditConfigMetadata,
241
+ [ConfigType.MEMORY]: MemoryConfigMetadata,
232
242
  [ConfigType.WORKOS_INPUT]: WorkOSInputConfigMetadata,
233
243
  [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfigMetadata,
234
244
  [ConfigType.ATTIO_INPUT]: AttioInputConfigMetadata,
@@ -783,6 +793,22 @@ export class ImageEditConfig extends BaseConfigInstance {
783
793
  return "Type: Image Edit";
784
794
  }
785
795
  }
796
+ export const MemoryConfigSchema = ConfigInstanceSchema.extend({
797
+ integrationId: z.literal("system"),
798
+ integrationType: z.literal(IntegrationType.TERSE),
799
+ configType: z.literal(ConfigType.MEMORY)
800
+ });
801
+ export class MemoryConfig extends BaseConfigInstance {
802
+ constructor() {
803
+ super("system", IntegrationType.TERSE, ConfigType.MEMORY);
804
+ }
805
+ isComplete() {
806
+ return true;
807
+ }
808
+ formatForAgent() {
809
+ return "Type: Memory (persistent across runs)";
810
+ }
811
+ }
786
812
  export const WorkOSInputConfigSchema = ConfigInstanceSchema.extend({
787
813
  integrationType: z.literal(IntegrationType.WORKOS),
788
814
  configType: z.literal(ConfigType.WORKOS_INPUT),
@@ -998,6 +1024,7 @@ export const configDataSchema = z.union([
998
1024
  LaunchDarklyConfigSchema,
999
1025
  WebConfigSchema,
1000
1026
  ImageEditConfigSchema,
1027
+ MemoryConfigSchema,
1001
1028
  WorkOSInputConfigSchema,
1002
1029
  WorkOSOutputConfigSchema,
1003
1030
  AttioInputConfigSchema,
@@ -1033,6 +1060,7 @@ export const skillConfigDataSchema = z.union([
1033
1060
  LaunchDarklyConfigSchema,
1034
1061
  WebConfigSchema,
1035
1062
  ImageEditConfigSchema,
1063
+ MemoryConfigSchema,
1036
1064
  WorkOSOutputConfigSchema,
1037
1065
  AttioOutputConfigSchema,
1038
1066
  SnowflakeOutputConfigSchema
@@ -1049,6 +1077,7 @@ export function isConfigComplete(config) {
1049
1077
  case ConfigType.LINEAR_INPUT:
1050
1078
  case ConfigType.WEB:
1051
1079
  case ConfigType.IMAGE_EDIT:
1080
+ case ConfigType.MEMORY:
1052
1081
  case ConfigType.WEBHOOK_INPUT:
1053
1082
  return true;
1054
1083
  case ConfigType.SLACK:
@@ -1198,6 +1227,8 @@ export function formatConfigForAgent(config) {
1198
1227
  return "Type: Web (search, extract, research)";
1199
1228
  case ConfigType.IMAGE_EDIT:
1200
1229
  return "Type: Image Edit";
1230
+ case ConfigType.MEMORY:
1231
+ return "Type: Memory (persistent across runs)";
1201
1232
  case ConfigType.WORKOS_INPUT:
1202
1233
  return `Type: WorkOS Events\nListening for: ${config.eventTypes.join(", ")}`;
1203
1234
  case ConfigType.HEY_REACH_INPUT: {
@@ -1254,6 +1285,7 @@ export const CONFIG_METADATA = {
1254
1285
  [ConfigType.LAUNCHDARKLY]: LaunchDarklyConfig,
1255
1286
  [ConfigType.WEB]: WebConfig,
1256
1287
  [ConfigType.IMAGE_EDIT]: ImageEditConfig,
1288
+ [ConfigType.MEMORY]: MemoryConfig,
1257
1289
  [ConfigType.WORKOS_INPUT]: WorkOSInputConfig,
1258
1290
  [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfig,
1259
1291
  [ConfigType.ATTIO_INPUT]: AttioInputConfig,
@@ -74,6 +74,7 @@ export type GetRunHistoryParams = {
74
74
  status?: RunHistoryStatus[];
75
75
  page?: number;
76
76
  pageSize?: number;
77
+ includeTest?: boolean;
77
78
  };
78
79
  export type GetRunHistoryResponse = {
79
80
  items: RunHistoryRecord[];
@@ -14,6 +14,32 @@ function safeParseResult(result) {
14
14
  return undefined;
15
15
  }
16
16
  }
17
+ function memoryCommand(params) {
18
+ const command = params?.command;
19
+ return command && typeof command === "object" && "op" in command ? command : undefined;
20
+ }
21
+ function memoryTarget(command) {
22
+ return command.op === "rename" ? command.old_path : (command.path ?? undefined);
23
+ }
24
+ function memoryLabel(command, done) {
25
+ if (!command)
26
+ return done ? "Updated memory" : "Accessing memory";
27
+ const target = memoryTarget(command);
28
+ const suffix = target ? ` ${truncate(target, 40)}` : "";
29
+ switch (command.op) {
30
+ case "view":
31
+ return (done ? "Read memory" : "Reading memory") + suffix;
32
+ case "create":
33
+ return (done ? "Saved memory" : "Saving memory") + suffix;
34
+ case "str_replace":
35
+ case "insert":
36
+ return (done ? "Updated memory" : "Updating memory") + suffix;
37
+ case "delete":
38
+ return (done ? "Deleted memory" : "Deleting memory") + suffix;
39
+ case "rename":
40
+ return done ? "Renamed memory file" : "Reorganizing memory";
41
+ }
42
+ }
17
43
  /**
18
44
  * Display configurations for all tools.
19
45
  * Each tool defines how it should be displayed in preparing, executing, and complete phases.
@@ -780,6 +806,11 @@ const TOOL_DISPLAY_CONFIG = {
780
806
  return prompt ? `Image edited: "${truncate(prompt)}"` : "Image edited";
781
807
  }
782
808
  },
809
+ memory: {
810
+ preparing: "Checking memory",
811
+ executing: params => memoryLabel(memoryCommand(params), false),
812
+ complete: params => memoryLabel(memoryCommand(params), true)
813
+ },
783
814
  // ===================
784
815
  // Snowflake Tools
785
816
  // ===================
package/dist/Tools.d.ts CHANGED
@@ -5302,6 +5302,180 @@ export declare const webSearchTool: {
5302
5302
  }, z.core.$strip>>;
5303
5303
  }, z.core.$strip>;
5304
5304
  };
5305
+ export declare const memoryViewCommandSchema: z.ZodObject<{
5306
+ op: z.ZodLiteral<"view">;
5307
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5308
+ view_range: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
5309
+ }, z.core.$strip>;
5310
+ export declare const memoryCreateCommandSchema: z.ZodObject<{
5311
+ op: z.ZodLiteral<"create">;
5312
+ path: z.ZodString;
5313
+ file_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5314
+ }, z.core.$strip>;
5315
+ export declare const memoryStrReplaceCommandSchema: z.ZodObject<{
5316
+ op: z.ZodLiteral<"str_replace">;
5317
+ path: z.ZodString;
5318
+ old_str: z.ZodString;
5319
+ new_str: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5320
+ }, z.core.$strip>;
5321
+ export declare const memoryInsertCommandSchema: z.ZodObject<{
5322
+ op: z.ZodLiteral<"insert">;
5323
+ path: z.ZodString;
5324
+ insert_line: z.ZodNumber;
5325
+ insert_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5326
+ }, z.core.$strip>;
5327
+ export declare const memoryDeleteCommandSchema: z.ZodObject<{
5328
+ op: z.ZodLiteral<"delete">;
5329
+ path: z.ZodString;
5330
+ }, z.core.$strip>;
5331
+ export declare const memoryRenameCommandSchema: z.ZodObject<{
5332
+ op: z.ZodLiteral<"rename">;
5333
+ old_path: z.ZodString;
5334
+ new_path: z.ZodString;
5335
+ }, z.core.$strip>;
5336
+ export declare const memoryCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5337
+ op: z.ZodLiteral<"view">;
5338
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5339
+ view_range: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
5340
+ }, z.core.$strip>, z.ZodObject<{
5341
+ op: z.ZodLiteral<"create">;
5342
+ path: z.ZodString;
5343
+ file_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5344
+ }, z.core.$strip>, z.ZodObject<{
5345
+ op: z.ZodLiteral<"str_replace">;
5346
+ path: z.ZodString;
5347
+ old_str: z.ZodString;
5348
+ new_str: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5349
+ }, z.core.$strip>, z.ZodObject<{
5350
+ op: z.ZodLiteral<"insert">;
5351
+ path: z.ZodString;
5352
+ insert_line: z.ZodNumber;
5353
+ insert_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5354
+ }, z.core.$strip>, z.ZodObject<{
5355
+ op: z.ZodLiteral<"delete">;
5356
+ path: z.ZodString;
5357
+ }, z.core.$strip>, z.ZodObject<{
5358
+ op: z.ZodLiteral<"rename">;
5359
+ old_path: z.ZodString;
5360
+ new_path: z.ZodString;
5361
+ }, z.core.$strip>], "op">;
5362
+ export declare const memoryInputSchema: z.ZodObject<{
5363
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
5364
+ op: z.ZodLiteral<"view">;
5365
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5366
+ view_range: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
5367
+ }, z.core.$strip>, z.ZodObject<{
5368
+ op: z.ZodLiteral<"create">;
5369
+ path: z.ZodString;
5370
+ file_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5371
+ }, z.core.$strip>, z.ZodObject<{
5372
+ op: z.ZodLiteral<"str_replace">;
5373
+ path: z.ZodString;
5374
+ old_str: z.ZodString;
5375
+ new_str: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5376
+ }, z.core.$strip>, z.ZodObject<{
5377
+ op: z.ZodLiteral<"insert">;
5378
+ path: z.ZodString;
5379
+ insert_line: z.ZodNumber;
5380
+ insert_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5381
+ }, z.core.$strip>, z.ZodObject<{
5382
+ op: z.ZodLiteral<"delete">;
5383
+ path: z.ZodString;
5384
+ }, z.core.$strip>, z.ZodObject<{
5385
+ op: z.ZodLiteral<"rename">;
5386
+ old_path: z.ZodString;
5387
+ new_path: z.ZodString;
5388
+ }, z.core.$strip>], "op">;
5389
+ }, z.core.$strip>;
5390
+ export type MemoryViewCommand = z.infer<typeof memoryViewCommandSchema>;
5391
+ export type MemoryCreateCommand = z.infer<typeof memoryCreateCommandSchema>;
5392
+ export type MemoryStrReplaceCommand = z.infer<typeof memoryStrReplaceCommandSchema>;
5393
+ export type MemoryInsertCommand = z.infer<typeof memoryInsertCommandSchema>;
5394
+ export type MemoryDeleteCommand = z.infer<typeof memoryDeleteCommandSchema>;
5395
+ export type MemoryRenameCommand = z.infer<typeof memoryRenameCommandSchema>;
5396
+ export type MemoryCommand = z.infer<typeof memoryCommandSchema>;
5397
+ export type MemoryInput = z.infer<typeof memoryInputSchema>;
5398
+ export declare const memoryOutputSchema: z.ZodObject<{
5399
+ success: z.ZodBoolean;
5400
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
5401
+ action: z.ZodString;
5402
+ integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
5403
+ target: z.ZodString;
5404
+ details: z.ZodString;
5405
+ url: z.ZodOptional<z.ZodString>;
5406
+ step_id: z.ZodOptional<z.ZodString>;
5407
+ type: z.ZodEnum<{
5408
+ error: "error";
5409
+ approve: "approve";
5410
+ create: "create";
5411
+ update: "update";
5412
+ delete: "delete";
5413
+ read: "read";
5414
+ }>;
5415
+ isReadOnly: z.ZodOptional<z.ZodBoolean>;
5416
+ output_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
5417
+ output_item_id: z.ZodString;
5418
+ output_item_type: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
5419
+ }, z.core.$strip>>>;
5420
+ }, z.core.$strip>>>;
5421
+ result: z.ZodString;
5422
+ }, z.core.$strip>;
5423
+ export declare const memoryTool: {
5424
+ name: "memory";
5425
+ inputSchema: z.ZodObject<{
5426
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
5427
+ op: z.ZodLiteral<"view">;
5428
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5429
+ view_range: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
5430
+ }, z.core.$strip>, z.ZodObject<{
5431
+ op: z.ZodLiteral<"create">;
5432
+ path: z.ZodString;
5433
+ file_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5434
+ }, z.core.$strip>, z.ZodObject<{
5435
+ op: z.ZodLiteral<"str_replace">;
5436
+ path: z.ZodString;
5437
+ old_str: z.ZodString;
5438
+ new_str: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5439
+ }, z.core.$strip>, z.ZodObject<{
5440
+ op: z.ZodLiteral<"insert">;
5441
+ path: z.ZodString;
5442
+ insert_line: z.ZodNumber;
5443
+ insert_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5444
+ }, z.core.$strip>, z.ZodObject<{
5445
+ op: z.ZodLiteral<"delete">;
5446
+ path: z.ZodString;
5447
+ }, z.core.$strip>, z.ZodObject<{
5448
+ op: z.ZodLiteral<"rename">;
5449
+ old_path: z.ZodString;
5450
+ new_path: z.ZodString;
5451
+ }, z.core.$strip>], "op">;
5452
+ }, z.core.$strip>;
5453
+ outputSchema: z.ZodObject<{
5454
+ success: z.ZodBoolean;
5455
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
5456
+ action: z.ZodString;
5457
+ integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
5458
+ target: z.ZodString;
5459
+ details: z.ZodString;
5460
+ url: z.ZodOptional<z.ZodString>;
5461
+ step_id: z.ZodOptional<z.ZodString>;
5462
+ type: z.ZodEnum<{
5463
+ error: "error";
5464
+ approve: "approve";
5465
+ create: "create";
5466
+ update: "update";
5467
+ delete: "delete";
5468
+ read: "read";
5469
+ }>;
5470
+ isReadOnly: z.ZodOptional<z.ZodBoolean>;
5471
+ output_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
5472
+ output_item_id: z.ZodString;
5473
+ output_item_type: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
5474
+ }, z.core.$strip>>>;
5475
+ }, z.core.$strip>>>;
5476
+ result: z.ZodString;
5477
+ }, z.core.$strip>;
5478
+ };
5305
5479
  export declare const ToolDefinitions: {
5306
5480
  readonly linear_create_ticket: {
5307
5481
  name: "linear_create_ticket";
@@ -8359,6 +8533,62 @@ export declare const ToolDefinitions: {
8359
8533
  }, z.core.$strip>>;
8360
8534
  }, z.core.$strip>;
8361
8535
  };
8536
+ readonly memory: {
8537
+ name: "memory";
8538
+ inputSchema: z.ZodObject<{
8539
+ command: z.ZodDiscriminatedUnion<[z.ZodObject<{
8540
+ op: z.ZodLiteral<"view">;
8541
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8542
+ view_range: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
8543
+ }, z.core.$strip>, z.ZodObject<{
8544
+ op: z.ZodLiteral<"create">;
8545
+ path: z.ZodString;
8546
+ file_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8547
+ }, z.core.$strip>, z.ZodObject<{
8548
+ op: z.ZodLiteral<"str_replace">;
8549
+ path: z.ZodString;
8550
+ old_str: z.ZodString;
8551
+ new_str: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8552
+ }, z.core.$strip>, z.ZodObject<{
8553
+ op: z.ZodLiteral<"insert">;
8554
+ path: z.ZodString;
8555
+ insert_line: z.ZodNumber;
8556
+ insert_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8557
+ }, z.core.$strip>, z.ZodObject<{
8558
+ op: z.ZodLiteral<"delete">;
8559
+ path: z.ZodString;
8560
+ }, z.core.$strip>, z.ZodObject<{
8561
+ op: z.ZodLiteral<"rename">;
8562
+ old_path: z.ZodString;
8563
+ new_path: z.ZodString;
8564
+ }, z.core.$strip>], "op">;
8565
+ }, z.core.$strip>;
8566
+ outputSchema: z.ZodObject<{
8567
+ success: z.ZodBoolean;
8568
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
8569
+ action: z.ZodString;
8570
+ integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
8571
+ target: z.ZodString;
8572
+ details: z.ZodString;
8573
+ url: z.ZodOptional<z.ZodString>;
8574
+ step_id: z.ZodOptional<z.ZodString>;
8575
+ type: z.ZodEnum<{
8576
+ error: "error";
8577
+ approve: "approve";
8578
+ create: "create";
8579
+ update: "update";
8580
+ delete: "delete";
8581
+ read: "read";
8582
+ }>;
8583
+ isReadOnly: z.ZodOptional<z.ZodBoolean>;
8584
+ output_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
8585
+ output_item_id: z.ZodString;
8586
+ output_item_type: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
8587
+ }, z.core.$strip>>>;
8588
+ }, z.core.$strip>>>;
8589
+ result: z.ZodString;
8590
+ }, z.core.$strip>;
8591
+ };
8362
8592
  };
8363
8593
  export type ToolName = keyof typeof ToolDefinitions;
8364
8594
  export type ToolDefinitionByName<TName extends ToolName> = (typeof ToolDefinitions)[TName];
package/dist/Tools.js CHANGED
@@ -1833,6 +1833,56 @@ export const webSearchTool = defineTool({
1833
1833
  }),
1834
1834
  outputSchema: webSearchOutputSchema
1835
1835
  });
1836
+ export const memoryViewCommandSchema = z.object({
1837
+ op: z.literal("view"),
1838
+ path: z.string().nullable().optional().describe("Path under /memories to view; omit to list the memory root"),
1839
+ view_range: z.array(z.number().int()).nullable().optional().describe("Optional [startLine, endLine] (1-indexed) to view a slice of a file")
1840
+ });
1841
+ export const memoryCreateCommandSchema = z.object({
1842
+ op: z.literal("create"),
1843
+ path: z.string().describe("Path under /memories to create (e.g. '/memories/notes.md')"),
1844
+ file_text: z.string().nullable().optional().describe("Full file contents; defaults to empty")
1845
+ });
1846
+ export const memoryStrReplaceCommandSchema = z.object({
1847
+ op: z.literal("str_replace"),
1848
+ path: z.string().describe("Path under /memories to edit"),
1849
+ old_str: z.string().describe("Exact text to replace (must appear verbatim exactly once)"),
1850
+ new_str: z.string().nullable().optional().describe("Replacement text; omit to delete the matched text")
1851
+ });
1852
+ export const memoryInsertCommandSchema = z.object({
1853
+ op: z.literal("insert"),
1854
+ path: z.string().describe("Path under /memories to edit"),
1855
+ insert_line: z.number().int().describe("Line number after which to insert (0 = beginning of file)"),
1856
+ insert_text: z.string().nullable().optional().describe("Text to insert; defaults to empty")
1857
+ });
1858
+ export const memoryDeleteCommandSchema = z.object({
1859
+ op: z.literal("delete"),
1860
+ path: z.string().describe("Path under /memories to delete")
1861
+ });
1862
+ export const memoryRenameCommandSchema = z.object({
1863
+ op: z.literal("rename"),
1864
+ old_path: z.string().describe("Source path under /memories"),
1865
+ new_path: z.string().describe("Destination path under /memories")
1866
+ });
1867
+ export const memoryCommandSchema = z.discriminatedUnion("op", [
1868
+ memoryViewCommandSchema,
1869
+ memoryCreateCommandSchema,
1870
+ memoryStrReplaceCommandSchema,
1871
+ memoryInsertCommandSchema,
1872
+ memoryDeleteCommandSchema,
1873
+ memoryRenameCommandSchema
1874
+ ]);
1875
+ export const memoryInputSchema = z.object({
1876
+ command: memoryCommandSchema.describe("The memory operation to perform and its arguments")
1877
+ });
1878
+ export const memoryOutputSchema = toolOutputBaseSchema.extend({
1879
+ result: z.string()
1880
+ });
1881
+ export const memoryTool = defineTool({
1882
+ name: "memory",
1883
+ inputSchema: memoryInputSchema,
1884
+ outputSchema: memoryOutputSchema
1885
+ });
1836
1886
  export const ToolDefinitions = {
1837
1887
  [linearCreateTicketTool.name]: linearCreateTicketTool,
1838
1888
  [linearUpdateTicketTool.name]: linearUpdateTicketTool,
@@ -1885,7 +1935,8 @@ export const ToolDefinitions = {
1885
1935
  [webSearchTool.name]: webSearchTool,
1886
1936
  [webExtractTool.name]: webExtractTool,
1887
1937
  [webResearchTool.name]: webResearchTool,
1888
- [imageEditTool.name]: imageEditTool
1938
+ [imageEditTool.name]: imageEditTool,
1939
+ [memoryTool.name]: memoryTool
1889
1940
  };
1890
1941
  export const toolsWithIntegrationId = new Set(Object.entries(ToolDefinitions)
1891
1942
  .filter(([, def]) => {