terse-cli 0.9.20 → 0.9.22
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 +1 -1
- package/dist/cliUi.d.ts +3 -1
- package/dist/cliUi.d.ts.map +1 -1
- package/dist/cliUi.js +3 -2
- package/dist/cliUi.js.map +1 -1
- package/dist/commands/actor.d.ts.map +1 -1
- package/dist/commands/actor.js +32 -5
- package/dist/commands/actor.js.map +1 -1
- package/dist/commands/attach.d.ts +0 -7
- package/dist/commands/attach.d.ts.map +1 -1
- package/dist/commands/attach.js +220 -189
- package/dist/commands/attach.js.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +15 -3
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/generate.d.ts +0 -4
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +161 -127
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/history.d.ts +0 -15
- package/dist/commands/history.d.ts.map +1 -1
- package/dist/commands/history.js +139 -105
- package/dist/commands/history.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +86 -28
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +6 -4
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/integrate.d.ts +0 -48
- package/dist/commands/integrate.d.ts.map +1 -1
- package/dist/commands/integrate.js +897 -699
- package/dist/commands/integrate.js.map +1 -1
- package/dist/commands/integrateUse.d.ts +0 -12
- package/dist/commands/integrateUse.d.ts.map +1 -1
- package/dist/commands/integrateUse.js +132 -98
- package/dist/commands/integrateUse.js.map +1 -1
- package/dist/commands/listen.d.ts +0 -7
- package/dist/commands/listen.d.ts.map +1 -1
- package/dist/commands/listen.js +98 -81
- package/dist/commands/listen.js.map +1 -1
- package/dist/commands/memory.d.ts +0 -21
- package/dist/commands/memory.d.ts.map +1 -1
- package/dist/commands/memory.js +147 -128
- package/dist/commands/memory.js.map +1 -1
- package/dist/commands/replay.d.ts +0 -2
- package/dist/commands/replay.d.ts.map +1 -1
- package/dist/commands/replay.js +37 -28
- package/dist/commands/replay.js.map +1 -1
- package/dist/commands/resume.d.ts +0 -4
- package/dist/commands/resume.d.ts.map +1 -1
- package/dist/commands/resume.js +34 -28
- package/dist/commands/resume.js.map +1 -1
- package/dist/commands/run.d.ts +0 -2
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +78 -70
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/state.d.ts +0 -18
- package/dist/commands/state.d.ts.map +1 -1
- package/dist/commands/state.js +129 -108
- package/dist/commands/state.js.map +1 -1
- package/dist/commands/test.d.ts +0 -28
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +509 -403
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/toolRun.d.ts +0 -6
- package/dist/commands/toolRun.d.ts.map +1 -1
- package/dist/commands/toolRun.js +149 -134
- package/dist/commands/toolRun.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/integrationApi.d.ts +0 -15
- package/dist/integrationApi.d.ts.map +1 -1
- package/dist/integrationApi.js +75 -49
- package/dist/integrationApi.js.map +1 -1
- package/dist/loadJob.d.ts +0 -11
- package/dist/loadJob.d.ts.map +1 -1
- package/dist/loadJob.js +54 -46
- package/dist/loadJob.js.map +1 -1
- package/dist/providers/LanguageProvider.d.ts +0 -29
- package/dist/providers/LanguageProvider.d.ts.map +1 -1
- package/dist/providers/LanguageProvider.js +3 -0
- package/dist/providers/LanguageProvider.js.map +1 -1
- package/dist/providers/typescript/TypeScriptProvider.d.ts +0 -24
- package/dist/providers/typescript/TypeScriptProvider.d.ts.map +1 -1
- package/dist/providers/typescript/TypeScriptProvider.js +115 -121
- package/dist/providers/typescript/TypeScriptProvider.js.map +1 -1
- package/dist/providers/typescript/runtimes/JobRuntime.d.ts +0 -26
- package/dist/providers/typescript/runtimes/JobRuntime.d.ts.map +1 -1
- package/dist/providers/typescript/runtimes/JobRuntime.js +51 -18
- package/dist/providers/typescript/runtimes/JobRuntime.js.map +1 -1
- package/dist/providers/typescript/runtimes/directJobRuntime.d.ts +0 -2
- package/dist/providers/typescript/runtimes/directJobRuntime.d.ts.map +1 -1
- package/dist/providers/typescript/runtimes/directJobRuntime.js +60 -49
- package/dist/providers/typescript/runtimes/directJobRuntime.js.map +1 -1
- package/dist/providers/typescript/runtimes/durableJobRuntime.d.ts +0 -2
- package/dist/providers/typescript/runtimes/durableJobRuntime.d.ts.map +1 -1
- package/dist/providers/typescript/runtimes/durableJobRuntime.js +168 -146
- package/dist/providers/typescript/runtimes/durableJobRuntime.js.map +1 -1
- package/dist/providers/typescript/runtimes/index.d.ts +0 -3
- package/dist/providers/typescript/runtimes/index.d.ts.map +1 -1
- package/dist/providers/typescript/runtimes/index.js +5 -2
- package/dist/providers/typescript/runtimes/index.js.map +1 -1
- package/dist/providers/typescript/runtimes/session.d.ts +0 -4
- package/dist/providers/typescript/runtimes/session.d.ts.map +1 -1
- package/dist/providers/typescript/runtimes/session.js +78 -64
- package/dist/providers/typescript/runtimes/session.js.map +1 -1
- package/dist/providers/typescript/terseWorkflow.d.ts +0 -7
- package/dist/providers/typescript/terseWorkflow.d.ts.map +1 -1
- package/dist/providers/typescript/terseWorkflow.js +12 -7
- package/dist/providers/typescript/terseWorkflow.js.map +1 -1
- package/dist/runLocalTestJob.d.ts +0 -19
- package/dist/runLocalTestJob.d.ts.map +1 -1
- package/dist/runLocalTestJob.js +55 -29
- package/dist/runLocalTestJob.js.map +1 -1
- package/dist/setup.js +1 -1
- package/dist/setup.js.map +1 -1
- package/dist/sourceArchive.d.ts +1 -1
- package/dist/sourceArchive.d.ts.map +1 -1
- package/dist/sourceArchive.js +1 -0
- package/dist/sourceArchive.js.map +1 -1
- package/dist/templates.d.ts +6 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +78 -0
- package/dist/templates.js.map +1 -0
- package/package.json +3 -4
- package/templates/typescript/init/package.json.hbs +1 -2
package/dist/integrationApi.js
CHANGED
|
@@ -1,50 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
// LEGACY-JOBS: Commented out while Terse is actors-only. Uncomment to restore; see the note in terse-sdk/src/index.ts.
|
|
3
|
+
// import { pollUntil } from "terse-sdk"
|
|
4
|
+
// import {
|
|
5
|
+
// ApiRoutes,
|
|
6
|
+
// ConfigurationFieldDefinition,
|
|
7
|
+
// FormFieldDefinition,
|
|
8
|
+
// IntegrationConnection,
|
|
9
|
+
// IntegrationConnectionsResponseSchema,
|
|
10
|
+
// IntegrationFieldsResponse,
|
|
11
|
+
// IntegrationType,
|
|
12
|
+
// IntegrationWithStatus,
|
|
13
|
+
// OAuthInstallationDetails,
|
|
14
|
+
// buildRoute
|
|
15
|
+
// } from "terse-types"
|
|
16
|
+
//
|
|
17
|
+
// import { ApiError, fetchWithAuth } from "./api.js"
|
|
18
|
+
// import { CliError } from "./cliError.js"
|
|
19
|
+
//
|
|
20
|
+
// export type { IntegrationFieldsResponse, FormFieldDefinition, ConfigurationFieldDefinition }
|
|
21
|
+
//
|
|
22
|
+
// export async function fetchIntegrations(apiKey: string): Promise<IntegrationWithStatus[]> {
|
|
23
|
+
// return fetchWithAuth<IntegrationWithStatus[]>(ApiRoutes.INTEGRATIONS.LIST, apiKey)
|
|
24
|
+
// }
|
|
25
|
+
//
|
|
26
|
+
// export async function fetchIntegrationConnections(apiKey: string, integrationType: string): Promise<IntegrationConnection[]> {
|
|
27
|
+
// let raw: unknown
|
|
28
|
+
// try {
|
|
29
|
+
// raw = await fetchWithAuth<unknown>(buildRoute(ApiRoutes.INTEGRATIONS.CONNECTIONS_BY_TYPE, { integrationType }), apiKey)
|
|
30
|
+
// } catch (err) {
|
|
31
|
+
// if (err instanceof ApiError && err.status === 404) {
|
|
32
|
+
// throw new CliError("integration_connections_unavailable", `Could not list connections for '${integrationType}'.`, {
|
|
33
|
+
// detail: "The backend does not recognize this integration type."
|
|
34
|
+
// })
|
|
35
|
+
// }
|
|
36
|
+
// throw err
|
|
37
|
+
// }
|
|
38
|
+
//
|
|
39
|
+
// const parsed = IntegrationConnectionsResponseSchema.safeParse(raw)
|
|
40
|
+
// if (!parsed.success) {
|
|
41
|
+
// throw new CliError("integration_connections_malformed", `The connections returned for '${integrationType}' did not match the expected shape.`, {
|
|
42
|
+
// detail: parsed.error.message
|
|
43
|
+
// })
|
|
44
|
+
// }
|
|
45
|
+
// return parsed.data.connections
|
|
46
|
+
// }
|
|
47
|
+
//
|
|
48
|
+
// export async function fetchIntegrationFields(apiKey: string, integrationType: string): Promise<IntegrationFieldsResponse> {
|
|
49
|
+
// return fetchWithAuth<IntegrationFieldsResponse>(buildRoute(ApiRoutes.SDK.INTEGRATION_FIELDS, { integrationType }), apiKey)
|
|
50
|
+
// }
|
|
51
|
+
//
|
|
52
|
+
// export async function submitIntegrationForm(apiKey: string, integrationType: string, formValues: Record<string, string>): Promise<{ success: boolean; error?: string }> {
|
|
53
|
+
// return fetchWithAuth<{ success: boolean; error?: string }>(buildRoute(ApiRoutes.SDK.INTEGRATION_FORM_SUBMIT, { integrationType }), apiKey, { formValues }, "POST")
|
|
54
|
+
// }
|
|
55
|
+
//
|
|
56
|
+
// export async function fetchInstallationUrl(apiKey: string, integrationType: string, options?: Record<string, unknown>): Promise<OAuthInstallationDetails> {
|
|
57
|
+
// const optionsParam = options ? `?options=${encodeURIComponent(JSON.stringify(options))}` : ""
|
|
58
|
+
// return fetchWithAuth<OAuthInstallationDetails>(`${buildRoute(ApiRoutes.INTEGRATIONS.INSTALLATION_DETAILS_BY_TYPE, { integrationType })}${optionsParam}`, apiKey)
|
|
59
|
+
// }
|
|
60
|
+
//
|
|
61
|
+
// export async function disconnectIntegration(apiKey: string, integrationType: IntegrationType): Promise<{ success: boolean; error?: string }> {
|
|
62
|
+
// return fetchWithAuth<{ success: boolean; error?: string }>(buildRoute(ApiRoutes.INTEGRATIONS.DISCONNECT_BY_TYPE, { integrationType }), apiKey, {}, "DELETE")
|
|
63
|
+
// }
|
|
64
|
+
//
|
|
65
|
+
// export async function pollForConnection(apiKey: string, integrationType: string, timeoutMs = 120_000, intervalMs = 3_000): Promise<boolean> {
|
|
66
|
+
// const connected = await pollUntil(
|
|
67
|
+
// async () => {
|
|
68
|
+
// const integrations = await fetchIntegrations(apiKey)
|
|
69
|
+
// const match = integrations.find(i => i.integrationType === integrationType)
|
|
70
|
+
// return match?.isActive ? true : undefined
|
|
71
|
+
// },
|
|
72
|
+
// { intervalMs, timeoutMs }
|
|
73
|
+
// )
|
|
74
|
+
// return connected ?? false
|
|
75
|
+
// }
|
|
50
76
|
//# sourceMappingURL=integrationApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrationApi.js","sourceRoot":"","sources":["../src/integrationApi.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"integrationApi.js","sourceRoot":"","sources":["../src/integrationApi.ts"],"names":[],"mappings":";AAAA,uHAAuH;AACvH,wCAAwC;AACxC,WAAW;AACX,iBAAiB;AACjB,oCAAoC;AACpC,2BAA2B;AAC3B,6BAA6B;AAC7B,4CAA4C;AAC5C,iCAAiC;AACjC,uBAAuB;AACvB,6BAA6B;AAC7B,gCAAgC;AAChC,iBAAiB;AACjB,uBAAuB;AACvB,EAAE;AACF,qDAAqD;AACrD,2CAA2C;AAC3C,EAAE;AACF,+FAA+F;AAC/F,EAAE;AACF,8FAA8F;AAC9F,yFAAyF;AACzF,IAAI;AACJ,EAAE;AACF,iIAAiI;AACjI,uBAAuB;AACvB,YAAY;AACZ,kIAAkI;AAClI,sBAAsB;AACtB,+DAA+D;AAC/D,kIAAkI;AAClI,kFAAkF;AAClF,iBAAiB;AACjB,YAAY;AACZ,oBAAoB;AACpB,QAAQ;AACR,EAAE;AACF,yEAAyE;AACzE,6BAA6B;AAC7B,2JAA2J;AAC3J,2CAA2C;AAC3C,aAAa;AACb,QAAQ;AACR,qCAAqC;AACrC,IAAI;AACJ,EAAE;AACF,8HAA8H;AAC9H,iIAAiI;AACjI,IAAI;AACJ,EAAE;AACF,4KAA4K;AAC5K,yKAAyK;AACzK,IAAI;AACJ,EAAE;AACF,8JAA8J;AAC9J,oGAAoG;AACpG,uKAAuK;AACvK,IAAI;AACJ,EAAE;AACF,iJAAiJ;AACjJ,mKAAmK;AACnK,IAAI;AACJ,EAAE;AACF,gJAAgJ;AAChJ,yCAAyC;AACzC,wBAAwB;AACxB,mEAAmE;AACnE,0FAA0F;AAC1F,wDAAwD;AACxD,aAAa;AACb,oCAAoC;AACpC,QAAQ;AACR,gCAAgC;AAChC,IAAI"}
|
package/dist/loadJob.d.ts
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
import { CreateJobParameters } from "terse-sdk";
|
|
2
|
-
import { type NonInteractiveOpts } from "./cliHelpers.js";
|
|
3
|
-
import type { LanguageProvider } from "./providers/LanguageProvider.js";
|
|
4
|
-
/**
|
|
5
|
-
* Imports the user's entry file and returns the full job registry.
|
|
6
|
-
* Each createJob() call populates this map.
|
|
7
|
-
*/
|
|
8
|
-
export declare function loadJobRegistry(provider: LanguageProvider, entryFile?: string, allowEmpty?: boolean): Promise<Map<string, CreateJobParameters>>;
|
|
9
|
-
export declare function loadJob(provider: LanguageProvider, jobName?: string, entryFile?: string, opts?: NonInteractiveOpts): Promise<{
|
|
10
|
-
job: CreateJobParameters;
|
|
11
|
-
}>;
|
|
12
1
|
//# sourceMappingURL=loadJob.d.ts.map
|
package/dist/loadJob.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadJob.d.ts","sourceRoot":"","sources":["../src/loadJob.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadJob.d.ts","sourceRoot":"","sources":["../src/loadJob.ts"],"names":[],"mappings":""}
|
package/dist/loadJob.js
CHANGED
|
@@ -1,47 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
// LEGACY-JOBS: Commented out while Terse is actors-only. Uncomment to restore; see the note in terse-sdk/src/index.ts.
|
|
3
|
+
// import { select } from "@inquirer/prompts"
|
|
4
|
+
// import { CreateJobParameters } from "terse-sdk"
|
|
5
|
+
//
|
|
6
|
+
// import { assertProjectRoot } from "./assertProjectRoot.js"
|
|
7
|
+
// import { CliError } from "./cliError.js"
|
|
8
|
+
// import { type NonInteractiveOpts, isNonInteractive } from "./cliHelpers.js"
|
|
9
|
+
// import type { LanguageProvider } from "./providers/LanguageProvider.js"
|
|
10
|
+
//
|
|
11
|
+
// /**
|
|
12
|
+
// * Imports the user's entry file and returns the full job registry.
|
|
13
|
+
// * Each createJob() call populates this map.
|
|
14
|
+
// */
|
|
15
|
+
// export async function loadJobRegistry(provider: LanguageProvider, entryFile?: string, allowEmpty = false): Promise<Map<string, CreateJobParameters>> {
|
|
16
|
+
// assertProjectRoot(provider, provider.detectionMarkers)
|
|
17
|
+
// return provider.loadJobRegistry(entryFile, allowEmpty)
|
|
18
|
+
// }
|
|
19
|
+
//
|
|
20
|
+
// export async function loadJob(provider: LanguageProvider, jobName?: string, entryFile?: string, opts?: NonInteractiveOpts): Promise<{ job: CreateJobParameters }> {
|
|
21
|
+
// const registry = await loadJobRegistry(provider, entryFile)
|
|
22
|
+
//
|
|
23
|
+
// if (registry.size === 0) {
|
|
24
|
+
// throw new CliError("no_jobs_found", "No jobs found.", {
|
|
25
|
+
// detail: `Make sure ${provider.entryFile} registers at least one job.`
|
|
26
|
+
// })
|
|
27
|
+
// }
|
|
28
|
+
//
|
|
29
|
+
// let resolvedName: string
|
|
30
|
+
//
|
|
31
|
+
// if (jobName) {
|
|
32
|
+
// if (!registry.has(jobName)) {
|
|
33
|
+
// const available = [...registry.keys()].join(", ")
|
|
34
|
+
// throw new CliError("job_not_found", `Job "${jobName}" not found.`, {
|
|
35
|
+
// detail: `Available jobs: ${available}`
|
|
36
|
+
// })
|
|
37
|
+
// }
|
|
38
|
+
// resolvedName = jobName
|
|
39
|
+
// } else if (registry.size === 1) {
|
|
40
|
+
// resolvedName = registry.keys().next().value!
|
|
41
|
+
// } else if (isNonInteractive(opts)) {
|
|
42
|
+
// const available = [...registry.keys()].join(", ")
|
|
43
|
+
// throw new CliError("job_selection_required", "Multiple jobs found — specify which one to use.", {
|
|
44
|
+
// detail: `Available jobs: ${available}. Pass the job name as an argument.`
|
|
45
|
+
// })
|
|
46
|
+
// } else {
|
|
47
|
+
// resolvedName = await select<string>({
|
|
48
|
+
// message: "Multiple jobs found. Which one?",
|
|
49
|
+
// choices: [...registry.keys()].map(name => ({ name, value: name }))
|
|
50
|
+
// })
|
|
51
|
+
// }
|
|
52
|
+
//
|
|
53
|
+
// return { job: registry.get(resolvedName)! }
|
|
54
|
+
// }
|
|
47
55
|
//# sourceMappingURL=loadJob.js.map
|
package/dist/loadJob.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadJob.js","sourceRoot":"","sources":["../src/loadJob.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"loadJob.js","sourceRoot":"","sources":["../src/loadJob.ts"],"names":[],"mappings":";AAAA,uHAAuH;AACvH,6CAA6C;AAC7C,kDAAkD;AAClD,EAAE;AACF,6DAA6D;AAC7D,2CAA2C;AAC3C,8EAA8E;AAC9E,0EAA0E;AAC1E,EAAE;AACF,MAAM;AACN,sEAAsE;AACtE,+CAA+C;AAC/C,MAAM;AACN,yJAAyJ;AACzJ,6DAA6D;AAC7D,6DAA6D;AAC7D,IAAI;AACJ,EAAE;AACF,sKAAsK;AACtK,kEAAkE;AAClE,EAAE;AACF,iCAAiC;AACjC,kEAAkE;AAClE,oFAAoF;AACpF,aAAa;AACb,QAAQ;AACR,EAAE;AACF,+BAA+B;AAC/B,EAAE;AACF,qBAAqB;AACrB,wCAAwC;AACxC,gEAAgE;AAChE,mFAAmF;AACnF,yDAAyD;AACzD,iBAAiB;AACjB,YAAY;AACZ,iCAAiC;AACjC,wCAAwC;AACxC,uDAAuD;AACvD,2CAA2C;AAC3C,4DAA4D;AAC5D,4GAA4G;AAC5G,wFAAwF;AACxF,aAAa;AACb,eAAe;AACf,gDAAgD;AAChD,0DAA0D;AAC1D,iFAAiF;AACjF,aAAa;AACb,QAAQ;AACR,EAAE;AACF,kDAAkD;AAClD,IAAI"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type { CreateJobParameters, SessionStreamEvent } from "terse-sdk";
|
|
2
|
-
import type { SerializedEvent } from "terse-types";
|
|
3
1
|
import type { CodegenHooks, CodegenResult, CodegenRunInput } from "./codegenTypes";
|
|
4
|
-
import type { SessionHandle } from "./shared/sessionStream.js";
|
|
5
2
|
export interface LanguageProvider {
|
|
6
3
|
readonly language: "typescript";
|
|
7
4
|
readonly displayName: string;
|
|
@@ -31,33 +28,7 @@ export interface LanguageProvider {
|
|
|
31
28
|
resolveGeneratedCodePath(cwd: string): string;
|
|
32
29
|
renderGeneratedFiles(input: CodegenRunInput, hooks?: CodegenHooks): Promise<CodegenResult>;
|
|
33
30
|
typecheck(): Promise<void>;
|
|
34
|
-
loadJobRegistry(entryFile?: string, allowEmpty?: boolean): Promise<Map<string, CreateJobParameters>>;
|
|
35
31
|
prebuild(): Promise<void>;
|
|
36
|
-
runtimeName(job: CreateJobParameters): "durable" | "direct";
|
|
37
|
-
executeJob(job: CreateJobParameters, runId: string | null, event: SerializedEvent, opts?: {
|
|
38
|
-
verbose?: boolean;
|
|
39
|
-
entryFile?: string;
|
|
40
|
-
projectId?: string;
|
|
41
|
-
onSessionEvent?: (event: SessionStreamEvent) => void;
|
|
42
|
-
/**
|
|
43
|
-
* Wraps interactive prompts (e.g. tool-approval confirms) so the
|
|
44
|
-
* caller can pause any outer UI it owns (clack spinners, etc.)
|
|
45
|
-
* for the duration of the prompt and decision submission.
|
|
46
|
-
*/
|
|
47
|
-
pauseUiAround?: <T>(fn: () => Promise<T>) => Promise<T>;
|
|
48
|
-
session?: Promise<SessionHandle>;
|
|
49
|
-
}): Promise<void>;
|
|
50
|
-
resumeRun(runId: string, opts?: {
|
|
51
|
-
verbose?: boolean;
|
|
52
|
-
pauseUiAround?: <T>(fn: () => Promise<T>) => Promise<T>;
|
|
53
|
-
}): Promise<void>;
|
|
54
|
-
resumeRunWithInput(runId: string, input: {
|
|
55
|
-
token: string;
|
|
56
|
-
payload: unknown;
|
|
57
|
-
}, opts?: {
|
|
58
|
-
verbose?: boolean;
|
|
59
|
-
pauseUiAround?: <T>(fn: () => Promise<T>) => Promise<T>;
|
|
60
|
-
}): Promise<void>;
|
|
61
32
|
}
|
|
62
33
|
export type GeneratedFile = {
|
|
63
34
|
readonly fileName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageProvider.d.ts","sourceRoot":"","sources":["../../src/providers/LanguageProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LanguageProvider.d.ts","sourceRoot":"","sources":["../../src/providers/LanguageProvider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIlF,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAA;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,gBAAgB,EAAE;QACvB,aAAa,EAAE,MAAM,EAAE,CAAA;QACvB,WAAW,EAAE,MAAM,CAAA;KACtB,CAAA;IACD,QAAQ,CAAC,cAAc,EAAE;QACrB,aAAa,EAAE,MAAM,EAAE,CAAA;QACvB,WAAW,EAAE,MAAM,CAAA;KACtB,CAAA;IACD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAClC,QAAQ,CAAC,gBAAgB,EAAE;QACvB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;QACjB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;KACrB,CAAA;IAED,aAAa,IAAI,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC5D,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC1F,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAClD,oBAAoB,IAAI,MAAM,CAAA;IAC9B,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrD,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7C,oBAAoB,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;IAC1F,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAG1B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAoC5B;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageProvider.js","sourceRoot":"","sources":["../../src/providers/LanguageProvider.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"LanguageProvider.js","sourceRoot":"","sources":["../../src/providers/LanguageProvider.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,2EAA2E;AAC3E,8DAA8D"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { CreateJobParameters, SessionStreamEvent } from "terse-sdk";
|
|
2
|
-
import type { SerializedEvent } from "terse-types";
|
|
3
1
|
import type { LanguageProvider } from "../LanguageProvider.js";
|
|
4
2
|
import type { CodegenHooks, CodegenResult, CodegenRunInput } from "../codegenTypes.js";
|
|
5
3
|
declare class TypeScriptProvider implements LanguageProvider {
|
|
@@ -31,29 +29,7 @@ declare class TypeScriptProvider implements LanguageProvider {
|
|
|
31
29
|
resolveGeneratedCodePath(cwd: string): string;
|
|
32
30
|
renderGeneratedFiles(input: CodegenRunInput, hooks?: CodegenHooks): Promise<CodegenResult>;
|
|
33
31
|
typecheck(): Promise<void>;
|
|
34
|
-
loadJobRegistry(entryFile?: string, allowEmpty?: boolean): Promise<Map<string, CreateJobParameters>>;
|
|
35
|
-
private loadPreparedJobRegistry;
|
|
36
|
-
private importJobRegistry;
|
|
37
32
|
prebuild(): Promise<void>;
|
|
38
|
-
runtimeName(job: CreateJobParameters): "durable" | "direct";
|
|
39
|
-
executeJob(job: CreateJobParameters, runId: string | null, event: SerializedEvent, opts?: {
|
|
40
|
-
verbose?: boolean;
|
|
41
|
-
entryFile?: string;
|
|
42
|
-
projectId?: string;
|
|
43
|
-
onSessionEvent?: (event: SessionStreamEvent) => void;
|
|
44
|
-
pauseUiAround?: <T>(fn: () => Promise<T>) => Promise<T>;
|
|
45
|
-
}): Promise<void>;
|
|
46
|
-
resumeRun(runId: string, opts?: {
|
|
47
|
-
verbose?: boolean;
|
|
48
|
-
pauseUiAround?: <T>(fn: () => Promise<T>) => Promise<T>;
|
|
49
|
-
}): Promise<void>;
|
|
50
|
-
resumeRunWithInput(runId: string, input: {
|
|
51
|
-
token: string;
|
|
52
|
-
payload: unknown;
|
|
53
|
-
}, opts?: {
|
|
54
|
-
verbose?: boolean;
|
|
55
|
-
pauseUiAround?: <T>(fn: () => Promise<T>) => Promise<T>;
|
|
56
|
-
}): Promise<void>;
|
|
57
33
|
}
|
|
58
34
|
export declare const typeScriptProvider: TypeScriptProvider;
|
|
59
35
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeScriptProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/typescript/TypeScriptProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TypeScriptProvider.d.ts","sourceRoot":"","sources":["../../../src/providers/typescript/TypeScriptProvider.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAgBtF,cAAM,kBAAmB,YAAW,gBAAgB;IAChD,QAAQ,CAAC,QAAQ,EAAG,YAAY,CAAS;IACzC,QAAQ,CAAC,WAAW,gBAAe;IACnC,QAAQ,CAAC,gBAAgB;;;MAGxB;IACD,QAAQ,CAAC,cAAc;;;MAGtB;IACD,QAAQ,CAAC,SAAS,uBAAsB;IACxC,QAAQ,CAAC,aAAa,4BAA2B;IACjD,QAAQ,CAAC,iBAAiB,4BAA2B;IACrD,QAAQ,CAAC,gBAAgB;;;MAGxB;IAED,aAAa,IAAI,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAa5D,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI1F,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE;IAInD,oBAAoB,IAAI,MAAM;IAIxB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK3D,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIvC,oBAAoB,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;IA+C1F,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAqF1B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CA6DlC;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAA"}
|