@luminascale/shepherd 0.0.0-stage → 0.6.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/.agents/agents/README.md +12 -0
- package/.agents/agents/planner.md +38 -0
- package/.agents/agents/reviewer.md +38 -0
- package/.agents/agents/scout.md +43 -0
- package/.agents/agents/worker.md +33 -0
- package/.agents/skills/smoke-test/SKILL.md +155 -0
- package/.agents/skills/smoke-test/references/forensics.md +46 -0
- package/.agents/skills/smoke-test/scripts/live-smoke-poll.mjs +130 -0
- package/.github/workflows/publish.yml +77 -0
- package/.pi/prompts/release.md +21 -0
- package/.prettierrc +10 -0
- package/AGENTS.md +88 -0
- package/CONTRIBUTING.md +177 -0
- package/LICENSE +201 -0
- package/README.md +424 -2
- package/docs/README.md +25 -0
- package/docs/guides/agent-definitions.md +42 -0
- package/docs/guides/diagnostics.md +199 -0
- package/docs/guides/tool-reference.md +55 -0
- package/docs/manual-tests/ping-pong-peer-messaging.md +147 -0
- package/docs/plans/agent-labels.md +257 -0
- package/docs/plans/architecture.md +110 -0
- package/docs/plans/settings-scope.md +163 -0
- package/docs/plans/tool-surface-split.md +278 -0
- package/docs/reference/dictionary +26 -0
- package/docs/releasing.md +47 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/baseline.md +115 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/handoff.md +564 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/phase10-notes.md +109 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/phase6-notes.md +69 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/phase7-notes.md +100 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/phase8-notes.md +127 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/phase9-notes.md +104 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/plan.md +1093 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/spec.md +583 -0
- package/docs/specs/005-agent-messaging-and-task-lifecycle/tasks.md +838 -0
- package/docs/specs/006-shepherd-tool-rendering/plan.md +175 -0
- package/docs/specs/006-shepherd-tool-rendering/spec.md +469 -0
- package/index.ts +599 -0
- package/package.json +112 -4
- package/scripts/capture-system-prompt.mjs +45 -0
- package/scripts/extract-pi-system-prompt.mjs +277 -0
- package/scripts/host-impact.mjs +74 -0
- package/scripts/resolve-agent.mjs +43 -0
- package/scripts/show-shepherd-orchestrator.mjs +58 -0
- package/scripts/show-shepherd-prompt.mjs +96 -0
- package/scripts/verify-suites.mjs +67 -0
- package/specs/001-artifacts/spec.md +436 -0
- package/specs/002-simplify-agent-orchestration/plan.md +287 -0
- package/specs/002-simplify-agent-orchestration/spec.md +323 -0
- package/specs/002-simplify-agent-orchestration/tasks.md +212 -0
- package/specs/003-orchestrator-session-artifacts/plan.md +396 -0
- package/specs/003-orchestrator-session-artifacts/spec.md +453 -0
- package/specs/003-orchestrator-session-artifacts/tasks.md +141 -0
- package/specs/004-asynchronous-prompt-watchers/plan.md +139 -0
- package/specs/004-asynchronous-prompt-watchers/spec.md +202 -0
- package/specs/004-asynchronous-prompt-watchers/tasks.md +126 -0
- package/specs/005-per-workspace-settings/plan.md +230 -0
- package/specs/005-per-workspace-settings/spec.md +368 -0
- package/specs/005-per-workspace-settings/tasks.md +178 -0
- package/specs/006-dual-runtime-herdr-durable/intent.md +86 -0
- package/specs/006-dual-runtime-herdr-durable/journal.md +80 -0
- package/specs/006-dual-runtime-herdr-durable/plan.md +242 -0
- package/specs/006-dual-runtime-herdr-durable/spec.md +389 -0
- package/specs/006-dual-runtime-herdr-durable/tasks.md +199 -0
- package/specs/007-unwatched-completion-notice/journal.md +145 -0
- package/specs/007-unwatched-completion-notice/plan.md +186 -0
- package/specs/007-unwatched-completion-notice/spec.md +284 -0
- package/specs/007-unwatched-completion-notice/tasks.md +147 -0
- package/specs/008-remote-machine-sheep/intent.md +174 -0
- package/specs/008-remote-machine-sheep/journal.md +57 -0
- package/specs/008-remote-machine-sheep/prerequisites.md +219 -0
- package/specs/009-hc-runtime/intent.md +44 -0
- package/specs/009-hc-runtime/plan.md +49 -0
- package/specs/009-hc-runtime/spec.md +118 -0
- package/specs/009-hc-runtime/tasks.md +62 -0
- package/specs/010-unseen-watch-parity/intent.md +57 -0
- package/specs/010-unseen-watch-parity/journal.md +172 -0
- package/specs/010-unseen-watch-parity/plan.md +74 -0
- package/specs/010-unseen-watch-parity/spec.md +191 -0
- package/specs/010-unseen-watch-parity/tasks.md +119 -0
- package/specs/011-hc-background-poll/intent.md +57 -0
- package/specs/011-hc-background-poll/journal.md +95 -0
- package/specs/011-hc-background-poll/plan.md +87 -0
- package/specs/011-hc-background-poll/spec.md +141 -0
- package/specs/011-hc-background-poll/tasks.md +83 -0
- package/specs/012-steer-default/intent.md +12 -0
- package/specs/012-steer-default/journal.md +40 -0
- package/specs/012-steer-default/plan.md +7 -0
- package/specs/012-steer-default/spec.md +42 -0
- package/specs/012-steer-default/tasks.md +6 -0
- package/specs/013-opencode-shepherd/handoff-t011.md +94 -0
- package/specs/013-opencode-shepherd/intent.md +59 -0
- package/specs/013-opencode-shepherd/plan.md +204 -0
- package/specs/013-opencode-shepherd/spec.md +258 -0
- package/specs/013-opencode-shepherd/tasks.md +259 -0
- package/src/core/artifact-sessions.ts +835 -0
- package/src/core/config.ts +329 -0
- package/src/core/discovery.ts +342 -0
- package/src/core/herdr.ts +1 -0
- package/src/core/host.ts +77 -0
- package/src/core/ids.ts +78 -0
- package/src/core/lifecycle.ts +1 -0
- package/src/core/messaging.ts +1 -0
- package/src/core/migration.ts +55 -0
- package/src/core/orchestration.ts +1 -0
- package/src/core/types.ts +143 -0
- package/src/core/unseen-completions.ts +114 -0
- package/src/extension/cli.ts +417 -0
- package/src/extension/config.ts +1 -0
- package/src/extension/settings-ui.ts +296 -0
- package/src/extension/shepherd-done.ts +768 -0
- package/src/extension/shepherd.ts +2548 -0
- package/src/extension/system-prompt.ts +38 -0
- package/src/extension/unseen-completions.ts +237 -0
- package/src/opencode/actions.ts +794 -0
- package/src/opencode/bridge.ts +777 -0
- package/src/opencode/display.ts +36 -0
- package/src/opencode/fieldnotes.ts +60 -0
- package/src/opencode/host.ts +62 -0
- package/src/opencode/orphans.ts +162 -0
- package/src/opencode/server.ts +458 -0
- package/src/runtimes/backend.ts +119 -0
- package/src/runtimes/detect.ts +102 -0
- package/src/runtimes/hc/hc.ts +527 -0
- package/src/runtimes/hc/runtime.ts +1898 -0
- package/src/runtimes/herdr/herdr.ts +912 -0
- package/src/runtimes/herdr/lifecycle.ts +1712 -0
- package/src/runtimes/herdr/messaging.ts +703 -0
- package/src/runtimes/herdr/orchestration.ts +1583 -0
- package/src/runtimes/herdr/runtime.ts +224 -0
- package/src/runtimes/runtime.ts +133 -0
- package/src/runtimes/settle-observations.ts +114 -0
- package/test/fixtures/context-project/AGENTS.md +2 -0
- package/test/fixtures/home/.agents/agents/same.md +6 -0
- package/test/fixtures/home/.agents/agents/shared-only.md +6 -0
- package/test/fixtures/home/.pi/agent/agents/invalid-thinking.md +6 -0
- package/test/fixtures/home/.pi/agent/agents/model-empty.md +7 -0
- package/test/fixtures/home/.pi/agent/agents/model-explicit.md +7 -0
- package/test/fixtures/home/.pi/agent/agents/omit-context-absent.md +5 -0
- package/test/fixtures/home/.pi/agent/agents/omit-context-false.md +6 -0
- package/test/fixtures/home/.pi/agent/agents/omit-context-invalid.md +6 -0
- package/test/fixtures/home/.pi/agent/agents/omit-context-true.md +6 -0
- package/test/fixtures/home/.pi/agent/agents/omit-false.md +6 -0
- package/test/fixtures/home/.pi/agent/agents/omit-invalid.md +6 -0
- package/test/fixtures/home/.pi/agent/agents/omit-pi-docs.md +7 -0
- package/test/fixtures/home/.pi/agent/agents/omit-true.md +6 -0
- package/test/fixtures/home/.pi/agent/agents/only-user.md +9 -0
- package/test/fixtures/home/.pi/agent/agents/same.md +6 -0
- package/test/fixtures/proj/.agents/agents/proj-shared.md +6 -0
- package/test/fixtures/proj/.pi/agents/project-pi.md +6 -0
- package/test/fixtures/proj/.pi/agents/same.md +6 -0
- package/test/helpers/fake-clock.mjs +39 -0
- package/test/helpers/feature-contracts.mjs +44 -0
- package/test/helpers/test-utils.mjs +44 -0
- package/test/verify-artifact-sessions.mjs +258 -0
- package/test/verify-backend.mjs +297 -0
- package/test/verify-child-mislabel.mjs +135 -0
- package/test/verify-child-surface.mjs +321 -0
- package/test/verify-cli.mjs +197 -0
- package/test/verify-command-ux.mjs +100 -0
- package/test/verify-compat.mjs +32 -0
- package/test/verify-cross-host-notes.mjs +128 -0
- package/test/verify-delegate.mjs +161 -0
- package/test/verify-detect.mjs +151 -0
- package/test/verify-discovery.mjs +239 -0
- package/test/verify-done-nudge.mjs +238 -0
- package/test/verify-effective-prompt.mjs +98 -0
- package/test/verify-hc-matrix.mjs +246 -0
- package/test/verify-hc-poll.mjs +260 -0
- package/test/verify-host-docs.mjs +35 -0
- package/test/verify-host-impact.mjs +49 -0
- package/test/verify-ids.mjs +141 -0
- package/test/verify-launch.mjs +183 -0
- package/test/verify-message-routing.mjs +560 -0
- package/test/verify-messaging.mjs +303 -0
- package/test/verify-migration-notice.mjs +69 -0
- package/test/verify-multi-wait.mjs +42 -0
- package/test/verify-opencode-display.mjs +47 -0
- package/test/verify-opencode-fieldnotes.mjs +121 -0
- package/test/verify-opencode-notice.mjs +77 -0
- package/test/verify-opencode-nudge.mjs +116 -0
- package/test/verify-opencode-orphans.mjs +160 -0
- package/test/verify-opencode-surface.mjs +107 -0
- package/test/verify-packaging.mjs +82 -0
- package/test/verify-parent-surface.mjs +118 -0
- package/test/verify-phase0.mjs +95 -0
- package/test/verify-registry.mjs +124 -0
- package/test/verify-rename-migration.mjs +111 -0
- package/test/verify-rendering.mjs +379 -0
- package/test/verify-session-boundary.mjs +146 -0
- package/test/verify-settings.mjs +260 -0
- package/test/verify-stale-wait.mjs +339 -0
- package/test/verify-status-widget.mjs +377 -0
- package/test/verify-status.mjs +172 -0
- package/test/verify-task-completion.mjs +156 -0
- package/test/verify-task-failures.mjs +201 -0
- package/test/verify-task-mislabel.mjs +143 -0
- package/test/verify-task-registry.mjs +194 -0
- package/test/verify-task-watchers.mjs +217 -0
- package/test/verify-tool-schemas.mjs +120 -0
- package/test/verify-unseen-completions.mjs +1211 -0
- package/test/verify-watchers.mjs +181 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# pi-shepherd — maintenance instructions
|
|
2
|
+
|
|
3
|
+
A no-fuss pi extension for explicit agent (sheep) lifecycle orchestration and herding
|
|
4
|
+
pi agents inside Herdr. See `README.md` and `docs/reference/dictionary` for terminology
|
|
5
|
+
and user-facing usage. Layout: `index.ts` is the pi entry point, `src/core/` is
|
|
6
|
+
the engine, and `src/extension/` is the pi surface (tools, commands, settings
|
|
7
|
+
UI). Core semantics live in `doAction()`/`src/core/lifecycle.ts`; the
|
|
8
|
+
model-facing tools and `/shepherd` command are thin adapters. This file contains
|
|
9
|
+
repository constraints only.
|
|
10
|
+
|
|
11
|
+
## Project conventions
|
|
12
|
+
|
|
13
|
+
Bundled agents are `scout`, `planner`, `worker`, and `reviewer`; run only agents
|
|
14
|
+
you trust. `shepherd.md` is the shared fieldnotes index, and each submitted
|
|
15
|
+
agent invocation receives its own note.
|
|
16
|
+
|
|
17
|
+
Config is two files: the user layer (`pi-shepherd/config.json` inside the
|
|
18
|
+
active pi agent dir — `~/.pi/agent` by default, `PI_CODING_AGENT_DIR`
|
|
19
|
+
overridable; stores personal values only) plus an optional self-contained
|
|
20
|
+
project config (`.shepherd/config.json`, anchored at cwd). A project config is
|
|
21
|
+
active only with `projectScope: true`, and its project-owned values fall back to
|
|
22
|
+
built-in defaults rather than private user values. `confirmProjectAgents` is
|
|
23
|
+
user-owned and cannot be changed by a repository config. `.shepherd/config.json`
|
|
24
|
+
may be committed explicitly; runtime fieldnote sessions remain ignored.
|
|
25
|
+
|
|
26
|
+
## Runtime and architecture
|
|
27
|
+
|
|
28
|
+
- TypeScript runs directly by pi. There is no build step or bundler.
|
|
29
|
+
- Herdr integration shells out to the `herdr` CLI.
|
|
30
|
+
- `src/core/discovery.ts` is pure and reads agent files fresh on each invocation.
|
|
31
|
+
- `src/core/orchestration.ts` contains internal opaque serializable handles and
|
|
32
|
+
session-scoped registries; model-facing lifecycle tools expose only ids.
|
|
33
|
+
- `src/core/lifecycle.ts` implements `spawn`, `prompt`, `wait`, `status`, and
|
|
34
|
+
`close`.
|
|
35
|
+
- `src/extension/config.ts` owns the two-layer config store (user file +
|
|
36
|
+
project delta), the file rename migration, and the fieldnotes session
|
|
37
|
+
snapshot (`settings-ui.ts` renders the `/shepherd settings` menu).
|
|
38
|
+
- `src/extension/shepherd.ts` exposes the umbrella control tool and separate
|
|
39
|
+
lifecycle tools.
|
|
40
|
+
- Every `pi.registerTool({ ... })` declaration must spell out `name`, `label`,
|
|
41
|
+
`description`, `promptSnippet`, and `parameters` directly in that registration.
|
|
42
|
+
Do not hide or generate those tool-definition fields through nested factories,
|
|
43
|
+
object spreads, or shared registration helpers.
|
|
44
|
+
- `src/core/herdr.ts` owns Herdr launch, pane, and created-pane registry
|
|
45
|
+
operations.
|
|
46
|
+
- `src/extension/shepherd-done.ts` is the in-tab completion extension.
|
|
47
|
+
- User-facing Shepherd tool results use a consistent structure: first the service
|
|
48
|
+
message, then a `call:` block containing the actual tool name and JSON
|
|
49
|
+
arguments, then a `return:` block containing the operation's returned value,
|
|
50
|
+
then a `details:` block with indented detail entries. This format is the
|
|
51
|
+
default for every Shepherd tool result, including errors; do not hide the
|
|
52
|
+
call or return behind expanded output or replace them with only a summary.
|
|
53
|
+
|
|
54
|
+
## Invariants
|
|
55
|
+
|
|
56
|
+
- Discovery precedence remains user, shared-user, project, shared-project,
|
|
57
|
+
bundled pi agents, bundled shared agents.
|
|
58
|
+
- Agent discovery defaults to `both` scope. Project agent definitions are
|
|
59
|
+
repo-controlled; `confirmProjectAgents` is user-owned, defaults off, and a
|
|
60
|
+
project config can never set it, so a repository cannot turn the gate on or
|
|
61
|
+
off on the user's behalf.
|
|
62
|
+
- Spawn uses the persisted agent scope and project-approval settings, plus the
|
|
63
|
+
discovered definition's prompt options; these cannot be overridden by spawn
|
|
64
|
+
arguments. Spawn placement is one optional value: `pane_right`, `pane_down`,
|
|
65
|
+
`tab`, or `workspace`.
|
|
66
|
+
- Model-facing lifecycle tools accept opaque agent/prompt ids; internal handles
|
|
67
|
+
must never be confused with raw Herdr pane IDs.
|
|
68
|
+
- Only panes recorded in `~/.pi/agent/pi-shepherd/created-panes.json` may be
|
|
69
|
+
closed by pi-shepherd. Raw pane IDs must not bypass ownership checks.
|
|
70
|
+
- Background Herdr placement uses `--no-focus`.
|
|
71
|
+
- Temporary launch/session resources are removed only after the child pane is
|
|
72
|
+
confirmed gone.
|
|
73
|
+
- A tracked task settles only through an explicit child `shepherd_done`. When a
|
|
74
|
+
turn ends with a tracked task still open, `src/extension/shepherd-done.ts`
|
|
75
|
+
may nudge at most once per task (`PI_SHEPHERD_DONE_NUDGES`, `0` disables it),
|
|
76
|
+
never after an aborted or errored turn and never while a tracked request is
|
|
77
|
+
outstanding. A nudge never invents a terminal status; an exhausted budget is
|
|
78
|
+
escalated to the parent as an ordinary message.
|
|
79
|
+
|
|
80
|
+
## Reference implementation
|
|
81
|
+
|
|
82
|
+
[pi-interactive-subagents](https://github.com/amosblomqvist/pi-interactive-subagents) — a tmux-based pi extension for async subagents; useful inspiration for pi-shepherd. Local clone: `/mnt/Projects/Projects/references/pi-interactive-subagents`.
|
|
83
|
+
|
|
84
|
+
## Verification
|
|
85
|
+
|
|
86
|
+
Run `npm test`. Live Herdr verification should cover idle spawn, non-blocking
|
|
87
|
+
prompt, single wait/result recovery, concurrent multi-wait, iterative prompting,
|
|
88
|
+
status, close cancellation, focus preservation, and ownership protection.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Contributing to pi-shepherd
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to pi-shepherd! Bug reports,
|
|
4
|
+
documentation improvements, tests, and code contributions are all welcome.
|
|
5
|
+
|
|
6
|
+
Please read this guide before opening an issue or pull request. Following these
|
|
7
|
+
steps helps keep contributions focused and easy to review.
|
|
8
|
+
|
|
9
|
+
## Before you start
|
|
10
|
+
|
|
11
|
+
- Search existing issues and pull requests before opening a new one.
|
|
12
|
+
- For larger changes, open an issue first to discuss the proposed approach.
|
|
13
|
+
- Keep pull requests focused on one change or closely related group of changes.
|
|
14
|
+
- Never include passwords, API keys, tokens, or other sensitive information in
|
|
15
|
+
issues, commits, or pull requests.
|
|
16
|
+
|
|
17
|
+
## Development setup
|
|
18
|
+
|
|
19
|
+
pi-shepherd is a TypeScript pi extension that runs directly and does not require
|
|
20
|
+
a build step.
|
|
21
|
+
|
|
22
|
+
The extension imports several packages from the pi runtime. They are supplied
|
|
23
|
+
by the pi host at runtime, and are also listed as development dependencies so
|
|
24
|
+
that the verification suite can run from a clean checkout. Install them with
|
|
25
|
+
`npm install` (or `npm ci`) before running the tests.
|
|
26
|
+
|
|
27
|
+
1. Fork the repository on GitHub.
|
|
28
|
+
2. Clone your fork and enter the project directory.
|
|
29
|
+
3. Add the original repository as the `upstream` remote if needed.
|
|
30
|
+
4. Install any dependencies required by your local environment.
|
|
31
|
+
5. Run the test suite to verify your setup:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm test
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Live Herdr verification may require a running Herdr environment. See the
|
|
38
|
+
project documentation and existing tests for the scenarios covered by the
|
|
39
|
+
repository.
|
|
40
|
+
|
|
41
|
+
## Create a branch
|
|
42
|
+
|
|
43
|
+
Start new work from an up-to-date `main` branch:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
git fetch upstream
|
|
47
|
+
git switch main
|
|
48
|
+
git pull --ff-only upstream main
|
|
49
|
+
git switch -c <type>/<short-description>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Use a descriptive branch name in lowercase. Common prefixes include:
|
|
53
|
+
|
|
54
|
+
- `feat/` for a new feature
|
|
55
|
+
- `fix/` for a bug fix
|
|
56
|
+
- `docs/` for documentation-only changes
|
|
57
|
+
- `refactor/` for code improvements that do not change behavior
|
|
58
|
+
- `test/` for test changes
|
|
59
|
+
- `chore/` for maintenance work
|
|
60
|
+
|
|
61
|
+
For example:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
docs/contributing-guide
|
|
65
|
+
fix/prompt-timeout
|
|
66
|
+
feat/parallel-agent-prompts
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Make your changes
|
|
70
|
+
|
|
71
|
+
- Follow the existing code style and conventions.
|
|
72
|
+
- Keep changes small and focused.
|
|
73
|
+
- Update documentation when behavior or public interfaces change.
|
|
74
|
+
- Add or update tests for behavior changes and bug fixes.
|
|
75
|
+
- Preserve the project's security invariants, especially agent scope, pane
|
|
76
|
+
ownership, and cleanup behavior.
|
|
77
|
+
- Do not commit generated files, local configuration, credentials, or temporary
|
|
78
|
+
runtime notes.
|
|
79
|
+
|
|
80
|
+
Before committing, run the relevant tests. For the full focused suite, run:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm test
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Commit changes
|
|
87
|
+
|
|
88
|
+
Write clear commit messages in the imperative mood. Conventional Commits use
|
|
89
|
+
this general format:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
<type>[optional scope][optional !]: <short description>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Use one of these common types:
|
|
96
|
+
|
|
97
|
+
- `feat` — add a new feature
|
|
98
|
+
- `fix` — fix a bug
|
|
99
|
+
- `docs` — add or update documentation
|
|
100
|
+
- `style` — make formatting-only changes that do not affect behavior
|
|
101
|
+
- `refactor` — restructure code without changing behavior
|
|
102
|
+
- `perf` — improve performance
|
|
103
|
+
- `test` — add or update tests
|
|
104
|
+
- `build` — change build or dependency configuration
|
|
105
|
+
- `ci` — change continuous integration or delivery configuration
|
|
106
|
+
- `chore` — make other maintenance changes
|
|
107
|
+
- `revert` — revert a previous commit
|
|
108
|
+
|
|
109
|
+
An optional scope can identify the affected area, and `!` marks a breaking
|
|
110
|
+
change. For example:
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
docs: explain agent discovery
|
|
114
|
+
fix: handle prompt timeout
|
|
115
|
+
feat: support concurrent waits
|
|
116
|
+
refactor(discovery): simplify agent precedence
|
|
117
|
+
fix!: remove the legacy delegate action
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Keep each commit related to the change it describes. Avoid committing unrelated
|
|
121
|
+
formatting changes or drive-by refactors.
|
|
122
|
+
|
|
123
|
+
## Open a pull request
|
|
124
|
+
|
|
125
|
+
Push your branch to your fork:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
git push -u origin <type>/<short-description>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Then open a pull request against the project's `main` branch.
|
|
132
|
+
|
|
133
|
+
A useful pull request description should include:
|
|
134
|
+
|
|
135
|
+
- What changed and why.
|
|
136
|
+
- How the change was tested.
|
|
137
|
+
- Any limitations, compatibility considerations, or follow-up work.
|
|
138
|
+
- Links to related issues or discussions.
|
|
139
|
+
|
|
140
|
+
Please keep the pull request title concise and descriptive. If the change is
|
|
141
|
+
not ready for review, open it as a draft pull request.
|
|
142
|
+
|
|
143
|
+
Maintainers may request changes, ask questions, or suggest a different approach.
|
|
144
|
+
Please respond to review feedback and keep the branch up to date while the pull
|
|
145
|
+
request is being reviewed.
|
|
146
|
+
|
|
147
|
+
## Reporting bugs
|
|
148
|
+
|
|
149
|
+
When reporting a bug, include:
|
|
150
|
+
|
|
151
|
+
- A clear description of the expected and actual behavior.
|
|
152
|
+
- Steps to reproduce the problem.
|
|
153
|
+
- Relevant operating system, Node.js, pi, and Herdr versions.
|
|
154
|
+
- Test output, logs, or screenshots when useful.
|
|
155
|
+
- A minimal reproduction or example, if possible.
|
|
156
|
+
|
|
157
|
+
Remove sensitive information before sharing logs or configuration.
|
|
158
|
+
|
|
159
|
+
## Suggesting features
|
|
160
|
+
|
|
161
|
+
Feature requests are welcome. Explain the problem the feature would solve,
|
|
162
|
+
include a proposed use case, and describe any alternatives you considered.
|
|
163
|
+
Smaller, well-scoped proposals are easier to evaluate and implement.
|
|
164
|
+
|
|
165
|
+
## Security issues
|
|
166
|
+
|
|
167
|
+
Please do not report security vulnerabilities in a public issue. Contact the
|
|
168
|
+
maintainers privately with enough detail to reproduce the problem. Do not
|
|
169
|
+
include credentials or other secrets in the report.
|
|
170
|
+
|
|
171
|
+
## Code of conduct
|
|
172
|
+
|
|
173
|
+
Contributors are expected to be respectful, constructive, and inclusive. Help
|
|
174
|
+
maintain a welcoming project by assuming good intent, discussing technical
|
|
175
|
+
issues professionally, and avoiding harassment or discriminatory behavior.
|
|
176
|
+
|
|
177
|
+
Thank you for helping improve pi-shepherd!
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|