@principles/workbuddy-adapter 0.6.0 → 0.6.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.
package/dist/index.d.ts CHANGED
@@ -14,4 +14,4 @@ export { WORKBUDDY_TOOL_SEMANTICS, WORKBUDDY_TOOL_SEMANTIC_MAPPINGS, } from './t
14
14
  export { recordWorkbuddyPromptDeliveryEvidence, recordWorkbuddyDenyEvidence, workbuddyCapabilityDeclarations, WORKBUDDY_EVIDENCE_ADAPTER_VERSION, } from './workbuddy-evidence-recorder.js';
15
15
  export { processWorkbuddyHookInvocation, annotateContextWarnings, type WorkBuddyPdHookResult, } from './pd-hook.js';
16
16
  export { runWorkbuddyWorkspaceWorkerCycle, type WorkbuddyWorkerCycleResult, type WorkbuddyWorkerCycleOptions, type WorkbuddyWorkerCycleStepReport, type WorkbuddyWorkerMode, } from './worker/workspace-worker.js';
17
- export { encodeWorkbuddyCwd, deriveWorkbuddyTranscriptPath, validateWorkbuddyTranscriptPath, workbuddyProjectsRoot, decodeWorkbuddyTranscriptWindow, createWorkbuddyTranscriptSource, WORKBUDDY_SINGLE_SESSION_ALERT_BYTES, type WorkbuddyTranscriptFileIdentity, type WorkbuddyTranscriptPathValidation, type DecodedWorkbuddyDelta, type DecodeWorkbuddyWindowInput, type WorkbuddyTranscriptSourceContext, ingestWorkbuddyConversation, workbuddyIngestionHints, catchUpWorkbuddyIngestion, type WorkbuddyIngestionOptions, type WorkbuddyIngestionOutcome, type WorkbuddyCatchUpOptions, type WorkbuddyCatchUpResult, } from './ingestion/index.js';
17
+ export { encodeWorkbuddyCwd, deriveWorkbuddyTranscriptPath, validateWorkbuddyTranscriptPath, workbuddyProjectsRoot, decodeWorkbuddyTranscriptWindow, createWorkbuddyTranscriptSource, WORKBUDDY_SINGLE_SESSION_ALERT_BYTES, type WorkbuddyTranscriptFileIdentity, type WorkbuddyTranscriptPathValidation, type DecodedWorkbuddyDelta, type DecodeWorkbuddyWindowInput, type WorkbuddyTranscriptSourceContext, ingestWorkbuddyConversation, workbuddyIngestionHints, catchUpWorkbuddyIngestion, locateWorkbuddyTranscriptBySessionIdentity, type WorkbuddyIngestionOptions, type WorkbuddyIngestionOutcome, type WorkbuddyCatchUpOptions, type WorkbuddyCatchUpResult, } from './ingestion/index.js';
package/dist/index.js CHANGED
@@ -14,4 +14,4 @@ export { WORKBUDDY_TOOL_SEMANTICS, WORKBUDDY_TOOL_SEMANTIC_MAPPINGS, } from './t
14
14
  export { recordWorkbuddyPromptDeliveryEvidence, recordWorkbuddyDenyEvidence, workbuddyCapabilityDeclarations, WORKBUDDY_EVIDENCE_ADAPTER_VERSION, } from './workbuddy-evidence-recorder.js';
15
15
  export { processWorkbuddyHookInvocation, annotateContextWarnings, } from './pd-hook.js';
16
16
  export { runWorkbuddyWorkspaceWorkerCycle, } from './worker/workspace-worker.js';
17
- export { encodeWorkbuddyCwd, deriveWorkbuddyTranscriptPath, validateWorkbuddyTranscriptPath, workbuddyProjectsRoot, decodeWorkbuddyTranscriptWindow, createWorkbuddyTranscriptSource, WORKBUDDY_SINGLE_SESSION_ALERT_BYTES, ingestWorkbuddyConversation, workbuddyIngestionHints, catchUpWorkbuddyIngestion, } from './ingestion/index.js';
17
+ export { encodeWorkbuddyCwd, deriveWorkbuddyTranscriptPath, validateWorkbuddyTranscriptPath, workbuddyProjectsRoot, decodeWorkbuddyTranscriptWindow, createWorkbuddyTranscriptSource, WORKBUDDY_SINGLE_SESSION_ALERT_BYTES, ingestWorkbuddyConversation, workbuddyIngestionHints, catchUpWorkbuddyIngestion, locateWorkbuddyTranscriptBySessionIdentity, } from './ingestion/index.js';
@@ -14,6 +14,17 @@ export interface WorkbuddyCatchUpResult {
14
14
  readonly ingested: number;
15
15
  readonly warnings: readonly string[];
16
16
  }
17
+ /**
18
+ * Find the ONE transcript file whose name equals an already checkpointed
19
+ * session identity inside the projects root. Returns null for a non-contract
20
+ * identity, an unreadable root, or zero/multiple matches — never a guess.
21
+ *
22
+ * Exported since PRI-1171 ticket ⑦: the `pd health` ingestion section stats
23
+ * the SAME located file (size only, never content) for byte-lag — one
24
+ * locator for both the writer (catch-up) and the reader (health), not a
25
+ * second implementation of the same purpose.
26
+ */
27
+ export declare function locateWorkbuddyTranscriptBySessionIdentity(projectsRoot: string, rolloutIdentity: string): string | null;
17
28
  /**
18
29
  * Re-enter the gated ingestion pipeline for every durable WorkBuddy
19
30
  * checkpoint, at most `maxRollouts` sessions per cycle.
@@ -34,8 +34,13 @@ const SESSION_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-
34
34
  * Find the ONE transcript file whose name equals an already checkpointed
35
35
  * session identity inside the projects root. Returns null for a non-contract
36
36
  * identity, an unreadable root, or zero/multiple matches — never a guess.
37
+ *
38
+ * Exported since PRI-1171 ticket ⑦: the `pd health` ingestion section stats
39
+ * the SAME located file (size only, never content) for byte-lag — one
40
+ * locator for both the writer (catch-up) and the reader (health), not a
41
+ * second implementation of the same purpose.
37
42
  */
38
- function locateCheckpointTranscript(projectsRoot, rolloutIdentity) {
43
+ export function locateWorkbuddyTranscriptBySessionIdentity(projectsRoot, rolloutIdentity) {
39
44
  if (!SESSION_ID_PATTERN.test(rolloutIdentity))
40
45
  return null;
41
46
  let entries;
@@ -122,7 +127,7 @@ export function catchUpWorkbuddyIngestion(options) {
122
127
  warnings.push(`checkpoint_defer_failed:${rolloutIdentity}:${deferred.reason}`);
123
128
  };
124
129
  for (const checkpoint of checkpoints) {
125
- const located = locateCheckpointTranscript(projectsRoot, checkpoint.rolloutIdentity);
130
+ const located = locateWorkbuddyTranscriptBySessionIdentity(projectsRoot, checkpoint.rolloutIdentity);
126
131
  if (located === null) {
127
132
  warnings.push(`transcript_unavailable:${checkpoint.rolloutIdentity}`);
128
133
  defer(checkpoint.rolloutIdentity, 'transcript_unavailable');
@@ -10,4 +10,4 @@ export { deriveWorkbuddyTranscriptPath, validateWorkbuddyTranscriptPath, workbud
10
10
  export { decodeWorkbuddyTranscriptWindow, type DecodedWorkbuddyDelta, type DecodeWorkbuddyWindowInput, } from './transcript-decoder.js';
11
11
  export { createWorkbuddyTranscriptSource, WORKBUDDY_SINGLE_SESSION_ALERT_BYTES, type WorkbuddyTranscriptSourceContext, } from './transcript-source.js';
12
12
  export { ingestWorkbuddyConversation, workbuddyIngestionHints, type WorkbuddyIngestionOptions, type WorkbuddyIngestionOutcome, } from './ingestion.js';
13
- export { catchUpWorkbuddyIngestion, type WorkbuddyCatchUpOptions, type WorkbuddyCatchUpResult, } from './catch-up.js';
13
+ export { catchUpWorkbuddyIngestion, locateWorkbuddyTranscriptBySessionIdentity, type WorkbuddyCatchUpOptions, type WorkbuddyCatchUpResult, } from './catch-up.js';
@@ -10,4 +10,4 @@ export { deriveWorkbuddyTranscriptPath, validateWorkbuddyTranscriptPath, workbud
10
10
  export { decodeWorkbuddyTranscriptWindow, } from './transcript-decoder.js';
11
11
  export { createWorkbuddyTranscriptSource, WORKBUDDY_SINGLE_SESSION_ALERT_BYTES, } from './transcript-source.js';
12
12
  export { ingestWorkbuddyConversation, workbuddyIngestionHints, } from './ingestion.js';
13
- export { catchUpWorkbuddyIngestion, } from './catch-up.js';
13
+ export { catchUpWorkbuddyIngestion, locateWorkbuddyTranscriptBySessionIdentity, } from './catch-up.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/workbuddy-adapter",
3
- "version": "0.6.0",
3
+ "version": "0.6.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": "^7.4.0",
46
- "@principles/host-runtime": "^3.5.0",
45
+ "@principles/core": "^7.6.0",
46
+ "@principles/host-runtime": "^4.1.0",
47
47
  "@principles/install-layout": "^0.8.0"
48
48
  },
49
49
  "devDependencies": {
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "5c7389e72a6409efb00891327a63dfc01a2009cb"
64
+ "gitHead": "d70d277260da6f9ef2fcbecb622501cea504a12c"
65
65
  }