@principles/workbuddy-adapter 0.10.1 → 0.10.2

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.
Files changed (2) hide show
  1. package/dist/pd-hook.js +10 -1
  2. 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, loadPdConfigForPlugin, parseOwnerStatementPrefix, assessWorkbuddyCorrectionCandidate, resolveSharedCorrectionKeywordStoreForDetection, admitTrustedWorkbuddyLiveCorrection, ensureGovernanceDiagnosticianTask, resolveHostToolSemanticsForHook } from '@principles/host-runtime';
39
+ import { createAdaptivePriorityProviderForConfig, createProductionHostRuntime, createWorkbuddyRuleContextProvider, environmentFactDigestOrNull, loadPdConfigForPlugin, parseOwnerStatementPrefix, assessWorkbuddyCorrectionCandidate, resolveSharedCorrectionKeywordStoreForDetection, admitTrustedWorkbuddyLiveCorrection, ensureGovernanceDiagnosticianTask, resolveHostToolSemanticsForHook } 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';
@@ -493,11 +493,20 @@ export async function processWorkbuddyHookInvocation(rawStdin, channelEventName,
493
493
  };
494
494
  evidenceDiagnostics.push(diagnostic('degraded', `adaptive_activation_${adaptive.readiness}:${adaptive.reason}`, adaptive.nextAction));
495
495
  }
496
+ const hostVersionValue = typeof parsed === 'object' && parsed !== null ? Reflect.get(parsed, 'version') : undefined;
497
+ const hostVersion = typeof hostVersionValue === 'string' && hostVersionValue.trim().length > 0 ? hostVersionValue : null;
496
498
  const result = await createProductionHostRuntime({
497
499
  ...(adaptive?.ok ? { adaptiveGapProvider: adaptive.provider } : {}),
498
500
  ...(projectDir !== undefined ? { projectDir } : {}),
499
501
  hostKind: 'workbuddy',
500
502
  toolSemantics,
503
+ afterToolCallEnvironment: {
504
+ hostVersion,
505
+ runtimeVersion: process.version,
506
+ agentConfigDigest: environmentFactDigestOrNull(config.effective),
507
+ modelConfigDigest: environmentFactDigestOrNull(event.context.modelContext),
508
+ featureFlagsDigest: environmentFactDigestOrNull(flags),
509
+ },
501
510
  events: workbuddyEventEmitter(stateDir, evidenceContext, () => adaptiveTurnFact),
502
511
  // SPEC-RULECODE-HOST-PROMOTION-001 C: the V2 rule context provider over
503
512
  // WorkBuddy's own observable trajectory (same-session tool_calls rows
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/workbuddy-adapter",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
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": "^8.6.0",
46
- "@principles/host-runtime": "^4.9.4",
45
+ "@principles/core": "^8.7.0",
46
+ "@principles/host-runtime": "^4.10.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": "2d34c8c2614e1b84e4ea2b4c0bb56bab173da97c"
64
+ "gitHead": "1da1cdfe14b3c0a471e2b990a2aa376bbefe840b"
65
65
  }