@loopstack/agent-examples 0.1.1

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 (53) hide show
  1. package/README.md +150 -0
  2. package/dist/agent-examples.module.d.ts +3 -0
  3. package/dist/agent-examples.module.d.ts.map +1 -0
  4. package/dist/agent-examples.module.js +52 -0
  5. package/dist/agent-examples.module.js.map +1 -0
  6. package/dist/index.d.ts +6 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +22 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/tools/calculator.tool.d.ts +15 -0
  11. package/dist/tools/calculator.tool.d.ts.map +1 -0
  12. package/dist/tools/calculator.tool.js +51 -0
  13. package/dist/tools/calculator.tool.js.map +1 -0
  14. package/dist/tools/index.d.ts +3 -0
  15. package/dist/tools/index.d.ts.map +1 -0
  16. package/dist/tools/index.js +19 -0
  17. package/dist/tools/index.js.map +1 -0
  18. package/dist/tools/weather-lookup.tool.d.ts +10 -0
  19. package/dist/tools/weather-lookup.tool.d.ts.map +1 -0
  20. package/dist/tools/weather-lookup.tool.js +36 -0
  21. package/dist/tools/weather-lookup.tool.js.map +1 -0
  22. package/dist/workflows/agent/agent-example.workflow.d.ts +9 -0
  23. package/dist/workflows/agent/agent-example.workflow.d.ts.map +1 -0
  24. package/dist/workflows/agent/agent-example.workflow.js +62 -0
  25. package/dist/workflows/agent/agent-example.workflow.js.map +1 -0
  26. package/dist/workflows/agent/templates/system.md +4 -0
  27. package/dist/workflows/code-agent/code-agent-example.workflow.d.ts +12 -0
  28. package/dist/workflows/code-agent/code-agent-example.workflow.d.ts.map +1 -0
  29. package/dist/workflows/code-agent/code-agent-example.workflow.js +75 -0
  30. package/dist/workflows/code-agent/code-agent-example.workflow.js.map +1 -0
  31. package/dist/workflows/custom-agent/custom-agent-example.workflow.d.ts +30 -0
  32. package/dist/workflows/custom-agent/custom-agent-example.workflow.d.ts.map +1 -0
  33. package/dist/workflows/custom-agent/custom-agent-example.workflow.js +165 -0
  34. package/dist/workflows/custom-agent/custom-agent-example.workflow.js.map +1 -0
  35. package/dist/workflows/custom-agent/templates/system.md +14 -0
  36. package/dist/workflows/custom-agent/templates/wrap-up.md +3 -0
  37. package/dist/workflows/mcp-linear/mcp-linear-example.workflow.d.ts +18 -0
  38. package/dist/workflows/mcp-linear/mcp-linear-example.workflow.d.ts.map +1 -0
  39. package/dist/workflows/mcp-linear/mcp-linear-example.workflow.js +65 -0
  40. package/dist/workflows/mcp-linear/mcp-linear-example.workflow.js.map +1 -0
  41. package/package.json +54 -0
  42. package/src/agent-examples.module.ts +40 -0
  43. package/src/index.ts +5 -0
  44. package/src/tools/calculator.tool.ts +47 -0
  45. package/src/tools/index.ts +2 -0
  46. package/src/tools/weather-lookup.tool.ts +29 -0
  47. package/src/workflows/agent/agent-example.workflow.ts +40 -0
  48. package/src/workflows/agent/templates/system.md +4 -0
  49. package/src/workflows/code-agent/code-agent-example.workflow.ts +56 -0
  50. package/src/workflows/custom-agent/custom-agent-example.workflow.ts +202 -0
  51. package/src/workflows/custom-agent/templates/system.md +14 -0
  52. package/src/workflows/custom-agent/templates/wrap-up.md +3 -0
  53. package/src/workflows/mcp-linear/mcp-linear-example.workflow.ts +52 -0
package/README.md ADDED
@@ -0,0 +1,150 @@
1
+ ---
2
+ title: Agent Examples
3
+ description: Workflow examples for LLM agents in Loopstack — basic AgentWorkflow with custom tools, code-exploration agent, MCP-connected agent, and a from-scratch custom agent loop with error handling.
4
+ ---
5
+
6
+ # @loopstack/agent-examples
7
+
8
+ > LLM agent workflow examples for the [Loopstack](https://loopstack.ai) automation framework.
9
+
10
+ Four ways to build agents in Loopstack — from the recommended `AgentWorkflow` shortcut to a from-scratch custom loop. Pick the right shape for your control vs. simplicity tradeoff.
11
+
12
+ ## Install as Source (Recommended)
13
+
14
+ ```bash
15
+ npx giget@latest gh:loopstack-ai/loopstack/registry/examples/agent-examples src/agent-examples
16
+ ```
17
+
18
+ Register the module:
19
+
20
+ ```typescript
21
+ import { Module } from '@nestjs/common';
22
+ import { LoopstackModule } from '@loopstack/loopstack-module';
23
+ import { AgentExamplesModule } from './agent-examples/agent-examples.module';
24
+
25
+ @Module({
26
+ imports: [LoopstackModule.forRoot(), AgentExamplesModule],
27
+ })
28
+ export class AppModule {}
29
+ ```
30
+
31
+ ## Install as a Dependency
32
+
33
+ ```bash
34
+ npm install @loopstack/agent-examples
35
+ ```
36
+
37
+ ```typescript
38
+ import { AgentExamplesModule } from '@loopstack/agent-examples';
39
+ ```
40
+
41
+ ## Environment
42
+
43
+ ```bash
44
+ ANTHROPIC_API_KEY=sk-ant-...
45
+ LINEAR_MCP_TOKEN=... # required only for the MCP Linear example
46
+ ```
47
+
48
+ ## Examples
49
+
50
+ | Example | Studio title | Description |
51
+ | ----------------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
52
+ | [Agent](#agent) | `Agent - Basic Agent Example` | Launch `AgentWorkflow` with custom tools — recommended starting point |
53
+ | [Code Agent](#code-agent) | `Agent - Code Agent Example` | Specialized codebase-exploration agent with `glob` / `grep` / `read` |
54
+ | [MCP Linear](#mcp-linear) | `Agent - MCP Linear Example` | Chat agent connected to Linear's hosted MCP server via `mcp_list_tools` + `mcp_call` |
55
+ | [Custom Agent](#custom-agent) | `Agent - Custom Agent Example` | Build an agent loop from scratch — delegate primitives, guards, error handling |
56
+
57
+ ---
58
+
59
+ ## Agent
60
+
61
+ Launches a generic `AgentWorkflow` as a sub-workflow with two custom tools (`weather_lookup`, `calculator`) and renders the agent's run inline in the parent view. The recommended starting point for agent workflows.
62
+
63
+ ### Files
64
+
65
+ - `agent-example.workflow.ts` — workflow class
66
+ - `tools/weather-lookup.tool.ts`, `tools/calculator.tool.ts` — custom tools
67
+ - `templates/system.md` — agent system prompt
68
+
69
+ ## Code Agent
70
+
71
+ Launches `AgentWorkflow` as a code-exploration agent with `glob`, `grep`, and `read` tools. Demonstrates configuring a domain-specific agent without building a custom loop.
72
+
73
+ ### Setup
74
+
75
+ The `glob`, `grep`, and `read` tools execute on a **remote agent**, so the workspace must have a `sandbox` environment connected.
76
+
77
+ **1. Run a remote agent.** The simplest option is `@loopstack/remote-server` on `localhost:3001` (see `services/remote-server/`).
78
+
79
+ **2. Register an available environment in your app module:**
80
+
81
+ ```typescript
82
+ import { RemoteClientModule } from '@loopstack/remote-client';
83
+
84
+ @Module({
85
+ imports: [
86
+ LoopstackModule.forRoot(),
87
+ RemoteClientModule.forRoot({
88
+ environments: {
89
+ available: [
90
+ {
91
+ type: 'sandbox',
92
+ name: 'Local Remote Server',
93
+ connectionUrl: 'http://localhost:3080',
94
+ agentUrl: 'http://localhost:3001',
95
+ local: true,
96
+ },
97
+ ],
98
+ },
99
+ }),
100
+ AgentExamplesModule,
101
+ ],
102
+ })
103
+ export class AppModule {}
104
+ ```
105
+
106
+ `AgentExamplesModule` itself declares the `sandbox` slot via `RemoteClientModule.forFeature(...)` — make sure you use the same type = sandbox.
107
+
108
+ **3. Create a workspace from the Studio.** The environment is auto-selected from the matching `type` and persisted on creation.
109
+
110
+ ### Files
111
+
112
+ - `code-agent-example.workflow.ts` — workflow class
113
+
114
+ ## MCP Linear
115
+
116
+ Launches `ChatAgentWorkflow` configured with `mcp_list_tools` + `mcp_call`, pointing at Linear's hosted MCP server. The agent dynamically discovers Linear's tool surface at runtime and invokes the right one for the user's question.
117
+
118
+ Requires `LINEAR_MCP_TOKEN` env var and configures `McpModule.forRoot` with an allowed-hosts policy.
119
+
120
+ ### Files
121
+
122
+ - `mcp-linear-example.workflow.ts` — workflow class
123
+
124
+ ## Custom Agent
125
+
126
+ A from-scratch agent loop using the delegate primitives (`LlmGenerateTextTool`, `LlmDelegateToolCallsTool`, `LlmUpdateToolResultTool`). Demonstrates the pattern `AgentWorkflow` encapsulates: LLM call → guard on `tool_use` vs `end_turn` → delegate tools → feed results back → loop.
127
+
128
+ Also exercises error self-correction: the LLM is instructed to deliberately trigger validation errors (`strictSchema` with wrong args), runtime errors (`runtimeError`), and failed sub-workflows (`failingSubWorkflow`), then observe the `is_error` tool results and correct course.
129
+
130
+ ### When to use
131
+
132
+ - You need finer control than `AgentWorkflow` provides (custom guards, cancellation logic, telemetry hooks)
133
+ - You want to understand what `AgentWorkflow` does under the hood
134
+ - You need a custom shape — multiple parallel LLMs, conditional tool sets per turn, etc.
135
+
136
+ For the simple case, prefer `AgentWorkflow` (see [Basic Agent Example](../agent/README.md)).
137
+
138
+ ### Files
139
+
140
+ - `custom-agent-example.workflow.ts` — workflow class
141
+ - `custom-agent-example.ui.yaml` — Studio widget
142
+ - `templates/system.md` — system prompt
143
+ - `tools/{strict-schema,runtime-error,failing-sub-workflow}.tool.ts` — error-trigger tools
144
+ - `failing-sub.workflow.ts` — sub-workflow that always fails (used by `failing-sub-workflow.tool`)
145
+
146
+ ## About
147
+
148
+ Author: [Jakob Klippel](https://www.linkedin.com/in/jakob-klippel/)
149
+
150
+ License: MIT
@@ -0,0 +1,3 @@
1
+ export declare class AgentExamplesModule {
2
+ }
3
+ //# sourceMappingURL=agent-examples.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-examples.module.d.ts","sourceRoot":"","sources":["../src/agent-examples.module.ts"],"names":[],"mappings":"AAqBA,qBAkBa,mBAAmB;CAAG"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AgentExamplesModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const agent_1 = require("@loopstack/agent");
12
+ const claude_module_1 = require("@loopstack/claude-module");
13
+ const code_agent_1 = require("@loopstack/code-agent");
14
+ const common_2 = require("@loopstack/common");
15
+ const mcp_module_1 = require("@loopstack/mcp-module");
16
+ const remote_client_1 = require("@loopstack/remote-client");
17
+ const calculator_tool_1 = require("./tools/calculator.tool");
18
+ const weather_lookup_tool_1 = require("./tools/weather-lookup.tool");
19
+ const agent_example_workflow_1 = require("./workflows/agent/agent-example.workflow");
20
+ const code_agent_example_workflow_1 = require("./workflows/code-agent/code-agent-example.workflow");
21
+ const custom_agent_example_workflow_1 = require("./workflows/custom-agent/custom-agent-example.workflow");
22
+ const mcp_linear_example_workflow_1 = require("./workflows/mcp-linear/mcp-linear-example.workflow");
23
+ const WORKFLOWS = [
24
+ agent_example_workflow_1.AgentExampleWorkflow,
25
+ code_agent_example_workflow_1.CodeAgentExampleWorkflow,
26
+ mcp_linear_example_workflow_1.McpLinearExampleWorkflow,
27
+ custom_agent_example_workflow_1.CustomAgentExampleWorkflow,
28
+ ];
29
+ let AgentExamplesModule = class AgentExamplesModule {
30
+ };
31
+ exports.AgentExamplesModule = AgentExamplesModule;
32
+ exports.AgentExamplesModule = AgentExamplesModule = __decorate([
33
+ (0, common_2.StudioApp)({
34
+ title: 'Agent Examples',
35
+ workflows: WORKFLOWS,
36
+ }),
37
+ (0, common_1.Module)({
38
+ imports: [
39
+ agent_1.AgentModule,
40
+ code_agent_1.CodeAgentModule,
41
+ claude_module_1.ClaudeModule,
42
+ mcp_module_1.McpModule.forRoot({
43
+ allowedHosts: ['mcp.linear.app'],
44
+ hostHeaderEnv: { 'mcp.linear.app': { Authorization: 'LINEAR_MCP_TOKEN' } },
45
+ }),
46
+ remote_client_1.RemoteClientModule.forFeature({ slots: [{ id: 'sandbox', type: 'sandbox', title: 'Sandbox' }] }),
47
+ ],
48
+ providers: [calculator_tool_1.CalculatorTool, weather_lookup_tool_1.WeatherLookupTool, ...WORKFLOWS],
49
+ exports: WORKFLOWS,
50
+ })
51
+ ], AgentExamplesModule);
52
+ //# sourceMappingURL=agent-examples.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-examples.module.js","sourceRoot":"","sources":["../src/agent-examples.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,4CAA+C;AAC/C,4DAAwD;AACxD,sDAAwD;AACxD,8CAA8C;AAC9C,sDAAkD;AAClD,4DAA8D;AAC9D,6DAAyD;AACzD,qEAAgE;AAChE,qFAAgF;AAChF,oGAA8F;AAC9F,0GAAoG;AACpG,oGAA8F;AAE9F,MAAM,SAAS,GAAG;IAChB,6CAAoB;IACpB,sDAAwB;IACxB,sDAAwB;IACxB,0DAA0B;CAC3B,CAAC;AAoBK,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAlB/B,IAAA,kBAAS,EAAC;QACT,KAAK,EAAE,gBAAgB;QACvB,SAAS,EAAE,SAAS;KACrB,CAAC;IACD,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,mBAAW;YACX,4BAAe;YACf,4BAAY;YACZ,sBAAS,CAAC,OAAO,CAAC;gBAChB,YAAY,EAAE,CAAC,gBAAgB,CAAC;gBAChC,aAAa,EAAE,EAAE,gBAAgB,EAAE,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE;aAC3E,CAAC;YACF,kCAAkB,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;SACjG;QACD,SAAS,EAAE,CAAC,gCAAc,EAAE,uCAAiB,EAAE,GAAG,SAAS,CAAC;QAC5D,OAAO,EAAE,SAAS;KACnB,CAAC;GACW,mBAAmB,CAAG"}
@@ -0,0 +1,6 @@
1
+ export * from './agent-examples.module';
2
+ export * from './workflows/agent/agent-example.workflow';
3
+ export * from './workflows/code-agent/code-agent-example.workflow';
4
+ export * from './workflows/mcp-linear/mcp-linear-example.workflow';
5
+ export * from './workflows/custom-agent/custom-agent-example.workflow';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,oDAAoD,CAAC;AACnE,cAAc,wDAAwD,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./agent-examples.module"), exports);
18
+ __exportStar(require("./workflows/agent/agent-example.workflow"), exports);
19
+ __exportStar(require("./workflows/code-agent/code-agent-example.workflow"), exports);
20
+ __exportStar(require("./workflows/mcp-linear/mcp-linear-example.workflow"), exports);
21
+ __exportStar(require("./workflows/custom-agent/custom-agent-example.workflow"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,2EAAyD;AACzD,qFAAmE;AACnE,qFAAmE;AACnE,yFAAuE"}
@@ -0,0 +1,15 @@
1
+ import { BaseTool, ToolEnvelope } from '@loopstack/common';
2
+ import type { RunContext } from '@loopstack/common';
3
+ export type CalculatorResult = string;
4
+ export declare class CalculatorTool extends BaseTool<{
5
+ operation: string;
6
+ a: number;
7
+ b: number;
8
+ }, object, CalculatorResult> {
9
+ protected handle(args: {
10
+ operation: string;
11
+ a: number;
12
+ b: number;
13
+ }, _ctx: RunContext): Promise<ToolEnvelope<CalculatorResult>>;
14
+ }
15
+ //# sourceMappingURL=calculator.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculator.tool.d.ts","sourceRoot":"","sources":["../../src/tools/calculator.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAQ,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC,qBASa,cAAe,SAAQ,QAAQ,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,gBAAgB,CAAC;cACjG,MAAM,CACpB,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EACjD,IAAI,EAAE,UAAU,GACf,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;CA2B3C"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.CalculatorTool = void 0;
10
+ const zod_1 = require("zod");
11
+ const common_1 = require("@loopstack/common");
12
+ let CalculatorTool = class CalculatorTool extends common_1.BaseTool {
13
+ async handle(args, _ctx) {
14
+ let result;
15
+ switch (args.operation) {
16
+ case 'add':
17
+ result = args.a + args.b;
18
+ break;
19
+ case 'subtract':
20
+ result = args.a - args.b;
21
+ break;
22
+ case 'multiply':
23
+ result = args.a * args.b;
24
+ break;
25
+ case 'divide':
26
+ if (args.b === 0) {
27
+ return { data: 'Error: Division by zero', error: 'Cannot divide by zero' };
28
+ }
29
+ result = args.a / args.b;
30
+ break;
31
+ default:
32
+ return { data: `Unknown operation: ${args.operation}`, error: 'Unsupported operation' };
33
+ }
34
+ return {
35
+ data: `${args.a} ${args.operation} ${args.b} = ${result}`,
36
+ };
37
+ }
38
+ };
39
+ exports.CalculatorTool = CalculatorTool;
40
+ exports.CalculatorTool = CalculatorTool = __decorate([
41
+ (0, common_1.Tool)({
42
+ name: 'calculator',
43
+ description: 'Perform a basic arithmetic calculation. Supports add, subtract, multiply, divide.',
44
+ schema: zod_1.z.object({
45
+ operation: zod_1.z.enum(['add', 'subtract', 'multiply', 'divide']).describe('The arithmetic operation.'),
46
+ a: zod_1.z.number().describe('First operand.'),
47
+ b: zod_1.z.number().describe('Second operand.'),
48
+ }),
49
+ })
50
+ ], CalculatorTool);
51
+ //# sourceMappingURL=calculator.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculator.tool.js","sourceRoot":"","sources":["../../src/tools/calculator.tool.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAAiE;AAc1D,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,iBAA+E;IACvG,KAAK,CAAC,MAAM,CACpB,IAAiD,EACjD,IAAgB;QAEhB,IAAI,MAAc,CAAC;QAEnB,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;YACvB,KAAK,KAAK;gBACR,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;gBACzB,MAAM;YACR,KAAK,UAAU;gBACb,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;gBACzB,MAAM;YACR,KAAK,UAAU;gBACb,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;gBACzB,MAAM;YACR,KAAK,QAAQ;gBACX,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;oBACjB,OAAO,EAAE,IAAI,EAAE,yBAAyB,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC;gBAC7E,CAAC;gBACD,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;gBACzB,MAAM;YACR;gBACE,OAAO,EAAE,IAAI,EAAE,sBAAsB,IAAI,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC;QAC5F,CAAC;QAED,OAAO;YACL,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,MAAM,MAAM,EAAE;SAC1D,CAAC;IACJ,CAAC;CACF,CAAA;AA/BY,wCAAc;yBAAd,cAAc;IAT1B,IAAA,aAAI,EAAC;QACJ,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,mFAAmF;QAChG,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,SAAS,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,2BAA2B,CAAC;YAClG,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YACxC,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;SAC1C,CAAC;KACH,CAAC;GACW,cAAc,CA+B1B"}
@@ -0,0 +1,3 @@
1
+ export * from './weather-lookup.tool';
2
+ export * from './calculator.tool';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./weather-lookup.tool"), exports);
18
+ __exportStar(require("./calculator.tool"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,oDAAkC"}
@@ -0,0 +1,10 @@
1
+ import { BaseTool, ToolEnvelope } from '@loopstack/common';
2
+ export type WeatherLookupResult = string;
3
+ export declare class WeatherLookupTool extends BaseTool<{
4
+ city: string;
5
+ }, object, WeatherLookupResult> {
6
+ protected handle(args: {
7
+ city: string;
8
+ }): Promise<ToolEnvelope<WeatherLookupResult>>;
9
+ }
10
+ //# sourceMappingURL=weather-lookup.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weather-lookup.tool.d.ts","sourceRoot":"","sources":["../../src/tools/weather-lookup.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAQ,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,qBAOa,iBAAkB,SAAQ,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,mBAAmB,CAAC;cAC5E,MAAM,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;CAe3F"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.WeatherLookupTool = void 0;
10
+ const zod_1 = require("zod");
11
+ const common_1 = require("@loopstack/common");
12
+ let WeatherLookupTool = class WeatherLookupTool extends common_1.BaseTool {
13
+ async handle(args) {
14
+ const forecasts = {
15
+ london: '14°C, cloudy with light rain',
16
+ tokyo: '22°C, sunny with clear skies',
17
+ 'new york': '18°C, partly cloudy',
18
+ };
19
+ const key = args.city.toLowerCase();
20
+ const weather = forecasts[key] ?? `21°C, pleasant conditions`;
21
+ return Promise.resolve({
22
+ data: `Weather in ${args.city}: ${weather}`,
23
+ });
24
+ }
25
+ };
26
+ exports.WeatherLookupTool = WeatherLookupTool;
27
+ exports.WeatherLookupTool = WeatherLookupTool = __decorate([
28
+ (0, common_1.Tool)({
29
+ name: 'weather_lookup',
30
+ description: 'Look up the current weather for a given city. Returns a simulated forecast.',
31
+ schema: zod_1.z.object({
32
+ city: zod_1.z.string().describe('The city name to look up weather for.'),
33
+ }),
34
+ })
35
+ ], WeatherLookupTool);
36
+ //# sourceMappingURL=weather-lookup.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weather-lookup.tool.js","sourceRoot":"","sources":["../../src/tools/weather-lookup.tool.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAAiE;AAW1D,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,iBAAuD;IAClF,KAAK,CAAC,MAAM,CAAC,IAAsB;QAE3C,MAAM,SAAS,GAA2B;YACxC,MAAM,EAAE,8BAA8B;YACtC,KAAK,EAAE,8BAA8B;YACrC,UAAU,EAAE,qBAAqB;SAClC,CAAC;QAEF,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,2BAA2B,CAAC;QAE9D,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,IAAI,EAAE,cAAc,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;SAC5C,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAhBY,8CAAiB;4BAAjB,iBAAiB;IAP7B,IAAA,aAAI,EAAC;QACJ,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,6EAA6E;QAC1F,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;SACnE,CAAC;KACH,CAAC;GACW,iBAAiB,CAgB7B"}
@@ -0,0 +1,9 @@
1
+ import { type AgentResult, AgentWorkflow } from '@loopstack/agent';
2
+ import { BaseWorkflow, type TransitionInput } from '@loopstack/common';
3
+ export declare class AgentExampleWorkflow extends BaseWorkflow {
4
+ private readonly agentWorkflow;
5
+ constructor(agentWorkflow: AgentWorkflow);
6
+ start(): Promise<void>;
7
+ agentComplete(_state: Record<string, unknown>, input: TransitionInput<AgentResult>): Promise<void>;
8
+ }
9
+ //# sourceMappingURL=agent-example.workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-example.workflow.d.ts","sourceRoot":"","sources":["../../../src/workflows/agent/agent-example.workflow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAqB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,YAAY,EAAc,KAAK,eAAe,EAAY,MAAM,mBAAmB,CAAC;AAG7F,qBAKa,oBAAqB,SAAQ,YAAY;IACxC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAKnD,KAAK;IAiBL,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,WAAW,CAAC;CAMzF"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AgentExampleWorkflow = void 0;
13
+ const node_path_1 = require("node:path");
14
+ const agent_1 = require("@loopstack/agent");
15
+ const common_1 = require("@loopstack/common");
16
+ const llm_provider_module_1 = require("@loopstack/llm-provider-module");
17
+ let AgentExampleWorkflow = class AgentExampleWorkflow extends common_1.BaseWorkflow {
18
+ agentWorkflow;
19
+ constructor(agentWorkflow) {
20
+ super();
21
+ this.agentWorkflow = agentWorkflow;
22
+ }
23
+ async start() {
24
+ await this.agentWorkflow.run({
25
+ system: this.render((0, node_path_1.join)(__dirname, 'templates', 'system.md')),
26
+ tools: ['weather_lookup', 'calculator'],
27
+ userMessage: "What's the weather in Tokyo? Also, what is 42 * 17?",
28
+ }, { callback: { transition: 'agentComplete' }, show: 'inline', label: 'Subagent' });
29
+ }
30
+ async agentComplete(_state, input) {
31
+ await this.documentStore.save(llm_provider_module_1.LlmMessageDocument, {
32
+ role: 'assistant',
33
+ text: input.data.response,
34
+ });
35
+ }
36
+ };
37
+ exports.AgentExampleWorkflow = AgentExampleWorkflow;
38
+ __decorate([
39
+ (0, common_1.Transition)({ to: 'running' }),
40
+ __metadata("design:type", Function),
41
+ __metadata("design:paramtypes", []),
42
+ __metadata("design:returntype", Promise)
43
+ ], AgentExampleWorkflow.prototype, "start", null);
44
+ __decorate([
45
+ (0, common_1.Transition)({
46
+ from: 'running',
47
+ to: 'end',
48
+ wait: true,
49
+ schema: agent_1.AgentResultSchema,
50
+ }),
51
+ __metadata("design:type", Function),
52
+ __metadata("design:paramtypes", [Object, Object]),
53
+ __metadata("design:returntype", Promise)
54
+ ], AgentExampleWorkflow.prototype, "agentComplete", null);
55
+ exports.AgentExampleWorkflow = AgentExampleWorkflow = __decorate([
56
+ (0, common_1.Workflow)({
57
+ title: 'Agent - Basic Agent Example',
58
+ description: 'Launches a generic AgentWorkflow as a sub-workflow with weather and calculator tools. Recommended starting point.',
59
+ }),
60
+ __metadata("design:paramtypes", [agent_1.AgentWorkflow])
61
+ ], AgentExampleWorkflow);
62
+ //# sourceMappingURL=agent-example.workflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-example.workflow.js","sourceRoot":"","sources":["../../../src/workflows/agent/agent-example.workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAiC;AACjC,4CAAsF;AACtF,8CAA6F;AAC7F,wEAAoE;AAO7D,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,qBAAY;IACvB;IAA7B,YAA6B,aAA4B;QACvD,KAAK,EAAE,CAAC;QADmB,kBAAa,GAAb,aAAa,CAAe;IAEzD,CAAC;IAGK,AAAN,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAC1B;YACE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;YAC9D,KAAK,EAAE,CAAC,gBAAgB,EAAE,YAAY,CAAC;YACvC,WAAW,EAAE,qDAAqD;SACnE,EACD,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,CACjF,CAAC;IACJ,CAAC;IAQK,AAAN,KAAK,CAAC,aAAa,CAAC,MAA+B,EAAE,KAAmC;QACtF,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,wCAAkB,EAAE;YAChD,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ;SAC1B,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA7BY,oDAAoB;AAMzB;IADL,IAAA,mBAAU,EAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC;;;;iDAU7B;AAQK;IANL,IAAA,mBAAU,EAAC;QACV,IAAI,EAAE,SAAS;QACf,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,yBAAiB;KAC1B,CAAC;;;;yDAMD;+BA5BU,oBAAoB;IALhC,IAAA,iBAAQ,EAAC;QACR,KAAK,EAAE,6BAA6B;QACpC,WAAW,EACT,mHAAmH;KACtH,CAAC;qCAE4C,qBAAa;GAD9C,oBAAoB,CA6BhC"}
@@ -0,0 +1,4 @@
1
+ You are a helpful assistant with access to a weather lookup tool and a calculator.
2
+ When the user asks about weather, use the weatherLookup tool.
3
+ When the user asks for calculations, use the calculator tool.
4
+ Provide a concise, helpful response summarizing the results.
@@ -0,0 +1,12 @@
1
+ import { type AgentResult, AgentWorkflow } from '@loopstack/agent';
2
+ import { BaseWorkflow, type TransitionInput } from '@loopstack/common';
3
+ import { EnvironmentService } from '@loopstack/remote-client';
4
+ export declare class CodeAgentExampleWorkflow extends BaseWorkflow {
5
+ private readonly agentWorkflow;
6
+ private readonly environments;
7
+ constructor(agentWorkflow: AgentWorkflow, environments: EnvironmentService);
8
+ verifyEnvironment(_state: Record<string, unknown>): Promise<void>;
9
+ startExploration(_state: Record<string, unknown>): Promise<void>;
10
+ exploreComplete(_state: Record<string, unknown>, input: TransitionInput<AgentResult>): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=code-agent-example.workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-agent-example.workflow.d.ts","sourceRoot":"","sources":["../../../src/workflows/code-agent/code-agent-example.workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAqB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,YAAY,EAA+B,KAAK,eAAe,EAAY,MAAM,mBAAmB,CAAC;AAC9G,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAY9D,qBAIa,wBAAyB,SAAQ,YAAY;IAEtD,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,kBAAkB;IAM7C,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAKjD,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAiBhD,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,WAAW,CAAC;CAM3F"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CodeAgentExampleWorkflow = void 0;
13
+ const agent_1 = require("@loopstack/agent");
14
+ const common_1 = require("@loopstack/common");
15
+ const remote_client_1 = require("@loopstack/remote-client");
16
+ const EXPLORE_INSTRUCTIONS = `Find the entry-point module of this project and list the
17
+ top-level providers it registers. Return a short bulleted summary.`;
18
+ let CodeAgentExampleWorkflow = class CodeAgentExampleWorkflow extends common_1.BaseWorkflow {
19
+ agentWorkflow;
20
+ environments;
21
+ constructor(agentWorkflow, environments) {
22
+ super();
23
+ this.agentWorkflow = agentWorkflow;
24
+ this.environments = environments;
25
+ }
26
+ async verifyEnvironment(_state) {
27
+ await this.environments.assertReachable('sandbox');
28
+ }
29
+ async startExploration(_state) {
30
+ await this.agentWorkflow.run({
31
+ system: 'You are a codebase exploration agent. Search and read source code to answer the question thoroughly.',
32
+ tools: ['glob', 'grep', 'read'],
33
+ userMessage: EXPLORE_INSTRUCTIONS,
34
+ }, { callback: { transition: 'exploreComplete' }, show: 'inline', label: 'Exploring codebase...' });
35
+ }
36
+ async exploreComplete(_state, input) {
37
+ await this.documentStore.save(common_1.MessageDocument, {
38
+ role: 'assistant',
39
+ text: input.data.response,
40
+ });
41
+ }
42
+ };
43
+ exports.CodeAgentExampleWorkflow = CodeAgentExampleWorkflow;
44
+ __decorate([
45
+ (0, common_1.Transition)({ to: 'verified' }),
46
+ __metadata("design:type", Function),
47
+ __metadata("design:paramtypes", [Object]),
48
+ __metadata("design:returntype", Promise)
49
+ ], CodeAgentExampleWorkflow.prototype, "verifyEnvironment", null);
50
+ __decorate([
51
+ (0, common_1.Transition)({ from: 'verified', to: 'exploring' }),
52
+ __metadata("design:type", Function),
53
+ __metadata("design:paramtypes", [Object]),
54
+ __metadata("design:returntype", Promise)
55
+ ], CodeAgentExampleWorkflow.prototype, "startExploration", null);
56
+ __decorate([
57
+ (0, common_1.Transition)({
58
+ from: 'exploring',
59
+ to: 'end',
60
+ wait: true,
61
+ schema: agent_1.AgentResultSchema,
62
+ }),
63
+ __metadata("design:type", Function),
64
+ __metadata("design:paramtypes", [Object, Object]),
65
+ __metadata("design:returntype", Promise)
66
+ ], CodeAgentExampleWorkflow.prototype, "exploreComplete", null);
67
+ exports.CodeAgentExampleWorkflow = CodeAgentExampleWorkflow = __decorate([
68
+ (0, common_1.Workflow)({
69
+ title: 'Agent - Code Agent Example',
70
+ description: 'Launches AgentWorkflow as a codebase-exploration agent with glob, grep, and read tools.',
71
+ }),
72
+ __metadata("design:paramtypes", [agent_1.AgentWorkflow,
73
+ remote_client_1.EnvironmentService])
74
+ ], CodeAgentExampleWorkflow);
75
+ //# sourceMappingURL=code-agent-example.workflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-agent-example.workflow.js","sourceRoot":"","sources":["../../../src/workflows/code-agent/code-agent-example.workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAsF;AACtF,8CAA8G;AAC9G,4DAA8D;AAE9D,MAAM,oBAAoB,GAAG;mEACsC,CAAC;AAa7D,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,qBAAY;IAErC;IACA;IAFnB,YACmB,aAA4B,EAC5B,YAAgC;QAEjD,KAAK,EAAE,CAAC;QAHS,kBAAa,GAAb,aAAa,CAAe;QAC5B,iBAAY,GAAZ,YAAY,CAAoB;IAGnD,CAAC;IAGK,AAAN,KAAK,CAAC,iBAAiB,CAAC,MAA+B;QACrD,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;IAGK,AAAN,KAAK,CAAC,gBAAgB,CAAC,MAA+B;QACpD,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAC1B;YACE,MAAM,EAAE,sGAAsG;YAC9G,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;YAC/B,WAAW,EAAE,oBAAoB;SAClC,EACD,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAChG,CAAC;IACJ,CAAC;IAQK,AAAN,KAAK,CAAC,eAAe,CAAC,MAA+B,EAAE,KAAmC;QACxF,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,wBAAe,EAAE;YAC7C,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ;SAC1B,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AArCY,4DAAwB;AAS7B;IADL,IAAA,mBAAU,EAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC;;;;iEAG9B;AAGK;IADL,IAAA,mBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC;;;;gEAUjD;AAQK;IANL,IAAA,mBAAU,EAAC;QACV,IAAI,EAAE,WAAW;QACjB,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,yBAAiB;KAC1B,CAAC;;;;+DAMD;mCApCU,wBAAwB;IAJpC,IAAA,iBAAQ,EAAC;QACR,KAAK,EAAE,4BAA4B;QACnC,WAAW,EAAE,yFAAyF;KACvG,CAAC;qCAGkC,qBAAa;QACd,kCAAkB;GAHxC,wBAAwB,CAqCpC"}