babavoss 0.14.0 → 0.14.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/package.json +1 -1
- package/src/agents/compile.ts +13 -21
- package/src/generated/build.ts +1 -1
package/package.json
CHANGED
package/src/agents/compile.ts
CHANGED
|
@@ -131,32 +131,25 @@ 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
|
-
/**
|
|
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
|
+
*/
|
|
135
139
|
function instructionFile(input: CompileInput): string {
|
|
136
140
|
const prog = input.program;
|
|
137
141
|
const m = input.manifest;
|
|
142
|
+
const skills = skillsOf(m).map((sk) => sk.name);
|
|
138
143
|
const lines = [
|
|
139
144
|
`<!-- 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. -->`,
|
|
140
145
|
`# ${input.title ?? prog}`,
|
|
141
|
-
|
|
142
|
-
|
|
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.",
|
|
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.",
|
|
147
148
|
"",
|
|
148
|
-
`
|
|
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(", ")}.`,
|
|
149
150
|
"",
|
|
150
|
-
|
|
151
|
-
|
|
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
|
-
);
|
|
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
|
+
];
|
|
160
153
|
const first = Object.entries(m.actions).find(([, d]) => !VOSS.has(d.owner));
|
|
161
154
|
if (first) {
|
|
162
155
|
const [name, d] = first;
|
|
@@ -172,9 +165,8 @@ function instructionFile(input: CompileInput): string {
|
|
|
172
165
|
...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)} |`),
|
|
173
166
|
);
|
|
174
167
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
if (skills.length) lines.push("", `Skills: ${skills.join(", ")}.`);
|
|
168
|
+
const context = m.instructions.context?.trim();
|
|
169
|
+
if (context) lines.push("", context);
|
|
178
170
|
return lines.join("\n") + "\n";
|
|
179
171
|
}
|
|
180
172
|
|
package/src/generated/build.ts
CHANGED
|
@@ -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":"
|
|
4
|
+
export const build = {"sha":"e764f4d","at":"2026-10-08T22:23:01.956Z"};
|