agentfootprint 14.3.0 → 14.4.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/README.md +4 -3
- package/dist/core/Agent.js +2 -6
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/agent/aroundTurn/funnel.js +24 -9
- package/dist/core/agent/aroundTurn/funnel.js.map +1 -1
- package/dist/core/runnerExecution.js +31 -2
- package/dist/core/runnerExecution.js.map +1 -1
- package/dist/esm/core/Agent.js +3 -7
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/agent/aroundTurn/funnel.d.ts +13 -2
- package/dist/esm/core/agent/aroundTurn/funnel.js +24 -9
- package/dist/esm/core/agent/aroundTurn/funnel.js.map +1 -1
- package/dist/esm/core/agent/aroundTurn/types.d.ts +11 -0
- package/dist/esm/core/runnerExecution.d.ts +13 -0
- package/dist/esm/core/runnerExecution.js +29 -1
- package/dist/esm/core/runnerExecution.js.map +1 -1
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/agent/aroundTurn/funnel.d.ts +13 -2
- package/dist/types/core/agent/aroundTurn/funnel.d.ts.map +1 -1
- package/dist/types/core/agent/aroundTurn/types.d.ts +11 -0
- package/dist/types/core/agent/aroundTurn/types.d.ts.map +1 -1
- package/dist/types/core/runnerExecution.d.ts +13 -0
- package/dist/types/core/runnerExecution.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -110,9 +110,10 @@ exclusive capabilities or measured superiority in answer accuracy.
|
|
|
110
110
|
npm install agentfootprint footprintjs
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
Agentfootprint 14
|
|
114
|
-
`^
|
|
115
|
-
|
|
113
|
+
Agentfootprint 14 works with FootprintJS 11 (from 11.1.0) and FootprintJS 12:
|
|
114
|
+
the peer range is `^11.1.0 || ^12.0.0`. It also needs Foottrace `^1.11.1`.
|
|
115
|
+
FootprintJS is a peer dependency, so install it explicitly as shown above.
|
|
116
|
+
These are stable release ranges.
|
|
116
117
|
|
|
117
118
|
```typescript
|
|
118
119
|
import { Agent, defineTool } from 'agentfootprint';
|
package/dist/core/Agent.js
CHANGED
|
@@ -1610,7 +1610,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
/** The funnel, for a new turn. Every top-level run enters here, inside its lease. */
|
|
1612
1612
|
runTurn(invocation, input, options, leg) {
|
|
1613
|
-
return (0, index_js_1.throughAroundTurn)(this.aroundTurnPort, { kind: 'run', input, options }, (changes) => leg((0, index_js_1.runInputWith)(input, options, changes)), (failure) => this.noteAroundTurnFailed(invocation, failure));
|
|
1613
|
+
return (0, index_js_1.throughAroundTurn)(this.aroundTurnPort, { kind: 'run', input, options }, (changes) => leg((0, index_js_1.runInputWith)(input, options, changes)), (legFailed) => (0, runnerExecution_js_1.finishLeg)(invocation.run, legFailed), (failure) => this.noteAroundTurnFailed(invocation, failure));
|
|
1614
1614
|
}
|
|
1615
1615
|
/** A wrapper failed after its run: the outcome stands, and the record says so. */
|
|
1616
1616
|
noteAroundTurnFailed(invocation, payload) {
|
|
@@ -1683,8 +1683,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1683
1683
|
// boundaries, which is the failure mode `recordRun` exists to prevent.
|
|
1684
1684
|
// Returns `undefined` (and touches nothing) unless the dial is on.
|
|
1685
1685
|
const recording = this.startRunRecording(invocation);
|
|
1686
|
-
// (helper used in the catch block below — module-private function
|
|
1687
|
-
// declared at file end via hoisting)
|
|
1688
1686
|
invocation.value.answeredAsk = undefined;
|
|
1689
1687
|
invocation.value.resumePassedTime = undefined;
|
|
1690
1688
|
const prepared = this.prepareAgentRun(invocation, engineOptions, runRequest);
|
|
@@ -1715,8 +1713,6 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
1715
1713
|
// Set here, beside the `try` whose `finally` clears it, so no exit path
|
|
1716
1714
|
// can leave it behind for a turn this `run()` did not start.
|
|
1717
1715
|
invocation.value.clockDraft = clockDraft;
|
|
1718
|
-
// Armed here, beside the `try` whose `finally` releases it: no refused
|
|
1719
|
-
// call above can leave a deadline running.
|
|
1720
1716
|
try {
|
|
1721
1717
|
const result = await invocation.execute({
|
|
1722
1718
|
kind: 'run',
|
|
@@ -2042,7 +2038,7 @@ class Agent extends RunnerBase_js_1.RunnerBase {
|
|
|
2042
2038
|
}
|
|
2043
2039
|
/** The funnel, for an answered pause. Inside the lease and `preservePendingQuestion`. */
|
|
2044
2040
|
resumeOwned(invocation, checkpoint, input, options) {
|
|
2045
|
-
return (0, index_js_1.throughAroundTurn)(this.aroundTurnPort, { kind: 'resume', checkpoint, answer: input, options }, () => this.resumeLeg(invocation, checkpoint, input, options), (failure) => this.noteAroundTurnFailed(invocation, failure));
|
|
2041
|
+
return (0, index_js_1.throughAroundTurn)(this.aroundTurnPort, { kind: 'resume', checkpoint, answer: input, options }, () => this.resumeLeg(invocation, checkpoint, input, options), (legFailed) => (0, runnerExecution_js_1.finishLeg)(invocation.run, legFailed), (failure) => this.noteAroundTurnFailed(invocation, failure));
|
|
2046
2042
|
}
|
|
2047
2043
|
async resumeLeg(invocation, checkpoint, input, options) {
|
|
2048
2044
|
// Taken up, before anything can refuse: from here every use of a consent
|