agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
56 lines • 4.03 kB
JavaScript
;
/**
* agentfootprint/maps — the mount kernel's vocabulary.
*
* An agent can be fed by more than one WALKABLE MAP: the skill map (which
* skill is active) today, an application's screen map (which page the person
* is on) next. Each map owns its own cursor and never surrenders it. What no
* map may own is the axis this door names: ENGAGEMENT — whether a map's
* contributions (prompt fragment, tools) ride the next model call at all.
*
* The kernel's law, in one sentence: an engagement founded on a guess (a
* regex, a classifier) is renewed only by concrete evidence — the map's own
* tool called, a declared route fired, the model asking by name — and
* without corroboration it is PARKED, its cursor untouched, until evidence
* re-engages it.
*
* Mount it with `Agent.create(...).skillGraph(map).maps()`. Everything here
* is plain data and pure functions, exported so a consumer can (a) type the
* `agentfootprint.map.*` event payloads it observes, (b) reason about or
* test the lease law directly, and (c) build honest values with `Claim<T>`.
*
* @example
* import { advanceEngagement } from 'agentfootprint/maps';
*
* const plan = { maps: [{ id: 'skill-map', memberIds: ['audit'], toolNames: ['get_zones'] }], renewalGrace: 3 };
* let state;
* // iteration 1: an entry regex placed the cursor — a lexical guess
* ({ next: state } = advanceEngagement(plan, state, {
* iteration: 1, currentNode: 'audit', moveBy: 'entry', witness: 'zone',
* toolResults: [], acceptedSkillPicks: [], servedLastPass: [],
* }));
* // iterations 2..4: the model works elsewhere; on the 4th pass the map parks
*
* The two per-pass feeds are the 9.59.0 shape and both matter: `acceptedSkillPicks`
* is THIS pass's accepted `read_skill` picks (turn-cumulative evidence renewed a
* guess forever), and `servedLastPass` is what actually reached the wire last pass
* (a contribution that never rode cannot have been ignored).
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.isTentative = exports.strongestOf = exports.strengthOfEvidence = exports.strengthOfMove = exports.renewalEvidenceOf = exports.advanceEngagement = exports.describeClaim = exports.valueOr = exports.isKnown = exports.notApplicable = exports.unknown = exports.known = void 0;
var claim_js_1 = require("../lib/claim/claim.js");
Object.defineProperty(exports, "known", { enumerable: true, get: function () { return claim_js_1.known; } });
Object.defineProperty(exports, "unknown", { enumerable: true, get: function () { return claim_js_1.unknown; } });
Object.defineProperty(exports, "notApplicable", { enumerable: true, get: function () { return claim_js_1.notApplicable; } });
Object.defineProperty(exports, "isKnown", { enumerable: true, get: function () { return claim_js_1.isKnown; } });
Object.defineProperty(exports, "valueOr", { enumerable: true, get: function () { return claim_js_1.valueOr; } });
Object.defineProperty(exports, "describeClaim", { enumerable: true, get: function () { return claim_js_1.describeClaim; } });
var lease_js_1 = require("../maps/engagement/lease.js");
Object.defineProperty(exports, "advanceEngagement", { enumerable: true, get: function () { return lease_js_1.advanceEngagement; } });
var evidence_js_1 = require("../maps/engagement/evidence.js");
Object.defineProperty(exports, "renewalEvidenceOf", { enumerable: true, get: function () { return evidence_js_1.renewalEvidenceOf; } });
Object.defineProperty(exports, "strengthOfMove", { enumerable: true, get: function () { return evidence_js_1.strengthOfMove; } });
Object.defineProperty(exports, "strengthOfEvidence", { enumerable: true, get: function () { return evidence_js_1.strengthOfEvidence; } });
Object.defineProperty(exports, "strongestOf", { enumerable: true, get: function () { return evidence_js_1.strongestOf; } });
Object.defineProperty(exports, "isTentative", { enumerable: true, get: function () { return evidence_js_1.isTentative; } });
//# sourceMappingURL=maps.js.map