create-open-autonomy 2.4.2 → 2.4.4

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": "create-open-autonomy",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "description": "The default Open Autonomy starter kit: a complete repository that runs its own Hermes agent against the platform, with the SDK wired in. `bun create open-autonomy <dir>` scaffolds one.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/kit.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
10
10
  import { dirname, join, relative, resolve } from 'node:path';
11
11
 
12
- export const KIT = { name: 'hermes', version: '2.4.2' } as const;
12
+ export const KIT = { name: 'hermes', version: '2.4.4' } as const;
13
13
  export const KIT_FILE = '.open-autonomy/kit.json';
14
14
  const TEMPLATE = resolve(import.meta.dir, '..', 'template');
15
15
 
@@ -36,7 +36,10 @@ import { basename, resolve } from 'node:path';
36
36
  const argv = process.argv.slice(2);
37
37
  const arg = (name: string): string | undefined => { const i = argv.indexOf(name); return i >= 0 ? argv[i + 1] : undefined; };
38
38
  const project = resolve(arg('--project') ?? resolve(import.meta.dir, '..'));
39
- const home = resolve(arg('--home') ?? process.env.AGENT_HOME ?? resolve(homedir(), '.local', 'state', 'open-autonomy', basename(project), 'home'));
39
+ // The home's default is named by the project's account (owner/repo from .open-autonomy/config.yaml), never by the
40
+ // checkout's directory name: two projects checked out as `project` must not share one home.
41
+ const account = /^account:\s*(\S+)/m.exec(existsSync(resolve(project, '.open-autonomy', 'config.yaml')) ? readFileSync(resolve(project, '.open-autonomy', 'config.yaml'), 'utf8') : '')?.[1];
42
+ const home = resolve(arg('--home') ?? process.env.AGENT_HOME ?? resolve(homedir(), '.local', 'state', 'open-autonomy', ...(account ?? basename(project)).split('/'), 'home'));
40
43
  const secrets = resolve(arg('--secrets') ?? process.env.AGENT_SECRETS ?? resolve(homedir(), '.config', 'open-autonomy'));
41
44
  const origin = arg('--origin') ?? process.env.ORIGIN;
42
45
  const as = arg('--as');
@@ -140,8 +143,14 @@ const githubFile = resolve(secrets, 'github-app.json');
140
143
  if (githubApp) keys.push('--github-app', `${githubFile}:${valvePort + 3}`);
141
144
  spawn('valve', ['bun', resolve(import.meta.dir, 'sdk', 'valve.ts'), ...keys], {});
142
145
 
143
- // 5. The reporter and the gateway, as the agent.
146
+ // 5. The reporter and the gateway, as the agent. The reporter's own dependencies (supercode, beside it in
147
+ // .open-autonomy/package.json) are installed on the first start of a bare checkout.
144
148
  const env = agentEnv();
149
+ if (!existsSync(resolve(import.meta.dir, 'node_modules'))) {
150
+ const install = Bun.spawnSync({ cmd: drop(['bun', 'install']), cwd: import.meta.dir, env, stdout: 'inherit', stderr: 'inherit' });
151
+ if (install.exitCode !== 0) { console.error(`start: cannot install the reporter's dependencies in ${import.meta.dir}`); process.exit(1); }
152
+ say(`reporter dependencies installed in ${import.meta.dir}`);
153
+ }
145
154
  spawn('reporter', ['bun', resolve(import.meta.dir, 'reporter.ts'), '--config', resolve(project, '.open-autonomy', 'config.yaml')], { asAgent: true, env: { ...env, OPEN_AUTONOMY_BASE_URL: baseUrl } });
146
155
  spawn('gateway', ['hermes', 'gateway', 'run'], { asAgent: true, env });
147
156
  say(`gateway up in ${project} as ${user?.name ?? userInfo().username}, home ${home}; the valve on :${valvePort}${existsSync(resolve(secrets, 'treasurer.env')) ? ` and :${valvePort + 1}` : ''}${existsSync(codexFile) ? `; the Codex subscription on :${codexPort}` : ''}${githubApp ? `; the GitHub App on :${valvePort + 3}` : ''}`);
@@ -35,4 +35,7 @@ what is new, and every word you say in public is a published session on the proj
35
35
  answered, what was filed (with ids), what was declined and why.
36
36
 
37
37
  In the channel you are simply yourself: answer a question when it is asked; when someone asks there for something
38
- that fits, file it the same way and say so. The desk without a GitHub door (`poll` says so) reads the channel alone.
38
+ that fits, file it the same way and say so.
39
+
40
+ A desk without a GitHub door (`poll` exits saying there is no `GITHUB_TOKEN`) is not blocked and not news: it reads
41
+ the channel alone, answers there, and when nothing is new it reports `[SILENT]` like any other quiet look.
@@ -35,7 +35,9 @@ is not done.
35
35
  it when the checks pass. Never wait for it; never open a pull request; never push to `main`; never rewrite
36
36
  history. If the branch exists from an earlier attempt, push to `agent/<task id>-<YYYYMMDD-HHMM>`.
37
37
  7. Hand off: `kanban_request_review` naming the branch and the commit, and what is verified how. Name no reviewer:
38
- the review lane takes the task itself, and a profile the home does not have would hold it forever.
38
+ the review lane takes the task itself, and a profile the home does not have would hold it forever. This call is
39
+ how a task ends; a turn that ends without it marks the task done with nothing reviewed, which is never right —
40
+ even when the work is already on main, hand it off.
39
41
 
40
42
  If a line cannot be made true from here, `kanban_block` with exactly what is missing, and stop. Never file,
41
43
  split or decompose tasks, and never create one: the board is the owner's. Do not loop on a failure you cannot