create-open-autonomy 2.4.9 → 2.5.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 +2 -2
- package/package.json +1 -1
- package/src/kit.ts +2 -2
- package/template/.open-autonomy/PRODUCTION.md +45 -0
- package/template/.open-autonomy/start.ts +5 -3
- package/template/container/README.md +1 -1
- package/template/hermes/config.yaml +1 -1
- package/template/hermes/skills/open-autonomy/develop/SKILL.md +3 -1
package/README.md
CHANGED
|
@@ -31,10 +31,10 @@ 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
32
|
hermes/ the agent: SOUL.md, its three skills (develop, pm, community; 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; the community desk, every quarter hour), config.yaml (the model: the project's own choice), the seed hook
|
|
34
|
-
.open-autonomy/ the platform connection: config.yaml (account, publish policy, the model and rail bounds the platform holds the project's funds to), reporter.ts (the publisher:
|
|
34
|
+
.open-autonomy/ the platform connection (PRODUCTION.md: how a project ships — a human-cut tag, a reviewed environment, the workflows the owner's): config.yaml (account, publish policy, the model and rail bounds the platform holds the project's funds to), 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
|
|
36
36
|
processes, the one way it starts), the vendored SDK, kit.json (which kit, version and parameters made this repository)
|
|
37
|
-
container/ a real
|
|
37
|
+
container/ the default for a real deployment (bare is for development and fast debugging): one image whose entrypoint is start.ts as root, dropping the gateway to the image's user; the pinned Hermes
|
|
38
38
|
.github/workflows/ ci.yml (the project's check on every branch), land.yml (the landing convention)
|
|
39
39
|
```
|
|
40
40
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-open-autonomy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.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.5.0' } as const;
|
|
13
13
|
export const KIT_FILE = '.open-autonomy/kit.json';
|
|
14
14
|
const TEMPLATE = resolve(import.meta.dir, '..', 'template');
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ export interface KitRecord { kit: string; version: string; params: KitParams; di
|
|
|
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 (the treasurer's too: the model is the project's choice for both profiles),
|
|
21
21
|
// its board seed, its schedule, and any skill of its own outside hermes/skills/open-autonomy/ (the kit's three).
|
|
22
|
-
const OWNED = [/^hermes\/(?!config\.yaml$|kanban\.seed\.json$|cron\/jobs\.seed\.json$|profiles\/treasurer\/config\.yaml$|skills\/(?!open-autonomy\/))/, /^\.open-autonomy\/(reporter\.ts|mint-key\.ts|start\.ts|community\.ts|package\.json|sdk\/)/, /^container\//, /^\.github\/workflows\/(ci|land)\.yml$/];
|
|
22
|
+
const OWNED = [/^hermes\/(?!config\.yaml$|kanban\.seed\.json$|cron\/jobs\.seed\.json$|profiles\/treasurer\/config\.yaml$|skills\/(?!open-autonomy\/))/, /^\.open-autonomy\/(reporter\.ts|mint-key\.ts|start\.ts|community\.ts|PRODUCTION\.md|package\.json|sdk\/)/, /^container\//, /^\.github\/workflows\/(ci|land)\.yml$/];
|
|
23
23
|
export const isOwned = (rel: string): boolean => OWNED.some((re) => re.test(rel));
|
|
24
24
|
|
|
25
25
|
export function validateParams(p: Partial<KitParams>): KitParams {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Production: how a kit project ships
|
|
2
|
+
|
|
3
|
+
The agent lands code. A human decides what goes live. The platform never holds a deploy credential, and neither
|
|
4
|
+
does any machine an agent runs on. This is how that is arranged on GitHub, with nothing but GitHub's own features;
|
|
5
|
+
the reference project (`open-autonomy-org/hookline`) runs exactly this.
|
|
6
|
+
|
|
7
|
+
## The shape
|
|
8
|
+
|
|
9
|
+
- **Landing is the agent's.** It pushes `agent/<task>` branches; the landing workflow opens the pull request and
|
|
10
|
+
merges it. Nothing pushes `main` directly, maintainers included (`main-protected` ruleset: pull request required,
|
|
11
|
+
no bypass).
|
|
12
|
+
- **The workflows are the owner's.** `.github/CODEOWNERS` names the owner for `/.github/`, and the `main` ruleset
|
|
13
|
+
requires code-owner review, so a landing that touches a workflow waits for the owner while everything else lands
|
|
14
|
+
with no review. The file that runs with a secret is never changed by the agent.
|
|
15
|
+
- **Production runs only from a human-cut tag.** A `production` environment with the owner as required reviewer,
|
|
16
|
+
whose deployment branches are the tag pattern `deploy-v*` and nothing else, never `main`. Its secrets are the
|
|
17
|
+
deploy credential and nothing more. A `deploy-tags-admin-only` tag ruleset lets only an org admin create such a
|
|
18
|
+
tag. The deploy workflow fires on the tag (or a dispatch from it), so the workflow that holds the credential is
|
|
19
|
+
always the one a human tagged.
|
|
20
|
+
- **The build says what it is.** The deploy stamps the commit into the artifact (Hookline: `HOOKLINE_VERSION` from
|
|
21
|
+
`git rev-parse --short HEAD`, answered at `/api`), so the live service names its own commit.
|
|
22
|
+
|
|
23
|
+
## Setting it up, once per project
|
|
24
|
+
|
|
25
|
+
1. `.github/CODEOWNERS`: `/.github/ @<owner login>` (a user or a team; an org is not a code owner).
|
|
26
|
+
2. Ruleset `main-protected` on `refs/heads/main`: `pull_request` (0 approvals, code-owner review required),
|
|
27
|
+
`non_fast_forward`, `deletion`; no bypass actors.
|
|
28
|
+
3. Ruleset `deploy-tags-admin-only` on `refs/tags/deploy-v*`: `creation`, `update`, `deletion`; bypass:
|
|
29
|
+
OrganizationAdmin, always.
|
|
30
|
+
4. Environment `production`: required reviewer the owner; deployment branches "selected", one tag pattern
|
|
31
|
+
`deploy-v*`; the deploy credential as an environment secret (never a repository secret); the account id as a
|
|
32
|
+
repository variable.
|
|
33
|
+
5. `.github/workflows/deploy.yml`: `on: push: tags: ['deploy-v*']` and `workflow_dispatch`; `permissions:
|
|
34
|
+
contents: read`; `environment: production`; egress allow-listed to GitHub, npm and the deploy target; actions
|
|
35
|
+
pinned by SHA; no restored caches.
|
|
36
|
+
|
|
37
|
+
## Shipping
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git tag -a deploy-v<date> <sha> -m "<what ships>" && git push origin deploy-v<date> # the owner, on a commit they read
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The run waits for the reviewer; approving it is the second human act. Rolling back is tagging an earlier commit.
|
|
44
|
+
Secrets the service itself needs (webhook secrets, keys) are environment secrets the deploy workflow installs, so
|
|
45
|
+
they too are set by a human through the gate and never by the agent.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// Start the agent. The same processes wherever it runs; only how this script is started differs:
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
3
|
+
// in a container the default for a real deployment: the image's entrypoint, as root with the secrets mounted for
|
|
4
|
+
// root alone and `--as <user>`; the gateway and the reporter run as that user and can reach no
|
|
5
|
+
// key (container/README.md)
|
|
6
|
+
// on your machine `bun .open-autonomy/start.ts` — everything as you, no isolation: for development and fast
|
|
7
|
+
// debugging, where the agent reaching its own keys is an accepted trade
|
|
6
8
|
//
|
|
7
9
|
// bun .open-autonomy/start.ts [--home <dir>] [--secrets <dir>] [--project <dir>] [--origin <url>] [--as <user>] [--valve <port>]
|
|
8
10
|
//
|
|
@@ -4,7 +4,7 @@ The agent is four processes: an ssh-agent holding the deploy key, the valve hold
|
|
|
4
4
|
developer's on :8787, the treasurer's on :8788 — `--valve <port>` moves both — each re-read when its file changes), the keyless reporter, and
|
|
5
5
|
the Hermes gateway. One script starts them, `.open-autonomy/start.ts`, and it is the only way they are started.
|
|
6
6
|
|
|
7
|
-
**On your machine**, for development: everything as you, no isolation.
|
|
7
|
+
**In a container** is the default for a real deployment. **On your machine**, for development and fast debugging: everything as you, no isolation, the agent able to reach its own keys — an accepted trade while debugging, never the shape of production.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
bun .open-autonomy/mint-key.ts # the developer's key → ~/.config/open-autonomy/agent.env
|
|
@@ -23,7 +23,7 @@ compression:
|
|
|
23
23
|
threshold: 0.50
|
|
24
24
|
|
|
25
25
|
agent:
|
|
26
|
-
max_turns:
|
|
26
|
+
max_turns: 160
|
|
27
27
|
|
|
28
28
|
# The board (Hermes Kanban) the schedule files roadmap items on. Its dispatcher runs inside the gateway and
|
|
29
29
|
# the review lane verifies every handoff; the interval is how soon a filed task is picked up.
|
|
@@ -31,7 +31,9 @@ is not done.
|
|
|
31
31
|
`bun run check` once, green, before every push.
|
|
32
32
|
5. Commit small, signed as the agent, the task id first in the subject:
|
|
33
33
|
`git commit -s --author="Open Autonomy agent <agent@open-autonomy.org>" -m "<task id>: <what changed>"`.
|
|
34
|
-
6. Push the branch: `git push -u origin agent/<task id>`. The landing
|
|
34
|
+
6. Push the branch once, when every acceptance line is true: `git push -u origin agent/<task id>`. The landing
|
|
35
|
+
merges whatever is pushed, so a push mid-task lands half a feature on main; commit as often as you like, push
|
|
36
|
+
at the handoff. The landing workflow opens the pull request and merges
|
|
35
37
|
it when the checks pass. Never wait for it; never open a pull request; never push to `main`; never rewrite
|
|
36
38
|
history. If the branch exists from an earlier attempt, push to `agent/<task id>-<YYYYMMDD-HHMM>`.
|
|
37
39
|
7. Hand off: `kanban_request_review` naming the branch and the commit, and what is verified how. Name no reviewer:
|