@pdpp/local-collector 0.16.5 → 0.16.6
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,8 +1,8 @@
|
|
|
1
1
|
const COLLECTOR_BUILD_SOURCE_SENTINEL = "source";
|
|
2
2
|
const COLLECTOR_BUILD_INFO = {
|
|
3
|
-
builtAt: "2026-06-
|
|
4
|
-
revision: "
|
|
5
|
-
version: "0.16.
|
|
3
|
+
builtAt: "2026-06-25T20:45:10.407Z",
|
|
4
|
+
revision: "4d1347ec64cc",
|
|
5
|
+
version: "0.16.6",
|
|
6
6
|
};
|
|
7
7
|
function buildAgentVersion(info = COLLECTOR_BUILD_INFO) {
|
|
8
8
|
return `${info.version}+${info.revision}`;
|
|
@@ -59,6 +59,7 @@ export interface CollectorConnectorSpec extends ConnectorPlacementInput {
|
|
|
59
59
|
readonly command: string;
|
|
60
60
|
readonly connector_id: string;
|
|
61
61
|
readonly env?: NodeJS.ProcessEnv;
|
|
62
|
+
readonly resources?: Readonly<Record<string, readonly string[]>>;
|
|
62
63
|
readonly streams: readonly string[];
|
|
63
64
|
readonly streamsToBackfill?: readonly string[];
|
|
64
65
|
}
|
|
@@ -111,7 +112,7 @@ export declare class CollectorStateReadError extends Error {
|
|
|
111
112
|
}
|
|
112
113
|
export declare function runCollectorConnector(config: CollectorRunConfig): Promise<CollectorRunResult>;
|
|
113
114
|
export declare function summarizeCollectorCompleteness(coverageByStore: Map<string, CollectorCoverageStatus> | null): CollectorCompletenessSummary | null;
|
|
114
|
-
export declare function buildCollectorStartMessage(streams: readonly string[], streamsToBackfill?: readonly string[], priorState?: Readonly<Record<string, unknown>> | null): StartMessage;
|
|
115
|
+
export declare function buildCollectorStartMessage(streams: readonly string[], streamsToBackfill?: readonly string[], priorState?: Readonly<Record<string, unknown>> | null, resources?: Readonly<Record<string, readonly string[]>>): StartMessage;
|
|
115
116
|
export declare function transformRecordsToCollectorEnvelopes(input: {
|
|
116
117
|
batchId: string;
|
|
117
118
|
batchSeq: number;
|
|
@@ -533,7 +533,7 @@ async function streamConnectorIntoOutbox(input) {
|
|
|
533
533
|
child.stdin.on("error", () => {
|
|
534
534
|
});
|
|
535
535
|
child.stderr.on("data", (chunk) => stderr.push(chunk));
|
|
536
|
-
child.stdin.end(`${JSON.stringify(buildCollectorStartMessage(input.config.connector.streams, input.config.connector.streamsToBackfill, input.priorState))}\n`);
|
|
536
|
+
child.stdin.end(`${JSON.stringify(buildCollectorStartMessage(input.config.connector.streams, input.config.connector.streamsToBackfill, input.priorState, input.config.connector.resources))}\n`);
|
|
537
537
|
let exitCode;
|
|
538
538
|
try {
|
|
539
539
|
[exitCode] = await Promise.all([exitPromise, outputPromise]);
|
|
@@ -748,9 +748,14 @@ async function safeHeartbeat(client, request) {
|
|
|
748
748
|
catch {
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
export function buildCollectorStartMessage(streams, streamsToBackfill = [], priorState) {
|
|
751
|
+
export function buildCollectorStartMessage(streams, streamsToBackfill = [], priorState, resources = {}) {
|
|
752
752
|
const start = {
|
|
753
|
-
scope: {
|
|
753
|
+
scope: {
|
|
754
|
+
streams: streams.map((name) => {
|
|
755
|
+
const streamResources = resources[name]?.filter((value) => typeof value === "string" && value.length > 0);
|
|
756
|
+
return streamResources && streamResources.length > 0 ? { name, resources: streamResources } : { name };
|
|
757
|
+
}),
|
|
758
|
+
},
|
|
754
759
|
type: "START",
|
|
755
760
|
};
|
|
756
761
|
if (streamsToBackfill.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdpp/local-collector",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.6",
|
|
4
4
|
"description": "Publishable local collector runtime for PDPP: filesystem-class connectors (Claude Code, Codex) plus the device-exporter ingest client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|