terse-types 0.0.38 → 0.0.40

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.
@@ -32,7 +32,6 @@ export declare const ApiRoutes: {
32
32
  };
33
33
  GITHUB: {
34
34
  INTEGRATIONS: string;
35
- INSTALLATION_URL: string;
36
35
  GET_REPOSITORIES_FOR_INTEGRATION: string;
37
36
  INSTALLATION_CALLBACK: string;
38
37
  INSTALLATION_DELETED: string;
@@ -98,8 +97,6 @@ export declare const ApiRoutes: {
98
97
  RECENT: string;
99
98
  BY_ID: string;
100
99
  WEBHOOK_URL: string;
101
- FILES: string;
102
- FILE_CONTENT: string;
103
100
  };
104
101
  IMPROVEMENTS: {
105
102
  BY_AGENT_ID: string;
@@ -133,8 +130,6 @@ export declare const ApiRoutes: {
133
130
  LIST: string;
134
131
  BY_ID: string;
135
132
  DEPLOYS: string;
136
- SOURCE_FILES: string;
137
- SOURCE_FILE_CONTENT: string;
138
133
  ROTATE_SIGNING_SECRET: string;
139
134
  ROTATE_API_KEY: string;
140
135
  };
@@ -32,7 +32,6 @@
32
32
  },
33
33
  "GITHUB": {
34
34
  "INTEGRATIONS": "/github/integrations",
35
- "INSTALLATION_URL": "/github/installation-url",
36
35
  "GET_REPOSITORIES_FOR_INTEGRATION": "/github/get-repositories-for-integration",
37
36
  "INSTALLATION_CALLBACK": "/github/installation-callback",
38
37
  "INSTALLATION_DELETED": "/github/installation-deleted",
@@ -97,9 +96,7 @@
97
96
  "LIST": "/agents",
98
97
  "RECENT": "/agents/recent",
99
98
  "BY_ID": "/agents/:id",
100
- "WEBHOOK_URL": "/agents/:agentId/webhook-url",
101
- "FILES": "/agents/:agentId/files",
102
- "FILE_CONTENT": "/agents/:agentId/files/:fileId"
99
+ "WEBHOOK_URL": "/agents/:agentId/webhook-url"
103
100
  },
104
101
  "IMPROVEMENTS": {
105
102
  "BY_AGENT_ID": "/agents/:agentId/improvements",
@@ -133,8 +130,6 @@
133
130
  "LIST": "/projects",
134
131
  "BY_ID": "/projects/:id",
135
132
  "DEPLOYS": "/projects/:id/deploys",
136
- "SOURCE_FILES": "/projects/:id/source/files",
137
- "SOURCE_FILE_CONTENT": "/projects/:id/source/files/:fileId",
138
133
  "ROTATE_SIGNING_SECRET": "/projects/:id/rotate-signing-secret",
139
134
  "ROTATE_API_KEY": "/projects/:id/rotate-api-key"
140
135
  },
@@ -7,12 +7,7 @@
7
7
  },
8
8
  "ONBOARD": "/onboard",
9
9
  "AGENTS": {
10
- "LIST": "/app/agents",
11
- "SETUP": "/app/agents/setup",
12
- "NEW": "/app/agents/new",
13
- "NEW_WITH_TEMPLATE": "/app/agents/new/template/:templateId",
14
10
  "BY_ID": "/app/agents/:id",
15
- "HISTORY": "/app/agents/:id?tab=history",
16
11
  "IMPROVEMENTS": "/app/agents/:id?tab=improvements",
17
12
  "ALERTS": "/app/agents/:id?tab=setup&section=alerts",
18
13
  "RUN_HISTORY": "/app/agents/:id?tab=history&runId=:runId"
@@ -9,12 +9,7 @@ export declare const FrontendRoutes: {
9
9
  };
10
10
  ONBOARD: string;
11
11
  AGENTS: {
12
- LIST: string;
13
- SETUP: string;
14
- NEW: string;
15
- NEW_WITH_TEMPLATE: string;
16
12
  BY_ID: string;
17
- HISTORY: string;
18
13
  IMPROVEMENTS: string;
19
14
  ALERTS: string;
20
15
  RUN_HISTORY: string;
@@ -143,31 +143,34 @@ export declare const IntegrationInstanceSchema: z.ZodObject<{
143
143
  id: z.ZodString;
144
144
  }, z.core.$strip>;
145
145
  export type IntegrationInstance = z.infer<typeof IntegrationInstanceSchema>;
146
- export interface SlackInstallationOptions {
147
- isBotUser: boolean;
148
- }
149
- export type NoInstallationOptions = Record<string, never>;
146
+ export declare const NoInstallationOptionsSchema: z.ZodObject<{}, z.core.$strict>;
147
+ export type NoInstallationOptions = z.infer<typeof NoInstallationOptionsSchema>;
148
+ export declare const SlackInstallationOptionsSchema: z.ZodObject<{
149
+ isBotUser: z.ZodBoolean;
150
+ }, z.core.$strict>;
151
+ export type SlackInstallationOptions = z.infer<typeof SlackInstallationOptionsSchema>;
150
152
  export type AdditionalStateParams = Record<string, string>;
151
- type EnsureExhaustiveInstallationOptions<T extends Record<IntegrationType, NoInstallationOptions | SlackInstallationOptions>> = T;
152
- export type IntegrationInstallationOptions = EnsureExhaustiveInstallationOptions<{
153
- [IntegrationType.SLACK]: SlackInstallationOptions;
154
- [IntegrationType.GMAIL]: NoInstallationOptions;
155
- [IntegrationType.NOTION]: NoInstallationOptions;
156
- [IntegrationType.LINEAR]: NoInstallationOptions;
157
- [IntegrationType.GITHUB]: NoInstallationOptions;
158
- [IntegrationType.TERSE]: NoInstallationOptions;
159
- [IntegrationType.POSTHOG]: NoInstallationOptions;
160
- [IntegrationType.DATADOG]: NoInstallationOptions;
161
- [IntegrationType.CRON_JOB]: NoInstallationOptions;
162
- [IntegrationType.LAUNCHDARKLY]: NoInstallationOptions;
163
- [IntegrationType.WORKOS]: NoInstallationOptions;
164
- [IntegrationType.ATTIO]: NoInstallationOptions;
165
- [IntegrationType.SNOWFLAKE]: NoInstallationOptions;
166
- [IntegrationType.WEBHOOK]: NoInstallationOptions;
167
- [IntegrationType.WEBMONITOR]: NoInstallationOptions;
168
- [IntegrationType.HEY_REACH]: NoInstallationOptions;
169
- }>;
170
- export type InstallationOptionsFor<T extends IntegrationType> = IntegrationInstallationOptions[T];
153
+ export declare const InstallationOptionsSchemas: {
154
+ readonly slack: z.ZodObject<{
155
+ isBotUser: z.ZodBoolean;
156
+ }, z.core.$strict>;
157
+ readonly gmail: z.ZodObject<{}, z.core.$strict>;
158
+ readonly notion: z.ZodObject<{}, z.core.$strict>;
159
+ readonly linear: z.ZodObject<{}, z.core.$strict>;
160
+ readonly github: z.ZodObject<{}, z.core.$strict>;
161
+ readonly terse: z.ZodObject<{}, z.core.$strict>;
162
+ readonly posthog: z.ZodObject<{}, z.core.$strict>;
163
+ readonly datadog: z.ZodObject<{}, z.core.$strict>;
164
+ readonly cron_job: z.ZodObject<{}, z.core.$strict>;
165
+ readonly launchdarkly: z.ZodObject<{}, z.core.$strict>;
166
+ readonly workos: z.ZodObject<{}, z.core.$strict>;
167
+ readonly attio: z.ZodObject<{}, z.core.$strict>;
168
+ readonly snowflake: z.ZodObject<{}, z.core.$strict>;
169
+ readonly webhook: z.ZodObject<{}, z.core.$strict>;
170
+ readonly webmonitor: z.ZodObject<{}, z.core.$strict>;
171
+ readonly hey_reach: z.ZodObject<{}, z.core.$strict>;
172
+ };
173
+ export type InstallationOptionsFor<T extends IntegrationType> = z.infer<(typeof InstallationOptionsSchemas)[T]>;
171
174
  export declare const SlackIntegrationSchema: z.ZodObject<{
172
175
  id: z.ZodString;
173
176
  teamId: z.ZodOptional<z.ZodString>;
@@ -265,4 +268,3 @@ export declare const IntegrationWithStatusSchema: z.ZodObject<{
265
268
  }, z.core.$strip>], "status">;
266
269
  }, z.core.$strip>;
267
270
  export type IntegrationWithStatus = z.infer<typeof IntegrationWithStatusSchema>;
268
- export {};
@@ -155,6 +155,32 @@ export const INTEGRATION_METADATA = {
155
155
  export const IntegrationInstanceSchema = z.object({
156
156
  id: z.string()
157
157
  });
158
+ export const NoInstallationOptionsSchema = z.object({}).strict();
159
+ export const SlackInstallationOptionsSchema = z
160
+ .object({
161
+ isBotUser: z.boolean()
162
+ })
163
+ .strict();
164
+ // Exhaustive schema map keyed by IntegrationType — adding a new IntegrationType without
165
+ // adding an entry here is a compile error.
166
+ export const InstallationOptionsSchemas = {
167
+ [IntegrationType.SLACK]: SlackInstallationOptionsSchema,
168
+ [IntegrationType.GMAIL]: NoInstallationOptionsSchema,
169
+ [IntegrationType.NOTION]: NoInstallationOptionsSchema,
170
+ [IntegrationType.LINEAR]: NoInstallationOptionsSchema,
171
+ [IntegrationType.GITHUB]: NoInstallationOptionsSchema,
172
+ [IntegrationType.TERSE]: NoInstallationOptionsSchema,
173
+ [IntegrationType.POSTHOG]: NoInstallationOptionsSchema,
174
+ [IntegrationType.DATADOG]: NoInstallationOptionsSchema,
175
+ [IntegrationType.CRON_JOB]: NoInstallationOptionsSchema,
176
+ [IntegrationType.LAUNCHDARKLY]: NoInstallationOptionsSchema,
177
+ [IntegrationType.WORKOS]: NoInstallationOptionsSchema,
178
+ [IntegrationType.ATTIO]: NoInstallationOptionsSchema,
179
+ [IntegrationType.SNOWFLAKE]: NoInstallationOptionsSchema,
180
+ [IntegrationType.WEBHOOK]: NoInstallationOptionsSchema,
181
+ [IntegrationType.WEBMONITOR]: NoInstallationOptionsSchema,
182
+ [IntegrationType.HEY_REACH]: NoInstallationOptionsSchema
183
+ };
158
184
  export const SlackIntegrationSchema = IntegrationInstanceSchema.extend({
159
185
  teamId: z.string().optional(),
160
186
  teamName: z.string().optional(),
@@ -26,6 +26,7 @@ export declare const slackIntegrationsKey: () => readonly [string];
26
26
  export declare const workosIntegrationsKey: () => readonly [string];
27
27
  export declare const attioIntegrationsKey: () => readonly [string];
28
28
  export declare const snowflakeIntegrationsKey: () => readonly [string];
29
+ export declare const heyReachIntegrationsKey: () => readonly [string];
29
30
  export declare const attioObjectsKey: (integrationId: string | null | undefined) => readonly [string, string] | null;
30
31
  export declare const allRunHistoryKey: (params?: GetRunHistoryParams) => readonly [string, string] | readonly [string];
31
32
  export declare const runHistoryKey: (agentId: string, params?: GetRunHistoryParams) => readonly [string, string, string] | readonly [string, string];
@@ -46,12 +47,8 @@ export declare const agentImprovementsKey: (agentId: string | null) => readonly
46
47
  }] | null;
47
48
  export declare const orgLogoKey: (organizationId: string | null | undefined) => readonly [string, string] | null;
48
49
  export declare const userByIdKey: (userId: string | null | undefined) => readonly [string, string] | null;
49
- export declare const agentFilesKey: (agentId: string) => readonly [string, string];
50
- export declare const agentFileContentKey: (agentId: string, fileId: string) => readonly [string, string, string];
51
50
  export declare const projectDeploysKey: (projectId: string) => readonly [string, string];
52
51
  export declare const projectSecretsKey: (projectId: string) => readonly [string, string];
53
- export declare const projectSourceFilesKey: (projectId: string) => readonly [string, string];
54
- export declare const projectSourceFileContentKey: (projectId: string, fileId: string) => readonly [string, string, string];
55
52
  export declare const billingContextKey: (params?: Partial<BillingContextQuery>) => readonly [string, string, string, string];
56
53
  export declare const billingUsageBucketsKey: (params?: Partial<BillingUsageBucketsQuery>) => readonly [string, string, string, string];
57
54
  export declare const billingCatalogKey: () => readonly [string];
@@ -70,6 +70,9 @@ export const attioIntegrationsKey = () => {
70
70
  export const snowflakeIntegrationsKey = () => {
71
71
  return ["snowflakeIntegrations"];
72
72
  };
73
+ export const heyReachIntegrationsKey = () => {
74
+ return ["heyReachIntegrations"];
75
+ };
73
76
  export const attioObjectsKey = (integrationId) => {
74
77
  if (!integrationId) {
75
78
  return null;
@@ -140,12 +143,8 @@ export const userByIdKey = (userId) => {
140
143
  return null;
141
144
  return ["userById", userId];
142
145
  };
143
- export const agentFilesKey = (agentId) => ["agentFiles", agentId];
144
- export const agentFileContentKey = (agentId, fileId) => ["agentFileContent", agentId, fileId];
145
146
  export const projectDeploysKey = (projectId) => ["projectDeploys", projectId];
146
147
  export const projectSecretsKey = (projectId) => ["projectSecrets", projectId];
147
- export const projectSourceFilesKey = (projectId) => ["projectSourceFiles", projectId];
148
- export const projectSourceFileContentKey = (projectId, fileId) => ["projectSourceFileContent", projectId, fileId];
149
148
  export const billingContextKey = (params) => [
150
149
  "billingContext",
151
150
  params?.timezone ?? "",
@@ -134,18 +134,7 @@ export declare const toolCallCompleteSchema: z.ZodObject<{
134
134
  }, z.core.$strip>>;
135
135
  }, z.core.$strip>;
136
136
  export type ToolCallComplete = z.infer<typeof toolCallCompleteSchema>;
137
- export declare const filterResultSchema: z.ZodObject<{
138
- id: z.ZodString;
139
- timestamp: z.ZodNumber;
140
- response_id: z.ZodString;
141
- isRelevant: z.ZodBoolean;
142
- reason: z.ZodString;
143
- confidence: z.ZodNumber;
144
- type: z.ZodLiteral<"FilterResult">;
145
- }, z.core.$strip>;
146
- export type FilterResult = z.infer<typeof filterResultSchema>;
147
137
  export declare enum SandboxStage {
148
- DOWNLOADING_SOURCE = "downloading_source",
149
138
  BOOTING = "booting",
150
139
  INSTALLING_DEPENDENCIES = "installing_dependencies",
151
140
  INSTALLING_CLI = "installing_cli",
@@ -445,14 +434,6 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
445
434
  timestamp: z.ZodNumber;
446
435
  response_id: z.ZodString;
447
436
  type: z.ZodLiteral<"NaturalStop">;
448
- }, z.core.$strip>, z.ZodObject<{
449
- id: z.ZodString;
450
- timestamp: z.ZodNumber;
451
- response_id: z.ZodString;
452
- isRelevant: z.ZodBoolean;
453
- reason: z.ZodString;
454
- confidence: z.ZodNumber;
455
- type: z.ZodLiteral<"FilterResult">;
456
437
  }, z.core.$strip>, z.ZodObject<{
457
438
  id: z.ZodString;
458
439
  timestamp: z.ZodNumber;
@@ -90,15 +90,8 @@ export const toolCallCompleteSchema = modelEventBaseSchema.extend({
90
90
  result: z.string().optional(),
91
91
  errorContext: sharedErrorContextSchema.optional()
92
92
  });
93
- export const filterResultSchema = modelEventBaseSchema.extend({
94
- isRelevant: z.boolean(),
95
- reason: z.string(),
96
- confidence: z.number(),
97
- type: z.literal("FilterResult")
98
- });
99
93
  export var SandboxStage;
100
94
  (function (SandboxStage) {
101
- SandboxStage["DOWNLOADING_SOURCE"] = "downloading_source";
102
95
  SandboxStage["BOOTING"] = "booting";
103
96
  SandboxStage["INSTALLING_DEPENDENCIES"] = "installing_dependencies";
104
97
  SandboxStage["INSTALLING_CLI"] = "installing_cli";
@@ -106,7 +99,6 @@ export var SandboxStage;
106
99
  })(SandboxStage || (SandboxStage = {}));
107
100
  export const sandboxStageSchema = z.enum(SandboxStage);
108
101
  export const SANDBOX_STAGE_LABELS = {
109
- [SandboxStage.DOWNLOADING_SOURCE]: "Downloading source code",
110
102
  [SandboxStage.BOOTING]: "Booting sandbox",
111
103
  [SandboxStage.INSTALLING_DEPENDENCIES]: "Installing dependencies",
112
104
  [SandboxStage.INSTALLING_CLI]: "Installing CLI",
@@ -188,7 +180,6 @@ export const modelEventSchema = z.discriminatedUnion("type", [
188
180
  runErrorSchema,
189
181
  cancelledSchema,
190
182
  naturalStopSchema,
191
- filterResultSchema,
192
183
  userMessageSchema,
193
184
  thinkingSchema,
194
185
  modelEventChatSnippetSchema,
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  import type { ModelEvent } from "./ModelEvents.js";
3
- import type { RunHistoryRecord, RunHistoryRecordWithAgent, User } from "./types.js";
3
+ import type { RunHistoryRecord, RunHistoryRecordWithAgent, UserSession } from "./types.js";
4
4
  export declare const RunHistoryStatus: {
5
5
  readonly SUCCESS: "success";
6
6
  readonly FAILED: "failed";
@@ -98,5 +98,5 @@ export type RunHistoryModelSocketEvent = {
98
98
  export type TrackingParams = {
99
99
  runId: string;
100
100
  agentId: string;
101
- user: User;
101
+ user: UserSession;
102
102
  };
@@ -23,7 +23,7 @@ export { User as TicketSystemUser };
23
23
  export interface UserContext {
24
24
  userInfo: User;
25
25
  teams: Team[];
26
- organization: Organization;
26
+ organization: LinearOrganization;
27
27
  ticketStates: TicketState[];
28
28
  milestones: Milestone[];
29
29
  }
@@ -35,7 +35,7 @@ interface Milestone {
35
35
  id: string;
36
36
  name: string;
37
37
  }
38
- export interface Organization {
38
+ export interface LinearOrganization {
39
39
  id: string;
40
40
  name: string;
41
41
  createdAt: string;
package/dist/Tools.d.ts CHANGED
@@ -1268,8 +1268,8 @@ export declare const posthogEventSummarySchema: z.ZodObject<{
1268
1268
  url: z.ZodOptional<z.ZodString>;
1269
1269
  }, z.core.$strip>;
1270
1270
  export declare const posthogSessionEventTypeSchema: z.ZodEnum<{
1271
- input: "input";
1272
1271
  custom: "custom";
1272
+ input: "input";
1273
1273
  click: "click";
1274
1274
  scroll: "scroll";
1275
1275
  console: "console";
@@ -1280,8 +1280,8 @@ export declare const posthogSessionEventTypeSchema: z.ZodEnum<{
1280
1280
  }>;
1281
1281
  export declare const posthogSessionEventSchema: z.ZodObject<{
1282
1282
  type: z.ZodEnum<{
1283
- input: "input";
1284
1283
  custom: "custom";
1284
+ input: "input";
1285
1285
  click: "click";
1286
1286
  scroll: "scroll";
1287
1287
  console: "console";
@@ -3619,8 +3619,8 @@ export declare const getPosthogSessionEventsTool: {
3619
3619
  }, z.core.$strip>;
3620
3620
  events: z.ZodArray<z.ZodObject<{
3621
3621
  type: z.ZodEnum<{
3622
- input: "input";
3623
3622
  custom: "custom";
3623
+ input: "input";
3624
3624
  click: "click";
3625
3625
  scroll: "scroll";
3626
3626
  console: "console";
@@ -7274,8 +7274,8 @@ export declare const ToolDefinitions: {
7274
7274
  }, z.core.$strip>;
7275
7275
  events: z.ZodArray<z.ZodObject<{
7276
7276
  type: z.ZodEnum<{
7277
- input: "input";
7278
7277
  custom: "custom";
7278
+ input: "input";
7279
7279
  click: "click";
7280
7280
  scroll: "scroll";
7281
7281
  console: "console";