Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
pingdotgg
/
t3code
Pull requests
pingdotgg
t3code
Public
Synced with GitHub
Popular #1
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
CI
Agents
Settings
fix(server): Grok agent processes receive the thread's environment
#34032
Send to my agent
Closed
juliusmarminge
wants to merge 3 commits into
main
from
refs/pull/34032/head
·
opened
3 weeks ago
View on GitHub
Conversation
6
Commits
3
Files changed
2
Impact
Showing
2 changed files
with
49 additions
and
2 deletions
.
x
0 of 2 viewed, 2 left
Files
Hide whitespace
Unified
Split
47 additions and 0 deletions
+47
-0
apps/server/src/orchestration-v2/Adapters/GrokAdapterV2.test.ts
Modified
Diff
Before/After
Viewed
apps/server/src/orchestration-v2/Adapters/GrokAdapterV2.test.ts
View file
@@ -1,6 +1,7 @@
1
1
import
*
as
NodeCrypto
from
"@effect/platform-node/NodeCrypto"
;
2
2
import
*
as
NodeServices
from
"@effect/platform-node/NodeServices"
;
3
3
import
{
4
+
EnvironmentId
,
4
5
ProjectId
,
5
6
MessageId
,
6
7
NodeId
,
Expand up
Expand down
Show all 283 lines
@@ -290,6 +291,52 @@
290
291
...
override
,
291
292
});
292
293
294
+
it.
effect
(
"launches the agent with the env that names the thread it serves"
, () =>
295
+
Effect
.
gen
(
function
* () {
296
+
const
instanceId =
ProviderInstanceId
.
make
(
"grok-launch-test"
);
297
+
const
threadId =
ThreadId
.
make
(
"grok-launch-thread-env"
);
298
+
const
endpoint =
"http://127.0.0.1:43123/mcp"
;
299
+
yield
* (
yield
*
McpProviderSessions
.
McpProviderSessions
).
set
({
300
+
environmentId
:
EnvironmentId
.
make
(
"environment-grok-launch-thread-env"
),
301
+
threadId,
302
+
providerSessionId
:
"mcp-session-grok-launch-thread-env"
,
303
+
providerInstanceId
: instanceId,
304
+
endpoint,
305
+
authorizationHeader
:
"Bearer grok-thread-env-token"
,
306
+
browserToolsAvailable
:
false
,
307
+
});
308
+
const
environments:
Array
<
Record
<
string
,
unknown
> |
undefined
> = [];
309
+
const
childProcessSpawner =
ChildProcessSpawner
.
make
((command) => {
310
+
if
(command.
_tag
===
"StandardCommand"
) environments.
push
(command.
options
.
env
);
311
+
return
Effect
.
fail
(
Home
Search
Explore
Menu