ptbk 0.119.0-21 → 0.119.0-26
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 +16 -9
- package/dist/browser/browser.d.ts +50 -36
- package/dist/browser/browser.js +162 -118
- package/dist/browser/browser.js.map +1 -1
- package/dist/browser/fleet.d.ts +59 -0
- package/dist/browser/fleet.js +148 -0
- package/dist/browser/fleet.js.map +1 -0
- package/dist/browser/recording.js +2 -2
- package/dist/browser/recording.js.map +1 -1
- package/dist/chats/conversation.d.ts +1 -1
- package/dist/chats/conversation.js +8 -6
- package/dist/chats/conversation.js.map +1 -1
- package/dist/chats/local.js +5 -5
- package/dist/chats/local.js.map +1 -1
- package/dist/cli/commands/add.js +1 -1
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/boilerplates.js +1 -1
- package/dist/cli/commands/boilerplates.js.map +1 -1
- package/dist/cli/commands/find.js +1 -1
- package/dist/cli/commands/find.js.map +1 -1
- package/dist/cli/commands/fix.js +9 -4
- package/dist/cli/commands/fix.js.map +1 -1
- package/dist/cli/commands/init.d.ts +5 -0
- package/dist/cli/commands/init.js +279 -118
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/migrate.js +1 -1
- package/dist/cli/commands/migrate.js.map +1 -1
- package/dist/cli/commands/ping.js +20 -12
- package/dist/cli/commands/ping.js.map +1 -1
- package/dist/cli/commands/plan.js +20 -12
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/recover.js +1 -1
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/restart.js +6 -5
- package/dist/cli/commands/restart.js.map +1 -1
- package/dist/cli/commands/run.js +26 -15
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/start.js +11 -7
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/tool.d.ts +19 -0
- package/dist/cli/commands/tool.js +320 -0
- package/dist/cli/commands/tool.js.map +1 -0
- package/dist/cli/commands/verify.js +1 -1
- package/dist/cli/commands/verify.js.map +1 -1
- package/dist/cli/common.d.ts +7 -1
- package/dist/cli/common.js +37 -20
- package/dist/cli/common.js.map +1 -1
- package/dist/cli/compatibility.d.ts +8 -0
- package/dist/cli/compatibility.js +32 -0
- package/dist/cli/compatibility.js.map +1 -0
- package/dist/cli/parser.js +7 -3
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/registry.js +182 -7
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli/service-view.js +1 -1
- package/dist/cli/service-view.js.map +1 -1
- package/dist/cli/sources.js +2 -0
- package/dist/cli/sources.js.map +1 -1
- package/dist/cli/spec.js +8 -6
- package/dist/cli/spec.js.map +1 -1
- package/dist/common/naming.d.ts +53 -0
- package/dist/common/naming.js +90 -0
- package/dist/common/naming.js.map +1 -0
- package/dist/engine/agenda.d.ts +70 -9
- package/dist/engine/agenda.js +294 -61
- package/dist/engine/agenda.js.map +1 -1
- package/dist/engine/executor.d.ts +5 -0
- package/dist/engine/executor.js +24 -11
- package/dist/engine/executor.js.map +1 -1
- package/dist/engine/harnesses.d.ts +82 -18
- package/dist/engine/harnesses.js +191 -39
- package/dist/engine/harnesses.js.map +1 -1
- package/dist/engine/preview.js +2 -2
- package/dist/engine/preview.js.map +1 -1
- package/dist/engine/routing.d.ts +10 -0
- package/dist/engine/routing.js +67 -28
- package/dist/engine/routing.js.map +1 -1
- package/dist/engine/snapshot.d.ts +107 -7
- package/dist/engine/state.d.ts +4 -2
- package/dist/engine/state.js.map +1 -1
- package/dist/engine/sync.d.ts +96 -0
- package/dist/engine/sync.js +199 -0
- package/dist/engine/sync.js.map +1 -0
- package/dist/engine/team.d.ts +1 -0
- package/dist/engine/team.js +12 -8
- package/dist/engine/team.js.map +1 -1
- package/dist/expert/_main.md +96 -67
- package/dist/expert/agents/_index.md +10 -7
- package/dist/expert/agents/core-agents.md +4 -2
- package/dist/expert/agents/fixer.md +15 -12
- package/dist/expert/cli/acceptance.md +96 -78
- package/dist/expert/cli/api.md +26 -14
- package/dist/expert/cli/autonomous-operation.md +17 -19
- package/dist/expert/cli/browser.md +24 -24
- package/dist/expert/cli/checks.md +18 -10
- package/dist/expert/cli/cli.md +48 -41
- package/dist/expert/cli/configuration-migrations.md +43 -0
- package/dist/expert/cli/configuration.md +24 -14
- package/dist/expert/cli/controls.md +23 -11
- package/dist/expert/cli/dashboard-details.md +28 -10
- package/dist/expert/cli/dashboard-layout.md +15 -15
- package/dist/expert/cli/dashboard.md +8 -10
- package/dist/expert/cli/environment.md +33 -0
- package/dist/expert/cli/execution.md +10 -8
- package/dist/expert/cli/git-persistence.md +27 -21
- package/dist/expert/cli/git-preflight.md +8 -4
- package/dist/expert/cli/git-synchronization.md +32 -6
- package/dist/expert/cli/harness-plugins.md +12 -12
- package/dist/expert/cli/harnesses.md +22 -16
- package/dist/expert/cli/initialization-ui.md +14 -14
- package/dist/expert/cli/initialization.md +31 -21
- package/dist/expert/cli/installation.md +6 -0
- package/dist/expert/cli/isolation.md +5 -3
- package/dist/expert/cli/releasing.md +17 -3
- package/dist/expert/cli/retries.md +10 -8
- package/dist/expert/cli/run.md +7 -5
- package/dist/expert/cli/start.md +21 -15
- package/dist/expert/cli/status-view.md +15 -17
- package/dist/expert/cli/synchronization-setup.md +24 -0
- package/dist/expert/cli/terminal.md +14 -16
- package/dist/expert/cli/tool-management.md +60 -0
- package/dist/expert/cli/tool-runtime.md +35 -0
- package/dist/expert/cli/tools-migration.md +50 -0
- package/dist/expert/cli/tools.md +73 -0
- package/dist/expert/cli/trace-configuration.md +9 -11
- package/dist/expert/cli/updates.md +7 -7
- package/dist/expert/cli/windows-installer.md +67 -0
- package/dist/expert/cli/workspace.md +2 -0
- package/dist/expert/coding-standards/_index.md +11 -0
- package/dist/expert/coding-standards/naming.md +30 -0
- package/dist/expert/coding-standards/shared-logic.md +27 -0
- package/dist/expert/concepts/automatic-repair.md +33 -0
- package/dist/expert/concepts/engine-and-project.md +7 -5
- package/dist/expert/dictionary.md +18 -18
- package/dist/harness/plugins/claude-code/index.js +4 -2
- package/dist/harness/plugins/claude-code/index.js.map +1 -1
- package/dist/harness/plugins/cline/index.js +1 -0
- package/dist/harness/plugins/cline/index.js.map +1 -1
- package/dist/harness/plugins/gemini/index.js +2 -0
- package/dist/harness/plugins/gemini/index.js.map +1 -1
- package/dist/harness/plugins/github-copilot/index.js +1 -0
- package/dist/harness/plugins/github-copilot/index.js.map +1 -1
- package/dist/harness/plugins/openai-codex/index.js +13 -9
- package/dist/harness/plugins/openai-codex/index.js.map +1 -1
- package/dist/harness/plugins/opencode/index.js +1 -0
- package/dist/harness/plugins/opencode/index.js.map +1 -1
- package/dist/harness/plugins/qwen-code/index.js +1 -0
- package/dist/harness/plugins/qwen-code/index.js.map +1 -1
- package/dist/harness/types.d.ts +16 -5
- package/dist/project/config.d.ts +135 -48
- package/dist/project/config.js +331 -119
- package/dist/project/config.js.map +1 -1
- package/dist/project/configuration.d.ts +43 -0
- package/dist/project/configuration.js +165 -0
- package/dist/project/configuration.js.map +1 -0
- package/dist/project/defaults.d.ts +4 -2
- package/dist/project/defaults.js +10 -5
- package/dist/project/defaults.js.map +1 -1
- package/dist/project/git.d.ts +28 -0
- package/dist/project/git.js +81 -0
- package/dist/project/git.js.map +1 -1
- package/dist/project/migrations.d.ts +96 -0
- package/dist/project/migrations.js +301 -0
- package/dist/project/migrations.js.map +1 -0
- package/dist/project/publication.d.ts +57 -0
- package/dist/project/publication.js +117 -0
- package/dist/project/publication.js.map +1 -0
- package/dist/project/readiness.d.ts +14 -5
- package/dist/project/readiness.js +23 -22
- package/dist/project/readiness.js.map +1 -1
- package/dist/project/setup.js +2 -0
- package/dist/project/setup.js.map +1 -1
- package/dist/service/actions.d.ts +12 -4
- package/dist/service/actions.js +32 -2
- package/dist/service/actions.js.map +1 -1
- package/dist/service/control.d.ts +1 -1
- package/dist/service/control.js +1 -1
- package/dist/service/host.d.ts +5 -2
- package/dist/service/host.js +26 -16
- package/dist/service/host.js.map +1 -1
- package/dist/service/http.js +7 -2
- package/dist/service/http.js.map +1 -1
- package/dist/service/launcher.d.ts +2 -1
- package/dist/service/launcher.js +1 -0
- package/dist/service/launcher.js.map +1 -1
- package/dist/service/records.d.ts +3 -0
- package/dist/service/records.js +1 -1
- package/dist/service/records.js.map +1 -1
- package/dist/service/spa/app.css +39 -0
- package/dist/service/spa/app.js +242 -39
- package/dist/service/worker.js +1 -0
- package/dist/service/worker.js.map +1 -1
- package/dist/tools/environment.d.ts +122 -0
- package/dist/tools/environment.js +199 -0
- package/dist/tools/environment.js.map +1 -0
- package/dist/tools/model.d.ts +180 -0
- package/dist/tools/model.js +111 -0
- package/dist/tools/model.js.map +1 -0
- package/dist/tools/normalize.d.ts +51 -0
- package/dist/tools/normalize.js +321 -0
- package/dist/tools/normalize.js.map +1 -0
- package/dist/tools/operations.d.ts +198 -0
- package/dist/tools/operations.js +378 -0
- package/dist/tools/operations.js.map +1 -0
- package/dist/tools/readiness.d.ts +72 -0
- package/dist/tools/readiness.js +160 -0
- package/dist/tools/readiness.js.map +1 -0
- package/dist/ui/dashboard.d.ts +3 -0
- package/dist/ui/dashboard.js +173 -2
- package/dist/ui/dashboard.js.map +1 -1
- package/dist/ui/details.d.ts +35 -1
- package/dist/ui/details.js +103 -2
- package/dist/ui/details.js.map +1 -1
- package/dist/ui/secret.d.ts +8 -0
- package/dist/ui/secret.js +41 -0
- package/dist/ui/secret.js.map +1 -0
- package/dist/ui/status-view.d.ts +1 -0
- package/dist/ui/status-view.js +33 -8
- package/dist/ui/status-view.js.map +1 -1
- package/dist/ui/tool-forms.d.ts +24 -0
- package/dist/ui/tool-forms.js +133 -0
- package/dist/ui/tool-forms.js.map +1 -0
- package/package.json +1 -1
package/dist/expert/cli/start.md
CHANGED
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
# Starting an ongoing agenda
|
|
2
2
|
|
|
3
|
-
[Main specification](../_main.md) · [Unattended operation](autonomous-operation.md)
|
|
3
|
+
[Main specification](../_main.md) · [Unattended operation](autonomous-operation.md) · [Automatic repair](../concepts/automatic-repair.md)
|
|
4
4
|
|
|
5
|
-
`ptbk start` operates the
|
|
5
|
+
`ptbk start` operates the project's agenda indefinitely without per-task agent/harness/model/thinking selection. Successful [init](initialization.md) calls the same background start. A ready project starts actual processing without another Run action, with one executing task at a time, not a concurrent worker per agent.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Readiness is not service existence
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Check project configuration compatibility and apply required [migrations](configuration-migrations.md) before affected work. An engine older than the saved version explains/offers its update rather than downgrading the project. For genuinely missing structural initialization, reuse the same finite initializer when interactive, preserving prior choices and one setup/start handoff; noninteractive use reports missing decisions without hidden prompts.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
An initialized project whose tools are missing, disabled, signed out, quota-limited or otherwise unusable may still start its supervisor and controls. Show **running, waiting for tools**, with the precise missing resource and enable/add/repair action. Do not rerun onboarding to reverse a deliberate removal. Check the live inventory before every task and keep refreshing while idle; new tools resume work without restart and can help an existing task. See [tool runtime](tool-runtime.md).
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
There is no check-command setup question at start. Preserve real checks; the explicit initialization placeholder is nonblocking and visibly not real automated validation. A broken real validator uses ordinary repair rather than a new wizard or a replacement fake pass. Successful unchanged init needs no repeated login, check selection or task creation.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## Launch and one-shot result
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Default start launches a background daemon with restart persistence and a lightweight loopback HTTP service on a free port searched from 3000. Establish the usual protected [remote dashboard access](remote-access.md), with `--no-tunnel` for local only and `--no-server` for neither. This tunnel is distinct from Git autosync. Tunnel/network failures are visibly degraded and retried without unnecessarily preventing safe local work. Serving a dashboard does not open it.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Discover agents with the shared resolver and enabled named tools with the shared registry. Reuse global harness setup and apply [update policy](harness-updates.md) safely across shared executables. Installed unselected harnesses are not implicit choices. Referenceable hidden/dependency agents are not automatically goal-discovery candidates. The launching terminal may complete genuinely missing attended initialization before detaching, not hide runtime decisions on stdin.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
After a bounded launch outcome, render one [status snapshot](status-view.md) and release the terminal. Do not attach/open a dashboard automatically. `--raw` changes output, not daemon lifetime/tunneling. Explicit `--foreground` owns the live execution view or plain events. Report the actual running version, project, phase/wait, queue, attributed user chats, tools and enabled synchronization summary.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Connection information distinguishes a ready public HTTPS/pairing address from local-only or connecting/degraded remote access. Do not show a localhost mobile QR as if it worked from another network. Respect no-QR/raw/authentication controls; hint `ptbk dashboard`, `ptbk show` and `ptbk stop`. Do not wait for the first task. Init's finite finish uses its separate [UX](initialization-ui.md).
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
## Automatic progression and synchronization
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Evaluate the queue at startup, after work and after relevant source/tool changes. Execute eligible assigned tasks, including Expert bootstrap. Missing routing creates an ordinary checked [Manager](../agents/manager.md) prerequisite, then continues with its target, without manual assignment, recursion or duplicates. Explicit unavailable requirements remain real waits. All task claims require running lifecycle state and current usable tools.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Before new work and before its commit, attempt opt-in [Git synchronization](git-synchronization.md), in addition to the 60-second background cycle. Publish completed local operations when enabled. Failed pull/push leaves synchronization pending, not the task queue artificially stopped. Preserve owned dirty work and defer unsafe integration; newly fetched tasks/configuration become effective only after safe integration and validation.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Authoring normally commits sources before dispatch; explicit ordinary `--no-commit` is the labelled exception under [Git persistence](git-persistence.md), not an excuse to mix unrelated dirt or skip required committed migrations. When no unfinished work remains, including future tasks, perform due [goal discovery](goal-discovery.md) with persistent cooldowns. Do not generate useless work merely to avoid idle time.
|
|
32
|
+
|
|
33
|
+
Follow [automatic repair](../concepts/automatic-repair.md) as a core principle: deterministic retries/corrections and ordinary Fixer work resolve routine issues without needless user decisions. Fixer is not a special worker or channel; its current Book/TEAM controls consultations. Checkpoint task-local blockers and continue independent eligible work when safe, while keeping one task owner and respecting pause/stop. No usable harness also means Fixer cannot execute yet; retain the visible resource wait.
|
|
34
|
+
|
|
35
|
+
Survive ordinary task/check/provider/browser/tunnel/update/synchronization/persistence failures with bounded recovery, useful traces and controls. Empty queues or missing resources do not mean service exit. Deliberate pause/stop remains authoritative. The product targets extended unattended operation, not guaranteed work while a host sleeps or external accounts are unavailable.
|
|
36
|
+
|
|
37
|
+
Repeated start reports the existing engine once without duplicate workers/tunnels, reinitialization, silent configuration replacement or pause cancellation. Use `ptbk dashboard` to observe it. See [controls](controls.md), [persistence](persistence.md), [process modes](process-modes.md) and [run](run.md).
|
|
@@ -2,36 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
[Main specification](../_main.md) · [Terminal dashboard](terminal.md) · [Browser dashboard](dashboard.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
One coherent engine-owned view is presented live or as a snapshot, not unrelated launch/QR and status screens. Use the [cockpit panel hierarchy](dashboard-layout.md): attention, current work, main lifecycle controls, tools, enabled synchronization, queue, bounded activity/results and connection. Verbose information uses the existing [detail pattern](dashboard-details.md). Host-wide global overview is a separate table, not a project view backed by a global engine.
|
|
6
6
|
|
|
7
|
-
## Live and snapshot
|
|
7
|
+
## Live and snapshot state
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Dashboard, explicit foreground presentation and browser view update continuously; clients do not own state. Status/show render once and return. Start/restart use the same categories with an honest operation outcome; pause/resume/stop distinguish pending acceptance from completion. No lifecycle command automatically attaches a viewer.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Identify the project, actual engine version, observation freshness, connection and live state (`running`, `pausing`, `pause`, `stopping`), task/agent/phase, queue, outcomes and waits/blockers. Empty queue, missing tools or failed synchronization can coexist with running. They are not additional lifecycle states or evidence of process failure. An exited service may be labelled stopped as an observation, never advertised with a dead ready endpoint.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Show a compact tools overview even when no usable tools exist, explaining exactly what to enable, add or repair. Details distinguish configured/enabled/usable/in-use instances and old retained uses from newly saved state. New tools and `.env`/configuration changes appear without restart. Show actual task harness instance/variant/model/thinking context, not the first configured provider or stale last-run data. Individual browser detail includes effective profile/path, health and recovery state with no credentials.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Only while autosync is enabled, show its compact dedicated status and drill-down/manual-cycle entry. Details distinguish pending publication, failed fetch, deferred integration, conflict repair and real success. Keep local work state separate from remote failure. When disabled, omit the panel rather than fill the cockpit with an inactive sync box; general settings can report the choice. API/raw output keeps equivalent truthful information.
|
|
16
16
|
|
|
17
|
-
[
|
|
17
|
+
Agent [mascot badges](../agents/visual-identity.md) accompany readable names and observed activity; raw output keeps meaning without artwork. Explicit uncommitted mode stays visible. Snapshot time cannot imply ongoing updates. Unknown/stale fields and last-run history are labelled; never invent activity, inference or progress to fill the view.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
[Chats awaiting a human response](user-interactions.md) have highest priority: actual speaker, concrete question/action, linked work and direct thread entry. Unread and waiting are distinct and all chats remain accessible. New chat defaults to Chatter; existing questions retain authors. Automatic assignment/discovery/repair is agent work, not automatically a user request.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Keep concrete tool/authentication/browser/recovery blockers visible through bounded rechecks even with details closed. Show the actual cause, next action and next check when known; an answered request alone does not prove repair. Skip wait cannot dismiss readiness, grant authority or bypass a resource requirement. A waiting engine with no active provider call is not waiting for inference.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
## Connection, URL and QR
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Separate local HTTP and [remote dashboard access](remote-access.md) with actual addresses/provider/health. This connection region is distinct from Git synchronization. A verified ready public HTTPS address is primary for phone access; retain labelled loopback for the same computer. Never guess another project's port/address.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
A trusted local pretty terminal may display the existing short-lived single-use pairing QR and identical readable entry link. Label its sensitivity and lifetime. Paired sessions authorise later visits; public base URL alone grants no authority. Ordinary API and remote browser output never reveal fresh pairing credentials or profile/secret content.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
QR may appear in start/status/show/live views, not as a replacement for work/requests. No-tunnel/failure is local-only/degraded; loopback QR is not mobile-network access. No-server, unverified or stopped endpoints get no usable-connection claims. Old addresses are diagnostic history only. `--no-qr` suppresses code, not exposure. Raw/redirected output retains redacted public addresses/health without QR art or automatic secret disclosure.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
If a QR does not fit, keep essential state, requests and readable guidance rather than clipping it. Live updates preserve placement/focus and change verified URLs/validity honestly without repeated QR scrollback. Rendering never creates a tunnel or mints new pairing credentials.
|
|
32
32
|
|
|
33
33
|
## Acceptance outcomes
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Verify non-default port, repeated start, no-tunnel, provider failure, no-server, service exit, expired pairing, no-QR, raw/narrow views and unknown execution/profile metadata. No fabricated activity, stale-ready address or clipped QR is presented. Client refresh/disconnection never changes engine ownership.
|
|
35
|
+
All clients and one-shot commands show matching observed categories with truthful version/time/lifecycle state. Missing browsers/harnesses leave a visible running/resource wait; adding a tool updates and resumes eligibility. Pending/failed sync appears only in its enabled panel and does not falsify local state. Inspect actual per-instance diagnostics and metadata with details collapsed/open. Verify pause in one client appears in others while closing viewers changes nothing. Test narrow/raw/no-QR/no-server, pairing expiry, port changes, tunnel failure and service exit without fabricated activity or stale ready endpoints.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Synchronization setup during initialization
|
|
2
|
+
|
|
3
|
+
[Main specification](../_main.md) · [Initialization](initialization.md) · [Git synchronization](git-synchronization.md)
|
|
4
|
+
|
|
5
|
+
Init has one **Automatic synchronization** decision, default off. Reuse an existing explicit choice during reinit. Choosing no saves `isAutoSync: false` and asks no provider, remote or repository-publication questions. It does not modify an existing origin or perform remote publication. Migrating an existing project does not introduce a surprise wizard or enable synchronization.
|
|
6
|
+
|
|
7
|
+
When the user chooses yes, save the opt-in and offer:
|
|
8
|
+
|
|
9
|
+
- **GitHub:** create/publish the new project through supported authenticated GitHub setup, with **private** visibility by default. Public is an explicit optional choice, never inferred from the local folder or inherited accidentally. Resolve the owner and repository name and reuse available authorized authentication; show what will be created before publication. Do not overwrite an existing repository or assume a name collision is permission to use it.
|
|
10
|
+
- **Another Git origin:** accept the user's supplied remote URL. The engine later uses ordinary Git transport/authentication; this is not an integration-specific repository-creation wizard. Dedicated GitLab and other hosting setup is future scope, not required now.
|
|
11
|
+
|
|
12
|
+
Where a project already has a configured remote/tracking destination, offer explicit reuse rather than silently replacing it or forcing a duplicate GitHub repository. Changes to existing remote configuration require the user's clear choice. Remote URL/authentication material must be redacted in status and not copied into `ptbk.json`; actual remote/upstream metadata lives in Git.
|
|
13
|
+
|
|
14
|
+
A newly created Git repository uses `main`. Existing repositories keep their current branch/history. Configure origin and its tracking destination for the selected initialized branch as part of this explicitly authorized setup, not as recurring engine behavior. Do not put remote/branch selectors into the saved project configuration.
|
|
15
|
+
|
|
16
|
+
Prepare and commit the authorized local setup before initial publication, respecting secret/ignore rules and selected trace/video policies. Never publish `.env`, native accounts, browser profiles or other ignored secret state, and do not sweep unrelated user files into the initial commit. Out-of-the-box GitHub publication is a real setup operation with an observed result, not merely printing instructions while claiming success.
|
|
17
|
+
|
|
18
|
+
Remote setup/push failures are separate from usable local initialization: retain the confirmed opt-in and actionable pending/error state, report that publication did not succeed, and start otherwise ready local work. Do not pretend a repository was created or change to public visibility to bypass an error. A later retry must reuse a repository already successfully created for this operation, not create duplicates. Genuinely missing publication choices/authentication remain explicit, with no invisible unattended prompt.
|
|
19
|
+
|
|
20
|
+
Noninteractive initialization accepts equivalent opt-in/provider/visibility/origin decisions. Off requires no extra fields; GitHub publication requires its resolvable owner/name and authorization; custom-origin setup requires the supplied URL. `--no-commit` and autosync are incompatible and are diagnosed before publication or setup writes. Existing Git authentication remains under the user's normal controls.
|
|
21
|
+
|
|
22
|
+
## Acceptance outcomes
|
|
23
|
+
|
|
24
|
+
Default/no skips provider questions and all publication. Yes/GitHub creates and publishes the intended private repository; only an explicit public choice changes visibility. Yes/custom origin configures the supplied destination without GitHub-only assumptions. Preserve an existing branch/remote on reinit. Simulate name collisions, denied authentication, repository creation followed by push failure and offline startup: retain honest recoverable remote state without duplicating repositories, leaking secrets or unnecessarily blocking local tasks.
|
|
@@ -4,34 +4,32 @@
|
|
|
4
4
|
|
|
5
5
|
## Attaching and lifetime
|
|
6
6
|
|
|
7
|
-
`ptbk dashboard` opens a live
|
|
7
|
+
`ptbk dashboard` opens a live client for the selected project's existing engine; `--path` selects the project. Verify the owner. Opening/reopening does not initialize/start an engine, acquire its lock, claim work or change configuration. A missing/unreachable service gives an actionable error/start instruction, not an empty successful project view.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Zero or many dashboards can attach, including terminals in the same project. They share state but not viewer focus/layout. The client has no wizard steps or completion countdown. Q, Ctrl+C and terminal disconnection close only this client; closing all clients leaves the daemon running. Service exit/loss is honest and never starts a replacement.
|
|
10
10
|
|
|
11
|
-
`
|
|
11
|
+
`dashboard --global` opens the independent host-wide live table from any CWD and stays open at zero entries. Selecting an engine attaches without `cd`, starting a process or acquiring its lock; returning leaves the engine untouched. Foreground start and finite run can show the same controls but own execution lifetime: their termination uses graceful engine lifecycle, not unrelated process kills. Run stays finite.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Operational cockpit
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Use [shared status](status-view.md) and [panel layout](dashboard-layout.md): project/version/connection and four live states, current agent/task/phase, attention, queue, tools, results/activity and enabled synchronization. Resource waits are running states with a reason, not a stopped process. An enabled sync failure is distinct from active local work.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
[Detail panels](dashboard-details.md) show actual execution metadata, the ordered named-tool inventory, individual browser diagnostics and conditional synchronization details. Keep compact tool/resource summaries visible; management supports add/modify/reorder, primary enable/disable and secondary removal through the same shared operations as CLI. Saved changes commit immediately and new tools may be used by current work. Show shared in-use/last-enabled-type confirmations, not terminal-specific rules.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Chats awaiting a human answer have highest attention priority: actual author, affected work and direct thread entry. Unread/all-chats remain distinct. Assignment/discovery/repair are labelled automatic work unless an agent genuinely asks User. Idle/wait states explain reality; do not invent progress or inference.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Keep aligned bounded panels, separate messages/checks/errors and show actionable redacted causes with next actions. Important browser/tool failures remain visible with detail closed. Catalogs use featured/More; configured instances and actual execution remain inspectable regardless of featured status. URL/QR obey raw/no-QR/pairing rules.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
## Keyboard and shared actions
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Provide a discoverable legend and fully keyboard-operable main lifecycle panel. Retain C for new Chatter-first chat, A for the highest-priority existing waiting thread, and access to all chats. Enter chooses Chatter; alternatives open the full valid list. Existing threads retain authors. Rich-composer/picker keys are not captured by global shortcuts; Ctrl+C in chat closes that view/client, not the service.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Retain P for state-appropriate pause/resume and S for skipping an actual pacing/backoff wait without bypassing readiness. X requests graceful stop and a repeat is not force escalation. Expose restart, explicit whole-engine force stop, pending-intent cancellation/change and required confirmations through [shared lifecycle](service-lifecycle.md), including the meaning of `ptbk stop -F`. Leaving the viewer and stopping the engine are visibly different.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Provide labelled shortcuts to open/close execution, tools, individual-tool and enabled-sync details. Browser recheck/retry/restart targets the named owned instance through engine operations, not local kill commands. Synchronize now calls the one shared coordinator; it is absent while autosync is off. Both preserve underlying safety/revision rules and report pending/failed outcomes.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
O switches dashboard/plain presentation interactively, arrows/End scroll or follow activity, and resize preserves drafts/selection. A background tool/sync update does not steal focus or discard an edit. Equivalent browser/API controls need not copy terminal key choices.
|
|
32
32
|
|
|
33
33
|
## Raw output
|
|
34
34
|
|
|
35
|
-
Raw/noninteractive dashboard
|
|
36
|
-
|
|
37
|
-
Lifecycle commands report one operation outcome/snapshot without attaching this view. See [process modes](process-modes.md), [channels](channels.md) and [traces](traces.md).
|
|
35
|
+
Raw/noninteractive dashboard streams bounded plain state/events without colour, cursor control or hidden prompts. Keep tool/diagnostic information and enabled-sync outcomes, redacted addresses and attributed waiting-chat notices, without QR art. Status/show are one-shot alternatives. Presentation never resubmits work or changes authority. Lifecycle commands render once without attaching this viewer. See [process modes](process-modes.md), [channels](channels.md) and [traces](traces.md).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Managing project tools
|
|
2
|
+
|
|
3
|
+
[Main specification](../_main.md) · [Tools](tools.md) · [Runtime changes](tool-runtime.md) · [Shared logic and DRY](../coding-standards/shared-logic.md)
|
|
4
|
+
|
|
5
|
+
Initialization, CLI commands and dashboard management use one implementation of tool operations, types, validation, environment editing and persistence. Init exposes only the existing simple browser/harness setup and generates sensible instance names. Later management exposes the full registry without requiring reinitialization or engine restart.
|
|
6
|
+
|
|
7
|
+
## Command surface
|
|
8
|
+
|
|
9
|
+
Use `ptbk tool` as a project-scoped command family, with discoverable scoped help and remote-like named-item ergonomics:
|
|
10
|
+
|
|
11
|
+
| Command | Behavior |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `ptbk tool list` | Ordered inventory, names, types/variants, enabled/usability/in-use state; read-only. |
|
|
14
|
+
| `ptbk tool show <name>` | Non-secret configuration and actual diagnostics for one instance; read-only. |
|
|
15
|
+
| `ptbk tool add <type> --variant <variant> --name <name>` | Create a typed named instance, with applicable variant-specific options. |
|
|
16
|
+
| `ptbk tool modify <name>` | Update supplied fields, leaving unspecified fields intact; explicit rename preserves known references. |
|
|
17
|
+
| `ptbk tool enable <name>` | Persist `isEnabled: true`. |
|
|
18
|
+
| `ptbk tool disable <name>` | Persist `isEnabled: false`, retaining configuration and credentials. |
|
|
19
|
+
| `ptbk tool remove <name>` | Remove the configuration record, with conservative credential-retirement rules. `delete` is an equivalent explicit destructive label/alias. |
|
|
20
|
+
| `ptbk tool move <name> --before <other>` or `--after <other>` | Persist ordering without recreating credentials or changing identity. |
|
|
21
|
+
|
|
22
|
+
Examples:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
ptbk tool add BROWSER --variant CHROME --name work-browser --profile-source PROJECT --is-headless true
|
|
26
|
+
ptbk tool add BROWSER --variant CHROME --name personal-browser --profile-source USER_EXISTING --is-headless false
|
|
27
|
+
ptbk tool add HARNESS --variant OPENAI_CODEX --name company-api --authentication API_KEY --api-key-env COMPANY_OPENAI_API_KEY
|
|
28
|
+
ptbk tool modify work-browser --is-headless false
|
|
29
|
+
ptbk tool disable company-api
|
|
30
|
+
ptbk tool enable company-api
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`--profile-path` supplies a CUSTOM path. `--account-profile` selects an adapter-supported native context. `--api-key-env NAME` writes the canonical `${{ env.NAME }}` reference, not the key. Supplying a new key uses concealed input or explicit `--api-key-stdin` with the same safe `.env` editor; never accept a literal secret as an ordinary argv option. Enum flag input is tolerant but saved values are canonical. Do not silently ignore unsupported type/variant options.
|
|
34
|
+
|
|
35
|
+
## Saved operations and confirmations
|
|
36
|
+
|
|
37
|
+
Every successful state-changing management operation persists and commits its own non-secret changes immediately, including add, modify, reorder, enable, disable and remove. Read-only/no-op/cancelled actions create no commit. A commit failure is pending/failed persistence, not success. These explicit saved-management commands do not have a temporary-settings mode or an uncommitted fallback; diagnose `--no-commit` before writes. Init can batch the same domain operations into its existing setup transaction and follows that workflow's explicitly selected persistence policy.
|
|
38
|
+
|
|
39
|
+
Enable and disable are primary actions in all interfaces. Permanent removal is visibly secondary and destructive to configuration, not to profile contents, native account stores or environment history. Do not add routine confirmations to every safe change.
|
|
40
|
+
|
|
41
|
+
Disabling/removing the **last enabled instance of either type** requires a specific confirmation explaining that the engine can remain running but cannot effectively start ordinary new work until another browser/harness is enabled or added. Recompute counts when applying the operation. An interactive management view asks; a noninteractive CLI reports the warning and requires explicit `--yes` acceptance. This confirmation is separate from acknowledging in-use work. It must not technically stop or pause the service, and it must not be auto-undone by Fixer.
|
|
42
|
+
|
|
43
|
+
## Tool currently in use
|
|
44
|
+
|
|
45
|
+
If modify/disable/remove affects a tool held by active work, CLI rejects the operation without writes unless `--force` (alias `-F`) is supplied. It prints two concrete alternatives:
|
|
46
|
+
|
|
47
|
+
1. Repeat the **same tool command** with `--force`: commit the configuration change now, but allow the work already using the old tool/configuration to finish. This is not a process kill.
|
|
48
|
+
2. Run the separate **`ptbk stop --force`** (or `-F`) to stop the entire engine, then repeat the original tool command without `--force` after confirmed termination. Stop itself neither changes nor removes tools.
|
|
49
|
+
|
|
50
|
+
There is no `--force-stop` flag on tool commands. Dashboard confirmation offers the same meanings: save while current work finishes, or invoke the existing global service force-stop control. After stopping, apply/reconfirm the intended configuration operation separately and recheck that it is no longer in use. Never disguise stopping the whole service as deleting one tool. If both last-of-type and in-use protections apply, both acknowledgements are required; `--yes` does not imply `--force`, and `--force` does not waive the last-of-type warning.
|
|
51
|
+
|
|
52
|
+
## Concurrency and dashboard parity
|
|
53
|
+
|
|
54
|
+
A second terminal may add a tool while an engine/task is running. Commit just that operation and promptly notify/refresh the engine; the current task can use the new resource without waiting for its own completion. Preserve the active task's changes and unrelated staged content. Task completion must build on the intervening tool commit and must not restore an old configuration snapshot. See [runtime consistency](tool-runtime.md) and [Git persistence](git-persistence.md).
|
|
55
|
+
|
|
56
|
+
The dashboard shows a compact tools overview and a keyboard-accessible detail/management view using its existing drill-down pattern. It supports the same operations, fields, diagnostics, confirmations and outcomes as CLI, not a separate implementation. API/transport adapters reuse those operations and return redacted state. See [dashboard details](dashboard-details.md).
|
|
57
|
+
|
|
58
|
+
## Acceptance outcomes
|
|
59
|
+
|
|
60
|
+
Manage a stopped and running project through CLI and dashboard and verify equivalent scoped commits. Add a browser from a second terminal during a task and use it before task completion. Exercise both in-use alternatives, their exact commands, no mutation on refusal, and separate last-of-type confirmation. Disable/re-enable preserves credentials; removing a shared key's consumer leaves the key active. No-op operations do not commit; failed commits never claim success or sweep task changes into tool history.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Live tool availability and active-work consistency
|
|
2
|
+
|
|
3
|
+
[Main specification](../_main.md) · [Tools](tools.md) · [Tool management](tool-management.md) · [Service lifecycle](service-lifecycle.md)
|
|
4
|
+
|
|
5
|
+
## Refresh without restart
|
|
6
|
+
|
|
7
|
+
Re-read applicable `ptbk.json` and `.env` changes and re-evaluate tool readiness **before every task**, not only at startup. Also detect and apply changes promptly while work is active or the engine is idle/waiting, including changes made manually, through another terminal, dashboard, or Git synchronization. A waiting engine cannot require a task to start before noticing the tool needed to start that task.
|
|
8
|
+
|
|
9
|
+
Share configuration version checks, tolerant canonicalization and validation. Expose the actual effective revision and diagnostics rather than a stale startup list. A transient/invalid external edit is reported and repaired; it must not silently change account identity, reuse a known revoked credential or crash the supervisor. Retain safe known state only where doing so does not contradict an explicit disable or removal.
|
|
10
|
+
|
|
11
|
+
A newly added or enabled usable tool becomes available to **the currently running task** at its next applicable tool selection. Do not freeze the whole tool registry for the duration of a task. For example, a user adds the browser with the intended website login while an agent is working; the agent can then use it without a task restart or replay. An already dispatched external call need not be magically rewritten, but subsequent selections see the new inventory.
|
|
12
|
+
|
|
13
|
+
## Retained active uses, not frozen registries
|
|
14
|
+
|
|
15
|
+
Once work has acquired a tool, a confirmed modification/disable/removal may preserve that use's original configuration, credential context and safe owned resources until that work releases them. This is the meaning of tool-command `--force`, not termination. The changed saved configuration is committed immediately and governs new selections; the retained old instance is visibly draining/current-work-only. Other newly added tools remain usable during that same task.
|
|
16
|
+
|
|
17
|
+
Do not resurrect a removed tool into the saved configuration when the task completes. An externally revoked key, killed browser or removed authentication store may make continuation impossible; record the real failure and use normal recovery rather than pretending the snapshot guarantees access. Retained secret material is runtime-only and redacted, not copied into task Books, configuration, traces or Git.
|
|
18
|
+
|
|
19
|
+
Manual/external file edits cannot display a pre-edit CLI confirmation. Diagnose an affected in-use tool, honor the new configuration for future acquisition, and make the retained current use visible with the ordinary service force-stop action available. Do not invent implicit panic behavior. `ptbk stop --force` stops the whole engine and is the explicit emergency path; removing/disabling a tool alone is not proof an in-flight external effect was cancelled.
|
|
20
|
+
|
|
21
|
+
## Running with no usable resources
|
|
22
|
+
|
|
23
|
+
Before each new task, require the baseline enabled/usable browser and harness and the task's specific routing, model, profile and authorization requirements. Failed readiness prevents that new claim, not the engine's existence. An empty or unusable inventory is a normal observable **waiting for tools** reason alongside an empty queue or provider wait; it is not a fifth lifecycle state, technical pause or a failed start of an otherwise initialized service.
|
|
24
|
+
|
|
25
|
+
Keep dashboard/API controls, configuration refresh, bounded readiness rechecks and authorized maintenance alive. Show which type/instance is missing, disabled, unavailable, signed out or quota-limited, and the concrete enable/add/repair action. Do not spin, make paid probes while idle or automatically re-enable deliberately disabled tools. Start may show this warning but still report the running service truthfully. Once usable resources appear, reevaluate and continue without a new Start/Run action, while respecting explicit pause/stop.
|
|
26
|
+
|
|
27
|
+
## Operation and Git ownership
|
|
28
|
+
|
|
29
|
+
Coordinate all configuration mutations and commits independently from the single executing task. A supported history is: task begins; another client adds a tool and its own commit; the task uses that tool; the task's result commit follows. The tool commit contains no unfinished task changes and the result does not remove or duplicate the earlier commit. Preserve unrelated index/working-tree edits even when configuration and task work touch the same file; use scoped ownership/reconciliation rather than blanket staging or old-snapshot restoration.
|
|
30
|
+
|
|
31
|
+
Apply [same-variant fallback](tools.md) using the latest eligible inventory, with bounded health rechecks and actual instance/account attribution. Explicit task constraints and already completed external effects remain authoritative. Fixer uses these same resources and constraints; lack of a harness cannot be solved by pretending Fixer ran without one.
|
|
32
|
+
|
|
33
|
+
## Acceptance outcomes
|
|
34
|
+
|
|
35
|
+
Start with zero enabled browsers or harnesses: the service stays running and reports its resource wait. Add/enable from another terminal or edit the files while idle; work resumes without restart. Add a usable resource during a task and use it at its next selection. Modify/disable/remove an in-use tool with the required acknowledgements: keep the retained use distinct from the new saved state and never expose it to an unrelated new task. Test secret rotation, external revocation, two simultaneous writers and a task touching configuration, with isolated commits and truthful recovery.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# First configuration migration: unified tools
|
|
2
|
+
|
|
3
|
+
[Configuration migrations](configuration-migrations.md) · [Tools](tools.md) · [Naming](../coding-standards/naming.md)
|
|
4
|
+
|
|
5
|
+
This is the first concrete migration in the versioned configuration chain. Register it at the exact first engine release shipping this format; the coordinator, not this step, writes the final `promptbookVersion` and commits the complete pass. Unversioned input uses the fixed baseline defined by the migration mechanism, without structural age detection.
|
|
6
|
+
|
|
7
|
+
## Preserve existing browser and harness choices
|
|
8
|
+
|
|
9
|
+
Replace the separate top-level `harnesses` configuration and singleton `browser` configuration with the ordered `tools` array. Produce one named HARNESS instance for each previously configured integration, preserving its selection/enabled state, model and thinking preferences, known models, account setup and non-secret options. Preserve the old order deterministically. Retain explicit disabled entries as `isEnabled: false`, not as active tools. Do not invent installed/authorized harnesses when none were selected.
|
|
10
|
+
|
|
11
|
+
Convert the existing browser, including its effective saved/default choice, into one named BROWSER tool. Keep the selected Chrome-compatible implementation/executable and profile; never move, copy or reset profile data or log the user out. Convert legacy `browser.profile` values `global`, `isolated` and `user` to profile sources `MANAGED_GLOBAL`, `PROJECT` and `USER_EXISTING`; an explicit path becomes `CUSTOM` with its path retained. Convert `browser.mode: "headless"` to `isHeadless: true` and `"headful"` to false. Preserve the existing default when the old value was omitted.
|
|
12
|
+
|
|
13
|
+
Give generated instances stable readable kebab-case names, for example `project-browser` and `openai-codex`, with deterministic suffixes only when generating a genuinely new name requires disambiguation. Preserve already explicit user identities; do not silently rename colliding existing tools. Normalize variants to their canonical enums, such as `openai-codex` to `OPENAI_CODEX`, `claude-code` to `CLAUDE_CODE`, `github-copilot` to `GITHUB_COPILOT`, `cline` to `CLINE`, `opencode` to `OPENCODE`, `gemini` to `GEMINI` and `qwen-code` to `QWEN_CODE`.
|
|
14
|
+
|
|
15
|
+
Convert a legacy `apiKeyEnv: "VARIABLE"` into `apiKey: "${{ env.VARIABLE }}"`, never its resolved value. Preserve explicitly recorded API/native authentication intent; merely finding a key in the environment does not authorize a new paid route. When no durable API-mode authorization exists, keep native authentication and retain the reference as inactive metadata, not an automatic fallback. New explicitly configured API fallback instances are a later authorized tool-management operation. Do not change the user's native account or overwrite its authentication store during migration.
|
|
16
|
+
|
|
17
|
+
Known routing references retain their meaning after the move: canonical variant requirements remain variant requirements, and any instance references target the corresponding saved name. Do not broaden a restricted task to a different account/provider. Existing legitimate `tools` records are not duplicated or overwritten on recovery. Conflicting legacy/new records are a real repair problem, not a reason to guess or discard one.
|
|
18
|
+
|
|
19
|
+
## Canonical configuration spelling
|
|
20
|
+
|
|
21
|
+
Apply the [naming contract](../coding-standards/naming.md) to known migrated fields. In addition to tool `enabled` becoming `isEnabled`, use these explicit legacy-to-canonical boolean mappings:
|
|
22
|
+
|
|
23
|
+
| Legacy path | Canonical path |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `execution.commit` | `execution.isCommitEnabled` |
|
|
26
|
+
| `execution.isolate` | `execution.isIsolated` |
|
|
27
|
+
| `execution.normalizeLineEndings` | `execution.isLineEndingNormalizationEnabled` |
|
|
28
|
+
| `execution.allowCredits` | `execution.isCreditFallbackAllowed` |
|
|
29
|
+
| `execution.questions` | `execution.isQuestionsEnabled` |
|
|
30
|
+
| `execution.preserveLogs` | `execution.isLogPreservationEnabled` |
|
|
31
|
+
| `execution.autoMigrate` | `execution.isAutoMigrateEnabled` |
|
|
32
|
+
| `traces.commit` | `traces.isCommitted` |
|
|
33
|
+
| `traces.ignoreVideos` | `traces.isVideoIgnored` |
|
|
34
|
+
| `traces.recordVideo` | `traces.isVideoRecordingEnabled` |
|
|
35
|
+
| `server.enabled` | `server.isEnabled` |
|
|
36
|
+
| `server.tunnel.enabled` | `server.tunnel.isEnabled` |
|
|
37
|
+
| `service.persist` | `service.isPersistent` |
|
|
38
|
+
| `service.qr` | `service.isQrShown` |
|
|
39
|
+
| `discovery.enabled` | `discovery.isEnabled` |
|
|
40
|
+
| `learning.enabled` | `learning.isEnabled` |
|
|
41
|
+
|
|
42
|
+
Preserve the value, including false, for each such rename. Canonicalize known Promptbook-owned enum values: check-before modes to `NO`/`YES_AND_FAIL`/`YES_AND_FIX`, dirty-work policies to `FAIL`/`IGNORE`/`CONTINUE`, harness-update policies to `AUTO`/`OFF`, tunnel providers to `CLOUDFLARE_QUICK`/`CLOUDFLARE_NAMED`, and engine-defined thinking selectors to `LOW`/`MEDIUM`/`HIGH`/`XHIGH`/`MAX`. Provider-native model/effort identifiers and external strings remain provider data, not invented enums.
|
|
43
|
+
|
|
44
|
+
Introduce root-level **`isAutoSync: false`** for migrated projects lacking that explicit new choice. Do not enable synchronization just because `origin` exists or a legacy auto-pull/auto-push option was present. Retire the superseded persisted `execution.autoPull` and `execution.autoPush` fields and record that change in the migration explanation; do not retain two competing sources of synchronization policy. An already explicit canonical `isAutoSync` value survives idempotent recovery.
|
|
45
|
+
|
|
46
|
+
Move/rename only fields understood by this migration. Preserve all unrelated configuration and meaningful extension data; conflicting old/new values go through automatic repair. Remove superseded browser/harness fields only after their information has been represented safely. Existing real checks are untouched; introducing the init placeholder is not permission to replace them. No dependency installation, provider login, remote publication or task execution belongs to this migration.
|
|
47
|
+
|
|
48
|
+
## Acceptance outcomes
|
|
49
|
+
|
|
50
|
+
Migrate the existing unversioned singleton-browser/per-harness-map format, including multiple integrations, disabled entries, custom executables/profiles, native login and environment references. Verify unchanged profile data, no secret values, preserved false values, canonical names/enums and autosync off. Run through a later engine with several additional steps and observe one coordinator commit. Retry after interruption without duplicate tools. A conflicting preexisting name or legacy/new setting is preserved for repair, not silently overwritten. Unknown unrelated fields and real project checks survive.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Unified project tools
|
|
2
|
+
|
|
3
|
+
[Main specification](../_main.md) · [Configuration](configuration.md) · [Tool management](tool-management.md) · [Live tool use](tool-runtime.md)
|
|
4
|
+
|
|
5
|
+
`ptbk.json.tools` is an ordered JSON array of pluggable project resources. Its initial types are **`BROWSER`** and **`HARNESS`**. They share the same external configuration/management model; their internal adapters may differ. There is no longer a singleton browser setting separate from the harness inventory.
|
|
6
|
+
|
|
7
|
+
## Common fields and identity
|
|
8
|
+
|
|
9
|
+
Every tool has required `type`, `variant` and `name`, optional free-text `description`, and `isEnabled` (default true). `type` identifies the category, `variant` the fixed implementation, and `name` an arbitrary user-editable identifier unique across the entire project's tools array. Names are kebab-case; type/variant and other fixed enum values are SCREAMING_SNAKE_CASE. Properties are camelCase and boolean properties begin with `is`; see [naming and tolerant normalization](../coding-standards/naming.md).
|
|
10
|
+
|
|
11
|
+
`isEnabled: false` retains configuration and credentials but removes that instance from new selections. Enable/disable are the normal reversible actions; removal permanently removes the configuration record, not the browser profile or native account data. Only actual use retained under [in-use rules](tool-runtime.md) may continue after disabling/removal. Supported, configured, enabled, installed, usable and currently used are different states.
|
|
12
|
+
|
|
13
|
+
Each type/variant has its own typed settings and validation under the [shared domain contract](../coding-standards/shared-logic.md). Do not accept arbitrary incompatible fields as though they worked. Unknown variants or ambiguous names use automatic repair, not silent selection of a different tool.
|
|
14
|
+
|
|
15
|
+
## Browser records
|
|
16
|
+
|
|
17
|
+
A browser record includes `profile` and `isHeadless`, plus the supported adapter's non-secret options such as `executable`. `profile.source` is one of `MANAGED_GLOBAL`, `PROJECT`, `USER_EXISTING` or `CUSTOM`; `profile.path` supplies a path where appropriate, required for CUSTOM. Resolve the managed-global location per OS user, and project paths relative to the project. Browser variants identify supported adapters, for example CHROME, CHROMIUM or EDGE where available; never advertise an unsupported adapter as usable.
|
|
18
|
+
|
|
19
|
+
A normal init creates one browser using the existing simple profile/mode choices. Advanced users may add more: a dedicated agent profile plus an explicitly authorized personal profile, separate Facebook/LinkedIn profiles, or several accounts on one site. All remain independently named and diagnosable. Browser website sessions are independent from harness authentication. Ownership, persistent profile safety and diagnostics are defined in [browser behavior](browser.md).
|
|
20
|
+
|
|
21
|
+
## Harness records
|
|
22
|
+
|
|
23
|
+
Initial canonical variants cover the existing integrations: `OPENAI_CODEX`, `CLAUDE_CODE`, `GITHUB_COPILOT`, `CLINE`, `OPENCODE`, `GEMINI` and `QWEN_CODE`. Variant-specific model, thinking and setup fields remain supported.
|
|
24
|
+
|
|
25
|
+
`authentication` distinguishes `NATIVE` (reuse the chosen native/global installation's account/subscription context) from `API_KEY`. Native instances may specify a non-secret `accountProfile` reference to their distinct supported login context. API instances require `apiKey`, containing only an [environment reference](environment.md). A reference retained on a NATIVE record is inactive metadata; its presence does not trigger API billing. Global executable installation and authentication mode are separate concepts: using an API key does not require a project-local duplicate of the CLI.
|
|
26
|
+
|
|
27
|
+
Multiple native subscriptions require genuinely separate adapter-supported authentication contexts. Two records pointing to the same account store are not two independent subscriptions. Do not change a shared global login, overwrite another account's credentials or claim isolation that the adapter cannot provide. Unsupported multi-account isolation is an actionable capability limitation. API credentials are scoped to the selected invocation and must not leak between instances.
|
|
28
|
+
|
|
29
|
+
An illustrative configuration fragment (other project settings omitted):
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"isAutoSync": false,
|
|
34
|
+
"tools": [
|
|
35
|
+
{
|
|
36
|
+
"type": "BROWSER",
|
|
37
|
+
"variant": "CHROME",
|
|
38
|
+
"name": "agent-browser",
|
|
39
|
+
"description": "Dedicated browser for project work",
|
|
40
|
+
"isEnabled": true,
|
|
41
|
+
"profile": { "source": "MANAGED_GLOBAL" },
|
|
42
|
+
"isHeadless": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "HARNESS",
|
|
46
|
+
"variant": "OPENAI_CODEX",
|
|
47
|
+
"name": "codex-subscription",
|
|
48
|
+
"isEnabled": true,
|
|
49
|
+
"authentication": "NATIVE"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "HARNESS",
|
|
53
|
+
"variant": "OPENAI_CODEX",
|
|
54
|
+
"name": "codex-company-api",
|
|
55
|
+
"isEnabled": true,
|
|
56
|
+
"authentication": "API_KEY",
|
|
57
|
+
"apiKey": "${{ env.COMPANY_OPENAI_API_KEY }}"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
An actual initialized configuration also contains its `promptbookVersion`; this fragment is not a versionless initialization template. Advanced account pooling, additional browsers and fallback chains are configured after init rather than added as mandatory wizard questions.
|
|
64
|
+
|
|
65
|
+
## Selection and availability
|
|
66
|
+
|
|
67
|
+
Agents can use different suitable variants during authorized work, for example combining Claude Code and Codex. Global array position does not require one variant to fail before another variant can be chosen. Within the **same harness variant**, eligible enabled instances form a priority/fallback chain in array order: use the first usable instance, moving to the next only when an earlier one cannot serve the request, such as exhausted quota or a technical failure. Do not load-balance equally usable same-variant accounts arbitrarily.
|
|
68
|
+
|
|
69
|
+
This supports two subscriptions, subscription then paid API, and multiple API keys ordered company/second company/personal. Explicitly enabling/configuring a paid fallback supplies that route's authorization, subject to task and project spending constraints; merely discovering a key does not. Never override an explicit provider/model/account requirement. After an earlier instance recovers, prefer it on a later selection without interrupting work already using a fallback. Avoid repeated failing probes or hidden paid test calls.
|
|
70
|
+
|
|
71
|
+
For browsers, use task intent, names/descriptions, profile permissions and known sessions to choose the appropriate instance. Try an explicitly configured alternative when the first lacks the needed login/capability; do not post or pay from a different account merely because it is logged in. Keep actual account identity and effects attributable. Browser selection is not the same rule as same-variant harness quota pooling.
|
|
72
|
+
|
|
73
|
+
Before every task and whenever availability changes, verify at least one enabled usable browser and harness, plus the task's actual constraints. Missing resources mean the engine is **running but waiting for tools**, not stopped or technically paused. Continue refreshing while idle and resume eligible work when tools become available. See [live runtime behavior](tool-runtime.md).
|
|
@@ -2,22 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
[Main specification](../_main.md) · [Project configuration](configuration.md) · [Task traces](traces.md)
|
|
4
4
|
|
|
5
|
-
Initialization collects three explicit project choices in its dedicated [Traces screen](initialization-ui.md) and saves them in `ptbk.json`.
|
|
5
|
+
Initialization collects three explicit project choices in its dedicated [Traces screen](initialization-ui.md) and saves them in `ptbk.json`. They control evidence, not whether tasks execute or whether ordinary result commits are created. Legacy boolean names are converted by the [first configuration migration](tools-migration.md).
|
|
6
6
|
|
|
7
7
|
| Setting | Meaning | Initial default |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| `traces.
|
|
10
|
-
| `traces.
|
|
11
|
-
| `traces.
|
|
9
|
+
| `traces.isCommitted` | Include task traces in Git result commits rather than ignore the whole `traces/` tree. | `false` |
|
|
10
|
+
| `traces.isVideoIgnored` | Exclude trace videos from Git even when other traces are included. | `true` |
|
|
11
|
+
| `traces.isVideoRecordingEnabled` | Record attributable activity of browser tools used by tasks. | `true` |
|
|
12
12
|
|
|
13
|
-
Explain
|
|
13
|
+
Explain storage/privacy implications and preserve explicit values during resume/reinit. Noninteractive equivalents use the same precedence, false handling and temporary overrides. Saving these choices is a scoped authoring operation, not a reason to rerun tasks.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
When `traces.isCommitted` is false, the entire root-level `traces/` tree, including video, is ignored regardless of the video preference. When true, include non-video evidence and include video only when `traces.isVideoIgnored` is false. Show effective parent/video exclusion and retain the stored preference when its parent choice changes.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Recording is independent of Git inclusion: local videos may be excluded from commits, and text traces continue regardless. `traces.isVideoRecordingEnabled: false` prevents new recording, not deletion of old footage or a change to its inclusion policy. A task not using a browser needs no video. With multiple browsers, attribute footage to the actually used tool/attempt and exclude unrelated sessions.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Apply matching root ignore rules and scoped staging, preserving unrelated `.gitignore` entries. Never force-add ignored evidence, blanket-ignore unrelated project videos, or classify intentionally ignored traces as dirty-state blockers. Ignore changes do not erase tracked files/history; any needed untracking is explicitly approved and index-only, preserving local evidence.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Keep runtime state and any **isolated per-project** browser profile under `.ptbk/` ignored independently of all three choices. The default **Promptbook-managed global** browser profile lives in the OS user's app-data location outside the project and is likewise never Git-committed; user/custom profiles are external. Trace inclusion does not authorize recording secrets, committing sessions or bypassing [Git ownership](git-persistence.md). Explicit `--no-commit` still creates no commits, even with `traces.commit` enabled; the policy determines eligible evidence when committing is enabled.
|
|
21
|
+
Keep `.ptbk/`, every isolated browser profile, `.env` and other secret stores ignored independently. Managed-global/personal/custom profiles remain outside versioned configuration even when shared across projects. Trace inclusion grants no permission to record secrets or commit sessions. An explicit ordinary `--no-commit` task workflow still creates no result commits even with `traces.isCommitted` true; these settings only determine eligible evidence when committing is enabled.
|