@agentic-surfaces/core 0.1.6 → 0.1.8

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.
@@ -4,13 +4,21 @@ export const agentHandler = {
4
4
  const cfg = node.config;
5
5
  const defaults = ctx.services.agentDefaults ?? {};
6
6
  const model = cfg.model ?? defaults.model;
7
+ const effort = cfg.effort ?? defaults.effort; // per-node wins, else project default
7
8
  const mcpServers = cfg.mcpServers ?? defaults.mcpServers;
8
9
  const result = await ctx.services.agent.run({
9
10
  prompt: cfg.prompt,
10
11
  model,
12
+ effort,
11
13
  mcpServers,
12
14
  context: Object.fromEntries(ctx.outputs),
15
+ decisionSchema: cfg.decision,
13
16
  });
17
+ // With a decision schema, surface the decision's fields at the top level so
18
+ // jsonata (e.g. task.branch `interpret.action`) can route on them; keep .text.
19
+ if (cfg.decision && result.data && typeof result.data === "object" && !Array.isArray(result.data)) {
20
+ return { output: { ...result.data, text: result.text } };
21
+ }
14
22
  return { output: result };
15
23
  },
16
24
  };
@@ -4,6 +4,13 @@ declare const ProjectConfigSchema: z.ZodObject<{
4
4
  agent: z.ZodDefault<z.ZodObject<{
5
5
  runner: z.ZodDefault<z.ZodString>;
6
6
  model: z.ZodDefault<z.ZodString>;
7
+ effort: z.ZodOptional<z.ZodEnum<{
8
+ low: "low";
9
+ medium: "medium";
10
+ high: "high";
11
+ xhigh: "xhigh";
12
+ max: "max";
13
+ }>>;
7
14
  mcpServers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
8
15
  name: z.ZodString;
9
16
  url: z.ZodString;
@@ -14,6 +14,7 @@ const ProjectConfigSchema = z.object({
14
14
  .object({
15
15
  runner: z.string().default("claude"),
16
16
  model: z.string().default("claude-opus-4-8"),
17
+ effort: z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
17
18
  mcpServers: z.array(McpServerRefSchema).optional(),
18
19
  })
19
20
  .default({ runner: "claude", model: "claude-opus-4-8" }),
package/dist/types.d.ts CHANGED
@@ -41,6 +41,7 @@ export interface Services {
41
41
  dryRun?: boolean;
42
42
  agentDefaults?: {
43
43
  model?: string;
44
+ effort?: "low" | "medium" | "high" | "xhigh" | "max";
44
45
  runner?: string;
45
46
  mcpServers?: McpServerRef[];
46
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentic-surfaces/core",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -23,7 +23,7 @@
23
23
  "jsonata": "^2.2.1",
24
24
  "yaml": "^2.9.0",
25
25
  "zod": "^4.4.3",
26
- "@agentic-surfaces/agent": "0.1.6"
26
+ "@agentic-surfaces/agent": "0.1.8"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/better-sqlite3": "^7.6.13",