@theway-ai/sdk 0.1.9
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 +108 -0
- package/dist/client.d.ts +180 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +531 -0
- package/dist/client.js.map +1 -0
- package/dist/generated/commands.d.ts +195 -0
- package/dist/generated/commands.d.ts.map +1 -0
- package/dist/generated/commands.js +633 -0
- package/dist/generated/commands.js.map +1 -0
- package/dist/generated/events.d.ts +158 -0
- package/dist/generated/events.d.ts.map +1 -0
- package/dist/generated/events.js +1122 -0
- package/dist/generated/events.js.map +1 -0
- package/dist/generated/extensions.d.ts +184 -0
- package/dist/generated/extensions.d.ts.map +1 -0
- package/dist/generated/extensions.js +1309 -0
- package/dist/generated/extensions.js.map +1 -0
- package/dist/generated/graph_engine.d.ts +422 -0
- package/dist/generated/graph_engine.d.ts.map +1 -0
- package/dist/generated/graph_engine.js +3048 -0
- package/dist/generated/graph_engine.js.map +1 -0
- package/dist/generated/health.d.ts +83 -0
- package/dist/generated/health.d.ts.map +1 -0
- package/dist/generated/health.js +179 -0
- package/dist/generated/health.js.map +1 -0
- package/dist/generated/session.d.ts +854 -0
- package/dist/generated/session.d.ts.map +1 -0
- package/dist/generated/session.js +6790 -0
- package/dist/generated/session.js.map +1 -0
- package/dist/generated/settings.d.ts +182 -0
- package/dist/generated/settings.d.ts.map +1 -0
- package/dist/generated/settings.js +324 -0
- package/dist/generated/settings.js.map +1 -0
- package/dist/generated/state.d.ts +304 -0
- package/dist/generated/state.d.ts.map +1 -0
- package/dist/generated/state.js +1391 -0
- package/dist/generated/state.js.map +1 -0
- package/dist/generated/tools.d.ts +413 -0
- package/dist/generated/tools.d.ts.map +1 -0
- package/dist/generated/tools.js +2487 -0
- package/dist/generated/tools.js.map +1 -0
- package/dist/health.d.ts +20 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +62 -0
- package/dist/health.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/docs/PROTOCOL.md +129 -0
- package/package.json +47 -0
- package/proto/commands.proto +70 -0
- package/proto/events.proto +87 -0
- package/proto/extensions.proto +99 -0
- package/proto/graph_engine.proto +236 -0
- package/proto/health.proto +26 -0
- package/proto/session.proto +498 -0
- package/proto/settings.proto +79 -0
- package/proto/state.proto +130 -0
- package/proto/tools.proto +238 -0
package/README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# @theway-ai/sdk
|
|
2
|
+
|
|
3
|
+
Typed TypeScript SDK for the **theway** gRPC daemon (`theway --grpc` loopback server).
|
|
4
|
+
Generated from the five domain protos
|
|
5
|
+
([`proto/commands.proto`](proto/commands.proto),
|
|
6
|
+
[`proto/session.proto`](proto/session.proto),
|
|
7
|
+
[`proto/graph_engine.proto`](proto/graph_engine.proto),
|
|
8
|
+
[`proto/events.proto`](proto/events.proto),
|
|
9
|
+
[`proto/settings.proto`](proto/settings.proto)) + [`proto/health.proto`](proto/health.proto)
|
|
10
|
+
via ts-proto + `@grpc/grpc-js` — **no runtime proto loading**, no path magic.
|
|
11
|
+
|
|
12
|
+
`ThewayGrpcClient` routes each RPC to its domain service — `CommandService`,
|
|
13
|
+
`SessionService`, `SettingsService`, `GraphEngineService`, and `EventService` — while
|
|
14
|
+
`HealthClient` covers the standard `grpc.health.v1.Health` service.
|
|
15
|
+
|
|
16
|
+
Published as a public package on the official npm registry (`https://registry.npmjs.org/`).
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm install @theway-ai/sdk
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Documentation
|
|
25
|
+
|
|
26
|
+
The package ships protocol/spec documentation in [`docs/PROTOCOL.md`](docs/PROTOCOL.md).
|
|
27
|
+
It covers session identity, `SessionSnapshot`, pagination, graph node types, streaming,
|
|
28
|
+
collapse, and compatibility notes.
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { ThewayGrpcClient, HealthClient } from '@theway-ai/sdk';
|
|
34
|
+
|
|
35
|
+
const client = new ThewayGrpcClient('http://127.0.0.1:34567');
|
|
36
|
+
|
|
37
|
+
// Authoritative current session snapshot (typed SessionSnapshot)
|
|
38
|
+
const snapshot = await client.getSnapshot();
|
|
39
|
+
|
|
40
|
+
// Commands — throw when the server replies accepted: false
|
|
41
|
+
await client.prompt('hello');
|
|
42
|
+
await client.setModelSpec('anthropic:claude-sonnet-4-5');
|
|
43
|
+
await client.abort();
|
|
44
|
+
await client.resolveControlPlane(true);
|
|
45
|
+
|
|
46
|
+
// Graph / session control
|
|
47
|
+
const { resetNodeIds } = await client.graphRetry('dag-1');
|
|
48
|
+
const sessions = await client.listSessions();
|
|
49
|
+
|
|
50
|
+
// Daemon settings (issue #72) — partial update: only set fields are applied
|
|
51
|
+
const config = await client.getConfig();
|
|
52
|
+
await client.setConfig({ triggerPollSecs: 30, skillsDirs: ['/extra/skills'] });
|
|
53
|
+
|
|
54
|
+
// Snapshot + event stream (StreamFrame oneof: payload.$case === 'snapshot' | 'event')
|
|
55
|
+
await client.streamEvents((frame) => {
|
|
56
|
+
if (frame.payload?.$case === 'snapshot') {
|
|
57
|
+
console.log(frame.payload.snapshot.feedLines?.length);
|
|
58
|
+
}
|
|
59
|
+
}, abortSignal);
|
|
60
|
+
|
|
61
|
+
// Standard gRPC health probe (grpc.health.v1)
|
|
62
|
+
const health = new HealthClient('127.0.0.1:34567');
|
|
63
|
+
const serving = await health.check('');
|
|
64
|
+
|
|
65
|
+
client.close();
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Regenerating
|
|
69
|
+
|
|
70
|
+
`crates/theway-transport/proto/` at the repo root is the single source of truth; `proto/*.proto` in this package is a mirror and
|
|
71
|
+
`src/generated/` is regenerated from it. Sync and regenerate with:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
cd ../.. # repo root
|
|
75
|
+
make hooks # once per clone: enable the pre-commit hook
|
|
76
|
+
make sdk-sync # or: bash scripts/sdk-sync.sh
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The enabled pre-commit hook ([`.githooks/pre-commit`](../../.githooks/pre-commit)) runs the sync automatically
|
|
80
|
+
whenever `crates/theway-transport/proto/` changes and stages the regenerated files into the same commit, so the checked-in proto and
|
|
81
|
+
generated client never drift.
|
|
82
|
+
|
|
83
|
+
Manual generation without the Makefile:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
npm install
|
|
87
|
+
npm run gen # protoc (grpc-tools) + ts-proto → src/generated/
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Publishing
|
|
91
|
+
|
|
92
|
+
Releases publish from one `vX.Y.Z` tag through the repository release workflow
|
|
93
|
+
([`.github/workflows/release.yml`](../../.github/workflows/release.yml)). The tag
|
|
94
|
+
version must equal the Cargo workspace version, every runtime crate in
|
|
95
|
+
[`scripts/release-crates.txt`](../../scripts/release-crates.txt), this package's
|
|
96
|
+
version, and `@theway-ai/plugin-sdk`'s version; [`scripts/release-validate.sh`](../../scripts/release-validate.sh)
|
|
97
|
+
rejects any mismatch. The workflow publishes the GitHub Release binaries, the crates.io
|
|
98
|
+
allowlist, and both npm SDK packages.
|
|
99
|
+
|
|
100
|
+
To cut a release, bump `version` in the root `Cargo.toml` workspace section and in both
|
|
101
|
+
`sdks/*/package.json` (plus their `package-lock.json` files), commit to `main`, then push
|
|
102
|
+
`git tag vX.Y.Z && git push origin vX.Y.Z`. No local npm login is required — GitHub Actions
|
|
103
|
+
uses npm trusted publishing.
|
|
104
|
+
|
|
105
|
+
## Versioning
|
|
106
|
+
|
|
107
|
+
The SDK version always equals the daemon/workspace version. Protocol contract changes
|
|
108
|
+
bump the shared version once, and that one version publishes every artifact.
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import * as grpc from '@grpc/grpc-js';
|
|
2
|
+
import { type CommandResult, type Empty, type SendMessageRequest } from './generated/commands.js';
|
|
3
|
+
import { type StreamFrame } from './generated/events.js';
|
|
4
|
+
import { type DecideExtensionTrustRequest, type DecideExtensionTrustResponse, type ExtensionCommandOutcome, type ExtensionSnapshot, type InvokeExtensionCommandRequest, type ReloadExtensionsRequest, type ReloadExtensionsResponse } from './generated/extensions.js';
|
|
5
|
+
import { type GetNodeOutputRequest, type GetNodeOutputResponse, type GraphCheckpointRequest, type GraphCheckpointResponse, type GraphListResponse, type GraphRestoreResponse, type GraphRetryResponse, type GraphSkipResponse, type SessionGraphNode } from './generated/graph_engine.js';
|
|
6
|
+
import { type ActivateSessionRequest, type ActivateSessionResponse, type CollapseSessionRequest, type CollapseSessionResponse, type CreateSessionRequest, type CreateSessionResponse, type DeleteSessionRequest, type DeleteSessionResponse, type ListSessionGraphNodeMessagesResponse, type ListSessionsResponse, type RenameSessionRequest, type SessionMessagePage, type SessionSnapshot, type UpdateSessionMetadataRequest } from './generated/session.js';
|
|
7
|
+
import { type DaemonConfig } from './generated/settings.js';
|
|
8
|
+
import { type EditFileRequest, type EditFileResponse, type ExecCommandRequest, type FindRequest, type FindResponse, type GrepRequest, type GrepResponse, type ListDirRequest, type ListDirResponse, type MemoryForgetRequest, type MemoryForgetResponse, type MemoryListRequest, type MemoryListResponse, type MemoryReadRequest, type MemoryReadResponse, type MemorySaveRequest, type MemorySaveResponse, type ReadFileRequest, type ReadFileResponse, type SkillInstallRequest, type SkillInstallResponse, type WriteFileRequest, type WriteFileResponse } from './generated/tools.js';
|
|
9
|
+
import { type LoadCronJobsRequest, type LoadCronJobsResponse, type LoadDagRunsRequest, type LoadDagRunsResponse, type LoadTriggerRulesRequest, type LoadTriggerRulesResponse, type SaveCronJobsRequest, type SaveCronJobsResponse, type SaveDagRunRequest, type SaveDagRunResponse, type SaveTriggerRulesRequest, type SaveTriggerRulesResponse } from './generated/state.js';
|
|
10
|
+
/**
|
|
11
|
+
* Typed gRPC client for the `theway --grpc` loopback server
|
|
12
|
+
* (theway.grpc.v1.CommandService / SessionService / SettingsService /
|
|
13
|
+
* ExtensionService / ToolService / StorageService / GraphEngineService /
|
|
14
|
+
* EventService).
|
|
15
|
+
* Generated from the domain proto files
|
|
16
|
+
* and health.proto (ts-proto + @grpc/grpc-js) — no runtime proto loading.
|
|
17
|
+
*
|
|
18
|
+
* Command RPCs (SendMessage / SetModel / …) resolve the raw CommandResult;
|
|
19
|
+
* the convenience wrappers (`prompt`, `setModelSpec`, `abort`, …) throw when
|
|
20
|
+
* the server replies `accepted: false`, mirroring the caller-side contract of
|
|
21
|
+
* the JSON channels.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ThewayGrpcClient {
|
|
24
|
+
#private;
|
|
25
|
+
constructor(baseUrl: string, credentials?: grpc.ChannelCredentials);
|
|
26
|
+
/** `GetSnapshot` — the full nested session snapshot. Pass a session id or omit for the daemon's current session. */
|
|
27
|
+
getSnapshot(sessionId?: string): Promise<SessionSnapshot>;
|
|
28
|
+
/** `ListSessionMessages` — cursor-paginated full message history. */
|
|
29
|
+
listSessionMessages(sessionId: string, limit?: number, beforeEntryId?: string): Promise<SessionMessagePage>;
|
|
30
|
+
/** `CollapseSession` — collapse a session into a session graph node. */
|
|
31
|
+
collapseSession(request: CollapseSessionRequest): Promise<CollapseSessionResponse>;
|
|
32
|
+
/** `GetSessionGraphNode` — fetch one session graph node. */
|
|
33
|
+
getSessionGraphNode(sessionId: string, nodeId: string): Promise<SessionGraphNode>;
|
|
34
|
+
/** `ListSessionGraphNodeMessages` — list messages attached to a session graph node. */
|
|
35
|
+
listSessionGraphNodeMessages(sessionId: string, nodeId: string, offset?: number, limit?: number): Promise<ListSessionGraphNodeMessagesResponse>;
|
|
36
|
+
/** `StreamSessionGraphNode` — open a streaming session graph node frame stream. */
|
|
37
|
+
streamSessionGraphNode(sessionId: string, nodeId: string): grpc.ClientReadableStream<import("./generated/session.js").SessionGraphNodeStreamFrame>;
|
|
38
|
+
/** `GetNodeOutput` — a DAG node's output fragment from an offset. */
|
|
39
|
+
getNodeOutput(request: GetNodeOutputRequest): Promise<GetNodeOutputResponse>;
|
|
40
|
+
/** `SendMessage` — submit a user prompt (mode=QUEUE). */
|
|
41
|
+
prompt(text: string, images?: SendMessageRequest['images'], sessionId?: string): Promise<void>;
|
|
42
|
+
/** `SendMessage` — submit a user prompt to an explicit session (session id first). */
|
|
43
|
+
prompt(sessionId: string, text: string, images?: SendMessageRequest['images']): Promise<void>;
|
|
44
|
+
/** `SendMessage` — raw request (mode=INTERRUPT supported). */
|
|
45
|
+
sendMessage(request: SendMessageRequest): Promise<CommandResult>;
|
|
46
|
+
/** `SetModel` — switch model with a composed `provider:model` spec. */
|
|
47
|
+
setModelSpec(spec: string, sessionId?: string): Promise<void>;
|
|
48
|
+
/** `SetModel` with `provider` + `model` (composed into `provider:model`). */
|
|
49
|
+
setModel(provider: string, model: string, sessionId?: string): Promise<void>;
|
|
50
|
+
/** `SetModel` with an explicit session id and a composed `provider:model` spec. */
|
|
51
|
+
setModel(sessionId: string, spec: string): Promise<void>;
|
|
52
|
+
/** `SetThinking` — set the active thinking level for a session. */
|
|
53
|
+
setThinking(level: string, sessionId?: string): Promise<void>;
|
|
54
|
+
/** `SetThinking` — set the active thinking level for an explicit session (session id first). */
|
|
55
|
+
setThinking(sessionId: string, level: string): Promise<void>;
|
|
56
|
+
/** `Cancel` — stop the in-flight turn (same as local Ctrl-C). */
|
|
57
|
+
abort(sessionId?: string): Promise<void>;
|
|
58
|
+
/** `Approve` — resolve the pending control-plane approval (approve / reject). */
|
|
59
|
+
resolveControlPlane(approve: boolean, sessionId?: string): Promise<void>;
|
|
60
|
+
/** `Approve` — resolve the pending control-plane approval for an explicit session (session id first). */
|
|
61
|
+
resolveControlPlane(sessionId: string, approve: boolean): Promise<void>;
|
|
62
|
+
/** Structured extension catalog, redacted diagnostics and contributions. */
|
|
63
|
+
getExtensions(): Promise<ExtensionSnapshot>;
|
|
64
|
+
/** Invoke a registered extension command in either interactive or headless mode. */
|
|
65
|
+
invokeExtensionCommand(request: InvokeExtensionCommandRequest): Promise<ExtensionCommandOutcome>;
|
|
66
|
+
/** Re-discover extensions; active work may return `status=pending`. */
|
|
67
|
+
reloadExtensions(request?: ReloadExtensionsRequest): Promise<ReloadExtensionsResponse>;
|
|
68
|
+
/** Persist a project or exact-package trust decision and request reload. */
|
|
69
|
+
decideExtensionTrust(request: DecideExtensionTrustRequest): Promise<DecideExtensionTrustResponse>;
|
|
70
|
+
/** `GraphCancel` — cancel a run. */
|
|
71
|
+
graphCancel(sessionId: string, runId: string): Promise<void>;
|
|
72
|
+
/** `GraphRetry` — re-run failed/cancelled nodes (omitted nodeId = all). */
|
|
73
|
+
graphRetry(sessionId: string, runId: string, nodeId?: string): Promise<GraphRetryResponse>;
|
|
74
|
+
/** `GraphSkip` — skip a node (counts as success for downstream). */
|
|
75
|
+
graphSkip(sessionId: string, runId: string, nodeId: string): Promise<GraphSkipResponse>;
|
|
76
|
+
/** `GraphNodeInterrupt` — stop the node's in-flight turn. */
|
|
77
|
+
graphNodeInterrupt(sessionId: string, runId: string, nodeId: string): Promise<void>;
|
|
78
|
+
/** `GraphNodeSteer` — queue a steering message at the node's next turn boundary. */
|
|
79
|
+
graphNodeSteer(sessionId: string, runId: string, nodeId: string, text: string): Promise<void>;
|
|
80
|
+
/** `GraphCheckpoint` — export run snapshots as portable JSON. */
|
|
81
|
+
graphCheckpoint(request?: GraphCheckpointRequest): Promise<GraphCheckpointResponse>;
|
|
82
|
+
/** `GraphRestore` — revive a run from a GraphCheckpoint snapshot. */
|
|
83
|
+
graphRestore(sessionId: string, snapshot: string): Promise<GraphRestoreResponse>;
|
|
84
|
+
/** `GraphList` — enumerate one session's graph runs. */
|
|
85
|
+
graphList(sessionId: string): Promise<GraphListResponse>;
|
|
86
|
+
/** `ListSessions` — all sessions (live + archived) with the current one marked. */
|
|
87
|
+
listSessions(): Promise<ListSessionsResponse>;
|
|
88
|
+
/** `CreateSession` — create a session. */
|
|
89
|
+
createSession(name?: string, sessionId?: string, metadata?: CreateSessionRequest['metadata']): Promise<CreateSessionResponse>;
|
|
90
|
+
/** `CreateSession` — create a session with an explicit session id and metadata. */
|
|
91
|
+
createSession(sessionId: string, metadata?: CreateSessionRequest['metadata']): Promise<CreateSessionResponse>;
|
|
92
|
+
/** `UpdateSessionMetadata` — update opaque session metadata KV. */
|
|
93
|
+
updateSessionMetadata(sessionId: string, metadata: UpdateSessionMetadataRequest['metadata']): Promise<void>;
|
|
94
|
+
/** `RenameSession` — rename a session. */
|
|
95
|
+
renameSession(sessionId: string, name: string): Promise<void>;
|
|
96
|
+
/** `DeleteSession` — delete a session (refused while graphs are running). */
|
|
97
|
+
deleteSession(sessionId: string): Promise<DeleteSessionResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* `ActivateSession` — atomically create or resume a client-bound session.
|
|
100
|
+
* The server applies the runtime before replying, so a successful response
|
|
101
|
+
* means the daemon is ready to operate in `runtime.workDir`.
|
|
102
|
+
*/
|
|
103
|
+
activateSession(request: ActivateSessionRequest): Promise<ActivateSessionResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* `SetCredential` — install a memory-only provider secret for a session.
|
|
106
|
+
* Secrets are never persisted and never appear in responses or events.
|
|
107
|
+
*/
|
|
108
|
+
setCredential(sessionId: string, provider: string, secret: Uint8Array | string): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* `ClearCredential` — remove a session credential. With no provider, clears
|
|
111
|
+
* every provider secret held for the session.
|
|
112
|
+
*/
|
|
113
|
+
clearCredential(sessionId: string, provider?: string): Promise<void>;
|
|
114
|
+
/** `GetConfig` — the daemon's current configuration view. */
|
|
115
|
+
getConfig(): Promise<DaemonConfig>;
|
|
116
|
+
/**
|
|
117
|
+
* `SetConfig` — push a partial configuration update. Absent fields keep
|
|
118
|
+
* the daemon's current value (repeated fields default to empty = no-op).
|
|
119
|
+
*/
|
|
120
|
+
setConfig(config: Partial<DaemonConfig>): Promise<void>;
|
|
121
|
+
/** `Configure` — alias of `setConfig` (JSON-RPC / WS / MCP verb alignment). */
|
|
122
|
+
configure(config: Partial<DaemonConfig>): Promise<void>;
|
|
123
|
+
/** `ReadFile` — read a file with line pagination. */
|
|
124
|
+
toolRead(request: ReadFileRequest): Promise<ReadFileResponse>;
|
|
125
|
+
/** `WriteFile` — write a file. */
|
|
126
|
+
toolWrite(request: WriteFileRequest): Promise<WriteFileResponse>;
|
|
127
|
+
/** `EditFile` — search-and-replace edit. */
|
|
128
|
+
toolEdit(request: EditFileRequest): Promise<EditFileResponse>;
|
|
129
|
+
/** `ExecCommand` — streaming shell execution. */
|
|
130
|
+
toolExec(request: ExecCommandRequest): grpc.ClientReadableStream<import("./generated/tools.js").ExecOutputFrame>;
|
|
131
|
+
/** `ListDir` — list one directory level. */
|
|
132
|
+
toolListDir(request: ListDirRequest): Promise<ListDirResponse>;
|
|
133
|
+
/** `Grep` — regex content search. */
|
|
134
|
+
toolGrep(request: GrepRequest): Promise<GrepResponse>;
|
|
135
|
+
/** `Find` — filename-glob search. */
|
|
136
|
+
toolFind(request: FindRequest): Promise<FindResponse>;
|
|
137
|
+
/** `MemorySave` — save a memory entry. */
|
|
138
|
+
toolMemorySave(request: MemorySaveRequest): Promise<MemorySaveResponse>;
|
|
139
|
+
/** `MemoryList` — list memory entries. */
|
|
140
|
+
toolMemoryList(request: MemoryListRequest): Promise<MemoryListResponse>;
|
|
141
|
+
/** `MemoryRead` — read one memory entry. */
|
|
142
|
+
toolMemoryRead(request: MemoryReadRequest): Promise<MemoryReadResponse>;
|
|
143
|
+
/** `MemoryForget` — forget a memory entry. */
|
|
144
|
+
toolMemoryForget(request: MemoryForgetRequest): Promise<MemoryForgetResponse>;
|
|
145
|
+
/** `SkillInstall` — two-phase skill install. */
|
|
146
|
+
toolSkillInstall(request: SkillInstallRequest): Promise<SkillInstallResponse>;
|
|
147
|
+
/** `StorageService.ListSessions` — session list from external storage. */
|
|
148
|
+
stateListSessions(request: Empty): Promise<import('./generated/session.js').ListSessionsResponse>;
|
|
149
|
+
/** `StorageService.CreateSession` — create a session in external storage. */
|
|
150
|
+
stateCreateSession(request: CreateSessionRequest): Promise<CreateSessionResponse>;
|
|
151
|
+
/** `StorageService.RenameSession` — rename a session in external storage. */
|
|
152
|
+
stateRenameSession(request: RenameSessionRequest): Promise<CommandResult>;
|
|
153
|
+
/** `StorageService.DeleteSession` — delete a session in external storage. */
|
|
154
|
+
stateDeleteSession(request: DeleteSessionRequest): Promise<DeleteSessionResponse>;
|
|
155
|
+
/** `StorageService.SaveDagRun` — persist a DAG run. */
|
|
156
|
+
stateSaveDagRun(request: SaveDagRunRequest): Promise<SaveDagRunResponse>;
|
|
157
|
+
/** `StorageService.LoadDagRuns` — load persisted DAG runs. */
|
|
158
|
+
stateLoadDagRuns(request: LoadDagRunsRequest): Promise<LoadDagRunsResponse>;
|
|
159
|
+
/** `StorageService.SaveTriggerRules` — persist trigger rules. */
|
|
160
|
+
stateSaveTriggerRules(request: SaveTriggerRulesRequest): Promise<SaveTriggerRulesResponse>;
|
|
161
|
+
/** `StorageService.LoadTriggerRules` — load persisted trigger rules. */
|
|
162
|
+
stateLoadTriggerRules(request: LoadTriggerRulesRequest): Promise<LoadTriggerRulesResponse>;
|
|
163
|
+
/** `StorageService.SaveCronJobs` — persist cron jobs. */
|
|
164
|
+
stateSaveCronJobs(request: SaveCronJobsRequest): Promise<SaveCronJobsResponse>;
|
|
165
|
+
/** `StorageService.LoadCronJobs` — load persisted cron jobs. */
|
|
166
|
+
stateLoadCronJobs(request: LoadCronJobsRequest): Promise<LoadCronJobsResponse>;
|
|
167
|
+
/**
|
|
168
|
+
* `StreamEvents` — convenience alias with the session id first.
|
|
169
|
+
*/
|
|
170
|
+
openEventStream(sessionId: string, onFrame: (frame: StreamFrame) => void, signal?: AbortSignal): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* `StreamEvents` — server-streaming snapshot/event frames. Every frame
|
|
173
|
+
* (snapshot and event) is delivered to `onFrame`. Resolves when the stream
|
|
174
|
+
* ends normally; rejects on transport errors or when the client is closed.
|
|
175
|
+
*/
|
|
176
|
+
streamEvents(onFrame: (frame: StreamFrame) => void, signal?: AbortSignal, sessionId?: string): Promise<void>;
|
|
177
|
+
/** Close the underlying channel; in-flight streams fail fast. */
|
|
178
|
+
close(): void;
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,KAAK,EACV,KAAK,kBAAkB,EAGxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE1B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAE5B,KAAK,iBAAiB,EAItB,KAAK,oBAAoB,EAEzB,KAAK,kBAAkB,EAEvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAE5B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAI1B,KAAK,oCAAoC,EAEzC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC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