@drewpayment/mink 0.2.2 → 0.4.0

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.
@@ -5,15 +5,34 @@ export interface GlobalConfig {
5
5
  "wiki.git-backup"?: string;
6
6
  "wiki.git-remote"?: string;
7
7
  "notes.default-category"?: string;
8
+ "sync.enabled"?: string;
9
+ "sync.remote-url"?: string;
10
+ "sync.last-push"?: string;
11
+ "sync.last-pull"?: string;
8
12
  }
9
13
 
10
14
  export type ConfigKey = keyof GlobalConfig & string;
11
15
 
16
+ export type ConfigScope = "shared" | "local";
17
+
12
18
  export interface ConfigKeyMeta {
13
19
  key: ConfigKey;
14
20
  default: string;
15
21
  envVar: string;
16
22
  description: string;
23
+ scope: ConfigScope;
24
+ }
25
+
26
+ export interface DeviceInfo {
27
+ name: string;
28
+ hostname: string;
29
+ platform: string;
30
+ firstSeen: string;
31
+ lastSeen: string;
32
+ }
33
+
34
+ export interface DeviceRegistry {
35
+ devices: Record<string, DeviceInfo>;
17
36
  }
18
37
 
19
38
  export const CONFIG_KEYS: ConfigKeyMeta[] = [
@@ -22,36 +41,70 @@ export const CONFIG_KEYS: ConfigKeyMeta[] = [
22
41
  default: "~/.mink/wiki/",
23
42
  envVar: "MINK_WIKI_PATH",
24
43
  description: "Wiki vault location",
44
+ scope: "local",
25
45
  },
26
46
  {
27
47
  key: "wiki.enabled",
28
48
  default: "true",
29
49
  envVar: "MINK_WIKI_ENABLED",
30
50
  description: "Enable/disable the wiki feature",
51
+ scope: "shared",
31
52
  },
32
53
  {
33
54
  key: "wiki.sync-mode",
34
55
  default: "immediate",
35
56
  envVar: "MINK_WIKI_SYNC_MODE",
36
57
  description: "Sync mode: immediate or batched",
58
+ scope: "shared",
37
59
  },
38
60
  {
39
61
  key: "wiki.git-backup",
40
62
  default: "false",
41
63
  envVar: "MINK_WIKI_GIT_BACKUP",
42
- description: "Enable/disable auto-commit and push",
64
+ description: "Deprecated: use sync.enabled instead",
65
+ scope: "shared",
43
66
  },
44
67
  {
45
68
  key: "wiki.git-remote",
46
69
  default: "origin",
47
70
  envVar: "MINK_WIKI_GIT_REMOTE",
48
- description: "Git remote name for push",
71
+ description: "Deprecated: use sync.remote-url instead",
72
+ scope: "shared",
49
73
  },
50
74
  {
51
75
  key: "notes.default-category",
52
76
  default: "inbox",
53
77
  envVar: "MINK_NOTES_DEFAULT_CATEGORY",
54
78
  description: "Default category for notes captured via CLI",
79
+ scope: "shared",
80
+ },
81
+ {
82
+ key: "sync.enabled",
83
+ default: "false",
84
+ envVar: "MINK_SYNC_ENABLED",
85
+ description: "Enable/disable automatic git sync of ~/.mink",
86
+ scope: "shared",
87
+ },
88
+ {
89
+ key: "sync.remote-url",
90
+ default: "",
91
+ envVar: "MINK_SYNC_REMOTE_URL",
92
+ description: "Git remote URL for ~/.mink sync",
93
+ scope: "shared",
94
+ },
95
+ {
96
+ key: "sync.last-push",
97
+ default: "",
98
+ envVar: "MINK_SYNC_LAST_PUSH",
99
+ description: "ISO timestamp of last successful sync push",
100
+ scope: "local",
101
+ },
102
+ {
103
+ key: "sync.last-pull",
104
+ default: "",
105
+ envVar: "MINK_SYNC_LAST_PULL",
106
+ description: "ISO timestamp of last successful sync pull",
107
+ scope: "local",
55
108
  },
56
109
  ];
57
110
 
package/src/types/note.ts CHANGED
@@ -35,12 +35,19 @@ export interface NoteFrontmatter {
35
35
  [key: string]: unknown;
36
36
  }
37
37
 
38
+ export interface VaultLink {
39
+ name: string;
40
+ target: string;
41
+ linkedAt: string;
42
+ }
43
+
38
44
  export interface VaultManifest {
39
45
  version: number;
40
46
  createdAt: string;
41
47
  totalNotes: number;
42
48
  categories: Record<NoteCategory, number>;
43
49
  lastOrganized: string;
50
+ links?: VaultLink[];
44
51
  }
45
52
 
46
53
  export interface VaultIndexEntry {