@lumenflow/cli 3.6.6 → 3.6.7
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/init.js +78 -7
- package/dist/init.js.map +1 -1
- package/dist/initiative-create.js +74 -23
- package/dist/initiative-create.js.map +1 -1
- package/dist/lane-lock.js +62 -1
- package/dist/lane-lock.js.map +1 -1
- package/dist/lane-setup.js +102 -28
- package/dist/lane-setup.js.map +1 -1
- package/dist/lane-status.js +42 -0
- package/dist/lane-status.js.map +1 -1
- package/dist/lane-validate.js +62 -1
- package/dist/lane-validate.js.map +1 -1
- package/dist/plan-link.js +25 -2
- package/dist/plan-link.js.map +1 -1
- package/dist/public-manifest.js +7 -0
- package/dist/public-manifest.js.map +1 -1
- package/dist/release.js +17 -0
- package/dist/release.js.map +1 -1
- package/dist/state-doctor-fix.js +12 -11
- package/dist/state-doctor-fix.js.map +1 -1
- package/dist/state-emit.js +198 -0
- package/dist/state-emit.js.map +1 -0
- package/dist/wu-claim-state.js +58 -15
- package/dist/wu-claim-state.js.map +1 -1
- package/dist/wu-claim-worktree.js +3 -3
- package/dist/wu-claim-worktree.js.map +1 -1
- package/dist/wu-claim.js +19 -1
- package/dist/wu-claim.js.map +1 -1
- package/dist/wu-create-content.js +2 -4
- package/dist/wu-create-content.js.map +1 -1
- package/dist/wu-create-validation.js +14 -1
- package/dist/wu-create-validation.js.map +1 -1
- package/dist/wu-create.js +2 -6
- package/dist/wu-create.js.map +1 -1
- package/dist/wu-done.js +95 -4
- package/dist/wu-done.js.map +1 -1
- package/dist/wu-edit-operations.js +36 -5
- package/dist/wu-edit-operations.js.map +1 -1
- package/dist/wu-recover.js +115 -12
- package/dist/wu-recover.js.map +1 -1
- package/package.json +9 -8
- package/packs/sidekick/.turbo/turbo-build.log +4 -0
- package/packs/sidekick/README.md +194 -0
- package/packs/sidekick/constants.ts +10 -0
- package/packs/sidekick/index.ts +8 -0
- package/packs/sidekick/manifest-schema.ts +262 -0
- package/packs/sidekick/manifest.ts +333 -0
- package/packs/sidekick/manifest.yaml +406 -0
- package/packs/sidekick/pack-registration.ts +110 -0
- package/packs/sidekick/package.json +55 -0
- package/packs/sidekick/tool-impl/channel-tools.ts +226 -0
- package/packs/sidekick/tool-impl/index.ts +22 -0
- package/packs/sidekick/tool-impl/memory-tools.ts +188 -0
- package/packs/sidekick/tool-impl/routine-tools.ts +194 -0
- package/packs/sidekick/tool-impl/shared.ts +124 -0
- package/packs/sidekick/tool-impl/storage.ts +315 -0
- package/packs/sidekick/tool-impl/system-tools.ts +155 -0
- package/packs/sidekick/tool-impl/task-tools.ts +278 -0
- package/packs/sidekick/tools/channel-tools.ts +53 -0
- package/packs/sidekick/tools/index.ts +9 -0
- package/packs/sidekick/tools/memory-tools.ts +53 -0
- package/packs/sidekick/tools/routine-tools.ts +53 -0
- package/packs/sidekick/tools/system-tools.ts +47 -0
- package/packs/sidekick/tools/task-tools.ts +61 -0
- package/packs/sidekick/tools/types.ts +57 -0
- package/packs/sidekick/tsconfig.json +20 -0
- package/templates/core/ai/onboarding/starting-prompt.md.template +33 -2
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
id: sidekick
|
|
2
|
+
version: 0.1.0
|
|
3
|
+
config_key: sidekick
|
|
4
|
+
task_types:
|
|
5
|
+
- sidekick
|
|
6
|
+
tools:
|
|
7
|
+
- name: task:create
|
|
8
|
+
entry: tool-impl/task-tools.ts
|
|
9
|
+
permission: write
|
|
10
|
+
required_scopes:
|
|
11
|
+
- type: path
|
|
12
|
+
pattern: .sidekick/**
|
|
13
|
+
access: read
|
|
14
|
+
- type: path
|
|
15
|
+
pattern: .sidekick/**
|
|
16
|
+
access: write
|
|
17
|
+
input_schema:
|
|
18
|
+
type: object
|
|
19
|
+
properties:
|
|
20
|
+
title:
|
|
21
|
+
type: string
|
|
22
|
+
minLength: 1
|
|
23
|
+
description:
|
|
24
|
+
type: string
|
|
25
|
+
priority:
|
|
26
|
+
type: string
|
|
27
|
+
enum: [P0, P1, P2, P3]
|
|
28
|
+
due_at:
|
|
29
|
+
type: string
|
|
30
|
+
tags:
|
|
31
|
+
type: array
|
|
32
|
+
items: { type: string }
|
|
33
|
+
dry_run:
|
|
34
|
+
type: boolean
|
|
35
|
+
required: [title]
|
|
36
|
+
additionalProperties: false
|
|
37
|
+
output_schema:
|
|
38
|
+
type: object
|
|
39
|
+
additionalProperties: true
|
|
40
|
+
- name: task:list
|
|
41
|
+
entry: tool-impl/task-tools.ts
|
|
42
|
+
permission: read
|
|
43
|
+
required_scopes:
|
|
44
|
+
- type: path
|
|
45
|
+
pattern: .sidekick/**
|
|
46
|
+
access: read
|
|
47
|
+
input_schema:
|
|
48
|
+
type: object
|
|
49
|
+
properties:
|
|
50
|
+
status:
|
|
51
|
+
type: string
|
|
52
|
+
enum: [pending, done]
|
|
53
|
+
priority:
|
|
54
|
+
type: string
|
|
55
|
+
enum: [P0, P1, P2, P3]
|
|
56
|
+
tags:
|
|
57
|
+
type: array
|
|
58
|
+
items: { type: string }
|
|
59
|
+
search:
|
|
60
|
+
type: string
|
|
61
|
+
due_before:
|
|
62
|
+
type: string
|
|
63
|
+
limit:
|
|
64
|
+
type: integer
|
|
65
|
+
minimum: 1
|
|
66
|
+
additionalProperties: false
|
|
67
|
+
output_schema:
|
|
68
|
+
type: object
|
|
69
|
+
additionalProperties: true
|
|
70
|
+
- name: task:complete
|
|
71
|
+
entry: tool-impl/task-tools.ts
|
|
72
|
+
permission: write
|
|
73
|
+
required_scopes:
|
|
74
|
+
- type: path
|
|
75
|
+
pattern: .sidekick/**
|
|
76
|
+
access: read
|
|
77
|
+
- type: path
|
|
78
|
+
pattern: .sidekick/**
|
|
79
|
+
access: write
|
|
80
|
+
input_schema:
|
|
81
|
+
type: object
|
|
82
|
+
properties:
|
|
83
|
+
id:
|
|
84
|
+
type: string
|
|
85
|
+
minLength: 1
|
|
86
|
+
note:
|
|
87
|
+
type: string
|
|
88
|
+
dry_run:
|
|
89
|
+
type: boolean
|
|
90
|
+
required: [id]
|
|
91
|
+
additionalProperties: false
|
|
92
|
+
output_schema:
|
|
93
|
+
type: object
|
|
94
|
+
additionalProperties: true
|
|
95
|
+
- name: task:schedule
|
|
96
|
+
entry: tool-impl/task-tools.ts
|
|
97
|
+
permission: write
|
|
98
|
+
required_scopes:
|
|
99
|
+
- type: path
|
|
100
|
+
pattern: .sidekick/**
|
|
101
|
+
access: read
|
|
102
|
+
- type: path
|
|
103
|
+
pattern: .sidekick/**
|
|
104
|
+
access: write
|
|
105
|
+
input_schema:
|
|
106
|
+
type: object
|
|
107
|
+
properties:
|
|
108
|
+
id:
|
|
109
|
+
type: string
|
|
110
|
+
minLength: 1
|
|
111
|
+
due_at:
|
|
112
|
+
type: string
|
|
113
|
+
cron:
|
|
114
|
+
type: string
|
|
115
|
+
dry_run:
|
|
116
|
+
type: boolean
|
|
117
|
+
required: [id]
|
|
118
|
+
additionalProperties: false
|
|
119
|
+
output_schema:
|
|
120
|
+
type: object
|
|
121
|
+
additionalProperties: true
|
|
122
|
+
- name: memory:store
|
|
123
|
+
entry: tool-impl/memory-tools.ts
|
|
124
|
+
permission: write
|
|
125
|
+
required_scopes:
|
|
126
|
+
- type: path
|
|
127
|
+
pattern: .sidekick/**
|
|
128
|
+
access: read
|
|
129
|
+
- type: path
|
|
130
|
+
pattern: .sidekick/**
|
|
131
|
+
access: write
|
|
132
|
+
input_schema:
|
|
133
|
+
type: object
|
|
134
|
+
properties:
|
|
135
|
+
type:
|
|
136
|
+
type: string
|
|
137
|
+
enum: [fact, preference, note, snippet]
|
|
138
|
+
content:
|
|
139
|
+
type: string
|
|
140
|
+
minLength: 1
|
|
141
|
+
tags:
|
|
142
|
+
type: array
|
|
143
|
+
items: { type: string }
|
|
144
|
+
dry_run:
|
|
145
|
+
type: boolean
|
|
146
|
+
required: [type, content]
|
|
147
|
+
additionalProperties: false
|
|
148
|
+
output_schema:
|
|
149
|
+
type: object
|
|
150
|
+
additionalProperties: true
|
|
151
|
+
- name: memory:recall
|
|
152
|
+
entry: tool-impl/memory-tools.ts
|
|
153
|
+
permission: read
|
|
154
|
+
required_scopes:
|
|
155
|
+
- type: path
|
|
156
|
+
pattern: .sidekick/**
|
|
157
|
+
access: read
|
|
158
|
+
input_schema:
|
|
159
|
+
type: object
|
|
160
|
+
properties:
|
|
161
|
+
query:
|
|
162
|
+
type: string
|
|
163
|
+
type:
|
|
164
|
+
type: string
|
|
165
|
+
enum: [fact, preference, note, snippet]
|
|
166
|
+
tags:
|
|
167
|
+
type: array
|
|
168
|
+
items: { type: string }
|
|
169
|
+
limit:
|
|
170
|
+
type: integer
|
|
171
|
+
minimum: 1
|
|
172
|
+
additionalProperties: false
|
|
173
|
+
output_schema:
|
|
174
|
+
type: object
|
|
175
|
+
additionalProperties: true
|
|
176
|
+
- name: memory:forget
|
|
177
|
+
entry: tool-impl/memory-tools.ts
|
|
178
|
+
permission: write
|
|
179
|
+
required_scopes:
|
|
180
|
+
- type: path
|
|
181
|
+
pattern: .sidekick/**
|
|
182
|
+
access: read
|
|
183
|
+
- type: path
|
|
184
|
+
pattern: .sidekick/**
|
|
185
|
+
access: write
|
|
186
|
+
input_schema:
|
|
187
|
+
type: object
|
|
188
|
+
properties:
|
|
189
|
+
id:
|
|
190
|
+
type: string
|
|
191
|
+
minLength: 1
|
|
192
|
+
dry_run:
|
|
193
|
+
type: boolean
|
|
194
|
+
required: [id]
|
|
195
|
+
additionalProperties: false
|
|
196
|
+
output_schema:
|
|
197
|
+
type: object
|
|
198
|
+
additionalProperties: true
|
|
199
|
+
- name: channel:configure
|
|
200
|
+
entry: tool-impl/channel-tools.ts
|
|
201
|
+
permission: write
|
|
202
|
+
required_scopes:
|
|
203
|
+
- type: path
|
|
204
|
+
pattern: .sidekick/**
|
|
205
|
+
access: read
|
|
206
|
+
- type: path
|
|
207
|
+
pattern: .sidekick/**
|
|
208
|
+
access: write
|
|
209
|
+
input_schema:
|
|
210
|
+
type: object
|
|
211
|
+
properties:
|
|
212
|
+
name:
|
|
213
|
+
type: string
|
|
214
|
+
minLength: 1
|
|
215
|
+
type:
|
|
216
|
+
type: string
|
|
217
|
+
enum: [terminal]
|
|
218
|
+
dry_run:
|
|
219
|
+
type: boolean
|
|
220
|
+
required: [name]
|
|
221
|
+
additionalProperties: false
|
|
222
|
+
output_schema:
|
|
223
|
+
type: object
|
|
224
|
+
additionalProperties: true
|
|
225
|
+
- name: channel:send
|
|
226
|
+
entry: tool-impl/channel-tools.ts
|
|
227
|
+
permission: write
|
|
228
|
+
required_scopes:
|
|
229
|
+
- type: path
|
|
230
|
+
pattern: .sidekick/**
|
|
231
|
+
access: read
|
|
232
|
+
- type: path
|
|
233
|
+
pattern: .sidekick/**
|
|
234
|
+
access: write
|
|
235
|
+
input_schema:
|
|
236
|
+
type: object
|
|
237
|
+
properties:
|
|
238
|
+
channel:
|
|
239
|
+
type: string
|
|
240
|
+
content:
|
|
241
|
+
type: string
|
|
242
|
+
minLength: 1
|
|
243
|
+
sender:
|
|
244
|
+
type: string
|
|
245
|
+
dry_run:
|
|
246
|
+
type: boolean
|
|
247
|
+
required: [content]
|
|
248
|
+
additionalProperties: false
|
|
249
|
+
output_schema:
|
|
250
|
+
type: object
|
|
251
|
+
additionalProperties: true
|
|
252
|
+
- name: channel:receive
|
|
253
|
+
entry: tool-impl/channel-tools.ts
|
|
254
|
+
permission: read
|
|
255
|
+
required_scopes:
|
|
256
|
+
- type: path
|
|
257
|
+
pattern: .sidekick/**
|
|
258
|
+
access: read
|
|
259
|
+
input_schema:
|
|
260
|
+
type: object
|
|
261
|
+
properties:
|
|
262
|
+
channel:
|
|
263
|
+
type: string
|
|
264
|
+
limit:
|
|
265
|
+
type: integer
|
|
266
|
+
minimum: 1
|
|
267
|
+
since:
|
|
268
|
+
type: string
|
|
269
|
+
additionalProperties: false
|
|
270
|
+
output_schema:
|
|
271
|
+
type: object
|
|
272
|
+
additionalProperties: true
|
|
273
|
+
- name: routine:create
|
|
274
|
+
entry: tool-impl/routine-tools.ts
|
|
275
|
+
permission: write
|
|
276
|
+
required_scopes:
|
|
277
|
+
- type: path
|
|
278
|
+
pattern: .sidekick/**
|
|
279
|
+
access: read
|
|
280
|
+
- type: path
|
|
281
|
+
pattern: .sidekick/**
|
|
282
|
+
access: write
|
|
283
|
+
input_schema:
|
|
284
|
+
type: object
|
|
285
|
+
properties:
|
|
286
|
+
name:
|
|
287
|
+
type: string
|
|
288
|
+
minLength: 1
|
|
289
|
+
steps:
|
|
290
|
+
type: array
|
|
291
|
+
minItems: 1
|
|
292
|
+
items:
|
|
293
|
+
type: object
|
|
294
|
+
properties:
|
|
295
|
+
tool:
|
|
296
|
+
type: string
|
|
297
|
+
minLength: 1
|
|
298
|
+
input:
|
|
299
|
+
type: object
|
|
300
|
+
additionalProperties: true
|
|
301
|
+
required: [tool]
|
|
302
|
+
additionalProperties: false
|
|
303
|
+
cron:
|
|
304
|
+
type: string
|
|
305
|
+
enabled:
|
|
306
|
+
type: boolean
|
|
307
|
+
dry_run:
|
|
308
|
+
type: boolean
|
|
309
|
+
required: [name, steps]
|
|
310
|
+
additionalProperties: false
|
|
311
|
+
output_schema:
|
|
312
|
+
type: object
|
|
313
|
+
additionalProperties: true
|
|
314
|
+
- name: routine:list
|
|
315
|
+
entry: tool-impl/routine-tools.ts
|
|
316
|
+
permission: read
|
|
317
|
+
required_scopes:
|
|
318
|
+
- type: path
|
|
319
|
+
pattern: .sidekick/**
|
|
320
|
+
access: read
|
|
321
|
+
input_schema:
|
|
322
|
+
type: object
|
|
323
|
+
properties:
|
|
324
|
+
enabled_only:
|
|
325
|
+
type: boolean
|
|
326
|
+
limit:
|
|
327
|
+
type: integer
|
|
328
|
+
minimum: 1
|
|
329
|
+
additionalProperties: false
|
|
330
|
+
output_schema:
|
|
331
|
+
type: object
|
|
332
|
+
additionalProperties: true
|
|
333
|
+
- name: routine:run
|
|
334
|
+
entry: tool-impl/routine-tools.ts
|
|
335
|
+
permission: read
|
|
336
|
+
required_scopes:
|
|
337
|
+
- type: path
|
|
338
|
+
pattern: .sidekick/**
|
|
339
|
+
access: read
|
|
340
|
+
input_schema:
|
|
341
|
+
type: object
|
|
342
|
+
properties:
|
|
343
|
+
id:
|
|
344
|
+
type: string
|
|
345
|
+
minLength: 1
|
|
346
|
+
required: [id]
|
|
347
|
+
additionalProperties: false
|
|
348
|
+
output_schema:
|
|
349
|
+
type: object
|
|
350
|
+
additionalProperties: true
|
|
351
|
+
- name: sidekick:init
|
|
352
|
+
entry: tool-impl/system-tools.ts
|
|
353
|
+
permission: write
|
|
354
|
+
required_scopes:
|
|
355
|
+
- type: path
|
|
356
|
+
pattern: .sidekick/**
|
|
357
|
+
access: read
|
|
358
|
+
- type: path
|
|
359
|
+
pattern: .sidekick/**
|
|
360
|
+
access: write
|
|
361
|
+
input_schema:
|
|
362
|
+
type: object
|
|
363
|
+
properties: {}
|
|
364
|
+
additionalProperties: false
|
|
365
|
+
output_schema:
|
|
366
|
+
type: object
|
|
367
|
+
additionalProperties: true
|
|
368
|
+
- name: sidekick:status
|
|
369
|
+
entry: tool-impl/system-tools.ts
|
|
370
|
+
permission: read
|
|
371
|
+
required_scopes:
|
|
372
|
+
- type: path
|
|
373
|
+
pattern: .sidekick/**
|
|
374
|
+
access: read
|
|
375
|
+
input_schema:
|
|
376
|
+
type: object
|
|
377
|
+
properties: {}
|
|
378
|
+
additionalProperties: false
|
|
379
|
+
output_schema:
|
|
380
|
+
type: object
|
|
381
|
+
additionalProperties: true
|
|
382
|
+
- name: sidekick:export
|
|
383
|
+
entry: tool-impl/system-tools.ts
|
|
384
|
+
permission: read
|
|
385
|
+
required_scopes:
|
|
386
|
+
- type: path
|
|
387
|
+
pattern: .sidekick/**
|
|
388
|
+
access: read
|
|
389
|
+
input_schema:
|
|
390
|
+
type: object
|
|
391
|
+
properties:
|
|
392
|
+
include_audit:
|
|
393
|
+
type: boolean
|
|
394
|
+
additionalProperties: false
|
|
395
|
+
output_schema:
|
|
396
|
+
type: object
|
|
397
|
+
additionalProperties: true
|
|
398
|
+
policies:
|
|
399
|
+
- id: sidekick.policy.default
|
|
400
|
+
trigger: on_tool_request
|
|
401
|
+
decision: allow
|
|
402
|
+
reason: Default sidekick policy permits declared tools within scoped access.
|
|
403
|
+
evidence_types:
|
|
404
|
+
- sidekick.audited.tool-call
|
|
405
|
+
state_aliases: {}
|
|
406
|
+
lane_templates: []
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Copyright (c) 2026 Hellmai Ltd
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
3
|
+
|
|
4
|
+
import { createHash } from 'node:crypto';
|
|
5
|
+
import { readdir, readFile } from 'node:fs/promises';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import { SHA256_ALGORITHM, SIDEKICK_MANIFEST_FILE_NAME, UTF8_ENCODING } from './constants.js';
|
|
9
|
+
import { SIDEKICK_MANIFEST } from './manifest.js';
|
|
10
|
+
import type { SidekickPackManifest } from './manifest-schema.js';
|
|
11
|
+
|
|
12
|
+
const NULL_BYTE_BUFFER = Buffer.from([0]);
|
|
13
|
+
const DEFAULT_EXCLUSIONS = ['node_modules/', '.git/', 'dist/', '.DS_Store'];
|
|
14
|
+
|
|
15
|
+
function getDefaultPackRoot(): string {
|
|
16
|
+
return path.dirname(fileURLToPath(import.meta.url));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function normalizeRelativePath(root: string, absolutePath: string): string {
|
|
20
|
+
return path.relative(root, absolutePath).split(path.sep).join('/');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function shouldExclude(relativePath: string, exclusions: readonly string[]): boolean {
|
|
24
|
+
return exclusions.some((excluded) => {
|
|
25
|
+
if (excluded.endsWith('/')) {
|
|
26
|
+
return relativePath.startsWith(excluded);
|
|
27
|
+
}
|
|
28
|
+
return relativePath === excluded || relativePath.endsWith(`/${excluded}`);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function collectFilesRecursive(root: string, directory: string): Promise<string[]> {
|
|
33
|
+
const entries = await readdir(directory, { withFileTypes: true });
|
|
34
|
+
const sortedEntries = [...entries].sort((left, right) => left.name.localeCompare(right.name));
|
|
35
|
+
const files: string[] = [];
|
|
36
|
+
|
|
37
|
+
for (const entry of sortedEntries) {
|
|
38
|
+
const absolutePath = path.join(directory, entry.name);
|
|
39
|
+
const relativePath = normalizeRelativePath(root, absolutePath);
|
|
40
|
+
if (entry.isDirectory()) {
|
|
41
|
+
files.push(...(await collectFilesRecursive(root, absolutePath)));
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
files.push(relativePath);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return files;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function listPackFiles(packRoot: string, exclusions: readonly string[]): Promise<string[]> {
|
|
51
|
+
const absoluteRoot = path.resolve(packRoot);
|
|
52
|
+
const allFiles = await collectFilesRecursive(absoluteRoot, absoluteRoot);
|
|
53
|
+
return allFiles.filter((relativePath) => !shouldExclude(relativePath, exclusions)).sort();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export async function computeSidekickPackIntegrity(
|
|
57
|
+
packRoot = getDefaultPackRoot(),
|
|
58
|
+
exclusions: readonly string[] = DEFAULT_EXCLUSIONS,
|
|
59
|
+
): Promise<`sha256:${string}`> {
|
|
60
|
+
const absoluteRoot = path.resolve(packRoot);
|
|
61
|
+
const files = await listPackFiles(absoluteRoot, exclusions);
|
|
62
|
+
const digestChunks: Buffer[] = [];
|
|
63
|
+
|
|
64
|
+
for (const relativePath of files) {
|
|
65
|
+
const fileContents = await readFile(path.join(absoluteRoot, relativePath));
|
|
66
|
+
const fileHash = createHash(SHA256_ALGORITHM).update(fileContents).digest('hex');
|
|
67
|
+
digestChunks.push(Buffer.from(relativePath, UTF8_ENCODING));
|
|
68
|
+
digestChunks.push(NULL_BYTE_BUFFER);
|
|
69
|
+
digestChunks.push(Buffer.from(fileHash, UTF8_ENCODING));
|
|
70
|
+
digestChunks.push(NULL_BYTE_BUFFER);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const combinedDigest = createHash(SHA256_ALGORITHM)
|
|
74
|
+
.update(digestChunks.length === 0 ? Buffer.alloc(0) : Buffer.concat(digestChunks))
|
|
75
|
+
.digest('hex');
|
|
76
|
+
|
|
77
|
+
return `sha256:${combinedDigest}`;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export async function loadSidekickManifest(
|
|
81
|
+
packRoot = getDefaultPackRoot(),
|
|
82
|
+
): Promise<SidekickPackManifest> {
|
|
83
|
+
const manifestPath = path.join(path.resolve(packRoot), SIDEKICK_MANIFEST_FILE_NAME);
|
|
84
|
+
await readFile(manifestPath, UTF8_ENCODING);
|
|
85
|
+
return structuredClone(SIDEKICK_MANIFEST);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface RegisteredSidekickPack {
|
|
89
|
+
manifest: SidekickPackManifest;
|
|
90
|
+
packRoot: string;
|
|
91
|
+
manifestPath: string;
|
|
92
|
+
integrity: `sha256:${string}`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export async function registerSidekickPack(options?: {
|
|
96
|
+
packRoot?: string;
|
|
97
|
+
exclusions?: readonly string[];
|
|
98
|
+
}): Promise<RegisteredSidekickPack> {
|
|
99
|
+
const packRoot = path.resolve(options?.packRoot ?? getDefaultPackRoot());
|
|
100
|
+
const exclusions = options?.exclusions ?? DEFAULT_EXCLUSIONS;
|
|
101
|
+
const manifest = await loadSidekickManifest(packRoot);
|
|
102
|
+
const integrity = await computeSidekickPackIntegrity(packRoot, exclusions);
|
|
103
|
+
|
|
104
|
+
return {
|
|
105
|
+
manifest,
|
|
106
|
+
packRoot,
|
|
107
|
+
manifestPath: path.join(packRoot, SIDEKICK_MANIFEST_FILE_NAME),
|
|
108
|
+
integrity,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lumenflow/packs-sidekick",
|
|
3
|
+
"version": "3.6.6",
|
|
4
|
+
"description": "Sidekick personal assistant pack for LumenFlow — 16 tools for task management, typed memory, channels, routines, and audit",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"lumenflow",
|
|
7
|
+
"pack",
|
|
8
|
+
"sidekick",
|
|
9
|
+
"personal-assistant",
|
|
10
|
+
"task-management",
|
|
11
|
+
"memory"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/hellmai/lumenflow-dev",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/hellmai/lumenflow-dev.git",
|
|
17
|
+
"directory": "packages/@lumenflow/packs/sidekick"
|
|
18
|
+
},
|
|
19
|
+
"license": "AGPL-3.0-only",
|
|
20
|
+
"author": {
|
|
21
|
+
"name": "HellmAI",
|
|
22
|
+
"url": "https://hellm.ai"
|
|
23
|
+
},
|
|
24
|
+
"type": "module",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": "./dist/index.js",
|
|
27
|
+
"./storage": "./dist/tool-impl/storage.js",
|
|
28
|
+
"./tools": "./dist/tools/index.js",
|
|
29
|
+
"./tool-impl": "./dist/tool-impl/index.js"
|
|
30
|
+
},
|
|
31
|
+
"main": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"manifest.yaml",
|
|
36
|
+
"LICENSE.md",
|
|
37
|
+
"README.md"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc",
|
|
41
|
+
"clean": "rm -rf dist *.tgz",
|
|
42
|
+
"test": "vitest run",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"typescript": "^5.9.3",
|
|
47
|
+
"vitest": "^4.0.18"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=22"
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
}
|
|
55
|
+
}
|