openmill 0.1.0 → 0.2.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/README.md CHANGED
@@ -31,7 +31,7 @@ This works the same on macOS, Linux, and Windows. It:
31
31
  4. installs the openmill Claude plugin, which has the workflow skill and review agents, from a
32
32
  local marketplace in `~/.openmill/plugin`
33
33
  5. stops a running server from an older version, so the next command starts the new one
34
- 6. asks for `concurrency` and `model`
34
+ 6. asks for `concurrency`, `model`, and `effort`
35
35
 
36
36
  Pass `--yes` to skip the prompts and keep the defaults. To upgrade, run
37
37
  `npx openmill@latest install`.
@@ -53,6 +53,7 @@ openmill show login # worktree, session, and a resume command
53
53
  openmill stop login # abort the headless run so you can take over
54
54
  openmill requeue login # hand the job back to the queue
55
55
  openmill config set concurrency 3
56
+ openmill config unset model # back to the default
56
57
  openmill server status
57
58
  ```
58
59
 
@@ -115,8 +116,9 @@ publisher for a package that exists:
115
116
 
116
117
  ```sh
117
118
  pnpm build
118
- pnpm --filter openmill pack
119
- npm publish apps/cli/openmill-0.1.0.tgz --access public
119
+ cd apps/cli
120
+ pnpm pack
121
+ npm publish openmill-0.1.0.tgz --access public
120
122
  ```
121
123
 
122
124
  Then, on npmjs.com, open the package settings and add a trusted publisher. Use the GitHub
@@ -321,7 +321,7 @@ function jobsToStart(graph, jobs, slots) {
321
321
  }
322
322
  // package.json
323
323
  var name = "openmill";
324
- var version = "0.1.0";
324
+ var version = "0.2.0";
325
325
  var description = "A local software factory that turns design docs into pull requests.";
326
326
  // ../server/src/config-store.ts
327
327
  async function readConfig(path) {
@@ -540,6 +540,10 @@ function createApp(mill, { version, onShutdown }) {
540
540
  const parsed = parseConfigValue(key, value);
541
541
  if (!parsed.ok) throw new ApiError(400, parsed.error);
542
542
  return c.json({ config: await mill.setConfig(key, parsed.value) });
543
+ }).delete("/config/:key", async (c) => {
544
+ const key = c.req.param("key");
545
+ if (!isConfigKey(key)) throw new ApiError(400, `unknown config key ${key}`);
546
+ return c.json({ config: await mill.setConfig(key, void 0) });
543
547
  });
544
548
  }
545
549
  // ../server/src/exec.ts
@@ -1720,27 +1724,71 @@ async function stopRunningServer(options) {
1720
1724
  await stopServer(client);
1721
1725
  return "stopped";
1722
1726
  }
1723
- const CONFIG_PROMPTS = [{
1724
- key: "concurrency",
1725
- message: "How many jobs can run at once?"
1726
- }, {
1727
- key: "model",
1728
- message: "Which model should agents use? Leave empty for the harness default."
1729
- }];
1727
+ const MODELS = [
1728
+ {
1729
+ value: "claude-opus-5-5",
1730
+ label: "Opus 5.5"
1731
+ },
1732
+ {
1733
+ value: "claude-sonnet-5-5",
1734
+ label: "Sonnet 5.5"
1735
+ },
1736
+ {
1737
+ value: "claude-haiku-5-5",
1738
+ label: "Haiku 5.5"
1739
+ },
1740
+ {
1741
+ value: "claude-fable-5-2",
1742
+ label: "Fable 5.2"
1743
+ }
1744
+ ];
1745
+ const DEFAULT_MODEL = "";
1746
+ const OTHER_MODEL = "other";
1730
1747
  async function promptConfig(path) {
1731
1748
  const current = await readConfig(path);
1732
- for (const { key, message } of CONFIG_PROMPTS) {
1733
- const value = answer(await p.text({
1734
- message,
1735
- initialValue: String(current[key] ?? ""),
1736
- validate: (input = "") => {
1737
- const parsed = parseConfigValue(key, input);
1738
- return input.trim() === "" || parsed.ok ? void 0 : parsed.error;
1749
+ const concurrency = parseConfigValue("concurrency", answer(await p.text({
1750
+ message: "How many jobs can run at once?",
1751
+ initialValue: String(current.concurrency),
1752
+ validate: (input = "") => {
1753
+ const parsed = parseConfigValue("concurrency", input);
1754
+ return parsed.ok ? void 0 : parsed.error;
1755
+ }
1756
+ })));
1757
+ if (concurrency.ok) await writeConfigValue(path, "concurrency", concurrency.value);
1758
+ const custom = current.model && !MODELS.some((model) => model.value === current.model) ? [{
1759
+ value: current.model,
1760
+ label: current.model
1761
+ }] : [];
1762
+ let model = answer(await p.select({
1763
+ message: "Which model should agents use?",
1764
+ options: [
1765
+ {
1766
+ value: DEFAULT_MODEL,
1767
+ label: "Harness default"
1768
+ },
1769
+ ...custom,
1770
+ ...MODELS,
1771
+ {
1772
+ value: OTHER_MODEL,
1773
+ label: "Other",
1774
+ hint: "type a model id"
1739
1775
  }
1740
- })).trim();
1741
- const parsed = parseConfigValue(key, value);
1742
- if (value !== "" && parsed.ok) await writeConfigValue(path, key, parsed.value);
1743
- }
1776
+ ],
1777
+ initialValue: current.model ?? DEFAULT_MODEL
1778
+ }));
1779
+ if (model === OTHER_MODEL) model = answer(await p.text({
1780
+ message: "Model id",
1781
+ validate: (input = "") => {
1782
+ const parsed = parseConfigValue("model", input);
1783
+ return parsed.ok ? void 0 : parsed.error;
1784
+ }
1785
+ })).trim();
1786
+ await writeConfigValue(path, "model", model === DEFAULT_MODEL ? void 0 : model);
1787
+ await writeConfigValue(path, "effort", answer(await p.select({
1788
+ message: "How much effort should agents spend?",
1789
+ options: EFFORTS.map((value) => ({ value })),
1790
+ initialValue: current.effort
1791
+ })));
1744
1792
  }
1745
1793
  async function install(options) {
1746
1794
  const paths = resolvePaths();
@@ -1922,6 +1970,9 @@ config.command("set").argument("<key>", CONFIG_KEYS.join(", ")).argument("<value
1922
1970
  json: { value }
1923
1971
  }));
1924
1972
  });
1973
+ config.command("unset").description("remove a value so the default applies").argument("<key>", CONFIG_KEYS.join(", ")).action(async (key) => {
1974
+ await unwrap((await connect()).config[":key"].$delete({ param: { key } }));
1975
+ });
1925
1976
  config.command("list").action(async () => {
1926
1977
  const { config: values } = await unwrap((await connect()).config.$get());
1927
1978
  console.log(table(["KEY", "VALUE"], CONFIG_KEYS.map((key) => [key, values[key] === void 0 ? pc.dim("(harness default)") : String(values[key])])));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmill",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A local software factory that turns design docs into pull requests.",
5
5
  "keywords": [
6
6
  "agents",