@vibecontrols/plugin-sdk 2026.1108.1 → 2026.1110.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/README.md +1 -1
- package/dist/audit/index.d.ts +7 -13
- package/dist/audit/index.js +13 -14
- package/dist/broadcast/index.d.ts +6 -12
- package/dist/broadcast/index.js +8 -9
- package/dist/cli/index.d.ts +7 -72
- package/dist/cli/index.js +1 -104
- package/dist/cli-CGyu31Cn.js +104 -0
- package/dist/config/index.d.ts +18 -24
- package/dist/config/index.js +56 -61
- package/dist/context/index.d.ts +26 -32
- package/dist/context/index.js +33 -21
- package/dist/contract/index.d.ts +2 -413
- package/dist/contract/index.js +11 -12
- package/dist/host/fs-safety.d.ts +13 -17
- package/dist/host/fs-safety.js +223 -217
- package/dist/host/os.d.ts +2 -68
- package/dist/host/os.js +15 -7
- package/dist/host/paths.d.ts +2 -36
- package/dist/host/paths.js +44 -44
- package/dist/host/request-security.d.ts +6 -7
- package/dist/host/request-security.js +26 -14
- package/dist/http/index.d.ts +23 -25
- package/dist/http/index.js +60 -65
- package/dist/index-BM4zNXSR.d.ts +25 -0
- package/dist/index-D946chPf.d.ts +410 -0
- package/dist/index-Q_hnxaN_.d.ts +60 -0
- package/dist/index.d.ts +44 -18
- package/dist/index.js +16 -749
- package/dist/install/index.d.ts +46 -50
- package/dist/install/index.js +269 -189
- package/dist/lifecycle/index.d.ts +24 -30
- package/dist/lifecycle/index.js +18 -30
- package/dist/log/index.d.ts +10 -15
- package/dist/log/index.js +19 -20
- package/dist/os-DoFa9kjr.d.ts +67 -0
- package/dist/paths-h28H4Xeb.d.ts +35 -0
- package/dist/providers/index.d.ts +50 -56
- package/dist/providers/index.js +101 -126
- package/dist/routes/index.d.ts +22 -28
- package/dist/routes/index.js +80 -72
- package/dist/storage/index.d.ts +2 -38
- package/dist/storage/index.js +1 -67
- package/dist/storage-DkNBaJHC.js +64 -0
- package/dist/subprocess/index.d.ts +5 -11
- package/dist/subprocess/index.js +85 -56
- package/dist/telemetry/index.d.ts +15 -21
- package/dist/telemetry/index.js +35 -36
- package/dist/testing/index.d.ts +6 -28
- package/dist/testing/index.js +87 -88
- package/package.json +8 -8
package/dist/subprocess/index.js
CHANGED
|
@@ -1,69 +1,98 @@
|
|
|
1
|
-
import { createServer } from
|
|
2
|
-
|
|
1
|
+
import { createServer } from "node:net";
|
|
3
2
|
// src/subprocess/index.ts
|
|
3
|
+
/**
|
|
4
|
+
* @vibecontrols/plugin-sdk/subprocess
|
|
5
|
+
*
|
|
6
|
+
* Cross-platform subprocess helpers: graceful kill (SIGTERM → SIGKILL),
|
|
7
|
+
* liveness check, port-pool probing, sleep.
|
|
8
|
+
*
|
|
9
|
+
* Design notes:
|
|
10
|
+
* - `gracefulKill` uses SIGTERM first, polls `process.kill(pid, 0)` to
|
|
11
|
+
* detect exit, then escalates to SIGKILL. On Windows SIGTERM still
|
|
12
|
+
* arrives via Node's signal-emulation; we keep the same code path.
|
|
13
|
+
* - `findAvailablePort` prefers `Bun.listen` (zero-dep, fast) and falls
|
|
14
|
+
* back to `node:net` so the helper works under pure Node hosts too.
|
|
15
|
+
*
|
|
16
|
+
* Cross-platform: pure Node + optional Bun runtime feature detection.
|
|
17
|
+
*/
|
|
4
18
|
function sleep(ms) {
|
|
5
|
-
|
|
19
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
6
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns true if a process with `pid` is reachable from this process.
|
|
23
|
+
* Uses signal 0 — POSIX + Node's Windows shim both recognise it.
|
|
24
|
+
*/
|
|
7
25
|
function isProcessAlive(pid) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
26
|
+
try {
|
|
27
|
+
process.kill(pid, 0);
|
|
28
|
+
return true;
|
|
29
|
+
} catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
14
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Send SIGTERM, poll until the process exits or `timeoutMs` elapses, then
|
|
35
|
+
* escalate to SIGKILL if necessary.
|
|
36
|
+
*/
|
|
15
37
|
async function gracefulKill(pid, timeoutMs = 3e3, logger) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
const source = "subprocess";
|
|
39
|
+
if (!isProcessAlive(pid)) return;
|
|
40
|
+
try {
|
|
41
|
+
process.kill(pid, "SIGTERM");
|
|
42
|
+
} catch (err) {
|
|
43
|
+
logger?.warn?.(source, "SIGTERM failed", {
|
|
44
|
+
pid,
|
|
45
|
+
message: err instanceof Error ? err.message : String(err)
|
|
46
|
+
});
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const pollMs = 50;
|
|
50
|
+
let elapsed = 0;
|
|
51
|
+
while (elapsed < timeoutMs) {
|
|
52
|
+
await sleep(pollMs);
|
|
53
|
+
elapsed += pollMs;
|
|
54
|
+
if (!isProcessAlive(pid)) return;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
process.kill(pid, "SIGKILL");
|
|
58
|
+
} catch (err) {
|
|
59
|
+
logger?.warn?.(source, "SIGKILL failed", {
|
|
60
|
+
pid,
|
|
61
|
+
message: err instanceof Error ? err.message : String(err)
|
|
62
|
+
});
|
|
63
|
+
}
|
|
42
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Probe ports starting at `start` for `range` consecutive numbers; resolve
|
|
67
|
+
* with the first one that bind-tests cleanly. Throws if the whole range is
|
|
68
|
+
* occupied.
|
|
69
|
+
*/
|
|
43
70
|
async function findAvailablePort(start, range = 200) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
71
|
+
for (let i = 0; i < range; i++) {
|
|
72
|
+
const port = start + i;
|
|
73
|
+
if (await isPortFree(port)) return port;
|
|
74
|
+
}
|
|
75
|
+
throw new Error(`findAvailablePort: no port free in [${start}, ${start + range - 1}]`);
|
|
49
76
|
}
|
|
50
77
|
function isPortFree(port) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
78
|
+
return new Promise((resolve) => {
|
|
79
|
+
const server = createServer();
|
|
80
|
+
server.once("error", () => {
|
|
81
|
+
resolve(false);
|
|
82
|
+
});
|
|
83
|
+
server.once("listening", () => {
|
|
84
|
+
server.close(() => resolve(true));
|
|
85
|
+
});
|
|
86
|
+
try {
|
|
87
|
+
server.listen({
|
|
88
|
+
port,
|
|
89
|
+
host: "0.0.0.0"
|
|
90
|
+
});
|
|
91
|
+
} catch {
|
|
92
|
+
resolve(false);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
65
95
|
}
|
|
66
|
-
|
|
67
96
|
export { findAvailablePort, gracefulKill, isProcessAlive, sleep };
|
|
68
|
-
|
|
97
|
+
|
|
69
98
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { HostServices } from '../contract/index.js';
|
|
2
|
-
import '../host/os.js';
|
|
3
|
-
import '../host/paths.js';
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
2
|
* @vibecontrols/plugin-sdk/telemetry
|
|
7
3
|
*
|
|
@@ -10,20 +6,18 @@ import '../host/paths.js';
|
|
|
10
6
|
* No-op when the host doesn't expose the telemetry surface (e.g. plugin
|
|
11
7
|
* loaded without the `telemetry: true` capability).
|
|
12
8
|
*/
|
|
13
|
-
|
|
14
|
-
declare class TelemetryEmitter {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { TelemetryEmitter };
|
|
9
|
+
import { r as HostServices } from "../index-D946chPf.js";
|
|
10
|
+
export declare class TelemetryEmitter {
|
|
11
|
+
private readonly pluginName;
|
|
12
|
+
private readonly pluginVersion;
|
|
13
|
+
private readonly hostServices?;
|
|
14
|
+
constructor(pluginName: string, pluginVersion: string, hostServices?: HostServices | undefined);
|
|
15
|
+
/** Emit `eventName` with auto-tagged plugin/version/timestamp. */
|
|
16
|
+
emit(eventName: string, payload?: Record<string, unknown>): void;
|
|
17
|
+
/** `<pluginName>.ready` shorthand. */
|
|
18
|
+
emitReady(context?: Record<string, unknown>): void;
|
|
19
|
+
/** `<pluginName>.error` shorthand — extracts message from Error. */
|
|
20
|
+
emitError(error: Error, context?: Record<string, unknown>): void;
|
|
21
|
+
/** Generic event-type emit (alias of emit). */
|
|
22
|
+
emitEvent(type: string, payload?: Record<string, unknown>): void;
|
|
23
|
+
}
|
package/dist/telemetry/index.js
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
1
|
// src/telemetry/index.ts
|
|
2
2
|
var TelemetryEmitter = class {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
3
|
+
pluginName;
|
|
4
|
+
pluginVersion;
|
|
5
|
+
hostServices;
|
|
6
|
+
constructor(pluginName, pluginVersion, hostServices) {
|
|
7
|
+
this.pluginName = pluginName;
|
|
8
|
+
this.pluginVersion = pluginVersion;
|
|
9
|
+
this.hostServices = hostServices;
|
|
10
|
+
}
|
|
11
|
+
/** Emit `eventName` with auto-tagged plugin/version/timestamp. */
|
|
12
|
+
emit(eventName, payload) {
|
|
13
|
+
const target = this.hostServices?.telemetry;
|
|
14
|
+
if (!target) return;
|
|
15
|
+
target.emit(eventName, {
|
|
16
|
+
plugin: this.pluginName,
|
|
17
|
+
version: this.pluginVersion,
|
|
18
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
19
|
+
...payload ?? {}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/** `<pluginName>.ready` shorthand. */
|
|
23
|
+
emitReady(context) {
|
|
24
|
+
this.emit(`${this.pluginName}.ready`, context);
|
|
25
|
+
}
|
|
26
|
+
/** `<pluginName>.error` shorthand — extracts message from Error. */
|
|
27
|
+
emitError(error, context) {
|
|
28
|
+
this.emit(`${this.pluginName}.error`, {
|
|
29
|
+
message: error.message,
|
|
30
|
+
...context ?? {}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/** Generic event-type emit (alias of emit). */
|
|
34
|
+
emitEvent(type, payload) {
|
|
35
|
+
this.emit(type, payload);
|
|
36
|
+
}
|
|
37
37
|
};
|
|
38
|
-
|
|
39
38
|
export { TelemetryEmitter };
|
|
40
|
-
|
|
39
|
+
|
|
41
40
|
//# sourceMappingURL=index.js.map
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import '../host/paths.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Mock factories for unit-testing plugins built on the SDK.
|
|
7
|
-
*
|
|
8
|
-
* The mocks return concrete `HostServices` / `ProfileContext` shapes with
|
|
9
|
-
* every function backed by Bun's built-in `mock()`. Consumers must run
|
|
10
|
-
* tests with `bun test` (the SDK is Bun-native by design).
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
type DeepPartial<T> = T extends object ? {
|
|
14
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
15
|
-
} : T;
|
|
1
|
+
import { f as ProfileContext, r as HostServices, y as VibePluginFactory } from "../index-D946chPf.js";
|
|
2
|
+
type DeepPartial<T> = T extends object ? { [K in keyof T]?: DeepPartial<T[K]>; } : T;
|
|
16
3
|
/**
|
|
17
4
|
* Build a fully-stubbed `HostServices`. Every function is a Bun `mock()`,
|
|
18
5
|
* so tests can assert call counts / args. Pass `overrides` to replace
|
|
19
6
|
* specific fields (e.g. `{ telemetry: { emit: customMock } }`).
|
|
20
7
|
*/
|
|
21
|
-
declare function createMockHostServices(overrides?: DeepPartial<HostServices>): HostServices;
|
|
22
|
-
declare function createMockProfileContext(overrides?: DeepPartial<ProfileContext>): ProfileContext;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* Test fixtures for downstream plugin authors.
|
|
26
|
-
*
|
|
27
|
-
* Currently exports a minimal `samplePlugin` factory that satisfies
|
|
28
|
-
* `VibePluginFactory` — handy as a baseline plugin object in tests.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
declare const samplePlugin: VibePluginFactory;
|
|
32
|
-
|
|
33
|
-
export { createMockHostServices, createMockProfileContext, samplePlugin };
|
|
8
|
+
export declare function createMockHostServices(overrides?: DeepPartial<HostServices>): HostServices;
|
|
9
|
+
export declare function createMockProfileContext(overrides?: DeepPartial<ProfileContext>): ProfileContext;
|
|
10
|
+
export declare const samplePlugin: VibePluginFactory;
|
|
11
|
+
export {};
|
package/dist/testing/index.js
CHANGED
|
@@ -1,99 +1,98 @@
|
|
|
1
|
-
import { mock } from
|
|
2
|
-
|
|
1
|
+
import { mock } from "bun:test";
|
|
3
2
|
// src/testing/mocks.ts
|
|
3
|
+
/**
|
|
4
|
+
* Mock factories for unit-testing plugins built on the SDK.
|
|
5
|
+
*
|
|
6
|
+
* The mocks return concrete `HostServices` / `ProfileContext` shapes with
|
|
7
|
+
* every function backed by Bun's built-in `mock()`. Consumers must run
|
|
8
|
+
* tests with `bun test` (the SDK is Bun-native by design).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Build a fully-stubbed `HostServices`. Every function is a Bun `mock()`,
|
|
12
|
+
* so tests can assert call counts / args. Pass `overrides` to replace
|
|
13
|
+
* specific fields (e.g. `{ telemetry: { emit: customMock } }`).
|
|
14
|
+
*/
|
|
4
15
|
function createMockHostServices(overrides = {}) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
audit: { emit: mock(() => void 0) },
|
|
48
|
-
telemetry: { emit: mock(() => void 0) },
|
|
49
|
-
os: void 0
|
|
50
|
-
};
|
|
51
|
-
return mergeDeep(base, overrides);
|
|
16
|
+
const storage = {
|
|
17
|
+
get: mock(async () => null),
|
|
18
|
+
set: mock(async () => void 0),
|
|
19
|
+
delete: mock(async () => true),
|
|
20
|
+
list: mock(async () => [])
|
|
21
|
+
};
|
|
22
|
+
const serviceRegistry = {
|
|
23
|
+
registerProvider: mock(() => void 0),
|
|
24
|
+
getProvider: mock(() => void 0),
|
|
25
|
+
registerService: mock(() => void 0),
|
|
26
|
+
getService: mock(() => void 0),
|
|
27
|
+
listProvidersForType: mock(() => [])
|
|
28
|
+
};
|
|
29
|
+
return mergeDeep({
|
|
30
|
+
storage,
|
|
31
|
+
logger: {
|
|
32
|
+
debug: mock(() => void 0),
|
|
33
|
+
info: mock(() => void 0),
|
|
34
|
+
warn: mock(() => void 0),
|
|
35
|
+
error: mock(() => void 0),
|
|
36
|
+
setLevel: mock(() => void 0)
|
|
37
|
+
},
|
|
38
|
+
serviceRegistry,
|
|
39
|
+
getProvider: mock(() => void 0),
|
|
40
|
+
getAgentBaseUrl: mock(() => "http://localhost:3005"),
|
|
41
|
+
getAgentVersion: mock(() => "test"),
|
|
42
|
+
broadcast: mock(() => void 0),
|
|
43
|
+
workspaceQuery: mock(async () => ({ data: {} })),
|
|
44
|
+
isGatewayConfigured: mock(() => false),
|
|
45
|
+
getAgentRecordId: mock(async () => null),
|
|
46
|
+
getWorkspaceId: mock(async () => null),
|
|
47
|
+
getConfig: mock(async () => void 0),
|
|
48
|
+
getPluginRegistry: mock(() => "https://registry.npmjs.org/"),
|
|
49
|
+
getDataDir: mock(() => "/tmp/sdk-test"),
|
|
50
|
+
cliContributors: {
|
|
51
|
+
addStatusSection: mock(() => void 0),
|
|
52
|
+
addDoctorCheck: mock(() => void 0)
|
|
53
|
+
},
|
|
54
|
+
audit: { emit: mock(() => void 0) },
|
|
55
|
+
telemetry: { emit: mock(() => void 0) },
|
|
56
|
+
os: void 0
|
|
57
|
+
}, overrides);
|
|
52
58
|
}
|
|
53
59
|
function createMockProfileContext(overrides = {}) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return mergeDeep(base, overrides);
|
|
60
|
+
return mergeDeep({
|
|
61
|
+
name: "test-profile",
|
|
62
|
+
dataDir: "/tmp/sdk-test/profile",
|
|
63
|
+
logger: {
|
|
64
|
+
debug: mock(() => void 0),
|
|
65
|
+
info: mock(() => void 0),
|
|
66
|
+
warn: mock(() => void 0),
|
|
67
|
+
error: mock(() => void 0)
|
|
68
|
+
},
|
|
69
|
+
audit: { emit: mock(() => void 0) },
|
|
70
|
+
telemetry: { emit: mock(() => void 0) }
|
|
71
|
+
}, overrides);
|
|
67
72
|
}
|
|
68
73
|
function mergeDeep(base, overrides) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (v !== null && typeof v === "object" && !Array.isArray(v) && baseVal !== null && typeof baseVal === "object" && !Array.isArray(baseVal)) {
|
|
80
|
-
out[k] = mergeDeep(baseVal, v);
|
|
81
|
-
} else {
|
|
82
|
-
out[k] = v;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return out;
|
|
74
|
+
if (overrides === void 0 || overrides === null) return base;
|
|
75
|
+
if (typeof overrides !== "object" || Array.isArray(overrides)) return overrides;
|
|
76
|
+
if (typeof base !== "object" || base === null || Array.isArray(base)) return overrides;
|
|
77
|
+
const out = { ...base };
|
|
78
|
+
for (const [k, v] of Object.entries(overrides)) {
|
|
79
|
+
const baseVal = base[k];
|
|
80
|
+
if (v !== null && typeof v === "object" && !Array.isArray(v) && baseVal !== null && typeof baseVal === "object" && !Array.isArray(baseVal)) out[k] = mergeDeep(baseVal, v);
|
|
81
|
+
else out[k] = v;
|
|
82
|
+
}
|
|
83
|
+
return out;
|
|
86
84
|
}
|
|
87
|
-
|
|
88
85
|
// src/testing/fixtures.ts
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
const samplePlugin = (_ctx) => ({
|
|
87
|
+
name: "sample-plugin",
|
|
88
|
+
version: "0.0.0",
|
|
89
|
+
description: "Sample plugin for SDK fixture use",
|
|
90
|
+
tags: ["backend"],
|
|
91
|
+
capabilities: {
|
|
92
|
+
storage: "rw",
|
|
93
|
+
telemetry: true
|
|
94
|
+
}
|
|
95
95
|
});
|
|
96
|
-
|
|
97
96
|
export { createMockHostServices, createMockProfileContext, samplePlugin };
|
|
98
|
-
|
|
97
|
+
|
|
99
98
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibecontrols/plugin-sdk",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1110.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "VibeControls Plugin SDK — shared contract, lifecycle, CLI, telemetry, storage helpers for all vibe-plugin-* packages.",
|
|
6
6
|
"engines": {
|
|
@@ -98,15 +98,15 @@
|
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
|
101
|
-
"dev": "
|
|
102
|
-
"build": "
|
|
101
|
+
"dev": "tsdown --watch",
|
|
102
|
+
"build": "tsdown",
|
|
103
103
|
"knip": "knip --reporter compact",
|
|
104
104
|
"clean": "rm -rf dist coverage .eslintcache",
|
|
105
105
|
"prebuild": "bun run clean",
|
|
106
106
|
"pack:check": "npm pack --dry-run",
|
|
107
107
|
"type:check": "boff gate -- bun check --no-pretty",
|
|
108
|
-
"format": "bun fmt src tests
|
|
109
|
-
"format:check": "bun fmt --check src tests
|
|
108
|
+
"format": "bun fmt src tests tsdown.config.ts eslint.config.js prettier.config.js",
|
|
109
|
+
"format:check": "bun fmt --check src tests tsdown.config.ts eslint.config.js prettier.config.js",
|
|
110
110
|
"lint": "eslint .",
|
|
111
111
|
"test": "bun test",
|
|
112
112
|
"sanity": "boff sanity",
|
|
@@ -121,8 +121,8 @@
|
|
|
121
121
|
"eslint": "^9.39.5",
|
|
122
122
|
"knip": "^6.44.2",
|
|
123
123
|
"lefthook": "^2.2.2",
|
|
124
|
-
"
|
|
125
|
-
"typescript": "
|
|
124
|
+
"tsdown": "0.23.7",
|
|
125
|
+
"typescript": "6.0.3"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
128
|
"commander": ">=14.0.0",
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
"formatPaths": [
|
|
195
195
|
"src",
|
|
196
196
|
"tests",
|
|
197
|
-
"
|
|
197
|
+
"tsdown.config.ts",
|
|
198
198
|
"eslint.config.js",
|
|
199
199
|
"prettier.config.js"
|
|
200
200
|
]
|