terse-sdk 0.1.53 → 0.1.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/README.md +22 -26
- package/dist/perf.d.ts +9 -0
- package/dist/perf.d.ts.map +1 -0
- package/dist/perf.js +57 -0
- package/dist/perf.js.map +1 -0
- package/dist/shared/ApiRoutes.d.ts +348 -0
- package/dist/shared/ApiRoutes.d.ts.map +1 -0
- package/dist/shared/ApiRoutes.js +325 -0
- package/dist/shared/ApiRoutes.js.map +1 -0
- package/dist/shared/Configs.d.ts +488 -0
- package/dist/shared/Configs.d.ts.map +1 -0
- package/dist/shared/Configs.js +785 -0
- package/dist/shared/Configs.js.map +1 -0
- package/dist/shared/Entities.d.ts +8 -0
- package/dist/shared/Entities.d.ts.map +1 -0
- package/dist/shared/Entities.js +9 -0
- package/dist/shared/Entities.js.map +1 -0
- package/dist/shared/Integrations.d.ts +235 -0
- package/dist/shared/Integrations.d.ts.map +1 -0
- package/dist/shared/Integrations.js +143 -0
- package/dist/shared/Integrations.js.map +1 -0
- package/dist/shared/ModelEvents.d.ts +176 -0
- package/dist/shared/ModelEvents.d.ts.map +1 -0
- package/dist/shared/ModelEvents.js +29 -0
- package/dist/shared/ModelEvents.js.map +1 -0
- package/dist/shared/RunHistoryTypes.d.ts +95 -0
- package/dist/shared/RunHistoryTypes.d.ts.map +1 -0
- package/dist/shared/RunHistoryTypes.js +11 -0
- package/dist/shared/RunHistoryTypes.js.map +1 -0
- package/dist/shared/Survey.d.ts +10 -0
- package/dist/shared/Survey.d.ts.map +1 -0
- package/dist/shared/Survey.js +2 -0
- package/dist/shared/Survey.js.map +1 -0
- package/dist/shared/TicketSystem.d.ts +154 -0
- package/dist/shared/TicketSystem.d.ts.map +1 -0
- package/dist/shared/TicketSystem.js +21 -0
- package/dist/shared/TicketSystem.js.map +1 -0
- package/dist/shared/types.d.ts +1732 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +17 -0
- package/dist/shared/types.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,27 +19,16 @@ The fastest way to get started is `npm install -g terse-cli && terse init my-pro
|
|
|
19
19
|
A Terse workflow is a single TypeScript file. The job below watches a repo for new pull requests, posts a deterministic Slack message, then threads an agent-written summary under it:
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
|
-
import { GithubPRTrigger,
|
|
23
|
-
import { Repos, Skills, SlackChannel, Triggers } from "../terse.generated"
|
|
22
|
+
import { GithubPRTrigger, generateText, createJob } from "terse-sdk"
|
|
23
|
+
import { Repos, Skills, SlackChannel, Triggers, toolbox } from "../terse.generated"
|
|
24
24
|
// ^^ Generated based on your workspace
|
|
25
25
|
|
|
26
26
|
createJob({
|
|
27
27
|
name: "Summarize PR and send slack message",
|
|
28
28
|
triggers: [Triggers.github.onPROpened({ repo: Repos.TerseAI.Terse })],
|
|
29
29
|
onTrigger: async (event: GithubPRTrigger) => {
|
|
30
|
-
//
|
|
31
|
-
const
|
|
32
|
-
const agent = TerseAgent.create({
|
|
33
|
-
prompt,
|
|
34
|
-
skills: [
|
|
35
|
-
// Fine tune what agents have access to. Impossible to modify anything outside of this scope
|
|
36
|
-
Skills.github({ repos: [Repos.TerseAI.Terse] }),
|
|
37
|
-
Skills.slack({ channel: SlackChannel.AllTerseInc })
|
|
38
|
-
]
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
// deterministically call a tool
|
|
42
|
-
const message = await agent.tools.slack.sendMessage({
|
|
30
|
+
// Deterministic call — fixed channel, fixed message. No agent needed.
|
|
31
|
+
const message = await toolbox.slack.sendMessage({
|
|
43
32
|
channelId: SlackChannel.AllTerseInc.channelId,
|
|
44
33
|
message: "New PR from " + event.sender.login + "!"
|
|
45
34
|
})
|
|
@@ -47,11 +36,19 @@ createJob({
|
|
|
47
36
|
// Outputs are strongly typed
|
|
48
37
|
const parentId = message.message_ts
|
|
49
38
|
|
|
50
|
-
//
|
|
51
|
-
await
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
39
|
+
// Agentic: one prompt in, the model uses the GitHub + Slack tools granted via skills
|
|
40
|
+
await generateText({
|
|
41
|
+
prompt: `
|
|
42
|
+
Summarize this PR ${event.formatForAgentRunner()}.
|
|
43
|
+
Keep it short. Format the summary in Block Kit; include screenshots or diagrams from the PR as image blocks.
|
|
44
|
+
Reply in a thread to the Slack message (thread parent ts: ${parentId}).
|
|
45
|
+
`,
|
|
46
|
+
skills: [
|
|
47
|
+
// Fine tune what the agent has access to. Impossible to touch anything outside this scope
|
|
48
|
+
Skills.github({ repos: [Repos.TerseAI.Terse] }),
|
|
49
|
+
Skills.slack({ channel: SlackChannel.AllTerseInc })
|
|
50
|
+
]
|
|
51
|
+
})
|
|
55
52
|
}
|
|
56
53
|
})
|
|
57
54
|
```
|
|
@@ -61,14 +58,13 @@ createJob({
|
|
|
61
58
|
| Concept | What it is |
|
|
62
59
|
|---|---|
|
|
63
60
|
| `createJob()` | Registers a workflow at module load time. |
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `agent.runAndWait()` | Run to completion. Pass a `zod` schema for structured output. |
|
|
67
|
-
| `agent.tools.*` | Generated, deterministic wrappers. Call directly to bypass the LLM. |
|
|
61
|
+
| `generateText()` | The shorthand for agentic runs: one prompt in, final output out. The model can call any tool granted via `skills`. Pass a `zod` `outputSchema` for structured output. Reach for this in almost every job. |
|
|
62
|
+
| `toolbox.*` | Generated, deterministic wrappers. Call directly to bypass the LLM. No agent or `skills` needed. |
|
|
68
63
|
| `Triggers.*` | Per-integration trigger builders, plus `Triggers.schedule.cron()` and `Triggers.webhook.onRequest<Body>()`. |
|
|
69
|
-
| `Skills.*` | Integration skill factories (e.g. `Skills.github({...})`, `Skills.slack({...})`) that scope the tools available to the
|
|
64
|
+
| `Skills.*` | Integration skill factories (e.g. `Skills.github({...})`, `Skills.slack({...})`) that scope the tools available to the model. |
|
|
65
|
+
| `TerseAgent.create()` | The lower-level agent `generateText` wraps. Use directly only to stream with `run()` or reuse one agent instance across calls. |
|
|
70
66
|
|
|
71
|
-
The trigger builders, skill constructors, and `
|
|
67
|
+
The trigger builders, skill constructors, and `toolbox.*` wrappers come from `src/terse.generated.ts`, which is produced by `terse generate`. Do not edit it by hand.
|
|
72
68
|
|
|
73
69
|
Full reference: [docs.useterse.ai/reference/typescript-sdk](https://docs.useterse.ai/reference/typescript-sdk).
|
|
74
70
|
|
package/dist/perf.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type PerfAttributes = Record<string, unknown>;
|
|
2
|
+
export declare function isSdkPerfLoggingEnabled(): boolean;
|
|
3
|
+
export declare function startSdkPerfStep(step: string, attributes?: PerfAttributes): {
|
|
4
|
+
complete: (extra?: PerfAttributes) => void;
|
|
5
|
+
fail: (error: unknown, extra?: PerfAttributes) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function withSdkPerfStep<T>(step: string, attributes: PerfAttributes, fn: () => Promise<T>): Promise<T>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=perf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perf.d.ts","sourceRoot":"","sources":["../src/perf.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAY7C,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD;AAsBD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,GAAE,cAAmB,GAAG;IAC7E,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IAC1C,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;CACzD,CAqBA;AAED,wBAAsB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAWnH"}
|
package/dist/perf.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function isTruthyEnv(value) {
|
|
2
|
+
if (!value) {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
5
|
+
return !["0", "false", "off", "no"].includes(value.toLowerCase());
|
|
6
|
+
}
|
|
7
|
+
export function isSdkPerfLoggingEnabled() {
|
|
8
|
+
return isTruthyEnv(process.env.TERSE_PERF_LOGS) || isTruthyEnv(process.env.TERSE_DEBUG) || isTruthyEnv(process.env.TERSE_SDK_DEBUG);
|
|
9
|
+
}
|
|
10
|
+
function serializeAttributes(attributes) {
|
|
11
|
+
return JSON.stringify(Object.fromEntries(Object.entries(attributes).filter(([, value]) => value !== undefined)), (_key, value) => {
|
|
12
|
+
if (value instanceof Error) {
|
|
13
|
+
return { message: value.message, name: value.name };
|
|
14
|
+
}
|
|
15
|
+
return value;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function logPerf(step, phase, attributes = {}) {
|
|
19
|
+
if (!isSdkPerfLoggingEnabled()) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
console.log(`[terse:perf] ${serializeAttributes({ step, phase, ...attributes })}`);
|
|
23
|
+
}
|
|
24
|
+
export function startSdkPerfStep(step, attributes = {}) {
|
|
25
|
+
const start = performance.now();
|
|
26
|
+
logPerf(step, "started", attributes);
|
|
27
|
+
return {
|
|
28
|
+
complete(extra = {}) {
|
|
29
|
+
logPerf(step, "completed", {
|
|
30
|
+
...attributes,
|
|
31
|
+
...extra,
|
|
32
|
+
duration_ms: Math.round(performance.now() - start)
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
fail(error, extra = {}) {
|
|
36
|
+
logPerf(step, "failed", {
|
|
37
|
+
...attributes,
|
|
38
|
+
...extra,
|
|
39
|
+
duration_ms: Math.round(performance.now() - start),
|
|
40
|
+
error: error instanceof Error ? error.message : String(error)
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export async function withSdkPerfStep(step, attributes, fn) {
|
|
46
|
+
const timer = startSdkPerfStep(step, attributes);
|
|
47
|
+
try {
|
|
48
|
+
const result = await fn();
|
|
49
|
+
timer.complete();
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
timer.fail(error);
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=perf.js.map
|
package/dist/perf.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perf.js","sourceRoot":"","sources":["../src/perf.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API route path constants
|
|
3
|
+
*
|
|
4
|
+
* These constants standardize API route paths across frontend and backend,
|
|
5
|
+
* preventing magic strings and making refactoring easier.
|
|
6
|
+
*
|
|
7
|
+
* Dynamic routes use route objects with both Express patterns and URL builders
|
|
8
|
+
* to ensure frontend and backend stay in sync.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ApiRoutes: {
|
|
11
|
+
readonly AUTH: {
|
|
12
|
+
readonly ME: "/me";
|
|
13
|
+
readonly LOGIN: "/login";
|
|
14
|
+
readonly LOGIN_URL: "/login/url";
|
|
15
|
+
readonly LOGOUT: "/logout";
|
|
16
|
+
readonly LOGOUT_URL: "/logout/url";
|
|
17
|
+
readonly GITHUB_APP_CALLBACK: "/auth/github-app/callback";
|
|
18
|
+
readonly WORKOS_CALLBACK: "/auth/workos/callback";
|
|
19
|
+
};
|
|
20
|
+
readonly WORKOS: {
|
|
21
|
+
readonly WIDGET_TOKEN: "/auth/workos/widget-token";
|
|
22
|
+
};
|
|
23
|
+
readonly ORGANIZATIONS: {
|
|
24
|
+
readonly CREATE: "/organizations";
|
|
25
|
+
readonly GET_CURRENT: "/organizations/current";
|
|
26
|
+
readonly LIST: "/organizations";
|
|
27
|
+
readonly SWITCH: "/organizations/switch";
|
|
28
|
+
readonly UPDATE: "/organizations";
|
|
29
|
+
readonly LOGO_UPLOAD_URL: "/organizations/logo/upload-url";
|
|
30
|
+
readonly LOGO: {
|
|
31
|
+
readonly pattern: "/organizations/:organizationId/logo";
|
|
32
|
+
readonly build: (organizationId: string) => string;
|
|
33
|
+
readonly params: {
|
|
34
|
+
readonly organizationId: "string";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
readonly STATS: "/stats";
|
|
39
|
+
readonly RUN_HISTORY: {
|
|
40
|
+
readonly ALL: "/run-history";
|
|
41
|
+
readonly ACTIONS: "/run-history/actions";
|
|
42
|
+
readonly BY_AGENT_ID: {
|
|
43
|
+
readonly pattern: "/run-history/:agentId";
|
|
44
|
+
readonly build: (agentId: string) => string;
|
|
45
|
+
readonly params: {
|
|
46
|
+
readonly agentId: "string";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
readonly CHAT_BY_RUN_ID: {
|
|
50
|
+
readonly pattern: "/run-history/:runId/chat";
|
|
51
|
+
readonly build: (runId: string) => string;
|
|
52
|
+
readonly params: {
|
|
53
|
+
readonly runId: "string";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
readonly SESSION: {
|
|
58
|
+
readonly TOKEN: "/session/token";
|
|
59
|
+
};
|
|
60
|
+
readonly GITHUB: {
|
|
61
|
+
readonly INTEGRATIONS: "/github/integrations";
|
|
62
|
+
readonly INSTALLATION_URL: "/github/installation-url";
|
|
63
|
+
readonly GET_REPOSITORIES_FOR_INTEGRATION: "/github/get-repositories-for-integration";
|
|
64
|
+
readonly INSTALLATION_CALLBACK: "/github/installation-callback";
|
|
65
|
+
readonly INSTALLATION_DELETED: "/github/installation-deleted";
|
|
66
|
+
readonly UNIFIED_EVENT: "/github/unified-event";
|
|
67
|
+
};
|
|
68
|
+
readonly ATLASSIAN: {
|
|
69
|
+
readonly INTEGRATIONS: "/atlassian/integrations";
|
|
70
|
+
readonly OAUTH_CALLBACK: "/atlassian/oauth/callback";
|
|
71
|
+
};
|
|
72
|
+
readonly JIRA: {
|
|
73
|
+
readonly RESOURCES: "/jira/resources";
|
|
74
|
+
readonly GET_API_KEY: "/jira/get-api-key";
|
|
75
|
+
readonly SET_API_KEY: "/jira/set-api-key";
|
|
76
|
+
readonly VALIDATE_AND_FETCH_PROJECTS: "/jira/validate-and-fetch-projects";
|
|
77
|
+
readonly DELETE_CREDENTIALS: "/jira/delete-credentials";
|
|
78
|
+
};
|
|
79
|
+
readonly CONFLUENCE: {
|
|
80
|
+
readonly INTEGRATIONS: "/confluence/integrations";
|
|
81
|
+
readonly RESOURCES: "/confluence/resources";
|
|
82
|
+
};
|
|
83
|
+
readonly GMAIL: {
|
|
84
|
+
readonly INTEGRATIONS: "/gmail/integrations";
|
|
85
|
+
readonly CALLBACK: "/gmail/callback";
|
|
86
|
+
readonly DELETE_INTEGRATION: "/gmail/delete-integration";
|
|
87
|
+
};
|
|
88
|
+
readonly NOTION: {
|
|
89
|
+
readonly INTEGRATIONS: "/notion/integrations";
|
|
90
|
+
readonly OAUTH_CALLBACK: "/notion/oauth/callback";
|
|
91
|
+
readonly RESOURCES: "/notion/resources";
|
|
92
|
+
readonly DELETE_INTEGRATION: "/notion/delete-integration";
|
|
93
|
+
};
|
|
94
|
+
readonly FIGMA: {
|
|
95
|
+
readonly INTEGRATIONS: "/figma/integrations";
|
|
96
|
+
readonly OAUTH_CALLBACK: "/figma/oauth/callback";
|
|
97
|
+
};
|
|
98
|
+
readonly LINEAR: {
|
|
99
|
+
readonly OAUTH_CALLBACK: "/linear/oauth/callback";
|
|
100
|
+
readonly WEBHOOK: "/linear/webhook";
|
|
101
|
+
readonly INTEGRATIONS: "/linear/integrations";
|
|
102
|
+
readonly TEAMS: "/linear/teams";
|
|
103
|
+
};
|
|
104
|
+
readonly SLACK: {
|
|
105
|
+
readonly INTEGRATIONS: "/slack/integrations";
|
|
106
|
+
readonly GET_CURRENT_INTEGRATION: "/slack/get-current-integration";
|
|
107
|
+
readonly OAUTH_CALLBACK: "/slack/oauth-callback";
|
|
108
|
+
readonly CHANNELS: "/slack/channels";
|
|
109
|
+
readonly USERS: "/slack/users";
|
|
110
|
+
readonly EVENTS: "/slack/events";
|
|
111
|
+
};
|
|
112
|
+
readonly POSTHOG: {
|
|
113
|
+
readonly INTEGRATIONS: "/posthog/integrations";
|
|
114
|
+
readonly PROJECTS: "/posthog/projects";
|
|
115
|
+
};
|
|
116
|
+
readonly LAUNCHDARKLY: {
|
|
117
|
+
readonly INTEGRATIONS: "/launchdarkly/integrations";
|
|
118
|
+
readonly PROJECTS_BY_INTEGRATION_ID: {
|
|
119
|
+
readonly pattern: "/launchdarkly/integrations/:integrationId/projects";
|
|
120
|
+
readonly build: (integrationId: string) => string;
|
|
121
|
+
readonly params: {
|
|
122
|
+
readonly integrationId: "string";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
readonly ENVIRONMENTS_BY_INTEGRATION_AND_PROJECT: {
|
|
126
|
+
readonly pattern: "/launchdarkly/integrations/:integrationId/projects/:projectKey/environments";
|
|
127
|
+
readonly build: (integrationId: string, projectKey: string) => string;
|
|
128
|
+
readonly params: {
|
|
129
|
+
readonly integrationId: "string";
|
|
130
|
+
readonly projectKey: "string";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly DATADOG: {
|
|
135
|
+
readonly INTEGRATIONS: "/datadog/integrations";
|
|
136
|
+
readonly INDEXES: "/datadog/indexes";
|
|
137
|
+
};
|
|
138
|
+
readonly WORKOS_INTEGRATION: {
|
|
139
|
+
readonly INTEGRATIONS: "/workos-integration/integrations";
|
|
140
|
+
readonly WEBHOOK_SECRET: "/workos-integration/webhook-secret";
|
|
141
|
+
};
|
|
142
|
+
readonly SNOWFLAKE: {
|
|
143
|
+
readonly INTEGRATIONS: "/snowflake/integrations";
|
|
144
|
+
};
|
|
145
|
+
readonly ATTIO: {
|
|
146
|
+
readonly INTEGRATIONS: "/attio/integrations";
|
|
147
|
+
readonly OAUTH_CALLBACK: "/attio/oauth/callback";
|
|
148
|
+
readonly OBJECTS: {
|
|
149
|
+
readonly pattern: "/attio/integrations/:integrationId/objects";
|
|
150
|
+
readonly build: (integrationId: string) => string;
|
|
151
|
+
readonly params: {
|
|
152
|
+
readonly integrationId: "string";
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
readonly AGENTS: {
|
|
157
|
+
readonly LIST: "/agents";
|
|
158
|
+
readonly RECENT: "/agents/recent";
|
|
159
|
+
readonly BY_ID: {
|
|
160
|
+
readonly pattern: "/agents/:id";
|
|
161
|
+
readonly build: (id: string) => string;
|
|
162
|
+
readonly params: {
|
|
163
|
+
readonly id: "string";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
readonly IMPROVEMENTS: {
|
|
168
|
+
readonly BY_AGENT_ID: {
|
|
169
|
+
readonly pattern: "/agents/:agentId/improvements";
|
|
170
|
+
readonly build: (agentId: string) => string;
|
|
171
|
+
readonly params: {
|
|
172
|
+
readonly agentId: "string";
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
readonly APPLY: {
|
|
176
|
+
readonly pattern: "/agents/:agentId/improvements/:id/apply";
|
|
177
|
+
readonly build: (agentId: string, id: string) => string;
|
|
178
|
+
readonly params: {
|
|
179
|
+
readonly agentId: "string";
|
|
180
|
+
readonly id: "string";
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
readonly DISMISS: {
|
|
184
|
+
readonly pattern: "/agents/:agentId/improvements/:id/dismiss";
|
|
185
|
+
readonly build: (agentId: string, id: string) => string;
|
|
186
|
+
readonly params: {
|
|
187
|
+
readonly agentId: "string";
|
|
188
|
+
readonly id: "string";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
readonly UNDO_DISMISS: {
|
|
192
|
+
readonly pattern: "/agents/:agentId/improvements/:id/undo-dismiss";
|
|
193
|
+
readonly build: (agentId: string, id: string) => string;
|
|
194
|
+
readonly params: {
|
|
195
|
+
readonly agentId: "string";
|
|
196
|
+
readonly id: "string";
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
readonly TOGGLE_ENABLED: {
|
|
200
|
+
readonly pattern: "/agents/:agentId/improvements-enabled";
|
|
201
|
+
readonly build: (agentId: string) => string;
|
|
202
|
+
readonly params: {
|
|
203
|
+
readonly agentId: "string";
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
readonly TEMPLATES: "/templates";
|
|
208
|
+
readonly PUBLIC: {
|
|
209
|
+
readonly TEMPLATES: "/public/templates";
|
|
210
|
+
};
|
|
211
|
+
readonly TOOLS: {
|
|
212
|
+
readonly THAT_REQUIRE_APPROVALS: "/tools/that-require-approvals";
|
|
213
|
+
};
|
|
214
|
+
readonly INTEGRATIONS: {
|
|
215
|
+
readonly INSTALLATION_DETAILS_BY_TYPE: {
|
|
216
|
+
readonly pattern: "/integrations/:integrationType/installation-details";
|
|
217
|
+
readonly build: (integrationType: string) => string;
|
|
218
|
+
readonly params: {
|
|
219
|
+
readonly integrationType: "string";
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
readonly LIST: "/integrations";
|
|
223
|
+
readonly ACTIVE: "/integrations/active";
|
|
224
|
+
};
|
|
225
|
+
readonly NOTIFICATION_DESTINATIONS: {
|
|
226
|
+
readonly LIST: "/notification-destinations";
|
|
227
|
+
readonly BY_ID: {
|
|
228
|
+
readonly pattern: "/notification-destinations/:id";
|
|
229
|
+
readonly build: (id: string) => string;
|
|
230
|
+
readonly params: {
|
|
231
|
+
readonly id: "string";
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
readonly API_TOKENS: {
|
|
236
|
+
readonly LIST: "/api-tokens";
|
|
237
|
+
readonly BY_ID: {
|
|
238
|
+
readonly pattern: "/api-tokens/:id";
|
|
239
|
+
readonly build: (id: string) => string;
|
|
240
|
+
readonly params: {
|
|
241
|
+
readonly id: "string";
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
readonly SDK: {
|
|
246
|
+
readonly ME: "/sdk/me";
|
|
247
|
+
readonly SAMPLE_EVENTS: "/sdk/sample-events";
|
|
248
|
+
readonly TOOL_EXECUTE: "/sdk/tool-execute";
|
|
249
|
+
readonly TOOL_DEFINITIONS: "/sdk/tool-definitions";
|
|
250
|
+
readonly AGENT_RUN: "/sdk/agent-run";
|
|
251
|
+
readonly APPROVAL_DECISION: "/sdk/approval-decision";
|
|
252
|
+
readonly SESSION_EVENTS: "/sdk/session-events";
|
|
253
|
+
readonly DEPLOY: "/sdk/deploy";
|
|
254
|
+
readonly DEVICE_TOKEN_EXCHANGE: "/sdk/auth/device-token-exchange";
|
|
255
|
+
readonly INTEGRATION_FIELDS: {
|
|
256
|
+
readonly pattern: "/sdk/integrations/:integrationType/fields";
|
|
257
|
+
readonly build: (integrationType: string) => string;
|
|
258
|
+
readonly params: {
|
|
259
|
+
readonly integrationType: "string";
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
readonly INTEGRATION_FORM_SUBMIT: {
|
|
263
|
+
readonly pattern: "/sdk/integrations/:integrationType/form-submit";
|
|
264
|
+
readonly build: (integrationType: string) => string;
|
|
265
|
+
readonly params: {
|
|
266
|
+
readonly integrationType: "string";
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
readonly NOTIFICATION_SETTINGS: "/notification-settings";
|
|
271
|
+
readonly SENT_NOTIFICATIONS: {
|
|
272
|
+
readonly LIST: "/sent-notifications";
|
|
273
|
+
};
|
|
274
|
+
readonly PENDING_APPROVALS: {
|
|
275
|
+
readonly LIST: "/pending-approvals";
|
|
276
|
+
};
|
|
277
|
+
readonly WEBHOOKS: {
|
|
278
|
+
readonly GMAIL: "/webhooks/gmail";
|
|
279
|
+
readonly FIGMA: "/webhooks/figma";
|
|
280
|
+
readonly WORKOS: "/webhooks/workos";
|
|
281
|
+
readonly JIRA_BY_ACCOUNT_ID: {
|
|
282
|
+
readonly pattern: "/webhooks/jira/:accountId";
|
|
283
|
+
readonly build: (accountId: string) => string;
|
|
284
|
+
readonly params: {
|
|
285
|
+
readonly accountId: "string";
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
readonly LINEAR_BY_USER_ID: {
|
|
289
|
+
readonly pattern: "/webhooks/linear/:userId";
|
|
290
|
+
readonly build: (userId: string) => string;
|
|
291
|
+
readonly params: {
|
|
292
|
+
readonly userId: "string";
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
readonly SCHEDULE_BY_INPUT_ID: {
|
|
296
|
+
readonly pattern: "/webhooks/schedule/:inputId";
|
|
297
|
+
readonly build: (inputId: string) => string;
|
|
298
|
+
readonly params: {
|
|
299
|
+
readonly inputId: "string";
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
readonly WORKOS_TRIGGER_BY_INTEGRATION_ID: {
|
|
303
|
+
readonly pattern: "/webhooks/workos-trigger/:integrationId";
|
|
304
|
+
readonly build: (integrationId: string) => string;
|
|
305
|
+
readonly params: {
|
|
306
|
+
readonly integrationId: "string";
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
readonly SCHEDULE: {
|
|
311
|
+
readonly TRIGGER_BY_INPUT_ID: {
|
|
312
|
+
readonly pattern: "/schedule/trigger/:inputId";
|
|
313
|
+
readonly build: (inputId: string) => string;
|
|
314
|
+
readonly params: {
|
|
315
|
+
readonly inputId: "string";
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
readonly TRIGGER_WITH_EVENT: {
|
|
319
|
+
readonly pattern: "/schedule/trigger-with-event/:automationId";
|
|
320
|
+
readonly build: (automationId: string) => string;
|
|
321
|
+
readonly params: {
|
|
322
|
+
readonly automationId: "string";
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
readonly REFRESH_TOKENS: "/refresh-tokens";
|
|
327
|
+
readonly REVIEW_AGENTS: "/review-agents";
|
|
328
|
+
readonly USERS: {
|
|
329
|
+
readonly CREATE: "/users";
|
|
330
|
+
readonly BY_ID: {
|
|
331
|
+
readonly pattern: "/users/:id";
|
|
332
|
+
readonly build: (id: string) => string;
|
|
333
|
+
readonly params: {
|
|
334
|
+
readonly id: "string";
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
readonly BUILDER_CHAT: {
|
|
339
|
+
readonly HISTORY_BY_SESSION_ID: {
|
|
340
|
+
readonly pattern: "/builder-chat/:sessionId/history";
|
|
341
|
+
readonly build: (sessionId: string) => string;
|
|
342
|
+
readonly params: {
|
|
343
|
+
readonly sessionId: "string";
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
//# sourceMappingURL=ApiRoutes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiRoutes.d.ts","sourceRoot":"","sources":["../../src/shared/ApiRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;6CAyBc,MAAM;;;;;;;;;;;;sCAcb,MAAM;;;;;;;oCAKR,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CA0FE,MAAM;;;;;;;4CAKN,MAAM,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;4CA4B1B,MAAM;;;;;;;;;;;iCAWjB,MAAM;;;;;;;;;sCAQD,MAAM;;;;;;;sCAKN,MAAM,MAAM,MAAM;;;;;;;;sCAKlB,MAAM,MAAM,MAAM;;;;;;;;sCAKlB,MAAM,MAAM,MAAM;;;;;;;;sCAKlB,MAAM;;;;;;;;;;;;;;;;8CAoBE,MAAM;;;;;;;;;;;;iCAYnB,MAAM;;;;;;;;;;iCAUN,MAAM;;;;;;;;;;;;;;;;;;8CAkBO,MAAM;;;;;;;8CAKN,MAAM;;;;;;;;;;;;;;;;;;;wCAsBZ,MAAM;;;;;;;qCAKT,MAAM;;;;;;;sCAKL,MAAM;;;;;;;4CAKA,MAAM;;;;;;;;;sCASZ,MAAM;;;;;;;2CAKD,MAAM;;;;;;;;;;;;iCAchB,MAAM;;;;;;;;;wCASC,MAAM;;;;;;CAI3B,CAAA"}
|