minga-swarm 0.1.0 → 0.1.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/AGENTS.md +38 -4
- package/README.md +15 -1
- package/dist/minga.mjs +519 -75
- package/package.json +1 -1
- package/src/cli/client.ts +9 -3
- package/src/cli/commands.ts +216 -24
- package/src/cli/dispatch.ts +85 -20
- package/src/cli/doctor.ts +53 -2
- package/src/cli/init.ts +3 -2
- package/src/cli/join-doc.ts +29 -14
- package/src/cli/main.ts +26 -5
- package/src/cli/mcp.ts +54 -13
- package/src/cli/runtime.ts +2 -2
- package/src/cli/store.ts +60 -3
- package/src/cli/sync.ts +149 -0
- package/src/core/protocol.ts +25 -2
- package/src/log/reducer.ts +6 -0
- package/src/sched/scheduler.ts +17 -5
- package/src/server/app.ts +64 -9
- package/src/server/git-http.ts +76 -0
- package/src/server/latency.ts +38 -0
- package/src/server/main.ts +3 -1
- package/src/ui/dev-server.ts +39 -21
- package/src/ui/index.html +266 -116
package/src/ui/dev-server.ts
CHANGED
|
@@ -160,20 +160,35 @@ const MESSAGES = [
|
|
|
160
160
|
"checked small cases", "rewrite with decidable equality",
|
|
161
161
|
];
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"
|
|
166
|
-
"Resolution
|
|
163
|
+
// Each area owns a distinct pool of sub-areas, so no two branches share a label.
|
|
164
|
+
const AREAS = [
|
|
165
|
+
{ name: "Circuit lower bounds", subs: ["Switching lemmas", "Monotone circuits", "Depth hierarchy", "Gate elimination"] },
|
|
166
|
+
{ name: "Proof complexity", subs: ["Resolution width", "Cutting planes", "Nullstellensatz", "Proof size separations"] },
|
|
167
|
+
{ name: "Barriers", subs: ["Relativization", "Natural proofs", "Algebrization", "Entropy obstructions"] },
|
|
168
|
+
{ name: "Algebraic methods", subs: ["Polynomial method", "Approximating polynomials", "Rank arguments", "Combinatorial Nullstellensatz"] },
|
|
169
|
+
{ name: "Communication complexity", subs: ["Discrepancy bounds", "Information complexity", "Protocol compression", "Lower bound templates"] },
|
|
170
|
+
{ name: "Derandomization", subs: ["Pseudorandom generators", "Hardness versus randomness", "Extractor constructions", "Hitting sets"] },
|
|
167
171
|
] as const;
|
|
168
172
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
// Templates take a parameter, so every generated leaf title is unique without a "(variant N)" suffix.
|
|
174
|
+
const LEAF_TEMPLATES: ReadonlyArray<(n: number) => string> = [
|
|
175
|
+
n => `Formalize Håstad's switching lemma for depth-${3 + ((n - 1) % 3)} width ${n + 2}`,
|
|
176
|
+
n => `Bound Razborov approximators for CLIQUE_${n + 2}`,
|
|
177
|
+
n => `Prove the sunflower lemma for ${n + 3}-uniform families`,
|
|
178
|
+
n => `Separate monotone circuits for CLIQUE_${n + 2}`,
|
|
179
|
+
n => `Establish a resolution width lower bound of ${n + 4}`,
|
|
180
|
+
n => `Derive shrinkage exponent ${(n % 5) + 1} for depth-3 formulas`,
|
|
181
|
+
n => `Reduce SAT to 3-SAT on ${n + 6} variables`,
|
|
182
|
+
n => `Construct oracle B separating P^B from NP^B at length ${n + 4}`,
|
|
183
|
+
n => `Verify natural-proofs barrier instance ${n + 1} in Lean`,
|
|
184
|
+
n => `Bound Andreev's function on ${n + 7} inputs`,
|
|
185
|
+
n => `Prove backdoor set detection for width ${n + 2}`,
|
|
186
|
+
n => `Refine the Karchmer–Wigderson game for depth ${n + 3}`,
|
|
187
|
+
];
|
|
188
|
+
const leafTitle = (index: number): string => {
|
|
189
|
+
const t = LEAF_TEMPLATES[index % LEAF_TEMPLATES.length]!;
|
|
190
|
+
return t(Math.floor(index / LEAF_TEMPLATES.length) + 1);
|
|
191
|
+
};
|
|
177
192
|
|
|
178
193
|
// ---------------------------------------------------------------- seeding
|
|
179
194
|
|
|
@@ -305,23 +320,26 @@ function seed(): void {
|
|
|
305
320
|
}
|
|
306
321
|
|
|
307
322
|
const total = Math.max(4, FLAGS.tasks);
|
|
308
|
-
|
|
309
|
-
const
|
|
323
|
+
// Three to six named top-level areas, each with one shallow layer of named sub-areas.
|
|
324
|
+
const areaCount = Math.max(3, Math.min(6, Math.round(Math.sqrt(total) / 4)));
|
|
325
|
+
const subPerArea = Math.max(2, Math.min(4, Math.round(total / (areaCount * 40))));
|
|
326
|
+
const subCount = Math.min(areaCount * subPerArea, Math.max(0, total - areaCount - 1));
|
|
310
327
|
const areas: TaskState[] = [];
|
|
311
328
|
for (let i = 0; i < areaCount; i += 1) {
|
|
312
|
-
const a = addTask(
|
|
329
|
+
const a = addTask(AREAS[i]?.name ?? "Area " + (i + 1), "Branch point. Leaves below carry the work.", null, "open", 0, int(120, 400));
|
|
313
330
|
areas.push(a);
|
|
314
331
|
}
|
|
315
332
|
const subs: TaskState[] = [];
|
|
316
333
|
for (let i = 0; i < subCount; i += 1) {
|
|
317
|
-
const
|
|
318
|
-
|
|
334
|
+
const slot = i % areas.length;
|
|
335
|
+
const area = areas[slot]!;
|
|
336
|
+
const name = AREAS[slot]?.subs[Math.floor(i / areas.length)] ?? "Subarea";
|
|
337
|
+
subs.push(addTask(name, "Grouping of related leaves.", area.id, "open", 0, int(90, 320)));
|
|
319
338
|
}
|
|
320
339
|
const leaves = total - areaCount - subCount;
|
|
321
340
|
for (let i = 0; i < leaves; i += 1) {
|
|
322
|
-
const parent = subs[i % subs.length]!;
|
|
323
|
-
const
|
|
324
|
-
const title = i < LEAF_TITLES.length ? base : base + " (variant " + (1 + Math.floor(i / LEAF_TITLES.length)) + ")";
|
|
341
|
+
const parent = subs.length ? subs[i % subs.length]! : areas[i % areas.length]!;
|
|
342
|
+
const title = leafTitle(i);
|
|
325
343
|
const roll = rnd();
|
|
326
344
|
const status: TaskStatus = roll < 0.06 ? "solved" : roll < 0.1 ? "refuted" : roll < 0.13 ? "impossible" : roll < 0.16 ? "withdrawn" : "open";
|
|
327
345
|
const t = addTask(title, "Prove or refute the statement with machine-checked steps in Proofs/**.", parent.id, status, int(10, 80), int(10, 300));
|
|
@@ -786,7 +804,7 @@ function actionJoin(): boolean {
|
|
|
786
804
|
|
|
787
805
|
function actionPost(): boolean {
|
|
788
806
|
const parent = pick(Object.values(db.tasks));
|
|
789
|
-
const title = "
|
|
807
|
+
const title = "New task: " + leafTitle(int(0, 500));
|
|
790
808
|
const t = addTask(title, "Posted from the dev fixture.", parent ? parent.id : null, "open", rules.defaultPoints, 0);
|
|
791
809
|
emit("task.posted", HEAD, { task: t.id, title: t.title, body: t.body, parent: t.parent, points: t.points, by: "head" });
|
|
792
810
|
return true;
|