@fungi.computer/veil 0.6.1 → 0.6.2
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.
|
@@ -13,6 +13,7 @@ export declare function createCleanup(deps: {
|
|
|
13
13
|
bump: () => void;
|
|
14
14
|
}): {
|
|
15
15
|
cleanupPending: () => number;
|
|
16
|
+
cleanupRetryPending: () => number;
|
|
16
17
|
sweep: () => Effect.Effect<void, import("./contract.js").ConnectionsError, never>;
|
|
17
18
|
enqueueLocator: (connectionId: string, locator: string, credential: ConnectionRow["credential"]) => void;
|
|
18
19
|
enqueueCleanup: (row: ConnectionRow) => void;
|
|
@@ -4,8 +4,10 @@ const cleanupLimit = 5;
|
|
|
4
4
|
/** The cleanup outbox, attempt retirement and reconnect marking over the owner's SQLite. */
|
|
5
5
|
export function createCleanup(deps) {
|
|
6
6
|
const { sql, rows, bump, transactionSync } = deps;
|
|
7
|
-
/**
|
|
8
|
-
const cleanupPending = () => rows(count, "SELECT COUNT(*) AS n FROM veil_connection_cleanup
|
|
7
|
+
/** Credentials still waiting to be deleted, including exhausted retries. */
|
|
8
|
+
const cleanupPending = () => rows(count, "SELECT COUNT(*) AS n FROM veil_connection_cleanup")[0]?.n ?? 0;
|
|
9
|
+
/** Cleanup jobs eligible for another deletion attempt; hosts wake only for these. */
|
|
10
|
+
const cleanupRetryPending = () => rows(count, "SELECT COUNT(*) AS n FROM veil_connection_cleanup WHERE attempts < ?", cleanupLimit)[0]?.n ?? 0;
|
|
9
11
|
const sweep = () => Effect.gen(function* () {
|
|
10
12
|
yield* sync(expireAttempts);
|
|
11
13
|
const due = yield* sync(() => rows(cleanupRow, "SELECT * FROM veil_connection_cleanup WHERE attempts < ?", cleanupLimit));
|
|
@@ -57,6 +59,7 @@ export function createCleanup(deps) {
|
|
|
57
59
|
};
|
|
58
60
|
return {
|
|
59
61
|
cleanupPending,
|
|
62
|
+
cleanupRetryPending,
|
|
60
63
|
sweep,
|
|
61
64
|
enqueueLocator,
|
|
62
65
|
enqueueCleanup,
|
|
@@ -96,6 +96,7 @@ export declare function createConnections(options: ConnectionsOptions): {
|
|
|
96
96
|
}, ConnectionsError, never>;
|
|
97
97
|
sweep: () => Effect.Effect<void, ConnectionsError, never>;
|
|
98
98
|
cleanupPending: () => number;
|
|
99
|
+
cleanupRetryPending: () => number;
|
|
99
100
|
reconcilePending: () => Effect.Effect<string[], ConnectionsError, never>;
|
|
100
101
|
awaitingCustody: () => number;
|
|
101
102
|
};
|
package/dist/connections/core.js
CHANGED
|
@@ -117,7 +117,7 @@ export function createConnections(options) {
|
|
|
117
117
|
}
|
|
118
118
|
return url.href;
|
|
119
119
|
};
|
|
120
|
-
const { cleanupPending, sweep, enqueueLocator, enqueueCleanup, markReconnect, retireAttempt, } = createCleanup({
|
|
120
|
+
const { cleanupPending, cleanupRetryPending, sweep, enqueueLocator, enqueueCleanup, markReconnect, retireAttempt, } = createCleanup({
|
|
121
121
|
ownerId,
|
|
122
122
|
custody: options.custody,
|
|
123
123
|
clock: options.clock,
|
|
@@ -693,6 +693,7 @@ export function createConnections(options) {
|
|
|
693
693
|
update,
|
|
694
694
|
sweep,
|
|
695
695
|
cleanupPending,
|
|
696
|
+
cleanupRetryPending,
|
|
696
697
|
reconcilePending,
|
|
697
698
|
awaitingCustody: () => awaitingCustody().length,
|
|
698
699
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/veil",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "Team-authorized credential custody and provider access",
|
|
6
6
|
"type": "module",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
],
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"@fungi.computer/cairn": "0.1.0",
|
|
102
|
-
"@fungi.computer/forage": "0.3.
|
|
103
|
-
"@fungi.computer/mycelium": "0.3.
|
|
102
|
+
"@fungi.computer/forage": "0.3.2",
|
|
103
|
+
"@fungi.computer/mycelium": "0.3.5",
|
|
104
104
|
"@modelcontextprotocol/client": "2.0.0",
|
|
105
105
|
"@nangohq/node": "0.71.6",
|
|
106
106
|
"effect": "4.0.2",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"zod": "4.4.3"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
|
-
"@fungi.computer/watchdog": "0.1.
|
|
112
|
+
"@fungi.computer/watchdog": "0.1.1",
|
|
113
113
|
"@modelcontextprotocol/server": "2.0.0",
|
|
114
114
|
"@types/node": "24.13.3",
|
|
115
115
|
"typescript": "5.9.3",
|