@stigmer/protos 0.0.91 → 0.0.93

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.
Files changed (61) hide show
  1. package/ai/stigmer/agentic/agentexecution/v1/api_pb.d.ts +13 -0
  2. package/ai/stigmer/agentic/agentexecution/v1/api_pb.js +1 -1
  3. package/ai/stigmer/agentic/agentexecution/v1/api_pb.js.map +1 -1
  4. package/ai/stigmer/agentic/agentexecution/v1/command_connect.d.ts +5 -3
  5. package/ai/stigmer/agentic/agentexecution/v1/command_connect.js +5 -3
  6. package/ai/stigmer/agentic/agentexecution/v1/command_connect.js.map +1 -1
  7. package/ai/stigmer/agentic/agentexecution/v1/command_pb.d.ts +5 -3
  8. package/ai/stigmer/agentic/agentexecution/v1/command_pb.js +1 -1
  9. package/ai/stigmer/agentic/agentexecution/v1/command_pb.js.map +1 -1
  10. package/ai/stigmer/agentic/agentinstance/v1/spec_pb.js +2 -1
  11. package/ai/stigmer/agentic/agentinstance/v1/spec_pb.js.map +1 -1
  12. package/ai/stigmer/agentic/runner/v1/api_pb.d.ts +205 -0
  13. package/ai/stigmer/agentic/runner/v1/api_pb.js +30 -0
  14. package/ai/stigmer/agentic/runner/v1/api_pb.js.map +1 -0
  15. package/ai/stigmer/agentic/runner/v1/command_connect.d.ts +198 -0
  16. package/ai/stigmer/agentic/runner/v1/command_connect.js +204 -0
  17. package/ai/stigmer/agentic/runner/v1/command_connect.js.map +1 -0
  18. package/ai/stigmer/agentic/runner/v1/command_pb.d.ts +193 -0
  19. package/ai/stigmer/agentic/runner/v1/command_pb.js +34 -0
  20. package/ai/stigmer/agentic/runner/v1/command_pb.js.map +1 -0
  21. package/ai/stigmer/agentic/runner/v1/enum_pb.d.ts +69 -0
  22. package/ai/stigmer/agentic/runner/v1/enum_pb.js +74 -0
  23. package/ai/stigmer/agentic/runner/v1/enum_pb.js.map +1 -0
  24. package/ai/stigmer/agentic/runner/v1/io_pb.d.ts +626 -0
  25. package/ai/stigmer/agentic/runner/v1/io_pb.js +114 -0
  26. package/ai/stigmer/agentic/runner/v1/io_pb.js.map +1 -0
  27. package/ai/stigmer/agentic/runner/v1/query_connect.d.ts +64 -0
  28. package/ai/stigmer/agentic/runner/v1/query_connect.js +70 -0
  29. package/ai/stigmer/agentic/runner/v1/query_connect.js.map +1 -0
  30. package/ai/stigmer/agentic/runner/v1/query_pb.d.ts +66 -0
  31. package/ai/stigmer/agentic/runner/v1/query_pb.js +24 -0
  32. package/ai/stigmer/agentic/runner/v1/query_pb.js.map +1 -0
  33. package/ai/stigmer/agentic/runner/v1/spec_pb.d.ts +36 -0
  34. package/ai/stigmer/agentic/runner/v1/spec_pb.js +14 -0
  35. package/ai/stigmer/agentic/runner/v1/spec_pb.js.map +1 -0
  36. package/ai/stigmer/agentic/session/v1/command_connect.d.ts +3 -26
  37. package/ai/stigmer/agentic/session/v1/command_connect.js +3 -26
  38. package/ai/stigmer/agentic/session/v1/command_connect.js.map +1 -1
  39. package/ai/stigmer/agentic/session/v1/command_pb.d.ts +4 -26
  40. package/ai/stigmer/agentic/session/v1/command_pb.js +1 -1
  41. package/ai/stigmer/agentic/session/v1/command_pb.js.map +1 -1
  42. package/ai/stigmer/agentic/session/v1/io_pb.d.ts +1 -31
  43. package/ai/stigmer/agentic/session/v1/io_pb.js +1 -6
  44. package/ai/stigmer/agentic/session/v1/io_pb.js.map +1 -1
  45. package/ai/stigmer/agentic/session/v1/spec_pb.d.ts +25 -5
  46. package/ai/stigmer/agentic/session/v1/spec_pb.js +1 -1
  47. package/ai/stigmer/agentic/session/v1/spec_pb.js.map +1 -1
  48. package/ai/stigmer/agentic/workflowexecution/v1/command_connect.d.ts +1 -1
  49. package/ai/stigmer/agentic/workflowexecution/v1/command_connect.js +1 -1
  50. package/ai/stigmer/agentic/workflowexecution/v1/command_pb.d.ts +1 -1
  51. package/ai/stigmer/agentic/workflowexecution/v1/command_pb.js +1 -1
  52. package/ai/stigmer/agentic/workflowexecution/v1/command_pb.js.map +1 -1
  53. package/ai/stigmer/agentic/workflowinstance/v1/spec_pb.js +2 -1
  54. package/ai/stigmer/agentic/workflowinstance/v1/spec_pb.js.map +1 -1
  55. package/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb.d.ts +6 -0
  56. package/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb.js +7 -1
  57. package/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb.js.map +1 -1
  58. package/ai/stigmer/iam/v1/enum_pb.d.ts +7 -5
  59. package/ai/stigmer/iam/v1/enum_pb.js +7 -5
  60. package/ai/stigmer/iam/v1/enum_pb.js.map +1 -1
  61. package/package.json +1 -1
@@ -0,0 +1,204 @@
1
+ // @generated by protoc-gen-connect-es v1.6.1 with parameter "target=ts"
2
+ // @generated from file ai/stigmer/agentic/runner/v1/command.proto (package ai.stigmer.agentic.runner.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { MethodKind } from "@bufbuild/protobuf";
6
+ /**
7
+ * RunnerCommandController handles write operations and the bidirectional
8
+ * command stream for runners.
9
+ *
10
+ * Two creation patterns are supported:
11
+ *
12
+ * 1. **CLI/Desktop (persistent runners)**: The client calls apply with a slug
13
+ * stored in ~/.stigmer/runner.json. If the runner exists, it reactivates.
14
+ * If not, it creates. This is the primary registration path.
15
+ *
16
+ * 2. **Platform (ephemeral runners)**: The execution workflow calls create
17
+ * with metadata label stigmer.ai/system-managed: "true". The runner is
18
+ * torn down via delete when the execution completes.
19
+ *
20
+ * After registration, the runner opens the connect bidi stream — its only
21
+ * ongoing communication channel with the server. Heartbeats flow runner to
22
+ * server; commands (e.g., ListDirectory) flow server to runner.
23
+ *
24
+ * @generated from service ai.stigmer.agentic.runner.v1.RunnerCommandController
25
+ */
26
+ export const RunnerCommandController = {
27
+ typeName: "ai.stigmer.agentic.runner.v1.RunnerCommandController",
28
+ methods: {
29
+ /**
30
+ * Create or update a runner.
31
+ *
32
+ * @internal
33
+ * Primary registration path for CLI/Desktop runners. The handler determines
34
+ * whether to create or update based on whether the resource already exists
35
+ * (resolved by org + slug). Authorization is handled in the handler.
36
+ *
37
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.apply
38
+ */
39
+ apply: {
40
+ name: "apply",
41
+ I: Runner,
42
+ O: Runner,
43
+ kind: MethodKind.Unary,
44
+ },
45
+ /**
46
+ * Create a new runner.
47
+ *
48
+ * @internal
49
+ * Authorization: Caller must have can_create_runner permission in the
50
+ * organization. The server generates the task queue name (runner:{id})
51
+ * and sets the initial phase to PENDING.
52
+ *
53
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.create
54
+ */
55
+ create: {
56
+ name: "create",
57
+ I: Runner,
58
+ O: Runner,
59
+ kind: MethodKind.Unary,
60
+ },
61
+ /**
62
+ * Update an existing runner.
63
+ *
64
+ * @internal
65
+ * Used for updating spec fields (e.g., description). Status fields are
66
+ * updated via the connect stream heartbeat, not via this RPC.
67
+ *
68
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.update
69
+ */
70
+ update: {
71
+ name: "update",
72
+ I: Runner,
73
+ O: Runner,
74
+ kind: MethodKind.Unary,
75
+ },
76
+ /**
77
+ * Delete a runner.
78
+ *
79
+ * @internal
80
+ * For persistent runners: removes the resource and its task queue.
81
+ * For system-managed runners: called by the execution workflow during
82
+ * cleanup after the execution completes.
83
+ *
84
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.delete
85
+ */
86
+ delete: {
87
+ name: "delete",
88
+ I: RunnerId,
89
+ O: Runner,
90
+ kind: MethodKind.Unary,
91
+ },
92
+ /**
93
+ * Send a command to a connected runner and return the response synchronously.
94
+ *
95
+ * This is the API entry point for UI-triggered runner commands. The server
96
+ * looks up the runner's active bidi stream, pushes the command, and blocks
97
+ * until the runner responds or the timeout (10s) expires.
98
+ *
99
+ * Requires an active connect stream — returns UNAVAILABLE if the runner
100
+ * is not connected. Returns FAILED_PRECONDITION if the runner's phase
101
+ * prevents command delivery (STOPPED, PENDING, FAILED).
102
+ *
103
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.sendCommand
104
+ */
105
+ sendCommand: {
106
+ name: "sendCommand",
107
+ I: RunnerSendCommandInput,
108
+ O: RunnerCommandResponse,
109
+ kind: MethodKind.Unary,
110
+ },
111
+ /**
112
+ * Stop a running runner gracefully.
113
+ *
114
+ * If the runner is connected: sends a StopRunnerRequest via the bidi
115
+ * stream, waits for acknowledgment, then returns the updated Runner.
116
+ * The runner will send a STOPPED heartbeat and close its stream after
117
+ * acknowledging — the phase transition completes asynchronously.
118
+ *
119
+ * If the runner is not connected (offline, already stopped): directly
120
+ * transitions the runner to STOPPED and returns the updated resource.
121
+ *
122
+ * Idempotent: stopping an already-STOPPED or FAILED runner returns the
123
+ * resource as-is without error.
124
+ *
125
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.stop
126
+ */
127
+ stop: {
128
+ name: "stop",
129
+ I: RunnerStopInput,
130
+ O: Runner,
131
+ kind: MethodKind.Unary,
132
+ },
133
+ /**
134
+ * Establish a bidirectional command stream between the runner and the server.
135
+ *
136
+ * This is the runner's primary ongoing communication channel. The runner
137
+ * pushes heartbeats (liveness + state); the server pushes commands
138
+ * (e.g., ListDirectory for workspace browsing). Both directions use the
139
+ * same open connection.
140
+ *
141
+ * Stream lifecycle:
142
+ * 1. Runner calls apply to register/reactivate, then opens this stream.
143
+ * 2. First message MUST be a RunnerHeartbeat (authenticates via runner_id).
144
+ * 3. Runner sends heartbeats every 30s.
145
+ * 4. Server pushes RunnerCommandRequest when the UI triggers an operation.
146
+ * 5. Runner handles commands locally and sends RunnerCommandResponse.
147
+ * 6. On graceful shutdown: runner sends phase=STOPPED heartbeat, closes stream.
148
+ * 7. On disconnect: server starts heartbeat timeout (90s) -> STOPPED.
149
+ *
150
+ * @internal
151
+ * Authorization is handled via the first heartbeat message: the server
152
+ * looks up the runner_id and verifies ownership. Skipped at the interceptor
153
+ * level because the stream input is not a resource type.
154
+ *
155
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.connect
156
+ */
157
+ connect: {
158
+ name: "connect",
159
+ I: RunnerStreamClientMessage,
160
+ O: RunnerStreamServerMessage,
161
+ kind: MethodKind.BiDiStreaming,
162
+ },
163
+ /**
164
+ * Create a one-time launch token for the browser-to-CLI runner handshake.
165
+ *
166
+ * Called by the web console when the user clicks "Launch Local Runner."
167
+ * The server mints a Stigmer JWT for the caller, wraps it in an opaque
168
+ * token stored in Redis (60s TTL, single-use), and returns the token for
169
+ * the browser to embed in a stigmer:// URL.
170
+ *
171
+ * The caller must have can_create_runner permission in the organization —
172
+ * if you can create a runner, you can create a launch token.
173
+ *
174
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.createLaunchToken
175
+ */
176
+ createLaunchToken: {
177
+ name: "createLaunchToken",
178
+ I: CreateLaunchTokenRequest,
179
+ O: CreateLaunchTokenResponse,
180
+ kind: MethodKind.Unary,
181
+ },
182
+ /**
183
+ * Exchange a one-time launch token for long-lived runner credentials.
184
+ *
185
+ * Called by the CLI (or Desktop app) after receiving a stigmer:// URL from
186
+ * the OS. The token is consumed atomically — a second exchange attempt
187
+ * returns NOT_FOUND.
188
+ *
189
+ * @internal
190
+ * This RPC is public — no Bearer token is required. The one-time launch
191
+ * token IS the proof of authorization: it was created by an authenticated
192
+ * user with can_create_runner permission, and can only be used once.
193
+ *
194
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.exchangeLaunchToken
195
+ */
196
+ exchangeLaunchToken: {
197
+ name: "exchangeLaunchToken",
198
+ I: ExchangeLaunchTokenRequest,
199
+ O: ExchangeLaunchTokenResponse,
200
+ kind: MethodKind.Unary,
201
+ },
202
+ }
203
+ };
204
+ //# sourceMappingURL=command_connect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command_connect.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/runner/v1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YACf,CAAC,EAAE,yBAAyB;YAC5B,CAAC,EAAE,yBAAyB;YAC5B,IAAI,EAAE,UAAU,CAAC,aAAa;SAC/B;QACD;;;;;;;;;;;;WAYG;QACH,iBAAiB,EAAE;YACjB,IAAI,EAAE,mBAAmB;YACzB,CAAC,EAAE,wBAAwB;YAC3B,CAAC,EAAE,yBAAyB;YAC5B,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;QACD;;;;;;;;;;;;;WAaG;QACH,mBAAmB,EAAE;YACnB,IAAI,EAAE,qBAAqB;YAC3B,CAAC,EAAE,0BAA0B;YAC7B,CAAC,EAAE,2BAA2B;YAC9B,IAAI,EAAE,UAAU,CAAC,KAAK;SACvB;KACF;CACO,CAAC"}
@@ -0,0 +1,193 @@
1
+ import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1";
2
+ import type { RunnerSchema } from "./api_pb";
3
+ import type { CreateLaunchTokenRequestSchema, CreateLaunchTokenResponseSchema, ExchangeLaunchTokenRequestSchema, ExchangeLaunchTokenResponseSchema, RunnerCommandResponseSchema, RunnerIdSchema, RunnerSendCommandInputSchema, RunnerStopInputSchema, RunnerStreamClientMessageSchema, RunnerStreamServerMessageSchema } from "./io_pb";
4
+ /**
5
+ * Describes the file ai/stigmer/agentic/runner/v1/command.proto.
6
+ */
7
+ export declare const file_ai_stigmer_agentic_runner_v1_command: GenFile;
8
+ /**
9
+ * RunnerCommandController handles write operations and the bidirectional
10
+ * command stream for runners.
11
+ *
12
+ * Two creation patterns are supported:
13
+ *
14
+ * 1. **CLI/Desktop (persistent runners)**: The client calls apply with a slug
15
+ * stored in ~/.stigmer/runner.json. If the runner exists, it reactivates.
16
+ * If not, it creates. This is the primary registration path.
17
+ *
18
+ * 2. **Platform (ephemeral runners)**: The execution workflow calls create
19
+ * with metadata label stigmer.ai/system-managed: "true". The runner is
20
+ * torn down via delete when the execution completes.
21
+ *
22
+ * After registration, the runner opens the connect bidi stream — its only
23
+ * ongoing communication channel with the server. Heartbeats flow runner to
24
+ * server; commands (e.g., ListDirectory) flow server to runner.
25
+ *
26
+ * @generated from service ai.stigmer.agentic.runner.v1.RunnerCommandController
27
+ */
28
+ export declare const RunnerCommandController: GenService<{
29
+ /**
30
+ * Create or update a runner.
31
+ *
32
+ * @internal
33
+ * Primary registration path for CLI/Desktop runners. The handler determines
34
+ * whether to create or update based on whether the resource already exists
35
+ * (resolved by org + slug). Authorization is handled in the handler.
36
+ *
37
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.apply
38
+ */
39
+ apply: {
40
+ methodKind: "unary";
41
+ input: typeof RunnerSchema;
42
+ output: typeof RunnerSchema;
43
+ };
44
+ /**
45
+ * Create a new runner.
46
+ *
47
+ * @internal
48
+ * Authorization: Caller must have can_create_runner permission in the
49
+ * organization. The server generates the task queue name (runner:{id})
50
+ * and sets the initial phase to PENDING.
51
+ *
52
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.create
53
+ */
54
+ create: {
55
+ methodKind: "unary";
56
+ input: typeof RunnerSchema;
57
+ output: typeof RunnerSchema;
58
+ };
59
+ /**
60
+ * Update an existing runner.
61
+ *
62
+ * @internal
63
+ * Used for updating spec fields (e.g., description). Status fields are
64
+ * updated via the connect stream heartbeat, not via this RPC.
65
+ *
66
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.update
67
+ */
68
+ update: {
69
+ methodKind: "unary";
70
+ input: typeof RunnerSchema;
71
+ output: typeof RunnerSchema;
72
+ };
73
+ /**
74
+ * Delete a runner.
75
+ *
76
+ * @internal
77
+ * For persistent runners: removes the resource and its task queue.
78
+ * For system-managed runners: called by the execution workflow during
79
+ * cleanup after the execution completes.
80
+ *
81
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.delete
82
+ */
83
+ delete: {
84
+ methodKind: "unary";
85
+ input: typeof RunnerIdSchema;
86
+ output: typeof RunnerSchema;
87
+ };
88
+ /**
89
+ * Send a command to a connected runner and return the response synchronously.
90
+ *
91
+ * This is the API entry point for UI-triggered runner commands. The server
92
+ * looks up the runner's active bidi stream, pushes the command, and blocks
93
+ * until the runner responds or the timeout (10s) expires.
94
+ *
95
+ * Requires an active connect stream — returns UNAVAILABLE if the runner
96
+ * is not connected. Returns FAILED_PRECONDITION if the runner's phase
97
+ * prevents command delivery (STOPPED, PENDING, FAILED).
98
+ *
99
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.sendCommand
100
+ */
101
+ sendCommand: {
102
+ methodKind: "unary";
103
+ input: typeof RunnerSendCommandInputSchema;
104
+ output: typeof RunnerCommandResponseSchema;
105
+ };
106
+ /**
107
+ * Stop a running runner gracefully.
108
+ *
109
+ * If the runner is connected: sends a StopRunnerRequest via the bidi
110
+ * stream, waits for acknowledgment, then returns the updated Runner.
111
+ * The runner will send a STOPPED heartbeat and close its stream after
112
+ * acknowledging — the phase transition completes asynchronously.
113
+ *
114
+ * If the runner is not connected (offline, already stopped): directly
115
+ * transitions the runner to STOPPED and returns the updated resource.
116
+ *
117
+ * Idempotent: stopping an already-STOPPED or FAILED runner returns the
118
+ * resource as-is without error.
119
+ *
120
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.stop
121
+ */
122
+ stop: {
123
+ methodKind: "unary";
124
+ input: typeof RunnerStopInputSchema;
125
+ output: typeof RunnerSchema;
126
+ };
127
+ /**
128
+ * Establish a bidirectional command stream between the runner and the server.
129
+ *
130
+ * This is the runner's primary ongoing communication channel. The runner
131
+ * pushes heartbeats (liveness + state); the server pushes commands
132
+ * (e.g., ListDirectory for workspace browsing). Both directions use the
133
+ * same open connection.
134
+ *
135
+ * Stream lifecycle:
136
+ * 1. Runner calls apply to register/reactivate, then opens this stream.
137
+ * 2. First message MUST be a RunnerHeartbeat (authenticates via runner_id).
138
+ * 3. Runner sends heartbeats every 30s.
139
+ * 4. Server pushes RunnerCommandRequest when the UI triggers an operation.
140
+ * 5. Runner handles commands locally and sends RunnerCommandResponse.
141
+ * 6. On graceful shutdown: runner sends phase=STOPPED heartbeat, closes stream.
142
+ * 7. On disconnect: server starts heartbeat timeout (90s) -> STOPPED.
143
+ *
144
+ * @internal
145
+ * Authorization is handled via the first heartbeat message: the server
146
+ * looks up the runner_id and verifies ownership. Skipped at the interceptor
147
+ * level because the stream input is not a resource type.
148
+ *
149
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.connect
150
+ */
151
+ connect: {
152
+ methodKind: "bidi_streaming";
153
+ input: typeof RunnerStreamClientMessageSchema;
154
+ output: typeof RunnerStreamServerMessageSchema;
155
+ };
156
+ /**
157
+ * Create a one-time launch token for the browser-to-CLI runner handshake.
158
+ *
159
+ * Called by the web console when the user clicks "Launch Local Runner."
160
+ * The server mints a Stigmer JWT for the caller, wraps it in an opaque
161
+ * token stored in Redis (60s TTL, single-use), and returns the token for
162
+ * the browser to embed in a stigmer:// URL.
163
+ *
164
+ * The caller must have can_create_runner permission in the organization —
165
+ * if you can create a runner, you can create a launch token.
166
+ *
167
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.createLaunchToken
168
+ */
169
+ createLaunchToken: {
170
+ methodKind: "unary";
171
+ input: typeof CreateLaunchTokenRequestSchema;
172
+ output: typeof CreateLaunchTokenResponseSchema;
173
+ };
174
+ /**
175
+ * Exchange a one-time launch token for long-lived runner credentials.
176
+ *
177
+ * Called by the CLI (or Desktop app) after receiving a stigmer:// URL from
178
+ * the OS. The token is consumed atomically — a second exchange attempt
179
+ * returns NOT_FOUND.
180
+ *
181
+ * @internal
182
+ * This RPC is public — no Bearer token is required. The one-time launch
183
+ * token IS the proof of authorization: it was created by an authenticated
184
+ * user with can_create_runner permission, and can only be used once.
185
+ *
186
+ * @generated from rpc ai.stigmer.agentic.runner.v1.RunnerCommandController.exchangeLaunchToken
187
+ */
188
+ exchangeLaunchToken: {
189
+ methodKind: "unary";
190
+ input: typeof ExchangeLaunchTokenRequestSchema;
191
+ output: typeof ExchangeLaunchTokenResponseSchema;
192
+ };
193
+ }>;
@@ -0,0 +1,34 @@
1
+ // @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
2
+ // @generated from file ai/stigmer/agentic/runner/v1/command.proto (package ai.stigmer.agentic.runner.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
5
+ import { file_ai_stigmer_agentic_runner_v1_api } from "./api_pb";
6
+ import { file_ai_stigmer_agentic_runner_v1_io } from "./io_pb";
7
+ import { file_ai_stigmer_commons_apiresource_rpc_service_options } from "../../../commons/apiresource/rpc_service_options_pb";
8
+ import { file_ai_stigmer_commons_rpc_method_options } from "../../../commons/rpc/method_options_pb";
9
+ /**
10
+ * Describes the file ai/stigmer/agentic/runner/v1/command.proto.
11
+ */
12
+ export const file_ai_stigmer_agentic_runner_v1_command = /*@__PURE__*/ fileDesc("CiphaS9zdGlnbWVyL2FnZW50aWMvcnVubmVyL3YxL2NvbW1hbmQucHJvdG8SHGFpLnN0aWdtZXIuYWdlbnRpYy5ydW5uZXIudjEy8woKF1J1bm5lckNvbW1hbmRDb250cm9sbGVyElMKBWFwcGx5EiQuYWkuc3RpZ21lci5hZ2VudGljLnJ1bm5lci52MS5SdW5uZXIaJC5haS5zdGlnbWVyLmFnZW50aWMucnVubmVyLnYxLlJ1bm5lchKgAQoGY3JlYXRlEiQuYWkuc3RpZ21lci5hZ2VudGljLnJ1bm5lci52MS5SdW5uZXIaJC5haS5zdGlnbWVyLmFnZW50aWMucnVubmVyLnYxLlJ1bm5lciJKwrgYRggZEB4iDG1ldGFkYXRhLm9yZyoydW5hdXRob3JpemVkIHRvIGNyZWF0ZSBydW5uZXIgaW4gdGhpcyBvcmdhbml6YXRpb24SigEKBnVwZGF0ZRIkLmFpLnN0aWdtZXIuYWdlbnRpYy5ydW5uZXIudjEuUnVubmVyGiQuYWkuc3RpZ21lci5hZ2VudGljLnJ1bm5lci52MS5SdW5uZXIiNMK4GDAIAhAuIgttZXRhZGF0YS5pZ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0byBjcmVhdGUgcnVubmVyIGxhdW5jaCB0b2tlbnMgaW4gdGhpcyBvcmdhbml6YXRpb24SkAEKE2V4Y2hhbmdlTGF1bmNoVG9rZW4SOC5haS5zdGlnbWVyLmFnZW50aWMucnVubmVyLnYxLkV4Y2hhbmdlTGF1bmNoVG9rZW5SZXF1ZXN0GjkuYWkuc3RpZ21lci5hZ2VudGljLnJ1bm5lci52MS5FeGNoYW5nZUxhdW5jaFRva2VuUmVzcG9uc2UiBMi4GAEaBKD/Ky5iBnByb3RvMw", [file_ai_stigmer_agentic_runner_v1_api, file_ai_stigmer_agentic_runner_v1_io, file_ai_stigmer_commons_apiresource_rpc_service_options, file_ai_stigmer_commons_rpc_method_options]);
13
+ /**
14
+ * RunnerCommandController handles write operations and the bidirectional
15
+ * command stream for runners.
16
+ *
17
+ * Two creation patterns are supported:
18
+ *
19
+ * 1. **CLI/Desktop (persistent runners)**: The client calls apply with a slug
20
+ * stored in ~/.stigmer/runner.json. If the runner exists, it reactivates.
21
+ * If not, it creates. This is the primary registration path.
22
+ *
23
+ * 2. **Platform (ephemeral runners)**: The execution workflow calls create
24
+ * with metadata label stigmer.ai/system-managed: "true". The runner is
25
+ * torn down via delete when the execution completes.
26
+ *
27
+ * After registration, the runner opens the connect bidi stream — its only
28
+ * ongoing communication channel with the server. Heartbeats flow runner to
29
+ * server; commands (e.g., ListDirectory) flow server to runner.
30
+ *
31
+ * @generated from service ai.stigmer.agentic.runner.v1.RunnerCommandController
32
+ */
33
+ export const RunnerCommandController = /*@__PURE__*/ serviceDesc(file_ai_stigmer_agentic_runner_v1_command, 0);
34
+ //# sourceMappingURL=command_pb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command_pb.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/runner/v1/command_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,wHAAwH;AACxH,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,EAAE,oCAAoC,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,uDAAuD,EAAE,MAAM,qDAAqD,CAAC;AAC9H,OAAO,EAAE,0CAA0C,EAAE,MAAM,wCAAwC,CAAC;AAEpG;;GAEG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAY,aAAa,CAC7E,QAAQ,CAAC,w7DAAw7D,EAAE,CAAC,qCAAqC,EAAE,oCAAoC,EAAE,uDAAuD,EAAE,0CAA0C,CAAC,CAAC,CAAC;AAEznE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAqK/B,aAAa,CAChB,WAAW,CAAC,yCAAyC,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,69 @@
1
+ import type { GenEnum, GenFile } from "@bufbuild/protobuf/codegenv1";
2
+ /**
3
+ * Describes the file ai/stigmer/agentic/runner/v1/enum.proto.
4
+ */
5
+ export declare const file_ai_stigmer_agentic_runner_v1_enum: GenFile;
6
+ /**
7
+ * RunnerPhase tracks the operational state of a runner process.
8
+ *
9
+ * Phase transitions are driven by two sources:
10
+ * - The runner process itself (via connect stream heartbeat): PENDING -> READY, READY <-> BUSY
11
+ * - The server (via heartbeat timeout or explicit stop): any -> STOPPED, any -> FAILED
12
+ *
13
+ * Transition diagram:
14
+ * PENDING -> READY (first heartbeat received)
15
+ * READY -> BUSY (runner reports max capacity reached)
16
+ * BUSY -> READY (runner reports capacity freed)
17
+ * READY -> STOPPED (heartbeat timeout or explicit stop)
18
+ * BUSY -> STOPPED (heartbeat timeout or explicit stop)
19
+ * STOPPED -> READY (runner restarts and heartbeats again)
20
+ * any -> FAILED (unrecoverable error reported by runner or server)
21
+ *
22
+ * @generated from enum ai.stigmer.agentic.runner.v1.RunnerPhase
23
+ */
24
+ export declare enum RunnerPhase {
25
+ /**
26
+ * @generated from enum value: RUNNER_PHASE_UNSPECIFIED = 0;
27
+ */
28
+ UNSPECIFIED = 0,
29
+ /**
30
+ * Resource created but no heartbeat received yet.
31
+ * This is the initial phase after create/apply, before the runner
32
+ * process has started polling its task queue and heartbeating.
33
+ *
34
+ * @generated from enum value: RUNNER_PHASE_PENDING = 1;
35
+ */
36
+ PENDING = 1,
37
+ /**
38
+ * Runner is heartbeating and accepting new executions.
39
+ *
40
+ * @generated from enum value: RUNNER_PHASE_READY = 2;
41
+ */
42
+ READY = 2,
43
+ /**
44
+ * Runner is heartbeating but at maximum concurrent execution capacity.
45
+ * New executions should not be dispatched to this runner.
46
+ *
47
+ * @generated from enum value: RUNNER_PHASE_BUSY = 3;
48
+ */
49
+ BUSY = 3,
50
+ /**
51
+ * Runner has stopped heartbeating (timeout) or was explicitly stopped.
52
+ * The resource is retained for identity persistence — a runner that
53
+ * restarts and resumes heartbeating transitions back to READY.
54
+ *
55
+ * @generated from enum value: RUNNER_PHASE_STOPPED = 4;
56
+ */
57
+ STOPPED = 4,
58
+ /**
59
+ * Unrecoverable error. Runner or server reported a fatal condition.
60
+ * Requires investigation; does not auto-recover on heartbeat.
61
+ *
62
+ * @generated from enum value: RUNNER_PHASE_FAILED = 5;
63
+ */
64
+ FAILED = 5
65
+ }
66
+ /**
67
+ * Describes the enum ai.stigmer.agentic.runner.v1.RunnerPhase.
68
+ */
69
+ export declare const RunnerPhaseSchema: GenEnum<RunnerPhase>;
@@ -0,0 +1,74 @@
1
+ // @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
2
+ // @generated from file ai/stigmer/agentic/runner/v1/enum.proto (package ai.stigmer.agentic.runner.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ import { enumDesc, fileDesc } from "@bufbuild/protobuf/codegenv1";
5
+ /**
6
+ * Describes the file ai/stigmer/agentic/runner/v1/enum.proto.
7
+ */
8
+ export const file_ai_stigmer_agentic_runner_v1_enum = /*@__PURE__*/ fileDesc("CidhaS9zdGlnbWVyL2FnZW50aWMvcnVubmVyL3YxL2VudW0ucHJvdG8SHGFpLnN0aWdtZXIuYWdlbnRpYy5ydW5uZXIudjEqpwEKC1J1bm5lclBoYXNlEhwKGFJVTk5FUl9QSEFTRV9VTlNQRUNJRklFRBAAEhgKFFJVTk5FUl9QSEFTRV9QRU5ESU5HEAESFgoSUlVOTkVSX1BIQVNFX1JFQURZEAISFQoRUlVOTkVSX1BIQVNFX0JVU1kQAxIYChRSVU5ORVJfUEhBU0VfU1RPUFBFRBAEEhcKE1JVTk5FUl9QSEFTRV9GQUlMRUQQBWIGcHJvdG8z");
9
+ /**
10
+ * RunnerPhase tracks the operational state of a runner process.
11
+ *
12
+ * Phase transitions are driven by two sources:
13
+ * - The runner process itself (via connect stream heartbeat): PENDING -> READY, READY <-> BUSY
14
+ * - The server (via heartbeat timeout or explicit stop): any -> STOPPED, any -> FAILED
15
+ *
16
+ * Transition diagram:
17
+ * PENDING -> READY (first heartbeat received)
18
+ * READY -> BUSY (runner reports max capacity reached)
19
+ * BUSY -> READY (runner reports capacity freed)
20
+ * READY -> STOPPED (heartbeat timeout or explicit stop)
21
+ * BUSY -> STOPPED (heartbeat timeout or explicit stop)
22
+ * STOPPED -> READY (runner restarts and heartbeats again)
23
+ * any -> FAILED (unrecoverable error reported by runner or server)
24
+ *
25
+ * @generated from enum ai.stigmer.agentic.runner.v1.RunnerPhase
26
+ */
27
+ export var RunnerPhase;
28
+ (function (RunnerPhase) {
29
+ /**
30
+ * @generated from enum value: RUNNER_PHASE_UNSPECIFIED = 0;
31
+ */
32
+ RunnerPhase[RunnerPhase["UNSPECIFIED"] = 0] = "UNSPECIFIED";
33
+ /**
34
+ * Resource created but no heartbeat received yet.
35
+ * This is the initial phase after create/apply, before the runner
36
+ * process has started polling its task queue and heartbeating.
37
+ *
38
+ * @generated from enum value: RUNNER_PHASE_PENDING = 1;
39
+ */
40
+ RunnerPhase[RunnerPhase["PENDING"] = 1] = "PENDING";
41
+ /**
42
+ * Runner is heartbeating and accepting new executions.
43
+ *
44
+ * @generated from enum value: RUNNER_PHASE_READY = 2;
45
+ */
46
+ RunnerPhase[RunnerPhase["READY"] = 2] = "READY";
47
+ /**
48
+ * Runner is heartbeating but at maximum concurrent execution capacity.
49
+ * New executions should not be dispatched to this runner.
50
+ *
51
+ * @generated from enum value: RUNNER_PHASE_BUSY = 3;
52
+ */
53
+ RunnerPhase[RunnerPhase["BUSY"] = 3] = "BUSY";
54
+ /**
55
+ * Runner has stopped heartbeating (timeout) or was explicitly stopped.
56
+ * The resource is retained for identity persistence — a runner that
57
+ * restarts and resumes heartbeating transitions back to READY.
58
+ *
59
+ * @generated from enum value: RUNNER_PHASE_STOPPED = 4;
60
+ */
61
+ RunnerPhase[RunnerPhase["STOPPED"] = 4] = "STOPPED";
62
+ /**
63
+ * Unrecoverable error. Runner or server reported a fatal condition.
64
+ * Requires investigation; does not auto-recover on heartbeat.
65
+ *
66
+ * @generated from enum value: RUNNER_PHASE_FAILED = 5;
67
+ */
68
+ RunnerPhase[RunnerPhase["FAILED"] = 5] = "FAILED";
69
+ })(RunnerPhase || (RunnerPhase = {}));
70
+ /**
71
+ * Describes the enum ai.stigmer.agentic.runner.v1.RunnerPhase.
72
+ */
73
+ export const RunnerPhaseSchema = /*@__PURE__*/ enumDesc(file_ai_stigmer_agentic_runner_v1_enum, 0);
74
+ //# sourceMappingURL=enum_pb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enum_pb.js","sourceRoot":"","sources":["../../../../../../ai/stigmer/agentic/runner/v1/enum_pb.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,qHAAqH;AACrH,oBAAoB;AAGpB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAY,aAAa,CAC1E,QAAQ,CAAC,8UAA8U,CAAC,CAAC;AAE3V;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAN,IAAY,WA8CX;AA9CD,WAAY,WAAW;IACrB;;OAEG;IACH,2DAAe,CAAA;IAEf;;;;;;OAMG;IACH,mDAAW,CAAA;IAEX;;;;OAIG;IACH,+CAAS,CAAA;IAET;;;;;OAKG;IACH,6CAAQ,CAAA;IAER;;;;;;OAMG;IACH,mDAAW,CAAA;IAEX;;;;;OAKG;IACH,iDAAU,CAAA;AACZ,CAAC,EA9CW,WAAW,KAAX,WAAW,QA8CtB;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAyB,aAAa,CAClE,QAAQ,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAC"}