create-open-autonomy 2.4.3 → 2.4.5
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.5",
|
|
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.5' } as const;
|
|
13
13
|
export const KIT_FILE = '.open-autonomy/kit.json';
|
|
14
14
|
const TEMPLATE = resolve(import.meta.dir, '..', 'template');
|
|
15
15
|
|
|
@@ -16,7 +16,9 @@ import { resolve } from 'node:path';
|
|
|
16
16
|
|
|
17
17
|
const api = (process.env.GITHUB_API_URL ?? 'https://api.github.com').replace(/\/$/, '');
|
|
18
18
|
const token = process.env.GITHUB_TOKEN ?? '';
|
|
19
|
-
|
|
19
|
+
// No GITHUB_TOKEN: the desk has no GitHub door (a github-app.json beside the keys gives it one through the valve). That
|
|
20
|
+
// is a fact, not a failure: a look finds nothing on GitHub and says so, and the channel alone is the desk's.
|
|
21
|
+
const doorless = !token;
|
|
20
22
|
const project = resolve(import.meta.dir, '..');
|
|
21
23
|
const account = /^account:\s*(\S+)/m.exec(readFileSync(resolve(project, '.open-autonomy', 'config.yaml'), 'utf8'))?.[1] ?? '';
|
|
22
24
|
if (!account) throw new Error('community: .open-autonomy/config.yaml names no account');
|
|
@@ -44,7 +46,13 @@ const after = (at: string | null | undefined, since: string): boolean => !at ||
|
|
|
44
46
|
const firstLine = (s: string): string => (s ?? '').split('\n')[0]!.slice(0, 120);
|
|
45
47
|
|
|
46
48
|
const [command, ...rest] = process.argv.slice(2);
|
|
47
|
-
if (command === 'poll') {
|
|
49
|
+
if (command === 'poll' && doorless) {
|
|
50
|
+
console.log(`NOTE no GitHub door (no GITHUB_TOKEN): issues and discussions are not read; the channel alone is the desk's`);
|
|
51
|
+
console.log(`COMMUNITY_POLL_DONE since ${cursor()}`);
|
|
52
|
+
} else if ((command === 'comment' || command === 'discuss') && doorless) {
|
|
53
|
+
console.error('community: no GitHub door (no GITHUB_TOKEN) — nothing can be posted on GitHub');
|
|
54
|
+
process.exit(3);
|
|
55
|
+
} else if (command === 'poll') {
|
|
48
56
|
const since = cursor();
|
|
49
57
|
const issues = await github<Array<{ number: number; title: string; body: string | null; created_at: string; pull_request?: unknown; user?: { login?: string } }>>('GET', `/repos/${account}/issues?state=open&per_page=50&since=${encodeURIComponent(since)}`);
|
|
50
58
|
for (const i of issues) if (!i.pull_request && after(i.created_at, since)) console.log(`NEW issue #${i.number} ${JSON.stringify(i.title)} by ${i.user?.login ?? 'someone'}: ${firstLine(i.body ?? '')}`);
|
|
@@ -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.
|
|
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
|