@principles/workbuddy-adapter 0.11.0 → 0.11.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/dist/pd-hook.js +9 -3
- package/package.json +4 -4
package/dist/pd-hook.js
CHANGED
|
@@ -36,7 +36,7 @@ import path from 'node:path';
|
|
|
36
36
|
import process from 'node:process';
|
|
37
37
|
import { pathToFileURL, fileURLToPath } from 'node:url';
|
|
38
38
|
import { appendEventLogLine, redactTelemetryString, isRuleHostEvaluatedEventData } from '@principles/core/runtime';
|
|
39
|
-
import { createAdaptivePriorityProviderForConfig, createProductionHostRuntime, createWorkbuddyRuleContextProvider, environmentFactDigestOrNull, loadPdConfigForPlugin, parseOwnerStatementPrefix, assessWorkbuddyCorrectionCandidate, resolveSharedCorrectionKeywordStoreForDetection, admitTrustedWorkbuddyLiveCorrection, ensureGovernanceDiagnosticianTask, resolveHostToolSemanticsForHook, recordIdleAuditTurnCompleted
|
|
39
|
+
import { createAdaptivePriorityProviderForConfig, createProductionHostRuntime, observeForwardTurnClose, createWorkbuddyRuleContextProvider, environmentFactDigestOrNull, loadPdConfigForPlugin, parseOwnerStatementPrefix, assessWorkbuddyCorrectionCandidate, resolveSharedCorrectionKeywordStoreForDetection, admitTrustedWorkbuddyLiveCorrection, ensureGovernanceDiagnosticianTask, resolveHostToolSemanticsForHook, recordIdleAuditTurnCompleted } from '@principles/host-runtime';
|
|
40
40
|
import { computeFeatureFlagsFromConfig } from '@principles/core/runtime';
|
|
41
41
|
import { WorkBuddyHooksHostAdapter } from './host-adapter.js';
|
|
42
42
|
import { WORKBUDDY_TOOL_SEMANTIC_MAPPINGS, WORKBUDDY_TOOL_SEMANTICS } from './tool-semantics.js';
|
|
@@ -406,13 +406,19 @@ export async function processWorkbuddyHookInvocation(rawStdin, channelEventName,
|
|
|
406
406
|
return neutralWithDiagnostics([]);
|
|
407
407
|
}
|
|
408
408
|
if (event.kind === 'turn_complete') {
|
|
409
|
+
const closeDiagnostics = observeForwardTurnClose({
|
|
410
|
+
workspaceDir: resolution.workspaceDir,
|
|
411
|
+
hostKind: 'workbuddy',
|
|
412
|
+
sessionId: event.context.sessionId,
|
|
413
|
+
...(event.context.turnId !== undefined ? { turnId: event.context.turnId } : {}),
|
|
414
|
+
}).map((warning) => diagnostic('degraded', warning, 'Inspect trajectory.db forward evidence; Stop ingestion remains non-blocking.'));
|
|
409
415
|
// PRI-1171 P2 ticket ⑤: the authenticated Stop hook is the ingestion
|
|
410
416
|
// trigger. Neutral output is MANDATORY — WorkBuddy injects any stdout
|
|
411
417
|
// into model-visible context (P04). Flag-off stays completely silent so
|
|
412
418
|
// the pre-wiring behavior is unchanged; the consent gate and the
|
|
413
419
|
// transcript port are both inside ingestWorkbuddyConversation.
|
|
414
420
|
if (flags.workbuddy_conversation_ingestion?.enabled !== true) {
|
|
415
|
-
return neutralWithDiagnostics(
|
|
421
|
+
return neutralWithDiagnostics(closeDiagnostics);
|
|
416
422
|
}
|
|
417
423
|
recordIdleAuditTurnCompleted({
|
|
418
424
|
workspaceDir: resolution.workspaceDir,
|
|
@@ -438,7 +444,7 @@ export async function processWorkbuddyHookInvocation(rawStdin, channelEventName,
|
|
|
438
444
|
return neutralWithDiagnostics(ingestion.warnings.slice(0, 2).map((warning) => diagnostic(warning.startsWith('wb_skipped') ? 'skipped' : 'degraded', warning, 'Inspect the WorkBuddy transcript and the governance trajectory checkpoint; ingestion warnings are bounded and non-blocking.')));
|
|
439
445
|
}
|
|
440
446
|
if (ingestion.status === 'skipped')
|
|
441
|
-
return neutralWithDiagnostics(
|
|
447
|
+
return neutralWithDiagnostics(closeDiagnostics);
|
|
442
448
|
return neutralWithDiagnostics([diagnostic('degraded', ingestion.reason, ingestion.nextAction)]);
|
|
443
449
|
}
|
|
444
450
|
const evidenceDiagnostics = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principles/workbuddy-adapter",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "WorkBuddy host adapter for Principles Disciple — implements the HostAdapter interface for WorkBuddy's Git Bash command-hook model (ADR-0020 third host, SPEC workbuddy-host-adapter v0.3.0).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"lint": "eslint \"src/**/*.ts\""
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@principles/core": "^9.
|
|
46
|
-
"@principles/host-runtime": "^4.
|
|
45
|
+
"@principles/core": "^9.1.0",
|
|
46
|
+
"@principles/host-runtime": "^4.12.0",
|
|
47
47
|
"@principles/install-layout": "^0.12.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "e14270ad721ec3a3352d629bb8254be81842cc38"
|
|
65
65
|
}
|