@agenticprimitives/intent-resolver 0.0.0-alpha.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Agentic Trust Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # @agenticprimitives/intent-resolver
2
+
3
+ > **Status: STUB / SKELETON** (Wave 0.5 of the W1 implementation wave). W1 ships types + `PassThroughResolver` only; the full resolver engine lands in W2 per the [w1 implementation wave plan](../../docs/architecture/w1-implementation-wave-plan.md).
4
+
5
+ Between "what a user said" and "what the system can match" sits resolution: turning an opaque expressed intent into a normalized canonical order. ERC-7683 made the resolver a named role in cross-chain intents; Anoma made it the heart of its architecture. Both treat resolution as separate from matchmaking — and so do we, because the resolver is where AI enters the trust chain. When a model infers a constraint a user never typed, that inference needs provenance: which model, which prompt, what confidence, and whether the user confirmed it. In this substrate that provenance is a typed `ResolutionReceipt`, and resolution happens under the same canonical identity, delegation, and audit trail as everything else the agent does.
6
+
7
+ This package is the designed Layer 4 of that spine — interface reserved now, engine landing in W2 — so the resolver grows in its own bounded home instead of being bolted onto the marketplace later.
8
+
9
+ Part of [agenticprimitives](../../README.md) — the trust substrate for the agent economy: one canonical Smart Agent identity with custody, delegation, naming, credentials, and audit evidence designed as one system.
10
+
11
+ ## What ships today
12
+
13
+ The complete W1 surface is three exports:
14
+
15
+ - **`IIntentResolver`** — `resolve(intent): Promise<ResolvedOrder | null>`. The stable contract every future resolver implements.
16
+ - **`ResolvedOrder`** — `resolvedFromIntentId` + `canonicalConstraints` + `expandedAssumptions` + `validationRequirements`, with an optional `erc7683Order` slot reserved for cross-chain interop.
17
+ - **`PassThroughResolver`** — the deterministic W1 implementation: returns the intent's existing `ConstraintSet` / `AssumptionSet` unchanged. No LLM, no normalization, no surprises.
18
+
19
+ ```ts
20
+ import { PassThroughResolver } from '@agenticprimitives/intent-resolver';
21
+
22
+ const resolver = new PassThroughResolver();
23
+ const order = await resolver.resolve(intent); // constraints pass through unchanged
24
+ ```
25
+
26
+ ## What lands in W2 (designed, not shipped)
27
+
28
+ Constraint normalization (colloquial scope → canonical codes), credential-requirement expansion, LLM-driven resolution with full `ResolutionReceipt` provenance (RR-INV-01..05 — every resolution produces a receipt, and inferred constraints cannot bind without user confirmation), and ERC-7683 order emission. Per-domain resolvers live in apps or W2+ resolver packages, never here.
29
+
30
+ ## Where this is heading / market context
31
+
32
+ - **ERC-7683** defines the resolver-assumption pattern for cross-chain orders; this package follows its resolver/matchmaker separation and targets its order shape for interop.
33
+ - **Anoma** treats intent resolution as constraint solving; the `ConstraintSet` types this resolver consumes (from [`intent-marketplace`](../intent-marketplace)) are CSP-shaped for the same reason.
34
+ - **x402 / Google AP2** machine-payment rails make the stakes concrete: a resolved order can bind a payment mandate, so the resolution step must be attributable and auditable under the same identity substrate as the spend it triggers. That is the combination — resolution with receipts, inside one delegation + custody + audit chain — that stitched stacks do not offer.
35
+
36
+ **Authoritative spec:** [spec 239 — intent spine, §4.5](../../specs/239-intent-spine.md) (see [`spec.md`](./spec.md)). Owns spine layer 4 (skeleton); bounded surface in `CLAUDE.md` and `capability.manifest.json`.
37
+
38
+ ## Build
39
+
40
+ ```bash
41
+ pnpm --filter @agenticprimitives/intent-resolver typecheck
42
+ pnpm --filter @agenticprimitives/intent-resolver test
43
+ pnpm --filter @agenticprimitives/intent-resolver build
44
+ ```
45
+
46
+ ## Status — honest version
47
+
48
+ STUB / SKELETON. `PassThroughResolver` is the only implementation and it is intentionally trivial. Everything in "What lands in W2" is a spec'd commitment, not shipped capability. Wave sequencing: [w1-implementation-wave-plan.md](../../docs/architecture/w1-implementation-wave-plan.md). Repo-wide security findings: [`docs/audits/findings.yaml`](../../docs/audits/findings.yaml).
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @agenticprimitives/intent-resolver — Resolver layer SKELETON (W1).
3
+ *
4
+ * W1 scope: types + PassThroughResolver only. Full resolver engine in W2.
5
+ *
6
+ * Authoritative spec: specs/239-intent-spine.md §4.5
7
+ */
8
+ export declare const PACKAGE_NAME = "@agenticprimitives/intent-resolver";
9
+ export declare const PACKAGE_STATUS: "w1-skeleton";
10
+ export declare const SPEC_REF = "specs/239-intent-spine.md";
11
+ export interface IIntentResolver<TIntent = unknown, TResolved = unknown> {
12
+ resolve(intent: TIntent): Promise<TResolved | null>;
13
+ }
14
+ export interface ResolvedOrder<TIntent = unknown> {
15
+ resolvedFromIntentId: string;
16
+ canonicalConstraints: unknown;
17
+ expandedAssumptions: unknown;
18
+ validationRequirements: string[];
19
+ erc7683Order?: unknown;
20
+ source: TIntent;
21
+ }
22
+ export declare class PassThroughResolver<TIntent extends {
23
+ id: string;
24
+ hasConstraintSet?: unknown;
25
+ hasAssumptionSet?: unknown;
26
+ }> implements IIntentResolver<TIntent, ResolvedOrder<TIntent>> {
27
+ resolve(intent: TIntent): Promise<ResolvedOrder<TIntent> | null>;
28
+ }
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,YAAY,uCAAuC,CAAC;AACjE,eAAO,MAAM,cAAc,EAAG,aAAsB,CAAC;AACrD,eAAO,MAAM,QAAQ,8BAA8B,CAAC;AAEpD,MAAM,WAAW,eAAe,CAAC,OAAO,GAAG,OAAO,EAAE,SAAS,GAAG,OAAO;IACrE,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,aAAa,CAAC,OAAO,GAAG,OAAO;IAC9C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,mBAAmB,CAC9B,OAAO,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAE,CACtF,YAAW,eAAe,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAErD,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;CASvE"}
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @agenticprimitives/intent-resolver — Resolver layer SKELETON (W1).
3
+ *
4
+ * W1 scope: types + PassThroughResolver only. Full resolver engine in W2.
5
+ *
6
+ * Authoritative spec: specs/239-intent-spine.md §4.5
7
+ */
8
+ export const PACKAGE_NAME = '@agenticprimitives/intent-resolver';
9
+ export const PACKAGE_STATUS = 'w1-skeleton';
10
+ export const SPEC_REF = 'specs/239-intent-spine.md';
11
+ export class PassThroughResolver {
12
+ async resolve(intent) {
13
+ return {
14
+ resolvedFromIntentId: intent.id,
15
+ canonicalConstraints: intent.hasConstraintSet ?? null,
16
+ expandedAssumptions: intent.hasAssumptionSet ?? null,
17
+ validationRequirements: [],
18
+ source: intent,
19
+ };
20
+ }
21
+ }
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,oCAAoC,CAAC;AACjE,MAAM,CAAC,MAAM,cAAc,GAAG,aAAsB,CAAC;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAG,2BAA2B,CAAC;AAepD,MAAM,OAAO,mBAAmB;IAI9B,KAAK,CAAC,OAAO,CAAC,MAAe;QAC3B,OAAO;YACL,oBAAoB,EAAE,MAAM,CAAC,EAAE;YAC/B,oBAAoB,EAAE,MAAM,CAAC,gBAAgB,IAAI,IAAI;YACrD,mBAAmB,EAAE,MAAM,CAAC,gBAAgB,IAAI,IAAI;YACpD,sBAAsB,EAAE,EAAE;YAC1B,MAAM,EAAE,MAAM;SACf,CAAC;IACJ,CAAC;CACF"}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@agenticprimitives/intent-resolver",
3
+ "version": "0.0.0-alpha.3",
4
+ "description": "Resolver layer skeleton (W1) — types + PassThroughResolver only. Full resolver engine deferred to W2.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/agentictrustlabs/agenticprimitives.git",
9
+ "directory": "packages/intent-resolver"
10
+ },
11
+ "homepage": "https://github.com/agentictrustlabs/agenticprimitives/tree/master/packages/intent-resolver",
12
+ "bugs": {
13
+ "url": "https://github.com/agentictrustlabs/agenticprimitives/issues"
14
+ },
15
+ "type": "module",
16
+ "main": "./dist/index.js",
17
+ "types": "./dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js"
22
+ }
23
+ },
24
+ "files": [
25
+ "LICENSE",
26
+ "dist",
27
+ "spec.md",
28
+ "README.md"
29
+ ],
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "devDependencies": {
34
+ "vitest": "^4.1.8",
35
+ "viem": "^2.52.2"
36
+ },
37
+ "keywords": [
38
+ "agentic",
39
+ "primitives",
40
+ "intent-resolver"
41
+ ],
42
+ "dependencies": {
43
+ "@noble/hashes": "^2.2.0",
44
+ "@agenticprimitives/types": "1.0.0-alpha.7",
45
+ "@agenticprimitives/verifiable-credentials": "0.0.0-alpha.3"
46
+ },
47
+ "scripts": {
48
+ "build": "tsc -p tsconfig.build.json",
49
+ "typecheck": "tsc -p tsconfig.json --noEmit",
50
+ "test": "vitest run",
51
+ "test:unit": "vitest run test/unit --passWithNoTests",
52
+ "test:watch": "vitest",
53
+ "clean": "rm -rf dist"
54
+ }
55
+ }
package/spec.md ADDED
@@ -0,0 +1,5 @@
1
+ # Spec pointer
2
+
3
+ Canonical spec: [`../../specs/239-*.md`](../../specs/)
4
+
5
+ Owning layers (per [coordination-substrate.md](../../docs/architecture/coordination-substrate.md)): layer-4-skeleton.