terse-types 0.0.52 → 0.0.54

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/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]) => {