create-open-autonomy 2.2.1 → 2.3.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 +1 -1
- package/package.json +1 -1
- package/src/kit.ts +5 -3
- package/template/.open-autonomy/start.ts +2 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ CHANGELOG.md what shipped
|
|
|
29
29
|
AGENTS.md the agent's rules for this repository
|
|
30
30
|
LICENSE Apache-2.0, seeded; the project's own
|
|
31
31
|
package.json, test/ the project's own check (`bun run check`), starting with one test
|
|
32
|
-
hermes/ the agent: SOUL.md, its two skills (develop, pm), profiles/treasurer (the second profile: the one that pays), kanban.seed.json (the board's first tasks, in order),
|
|
32
|
+
hermes/ the agent: SOUL.md, its two skills (develop, pm; a project's own skills live beside them, in hermes/skills/<project>/, and are the project's), profiles/treasurer (the second profile: the one that pays), kanban.seed.json (the board's first tasks, in order),
|
|
33
33
|
cron/jobs.seed.json (the PM, hourly), config.yaml (the model: the project's own choice), the seed hook
|
|
34
34
|
.open-autonomy/ the platform connection: config.yaml (account, publish policy, rail bounds), reporter.ts (the publisher:
|
|
35
35
|
sessions, the board, the setup), mint-key.ts (the key, the adopter way), start.ts (the agent's four
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-open-autonomy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
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.
|
|
12
|
+
export const KIT = { name: 'hermes', version: '2.3.0' } as const;
|
|
13
13
|
export const KIT_FILE = '.open-autonomy/kit.json';
|
|
14
14
|
const TEMPLATE = resolve(import.meta.dir, '..', 'template');
|
|
15
15
|
|
|
@@ -17,7 +17,9 @@ export interface KitParams { project: string; account: string }
|
|
|
17
17
|
export interface KitRecord { kit: string; version: string; params: KitParams; divergences: string[] }
|
|
18
18
|
|
|
19
19
|
// What the kit keeps current. Everything else in the template is seeded once.
|
|
20
|
-
|
|
20
|
+
// A project's own, seeded once: its config, its board seed, its schedule, and any skill of its own outside
|
|
21
|
+
// hermes/skills/open-autonomy/ (the kit's two).
|
|
22
|
+
const OWNED = [/^hermes\/(?!config\.yaml$|kanban\.seed\.json$|cron\/jobs\.seed\.json$|skills\/(?!open-autonomy\/))/, /^\.open-autonomy\/(reporter\.ts|mint-key\.ts|start\.ts|package\.json|sdk\/)/, /^container\//, /^\.github\/workflows\/(ci|land)\.yml$/];
|
|
21
23
|
export const isOwned = (rel: string): boolean => OWNED.some((re) => re.test(rel));
|
|
22
24
|
|
|
23
25
|
export function validateParams(p: Partial<KitParams>): KitParams {
|
|
@@ -98,7 +100,7 @@ export function check(dir: string): Outcome {
|
|
|
98
100
|
// Kit-owned files the repository has that the kit no longer renders: what an earlier kit made and this one
|
|
99
101
|
// retired. `upgrade` removes them; a project that keeps one names it in `divergences`. Only the families the
|
|
100
102
|
// kit writes are looked at — never the agent's runtime state beside them (its database, sessions, logs, .env).
|
|
101
|
-
const RETIRABLE = [/^hermes\/(skills|hooks|scripts)\//, /^\.open-autonomy\/([a-z-]+\.ts|sdk\/)/, /^container\//, /^\.github\/workflows\/(ci|land)\.yml$/];
|
|
103
|
+
const RETIRABLE = [/^hermes\/(skills\/open-autonomy|hooks|scripts)\//, /^\.open-autonomy\/([a-z-]+\.ts|sdk\/)/, /^container\//, /^\.github\/workflows\/(ci|land)\.yml$/];
|
|
102
104
|
function retired(dir: string, rendered: Map<string, Buffer>, rec: KitRecord): string[] {
|
|
103
105
|
const out: string[] = [];
|
|
104
106
|
for (const root of ['hermes/skills', 'hermes/hooks', 'hermes/scripts', '.open-autonomy', 'container', '.github/workflows']) {
|
|
@@ -78,7 +78,8 @@ if (existsSync(committed)) cpSync(committed, home, { recursive: true, force: tru
|
|
|
78
78
|
const envFile = resolve(home, '.env');
|
|
79
79
|
if (!existsSync(envFile)) {
|
|
80
80
|
const lines = ['OPEN_AUTONOMY_BASE_URL=http://127.0.0.1:8787/v1', 'OPEN_AUTONOMY_KEY=valve'];
|
|
81
|
-
|
|
81
|
+
// What the environment says about the agent's channels comes along: Discord's, and GitHub's for a community desk.
|
|
82
|
+
for (const k of Object.keys(process.env).sort()) if (/^(DISCORD_|GITHUB_TOKEN$|GITHUB_API_URL$)/.test(k) && process.env[k]) lines.push(`${k}=${process.env[k]}`);
|
|
82
83
|
writeFileSync(envFile, `${lines.join('\n')}\n`);
|
|
83
84
|
}
|
|
84
85
|
own(home);
|