@kynetic-ai/spec 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -455
- package/dist/agent-runtime/bootstrap.d.ts +31 -0
- package/dist/agent-runtime/bootstrap.d.ts.map +1 -0
- package/dist/agent-runtime/bootstrap.js +302 -0
- package/dist/agent-runtime/bootstrap.js.map +1 -0
- package/dist/agent-runtime/dispatch.d.ts +150 -10
- package/dist/agent-runtime/dispatch.d.ts.map +1 -1
- package/dist/agent-runtime/dispatch.js +1248 -244
- package/dist/agent-runtime/dispatch.js.map +1 -1
- package/dist/agent-runtime/invocation.d.ts +28 -1
- package/dist/agent-runtime/invocation.d.ts.map +1 -1
- package/dist/agent-runtime/invocation.js +172 -60
- package/dist/agent-runtime/invocation.js.map +1 -1
- package/dist/agent-runtime/prompts.d.ts +9 -0
- package/dist/agent-runtime/prompts.d.ts.map +1 -1
- package/dist/agent-runtime/prompts.js +42 -7
- package/dist/agent-runtime/prompts.js.map +1 -1
- package/dist/agent-runtime/session-event-accumulator.d.ts +83 -0
- package/dist/agent-runtime/session-event-accumulator.d.ts.map +1 -0
- package/dist/agent-runtime/session-event-accumulator.js +203 -0
- package/dist/agent-runtime/session-event-accumulator.js.map +1 -0
- package/dist/agent-runtime/session-event-types.d.ts +67 -0
- package/dist/agent-runtime/session-event-types.d.ts.map +1 -0
- package/dist/agent-runtime/session-event-types.js +13 -0
- package/dist/agent-runtime/session-event-types.js.map +1 -0
- package/dist/agent-runtime/workspace.d.ts +244 -0
- package/dist/agent-runtime/workspace.d.ts.map +1 -0
- package/dist/agent-runtime/workspace.js +2025 -0
- package/dist/agent-runtime/workspace.js.map +1 -0
- package/dist/agents/adapters.d.ts.map +1 -1
- package/dist/agents/adapters.js +58 -13
- package/dist/agents/adapters.js.map +1 -1
- package/dist/agents/spawner.d.ts +8 -0
- package/dist/agents/spawner.d.ts.map +1 -1
- package/dist/agents/spawner.js +25 -3
- package/dist/agents/spawner.js.map +1 -1
- package/dist/cli/batch-exec.js +1 -1
- package/dist/cli/batch-exec.js.map +1 -1
- package/dist/cli/command-annotations.d.ts +15 -3
- package/dist/cli/command-annotations.d.ts.map +1 -1
- package/dist/cli/command-annotations.js +23 -3
- package/dist/cli/command-annotations.js.map +1 -1
- package/dist/cli/commands/agent.d.ts +2 -0
- package/dist/cli/commands/agent.d.ts.map +1 -1
- package/dist/cli/commands/agent.js +144 -27
- package/dist/cli/commands/agent.js.map +1 -1
- package/dist/cli/commands/agents.d.ts.map +1 -1
- package/dist/cli/commands/agents.js +5 -5
- package/dist/cli/commands/agents.js.map +1 -1
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +118 -3
- package/dist/cli/commands/derive.js.map +1 -1
- package/dist/cli/commands/guard.d.ts.map +1 -1
- package/dist/cli/commands/guard.js +8 -6
- package/dist/cli/commands/guard.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +20 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/item.d.ts.map +1 -1
- package/dist/cli/commands/item.js +205 -47
- package/dist/cli/commands/item.js.map +1 -1
- package/dist/cli/commands/log.d.ts.map +1 -1
- package/dist/cli/commands/log.js +24 -10
- package/dist/cli/commands/log.js.map +1 -1
- package/dist/cli/commands/meta.d.ts.map +1 -1
- package/dist/cli/commands/meta.js +10 -1
- package/dist/cli/commands/meta.js.map +1 -1
- package/dist/cli/commands/plan-import.d.ts +3 -3
- package/dist/cli/commands/plan-import.d.ts.map +1 -1
- package/dist/cli/commands/plan-import.js +213 -528
- package/dist/cli/commands/plan-import.js.map +1 -1
- package/dist/cli/commands/plan.d.ts.map +1 -1
- package/dist/cli/commands/plan.js +533 -83
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/review.d.ts +14 -0
- package/dist/cli/commands/review.d.ts.map +1 -0
- package/dist/cli/commands/review.js +1142 -0
- package/dist/cli/commands/review.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +1 -0
- package/dist/cli/commands/serve.d.ts.map +1 -1
- package/dist/cli/commands/serve.js +33 -10
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/session/checkpoint.d.ts +2 -4
- package/dist/cli/commands/session/checkpoint.d.ts.map +1 -1
- package/dist/cli/commands/session/checkpoint.js +6 -107
- package/dist/cli/commands/session/checkpoint.js.map +1 -1
- package/dist/cli/commands/session/commands.d.ts.map +1 -1
- package/dist/cli/commands/session/commands.js +33 -23
- package/dist/cli/commands/session/commands.js.map +1 -1
- package/dist/cli/commands/session/compact.js +4 -4
- package/dist/cli/commands/session/compact.js.map +1 -1
- package/dist/cli/commands/session/create.js +2 -2
- package/dist/cli/commands/session/create.js.map +1 -1
- package/dist/cli/commands/session/format.d.ts.map +1 -1
- package/dist/cli/commands/session/format.js +1 -6
- package/dist/cli/commands/session/format.js.map +1 -1
- package/dist/cli/commands/session/log.d.ts +32 -7
- package/dist/cli/commands/session/log.d.ts.map +1 -1
- package/dist/cli/commands/session/log.js +166 -60
- package/dist/cli/commands/session/log.js.map +1 -1
- package/dist/cli/commands/session/migrate.d.ts +9 -0
- package/dist/cli/commands/session/migrate.d.ts.map +1 -0
- package/dist/cli/commands/session/migrate.js +46 -0
- package/dist/cli/commands/session/migrate.js.map +1 -0
- package/dist/cli/commands/session/stale-close.d.ts.map +1 -1
- package/dist/cli/commands/session/stale-close.js +5 -8
- package/dist/cli/commands/session/stale-close.js.map +1 -1
- package/dist/cli/commands/session/types.d.ts +1 -1
- package/dist/cli/commands/session/types.d.ts.map +1 -1
- package/dist/cli/commands/setup.d.ts +2 -2
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +287 -257
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/shadow.d.ts.map +1 -1
- package/dist/cli/commands/shadow.js +147 -31
- package/dist/cli/commands/shadow.js.map +1 -1
- package/dist/cli/commands/skill-crud.d.ts +7 -0
- package/dist/cli/commands/skill-crud.d.ts.map +1 -1
- package/dist/cli/commands/skill-crud.js +41 -18
- package/dist/cli/commands/skill-crud.js.map +1 -1
- package/dist/cli/commands/skill-diff.d.ts.map +1 -1
- package/dist/cli/commands/skill-diff.js +29 -3
- package/dist/cli/commands/skill-diff.js.map +1 -1
- package/dist/cli/commands/skill-install.d.ts.map +1 -1
- package/dist/cli/commands/skill-install.js +5 -4
- package/dist/cli/commands/skill-install.js.map +1 -1
- package/dist/cli/commands/task.d.ts.map +1 -1
- package/dist/cli/commands/task.js +359 -49
- package/dist/cli/commands/task.js.map +1 -1
- package/dist/cli/commands/trait.d.ts.map +1 -1
- package/dist/cli/commands/trait.js +5 -27
- package/dist/cli/commands/trait.js.map +1 -1
- package/dist/cli/commands/validate.d.ts.map +1 -1
- package/dist/cli/commands/validate.js +113 -52
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +69 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/output.d.ts +26 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +108 -1
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/sync-mode.d.ts +44 -0
- package/dist/cli/sync-mode.d.ts.map +1 -0
- package/dist/cli/sync-mode.js +64 -0
- package/dist/cli/sync-mode.js.map +1 -0
- package/dist/daemon/middleware/project-context.ts +25 -7
- package/dist/daemon/project-context.ts +18 -0
- package/dist/daemon/routes/agent-dispatch.ts +107 -23
- package/dist/daemon/routes/aggregation.ts +184 -0
- package/dist/daemon/routes/inbox.ts +5 -0
- package/dist/daemon/routes/items.ts +167 -0
- package/dist/daemon/routes/meta.ts +141 -1
- package/dist/daemon/routes/plans.ts +147 -0
- package/dist/daemon/routes/projects.ts +28 -6
- package/dist/daemon/routes/ref-resolution.ts +119 -0
- package/dist/daemon/routes/refs.ts +42 -0
- package/dist/daemon/routes/session-related.ts +140 -0
- package/dist/daemon/routes/sessions.ts +581 -0
- package/dist/daemon/routes/tasks.ts +257 -2
- package/dist/daemon/routes/triage.ts +40 -1
- package/dist/daemon/routes/validation.ts +1 -1
- package/dist/daemon/server.ts +165 -50
- package/dist/daemon/session-sync.ts +11 -0
- package/dist/daemon/shadow-sync.ts +11 -0
- package/dist/daemon/watcher.ts +56 -5
- package/dist/daemon/websocket/project-resolution.ts +77 -0
- package/dist/export/json.d.ts.map +1 -1
- package/dist/export/json.js +104 -1
- package/dist/export/json.js.map +1 -1
- package/dist/export/types.d.ts +52 -1
- package/dist/export/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/parser/agent-detection.d.ts +1 -1
- package/dist/parser/agent-detection.d.ts.map +1 -1
- package/dist/parser/agent-detection.js +10 -0
- package/dist/parser/agent-detection.js.map +1 -1
- package/dist/parser/alignment.d.ts.map +1 -1
- package/dist/parser/alignment.js +4 -2
- package/dist/parser/alignment.js.map +1 -1
- package/dist/parser/config.d.ts +397 -2
- package/dist/parser/config.d.ts.map +1 -1
- package/dist/parser/config.js +125 -3
- package/dist/parser/config.js.map +1 -1
- package/dist/parser/dispatch-workspaces.d.ts +18 -0
- package/dist/parser/dispatch-workspaces.d.ts.map +1 -0
- package/dist/parser/dispatch-workspaces.js +209 -0
- package/dist/parser/dispatch-workspaces.js.map +1 -0
- package/dist/parser/doctor.d.ts.map +1 -1
- package/dist/parser/doctor.js +27 -8
- package/dist/parser/doctor.js.map +1 -1
- package/dist/parser/file-lock.d.ts.map +1 -1
- package/dist/parser/file-lock.js +9 -2
- package/dist/parser/file-lock.js.map +1 -1
- package/dist/parser/index.d.ts +6 -0
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +6 -0
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/plans.d.ts.map +1 -1
- package/dist/parser/plans.js +1 -0
- package/dist/parser/plans.js.map +1 -1
- package/dist/parser/refs.d.ts +8 -1
- package/dist/parser/refs.d.ts.map +1 -1
- package/dist/parser/refs.js +27 -1
- package/dist/parser/refs.js.map +1 -1
- package/dist/parser/review-operations.d.ts +72 -0
- package/dist/parser/review-operations.d.ts.map +1 -0
- package/dist/parser/review-operations.js +185 -0
- package/dist/parser/review-operations.js.map +1 -0
- package/dist/parser/review-task-integration.d.ts +78 -0
- package/dist/parser/review-task-integration.d.ts.map +1 -0
- package/dist/parser/review-task-integration.js +173 -0
- package/dist/parser/review-task-integration.js.map +1 -0
- package/dist/parser/review-threads.d.ts +101 -0
- package/dist/parser/review-threads.d.ts.map +1 -0
- package/dist/parser/review-threads.js +222 -0
- package/dist/parser/review-threads.js.map +1 -0
- package/dist/parser/review-validation.d.ts +69 -0
- package/dist/parser/review-validation.d.ts.map +1 -0
- package/dist/parser/review-validation.js +207 -0
- package/dist/parser/review-validation.js.map +1 -0
- package/dist/parser/reviews.d.ts +58 -0
- package/dist/parser/reviews.d.ts.map +1 -0
- package/dist/parser/reviews.js +230 -0
- package/dist/parser/reviews.js.map +1 -0
- package/dist/parser/session-branch.d.ts +91 -0
- package/dist/parser/session-branch.d.ts.map +1 -0
- package/dist/parser/session-branch.js +565 -0
- package/dist/parser/session-branch.js.map +1 -0
- package/dist/parser/session-sync-scheduler.d.ts +53 -0
- package/dist/parser/session-sync-scheduler.d.ts.map +1 -0
- package/dist/parser/session-sync-scheduler.js +100 -0
- package/dist/parser/session-sync-scheduler.js.map +1 -0
- package/dist/parser/setup-status.d.ts +7 -1
- package/dist/parser/setup-status.d.ts.map +1 -1
- package/dist/parser/setup-status.js +104 -39
- package/dist/parser/setup-status.js.map +1 -1
- package/dist/parser/shadow-sync-scheduler.d.ts +71 -0
- package/dist/parser/shadow-sync-scheduler.d.ts.map +1 -0
- package/dist/parser/shadow-sync-scheduler.js +139 -0
- package/dist/parser/shadow-sync-scheduler.js.map +1 -0
- package/dist/parser/shadow.d.ts +121 -14
- package/dist/parser/shadow.d.ts.map +1 -1
- package/dist/parser/shadow.js +752 -27
- package/dist/parser/shadow.js.map +1 -1
- package/dist/parser/skill-render.d.ts +24 -0
- package/dist/parser/skill-render.d.ts.map +1 -1
- package/dist/parser/skill-render.js +98 -26
- package/dist/parser/skill-render.js.map +1 -1
- package/dist/parser/validate.d.ts +43 -3
- package/dist/parser/validate.d.ts.map +1 -1
- package/dist/parser/validate.js +204 -30
- package/dist/parser/validate.js.map +1 -1
- package/dist/parser/yaml.d.ts +47 -11
- package/dist/parser/yaml.d.ts.map +1 -1
- package/dist/parser/yaml.js +329 -149
- package/dist/parser/yaml.js.map +1 -1
- package/dist/review/checks.d.ts +97 -0
- package/dist/review/checks.d.ts.map +1 -0
- package/dist/review/checks.js +175 -0
- package/dist/review/checks.js.map +1 -0
- package/dist/review/index.d.ts +3 -0
- package/dist/review/index.d.ts.map +1 -0
- package/dist/review/index.js +3 -0
- package/dist/review/index.js.map +1 -0
- package/dist/review/subject-bindings.d.ts +83 -0
- package/dist/review/subject-bindings.d.ts.map +1 -0
- package/dist/review/subject-bindings.js +175 -0
- package/dist/review/subject-bindings.js.map +1 -0
- package/dist/schema/common.d.ts +26 -0
- package/dist/schema/common.d.ts.map +1 -1
- package/dist/schema/common.js +13 -0
- package/dist/schema/common.js.map +1 -1
- package/dist/schema/dispatch-workspace.d.ts +2643 -0
- package/dist/schema/dispatch-workspace.d.ts.map +1 -0
- package/dist/schema/dispatch-workspace.js +187 -0
- package/dist/schema/dispatch-workspace.js.map +1 -0
- package/dist/schema/inbox.d.ts +8 -8
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +2 -0
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/meta.d.ts +663 -116
- package/dist/schema/meta.d.ts.map +1 -1
- package/dist/schema/meta.js +28 -0
- package/dist/schema/meta.js.map +1 -1
- package/dist/schema/plan.d.ts +30 -19
- package/dist/schema/plan.d.ts.map +1 -1
- package/dist/schema/plan.js +3 -1
- package/dist/schema/plan.js.map +1 -1
- package/dist/schema/review-records.d.ts +2676 -0
- package/dist/schema/review-records.d.ts.map +1 -0
- package/dist/schema/review-records.js +232 -0
- package/dist/schema/review-records.js.map +1 -0
- package/dist/schema/spec.d.ts +32 -14
- package/dist/schema/spec.d.ts.map +1 -1
- package/dist/schema/spec.js +5 -0
- package/dist/schema/spec.js.map +1 -1
- package/dist/schema/task.d.ts +187 -29
- package/dist/schema/task.d.ts.map +1 -1
- package/dist/schema/task.js +12 -2
- package/dist/schema/task.js.map +1 -1
- package/dist/schema/triage.d.ts +22 -22
- package/dist/sessions/cache.d.ts +119 -0
- package/dist/sessions/cache.d.ts.map +1 -0
- package/dist/sessions/cache.js +284 -0
- package/dist/sessions/cache.js.map +1 -0
- package/dist/sessions/index.d.ts +1 -0
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +2 -0
- package/dist/sessions/index.js.map +1 -1
- package/dist/sessions/legacy.d.ts +77 -0
- package/dist/sessions/legacy.d.ts.map +1 -0
- package/dist/sessions/legacy.js +146 -0
- package/dist/sessions/legacy.js.map +1 -0
- package/dist/sessions/store.d.ts +115 -71
- package/dist/sessions/store.d.ts.map +1 -1
- package/dist/sessions/store.js +357 -182
- package/dist/sessions/store.js.map +1 -1
- package/dist/sessions/types.d.ts +44 -16
- package/dist/sessions/types.d.ts.map +1 -1
- package/dist/sessions/types.js +11 -2
- package/dist/sessions/types.js.map +1 -1
- package/dist/strings/errors.d.ts +32 -0
- package/dist/strings/errors.d.ts.map +1 -1
- package/dist/strings/errors.js +17 -0
- package/dist/strings/errors.js.map +1 -1
- package/dist/strings/labels.d.ts +1 -0
- package/dist/strings/labels.d.ts.map +1 -1
- package/dist/strings/labels.js +1 -0
- package/dist/strings/labels.js.map +1 -1
- package/dist/utils/activity.d.ts +101 -0
- package/dist/utils/activity.d.ts.map +1 -0
- package/dist/utils/activity.js +408 -0
- package/dist/utils/activity.js.map +1 -0
- package/dist/utils/git.d.ts +31 -0
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js +87 -0
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/web-ui/_app/immutable/assets/0.tmlwn-Ih.css +1 -0
- package/dist/web-ui/_app/immutable/assets/9.BwwJybWx.css +1 -0
- package/dist/web-ui/_app/immutable/chunks/2KqE8gtn.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/70-t_QvE.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/AiWQj974.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/B25nWFyA.js +5 -0
- package/dist/web-ui/_app/immutable/chunks/B2bcA_Q_.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/B5e5HYyB.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/B7-5z6eA.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/B7bGmhK0.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/B8tYZKAE.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/BFGAyJjD.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/BG0850zf.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/BG8eSzAd.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/BIMxXS8I.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/BSzL1fpU.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/BYtjHfeq.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/{D1ArdqNb.js → Bp5pFYXL.js} +1 -1
- package/dist/web-ui/_app/immutable/chunks/BsJFsuAT.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/BvpNHcD6.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/BypqA25-.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/C0w6WDm5.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/C5_PAZ0y.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/CDRO15Iv.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/CF1CoqD5.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/CS2sa4_m.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/CWUQwB9H.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/CY5FDdSU.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/C_7MTDoj.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/CaAJD3dl.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/{i-XnOIX0.js → ChB5iyEL.js} +1 -1
- package/dist/web-ui/_app/immutable/chunks/ChQD-6N8.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/{BCkp8Hs8.js → CqbsoCwA.js} +1 -1
- package/dist/web-ui/_app/immutable/chunks/DCeJW50p.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/DJtZNgcs.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/DKIeaprD.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/DLd2uVIA.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/DW_subyT.js +2 -0
- package/dist/web-ui/_app/immutable/chunks/DbU6lVn0.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/Dc7ZCC5m.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/Dd5umPsk.js +2 -0
- package/dist/web-ui/_app/immutable/chunks/Dg_zDpDS.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/Dgqu8Yuc.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/DmxsPZTB.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/DphTaFUB.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/DqK4iHp0.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/DqT6OH_u.js +2 -0
- package/dist/web-ui/_app/immutable/chunks/Ds9I9wQb.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/Du5ng3u4.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/DxJw79Wi.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/GFTX8GgV.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/HNjs76Zz.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/HVMjDi4_.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/P0A_fJvS.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/T3vGWjIL.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/VTmrX9Qu.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/Xvwhx_F1.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/Yyz1XMQA.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/dh5HeqUr.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/fZMteyca.js +62 -0
- package/dist/web-ui/_app/immutable/chunks/{D28BF5MJ.js → gPrj-hqC.js} +1 -1
- package/dist/web-ui/_app/immutable/chunks/htcWMiYN.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/oTsvd9y4.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/qJfLUwU4.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/xCtiO_JE.js +1 -0
- package/dist/web-ui/_app/immutable/chunks/y4GeEH6k.js +1 -0
- package/dist/web-ui/_app/immutable/entry/app.C4h_eOn6.js +2 -0
- package/dist/web-ui/_app/immutable/entry/start.CQFTf9ep.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/0.Dh1xO970.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/1.l75D3Opx.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/10.DBidBPc-.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/11.Ab0gUKWe.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/12.CMsnoxfs.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/13.D8YKuknB.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/14.DZ0aan7y.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/15.CUIKreDL.js +2 -0
- package/dist/web-ui/_app/immutable/nodes/16.BWc8--BO.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/2.CDUonbuh.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/3.Ctg3M00i.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/4.Ci-JDwbA.js +2 -0
- package/dist/web-ui/_app/immutable/nodes/5.CTyEDAq0.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/6.BTZZqsAb.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/7.BI52g_Jo.js +137 -0
- package/dist/web-ui/_app/immutable/nodes/8.3hZPaB9x.js +1 -0
- package/dist/web-ui/_app/immutable/nodes/9.DS49kvwl.js +29 -0
- package/dist/web-ui/_app/version.json +1 -1
- package/dist/web-ui/favicon-192.png +0 -0
- package/dist/web-ui/favicon-32.png +0 -0
- package/dist/web-ui/favicon.ico +0 -0
- package/dist/web-ui/index.html +14 -11
- package/package.json +14 -7
- package/plugin/.claude-plugin/marketplace.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugins/kspec/skills/merge/SKILL.md +127 -0
- package/plugin/plugins/kspec/skills/plan/SKILL.md +55 -26
- package/plugin/plugins/kspec/skills/review/SKILL.md +350 -133
- package/plugin/plugins/kspec/skills/task-work/SKILL.md +96 -106
- package/templates/agents-sections/04-pr-workflow.md +15 -12
- package/templates/agents-sections/06-ralph-loop.md +15 -10
- package/templates/skills/manifest.yaml +25 -7
- package/templates/skills/merge/SKILL.md +120 -0
- package/templates/skills/plan/SKILL.md +55 -26
- package/templates/skills/review/SKILL.md +346 -130
- package/templates/skills/task-work/SKILL.md +93 -103
- package/dist/web-ui/_app/immutable/assets/0.BxCxvrZR.css +0 -1
- package/dist/web-ui/_app/immutable/chunks/B-CZR0q8.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/B1IR5Su5.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/B_Cvvtc4.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/BtFaGGII.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/Bu8JVsCH.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/C87u-CNA.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/CrFkBTYp.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/D6RtLpzL.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/D7FHSgx2.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/DBXrsxZQ.js +0 -2
- package/dist/web-ui/_app/immutable/chunks/Da_hHMuA.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/Do6LchSF.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/DoNPtcAw.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/DtUbXRZz.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/DyFPRlLl.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/DzAP8lRM.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/DzVXElzN.js +0 -2
- package/dist/web-ui/_app/immutable/chunks/aoPBFken.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/laxtrUO3.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/q1nIWgqB.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/sTLbk5Nm.js +0 -1
- package/dist/web-ui/_app/immutable/chunks/vwKgQu5P.js +0 -5
- package/dist/web-ui/_app/immutable/entry/app.BCwMcqnT.js +0 -2
- package/dist/web-ui/_app/immutable/entry/start.wKCQH-tt.js +0 -1
- package/dist/web-ui/_app/immutable/nodes/0.CjGVMG74.js +0 -1
- package/dist/web-ui/_app/immutable/nodes/1.B6_AIPan.js +0 -1
- package/dist/web-ui/_app/immutable/nodes/2.q4oCS7Ws.js +0 -1
- package/dist/web-ui/_app/immutable/nodes/3.rTKZf9o2.js +0 -1
- package/dist/web-ui/_app/immutable/nodes/4.DVIDRu1d.js +0 -1
- package/dist/web-ui/_app/immutable/nodes/5.8PtPXIOd.js +0 -1
- package/dist/web-ui/_app/immutable/nodes/6.ZZrTemy_.js +0 -1
- package/dist/web-ui/_app/immutable/nodes/7.IP-gxCxi.js +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{f as g,a as u,c as P,t as St}from"../chunks/y4GeEH6k.js";import{o as An,a as Un}from"../chunks/oTsvd9y4.js";import{p as ne,y as Tt,g as a,b as te,c as i,d as L,s as c,r,t as q,a as se,u as H,f as R,e as Qe,n as We,Q as Dt}from"../chunks/CaAJD3dl.js";import{s as S,d as Zt,e as Gn}from"../chunks/DqT6OH_u.js";import{p as rt,b as Cn,i as m,s as Je,r as Ve}from"../chunks/Dg_zDpDS.js";import{ad as Wn,y as kt,l as Ye,a as Nn,ai as Qn,q as In,p as De,h as At,B as Jn,A as Vn,j as Ln,d as nt,aj as Yn,b as Zn,ak as Xn}from"../chunks/Dd5umPsk.js";import{s as $n,a as es}from"../chunks/ChQD-6N8.js";import{p as ts}from"../chunks/gPrj-hqC.js";import{s as ns,o as ss,b as as,a as rs,u as is,c as os}from"../chunks/ChB5iyEL.js";import{b as Ot,c as ds,d as ls,e as cs,s as us,h as vs,i as ln,f as cn,j as un,g as fs,k as gs,l as vn,p as fn,m as gn,n as ms}from"../chunks/CS2sa4_m.js";import{n as _s,i as hs,s as xs,d as bs,b as ks,h as Mn,r as ys}from"../chunks/fZMteyca.js";import{C as On}from"../chunks/Yyz1XMQA.js";import{I as Ze}from"../chunks/C5_PAZ0y.js";import{C as ws}from"../chunks/70-t_QvE.js";import{X as mn}from"../chunks/GFTX8GgV.js";import{S as ct}from"../chunks/htcWMiYN.js";import{R as _n}from"../chunks/DJtZNgcs.js";import{B as Es}from"../chunks/C_7MTDoj.js";import{C as Ss}from"../chunks/T3vGWjIL.js";import{Z as Ts}from"../chunks/B5e5HYyB.js";import{T as As}from"../chunks/DqK4iHp0.js";import{F as Cs}from"../chunks/Dc7ZCC5m.js";import{C as Ns}from"../chunks/DbU6lVn0.js";import"../chunks/DxJw79Wi.js";import{b as Is}from"../chunks/CDRO15Iv.js";const Ct=1,Gt=2,Xt=3,$t=4,en=5,tn=6,nn=7,sn=8,Nt=9,It=10,Wt=11,yt=12,ut=13,vt=14,ft=15,gt=16,st=17,Qt=18,le=19,mt=20,He=21,pn=22,_t=23,Lt=24,it=25,qn=26,Jt=27,wt=28,Et=29,Ee=30,_e=31,xt=101,hn=102,Bn=103,xn=104,zt=105,Mt=1,Hn=2,an=4,Dn=8,zn=16,bn={Href:Mt,Lang:an};function Ls(e){switch(e){case Mt:return"href";case Hn:return"src";case an:return"class";case Dn:return"checked";case zn:return"start"}}const Ms=e=>{switch(e){case 1:return Xt;case 2:return $t;case 3:return en;case 4:return tn;case 5:return nn;default:return sn}},Os=Ms,kn=24;function Rt(e){const t=new Uint32Array(kn);return t[0]=Ct,{renderer:e,text:"",pending:"",tokens:t,len:0,token:Ct,fence_end:0,blockquote_idx:0,hr_char:"",hr_chars:0,fence_start:0,spaces:new Uint8Array(kn),indent:"",indent_len:0,table_state:0}}function yn(e){e.pending.length>0&&Y(e,`
|
|
2
|
+
`)}function M(e){e.text.length!==0&&(console.assert(e.len>0,"Never adding text to root"),e.renderer.add_text(e.renderer.data,e.text),e.text="")}function F(e){console.assert(e.len>0,"No nodes to end"),e.len-=1,e.token=e.tokens[e.len],e.renderer.end_token(e.renderer.data)}function O(e,t){(e.tokens[e.len]===Lt||e.tokens[e.len]===_t)&&t!==it&&F(e),e.len+=1,e.tokens[e.len]=t,e.token=t,e.renderer.add_token(e.renderer.data,t)}function ps(e,t,n){for(;n<=e.len;){if(e.tokens[n]===t)return n;n+=1}return-1}function Ge(e,t){for(e.fence_start=0;e.len>t;)F(e)}function bt(e,t){let n=0;for(let s=0;s<=e.len&&(t-=e.spaces[s],!(t<0));s+=1)switch(e.tokens[s]){case Nt:case It:case mt:case it:n=s;break}for(;e.len>n;)F(e);return t}function Ft(e,t){let n=-1,s=-1;for(let l=e.blockquote_idx+1;l<=e.len;l+=1)if(e.tokens[l]===it){if(e.indent_len<e.spaces[l]){s=-1;break}s=l}else e.tokens[l]===t&&(n=l);return s===-1?n===-1?(Ge(e,e.blockquote_idx),O(e,t),!0):(Ge(e,n),!1):(Ge(e,s),O(e,t),!0)}function jt(e,t){O(e,it),e.spaces[e.len]=e.indent_len+t,Se(e),e.token=Bn}function Se(e){e.indent="",e.indent_len=0,e.pending=""}function Vt(e){switch(e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return!0;default:return!1}}function qs(e){switch(e){case 32:case 58:case 59:case 41:case 44:case 33:case 46:case 63:case 93:case 10:return!0;default:return!1}}function Bs(e){return Vt(e)||qs(e)}function Y(e,t){for(const n of t){if(e.token===xt){switch(n){case" ":e.indent_len+=1;continue;case" ":e.indent_len+=4;continue}let l=bt(e,e.indent_len);e.indent_len=0,e.token=e.tokens[e.len],l>0&&Y(e," ".repeat(l))}const s=e.pending+n;switch(e.token){case He:case Ct:case mt:case Lt:case _t:switch(console.assert(e.text.length===0,"Root should not have any text"),e.pending[0]){case void 0:e.pending=n;continue;case" ":console.assert(e.pending.length===1),e.pending=n,e.indent+=" ",e.indent_len+=1;continue;case" ":console.assert(e.pending.length===1),e.pending=n,e.indent+=" ",e.indent_len+=4;continue;case`
|
|
3
|
+
`:if(console.assert(e.pending.length===1),e.tokens[e.len]===it&&e.token===He){F(e),Se(e),e.pending=n;continue}Ge(e,e.blockquote_idx),Se(e),e.blockquote_idx=0,e.fence_start=0,e.pending=n;continue;case"#":switch(n){case"#":if(e.pending.length<6){e.pending=s;continue}break;case" ":bt(e,e.indent_len),O(e,Os(e.pending.length)),Se(e);continue}break;case">":{const d=ps(e,mt,e.blockquote_idx+1);d===-1?(Ge(e,e.blockquote_idx),e.blockquote_idx+=1,e.fence_start=0,O(e,mt)):e.blockquote_idx=d,Se(e),e.pending=n;continue}case"-":case"*":case"_":if(e.hr_chars===0&&(console.assert(e.pending.length===1,"Pending should be one character"),e.hr_chars=1,e.hr_char=e.pending),e.hr_chars>0){switch(n){case e.hr_char:e.hr_chars+=1,e.pending=s;continue;case" ":e.pending=s;continue;case`
|
|
4
|
+
`:if(e.hr_chars<3)break;bt(e,e.indent_len),e.renderer.add_token(e.renderer.data,pn),e.renderer.end_token(e.renderer.data),Se(e),e.hr_chars=0;continue}e.hr_chars=0}if(e.pending[0]!=="_"&&e.pending[1]===" "){Ft(e,_t),jt(e,2),Y(e,s.slice(2));continue}break;case"`":if(e.pending.length<3){if(n==="`"){e.pending=s,e.fence_start=s.length;continue}e.fence_start=0;break}switch(n){case"`":e.pending.length===e.fence_start?(e.pending=s,e.fence_start=s.length):(O(e,Gt),Se(e),e.fence_start=0,Y(e,s));continue;case`
|
|
5
|
+
`:{bt(e,e.indent_len),O(e,It),e.pending.length>e.fence_start&&e.renderer.set_attr(e.renderer.data,an,e.pending.slice(e.fence_start)),Se(e),e.token=xt;continue}default:e.pending=s;continue}case"+":if(n!==" ")break;Ft(e,_t),jt(e,2);continue;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":if(e.pending[e.pending.length-1]==="."){if(n!==" ")break;Ft(e,Lt)&&e.pending!=="1."&&e.renderer.set_attr(e.renderer.data,zn,e.pending.slice(0,-1)),jt(e,e.pending.length+1);continue}else{const d=n.charCodeAt(0);if(d===46||Vt(d)){e.pending=s;continue}}break;case"|":Ge(e,e.blockquote_idx),O(e,Jt),O(e,wt),e.pending="",Y(e,n);continue}let l=s;if(e.token===He)e.token=e.tokens[e.len],e.renderer.add_token(e.renderer.data,He),e.renderer.end_token(e.renderer.data);else if(e.indent_len>=4){let d=0;for(;d<4;d+=1)if(e.indent[d]===" "){d=d+1;break}l=e.indent.slice(d)+s,O(e,Nt)}else O(e,Gt);Se(e),Y(e,l);continue;case Jt:if(e.table_state===1)switch(n){case"-":case" ":case"|":case":":e.pending=s;continue;case`
|
|
6
|
+
`:e.table_state=2,e.pending="";continue;default:F(e),e.table_state=0;break}else switch(e.pending){case"|":O(e,wt),e.pending="",Y(e,n);continue;case`
|
|
7
|
+
`:F(e),e.pending="",e.table_state=0,Y(e,n);continue}break;case wt:switch(e.pending){case"":break;case"|":O(e,Et),F(e),e.pending="",Y(e,n);continue;case`
|
|
8
|
+
`:F(e),e.table_state=Math.min(e.table_state+1,2),e.pending="",Y(e,n);continue;default:O(e,Et),Y(e,n);continue}break;case Et:if(e.pending==="|"){M(e),F(e),e.pending="",Y(e,n);continue}break;case Nt:switch(s){case`
|
|
9
|
+
`:case`
|
|
10
|
+
`:case`
|
|
11
|
+
`:case`
|
|
12
|
+
`:case`
|
|
13
|
+
`:e.text+=`
|
|
14
|
+
`,e.pending="";continue;case`
|
|
15
|
+
`:case`
|
|
16
|
+
`:case`
|
|
17
|
+
`:case`
|
|
18
|
+
`:e.pending=s;continue;default:e.pending.length!==0?(M(e),F(e),e.pending=n):e.text+=n;continue}case It:switch(n){case"`":e.pending=s;continue;case`
|
|
19
|
+
`:if(s.length===e.fence_start+e.fence_end+1){M(e),F(e),e.pending="",e.fence_start=0,e.fence_end=0,e.token=xt;continue}e.token=xt;break;case" ":if(e.pending[0]===`
|
|
20
|
+
`){e.pending=s,e.fence_end+=1;continue}break}e.text+=e.pending,e.pending=n,e.fence_end=1;continue;case Wt:switch(n){case"`":s.length===e.fence_start+ +(e.pending[0]===" ")?(M(e),F(e),e.pending="",e.fence_start=0):e.pending=s;continue;case`
|
|
21
|
+
`:e.text+=e.pending,e.pending="",e.token=He,e.blockquote_idx=0,M(e);continue;case" ":e.text+=e.pending,e.pending=n;continue;default:e.text+=s,e.pending="";continue}case Bn:switch(e.pending.length){case 0:if(n!=="[")break;e.pending=s;continue;case 1:if(n!==" "&&n!=="x")break;e.pending=s;continue;case 2:if(n!=="]")break;e.pending=s;continue;case 3:if(n!==" ")break;e.renderer.add_token(e.renderer.data,qn),e.pending[1]==="x"&&e.renderer.set_attr(e.renderer.data,Dn,""),e.renderer.end_token(e.renderer.data),e.pending=" ";continue}e.token=e.tokens[e.len],e.pending="",Y(e,s);continue;case vt:case ft:{let d="*",o=yt;if(e.token===ft&&(d="_",o=ut),d===e.pending){if(M(e),d===n){F(e),e.pending="";continue}O(e,o),e.pending=n;continue}break}case yt:case ut:{let d="*",o=vt;switch(e.token===ut&&(d="_",o=ft),e.pending){case d:d===n?e.tokens[e.len-1]===o?e.pending=s:(M(e),O(e,o),e.pending=""):(M(e),F(e),e.pending=n);continue;case d+d:const f=e.token;M(e),F(e),F(e),d!==n?(O(e,f),e.pending=n):e.pending="";continue}break}case gt:if(s==="~~"){M(e),F(e),e.pending="";continue}break;case zt:n===`
|
|
22
|
+
`?(M(e),O(e,Ee),e.pending=""):(e.token=e.tokens[e.len],e.pending[0]==="\\"?e.text+="[":e.text+="$$",e.pending="",Y(e,n));continue;case Ee:if(s==="\\]"||s==="$$"){M(e),F(e),e.pending="";continue}break;case _e:if(s==="\\)"||e.pending[0]==="$"){M(e),F(e),n===")"?e.pending="":e.pending=n;continue}break;case hn:s==="http://"||s==="https://"?(M(e),O(e,Qt),e.pending=s,e.text=s):"http:/"[e.pending.length]===n||"https:/"[e.pending.length]===n?e.pending=s:(e.token=e.tokens[e.len],Y(e,n));continue;case st:case le:if(e.pending==="]"){M(e),n==="("?e.pending=s:(F(e),e.pending=n);continue}if(e.pending[0]==="]"&&e.pending[1]==="("){if(n===")"){const d=e.token===st?Mt:Hn,o=e.pending.slice(2);e.renderer.set_attr(e.renderer.data,d,o),F(e),e.pending=""}else e.pending+=n;continue}break;case Qt:n===" "||n===`
|
|
23
|
+
`||n==="\\"?(e.renderer.set_attr(e.renderer.data,Mt,e.pending),M(e),F(e),e.pending=n):(e.text+=n,e.pending=s);continue;case xn:if(s.startsWith("<br")){if(s.length===3||n===" "||n==="/"&&(s.length===4||e.pending[e.pending.length-1]===" ")){e.pending=s;continue}if(n===">"){M(e),e.token=e.tokens[e.len],e.renderer.add_token(e.renderer.data,He),e.renderer.end_token(e.renderer.data),e.pending="";continue}}e.token=e.tokens[e.len],e.text+="<",e.pending=e.pending.slice(1),Y(e,n);continue}switch(e.pending[0]){case"\\":if(e.token===le||e.token===Ee||e.token===_e)break;switch(n){case"(":M(e),O(e,_e),e.pending="";continue;case"[":e.token=zt,e.pending=s;continue;case`
|
|
24
|
+
`:e.pending=n;continue;default:let l=n.charCodeAt(0);e.pending="",e.text+=Vt(l)||l>=65&&l<=90||l>=97&&l<=122?s:n;continue}case`
|
|
25
|
+
`:switch(e.token){case le:case Ee:case _e:break;case Xt:case $t:case en:case tn:case nn:case sn:M(e),Ge(e,e.blockquote_idx),e.blockquote_idx=0,e.pending=n;continue;default:M(e),e.pending=n,e.token=He,e.blockquote_idx=0;continue}break;case"<":if(e.token!==le&&e.token!==Ee&&e.token!==_e){M(e),e.pending=s,e.token=xn;continue}break;case"`":if(e.token===le)break;n==="`"?(e.fence_start+=1,e.pending=s):(e.fence_start+=1,M(e),O(e,Wt),e.text=n===" "||n===`
|
|
26
|
+
`?"":n,e.pending="");continue;case"_":case"*":{if(e.token===le||e.token===Ee||e.token===_e||e.token===vt)break;let l=yt,d=vt;const o=e.pending[0];if(o==="_"&&(l=ut,d=ft),e.pending.length===1){if(o===n){e.pending=s;continue}if(n!==" "&&n!==`
|
|
27
|
+
`){M(e),O(e,l),e.pending=n;continue}}else{if(o===n){M(e),O(e,d),O(e,l),e.pending="";continue}if(n!==" "&&n!==`
|
|
28
|
+
`){M(e),O(e,d),e.pending=n;continue}}break}case"~":if(e.token!==le&&e.token!==gt){if(e.pending==="~"){if(n==="~"){e.pending=s;continue}}else if(n!==" "&&n!==`
|
|
29
|
+
`){M(e),O(e,gt),e.pending=n;continue}}break;case"$":if(e.token!==le&&e.token!==gt&&e.pending==="$")if(n==="$"){e.token=zt,e.pending=s;continue}else{if(Bs(n.charCodeAt(0)))break;M(e),O(e,_e),e.pending=n;continue}break;case"[":if(e.token!==le&&e.token!==st&&e.token!==Ee&&e.token!==_e&&n!=="]"){M(e),O(e,st),e.pending=n;continue}break;case"!":if(e.token!==le&&n==="["){M(e),O(e,le),e.pending="";continue}break;case" ":if(e.pending.length===1&&n===" ")continue;break}if(e.token!==le&&e.token!==st&&e.token!==Ee&&e.token!==_e&&n==="h"&&(e.pending===" "||e.pending==="")){e.text+=e.pending,e.pending=n,e.token=hn;continue}e.text+=e.pending,e.pending=n}M(e)}function Hs(e){return{add_token:Ds,end_token:zs,add_text:Rs,set_attr:Fs,data:{nodes:[e,,,,,],index:0}}}function Ds(e,t){let n=e.nodes[e.index],s;switch(t){case Ct:return;case mt:s=document.createElement("blockquote");break;case Gt:s=document.createElement("p");break;case He:s=document.createElement("br");break;case pn:s=document.createElement("hr");break;case Xt:s=document.createElement("h1");break;case $t:s=document.createElement("h2");break;case en:s=document.createElement("h3");break;case tn:s=document.createElement("h4");break;case nn:s=document.createElement("h5");break;case sn:s=document.createElement("h6");break;case yt:case ut:s=document.createElement("em");break;case vt:case ft:s=document.createElement("strong");break;case gt:s=document.createElement("s");break;case Wt:s=document.createElement("code");break;case Qt:case st:s=document.createElement("a");break;case le:s=document.createElement("img");break;case _t:s=document.createElement("ul");break;case Lt:s=document.createElement("ol");break;case it:s=document.createElement("li");break;case qn:let l=s=document.createElement("input");l.type="checkbox",l.disabled=!0;break;case Nt:case It:n=n.appendChild(document.createElement("pre")),s=document.createElement("code");break;case Jt:s=document.createElement("table");break;case wt:switch(n.children.length){case 0:n=n.appendChild(document.createElement("thead"));break;case 1:n=n.appendChild(document.createElement("tbody"));break;default:n=n.children[1]}s=document.createElement("tr");break;case Et:s=document.createElement(n.parentElement?.tagName==="THEAD"?"th":"td");break;case Ee:s=document.createElement("equation-block");break;case _e:s=document.createElement("equation-inline");break}e.nodes[++e.index]=n.appendChild(s)}function zs(e){e.index-=1}function Rs(e,t){e.nodes[e.index].appendChild(document.createTextNode(t))}function Fs(e,t,n){e.nodes[e.index].setAttribute(Ls(t),n)}function Kt(e){const t=Hs(e),n=t.set_attr;return t.set_attr=(s,l,d)=>{if(l===bn.Lang){const o=_s(d)??d.toLowerCase();n(s,l,`language-${o}`);const f=s.nodes[s.index];f instanceof HTMLElement&&(f.dataset.language=o);return}if(n(s,l,d),l===bn.Href){const o=s.nodes[s.index];o instanceof HTMLAnchorElement&&hs(d)&&(o.target="_blank",o.rel="noopener noreferrer")}},t}function wn(e){e.innerHTML=xs(e.innerHTML),bs(e),ks(e)}function js(){return{request(e){return globalThis.requestAnimationFrame?globalThis.requestAnimationFrame(e):Number(globalThis.setTimeout(()=>e(Date.now()),16))},cancel(e){if(globalThis.cancelAnimationFrame){globalThis.cancelAnimationFrame(e);return}clearTimeout(e)}}}function Ks(e,t={}){const n=t.scheduler??js();let s=Rt(Kt(e)),l="",d,o=!1,f="",h=null;function I(){if(!s||!f)return;const b=f;f="",Y(s,b),t.onChunkFlush?.(b)}function x(b){b&&(f+=b,h===null&&(h=n.request(()=>{h=null,I()})))}function k(){h!==null&&(n.cancel(h),h=null)}function D(b=""){k(),f="",o=!1,l="",e.innerHTML="",s=Rt(Kt(e)),b&&(x(b),l=b)}function B(){!s||o||(k(),I(),yn(s),wn(e),o=!0)}function T(b){k(),f="",e.innerHTML="",s=Rt(Kt(e)),l=b,b&&(Y(s,b),yn(s),wn(e)),o=!0}return{update(b,w){const C=b??"";if(w){o=!1,C!==l&&(C.startsWith(l)?x(C.slice(l.length)):D(C),l=C),d=!0;return}if(d){if(C!==l){if(C.startsWith(l))x(C.slice(l.length));else{T(C),d=!1;return}l=C}B(),d=!1;return}(!o||C!==l)&&T(C),d=!1},destroy(){k(),s=null,f=""}}}var Ps=g('<span class="ds-streaming-cursor" aria-hidden="true"></span>'),Us=g('<div><div data-testid="streaming-markdown"></div> <!></div>');function Gs(e,t){ne(t,!0);let n=rt(t,"content",3,""),s=rt(t,"isStreaming",3,!1),l=rt(t,"class",3,""),d=te(void 0),o=null;Tt(()=>{a(d)&&(o??=Ks(a(d)),o.update(n()??"",s()))}),An(()=>()=>{o?.destroy(),o=null});var f=Us(),h=i(f);Cn(h,k=>L(d,k),()=>a(d));var I=c(h,2);{var x=k=>{var D=Ps();D.textContent="▊",u(k,D)};m(I,k=>{s()&&k(x)})}r(f),q(k=>kt(f,1,k,"svelte-129uqb5"),[()=>Wn(`streaming-markdown prose prose-sm dark:prose-invert max-w-none break-words leading-relaxed ${l()}`.trim())]),u(e,f),se()}var Ws=g('<span class="ds-session-active-dot size-1.5 rounded-full bg-primary inline-block"></span>'),Qs=g('<div class="text-sm break-words leading-relaxed prose prose-sm dark:prose-invert max-w-none" data-testid="message-content"><!></div>'),Js=g('<div class="py-2" data-testid="message-block"><div class="flex items-start gap-3"><div class="flex-shrink-0 w-7 h-7 rounded-full bg-primary/10 flex items-center justify-center"><span class="text-xs font-bold text-primary">A</span></div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1"><span class="text-xs font-medium text-muted-foreground">Agent</span> <span class="text-[10px] text-muted-foreground/60 font-mono"> </span> <!></div> <!></div></div></div>');function Vs(e,t){ne(t,!0);const n=H(()=>t.block.isStreaming?"":ys(t.block.content));var s=Js(),l=i(s),d=c(i(l),2),o=i(d),f=c(i(o),2),h=i(f,!0);r(f);var I=c(f,2);{var x=T=>{var b=Ws();u(T,b)};m(I,T=>{t.block.isStreaming&&T(x)})}r(o);var k=c(o,2);{var D=T=>{Gs(T,{get content(){return t.block.content},isStreaming:!0})},B=T=>{var b=Qs(),w=i(b);Mn(w,()=>a(n)),r(b),u(T,b)};m(k,T=>{t.block.isStreaming?T(D):T(B,!1)})}r(d),r(l),r(s),q(T=>S(h,T),[()=>Ot(t.block.timestamp)]),u(e,s),se()}const En=/\x1b\[(\??[0-9;]*)([A-Za-z])/g,Yt=/\[(\??[0-9]+(?:;[0-9]+)*)([A-HJKSTfhilmnpsu])/g;function Pt(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Rn(){return{bold:!1,dim:!1,italic:!1,underline:!1,strikethrough:!1,fg:null,bg:null}}const at=["black","red","green","yellow","blue","magenta","cyan","white"];function Sn(e){if(e<8)return`var(--ansi-${at[e]})`;if(e<16)return`var(--ansi-bright-${at[e-8]})`;if(e<232){const n=e-16,s=Math.floor(n/36),l=Math.floor(n%36/6),d=n%6,o=f=>f===0?0:55+f*40;return`rgb(${o(s)},${o(l)},${o(d)})`}const t=8+(e-232)*10;return`rgb(${t},${t},${t})`}function Ys(e,t){let n=0;for(;n<e.length;){const s=e[n];switch(s){case 0:Object.assign(t,Rn());break;case 1:t.bold=!0;break;case 2:t.dim=!0;break;case 3:t.italic=!0;break;case 4:t.underline=!0;break;case 9:t.strikethrough=!0;break;case 22:t.bold=!1,t.dim=!1;break;case 23:t.italic=!1;break;case 24:t.underline=!1;break;case 29:t.strikethrough=!1;break;case 39:t.fg=null;break;case 49:t.bg=null;break;default:s>=30&&s<=37?t.fg=`var(--ansi-${at[s-30]})`:s>=40&&s<=47?t.bg=`var(--ansi-${at[s-40]})`:s>=90&&s<=97?t.fg=`var(--ansi-bright-${at[s-90]})`:s>=100&&s<=107?t.bg=`var(--ansi-bright-${at[s-100]})`:s===38?e[n+1]===5&&n+2<e.length?(t.fg=Sn(e[n+2]),n+=2):e[n+1]===2&&n+4<e.length&&(t.fg=`rgb(${e[n+2]},${e[n+3]},${e[n+4]})`,n+=4):s===48&&(e[n+1]===5&&n+2<e.length?(t.bg=Sn(e[n+2]),n+=2):e[n+1]===2&&n+4<e.length&&(t.bg=`rgb(${e[n+2]},${e[n+3]},${e[n+4]})`,n+=4));break}n++}}function Zs(e){const t=[];e.fg&&t.push(`color:${e.fg}`),e.bg&&t.push(`background-color:${e.bg}`),e.bold&&t.push("font-weight:bold"),e.dim&&t.push("opacity:0.6"),e.italic&&t.push("font-style:italic");const n=[];return e.underline&&n.push("underline"),e.strikethrough&&n.push("line-through"),n.length&&t.push(`text-decoration:${n.join(" ")}`),t.join(";")}function Xs(e){return e.bold||e.dim||e.italic||e.underline||e.strikethrough||e.fg!==null||e.bg!==null}function $s(e){return e.includes("\x1B[")?!0:(Yt.lastIndex=0,Yt.test(e))}function Ut(e){return e.replace(Yt,"")}function ea(e,t){if(e.length<=t)return e;let n=e.slice(0,t);return n=n.replace(/\x1b(?:\[[\x20-\x3f]*)?$/,""),n}function ta(e){if(!e.includes("\x1B["))return Pt(Ut(e));const t=Rn(),n=[];let s=0,l=!1;En.lastIndex=0;let d;for(;(d=En.exec(e))!==null;){if(d.index>s){const h=Ut(e.slice(s,d.index));h&&n.push(Pt(h))}s=d.index+d[0].length;const o=d[1];if(d[2]==="m"&&!o.startsWith("?")){const h=o===""?[0]:o.split(";").map(I=>parseInt(I,10)||0);if(Ys(h,t),l&&(n.push("</span>"),l=!1),Xs(t)){const I=Zs(t);n.push(`<span style="${I}">`),l=!0}}}if(s<e.length){const o=Ut(e.slice(s));o&&n.push(Pt(o))}return l&&n.push("</span>"),n.join("")}function Tn(e,t){ne(t,!0);let n=Ve(t,["$$slots","$$events","$$legacy"]);const s=[["path",{d:"M12 2v4"}],["path",{d:"m16.2 7.8 2.9-2.9"}],["path",{d:"M18 12h4"}],["path",{d:"m16.2 16.2 2.9 2.9"}],["path",{d:"M12 18v4"}],["path",{d:"m4.9 19.1 2.9-2.9"}],["path",{d:"M2 12h4"}],["path",{d:"m4.9 4.9 2.9 2.9"}]];Ze(e,Je({name:"loader"},()=>n,{get iconNode(){return s},children:(l,d)=>{var o=P(),f=R(o);Ye(f,()=>t.children??Qe),u(l,o)},$$slots:{default:!0}})),se()}function na(e,t){ne(t,!0);let n=Ve(t,["$$slots","$$events","$$legacy"]);const s=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];Ze(e,Je({name:"refresh-cw"},()=>n,{get iconNode(){return s},children:(l,d)=>{var o=P(),f=R(o);Ye(f,()=>t.children??Qe),u(l,o)},$$slots:{default:!0}})),se()}var sa=g('<span class="text-xs text-muted-foreground truncate min-w-0"> </span>'),aa=g('<span class="text-[10px] text-muted-foreground font-mono ml-auto flex-shrink-0 whitespace-nowrap"> </span>'),ra=g('<div><p class="text-[10px] font-medium text-muted-foreground uppercase tracking-wide mb-1">Input</p> <pre class="text-xs font-mono bg-secondary/50 rounded p-2 overflow-x-auto max-h-60 whitespace-pre-wrap break-words"> </pre></div>'),ia=g('<div class="flex items-center gap-2 text-xs text-muted-foreground py-2" data-testid="tool-output-loading"><!> Loading output...</div>'),oa=g('<div class="flex items-center gap-2 text-xs text-destructive py-2" data-testid="tool-output-error"><!> Failed to load output <button class="text-primary hover:underline ml-1" data-testid="tool-output-retry"><!> Retry</button></div>'),da=g('<span class="text-destructive">(error)</span>'),la=g("<pre><!></pre>"),ca=g("<pre> </pre>"),ua=g('<button class="text-xs text-primary hover:underline mt-1"> </button>'),va=g('<div><p class="text-[10px] font-medium text-muted-foreground uppercase tracking-wide mb-1">Output <!></p> <!> <!></div>'),fa=g('<div class="text-xs text-muted-foreground py-1" data-testid="tool-output-pending">Tool is running...</div>'),ga=g('<div class="px-3 pb-3 space-y-2"><!> <!></div>'),ma=g('<div data-testid="tool-call-block"><button class="flex items-center gap-2 w-full px-3 py-2 text-left text-sm hover:bg-accent/30 transition-colors overflow-hidden"><!> <span class="text-xs text-muted-foreground font-mono flex-shrink-0 whitespace-nowrap"> </span> <span class="inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-mono bg-secondary min-w-0 max-w-[40%]"><span class="flex-shrink-0"> </span> <span class="truncate"> </span></span> <!> <!> <!></button> <!></div>');function _a(e,t){ne(t,!0);let n=te(!1),s=H(()=>t.block.status==="completed"?"border-l-status-completed":t.block.status==="failed"?"border-l-status-blocked":"border-l-status-pending-review"),l=H(()=>ds(t.block.toolName)),d=H(()=>ls(t.block.toolName,t.block.input)),o=H(()=>t.block.resultSeq??t.block.seq),f=H(()=>a(n)&&a(o)>=0&&t.block.output===void 0);const h=Nn(()=>({queryKey:In.sessions.eventDetail(t.sessionId,a(o)),queryFn:()=>Qn(t.sessionId,a(o)),enabled:a(f),staleTime:1/0}));let I=H(()=>{if(!h.data)return;const v=h.data.data;if(!v)return;const A=v.sessionUpdate?v:v.update;if(A)return A.rawOutput??A.output??A.content}),x=H(()=>t.block.output??a(I));function k(v){if(typeof v=="string")return v;try{return JSON.stringify(v,null,2)}catch{return String(v)}}function D(v){if(typeof v=="string")return v;try{return JSON.stringify(v,null,2)}catch{return String(v)}}let B=H(()=>a(x)!==void 0?k(a(x)):""),T=H(()=>ea(a(B),1e3)),b=H(()=>a(B).length>1e3),w=te(!1),C=H(()=>$s(a(B))),ae=H(()=>a(C)?ta(a(w)?a(B):a(T)):"");var y=ma(),N=i(y);N.__click=()=>L(n,!a(n));var Z=i(N);{let v=H(()=>a(n)?"rotate-90":"");On(Z,{get class(){return`size-3.5 flex-shrink-0 text-muted-foreground transition-transform ${a(v)??""}`}})}var re=c(Z,2),ie=i(re,!0);r(re);var j=c(re,2),K=i(j),he=i(K,!0);r(K);var ve=c(K,2),ze=i(ve,!0);r(ve),r(j);var fe=c(j,2);{var oe=v=>{Tn(v,{class:"size-3.5 flex-shrink-0 text-status-pending-review ds-tool-spin"})},Te=v=>{var A=P(),W=R(A);{var ue=J=>{ws(J,{class:"size-3.5 flex-shrink-0 text-status-completed"})},Q=J=>{var Ne=P(),V=R(Ne);{var U=X=>{mn(X,{class:"size-3.5 flex-shrink-0 text-status-blocked"})};m(V,X=>{t.block.status==="failed"&&X(U)},!0)}u(J,Ne)};m(W,J=>{t.block.status==="completed"?J(ue):J(Q,!1)},!0)}u(v,A)};m(fe,v=>{t.block.status==="running"?v(oe):v(Te,!1)})}var xe=c(fe,2);{var Ae=v=>{var A=sa(),W=i(A,!0);r(A),q(()=>S(W,a(d))),u(v,A)};m(xe,v=>{!a(n)&&a(d)&&v(Ae)})}var Re=c(xe,2);{var ce=v=>{var A=aa(),W=i(A,!0);r(A),q(ue=>S(W,ue),[()=>cs(t.block.durationMs)]),u(v,A)};m(Re,v=>{t.block.durationMs!==void 0&&v(ce)})}r(N);var Ce=c(N,2);{var E=v=>{var A=ga(),W=i(A);{var ue=V=>{var U=ra(),X=c(i(U),2),ge=i(X,!0);r(X),r(U),q(Ie=>S(ge,Ie),[()=>D(t.block.input)]),u(V,U)};m(W,V=>{t.block.input&&V(ue)})}var Q=c(W,2);{var J=V=>{var U=ia(),X=i(U);Tn(X,{class:"size-3.5 ds-tool-spin"}),We(),r(U),u(V,U)},Ne=V=>{var U=P(),X=R(U);{var ge=Le=>{var be=oa(),Fe=i(be);mn(Fe,{class:"size-3.5"});var je=c(Fe,2);je.__click=()=>h.refetch();var Xe=i(je);na(Xe,{class:"size-3 inline"}),We(),r(je),r(be),u(Le,be)},Ie=Le=>{var be=P(),Fe=R(be);{var je=ke=>{var Me=va(),Oe=i(Me),ot=c(i(Oe));{var pe=$=>{var G=da();u($,G)};m(ot,$=>{t.block.status==="failed"&&$(pe)})}r(Oe);var Ke=c(Oe,2);{var dt=$=>{var G=la(),qe=i(G);Mn(qe,()=>a(ae)),r(G),q(()=>kt(G,1,`text-xs font-mono bg-secondary/50 rounded p-2 overflow-x-auto max-h-80 whitespace-pre-wrap break-words ${t.block.status==="failed"?"text-destructive":""}`)),u($,G)},lt=$=>{var G=ca(),qe=i(G,!0);r(G),q(()=>{kt(G,1,`text-xs font-mono bg-secondary/50 rounded p-2 overflow-x-auto max-h-80 whitespace-pre-wrap break-words ${t.block.status==="failed"?"text-destructive":""}`),S(qe,a(w)?a(B):a(T))}),u($,G)};m(Ke,$=>{a(C)?$(dt):$(lt,!1)})}var pt=c(Ke,2);{var ht=$=>{var G=ua();G.__click=()=>L(w,!0);var qe=i(G);r(G),q(qt=>S(qe,`Show full output (${qt??""} chars)`),[()=>a(B).length.toLocaleString()]),u($,G)};m(pt,$=>{a(b)&&!a(w)&&$(ht)})}r(Me),u(ke,Me)},Xe=ke=>{var Me=P(),Oe=R(Me);{var ot=pe=>{var Ke=fa();u(pe,Ke)};m(Oe,pe=>{t.block.status==="running"&&pe(ot)},!0)}u(ke,Me)};m(Fe,ke=>{a(x)!==void 0?ke(je):ke(Xe,!1)},!0)}u(Le,be)};m(X,Le=>{a(f)&&h.isError?Le(ge):Le(Ie,!1)},!0)}u(V,U)};m(Q,V=>{a(f)&&h.isLoading?V(J):V(Ne,!1)})}r(A),u(v,A)};m(Ce,v=>{a(n)&&v(E)})}r(y),q(v=>{kt(y,1,`border-l-2 ${a(s)??""} rounded-r-md bg-card/50`),De(y,"data-tool-call-id",t.block.toolCallId),De(N,"aria-expanded",a(n)),S(ie,v),S(he,a(l)),S(ze,t.block.toolName)},[()=>Ot(t.block.startedAt)]),u(e,y),se()}Zt(["click"]);function ha(e,t){ne(t,!0);let n=Ve(t,["$$slots","$$events","$$legacy"]);const s=[["path",{d:"M12 18V5"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77"}]];Ze(e,Je({name:"brain"},()=>n,{get iconNode(){return s},children:(l,d)=>{var o=P(),f=R(o);Ye(f,()=>t.children??Qe),u(l,o)},$$slots:{default:!0}})),se()}var xa=g('<span class="ds-session-active-dot size-1.5 rounded-full bg-design-ring inline-block"></span>'),ba=g('<span class="text-xs text-muted-foreground/60 truncate flex-1 italic"> </span>'),ka=g('<div class="px-3 pb-3"><pre class="text-xs font-mono text-muted-foreground/80 whitespace-pre-wrap break-words max-h-96 overflow-y-auto"> </pre></div>'),ya=g('<div class="border-l-2 border-l-design-ring rounded-r-md bg-card/30" data-testid="thinking-block"><button class="flex items-center gap-2 w-full px-3 py-2 text-left text-sm hover:bg-accent/30 transition-colors"><!> <span class="text-xs text-muted-foreground font-mono"> </span> <!> <span class="text-xs text-design-muted-fg">Thinking</span> <!> <!></button> <!></div>');function wa(e,t){ne(t,!0);let n=te(!1),s=H(()=>t.block.content.length>80?t.block.content.slice(0,80)+"…":t.block.content);var l=ya(),d=i(l);d.__click=()=>L(n,!a(n));var o=i(d);{let w=H(()=>a(n)?"rotate-90":"");On(o,{get class(){return`size-3.5 text-muted-foreground transition-transform ${a(w)??""}`}})}var f=c(o,2),h=i(f,!0);r(f);var I=c(f,2);ha(I,{class:"size-3.5 text-design-ring"});var x=c(I,4);{var k=w=>{var C=xa();u(w,C)};m(x,w=>{t.block.isStreaming&&w(k)})}var D=c(x,2);{var B=w=>{var C=ba(),ae=i(C,!0);r(C),q(()=>S(ae,a(s))),u(w,C)};m(D,w=>{a(n)||w(B)})}r(d);var T=c(d,2);{var b=w=>{var C=ka(),ae=i(C),y=i(ae,!0);r(ae),r(C),q(()=>S(y,t.block.content)),u(w,C)};m(T,w=>{a(n)&&w(b)})}r(l),q(w=>{De(d,"aria-expanded",a(n)),S(h,w)},[()=>Ot(t.block.timestamp)]),u(e,l),se()}Zt(["click"]);var Ea=g('<span class="text-muted-foreground/50"> </span>'),Sa=g('<div class="flex items-center gap-2 py-1.5" data-testid="system-block"><div class="flex-1 h-px bg-border"></div> <div class="flex items-center gap-2 px-2 py-0.5 text-[10px] text-muted-foreground/70 font-mono"><span> </span> <span class="font-medium"> </span> <!></div> <div class="flex-1 h-px bg-border"></div></div>');function Ta(e,t){ne(t,!0);var n=Sa(),s=c(i(n),2),l=i(s),d=i(l,!0);r(l);var o=c(l,2),f=i(o,!0);r(o);var h=c(o,2);{var I=x=>{var k=Ea(),D=i(k,!0);r(k),q(()=>S(D,t.block.detail)),u(x,k)};m(h,x=>{t.block.detail&&x(I)})}r(s),We(2),r(n),q(x=>{S(d,x),S(f,t.block.label)},[()=>Ot(t.block.timestamp)]),u(e,n),se()}function Aa(e,t){ne(t,!0);let n=Ve(t,["$$slots","$$events","$$legacy"]);const s=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]];Ze(e,Je({name:"arrow-down"},()=>n,{get iconNode(){return s},children:(l,d)=>{var o=P(),f=R(o);Ye(f,()=>t.children??Qe),u(l,o)},$$slots:{default:!0}})),se()}var Ca=g('<div class="flex items-center justify-center h-full text-muted-foreground/50 text-sm svelte-1wb6lxb" data-testid="stream-empty"><!></div>'),Na=g('<button class="absolute bottom-4 right-6 flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-primary text-primary-foreground text-xs font-medium shadow-lg hover:bg-primary/90 transition-colors svelte-1wb6lxb" data-testid="jump-to-bottom"><!> Jump to bottom</button>'),Ia=g('<div class="relative flex-1 min-h-0 svelte-1wb6lxb"><div class="absolute inset-0 overflow-y-auto px-4 py-2 svelte-1wb6lxb" data-testid="session-stream" aria-label="Session event stream" role="log"><!> <!></div> <!></div>');function La(e,t){ne(t,!0);let n=rt(t,"isLive",3,!1),s=te(void 0),l=te(!0),d=te(!1),o,f=H(()=>t.blocks.some(y=>(y.type==="message"||y.type==="thinking")&&y.isStreaming));function h(){if(!a(s))return;const{scrollHeight:y,scrollTop:N,clientHeight:Z}=a(s);o&&clearTimeout(o),L(d,!0),o=setTimeout(()=>{L(d,!1)},150),L(l,us(y,N,Z),!0)}Tt(()=>{t.blocks.length,a(f),a(l)&&!a(d)&&a(s)&&requestAnimationFrame(()=>{a(s)&&a(s).scrollTo({top:a(s).scrollHeight,behavior:"auto"})})});function I(){L(l,!0),a(s)&&a(s).scrollTo({top:a(s).scrollHeight,behavior:"smooth"})}let x=H(()=>vs(a(l),n(),t.blocks.length));function k(y,N){return y.seq>=0?y.seq:`ws-${N}`}var D=Ia(),B=i(D),T=i(B);At(T,19,()=>t.blocks,(y,N)=>k(y,N),(y,N)=>{var Z=P(),re=R(Z);{var ie=K=>{Vs(K,{get block(){return a(N)}})},j=K=>{var he=P(),ve=R(he);{var ze=oe=>{_a(oe,{get block(){return a(N)},get sessionId(){return t.sessionId}})},fe=oe=>{var Te=P(),xe=R(Te);{var Ae=ce=>{wa(ce,{get block(){return a(N)}})},Re=ce=>{var Ce=P(),E=R(Ce);{var v=A=>{Ta(A,{get block(){return a(N)}})};m(E,A=>{a(N).type==="system"&&A(v)},!0)}u(ce,Ce)};m(xe,ce=>{a(N).type==="thinking"?ce(Ae):ce(Re,!1)},!0)}u(oe,Te)};m(ve,oe=>{a(N).type==="tool_call"?oe(ze):oe(fe,!1)},!0)}u(K,he)};m(re,K=>{a(N).type==="message"?K(ie):K(j,!1)})}u(y,Z)});var b=c(T,2);{var w=y=>{var N=Ca(),Z=i(N);{var re=j=>{var K=St("Waiting for agent output...");u(j,K)},ie=j=>{var K=St("No events recorded for this session.");u(j,K)};m(Z,j=>{n()?j(re):j(ie,!1)})}r(N),u(y,N)};m(b,y=>{t.blocks.length===0&&y(w)})}r(B),Cn(B,y=>L(s,y),()=>a(s));var C=c(B,2);{var ae=y=>{var N=Na();N.__click=I;var Z=i(N);Aa(Z,{class:"size-3.5"}),We(),r(N),u(y,N)};m(C,y=>{a(x)&&y(ae)})}r(D),q(()=>De(B,"aria-live",n()?"polite":void 0)),Gn("scroll",B,h),u(e,D),se()}Zt(["click"]);function Ma(e,t){ne(t,!0);let n=Ve(t,["$$slots","$$events","$$legacy"]);const s=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"}]];Ze(e,Je({name:"wallet"},()=>n,{get iconNode(){return s},children:(l,d)=>{var o=P(),f=R(o);Ye(f,()=>t.children??Qe),u(l,o)},$$slots:{default:!0}})),se()}function Oa(e,t){ne(t,!0);let n=Ve(t,["$$slots","$$events","$$legacy"]);const s=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];Ze(e,Je({name:"folder-open"},()=>n,{get iconNode(){return s},children:(l,d)=>{var o=P(),f=R(o);Ye(f,()=>t.children??Qe),u(l,o)},$$slots:{default:!0}})),se()}var pa=g('<span class="text-muted-foreground/50 svelte-ceuut8"> </span>'),qa=g('<span class="ds-session-active-dot size-1.5 rounded-full bg-status-completed inline-block svelte-ceuut8"></span>'),Ba=g('<div class="flex items-center gap-2 text-xs svelte-ceuut8"><!> <!></div>'),Ha=g('<div class="flex items-start gap-1.5 text-[10px] svelte-ceuut8"><!> <span class="text-muted-foreground svelte-ceuut8"><span class="font-mono font-medium svelte-ceuut8"> </span> <!></span></div>'),Da=g('<div class="space-y-1 svelte-ceuut8" data-testid="ac-checklist"></div>'),za=g('<div data-testid="spec-context-section" class="svelte-ceuut8"><h3 class="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2 svelte-ceuut8">Spec Context</h3> <div class="space-y-2 svelte-ceuut8"><div class="text-xs svelte-ceuut8"><!></div> <!></div></div> <!>',1),Ra=g('<div data-testid="budget-section" class="svelte-ceuut8"><h3 class="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2 svelte-ceuut8"><span class="inline-flex items-center gap-1.5 svelte-ceuut8"><!> Budget</span></h3> <div class="space-y-1 text-xs text-muted-foreground svelte-ceuut8"><div class="flex justify-between svelte-ceuut8"><span class="svelte-ceuut8">Tasks started</span> <span class="font-mono svelte-ceuut8"> </span></div> <div class="w-full bg-secondary rounded-full h-1.5 svelte-ceuut8"><div class="bg-primary rounded-full h-1.5 transition-all svelte-ceuut8"></div></div></div></div> <!>',1),Fa=g('<div class="text-[10px] font-mono text-muted-foreground truncate svelte-ceuut8"> </div>'),ja=g('<div data-testid="files-changed-section" class="svelte-ceuut8"><h3 class="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2 svelte-ceuut8"><span class="inline-flex items-center gap-1.5 svelte-ceuut8"><!> </span></h3> <div class="space-y-0.5 max-h-40 overflow-y-auto svelte-ceuut8"></div></div> <!>',1),Ka=g('<div class="flex justify-between svelte-ceuut8"><span class="svelte-ceuut8">Ended</span> <span class="font-mono svelte-ceuut8"> </span></div>'),Pa=g('<div class="w-72 border-r bg-card/50 overflow-y-auto flex-shrink-0 svelte-ceuut8" data-testid="session-context-panel"><div class="p-4 space-y-4 svelte-ceuut8"><div class="svelte-ceuut8"><h3 class="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2 svelte-ceuut8">Session</h3> <div class="space-y-2 svelte-ceuut8"><div class="flex items-center justify-between svelte-ceuut8"><!> <span class="text-[10px] font-mono text-muted-foreground svelte-ceuut8"> </span></div> <div class="flex items-center gap-2 text-xs text-muted-foreground svelte-ceuut8"><!> <span class="svelte-ceuut8"> </span> <!></div> <div class="flex items-center gap-2 text-xs text-muted-foreground svelte-ceuut8"><!> <span class="svelte-ceuut8"> </span> <!></div> <div class="flex items-center gap-2 text-xs text-muted-foreground svelte-ceuut8"><!> <span class="svelte-ceuut8"> </span></div> <!></div></div> <!> <!> <div class="svelte-ceuut8"><h3 class="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2 svelte-ceuut8">Stats</h3> <div class="grid grid-cols-2 gap-2 svelte-ceuut8"><div class="bg-secondary/50 rounded-md px-2.5 py-1.5 svelte-ceuut8"><p class="text-[10px] text-muted-foreground svelte-ceuut8">Events</p> <p class="text-sm font-medium svelte-ceuut8"> </p></div> <div class="bg-secondary/50 rounded-md px-2.5 py-1.5 svelte-ceuut8"><p class="text-[10px] text-muted-foreground svelte-ceuut8">Iterations</p> <p class="text-sm font-medium svelte-ceuut8"> </p></div> <div class="bg-secondary/50 rounded-md px-2.5 py-1.5 svelte-ceuut8"><p class="text-[10px] text-muted-foreground svelte-ceuut8">Tasks Done</p> <p class="text-sm font-medium svelte-ceuut8"> </p></div> <div class="bg-secondary/50 rounded-md px-2.5 py-1.5 svelte-ceuut8"><p class="text-[10px] text-muted-foreground svelte-ceuut8">Origin</p> <p class="text-sm font-medium svelte-ceuut8"> </p></div></div></div> <!> <!> <!> <div class="svelte-ceuut8"><h3 class="text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2 svelte-ceuut8">Timeline</h3> <div class="space-y-1 text-xs text-muted-foreground svelte-ceuut8"><div class="flex justify-between svelte-ceuut8"><span class="svelte-ceuut8">Started</span> <span class="font-mono svelte-ceuut8"> </span></div> <!> <div class="flex justify-between svelte-ceuut8"><span class="svelte-ceuut8">Duration</span> <span class="font-mono svelte-ceuut8"> </span></div></div></div></div></div>');function Ua(e,t){ne(t,!0);let n=rt(t,"blocks",19,()=>[]),s=rt(t,"taskTitle",3,null),l=H(()=>t.session.status==="active"?"bg-status-in-progress text-status-in-progress-fg":t.session.status==="completed"?"bg-status-completed text-status-completed-fg":t.session.status==="failed"?"bg-status-blocked text-status-blocked-fg":"bg-status-cancelled text-status-cancelled-fg"),d=H(()=>t.session.status==="active"?"Active":t.session.status==="completed"?"Completed":t.session.status==="abandoned"?"Abandoned":t.session.status==="timed_out"?"Timed Out":t.session.status==="failed"?"Failed":t.session.status),o=H(()=>fs(t.session.trigger)),f=H(()=>gs(n()));function h(_){const p=_.split("/");return p.length>2?".../"+p.slice(-2).join("/"):_}var I=Pa(),x=i(I),k=i(x),D=c(i(k),2),B=i(D),T=i(B);Jn(T,{get class(){return a(l)},children:(_,p)=>{We();var z=St();q(()=>S(z,a(d))),u(_,z)},$$slots:{default:!0}});var b=c(T,2),w=i(b,!0);r(b),r(B);var C=c(B,2),ae=i(C);Es(ae,{class:"size-3.5"});var y=c(ae,2),N=i(y,!0);r(y);var Z=c(y,2);{var re=_=>{var p=pa(),z=i(p);r(p),q(()=>S(z,`(${t.session.agent_id??""})`)),u(_,p)};m(Z,_=>{t.session.agent_id&&t.session.agent_id!==t.session.agent_type&&_(re)})}r(C);var ie=c(C,2),j=i(ie);Ss(j,{class:"size-3.5"});var K=c(j,2),he=i(K,!0);r(K);var ve=c(K,2);{var ze=_=>{var p=qa();u(_,p)};m(ve,_=>{t.session.status==="active"&&_(ze)})}r(ie);var fe=c(ie,2),oe=i(fe);{var Te=_=>{Ts(_,{class:"size-3.5 text-status-in-progress"})},xe=_=>{As(_,{class:"size-3.5"})};m(oe,_=>{ln(t.session.trigger)?_(Te):_(xe,!1)})}var Ae=c(oe,2),Re=i(Ae,!0);r(Ae),r(fe);var ce=c(fe,2);{var Ce=_=>{var p=Ba(),z=i(p);Cs(z,{class:"size-3.5 text-muted-foreground"});var ee=c(z,2);_n(ee,{get ref(){return t.session.task_id},type:"task",get title(){return s()},class:"text-xs"}),r(p),u(_,p)};m(ce,_=>{t.session.task_id&&_(Ce)})}r(D),r(k);var E=c(k,2);ct(E,{});var v=c(E,2);{var A=_=>{var p=za(),z=R(p),ee=c(i(z),2),de=i(ee),$e=i(de);_n($e,{get ref(){return t.session.spec_context.spec_ref},type:"spec",get title(){return t.session.spec_context.title},class:"text-xs"}),r(de);var et=c(de,2);{var Be=Pe=>{var ye=Da();At(ye,21,()=>t.session.spec_context.acceptance_criteria,me=>me.id,(me,we)=>{var Ue=Ha(),rn=i(Ue);Ns(rn,{class:"size-3 text-muted-foreground/50 flex-shrink-0 mt-0.5"});var on=c(rn,2),Bt=i(on),Fn=i(Bt,!0);r(Bt);var jn=c(Bt,2);{var Kn=Ht=>{var dn=St();q(Pn=>S(dn,`— ${Pn??""}`),[()=>a(we).description.length>60?a(we).description.slice(0,60)+"…":a(we).description]),u(Ht,dn)};m(jn,Ht=>{a(we).description&&Ht(Kn)})}r(on),r(Ue),q(()=>S(Fn,a(we).id)),u(me,Ue)}),r(ye),u(Pe,ye)};m(et,Pe=>{t.session.spec_context.acceptance_criteria.length>0&&Pe(Be)})}r(ee),r(z);var tt=c(z,2);ct(tt,{}),u(_,p)};m(v,_=>{t.session.spec_context&&_(A)})}var W=c(v,2),ue=c(i(W),2),Q=i(ue),J=c(i(Q),2),Ne=i(J,!0);r(J),r(Q);var V=c(Q,2),U=c(i(V),2),X=i(U,!0);r(U),r(V);var ge=c(V,2),Ie=c(i(ge),2),Le=i(Ie,!0);r(Ie),r(ge);var be=c(ge,2),Fe=c(i(be),2),je=i(Fe,!0);r(Fe),r(be),r(ue),r(W);var Xe=c(W,2);ct(Xe,{});var ke=c(Xe,2);{var Me=_=>{var p=Ra(),z=R(p),ee=i(z),de=i(ee),$e=i(de);Ma($e,{class:"size-3"}),We(),r(de),r(ee);var et=c(ee,2),Be=i(et),tt=c(i(Be),2),Pe=i(tt);r(tt),r(Be);var ye=c(Be,2),me=i(ye);r(ye),r(et),r(z);var we=c(z,2);ct(we,{}),q(Ue=>{S(Pe,`${t.session.budget.started_this_cycle??""} / ${t.session.budget.max_per_cycle??""}`),Vn(me,`width: ${Ue??""}%`)},[()=>Math.min(100,t.session.budget.started_this_cycle/t.session.budget.max_per_cycle*100)]),u(_,p)};m(ke,_=>{t.session.budget&&_(Me)})}var Oe=c(ke,2);{var ot=_=>{var p=ja(),z=R(p),ee=i(z),de=i(ee),$e=i(de);Oa($e,{class:"size-3"});var et=c($e);r(de),r(ee);var Be=c(ee,2);At(Be,21,()=>a(f),Ln,(Pe,ye)=>{var me=Fa(),we=i(me,!0);r(me),q(Ue=>{De(me,"title",a(ye)),S(we,Ue)},[()=>h(a(ye))]),u(Pe,me)}),r(Be),r(z);var tt=c(z,2);ct(tt,{}),q(()=>S(et,` Files Changed (${a(f).length??""})`)),u(_,p)};m(Oe,_=>{a(f).length>0&&_(ot)})}var pe=c(Oe,2),Ke=c(i(pe),2),dt=i(Ke),lt=c(i(dt),2),pt=i(lt,!0);r(lt),r(dt);var ht=c(dt,2);{var $=_=>{var p=Ka(),z=c(i(p),2),ee=i(z,!0);r(z),r(p),q(de=>{De(z,"title",t.session.ended_at),S(ee,de)},[()=>un(t.session.ended_at)]),u(_,p)};m(ht,_=>{t.session.ended_at&&_($)})}var G=c(ht,2),qe=c(i(G),2),qt=i(qe,!0);r(qe),r(G),r(Ke),r(pe),r(x),r(I),q((_,p,z,ee,de)=>{S(w,_),S(N,t.session.agent_type),S(he,p),S(Re,a(o)),S(Ne,t.session.event_count),S(X,t.session.iteration_count),S(Le,t.session.tasks_completed),S(je,z),De(lt,"title",t.session.started_at),S(pt,ee),S(qt,de)},[()=>t.session.id.slice(0,8),()=>cn(t.session.duration_ms),()=>ln(t.session.trigger)?"Dispatched":"Manual",()=>un(t.session.started_at),()=>cn(t.session.duration_ms)]),u(e,I),se()}var Ga=g('<div class="flex gap-3"><div class="size-7 rounded-full bg-muted ds-shimmer flex-shrink-0"></div> <div class="flex-1 space-y-2"><div class="h-3 w-24 rounded bg-muted ds-shimmer"></div> <div class="h-4 w-full rounded bg-muted ds-shimmer"></div> <div class="h-4 w-3/4 rounded bg-muted ds-shimmer"></div></div></div>'),Wa=g('<div class="border-l-2 border-muted rounded-r-md p-3 space-y-1"><div class="h-4 w-48 rounded bg-muted ds-shimmer"></div></div>'),Qa=g('<div class="flex items-center gap-2"><div class="flex-1 h-px bg-border"></div> <div class="h-3 w-32 rounded bg-muted ds-shimmer"></div> <div class="flex-1 h-px bg-border"></div></div>'),Ja=g('<div class="flex h-full" data-testid="session-skeleton"><div class="w-72 border-r bg-card/50 p-4 space-y-4 flex-shrink-0"><div class="space-y-2"><div class="h-3 w-16 rounded bg-muted ds-shimmer"></div> <div class="h-6 w-20 rounded bg-muted ds-shimmer"></div> <div class="h-4 w-32 rounded bg-muted ds-shimmer"></div> <div class="h-4 w-28 rounded bg-muted ds-shimmer"></div> <div class="h-4 w-36 rounded bg-muted ds-shimmer"></div></div> <div class="h-px bg-border"></div> <div class="space-y-2"><div class="h-3 w-12 rounded bg-muted ds-shimmer"></div> <div class="grid grid-cols-2 gap-2"><div class="h-12 rounded bg-muted ds-shimmer"></div> <div class="h-12 rounded bg-muted ds-shimmer"></div> <div class="h-12 rounded bg-muted ds-shimmer"></div> <div class="h-12 rounded bg-muted ds-shimmer"></div></div></div></div> <div class="flex-1 p-4 space-y-4"></div></div>');function Va(e){var t=Ja(),n=c(i(t),2);At(n,4,()=>Array(6),Ln,(s,l,d)=>{var o=P(),f=R(o);{var h=x=>{var k=Ga();u(x,k)},I=x=>{var k=P(),D=R(k);{var B=b=>{var w=Wa();u(b,w)},T=b=>{var w=Qa();u(b,w)};m(D,b=>{d%3===1?b(B):b(T,!1)},!0)}u(x,k)};m(f,x=>{d%3===0?x(h):x(I,!1)})}u(s,o)}),r(n),r(t),u(e,t)}function Ya(e,t){ne(t,!0);let n=Ve(t,["$$slots","$$events","$$legacy"]);const s=[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]];Ze(e,Je({name:"arrow-left"},()=>n,{get iconNode(){return s},children:(l,d)=>{var o=P(),f=R(o);Ye(f,()=>t.children??Qe),u(l,o)},$$slots:{default:!0}})),se()}var Za=g('<span class="font-mono text-sm text-muted-foreground ml-1 svelte-y7akim"> </span>'),Xa=g('<span class="ds-session-active-dot size-1.5 rounded-full bg-status-completed inline-block ml-1 svelte-y7akim"></span> <span class="text-status-completed svelte-y7akim">Live</span>',1),$a=g('<p class="text-xs text-muted-foreground svelte-y7akim"> <!></p>'),er=g('<div class="mx-4 mt-4 bg-destructive/10 text-destructive p-4 rounded-lg svelte-y7akim" role="alert" data-testid="session-error"> </div>'),tr=g('<div class="mx-4 mt-4 rounded-lg border border-dashed p-6 text-sm text-muted-foreground svelte-y7akim" data-testid="session-static-message">Session history is not included in the static export. Open the live daemon-backed UI to inspect session streams.</div>'),nr=g('<div class="flex flex-1 min-h-0 svelte-y7akim"><!> <!></div>'),sr=g('<div class="flex flex-col h-full svelte-y7akim"><div class="flex items-center gap-3 px-4 py-3 border-b flex-shrink-0 svelte-y7akim"><a class="text-muted-foreground hover:text-foreground transition-colors svelte-y7akim" title="Back to sessions"><!></a> <div class="svelte-y7akim"><h1 class="text-lg font-semibold svelte-y7akim">Session <!></h1> <!></div></div> <!> <!></div>');function Ir(e,t){ne(t,!0);const n=()=>es(ts,"$page",s),[s,l]=$n();let d=H(()=>n().params.id);const o=Nn(()=>({queryKey:In.sessions.detail(a(d)),queryFn:()=>Xn(a(d)),enabled:Zn()&&!nt()}));let f=te(Dt([])),h=te(Dt([])),I=te(!0),x=te(""),k=H(()=>o.data?.status==="active"),D=te(-1),B=H(()=>o.data?.task_title??null),T=H(()=>o.data??null),b=H(()=>o.isLoading||a(I)),w=te(!1),C=te(!1),ae=te(Dt(a(d)));Tt(()=>{a(d)!==a(ae)&&(L(ae,a(d),!0),L(w,!1),L(f,[],!0),L(h,[],!0),L(I,!0),L(x,""),L(D,-1))});async function y(E){if(nt()){L(I,!1),L(x,"");return}E===void 0&&L(I,!0),L(x,"");try{const v=await Yn(a(d),E);E!==void 0?v.events.length>0&&(L(f,[...a(f),...v.events],!0),L(h,vn(fn(a(f))),!0),L(D,gn(a(f)),!0)):(L(f,v.events,!0),L(h,vn(fn(a(f))),!0),L(D,gn(a(f)),!0))}catch(v){L(x,v instanceof Error?v.message:"Failed to load session events",!0)}finally{L(I,!1)}}function N(E){const v=E.data;if(!v||v.session_id!==a(d))return;new Set(["message_start","message_progress","message_complete","thinking_start","thinking_progress","thinking_complete","tool_call_start","tool_call_complete"]).has(E.event)&&L(h,ms(a(h),E.event,v),!0),E.event==="agent_invocation"&&o.refetch()}function Z(E){E==="connected"&&(a(C)&&a(k)&&y(a(D)),L(C,!0))}Tt(()=>{o.data&&!nt()&&!a(w)&&(L(w,!0),y())}),An(()=>{nt()||(ns(["agents"]),ss("agents",N),as(Z))}),Un(()=>{nt()||(rs("agents",N),is(["agents"]),os(Z))});var re=sr(),ie=i(re),j=i(ie),K=i(j);Ya(K,{class:"size-4"}),r(j);var he=c(j,2),ve=i(he),ze=c(i(ve));{var fe=E=>{var v=Za(),A=i(v,!0);r(v),q(W=>S(A,W),[()=>a(T).id.slice(0,8)]),u(E,v)};m(ze,E=>{a(T)&&E(fe)})}r(ve);var oe=c(ve,2);{var Te=E=>{var v=$a(),A=i(v),W=c(A);{var ue=Q=>{var J=Xa();We(2),u(Q,J)};m(W,Q=>{a(k)&&Q(ue)})}r(v),q(()=>S(A,`${a(T).agent_type??""} `)),u(E,v)};m(oe,E=>{a(T)&&E(Te)})}r(he),r(ie);var xe=c(ie,2);{var Ae=E=>{var v=er(),A=i(v,!0);r(v),q(()=>S(A,a(x)||o.error?.message)),u(E,v)};m(xe,E=>{(a(x)||o.error)&&E(Ae)})}var Re=c(xe,2);{var ce=E=>{Va(E)},Ce=E=>{var v=P(),A=R(v);{var W=Q=>{var J=tr();u(Q,J)},ue=Q=>{var J=P(),Ne=R(J);{var V=U=>{var X=nr(),ge=i(X);Ua(ge,{get session(){return a(T)},get blocks(){return a(h)},get taskTitle(){return a(B)}});var Ie=c(ge,2);La(Ie,{get blocks(){return a(h)},get isLive(){return a(k)},get sessionId(){return a(d)}}),r(X),u(U,X)};m(Ne,U=>{a(T)&&U(V)},!0)}u(Q,J)};m(A,Q=>{nt()?Q(W):Q(ue,!1)},!0)}u(E,v)};m(Re,E=>{a(b)?E(ce):E(Ce,!1)})}r(re),q(()=>De(j,"href",`${Is??""}/sessions`)),u(e,re),se(),l()}export{Ir as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1773739681176"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/web-ui/index.html
CHANGED
|
@@ -4,28 +4,31 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
|
|
7
|
-
<link rel="modulepreload" href="/_app/immutable/entry/start.
|
|
8
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
9
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
10
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
11
|
-
<link rel="modulepreload" href="/_app/immutable/
|
|
12
|
-
<link rel="modulepreload" href="/_app/immutable/
|
|
13
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
14
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
7
|
+
<link rel="modulepreload" href="/_app/immutable/entry/start.CQFTf9ep.js">
|
|
8
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/BsJFsuAT.js">
|
|
9
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/CaAJD3dl.js">
|
|
10
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/CDRO15Iv.js">
|
|
11
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/oTsvd9y4.js">
|
|
12
|
+
<link rel="modulepreload" href="/_app/immutable/entry/app.C4h_eOn6.js">
|
|
13
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/DqT6OH_u.js">
|
|
14
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/y4GeEH6k.js">
|
|
15
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/Dg_zDpDS.js">
|
|
16
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/ChQD-6N8.js">
|
|
17
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/Ds9I9wQb.js">
|
|
15
18
|
</head>
|
|
16
19
|
<body data-sveltekit-preload-data="hover">
|
|
17
20
|
<div style="display: contents">
|
|
18
21
|
<script>
|
|
19
22
|
{
|
|
20
|
-
|
|
23
|
+
__sveltekit_1222h2t = {
|
|
21
24
|
base: ""
|
|
22
25
|
};
|
|
23
26
|
|
|
24
27
|
const element = document.currentScript.parentElement;
|
|
25
28
|
|
|
26
29
|
Promise.all([
|
|
27
|
-
import("/_app/immutable/entry/start.
|
|
28
|
-
import("/_app/immutable/entry/app.
|
|
30
|
+
import("/_app/immutable/entry/start.CQFTf9ep.js"),
|
|
31
|
+
import("/_app/immutable/entry/app.C4h_eOn6.js")
|
|
29
32
|
]).then(([kit, app]) => {
|
|
30
33
|
kit.start(app, element);
|
|
31
34
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kynetic-ai/spec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Kynetic Spec - Structured specification format for human-AI collaboration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -22,18 +22,21 @@
|
|
|
22
22
|
"author": "Kynetic AI",
|
|
23
23
|
"scripts": {
|
|
24
24
|
"bootstrap": "node scripts/bootstrap.cjs",
|
|
25
|
-
"build": "tsc && chmod +x dist/cli/index.js && npm run build:daemon && npm run build:web-ui && npm run build:plugin",
|
|
25
|
+
"build": "tsc && chmod +x dist/cli/index.js && npm run build:shared && npm run build:daemon && npm run build:web-ui && npm run build:plugin",
|
|
26
|
+
"build:shared": "cd packages/shared && npm run build",
|
|
26
27
|
"build:plugin": "node scripts/build-plugin.cjs",
|
|
27
28
|
"build:daemon": "shx rm -rf dist/daemon && shx mkdir -p dist/daemon && shx cp -r packages/daemon/src/* dist/daemon/",
|
|
28
29
|
"build:web-ui": "shx rm -rf dist/web-ui && cd packages/web-ui && npm run build && shx cp -r build ../../dist/web-ui",
|
|
30
|
+
"build:e2e": "tsc && chmod +x dist/cli/index.js && npm run build:shared && npm run build:daemon && npm run build:web-ui",
|
|
29
31
|
"dev": "tsx src/cli/index.ts",
|
|
30
32
|
"setup:dev": "npm install && npm run build && npm link",
|
|
31
33
|
"prepack": "npm run build:plugin",
|
|
32
|
-
"
|
|
33
|
-
"test": "
|
|
34
|
-
"test:
|
|
35
|
-
"test:
|
|
36
|
-
"test:
|
|
34
|
+
"test": "node scripts/test.cjs",
|
|
35
|
+
"test:shard1": "node scripts/test.cjs --shard=1/3",
|
|
36
|
+
"test:shard2": "node scripts/test.cjs --shard=2/3",
|
|
37
|
+
"test:shard3": "node scripts/test.cjs --shard=3/3",
|
|
38
|
+
"test:e2e": "npm run build:e2e && npm link && npm --workspace packages/web-ui run test:e2e:ci:run --",
|
|
39
|
+
"test:e2e:full": "npm run build:e2e && npm link && npm --workspace packages/web-ui run test:e2e:run --",
|
|
37
40
|
"test:watch": "vitest",
|
|
38
41
|
"lint": "biome check src/",
|
|
39
42
|
"typecheck": "tsc --noEmit"
|
|
@@ -43,6 +46,7 @@
|
|
|
43
46
|
},
|
|
44
47
|
"dependencies": {
|
|
45
48
|
"@elysiajs/cors": "^1.1.3",
|
|
49
|
+
"@elysiajs/static": "^1.4.7",
|
|
46
50
|
"chalk": "^5.3.0",
|
|
47
51
|
"chokidar": "^4.0.3",
|
|
48
52
|
"cli-table3": "^0.6.5",
|
|
@@ -52,6 +56,8 @@
|
|
|
52
56
|
"js-yaml": "^4.1.0",
|
|
53
57
|
"smol-toml": "^1.6.0",
|
|
54
58
|
"ulid": "^2.3.0",
|
|
59
|
+
"ulidx": "^2.4.1",
|
|
60
|
+
"ws": "^8.19.0",
|
|
55
61
|
"yaml": "^2.8.2",
|
|
56
62
|
"zod": "^3.23.8"
|
|
57
63
|
},
|
|
@@ -62,6 +68,7 @@
|
|
|
62
68
|
"@types/diff": "^7.0.2",
|
|
63
69
|
"@types/js-yaml": "^4.0.9",
|
|
64
70
|
"@types/node": "^20.11.0",
|
|
71
|
+
"@types/ws": "^8.18.1",
|
|
65
72
|
"autoprefixer": "^10.4.23",
|
|
66
73
|
"clsx": "^2.1.1",
|
|
67
74
|
"postcss": "^8.5.6",
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: merge
|
|
3
|
+
description: Merge approved work into an integration branch. Local-first git
|
|
4
|
+
merge with gates based on kspec review disposition — approved status, passing
|
|
5
|
+
checks, and resolved blocker threads.
|
|
6
|
+
---
|
|
7
|
+
<!-- kspec-managed -->
|
|
8
|
+
# Merge
|
|
9
|
+
|
|
10
|
+
Merge approved work into an integration branch. Local-first — uses git merge directly, with merge gates based on kspec review disposition.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- After work has been reviewed and approved via `/kspec:review`
|
|
15
|
+
- Merging a task branch into a dev or integration branch
|
|
16
|
+
- Completing the work lifecycle after review approval
|
|
17
|
+
|
|
18
|
+
**Not for:** Creating pull requests to remote repositories (that's a human-directed activity for feature-level merges into main).
|
|
19
|
+
|
|
20
|
+
## Merge Gate
|
|
21
|
+
|
|
22
|
+
Before merging, verify all gates pass:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# 1. Check review disposition
|
|
26
|
+
kspec review for-task @ref
|
|
27
|
+
kspec review get @review-ref
|
|
28
|
+
# Disposition must be "approved"
|
|
29
|
+
|
|
30
|
+
# 2. Required checks passing
|
|
31
|
+
# Review checks should show all required checks as "pass"
|
|
32
|
+
|
|
33
|
+
# 3. No unresolved blocker threads
|
|
34
|
+
# Review should have no open blocker threads
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**All three must be satisfied:**
|
|
38
|
+
- Review disposition = `approved`
|
|
39
|
+
- All required checks passing (not stale)
|
|
40
|
+
- No unresolved blocker threads
|
|
41
|
+
|
|
42
|
+
If any gate fails, do not merge. Address the issue first:
|
|
43
|
+
- `changes_requested` → worker fixes issues, resubmits
|
|
44
|
+
- Required check failing → fix and re-run
|
|
45
|
+
- Unresolved blocker → resolve the thread or fix the issue
|
|
46
|
+
|
|
47
|
+
## Merge Process
|
|
48
|
+
|
|
49
|
+
### 1. Verify Branch State
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Confirm current branch
|
|
53
|
+
git branch --show-current
|
|
54
|
+
|
|
55
|
+
# Ensure branch is up to date with target
|
|
56
|
+
git fetch origin
|
|
57
|
+
git log --oneline origin/dev..HEAD # What will be merged
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 2. Merge to Integration Branch
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Switch to target branch
|
|
64
|
+
git checkout dev
|
|
65
|
+
|
|
66
|
+
# Merge with merge commit (preserves trailers)
|
|
67
|
+
git merge --no-ff <task-branch>
|
|
68
|
+
|
|
69
|
+
# Verify merge succeeded
|
|
70
|
+
git log --oneline -3
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Use merge commits, not squash.** Merge commits preserve individual commit messages with their `Task:` and `Spec:` trailers, enabling `kspec log @ref` to find related commits.
|
|
74
|
+
|
|
75
|
+
### 3. Handle Conflicts
|
|
76
|
+
|
|
77
|
+
If a merge conflict occurs:
|
|
78
|
+
|
|
79
|
+
**Assess the conflict:**
|
|
80
|
+
- Is it a simple textual conflict (parallel edits to the same lines)?
|
|
81
|
+
- Or a semantic conflict (incompatible changes to behavior)?
|
|
82
|
+
|
|
83
|
+
**For simple conflicts:**
|
|
84
|
+
```bash
|
|
85
|
+
# View conflicting files
|
|
86
|
+
git diff --name-only --diff-filter=U
|
|
87
|
+
|
|
88
|
+
# Resolve conflicts in each file
|
|
89
|
+
# Then mark resolved
|
|
90
|
+
git add <resolved-files>
|
|
91
|
+
git commit # Completes the merge
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**For complex/semantic conflicts:**
|
|
95
|
+
- Do not force-merge
|
|
96
|
+
- Escalate: `kspec inbox add "Merge conflict between @task-a and @task-b — needs human review"`
|
|
97
|
+
- Or block the task: `kspec task block @ref --reason "Merge conflict with ..."`
|
|
98
|
+
|
|
99
|
+
### 4. Complete the Task
|
|
100
|
+
|
|
101
|
+
After successful merge:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
kspec task complete @ref --reason "Merged to dev. Summary of what was done."
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 5. Close the Review
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
kspec review close @review-ref
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Post-Merge Cleanup
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Delete the task branch locally
|
|
117
|
+
git branch -d <task-branch>
|
|
118
|
+
|
|
119
|
+
# Optionally delete remote branch
|
|
120
|
+
git push origin --delete <task-branch>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Integration
|
|
124
|
+
|
|
125
|
+
- **`/kspec:task-work`** — Work lifecycle leads to merge after review
|
|
126
|
+
- **`/kspec:review`** — Review disposition gates the merge
|
|
127
|
+
- **`kspec task complete`** — Final step after merge
|
|
@@ -21,11 +21,14 @@ Translate approved plans into specs and tasks. Plans are durable artifacts — t
|
|
|
21
21
|
|
|
22
22
|
### Import Path (Recommended for 3+ Specs)
|
|
23
23
|
|
|
24
|
-
Write a structured markdown document,
|
|
24
|
+
Write a structured markdown document, import it as a durable plan record, iterate as needed, then derive specs/tasks when the plan is ready.
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
kspec plan import ./plan.md --
|
|
28
|
-
kspec plan import ./plan.md --module @target-module #
|
|
27
|
+
kspec plan import ./plan.md --dry-run # Preview plan record
|
|
28
|
+
kspec plan import ./plan.md --module @target-module # Store plan (+ optional module)
|
|
29
|
+
kspec plan import ./edited.md --into @plan-ref # Re-import edits into existing plan
|
|
30
|
+
kspec plan set @plan-ref --status approved # Approve when ready
|
|
31
|
+
kspec plan derive @plan-ref --module @target-module --tasks # Materialize specs/tasks
|
|
29
32
|
```
|
|
30
33
|
|
|
31
34
|
### Manual Path (1-2 Specs)
|
|
@@ -48,7 +51,7 @@ kspec derive @slug
|
|
|
48
51
|
| Multiple related specs with parent/child | Import |
|
|
49
52
|
| Quick bug fix that needs spec coverage | Manual |
|
|
50
53
|
| Translating design doc with many specs | Import |
|
|
51
|
-
| Iterating on previously imported plan | Import (`--
|
|
54
|
+
| Iterating on previously imported plan | Import (`--into`) |
|
|
52
55
|
|
|
53
56
|
## Three-Phase Workflow
|
|
54
57
|
|
|
@@ -81,7 +84,7 @@ kspec workflow start @spec-plan-manual
|
|
|
81
84
|
|
|
82
85
|
### Phase 3: Validate
|
|
83
86
|
|
|
84
|
-
After
|
|
87
|
+
After import and derive:
|
|
85
88
|
|
|
86
89
|
```bash
|
|
87
90
|
kspec validate # Check spec quality
|
|
@@ -135,9 +138,15 @@ derive_from_specs: true
|
|
|
135
138
|
```yaml
|
|
136
139
|
- title: Write migration guide
|
|
137
140
|
slug: migration-guide
|
|
141
|
+
description: |
|
|
142
|
+
Document breaking changes and provide step-by-step upgrade instructions
|
|
143
|
+
for users migrating from v1 to v2.
|
|
138
144
|
priority: 2
|
|
139
145
|
tags:
|
|
140
146
|
- docs
|
|
147
|
+
spec_ref: "@oauth-provider"
|
|
148
|
+
depends_on:
|
|
149
|
+
- "@token-refresh"
|
|
141
150
|
```
|
|
142
151
|
|
|
143
152
|
## Implementation Notes
|
|
@@ -151,7 +160,7 @@ Use passport.js for OAuth, following existing auth patterns.
|
|
|
151
160
|
| Section | Content | Notes |
|
|
152
161
|
|---------|---------|-------|
|
|
153
162
|
| `## Specs` | YAML code block — array of spec objects | **Must** use fenced code block (triple-backtick yaml) |
|
|
154
|
-
| `## Tasks` | `derive_from_specs: true` + optional manual tasks | Manual tasks get `plan_ref
|
|
163
|
+
| `## Tasks` | `derive_from_specs: true` + optional manual tasks | Manual tasks get `plan_ref`; can optionally set `spec_ref`, `depends_on`, `description` |
|
|
155
164
|
| `## Implementation Notes` | Plain text | Attached to plan record; per-spec notes use `implementation_notes` field |
|
|
156
165
|
|
|
157
166
|
### Spec Fields
|
|
@@ -167,6 +176,18 @@ Use passport.js for OAuth, following existing auth patterns.
|
|
|
167
176
|
| `traits` | No | Array of trait slugs (e.g., `trait-json-output`) |
|
|
168
177
|
| `implementation_notes` | No | Scoped to this spec's derived task |
|
|
169
178
|
|
|
179
|
+
### Task Fields
|
|
180
|
+
|
|
181
|
+
| Field | Required | Description |
|
|
182
|
+
|-------|----------|-------------|
|
|
183
|
+
| `title` | Yes | Task title |
|
|
184
|
+
| `slug` | No | Human-friendly ID (auto-generated from title if omitted) |
|
|
185
|
+
| `description` | No | Task context — what to do and why |
|
|
186
|
+
| `priority` | No | 1 (highest) to 5 (lowest), default: 3 |
|
|
187
|
+
| `tags` | No | Array of tags (e.g., `docs`, `cli`) |
|
|
188
|
+
| `spec_ref` | No | Link to a spec — local spec slug or existing `@ref` |
|
|
189
|
+
| `depends_on` | No | Array of refs — local task/spec slugs or existing `@ref`s |
|
|
190
|
+
|
|
170
191
|
## Trait Selection
|
|
171
192
|
|
|
172
193
|
Before writing specs, review available traits:
|
|
@@ -254,34 +275,37 @@ acceptance_criteria:
|
|
|
254
275
|
## Always Dry-Run First
|
|
255
276
|
|
|
256
277
|
```bash
|
|
257
|
-
kspec plan import ./plan.md --
|
|
278
|
+
kspec plan import ./plan.md --dry-run
|
|
258
279
|
```
|
|
259
280
|
|
|
260
|
-
|
|
261
|
-
-
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
- Duplicate slugs
|
|
281
|
+
Import dry-run confirms:
|
|
282
|
+
- Title, status, and stored module look right
|
|
283
|
+
- The file is readable and the full document will be stored as plan content
|
|
284
|
+
- No plan state is changed while previewing
|
|
265
285
|
|
|
266
286
|
## Post-Import Checklist
|
|
267
287
|
|
|
268
|
-
After importing, verify the
|
|
288
|
+
After importing, verify the stored plan record:
|
|
269
289
|
|
|
270
290
|
```bash
|
|
271
|
-
#
|
|
272
|
-
kspec
|
|
291
|
+
# Review plan title/content/status/module
|
|
292
|
+
kspec plan get @plan-slug
|
|
273
293
|
|
|
274
|
-
#
|
|
275
|
-
kspec
|
|
294
|
+
# Iterate on the document if needed
|
|
295
|
+
kspec plan export @plan-slug --output ./plan.md
|
|
296
|
+
kspec plan import ./plan.md --into @plan-slug --reason "Refined scope"
|
|
276
297
|
|
|
277
|
-
#
|
|
278
|
-
kspec
|
|
298
|
+
# Approve when ready to materialize work
|
|
299
|
+
kspec plan set @plan-slug --status approved
|
|
279
300
|
|
|
280
|
-
#
|
|
281
|
-
kspec plan
|
|
301
|
+
# Derive specs/tasks from the stored plan document
|
|
302
|
+
kspec plan derive @plan-slug --tasks
|
|
303
|
+
|
|
304
|
+
# Validate the resulting refs and coverage surface
|
|
305
|
+
kspec validate
|
|
282
306
|
```
|
|
283
307
|
|
|
284
|
-
If derived tasks are too generic to execute without chat history, add a structured task note immediately:
|
|
308
|
+
If derived tasks are too generic to execute without chat history, add a structured task note immediately after derive:
|
|
285
309
|
|
|
286
310
|
```bash
|
|
287
311
|
kspec task note @task-slug "Execution context:
|
|
@@ -299,8 +323,10 @@ draft → approved → active → completed
|
|
|
299
323
|
rejected
|
|
300
324
|
```
|
|
301
325
|
|
|
302
|
-
- **Import**
|
|
326
|
+
- **Import** stores the full document as a plan record and defaults to `draft`
|
|
327
|
+
- **Import** may optionally store `module_ref` for later derive
|
|
303
328
|
- **Manual** creates plan as `approved`
|
|
329
|
+
- **Derive** materializes an approved plan into specs and optional tasks, then transitions it to `active`
|
|
304
330
|
- Mark completed when all derived work is done:
|
|
305
331
|
|
|
306
332
|
```bash
|
|
@@ -328,9 +354,12 @@ Atomic — all succeed or all roll back. Use `--dry-run` to preview.
|
|
|
328
354
|
kspec workflow start @spec-plan-design
|
|
329
355
|
|
|
330
356
|
# Import path
|
|
331
|
-
kspec plan import <path> --module @module --dry-run
|
|
332
|
-
kspec plan import <path> --module @module
|
|
333
|
-
kspec plan
|
|
357
|
+
kspec plan import <path> [--module @module] --dry-run # Preview plan record
|
|
358
|
+
kspec plan import <path> [--module @module] [--status approved] # Create stored plan record
|
|
359
|
+
kspec plan export <plan-ref> --output ./plan.md
|
|
360
|
+
kspec plan import <path> --into <plan-ref> [--reason "..."] # Re-import edits
|
|
361
|
+
kspec plan set <plan-ref> --status approved
|
|
362
|
+
kspec plan derive <plan-ref> [--module @module] [--tasks]
|
|
334
363
|
|
|
335
364
|
# Manual path
|
|
336
365
|
kspec plan add --title "..." --content "..." --status approved
|