create-open-autonomy 2.4.5 → 2.4.7
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.
|
|
3
|
+
"version": "2.4.7",
|
|
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.
|
|
12
|
+
export const KIT = { name: 'hermes', version: '2.4.7' } as const;
|
|
13
13
|
export const KIT_FILE = '.open-autonomy/kit.json';
|
|
14
14
|
const TEMPLATE = resolve(import.meta.dir, '..', 'template');
|
|
15
15
|
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
// reporter keyless, publishing the home's sessions and board through the valve
|
|
30
30
|
// gateway `hermes gateway run` in the checkout, HERMES_HOME=<home>
|
|
31
31
|
// When any of them ends, all of them end and this exits 1: the supervisor outside (you, launchd, Docker) restarts.
|
|
32
|
-
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
32
|
+
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
33
|
+
import { tmpdir } from 'node:os';
|
|
33
34
|
import { homedir, userInfo } from 'node:os';
|
|
34
35
|
import { basename, resolve } from 'node:path';
|
|
35
36
|
|
|
@@ -85,6 +86,7 @@ if (existsSync(deployKey)) {
|
|
|
85
86
|
} else say(`no ${deployKey}: pushes use your own git and keys`);
|
|
86
87
|
|
|
87
88
|
// 2. The checkout.
|
|
89
|
+
let committedFrom: string | undefined;
|
|
88
90
|
if (!existsSync(resolve(project, '.git'))) {
|
|
89
91
|
if (!origin) { console.error(`start: ${project} is not a checkout and no --origin to clone`); process.exit(1); }
|
|
90
92
|
mkdirSync(project, { recursive: true }); own(project);
|
|
@@ -98,13 +100,19 @@ if (!existsSync(resolve(project, '.git'))) {
|
|
|
98
100
|
// said and not fatal.
|
|
99
101
|
const git = (...args: string[]) => Bun.spawnSync({ cmd: drop(['git', ...args]), cwd: project, env: agentEnv(), stdout: 'pipe', stderr: 'pipe' });
|
|
100
102
|
const dirty = git('status', '--porcelain').stdout.toString().trim();
|
|
101
|
-
if (
|
|
102
|
-
else if (
|
|
103
|
-
|
|
103
|
+
if (git('fetch', '-q', 'origin').exitCode !== 0) say(`cannot fetch origin in ${project}; the checkout is left where it is`);
|
|
104
|
+
else if (dirty) {
|
|
105
|
+
// The working tree is a killed attempt's; what the agent IS still comes from main: its hermes/ is taken from
|
|
106
|
+
// origin/main directly, and the tree is left for the next attempt to carry over.
|
|
107
|
+
say(`checkout ${project} has uncommitted changes; left where it is, the home synced from origin/main`);
|
|
108
|
+
const dir = mkdtempSync(resolve(tmpdir(), 'open-autonomy-hermes-'));
|
|
109
|
+
const archive = Bun.spawnSync({ cmd: drop(['sh', '-c', `git archive --format=tar origin/main hermes | tar -x -C "${dir}"`]), cwd: project, env: agentEnv(), stdout: 'pipe', stderr: 'pipe' });
|
|
110
|
+
if (archive.exitCode === 0 && existsSync(resolve(dir, 'hermes'))) committedFrom = resolve(dir, 'hermes');
|
|
111
|
+
} else if (git('checkout', '-q', '--detach', 'origin/main').exitCode === 0) say(`checkout ${project} at origin/main (${git('rev-parse', '--short', 'HEAD').stdout.toString().trim()})`);
|
|
104
112
|
}
|
|
105
113
|
|
|
106
|
-
// 3. The home, from the
|
|
107
|
-
const committed = resolve(project, 'hermes');
|
|
114
|
+
// 3. The home, from the repository: everything under hermes/ except its .env, which is the home's own.
|
|
115
|
+
const committed = committedFrom ?? resolve(project, 'hermes');
|
|
108
116
|
if (existsSync(committed)) {
|
|
109
117
|
// The kit's own families are mirrored, not merged: a skill or hook the checkout no longer has leaves the home too.
|
|
110
118
|
for (const family of ['skills/open-autonomy', 'hooks']) rmSync(resolve(home, family), { recursive: true, force: true });
|
|
@@ -12,8 +12,13 @@ metadata:
|
|
|
12
12
|
# Community
|
|
13
13
|
|
|
14
14
|
You are this project's face to its community. People ask questions, report what broke, propose what
|
|
15
|
-
they wish for, and talk things over in three places: the repository's issues, its discussions, and the Discord channel.
|
|
16
|
-
what is new, and every word you say in public is a published session on the
|
|
15
|
+
they wish for, and talk things over in three places: the repository's issues, its discussions, and the Discord channel.
|
|
16
|
+
Every quarter hour you read what is new on GitHub, and every word you say in public is a published session on the
|
|
17
|
+
project page. The channel is not read here: a message there reaches you as it is sent, and you answer it then.
|
|
18
|
+
|
|
19
|
+
A look is exactly four commands — `poll`, what it calls for, `mark`, the report. Never search the home, its
|
|
20
|
+
databases, its logs or the gateway's state for messages: nothing there is the community's, and a look that wanders
|
|
21
|
+
is a quarter hour spent for nothing.
|
|
17
22
|
|
|
18
23
|
1. Read: `bun .open-autonomy/community.ts poll` lists every issue, comment and discussion since the last look, then
|
|
19
24
|
`COMMUNITY_POLL_DONE`. Nothing new: report that and stop.
|
|
@@ -34,8 +39,8 @@ what is new, and every word you say in public is a published session on the proj
|
|
|
34
39
|
5. Mark the look done: `bun .open-autonomy/community.ts mark`. Report in one paragraph, where the job says: what was
|
|
35
40
|
answered, what was filed (with ids), what was declined and why.
|
|
36
41
|
|
|
37
|
-
In the channel you are simply yourself: answer a question when it is asked; when someone asks
|
|
38
|
-
that fits, file it the same way and say so.
|
|
42
|
+
In the channel, as messages arrive, you are simply yourself: answer a question when it is asked; when someone asks
|
|
43
|
+
there for something that fits, file it the same way and say so.
|
|
39
44
|
|
|
40
|
-
A desk without a GitHub door (`poll`
|
|
41
|
-
|
|
45
|
+
A desk without a GitHub door (`poll` says `NOTE no GitHub door`) is not blocked and not news: there is nothing to
|
|
46
|
+
read, so the look ends at once with `[SILENT]`.
|