terse-cli 0.2.16 → 0.3.1
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/_tmp_create_project.d.ts +2 -0
- package/dist/_tmp_create_project.d.ts.map +1 -0
- package/dist/_tmp_create_project.js +17 -0
- package/dist/_tmp_create_project.js.map +1 -0
- package/dist/_tmp_delete_agent.d.ts +2 -0
- package/dist/_tmp_delete_agent.d.ts.map +1 -0
- package/dist/_tmp_delete_agent.js +14 -0
- package/dist/_tmp_delete_agent.js.map +1 -0
- package/dist/_tmp_manual_trigger.d.ts +2 -0
- package/dist/_tmp_manual_trigger.d.ts.map +1 -0
- package/dist/_tmp_manual_trigger.js +17 -0
- package/dist/_tmp_manual_trigger.js.map +1 -0
- package/dist/_tmp_patch_active.d.ts +2 -0
- package/dist/_tmp_patch_active.d.ts.map +1 -0
- package/dist/_tmp_patch_active.js +21 -0
- package/dist/_tmp_patch_active.js.map +1 -0
- package/dist/codegen.d.ts +15 -0
- package/dist/codegen.d.ts.map +1 -1
- package/dist/codegen.js +466 -81
- package/dist/codegen.js.map +1 -1
- package/dist/commands/deployTheme.d.ts +28 -0
- package/dist/commands/deployTheme.d.ts.map +1 -0
- package/dist/commands/deployTheme.js +68 -0
- package/dist/commands/deployTheme.js.map +1 -0
- package/dist/commands/dev.d.ts +3 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +47 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/fsExec.d.ts +8 -0
- package/dist/commands/fsExec.d.ts.map +1 -0
- package/dist/commands/fsExec.js +46 -0
- package/dist/commands/fsExec.js.map +1 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +36 -267
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/serve.d.ts +1 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +2 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/terseCliTheme.d.ts +28 -0
- package/dist/commands/terseCliTheme.d.ts.map +1 -0
- package/dist/commands/terseCliTheme.js +68 -0
- package/dist/commands/terseCliTheme.js.map +1 -0
- package/dist/commands/tool.d.ts +6 -0
- package/dist/commands/tool.d.ts.map +1 -0
- package/dist/commands/tool.js +34 -0
- package/dist/commands/tool.js.map +1 -0
- package/dist/commands/toolRun.js +1 -1
- package/dist/commands/toolRun.js.map +1 -1
- package/dist/data/standardSlackEmoji.d.ts +2 -0
- package/dist/data/standardSlackEmoji.d.ts.map +1 -0
- package/dist/data/standardSlackEmoji.js +1978 -0
- package/dist/data/standardSlackEmoji.js.map +1 -0
- package/dist/data/standardSlackEmoji.json +1974 -0
- package/dist/deploy.d.ts +2 -1
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +61 -38
- package/dist/deploy.js.map +1 -1
- package/dist/generate.d.ts +2 -1
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +67 -69
- package/dist/generate.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +2 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +45 -96
- package/dist/init.js.map +1 -1
- package/dist/integrate.d.ts +1 -0
- package/dist/integrate.d.ts.map +1 -1
- package/dist/integrate.js +191 -11
- package/dist/integrate.js.map +1 -1
- package/dist/nonInteractive.d.ts +4 -2
- package/dist/nonInteractive.d.ts.map +1 -1
- package/dist/nonInteractive.js +5 -2
- package/dist/nonInteractive.js.map +1 -1
- package/dist/perf.d.ts +9 -0
- package/dist/perf.d.ts.map +1 -0
- package/dist/perf.js +59 -0
- package/dist/perf.js.map +1 -0
- package/dist/providers/LanguageProvider.d.ts +6 -2
- package/dist/providers/LanguageProvider.d.ts.map +1 -1
- package/dist/providers/codegen.test.d.ts +2 -0
- package/dist/providers/codegen.test.d.ts.map +1 -0
- package/dist/providers/codegen.test.js +45 -0
- package/dist/providers/codegen.test.js.map +1 -0
- package/dist/providers/codegenTypes.d.ts +16 -134
- package/dist/providers/codegenTypes.d.ts.map +1 -1
- package/dist/providers/python/PythonProvider.js +1 -0
- package/dist/providers/python/PythonProvider.js.map +1 -1
- package/dist/providers/python/PythonProvider.test.d.ts +2 -0
- package/dist/providers/python/PythonProvider.test.d.ts.map +1 -0
- package/dist/providers/python/PythonProvider.test.js +169 -0
- package/dist/providers/python/PythonProvider.test.js.map +1 -0
- package/dist/providers/typescript/TypeScriptProvider.d.ts +2 -2
- package/dist/providers/typescript/TypeScriptProvider.d.ts.map +1 -1
- package/dist/providers/typescript/TypeScriptProvider.js +53 -4
- package/dist/providers/typescript/TypeScriptProvider.js.map +1 -1
- package/dist/providers/typescript/attioProjection.d.ts +50 -0
- package/dist/providers/typescript/attioProjection.d.ts.map +1 -0
- package/dist/providers/typescript/attioProjection.js +358 -0
- package/dist/providers/typescript/attioProjection.js.map +1 -0
- package/dist/providers/typescript/modules/IntegrationModule.d.ts +82 -0
- package/dist/providers/typescript/modules/IntegrationModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/IntegrationModule.js +184 -0
- package/dist/providers/typescript/modules/IntegrationModule.js.map +1 -0
- package/dist/providers/typescript/modules/attio/AttioModule.d.ts +55 -0
- package/dist/providers/typescript/modules/attio/AttioModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/attio/AttioModule.js +163 -0
- package/dist/providers/typescript/modules/attio/AttioModule.js.map +1 -0
- package/dist/providers/typescript/modules/attio/attioProjection.d.ts +50 -0
- package/dist/providers/typescript/modules/attio/attioProjection.d.ts.map +1 -0
- package/dist/providers/typescript/modules/attio/attioProjection.js +358 -0
- package/dist/providers/typescript/modules/attio/attioProjection.js.map +1 -0
- package/dist/providers/typescript/modules/attio/attioToolMethods.d.ts +4 -0
- package/dist/providers/typescript/modules/attio/attioToolMethods.d.ts.map +1 -0
- package/dist/providers/typescript/modules/attio/attioToolMethods.js +295 -0
- package/dist/providers/typescript/modules/attio/attioToolMethods.js.map +1 -0
- package/dist/providers/typescript/modules/attio/attioTypes.d.ts +36 -0
- package/dist/providers/typescript/modules/attio/attioTypes.d.ts.map +1 -0
- package/dist/providers/typescript/modules/attio/attioTypes.js +2 -0
- package/dist/providers/typescript/modules/attio/attioTypes.js.map +1 -0
- package/dist/providers/typescript/modules/datadog/DatadogModule.d.ts +25 -0
- package/dist/providers/typescript/modules/datadog/DatadogModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/datadog/DatadogModule.js +33 -0
- package/dist/providers/typescript/modules/datadog/DatadogModule.js.map +1 -0
- package/dist/providers/typescript/modules/github/GithubModule.d.ts +44 -0
- package/dist/providers/typescript/modules/github/GithubModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/github/GithubModule.js +111 -0
- package/dist/providers/typescript/modules/github/GithubModule.js.map +1 -0
- package/dist/providers/typescript/modules/gmail/GmailModule.d.ts +17 -0
- package/dist/providers/typescript/modules/gmail/GmailModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/gmail/GmailModule.js +30 -0
- package/dist/providers/typescript/modules/gmail/GmailModule.js.map +1 -0
- package/dist/providers/typescript/modules/hey_reach/HeyReachModule.d.ts +25 -0
- package/dist/providers/typescript/modules/hey_reach/HeyReachModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/hey_reach/HeyReachModule.js +33 -0
- package/dist/providers/typescript/modules/hey_reach/HeyReachModule.js.map +1 -0
- package/dist/providers/typescript/modules/launchdarkly/LaunchDarklyModule.d.ts +26 -0
- package/dist/providers/typescript/modules/launchdarkly/LaunchDarklyModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/launchdarkly/LaunchDarklyModule.js +34 -0
- package/dist/providers/typescript/modules/launchdarkly/LaunchDarklyModule.js.map +1 -0
- package/dist/providers/typescript/modules/linear/LinearModule.d.ts +35 -0
- package/dist/providers/typescript/modules/linear/LinearModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/linear/LinearModule.js +48 -0
- package/dist/providers/typescript/modules/linear/LinearModule.js.map +1 -0
- package/dist/providers/typescript/modules/moduleHelpers.d.ts +23 -0
- package/dist/providers/typescript/modules/moduleHelpers.d.ts.map +1 -0
- package/dist/providers/typescript/modules/moduleHelpers.js +74 -0
- package/dist/providers/typescript/modules/moduleHelpers.js.map +1 -0
- package/dist/providers/typescript/modules/notion/NotionModule.d.ts +33 -0
- package/dist/providers/typescript/modules/notion/NotionModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/notion/NotionModule.js +44 -0
- package/dist/providers/typescript/modules/notion/NotionModule.js.map +1 -0
- package/dist/providers/typescript/modules/posthog/PosthogModule.d.ts +30 -0
- package/dist/providers/typescript/modules/posthog/PosthogModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/posthog/PosthogModule.js +60 -0
- package/dist/providers/typescript/modules/posthog/PosthogModule.js.map +1 -0
- package/dist/providers/typescript/modules/registry.d.ts +11 -0
- package/dist/providers/typescript/modules/registry.d.ts.map +1 -0
- package/dist/providers/typescript/modules/registry.js +37 -0
- package/dist/providers/typescript/modules/registry.js.map +1 -0
- package/dist/providers/typescript/modules/resend/ResendModule.d.ts +32 -0
- package/dist/providers/typescript/modules/resend/ResendModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/resend/ResendModule.js +71 -0
- package/dist/providers/typescript/modules/resend/ResendModule.js.map +1 -0
- package/dist/providers/typescript/modules/slack/SlackModule.d.ts +32 -0
- package/dist/providers/typescript/modules/slack/SlackModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/slack/SlackModule.js +51 -0
- package/dist/providers/typescript/modules/slack/SlackModule.js.map +1 -0
- package/dist/providers/typescript/modules/snowflake/SnowflakeModule.d.ts +20 -0
- package/dist/providers/typescript/modules/snowflake/SnowflakeModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/snowflake/SnowflakeModule.js +27 -0
- package/dist/providers/typescript/modules/snowflake/SnowflakeModule.js.map +1 -0
- package/dist/providers/typescript/modules/templateRenderer.d.ts +17 -0
- package/dist/providers/typescript/modules/templateRenderer.d.ts.map +1 -0
- package/dist/providers/typescript/modules/templateRenderer.js +64 -0
- package/dist/providers/typescript/modules/templateRenderer.js.map +1 -0
- package/dist/providers/typescript/modules/terse/TerseModule.d.ts +20 -0
- package/dist/providers/typescript/modules/terse/TerseModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/terse/TerseModule.js +62 -0
- package/dist/providers/typescript/modules/terse/TerseModule.js.map +1 -0
- package/dist/providers/typescript/modules/workos/WorkOSModule.d.ts +17 -0
- package/dist/providers/typescript/modules/workos/WorkOSModule.d.ts.map +1 -0
- package/dist/providers/typescript/modules/workos/WorkOSModule.js +30 -0
- package/dist/providers/typescript/modules/workos/WorkOSModule.js.map +1 -0
- package/dist/providers/typescript/prepareCodegenData.test.d.ts +2 -0
- package/dist/providers/typescript/prepareCodegenData.test.d.ts.map +1 -0
- package/dist/providers/typescript/prepareCodegenData.test.js +54 -0
- package/dist/providers/typescript/prepareCodegenData.test.js.map +1 -0
- package/dist/providers/typescript/projectedTypes.d.ts +11 -0
- package/dist/providers/typescript/projectedTypes.d.ts.map +1 -0
- package/dist/providers/typescript/projectedTypes.js +53 -0
- package/dist/providers/typescript/projectedTypes.js.map +1 -0
- package/dist/providers/typescript/projectionPrinter.d.ts +26 -0
- package/dist/providers/typescript/projectionPrinter.d.ts.map +1 -0
- package/dist/providers/typescript/projectionPrinter.js +110 -0
- package/dist/providers/typescript/projectionPrinter.js.map +1 -0
- package/dist/providers/typescript/replayLogDedupe.d.ts +6 -0
- package/dist/providers/typescript/replayLogDedupe.d.ts.map +1 -0
- package/dist/providers/typescript/replayLogDedupe.js +156 -0
- package/dist/providers/typescript/replayLogDedupe.js.map +1 -0
- package/dist/providers/typescript/templateEngine.d.ts +8 -2
- package/dist/providers/typescript/templateEngine.d.ts.map +1 -1
- package/dist/providers/typescript/templateEngine.js +241 -29
- package/dist/providers/typescript/templateEngine.js.map +1 -1
- package/dist/providers/typescript/triggerPayloads.d.ts +7 -0
- package/dist/providers/typescript/triggerPayloads.d.ts.map +1 -0
- package/dist/providers/typescript/triggerPayloads.js +60 -0
- package/dist/providers/typescript/triggerPayloads.js.map +1 -0
- package/dist/providers/typescript/triggerTypeDeclarations.d.ts +7 -0
- package/dist/providers/typescript/triggerTypeDeclarations.d.ts.map +1 -0
- package/dist/providers/typescript/triggerTypeDeclarations.js +42 -0
- package/dist/providers/typescript/triggerTypeDeclarations.js.map +1 -0
- package/dist/providers/typescript/triggerTypeRegistry.d.ts +7 -0
- package/dist/providers/typescript/triggerTypeRegistry.d.ts.map +1 -0
- package/dist/providers/typescript/triggerTypeRegistry.js +198 -0
- package/dist/providers/typescript/triggerTypeRegistry.js.map +1 -0
- package/dist/providers/typescript/typePrinter.d.ts +23 -0
- package/dist/providers/typescript/typePrinter.d.ts.map +1 -0
- package/dist/providers/typescript/typePrinter.js +123 -0
- package/dist/providers/typescript/typePrinter.js.map +1 -0
- package/dist/run.d.ts +2 -11
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +42 -153
- package/dist/run.js.map +1 -1
- package/dist/sampleEventId.d.ts +0 -4
- package/dist/sampleEventId.d.ts.map +1 -1
- package/dist/sampleEventId.js +0 -4
- package/dist/sampleEventId.js.map +1 -1
- package/dist/shared/ApiRoutes.d.ts +19 -0
- package/dist/shared/ApiRoutes.d.ts.map +1 -1
- package/dist/shared/ApiRoutes.js +17 -1
- package/dist/shared/ApiRoutes.js.map +1 -1
- package/dist/shared/Configs.d.ts +24 -2
- package/dist/shared/Configs.d.ts.map +1 -1
- package/dist/shared/Configs.js +32 -2
- package/dist/shared/Configs.js.map +1 -1
- package/dist/shared/Integrations.d.ts +18 -1
- package/dist/shared/Integrations.d.ts.map +1 -1
- package/dist/shared/Integrations.js +10 -1
- package/dist/shared/Integrations.js.map +1 -1
- package/dist/shared/InvalidationKeys.d.ts +1 -0
- package/dist/shared/InvalidationKeys.d.ts.map +1 -1
- package/dist/shared/InvalidationKeys.js +3 -0
- package/dist/shared/InvalidationKeys.js.map +1 -1
- package/dist/shared/ModelEvents.d.ts +9 -0
- package/dist/shared/ModelEvents.d.ts.map +1 -1
- package/dist/shared/ModelEvents.js +15 -0
- package/dist/shared/ModelEvents.js.map +1 -1
- package/dist/shared/ToolDisplayUtils.d.ts.map +1 -1
- package/dist/shared/ToolDisplayUtils.js +107 -11
- package/dist/shared/ToolDisplayUtils.js.map +1 -1
- package/dist/shared/types.d.ts +1013 -108
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js.map +1 -1
- package/dist/test.d.ts +2 -1
- package/dist/test.d.ts.map +1 -1
- package/dist/test.js +43 -23
- package/dist/test.js.map +1 -1
- package/dist/triggerParseDetail.d.ts +8 -0
- package/dist/triggerParseDetail.d.ts.map +1 -0
- package/dist/triggerParseDetail.js +30 -0
- package/dist/triggerParseDetail.js.map +1 -0
- package/dist/util.d.ts +2 -3
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +3 -3
- package/dist/util.js.map +1 -1
- package/package.json +7 -5
- package/src/providers/typescript/modules/attio/attio.schemas.hbs +150 -0
- package/src/providers/typescript/modules/attio/attio.tools.hbs +192 -0
- package/src/providers/typescript/modules/attio/attio.triggers.hbs +130 -0
- package/src/providers/typescript/modules/datadog/datadog.tools.hbs +16 -0
- package/src/providers/typescript/modules/github/github.tools.hbs +68 -0
- package/src/providers/typescript/modules/github/github.triggers.hbs +40 -0
- package/src/providers/typescript/modules/gmail/gmail.tools.hbs +17 -0
- package/src/providers/typescript/modules/gmail/gmail.triggers.hbs +16 -0
- package/src/providers/typescript/modules/hey_reach/hey_reach.tools.hbs +9 -0
- package/src/providers/typescript/modules/hey_reach/hey_reach.triggers.hbs +56 -0
- package/src/providers/typescript/modules/launchdarkly/launchdarkly.tools.hbs +16 -0
- package/src/providers/typescript/modules/linear/linear.tools.hbs +23 -0
- package/src/providers/typescript/modules/linear/linear.triggers.hbs +24 -0
- package/src/providers/typescript/modules/notion/notion.tools.hbs +20 -0
- package/src/providers/typescript/modules/posthog/posthog.tools.hbs +28 -0
- package/{templates/typescript/codegen/partials/resend-section.hbs → src/providers/typescript/modules/resend/resend.tools.hbs} +17 -5
- package/src/providers/typescript/modules/slack/slack.tools.hbs +18 -0
- package/src/providers/typescript/modules/slack/slack.triggers.hbs +28 -0
- package/src/providers/typescript/modules/snowflake/snowflake.tools.hbs +12 -0
- package/src/providers/typescript/modules/terse/terse.tools.hbs +22 -0
- package/src/providers/typescript/modules/terse/terse.triggers.hbs +33 -0
- package/src/providers/typescript/modules/workos/workos.tools.hbs +12 -0
- package/src/providers/typescript/modules/workos/workos.triggers.hbs +64 -0
- package/templates/typescript/codegen/.impeccable/hook.cache.json +1 -0
- package/templates/typescript/codegen/common.hbs +6 -0
- package/templates/typescript/codegen/partials/tools-slice.hbs +18 -0
- package/templates/typescript/codegen/root.hbs +72 -0
- package/templates/typescript/codegen/sdk-primitives.hbs +42 -0
- package/dist/jsonOutput.d.ts +0 -19
- package/dist/jsonOutput.d.ts.map +0 -1
- package/dist/jsonOutput.js +0 -25
- package/dist/jsonOutput.js.map +0 -1
- package/dist/providers/typescript/parkSignals.d.ts +0 -7
- package/dist/providers/typescript/parkSignals.d.ts.map +0 -1
- package/dist/providers/typescript/parkSignals.js +0 -45
- package/dist/providers/typescript/parkSignals.js.map +0 -1
- package/dist/replay.d.ts +0 -3
- package/dist/replay.d.ts.map +0 -1
- package/dist/replay.js +0 -20
- package/dist/replay.js.map +0 -1
- package/dist/testRelay.d.ts +0 -6
- package/dist/testRelay.d.ts.map +0 -1
- package/dist/testRelay.js +0 -91
- package/dist/testRelay.js.map +0 -1
- package/dist/urls.d.ts +0 -3
- package/dist/urls.d.ts.map +0 -1
- package/dist/urls.js +0 -27
- package/dist/urls.js.map +0 -1
- package/templates/typescript/codegen/generated.hbs +0 -15
- package/templates/typescript/codegen/partials/attio-section.hbs +0 -86
- package/templates/typescript/codegen/partials/datadog-section.hbs +0 -3
- package/templates/typescript/codegen/partials/github-section.hbs +0 -30
- package/templates/typescript/codegen/partials/header.hbs +0 -17
- package/templates/typescript/codegen/partials/hey-reach-section.hbs +0 -3
- package/templates/typescript/codegen/partials/launchdarkly-section.hbs +0 -3
- package/templates/typescript/codegen/partials/linear-section.hbs +0 -5
- package/templates/typescript/codegen/partials/notion-section.hbs +0 -5
- package/templates/typescript/codegen/partials/posthog-section.hbs +0 -15
- package/templates/typescript/codegen/partials/skills-section.hbs +0 -105
- package/templates/typescript/codegen/partials/slack-section.hbs +0 -5
- package/templates/typescript/codegen/partials/tools-section.hbs +0 -94
- package/templates/typescript/codegen/partials/triggers-section.hbs +0 -353
package/dist/testRelay.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { isCliError } from "./cliError.js";
|
|
4
|
-
import { isNonInteractive } from "./cliHelpers.js";
|
|
5
|
-
const RELAY_HEADER = "--- TERSE: relay to user, fill in each fix you applied ---";
|
|
6
|
-
export function shouldRelayTestResults(relay, nonInteractive = isNonInteractive()) {
|
|
7
|
-
return relay !== false && nonInteractive;
|
|
8
|
-
}
|
|
9
|
-
export function emitTestRelay(jobName, error) {
|
|
10
|
-
const diagnostics = testDiagnostics(error);
|
|
11
|
-
if (diagnostics.length === 0)
|
|
12
|
-
return;
|
|
13
|
-
rememberTestDiagnostics(jobName, diagnostics);
|
|
14
|
-
printTestRelay(jobName, diagnostics, false);
|
|
15
|
-
}
|
|
16
|
-
export function emitRememberedTestRelay(jobName) {
|
|
17
|
-
const relayPath = testRelayPath(jobName);
|
|
18
|
-
const diagnostics = readRememberedDiagnostics(relayPath);
|
|
19
|
-
if (diagnostics.length === 0)
|
|
20
|
-
return;
|
|
21
|
-
printTestRelay(jobName, diagnostics, true);
|
|
22
|
-
clearRememberedTestRelay(jobName);
|
|
23
|
-
}
|
|
24
|
-
export function clearRememberedTestRelay(jobName) {
|
|
25
|
-
try {
|
|
26
|
-
fs.unlinkSync(testRelayPath(jobName));
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
// A missing relay file is harmless.
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function printTestRelay(jobName, diagnostics, rerunPassed) {
|
|
33
|
-
const verdict = rerunPassed ? "The re-run passed." : "Fix each issue, then re-run the test.";
|
|
34
|
-
const lines = [RELAY_HEADER, `Dry run of '${jobName}' found ${diagnostics.length} issue${diagnostics.length === 1 ? "" : "s"}:`];
|
|
35
|
-
diagnostics.forEach((diagnostic, index) => lines.push(`${index + 1}. ${diagnostic}`));
|
|
36
|
-
lines.push("CODING AGENT: Surface this block in your next user-facing message. Preserve each diagnostic exactly and append the fix you applied to that item.");
|
|
37
|
-
lines.push(verdict);
|
|
38
|
-
process.stdout.write(`\n${lines.join("\n")}\n`);
|
|
39
|
-
}
|
|
40
|
-
function rememberTestDiagnostics(jobName, diagnostics) {
|
|
41
|
-
const relayPath = testRelayPath(jobName);
|
|
42
|
-
fs.mkdirSync(path.dirname(relayPath), { recursive: true });
|
|
43
|
-
fs.writeFileSync(relayPath, JSON.stringify({ diagnostics }, null, 2) + "\n");
|
|
44
|
-
}
|
|
45
|
-
function readRememberedDiagnostics(relayPath) {
|
|
46
|
-
try {
|
|
47
|
-
const parsed = JSON.parse(fs.readFileSync(relayPath, "utf8"));
|
|
48
|
-
if (!Array.isArray(parsed.diagnostics))
|
|
49
|
-
return [];
|
|
50
|
-
return parsed.diagnostics.filter((diagnostic) => typeof diagnostic === "string" && diagnostic.length > 0);
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
return [];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function testRelayPath(jobName) {
|
|
57
|
-
const key = Buffer.from(jobName, "utf8").toString("base64url");
|
|
58
|
-
return path.join(process.cwd(), ".terse", "test-relay", `${key}.json`);
|
|
59
|
-
}
|
|
60
|
-
export function testDiagnostics(error) {
|
|
61
|
-
const structuredIssues = readStructuredIssues(error);
|
|
62
|
-
if (structuredIssues.length > 0)
|
|
63
|
-
return structuredIssues;
|
|
64
|
-
if (isCliError(error)) {
|
|
65
|
-
const detail = error.opts.detail?.trim();
|
|
66
|
-
return [detail ? `${error.message} — ${singleLine(detail)}` : error.message];
|
|
67
|
-
}
|
|
68
|
-
if (error instanceof Error)
|
|
69
|
-
return [error.message];
|
|
70
|
-
if (typeof error === "string" && error.trim())
|
|
71
|
-
return [singleLine(error)];
|
|
72
|
-
return [];
|
|
73
|
-
}
|
|
74
|
-
function readStructuredIssues(error) {
|
|
75
|
-
if (!error || typeof error !== "object" || !("issues" in error) || !Array.isArray(error.issues))
|
|
76
|
-
return [];
|
|
77
|
-
return error.issues.flatMap(issue => {
|
|
78
|
-
if (typeof issue === "string" && issue.trim())
|
|
79
|
-
return [singleLine(issue)];
|
|
80
|
-
if (issue && typeof issue === "object" && "message" in issue && typeof issue.message === "string" && issue.message.trim())
|
|
81
|
-
return [singleLine(issue.message)];
|
|
82
|
-
return [];
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
function singleLine(value) {
|
|
86
|
-
return value
|
|
87
|
-
.replace(/\s*\n+\s*/g, " ")
|
|
88
|
-
.replace(/\s+/g, " ")
|
|
89
|
-
.trim();
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=testRelay.js.map
|
package/dist/testRelay.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testRelay.js","sourceRoot":"","sources":["../src/testRelay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElD,MAAM,YAAY,GAAG,4DAA4D,CAAA;AAEjF,MAAM,UAAU,sBAAsB,CAAC,KAA0B,EAAE,iBAA0B,gBAAgB,EAAE;IAC3G,OAAO,KAAK,KAAK,KAAK,IAAI,cAAc,CAAA;AAC5C,CAAC;AAED,MAAM,UAA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AI,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE;YAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;QAC7J,OAAO,EAAE,CAAA;IACb,CAAC,CAAC,CAAA;AACN,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC7B,OAAO,KAAK;SACP,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC;SAC1B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CAAA;AACf,CAAC"}
|
package/dist/urls.d.ts
DELETED
package/dist/urls.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../src/urls.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,YAAY,QAAsD,CAAA;AAC/E,eAAO,MAAM,WAAW,QAAoD,CAAA"}
|
package/dist/urls.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
const LOCAL_FRONTEND_URL = "http://localhost:5173";
|
|
5
|
-
const LOCAL_BACKEND_URL = "http://localhost:3001";
|
|
6
|
-
const PROD_FRONTEND_URL = "https://app.useterse.ai";
|
|
7
|
-
const PROD_BACKEND_URL = "https://app.useterse.ai/api";
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
-
const __dirname = path.dirname(__filename);
|
|
10
|
-
function isWorkspaceDevelopment() {
|
|
11
|
-
const packageRoot = path.resolve(__dirname, "..");
|
|
12
|
-
const repoRoot = path.resolve(packageRoot, "..", "..");
|
|
13
|
-
return (fs.existsSync(path.join(repoRoot, "packages", "terse-cli")) &&
|
|
14
|
-
fs.existsSync(path.join(repoRoot, "backend")));
|
|
15
|
-
}
|
|
16
|
-
const defaults = isWorkspaceDevelopment()
|
|
17
|
-
? {
|
|
18
|
-
frontend: LOCAL_FRONTEND_URL,
|
|
19
|
-
backend: LOCAL_BACKEND_URL,
|
|
20
|
-
}
|
|
21
|
-
: {
|
|
22
|
-
frontend: PROD_FRONTEND_URL,
|
|
23
|
-
backend: PROD_BACKEND_URL,
|
|
24
|
-
};
|
|
25
|
-
export const FRONTEND_URL = process.env.TERSE_FRONTEND_URL || defaults.frontend;
|
|
26
|
-
export const BACKEND_URL = process.env.TERSE_BACKEND_URL || defaults.backend;
|
|
27
|
-
//# sourceMappingURL=urls.js.map
|
package/dist/urls.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../src/urls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,kBAAkB,GAAG,uBAAuB,CAAA;AAClD,MAAM,iBAAiB,GAAG,uBAAuB,CAAA;AACjD,MAAM,iBAAiB,GAAG,yBAAyB,CAAA;AACnD,MAAM,gBAAgB,GAAG,6BAA6B,CAAA;AAEtD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACjD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;AAE1C,SAAS,sBAAsB;IAC3B,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;IACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;IAEtD,OAAO,CACH,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QAC3D,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAChD,CAAA;AACL,CAAC;AAED,MAAM,QAAQ,GAAG,sBAAsB,EAAE;IACrC,CAAC,CAAC;QACE,QAAQ,EAAE,kBAAkB;QAC5B,OAAO,EAAE,iBAAiB;KAC7B;IACD,CAAC,CAAC;QACE,QAAQ,EAAE,iBAAiB;QAC3B,OAAO,EAAE,gBAAgB;KAC5B,CAAA;AAEL,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,QAAQ,CAAC,QAAQ,CAAA;AAC/E,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,QAAQ,CAAC,OAAO,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{{> header}}
|
|
2
|
-
|
|
3
|
-
{{#if github}}{{> github-section github}}{{/if~}}
|
|
4
|
-
{{#if slack}}{{> slack-section slack}}{{/if~}}
|
|
5
|
-
{{#if linear}}{{> linear-section linear}}{{/if~}}
|
|
6
|
-
{{#if notion}}{{> notion-section notion}}{{/if~}}
|
|
7
|
-
{{#if posthog}}{{> posthog-section posthog}}{{/if~}}
|
|
8
|
-
{{#if datadog}}{{> datadog-section datadog}}{{/if~}}
|
|
9
|
-
{{#if launchdarkly}}{{> launchdarkly-section launchdarkly}}{{/if~}}
|
|
10
|
-
{{#if attio}}{{> attio-section attio}}{{/if~}}
|
|
11
|
-
{{#if heyreach}}{{> hey-reach-section heyreach}}{{/if~}}
|
|
12
|
-
{{#if resend}}{{> resend-section resend}}{{/if~}}
|
|
13
|
-
{{> triggers-section}}
|
|
14
|
-
{{> skills-section}}
|
|
15
|
-
{{#if tools}}{{> tools-section tools}}{{/if}}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
{{sectionHeader "Attio"}}
|
|
2
|
-
|
|
3
|
-
{{#each valueTypeLines}}
|
|
4
|
-
{{{this}}}
|
|
5
|
-
{{/each}}
|
|
6
|
-
|
|
7
|
-
export type AttioAttributeDefinition<TSlug extends string = string, TType extends string = string> = {
|
|
8
|
-
apiSlug: TSlug
|
|
9
|
-
title?: string
|
|
10
|
-
type?: TType
|
|
11
|
-
isRequired?: boolean
|
|
12
|
-
isUnique?: boolean
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export class AttioObject<
|
|
16
|
-
TSlug extends string = string,
|
|
17
|
-
TRecordValues extends Record<string, unknown> = Record<string, unknown>,
|
|
18
|
-
TInputValues extends Record<string, unknown> = TRecordValues
|
|
19
|
-
> {
|
|
20
|
-
constructor(
|
|
21
|
-
public readonly apiSlug: TSlug,
|
|
22
|
-
public readonly name: string,
|
|
23
|
-
public readonly objectId: string,
|
|
24
|
-
public readonly attributes: readonly AttioAttributeDefinition[] = []
|
|
25
|
-
) {}
|
|
26
|
-
|
|
27
|
-
declare readonly __recordValues: TRecordValues
|
|
28
|
-
declare readonly __inputValues: TInputValues
|
|
29
|
-
{{#if objects.length}}
|
|
30
|
-
|
|
31
|
-
{{#each objects}}
|
|
32
|
-
static {{staticName}} = new AttioObject<"{{escape apiSlug}}", {{{recordValuesType}}}, {{{inputValuesType}}}>("{{escape apiSlug}}", "{{escape singularNoun}}", "{{escape objectId}}", {{{attributeSource}}})
|
|
33
|
-
{{/each}}
|
|
34
|
-
{{/if}}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
{{#if objects.length}}
|
|
38
|
-
export type GeneratedAttioObject =
|
|
39
|
-
{{#each objects}}
|
|
40
|
-
| typeof AttioObject.{{staticName}}
|
|
41
|
-
{{/each}}
|
|
42
|
-
{{else}}
|
|
43
|
-
export type GeneratedAttioObject = AttioObject
|
|
44
|
-
{{/if}}
|
|
45
|
-
|
|
46
|
-
export class AttioList<
|
|
47
|
-
TSlug extends string = string,
|
|
48
|
-
TEntryValues extends Record<string, unknown> = Record<string, unknown>,
|
|
49
|
-
TEntryRecordValues extends Record<string, unknown> = TEntryValues
|
|
50
|
-
> {
|
|
51
|
-
constructor(
|
|
52
|
-
public readonly apiSlug: TSlug,
|
|
53
|
-
public readonly name: string,
|
|
54
|
-
public readonly listId: string,
|
|
55
|
-
public readonly parentObject: string,
|
|
56
|
-
public readonly attributes: readonly AttioAttributeDefinition[] = []
|
|
57
|
-
) {}
|
|
58
|
-
|
|
59
|
-
declare readonly __entryValues: TEntryValues
|
|
60
|
-
declare readonly __entryRecordValues: TEntryRecordValues
|
|
61
|
-
{{#if lists.length}}
|
|
62
|
-
|
|
63
|
-
{{#each lists}}
|
|
64
|
-
static {{staticName}} = new AttioList<"{{escape apiSlug}}", {{{entryValuesType}}}, {{{entryRecordValuesType}}}>("{{escape apiSlug}}", "{{escape name}}", "{{escape listId}}", "{{escape parentObject}}", {{{attributeSource}}})
|
|
65
|
-
{{/each}}
|
|
66
|
-
{{/if}}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
{{#if lists.length}}
|
|
70
|
-
export type GeneratedAttioList =
|
|
71
|
-
{{#each lists}}
|
|
72
|
-
| typeof AttioList.{{staticName}}
|
|
73
|
-
{{/each}}
|
|
74
|
-
{{else}}
|
|
75
|
-
export type GeneratedAttioList = AttioList
|
|
76
|
-
{{/if}}
|
|
77
|
-
|
|
78
|
-
function attioParentObjectFilter(object: GeneratedAttioObject | undefined) {
|
|
79
|
-
if (!object) return null
|
|
80
|
-
return { $and: [{ field: "id.object_id", operator: "equals" as const, value: object.objectId }] }
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
{{#each runtimeLines}}
|
|
84
|
-
{{{this}}}
|
|
85
|
-
{{/each}}
|
|
86
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{{sectionHeader "GitHub"}}
|
|
2
|
-
|
|
3
|
-
export class GithubOwner {
|
|
4
|
-
constructor(public readonly name: string) {}
|
|
5
|
-
{{#if owners.length}}
|
|
6
|
-
|
|
7
|
-
{{#each owners}}
|
|
8
|
-
static {{staticName}} = new GithubOwner("{{escape name}}")
|
|
9
|
-
{{/each}}
|
|
10
|
-
{{/if}}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export class Repos {
|
|
14
|
-
constructor(
|
|
15
|
-
public readonly repositoryId: number,
|
|
16
|
-
public readonly name: string,
|
|
17
|
-
public readonly owner: GithubOwner,
|
|
18
|
-
public readonly fullName: string
|
|
19
|
-
) {}
|
|
20
|
-
{{#if repoGroups.length}}
|
|
21
|
-
|
|
22
|
-
{{#each repoGroups}}
|
|
23
|
-
static {{ownerStaticName}} = {
|
|
24
|
-
{{#each repos}}
|
|
25
|
-
{{staticName}}: new Repos({{id}}, "{{escape name}}", GithubOwner.{{../ownerStaticName}}, "{{escape fullName}}"),
|
|
26
|
-
{{/each}}
|
|
27
|
-
} as const
|
|
28
|
-
{{/each}}
|
|
29
|
-
{{/if}}
|
|
30
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// Auto-generated by `terse generate` — do not edit manually
|
|
2
|
-
// Re-run `terse generate` to update.
|
|
3
|
-
|
|
4
|
-
{{#if availableIntegrations}}
|
|
5
|
-
// The integrations currently available in Terse: {{availableIntegrations}}.
|
|
6
|
-
// Connect one with `terse integrate connect <type>`; list its tools with `terse integrate tool <type> --json`.
|
|
7
|
-
{{/if}}
|
|
8
|
-
|
|
9
|
-
{{#if useMultilineImports}}
|
|
10
|
-
import {
|
|
11
|
-
{{#each imports}}
|
|
12
|
-
{{this}},
|
|
13
|
-
{{/each}}
|
|
14
|
-
} from "terse-sdk"
|
|
15
|
-
{{else}}
|
|
16
|
-
import { {{#each imports}}{{this}}{{#unless @last}}, {{/unless}}{{/each}} } from "terse-sdk"
|
|
17
|
-
{{/if}}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{{sectionHeader "PostHog"}}
|
|
2
|
-
|
|
3
|
-
{{> resource-class projectClass}}
|
|
4
|
-
|
|
5
|
-
{{#if eventNames.length}}
|
|
6
|
-
/**
|
|
7
|
-
* Custom event names observed in your PostHog project over the last 180 days.
|
|
8
|
-
* Built-in $-prefixed events (e.g. "$pageview") are always accepted alongside these.
|
|
9
|
-
* Terse supports US PostHog Cloud (us.posthog.com) only; EU-hosted PostHog is not supported.
|
|
10
|
-
*/
|
|
11
|
-
export type PosthogEventName =
|
|
12
|
-
{{#each eventNames}}
|
|
13
|
-
| "{{escape this}}"
|
|
14
|
-
{{/each}}
|
|
15
|
-
{{/if}}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
{{sectionHeader "Skills"}}
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Skills available in your workspace.
|
|
5
|
-
*
|
|
6
|
-
* Type `Skills.` in your editor to see every connected integration's skill at a glance.
|
|
7
|
-
* Use these in `generateText({ skills: [...] })` (or `TerseAgent.create({ skills: [...] })`).
|
|
8
|
-
*/
|
|
9
|
-
export const Skills = {
|
|
10
|
-
{{#if slack}}
|
|
11
|
-
/** Slack — send messages and manage threads in a specific channel */
|
|
12
|
-
slack(opts: { channel: SlackChannel; userIds?: string[]; userNames?: string[]; listenToUserDms?: boolean }): TypedSkill<{{{slack.skillToolType}}}> {
|
|
13
|
-
return new SlackOutputConfig("{{escape slack.id}}", opts.channel.channelId ?? null, opts.channel.name ?? null, opts.userIds ?? [], opts.userNames ?? null, opts.listenToUserDms)
|
|
14
|
-
},
|
|
15
|
-
{{/if}}
|
|
16
|
-
{{#if github}}
|
|
17
|
-
/** GitHub — read code and pull requests from the given repositories */
|
|
18
|
-
github(opts: { repos: Repos[] }): TypedSkill<{{{github.skillToolType}}}> {
|
|
19
|
-
return new GitHubConfig("{{escape github.id}}", opts.repos.map(r => r.repositoryId))
|
|
20
|
-
},
|
|
21
|
-
{{/if}}
|
|
22
|
-
{{#if linear}}
|
|
23
|
-
/** Linear — read and write issues, optionally scoped to a team or project */
|
|
24
|
-
linear(opts?: { team?: LinearTeam; project?: LinearProject }): TypedSkill<{{{linear.skillToolType}}}> {
|
|
25
|
-
return new LinearOutputConfig(
|
|
26
|
-
"{{escape linear.id}}",
|
|
27
|
-
opts?.team?.teamId ?? null,
|
|
28
|
-
opts?.team?.name ?? null,
|
|
29
|
-
opts?.project?.projectId ?? null
|
|
30
|
-
)
|
|
31
|
-
},
|
|
32
|
-
{{/if}}
|
|
33
|
-
{{#if gmail}}
|
|
34
|
-
/** Gmail — send emails */
|
|
35
|
-
gmail(): TypedSkill<{{{gmail.skillToolType}}}> {
|
|
36
|
-
return new GmailOutputConfig("{{escape gmail.id}}")
|
|
37
|
-
},
|
|
38
|
-
/** Gmail — create draft emails (no auto-send) */
|
|
39
|
-
gmailDraft(): TypedSkill<{{{gmail.skillToolType}}}> {
|
|
40
|
-
return new GmailDraftOutputConfig("{{escape gmail.id}}")
|
|
41
|
-
},
|
|
42
|
-
{{/if}}
|
|
43
|
-
{{#if notion}}
|
|
44
|
-
/** Notion — read and write to the given databases or pages */
|
|
45
|
-
notion(opts?: { databases?: NotionDatabase[]; pages?: NotionPage[] }): TypedSkill<{{{notion.skillToolType}}}> {
|
|
46
|
-
return new NotionConfig("{{escape notion.id}}",
|
|
47
|
-
opts?.databases?.map(d => d.databaseId), opts?.databases?.map(d => d.title),
|
|
48
|
-
opts?.pages?.map(p => p.pageId), opts?.pages?.map(p => p.title))
|
|
49
|
-
},
|
|
50
|
-
{{/if}}
|
|
51
|
-
{{#if posthog}}
|
|
52
|
-
/** PostHog — query analytics for a specific project */
|
|
53
|
-
posthog(opts: { project: PosthogProject }): TypedSkill<{{{posthog.skillToolType}}}> {
|
|
54
|
-
return new PosthogConfig("{{escape posthog.id}}", opts.project.projectId, opts.project.name)
|
|
55
|
-
},
|
|
56
|
-
{{/if}}
|
|
57
|
-
{{#if datadog}}
|
|
58
|
-
/** Datadog — search and analyze logs, optionally scoped to specific indexes */
|
|
59
|
-
datadog(opts?: { indexes?: DatadogIndex[] }): TypedSkill<{{{datadog.skillToolType}}}> {
|
|
60
|
-
return new DatadogConfig("{{escape datadog.id}}", opts?.indexes?.map(i => i.name))
|
|
61
|
-
},
|
|
62
|
-
{{/if}}
|
|
63
|
-
{{#if launchdarkly}}
|
|
64
|
-
/** LaunchDarkly — read and toggle feature flags in a project + environments */
|
|
65
|
-
launchDarkly(opts: { project: LaunchDarklyProject; environmentKeys: string[] }): TypedSkill<{{{launchdarkly.skillToolType}}}> {
|
|
66
|
-
return new LaunchDarklyConfig("{{escape launchdarkly.id}}", opts.project.projectKey, opts.environmentKeys)
|
|
67
|
-
},
|
|
68
|
-
{{/if}}
|
|
69
|
-
{{#if workos}}
|
|
70
|
-
/** WorkOS — manage users, organizations and invitations */
|
|
71
|
-
workOS(): TypedSkill<{{{workos.skillToolType}}}> {
|
|
72
|
-
return new WorkOSOutputConfig("{{escape workos.id}}")
|
|
73
|
-
},
|
|
74
|
-
{{/if}}
|
|
75
|
-
{{#if attio}}
|
|
76
|
-
/** Attio — query and upsert records on a CRM object */
|
|
77
|
-
attio(opts: { object: AttioObject<any> }): TypedSkill<{{{attio.skillToolType}}}> {
|
|
78
|
-
return new AttioOutputConfig("{{escape attio.id}}", opts.object.apiSlug)
|
|
79
|
-
},
|
|
80
|
-
{{/if}}
|
|
81
|
-
{{#if snowflake}}
|
|
82
|
-
/** Snowflake — run SQL queries against your warehouse */
|
|
83
|
-
snowflake(): TypedSkill<{{{snowflake.skillToolType}}}> {
|
|
84
|
-
return new SnowflakeOutputConfig("{{escape snowflake.id}}")
|
|
85
|
-
},
|
|
86
|
-
{{/if}}
|
|
87
|
-
{{#if resend}}
|
|
88
|
-
/** Resend — send transactional email using generated published templates */
|
|
89
|
-
resend(): TypedSkill<{{{resend.skillToolType}}}> {
|
|
90
|
-
return new ResendOutputConfig("{{escape resend.id}}")
|
|
91
|
-
},
|
|
92
|
-
{{/if}}
|
|
93
|
-
/** Web — built-in web search, page extraction, and multi-source research. Pass `allowedDomains` to restrict search and page extraction to specific sites (and their subdomains). */
|
|
94
|
-
web(opts: { allowedDomains?: string[] } = {}): TypedSkill<"web_search" | "web_extract" | "web_research"> {
|
|
95
|
-
return new WebConfig(opts)
|
|
96
|
-
},
|
|
97
|
-
/** ImageEdit — edit and generate images */
|
|
98
|
-
imageEdit(): TypedSkill<"image_edit"> {
|
|
99
|
-
return new ImageEditConfig()
|
|
100
|
-
},
|
|
101
|
-
/** Memory — built-in persistent memory the agent reads and writes under /memories, scoped to this job and surviving across runs. */
|
|
102
|
-
memory(): TypedSkill<"memory"> {
|
|
103
|
-
return new MemoryConfig()
|
|
104
|
-
},
|
|
105
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
{{sectionHeader "Typed Tools"}}
|
|
2
|
-
|
|
3
|
-
{{#each attioPreludeLines}}
|
|
4
|
-
{{{this}}}
|
|
5
|
-
{{/each}}
|
|
6
|
-
{{#each paramTypes}}
|
|
7
|
-
{{#if description}}/** {{description}} */
|
|
8
|
-
{{/if}}export type {{typeName}} = {{{tsType}}}
|
|
9
|
-
|
|
10
|
-
{{/each}}
|
|
11
|
-
{{#if githubRepoMappings.length}}
|
|
12
|
-
const __githubRepoNameToFullName = new Map<string, string>([
|
|
13
|
-
{{#each githubRepoMappings}}
|
|
14
|
-
["{{escape name}}", "{{escape fullName}}"],
|
|
15
|
-
{{/each}}
|
|
16
|
-
])
|
|
17
|
-
|
|
18
|
-
function __normalizeGitHubRepos(repo: unknown): string {
|
|
19
|
-
if (repo && typeof repo === "object" && "fullName" in (repo as Record<string, unknown>)) {
|
|
20
|
-
const fullName = (repo as { fullName?: unknown }).fullName
|
|
21
|
-
if (typeof fullName === "string" && fullName.length > 0) return fullName
|
|
22
|
-
}
|
|
23
|
-
if (typeof repo === "string") {
|
|
24
|
-
if (repo.includes("/")) return repo
|
|
25
|
-
return __githubRepoNameToFullName.get(repo) ?? repo
|
|
26
|
-
}
|
|
27
|
-
return String(repo ?? "")
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function __normalizeGitHubReposNames(repositories: unknown): string[] {
|
|
31
|
-
if (!Array.isArray(repositories)) return []
|
|
32
|
-
return repositories.map(repo => __normalizeGitHubRepos(repo))
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
{{/if}}
|
|
36
|
-
export type GeneratedTools = {
|
|
37
|
-
{{#each groups}}
|
|
38
|
-
{{key}}: {
|
|
39
|
-
{{#each methods}}
|
|
40
|
-
{{#if description}} /** {{description}} */
|
|
41
|
-
{{/if}} {{{generatedSignature}}}
|
|
42
|
-
{{/each}}
|
|
43
|
-
}
|
|
44
|
-
{{/each}}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare module "terse-sdk" {
|
|
48
|
-
interface TerseAgent {
|
|
49
|
-
readonly tools: GeneratedTools
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function createTools(agent: TerseAgent): GeneratedTools {
|
|
54
|
-
const allowed: Set<string> = new Set(agent.skills.map(config => config.integrationType))
|
|
55
|
-
return {
|
|
56
|
-
{{#each groups}}
|
|
57
|
-
...(allowed.has("{{escape integrationType}}") ? { {{key}}: {
|
|
58
|
-
{{#each methods}}
|
|
59
|
-
{{#each runtimeLines}}
|
|
60
|
-
{{{this}}}
|
|
61
|
-
{{/each}}
|
|
62
|
-
{{/each}}
|
|
63
|
-
} } : {}),
|
|
64
|
-
{{/each}}
|
|
65
|
-
} as GeneratedTools
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
;(globalThis as any).__terse_createTools = createTools
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Deterministic tool calls without an agent.
|
|
72
|
-
*
|
|
73
|
-
* `toolbox` exposes every connected integration tool as a typed function. Unlike
|
|
74
|
-
* `agent.tools`, it does not require constructing a `TerseAgent` and is not
|
|
75
|
-
* filtered by `skills`. Use it when you know exactly which tool to call and
|
|
76
|
-
* don't need an LLM in the loop.
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```ts
|
|
80
|
-
* import { toolbox } from "./terse.generated"
|
|
81
|
-
* await toolbox.slack.sendMessage({ channelId: "...", message: "hi" })
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
export const toolbox: GeneratedTools = {
|
|
85
|
-
{{#each groups}}
|
|
86
|
-
{{key}}: {
|
|
87
|
-
{{#each methods}}
|
|
88
|
-
{{#each runtimeLines}}
|
|
89
|
-
{{{this}}}
|
|
90
|
-
{{/each}}
|
|
91
|
-
{{/each}}
|
|
92
|
-
},
|
|
93
|
-
{{/each}}
|
|
94
|
-
}
|