skillwiki 0.8.10-beta.4 → 0.9.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.
package/dist/cli.js
CHANGED
|
@@ -184,6 +184,7 @@ var endpointName = z.string().min(1).regex(/^[A-Za-z0-9_.-]+$/, "must be a hostn
|
|
|
184
184
|
var ipAddress = z.string().min(1).regex(/^[0-9a-fA-F:.]+$/, "must be an IP address token");
|
|
185
185
|
var sshAlias = z.string().min(1).regex(/^[A-Za-z0-9_.@-]+$/, "must be an SSH alias token");
|
|
186
186
|
var sshUser = z.string().min(1).regex(/^[A-Za-z0-9_.-]+$/, "must be an SSH user token");
|
|
187
|
+
var absolutePath = z.string().min(1).regex(/^\//, "must be an absolute path");
|
|
187
188
|
var FleetAccessProfileSchema = z.object({
|
|
188
189
|
status: z.enum(["local", "configured", "planned", "absent", "unknown"]),
|
|
189
190
|
ssh_aliases: z.array(sshAlias).optional(),
|
|
@@ -200,6 +201,26 @@ var FleetHostIdentitySchema = z.object({
|
|
|
200
201
|
addresses: z.array(ipAddress).optional()
|
|
201
202
|
}).strict().optional()
|
|
202
203
|
}).strict();
|
|
204
|
+
var FleetSkillwikiSatelliteSchema = z.object({
|
|
205
|
+
enabled: z.boolean(),
|
|
206
|
+
user: sshUser,
|
|
207
|
+
vault_path: absolutePath,
|
|
208
|
+
repo_path: absolutePath,
|
|
209
|
+
ssh_alias: sshAlias,
|
|
210
|
+
scheduler: z.enum(["systemd"]),
|
|
211
|
+
timezone: z.string().min(1).optional(),
|
|
212
|
+
jobs: z.array(z.enum([
|
|
213
|
+
"self-update-check",
|
|
214
|
+
"vault-sync-preflight",
|
|
215
|
+
"agent-memory-trends-daily",
|
|
216
|
+
"session-brief-refresh",
|
|
217
|
+
"health-summary"
|
|
218
|
+
])).min(1),
|
|
219
|
+
cadence: z.object({
|
|
220
|
+
self_update_check: z.literal("every-4-hours").optional(),
|
|
221
|
+
daily_window: z.string().min(1).optional()
|
|
222
|
+
}).strict().optional()
|
|
223
|
+
}).strict();
|
|
203
224
|
var FleetHostSchema = z.object({
|
|
204
225
|
class: z.enum(["dev-macos", "dev-linux", "prod-linux", "unknown"]),
|
|
205
226
|
role: z.enum(["leaf", "snapshotter"]),
|
|
@@ -208,6 +229,9 @@ var FleetHostSchema = z.object({
|
|
|
208
229
|
identity: FleetHostIdentitySchema,
|
|
209
230
|
access: z.object({
|
|
210
231
|
from: z.record(hostId, FleetAccessProfileSchema).optional()
|
|
232
|
+
}).strict().optional(),
|
|
233
|
+
maintenance: z.object({
|
|
234
|
+
skillwiki_satellite: FleetSkillwikiSatelliteSchema.optional()
|
|
211
235
|
}).strict().optional()
|
|
212
236
|
}).strict();
|
|
213
237
|
var FleetManifestSchema = z.object({
|
|
@@ -9625,7 +9649,8 @@ function formatKnownContext(input) {
|
|
|
9625
9649
|
const protectedValue = host.protected === true ? "true" : "false";
|
|
9626
9650
|
const writesTo = host.writes_to.join(", ");
|
|
9627
9651
|
const selfAliases = collectSelfAliases(input.manifest, input.hostId);
|
|
9628
|
-
const outbound =
|
|
9652
|
+
const outbound = collectOutboundAccess(input.manifest, input.hostId);
|
|
9653
|
+
const maintenanceLines = formatMaintenanceLines(host);
|
|
9629
9654
|
const guidance = input.hostId === "macos-dev" ? "use declared SSH aliases for remote work when needed; do not assume undeclared hosts have reciprocal SSH access." : `this session is already on \`${input.hostId}\`; do not SSH to self aliases unless the user explicitly asks. Do not assume outbound SSH to other fleet hosts is configured.`;
|
|
9630
9655
|
return [
|
|
9631
9656
|
"## Runtime Host Context",
|
|
@@ -9636,8 +9661,9 @@ function formatKnownContext(input) {
|
|
|
9636
9661
|
`- Workspace: ${formatMaybe(input.cwd)}`,
|
|
9637
9662
|
`- Vault: ${formatMaybe(input.vault)}`,
|
|
9638
9663
|
`- Fleet role: \`${host.role}\`; protected: \`${protectedValue}\`; writes_to: \`${writesTo}\``,
|
|
9664
|
+
...maintenanceLines,
|
|
9639
9665
|
`- Self SSH aliases known in fleet: ${formatList(selfAliases)}`,
|
|
9640
|
-
`- Declared outbound SSH from this source: ${
|
|
9666
|
+
`- Declared outbound SSH from this source: ${formatOutboundAccess(outbound)}`,
|
|
9641
9667
|
`- Guidance: ${guidance}`
|
|
9642
9668
|
].join("\n");
|
|
9643
9669
|
}
|
|
@@ -9665,16 +9691,36 @@ function collectSelfAliases(manifest, hostId2) {
|
|
|
9665
9691
|
}
|
|
9666
9692
|
return [...new Set(aliases)];
|
|
9667
9693
|
}
|
|
9668
|
-
function
|
|
9694
|
+
function collectOutboundAccess(manifest, sourceHostId) {
|
|
9669
9695
|
const hosts = [];
|
|
9670
9696
|
for (const [targetId, target] of Object.entries(manifest.hosts)) {
|
|
9671
9697
|
if (targetId === sourceHostId) continue;
|
|
9672
9698
|
const profile = target.access?.from?.[sourceHostId];
|
|
9673
9699
|
if (profile && (profile.status === "configured" || profile.status === "local")) {
|
|
9674
|
-
hosts.push(
|
|
9700
|
+
hosts.push({
|
|
9701
|
+
hostId: targetId,
|
|
9702
|
+
sshAliases: [...new Set(profile.ssh_aliases ?? [])],
|
|
9703
|
+
users: [...new Set(profile.users ?? [])]
|
|
9704
|
+
});
|
|
9675
9705
|
}
|
|
9676
9706
|
}
|
|
9677
|
-
return hosts.sort();
|
|
9707
|
+
return hosts.sort((left, right) => left.hostId.localeCompare(right.hostId));
|
|
9708
|
+
}
|
|
9709
|
+
function formatMaintenanceLines(host) {
|
|
9710
|
+
const satellite = host.maintenance?.skillwiki_satellite;
|
|
9711
|
+
if (!satellite?.enabled) return [];
|
|
9712
|
+
return [
|
|
9713
|
+
`- Maintenance role: \`skillwiki satellite\`; user: \`${satellite.user}\`; ssh: \`${satellite.ssh_alias}\``,
|
|
9714
|
+
`- Maintenance paths: maintenance vault: \`${satellite.vault_path}\`; repo: \`${satellite.repo_path}\`; scheduler: \`${satellite.scheduler}\`; jobs: ${formatList(satellite.jobs)}`
|
|
9715
|
+
];
|
|
9716
|
+
}
|
|
9717
|
+
function formatOutboundAccess(values) {
|
|
9718
|
+
if (values.length === 0) return "none";
|
|
9719
|
+
return values.map((value) => {
|
|
9720
|
+
const aliasPart = value.sshAliases.length > 0 ? ` via ${formatList(value.sshAliases)}` : " (no SSH aliases)";
|
|
9721
|
+
const usersPart = value.users.length > 0 ? ` (users: ${formatList(value.users)})` : "";
|
|
9722
|
+
return `\`${value.hostId}\`${aliasPart}${usersPart}`;
|
|
9723
|
+
}).join("; ");
|
|
9678
9724
|
}
|
|
9679
9725
|
function formatList(values) {
|
|
9680
9726
|
return values.length > 0 ? values.map((v) => `\`${v}\``).join(", ") : "none";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"skills": "./",
|
|
5
5
|
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 18 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|