t3code-cli 0.14.0 → 0.14.2
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 -0
- package/dist/application.d.ts +2 -2
- package/dist/application.js +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +1 -1
- package/dist/bin.js +551 -265
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/client-runtime/authorization.d.ts +1 -1
- package/dist/client-runtime/authorization.js +1 -1
- package/dist/client-runtime/connection.d.ts +1 -1
- package/dist/client-runtime/connection.js +1 -1
- package/dist/client-runtime/environment.d.ts +5 -1
- package/dist/client-runtime/environment.js +1 -1
- package/dist/client-runtime/errors.js +1 -1
- package/dist/client-runtime/operations/projects.d.ts +2 -2
- package/dist/client-runtime/operations/projects.js +2 -2
- package/dist/client-runtime/operations.d.ts +2 -2
- package/dist/client-runtime/operations.js +2 -2
- package/dist/client-runtime/platform.d.ts +1 -1
- package/dist/client-runtime/platform.js +1 -1
- package/dist/client-runtime/relay.d.ts +5 -1
- package/dist/client-runtime/relay.js +1 -1
- package/dist/client-runtime/rpc.d.ts +2 -2
- package/dist/client-runtime/rpc.js +2 -2
- package/dist/client-runtime/state/assets.d.ts +17 -11
- package/dist/client-runtime/state/assets.js +1 -1
- package/dist/client-runtime/state/auth.d.ts +1 -1
- package/dist/client-runtime/state/auth.js +1 -1
- package/dist/client-runtime/state/connections.js +1 -1
- package/dist/client-runtime/state/entities.d.ts +1 -1
- package/dist/client-runtime/state/entities.js +1 -1
- package/dist/client-runtime/state/filesystem.d.ts +1 -1
- package/dist/client-runtime/state/filesystem.js +1 -1
- package/dist/client-runtime/state/git.d.ts +5 -5
- package/dist/client-runtime/state/git.js +1 -1
- package/dist/client-runtime/state/models.d.ts +1 -1
- package/dist/client-runtime/state/models.js +1 -1
- package/dist/client-runtime/state/orchestration.d.ts +42 -2
- package/dist/client-runtime/state/orchestration.js +13 -1
- package/dist/client-runtime/state/presentation.d.ts +9 -3
- package/dist/client-runtime/state/presentation.js +1 -1
- package/dist/client-runtime/state/preview.d.ts +55 -48
- package/dist/client-runtime/state/preview.js +1 -1
- package/dist/client-runtime/state/project-grouping.d.ts +26 -2
- package/dist/client-runtime/state/project-grouping.js +83 -3
- package/dist/client-runtime/state/projects.d.ts +24 -18
- package/dist/client-runtime/state/projects.js +1 -1
- package/dist/client-runtime/state/relay.d.ts +1 -1
- package/dist/client-runtime/state/relay.js +1 -1
- package/dist/client-runtime/state/review.d.ts +16 -1
- package/dist/client-runtime/state/review.js +27 -6
- package/dist/client-runtime/state/runtime.d.ts +2 -2
- package/dist/client-runtime/state/runtime.js +2 -2
- package/dist/client-runtime/state/server.d.ts +299 -172
- package/dist/client-runtime/state/server.js +192 -16
- package/dist/client-runtime/state/session.d.ts +65 -7
- package/dist/client-runtime/state/session.js +32 -3
- package/dist/client-runtime/state/shell.d.ts +41 -7
- package/dist/client-runtime/state/shell.js +1 -1
- package/dist/client-runtime/state/source-control.d.ts +2 -2
- package/dist/client-runtime/state/source-control.js +1 -1
- package/dist/client-runtime/state/subagentRuntime.d.ts +145 -0
- package/dist/client-runtime/state/subagentRuntime.js +521 -0
- package/dist/client-runtime/state/terminal.d.ts +17 -17
- package/dist/client-runtime/state/terminal.js +1 -1
- package/dist/client-runtime/state/thread-search.d.ts +23 -0
- package/dist/client-runtime/state/thread-search.js +38 -0
- package/dist/client-runtime/state/thread-settled.d.ts +28 -3
- package/dist/client-runtime/state/thread-settled.js +74 -2
- package/dist/client-runtime/state/thread-sort.d.ts +59 -2
- package/dist/client-runtime/state/thread-sort.js +128 -2
- package/dist/client-runtime/state/threads.d.ts +115 -3
- package/dist/client-runtime/state/threads.js +309 -28
- package/dist/client-runtime/state/vcs.d.ts +14 -14
- package/dist/client-runtime/state/vcs.js +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/connection.d.ts +1 -1
- package/dist/connection.js +1 -1
- package/dist/contracts.d.ts +1 -1
- package/dist/contracts.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1 -1
- package/dist/orchestration.d.ts +144 -1
- package/dist/orchestration.js +1 -1
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +1 -1
- package/dist/rpc.d.ts +883 -351
- package/dist/rpc.js +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/shared/DrainableWorker.js +1 -1
- package/dist/shared/KeyedCoalescingWorker.js +1 -1
- package/dist/shared/Net.js +1 -1
- package/dist/shared/advertisedEndpoint.d.ts +1 -1
- package/dist/shared/advertisedEndpoint.js +1 -1
- package/dist/shared/agentAwareness.d.ts +1 -1
- package/dist/shared/backgroundActivitySettings.d.ts +1 -1
- package/dist/shared/composerInlineTokens.js +1 -1
- package/dist/shared/connectAuth.js +1 -1
- package/dist/shared/devHome.js +1 -1
- package/dist/shared/dpop.js +1 -1
- package/dist/shared/git.d.ts +1 -1
- package/dist/shared/httpObservability.js +1 -1
- package/dist/shared/httpReadiness.js +1 -1
- package/dist/shared/keybindings.d.ts +2 -2
- package/dist/shared/keybindings.js +15 -1
- package/dist/shared/model.d.ts +1 -1
- package/dist/shared/oauthScope.js +1 -1
- package/dist/shared/observability.d.ts +8 -1
- package/dist/shared/observability.js +49 -5
- package/dist/shared/path.js +1 -1
- package/dist/shared/preview.js +1 -1
- package/dist/shared/previewViewport.d.ts +1 -1
- package/dist/shared/previewViewport.js +1 -1
- package/dist/shared/projectFavicon.d.ts +2 -1
- package/dist/shared/projectFavicon.js +13 -1
- package/dist/shared/projectScripts.d.ts +1 -1
- package/dist/shared/relayAuth.js +1 -1
- package/dist/shared/relayClient.d.ts +1 -1
- package/dist/shared/relayClient.js +1 -1
- package/dist/shared/relayJwt.js +1 -1
- package/dist/shared/relayTracing.js +1 -1
- package/dist/shared/relayUrl.js +1 -1
- package/dist/shared/remote.js +1 -1
- package/dist/shared/schemaYaml.js +3 -3
- package/dist/shared/semver.js +1 -1
- package/dist/shared/serverSettings.d.ts +1 -1
- package/dist/shared/serverSettings.js +1 -1
- package/dist/shared/shell.d.ts +6 -1
- package/dist/shared/shell.js +42 -4
- package/dist/shared/sourceControl.d.ts +1 -1
- package/dist/shared/t3ProjectFile.d.ts +9 -1
- package/dist/shared/t3ProjectFile.js +12 -2
- package/dist/shared/terminalLabels.d.ts +1 -1
- package/dist/shared/threadEnvMode.d.ts +29 -0
- package/dist/shared/threadEnvMode.js +24 -0
- package/dist/shared/toolActivity.d.ts +1 -1
- package/dist/shared/usageFormat.d.ts +21 -0
- package/dist/shared/usageFormat.js +90 -0
- package/dist/shared/usageMerge.d.ts +67 -0
- package/dist/shared/usageMerge.js +218 -0
- package/dist/shared.d.ts +4472 -668
- package/dist/shared.js +16867 -16273
- package/dist/t3tools.d.ts +2 -2
- package/dist/t3tools.js +2 -2
- package/package.json +5 -5
- package/src/application/index.ts +1 -0
- package/src/application/service.ts +5 -1
- package/src/application/threads.ts +43 -1
- package/src/bin.ts +10 -7
- package/src/cli/app.ts +2 -0
- package/src/cli/format/thread.ts +23 -1
- package/src/cli/search.ts +48 -0
- package/src/config/persist/schema.ts +1 -1
- package/src/orchestration/layer.ts +6 -0
- package/src/orchestration/service.ts +5 -0
- package/src/rpc/error.ts +2 -0
- package/src/rpc/operation.ts +2 -0
- package/src/rpc/ws-group.ts +2 -0
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
ModelSelection,
|
|
7
7
|
OrchestrationMessage,
|
|
8
8
|
OrchestrationProjectShell,
|
|
9
|
+
OrchestrationSearchThreadsInput,
|
|
9
10
|
OrchestrationShellSnapshot,
|
|
10
11
|
OrchestrationThread,
|
|
11
12
|
OrchestrationThreadShell,
|
|
@@ -20,7 +21,7 @@ import type {
|
|
|
20
21
|
} from "@t3tools/contracts";
|
|
21
22
|
|
|
22
23
|
import type { ApplicationError } from "./error.ts";
|
|
23
|
-
import type { ThreadShow } from "./threads.ts";
|
|
24
|
+
import type { ThreadSearchResult, ThreadShow } from "./threads.ts";
|
|
24
25
|
|
|
25
26
|
export type StartThreadInput = {
|
|
26
27
|
readonly projectRef?: string;
|
|
@@ -196,6 +197,9 @@ export class T3ProjectApplication extends Context.Service<
|
|
|
196
197
|
>()("t3cli/T3ProjectApplication") {}
|
|
197
198
|
|
|
198
199
|
export type T3ThreadApplicationService = {
|
|
200
|
+
readonly searchThreads: (
|
|
201
|
+
input: OrchestrationSearchThreadsInput,
|
|
202
|
+
) => Effect.Effect<ReadonlyArray<ThreadSearchResult>, ApplicationError>;
|
|
199
203
|
readonly listThreads: (
|
|
200
204
|
projectRef: string,
|
|
201
205
|
options?: {
|
|
@@ -9,7 +9,11 @@ import { resolveProjectScope } from "../domain/helpers.ts";
|
|
|
9
9
|
import { type ListThreadsInclude, type StartThreadInput } from "./service.ts";
|
|
10
10
|
import type { CallbackThreadInput, SendThreadInput } from "./service.ts";
|
|
11
11
|
import type { T3ThreadApplicationService } from "./service.ts";
|
|
12
|
-
import type {
|
|
12
|
+
import type {
|
|
13
|
+
OrchestrationSearchThreadsInput,
|
|
14
|
+
OrchestrationThreadSearchMatch,
|
|
15
|
+
OrchestrationThreadShell,
|
|
16
|
+
} from "@t3tools/contracts";
|
|
13
17
|
import { mergeModelOptions } from "./model-selection.ts";
|
|
14
18
|
import { derivePendingApprovals, derivePendingUserInputs } from "../domain/thread-activities.ts";
|
|
15
19
|
import {
|
|
@@ -73,6 +77,30 @@ export const makeThreadApplication = Effect.fn("makeThreadApplication")(function
|
|
|
73
77
|
threads: snapshot.threads.filter((thread) => thread.projectId === scope.project.id),
|
|
74
78
|
};
|
|
75
79
|
});
|
|
80
|
+
const searchThreads = Effect.fn("T3ApplicationLive.searchThreads")(function* (
|
|
81
|
+
input: OrchestrationSearchThreadsInput,
|
|
82
|
+
) {
|
|
83
|
+
const result = yield* orchestration.searchThreads(input);
|
|
84
|
+
const snapshot = yield* orchestration.getShellSnapshot();
|
|
85
|
+
const threadsById = new Map(snapshot.threads.map((thread) => [thread.id, thread]));
|
|
86
|
+
const projectsById = new Map(snapshot.projects.map((project) => [project.id, project]));
|
|
87
|
+
return result.matches.map((match) => {
|
|
88
|
+
const thread = threadsById.get(match.threadId);
|
|
89
|
+
const project = projectsById.get(match.projectId);
|
|
90
|
+
return {
|
|
91
|
+
threadId: match.threadId,
|
|
92
|
+
threadTitle: thread?.title ?? null,
|
|
93
|
+
projectId: match.projectId,
|
|
94
|
+
projectTitle: project?.title ?? null,
|
|
95
|
+
workspaceRoot: project?.workspaceRoot ?? null,
|
|
96
|
+
branch: thread?.branch ?? null,
|
|
97
|
+
worktreePath: thread?.worktreePath ?? null,
|
|
98
|
+
source: match.source,
|
|
99
|
+
snippet: match.snippet,
|
|
100
|
+
messageCreatedAt: match.messageCreatedAt,
|
|
101
|
+
} satisfies ThreadSearchResult;
|
|
102
|
+
});
|
|
103
|
+
});
|
|
76
104
|
const getThreadMessages = Effect.fn("T3ApplicationLive.getThreadMessages")(function* (
|
|
77
105
|
threadId: string,
|
|
78
106
|
) {
|
|
@@ -276,6 +304,7 @@ export const makeThreadApplication = Effect.fn("makeThreadApplication")(function
|
|
|
276
304
|
updateThread,
|
|
277
305
|
unarchiveThread,
|
|
278
306
|
listThreads,
|
|
307
|
+
searchThreads,
|
|
279
308
|
getThreadMessages,
|
|
280
309
|
respondToThread,
|
|
281
310
|
sendThread,
|
|
@@ -287,6 +316,19 @@ export const makeThreadApplication = Effect.fn("makeThreadApplication")(function
|
|
|
287
316
|
} satisfies T3ThreadApplicationService;
|
|
288
317
|
});
|
|
289
318
|
|
|
319
|
+
export type ThreadSearchResult = {
|
|
320
|
+
readonly threadId: OrchestrationThreadSearchMatch["threadId"];
|
|
321
|
+
readonly threadTitle: string | null;
|
|
322
|
+
readonly projectId: OrchestrationThreadSearchMatch["projectId"];
|
|
323
|
+
readonly projectTitle: string | null;
|
|
324
|
+
readonly workspaceRoot: string | null;
|
|
325
|
+
readonly branch: string | null;
|
|
326
|
+
readonly worktreePath: string | null;
|
|
327
|
+
readonly source: OrchestrationThreadSearchMatch["source"];
|
|
328
|
+
readonly snippet: OrchestrationThreadSearchMatch["snippet"];
|
|
329
|
+
readonly messageCreatedAt: OrchestrationThreadSearchMatch["messageCreatedAt"];
|
|
330
|
+
};
|
|
331
|
+
|
|
290
332
|
const loadThreadsSnapshot = Effect.fn("loadThreadsSnapshot")(function* (
|
|
291
333
|
include: ListThreadsInclude,
|
|
292
334
|
) {
|
package/src/bin.ts
CHANGED
|
@@ -54,14 +54,17 @@ const program = Effect.gen(function* () {
|
|
|
54
54
|
process.exitCode = error.errors.length > 0 ? 1 : 0;
|
|
55
55
|
}),
|
|
56
56
|
),
|
|
57
|
-
Effect.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
Effect.matchEffect({
|
|
58
|
+
onFailure: (error) =>
|
|
59
|
+
Effect.gen(function* () {
|
|
60
|
+
const output = yield* T3Output;
|
|
61
|
+
yield* output.writeStderr(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
62
|
+
process.exitCode = 1;
|
|
63
|
+
}),
|
|
64
|
+
onSuccess: (value) => Effect.succeed(value),
|
|
65
|
+
}),
|
|
63
66
|
Effect.scoped,
|
|
64
67
|
Effect.provide(CliLayer),
|
|
65
68
|
);
|
|
66
69
|
|
|
67
|
-
NodeRuntime.runMain(program
|
|
70
|
+
NodeRuntime.runMain(program);
|
package/src/cli/app.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { cliEnvironmentSetting } from "./env/flag.ts";
|
|
|
7
7
|
import { createTerminalCommandGroup } from "./terminal.ts";
|
|
8
8
|
import { createModelCommand } from "./model.ts";
|
|
9
9
|
import { createProjectCommand } from "./project.ts";
|
|
10
|
+
import { searchThreadsCommand } from "./search.ts";
|
|
10
11
|
import { createThreadCommand } from "./thread.ts";
|
|
11
12
|
import { listThreadsCommand } from "./threads/list.ts";
|
|
12
13
|
import { sendThreadCommand } from "./threads/send.ts";
|
|
@@ -26,6 +27,7 @@ export function createCliCommand() {
|
|
|
26
27
|
listThreadsCommand,
|
|
27
28
|
createModelCommand(),
|
|
28
29
|
createProjectCommand(),
|
|
30
|
+
searchThreadsCommand,
|
|
29
31
|
createTerminalCommandGroup(),
|
|
30
32
|
startThreadCommand,
|
|
31
33
|
sendThreadCommand,
|
package/src/cli/format/thread.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ThreadShow } from "../../application/threads.ts";
|
|
1
|
+
import type { ThreadSearchResult, ThreadShow } from "../../application/threads.ts";
|
|
2
2
|
import type { WaitEvent } from "../../application/service.ts";
|
|
3
3
|
import type { OrchestrationThread, OrchestrationThreadShell } from "@t3tools/contracts";
|
|
4
4
|
import { latestAssistantMessage, threadStatus } from "../../domain/thread-lifecycle.ts";
|
|
@@ -98,6 +98,28 @@ export function formatThreadsHuman(threads: ReadonlyArray<OrchestrationThreadShe
|
|
|
98
98
|
)}\n`;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
export function formatThreadSearchHuman(matches: ReadonlyArray<ThreadSearchResult>) {
|
|
102
|
+
if (matches.length === 0) {
|
|
103
|
+
return "no matches\n";
|
|
104
|
+
}
|
|
105
|
+
return `${matches
|
|
106
|
+
.map((match) =>
|
|
107
|
+
formatRecord([
|
|
108
|
+
{ field: "thread", value: match.threadTitle ?? "-" },
|
|
109
|
+
{ field: "thread id", value: match.threadId },
|
|
110
|
+
{ field: "project", value: match.projectTitle ?? "-" },
|
|
111
|
+
{ field: "project id", value: match.projectId },
|
|
112
|
+
{ field: "workspace", value: match.workspaceRoot ?? "-" },
|
|
113
|
+
{ field: "branch", value: match.branch ?? "-" },
|
|
114
|
+
{ field: "worktree", value: match.worktreePath ?? "-" },
|
|
115
|
+
{ field: "source", value: match.source },
|
|
116
|
+
{ field: "created", value: match.messageCreatedAt ?? "-" },
|
|
117
|
+
{ field: "snippet", value: match.snippet },
|
|
118
|
+
]),
|
|
119
|
+
)
|
|
120
|
+
.join("\n\n")}\n`;
|
|
121
|
+
}
|
|
122
|
+
|
|
101
123
|
export function formatThreadDeletedHuman(input: {
|
|
102
124
|
readonly threadId: string;
|
|
103
125
|
readonly dispatch: { readonly sequence: number };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Option from "effect/Option";
|
|
3
|
+
import { Argument, Command, Flag } from "effect/unstable/cli";
|
|
4
|
+
|
|
5
|
+
import { T3Application } from "../application/service.ts";
|
|
6
|
+
import { loadT3CliEnv } from "../config/env/env.ts";
|
|
7
|
+
import { InvalidLimitError } from "./error.ts";
|
|
8
|
+
import { extraArgsConfig } from "./extra-args.ts";
|
|
9
|
+
import { formatFlag } from "./flags.ts";
|
|
10
|
+
import { formatThreadSearchHuman } from "./format/thread.ts";
|
|
11
|
+
import { resolveOutputFormat } from "./format/output.ts";
|
|
12
|
+
import { T3Output } from "./output/service.ts";
|
|
13
|
+
import { CliRuntime } from "./runtime/service.ts";
|
|
14
|
+
|
|
15
|
+
export const searchThreadsCommand = Command.make(
|
|
16
|
+
"search",
|
|
17
|
+
{
|
|
18
|
+
query: Argument.string("query"),
|
|
19
|
+
limit: Flag.integer("limit").pipe(
|
|
20
|
+
Flag.withDescription("Maximum matches (1-50, default: 50)"),
|
|
21
|
+
Flag.optional,
|
|
22
|
+
),
|
|
23
|
+
format: formatFlag,
|
|
24
|
+
...extraArgsConfig,
|
|
25
|
+
},
|
|
26
|
+
({ query, limit, format }) =>
|
|
27
|
+
Effect.gen(function* () {
|
|
28
|
+
const value = Option.getOrUndefined(limit);
|
|
29
|
+
if (value !== undefined && (value < 1 || value > 50)) {
|
|
30
|
+
return yield* Effect.fail(
|
|
31
|
+
new InvalidLimitError({ message: `invalid limit: ${value}`, value: String(value) }),
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const application = yield* T3Application;
|
|
35
|
+
const cliRuntime = yield* CliRuntime;
|
|
36
|
+
const t3CliEnv = yield* loadT3CliEnv;
|
|
37
|
+
const output = yield* T3Output;
|
|
38
|
+
const resolvedFormat = resolveOutputFormat(format, cliRuntime, t3CliEnv, "json");
|
|
39
|
+
const matches = yield* application.searchThreads({
|
|
40
|
+
query,
|
|
41
|
+
...(value !== undefined ? { limit: value } : {}),
|
|
42
|
+
});
|
|
43
|
+
if (resolvedFormat === "json") {
|
|
44
|
+
return yield* output.printJson(matches);
|
|
45
|
+
}
|
|
46
|
+
return yield* output.writeStdout(formatThreadSearchHuman(matches));
|
|
47
|
+
}),
|
|
48
|
+
).pipe(Command.withDescription("search threads by conversation content"));
|
|
@@ -34,4 +34,4 @@ export type StoredConfigV1File = Schema.Schema.Type<typeof StoredConfigV1FileSch
|
|
|
34
34
|
|
|
35
35
|
export const StoredConfigV1FileJson = Schema.fromJsonString(StoredConfigV1FileSchema);
|
|
36
36
|
export const StoredConfigV2FileJson = Schema.fromJsonString(StoredConfigV2FileSchema);
|
|
37
|
-
export const UnknownConfigFileJson = Schema.
|
|
37
|
+
export const UnknownConfigFileJson = Schema.fromJsonString(Schema.Unknown);
|
|
@@ -107,6 +107,11 @@ export const makeT3Orchestration = Effect.fn("makeT3Orchestration")(function* ()
|
|
|
107
107
|
);
|
|
108
108
|
},
|
|
109
109
|
);
|
|
110
|
+
const searchThreads = Effect.fn("T3OrchestrationLive.searchThreads")(function* (input) {
|
|
111
|
+
return yield* rpc.run(ORCHESTRATION_WS_METHODS.searchThreads, (client) =>
|
|
112
|
+
client[ORCHESTRATION_WS_METHODS.searchThreads](input),
|
|
113
|
+
);
|
|
114
|
+
});
|
|
110
115
|
const getThreadSnapshot = Effect.fn("T3OrchestrationLive.getThreadSnapshot")(function* (
|
|
111
116
|
threadId: string,
|
|
112
117
|
) {
|
|
@@ -160,6 +165,7 @@ export const makeT3Orchestration = Effect.fn("makeT3Orchestration")(function* ()
|
|
|
160
165
|
getServerConfig,
|
|
161
166
|
getShellSnapshot,
|
|
162
167
|
getArchivedShellSnapshot,
|
|
168
|
+
searchThreads,
|
|
163
169
|
getThreadSnapshot,
|
|
164
170
|
watchShellSnapshots,
|
|
165
171
|
watchShellSequence,
|
|
@@ -7,6 +7,8 @@ import type {
|
|
|
7
7
|
DispatchResult,
|
|
8
8
|
OrchestrationEvent,
|
|
9
9
|
OrchestrationShellSnapshot,
|
|
10
|
+
OrchestrationSearchThreadsInput,
|
|
11
|
+
OrchestrationSearchThreadsResult,
|
|
10
12
|
OrchestrationThread,
|
|
11
13
|
OrchestrationThreadStreamItem,
|
|
12
14
|
ServerProviders,
|
|
@@ -35,6 +37,9 @@ export type Orchestration = {
|
|
|
35
37
|
OrchestrationShellSnapshot,
|
|
36
38
|
OrchestrationError
|
|
37
39
|
>;
|
|
40
|
+
readonly searchThreads: (
|
|
41
|
+
input: OrchestrationSearchThreadsInput,
|
|
42
|
+
) => Effect.Effect<OrchestrationSearchThreadsResult, OrchestrationError>;
|
|
38
43
|
readonly getThreadSnapshot: (
|
|
39
44
|
threadId: string,
|
|
40
45
|
) => Effect.Effect<OrchestrationThread, OrchestrationError>;
|
package/src/rpc/error.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
KeybindingsConfigError,
|
|
8
8
|
OrchestrationDispatchCommandError,
|
|
9
9
|
OrchestrationGetSnapshotError,
|
|
10
|
+
OrchestrationSearchThreadsError,
|
|
10
11
|
PreviewAutomationError,
|
|
11
12
|
ServerSettingsError,
|
|
12
13
|
TerminalError,
|
|
@@ -22,6 +23,7 @@ const RpcErrorCauseSchema = Schema.Union([
|
|
|
22
23
|
KeybindingsConfigError,
|
|
23
24
|
OrchestrationDispatchCommandError,
|
|
24
25
|
OrchestrationGetSnapshotError,
|
|
26
|
+
OrchestrationSearchThreadsError,
|
|
25
27
|
PreviewAutomationError,
|
|
26
28
|
ServerSettingsError,
|
|
27
29
|
TerminalError,
|
package/src/rpc/operation.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
KeybindingsConfigError,
|
|
4
4
|
OrchestrationDispatchCommandError,
|
|
5
5
|
OrchestrationGetSnapshotError,
|
|
6
|
+
OrchestrationSearchThreadsError,
|
|
6
7
|
PreviewAutomationError,
|
|
7
8
|
ServerSettingsError,
|
|
8
9
|
TerminalError,
|
|
@@ -23,6 +24,7 @@ export type CliRpcOperationError =
|
|
|
23
24
|
| KeybindingsConfigError
|
|
24
25
|
| OrchestrationDispatchCommandError
|
|
25
26
|
| OrchestrationGetSnapshotError
|
|
27
|
+
| OrchestrationSearchThreadsError
|
|
26
28
|
| PreviewAutomationError
|
|
27
29
|
| RpcClientError.RpcClientError
|
|
28
30
|
| ServerSettingsError
|
package/src/rpc/ws-group.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
WS_METHODS,
|
|
7
7
|
WsOrchestrationDispatchCommandRpc,
|
|
8
8
|
WsOrchestrationGetArchivedShellSnapshotRpc,
|
|
9
|
+
WsOrchestrationSearchThreadsRpc,
|
|
9
10
|
WsOrchestrationSubscribeShellRpc,
|
|
10
11
|
WsOrchestrationSubscribeThreadRpc,
|
|
11
12
|
WsPreviewAutomationConnectRpc,
|
|
@@ -49,6 +50,7 @@ export const CliWsRpcGroup = RpcGroup.make(
|
|
|
49
50
|
WsSubscribeTerminalMetadataRpc,
|
|
50
51
|
WsOrchestrationDispatchCommandRpc,
|
|
51
52
|
WsOrchestrationGetArchivedShellSnapshotRpc,
|
|
53
|
+
WsOrchestrationSearchThreadsRpc,
|
|
52
54
|
WsOrchestrationSubscribeShellRpc,
|
|
53
55
|
WsOrchestrationSubscribeThreadRpc,
|
|
54
56
|
WsPreviewAutomationConnectRpc,
|