@pellux/goodvibes-sdk 0.33.37 → 0.34.0
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/client-auth/control-plane-auth-snapshot.d.ts +23 -0
- package/dist/client-auth/control-plane-auth-snapshot.d.ts.map +1 -1
- package/dist/client-auth/oauth-types.d.ts +18 -0
- package/dist/client-auth/oauth-types.d.ts.map +1 -1
- package/dist/client-auth/types.d.ts +26 -0
- package/dist/client-auth/types.d.ts.map +1 -1
- package/dist/client.d.ts +22 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/contracts/artifacts/operator-contract.json +1463 -10
- package/dist/events/knowledge.d.ts +31 -0
- package/dist/events/knowledge.d.ts.map +1 -1
- package/dist/events/tasks.d.ts +58 -0
- package/dist/events/tasks.d.ts.map +1 -1
- package/dist/events/transport.d.ts +60 -0
- package/dist/events/transport.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-config.d.ts +6 -0
- package/dist/platform/agents/wrfc-config.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-config.js +6 -0
- package/dist/platform/agents/wrfc-controller.d.ts +74 -0
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +368 -9
- package/dist/platform/agents/wrfc-reporting.d.ts +60 -0
- package/dist/platform/agents/wrfc-reporting.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-reporting.js +131 -7
- package/dist/platform/agents/wrfc-types.d.ts +12 -0
- package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
- package/dist/platform/config/manager.d.ts +11 -0
- package/dist/platform/config/manager.d.ts.map +1 -1
- package/dist/platform/config/manager.js +17 -1
- package/dist/platform/config/schema-domain-core.d.ts +2 -0
- package/dist/platform/config/schema-domain-core.d.ts.map +1 -1
- package/dist/platform/config/schema-domain-core.js +17 -0
- package/dist/platform/config/schema-shared.d.ts +6 -0
- package/dist/platform/config/schema-shared.d.ts.map +1 -1
- package/dist/platform/config/schema-types.d.ts +9 -2
- package/dist/platform/config/schema-types.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-calendar.d.ts +9 -0
- package/dist/platform/control-plane/method-catalog-calendar.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-calendar.js +117 -0
- package/dist/platform/control-plane/method-catalog-channels.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-channels.js +174 -0
- package/dist/platform/control-plane/method-catalog-control-automation.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-control-automation.js +10 -4
- package/dist/platform/control-plane/method-catalog-email.d.ts +9 -0
- package/dist/platform/control-plane/method-catalog-email.d.ts.map +1 -0
- package/dist/platform/control-plane/method-catalog-email.js +101 -0
- package/dist/platform/control-plane/method-catalog-knowledge.js +4 -4
- package/dist/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog-runtime.js +13 -0
- package/dist/platform/control-plane/method-catalog.d.ts.map +1 -1
- package/dist/platform/control-plane/method-catalog.js +4 -0
- package/dist/platform/control-plane/routes/automation.js +2 -2
- package/dist/platform/control-plane/routes/operator.d.ts.map +1 -1
- package/dist/platform/control-plane/routes/operator.js +2 -0
- package/dist/platform/control-plane/routes/sessions.js +1 -1
- package/dist/platform/daemon/http/router.d.ts.map +1 -1
- package/dist/platform/daemon/http/router.js +12 -2
- package/dist/platform/daemon/http-listener.d.ts +17 -0
- package/dist/platform/daemon/http-listener.d.ts.map +1 -1
- package/dist/platform/daemon/http-listener.js +186 -7
- package/dist/platform/knowledge/knowledge-api.d.ts +1 -1
- package/dist/platform/knowledge/knowledge-api.d.ts.map +1 -1
- package/dist/platform/knowledge/knowledge-api.js +1 -1
- package/dist/platform/runtime/store/helpers/reducers/lifecycle.d.ts.map +1 -1
- package/dist/platform/runtime/store/helpers/reducers/lifecycle.js +4 -0
- package/dist/platform/runtime/store/helpers/reducers/sync.d.ts.map +1 -1
- package/dist/platform/runtime/store/helpers/reducers/sync.js +4 -0
- package/dist/platform/security/http-auth.d.ts.map +1 -1
- package/dist/platform/security/http-auth.js +11 -4
- package/dist/platform/security/user-auth.d.ts +98 -2
- package/dist/platform/security/user-auth.d.ts.map +1 -1
- package/dist/platform/security/user-auth.js +195 -18
- package/dist/platform/sessions/manager.d.ts +19 -2
- package/dist/platform/sessions/manager.d.ts.map +1 -1
- package/dist/platform/sessions/manager.js +43 -6
- package/dist/platform/state/memory-registry.d.ts +1 -1
- package/dist/platform/state/memory-registry.d.ts.map +1 -1
- package/dist/platform/state/memory-registry.js +2 -2
- package/dist/platform/state/memory-store.d.ts +1 -1
- package/dist/platform/state/memory-store.d.ts.map +1 -1
- package/dist/platform/state/memory-store.js +2 -2
- package/dist/platform/version.js +1 -1
- package/package.json +9 -9
|
@@ -8,6 +8,37 @@ export type KnowledgeEvent = {
|
|
|
8
8
|
connectorId: string;
|
|
9
9
|
sourceType: string;
|
|
10
10
|
uri?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Granular progress update during a knowledge ingest pipeline run.
|
|
14
|
+
*
|
|
15
|
+
* Emitted by the knowledge ingest engine at each processing phase so UIs can
|
|
16
|
+
* render live progress bars for long-running ingest operations (e.g. large
|
|
17
|
+
* document sets, semantic indexing).
|
|
18
|
+
*
|
|
19
|
+
* **Integration note:** Emission sites live in `platform/knowledge`. Wire by calling
|
|
20
|
+
* `bus.emit('knowledge', { type: 'KNOWLEDGE_INGEST_PROGRESS', ... })` at each
|
|
21
|
+
* phase-transition or item-complete checkpoint in the ingest pipeline. The contract
|
|
22
|
+
* is defined here so SDK consumers can subscribe without depending on the internal
|
|
23
|
+
* knowledge module.
|
|
24
|
+
*
|
|
25
|
+
* **Scope note:** `operationId` is operation-scoped (not task-scoped). See `lifecycle.ts`
|
|
26
|
+
* for the guard that ties progress events to their originating operation lifecycle.
|
|
27
|
+
*/
|
|
28
|
+
| {
|
|
29
|
+
type: 'KNOWLEDGE_INGEST_PROGRESS';
|
|
30
|
+
/** Stable ingest operation identifier (matches KNOWLEDGE_INGEST_STARTED.sourceId). */
|
|
31
|
+
operationId: string;
|
|
32
|
+
/** Current pipeline phase (e.g. `'downloading'`, `'parsing'`, `'chunking'`, `'embedding'`, `'indexing'`). */
|
|
33
|
+
phase: string;
|
|
34
|
+
/** Items processed in the current phase so far. */
|
|
35
|
+
completed: number;
|
|
36
|
+
/** Total items for this phase (undefined if not yet determined). */
|
|
37
|
+
total?: number | undefined;
|
|
38
|
+
/** Completion percentage 0–100 (undefined if total unknown). */
|
|
39
|
+
percent?: number | undefined;
|
|
40
|
+
/** Optional human-readable status message (e.g. current file name). */
|
|
41
|
+
message?: string | undefined;
|
|
11
42
|
} | {
|
|
12
43
|
type: 'KNOWLEDGE_INGEST_COMPLETED';
|
|
13
44
|
sourceId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../../src/events/knowledge.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;GAEG;AAEH,MAAM,MAAM,cAAc,GACtB;IACE,IAAI,EAAE,0BAA0B,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,GACD;IACE,IAAI,EAAE,4BAA4B,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,GACD;IACE,IAAI,EAAE,yBAAyB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,gCAAgC,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAA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C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,GACD;IACE,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEN,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/events/tasks.d.ts
CHANGED
|
@@ -55,6 +55,64 @@ export type TaskEvent =
|
|
|
55
55
|
taskId: string;
|
|
56
56
|
agentId?: string | undefined;
|
|
57
57
|
reason?: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Granular progress update for a batch job running as a task.
|
|
61
|
+
*
|
|
62
|
+
* Emitted by the batch processor as each item completes. UIs should use this
|
|
63
|
+
* to render progress bars and ETA estimates for long-running batch operations.
|
|
64
|
+
*
|
|
65
|
+
* **Integration note:** Emission sites live in `platform/batch`. Wire by calling
|
|
66
|
+
* `bus.emit('tasks', { type: 'BATCH_JOB_PROGRESS', ... })` at each item-complete
|
|
67
|
+
* checkpoint inside the batch runner. The contract is defined here so SDK consumers
|
|
68
|
+
* can subscribe to it without depending on the internal batch module.
|
|
69
|
+
*
|
|
70
|
+
* **Scope note:** `operationId` is operation-scoped (not task-scoped). See `lifecycle.ts`
|
|
71
|
+
* for the guard that ties progress events to their originating operation lifecycle.
|
|
72
|
+
*/
|
|
73
|
+
| {
|
|
74
|
+
type: 'BATCH_JOB_PROGRESS';
|
|
75
|
+
/** Stable identifier for this batch operation (survives retries). */
|
|
76
|
+
operationId: string;
|
|
77
|
+
/** Human-readable label for the current processing phase (e.g. `'embedding'`, `'indexing'`). */
|
|
78
|
+
phase: string;
|
|
79
|
+
/** Number of items completed so far. */
|
|
80
|
+
completed: number;
|
|
81
|
+
/** Total items in the batch (undefined if not yet known). */
|
|
82
|
+
total?: number | undefined;
|
|
83
|
+
/** Completion percentage 0–100 (undefined if total unknown). */
|
|
84
|
+
percent?: number | undefined;
|
|
85
|
+
/** Optional human-readable status message. */
|
|
86
|
+
message?: string | undefined;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Granular progress update for an export operation.
|
|
90
|
+
*
|
|
91
|
+
* Emitted by the export engine as records are serialised. UIs should use this
|
|
92
|
+
* to render progress indicators for long-running export jobs.
|
|
93
|
+
*
|
|
94
|
+
* **Integration note:** Emission sites live in `platform/export`. Wire by calling
|
|
95
|
+
* `bus.emit('tasks', { type: 'EXPORT_PROGRESS', ... })` at each record-write
|
|
96
|
+
* checkpoint inside the export runner. The contract is defined here so SDK consumers
|
|
97
|
+
* can subscribe without depending on the internal export module.
|
|
98
|
+
*
|
|
99
|
+
* **Scope note:** `operationId` is operation-scoped (not task-scoped). See `lifecycle.ts`
|
|
100
|
+
* for the guard that ties progress events to their originating operation lifecycle.
|
|
101
|
+
*/
|
|
102
|
+
| {
|
|
103
|
+
type: 'EXPORT_PROGRESS';
|
|
104
|
+
/** Stable identifier for this export operation. */
|
|
105
|
+
operationId: string;
|
|
106
|
+
/** Current phase of the export pipeline (e.g. `'querying'`, `'serializing'`, `'compressing'`). */
|
|
107
|
+
phase: string;
|
|
108
|
+
/** Records exported so far. */
|
|
109
|
+
completed: number;
|
|
110
|
+
/** Total records to export (undefined if not yet determined). */
|
|
111
|
+
total?: number | undefined;
|
|
112
|
+
/** Completion percentage 0–100 (undefined if total unknown). */
|
|
113
|
+
percent?: number | undefined;
|
|
114
|
+
/** Optional human-readable status message (e.g. estimated time remaining). */
|
|
115
|
+
message?: string | undefined;
|
|
58
116
|
};
|
|
59
117
|
/** All task event type literals as a union. */
|
|
60
118
|
export type TaskEventType = TaskEvent['type'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/events/tasks.ts"],"names":[],"mappings":"AA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AC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE;AACvG;;;;;;;;;;;;;GAaG;GACD;IACE,IAAI,EAAE,oBAAoB,CAAC;IAC3B,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AACH;;;;;;;;;;;;;GAaG;GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,kGAAkG;IAClG,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEN,+CAA+C;AAC/C,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -83,6 +83,66 @@ export type TransportEvent =
|
|
|
83
83
|
subscriberId: string;
|
|
84
84
|
streamType: string;
|
|
85
85
|
reason?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The outbound WebSocket queue has saturated and messages are being dropped.
|
|
89
|
+
*
|
|
90
|
+
* This event is emitted when `MAX_OUTBOUND_QUEUE` entries or `MAX_OUTBOUND_QUEUE_BYTES`
|
|
91
|
+
* total bytes are exceeded, or when a single message exceeds `MAX_OUTBOUND_MESSAGE_BYTES`.
|
|
92
|
+
* Subscribe to this in UI layers to show a "connection lagging" indicator.
|
|
93
|
+
*
|
|
94
|
+
* The `onBackpressure` callback in `RuntimeEventConnectorOptions` fires at the same
|
|
95
|
+
* time and provides identical information for non-event-bus consumers.
|
|
96
|
+
*/
|
|
97
|
+
| {
|
|
98
|
+
type: 'TRANSPORT_BACKPRESSURE';
|
|
99
|
+
/** Transport/connector identifier (domain name for WS connectors). */
|
|
100
|
+
transportId: string;
|
|
101
|
+
/** Number of messages dropped since the last successful queue flush. */
|
|
102
|
+
droppedCount: number;
|
|
103
|
+
/** Current number of messages waiting in the outbound buffer. */
|
|
104
|
+
queueLength: number;
|
|
105
|
+
/** Current byte footprint of the outbound buffer. */
|
|
106
|
+
queueBytes: number;
|
|
107
|
+
/** Overflow reason. */
|
|
108
|
+
reason: 'message_too_large' | 'queue_full';
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The realtime transport connection state has changed.
|
|
112
|
+
*
|
|
113
|
+
* Emitted by `createWebSocketConnector` on every state transition. Subscribe
|
|
114
|
+
* to this in UI layers to drive connection-state badges (e.g. online/reconnecting
|
|
115
|
+
* indicators).
|
|
116
|
+
*
|
|
117
|
+
* The `onConnectionStateChange` callback in `RuntimeEventConnectorOptions` fires
|
|
118
|
+
* at the same time and provides the same state string for non-event-bus consumers.
|
|
119
|
+
*/
|
|
120
|
+
| {
|
|
121
|
+
type: 'TRANSPORT_CONNECTION_STATE';
|
|
122
|
+
/** Transport/connector identifier (domain name for WS connectors). */
|
|
123
|
+
transportId: string;
|
|
124
|
+
/** New connection state. */
|
|
125
|
+
state: 'connecting' | 'connected' | 'reconnecting' | 'disconnected' | 'failed';
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A realtime transport reconnect attempt is scheduled.
|
|
129
|
+
*
|
|
130
|
+
* Provides richer reconnect metadata than `TRANSPORT_RECONNECTING` (which only
|
|
131
|
+
* carries `attempt` and `maxAttempts`). Subscribe to this for detailed backoff
|
|
132
|
+
* visualisation in diagnostic UIs.
|
|
133
|
+
*/
|
|
134
|
+
| {
|
|
135
|
+
type: 'TRANSPORT_RECONNECT_ATTEMPT';
|
|
136
|
+
/** Transport/connector identifier (domain name for WS connectors). */
|
|
137
|
+
transportId: string;
|
|
138
|
+
/** 1-based attempt index. */
|
|
139
|
+
attempt: number;
|
|
140
|
+
/** Maximum attempts configured. */
|
|
141
|
+
maxAttempts: number;
|
|
142
|
+
/** Milliseconds the connector will wait before the next connect call. */
|
|
143
|
+
delayMs: number;
|
|
144
|
+
/** Human-readable reason for the reconnect. */
|
|
145
|
+
reason: string;
|
|
86
146
|
};
|
|
87
147
|
/** All transport event type literals as a union. */
|
|
88
148
|
export type TransportEventType = TransportEvent['type'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/events/transport.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;GAIG;AAEH,MAAM,MAAM,cAAc;AACxB,4CAA4C;AAC1C;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AAC3E,4DAA4D;GAC1D;IAAE,IAAI,EAAE,0BAA0B,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;AAC3D,qDAAqD;GACnD;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE;AACxE,wDAAwD;GACtD;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;AACpD,qEAAqE;GACnE;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACrE,4DAA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AE,MAAM,CAAC;CAChB,CAAC;AAEN,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -10,9 +10,15 @@ export type WrfcConfigLike = {
|
|
|
10
10
|
command: string;
|
|
11
11
|
enabled: boolean;
|
|
12
12
|
}>;
|
|
13
|
+
/**
|
|
14
|
+
* How long (in ms) to wait for an agent event before treating a running agent
|
|
15
|
+
* as hung/silent and failing the chain. Default: 0 (disabled).
|
|
16
|
+
*/
|
|
17
|
+
agentHeartbeatTimeoutMs: number;
|
|
13
18
|
};
|
|
14
19
|
export type WrfcConfigReader = Pick<ConfigManager, 'get' | 'getCategory'>;
|
|
15
20
|
export declare function readWrfcConfig(configManager: WrfcConfigReader): WrfcConfigLike;
|
|
21
|
+
export declare function getWrfcAgentHeartbeatTimeoutMs(configManager: WrfcConfigReader): number;
|
|
16
22
|
export declare function getWrfcScoreThreshold(configManager: WrfcConfigReader): number;
|
|
17
23
|
export declare function getWrfcMaxFixAttempts(configManager: WrfcConfigReader): number;
|
|
18
24
|
export declare function getWrfcAutoCommit(configManager: WrfcConfigReader): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrfc-config.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,OAAO,CAAC,CAAC;AACxH,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC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EAAE,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,CAE5F"}
|
|
@@ -11,8 +11,14 @@ export function readWrfcConfig(configManager) {
|
|
|
11
11
|
? configManager.get('wrfc.autoCommit')
|
|
12
12
|
: wrfcConfig?.autoCommit ?? false,
|
|
13
13
|
gates: Array.isArray(wrfcConfig?.gates) ? wrfcConfig.gates : [],
|
|
14
|
+
agentHeartbeatTimeoutMs: typeof configManager.get('wrfc.agentHeartbeatTimeoutMs') === 'number'
|
|
15
|
+
? configManager.get('wrfc.agentHeartbeatTimeoutMs')
|
|
16
|
+
: wrfcConfig?.agentHeartbeatTimeoutMs ?? 0,
|
|
14
17
|
};
|
|
15
18
|
}
|
|
19
|
+
export function getWrfcAgentHeartbeatTimeoutMs(configManager) {
|
|
20
|
+
return readWrfcConfig(configManager).agentHeartbeatTimeoutMs ?? 0;
|
|
21
|
+
}
|
|
16
22
|
export function getWrfcScoreThreshold(configManager) {
|
|
17
23
|
return readWrfcConfig(configManager).scoreThreshold ?? 9.9;
|
|
18
24
|
}
|
|
@@ -9,6 +9,11 @@ import type { RuntimeEventBus } from '../runtime/events/index.js';
|
|
|
9
9
|
import type { ProjectWorkPlanTaskCreateInput, ProjectWorkPlanTaskUpdateInput } from '../knowledge/project-planning/index.js';
|
|
10
10
|
import { type AgentManagerLike } from './wrfc-config.js';
|
|
11
11
|
export { extractScoreFromText, extractPassedFromText, extractIssuesFromText } from './wrfc-reporting.js';
|
|
12
|
+
/**
|
|
13
|
+
* Schema version for the serialized WRFC chain envelope.
|
|
14
|
+
* Increment when the WrfcChain shape changes in an incompatible way.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CURRENT_WRFC_CHAIN_SCHEMA_VERSION = 1;
|
|
12
17
|
type WrfcWorktreeOps = Pick<AgentWorktree, 'merge' | 'cleanup'> & Partial<Pick<AgentWorktree, 'commitWorkingTree' | 'currentHead'>>;
|
|
13
18
|
type WrfcWorkPlanService = {
|
|
14
19
|
createWorkPlanTask(input: ProjectWorkPlanTaskCreateInput): Promise<unknown>;
|
|
@@ -22,6 +27,9 @@ export declare class WrfcController {
|
|
|
22
27
|
private readonly sessionId;
|
|
23
28
|
private readonly workmap;
|
|
24
29
|
private readonly projectRoot;
|
|
30
|
+
private readonly skipClaimVerification;
|
|
31
|
+
/** Cached at construction time: whether projectRoot existed on disk when this controller was created. */
|
|
32
|
+
private readonly projectRootExistedAtStartup;
|
|
25
33
|
private runtimeBus;
|
|
26
34
|
private readonly messageBus;
|
|
27
35
|
private planManager;
|
|
@@ -31,6 +39,10 @@ export declare class WrfcController {
|
|
|
31
39
|
private readonly selectChildRoute;
|
|
32
40
|
private workPlanService;
|
|
33
41
|
private readonly workPlanTaskQueues;
|
|
42
|
+
/** Tracks last-seen timestamp per agent for watchdog timeout. */
|
|
43
|
+
private readonly agentLastSeen;
|
|
44
|
+
/** Active watchdog timer handle, if any. */
|
|
45
|
+
private watchdogTimer;
|
|
34
46
|
constructor(runtimeBus: RuntimeEventBus, messageBus: Pick<AgentMessageBus, 'registerAgent'>, deps: {
|
|
35
47
|
readonly agentManager: AgentManagerLike;
|
|
36
48
|
readonly configManager: Pick<ConfigManager, 'get' | 'getCategory'>;
|
|
@@ -38,6 +50,13 @@ export declare class WrfcController {
|
|
|
38
50
|
readonly surfaceRoot?: string | undefined;
|
|
39
51
|
readonly createWorktree?: (() => WrfcWorktreeOps) | undefined;
|
|
40
52
|
readonly selectChildRoute?: WrfcChildRouteSelector | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* When true, skip verifyEngineerClaims for both engineer and fixer completions.
|
|
55
|
+
* Use ONLY in test harnesses where projectRoot is a synthetic path without real files.
|
|
56
|
+
* Production code must NEVER set this flag — it disables the phantom-work guard.
|
|
57
|
+
* Prefer the environment-driven skip (nonexistent projectRoot) where possible.
|
|
58
|
+
*/
|
|
59
|
+
readonly skipClaimVerification?: boolean;
|
|
41
60
|
});
|
|
42
61
|
createChain(ownerRecord: AgentRecord): WrfcChain;
|
|
43
62
|
getSessionId(): string;
|
|
@@ -49,6 +68,34 @@ export declare class WrfcController {
|
|
|
49
68
|
listChains(): WrfcChain[];
|
|
50
69
|
resumeChain(chainId: string): boolean;
|
|
51
70
|
resumeAllActiveChains(): number;
|
|
71
|
+
/**
|
|
72
|
+
* Item 3: Serialize a chain to a JSON string for durable storage.
|
|
73
|
+
* Returns null if the chain does not exist.
|
|
74
|
+
*/
|
|
75
|
+
serializeChain(chainId: string): string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Item 3: Deserialize a chain from a JSON string.
|
|
78
|
+
* Returns null if the JSON is invalid, the required fields are missing, or
|
|
79
|
+
* the schema version is newer than this runtime supports.
|
|
80
|
+
*
|
|
81
|
+
* Schema versioning:
|
|
82
|
+
* - Missing schemaVersion (v0/legacy): accepted for back-compat — the JSON
|
|
83
|
+
* is the raw chain object directly.
|
|
84
|
+
* - schemaVersion === CURRENT_WRFC_CHAIN_SCHEMA_VERSION (1): unwrap { schemaVersion, chain }.
|
|
85
|
+
* - schemaVersion > CURRENT_WRFC_CHAIN_SCHEMA_VERSION: rejected — fail closed.
|
|
86
|
+
*/
|
|
87
|
+
deserializeChain(json: string): WrfcChain | null;
|
|
88
|
+
/**
|
|
89
|
+
* Item 3: Import a deserialized chain into this controller instance.
|
|
90
|
+
* After importing, call resumeChain(chain.id) to continue from recorded state.
|
|
91
|
+
*
|
|
92
|
+
* Refuses to overwrite a non-terminal chain (state is not 'passed' or 'failed')
|
|
93
|
+
* to prevent accidental clobber of live chains. Use force=true to override.
|
|
94
|
+
* Always overwrites terminal chains (idempotent replay is safe for completed work).
|
|
95
|
+
*
|
|
96
|
+
* Returns true if the chain was imported, false if refused.
|
|
97
|
+
*/
|
|
98
|
+
importChain(chain: WrfcChain, force?: boolean): boolean;
|
|
52
99
|
dispose(): void;
|
|
53
100
|
private transition;
|
|
54
101
|
private applyWrfcAgentMetadata;
|
|
@@ -56,6 +103,33 @@ export declare class WrfcController {
|
|
|
56
103
|
private ownerProgress;
|
|
57
104
|
private wrfcPhaseOrder;
|
|
58
105
|
private setupListeners;
|
|
106
|
+
/**
|
|
107
|
+
* Start (or restart) the watchdog timer based on current config.
|
|
108
|
+
* Called once on setup and whenever the timeout config may have changed.
|
|
109
|
+
*/
|
|
110
|
+
private resetWatchdog;
|
|
111
|
+
/** Tick: fail any chain whose active child agent has been silent longer than timeoutMs. */
|
|
112
|
+
private tickWatchdog;
|
|
113
|
+
/**
|
|
114
|
+
* Returns true when verifyEngineerClaims should be skipped for a completion event.
|
|
115
|
+
*
|
|
116
|
+
* Skip conditions (applied uniformly to engineer AND fixer completions):
|
|
117
|
+
* 1. `this.skipClaimVerification` is true — explicit opt-out for test harnesses that
|
|
118
|
+
* use real /tmp paths (directories that exist on disk) where files are never actually
|
|
119
|
+
* written to disk by agents. Use this when the environment-driven skip does not apply.
|
|
120
|
+
* 2. `!this.projectRootExistedAtStartup` — environment-driven skip: projectRoot did not
|
|
121
|
+
* exist on disk when this controller was constructed. Cached at construction time because
|
|
122
|
+
* the WrfcWorkmap mkdir's the directory tree on the first appendOwnerDecision call,
|
|
123
|
+
* making a late-bound existsSync check unreliable (would always return true after that).
|
|
124
|
+
* Preferred mechanism; harnesses should use nonexistent projectRoot paths when feasible.
|
|
125
|
+
*
|
|
126
|
+
* PRODUCTION INVARIANT: In any real GoodVibes session the projectRoot is the cloned
|
|
127
|
+
* repo root which always exists at startup. Both skip conditions are false in production;
|
|
128
|
+
* claim verification always runs for both engineer and fixer completions.
|
|
129
|
+
*/
|
|
130
|
+
private shouldSkipClaimVerification;
|
|
131
|
+
/** Returns the single currently-active child agent ID for a chain, if deterministic. */
|
|
132
|
+
private activeChildAgentId;
|
|
59
133
|
private onAgentComplete;
|
|
60
134
|
private onAgentFailed;
|
|
61
135
|
private onAgentCancelled;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrfc-controller.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-controller.ts"],"names":[],"mappings":"AAEA,OAAO,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