clawvault 2.3.0 → 2.3.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/bin/clawvault.js +6 -0
- package/bin/register-tailscale-commands.js +106 -0
- package/dist/{chunk-2HM7ZI4X.js → chunk-2AYPFUGX.js} +1 -1
- package/dist/chunk-4GBPTBFJ.js +628 -0
- package/dist/{chunk-PTSEIWXZ.js → chunk-6AQZIPLV.js} +2 -2
- package/dist/chunk-CLE2HHNT.js +513 -0
- package/dist/{chunk-VR5NE7PZ.js → chunk-HVTTYDCJ.js} +1 -1
- package/dist/{chunk-GQVYQCY5.js → chunk-JVAWKNIZ.js} +2 -2
- package/dist/{chunk-Z2XBWN7A.js → chunk-NAMFB7ZA.js} +2 -0
- package/dist/chunk-NZ4ZZNSR.js +373 -0
- package/dist/{chunk-MQUJNOHK.js → chunk-QALB2V3E.js} +1 -1
- package/dist/{chunk-6BBTI7NV.js → chunk-RARDNTUP.js} +2 -2
- package/dist/{chunk-SOTWYGH7.js → chunk-TB3BM2PQ.js} +1 -1
- package/dist/{chunk-GJEGPO7U.js → chunk-TT3FXYCN.js} +1 -1
- package/dist/{chunk-DPS7NYIU.js → chunk-USZU5CBB.js} +2 -2
- package/dist/{chunk-5WR6RRPX.js → chunk-VBVEXNI5.js} +1 -1
- package/dist/commands/archive.js +3 -3
- package/dist/commands/canvas.js +386 -12
- package/dist/commands/context.js +2 -2
- package/dist/commands/migrate-observations.js +2 -2
- package/dist/commands/observe.js +3 -3
- package/dist/commands/rebuild.js +3 -3
- package/dist/commands/reflect.js +4 -4
- package/dist/commands/replay.js +5 -5
- package/dist/commands/sleep.js +4 -4
- package/dist/commands/tailscale.d.ts +52 -0
- package/dist/commands/tailscale.js +25 -0
- package/dist/commands/wake.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +74 -12
- package/dist/lib/tailscale.d.ts +225 -0
- package/dist/lib/tailscale.js +49 -0
- package/dist/lib/webdav.d.ts +109 -0
- package/dist/lib/webdav.js +34 -0
- package/package.json +2 -2
package/bin/clawvault.js
CHANGED
|
@@ -16,7 +16,10 @@ import { registerResilienceCommands } from './register-resilience-commands.js';
|
|
|
16
16
|
import { registerSessionLifecycleCommands } from './register-session-lifecycle-commands.js';
|
|
17
17
|
import { registerTemplateCommands } from './register-template-commands.js';
|
|
18
18
|
import { registerVaultOperationsCommands } from './register-vault-operations-commands.js';
|
|
19
|
+
|
|
19
20
|
import { registerTaskCommands } from './register-task-commands.js';
|
|
21
|
+
|
|
22
|
+
import { registerTailscaleCommands } from './register-tailscale-commands.js';
|
|
20
23
|
import {
|
|
21
24
|
getVault,
|
|
22
25
|
resolveVaultPath,
|
|
@@ -83,10 +86,13 @@ registerVaultOperationsCommands(program, {
|
|
|
83
86
|
path
|
|
84
87
|
});
|
|
85
88
|
|
|
89
|
+
|
|
86
90
|
registerTaskCommands(program, {
|
|
87
91
|
chalk,
|
|
88
92
|
resolveVaultPath
|
|
89
93
|
});
|
|
90
94
|
|
|
95
|
+
registerTailscaleCommands(program, { chalk });
|
|
96
|
+
|
|
91
97
|
// Parse and run
|
|
92
98
|
program.parse();
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tailscale networking command registrations.
|
|
3
|
+
* Provides vault synchronization over Tailscale networks.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export function registerTailscaleCommands(program, { chalk }) {
|
|
7
|
+
// === TAILSCALE-STATUS ===
|
|
8
|
+
program
|
|
9
|
+
.command('tailscale-status')
|
|
10
|
+
.alias('ts-status')
|
|
11
|
+
.description('Show Tailscale connection status and peers')
|
|
12
|
+
.option('--json', 'Output as JSON')
|
|
13
|
+
.option('--peers', 'Show all peers including offline')
|
|
14
|
+
.action(async (options) => {
|
|
15
|
+
try {
|
|
16
|
+
const { tailscaleStatusCommand } = await import('../dist/commands/tailscale.js');
|
|
17
|
+
await tailscaleStatusCommand({
|
|
18
|
+
json: options.json,
|
|
19
|
+
peers: options.peers
|
|
20
|
+
});
|
|
21
|
+
} catch (err) {
|
|
22
|
+
console.error(chalk.red(`Error: ${err.message}`));
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// === TAILSCALE-SYNC ===
|
|
28
|
+
program
|
|
29
|
+
.command('tailscale-sync')
|
|
30
|
+
.alias('ts-sync')
|
|
31
|
+
.description('Sync vault with a peer on the Tailscale network')
|
|
32
|
+
.requiredOption('--peer <hostname>', 'Peer hostname or IP to sync with')
|
|
33
|
+
.option('-v, --vault <path>', 'Vault path')
|
|
34
|
+
.option('--port <number>', 'Port on the peer (default: 8384)', parseInt)
|
|
35
|
+
.option('--direction <dir>', 'Sync direction: push, pull, or bidirectional', 'bidirectional')
|
|
36
|
+
.option('--dry-run', 'Show what would be synced without making changes')
|
|
37
|
+
.option('--delete-orphans', 'Delete files that exist locally but not on peer (pull only)')
|
|
38
|
+
.option('--categories <list>', 'Comma-separated list of categories to sync')
|
|
39
|
+
.option('--https', 'Use HTTPS for connection')
|
|
40
|
+
.option('--json', 'Output as JSON')
|
|
41
|
+
.action(async (options) => {
|
|
42
|
+
try {
|
|
43
|
+
const { tailscaleSyncCommand } = await import('../dist/commands/tailscale.js');
|
|
44
|
+
await tailscaleSyncCommand({
|
|
45
|
+
peer: options.peer,
|
|
46
|
+
vaultPath: options.vault,
|
|
47
|
+
port: options.port,
|
|
48
|
+
direction: options.direction,
|
|
49
|
+
dryRun: options.dryRun,
|
|
50
|
+
deleteOrphans: options.deleteOrphans,
|
|
51
|
+
categories: options.categories?.split(',').map(c => c.trim()),
|
|
52
|
+
https: options.https,
|
|
53
|
+
json: options.json
|
|
54
|
+
});
|
|
55
|
+
} catch (err) {
|
|
56
|
+
console.error(chalk.red(`Error: ${err.message}`));
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// === TAILSCALE-SERVE ===
|
|
62
|
+
program
|
|
63
|
+
.command('tailscale-serve')
|
|
64
|
+
.alias('ts-serve')
|
|
65
|
+
.description('Serve vault for sync over Tailscale')
|
|
66
|
+
.option('-v, --vault <path>', 'Vault path')
|
|
67
|
+
.option('--port <number>', 'Port to serve on (default: 8384)', parseInt)
|
|
68
|
+
.option('--funnel', 'Expose via Tailscale Funnel (public internet)')
|
|
69
|
+
.option('--background', 'Run in background')
|
|
70
|
+
.option('--stop', 'Stop serving')
|
|
71
|
+
.action(async (options) => {
|
|
72
|
+
try {
|
|
73
|
+
const { tailscaleServeCommand } = await import('../dist/commands/tailscale.js');
|
|
74
|
+
await tailscaleServeCommand({
|
|
75
|
+
vaultPath: options.vault,
|
|
76
|
+
port: options.port,
|
|
77
|
+
funnel: options.funnel,
|
|
78
|
+
background: options.background,
|
|
79
|
+
stop: options.stop
|
|
80
|
+
});
|
|
81
|
+
} catch (err) {
|
|
82
|
+
console.error(chalk.red(`Error: ${err.message}`));
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// === TAILSCALE-DISCOVER ===
|
|
88
|
+
program
|
|
89
|
+
.command('tailscale-discover')
|
|
90
|
+
.alias('ts-discover')
|
|
91
|
+
.description('Discover ClawVault peers on the Tailscale network')
|
|
92
|
+
.option('--port <number>', 'Port to check (default: 8384)', parseInt)
|
|
93
|
+
.option('--json', 'Output as JSON')
|
|
94
|
+
.action(async (options) => {
|
|
95
|
+
try {
|
|
96
|
+
const { tailscaleDiscoverCommand } = await import('../dist/commands/tailscale.js');
|
|
97
|
+
await tailscaleDiscoverCommand({
|
|
98
|
+
port: options.port,
|
|
99
|
+
json: options.json
|
|
100
|
+
});
|
|
101
|
+
} catch (err) {
|
|
102
|
+
console.error(chalk.red(`Error: ${err.message}`));
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getObservationPath,
|
|
15
15
|
getRawTranscriptPath,
|
|
16
16
|
toDateKey
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NAMFB7ZA.js";
|
|
18
18
|
|
|
19
19
|
// src/observer/compressor.ts
|
|
20
20
|
var CRITICAL_RE = /(?:\b(?:decision|decided|chose|chosen|selected|picked|opted|switched to)\s*:?|\bdecid(?:e|ed|ing|ion)\b|\berror\b|\bfail(?:ed|ure|ing)?\b|\bblock(?:ed|er)?\b|\bbreaking(?:\s+change)?s?\b|\bcritical\b|\b\w+\s+chosen\s+(?:for|over|as)\b|\bpublish(?:ed)?\b.*@?\d+\.\d+|\bmerge[d]?\s+(?:PR|pull\s+request)\b|\bshipped\b|\breleased?\b.*v?\d+\.\d+|\bsigned\b.*\b(?:contract|agreement|deal)\b|\bpricing\b.*\$|\bdemo\b.*\b(?:completed?|done|finished)\b|\bmeeting\b.*\b(?:completed?|done|finished)\b|\bstrategy\b.*\b(?:pivot|change|shift)\b)/i;
|