Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
ts 21 lines 613 Bytes
Raw
1 import process from 'node:process';
2 import { Context, Layer } from 'effect';
3
4 export interface NodeProcessShape {
5 readonly cwd: string;
6 readonly execPath: string;
7 readonly platform: NodeJS.Platform;
8 readonly arch: string;
9 }
10
11 // Service that wraps `node:process`, for testing purposes.
12 export class NodeProcess extends Context.Service<NodeProcess, NodeProcessShape>()(
13 'services/NodeProcess'
14 ) {
15 static readonly Default: Layer.Layer<NodeProcess> = Layer.sync(NodeProcess, () => ({
16 cwd: process.cwd(),
17 execPath: process.execPath,
18 platform: process.platform,
19 arch: process.arch,
20 }));
21 }