@indexnetwork/protocol 17.0.0-rc.479.1 → 18.0.0-rc.481.1
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/CHANGELOG.md +54 -0
- package/IMPLEMENTATION.md +46 -3
- package/STABILITY.md +5 -1
- package/dist/index.d.ts +2 -9
- package/dist/index.js +4 -6
- package/dist/intents/{application → graph}/intent.graph.d.ts +26 -26
- package/dist/intents/{application → graph}/intent.graph.execute.d.ts +1 -1
- package/dist/intents/{application → graph}/intent.graph.execute.js +1 -1
- package/dist/intents/{application → graph}/intent.graph.js +4 -4
- package/dist/intents/{application → graph}/intent.graph.reconcile.d.ts +2 -2
- package/dist/intents/{application → graph}/intent.graph.shared.d.ts +5 -5
- package/dist/intents/{application → graph}/intent.graph.shared.js +1 -1
- package/dist/intents/{domain/intent.state.d.ts → graph/intent.graph.state.d.ts} +3 -3
- package/dist/intents/{application/intent.clarifier.js → intent.clarifier.js} +5 -5
- package/dist/intents/{application/intent.indexer.js → intent.indexer.js} +4 -4
- package/dist/intents/{application/intent.inferrer.js → intent.inferrer.js} +4 -4
- package/dist/intents/intent.module.d.ts +633 -0
- package/dist/intents/intent.module.js +103 -0
- package/dist/intents/{domain/intent.proposal.d.ts → intent.proposal.d.ts} +2 -0
- package/dist/intents/{domain/intent.proposal.js → intent.proposal.js} +2 -0
- package/dist/intents/{application/intent.reconciler.js → intent.reconciler.js} +4 -4
- package/dist/intents/{application/intent.tools.d.ts → intent.tools.d.ts} +6 -3
- package/dist/intents/{application/intent.tools.js → intent.tools.js} +6 -7
- package/dist/intents/{application/intent.verifier.js → intent.verifier.js} +4 -4
- package/dist/networks/application/indexer.graph.d.ts +7 -7
- package/dist/networks/application/indexer.graph.js +2 -2
- package/dist/networks/ports/index.d.ts +4 -2
- package/dist/networks/ports/index.js +1 -5
- package/dist/opportunities/application/opportunity.graph.prep.js +3 -3
- package/dist/shared/agent/tool.factory.js +10 -6
- package/dist/shared/agent/tool.helpers.d.ts +2 -2
- package/dist/shared/agent/tool.registry.js +2 -2
- package/package.json +2 -2
- package/dist/intents/application/index.d.ts +0 -21
- package/dist/intents/application/index.js +0 -26
- package/dist/intents/domain/index.d.ts +0 -9
- package/dist/intents/domain/index.js +0 -11
- package/dist/intents/domain/signal.specificity.d.ts +0 -2
- package/dist/intents/domain/signal.specificity.js +0 -2
- package/dist/intents/index.d.ts +0 -18
- package/dist/intents/index.js +0 -14
- package/dist/intents/ports/index.d.ts +0 -15
- package/dist/intents/ports/index.js +0 -13
- package/dist/intents/ports/signals.tools.port.d.ts +0 -5
- package/dist/intents/ports/signals.tools.port.js +0 -1
- /package/dist/intents/{application → graph}/intent.graph.infer.d.ts +0 -0
- /package/dist/intents/{application → graph}/intent.graph.infer.js +0 -0
- /package/dist/intents/{application → graph}/intent.graph.reconcile.js +0 -0
- /package/dist/intents/{domain/intent.state.js → graph/intent.graph.state.js} +0 -0
- /package/dist/intents/{application → intake}/intake.orchestrator.d.ts +0 -0
- /package/dist/intents/{application → intake}/intake.orchestrator.js +0 -0
- /package/dist/intents/{application → intake}/intake.pack.generator.d.ts +0 -0
- /package/dist/intents/{application → intake}/intake.pack.generator.js +0 -0
- /package/dist/intents/{application/intent.clarifier.d.ts → intent.clarifier.d.ts} +0 -0
- /package/dist/intents/{application/intent.indexer.d.ts → intent.indexer.d.ts} +0 -0
- /package/dist/intents/{application/intent.inferrer.d.ts → intent.inferrer.d.ts} +0 -0
- /package/dist/intents/{application/intent.reconciler.d.ts → intent.reconciler.d.ts} +0 -0
- /package/dist/intents/{application/intent.verifier.d.ts → intent.verifier.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,60 @@ went 6.7.1 → 8.0.2 with no 7.x in between because the whole 7.x line shipped a
|
|
|
20
20
|
prereleases between the two promotions. To track every change, read `rc`; to
|
|
21
21
|
pin a supported release, use `latest`.
|
|
22
22
|
|
|
23
|
+
## 18.0.0 - 2026-08-17
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **BREAKING**: The `intents` capability now ships as a single class. `Intents`
|
|
28
|
+
replaces `IntentGraphFactory`, `SemanticVerifier`, `IntentIndexer`,
|
|
29
|
+
`SignalIntakePackGenerator`, `SignalIntakeOrchestrator`,
|
|
30
|
+
`normalizeIntentDescription`, and `FALLBACK_WHO_QUESTION`, all of which are
|
|
31
|
+
no longer exported. Dependencies move from positional constructor arguments
|
|
32
|
+
to a named `IntentsDeps` bag, and every field is optional — a host that wants
|
|
33
|
+
only the model-backed helpers can call `new Intents()`.
|
|
34
|
+
|
|
35
|
+
| Removed | Replacement |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `new IntentGraphFactory(db, embedder, queue, enqueue).createGraph()` | `new Intents({ database, embedder, queue, questionerEnqueue }).createGraph()` |
|
|
38
|
+
| `new SemanticVerifier().invoke(content, context)` | `new Intents().verifyIntent(content, context)` |
|
|
39
|
+
| `new IntentIndexer().invoke(...)` / `.evaluate(...)` | `new Intents().indexIntent(...)` |
|
|
40
|
+
| `new SignalIntakePackGenerator().generate(input)` | `new Intents().generateIntakePack(input)` |
|
|
41
|
+
| `new SignalIntakeOrchestrator().generateFollowUps(input)` | `new Intents().generateIntakeFollowUps(input)` |
|
|
42
|
+
| `new SignalIntakeOrchestrator().synthesize(input)` | `new Intents().synthesizeIntake(input)` |
|
|
43
|
+
| `normalizeIntentDescription(text)` | `Intents.normalizeDescription(text)` |
|
|
44
|
+
| `FALLBACK_WHO_QUESTION` | `Intents.FALLBACK_INTAKE_QUESTION` |
|
|
45
|
+
|
|
46
|
+
Collaborators are constructed on first use rather than in the constructor, so
|
|
47
|
+
an unused method costs nothing. `new Intents()` no longer touches the model
|
|
48
|
+
provider at all — code that relied on construction failing without
|
|
49
|
+
`OPENROUTER_API_KEY` now fails on the first call instead.
|
|
50
|
+
|
|
51
|
+
- **BREAKING**: `IntentNetworkGraphFactory`'s second argument is now an
|
|
52
|
+
`Intents` instance (anything with `indexIntent`) rather than an
|
|
53
|
+
`IntentIndexer`. Pass the same instance used for the intent graph.
|
|
54
|
+
|
|
55
|
+
- Reorganize `src/intents/` by function rather than by layer, with
|
|
56
|
+
`intent.module.ts` as the capability barrel in place of `index.ts`. Files are
|
|
57
|
+
named for what they do and sit flat (`intent.inferrer`, `intent.verifier`,
|
|
58
|
+
`intent.indexer`, …); only `graph/` and `intake/` — the two multi-file stages
|
|
59
|
+
— keep a directory. The layout is private; only `Intents` crosses the
|
|
60
|
+
boundary.
|
|
61
|
+
`IntentIndexerOutput`, `IntakePack*`, `Intake{Answer,Round}`, `FollowUpPlan*`,
|
|
62
|
+
`Synthesis*`, `IntentToolDeps`, and `IntentsDeps` remain exported as types.
|
|
63
|
+
|
|
64
|
+
## 17.0.1 - 2026-08-17
|
|
65
|
+
|
|
66
|
+
### Removed
|
|
67
|
+
|
|
68
|
+
- Remove `src/architecture/tests/` (`capability-barrels`, `package-entry`,
|
|
69
|
+
`execution-matrix`). These asserted that source files contain particular
|
|
70
|
+
strings — including the wording of `capability-boundaries.ts`'s own violation
|
|
71
|
+
messages — and duplicated the model assertions already in
|
|
72
|
+
`scripts/architecture/tests/capability-model.spec.ts`. Enforcement is
|
|
73
|
+
unchanged: `architecture:host-isolation` and `architecture:capabilities` walk
|
|
74
|
+
the real import graph and are what the CI gate depends on. `test:architecture`
|
|
75
|
+
now runs `scripts/architecture/tests` only.
|
|
76
|
+
|
|
23
77
|
## 17.0.0 - 2026-08-17
|
|
24
78
|
|
|
25
79
|
### Removed
|
package/IMPLEMENTATION.md
CHANGED
|
@@ -20,7 +20,10 @@ and [CHANGELOG.md](./CHANGELOG.md) for release history.
|
|
|
20
20
|
|
|
21
21
|
Internal source is domain-first: `signals`, `communities`, `questions`,
|
|
22
22
|
`participant-agents`, `contacts`, and `integrations`; opportunity and negotiation
|
|
23
|
-
place state/contracts in `domain/` and workflows/tools in `application/`.
|
|
23
|
+
place state/contracts in `domain/` and workflows/tools in `application/`. The
|
|
24
|
+
`intents` capability is instead organized by function behind a single exported
|
|
25
|
+
class, `Intents`: files sit flat and named for what they do, with `graph/` and
|
|
26
|
+
`intake/` the two multi-file stages that keep a directory.
|
|
24
27
|
|
|
25
28
|
|
|
26
29
|
## Install
|
|
@@ -140,7 +143,6 @@ For direct graph invocation (bypassing the tool layer), a `*GraphFactory` class
|
|
|
140
143
|
```typescript
|
|
141
144
|
import {
|
|
142
145
|
ChatGraphFactory,
|
|
143
|
-
IntentGraphFactory,
|
|
144
146
|
OpportunityGraphFactory,
|
|
145
147
|
EnrichmentGraphFactory,
|
|
146
148
|
PremiseGraphFactory,
|
|
@@ -157,10 +159,12 @@ import {
|
|
|
157
159
|
Each factory takes its typed dependencies in the constructor and exposes a
|
|
158
160
|
`.createGraph()` method that returns a compiled LangGraph ready for `.invoke()`.
|
|
159
161
|
|
|
162
|
+
The intent lifecycle graph is the exception: it is reached through the `Intents`
|
|
163
|
+
module rather than a factory of its own (see [Intents](#intents) below).
|
|
164
|
+
|
|
160
165
|
| Factory | Workflow |
|
|
161
166
|
|---|---|
|
|
162
167
|
| `ChatGraphFactory` | ReAct chat loop — LLM calls tools, responds to the user |
|
|
163
|
-
| `IntentGraphFactory` | Clarify, infer, verify felicity, reconcile, and persist intents |
|
|
164
168
|
| `OpportunityGraphFactory` | Background matching: search, evaluate (valency), rank, persist |
|
|
165
169
|
| `EnrichmentGraphFactory` | Enrich users (scrape + embed) and decompose into premises |
|
|
166
170
|
| `PremiseGraphFactory` | Decompose and index a user's premises |
|
|
@@ -176,6 +180,45 @@ Each factory takes its typed dependencies in the constructor and exposes a
|
|
|
176
180
|
|
|
177
181
|
`ChatGraphFactory.withPersona()` keeps the runtime neutral while selecting an exported persona configuration. `SIGNAL_PERSONA`, `REPORTER_PERSONA`, and `ONBOARDING_PERSONA` each own an exact positive tool allowlist; shared tools added later remain unavailable until reviewed. `ONBOARDING_PERSONA` reuses Signal's proposal-only, live-membership-narrowed `create_intent` contract and otherwise exposes only privacy consent, approved self-context preview/confirmation, guided questions, and validated completion. Hosts must persist the exported persona ID on session creation and treat it as authoritative on follow-ups.
|
|
178
182
|
|
|
183
|
+
## Intents
|
|
184
|
+
|
|
185
|
+
Signals are the protocol's base unit, and the whole capability ships as one
|
|
186
|
+
class. `Intents` covers the lifecycle graph, semantic verification, network
|
|
187
|
+
indexing, the guided intake interview, and the agent-facing intent tools.
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
import { Intents } from "@indexnetwork/protocol";
|
|
191
|
+
|
|
192
|
+
const intents = new Intents({
|
|
193
|
+
database, // IntentGraphDatabase — required only by createGraph()
|
|
194
|
+
embedder, // EmbeddingGenerator
|
|
195
|
+
queue, // IntentGraphQueue
|
|
196
|
+
questionerEnqueue, // QuestionerEnqueueFn
|
|
197
|
+
});
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Every dependency is optional, so a host that only wants the model-backed
|
|
201
|
+
helpers can construct `new Intents()` with nothing. Collaborators are built on
|
|
202
|
+
first use, so an unused method costs nothing.
|
|
203
|
+
|
|
204
|
+
| Method | Purpose |
|
|
205
|
+
|---|---|
|
|
206
|
+
| `createGraph()` | Compile the lifecycle graph — prep, infer, verify, reconcile, execute. Requires `database` |
|
|
207
|
+
| `verifyIntent(content, profileContext)` | Felicity conditions, speech-act classification, semantic entropy, specificity |
|
|
208
|
+
| `indexIntent(intent, indexPrompt, memberPrompt, sourceName?, networkContext?)` | Score one signal against one network; `null` when the model call fails |
|
|
209
|
+
| `generateIntakePack(input)` | The participant's intake brief and round-1 question |
|
|
210
|
+
| `generateIntakeFollowUps(input)` | Plan and write the next follow-up questions |
|
|
211
|
+
| `synthesizeIntake(input)` | Turn answered rounds into a description and card summary |
|
|
212
|
+
| `Intents.createTools(defineTool, deps)` | Register the agent-facing intent tools |
|
|
213
|
+
| `Intents.normalizeDescription(description)` | Normalize a description to its persisted form |
|
|
214
|
+
| `Intents.FALLBACK_INTAKE_QUESTION` | The static round-1 question used when generation is unavailable |
|
|
215
|
+
|
|
216
|
+
`IntentNetworkGraphFactory` takes an `Intents` instance as its evaluator:
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
const intentNetworkGraph = new IntentNetworkGraphFactory(database, intents).createGraph();
|
|
220
|
+
```
|
|
221
|
+
|
|
179
222
|
## MCP server
|
|
180
223
|
|
|
181
224
|
The package exports a factory that registers every chat tool over the Model Context Protocol and attaches a canonical `instructions` block (`MCP_INSTRUCTIONS`) that every connecting runtime follows. The factory takes three arguments:
|
package/STABILITY.md
CHANGED
|
@@ -18,7 +18,10 @@ change. It is the reference behind the tier annotations in `src/index.ts`.
|
|
|
18
18
|
`src/index.ts` diff, and that is what triggers the major bump below.
|
|
19
19
|
- Root exports are assembled through named capability facades. Those facades are
|
|
20
20
|
implementation seams, not package subpath entry points: consumers must still
|
|
21
|
-
import only from `@indexnetwork/protocol`.
|
|
21
|
+
import only from `@indexnetwork/protocol`. A capability may state that facade
|
|
22
|
+
as a class rather than a re-export list — `intents` does, via `Intents` in
|
|
23
|
+
`intents/intent.module.ts` — which makes the whole capability one exported
|
|
24
|
+
symbol and its internal layout free to change without a contract change.
|
|
22
25
|
|
|
23
26
|
## Stability tiers
|
|
24
27
|
|
|
@@ -34,6 +37,7 @@ Covered by SemVer below. Breaking changes require a **major** bump.
|
|
|
34
37
|
| **Interfaces** | Every `*.interface.ts` port you implement to inject infrastructure (databases, embedder, cache, scraper, queues, integration, agent dispatcher, …). |
|
|
35
38
|
| **Shared schemas** | Zod schemas + inferred types that cross the boundary (questions, identity, network-assignment, chat-context, …). |
|
|
36
39
|
| **Graph factories** | `*GraphFactory` classes (`ChatGraphFactory`, `OpportunityGraphFactory`, `NegotiationGraphFactory`, …). |
|
|
40
|
+
| **Intents** | `Intents` — the whole signal capability as one class (lifecycle graph, verification, network indexing, guided intake, tools) plus `IntentsDeps` and the intake/indexer types. Replaced the six separate intent exports in 18.0.0. |
|
|
37
41
|
| **Agents** | Structured LLM agents (`UserContextGenerator`, `IndexNegotiator`, `OpportunityEvaluator`, …). |
|
|
38
42
|
| **MCP** | `createMcpServer` plus the types needed to call it: `ScopedDepsFactory`, `McpCapabilityPolicyOptions`, `CANONICAL_MCP_CAPABILITY_POLICY_OPTIONS`, `McpAuthorizationObserver`, `McpAuthorizationDenialEvent`. The rest of `mcp.authorization-policy.ts` is package-internal as of 15.0.0. |
|
|
39
43
|
| **Capability tools** | `createEnrichmentTools` only. The other per-capability tool factories became package-internal in 15.0.0 — compose them through `createMcpServer` or `createToolRegistry`. |
|
package/dist/index.d.ts
CHANGED
|
@@ -41,9 +41,9 @@ export { RadarGraphFactory } from "./opportunities/index.js";
|
|
|
41
41
|
export { HydeGraphFactory } from "./discovery/index.js";
|
|
42
42
|
export { NetworkGraphFactory } from "./networks/index.js";
|
|
43
43
|
export { NetworkMembershipGraphFactory } from "./networks/index.js";
|
|
44
|
-
export { IntentGraphFactory } from "./intents/index.js";
|
|
45
|
-
export { SemanticVerifier } from "./intents/index.js";
|
|
46
44
|
export { IntentNetworkGraphFactory } from "./networks/index.js";
|
|
45
|
+
export { Intents } from "./intents/intent.module.js";
|
|
46
|
+
export type { FollowUpPlan, FollowUpPlanInput, IntakeAnswer, IntakePack, IntakePackInput, IntakePackQuestion, IntakePackQuestionOption, IntakeRound, IntentIndexerOutput, IntentsDeps, IntentToolDeps, SynthesisInput, SynthesisResult, } from "./intents/intent.module.js";
|
|
47
47
|
export { MaintenanceGraphFactory } from "./maintenance/maintenance.graph.js";
|
|
48
48
|
export type { MaintenanceGraphDatabase, MaintenanceGraphCache, MaintenanceGraphQueue } from "./maintenance/maintenance.graph.js";
|
|
49
49
|
export { NegotiationGraphFactory, negotiateCandidates } from "./negotiations/index.js";
|
|
@@ -60,13 +60,6 @@ export { ChatInterruptClassifier } from "./agents/index.js";
|
|
|
60
60
|
export { ChatSummarizer } from "./agents/index.js";
|
|
61
61
|
export { HydeGenerator } from "./discovery/index.js";
|
|
62
62
|
export { SuggestionGenerator } from "./agents/index.js";
|
|
63
|
-
export { IntentIndexer } from "./intents/index.js";
|
|
64
|
-
export type { IntentIndexerOutput } from "./intents/index.js";
|
|
65
|
-
export { SignalIntakePackGenerator } from "./intents/index.js";
|
|
66
|
-
export type { IntakePackQuestion } from "./intents/index.js";
|
|
67
|
-
export { SignalIntakeOrchestrator, FALLBACK_WHO_QUESTION, } from "./intents/index.js";
|
|
68
|
-
export type { IntakeAnswer, IntakeRound, } from "./intents/index.js";
|
|
69
|
-
export { normalizeIntentDescription } from "./intents/index.js";
|
|
70
63
|
export { LensInferrer } from "./discovery/index.js";
|
|
71
64
|
export { NegotiationInsightsGenerator } from "./negotiations/index.js";
|
|
72
65
|
export type { NegotiationDigest } from "./negotiations/index.js";
|
package/dist/index.js
CHANGED
|
@@ -37,9 +37,11 @@ export { RadarGraphFactory } from "./opportunities/index.js";
|
|
|
37
37
|
export { HydeGraphFactory } from "./discovery/index.js";
|
|
38
38
|
export { NetworkGraphFactory } from "./networks/index.js";
|
|
39
39
|
export { NetworkMembershipGraphFactory } from "./networks/index.js";
|
|
40
|
-
export { IntentGraphFactory } from "./intents/index.js";
|
|
41
|
-
export { SemanticVerifier } from "./intents/index.js";
|
|
42
40
|
export { IntentNetworkGraphFactory } from "./networks/index.js";
|
|
41
|
+
// ─── Intents ──────────────────────────────────────────────────────────────────
|
|
42
|
+
// The whole capability behind one class: lifecycle graph, verification,
|
|
43
|
+
// network indexing, guided intake, and the agent-facing tools.
|
|
44
|
+
export { Intents } from "./intents/intent.module.js";
|
|
43
45
|
export { MaintenanceGraphFactory } from "./maintenance/maintenance.graph.js";
|
|
44
46
|
export { NegotiationGraphFactory, negotiateCandidates } from "./negotiations/index.js";
|
|
45
47
|
export { OpportunityGraphFactory } from "./opportunities/index.js";
|
|
@@ -54,10 +56,6 @@ export { ChatInterruptClassifier } from "./agents/index.js";
|
|
|
54
56
|
export { ChatSummarizer } from "./agents/index.js";
|
|
55
57
|
export { HydeGenerator } from "./discovery/index.js";
|
|
56
58
|
export { SuggestionGenerator } from "./agents/index.js";
|
|
57
|
-
export { IntentIndexer } from "./intents/index.js";
|
|
58
|
-
export { SignalIntakePackGenerator } from "./intents/index.js";
|
|
59
|
-
export { SignalIntakeOrchestrator, FALLBACK_WHO_QUESTION, } from "./intents/index.js";
|
|
60
|
-
export { normalizeIntentDescription } from "./intents/index.js";
|
|
61
59
|
export { LensInferrer } from "./discovery/index.js";
|
|
62
60
|
export { NegotiationInsightsGenerator } from "./negotiations/index.js";
|
|
63
61
|
export { IndexNegotiator } from "./negotiations/index.js";
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* state and an explicit {@link IntentGraphDeps}. This file composes the
|
|
6
6
|
* dependency bag and wires the edges — nothing else.
|
|
7
7
|
*/
|
|
8
|
-
import { ExplicitIntentInferrer } from "
|
|
9
|
-
import { SemanticVerifier } from "
|
|
10
|
-
import { IntentReconciler } from "
|
|
8
|
+
import { ExplicitIntentInferrer } from "../intent.inferrer.js";
|
|
9
|
+
import { SemanticVerifier } from "../intent.verifier.js";
|
|
10
|
+
import { IntentReconciler } from "../intent.reconciler.js";
|
|
11
11
|
import type { IntentGraphDatabase } from "../../shared/interfaces/database.interface.js";
|
|
12
12
|
import type { EmbeddingGenerator } from "../../shared/interfaces/embedder.interface.js";
|
|
13
13
|
import type { IntentGraphQueue } from "../../shared/interfaces/queue.interface.js";
|
|
@@ -42,10 +42,10 @@ export declare class IntentGraphFactory {
|
|
|
42
42
|
confidence: "low" | "medium" | "high";
|
|
43
43
|
description: string;
|
|
44
44
|
}[];
|
|
45
|
-
verifiedIntents: import("
|
|
46
|
-
validationFailures: import("
|
|
47
|
-
actions: import("
|
|
48
|
-
executionResults: import("
|
|
45
|
+
verifiedIntents: import("./intent.graph.state.js").VerifiedIntent[];
|
|
46
|
+
validationFailures: import("./intent.graph.state.js").IntentValidationFailure[];
|
|
47
|
+
actions: import("../intent.reconciler.js").NormalizedIntentAction[];
|
|
48
|
+
executionResults: import("./intent.graph.state.js").ExecutionResult[];
|
|
49
49
|
error: string | undefined;
|
|
50
50
|
trace: {
|
|
51
51
|
node: string;
|
|
@@ -93,10 +93,10 @@ export declare class IntentGraphFactory {
|
|
|
93
93
|
confidence: "low" | "medium" | "high";
|
|
94
94
|
description: string;
|
|
95
95
|
}[]> | undefined;
|
|
96
|
-
verifiedIntents?: import("
|
|
97
|
-
validationFailures?: import("
|
|
98
|
-
actions?: import("
|
|
99
|
-
executionResults?: import("
|
|
96
|
+
verifiedIntents?: import("./intent.graph.state.js").VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").VerifiedIntent[]> | undefined;
|
|
97
|
+
validationFailures?: import("./intent.graph.state.js").IntentValidationFailure[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").IntentValidationFailure[]> | undefined;
|
|
98
|
+
actions?: import("../intent.reconciler.js").NormalizedIntentAction[] | import("@langchain/langgraph").OverwriteValue<import("../intent.reconciler.js").NormalizedIntentAction[]> | undefined;
|
|
99
|
+
executionResults?: import("./intent.graph.state.js").ExecutionResult[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").ExecutionResult[]> | undefined;
|
|
100
100
|
error?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
101
101
|
trace?: {
|
|
102
102
|
node: string;
|
|
@@ -177,10 +177,10 @@ export declare class IntentGraphFactory {
|
|
|
177
177
|
confidence: "low" | "medium" | "high";
|
|
178
178
|
description: string;
|
|
179
179
|
}[]>, unknown>;
|
|
180
|
-
verifiedIntents: import("@langchain/langgraph").BaseChannel<import("
|
|
181
|
-
validationFailures: import("@langchain/langgraph").BaseChannel<import("
|
|
182
|
-
actions: import("@langchain/langgraph").BaseChannel<import("
|
|
183
|
-
executionResults: import("@langchain/langgraph").BaseChannel<import("
|
|
180
|
+
verifiedIntents: import("@langchain/langgraph").BaseChannel<import("./intent.graph.state.js").VerifiedIntent[], import("./intent.graph.state.js").VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").VerifiedIntent[]>, unknown>;
|
|
181
|
+
validationFailures: import("@langchain/langgraph").BaseChannel<import("./intent.graph.state.js").IntentValidationFailure[], import("./intent.graph.state.js").IntentValidationFailure[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").IntentValidationFailure[]>, unknown>;
|
|
182
|
+
actions: import("@langchain/langgraph").BaseChannel<import("../intent.reconciler.js").NormalizedIntentAction[], import("../intent.reconciler.js").NormalizedIntentAction[] | import("@langchain/langgraph").OverwriteValue<import("../intent.reconciler.js").NormalizedIntentAction[]>, unknown>;
|
|
183
|
+
executionResults: import("@langchain/langgraph").BaseChannel<import("./intent.graph.state.js").ExecutionResult[], import("./intent.graph.state.js").ExecutionResult[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").ExecutionResult[]>, unknown>;
|
|
184
184
|
error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
185
185
|
trace: import("@langchain/langgraph").BaseChannel<{
|
|
186
186
|
node: string;
|
|
@@ -277,10 +277,10 @@ export declare class IntentGraphFactory {
|
|
|
277
277
|
confidence: "low" | "medium" | "high";
|
|
278
278
|
description: string;
|
|
279
279
|
}[]>, unknown>;
|
|
280
|
-
verifiedIntents: import("@langchain/langgraph").BaseChannel<import("
|
|
281
|
-
validationFailures: import("@langchain/langgraph").BaseChannel<import("
|
|
282
|
-
actions: import("@langchain/langgraph").BaseChannel<import("
|
|
283
|
-
executionResults: import("@langchain/langgraph").BaseChannel<import("
|
|
280
|
+
verifiedIntents: import("@langchain/langgraph").BaseChannel<import("./intent.graph.state.js").VerifiedIntent[], import("./intent.graph.state.js").VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").VerifiedIntent[]>, unknown>;
|
|
281
|
+
validationFailures: import("@langchain/langgraph").BaseChannel<import("./intent.graph.state.js").IntentValidationFailure[], import("./intent.graph.state.js").IntentValidationFailure[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").IntentValidationFailure[]>, unknown>;
|
|
282
|
+
actions: import("@langchain/langgraph").BaseChannel<import("../intent.reconciler.js").NormalizedIntentAction[], import("../intent.reconciler.js").NormalizedIntentAction[] | import("@langchain/langgraph").OverwriteValue<import("../intent.reconciler.js").NormalizedIntentAction[]>, unknown>;
|
|
283
|
+
executionResults: import("@langchain/langgraph").BaseChannel<import("./intent.graph.state.js").ExecutionResult[], import("./intent.graph.state.js").ExecutionResult[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").ExecutionResult[]>, unknown>;
|
|
284
284
|
error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
285
285
|
trace: import("@langchain/langgraph").BaseChannel<{
|
|
286
286
|
node: string;
|
|
@@ -411,8 +411,8 @@ export declare class IntentGraphFactory {
|
|
|
411
411
|
validationFailures?: undefined;
|
|
412
412
|
trace?: undefined;
|
|
413
413
|
} | {
|
|
414
|
-
verifiedIntents: import("
|
|
415
|
-
validationFailures: import("
|
|
414
|
+
verifiedIntents: import("./intent.graph.state.js").VerifiedIntent[];
|
|
415
|
+
validationFailures: import("./intent.graph.state.js").IntentValidationFailure[];
|
|
416
416
|
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
417
417
|
trace: {
|
|
418
418
|
node: string;
|
|
@@ -471,10 +471,10 @@ export declare class IntentGraphFactory {
|
|
|
471
471
|
confidence: "low" | "medium" | "high";
|
|
472
472
|
description: string;
|
|
473
473
|
}[]>, unknown>;
|
|
474
|
-
verifiedIntents: import("@langchain/langgraph").BaseChannel<import("
|
|
475
|
-
validationFailures: import("@langchain/langgraph").BaseChannel<import("
|
|
476
|
-
actions: import("@langchain/langgraph").BaseChannel<import("
|
|
477
|
-
executionResults: import("@langchain/langgraph").BaseChannel<import("
|
|
474
|
+
verifiedIntents: import("@langchain/langgraph").BaseChannel<import("./intent.graph.state.js").VerifiedIntent[], import("./intent.graph.state.js").VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").VerifiedIntent[]>, unknown>;
|
|
475
|
+
validationFailures: import("@langchain/langgraph").BaseChannel<import("./intent.graph.state.js").IntentValidationFailure[], import("./intent.graph.state.js").IntentValidationFailure[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").IntentValidationFailure[]>, unknown>;
|
|
476
|
+
actions: import("@langchain/langgraph").BaseChannel<import("../intent.reconciler.js").NormalizedIntentAction[], import("../intent.reconciler.js").NormalizedIntentAction[] | import("@langchain/langgraph").OverwriteValue<import("../intent.reconciler.js").NormalizedIntentAction[]>, unknown>;
|
|
477
|
+
executionResults: import("@langchain/langgraph").BaseChannel<import("./intent.graph.state.js").ExecutionResult[], import("./intent.graph.state.js").ExecutionResult[] | import("@langchain/langgraph").OverwriteValue<import("./intent.graph.state.js").ExecutionResult[]>, unknown>;
|
|
478
478
|
error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
479
479
|
trace: import("@langchain/langgraph").BaseChannel<{
|
|
480
480
|
node: string;
|
|
@@ -532,7 +532,7 @@ export declare class IntentGraphFactory {
|
|
|
532
532
|
} | undefined> | undefined, unknown>;
|
|
533
533
|
}>;
|
|
534
534
|
executor: {
|
|
535
|
-
executionResults: import("
|
|
535
|
+
executionResults: import("./intent.graph.state.js").ExecutionResult[];
|
|
536
536
|
};
|
|
537
537
|
}, unknown, unknown, []>;
|
|
538
538
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Intent graph, stage 4 and the read fast path.
|
|
3
3
|
*/
|
|
4
|
-
import { ExecutionResult } from "
|
|
4
|
+
import { ExecutionResult } from "./intent.graph.state.js";
|
|
5
5
|
import { type IntentGraphDeps, type IntentState } from "./intent.graph.shared.js";
|
|
6
6
|
/**
|
|
7
7
|
* Node 4: Executor
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Intent graph, stage 4 and the read fast path.
|
|
3
3
|
*/
|
|
4
|
-
import { normalizeIntentDescription } from "../
|
|
4
|
+
import { normalizeIntentDescription } from "../intent.proposal.js";
|
|
5
5
|
import { timed } from "../../shared/observability/performance.js";
|
|
6
6
|
import { enforceIntentActionBoundary, generateIntentEmbedding, logger, toSpeechActType } from "./intent.graph.shared.js";
|
|
7
7
|
/**
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* dependency bag and wires the edges — nothing else.
|
|
7
7
|
*/
|
|
8
8
|
import { StateGraph, START, END } from "@langchain/langgraph";
|
|
9
|
-
import { ExplicitIntentInferrer } from "
|
|
10
|
-
import { SemanticVerifier } from "
|
|
11
|
-
import { IntentReconciler } from "
|
|
12
|
-
import { IntentGraphState } from "
|
|
9
|
+
import { ExplicitIntentInferrer } from "../intent.inferrer.js";
|
|
10
|
+
import { SemanticVerifier } from "../intent.verifier.js";
|
|
11
|
+
import { IntentReconciler } from "../intent.reconciler.js";
|
|
12
|
+
import { IntentGraphState } from "./intent.graph.state.js";
|
|
13
13
|
import { logger } from "./intent.graph.shared.js";
|
|
14
14
|
import { inferenceNode, prepNode } from "./intent.graph.infer.js";
|
|
15
15
|
import { reconciliationNode, verificationNode } from "./intent.graph.reconcile.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Intent graph, stages 2-3: verify inferred signals, then reconcile against what exists.
|
|
3
3
|
*/
|
|
4
|
-
import { VerifiedIntent, type IntentValidationFailure } from "
|
|
5
|
-
import type { NormalizedIntentAction } from "
|
|
4
|
+
import { VerifiedIntent, type IntentValidationFailure } from "./intent.graph.state.js";
|
|
5
|
+
import type { NormalizedIntentAction } from "../intent.reconciler.js";
|
|
6
6
|
import type { DebugMetaAgent } from "../../agents/index.js";
|
|
7
7
|
import { type IntentGraphDeps, type IntentState } from "./intent.graph.shared.js";
|
|
8
8
|
/**
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* top-level functions now, each taking an explicit {@link IntentGraphDeps}.
|
|
6
6
|
* This module owns the bag, the logger, and the pure helpers.
|
|
7
7
|
*/
|
|
8
|
-
import { IntentGraphState, VerifiedIntent, type IntentValidationFailure } from "
|
|
9
|
-
import { ExplicitIntentInferrer } from "
|
|
10
|
-
import { SemanticVerifier } from "
|
|
11
|
-
import { IntentReconciler } from "
|
|
12
|
-
import type { NormalizedIntentAction } from "
|
|
8
|
+
import { IntentGraphState, VerifiedIntent, type IntentValidationFailure } from "./intent.graph.state.js";
|
|
9
|
+
import { ExplicitIntentInferrer } from "../intent.inferrer.js";
|
|
10
|
+
import { SemanticVerifier } from "../intent.verifier.js";
|
|
11
|
+
import { IntentReconciler } from "../intent.reconciler.js";
|
|
12
|
+
import type { NormalizedIntentAction } from "../intent.reconciler.js";
|
|
13
13
|
import { IntentGraphDatabase } from "../../shared/interfaces/database.interface.js";
|
|
14
14
|
import type { EmbeddingGenerator } from "../../shared/interfaces/embedder.interface.js";
|
|
15
15
|
import type { IntentGraphQueue } from "../../shared/interfaces/queue.interface.js";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* top-level functions now, each taking an explicit {@link IntentGraphDeps}.
|
|
6
6
|
* This module owns the bag, the logger, and the pure helpers.
|
|
7
7
|
*/
|
|
8
|
-
import { DEFAULT_SPECIFICITY_WARNING } from "../
|
|
8
|
+
import { DEFAULT_SPECIFICITY_WARNING } from "../intent.proposal.js";
|
|
9
9
|
import { getAbortSignalConfig } from "../../shared/agent/model-signal.js";
|
|
10
10
|
import { protocolLogger } from "../../shared/observability/protocol.logger.js";
|
|
11
11
|
export const logger = protocolLogger("IntentGraphFactory");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseMessage } from "@langchain/core/messages";
|
|
2
|
-
import { InferredIntent } from "../
|
|
3
|
-
import { SemanticVerifierOutput } from "../
|
|
2
|
+
import { InferredIntent } from "../intent.inferrer.js";
|
|
3
|
+
import { SemanticVerifierOutput } from "../intent.verifier.js";
|
|
4
4
|
import type { DebugMetaAgent } from '../../agents/index.js';
|
|
5
5
|
import type { ToolScopeType } from '../../shared/agent/tool.scope.js';
|
|
6
6
|
/**
|
|
@@ -139,7 +139,7 @@ export declare const IntentGraphState: import("@langchain/langgraph").Annotation
|
|
|
139
139
|
/**
|
|
140
140
|
* Final actions to be performed on the DB (Create, Update, Expire).
|
|
141
141
|
*/
|
|
142
|
-
actions: import("@langchain/langgraph").BaseChannel<import("../
|
|
142
|
+
actions: import("@langchain/langgraph").BaseChannel<import("../intent.reconciler.js").NormalizedIntentAction[], import("../intent.reconciler.js").NormalizedIntentAction[] | import("@langchain/langgraph").OverwriteValue<import("../intent.reconciler.js").NormalizedIntentAction[]>, unknown>;
|
|
143
143
|
/**
|
|
144
144
|
* Results of executing actions against the database.
|
|
145
145
|
* Populated by executorNode after actions are persisted.
|
|
@@ -9,11 +9,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { HumanMessage, SystemMessage } from "@langchain/core/messages";
|
|
11
11
|
import { z } from "zod";
|
|
12
|
-
import { createStructuredModel } from "
|
|
13
|
-
import { invokeWithAbortSignal } from "
|
|
14
|
-
import { protocolLogger } from "
|
|
15
|
-
import { Timed } from "
|
|
16
|
-
import { UnderspecificationTypeSchema } from "
|
|
12
|
+
import { createStructuredModel } from "../shared/agent/model.config.js";
|
|
13
|
+
import { invokeWithAbortSignal } from "../shared/agent/model-signal.js";
|
|
14
|
+
import { protocolLogger } from "../shared/observability/protocol.logger.js";
|
|
15
|
+
import { Timed } from "../shared/observability/performance.js";
|
|
16
|
+
import { UnderspecificationTypeSchema } from "../shared/schemas/underspecification.schema.js";
|
|
17
17
|
const logger = protocolLogger("IntentClarifier");
|
|
18
18
|
const clarificationSchema = z.discriminatedUnion("needsClarification", [
|
|
19
19
|
z.object({
|
|
@@ -10,10 +10,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { HumanMessage, SystemMessage } from "@langchain/core/messages";
|
|
11
11
|
import { tool } from "@langchain/core/tools";
|
|
12
12
|
import { z } from "zod";
|
|
13
|
-
import { log } from "
|
|
14
|
-
import { Timed } from "
|
|
15
|
-
import { createStructuredModel } from "
|
|
16
|
-
import { invokeWithAbortSignal } from "
|
|
13
|
+
import { log } from "../shared/observability/log.js";
|
|
14
|
+
import { Timed } from "../shared/observability/performance.js";
|
|
15
|
+
import { createStructuredModel } from "../shared/agent/model.config.js";
|
|
16
|
+
import { invokeWithAbortSignal } from "../shared/agent/model-signal.js";
|
|
17
17
|
// ──────────────────────────────────────────────────────────────
|
|
18
18
|
// Response schema
|
|
19
19
|
// ──────────────────────────────────────────────────────────────
|
|
@@ -10,10 +10,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { HumanMessage, SystemMessage } from "@langchain/core/messages";
|
|
11
11
|
import { tool } from "@langchain/core/tools";
|
|
12
12
|
import { z } from "zod";
|
|
13
|
-
import { protocolLogger } from "
|
|
14
|
-
import { Timed } from "
|
|
15
|
-
import { createStructuredModel } from "
|
|
16
|
-
import { invokeWithAbortSignal } from "
|
|
13
|
+
import { protocolLogger } from "../shared/observability/protocol.logger.js";
|
|
14
|
+
import { Timed } from "../shared/observability/performance.js";
|
|
15
|
+
import { createStructuredModel } from "../shared/agent/model.config.js";
|
|
16
|
+
import { invokeWithAbortSignal } from "../shared/agent/model-signal.js";
|
|
17
17
|
const logger = protocolLogger("ExplicitIntentInferrer");
|
|
18
18
|
// ──────────────────────────────────────────────────────────────
|
|
19
19
|
// 1. SYSTEM PROMPT
|