ptbk 0.119.0-5 → 0.119.0-56
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/LICENSE.md +11 -0
- package/README.md +98 -26
- package/dist/book/commitments.d.ts +92 -0
- package/dist/book/commitments.js +147 -0
- package/dist/book/commitments.js.map +1 -0
- package/dist/book/convert.d.ts +36 -0
- package/dist/book/convert.js +156 -0
- package/dist/book/convert.js.map +1 -0
- package/dist/book/edit.d.ts +22 -0
- package/dist/book/edit.js +89 -0
- package/dist/book/edit.js.map +1 -0
- package/dist/book/highlight.d.ts +36 -0
- package/dist/book/highlight.js +76 -0
- package/dist/book/highlight.js.map +1 -0
- package/dist/book/model.d.ts +192 -0
- package/dist/book/model.js +339 -0
- package/dist/book/model.js.map +1 -0
- package/dist/book/parse.d.ts +121 -0
- package/dist/book/parse.js +229 -0
- package/dist/book/parse.js.map +1 -0
- package/dist/book/references.d.ts +111 -0
- package/dist/book/references.js +238 -0
- package/dist/book/references.js.map +1 -0
- package/dist/book/write.d.ts +42 -0
- package/dist/book/write.js +74 -0
- package/dist/book/write.js.map +1 -0
- package/dist/browser/agent-tools.d.ts +54 -0
- package/dist/browser/agent-tools.js +288 -0
- package/dist/browser/agent-tools.js.map +1 -0
- package/dist/browser/browser.d.ts +410 -0
- package/dist/browser/browser.js +1475 -0
- package/dist/browser/browser.js.map +1 -0
- package/dist/browser/fleet.d.ts +102 -0
- package/dist/browser/fleet.js +239 -0
- package/dist/browser/fleet.js.map +1 -0
- package/dist/browser/input.d.ts +45 -0
- package/dist/browser/input.js +104 -0
- package/dist/browser/input.js.map +1 -0
- package/dist/browser/page-scripts.d.ts +193 -0
- package/dist/browser/page-scripts.js +536 -0
- package/dist/browser/page-scripts.js.map +1 -0
- package/dist/browser/pool.d.ts +108 -0
- package/dist/browser/pool.js +295 -0
- package/dist/browser/pool.js.map +1 -0
- package/dist/browser/recording.d.ts +140 -0
- package/dist/browser/recording.js +371 -0
- package/dist/browser/recording.js.map +1 -0
- package/dist/browser/temporary-login.d.ts +12 -0
- package/dist/browser/temporary-login.js +36 -0
- package/dist/browser/temporary-login.js.map +1 -0
- package/dist/chats/attention.d.ts +71 -0
- package/dist/chats/attention.js +111 -0
- package/dist/chats/attention.js.map +1 -0
- package/dist/chats/batcher.d.ts +91 -0
- package/dist/chats/batcher.js +178 -0
- package/dist/chats/batcher.js.map +1 -0
- package/dist/chats/chat-book.d.ts +209 -0
- package/dist/chats/chat-book.js +335 -0
- package/dist/chats/chat-book.js.map +1 -0
- package/dist/chats/chat-tasks.d.ts +95 -0
- package/dist/chats/chat-tasks.js +66 -0
- package/dist/chats/chat-tasks.js.map +1 -0
- package/dist/chats/conversation.d.ts +148 -0
- package/dist/chats/conversation.js +795 -0
- package/dist/chats/conversation.js.map +1 -0
- package/dist/chats/local.d.ts +54 -0
- package/dist/chats/local.js +250 -0
- package/dist/chats/local.js.map +1 -0
- package/dist/chats/migration.d.ts +12 -0
- package/dist/chats/migration.js +61 -0
- package/dist/chats/migration.js.map +1 -0
- package/dist/chats/service.d.ts +131 -0
- package/dist/chats/service.js +219 -0
- package/dist/chats/service.js.map +1 -0
- package/dist/chats/store.d.ts +249 -0
- package/dist/chats/store.js +405 -0
- package/dist/chats/store.js.map +1 -0
- package/dist/chats/task-chats.d.ts +55 -0
- package/dist/chats/task-chats.js +113 -0
- package/dist/chats/task-chats.js.map +1 -0
- package/dist/cli/action-picker.d.ts +70 -0
- package/dist/cli/action-picker.js +133 -0
- package/dist/cli/action-picker.js.map +1 -0
- package/dist/cli/chats.d.ts +45 -0
- package/dist/cli/chats.js +109 -0
- package/dist/cli/chats.js.map +1 -0
- package/dist/cli/commands/about.d.ts +9 -0
- package/dist/cli/commands/about.js +47 -0
- package/dist/cli/commands/about.js.map +1 -0
- package/dist/cli/commands/add.d.ts +7 -0
- package/dist/cli/commands/add.js +216 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/answer.d.ts +8 -0
- package/dist/cli/commands/answer.js +75 -0
- package/dist/cli/commands/answer.js.map +1 -0
- package/dist/cli/commands/ask.d.ts +7 -0
- package/dist/cli/commands/ask.js +37 -0
- package/dist/cli/commands/ask.js.map +1 -0
- package/dist/cli/commands/boilerplates.d.ts +7 -0
- package/dist/cli/commands/boilerplates.js +72 -0
- package/dist/cli/commands/boilerplates.js.map +1 -0
- package/dist/cli/commands/chat.d.ts +9 -0
- package/dist/cli/commands/chat.js +92 -0
- package/dist/cli/commands/chat.js.map +1 -0
- package/dist/cli/commands/dashboard.d.ts +9 -0
- package/dist/cli/commands/dashboard.js +68 -0
- package/dist/cli/commands/dashboard.js.map +1 -0
- package/dist/cli/commands/find.d.ts +19 -0
- package/dist/cli/commands/find.js +120 -0
- package/dist/cli/commands/find.js.map +1 -0
- package/dist/cli/commands/fix.d.ts +7 -0
- package/dist/cli/commands/fix.js +88 -0
- package/dist/cli/commands/fix.js.map +1 -0
- package/dist/cli/commands/init.d.ts +63 -0
- package/dist/cli/commands/init.js +1776 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/lint.d.ts +7 -0
- package/dist/cli/commands/lint.js +71 -0
- package/dist/cli/commands/lint.js.map +1 -0
- package/dist/cli/commands/list.d.ts +8 -0
- package/dist/cli/commands/list.js +207 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/migrate.d.ts +8 -0
- package/dist/cli/commands/migrate.js +211 -0
- package/dist/cli/commands/migrate.js.map +1 -0
- package/dist/cli/commands/panic.d.ts +12 -0
- package/dist/cli/commands/panic.js +104 -0
- package/dist/cli/commands/panic.js.map +1 -0
- package/dist/cli/commands/pause.d.ts +8 -0
- package/dist/cli/commands/pause.js +40 -0
- package/dist/cli/commands/pause.js.map +1 -0
- package/dist/cli/commands/ping.d.ts +7 -0
- package/dist/cli/commands/ping.js +58 -0
- package/dist/cli/commands/ping.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +7 -0
- package/dist/cli/commands/plan.js +254 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/recover.d.ts +7 -0
- package/dist/cli/commands/recover.js +91 -0
- package/dist/cli/commands/recover.js.map +1 -0
- package/dist/cli/commands/restart.d.ts +10 -0
- package/dist/cli/commands/restart.js +93 -0
- package/dist/cli/commands/restart.js.map +1 -0
- package/dist/cli/commands/resume.d.ts +8 -0
- package/dist/cli/commands/resume.js +26 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/start.d.ts +8 -0
- package/dist/cli/commands/start.js +213 -0
- package/dist/cli/commands/start.js.map +1 -0
- package/dist/cli/commands/status.d.ts +8 -0
- package/dist/cli/commands/status.js +36 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/stop.d.ts +10 -0
- package/dist/cli/commands/stop.js +55 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/commands/tool.d.ts +19 -0
- package/dist/cli/commands/tool.js +377 -0
- package/dist/cli/commands/tool.js.map +1 -0
- package/dist/cli/commands/verify.d.ts +7 -0
- package/dist/cli/commands/verify.js +109 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/cli/common.d.ts +65 -0
- package/dist/cli/common.js +161 -0
- package/dist/cli/common.js.map +1 -0
- package/dist/cli/compatibility.d.ts +14 -0
- package/dist/cli/compatibility.js +71 -0
- package/dist/cli/compatibility.js.map +1 -0
- package/dist/cli/context.d.ts +55 -0
- package/dist/cli/context.js +42 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/dashboard-handoff.d.ts +20 -0
- package/dist/cli/dashboard-handoff.js +33 -0
- package/dist/cli/dashboard-handoff.js.map +1 -0
- package/dist/cli/engine-delegation.d.ts +14 -0
- package/dist/cli/engine-delegation.js +46 -0
- package/dist/cli/engine-delegation.js.map +1 -0
- package/dist/cli/help.d.ts +20 -0
- package/dist/cli/help.js +161 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/lifecycle.d.ts +40 -0
- package/dist/cli/lifecycle.js +71 -0
- package/dist/cli/lifecycle.js.map +1 -0
- package/dist/cli/parser.d.ts +56 -0
- package/dist/cli/parser.js +292 -0
- package/dist/cli/parser.js.map +1 -0
- package/dist/cli/registry.d.ts +7 -0
- package/dist/cli/registry.js +736 -0
- package/dist/cli/registry.js.map +1 -0
- package/dist/cli/service-view.d.ts +37 -0
- package/dist/cli/service-view.js +106 -0
- package/dist/cli/service-view.js.map +1 -0
- package/dist/cli/sources.d.ts +15 -0
- package/dist/cli/sources.js +46 -0
- package/dist/cli/sources.js.map +1 -0
- package/dist/cli/spec.d.ts +165 -0
- package/dist/cli/spec.js +128 -0
- package/dist/cli/spec.js.map +1 -0
- package/dist/cli.d.ts +8 -4
- package/dist/cli.js +52 -9
- package/dist/cli.js.map +1 -1
- package/dist/common/app-data.d.ts +9 -0
- package/dist/common/app-data.js +20 -0
- package/dist/common/app-data.js.map +1 -0
- package/dist/common/branding.d.ts +27 -0
- package/dist/common/branding.js +33 -0
- package/dist/common/branding.js.map +1 -0
- package/dist/common/duration.d.ts +32 -0
- package/dist/common/duration.js +153 -0
- package/dist/common/duration.js.map +1 -0
- package/dist/common/errors.d.ts +81 -0
- package/dist/common/errors.js +72 -0
- package/dist/common/errors.js.map +1 -0
- package/dist/common/fs.d.ts +108 -0
- package/dist/common/fs.js +259 -0
- package/dist/common/fs.js.map +1 -0
- package/dist/common/ids.d.ts +24 -0
- package/dist/common/ids.js +49 -0
- package/dist/common/ids.js.map +1 -0
- package/dist/common/ipc.d.ts +48 -0
- package/dist/common/ipc.js +156 -0
- package/dist/common/ipc.js.map +1 -0
- package/dist/common/mutex.d.ts +12 -0
- package/dist/common/mutex.js +26 -0
- package/dist/common/mutex.js.map +1 -0
- 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/common/process.d.ts +161 -0
- package/dist/common/process.js +475 -0
- package/dist/common/process.js.map +1 -0
- package/dist/common/redact.d.ts +24 -0
- package/dist/common/redact.js +70 -0
- package/dist/common/redact.js.map +1 -0
- package/dist/common/semver.d.ts +18 -0
- package/dist/common/semver.js +80 -0
- package/dist/common/semver.js.map +1 -0
- package/dist/common/time.d.ts +65 -0
- package/dist/common/time.js +163 -0
- package/dist/common/time.js.map +1 -0
- package/dist/common/user-home.d.ts +52 -0
- package/dist/common/user-home.js +122 -0
- package/dist/common/user-home.js.map +1 -0
- package/dist/common/version.d.ts +52 -0
- package/dist/common/version.js +76 -0
- package/dist/common/version.js.map +1 -0
- package/dist/engine/action-impact.d.ts +183 -0
- package/dist/engine/action-impact.js +291 -0
- package/dist/engine/action-impact.js.map +1 -0
- package/dist/engine/action-log.d.ts +372 -0
- package/dist/engine/action-log.js +926 -0
- package/dist/engine/action-log.js.map +1 -0
- package/dist/engine/agenda.d.ts +1229 -0
- package/dist/engine/agenda.js +5175 -0
- package/dist/engine/agenda.js.map +1 -0
- package/dist/engine/attention.d.ts +9 -0
- package/dist/engine/attention.js +91 -0
- package/dist/engine/attention.js.map +1 -0
- package/dist/engine/bridge.d.ts +57 -0
- package/dist/engine/bridge.js +63 -0
- package/dist/engine/bridge.js.map +1 -0
- package/dist/engine/concurrency.d.ts +100 -0
- package/dist/engine/concurrency.js +197 -0
- package/dist/engine/concurrency.js.map +1 -0
- package/dist/engine/effects.d.ts +80 -0
- package/dist/engine/effects.js +147 -0
- package/dist/engine/effects.js.map +1 -0
- package/dist/engine/engine-update.d.ts +281 -0
- package/dist/engine/engine-update.js +667 -0
- package/dist/engine/engine-update.js.map +1 -0
- package/dist/engine/executor.d.ts +310 -0
- package/dist/engine/executor.js +957 -0
- package/dist/engine/executor.js.map +1 -0
- package/dist/engine/generated.d.ts +262 -0
- package/dist/engine/generated.js +412 -0
- package/dist/engine/generated.js.map +1 -0
- package/dist/engine/harnesses.d.ts +137 -0
- package/dist/engine/harnesses.js +343 -0
- package/dist/engine/harnesses.js.map +1 -0
- package/dist/engine/health.d.ts +228 -0
- package/dist/engine/health.js +672 -0
- package/dist/engine/health.js.map +1 -0
- package/dist/engine/isolation.d.ts +27 -0
- package/dist/engine/isolation.js +44 -0
- package/dist/engine/isolation.js.map +1 -0
- package/dist/engine/knowledge.d.ts +107 -0
- package/dist/engine/knowledge.js +228 -0
- package/dist/engine/knowledge.js.map +1 -0
- package/dist/engine/mcp-server.js +84 -0
- package/dist/engine/mcp-server.js.map +1 -0
- package/dist/engine/operator-intent.d.ts +82 -0
- package/dist/engine/operator-intent.js +85 -0
- package/dist/engine/operator-intent.js.map +1 -0
- package/dist/engine/preview.d.ts +26 -0
- package/dist/engine/preview.js +69 -0
- package/dist/engine/preview.js.map +1 -0
- package/dist/engine/pricing.d.ts +115 -0
- package/dist/engine/pricing.js +217 -0
- package/dist/engine/pricing.js.map +1 -0
- package/dist/engine/prompt.d.ts +80 -0
- package/dist/engine/prompt.js +168 -0
- package/dist/engine/prompt.js.map +1 -0
- package/dist/engine/report.d.ts +87 -0
- package/dist/engine/report.js +112 -0
- package/dist/engine/report.js.map +1 -0
- package/dist/engine/result.d.ts +31 -0
- package/dist/engine/result.js +81 -0
- package/dist/engine/result.js.map +1 -0
- package/dist/engine/routing.d.ts +148 -0
- package/dist/engine/routing.js +285 -0
- package/dist/engine/routing.js.map +1 -0
- package/dist/engine/snapshot.d.ts +793 -0
- package/dist/engine/snapshot.js +2 -0
- package/dist/engine/snapshot.js.map +1 -0
- package/dist/engine/state.d.ts +479 -0
- package/dist/engine/state.js +322 -0
- package/dist/engine/state.js.map +1 -0
- 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/task-control.d.ts +223 -0
- package/dist/engine/task-control.js +136 -0
- package/dist/engine/task-control.js.map +1 -0
- package/dist/engine/task-trace.d.ts +118 -0
- package/dist/engine/task-trace.js +267 -0
- package/dist/engine/task-trace.js.map +1 -0
- package/dist/engine/team.d.ts +91 -0
- package/dist/engine/team.js +208 -0
- package/dist/engine/team.js.map +1 -0
- package/dist/engine/traces.d.ts +12 -0
- package/dist/engine/traces.js +27 -0
- package/dist/engine/traces.js.map +1 -0
- package/dist/engine/usage.d.ts +312 -0
- package/dist/engine/usage.js +385 -0
- package/dist/engine/usage.js.map +1 -0
- package/dist/expert/_main.md +203 -0
- package/dist/expert/agents/_index.md +20 -0
- package/dist/expert/agents/consistency.md +11 -0
- package/dist/expert/agents/core-agents/adam.md +17 -0
- package/dist/expert/agents/core-agents/chatter.md +39 -0
- package/dist/expert/agents/core-agents/fixer.md +43 -0
- package/dist/expert/agents/core-agents/router.md +35 -0
- package/dist/expert/agents/core-agents/tasker.md +17 -0
- package/dist/expert/agents/core-agents/teacher.md +13 -0
- package/dist/expert/agents/core-agents.md +44 -0
- package/dist/expert/agents/expert.md +15 -0
- package/dist/expert/agents/learning.md +15 -0
- package/dist/expert/agents/system-agents.md +19 -0
- package/dist/expert/agents/visual-identity.md +31 -0
- package/dist/expert/app/integration.md +102 -0
- package/dist/expert/book-language/_index.md +19 -0
- package/dist/expert/book-language/commitments/_index.md +73 -0
- package/dist/expert/book-language/commitments/action.md +7 -0
- package/dist/expert/book-language/commitments/agent.md +11 -0
- package/dist/expert/book-language/commitments/chat-member.md +15 -0
- package/dist/expert/book-language/commitments/chat-message.md +15 -0
- package/dist/expert/book-language/commitments/chat-status.md +11 -0
- package/dist/expert/book-language/commitments/chat-title.md +11 -0
- package/dist/expert/book-language/commitments/chat.md +13 -0
- package/dist/expert/book-language/commitments/closed.md +9 -0
- package/dist/expert/book-language/commitments/delete.md +7 -0
- package/dist/expert/book-language/commitments/dictionary.md +7 -0
- package/dist/expert/book-language/commitments/entity.md +9 -0
- package/dist/expert/book-language/commitments/format.md +7 -0
- package/dist/expert/book-language/commitments/from.md +7 -0
- package/dist/expert/book-language/commitments/goal.md +11 -0
- package/dist/expert/book-language/commitments/import.md +7 -0
- package/dist/expert/book-language/commitments/knowledge.md +11 -0
- package/dist/expert/book-language/commitments/language.md +7 -0
- package/dist/expert/book-language/commitments/link.md +9 -0
- package/dist/expert/book-language/commitments/model.md +33 -0
- package/dist/expert/book-language/commitments/note.md +7 -0
- package/dist/expert/book-language/commitments/open.md +9 -0
- package/dist/expert/book-language/commitments/persona.md +7 -0
- package/dist/expert/book-language/commitments/rule.md +7 -0
- package/dist/expert/book-language/commitments/sample.md +7 -0
- package/dist/expert/book-language/commitments/style.md +7 -0
- package/dist/expert/book-language/commitments/task-after.md +9 -0
- package/dist/expert/book-language/commitments/task-agent.md +11 -0
- package/dist/expert/book-language/commitments/task-change.md +22 -0
- package/dist/expert/book-language/commitments/task-depends-on.md +7 -0
- package/dist/expert/book-language/commitments/task-done.md +9 -0
- package/dist/expert/book-language/commitments/task-due-date.md +9 -0
- package/dist/expert/book-language/commitments/task-note.md +9 -0
- package/dist/expert/book-language/commitments/task-origin.md +9 -0
- package/dist/expert/book-language/commitments/task-parent.md +7 -0
- package/dist/expert/book-language/commitments/task-priority.md +9 -0
- package/dist/expert/book-language/commitments/task-purpose.md +19 -0
- package/dist/expert/book-language/commitments/task-reopen.md +13 -0
- package/dist/expert/book-language/commitments/task-repeat.md +9 -0
- package/dist/expert/book-language/commitments/task-runner.md +7 -0
- package/dist/expert/book-language/commitments/task-status.md +11 -0
- package/dist/expert/book-language/commitments/task.md +11 -0
- package/dist/expert/book-language/commitments/team.md +7 -0
- package/dist/expert/book-language/commitments/template.md +7 -0
- package/dist/expert/book-language/commitments/writing-rules.md +7 -0
- package/dist/expert/book-language/commitments/writing-sample.md +7 -0
- package/dist/expert/book-language/inheritance.md +15 -0
- package/dist/expert/book-language/layering.md +49 -0
- package/dist/expert/book-language/references.md +103 -0
- package/dist/expert/book-language/syntax.md +75 -0
- package/dist/expert/book-language/vscode.md +17 -0
- package/dist/expert/cli/acceptance.md +270 -0
- package/dist/expert/cli/action-log-ui.md +34 -0
- package/dist/expert/cli/action-log.md +55 -0
- package/dist/expert/cli/agent-context.md +15 -0
- package/dist/expert/cli/api.md +75 -0
- package/dist/expert/cli/authoring.md +19 -0
- package/dist/expert/cli/autonomous-operation.md +43 -0
- package/dist/expert/cli/book-editor.md +23 -0
- package/dist/expert/cli/book-viewer.md +19 -0
- package/dist/expert/cli/browser.md +57 -0
- package/dist/expert/cli/channels.md +11 -0
- package/dist/expert/cli/chat-tasks.md +41 -0
- package/dist/expert/cli/chat-ui.md +50 -0
- package/dist/expert/cli/chats.md +81 -0
- package/dist/expert/cli/checks.md +27 -0
- package/dist/expert/cli/cli.md +86 -0
- package/dist/expert/cli/concurrency.md +39 -0
- package/dist/expert/cli/configuration-migrations.md +55 -0
- package/dist/expert/cli/configuration.md +62 -0
- package/dist/expert/cli/controls.md +51 -0
- package/dist/expert/cli/dashboard-details.md +101 -0
- package/dist/expert/cli/dashboard-layout.md +108 -0
- package/dist/expert/cli/dashboard.md +49 -0
- package/dist/expert/cli/desktop.md +51 -0
- package/dist/expert/cli/eligibility.md +17 -0
- package/dist/expert/cli/environment.md +35 -0
- package/dist/expert/cli/errors.md +17 -0
- package/dist/expert/cli/execution.md +29 -0
- package/dist/expert/cli/files.md +19 -0
- package/dist/expert/cli/first-task.md +27 -0
- package/dist/expert/cli/generated-names.md +46 -0
- package/dist/expert/cli/git-persistence.md +65 -0
- package/dist/expert/cli/git-preflight.md +15 -0
- package/dist/expert/cli/git-synchronization.md +37 -0
- package/dist/expert/cli/global-dashboard.md +73 -0
- package/dist/expert/cli/goal-discovery.md +15 -0
- package/dist/expert/cli/harness-authentication.md +48 -0
- package/dist/expert/cli/harness-plugins.md +45 -0
- package/dist/expert/cli/harness-sessions.md +55 -0
- package/dist/expert/cli/harness-updates.md +19 -0
- package/dist/expert/cli/harnesses.md +47 -0
- package/dist/expert/cli/health-sub-engine.md +86 -0
- package/dist/expert/cli/help.md +47 -0
- package/dist/expert/cli/history.md +15 -0
- package/dist/expert/cli/initialization-ui.md +53 -0
- package/dist/expert/cli/initialization.md +79 -0
- package/dist/expert/cli/installation.md +41 -0
- package/dist/expert/cli/interactive-ui.md +49 -0
- package/dist/expert/cli/isolation.md +9 -0
- package/dist/expert/cli/known-limitations.md +11 -0
- package/dist/expert/cli/locking.md +21 -0
- package/dist/expert/cli/migration.md +29 -0
- package/dist/expert/cli/nested-projects.md +19 -0
- package/dist/expert/cli/not-before.md +13 -0
- package/dist/expert/cli/notifications.md +140 -0
- package/dist/expert/cli/operations.md +15 -0
- package/dist/expert/cli/panic.md +35 -0
- package/dist/expert/cli/persistence.md +51 -0
- package/dist/expert/cli/planning.md +11 -0
- package/dist/expert/cli/power-management.md +27 -0
- package/dist/expert/cli/process-modes.md +47 -0
- package/dist/expert/cli/project-encryption.md +41 -0
- package/dist/expert/cli/project-report-ui.md +15 -0
- package/dist/expert/cli/project-report.md +42 -0
- package/dist/expert/cli/recovery.md +23 -0
- package/dist/expert/cli/recurrence.md +21 -0
- package/dist/expert/cli/releasing.md +41 -0
- package/dist/expert/cli/retries.md +31 -0
- package/dist/expert/cli/rich-input.md +21 -0
- package/dist/expert/cli/routing-migration.md +13 -0
- package/dist/expert/cli/service-lifecycle.md +94 -0
- package/dist/expert/cli/start.md +47 -0
- package/dist/expert/cli/status-view.md +39 -0
- package/dist/expert/cli/storage-and-git.md +29 -0
- package/dist/expert/cli/sub-engines.md +38 -0
- package/dist/expert/cli/synchronization-setup.md +24 -0
- package/dist/expert/cli/system-tasks.md +23 -0
- package/dist/expert/cli/task-books.md +35 -0
- package/dist/expert/cli/task-control.md +53 -0
- package/dist/expert/cli/task-identity.md +19 -0
- package/dist/expert/cli/task-markdown.md +11 -0
- package/dist/expert/cli/task-origins.md +19 -0
- package/dist/expert/cli/task-relationships.md +9 -0
- package/dist/expert/cli/task-views.md +30 -0
- package/dist/expert/cli/team.md +27 -0
- package/dist/expert/cli/terminal-title.md +73 -0
- package/dist/expert/cli/terminal.md +53 -0
- package/dist/expert/cli/tool-management.md +62 -0
- package/dist/expert/cli/tool-runtime.md +35 -0
- package/dist/expert/cli/tools-migration.md +48 -0
- package/dist/expert/cli/tools.md +83 -0
- package/dist/expert/cli/trace-configuration.md +23 -0
- package/dist/expert/cli/traces.md +45 -0
- package/dist/expert/cli/updates.md +66 -0
- package/dist/expert/cli/usage.md +66 -0
- package/dist/expert/cli/user-interactions.md +35 -0
- package/dist/expert/cli/vps-onboarding.md +52 -0
- package/dist/expert/cli/wallet-import.md +31 -0
- package/dist/expert/cli/wallet-recovery.md +29 -0
- package/dist/expert/cli/wallet-testing.md +25 -0
- package/dist/expert/cli/wallet.md +96 -0
- package/dist/expert/cli/windows-installer.md +77 -0
- package/dist/expert/cli/workspace.md +55 -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 +49 -0
- package/dist/expert/concepts/anchoring.md +15 -0
- package/dist/expert/concepts/automatic-repair.md +41 -0
- package/dist/expert/concepts/common-knowledge.md +62 -0
- package/dist/expert/concepts/engine-and-project.md +35 -0
- package/dist/expert/concepts/external-action-impact.md +80 -0
- package/dist/expert/concepts/minimal-interruption/_index.md +24 -0
- package/dist/expert/concepts/minimal-interruption/acceptance.md +12 -0
- package/dist/expert/concepts/minimal-interruption/authentication-examples.md +12 -0
- package/dist/expert/concepts/minimal-interruption/content-examples.md +24 -0
- package/dist/expert/concepts/minimal-interruption/decision-making.md +29 -0
- package/dist/expert/concepts/minimal-interruption/technical-examples.md +17 -0
- package/dist/expert/concepts/minimal-interruption/work-purpose.md +27 -0
- package/dist/expert/concepts/product-presentation.md +23 -0
- package/dist/expert/concepts/progressive-waiting.md +51 -0
- package/dist/expert/concepts/project-model.md +41 -0
- package/dist/expert/dictionary.md +61 -0
- package/dist/expert/whitepaper.md +211 -0
- package/dist/harness/maintenance.d.ts +137 -0
- package/dist/harness/maintenance.js +239 -0
- package/dist/harness/maintenance.js.map +1 -0
- package/dist/harness/models.d.ts +15 -0
- package/dist/harness/models.js +30 -0
- package/dist/harness/models.js.map +1 -0
- package/dist/harness/plugins/claude-code/index.d.ts +7 -0
- package/dist/harness/plugins/claude-code/index.js +119 -0
- package/dist/harness/plugins/claude-code/index.js.map +1 -0
- package/dist/harness/plugins/gemini/index.d.ts +7 -0
- package/dist/harness/plugins/gemini/index.js +57 -0
- package/dist/harness/plugins/gemini/index.js.map +1 -0
- package/dist/harness/plugins/github-copilot/index.d.ts +7 -0
- package/dist/harness/plugins/github-copilot/index.js +77 -0
- package/dist/harness/plugins/github-copilot/index.js.map +1 -0
- package/dist/harness/plugins/openai-codex/index.d.ts +7 -0
- package/dist/harness/plugins/openai-codex/index.js +275 -0
- package/dist/harness/plugins/openai-codex/index.js.map +1 -0
- package/dist/harness/plugins/opencode/index.d.ts +7 -0
- package/dist/harness/plugins/opencode/index.js +128 -0
- package/dist/harness/plugins/opencode/index.js.map +1 -0
- package/dist/harness/plugins/qwen-code/index.d.ts +7 -0
- package/dist/harness/plugins/qwen-code/index.js +56 -0
- package/dist/harness/plugins/qwen-code/index.js.map +1 -0
- package/dist/harness/preparation.d.ts +62 -0
- package/dist/harness/preparation.js +95 -0
- package/dist/harness/preparation.js.map +1 -0
- package/dist/harness/quota-reset.d.ts +10 -0
- package/dist/harness/quota-reset.js +126 -0
- package/dist/harness/quota-reset.js.map +1 -0
- package/dist/harness/registry.d.ts +19 -0
- package/dist/harness/registry.js +31 -0
- package/dist/harness/registry.js.map +1 -0
- package/dist/harness/run.d.ts +60 -0
- package/dist/harness/run.js +134 -0
- package/dist/harness/run.js.map +1 -0
- package/dist/harness/sessions.d.ts +326 -0
- package/dist/harness/sessions.js +386 -0
- package/dist/harness/sessions.js.map +1 -0
- package/dist/harness/shared.d.ts +106 -0
- package/dist/harness/shared.js +308 -0
- package/dist/harness/shared.js.map +1 -0
- package/dist/harness/types.d.ts +397 -0
- package/dist/harness/types.js +2 -0
- package/dist/harness/types.js.map +1 -0
- package/dist/project/agents.d.ts +172 -0
- package/dist/project/agents.js +345 -0
- package/dist/project/agents.js.map +1 -0
- package/dist/project/book-migrations.d.ts +107 -0
- package/dist/project/book-migrations.js +385 -0
- package/dist/project/book-migrations.js.map +1 -0
- package/dist/project/book-sources.d.ts +42 -0
- package/dist/project/book-sources.js +85 -0
- package/dist/project/book-sources.js.map +1 -0
- package/dist/project/books.d.ts +156 -0
- package/dist/project/books.js +265 -0
- package/dist/project/books.js.map +1 -0
- package/dist/project/checks.d.ts +60 -0
- package/dist/project/checks.js +156 -0
- package/dist/project/checks.js.map +1 -0
- package/dist/project/config.d.ts +310 -0
- package/dist/project/config.js +682 -0
- package/dist/project/config.js.map +1 -0
- package/dist/project/configuration.d.ts +43 -0
- package/dist/project/configuration.js +216 -0
- package/dist/project/configuration.js.map +1 -0
- package/dist/project/core-templates.d.ts +107 -0
- package/dist/project/core-templates.js +249 -0
- package/dist/project/core-templates.js.map +1 -0
- package/dist/project/defaults.d.ts +209 -0
- package/dist/project/defaults.js +551 -0
- package/dist/project/defaults.js.map +1 -0
- package/dist/project/draft.d.ts +29 -0
- package/dist/project/draft.js +65 -0
- package/dist/project/draft.js.map +1 -0
- package/dist/project/expert.d.ts +14 -0
- package/dist/project/expert.js +74 -0
- package/dist/project/expert.js.map +1 -0
- package/dist/project/files.d.ts +85 -0
- package/dist/project/files.js +195 -0
- package/dist/project/files.js.map +1 -0
- package/dist/project/git.d.ts +254 -0
- package/dist/project/git.js +446 -0
- package/dist/project/git.js.map +1 -0
- package/dist/project/history.d.ts +93 -0
- package/dist/project/history.js +96 -0
- package/dist/project/history.js.map +1 -0
- package/dist/project/install.d.ts +52 -0
- package/dist/project/install.js +113 -0
- package/dist/project/install.js.map +1 -0
- package/dist/project/migrations.d.ts +103 -0
- package/dist/project/migrations.js +387 -0
- package/dist/project/migrations.js.map +1 -0
- package/dist/project/publication.d.ts +57 -0
- package/dist/project/publication.js +149 -0
- package/dist/project/publication.js.map +1 -0
- package/dist/project/readiness.d.ts +44 -0
- package/dist/project/readiness.js +65 -0
- package/dist/project/readiness.js.map +1 -0
- package/dist/project/self-update.d.ts +73 -0
- package/dist/project/self-update.js +138 -0
- package/dist/project/self-update.js.map +1 -0
- package/dist/project/setup.d.ts +110 -0
- package/dist/project/setup.js +247 -0
- package/dist/project/setup.js.map +1 -0
- package/dist/project/update-policy.d.ts +97 -0
- package/dist/project/update-policy.js +229 -0
- package/dist/project/update-policy.js.map +1 -0
- package/dist/project/workspace.d.ts +78 -0
- package/dist/project/workspace.js +76 -0
- package/dist/project/workspace.js.map +1 -0
- package/dist/service/actions.d.ts +90 -0
- package/dist/service/actions.js +342 -0
- package/dist/service/actions.js.map +1 -0
- package/dist/service/auth.d.ts +15 -0
- package/dist/service/auth.js +45 -0
- package/dist/service/auth.js.map +1 -0
- package/dist/service/control.d.ts +114 -0
- package/dist/service/control.js +162 -0
- package/dist/service/control.js.map +1 -0
- package/dist/service/discovery.d.ts +134 -0
- package/dist/service/discovery.js +138 -0
- package/dist/service/discovery.js.map +1 -0
- package/dist/service/global-controls.d.ts +83 -0
- package/dist/service/global-controls.js +196 -0
- package/dist/service/global-controls.js.map +1 -0
- package/dist/service/host.d.ts +82 -0
- package/dist/service/host.js +368 -0
- package/dist/service/host.js.map +1 -0
- package/dist/service/http.d.ts +38 -0
- package/dist/service/http.js +405 -0
- package/dist/service/http.js.map +1 -0
- package/dist/service/known-projects.d.ts +108 -0
- package/dist/service/known-projects.js +160 -0
- package/dist/service/known-projects.js.map +1 -0
- package/dist/service/launcher.d.ts +159 -0
- package/dist/service/launcher.js +372 -0
- package/dist/service/launcher.js.map +1 -0
- package/dist/service/owned-processes.d.ts +81 -0
- package/dist/service/owned-processes.js +140 -0
- package/dist/service/owned-processes.js.map +1 -0
- package/dist/service/persistence.d.ts +26 -0
- package/dist/service/persistence.js +124 -0
- package/dist/service/persistence.js.map +1 -0
- package/dist/service/records.d.ts +167 -0
- package/dist/service/records.js +247 -0
- package/dist/service/records.js.map +1 -0
- package/dist/service/spa/app.css +1104 -0
- package/dist/service/spa/app.js +2943 -0
- package/dist/service/spa/icon.svg +1 -0
- package/dist/service/spa/index.html +22 -0
- package/dist/service/supervisor.d.ts +1 -0
- package/dist/service/supervisor.js +108 -0
- package/dist/service/supervisor.js.map +1 -0
- package/dist/service/worker.d.ts +1 -0
- package/dist/service/worker.js +98 -0
- package/dist/service/worker.js.map +1 -0
- package/dist/tasks/authoring.d.ts +34 -0
- package/dist/tasks/authoring.js +49 -0
- package/dist/tasks/authoring.js.map +1 -0
- package/dist/tasks/book-task.d.ts +69 -0
- package/dist/tasks/book-task.js +248 -0
- package/dist/tasks/book-task.js.map +1 -0
- package/dist/tasks/eligibility.d.ts +185 -0
- package/dist/tasks/eligibility.js +247 -0
- package/dist/tasks/eligibility.js.map +1 -0
- package/dist/tasks/identity.d.ts +80 -0
- package/dist/tasks/identity.js +154 -0
- package/dist/tasks/identity.js.map +1 -0
- package/dist/tasks/markdown.d.ts +74 -0
- package/dist/tasks/markdown.js +236 -0
- package/dist/tasks/markdown.js.map +1 -0
- package/dist/tasks/model.d.ts +213 -0
- package/dist/tasks/model.js +52 -0
- package/dist/tasks/model.js.map +1 -0
- package/dist/tasks/priority.d.ts +17 -0
- package/dist/tasks/priority.js +47 -0
- package/dist/tasks/priority.js.map +1 -0
- package/dist/tasks/purpose.d.ts +32 -0
- package/dist/tasks/purpose.js +64 -0
- package/dist/tasks/purpose.js.map +1 -0
- package/dist/tasks/recurrence.d.ts +31 -0
- package/dist/tasks/recurrence.js +48 -0
- package/dist/tasks/recurrence.js.map +1 -0
- package/dist/tasks/sources.d.ts +57 -0
- package/dist/tasks/sources.js +125 -0
- package/dist/tasks/sources.js.map +1 -0
- package/dist/tasks/task-direction.d.ts +96 -0
- package/dist/tasks/task-direction.js +279 -0
- package/dist/tasks/task-direction.js.map +1 -0
- package/dist/tasks/views.d.ts +171 -0
- package/dist/tasks/views.js +185 -0
- package/dist/tasks/views.js.map +1 -0
- package/dist/tools/environment.d.ts +123 -0
- package/dist/tools/environment.js +201 -0
- package/dist/tools/environment.js.map +1 -0
- package/dist/tools/model.d.ts +199 -0
- package/dist/tools/model.js +137 -0
- package/dist/tools/model.js.map +1 -0
- package/dist/tools/normalize.d.ts +58 -0
- package/dist/tools/normalize.js +357 -0
- package/dist/tools/normalize.js.map +1 -0
- package/dist/tools/operations.d.ts +196 -0
- package/dist/tools/operations.js +370 -0
- package/dist/tools/operations.js.map +1 -0
- package/dist/tools/readiness.d.ts +87 -0
- package/dist/tools/readiness.js +193 -0
- package/dist/tools/readiness.js.map +1 -0
- package/dist/ui/ansi.d.ts +75 -0
- package/dist/ui/ansi.js +213 -0
- package/dist/ui/ansi.js.map +1 -0
- package/dist/ui/attachments.d.ts +82 -0
- package/dist/ui/attachments.js +176 -0
- package/dist/ui/attachments.js.map +1 -0
- package/dist/ui/badges.d.ts +91 -0
- package/dist/ui/badges.js +185 -0
- package/dist/ui/badges.js.map +1 -0
- package/dist/ui/book-editor.d.ts +50 -0
- package/dist/ui/book-editor.js +217 -0
- package/dist/ui/book-editor.js.map +1 -0
- package/dist/ui/celebration.d.ts +8 -0
- package/dist/ui/celebration.js +47 -0
- package/dist/ui/celebration.js.map +1 -0
- package/dist/ui/chat-client.d.ts +87 -0
- package/dist/ui/chat-client.js +427 -0
- package/dist/ui/chat-client.js.map +1 -0
- package/dist/ui/composer.d.ts +121 -0
- package/dist/ui/composer.js +428 -0
- package/dist/ui/composer.js.map +1 -0
- package/dist/ui/countdown.d.ts +18 -0
- package/dist/ui/countdown.js +53 -0
- package/dist/ui/countdown.js.map +1 -0
- package/dist/ui/dashboard-home.d.ts +182 -0
- package/dist/ui/dashboard-home.js +521 -0
- package/dist/ui/dashboard-home.js.map +1 -0
- package/dist/ui/dashboard-pages.d.ts +414 -0
- package/dist/ui/dashboard-pages.js +980 -0
- package/dist/ui/dashboard-pages.js.map +1 -0
- package/dist/ui/dashboard.d.ts +63 -0
- package/dist/ui/dashboard.js +1752 -0
- package/dist/ui/dashboard.js.map +1 -0
- package/dist/ui/details.d.ts +160 -0
- package/dist/ui/details.js +467 -0
- package/dist/ui/details.js.map +1 -0
- package/dist/ui/error-view.d.ts +18 -0
- package/dist/ui/error-view.js +88 -0
- package/dist/ui/error-view.js.map +1 -0
- package/dist/ui/global-dashboard.d.ts +102 -0
- package/dist/ui/global-dashboard.js +662 -0
- package/dist/ui/global-dashboard.js.map +1 -0
- package/dist/ui/harness-sign-in.d.ts +51 -0
- package/dist/ui/harness-sign-in.js +61 -0
- package/dist/ui/harness-sign-in.js.map +1 -0
- package/dist/ui/keys.d.ts +107 -0
- package/dist/ui/keys.js +345 -0
- package/dist/ui/keys.js.map +1 -0
- package/dist/ui/native-effects.d.ts +50 -0
- package/dist/ui/native-effects.js +201 -0
- package/dist/ui/native-effects.js.map +1 -0
- package/dist/ui/panels.d.ts +48 -0
- package/dist/ui/panels.js +78 -0
- package/dist/ui/panels.js.map +1 -0
- package/dist/ui/project-client.d.ts +55 -0
- package/dist/ui/project-client.js +179 -0
- package/dist/ui/project-client.js.map +1 -0
- package/dist/ui/prompt-transport.d.ts +44 -0
- package/dist/ui/prompt-transport.js +73 -0
- package/dist/ui/prompt-transport.js.map +1 -0
- package/dist/ui/prompts.d.ts +189 -0
- package/dist/ui/prompts.js +678 -0
- package/dist/ui/prompts.js.map +1 -0
- package/dist/ui/render-scheduler.d.ts +8 -0
- package/dist/ui/render-scheduler.js +25 -0
- package/dist/ui/render-scheduler.js.map +1 -0
- package/dist/ui/rich-input.d.ts +108 -0
- package/dist/ui/rich-input.js +245 -0
- package/dist/ui/rich-input.js.map +1 -0
- package/dist/ui/screen.d.ts +94 -0
- package/dist/ui/screen.js +237 -0
- package/dist/ui/screen.js.map +1 -0
- package/dist/ui/secret.d.ts +18 -0
- package/dist/ui/secret.js +121 -0
- package/dist/ui/secret.js.map +1 -0
- package/dist/ui/status-view.d.ts +43 -0
- package/dist/ui/status-view.js +397 -0
- package/dist/ui/status-view.js.map +1 -0
- package/dist/ui/terminal-images.d.ts +56 -0
- package/dist/ui/terminal-images.js +95 -0
- package/dist/ui/terminal-images.js.map +1 -0
- package/dist/ui/terminal-title.d.ts +170 -0
- package/dist/ui/terminal-title.js +300 -0
- package/dist/ui/terminal-title.js.map +1 -0
- package/dist/ui/terminal.d.ts +91 -0
- package/dist/ui/terminal.js +61 -0
- package/dist/ui/terminal.js.map +1 -0
- package/dist/ui/tool-forms.d.ts +24 -0
- package/dist/ui/tool-forms.js +155 -0
- package/dist/ui/tool-forms.js.map +1 -0
- package/dist/ui/wallet-forms.d.ts +98 -0
- package/dist/ui/wallet-forms.js +275 -0
- package/dist/ui/wallet-forms.js.map +1 -0
- package/dist/wallet/crypto.d.ts +79 -0
- package/dist/wallet/crypto.js +166 -0
- package/dist/wallet/crypto.js.map +1 -0
- package/dist/wallet/host-unlock.d.ts +29 -0
- package/dist/wallet/host-unlock.js +145 -0
- package/dist/wallet/host-unlock.js.map +1 -0
- package/dist/wallet/import.d.ts +66 -0
- package/dist/wallet/import.js +105 -0
- package/dist/wallet/import.js.map +1 -0
- package/dist/wallet/wallet.d.ts +882 -0
- package/dist/wallet/wallet.js +1923 -0
- package/dist/wallet/wallet.js.map +1 -0
- package/package.json +23 -17
- package/changelog/README.md +0 -8
- package/changelog/_current-preversion.md +0 -23
- package/dist/coder/add-wizard.d.ts +0 -14
- package/dist/coder/add-wizard.js +0 -88
- package/dist/coder/add-wizard.js.map +0 -1
- package/dist/coder/agents.d.ts +0 -58
- package/dist/coder/agents.js +0 -487
- package/dist/coder/agents.js.map +0 -1
- package/dist/coder/attached-dashboard.d.ts +0 -14
- package/dist/coder/attached-dashboard.js +0 -210
- package/dist/coder/attached-dashboard.js.map +0 -1
- package/dist/coder/authoring.d.ts +0 -38
- package/dist/coder/authoring.js +0 -297
- package/dist/coder/authoring.js.map +0 -1
- package/dist/coder/browser.d.ts +0 -93
- package/dist/coder/browser.js +0 -432
- package/dist/coder/browser.js.map +0 -1
- package/dist/coder/check-setup.d.ts +0 -44
- package/dist/coder/check-setup.js +0 -174
- package/dist/coder/check-setup.js.map +0 -1
- package/dist/coder/checks.d.ts +0 -30
- package/dist/coder/checks.js +0 -152
- package/dist/coder/checks.js.map +0 -1
- package/dist/coder/choices.d.ts +0 -36
- package/dist/coder/choices.js +0 -409
- package/dist/coder/choices.js.map +0 -1
- package/dist/coder/cli.d.ts +0 -11
- package/dist/coder/cli.js +0 -1116
- package/dist/coder/cli.js.map +0 -1
- package/dist/coder/configuration.d.ts +0 -21
- package/dist/coder/configuration.js +0 -186
- package/dist/coder/configuration.js.map +0 -1
- package/dist/coder/dashboard-page.d.ts +0 -2
- package/dist/coder/dashboard-page.js +0 -91
- package/dist/coder/dashboard-page.js.map +0 -1
- package/dist/coder/diagnostics.d.ts +0 -13
- package/dist/coder/diagnostics.js +0 -44
- package/dist/coder/diagnostics.js.map +0 -1
- package/dist/coder/domain.d.ts +0 -95
- package/dist/coder/domain.js +0 -2
- package/dist/coder/domain.js.map +0 -1
- package/dist/coder/edit-task-control.d.ts +0 -7
- package/dist/coder/edit-task-control.js +0 -43
- package/dist/coder/edit-task-control.js.map +0 -1
- package/dist/coder/engine.d.ts +0 -111
- package/dist/coder/engine.js +0 -1223
- package/dist/coder/engine.js.map +0 -1
- package/dist/coder/file-replacement.d.ts +0 -13
- package/dist/coder/file-replacement.js +0 -25
- package/dist/coder/file-replacement.js.map +0 -1
- package/dist/coder/finite.d.ts +0 -22
- package/dist/coder/finite.js +0 -251
- package/dist/coder/finite.js.map +0 -1
- package/dist/coder/git.d.ts +0 -75
- package/dist/coder/git.js +0 -367
- package/dist/coder/git.js.map +0 -1
- package/dist/coder/harness-plugins/acp.d.ts +0 -8
- package/dist/coder/harness-plugins/acp.js +0 -107
- package/dist/coder/harness-plugins/acp.js.map +0 -1
- package/dist/coder/harness-plugins/claude-code/index.d.ts +0 -2
- package/dist/coder/harness-plugins/claude-code/index.js +0 -140
- package/dist/coder/harness-plugins/claude-code/index.js.map +0 -1
- package/dist/coder/harness-plugins/cline/index.d.ts +0 -2
- package/dist/coder/harness-plugins/cline/index.js +0 -111
- package/dist/coder/harness-plugins/cline/index.js.map +0 -1
- package/dist/coder/harness-plugins/configuration.d.ts +0 -4
- package/dist/coder/harness-plugins/configuration.js +0 -22
- package/dist/coder/harness-plugins/configuration.js.map +0 -1
- package/dist/coder/harness-plugins/contract.d.ts +0 -123
- package/dist/coder/harness-plugins/contract.js +0 -2
- package/dist/coder/harness-plugins/contract.js.map +0 -1
- package/dist/coder/harness-plugins/gemini/index.d.ts +0 -2
- package/dist/coder/harness-plugins/gemini/index.js +0 -70
- package/dist/coder/harness-plugins/gemini/index.js.map +0 -1
- package/dist/coder/harness-plugins/github-copilot/index.d.ts +0 -2
- package/dist/coder/harness-plugins/github-copilot/index.js +0 -197
- package/dist/coder/harness-plugins/github-copilot/index.js.map +0 -1
- package/dist/coder/harness-plugins/index.d.ts +0 -5
- package/dist/coder/harness-plugins/index.js +0 -17
- package/dist/coder/harness-plugins/index.js.map +0 -1
- package/dist/coder/harness-plugins/locks.d.ts +0 -13
- package/dist/coder/harness-plugins/locks.js +0 -123
- package/dist/coder/harness-plugins/locks.js.map +0 -1
- package/dist/coder/harness-plugins/maintenance.d.ts +0 -33
- package/dist/coder/harness-plugins/maintenance.js +0 -115
- package/dist/coder/harness-plugins/maintenance.js.map +0 -1
- package/dist/coder/harness-plugins/openai-codex/index.d.ts +0 -2
- package/dist/coder/harness-plugins/openai-codex/index.js +0 -272
- package/dist/coder/harness-plugins/openai-codex/index.js.map +0 -1
- package/dist/coder/harness-plugins/opencode/index.d.ts +0 -2
- package/dist/coder/harness-plugins/opencode/index.js +0 -81
- package/dist/coder/harness-plugins/opencode/index.js.map +0 -1
- package/dist/coder/harness-plugins/qwen-code/index.d.ts +0 -2
- package/dist/coder/harness-plugins/qwen-code/index.js +0 -65
- package/dist/coder/harness-plugins/qwen-code/index.js.map +0 -1
- package/dist/coder/harness-plugins/shared.d.ts +0 -27
- package/dist/coder/harness-plugins/shared.js +0 -277
- package/dist/coder/harness-plugins/shared.js.map +0 -1
- package/dist/coder/harness-process.d.ts +0 -51
- package/dist/coder/harness-process.js +0 -349
- package/dist/coder/harness-process.js.map +0 -1
- package/dist/coder/harness.d.ts +0 -72
- package/dist/coder/harness.js +0 -249
- package/dist/coder/harness.js.map +0 -1
- package/dist/coder/help.d.ts +0 -39
- package/dist/coder/help.js +0 -279
- package/dist/coder/help.js.map +0 -1
- package/dist/coder/initialization.d.ts +0 -80
- package/dist/coder/initialization.js +0 -567
- package/dist/coder/initialization.js.map +0 -1
- package/dist/coder/interactive.d.ts +0 -45
- package/dist/coder/interactive.js +0 -299
- package/dist/coder/interactive.js.map +0 -1
- package/dist/coder/logging.d.ts +0 -9
- package/dist/coder/logging.js +0 -64
- package/dist/coder/logging.js.map +0 -1
- package/dist/coder/migrate.d.ts +0 -29
- package/dist/coder/migrate.js +0 -249
- package/dist/coder/migrate.js.map +0 -1
- package/dist/coder/persistence.d.ts +0 -32
- package/dist/coder/persistence.js +0 -133
- package/dist/coder/persistence.js.map +0 -1
- package/dist/coder/planner.d.ts +0 -32
- package/dist/coder/planner.js +0 -197
- package/dist/coder/planner.js.map +0 -1
- package/dist/coder/presentation.d.ts +0 -34
- package/dist/coder/presentation.js +0 -106
- package/dist/coder/presentation.js.map +0 -1
- package/dist/coder/requests.d.ts +0 -25
- package/dist/coder/requests.js +0 -147
- package/dist/coder/requests.js.map +0 -1
- package/dist/coder/schedule.d.ts +0 -13
- package/dist/coder/schedule.js +0 -165
- package/dist/coder/schedule.js.map +0 -1
- package/dist/coder/server.d.ts +0 -8
- package/dist/coder/server.js +0 -8
- package/dist/coder/server.js.map +0 -1
- package/dist/coder/service-worker.js +0 -44
- package/dist/coder/service-worker.js.map +0 -1
- package/dist/coder/service.d.ts +0 -91
- package/dist/coder/service.js +0 -1261
- package/dist/coder/service.js.map +0 -1
- package/dist/coder/setup.d.ts +0 -25
- package/dist/coder/setup.js +0 -68
- package/dist/coder/setup.js.map +0 -1
- package/dist/coder/sources.d.ts +0 -58
- package/dist/coder/sources.js +0 -734
- package/dist/coder/sources.js.map +0 -1
- package/dist/coder/state.d.ts +0 -159
- package/dist/coder/state.js +0 -300
- package/dist/coder/state.js.map +0 -1
- package/dist/coder/team.d.ts +0 -36
- package/dist/coder/team.js +0 -138
- package/dist/coder/team.js.map +0 -1
- package/dist/coder/terminal.d.ts +0 -26
- package/dist/coder/terminal.js +0 -415
- package/dist/coder/terminal.js.map +0 -1
- package/dist/coder/updates.d.ts +0 -34
- package/dist/coder/updates.js +0 -99
- package/dist/coder/updates.js.map +0 -1
- package/dist/coder/version.d.ts +0 -4
- package/dist/coder/version.js +0 -16
- package/dist/coder/version.js.map +0 -1
- package/dist/coder/workspace.d.ts +0 -42
- package/dist/coder/workspace.js +0 -232
- package/dist/coder/workspace.js.map +0 -1
- package/docs/compatibility.md +0 -22
- package/docs/releasing.md +0 -73
- package/docs/runtime.md +0 -118
- /package/dist/{coder/service-worker.d.ts → engine/mcp-server.d.ts} +0 -0
package/LICENSE.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# 🔑 License
|
|
2
2
|
|
|
3
|
+
Licensing information and proposed commercial/continuity terms are published at:
|
|
4
|
+
|
|
5
|
+
- English: https://www.ptbk.io/en/licence
|
|
6
|
+
- Czech: https://www.ptbk.io/cs/licence
|
|
7
|
+
|
|
8
|
+
The 2 November 2026 proposal on that page is a **non-effective discussion draft**, not a new grant or a retrospective restriction. A later edit of a website cannot change rights already validly obtained to a particular distribution. Product subscriptions, hosted services and third-party component licences remain separate.
|
|
9
|
+
|
|
10
|
+
The existing notice below is retained with this distribution so it remains identifiable offline. It is unchanged from the notice at revision `c8718b5aa635b67aabf861e94ee673d23de74644`; retaining it does not supply missing product-specific BUSL parameters or imply unlimited commercial self-hosting rights. Final adoption of a different licence requires an explicit versioned grant and consistent distribution metadata.
|
|
11
|
+
|
|
12
|
+
## Existing distribution notice
|
|
13
|
+
|
|
3
14
|
Promptbook Engine is licensed under the Business Source License 1.1 (BUSL-1.1).
|
|
4
15
|
|
|
5
16
|
This license allows non-production use, personal projects, and evaluation without restrictions.
|
package/README.md
CHANGED
|
@@ -1,40 +1,112 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/webgptorg/promptbook/reborn/2026-10/design/readme-wordmark.svg" alt="promptbook" width="570" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">You used to give AI tasks<br />Now it works for you</h1>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="#quickstart"><strong>Quickstart</strong></a> ·
|
|
9
|
+
<a href="#deploy-to-your-own-server"><strong>Deploy</strong></a> ·
|
|
10
|
+
<a href="https://www.ptbk.io/en"><strong>Website</strong></a> ·
|
|
11
|
+
<a href="specs/_main.md"><strong>Specifications</strong></a> ·
|
|
12
|
+
<a href="https://www.ptbk.io/en/partnership"><strong>For partners</strong></a>
|
|
13
|
+
</p>
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
Give Promptbook an ongoing responsibility, a goal and your rules. Its agents find useful work, carry it through and ask when a decision needs you. **Your engine runs on your computer or server, with your files and your choice of models.**
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
| Readable files | Traceable work | Your choice of AI |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| Agents, tasks and conversations live in your project folder. | Review changes in Git and execution evidence in task traces. | Use supported harnesses such as Codex or Claude Code; local models depend on the adapter. |
|
|
22
|
+
|
|
23
|
+
**What could you hand over?** Promote each new podcast episode. Follow up with customers using their CRM history. Investigate and repair an overnight bug. These are illustrative agendas; actual work follows your configured tools, checks and permissions.
|
|
24
|
+
|
|
25
|
+
## Quickstart
|
|
26
|
+
|
|
27
|
+
If Node.js and npm are already installed, use the npm path below. On a clean Ubuntu VPS, use the [complete shell installation](#clean-ubuntu-vps).
|
|
28
|
+
|
|
29
|
+
Requires **Node.js 22.13+ in the 22.x line, or 24+**, **npm 10+**, Git and Chrome, Chromium or Edge. Setup guides you through selecting a supported harness and signing in.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
9
32
|
npm install --global ptbk
|
|
10
|
-
|
|
33
|
+
mkdir my-agenda
|
|
34
|
+
cd my-agenda
|
|
35
|
+
ptbk init
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Clean Ubuntu VPS
|
|
11
39
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
40
|
+
On **Ubuntu 24.04 x86-64 with systemd**, run this in an interactive SSH terminal as root or an administrator with sudo:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
curl -fsSL https://www.ptbk.io/install.sh | bash
|
|
15
44
|
```
|
|
16
45
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
ptbk
|
|
23
|
-
ptbk
|
|
24
|
-
ptbk
|
|
25
|
-
ptbk
|
|
26
|
-
ptbk answer REQUEST_ID "Reply"
|
|
27
|
-
ptbk stop # intentional stop also disables automatic restart
|
|
46
|
+
You do not need Node.js, npm or Git installed first. The script uses the [shared server installer](deploy/ubuntu/install.sh), adds the prerequisites and published engine, then opens ordinary `ptbk init` as the `promptbook` user. [Inspect the entry script](https://github.com/webgptorg/ptbk-landing-page-aldaron/blob/main/public/install.sh) · [VPS guide](deploy/README.md#an-existing-vps-including-digitalocean-or-hetzner).
|
|
47
|
+
|
|
48
|
+
Describe the work in the initializer. It prepares the project and starts the engine in the background.
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
ptbk dashboard # open the controls; closing them leaves the engine running
|
|
52
|
+
ptbk chat # talk to your agents, in a separate terminal
|
|
53
|
+
ptbk stop # finish the current task, then stop
|
|
54
|
+
ptbk start # resume the agenda
|
|
28
55
|
```
|
|
29
56
|
|
|
30
|
-
|
|
57
|
+
The engine machine must stay available. By default, persistent project services return at OS startup: an agenda that was running can continue after checks; one you paused or stopped returns paused until you resume it. Its browser dashboard and API are available only on that computer through a loopback address, with no pairing step. [Local API access](specs/cli/api.md) · [Startup behavior](specs/cli/persistence.md)
|
|
58
|
+
|
|
59
|
+
Agents explicitly call you with `+@User` when they need a response. Viewing that message clears its shared attention indicator while the question keeps waiting. In a project terminal dashboard or `ptbk chat`, **Ctrl+N** toggles **Sounds & notifications (experimental)** for the project's open clients. Effects start Off, follow your last-used client and suppress attention alerts during the ten seconds after input. Native delivery depends on OS permissions; exact terminal activation is available through a verified Kitty notification connection. [Attention and notifications](specs/cli/notifications.md)
|
|
60
|
+
|
|
61
|
+
A background engine [updates itself](specs/cli/updates.md) when it has no other work: stable minor and patch releases of its major version, or a running prerelease to its stable release. It never installs a version your `ptbk.json` `updates` pin or range excludes, or one that needs a newer Node.js than your host runs, and you can switch it off on the dashboard's System page. Release signing and rollout delays are still being agreed with the platform, so your host access and backups still matter.
|
|
62
|
+
|
|
63
|
+
**Windows:** download the EXE from [GitHub Releases](https://github.com/webgptorg/promptbook/releases), or follow the [installation guide](https://www.ptbk.io/en/open-source). The installer offers the local desktop client (selected by default), Codex and Claude Code. The desktop uses the same engine and initializer as the CLI, with an embedded CLI terminal; closing a window leaves your engines running. CLI-only installation remains available.
|
|
64
|
+
|
|
65
|
+
## Deploy to your own server
|
|
66
|
+
|
|
67
|
+
**A clean Ubuntu 24.04 LTS x86-64 server** with systemd, outbound HTTPS and root or sudo access over SSH needs no preinstalled Node.js, npm, Git, Chrome or AI harness: use the [one-command installation](#clean-ubuntu-vps). It prepares the server through the [shared installer](deploy/ubuntu/install.sh) and opens `ptbk init` as a dedicated non-sudo `promptbook` user. Sign-in to Codex or Claude Code is finished on your phone or computer; see the [server guide](deploy/README.md#finish-setup-over-ssh).
|
|
68
|
+
|
|
69
|
+
[](deploy/README.md#digitalocean)
|
|
70
|
+
|
|
71
|
+
**DigitalOcean:** create an Ubuntu Droplet with your SSH key and paste the prepared startup script. It prepares the server with persistent project storage and private dashboard access; then the same command over SSH continues into setup. [Open the DigitalOcean setup guide](deploy/README.md#digitalocean). The guide includes the required script-copy step; this is not a published Marketplace one-click image.
|
|
72
|
+
|
|
73
|
+
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fwebgptorg%2Fpromptbook%2Freborn%2F2026-10%2Fdeploy%2Fazure%2Fazuredeploy.json)
|
|
74
|
+
|
|
75
|
+
Create a **paid Ubuntu VPS in your own Azure account**, with a persistent disk, SSH restricted to your client IP, Node.js, Git, Chrome and the published engine. Review the provider's costs before confirming. Then connect over SSH and run the same command to continue into `ptbk init` and sign in to your chosen AI harness; the button prepares the server, while your agenda still needs setup.
|
|
76
|
+
|
|
77
|
+
On every path the engine runs as a dedicated user, keeps its dashboard private and can resume at boot after initialization. [All installation options](https://www.ptbk.io/en/open-source).
|
|
78
|
+
|
|
79
|
+
**[AWS EC2 setup](deploy/README.md#aws):** upload the prepared CloudFormation template to create a persistent Ubuntu server with the same installer. All providers require paid resources; after server preparation, the same command over SSH continues into attended `ptbk init` and AI sign-in.
|
|
80
|
+
|
|
81
|
+
## Built around your project
|
|
82
|
+
|
|
83
|
+
**Agent → Project → Task.** Agents keep the goals and rules; the project holds context; tasks record concrete work. This is the [APT Framework](specs/whitepaper.md).
|
|
84
|
+
|
|
85
|
+
Agent definitions are ordinary editable text:
|
|
86
|
+
|
|
87
|
+
```book
|
|
88
|
+
AGENT Product caretaker
|
|
89
|
+
|
|
90
|
+
GOAL Keep the product reliable and easy to maintain.
|
|
91
|
+
RULE Run the project's checks before reporting a fix.
|
|
92
|
+
RULE Ask before publishing outside the agreed release policy.
|
|
93
|
+
OPEN Learn better methods; the GOAL and both RULEs stay as written.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Edit these files with [Book language support for VS Code](https://marketplace.visualstudio.com/items?itemName=promptbook.book-extension), [built and released with the engine](extensions/vscode/README.md).
|
|
97
|
+
|
|
98
|
+
`OPEN` with its limits, or `CLOSED`, is an [anchor](specs/concepts/anchoring.md): a user-fixed rule whose meaning the agents cannot change themselves, even while their methods evolve. You can still change it. Anchors limit what agents may rewrite; they do not make every AI output correct.
|
|
99
|
+
|
|
100
|
+
Set real project checks in `ptbk.json`; the initializer's placeholder is informational. Git tracks file changes, not every external action. External models and services receive the inputs you authorize.
|
|
101
|
+
|
|
102
|
+
## App, engine and support
|
|
31
103
|
|
|
32
|
-
|
|
104
|
+
This repository is the **self-hosted engine**. The upcoming **Promptbook app** adds convenient remote control through an end-to-end encrypted relay connection, separate from the engine's local dashboard. [Register interest](https://www.ptbk.io/en) or [deploy Promptbook for your clients](https://www.ptbk.io/en/partnership).
|
|
33
105
|
|
|
34
|
-
|
|
106
|
+
The [first-App specification](specs/app/integration.md) focuses on App-started VPS setup, project chat and native start/pause/stop controls. It also defines later extensions without claiming they are shipped.
|
|
35
107
|
|
|
36
|
-
|
|
108
|
+
[Command reference](specs/cli/cli.md) · [Book language](specs/book-language/_index.md) · [Changelog](CHANGELOG.md) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md)
|
|
37
109
|
|
|
38
|
-
|
|
110
|
+
A star, a reproducible issue or a contribution helps us build Promptbook. See the **[engine licence and proposed commercial terms](https://www.ptbk.io/en/licence)** ([česky](https://www.ptbk.io/cs/licence)). The proposed terms are not yet effective; the [notice accompanying this distribution](LICENSE.md) and any agreement actually accepted govern your rights.
|
|
39
111
|
|
|
40
|
-
|
|
112
|
+
Pre-Reborn: [legacy version 0.114.0-51](https://github.com/webgptorg/promptbook/tree/7ab4af6862d81a7e8b2a1ce8522f79bb2cd37231).
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which document kinds a commitment belongs to (`both` = agents and tasks, `chat` = chats, `any` = every kind).
|
|
3
|
+
*
|
|
4
|
+
* @private Book language
|
|
5
|
+
*/
|
|
6
|
+
export type CommitmentScope = 'agent' | 'task' | 'both' | 'chat' | 'any';
|
|
7
|
+
/**
|
|
8
|
+
* How a commitment's content is interpreted.
|
|
9
|
+
*
|
|
10
|
+
* - `declaration`: the opening type-and-name commitment (`AGENT`, `TASK`, `CHAT`); its content is the name
|
|
11
|
+
* - `instruction`: repeatable multi-line natural-language content
|
|
12
|
+
* - `control`: single-value control field (its value is the first line)
|
|
13
|
+
* - `repeatable-control`: control field that may appear several times (e.g. `TASK DONE`, `TASK DEPENDS ON`)
|
|
14
|
+
* - `flag`: marker without required content (e.g. `CLOSED`)
|
|
15
|
+
* - `historical`: former syntax kept only to diagnose and convert old sources (`ENTITY`)
|
|
16
|
+
*
|
|
17
|
+
* @private Book language
|
|
18
|
+
*/
|
|
19
|
+
export type CommitmentKind = 'declaration' | 'instruction' | 'control' | 'repeatable-control' | 'flag' | 'historical';
|
|
20
|
+
/**
|
|
21
|
+
* Definition of one canonical commitment with its aliases.
|
|
22
|
+
*
|
|
23
|
+
* @private Book language
|
|
24
|
+
*/
|
|
25
|
+
export type CommitmentDefinition = {
|
|
26
|
+
/** Canonical uppercase keyword (may contain spaces). */
|
|
27
|
+
readonly keyword: string;
|
|
28
|
+
/** Alias keywords sharing the semantics. */
|
|
29
|
+
readonly aliases: readonly string[];
|
|
30
|
+
/** Document kinds accepting the commitment. */
|
|
31
|
+
readonly scope: CommitmentScope;
|
|
32
|
+
/** Content interpretation. */
|
|
33
|
+
readonly kind: CommitmentKind;
|
|
34
|
+
/** Short description used by help, Expert and diagnostics. */
|
|
35
|
+
readonly description: string;
|
|
36
|
+
/** Not a documented commitment: an unknown complete keyword preserved for round-tripping and diagnosed. */
|
|
37
|
+
readonly unknown?: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Values of `TASK PURPOSE` (written uppercase, so each value is part of the complete keyword).
|
|
41
|
+
*
|
|
42
|
+
* @private Book language
|
|
43
|
+
*/
|
|
44
|
+
export declare const TASK_PURPOSE_VALUES: readonly ["CONTENT", "SYSTEM", "UNDEFINED"];
|
|
45
|
+
/**
|
|
46
|
+
* Every recognized commitment.
|
|
47
|
+
*
|
|
48
|
+
* @private Book language
|
|
49
|
+
*/
|
|
50
|
+
export declare const COMMITMENTS: readonly CommitmentDefinition[];
|
|
51
|
+
/**
|
|
52
|
+
* Every accepted spelling, including aliases and compound withdrawals, for editors using the shared vocabulary.
|
|
53
|
+
*
|
|
54
|
+
* @private Book language
|
|
55
|
+
*/
|
|
56
|
+
export declare function commitmentKeywords(): string[];
|
|
57
|
+
/**
|
|
58
|
+
* The commitment kind a compound withdrawal names (`DELETE RULE` → `RULE`), if any.
|
|
59
|
+
*
|
|
60
|
+
* @private Book language
|
|
61
|
+
*/
|
|
62
|
+
export declare function withdrawnKeyword(written: string): string | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* A commitment keyword found at the beginning of a line.
|
|
65
|
+
*
|
|
66
|
+
* @private Book language
|
|
67
|
+
*/
|
|
68
|
+
export type KeywordMatch = {
|
|
69
|
+
/** Definition of the complete keyword (a synthetic `unknown` definition for undocumented keywords). */
|
|
70
|
+
readonly definition: CommitmentDefinition;
|
|
71
|
+
/** Keyword as written (complete uppercase word sequence). */
|
|
72
|
+
readonly written: string;
|
|
73
|
+
/** Content after the keyword on the same line (trimmed). */
|
|
74
|
+
readonly content: string;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Recognizes a commitment at the beginning of a line by the common boundary rule.
|
|
78
|
+
*
|
|
79
|
+
* The keyword is the maximal sequence of all-uppercase words at column zero, separated by spaces, with at least three
|
|
80
|
+
* letters in total. A word containing lowercase letters, digits, punctuation or a reference begins the content; once
|
|
81
|
+
* content begins, later uppercase words belong to it. The complete keyword is looked up as a whole: an unknown keyword
|
|
82
|
+
* is never shortened to a known prefix (`TASK SOMETHING` is not `TASK`).
|
|
83
|
+
*
|
|
84
|
+
* @private Book language
|
|
85
|
+
*/
|
|
86
|
+
export declare function matchCommitmentKeyword(line: string): KeywordMatch | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Whether a line would start a commitment (writers escape such lines in literal content).
|
|
89
|
+
*
|
|
90
|
+
* @private Book language
|
|
91
|
+
*/
|
|
92
|
+
export declare function startsCommitment(line: string): boolean;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Values of `TASK PURPOSE` (written uppercase, so each value is part of the complete keyword).
|
|
3
|
+
*
|
|
4
|
+
* @private Book language
|
|
5
|
+
*/
|
|
6
|
+
export const TASK_PURPOSE_VALUES = ['CONTENT', 'SYSTEM', 'UNDEFINED'];
|
|
7
|
+
/**
|
|
8
|
+
* Every recognized commitment.
|
|
9
|
+
*
|
|
10
|
+
* @private Book language
|
|
11
|
+
*/
|
|
12
|
+
export const COMMITMENTS = [
|
|
13
|
+
{ keyword: 'AGENT', aliases: [], scope: 'agent', kind: 'declaration', description: 'Opening declaration of an agent: `AGENT <name>`.' },
|
|
14
|
+
{ keyword: 'TASK', aliases: [], scope: 'task', kind: 'declaration', description: 'Opening declaration of a task: `TASK <name>`.' },
|
|
15
|
+
{ keyword: 'CHAT', aliases: [], scope: 'chat', kind: 'declaration', description: 'Opening declaration of a chat: `CHAT <name>`.' },
|
|
16
|
+
{ keyword: 'ENTITY', aliases: ['ENTITY AGENT', 'ENTITY TASK', 'ENTITY CHAT'], scope: 'any', kind: 'historical', description: 'Former kind declaration after a plain name line; convert with `ptbk migrate`.' },
|
|
17
|
+
{ keyword: 'LINK', aliases: ['LINKS'], scope: 'any', kind: 'repeatable-control', description: 'Directed reference to another agent, task or chat (no scheduling or authority).' },
|
|
18
|
+
{ keyword: 'CHAT MEMBER', aliases: [], scope: 'chat', kind: 'repeatable-control', description: 'Participant of a chat (`@User` and one or more agents, the first being the main agent; or the two agents of a consultation). A joining agent is appended before its first message.' },
|
|
19
|
+
{ keyword: 'CHAT MESSAGE', aliases: [], scope: 'chat', kind: 'instruction', description: 'One durable message: `CHAT MESSAGE <sender> <timestamp> [progress|final]` followed by its text.' },
|
|
20
|
+
{ keyword: 'CHAT TITLE', aliases: [], scope: 'chat', kind: 'repeatable-control', description: 'Evolving human-facing topic title (the latest wins); never renames the chat, whose `CHAT` name stays its identity.' },
|
|
21
|
+
{ keyword: 'CHAT STATUS', aliases: [], scope: 'chat', kind: 'repeatable-control', description: '`open`, `waiting-for-user` or `resolved`, appended at each actual transition (the last valid one wins; without one a chat is open).' },
|
|
22
|
+
{ keyword: 'PERSONA', aliases: ['PERSONAE'], scope: 'agent', kind: 'instruction', description: 'Role and identity of the agent.' },
|
|
23
|
+
{ keyword: 'GOAL', aliases: ['GOALS'], scope: 'both', kind: 'instruction', description: "An agent's lasting objective (also used for goal discovery), or a task's bounded work and intended result." },
|
|
24
|
+
{ keyword: 'RULE', aliases: ['RULES'], scope: 'both', kind: 'instruction', description: 'Behavioral constraint (task rules apply only to that task).' },
|
|
25
|
+
{ keyword: 'KNOWLEDGE', aliases: [], scope: 'agent', kind: 'instruction', description: 'Inline knowledge or a reference to relevant material.' },
|
|
26
|
+
{ keyword: 'STYLE', aliases: ['STYLES'], scope: 'agent', kind: 'instruction', description: 'Style of communication or output.' },
|
|
27
|
+
{ keyword: 'LANGUAGE', aliases: ['LANGUAGES'], scope: 'agent', kind: 'instruction', description: 'Language(s) of responses.' },
|
|
28
|
+
{ keyword: 'WRITING SAMPLE', aliases: [], scope: 'agent', kind: 'instruction', description: 'Example of the desired writing style.' },
|
|
29
|
+
{ keyword: 'WRITING RULES', aliases: ['WRITING RULE'], scope: 'agent', kind: 'instruction', description: 'Specific writing conventions.' },
|
|
30
|
+
{ keyword: 'SAMPLE', aliases: ['EXAMPLE'], scope: 'agent', kind: 'instruction', description: 'Representative interaction or output.' },
|
|
31
|
+
{ keyword: 'FORMAT', aliases: ['FORMATS'], scope: 'agent', kind: 'instruction', description: 'Requested output format.' },
|
|
32
|
+
{ keyword: 'TEMPLATE', aliases: ['TEMPLATES'], scope: 'agent', kind: 'instruction', description: 'Reusable response/output pattern.' },
|
|
33
|
+
{ keyword: 'FROM', aliases: [], scope: 'agent', kind: 'control', description: 'Single inheritance parent (default Adam).' },
|
|
34
|
+
{ keyword: 'IMPORT', aliases: ['IMPORTS'], scope: 'agent', kind: 'repeatable-control', description: 'In-place inclusion of another agent\'s instructions.' },
|
|
35
|
+
{
|
|
36
|
+
keyword: 'MODEL',
|
|
37
|
+
aliases: ['MODELS'],
|
|
38
|
+
scope: 'any',
|
|
39
|
+
kind: 'instruction',
|
|
40
|
+
description: 'Allowed execution combinations (`harness=… model=… thinking=… provider=… origin=… runtime=…`; fields on one line apply together, lines are alternatives) of an agent, task or chat, independent of the tool/account.',
|
|
41
|
+
},
|
|
42
|
+
{ keyword: 'ACTION', aliases: ['ACTIONS'], scope: 'agent', kind: 'instruction', description: 'Actions/tools the role intends to use.' },
|
|
43
|
+
{ keyword: 'TEAM', aliases: [], scope: 'agent', kind: 'instruction', description: 'Whom the agent may consult and when.' },
|
|
44
|
+
{ keyword: 'OPEN', aliases: [], scope: 'agent', kind: 'instruction', description: 'Permits learning, optionally with natural-language limits.' },
|
|
45
|
+
{ keyword: 'CLOSED', aliases: [], scope: 'agent', kind: 'flag', description: 'Prohibits automatic learning changes.' },
|
|
46
|
+
{ keyword: 'NOTE', aliases: ['NOTES', 'COMMENT', 'NONCE', 'TODO'], scope: 'any', kind: 'instruction', description: 'Non-executable commentary.' },
|
|
47
|
+
{ keyword: 'DELETE', aliases: ['CANCEL', 'DISCARD', 'REMOVE'], scope: 'agent', kind: 'instruction', description: 'Withdraws an identified earlier commitment.' },
|
|
48
|
+
{ keyword: 'DICTIONARY', aliases: [], scope: 'agent', kind: 'instruction', description: 'Terminology for the role\'s work.' },
|
|
49
|
+
{ keyword: 'TASK ID', aliases: [], scope: 'task', kind: 'control', description: 'Legacy historical metadata; never identity (the task name is).' },
|
|
50
|
+
{ keyword: 'TASK AGENT', aliases: [], scope: 'task', kind: 'control', description: 'Responsible agent.' },
|
|
51
|
+
{ keyword: 'TASK HARNESS', aliases: [], scope: 'task', kind: 'control', description: 'Former harness requirement, replaced by `MODEL harness=…` (honored and diagnosed until converted).' },
|
|
52
|
+
{ keyword: 'TASK MODEL', aliases: [], scope: 'task', kind: 'control', description: 'Former model requirement, replaced by `MODEL model=…` (honored and diagnosed until converted).' },
|
|
53
|
+
{ keyword: 'TASK THINKING LEVEL', aliases: [], scope: 'task', kind: 'control', description: 'Former thinking requirement, replaced by `MODEL thinking=…` (honored and diagnosed until converted).' },
|
|
54
|
+
{ keyword: 'TASK PRIORITY', aliases: [], scope: 'task', kind: 'control', description: 'Nonnegative number or textual importance; higher first.' },
|
|
55
|
+
{ keyword: 'TASK AFTER', aliases: [], scope: 'task', kind: 'control', description: 'Inclusive earliest permitted start.' },
|
|
56
|
+
{ keyword: 'TASK DUE DATE', aliases: [], scope: 'task', kind: 'control', description: 'Desired completion deadline (not a start condition).' },
|
|
57
|
+
{ keyword: 'TASK DONE', aliases: [], scope: 'task', kind: 'repeatable-control', description: 'Completion stamp with explicit timezone (historical after a later `TASK REOPEN`).' },
|
|
58
|
+
{ keyword: 'TASK STATUS', aliases: [], scope: 'task', kind: 'control', description: 'Appended transition: `todo`, `not-ready`, `failed`, `cancelled` or `retired`; the last valid one is effective.' },
|
|
59
|
+
{ keyword: 'TASK CHANGE', aliases: [], scope: 'task', kind: 'instruction', description: 'Chronological amendment `TASK CHANGE <timestamp> <task|occurrence|future> [<chat reference>]`; the lines below state the requested change, and later typed controls belong to it.' },
|
|
60
|
+
{ keyword: 'TASK REOPEN', aliases: [], scope: 'task', kind: 'repeatable-control', description: 'Reopens the same work `TASK REOPEN <timestamp> [<chat reference>]`, keeping earlier completions as history.' },
|
|
61
|
+
{ keyword: 'TASK REPEAT', aliases: [], scope: 'task', kind: 'control', description: 'Positive fixed recurrence interval.' },
|
|
62
|
+
{ keyword: 'TASK DEPENDS ON', aliases: [], scope: 'task', kind: 'repeatable-control', description: 'Prerequisite task references.' },
|
|
63
|
+
{ keyword: 'TASK PARENT', aliases: [], scope: 'task', kind: 'control', description: 'Parent task reference (no implied ordering).' },
|
|
64
|
+
{ keyword: 'TASK RUNNER', aliases: [], scope: 'task', kind: 'repeatable-control', description: 'Opaque any-of routing selectors from Markdown.' },
|
|
65
|
+
{ keyword: 'TASK NOTE', aliases: [], scope: 'task', kind: 'instruction', description: 'Explanatory task metadata.' },
|
|
66
|
+
{ keyword: 'TASK ORIGIN', aliases: [], scope: 'task', kind: 'control', description: 'Provenance of the task.' },
|
|
67
|
+
{
|
|
68
|
+
keyword: 'TASK PURPOSE',
|
|
69
|
+
// The uppercase values join the keyword under the boundary rule, so each complete spelling is an alias.
|
|
70
|
+
aliases: TASK_PURPOSE_VALUES.map((value) => `TASK PURPOSE ${value}`),
|
|
71
|
+
scope: 'task',
|
|
72
|
+
kind: 'repeatable-control',
|
|
73
|
+
description: 'Project-relative purpose `TASK PURPOSE CONTENT|SYSTEM|UNDEFINED`, appended at each actual change (earlier values stay in the Book; the last valid one is effective). Presentation only: no priority, permission or executor.',
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
/**
|
|
77
|
+
* Lookup from every accepted keyword spelling to its definition.
|
|
78
|
+
*/
|
|
79
|
+
const KEYWORD_LOOKUP = new Map([
|
|
80
|
+
...COMMITMENTS.flatMap((definition) => [definition.keyword, ...definition.aliases].map((keyword) => [keyword, definition])),
|
|
81
|
+
// `DELETE RULE …` is one complete keyword: the withdrawal names the kind of the commitment it withdraws.
|
|
82
|
+
...COMMITMENTS.filter((definition) => definition.kind === 'instruction' && definition.keyword !== 'DELETE').flatMap((target) => ['DELETE', 'CANCEL', 'DISCARD', 'REMOVE'].flatMap((withdraw) => [target.keyword, ...target.aliases].map((keyword) => [`${withdraw} ${keyword}`, COMMITMENTS.find((definition) => definition.keyword === 'DELETE')]))),
|
|
83
|
+
]);
|
|
84
|
+
/**
|
|
85
|
+
* Every accepted spelling, including aliases and compound withdrawals, for editors using the shared vocabulary.
|
|
86
|
+
*
|
|
87
|
+
* @private Book language
|
|
88
|
+
*/
|
|
89
|
+
export function commitmentKeywords() {
|
|
90
|
+
return [...KEYWORD_LOOKUP.keys()];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The commitment kind a compound withdrawal names (`DELETE RULE` → `RULE`), if any.
|
|
94
|
+
*
|
|
95
|
+
* @private Book language
|
|
96
|
+
*/
|
|
97
|
+
export function withdrawnKeyword(written) {
|
|
98
|
+
const [, ...rest] = written.trim().split(/\s+/);
|
|
99
|
+
if (!rest.length)
|
|
100
|
+
return undefined;
|
|
101
|
+
const target = KEYWORD_LOOKUP.get(rest.join(' '));
|
|
102
|
+
return target && target.keyword !== 'DELETE' ? target.keyword : undefined;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* One all-uppercase word of a commitment keyword (letters only; digits, punctuation or lowercase begin content).
|
|
106
|
+
*/
|
|
107
|
+
const KEYWORD_WORD = /^\p{Lu}[\p{Lu}\p{M}]*$/u;
|
|
108
|
+
/**
|
|
109
|
+
* Fewest letters a complete keyword needs (so `A`, `I` or `AI` starting prose never begin a commitment).
|
|
110
|
+
*/
|
|
111
|
+
const MIN_KEYWORD_LETTERS = 3;
|
|
112
|
+
/**
|
|
113
|
+
* Recognizes a commitment at the beginning of a line by the common boundary rule.
|
|
114
|
+
*
|
|
115
|
+
* The keyword is the maximal sequence of all-uppercase words at column zero, separated by spaces, with at least three
|
|
116
|
+
* letters in total. A word containing lowercase letters, digits, punctuation or a reference begins the content; once
|
|
117
|
+
* content begins, later uppercase words belong to it. The complete keyword is looked up as a whole: an unknown keyword
|
|
118
|
+
* is never shortened to a known prefix (`TASK SOMETHING` is not `TASK`).
|
|
119
|
+
*
|
|
120
|
+
* @private Book language
|
|
121
|
+
*/
|
|
122
|
+
export function matchCommitmentKeyword(line) {
|
|
123
|
+
if (!/^\p{Lu}/u.test(line))
|
|
124
|
+
return undefined;
|
|
125
|
+
const words = [];
|
|
126
|
+
let offset = 0;
|
|
127
|
+
for (const word of line.matchAll(/\S+/g)) {
|
|
128
|
+
if (!KEYWORD_WORD.test(word[0]))
|
|
129
|
+
break;
|
|
130
|
+
words.push(word[0]);
|
|
131
|
+
offset = word.index + word[0].length;
|
|
132
|
+
}
|
|
133
|
+
const keyword = words.join(' ');
|
|
134
|
+
if (keyword.replace(/\s/g, '').length < MIN_KEYWORD_LETTERS)
|
|
135
|
+
return undefined;
|
|
136
|
+
const definition = KEYWORD_LOOKUP.get(keyword) ?? { keyword, aliases: [], scope: 'any', kind: 'instruction', description: 'Unknown commitment (preserved without effect).', unknown: true };
|
|
137
|
+
return { definition, written: line.slice(0, offset), content: line.slice(offset).trim() };
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Whether a line would start a commitment (writers escape such lines in literal content).
|
|
141
|
+
*
|
|
142
|
+
* @private Book language
|
|
143
|
+
*/
|
|
144
|
+
export function startsCommitment(line) {
|
|
145
|
+
return matchCommitmentKeyword(line) !== undefined;
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=commitments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commitments.js","sourceRoot":"","sources":["../../src/book/commitments.ts"],"names":[],"mappings":"AAyCA;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAU,CAAC;AAE/E;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAoC;IACxD,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,kDAAkD,EAAE;IACvI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,+CAA+C,EAAE;IAClI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,+CAA+C,EAAE;IAClI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,aAAa,EAAE,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,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CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,GAAG,mBAAmB;QAAE,OAAO,SAAS,CAAC;IAC9E,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,gDAAgD,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC5L,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;AAC9F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IACzC,OAAO,sBAAsB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type EntityKind } from './parse.js';
|
|
2
|
+
/**
|
|
3
|
+
* Conventional folder of a source, the documented context former syntax relied on for its kind.
|
|
4
|
+
*
|
|
5
|
+
* @private Book conversion
|
|
6
|
+
*/
|
|
7
|
+
export type LegacyLocation = 'agents' | 'tasks' | 'chats' | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Outcome of converting one source.
|
|
10
|
+
*
|
|
11
|
+
* @private Book conversion
|
|
12
|
+
*/
|
|
13
|
+
export type BookConversion = {
|
|
14
|
+
readonly kind: 'unchanged';
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: 'converted';
|
|
17
|
+
readonly entity: EntityKind;
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly content: string;
|
|
20
|
+
readonly notes: readonly string[];
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: 'blocked';
|
|
23
|
+
readonly reason: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Converts a Book in former syntax into the canonical form, preserving its name, content, links and history.
|
|
27
|
+
*
|
|
28
|
+
* Former syntax: a plain name line (kind from `ENTITY` or, as documented then, the conventional folder), `ENTITY`
|
|
29
|
+
* lines, a `TASK <name>` header followed by an introduction, and text after one-line controls. Descriptive text without
|
|
30
|
+
* an owner moves under GOAL (tasks), PERSONA (agents, where it was part of the role) or NOTE (chats); lines the new
|
|
31
|
+
* boundary rule would read as commitments are escaped literally. The name is kept exactly (no new date); an ambiguous
|
|
32
|
+
* kind or a name that cannot follow a keyword blocks the conversion instead of guessing.
|
|
33
|
+
*
|
|
34
|
+
* @private Book conversion
|
|
35
|
+
*/
|
|
36
|
+
export declare function convertLegacyBook(source: string, location: LegacyLocation): BookConversion;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { COMMITMENTS, matchCommitmentKeyword } from './commitments.js';
|
|
2
|
+
import { fenceMarker, parseBook } from './parse.js';
|
|
3
|
+
import { DECLARATION_KEYWORD, declarationName, renderCommitment } from './write.js';
|
|
4
|
+
/**
|
|
5
|
+
* Keyword spellings the former parser recognized, longest first (it matched known keywords as prefixes).
|
|
6
|
+
*/
|
|
7
|
+
const FORMER_KEYWORDS = COMMITMENTS.filter((definition) => definition.kind !== 'declaration' || definition.keyword === 'TASK')
|
|
8
|
+
.flatMap((definition) => [definition.keyword, ...definition.aliases])
|
|
9
|
+
.sort((a, b) => b.length - a.length);
|
|
10
|
+
/**
|
|
11
|
+
* How the former parser read a line: a known keyword followed by whitespace or the end of the line.
|
|
12
|
+
*/
|
|
13
|
+
function formerMatch(line) {
|
|
14
|
+
for (const keyword of FORMER_KEYWORDS) {
|
|
15
|
+
if (!line.startsWith(keyword))
|
|
16
|
+
continue;
|
|
17
|
+
const rest = line.slice(keyword.length);
|
|
18
|
+
if (rest !== '' && !/^\s/.test(rest))
|
|
19
|
+
continue;
|
|
20
|
+
return { keyword, content: rest.trim() };
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Canonical keyword of a known spelling (alias resolved).
|
|
26
|
+
*/
|
|
27
|
+
function canonicalKeyword(written) {
|
|
28
|
+
return COMMITMENTS.find((definition) => definition.keyword === written || definition.aliases.includes(written))?.keyword ?? written;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Commitment that receives descriptive text without an owner in former syntax.
|
|
32
|
+
*/
|
|
33
|
+
const DESCRIPTION_KEYWORD = { task: 'GOAL', agent: 'PERSONA', chat: 'NOTE' };
|
|
34
|
+
/**
|
|
35
|
+
* Converts a Book in former syntax into the canonical form, preserving its name, content, links and history.
|
|
36
|
+
*
|
|
37
|
+
* Former syntax: a plain name line (kind from `ENTITY` or, as documented then, the conventional folder), `ENTITY`
|
|
38
|
+
* lines, a `TASK <name>` header followed by an introduction, and text after one-line controls. Descriptive text without
|
|
39
|
+
* an owner moves under GOAL (tasks), PERSONA (agents, where it was part of the role) or NOTE (chats); lines the new
|
|
40
|
+
* boundary rule would read as commitments are escaped literally. The name is kept exactly (no new date); an ambiguous
|
|
41
|
+
* kind or a name that cannot follow a keyword blocks the conversion instead of guessing.
|
|
42
|
+
*
|
|
43
|
+
* @private Book conversion
|
|
44
|
+
*/
|
|
45
|
+
export function convertLegacyBook(source, location) {
|
|
46
|
+
const document = parseBook(source);
|
|
47
|
+
if (document.kind === 'empty')
|
|
48
|
+
return { kind: 'unchanged' };
|
|
49
|
+
const legacy = document.legacy;
|
|
50
|
+
const formerTaskHeader = !document.declaredKind && /^TASK\s/.test(document.lines[document.headerLine] ?? '');
|
|
51
|
+
if (!legacy && !formerTaskHeader)
|
|
52
|
+
return { kind: 'unchanged' };
|
|
53
|
+
if (legacy?.uppercaseName)
|
|
54
|
+
return { kind: 'blocked', reason: `the name "${document.name}" starts with an all-uppercase word, which cannot follow a declaration keyword; choose a representable spelling (e.g. "${declarationName(document.name)}") and edit the first line explicitly` };
|
|
55
|
+
// Kind: the canonical declaration, else ENTITY, else the documented folder convention.
|
|
56
|
+
const header = document.lines[document.headerLine];
|
|
57
|
+
const former = formerMatch(header);
|
|
58
|
+
let entity = document.declaredKind ?? (former?.keyword === 'TASK' ? 'task' : undefined);
|
|
59
|
+
if (legacy?.entity === 'conflict' || legacy?.entity === 'unsupported')
|
|
60
|
+
return { kind: 'blocked', reason: 'its ENTITY declarations are contradictory or unsupported; state the kind explicitly' };
|
|
61
|
+
if (legacy?.entity) {
|
|
62
|
+
if (entity && entity !== legacy.entity)
|
|
63
|
+
return { kind: 'blocked', reason: `its header declares a ${entity} but ENTITY says ${legacy.entity}` };
|
|
64
|
+
entity = legacy.entity;
|
|
65
|
+
}
|
|
66
|
+
const folderKind = location === 'agents' ? 'agent' : location === 'tasks' ? 'task' : location === 'chats' ? 'chat' : undefined;
|
|
67
|
+
if (!entity)
|
|
68
|
+
entity = folderKind;
|
|
69
|
+
if (!entity)
|
|
70
|
+
return { kind: 'blocked', reason: 'its kind is unknown (no ENTITY and not in agents/, tasks/ or chats/); start it with AGENT, TASK or CHAT explicitly' };
|
|
71
|
+
if (folderKind && legacy?.entity && folderKind !== legacy.entity)
|
|
72
|
+
return { kind: 'blocked', reason: `it declares a ${legacy.entity} but lies in ${location}/; move it or state the kind explicitly` };
|
|
73
|
+
const name = former?.keyword === 'TASK' && !document.declaredKind ? former.content : document.name;
|
|
74
|
+
if (!name)
|
|
75
|
+
return { kind: 'blocked', reason: 'it has no name' };
|
|
76
|
+
if (declarationName(name) !== name.replace(/\s+/g, ' ').trim())
|
|
77
|
+
return { kind: 'blocked', reason: `the name "${name}" needs an explicit spelling decision` };
|
|
78
|
+
// Re-read the body as the former parser did: only known keywords started commitments.
|
|
79
|
+
const notes = [];
|
|
80
|
+
const loose = [];
|
|
81
|
+
const body = [];
|
|
82
|
+
let fence;
|
|
83
|
+
let section;
|
|
84
|
+
let introduction = true;
|
|
85
|
+
const escapeContent = (line, message) => {
|
|
86
|
+
// Former message bodies already used the backslash escape; other content did not.
|
|
87
|
+
if (!message && line.startsWith('\\'))
|
|
88
|
+
return `\\${line}`;
|
|
89
|
+
if (!message && fenceMarker(line) === undefined && matchCommitmentKeyword(line))
|
|
90
|
+
return `\\${line}`;
|
|
91
|
+
if (message && !line.startsWith('\\') && matchCommitmentKeyword(line))
|
|
92
|
+
return `\\${line}`;
|
|
93
|
+
return line;
|
|
94
|
+
};
|
|
95
|
+
for (let index = document.headerLine + 1; index < document.lines.length; index++) {
|
|
96
|
+
const line = document.lines[index];
|
|
97
|
+
const marker = fenceMarker(line);
|
|
98
|
+
const match = fence || marker ? undefined : formerMatch(line);
|
|
99
|
+
if (fence) {
|
|
100
|
+
if (marker && marker[0] === fence[0] && marker.length >= fence.length && line.trim() === marker)
|
|
101
|
+
fence = undefined;
|
|
102
|
+
}
|
|
103
|
+
else if (marker)
|
|
104
|
+
fence = marker;
|
|
105
|
+
if (match) {
|
|
106
|
+
introduction = false;
|
|
107
|
+
const keyword = canonicalKeyword(match.keyword);
|
|
108
|
+
const definition = COMMITMENTS.find((item) => item.keyword === keyword);
|
|
109
|
+
const single = definition.kind === 'control' || definition.kind === 'repeatable-control' || definition.kind === 'flag' || definition.kind === 'historical';
|
|
110
|
+
section = { keyword, single, message: keyword === 'CHAT MESSAGE' };
|
|
111
|
+
if (keyword === 'ENTITY') {
|
|
112
|
+
notes.push('removed the redundant ENTITY declaration');
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (keyword === 'TASK') {
|
|
116
|
+
// A later legacy `TASK …` line never declared anything; keep its text as content.
|
|
117
|
+
loose.push(match.content);
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
const reread = matchCommitmentKeyword(line);
|
|
121
|
+
if (reread && !reread.definition.unknown && reread.definition.keyword === keyword && reread.content === match.content)
|
|
122
|
+
body.push(line);
|
|
123
|
+
else
|
|
124
|
+
body.push(...renderCommitment(match.keyword, match.content));
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
if (introduction || section?.single) {
|
|
128
|
+
if (line.trim() || loose.length)
|
|
129
|
+
loose.push(fence || marker ? line : line);
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
body.push(fence || marker ? line : escapeContent(line, Boolean(section?.message)));
|
|
133
|
+
}
|
|
134
|
+
while (loose.length && !loose[loose.length - 1].trim())
|
|
135
|
+
loose.pop();
|
|
136
|
+
const description = loose.join('\n').trim();
|
|
137
|
+
const lines = [`${DECLARATION_KEYWORD[entity]} ${name.replace(/\s+/g, ' ').trim()}`];
|
|
138
|
+
if (description) {
|
|
139
|
+
lines.push(...renderCommitment(DESCRIPTION_KEYWORD[entity], description));
|
|
140
|
+
notes.push(`moved descriptive text under ${DESCRIPTION_KEYWORD[entity]}`);
|
|
141
|
+
}
|
|
142
|
+
while (body.length && !body[0].trim())
|
|
143
|
+
body.shift();
|
|
144
|
+
if (body.length && entity !== 'chat' && description)
|
|
145
|
+
lines.push('');
|
|
146
|
+
lines.push(...body);
|
|
147
|
+
while (lines.length && !lines[lines.length - 1].trim())
|
|
148
|
+
lines.pop();
|
|
149
|
+
const content = `${lines.join(document.newline)}${document.newline}`;
|
|
150
|
+
const check = parseBook(content);
|
|
151
|
+
if (check.kind !== entity || check.name !== name.replace(/\s+/g, ' ').trim()) {
|
|
152
|
+
return { kind: 'blocked', reason: `the converted Book would not read back as the same ${entity} (${check.diagnostics.map((diagnostic) => diagnostic.message).join(' ')})` };
|
|
153
|
+
}
|
|
154
|
+
return { kind: 'converted', entity, name: check.name, content, notes };
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=convert.js.map
|