agent-bundle 0.1.0
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/LICENSE +21 -0
- package/README.md +161 -0
- package/dist/agent/agent.d.ts +32 -0
- package/dist/agent/agent.js +241 -0
- package/dist/agent/agent.js.map +1 -0
- package/dist/agent/agent.test-helpers.d.ts +63 -0
- package/dist/agent/agent.test-helpers.js +170 -0
- package/dist/agent/agent.test-helpers.js.map +1 -0
- package/dist/agent/define-agent.d.ts +2 -0
- package/dist/agent/define-agent.js +18 -0
- package/dist/agent/define-agent.js.map +1 -0
- package/dist/agent/dependencies.d.ts +15 -0
- package/dist/agent/dependencies.js +14 -0
- package/dist/agent/dependencies.js.map +1 -0
- package/dist/agent/index.d.ts +4 -0
- package/dist/agent/index.js +5 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/internals.d.ts +28 -0
- package/dist/agent/internals.js +160 -0
- package/dist/agent/internals.js.map +1 -0
- package/dist/agent/session.d.ts +4 -0
- package/dist/agent/session.js +2 -0
- package/dist/agent/session.js.map +1 -0
- package/dist/agent/types.d.ts +52 -0
- package/dist/agent/types.js +2 -0
- package/dist/agent/types.js.map +1 -0
- package/dist/agent-loop/agent-loop.d.ts +27 -0
- package/dist/agent-loop/agent-loop.js +2 -0
- package/dist/agent-loop/agent-loop.js.map +1 -0
- package/dist/agent-loop/index.d.ts +4 -0
- package/dist/agent-loop/index.js +5 -0
- package/dist/agent-loop/index.js.map +1 -0
- package/dist/agent-loop/pi-mono/events.d.ts +3 -0
- package/dist/agent-loop/pi-mono/events.js +73 -0
- package/dist/agent-loop/pi-mono/events.js.map +1 -0
- package/dist/agent-loop/pi-mono/index.d.ts +1 -0
- package/dist/agent-loop/pi-mono/index.js +2 -0
- package/dist/agent-loop/pi-mono/index.js.map +1 -0
- package/dist/agent-loop/pi-mono/input.d.ts +6 -0
- package/dist/agent-loop/pi-mono/input.js +120 -0
- package/dist/agent-loop/pi-mono/input.js.map +1 -0
- package/dist/agent-loop/pi-mono/model.d.ts +7 -0
- package/dist/agent-loop/pi-mono/model.js +72 -0
- package/dist/agent-loop/pi-mono/model.js.map +1 -0
- package/dist/agent-loop/pi-mono/pi-mono-loop.d.ts +11 -0
- package/dist/agent-loop/pi-mono/pi-mono-loop.js +167 -0
- package/dist/agent-loop/pi-mono/pi-mono-loop.js.map +1 -0
- package/dist/agent-loop/pi-mono/pi-mono-loop.test-helpers.d.ts +28 -0
- package/dist/agent-loop/pi-mono/pi-mono-loop.test-helpers.js +76 -0
- package/dist/agent-loop/pi-mono/pi-mono-loop.test-helpers.js.map +1 -0
- package/dist/agent-loop/pi-mono/queue.d.ts +9 -0
- package/dist/agent-loop/pi-mono/queue.js +37 -0
- package/dist/agent-loop/pi-mono/queue.js.map +1 -0
- package/dist/agent-loop/pi-mono/tools.d.ts +4 -0
- package/dist/agent-loop/pi-mono/tools.js +164 -0
- package/dist/agent-loop/pi-mono/tools.js.map +1 -0
- package/dist/agent-loop/pi-mono/utils.d.ts +14 -0
- package/dist/agent-loop/pi-mono/utils.js +83 -0
- package/dist/agent-loop/pi-mono/utils.js.map +1 -0
- package/dist/agent-loop/system-prompt/fill.d.ts +1 -0
- package/dist/agent-loop/system-prompt/fill.js +19 -0
- package/dist/agent-loop/system-prompt/fill.js.map +1 -0
- package/dist/agent-loop/system-prompt/generate.d.ts +11 -0
- package/dist/agent-loop/system-prompt/generate.js +21 -0
- package/dist/agent-loop/system-prompt/generate.js.map +1 -0
- package/dist/agent-loop/system-prompt/index.d.ts +2 -0
- package/dist/agent-loop/system-prompt/index.js +3 -0
- package/dist/agent-loop/system-prompt/index.js.map +1 -0
- package/dist/agent-loop/types.d.ts +77 -0
- package/dist/agent-loop/types.js +2 -0
- package/dist/agent-loop/types.js.map +1 -0
- package/dist/cli/build/build.d.ts +35 -0
- package/dist/cli/build/build.js +174 -0
- package/dist/cli/build/build.js.map +1 -0
- package/dist/cli/build/build.test-helpers.d.ts +9 -0
- package/dist/cli/build/build.test-helpers.js +50 -0
- package/dist/cli/build/build.test-helpers.js.map +1 -0
- package/dist/cli/build/codegen-commands.d.ts +16 -0
- package/dist/cli/build/codegen-commands.js +81 -0
- package/dist/cli/build/codegen-commands.js.map +1 -0
- package/dist/cli/build/codegen.d.ts +55 -0
- package/dist/cli/build/codegen.js +212 -0
- package/dist/cli/build/codegen.js.map +1 -0
- package/dist/cli/build/e2b-template.d.ts +38 -0
- package/dist/cli/build/e2b-template.js +210 -0
- package/dist/cli/build/e2b-template.js.map +1 -0
- package/dist/cli/build/e2b-template.test-helpers.d.ts +19 -0
- package/dist/cli/build/e2b-template.test-helpers.js +80 -0
- package/dist/cli/build/e2b-template.test-helpers.js.map +1 -0
- package/dist/cli/build/sandbox-image.d.ts +35 -0
- package/dist/cli/build/sandbox-image.js +57 -0
- package/dist/cli/build/sandbox-image.js.map +1 -0
- package/dist/cli/build-codegen.d.ts +41 -0
- package/dist/cli/build-codegen.js +168 -0
- package/dist/cli/build-codegen.js.map +1 -0
- package/dist/cli/build-e2b-template.d.ts +38 -0
- package/dist/cli/build-e2b-template.js +223 -0
- package/dist/cli/build-e2b-template.js.map +1 -0
- package/dist/cli/build-e2b-template.test-helpers.d.ts +19 -0
- package/dist/cli/build-e2b-template.test-helpers.js +80 -0
- package/dist/cli/build-e2b-template.test-helpers.js.map +1 -0
- package/dist/cli/build-sandbox-image.d.ts +35 -0
- package/dist/cli/build-sandbox-image.js +57 -0
- package/dist/cli/build-sandbox-image.js.map +1 -0
- package/dist/cli/build.d.ts +30 -0
- package/dist/cli/build.js +151 -0
- package/dist/cli/build.js.map +1 -0
- package/dist/cli/build.test-helpers.d.ts +9 -0
- package/dist/cli/build.test-helpers.js +50 -0
- package/dist/cli/build.test-helpers.js.map +1 -0
- package/dist/cli/config/load-bundle-config.d.ts +2 -0
- package/dist/cli/config/load-bundle-config.js +20 -0
- package/dist/cli/config/load-bundle-config.js.map +1 -0
- package/dist/cli/config/resolve-project-root.d.ts +1 -0
- package/dist/cli/config/resolve-project-root.js +19 -0
- package/dist/cli/config/resolve-project-root.js.map +1 -0
- package/dist/cli/deploy/aws-cli.d.ts +42 -0
- package/dist/cli/deploy/aws-cli.js +95 -0
- package/dist/cli/deploy/aws-cli.js.map +1 -0
- package/dist/cli/deploy/aws-ecr.d.ts +20 -0
- package/dist/cli/deploy/aws-ecr.js +97 -0
- package/dist/cli/deploy/aws-ecr.js.map +1 -0
- package/dist/cli/deploy/aws-ecs-infra.d.ts +39 -0
- package/dist/cli/deploy/aws-ecs-infra.js +169 -0
- package/dist/cli/deploy/aws-ecs-infra.js.map +1 -0
- package/dist/cli/deploy/aws-ecs-role.d.ts +9 -0
- package/dist/cli/deploy/aws-ecs-role.js +114 -0
- package/dist/cli/deploy/aws-ecs-role.js.map +1 -0
- package/dist/cli/deploy/aws-ecs-service.d.ts +37 -0
- package/dist/cli/deploy/aws-ecs-service.js +207 -0
- package/dist/cli/deploy/aws-ecs-service.js.map +1 -0
- package/dist/cli/deploy/aws-ecs-shared.d.ts +59 -0
- package/dist/cli/deploy/aws-ecs-shared.js +30 -0
- package/dist/cli/deploy/aws-ecs-shared.js.map +1 -0
- package/dist/cli/deploy/aws-ecs.d.ts +3 -0
- package/dist/cli/deploy/aws-ecs.js +141 -0
- package/dist/cli/deploy/aws-ecs.js.map +1 -0
- package/dist/cli/deploy/aws-prerequisites.d.ts +16 -0
- package/dist/cli/deploy/aws-prerequisites.js +28 -0
- package/dist/cli/deploy/aws-prerequisites.js.map +1 -0
- package/dist/cli/deploy/aws-teardown.d.ts +13 -0
- package/dist/cli/deploy/aws-teardown.js +204 -0
- package/dist/cli/deploy/aws-teardown.js.map +1 -0
- package/dist/cli/deploy/deploy.d.ts +36 -0
- package/dist/cli/deploy/deploy.js +209 -0
- package/dist/cli/deploy/deploy.js.map +1 -0
- package/dist/cli/error.d.ts +1 -0
- package/dist/cli/error.js +4 -0
- package/dist/cli/error.js.map +1 -0
- package/dist/cli/generate/generate.d.ts +37 -0
- package/dist/cli/generate/generate.js +121 -0
- package/dist/cli/generate/generate.js.map +1 -0
- package/dist/cli/generate.d.ts +32 -0
- package/dist/cli/generate.js +102 -0
- package/dist/cli/generate.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +182 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/load-bundle-config.d.ts +2 -0
- package/dist/cli/load-bundle-config.js +20 -0
- package/dist/cli/load-bundle-config.js.map +1 -0
- package/dist/cli/resolve-project-root.d.ts +1 -0
- package/dist/cli/resolve-project-root.js +19 -0
- package/dist/cli/resolve-project-root.js.map +1 -0
- package/dist/cli/serve/dev.d.ts +6 -0
- package/dist/cli/serve/dev.js +73 -0
- package/dist/cli/serve/dev.js.map +1 -0
- package/dist/cli/serve/http.d.ts +12 -0
- package/dist/cli/serve/http.js +123 -0
- package/dist/cli/serve/http.js.map +1 -0
- package/dist/cli/serve/init.d.ts +42 -0
- package/dist/cli/serve/init.js +110 -0
- package/dist/cli/serve/init.js.map +1 -0
- package/dist/cli/serve/runtime.d.ts +25 -0
- package/dist/cli/serve/runtime.js +142 -0
- package/dist/cli/serve/runtime.js.map +1 -0
- package/dist/cli/serve/serve.d.ts +7 -0
- package/dist/cli/serve/serve.js +63 -0
- package/dist/cli/serve/serve.js.map +1 -0
- package/dist/cli/serve/serve.test-helpers.d.ts +36 -0
- package/dist/cli/serve/serve.test-helpers.js +205 -0
- package/dist/cli/serve/serve.test-helpers.js.map +1 -0
- package/dist/cli/serve/worktree-port.d.ts +36 -0
- package/dist/cli/serve/worktree-port.js +124 -0
- package/dist/cli/serve/worktree-port.js.map +1 -0
- package/dist/cli/serve-http.d.ts +12 -0
- package/dist/cli/serve-http.js +112 -0
- package/dist/cli/serve-http.js.map +1 -0
- package/dist/cli/serve-runtime.d.ts +16 -0
- package/dist/cli/serve-runtime.js +122 -0
- package/dist/cli/serve-runtime.js.map +1 -0
- package/dist/cli/serve.d.ts +33 -0
- package/dist/cli/serve.js +150 -0
- package/dist/cli/serve.js.map +1 -0
- package/dist/cli/serve.test-helpers.d.ts +30 -0
- package/dist/cli/serve.test-helpers.js +145 -0
- package/dist/cli/serve.test-helpers.js.map +1 -0
- package/dist/code-formatter/bundle.json +41 -0
- package/dist/code-formatter/index.ts +26 -0
- package/dist/code-formatter/package.json +10 -0
- package/dist/code-formatter/types.ts +2 -0
- package/dist/code-formatter-e2b/bundle.json +40 -0
- package/dist/code-formatter-e2b/index.ts +25 -0
- package/dist/code-formatter-e2b/package.json +10 -0
- package/dist/code-formatter-e2b/types.ts +2 -0
- package/dist/coding-assistant-ollama/bundle.json +43 -0
- package/dist/coding-assistant-ollama/index.ts +28 -0
- package/dist/coding-assistant-ollama/package.json +10 -0
- package/dist/coding-assistant-ollama/types.ts +2 -0
- package/dist/commands/find.d.ts +8 -0
- package/dist/commands/find.js +11 -0
- package/dist/commands/find.js.map +1 -0
- package/dist/commands/loader.d.ts +13 -0
- package/dist/commands/loader.js +163 -0
- package/dist/commands/loader.js.map +1 -0
- package/dist/commands/types.d.ts +7 -0
- package/dist/commands/types.js +2 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/commands/with-commands.d.ts +6 -0
- package/dist/commands/with-commands.js +19 -0
- package/dist/commands/with-commands.js.map +1 -0
- package/dist/data-analyst/bundle.json +40 -0
- package/dist/data-analyst/index.ts +25 -0
- package/dist/data-analyst/package.json +10 -0
- package/dist/data-analyst/types.ts +2 -0
- package/dist/financial-analyst/bundle.json +40 -0
- package/dist/financial-analyst/index.ts +25 -0
- package/dist/financial-analyst/package.json +10 -0
- package/dist/financial-analyst/types.ts +2 -0
- package/dist/mcp/client-manager.d.ts +26 -0
- package/dist/mcp/client-manager.js +101 -0
- package/dist/mcp/client-manager.js.map +1 -0
- package/dist/mcp/connect-server.d.ts +21 -0
- package/dist/mcp/connect-server.js +170 -0
- package/dist/mcp/connect-server.js.map +1 -0
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/sandbox-stdio-transport.d.ts +32 -0
- package/dist/mcp/sandbox-stdio-transport.js +199 -0
- package/dist/mcp/sandbox-stdio-transport.js.map +1 -0
- package/dist/observability/hooks.d.ts +10 -0
- package/dist/observability/hooks.js +97 -0
- package/dist/observability/hooks.js.map +1 -0
- package/dist/observability/index.d.ts +6 -0
- package/dist/observability/index.js +7 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/metrics.d.ts +31 -0
- package/dist/observability/metrics.js +61 -0
- package/dist/observability/metrics.js.map +1 -0
- package/dist/observability/middleware.d.ts +12 -0
- package/dist/observability/middleware.js +45 -0
- package/dist/observability/middleware.js.map +1 -0
- package/dist/observability/otel-harness.test-util.d.ts +37 -0
- package/dist/observability/otel-harness.test-util.js +96 -0
- package/dist/observability/otel-harness.test-util.js.map +1 -0
- package/dist/observability/provider.d.ts +8 -0
- package/dist/observability/provider.js +19 -0
- package/dist/observability/provider.js.map +1 -0
- package/dist/observability/tracing.d.ts +14 -0
- package/dist/observability/tracing.js +40 -0
- package/dist/observability/tracing.js.map +1 -0
- package/dist/observability/types.d.ts +39 -0
- package/dist/observability/types.js +31 -0
- package/dist/observability/types.js.map +1 -0
- package/dist/personalized-recommend/bundle.json +64 -0
- package/dist/personalized-recommend/index.ts +41 -0
- package/dist/personalized-recommend/package.json +10 -0
- package/dist/personalized-recommend/types.ts +2 -0
- package/dist/plugins/loader.d.ts +11 -0
- package/dist/plugins/loader.js +100 -0
- package/dist/plugins/loader.js.map +1 -0
- package/dist/plugins/merge.d.ts +10 -0
- package/dist/plugins/merge.js +22 -0
- package/dist/plugins/merge.js.map +1 -0
- package/dist/plugins/parse.d.ts +10 -0
- package/dist/plugins/parse.js +139 -0
- package/dist/plugins/parse.js.map +1 -0
- package/dist/plugins/types.d.ts +28 -0
- package/dist/plugins/types.js +2 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/plugins/urls.d.ts +7 -0
- package/dist/plugins/urls.js +40 -0
- package/dist/plugins/urls.js.map +1 -0
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.js +3 -0
- package/dist/runtime.js.map +1 -0
- package/dist/sandbox/factory.d.ts +2 -0
- package/dist/sandbox/factory.js +27 -0
- package/dist/sandbox/factory.js.map +1 -0
- package/dist/sandbox/index.d.ts +4 -0
- package/dist/sandbox/index.js +5 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/sandbox/providers/e2b.d.ts +28 -0
- package/dist/sandbox/providers/e2b.js +294 -0
- package/dist/sandbox/providers/e2b.js.map +1 -0
- package/dist/sandbox/providers/kubernetes-command-run.d.ts +8 -0
- package/dist/sandbox/providers/kubernetes-command-run.js +195 -0
- package/dist/sandbox/providers/kubernetes-command-run.js.map +1 -0
- package/dist/sandbox/providers/kubernetes-helpers.d.ts +31 -0
- package/dist/sandbox/providers/kubernetes-helpers.js +152 -0
- package/dist/sandbox/providers/kubernetes-helpers.js.map +1 -0
- package/dist/sandbox/providers/kubernetes-kubeconfig.d.ts +7 -0
- package/dist/sandbox/providers/kubernetes-kubeconfig.js +51 -0
- package/dist/sandbox/providers/kubernetes-kubeconfig.js.map +1 -0
- package/dist/sandbox/providers/kubernetes-spawn.d.ts +2 -0
- package/dist/sandbox/providers/kubernetes-spawn.js +42 -0
- package/dist/sandbox/providers/kubernetes-spawn.js.map +1 -0
- package/dist/sandbox/providers/kubernetes-spawn.utils.d.ts +32 -0
- package/dist/sandbox/providers/kubernetes-spawn.utils.js +249 -0
- package/dist/sandbox/providers/kubernetes-spawn.utils.js.map +1 -0
- package/dist/sandbox/providers/kubernetes.constants.d.ts +3 -0
- package/dist/sandbox/providers/kubernetes.constants.js +4 -0
- package/dist/sandbox/providers/kubernetes.constants.js.map +1 -0
- package/dist/sandbox/providers/kubernetes.d.ts +37 -0
- package/dist/sandbox/providers/kubernetes.js +258 -0
- package/dist/sandbox/providers/kubernetes.js.map +1 -0
- package/dist/sandbox/types.d.ts +57 -0
- package/dist/sandbox/types.js +2 -0
- package/dist/sandbox/types.js.map +1 -0
- package/dist/sandbox/utils.d.ts +1 -0
- package/dist/sandbox/utils.js +4 -0
- package/dist/sandbox/utils.js.map +1 -0
- package/dist/schema/bundle.d.ts +143 -0
- package/dist/schema/bundle.js +203 -0
- package/dist/schema/bundle.js.map +1 -0
- package/dist/service/command-routes.d.ts +8 -0
- package/dist/service/command-routes.js +44 -0
- package/dist/service/command-routes.js.map +1 -0
- package/dist/service/create-server.d.ts +9 -0
- package/dist/service/create-server.js +113 -0
- package/dist/service/create-server.js.map +1 -0
- package/dist/service/index.d.ts +1 -0
- package/dist/service/index.js +2 -0
- package/dist/service/index.js.map +1 -0
- package/dist/skills/index.d.ts +1 -0
- package/dist/skills/index.js +2 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/loader.d.ts +18 -0
- package/dist/skills/loader.js +142 -0
- package/dist/skills/loader.js.map +1 -0
- package/dist/skills/summaries.d.ts +8 -0
- package/dist/skills/summaries.js +9 -0
- package/dist/skills/summaries.js.map +1 -0
- package/dist/test-helpers/env.d.ts +2 -0
- package/dist/test-helpers/env.js +20 -0
- package/dist/test-helpers/env.js.map +1 -0
- package/dist/test-helpers/mock-agent.d.ts +56 -0
- package/dist/test-helpers/mock-agent.js +180 -0
- package/dist/test-helpers/mock-agent.js.map +1 -0
- package/dist/test-helpers/mock-sandbox.d.ts +33 -0
- package/dist/test-helpers/mock-sandbox.js +200 -0
- package/dist/test-helpers/mock-sandbox.js.map +1 -0
- package/dist/tui/index.d.ts +2 -0
- package/dist/tui/index.js +3 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/render.d.ts +8 -0
- package/dist/tui/render.js +40 -0
- package/dist/tui/render.js.map +1 -0
- package/dist/tui/tui.d.ts +19 -0
- package/dist/tui/tui.js +133 -0
- package/dist/tui/tui.js.map +1 -0
- package/dist/webui/create-webui-server.d.ts +22 -0
- package/dist/webui/create-webui-server.js +293 -0
- package/dist/webui/create-webui-server.js.map +1 -0
- package/dist/webui/event-bus.d.ts +16 -0
- package/dist/webui/event-bus.js +24 -0
- package/dist/webui/event-bus.js.map +1 -0
- package/dist/webui/index.d.ts +2 -0
- package/dist/webui/index.js +3 -0
- package/dist/webui/index.js.map +1 -0
- package/dist/webui/public/app.js +847 -0
- package/dist/webui/public/file-transfer.js +114 -0
- package/dist/webui/public/index.html +166 -0
- package/dist/webui/public/styles.css +1678 -0
- package/package.json +99 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/cli/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,GAE1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAqD,MAAM,iBAAiB,CAAC;AAErG,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AA8CvC,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,MAAM,EAAE,CAAC;QACzD,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,SAAoB;IACjD,IAAI,MAAM,GAAsB,OAAO,CAAC;IAExC,OAAO;QACL,EAAE,EAAE,eAAe;QACnB,IAAI,MAAM;YACR,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,4EAA4E;QAC5E,KAAK,EAAE,KAAK,IAAI,EAAE;YAChB,MAAM,GAAG,OAAO,CAAC;QACnB,CAAC;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AAG,CAAC;YACzC,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,IAAI;YACJ,MAAM;SACP,CAAC,CAAC;QACH,MAAM,CAAC,KAAK,CAAC,mCAAmC,UAAU,CAAC,IAAI,IAAI,CAAC,CAAC;QACrE,MAAM,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACtE,CAAC;YAAS,CAAC;QACT,aAAa,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACtC,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACvC,MAAM,QAAQ,EAAE,CAAC;IACnB,CAAC;IAED,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Agent, AgentConfig, InitOptions } from "../agent/types.js";
|
|
2
|
+
import type { BundleConfig } from "../schema/bundle.js";
|
|
3
|
+
import { vi } from "vitest";
|
|
4
|
+
type ServeHarnessOptions = {
|
|
5
|
+
config?: BundleConfig;
|
|
6
|
+
env?: NodeJS.ProcessEnv;
|
|
7
|
+
callPostMountHook?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type ServeHarness = {
|
|
10
|
+
agent: Agent;
|
|
11
|
+
env: NodeJS.ProcessEnv;
|
|
12
|
+
captured: {
|
|
13
|
+
agentConfig: AgentConfig<string> | null;
|
|
14
|
+
initOptions: InitOptions<string> | null;
|
|
15
|
+
};
|
|
16
|
+
loadConfigMock: ReturnType<typeof vi.fn>;
|
|
17
|
+
loadSkillsMock: ReturnType<typeof vi.fn>;
|
|
18
|
+
generateSystemPromptMock: ReturnType<typeof vi.fn>;
|
|
19
|
+
defineAgentMock: ReturnType<typeof vi.fn>;
|
|
20
|
+
createWebUIServerMock: ReturnType<typeof vi.fn>;
|
|
21
|
+
startHttpServerMock: ReturnType<typeof vi.fn>;
|
|
22
|
+
serveTUIMock: ReturnType<typeof vi.fn>;
|
|
23
|
+
closeServerMock: ReturnType<typeof vi.fn>;
|
|
24
|
+
webUIShutdownMock: ReturnType<typeof vi.fn>;
|
|
25
|
+
agentShutdownMock: ReturnType<typeof vi.fn>;
|
|
26
|
+
};
|
|
27
|
+
export declare const DEFAULT_CONFIG_PATH = "/tmp/agent-bundle-workspace/agent-bundle.yaml";
|
|
28
|
+
export declare function createBaseConfig(): BundleConfig;
|
|
29
|
+
export declare function createServeHarness(options?: ServeHarnessOptions): ServeHarness;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { vi } from "vitest";
|
|
2
|
+
export const DEFAULT_CONFIG_PATH = "/tmp/agent-bundle-workspace/agent-bundle.yaml";
|
|
3
|
+
export function createBaseConfig() {
|
|
4
|
+
return {
|
|
5
|
+
name: "invoice-processor",
|
|
6
|
+
model: {
|
|
7
|
+
provider: "openai",
|
|
8
|
+
model: "gpt-5-mini",
|
|
9
|
+
},
|
|
10
|
+
prompt: {
|
|
11
|
+
system: "You are concise.",
|
|
12
|
+
variables: [],
|
|
13
|
+
},
|
|
14
|
+
sandbox: {
|
|
15
|
+
provider: "kubernetes",
|
|
16
|
+
timeout: 900,
|
|
17
|
+
resources: {
|
|
18
|
+
cpu: 2,
|
|
19
|
+
memory: "512MB",
|
|
20
|
+
},
|
|
21
|
+
kubernetes: {
|
|
22
|
+
image: "agent-bundle/execd:latest",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
skills: [
|
|
26
|
+
{
|
|
27
|
+
path: "./skills/format-code",
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function createSandboxIO() {
|
|
33
|
+
return {
|
|
34
|
+
exec: async () => ({
|
|
35
|
+
stdout: "",
|
|
36
|
+
stderr: "",
|
|
37
|
+
exitCode: 0,
|
|
38
|
+
}),
|
|
39
|
+
file: {
|
|
40
|
+
read: async () => "",
|
|
41
|
+
write: async () => undefined,
|
|
42
|
+
list: async () => [],
|
|
43
|
+
delete: async () => undefined,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function createSkills() {
|
|
48
|
+
return [
|
|
49
|
+
{
|
|
50
|
+
name: "FormatCode",
|
|
51
|
+
description: "Format source files inside sandbox",
|
|
52
|
+
content: "---\nname: FormatCode\ndescription: Format source files inside sandbox\n---\n",
|
|
53
|
+
sourcePath: "/tmp/agent-bundle-workspace/skills/format-code/SKILL.md",
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
export function createServeHarness(options = {}) {
|
|
58
|
+
const config = options.config ?? createBaseConfig();
|
|
59
|
+
const env = options.env ?? {};
|
|
60
|
+
const callPostMountHook = options.callPostMountHook ?? true;
|
|
61
|
+
const sandboxIO = createSandboxIO();
|
|
62
|
+
const agentShutdownMock = vi.fn(async () => undefined);
|
|
63
|
+
const agent = {
|
|
64
|
+
name: config.name,
|
|
65
|
+
status: "ready",
|
|
66
|
+
respond: async () => ({
|
|
67
|
+
id: "resp-1",
|
|
68
|
+
output: "ok",
|
|
69
|
+
usage: {
|
|
70
|
+
inputTokens: 1,
|
|
71
|
+
outputTokens: 1,
|
|
72
|
+
totalTokens: 2,
|
|
73
|
+
},
|
|
74
|
+
}),
|
|
75
|
+
respondStream: async function* () {
|
|
76
|
+
return;
|
|
77
|
+
},
|
|
78
|
+
shutdown: agentShutdownMock,
|
|
79
|
+
};
|
|
80
|
+
const captured = {
|
|
81
|
+
agentConfig: null,
|
|
82
|
+
initOptions: null,
|
|
83
|
+
};
|
|
84
|
+
const loadConfigMock = vi.fn(async () => config);
|
|
85
|
+
const loadSkillsMock = vi.fn(async () => createSkills());
|
|
86
|
+
const generateSystemPromptMock = vi.fn(() => "generated-system-prompt");
|
|
87
|
+
const defineAgentMock = vi.fn((agentConfig) => {
|
|
88
|
+
captured.agentConfig = agentConfig;
|
|
89
|
+
return {
|
|
90
|
+
name: config.name,
|
|
91
|
+
init: async (initOptions) => {
|
|
92
|
+
captured.initOptions = initOptions;
|
|
93
|
+
if (callPostMountHook) {
|
|
94
|
+
await initOptions.hooks?.postMount?.(sandboxIO);
|
|
95
|
+
}
|
|
96
|
+
return agent;
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
const webUIShutdownMock = vi.fn();
|
|
101
|
+
const createWebUIServerMock = vi.fn((input) => {
|
|
102
|
+
void input;
|
|
103
|
+
return {
|
|
104
|
+
app: {
|
|
105
|
+
fetch: async (request) => {
|
|
106
|
+
void request;
|
|
107
|
+
return new Response("ok");
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
eventBus: {
|
|
111
|
+
subscribe: () => () => undefined,
|
|
112
|
+
emit: () => undefined,
|
|
113
|
+
listenerCount: () => 0,
|
|
114
|
+
dispose: () => undefined,
|
|
115
|
+
},
|
|
116
|
+
handleUpgrade: () => undefined,
|
|
117
|
+
shutdown: webUIShutdownMock,
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
const closeServerMock = vi.fn(async () => undefined);
|
|
121
|
+
const startHttpServerMock = vi.fn(async (input) => {
|
|
122
|
+
void input;
|
|
123
|
+
return {
|
|
124
|
+
port: 4310,
|
|
125
|
+
close: closeServerMock,
|
|
126
|
+
};
|
|
127
|
+
});
|
|
128
|
+
const serveTUIMock = vi.fn(async () => undefined);
|
|
129
|
+
return {
|
|
130
|
+
agent,
|
|
131
|
+
env,
|
|
132
|
+
captured,
|
|
133
|
+
loadConfigMock,
|
|
134
|
+
loadSkillsMock,
|
|
135
|
+
generateSystemPromptMock,
|
|
136
|
+
defineAgentMock,
|
|
137
|
+
createWebUIServerMock,
|
|
138
|
+
startHttpServerMock,
|
|
139
|
+
serveTUIMock,
|
|
140
|
+
closeServerMock,
|
|
141
|
+
webUIShutdownMock,
|
|
142
|
+
agentShutdownMock,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=serve.test-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.test-helpers.js","sourceRoot":"","sources":["../../src/cli/serve.test-helpers.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AA2B5B,MAAM,CAAC,MAAM,mBAAmB,GAAG,+CAA+C,CAAC;AAEnF,MAAM,UAAU,gBAAgB;IAC9B,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE;YACL,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,YAAY;SACpB;QACD,MAAM,EAAE;YACN,MAAM,EAAE,kBAAkB;YAC1B,SAAS,EAAE,EAAE;SACd;QACD,OAAO,EAAE;YACP,QAAQ,EAAE,YAAY;YACtB,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE;gBACT,GAAG,EAAE,CAAC;gBACN,MAAM,EAAE,OAAO;aAChB;YACD,UAAU,EAAE;gBACV,KAAK,EAAE,2BAA2B;aACnC;SACF;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,sBAAsB;aAC7B;SACF;KACF,CAAC;AACJ,CAAC;AAED,SAAS,eAAe;IACtB,OAAO;QACL,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;YACjB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,CAAC;SACZ,CAAC;QACF,IAAI,EAAE;YACJ,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;YACpB,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,SAAS;YAC5B,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;YACpB,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,SAAS;SAC9B;KACF,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EAAE,CAAC,SAAS,CAAC,CAAC;IACrD,MAAM,mBAAmB,GAAG,EAAE,CAAC,EAAE,CAC/B,KAAK,EAAE,KAA2B,EAA8B,EAAE;QAChE,KAAK,KAAK,CAAC;QACX,OAAO;YACL,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,eAAe;SACvB,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,MAAM,YAAY,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,SAAS,CAAC,CAAC;IAElD,OAAO;QACL,KAAK;QACL,GAAG;QACH,QAAQ;QACR,cAAc;QACd,cAAc;QACd,wBAAwB;QACxB,eAAe;QACf,qBAAqB;QACrB,mBAAmB;QACnB,YAAY;QACZ,eAAe;QACf,iBAAiB;QACjB,iBAAiB;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "code-formatter",
|
|
3
|
+
"namePascal": "CodeFormatter",
|
|
4
|
+
"model": {
|
|
5
|
+
"provider": "openai",
|
|
6
|
+
"model": "gpt-5.3-codex"
|
|
7
|
+
},
|
|
8
|
+
"sandbox": {
|
|
9
|
+
"provider": "kubernetes",
|
|
10
|
+
"timeout": 300,
|
|
11
|
+
"resources": {
|
|
12
|
+
"cpu": 1,
|
|
13
|
+
"memory": "256Mi"
|
|
14
|
+
},
|
|
15
|
+
"kubernetes": {
|
|
16
|
+
"image": "agent-bundle/k8s-server-execd:latest",
|
|
17
|
+
"build": {
|
|
18
|
+
"dockerfile": "./Dockerfile",
|
|
19
|
+
"context": "."
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"prompt": {
|
|
24
|
+
"system": "You are a code formatting agent.\nYou have access to a sandboxed environment.\nFollow the skill instructions precisely.\nAlways use the tools available to you — do not produce output without using tools.\nUse exactly `/workspace/input.py` as the working file.\nBefore replying, you must read `/workspace/input.py` with the Read tool.\n",
|
|
25
|
+
"variables": []
|
|
26
|
+
},
|
|
27
|
+
"systemPrompt": "You are a code formatting agent.\nYou have access to a sandboxed environment.\nFollow the skill instructions precisely.\nAlways use the tools available to you — do not produce output without using tools.\nUse exactly `/workspace/input.py` as the working file.\nBefore replying, you must read `/workspace/input.py` with the Read tool.\n\n## Skills\n\n### format-code\n---\nname: format-code\ndescription: Format Python code using the sandbox environment.\n---\n\n# Format Code\n\nYou are given raw Python code by the user. Follow these steps exactly:\n\n1. **Write** the user's code to `/workspace/input.py` using the Write tool.\n2. **Run** the formatter in the sandbox using Bash:\n ```\n autopep8 --in-place /workspace/input.py\n ```\n3. **Read** `/workspace/input.py` using the Read tool.\n4. Return the Read result as the final answer.\n\nRules:\n\n- Always use the path `/workspace/input.py`.\n- Do not invent formatted output from memory.\n- Do not skip the Read step.\n- If the Bash command fails, return the command error output directly.",
|
|
28
|
+
"skills": [
|
|
29
|
+
{
|
|
30
|
+
"name": "format-code",
|
|
31
|
+
"description": "Format Python code using the sandbox environment.",
|
|
32
|
+
"sourcePath": "/Users/yujiachen/Projects/agent-bundle/demo/code-formatter/k8s/skills/format-code/SKILL.md",
|
|
33
|
+
"content": "---\nname: format-code\ndescription: Format Python code using the sandbox environment.\n---\n\n# Format Code\n\nYou are given raw Python code by the user. Follow these steps exactly:\n\n1. **Write** the user's code to `/workspace/input.py` using the Write tool.\n2. **Run** the formatter in the sandbox using Bash:\n ```\n autopep8 --in-place /workspace/input.py\n ```\n3. **Read** `/workspace/input.py` using the Read tool.\n4. Return the Read result as the final answer.\n\nRules:\n\n- Always use the path `/workspace/input.py`.\n- Do not invent formatted output from memory.\n- Do not skip the Read step.\n- If the Bash command fails, return the command error output directly.\n"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"commands": [],
|
|
37
|
+
"sandboxImage": {
|
|
38
|
+
"provider": "kubernetes",
|
|
39
|
+
"ref": "agent-bundle/k8s-server-execd:latest"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineAgent } from "agent-bundle/runtime";
|
|
2
|
+
|
|
3
|
+
export const CodeFormatter = defineAgent({
|
|
4
|
+
name: "code-formatter",
|
|
5
|
+
sandbox: {
|
|
6
|
+
provider: "kubernetes",
|
|
7
|
+
timeout: 300,
|
|
8
|
+
resources: {
|
|
9
|
+
cpu: 1,
|
|
10
|
+
memory: "256Mi"
|
|
11
|
+
},
|
|
12
|
+
kubernetes: {
|
|
13
|
+
image: "agent-bundle/k8s-server-execd:latest",
|
|
14
|
+
build: {
|
|
15
|
+
dockerfile: "./Dockerfile",
|
|
16
|
+
context: "."
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
model: {
|
|
21
|
+
provider: "openai",
|
|
22
|
+
model: "gpt-5.3-codex"
|
|
23
|
+
},
|
|
24
|
+
systemPrompt: "You are a code formatting agent.\nYou have access to a sandboxed environment.\nFollow the skill instructions precisely.\nAlways use the tools available to you \u2014 do not produce output without using tools.\nUse exactly `/workspace/input.py` as the working file.\nBefore replying, you must read `/workspace/input.py` with the Read tool.\n\n## Skills\n\n### format-code\n---\nname: format-code\ndescription: Format Python code using the sandbox environment.\n---\n\n# Format Code\n\nYou are given raw Python code by the user. Follow these steps exactly:\n\n1. **Write** the user's code to `/workspace/input.py` using the Write tool.\n2. **Run** the formatter in the sandbox using Bash:\n ```\n autopep8 --in-place /workspace/input.py\n ```\n3. **Read** `/workspace/input.py` using the Read tool.\n4. Return the Read result as the final answer.\n\nRules:\n\n- Always use the path `/workspace/input.py`.\n- Do not invent formatted output from memory.\n- Do not skip the Read step.\n- If the Bash command fails, return the command error output directly.",
|
|
25
|
+
variables: [] as const
|
|
26
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "code-formatter-e2b",
|
|
3
|
+
"namePascal": "CodeFormatterE2b",
|
|
4
|
+
"model": {
|
|
5
|
+
"provider": "openai",
|
|
6
|
+
"model": "gpt-5.1-codex"
|
|
7
|
+
},
|
|
8
|
+
"sandbox": {
|
|
9
|
+
"provider": "e2b",
|
|
10
|
+
"timeout": 300,
|
|
11
|
+
"resources": {
|
|
12
|
+
"cpu": 1,
|
|
13
|
+
"memory": "256MB"
|
|
14
|
+
},
|
|
15
|
+
"e2b": {
|
|
16
|
+
"template": "code-formatter-e2b-demo",
|
|
17
|
+
"build": {
|
|
18
|
+
"dockerfile": "./Dockerfile"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"prompt": {
|
|
23
|
+
"system": "You are a code formatting agent.\nYou have access to a sandboxed environment.\nFollow the skill instructions precisely.\nAlways use the tools available to you — do not produce output without using tools.\nUse exactly `/workspace/input.py` as the working file.\nBefore replying, you must read `/workspace/input.py` with the Read tool.\n",
|
|
24
|
+
"variables": []
|
|
25
|
+
},
|
|
26
|
+
"systemPrompt": "You are a code formatting agent.\nYou have access to a sandboxed environment.\nFollow the skill instructions precisely.\nAlways use the tools available to you — do not produce output without using tools.\nUse exactly `/workspace/input.py` as the working file.\nBefore replying, you must read `/workspace/input.py` with the Read tool.\n\n## Skills\n\n### format-code\n---\nname: format-code\ndescription: Format Python code using the sandbox environment.\n---\n\n# Format Code\n\nYou are given raw Python code by the user. Follow these steps exactly:\n\n1. **Write** the user's code to `/workspace/input.py` using the Write tool.\n2. **Run** the formatter in the sandbox using Bash:\n ```\n autopep8 --in-place /workspace/input.py\n ```\n3. **Read** `/workspace/input.py` using the Read tool.\n4. Return the Read result as the final answer.\n\nRules:\n\n- Always use the path `/workspace/input.py`.\n- Do not invent formatted output from memory.\n- Do not skip the Read step.\n- If the Bash command fails, return the command error output directly.",
|
|
27
|
+
"skills": [
|
|
28
|
+
{
|
|
29
|
+
"name": "format-code",
|
|
30
|
+
"description": "Format Python code using the sandbox environment.",
|
|
31
|
+
"sourcePath": "/Users/yujiachen/Projects/agent-bundle/demo/code-formatter/e2b/skills/format-code/SKILL.md",
|
|
32
|
+
"content": "---\nname: format-code\ndescription: Format Python code using the sandbox environment.\n---\n\n# Format Code\n\nYou are given raw Python code by the user. Follow these steps exactly:\n\n1. **Write** the user's code to `/workspace/input.py` using the Write tool.\n2. **Run** the formatter in the sandbox using Bash:\n ```\n autopep8 --in-place /workspace/input.py\n ```\n3. **Read** `/workspace/input.py` using the Read tool.\n4. Return the Read result as the final answer.\n\nRules:\n\n- Always use the path `/workspace/input.py`.\n- Do not invent formatted output from memory.\n- Do not skip the Read step.\n- If the Bash command fails, return the command error output directly.\n"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"commands": [],
|
|
36
|
+
"sandboxImage": {
|
|
37
|
+
"provider": "e2b",
|
|
38
|
+
"ref": "code-formatter-e2b-demo"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineAgent } from "agent-bundle/runtime";
|
|
2
|
+
|
|
3
|
+
export const CodeFormatterE2b = defineAgent({
|
|
4
|
+
name: "code-formatter-e2b",
|
|
5
|
+
sandbox: {
|
|
6
|
+
provider: "e2b",
|
|
7
|
+
timeout: 300,
|
|
8
|
+
resources: {
|
|
9
|
+
cpu: 1,
|
|
10
|
+
memory: "256MB"
|
|
11
|
+
},
|
|
12
|
+
e2b: {
|
|
13
|
+
template: "code-formatter-e2b-demo",
|
|
14
|
+
build: {
|
|
15
|
+
dockerfile: "./Dockerfile"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
model: {
|
|
20
|
+
provider: "openai",
|
|
21
|
+
model: "gpt-5.1-codex"
|
|
22
|
+
},
|
|
23
|
+
systemPrompt: "You are a code formatting agent.\nYou have access to a sandboxed environment.\nFollow the skill instructions precisely.\nAlways use the tools available to you \u2014 do not produce output without using tools.\nUse exactly `/workspace/input.py` as the working file.\nBefore replying, you must read `/workspace/input.py` with the Read tool.\n\n## Skills\n\n### format-code\n---\nname: format-code\ndescription: Format Python code using the sandbox environment.\n---\n\n# Format Code\n\nYou are given raw Python code by the user. Follow these steps exactly:\n\n1. **Write** the user's code to `/workspace/input.py` using the Write tool.\n2. **Run** the formatter in the sandbox using Bash:\n ```\n autopep8 --in-place /workspace/input.py\n ```\n3. **Read** `/workspace/input.py` using the Read tool.\n4. Return the Read result as the final answer.\n\nRules:\n\n- Always use the path `/workspace/input.py`.\n- Do not invent formatted output from memory.\n- Do not skip the Read step.\n- If the Bash command fails, return the command error output directly.",
|
|
24
|
+
variables: [] as const
|
|
25
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "coding-assistant-ollama",
|
|
3
|
+
"namePascal": "CodingAssistantOllama",
|
|
4
|
+
"model": {
|
|
5
|
+
"provider": "ollama",
|
|
6
|
+
"model": "gpt-oss:20b",
|
|
7
|
+
"ollama": {
|
|
8
|
+
"baseUrl": "http://localhost:11434"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"sandbox": {
|
|
12
|
+
"provider": "e2b",
|
|
13
|
+
"timeout": 300,
|
|
14
|
+
"resources": {
|
|
15
|
+
"cpu": 1,
|
|
16
|
+
"memory": "256MB"
|
|
17
|
+
},
|
|
18
|
+
"e2b": {
|
|
19
|
+
"template": "coding-assistant-ollama-demo",
|
|
20
|
+
"build": {
|
|
21
|
+
"dockerfile": "./Dockerfile"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"prompt": {
|
|
26
|
+
"system": "You are a coding assistant agent.\nYou have access to a sandboxed environment.\nFollow the skill instructions precisely.\nAlways use the tools available to you — do not produce output without using tools.\nUse `/workspace` as the working directory.\n",
|
|
27
|
+
"variables": []
|
|
28
|
+
},
|
|
29
|
+
"systemPrompt": "You are a coding assistant agent.\nYou have access to a sandboxed environment.\nFollow the skill instructions precisely.\nAlways use the tools available to you — do not produce output without using tools.\nUse `/workspace` as the working directory.\n\n## Skills\n\n### code-assist\n---\nname: code-assist\ndescription: General-purpose coding assistant — write, debug, and explain code in the sandbox.\n---\n\n# Code Assist\n\nYou help users write, debug, and explain code inside a sandboxed environment.\n\n## Workflow\n\n1. **Understand** the user's request (write new code, fix a bug, explain existing code).\n2. **Write** files to `/workspace/` using the Write tool.\n3. **Run** code or commands in the sandbox using Bash (e.g. `python /workspace/main.py`, `node /workspace/index.js`).\n4. **Read** output files with the Read tool when relevant.\n5. Return the result (execution output, explanation, or fixed code) as the final answer.\n\n## Rules\n\n- Always work inside `/workspace/`.\n- Use the sandbox tools — never fabricate command output from memory.\n- If a command fails, return the error output directly and suggest a fix.\n- When explaining code, still write it to the sandbox and run it to verify your explanation.\n- Support Python, Node.js, and shell scripts by default.",
|
|
30
|
+
"skills": [
|
|
31
|
+
{
|
|
32
|
+
"name": "code-assist",
|
|
33
|
+
"description": "General-purpose coding assistant — write, debug, and explain code in the sandbox.",
|
|
34
|
+
"sourcePath": "/Users/yujiachen/Projects/agent-bundle/demo/tui/ollama/skills/code-assist/SKILL.md",
|
|
35
|
+
"content": "---\nname: code-assist\ndescription: General-purpose coding assistant — write, debug, and explain code in the sandbox.\n---\n\n# Code Assist\n\nYou help users write, debug, and explain code inside a sandboxed environment.\n\n## Workflow\n\n1. **Understand** the user's request (write new code, fix a bug, explain existing code).\n2. **Write** files to `/workspace/` using the Write tool.\n3. **Run** code or commands in the sandbox using Bash (e.g. `python /workspace/main.py`, `node /workspace/index.js`).\n4. **Read** output files with the Read tool when relevant.\n5. Return the result (execution output, explanation, or fixed code) as the final answer.\n\n## Rules\n\n- Always work inside `/workspace/`.\n- Use the sandbox tools — never fabricate command output from memory.\n- If a command fails, return the error output directly and suggest a fix.\n- When explaining code, still write it to the sandbox and run it to verify your explanation.\n- Support Python, Node.js, and shell scripts by default.\n"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commands": [],
|
|
39
|
+
"sandboxImage": {
|
|
40
|
+
"provider": "e2b",
|
|
41
|
+
"ref": "coding-assistant-ollama-demo"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineAgent } from "agent-bundle/runtime";
|
|
2
|
+
|
|
3
|
+
export const CodingAssistantOllama = defineAgent({
|
|
4
|
+
name: "coding-assistant-ollama",
|
|
5
|
+
sandbox: {
|
|
6
|
+
provider: "e2b",
|
|
7
|
+
timeout: 300,
|
|
8
|
+
resources: {
|
|
9
|
+
cpu: 1,
|
|
10
|
+
memory: "256MB"
|
|
11
|
+
},
|
|
12
|
+
e2b: {
|
|
13
|
+
template: "coding-assistant-ollama-demo",
|
|
14
|
+
build: {
|
|
15
|
+
dockerfile: "./Dockerfile"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
model: {
|
|
20
|
+
provider: "ollama",
|
|
21
|
+
model: "gpt-oss:20b",
|
|
22
|
+
ollama: {
|
|
23
|
+
baseUrl: "http://localhost:11434"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
systemPrompt: "You are a coding assistant agent.\nYou have access to a sandboxed environment.\nFollow the skill instructions precisely.\nAlways use the tools available to you \u2014 do not produce output without using tools.\nUse `/workspace` as the working directory.\n\n## Skills\n\n### code-assist\n---\nname: code-assist\ndescription: General-purpose coding assistant \u2014 write, debug, and explain code in the sandbox.\n---\n\n# Code Assist\n\nYou help users write, debug, and explain code inside a sandboxed environment.\n\n## Workflow\n\n1. **Understand** the user's request (write new code, fix a bug, explain existing code).\n2. **Write** files to `/workspace/` using the Write tool.\n3. **Run** code or commands in the sandbox using Bash (e.g. `python /workspace/main.py`, `node /workspace/index.js`).\n4. **Read** output files with the Read tool when relevant.\n5. Return the result (execution output, explanation, or fixed code) as the final answer.\n\n## Rules\n\n- Always work inside `/workspace/`.\n- Use the sandbox tools \u2014 never fabricate command output from memory.\n- If a command fails, return the error output directly and suggest a fix.\n- When explaining code, still write it to the sandbox and run it to verify your explanation.\n- Support Python, Node.js, and shell scripts by default.",
|
|
27
|
+
variables: [] as const
|
|
28
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Command } from "./types.js";
|
|
2
|
+
export type CommandSummary = {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
argumentHint?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function findCommand(commands: readonly Command[], name: string): Command | undefined;
|
|
8
|
+
export declare function toCommandSummary(command: Command): CommandSummary;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function findCommand(commands, name) {
|
|
2
|
+
return commands.find((cmd) => cmd.name === name || cmd.name.toLowerCase() === name.toLowerCase());
|
|
3
|
+
}
|
|
4
|
+
export function toCommandSummary(command) {
|
|
5
|
+
return {
|
|
6
|
+
name: command.name,
|
|
7
|
+
description: command.description,
|
|
8
|
+
...(command.argumentHint ? { argumentHint: command.argumentHint } : {}),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=find.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/commands/find.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,WAAW,CACzB,QAA4B,EAC5B,IAAY;IAEZ,OAAO,QAAQ,CAAC,IAAI,CAClB,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,CAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommandEntry } from "../schema/bundle.js";
|
|
2
|
+
import type { Command } from "./types.js";
|
|
3
|
+
type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
4
|
+
export type LoadCommandOptions = {
|
|
5
|
+
basePath?: string;
|
|
6
|
+
cache?: boolean;
|
|
7
|
+
cacheDir?: string;
|
|
8
|
+
fetchImpl?: FetchLike;
|
|
9
|
+
};
|
|
10
|
+
export type LoadAllCommandsOptions = Omit<LoadCommandOptions, "basePath">;
|
|
11
|
+
export declare function loadCommand(entry: CommandEntry, options?: LoadCommandOptions): Promise<Command>;
|
|
12
|
+
export declare function loadAllCommands(entries: CommandEntry[], basePath: string, options?: LoadAllCommandsOptions): Promise<Command[]>;
|
|
13
|
+
export {};
|