polpo-ai 0.10.1 → 0.10.3
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/README.md +56 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -227,6 +227,62 @@ Agent-direct chat can target a loop explicitly:
|
|
|
227
227
|
|
|
228
228
|
At runtime, the selected project loop can narrow the effective prompt, tools, skills, model, reasoning, tool choice, and max turns per agent step. If a step omits `skills`, it inherits the agent-level `skills`. Project loop execution in chat completions uses the shared context graph: deterministic tool steps run first, store outputs in the context bag, and later agent steps receive that context as runtime data in their system prompt. Core keeps a compatibility normalizer for legacy inline `loops` + `pipeline` configs and ships a pure `PipelineExecutor` for sequential, tool, switch, parallel, and human nodes; hosts wire `runLoop`, `runTool`, and `handleHuman` callbacks to their concrete runtime.
|
|
229
229
|
|
|
230
|
+
Project loops also support governance fields:
|
|
231
|
+
|
|
232
|
+
```jsonc
|
|
233
|
+
{
|
|
234
|
+
"version": "1",
|
|
235
|
+
"kind": "graph",
|
|
236
|
+
"name": "governed-build",
|
|
237
|
+
"context": "shared",
|
|
238
|
+
"hooks": {
|
|
239
|
+
"loop:start": [
|
|
240
|
+
{ "tool": "unix_time", "saveAs": "timing.start" }
|
|
241
|
+
],
|
|
242
|
+
"tool:after": [
|
|
243
|
+
{ "tool": "audit_step", "input": { "level": "info" }, "saveAs": "audit.last", "onError": "continue" }
|
|
244
|
+
],
|
|
245
|
+
"loop:end": [
|
|
246
|
+
{ "tool": "unix_time", "saveAs": "timing.end" }
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
"policies": [
|
|
250
|
+
{
|
|
251
|
+
"id": "only-safe-tools",
|
|
252
|
+
"hook": "tool:before",
|
|
253
|
+
"effect": "allow",
|
|
254
|
+
"when": "tool.name == 'read' || tool.name == 'grep' || tool.name == 'unix_time'"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"id": "deny-shell",
|
|
258
|
+
"hook": "tool:before",
|
|
259
|
+
"effect": "deny",
|
|
260
|
+
"when": "tool.name == 'bash'",
|
|
261
|
+
"message": "bash requires an explicit build loop"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"start": "capture_start",
|
|
265
|
+
"steps": {
|
|
266
|
+
"capture_start": {
|
|
267
|
+
"type": "tool",
|
|
268
|
+
"tool": "unix_time",
|
|
269
|
+
"saveAs": "timing.start",
|
|
270
|
+
"next": "plan"
|
|
271
|
+
},
|
|
272
|
+
"plan": {
|
|
273
|
+
"type": "agent",
|
|
274
|
+
"systemPrompt": "Plan the work. Do not edit files.",
|
|
275
|
+
"tools": ["read", "grep"],
|
|
276
|
+
"next": "end"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Lifecycle hooks are deterministic tool actions run by the host runtime at `loop:start`, `step:before`, `model:before`, `tool:before`, `tool:after`, `step:after`, `loop:transition`, and `loop:end`. Hook `when` guards are evaluated against the shared context plus lifecycle payload such as `step.name`, `step.type`, `tool.name`, `tool.input`, and `transition.from/to`. Hook outputs are saved into the context bag with `saveAs`; `onError: "continue"` turns a failed hook into trace-only telemetry, while the default is fail-closed.
|
|
283
|
+
|
|
284
|
+
Policies are evaluated before hook actions at the same lifecycle point. `deny` fails the loop, `approval` fails with an explicit approval-required error until an approval queue is wired by the host, and `allow` policies form an allow-list for that lifecycle point when at least one exists. If an allow-list is present and no allow rule matches, the loop is blocked. Chat completions return `loop_trace` events for loop, step, transition, tool, hook, and human activity; streaming completions emit each trace incrementally.
|
|
285
|
+
|
|
230
286
|
## SDK
|
|
231
287
|
|
|
232
288
|
### Client SDK
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polpo-ai",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"description": "The open backend for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"nanoid": "^5.1.2",
|
|
67
67
|
"yaml": "^2.7.0",
|
|
68
68
|
"zod": "^4.3.6",
|
|
69
|
-
"@polpo-ai/core": "0.10.
|
|
70
|
-
"@polpo-ai/
|
|
71
|
-
"@polpo-ai/
|
|
72
|
-
"@polpo-ai/
|
|
69
|
+
"@polpo-ai/core": "0.10.3",
|
|
70
|
+
"@polpo-ai/vault-crypto": "0.10.3",
|
|
71
|
+
"@polpo-ai/llm": "0.10.3",
|
|
72
|
+
"@polpo-ai/server": "0.10.3"
|
|
73
73
|
},
|
|
74
74
|
"optionalDependencies": {
|
|
75
75
|
"better-sqlite3": "^12.6.2",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"nodemailer": "^8.0.1",
|
|
78
78
|
"playwright-core": "^1.52.0",
|
|
79
79
|
"postgres": "^3.4.0",
|
|
80
|
-
"@polpo-ai/drizzle": "0.10.
|
|
80
|
+
"@polpo-ai/drizzle": "0.10.3"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@types/better-sqlite3": "^7.6.13",
|