terse-types 0.0.64 → 0.0.65
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/ApiRouteBuilder.d.ts +1 -0
- package/dist/ApiRoutes.json +2 -1
- package/dist/AttioRecordFlatten.d.ts +19 -0
- package/dist/AttioRecordFlatten.js +71 -0
- package/dist/OrganizationMetadata.d.ts +6 -0
- package/dist/OrganizationMetadata.js +10 -0
- package/dist/ToolDisplayUtils.js +19 -6
- package/dist/Tools.d.ts +147 -147
- package/dist/Tools.js +54 -43
- package/dist/json-schema/terse-types.schema.json +15994 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.js +11 -0
- package/package.json +1 -1
- package/dist/Events.d.ts +0 -112
- package/dist/Events.js +0 -32
- package/dist/TriggerProjections.d.ts +0 -20
- package/dist/TriggerProjections.js +0 -119
package/dist/Tools.js
CHANGED
|
@@ -909,37 +909,50 @@ export const getPosthogSessionEventsInputSchema = z.object({
|
|
|
909
909
|
});
|
|
910
910
|
export const posthogPropertyFilterValueSchema = z.union([z.string(), z.number(), z.boolean()]);
|
|
911
911
|
export const posthogPropertyFilterOperatorSchema = z.enum(["exact", "is_not", "icontains", "not_icontains", "gt", "lt", "gte", "lte"]);
|
|
912
|
+
export const posthogPropertyFilterTypeSchema = z.enum(["event", "person"]);
|
|
912
913
|
export const posthogPropertyFilterSchema = z.object({
|
|
913
|
-
key: z.string().describe(
|
|
914
|
+
key: z.string().describe('Property key to filter on (e.g. "$current_url", "plan", "email").'),
|
|
914
915
|
value: posthogPropertyFilterValueSchema.describe("Property value to match"),
|
|
915
|
-
operator: posthogPropertyFilterOperatorSchema.
|
|
916
|
+
operator: posthogPropertyFilterOperatorSchema.optional().describe('Comparison operator (default: "exact")'),
|
|
917
|
+
type: posthogPropertyFilterTypeSchema
|
|
918
|
+
.optional()
|
|
919
|
+
.describe('"event" (default) matches a property on the event itself; "person" matches a property on the person who sent it (e.g. {key: "email", value: "user@example.com", type: "person"}).')
|
|
920
|
+
});
|
|
921
|
+
const posthogDistinctIdSchema = z
|
|
922
|
+
.string()
|
|
923
|
+
.nullable()
|
|
924
|
+
.optional()
|
|
925
|
+
.describe("Optional: only include events sent by this user, matched against the event's distinct ID (the ID your app passes to posthog.identify(), often your internal user ID).");
|
|
926
|
+
const posthogPropertyFiltersSchema = z
|
|
927
|
+
.union([z.array(posthogPropertyFilterSchema), z.null()])
|
|
928
|
+
.optional()
|
|
929
|
+
.describe('Optional: property filters. To filter by a user\'s email use {key: "email", value: "user@example.com", type: "person"}.');
|
|
930
|
+
const posthogDateFromSchema = z
|
|
931
|
+
.string()
|
|
932
|
+
.nullable()
|
|
933
|
+
.optional()
|
|
934
|
+
.describe('Optional: start of the time range. UTC "YYYY-MM-DD HH:mm:ss" or "YYYY-MM-DD", or relative like "-30m", "-24h", "-7d", "-2w". If omitted, no lower bound.');
|
|
935
|
+
const posthogDateToSchema = z.string().nullable().optional().describe("Optional: end of the time range, same formats as dateFrom. Defaults to now.");
|
|
936
|
+
export const listPosthogEventNamesInputSchema = z.object({
|
|
937
|
+
integrationId: z.string().describe("The integration ID of the PostHog skill to use."),
|
|
938
|
+
projectId: z.string().describe("The PostHog project ID."),
|
|
939
|
+
customEventsOnly: z.boolean().optional().describe("If true (default), exclude PostHog built-in events (names starting with $, e.g. $pageview) and list only the project's custom-tracked events."),
|
|
940
|
+
distinctId: posthogDistinctIdSchema,
|
|
941
|
+
propertyFilters: posthogPropertyFiltersSchema,
|
|
942
|
+
dateFrom: posthogDateFromSchema,
|
|
943
|
+
dateTo: posthogDateToSchema
|
|
916
944
|
});
|
|
917
945
|
export const searchPosthogEventsInputSchema = z.object({
|
|
918
946
|
integrationId: z.string().describe("The integration ID of the PostHog skill to use."),
|
|
919
947
|
projectId: z.string().describe("The PostHog project ID."),
|
|
920
|
-
|
|
921
|
-
customEventsOnly: z
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
.union([z.array(posthogPropertyFilterSchema), z.null()])
|
|
929
|
-
.optional()
|
|
930
|
-
.describe("Optional: Array of property filters to apply. Each filter has a key, value, and operator."),
|
|
931
|
-
limit: z.number().int().default(50).describe("Maximum number of events to return when countByEventNameOnly is false (default: 50, max: 100). Ignored when countByEventNameOnly is true."),
|
|
932
|
-
offset: z.number().int().default(0).describe("Offset for pagination when countByEventNameOnly is false (default: 0). Ignored when countByEventNameOnly is true."),
|
|
933
|
-
last7Days: z
|
|
934
|
-
.boolean()
|
|
935
|
-
.default(false)
|
|
936
|
-
.describe("If true and dateFrom is not provided, filters events from the last 7 days only (default: false). If false, no date restriction is applied unless dateFrom is explicitly provided."),
|
|
937
|
-
dateFrom: z
|
|
938
|
-
.union([z.string(), z.null()])
|
|
939
|
-
.describe('Start date for filtering. MUST be formatted as "YYYY-MM-DD HH:mm:ss" in UTC (e.g. "2026-02-06 14:00:00"). Do NOT use ISO format with T/Z (e.g. 2026-02-07T22:52:34Z) and do NOT use relative strings like "-7d". If not provided and last7Days is true, defaults to 7 days ago. If not provided and last7Days is false, no date restriction is applied.'),
|
|
940
|
-
dateTo: z
|
|
941
|
-
.union([z.string(), z.null()])
|
|
942
|
-
.describe('End date for filtering. MUST be formatted as "YYYY-MM-DD HH:mm:ss" in UTC (e.g. "2026-02-07 14:00:00"). Do NOT use ISO format with T/Z and do NOT use relative strings like "now". If not provided, defaults to now.')
|
|
948
|
+
eventName: z.string().nullable().optional().describe('Optional: specific event name to filter by (e.g., "$pageview", "button_clicked"). Use listPosthogEventNames to discover available names.'),
|
|
949
|
+
customEventsOnly: z.boolean().optional().describe("If true (default), exclude PostHog built-in events (names starting with $). Ignored when eventName is provided."),
|
|
950
|
+
distinctId: posthogDistinctIdSchema,
|
|
951
|
+
propertyFilters: posthogPropertyFiltersSchema,
|
|
952
|
+
limit: z.number().int().optional().describe("Maximum number of events to return (default: 50, max: 100)."),
|
|
953
|
+
cursor: z.string().nullable().optional().describe("Pagination cursor: pass nextCursor from the previous response to fetch the next (older) page."),
|
|
954
|
+
dateFrom: posthogDateFromSchema,
|
|
955
|
+
dateTo: posthogDateToSchema
|
|
943
956
|
});
|
|
944
957
|
export const linearCreateTicketTool = defineTool({
|
|
945
958
|
name: "linear_create_ticket",
|
|
@@ -1247,28 +1260,25 @@ export const getPosthogSessionEventsTool = defineTool({
|
|
|
1247
1260
|
message: z.string()
|
|
1248
1261
|
})
|
|
1249
1262
|
});
|
|
1250
|
-
export const
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
})
|
|
1258
|
-
export const searchPosthogEventsEventListSchema = toolOutputSuccessSchema.extend({
|
|
1259
|
-
userEmail: z.string().nullable(),
|
|
1260
|
-
eventName: z.string().nullable(),
|
|
1261
|
-
projectId: z.string(),
|
|
1262
|
-
totalEvents: z.number().int(),
|
|
1263
|
-
events: z.array(posthogEventSummarySchema),
|
|
1264
|
-
eventsLink: z.string(),
|
|
1265
|
-
pagination: posthogOffsetPaginationSchema,
|
|
1266
|
-
message: z.string()
|
|
1263
|
+
export const listPosthogEventNamesTool = defineTool({
|
|
1264
|
+
name: "listPosthogEventNames",
|
|
1265
|
+
inputSchema: listPosthogEventNamesInputSchema,
|
|
1266
|
+
outputSchema: toolOutputSuccessSchema.extend({
|
|
1267
|
+
eventCounts: z.array(posthogEventCountSchema),
|
|
1268
|
+
totalEventTypes: z.number().int(),
|
|
1269
|
+
eventsLink: z.string()
|
|
1270
|
+
})
|
|
1267
1271
|
});
|
|
1268
1272
|
export const searchPosthogEventsTool = defineTool({
|
|
1269
1273
|
name: "searchPosthogEvents",
|
|
1270
1274
|
inputSchema: searchPosthogEventsInputSchema,
|
|
1271
|
-
outputSchema:
|
|
1275
|
+
outputSchema: toolOutputSuccessSchema.extend({
|
|
1276
|
+
events: z.array(posthogEventSummarySchema),
|
|
1277
|
+
totalEvents: z.number().int(),
|
|
1278
|
+
hasMore: z.boolean(),
|
|
1279
|
+
nextCursor: z.string().nullable(),
|
|
1280
|
+
eventsLink: z.string()
|
|
1281
|
+
})
|
|
1272
1282
|
});
|
|
1273
1283
|
// Datadog schemas
|
|
1274
1284
|
export const datadogLogEntrySchema = z.object({
|
|
@@ -1917,6 +1927,7 @@ export const ToolDefinitions = {
|
|
|
1917
1927
|
[searchPosthogSessionsTool.name]: searchPosthogSessionsTool,
|
|
1918
1928
|
[searchPosthogLogsTool.name]: searchPosthogLogsTool,
|
|
1919
1929
|
[getPosthogSessionEventsTool.name]: getPosthogSessionEventsTool,
|
|
1930
|
+
[listPosthogEventNamesTool.name]: listPosthogEventNamesTool,
|
|
1920
1931
|
[searchPosthogEventsTool.name]: searchPosthogEventsTool,
|
|
1921
1932
|
[attioListObjectsTool.name]: attioListObjectsTool,
|
|
1922
1933
|
[attioQueryRecordsTool.name]: attioQueryRecordsTool,
|