@ipab/cli 0.1.0-rc.8 → 0.1.0-rc.9
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/README.md +47 -30
- package/dist/bundled-skills.d.ts +14 -0
- package/dist/bundled-skills.d.ts.map +1 -0
- package/dist/bundled-skills.js +34 -0
- package/dist/bundled-skills.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +21 -7
- package/dist/cli.js.map +1 -1
- package/dist/daemon.d.ts +4 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +200 -0
- package/dist/daemon.js.map +1 -0
- package/dist/doctor.d.ts +2 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +18 -4
- package/dist/doctor.js.map +1 -1
- package/dist/skill-source.d.ts +4 -0
- package/dist/skill-source.d.ts.map +1 -1
- package/dist/skill-source.js +14 -2
- package/dist/skill-source.js.map +1 -1
- package/dist/skills.d.ts +18 -1
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +137 -39
- package/dist/skills.js.map +1 -1
- package/dist/swarm-files.d.ts.map +1 -1
- package/dist/swarm-files.js +8 -2
- package/dist/swarm-files.js.map +1 -1
- package/dist/swarm.d.ts +2 -0
- package/dist/swarm.d.ts.map +1 -1
- package/dist/swarm.js +12 -3
- package/dist/swarm.js.map +1 -1
- package/package.json +1 -1
- package/src/bundled-skills.ts +60 -0
- package/src/cli.ts +30 -7
- package/src/daemon.ts +237 -0
- package/src/doctor.ts +42 -5
- package/src/skill-source.ts +16 -2
- package/src/skills.ts +195 -53
- package/src/swarm-files.ts +6 -2
- package/src/swarm.ts +13 -3
package/dist/swarm.js
CHANGED
|
@@ -920,6 +920,7 @@ async function privateSource(context, record, signal, candidates) {
|
|
|
920
920
|
export async function swarmDaemon(context, selected, signal) {
|
|
921
921
|
const lock = await privateDirectory(context.stateDir, "swarm-daemon");
|
|
922
922
|
await withPrivateLock(lock, async () => {
|
|
923
|
+
const closeReadiness = await context.daemonReady?.();
|
|
923
924
|
const sessions = new Map();
|
|
924
925
|
context.diagnostic?.("IPAB daemon running in foreground; Ctrl-C stops management and leaves Kubo running.");
|
|
925
926
|
const persist = async (url, session, running) => {
|
|
@@ -1101,8 +1102,13 @@ export async function swarmDaemon(context, selected, signal) {
|
|
|
1101
1102
|
}
|
|
1102
1103
|
}
|
|
1103
1104
|
finally {
|
|
1104
|
-
|
|
1105
|
-
|
|
1105
|
+
try {
|
|
1106
|
+
for (const [url, session] of sessions)
|
|
1107
|
+
await persist(url, session, false);
|
|
1108
|
+
}
|
|
1109
|
+
finally {
|
|
1110
|
+
await closeReadiness?.();
|
|
1111
|
+
}
|
|
1106
1112
|
}
|
|
1107
1113
|
}, signal, 1);
|
|
1108
1114
|
}
|
|
@@ -1117,6 +1123,7 @@ async function activate(context, record) {
|
|
|
1117
1123
|
context.sourcePeers = peers;
|
|
1118
1124
|
}
|
|
1119
1125
|
context.node = node;
|
|
1126
|
+
await context.ensureDaemon?.();
|
|
1120
1127
|
}
|
|
1121
1128
|
async function localForRead(context, configUrl) {
|
|
1122
1129
|
const record = await local(context, configUrl);
|
|
@@ -1695,7 +1702,9 @@ async function lazyPrivateSource(context, url, account, basis) {
|
|
|
1695
1702
|
record.config.epoch !== basis.epoch ||
|
|
1696
1703
|
record.config.headId !== basis.headId)
|
|
1697
1704
|
throw new HostError("Swarm membership changed since this cached HEAD; retry with --refresh.");
|
|
1698
|
-
|
|
1705
|
+
const { source } = await privateSource(scoped, record, signal);
|
|
1706
|
+
await context.ensureDaemon?.();
|
|
1707
|
+
return source;
|
|
1699
1708
|
};
|
|
1700
1709
|
// Same lock order as Owner rotation: credentials first, then the node.
|
|
1701
1710
|
return withPrivateLock(await directory(scoped), authorize, signal);
|