babavoss 0.13.1 → 0.14.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babavoss",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": "github:alanremarc/babavoss",
6
6
  "homepage": "https://babavoss.org",
@@ -131,25 +131,32 @@ const quoted = (v: unknown) => `'${JSON.stringify(v).replaceAll("'", `'\\''`)}'`
131
131
  /** The CLI line of a call with a literal example of its args. */
132
132
  const cliLine = (prog: string, name: string, args: Json) => `${prog} ${name} ${quoted(exampleOf(args))}`;
133
133
 
134
- /**
135
- * The instruction file: the title, then voss's own section, short, what a baba is, that the agent is its author and
136
- * which skills say how, and how the baba is reached by MCP and at the shell, with one real example; then the baba's
137
- * own context, as it wrote it.
138
- */
134
+ /** The shell around the baba's context: the header, the context, what a baba is and how to reach it at its doors, an example, the two systems voss adds, the skills by name. */
139
135
  function instructionFile(input: CompileInput): string {
140
136
  const prog = input.program;
141
137
  const m = input.manifest;
142
- const skills = skillsOf(m).map((sk) => sk.name);
143
138
  const lines = [
144
139
  `<!-- Generated by ${prog} from the baba's agentic instructions. Do not edit: a hand edit is held and never overwritten. Edit the agentic instructions under .baba/agents/; they sync. -->`,
145
140
  `# ${input.title ?? prog}`,
146
- "", "## Baba Voss", "",
147
- "This project has a baba: its own program, under `.baba/`, run by voss. A baba is systems over one state of entities and resources, and apps that show it to people. Each system declares the components it owns, the actions that move it and the queries that read it, and reaches outside only through effects; a spec beside it proves it. Voss serves the baba from a service on loopback, `http://localhost:47802/` by default; `voss service status` gives the configured URL.",
141
+ ];
142
+ const context = m.instructions.context?.trim();
143
+ if (context) lines.push("", context);
144
+ lines.push(
145
+ "", "## This baba", "",
146
+ "A baba is this project's own program: systems and apps over one state of entities and resources, moved by the actions its systems declare and read by their queries; the apps show it to people. Its code is under `.baba/`, and voss runs it.",
148
147
  "",
149
- `You are this baba's author. Use it through its contract, and change it when it falls short: a capability it lacks is a system to write, a mistake an agent made is a sentence for its instructions. The skills say how, read each when its description fits: ${skills.join(", ")}.`,
148
+ `The contract is live: \`${prog}\` answers the index, every action and query with its system, kind, summary and an example, and \`${prog} NAME --schema\` one call's args and result schemas. Never rely on a copied list: a system added or changed shows up there within seconds.`,
150
149
  "",
151
- `The contract is live; never rely on a copied list. By MCP, when your harness has this baba's server (\`voss baba mcp\`): \`manifest\`, \`call\`, \`read\`, \`follow\`, \`watch\` and \`state\`; prefer them. At the shell: \`${prog}\` lists every action and query with an example, \`${prog} NAME '{"arg": value}'\` calls one, \`${prog} NAME --schema\` gives its schemas, \`${prog} state N\` reads an entity an answer named and \`${prog} follow N [--until COMPONENT]\` waits on it, \`${prog} run\` sends several calls, \`${prog} state\` reads the state and \`${prog} raw …\` writes it, only when no action does. Every answer is one line of JSON; an error is one line on stderr, \`{"error":{"code","message","retry"}}\`, and the exit code says whose: 2 your arguments, 1 it failed, 3 time ran out, 4 gone. \`--key K\` on an action makes a retry safe; a secret is never on the command line, \`--token @-\` reads it from stdin; an answer over 20 000 characters goes to \`.baba/.voss/out/\` and the line says where.`,
152
- ];
150
+ `- Call one with JSON: \`${prog} NAME '{"arg": value}'\` (flags exist for people). Every answer is one line of JSON; an error is one line on stderr, \`{"error":{"code","message","retry"}}\`, and the exit code says whose: 2 your arguments, 1 it failed, 3 time ran out, 4 gone.`,
151
+ `- An entity in an answer is a number: \`${prog} state N\` reads it, \`${prog} follow N [--until COMPONENT]\` waits on it.`,
152
+ `- \`${prog} run\` sends several calls in one turn: lines of \`{"NAME": args}\`, \`"$0.entity"\` to reference an earlier answer.`,
153
+ `- \`${prog} state\` reads the state; \`${prog} raw …\` writes it, only when no action does it. \`--help\` after any word explains it.`,
154
+ `- \`--key K\` on an action makes a retry safe: the baba remembers the answer for a day and answers it again without running. A secret is never on the command line: \`--token @-\` reads it from stdin. An answer over 20 000 characters goes to \`.baba/.voss/out/\` and the line says where.`,
155
+ "",
156
+ "If your harness has this baba's MCP server (`voss baba mcp`), its `manifest`, `call`, `read`, `follow`, `watch` and `state` tools are the same six operations: prefer them.",
157
+ "",
158
+ "Voss serves this baba from a service on loopback, `http://localhost:47802/` by default. `voss baba start` opens it there, installing the service if need be; `voss service status` gives the configured URL and whether it runs. Never guess another port: read the status.",
159
+ );
153
160
  const first = Object.entries(m.actions).find(([, d]) => !VOSS.has(d.owner));
154
161
  if (first) {
155
162
  const [name, d] = first;
@@ -165,8 +172,9 @@ function instructionFile(input: CompileInput): string {
165
172
  ...Object.entries(m.queries).filter(([, q]) => !VOSS.has(q.owner)).map(([n, q]) => `| \`${prog} ${[n, ...usage(q.args, q.positional)].join(" ")}\` | query | ${q.owner} | ${system(q.summary)} |`),
166
173
  );
167
174
  }
168
- const context = m.instructions.context?.trim();
169
- if (context) lines.push("", context);
175
+ lines.push("", "Voss adds two systems to this baba. `agents` compiles what the baba tells agents, its context, skills and hooks, each an .mdx file under `.baba/agents/`, into each harness's files: `CLAUDE.md`, `AGENTS.md`, the skills, Claude Code's permissions and hooks. Those are generated: edit the agentic instructions, never the outputs. `maker` keeps the specs, each system's `systems/NAME/spec.ts` beside it and the whole baba's `.baba/spec.ts`, each a seeded state with its scenarios and the adapters that play its outside, proved under `bun test` by `.baba/spec.test.ts`; `spec` lists them with their verdicts, `spec-run` runs a state's scenarios headless so the verdicts are remade, and the Maker app runs them live, where `spec-step` and `spec-read` reach the state a person has open.");
176
+ const skills = skillsOf(m).map((sk) => sk.name);
177
+ if (skills.length) lines.push("", `Skills: ${skills.join(", ")}.`);
170
178
  return lines.join("\n") + "\n";
171
179
  }
172
180
 
@@ -1,4 +1,4 @@
1
1
  // The commit and the moment a package was built from, stamped by the pack
2
2
  // of a release (tools/release/pack.ts) and restored after it. From a
3
3
  // checkout both are empty: the tree is the build.
4
- export const build = {"sha":"c288c8f","at":"2026-10-08T22:12:53.708Z"};
4
+ export const build = {"sha":"5b17d11","at":"2026-10-08T22:10:21.357Z"};