@remnic/core 10.0.170 → 10.0.171
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/dist/access-admin-ops-surface.js +1 -1
- package/dist/access-cli.js +1 -1
- package/dist/access-extraction-force-flush-preempt.js +1 -1
- package/dist/access-extraction-force-flush.js +1 -1
- package/dist/access-http-briefing.js +1 -1
- package/dist/access-http-query.js +1 -1
- package/dist/access-http.js +1 -1
- package/dist/access-identity-continuity-surface.js +1 -1
- package/dist/access-lcm-surface.js +1 -1
- package/dist/access-mcp.js +1 -1
- package/dist/access-observe-write-surface.js +1 -1
- package/dist/access-operations-batch.js +1 -1
- package/dist/access-operations.js +1 -1
- package/dist/access-recall-concurrency.js +1 -1
- package/dist/access-recall-response.js +1 -1
- package/dist/access-recall-surface.js +1 -1
- package/dist/access-service.js +1 -1
- package/dist/chat/chat-engine.d.ts +5 -3
- package/dist/chat/chat-engine.d.ts.map +1 -1
- package/dist/chat/chat-executor.d.ts +3 -4
- package/dist/chat/chat-executor.d.ts.map +1 -1
- package/dist/{chunk-QMFHKWHN.js → chunk-SLWD7TB6.js} +2 -2
- package/dist/{chunk-5YIOUS5T.js → chunk-T2KCROPA.js} +28 -19
- package/dist/chunk-T2KCROPA.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/correction/correction-access-wiring.d.ts +4 -1
- package/dist/correction/correction-access-wiring.d.ts.map +1 -1
- package/dist/explicit-capture.js +1 -1
- package/dist/index.js +1 -1
- package/dist/orchestration/backlog-scheduler.js +2 -2
- package/dist/orchestration/buffer-drain-runner.js +2 -2
- package/dist/orchestrator.js +1 -1
- package/dist/recall-navigation.js +1 -1
- package/package.json +2 -2
- package/src/chat/chat-engine.ts +5 -3
- package/src/chat/chat-executor.test.ts +150 -0
- package/src/chat/chat-executor.ts +31 -20
- package/src/chat/chat-factory.ts +1 -1
- package/src/correction/correction-access-wiring.ts +4 -1
- package/dist/chunk-5YIOUS5T.js.map +0 -1
- /package/dist/{chunk-QMFHKWHN.js.map → chunk-SLWD7TB6.js.map} +0 -0
package/dist/access-cli.js
CHANGED
package/dist/access-http.js
CHANGED
package/dist/access-mcp.js
CHANGED
package/dist/access-service.js
CHANGED
|
@@ -31,15 +31,17 @@ export interface ChatToolExecutor {
|
|
|
31
31
|
scopeInspect(): Promise<string>;
|
|
32
32
|
/**
|
|
33
33
|
* Generate a correction plan. Returns a JSON string with a planId and
|
|
34
|
-
* a diff preview
|
|
35
|
-
* this is a stub that returns a not-available marker.
|
|
34
|
+
* a diff preview, backed by the Correction Contract (#1580) pipeline.
|
|
36
35
|
*/
|
|
37
36
|
correctionPlan(request: string): Promise<{
|
|
38
37
|
planId: string;
|
|
39
38
|
preview: string;
|
|
40
39
|
}>;
|
|
41
40
|
/**
|
|
42
|
-
* Apply a correction plan. Returns a JSON result string.
|
|
41
|
+
* Apply a correction plan. Returns a JSON result string. Implementations
|
|
42
|
+
* pass `confirm: true` to the service; the engine's preview-confirm
|
|
43
|
+
* protocol is the consent that satisfies the apply gate, so this method
|
|
44
|
+
* must stay reachable only through the engine's confirmation flow.
|
|
43
45
|
*/
|
|
44
46
|
correctionApply(planId: string): Promise<string>;
|
|
45
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-engine.d.ts","sourceRoot":"","sources":["../../src/chat/chat-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EACV,cAAc,EAEd,gBAAgB,EAGhB,cAAc,EACf,MAAM,iBAAiB,CAAC;AAYzB;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,cAAc,CAAC,QAAQ,EAAE,MAAM,E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R1B;;OAEG;YACW,WAAW;CAuD1B"}
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
* session's principal/namespace/sessionKey so every tool call flows through
|
|
7
7
|
* access-service with the caller's identity (rule 42).
|
|
8
8
|
*
|
|
9
|
-
* Correction tools (correction_plan / correction_apply / memory_promote)
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* surfaces degrade gracefully.
|
|
9
|
+
* Correction tools (correction_plan / correction_apply / memory_promote)
|
|
10
|
+
* delegate to the Correction Contract (#1580) plan/apply pipeline through
|
|
11
|
+
* the access-service.
|
|
13
12
|
*/
|
|
14
13
|
import type { EngramAccessService } from "../access-service.js";
|
|
15
14
|
import type { ChatToolExecutor } from "./chat-engine.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-executor.d.ts","sourceRoot":"","sources":["../../src/chat/chat-executor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"chat-executor.d.ts","sourceRoot":"","sources":["../../src/chat/chat-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,gBAAgB,CAqHnF"}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ExtractionDrain,
|
|
3
3
|
TurnIngestionCoordinator,
|
|
4
4
|
shouldSkipImplicitExtraction
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-T2KCROPA.js";
|
|
6
6
|
import {
|
|
7
7
|
headerConnector,
|
|
8
8
|
renderExtractionConversation,
|
|
@@ -447,4 +447,4 @@ export {
|
|
|
447
447
|
ClaimBufferStorage,
|
|
448
448
|
BufferDrainRunner
|
|
449
449
|
};
|
|
450
|
-
//# sourceMappingURL=chunk-
|
|
450
|
+
//# sourceMappingURL=chunk-SLWD7TB6.js.map
|
|
@@ -34648,6 +34648,10 @@ function stripToolCallJson(content, toolCalls) {
|
|
|
34648
34648
|
// src/chat/chat-executor.ts
|
|
34649
34649
|
function createChatExecutor(bindings) {
|
|
34650
34650
|
const { service, principal, namespace, sessionKey } = bindings;
|
|
34651
|
+
const correctionScope = {};
|
|
34652
|
+
if (namespace) correctionScope.namespace = namespace;
|
|
34653
|
+
if (sessionKey) correctionScope.sessionKey = sessionKey;
|
|
34654
|
+
if (principal) correctionScope.principal = principal;
|
|
34651
34655
|
return {
|
|
34652
34656
|
async memorySearch(query, maxResults) {
|
|
34653
34657
|
const result = await service.memorySearch({
|
|
@@ -34698,27 +34702,32 @@ function createChatExecutor(bindings) {
|
|
|
34698
34702
|
sessionKey: sessionKey ?? void 0
|
|
34699
34703
|
});
|
|
34700
34704
|
},
|
|
34701
|
-
// ── Correction tools —
|
|
34702
|
-
//
|
|
34703
|
-
//
|
|
34704
|
-
//
|
|
34705
|
-
// single-file change here.
|
|
34705
|
+
// ── Correction tools — Correction Contract (#1580) ─────────────────
|
|
34706
|
+
// Thin adapters over the service's plan/apply pipeline. The engine's
|
|
34707
|
+
// confirmation interception asks for a pending plan's preview via the
|
|
34708
|
+
// "retrieve plan <id>" sentinel; that is a lookup, not a new plan.
|
|
34706
34709
|
async correctionPlan(request) {
|
|
34707
|
-
|
|
34708
|
-
|
|
34709
|
-
|
|
34710
|
-
|
|
34711
|
-
|
|
34712
|
-
|
|
34713
|
-
|
|
34714
|
-
|
|
34710
|
+
const retrieve = /^retrieve plan (\S+)$/i.exec(request.trim());
|
|
34711
|
+
if (retrieve) {
|
|
34712
|
+
const pending = await service.correctionListPending(correctionScope);
|
|
34713
|
+
const plan2 = pending.find((p) => p.planId === retrieve[1]);
|
|
34714
|
+
if (!plan2) {
|
|
34715
|
+
throw new Error(`Correction plan ${retrieve[1]} not found or expired.`);
|
|
34716
|
+
}
|
|
34717
|
+
return { planId: plan2.planId, preview: plan2.diff };
|
|
34718
|
+
}
|
|
34719
|
+
const plan = await service.correctionPlan({
|
|
34720
|
+
text: request,
|
|
34721
|
+
...correctionScope
|
|
34722
|
+
});
|
|
34723
|
+
return { planId: plan.planId, preview: plan.diff };
|
|
34715
34724
|
},
|
|
34716
34725
|
async correctionApply(planId) {
|
|
34717
|
-
|
|
34718
|
-
|
|
34719
|
-
|
|
34720
|
-
reason: "Correction Contract (#1580) not yet available. No mutation was applied."
|
|
34726
|
+
const outcome = await service.correctionApply(planId, {
|
|
34727
|
+
confirm: true,
|
|
34728
|
+
...correctionScope
|
|
34721
34729
|
});
|
|
34730
|
+
return JSON.stringify(outcome);
|
|
34722
34731
|
},
|
|
34723
34732
|
async memoryPromote(memoryId) {
|
|
34724
34733
|
try {
|
|
@@ -35006,7 +35015,7 @@ function createChatEngine(opts) {
|
|
|
35006
35015
|
executor,
|
|
35007
35016
|
maxToolCallsPerTurn: opts.config.maxToolCallsPerTurn,
|
|
35008
35017
|
...opts.config.model ? { model: opts.config.model } : {},
|
|
35009
|
-
correctionAvailable:
|
|
35018
|
+
correctionAvailable: opts.service.correctionSurfaceVisible,
|
|
35010
35019
|
scopeInspectAvailable: false
|
|
35011
35020
|
});
|
|
35012
35021
|
}
|
|
@@ -67944,4 +67953,4 @@ export {
|
|
|
67944
67953
|
EngramAccessService,
|
|
67945
67954
|
AccessAdminOpsSurface
|
|
67946
67955
|
};
|
|
67947
|
-
//# sourceMappingURL=chunk-
|
|
67956
|
+
//# sourceMappingURL=chunk-T2KCROPA.js.map
|