@tangle-network/agent-app 0.44.26 → 0.44.27
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/chat-routes/index.js +1 -1
- package/dist/chat-store/index.d.ts +2 -3
- package/dist/chat-store/index.js +7 -12
- package/dist/chat-store/index.js.map +1 -1
- package/dist/{chunk-Q74BS43G.js → chunk-7775L5NN.js} +2 -1
- package/dist/chunk-7775L5NN.js.map +1 -0
- package/dist/chunk-LRHVCVEW.js +67 -0
- package/dist/chunk-LRHVCVEW.js.map +1 -0
- package/dist/sandbox/index.d.ts +3 -3
- package/dist/sandbox/index.js +1 -1
- package/dist/store/index.d.ts +9 -1
- package/dist/store/index.js +7 -53
- package/dist/store/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-Q74BS43G.js.map +0 -1
package/dist/sandbox/index.js
CHANGED
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
verifySandboxTerminalToken,
|
|
64
64
|
verifyTerminalProxyToken,
|
|
65
65
|
writeProfileFilesToBox
|
|
66
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-7775L5NN.js";
|
|
67
67
|
import "../chunk-LWSJK546.js";
|
|
68
68
|
import "../chunk-CQZSAR77.js";
|
|
69
69
|
import "../chunk-ICOHEZK6.js";
|
package/dist/store/index.d.ts
CHANGED
|
@@ -32,6 +32,14 @@ interface DatabaseProviderOptions {
|
|
|
32
32
|
* existing wording so callers see a familiar message. */
|
|
33
33
|
notReadyMessage?: string;
|
|
34
34
|
}
|
|
35
|
+
/** A database driver that can execute related SQLite statements as one batch.
|
|
36
|
+
* Cloudflare D1 and libsql expose this method; portable local drivers may not. */
|
|
37
|
+
interface SqliteBatchDatabase {
|
|
38
|
+
batch?: (statements: [unknown, ...unknown[]]) => Promise<unknown[]>;
|
|
39
|
+
}
|
|
40
|
+
/** Execute related SQLite statements in one transactional driver batch when
|
|
41
|
+
* supported, or sequentially in the same order for portable local drivers. */
|
|
42
|
+
declare function runSqliteStatements(db: SqliteBatchDatabase, statements: [unknown, ...unknown[]]): Promise<unknown[]>;
|
|
35
43
|
/**
|
|
36
44
|
* Create a swappable database provider. `DB` is the injected instance's type
|
|
37
45
|
* (e.g. a drizzle `Database`); the proxy is typed as `DB` so callers keep full
|
|
@@ -77,4 +85,4 @@ interface KVStore {
|
|
|
77
85
|
*/
|
|
78
86
|
declare function createInMemoryKV(initial?: Record<string, string>): KVStore;
|
|
79
87
|
|
|
80
|
-
export { type DatabaseProvider, type DatabaseProviderOptions, type KVGetWithMetadataResult, type KVListResult, type KVPutOptions, type KVStore, createDatabaseProvider, createInMemoryKV };
|
|
88
|
+
export { type DatabaseProvider, type DatabaseProviderOptions, type KVGetWithMetadataResult, type KVListResult, type KVPutOptions, type KVStore, type SqliteBatchDatabase, createDatabaseProvider, createInMemoryKV, runSqliteStatements };
|
package/dist/store/index.js
CHANGED
|
@@ -1,57 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
get(_target, prop) {
|
|
7
|
-
if (!current) throw new Error(message);
|
|
8
|
-
const value = current[prop];
|
|
9
|
-
return typeof value === "function" ? value.bind(current) : value;
|
|
10
|
-
},
|
|
11
|
-
has(_target, prop) {
|
|
12
|
-
return current !== null && prop in current;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
return {
|
|
16
|
-
db,
|
|
17
|
-
setDatabase(database) {
|
|
18
|
-
current = database;
|
|
19
|
-
},
|
|
20
|
-
isReady() {
|
|
21
|
-
return current !== null;
|
|
22
|
-
},
|
|
23
|
-
reset() {
|
|
24
|
-
current = null;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function createInMemoryKV(initial) {
|
|
29
|
-
const store = new Map(
|
|
30
|
-
initial ? Object.entries(initial).map(([k, v]) => [k, { value: v, metadata: null }]) : []
|
|
31
|
-
);
|
|
32
|
-
return {
|
|
33
|
-
async get(key) {
|
|
34
|
-
return store.get(key)?.value ?? null;
|
|
35
|
-
},
|
|
36
|
-
async getWithMetadata(key) {
|
|
37
|
-
const entry = store.get(key);
|
|
38
|
-
return { value: entry?.value ?? null, metadata: entry?.metadata ?? null };
|
|
39
|
-
},
|
|
40
|
-
async put(key, value, options) {
|
|
41
|
-
store.set(key, { value, metadata: options?.metadata ?? null });
|
|
42
|
-
},
|
|
43
|
-
async delete(key) {
|
|
44
|
-
store.delete(key);
|
|
45
|
-
},
|
|
46
|
-
async list(options) {
|
|
47
|
-
const prefix = options?.prefix ?? "";
|
|
48
|
-
const keys = [...store.keys()].filter((k) => k.startsWith(prefix)).sort().map((name) => ({ name }));
|
|
49
|
-
return { keys, list_complete: true };
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
createDatabaseProvider,
|
|
3
|
+
createInMemoryKV,
|
|
4
|
+
runSqliteStatements
|
|
5
|
+
} from "../chunk-LRHVCVEW.js";
|
|
53
6
|
export {
|
|
54
7
|
createDatabaseProvider,
|
|
55
|
-
createInMemoryKV
|
|
8
|
+
createInMemoryKV,
|
|
9
|
+
runSqliteStatements
|
|
56
10
|
};
|
|
57
11
|
//# sourceMappingURL=index.js.map
|
package/dist/store/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-app",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.27",
|
|
4
4
|
"packageManager": "pnpm@10.33.4",
|
|
5
5
|
"description": "Application-shell framework for Tangle agent products: a bounded tool loop, the structured agent→app tool side channel, integration-hub client, per-workspace billing, and crypto — composed over the Tangle agent substrate through typed seams.",
|
|
6
6
|
"keywords": [
|