@lazyingart/agintiflow 0.20.204 → 0.20.205
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/docs/deep-research-engine.md +76 -7
- package/docs/perception-and-web-research.md +2 -2
- package/docs/supervision-campaign-ledger.md +5 -0
- package/package.json +1 -1
- package/scripts/smoke-deep-research.js +554 -1
- package/scripts/smoke-supervision-ledger.js +20 -1
- package/scripts/supervision-ledger.js +45 -11
- package/skills/deep-research/SKILL.md +25 -1
- package/src/agent-runner.js +5 -2
- package/src/deep-research.js +484 -69
- package/src/integration-core-event-projector.js +116 -32
- package/src/integration-native-executor.js +90 -15
- package/src/integration-runtime-authority.js +965 -94
- package/src/integration-session-persistence.js +504 -0
- package/src/model-client.js +10 -2
- package/src/session-store.js +503 -416
- package/src/web-search.js +369 -32
|
@@ -22,14 +22,36 @@ every query an unbounded agent swarm:
|
|
|
22
22
|
2. **Search**: queries run with bounded concurrency. Quick lookup uses the
|
|
23
23
|
no-key DuckDuckGo-to-Bing fallback. Standard/deep research uses a bounded
|
|
24
24
|
ensemble that merges DuckDuckGo and Bing indexes, plus Brave only when it is
|
|
25
|
-
explicitly configured.
|
|
26
|
-
|
|
25
|
+
explicitly configured. A paper-oriented request receives one initial bounded
|
|
26
|
+
scholarly discovery pass against Crossref and arXiv, attached to the most
|
|
27
|
+
paper-like planned query. If the independently verified source minimum is
|
|
28
|
+
still open, the single gap pass may retry that lane once with a different
|
|
29
|
+
planner-derived query. This improves paper recall and metadata identity
|
|
30
|
+
without multiplying every query or creating bursty arXiv traffic.
|
|
31
|
+
When the request explicitly asks for official engineering or first-party
|
|
32
|
+
implementation evidence, one separate bounded query targets engineering,
|
|
33
|
+
documentation, system-card, and whitepaper surfaces. The selector reserves
|
|
34
|
+
one relevant first-party candidate when available instead of letting a large
|
|
35
|
+
paper set erase the requested source class. Search snippets can guide
|
|
36
|
+
discovery, but they cannot satisfy verified first-party coverage or enter
|
|
37
|
+
synthesis as cited evidence.
|
|
38
|
+
Canonical duplicates found by multiple providers are promoted and retain
|
|
39
|
+
per-provider rank evidence. Multi-domain corpora receive separate bounded `site:`
|
|
27
40
|
queries matched to entity-specific subquestions instead of one fragile OR
|
|
28
41
|
expression. If an exact `site:` query returns no candidates, the engine
|
|
29
42
|
retries the same planner query once without the search-operator hint while
|
|
30
43
|
retaining the domain allowlist. This recovery stays inside the original
|
|
31
44
|
research run and is recorded in its checkpoint.
|
|
32
45
|
3. **Rank, diversify, and deduplicate**: canonical URLs remove tracking state.
|
|
46
|
+
Scholarly records additionally carry DOI, arXiv ID, normalized title,
|
|
47
|
+
provider, venue, author, PDF, and alternate-URL provenance. DOI publisher,
|
|
48
|
+
arXiv abstract, and arXiv PDF variants of one work collapse before source
|
|
49
|
+
budgeting, while the audit records how many variants were merged. A title
|
|
50
|
+
match is only a fallback and never merges records with conflicting DOI or
|
|
51
|
+
arXiv identities. A source
|
|
52
|
+
repository is useful implementation evidence but is not automatically an
|
|
53
|
+
official or scholarly paper merely because it is hosted on GitHub or has
|
|
54
|
+
`paper` in its path.
|
|
33
55
|
Topical overlap, independent provider rediscovery, discovery by multiple
|
|
34
56
|
planned queries, and domain-constrained intent rank candidates. Official or
|
|
35
57
|
scholarly status is a quality signal, not a substitute for relevance, so a
|
|
@@ -41,7 +63,8 @@ every query an unbounded agent swarm:
|
|
|
41
63
|
When at least four strongly topical compliant candidates exist, marginally
|
|
42
64
|
related academic pages are excluded as well;
|
|
43
65
|
a sparse set may add only enough relevant supplementary context to reach
|
|
44
|
-
that small floor
|
|
66
|
+
that small floor, but a strict policy with zero compliant candidates fails
|
|
67
|
+
closed instead of accepting generic filler. Source budgets are ceilings rather than targets, and a
|
|
45
68
|
bounded diversity penalty prevents one domain from crowding every selected
|
|
46
69
|
source.
|
|
47
70
|
4. **Read exact sources**: `read_web_page` validates every redirect before the
|
|
@@ -50,9 +73,16 @@ every query an unbounded agent swarm:
|
|
|
50
73
|
and marks all retrieved text as untrusted evidence. Verified PDF response
|
|
51
74
|
bytes are passed to a bounded local `pdftotext` process when available, so
|
|
52
75
|
papers can contribute exact passages without sending the PDF to another
|
|
53
|
-
provider.
|
|
54
|
-
|
|
55
|
-
|
|
76
|
+
provider. If one exact scholarly landing page is inaccessible, the reader
|
|
77
|
+
tries only the same work's verified alternate landing/PDF URLs before giving
|
|
78
|
+
up; it never substitutes a nearby paper. When the original request requires
|
|
79
|
+
a paper, selected provider-supplied PDFs and arXiv, ACL Anthology,
|
|
80
|
+
OpenReview, and Nature landing pages are resolved to bounded PDF candidates
|
|
81
|
+
before evidence extraction. Direct PDF candidates receive the bounded 5 MiB
|
|
82
|
+
document allowance rather than the generic 2 MiB HTML-page allowance; larger
|
|
83
|
+
files still fail closed with the exact size error. Browser-verification,
|
|
84
|
+
CAPTCHA, and access-challenge HTML is marked unreadable instead of counting
|
|
85
|
+
its warning text as source evidence.
|
|
56
86
|
5. **Extract evidence**: isolated structured-output calls identify relevant
|
|
57
87
|
subquestions, claims, exact quotations, confidence, and limitations. The
|
|
58
88
|
active provider's fast routing model handles the parallel first pass. Only
|
|
@@ -62,7 +92,9 @@ every query an unbounded agent swarm:
|
|
|
62
92
|
6. **Verify**: deterministic code checks that quoted passages occur in the
|
|
63
93
|
exact retrieved source. Unverified quotations do not enter synthesis.
|
|
64
94
|
7. **Fill gaps**: standard/deep runs may issue one bounded follow-up pass for
|
|
65
|
-
uncovered subquestions
|
|
95
|
+
uncovered subquestions, insufficient independent readable primary evidence,
|
|
96
|
+
or a requested first-party class that has not produced readable,
|
|
97
|
+
quote-verified evidence, when query and source budgets remain.
|
|
66
98
|
8. **Synthesize**: the active provider's main model receives verified evidence
|
|
67
99
|
rather than arbitrary page text. Every substantive paragraph and finding
|
|
68
100
|
cites exact evidence IDs instead of merely naming a source. A failed main
|
|
@@ -185,6 +217,10 @@ The JSON includes:
|
|
|
185
217
|
- missing questions, source diversity, and quote-verification rates;
|
|
186
218
|
- explicit evidence requirements, parsed-PDF attempts, and independent verified
|
|
187
219
|
primary/scholarly source counts;
|
|
220
|
+
- DOI/arXiv work identities, alternate read attempts, and merged-variant counts;
|
|
221
|
+
- requested and verified first-party engineering source coverage;
|
|
222
|
+
- evidence that came only from search excerpts, kept distinct from readable
|
|
223
|
+
source verification;
|
|
188
224
|
- final synthesis and citation audit;
|
|
189
225
|
- stage/status fields used for crash-safe resume.
|
|
190
226
|
|
|
@@ -203,6 +239,28 @@ no-key indexes and merges their canonical results:
|
|
|
203
239
|
DuckDuckGo HTML + Bing RSS (+ Brave when explicitly configured)
|
|
204
240
|
```
|
|
205
241
|
|
|
242
|
+
Paper-oriented `deep_research` requests keep that broad lane and add one
|
|
243
|
+
bounded scholarly lane initially; an unresolved independent-source contract
|
|
244
|
+
may trigger one additional scholarly call in the single gap pass:
|
|
245
|
+
|
|
246
|
+
```text
|
|
247
|
+
Crossref metadata + arXiv metadata/preprint links
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
For direct `web_search` use, `provider=scholarly` selects only Crossref and
|
|
251
|
+
arXiv, while `provider=research` combines the general and scholarly lanes.
|
|
252
|
+
`provider=crossref` and `provider=arxiv` remain available for a deliberately
|
|
253
|
+
index-specific lookup. These public endpoints require no API key; provider
|
|
254
|
+
failures remain visible in `providersTried` rather than being hidden.
|
|
255
|
+
|
|
256
|
+
An explicit request for official engineering writeups adds one source-class
|
|
257
|
+
query such as an engineering architecture or system-card lookup. This is not a
|
|
258
|
+
hardcoded vendor list: the planner names relevant first-party organizations
|
|
259
|
+
when it knows them, while deterministic routing preserves the requested source
|
|
260
|
+
class and records whether a readable first-party source actually supported a
|
|
261
|
+
quote-verified claim. A result-page excerpt alone is reported separately and
|
|
262
|
+
does not close that requirement.
|
|
263
|
+
|
|
206
264
|
For an explicitly configured Brave Search account:
|
|
207
265
|
|
|
208
266
|
```bash
|
|
@@ -223,6 +281,10 @@ through configuration or a tool argument.
|
|
|
223
281
|
- Tracking parameters and fragments are removed before deduplication.
|
|
224
282
|
- arXiv abstract, HTML, versioned, and PDF URLs for the same paper collapse to
|
|
225
283
|
one canonical paper identity before source budgeting.
|
|
284
|
+
- DOI and arXiv variants are merged at the work level when identifiers or a
|
|
285
|
+
sufficiently specific normalized scholarly title agree. Conflicting DOI or
|
|
286
|
+
arXiv identities always remain separate even when titles match. Distinct
|
|
287
|
+
variant URLs remain in the audit and exact-source fallback ledger.
|
|
226
288
|
- Strict source policies do not fill unused capacity with blogs or social posts
|
|
227
289
|
once at least four relevant policy-compliant sources are available. This is a
|
|
228
290
|
quality floor, not a requirement to consume the configured source ceiling.
|
|
@@ -231,7 +293,10 @@ through configuration or a tool argument.
|
|
|
231
293
|
“when available” is allowed to proceed only when no bounded PDF candidate was
|
|
232
294
|
discoverable.
|
|
233
295
|
- Page bytes are bounded while streaming; extracted characters are bounded too.
|
|
296
|
+
- Direct PDF candidates use a bounded 5 MiB read allowance; ordinary pages keep
|
|
297
|
+
the lower 2 MiB allowance.
|
|
234
298
|
- HTML scripts, forms, navigation, footers, and similar noise are removed.
|
|
299
|
+
- Access-challenge pages are explicitly rejected as unreadable evidence.
|
|
235
300
|
- Retrieved text is always labeled untrusted and never treated as tool or agent
|
|
236
301
|
instructions.
|
|
237
302
|
- PDFs are always hash-verified. When local `pdftotext` is available, bounded
|
|
@@ -256,6 +321,10 @@ prose:
|
|
|
256
321
|
- readable source count;
|
|
257
322
|
- primary/scholarly source count;
|
|
258
323
|
- independent verified primary/scholarly source count;
|
|
324
|
+
- duplicate scholarly variants merged before source budgeting;
|
|
325
|
+
- verified first-party engineering/official source count when requested;
|
|
326
|
+
- search-excerpt-only source-match count, which is diagnostic and never enters
|
|
327
|
+
synthesis or satisfies readable first-party or independent-primary verification;
|
|
259
328
|
- parsed-PDF count and PDF requirement status;
|
|
260
329
|
- independent-domain count;
|
|
261
330
|
- exact-quote verification rate;
|
|
@@ -21,12 +21,12 @@ AgInTiFlow separates visual understanding, web search, and wrapper advice so eac
|
|
|
21
21
|
- OpenAI image reading defaults to `AGINTI_PERCEPTION_MODEL=gpt-5.4-mini` and `AGINTI_PERCEPTION_REASONING=medium`, with fallback models remaining inside the same explicitly selected OpenAI provider.
|
|
22
22
|
- `web_research` defaults to lightweight snippet mode. The active LocalLLM can synthesize those returned snippets and sources during the next agent step without a second provider call.
|
|
23
23
|
- `web_search provider=auto` falls back from DuckDuckGo HTML to Bing RSS. `provider=multi` merges both indexes and adds Brave only when explicitly configured. Standard/deep research defaults to this ensemble; quick research stays on auto.
|
|
24
|
-
- Exact PDF responses are hashed first, then parsed locally with bounded `pdftotext` when available. An explicit original-goal PDF requirement resolves selected arXiv, ACL Anthology, OpenReview, or Nature landing pages before claim extraction; extraction failure remains visible rather than silently treating a snippet as full-paper evidence.
|
|
24
|
+
- Exact PDF responses are hashed first, then parsed locally with bounded `pdftotext` when available. Direct PDF candidates receive a bounded 5 MiB document allowance instead of the generic 2 MiB HTML-page allowance. An explicit original-goal PDF requirement resolves selected arXiv, ACL Anthology, OpenReview, or Nature landing pages before claim extraction; extraction failure remains visible rather than silently treating a snippet as full-paper evidence.
|
|
25
25
|
- `deep_research` stays on the active provider: its fast routing model plans and extracts sources in parallel, only failed extractions retry on the stronger main model, and the main model synthesizes the verified evidence. DeepSeek JSON transformations explicitly disable thinking mode and use its supported JSON-object contract; the bounded workflow, not hidden chain-of-thought, owns decomposition and verification. A failed synthesis may fall back once to the same-provider routing model. It never treats another provider's ambient credentials as permission. Visible source citations are derived from verified claim-level evidence IDs rather than trusted directly from model output.
|
|
26
26
|
- LocalLLM research reuses an already-selected resident main model for planning, extraction, and synthesis unless `deepResearchExtractionModel` is explicit. It limits extraction to two concurrent local calls by default, avoiding multi-model GPU thrash and four-way local inference contention.
|
|
27
27
|
- Candidate ranking requires topical evidence, provider/query rediscovery, or an explicit domain constraint. Academic or official hosting improves source quality but does not make an irrelevant page relevant. When a strict-policy run finds at least four strongly topical sources, marginally related academic pages cannot consume the remaining source budget.
|
|
28
28
|
- A domain-specific `site:` query that returns no candidates is retried once as the same plain planner query while the domain allowlist remains enforced. This bounded recovery is part of one research run, not an outer-agent manual search detour.
|
|
29
|
-
- Concise planner queries are searched before the raw request, and long conversational briefs are not sent verbatim to search engines. Explicit source-count, PDF, and negative-evidence requirements remain authoritative from the original goal. arXiv
|
|
29
|
+
- Concise planner queries are searched before the raw request, and long conversational briefs are not sent verbatim to search engines. Explicit source-count, PDF, first-party, and negative-evidence requirements remain authoritative from the original goal. Paper-oriented runs add one bounded Crossref/arXiv discovery pass and may retry it once during the single gap pass when the independently verified source minimum remains open; DOI, arXiv HTML/abstract/PDF, and version URLs are merged as one scholarly work while conflicting identifiers remain separate and exact variants remain auditable fallback paths. First-party requirements close only on readable, quote-verified content. Search excerpts and access-challenge pages remain discovery diagnostics and never enter synthesis as cited evidence. Source budgets are ceilings: once a strict source policy has at least four relevant compliant candidates, blogs, social commentary, dictionaries, citation generators, and third-party paper utilities cannot pad the set; with zero compliant candidates, strict policy fails closed.
|
|
30
30
|
- A requested `deep_research outputPath` must be a Markdown file inside the active workspace. Path escapes, symlink escapes, `.git`, and `node_modules` are rejected, so an agent can deliver the requested report without reading private session artifacts.
|
|
31
31
|
- `web_research mode=openai` is accepted only for an active OpenAI session or when `allowHostedWebResearch=true`. A denied or failed hosted synthesis is returned with `ok=false`; any preserved snippets are labeled fallback evidence rather than hosted success.
|
|
32
32
|
- `json_specialist` stays on the active provider. A different provider requires `allowHostedJsonSpecialist=true`; ambient hosted keys and model-generated provider arguments cannot escalate a LocalLLM session.
|
|
@@ -38,6 +38,11 @@ Create, start, and finish a concrete run with `test`, `start`, `event`, and
|
|
|
38
38
|
idempotent or append-only SQLite operation suitable for a persistent tmux
|
|
39
39
|
campaign.
|
|
40
40
|
|
|
41
|
+
Test registration validates that any named capability and scenario belong to
|
|
42
|
+
the same campaign. Finishing a test updates the test, capability, and scenario
|
|
43
|
+
status in one SQLite transaction, so a typo cannot silently leave the campaign
|
|
44
|
+
matrix stale or split across contradictory states.
|
|
45
|
+
|
|
41
46
|
Inspect current coverage:
|
|
42
47
|
|
|
43
48
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.205",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgInTiFlow is a project-aware agent workspace for hybrid wet-dry R&D, hardware-aware intelligence, software automation, and industrial workflows.",
|
|
6
6
|
"license": "Apache-2.0",
|