@vibecontrols/vibe-plugin-storage 2026.428.3
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 +38 -0
- package/dist/database.d.ts +41 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +55 -0
- package/dist/database.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/provider.d.ts +39 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +14 -0
- package/dist/provider.js.map +1 -0
- package/dist/registry.d.ts +14 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +20 -0
- package/dist/registry.js.map +1 -0
- package/dist/types.d.ts +133 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +24 -0
- package/dist/types.js.map +1 -0
- package/package.json +73 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @vibecontrols/vibe-plugin-storage
|
|
2
|
+
|
|
3
|
+
Storage meta plugin for the VibeControls agent.
|
|
4
|
+
|
|
5
|
+
Defines the storage contract that the agent uses to persist its state, and the adapter registry that concrete storage providers (such as `@vibecontrols/vibe-plugin-storage-skalex`) plug into.
|
|
6
|
+
|
|
7
|
+
## Exports
|
|
8
|
+
|
|
9
|
+
- `AgentDatabase` — abstract 45-method storage contract.
|
|
10
|
+
- `StorageProvider` — KV-store interface plugins use for their data.
|
|
11
|
+
- `createAgentDatabase(options)` — factory that resolves the concrete adapter at runtime.
|
|
12
|
+
- `registerAdapter(name, factory)` / `getAdapter` / `listAdapters` — adapter registry.
|
|
13
|
+
|
|
14
|
+
## Example: registering a custom adapter
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { registerAdapter, AgentDatabase } from "@vibecontrols/vibe-plugin-storage";
|
|
18
|
+
|
|
19
|
+
class MyPostgresAdapter extends AgentDatabase {
|
|
20
|
+
// implement 45 methods…
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
registerAdapter("postgres", async ({ dataDir, encryptionKey }) => {
|
|
24
|
+
const db = new MyPostgresAdapter(/* … */);
|
|
25
|
+
await db.connect();
|
|
26
|
+
return db;
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then run the agent with:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
VIBE_STORAGE_ADAPTER=postgres vibe start
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
Proprietary — Burdenoff Consultancy Services Pvt. Ltd.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Database (pluggable adapter façade)
|
|
3
|
+
*
|
|
4
|
+
* The public import surface for all storage operations:
|
|
5
|
+
*
|
|
6
|
+
* import { createAgentDatabase } from "@vibecontrols/vibe-plugin-storage";
|
|
7
|
+
* const db = await createAgentDatabase({ encryptionKey, dbPath });
|
|
8
|
+
*
|
|
9
|
+
* `createAgentDatabase` resolves the concrete adapter at runtime:
|
|
10
|
+
* 1. options.adapterFactory (explicit override; tests use this)
|
|
11
|
+
* 2. options.adapterName (e.g. "skalex" or "custom:/path/to/mod.js")
|
|
12
|
+
* 3. process.env.VIBE_STORAGE_ADAPTER
|
|
13
|
+
* 4. "skalex" (default — provided by @vibecontrols/vibe-plugin-storage-skalex)
|
|
14
|
+
*
|
|
15
|
+
* Encryption is mandatory. If no encryption key is supplied, startup fails.
|
|
16
|
+
*/
|
|
17
|
+
import { AgentDatabase, type AgentStorageAdapterFactory } from "./types.js";
|
|
18
|
+
export interface AgentDatabaseCreateOptions {
|
|
19
|
+
/** Absolute path to the storage directory. REQUIRED — host must resolve it. */
|
|
20
|
+
dbPath: string;
|
|
21
|
+
/** 64-character hex AES-256 key. REQUIRED — startup fails without it. */
|
|
22
|
+
encryptionKey: string;
|
|
23
|
+
/**
|
|
24
|
+
* Named adapter to use. Defaults to the value of VIBE_STORAGE_ADAPTER
|
|
25
|
+
* (env), or "skalex" if unset. Prefix a path with "custom:" to load a
|
|
26
|
+
* module from disk at runtime (e.g. "custom:/opt/my-adapter.mjs").
|
|
27
|
+
*/
|
|
28
|
+
adapterName?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Direct factory override. Highest priority — bypasses adapterName and
|
|
31
|
+
* the registry entirely. Tests use this to swap in an in-memory adapter.
|
|
32
|
+
*/
|
|
33
|
+
adapterFactory?: AgentStorageAdapterFactory;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create an AgentDatabase instance. Picks the concrete adapter at
|
|
37
|
+
* runtime, initialises it, and returns the ready-to-use instance.
|
|
38
|
+
* Throws if no encryption key is supplied (storage is always encrypted).
|
|
39
|
+
*/
|
|
40
|
+
export declare function createAgentDatabase(options: AgentDatabaseCreateOptions): Promise<AgentDatabase>;
|
|
41
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAG5E,MAAM,WAAW,0BAA0B;IACzC,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,0BAA0B,CAAC;CAC7C;AAuCD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,aAAa,CAAC,CAaxB"}
|
package/dist/database.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Database (pluggable adapter façade)
|
|
3
|
+
*
|
|
4
|
+
* The public import surface for all storage operations:
|
|
5
|
+
*
|
|
6
|
+
* import { createAgentDatabase } from "@vibecontrols/vibe-plugin-storage";
|
|
7
|
+
* const db = await createAgentDatabase({ encryptionKey, dbPath });
|
|
8
|
+
*
|
|
9
|
+
* `createAgentDatabase` resolves the concrete adapter at runtime:
|
|
10
|
+
* 1. options.adapterFactory (explicit override; tests use this)
|
|
11
|
+
* 2. options.adapterName (e.g. "skalex" or "custom:/path/to/mod.js")
|
|
12
|
+
* 3. process.env.VIBE_STORAGE_ADAPTER
|
|
13
|
+
* 4. "skalex" (default — provided by @vibecontrols/vibe-plugin-storage-skalex)
|
|
14
|
+
*
|
|
15
|
+
* Encryption is mandatory. If no encryption key is supplied, startup fails.
|
|
16
|
+
*/
|
|
17
|
+
import { getAdapter, listAdapters } from "./registry.js";
|
|
18
|
+
async function resolveFactory(options) {
|
|
19
|
+
if (options.adapterFactory)
|
|
20
|
+
return options.adapterFactory;
|
|
21
|
+
const name = options.adapterName ?? process.env.VIBE_STORAGE_ADAPTER ?? "skalex";
|
|
22
|
+
if (name.startsWith("custom:")) {
|
|
23
|
+
const modPath = name.slice("custom:".length);
|
|
24
|
+
if (!modPath) {
|
|
25
|
+
throw new Error("VIBE_STORAGE_ADAPTER=custom: requires a module path after the colon");
|
|
26
|
+
}
|
|
27
|
+
const mod = (await import(modPath));
|
|
28
|
+
const factory = mod.default ?? mod.createAdapter;
|
|
29
|
+
if (typeof factory !== "function") {
|
|
30
|
+
throw new Error(`Custom storage adapter at ${modPath} must export a default function (or \`createAdapter\`) of type AgentStorageAdapterFactory`);
|
|
31
|
+
}
|
|
32
|
+
return factory;
|
|
33
|
+
}
|
|
34
|
+
const factory = getAdapter(name);
|
|
35
|
+
if (!factory) {
|
|
36
|
+
throw new Error(`Unknown storage adapter: "${name}". Registered adapters: ${listAdapters().join(", ") || "(none — did you import @vibecontrols/vibe-plugin-storage-skalex?)"}`);
|
|
37
|
+
}
|
|
38
|
+
return factory;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Create an AgentDatabase instance. Picks the concrete adapter at
|
|
42
|
+
* runtime, initialises it, and returns the ready-to-use instance.
|
|
43
|
+
* Throws if no encryption key is supplied (storage is always encrypted).
|
|
44
|
+
*/
|
|
45
|
+
export async function createAgentDatabase(options) {
|
|
46
|
+
if (!options.encryptionKey) {
|
|
47
|
+
throw new Error("createAgentDatabase(): encryptionKey is required. Storage is always encrypted at rest.");
|
|
48
|
+
}
|
|
49
|
+
if (!options.dbPath) {
|
|
50
|
+
throw new Error("createAgentDatabase(): dbPath is required.");
|
|
51
|
+
}
|
|
52
|
+
const factory = await resolveFactory(options);
|
|
53
|
+
return factory({ dataDir: options.dbPath, encryptionKey: options.encryptionKey });
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAoBzD,KAAK,UAAU,cAAc,CAC3B,OAAmC;IAEnC,IAAI,OAAO,CAAC,cAAc;QAAE,OAAO,OAAO,CAAC,cAAc,CAAC;IAE1D,MAAM,IAAI,GACR,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,QAAQ,CAAC;IAEtE,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CACb,qEAAqE,CACtE,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,GAAG,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,CAGjC,CAAC;QACF,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,aAAa,CAAC;QACjD,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CACb,6BAA6B,OAAO,2FAA2F,CAChI,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,6BAA6B,IAAI,2BAA2B,YAAY,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,mEAAmE,EAAE,CAC/J,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,OAAmC;IAEnC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,wFAAwF,CACzF,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,4CAA4C,CAC7C,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,OAAO,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;AACpF,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibecontrols/vibe-plugin-storage
|
|
3
|
+
*
|
|
4
|
+
* Storage meta plugin. Owns:
|
|
5
|
+
* - StorageProvider interface (plugin KV store contract)
|
|
6
|
+
* - AgentDatabase abstract class (45-method storage contract)
|
|
7
|
+
* - Adapter registry (registerAdapter / getAdapter / listAdapters)
|
|
8
|
+
* - createAgentDatabase() factory (resolves the concrete adapter at runtime)
|
|
9
|
+
*
|
|
10
|
+
* Concrete storage providers (e.g. @vibecontrols/vibe-plugin-storage-skalex)
|
|
11
|
+
* call `registerAdapter("name", factory)` on import. The agent then calls
|
|
12
|
+
* `createAgentDatabase({ dbPath, encryptionKey })` to get an adapter instance.
|
|
13
|
+
*/
|
|
14
|
+
export { AgentDatabase, type AgentStorageAdapterFactory, type AgentStorageAdapterOptions, type StorageEntry, type Task, type GitRepository, type BookmarkedCommand, type Notification, } from "./types.js";
|
|
15
|
+
export { registerAdapter, getAdapter, listAdapters } from "./registry.js";
|
|
16
|
+
export { createAgentDatabase, type AgentDatabaseCreateOptions, } from "./database.js";
|
|
17
|
+
export type { StorageProvider } from "./provider.js";
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,aAAa,EACb,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,IAAI,EACT,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibecontrols/vibe-plugin-storage
|
|
3
|
+
*
|
|
4
|
+
* Storage meta plugin. Owns:
|
|
5
|
+
* - StorageProvider interface (plugin KV store contract)
|
|
6
|
+
* - AgentDatabase abstract class (45-method storage contract)
|
|
7
|
+
* - Adapter registry (registerAdapter / getAdapter / listAdapters)
|
|
8
|
+
* - createAgentDatabase() factory (resolves the concrete adapter at runtime)
|
|
9
|
+
*
|
|
10
|
+
* Concrete storage providers (e.g. @vibecontrols/vibe-plugin-storage-skalex)
|
|
11
|
+
* call `registerAdapter("name", factory)` on import. The agent then calls
|
|
12
|
+
* `createAgentDatabase({ dbPath, encryptionKey })` to get an adapter instance.
|
|
13
|
+
*/
|
|
14
|
+
export { AgentDatabase, } from "./types.js";
|
|
15
|
+
export { registerAdapter, getAdapter, listAdapters } from "./registry.js";
|
|
16
|
+
export { createAgentDatabase, } from "./database.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,aAAa,GAQd,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EACL,mBAAmB,GAEpB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StorageProvider Interface
|
|
3
|
+
*
|
|
4
|
+
* KV store abstraction for plugin data. Plugins use this interface
|
|
5
|
+
* to persist key-value data without coupling to a specific database.
|
|
6
|
+
*
|
|
7
|
+
* Values are JSON strings — plugins serialize/deserialize as needed.
|
|
8
|
+
* Each plugin gets its own namespace for isolation.
|
|
9
|
+
*
|
|
10
|
+
* Default implementation: encrypted Skalex-backed agent storage,
|
|
11
|
+
* provided by @vibecontrols/vibe-plugin-storage-skalex.
|
|
12
|
+
*/
|
|
13
|
+
import type { StorageEntry } from "./types.js";
|
|
14
|
+
export interface StorageProvider {
|
|
15
|
+
/**
|
|
16
|
+
* Get a value by namespace and key.
|
|
17
|
+
* Returns null if the key doesn't exist.
|
|
18
|
+
*/
|
|
19
|
+
get(namespace: string, key: string): Promise<string | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Set a value by namespace and key (upsert).
|
|
22
|
+
*/
|
|
23
|
+
set(namespace: string, key: string, value: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Delete a specific key from a namespace.
|
|
26
|
+
* Returns true if the key existed and was deleted.
|
|
27
|
+
*/
|
|
28
|
+
delete(namespace: string, key: string): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* List all key-value pairs in a namespace.
|
|
31
|
+
*/
|
|
32
|
+
list(namespace: string): Promise<StorageEntry[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Delete all entries in a namespace.
|
|
35
|
+
* Returns the number of entries deleted.
|
|
36
|
+
*/
|
|
37
|
+
deleteAll(namespace: string): Promise<number>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAE5D;;OAEG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElE;;;OAGG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzD;;OAEG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAEjD;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/C"}
|
package/dist/provider.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StorageProvider Interface
|
|
3
|
+
*
|
|
4
|
+
* KV store abstraction for plugin data. Plugins use this interface
|
|
5
|
+
* to persist key-value data without coupling to a specific database.
|
|
6
|
+
*
|
|
7
|
+
* Values are JSON strings — plugins serialize/deserialize as needed.
|
|
8
|
+
* Each plugin gets its own namespace for isolation.
|
|
9
|
+
*
|
|
10
|
+
* Default implementation: encrypted Skalex-backed agent storage,
|
|
11
|
+
* provided by @vibecontrols/vibe-plugin-storage-skalex.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Adapter Registry
|
|
3
|
+
*
|
|
4
|
+
* In-process registry keyed by adapter name. Concrete storage providers
|
|
5
|
+
* (e.g. @vibecontrols/vibe-plugin-storage-skalex) call `registerAdapter`
|
|
6
|
+
* on import. Users can register custom adapters before calling
|
|
7
|
+
* `createAgentDatabase()`, or pass `adapterName: "custom:/abs/path/to/mod.js"`
|
|
8
|
+
* at runtime for zero-build pluggability.
|
|
9
|
+
*/
|
|
10
|
+
import type { AgentStorageAdapterFactory } from "./types.js";
|
|
11
|
+
export declare function registerAdapter(name: string, factory: AgentStorageAdapterFactory): void;
|
|
12
|
+
export declare function getAdapter(name: string): AgentStorageAdapterFactory | undefined;
|
|
13
|
+
export declare function listAdapters(): string[];
|
|
14
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAI7D,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,0BAA0B,GAClC,IAAI,CAEN;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,GACX,0BAA0B,GAAG,SAAS,CAExC;AAED,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAEvC"}
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Adapter Registry
|
|
3
|
+
*
|
|
4
|
+
* In-process registry keyed by adapter name. Concrete storage providers
|
|
5
|
+
* (e.g. @vibecontrols/vibe-plugin-storage-skalex) call `registerAdapter`
|
|
6
|
+
* on import. Users can register custom adapters before calling
|
|
7
|
+
* `createAgentDatabase()`, or pass `adapterName: "custom:/abs/path/to/mod.js"`
|
|
8
|
+
* at runtime for zero-build pluggability.
|
|
9
|
+
*/
|
|
10
|
+
const registry = new Map();
|
|
11
|
+
export function registerAdapter(name, factory) {
|
|
12
|
+
registry.set(name, factory);
|
|
13
|
+
}
|
|
14
|
+
export function getAdapter(name) {
|
|
15
|
+
return registry.get(name);
|
|
16
|
+
}
|
|
17
|
+
export function listAdapters() {
|
|
18
|
+
return Array.from(registry.keys());
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAsC,CAAC;AAE/D,MAAM,UAAU,eAAe,CAC7B,IAAY,EACZ,OAAmC;IAEnC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,IAAY;IAEZ,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Adapter Contract
|
|
3
|
+
*
|
|
4
|
+
* Defines the 45-method interface every concrete storage adapter must
|
|
5
|
+
* implement. Callers import the abstract `AgentDatabase` class — the
|
|
6
|
+
* concrete adapter (e.g. Skalex via @vibecontrols/vibe-plugin-storage-skalex)
|
|
7
|
+
* is resolved at startup via the adapter registry and returned by
|
|
8
|
+
* `createAgentDatabase()`.
|
|
9
|
+
*
|
|
10
|
+
* Any third-party storage layer can be plugged in by implementing this
|
|
11
|
+
* class and either registering it with a name (see ./registry.ts) or
|
|
12
|
+
* passing a factory directly to createAgentDatabase().
|
|
13
|
+
*
|
|
14
|
+
* Encryption at rest is MANDATORY for any adapter that persists data.
|
|
15
|
+
* Every adapter MUST use the provided encryption key.
|
|
16
|
+
*/
|
|
17
|
+
export interface StorageEntry {
|
|
18
|
+
key: string;
|
|
19
|
+
value: string;
|
|
20
|
+
updatedAt?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface Task {
|
|
23
|
+
id: string;
|
|
24
|
+
type: "command" | "script" | "file_operation";
|
|
25
|
+
status: "pending" | "running" | "completed" | "failed";
|
|
26
|
+
payload: string;
|
|
27
|
+
result?: string;
|
|
28
|
+
error?: string;
|
|
29
|
+
calendarTaskId?: string;
|
|
30
|
+
exitCode?: number;
|
|
31
|
+
timeout?: number;
|
|
32
|
+
createdAt: string;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
}
|
|
35
|
+
export interface GitRepository {
|
|
36
|
+
id: string;
|
|
37
|
+
path: string;
|
|
38
|
+
name: string;
|
|
39
|
+
parentPath?: string;
|
|
40
|
+
isSubmodule: boolean;
|
|
41
|
+
projectType?: string;
|
|
42
|
+
vitePort?: number;
|
|
43
|
+
lastScanned: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
}
|
|
46
|
+
export interface BookmarkedCommand {
|
|
47
|
+
id: string;
|
|
48
|
+
projectId?: string;
|
|
49
|
+
command: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
category?: string;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
}
|
|
54
|
+
export interface Notification {
|
|
55
|
+
id: string;
|
|
56
|
+
sessionName?: string;
|
|
57
|
+
projectId?: string;
|
|
58
|
+
type: "info" | "success" | "warning" | "error";
|
|
59
|
+
title: string;
|
|
60
|
+
message: string;
|
|
61
|
+
status: "unread" | "read";
|
|
62
|
+
createdAt: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Options passed to an adapter factory. Every adapter receives the resolved
|
|
66
|
+
* data directory and the AES-256 encryption key (64-hex).
|
|
67
|
+
*/
|
|
68
|
+
export interface AgentStorageAdapterOptions {
|
|
69
|
+
dataDir: string;
|
|
70
|
+
encryptionKey: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Factory signature for a storage adapter. Factories are responsible for
|
|
74
|
+
* constructing the concrete subclass AND calling its internal init hook
|
|
75
|
+
* (e.g. Skalex's connect()), then returning a ready-to-use instance.
|
|
76
|
+
*/
|
|
77
|
+
export type AgentStorageAdapterFactory = (opts: AgentStorageAdapterOptions) => Promise<AgentDatabase>;
|
|
78
|
+
/**
|
|
79
|
+
* Abstract storage contract. This is both the public type callers import
|
|
80
|
+
* and the base class every adapter extends. All methods are async.
|
|
81
|
+
*/
|
|
82
|
+
export declare abstract class AgentDatabase {
|
|
83
|
+
abstract close(): Promise<void>;
|
|
84
|
+
abstract getDbPath(): string;
|
|
85
|
+
abstract createTask(task: Omit<Task, "createdAt" | "updatedAt">): Promise<Task>;
|
|
86
|
+
abstract getTask(id: string): Promise<Task | undefined>;
|
|
87
|
+
abstract getAllTasks(): Promise<Task[]>;
|
|
88
|
+
abstract getPendingTasks(): Promise<Task[]>;
|
|
89
|
+
abstract updateTask(id: string, updates: Partial<Task>): Promise<void>;
|
|
90
|
+
abstract cancelTask(id: string): Promise<boolean>;
|
|
91
|
+
abstract getConfig(key: string): Promise<string | undefined>;
|
|
92
|
+
abstract setConfig(key: string, value: string): Promise<void>;
|
|
93
|
+
abstract deleteConfig(key: string): Promise<boolean>;
|
|
94
|
+
abstract getAllConfig(): Promise<Record<string, string>>;
|
|
95
|
+
abstract bulkSetConfig(entries: Record<string, string>): Promise<void>;
|
|
96
|
+
abstract getConfigStatus(): Promise<{
|
|
97
|
+
totalKeys: number;
|
|
98
|
+
lastUpdated: string | null;
|
|
99
|
+
}>;
|
|
100
|
+
abstract createGitRepository(repo: Omit<GitRepository, "createdAt" | "lastScanned">): Promise<GitRepository>;
|
|
101
|
+
abstract getGitRepository(id: string): Promise<GitRepository | undefined>;
|
|
102
|
+
abstract getGitRepositoryByPath(path: string): Promise<GitRepository | undefined>;
|
|
103
|
+
abstract getAllGitRepositories(): Promise<GitRepository[]>;
|
|
104
|
+
abstract updateGitRepository(id: string, updates: Partial<GitRepository>): Promise<void>;
|
|
105
|
+
abstract deleteGitRepository(id: string): Promise<boolean>;
|
|
106
|
+
abstract fixGitHierarchy(): Promise<{
|
|
107
|
+
fixed: number;
|
|
108
|
+
}>;
|
|
109
|
+
abstract createBookmarkedCommand(cmd: Omit<BookmarkedCommand, "createdAt">): Promise<BookmarkedCommand>;
|
|
110
|
+
abstract getBookmarkedCommand(id: string): Promise<BookmarkedCommand | undefined>;
|
|
111
|
+
abstract getAllBookmarkedCommands(): Promise<BookmarkedCommand[]>;
|
|
112
|
+
abstract getBookmarkedCommandsByProject(projectId: string | null): Promise<BookmarkedCommand[]>;
|
|
113
|
+
abstract getBookmarkedCommandsByCategory(category: string): Promise<BookmarkedCommand[]>;
|
|
114
|
+
abstract updateBookmarkedCommand(id: string, updates: Partial<BookmarkedCommand>): Promise<void>;
|
|
115
|
+
abstract deleteBookmarkedCommand(id: string): Promise<boolean>;
|
|
116
|
+
abstract executeBookmarkedCommand(id: string): Promise<BookmarkedCommand | undefined>;
|
|
117
|
+
abstract createNotification(notification: Omit<Notification, "createdAt">): Promise<Notification>;
|
|
118
|
+
abstract getNotification(id: string): Promise<Notification | undefined>;
|
|
119
|
+
abstract getAllNotifications(): Promise<Notification[]>;
|
|
120
|
+
abstract getNotificationsByProject(projectId: string | null): Promise<Notification[]>;
|
|
121
|
+
abstract getGlobalNotifications(): Promise<Notification[]>;
|
|
122
|
+
abstract getUnreadNotifications(): Promise<Notification[]>;
|
|
123
|
+
abstract updateNotificationStatus(id: string, status: "unread" | "read"): Promise<void>;
|
|
124
|
+
abstract markAllNotificationsRead(): Promise<number>;
|
|
125
|
+
abstract deleteNotification(id: string): Promise<boolean>;
|
|
126
|
+
abstract clearOldNotifications(olderThanDays?: number): Promise<number>;
|
|
127
|
+
abstract getPluginState(pluginName: string, key: string): Promise<string | undefined>;
|
|
128
|
+
abstract setPluginState(pluginName: string, key: string, value: string): Promise<void>;
|
|
129
|
+
abstract deletePluginState(pluginName: string, key: string): Promise<boolean>;
|
|
130
|
+
abstract getAllPluginState(pluginName: string): Promise<StorageEntry[]>;
|
|
131
|
+
abstract deleteAllPluginState(pluginName: string): Promise<number>;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,GA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,OAAO,CAAC,OAAO,CAAC;IACzD,QAAQ,CAAC,qBAAqB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIvE,QAAQ,CAAC,cAAc,CACrB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,CAAC,cAAc,CACrB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;IAChB,QAAQ,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAC7E,QAAQ,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IACvE,QAAQ,CAAC,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CACnE"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage Adapter Contract
|
|
3
|
+
*
|
|
4
|
+
* Defines the 45-method interface every concrete storage adapter must
|
|
5
|
+
* implement. Callers import the abstract `AgentDatabase` class — the
|
|
6
|
+
* concrete adapter (e.g. Skalex via @vibecontrols/vibe-plugin-storage-skalex)
|
|
7
|
+
* is resolved at startup via the adapter registry and returned by
|
|
8
|
+
* `createAgentDatabase()`.
|
|
9
|
+
*
|
|
10
|
+
* Any third-party storage layer can be plugged in by implementing this
|
|
11
|
+
* class and either registering it with a name (see ./registry.ts) or
|
|
12
|
+
* passing a factory directly to createAgentDatabase().
|
|
13
|
+
*
|
|
14
|
+
* Encryption at rest is MANDATORY for any adapter that persists data.
|
|
15
|
+
* Every adapter MUST use the provided encryption key.
|
|
16
|
+
*/
|
|
17
|
+
// ── Abstract storage contract ───────────────────────────────────────────
|
|
18
|
+
/**
|
|
19
|
+
* Abstract storage contract. This is both the public type callers import
|
|
20
|
+
* and the base class every adapter extends. All methods are async.
|
|
21
|
+
*/
|
|
22
|
+
export class AgentDatabase {
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA4EH,2EAA2E;AAE3E;;;GAGG;AACH,MAAM,OAAgB,aAAa;CAwGlC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vibecontrols/vibe-plugin-storage",
|
|
3
|
+
"version": "2026.428.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"description": "Storage meta plugin \u2014 owns the AgentDatabase contract and StorageProvider interface, and provides the adapter registry for concrete storage providers.",
|
|
8
|
+
"engines": {
|
|
9
|
+
"bun": ">=1.3.0"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Vignesh T.V",
|
|
13
|
+
"email": "vignesh@burdenoff.com",
|
|
14
|
+
"url": "https://github.com/tvvignesh"
|
|
15
|
+
},
|
|
16
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"dev": "tsc --watch",
|
|
20
|
+
"lint": "eslint ./src",
|
|
21
|
+
"format": "bunx prettier . --write",
|
|
22
|
+
"format:check": "bunx prettier . --check",
|
|
23
|
+
"type:check": "tsc --noEmit",
|
|
24
|
+
"clean": "rimraf dist",
|
|
25
|
+
"prebuild": "bun run clean",
|
|
26
|
+
"prepublishOnly": "bun run build",
|
|
27
|
+
"sanity": "bun run format:check && bun run lint && bun run type:check && bun run build"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@eslint/js": "^10.0.1",
|
|
31
|
+
"@types/node": "^22.0.0",
|
|
32
|
+
"bun-types": "^1.3.9",
|
|
33
|
+
"eslint": "^9.30.1",
|
|
34
|
+
"globals": "^17.3.0",
|
|
35
|
+
"prettier": "^3.6.2",
|
|
36
|
+
"rimraf": "^6.0.1",
|
|
37
|
+
"typescript": "^5.9.3",
|
|
38
|
+
"typescript-eslint": "^8.56.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@vibecontrols/agent": ">=2026.428.0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"@vibecontrols/agent": {
|
|
45
|
+
"optional": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"vibecontrols",
|
|
50
|
+
"vibe",
|
|
51
|
+
"vibe-plugin",
|
|
52
|
+
"storage",
|
|
53
|
+
"meta",
|
|
54
|
+
"bun"
|
|
55
|
+
],
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "git+https://github.com/algoshred/vibe-plugin-storage.git"
|
|
59
|
+
},
|
|
60
|
+
"bugs": {
|
|
61
|
+
"url": "https://github.com/algoshred/vibe-plugin-storage/issues"
|
|
62
|
+
},
|
|
63
|
+
"homepage": "https://vibecontrols.com",
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public",
|
|
66
|
+
"registry": "https://registry.npmjs.org/"
|
|
67
|
+
},
|
|
68
|
+
"files": [
|
|
69
|
+
"dist/**/*",
|
|
70
|
+
"README.md",
|
|
71
|
+
"LICENSE"
|
|
72
|
+
]
|
|
73
|
+
}
|