@principles/host-runtime 4.1.2 → 4.1.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type LlmClassificationResult } from '@principles/core/runtime';
|
|
1
|
+
import { type LlmClassificationResult, type Stage2ConversationContext } from '@principles/core/runtime';
|
|
2
2
|
export interface SignalClassifierCallOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Per-call timeout override. The worker passes the cycle's REMAINING
|
|
@@ -6,6 +6,13 @@ export interface SignalClassifierCallOptions {
|
|
|
6
6
|
* uses that budget instead of relying on an outer Promise race.
|
|
7
7
|
*/
|
|
8
8
|
readonly timeoutMs?: number;
|
|
9
|
+
/**
|
|
10
|
+
* PD-BEHAVIOR-FIDELITY-001 Gate 3: host-owned conversation facts for the
|
|
11
|
+
* prompt. Callers that hold no session evidence (Codex/WorkBuddy workers,
|
|
12
|
+
* batch confirmation) omit it; the prompt then says the facts are
|
|
13
|
+
* unavailable instead of implying there was prior assistant behavior.
|
|
14
|
+
*/
|
|
15
|
+
readonly context?: Stage2ConversationContext;
|
|
9
16
|
}
|
|
10
17
|
export type SignalLlmClassifier = (text: string, options?: SignalClassifierCallOptions) => Promise<LlmClassificationResult | null>;
|
|
11
18
|
export interface SignalClassifierProfile {
|
|
@@ -42,7 +42,7 @@ export function createSignalLlmClassifier(profile, workspaceDir, options = {}) {
|
|
|
42
42
|
maxRepairAttempts: 1,
|
|
43
43
|
});
|
|
44
44
|
return async (text, callOptions) => {
|
|
45
|
-
const prompt = buildLlmPrompt(text);
|
|
45
|
+
const prompt = buildLlmPrompt(text, callOptions?.context);
|
|
46
46
|
// v0.3.1 §2.2: the effective timeout is the worker's remaining budget,
|
|
47
47
|
// and it is handed to the adapter itself (not only to an outer race).
|
|
48
48
|
const effectiveTimeoutMs = callOptions?.timeoutMs ?? timeoutMs;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/host-runtime",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3",
|
|
4
4
|
"description": "Shared host-neutral orchestration for Principles Disciple MVP-Core hook paths.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"lint": "eslint \"src/**/*.ts\""
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@principles/core": "^7.6.
|
|
38
|
+
"@principles/core": "^7.6.3",
|
|
39
39
|
"@principles/install-layout": "^0.8.1",
|
|
40
40
|
"better-sqlite3": "^13.0.3",
|
|
41
41
|
"js-yaml": "^5.4.3"
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"url": "git+https://github.com/csuzngjh/principles.git"
|
|
54
54
|
},
|
|
55
55
|
"license": "Apache-2.0",
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "a0984037f10c71f565da77ffaaf285369e265c49"
|
|
57
57
|
}
|