syntaur 0.41.3 → 0.43.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.
Files changed (70) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dashboard/dist/assets/{_basePickBy-ZMecMDb-.js → _basePickBy-DzTDKHYU.js} +1 -1
  3. package/dashboard/dist/assets/{_baseUniq-tVAi81J9.js → _baseUniq-DW7YJayj.js} +1 -1
  4. package/dashboard/dist/assets/{arc-BMB5nyvD.js → arc-BkeAbQzV.js} +1 -1
  5. package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-1_ttZgNb.js → architectureDiagram-2XIMDMQ5-M_COTMq5.js} +1 -1
  6. package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-BAuowdCy.js → blockDiagram-WCTKOSBZ-BMSQm_8K.js} +1 -1
  7. package/dashboard/dist/assets/{c4Diagram-IC4MRINW-DgqpYWNQ.js → c4Diagram-IC4MRINW-Bte3s8bA.js} +1 -1
  8. package/dashboard/dist/assets/channel-BrnqMVFz.js +1 -0
  9. package/dashboard/dist/assets/{chunk-4BX2VUAB-Dul2PJq1.js → chunk-4BX2VUAB-BpEBr9cy.js} +1 -1
  10. package/dashboard/dist/assets/{chunk-55IACEB6-BNsItfH6.js → chunk-55IACEB6-C5vYlqEx.js} +1 -1
  11. package/dashboard/dist/assets/{chunk-FMBD7UC4-C3btqaF-.js → chunk-FMBD7UC4-C8wRljiW.js} +1 -1
  12. package/dashboard/dist/assets/{chunk-JSJVCQXG-BjrX5MC8.js → chunk-JSJVCQXG-svArzivt.js} +1 -1
  13. package/dashboard/dist/assets/{chunk-KX2RTZJC-xMrVR3MQ.js → chunk-KX2RTZJC-DPZbN7jl.js} +1 -1
  14. package/dashboard/dist/assets/{chunk-NQ4KR5QH-Dd67ojLx.js → chunk-NQ4KR5QH-ZqOPA0Z2.js} +1 -1
  15. package/dashboard/dist/assets/{chunk-QZHKN3VN-Dqombp1k.js → chunk-QZHKN3VN-BoxtsyU8.js} +1 -1
  16. package/dashboard/dist/assets/{chunk-WL4C6EOR-CCYZi5vV.js → chunk-WL4C6EOR-BoTByw-8.js} +1 -1
  17. package/dashboard/dist/assets/classDiagram-VBA2DB6C-BfXVQbAH.js +1 -0
  18. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-BfXVQbAH.js +1 -0
  19. package/dashboard/dist/assets/clone-Bm7jyblm.js +1 -0
  20. package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-CYmvV1RQ.js → cose-bilkent-S5V4N54A-CV74D8s_.js} +1 -1
  21. package/dashboard/dist/assets/{dagre-KLK3FWXG-DXFT_Iz5.js → dagre-KLK3FWXG-NXFGSDTv.js} +1 -1
  22. package/dashboard/dist/assets/{diagram-E7M64L7V-CkCF8e9h.js → diagram-E7M64L7V-CO89mocJ.js} +1 -1
  23. package/dashboard/dist/assets/{diagram-IFDJBPK2-CqIk_zgE.js → diagram-IFDJBPK2-CGOOte10.js} +1 -1
  24. package/dashboard/dist/assets/{diagram-P4PSJMXO-BV-579JX.js → diagram-P4PSJMXO-tRYoQWNN.js} +1 -1
  25. package/dashboard/dist/assets/{erDiagram-INFDFZHY-CeFxcSCp.js → erDiagram-INFDFZHY-D88FnNdx.js} +1 -1
  26. package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-D2IGFjb7.js → flowDiagram-PKNHOUZH-C2dCJPYX.js} +1 -1
  27. package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-CctYGwR7.js → ganttDiagram-A5KZAMGK-BVsm_TXU.js} +1 -1
  28. package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-zt67Doyo.js → gitGraphDiagram-K3NZZRJ6-DeYEcfwg.js} +1 -1
  29. package/dashboard/dist/assets/{graph-DZiyaEGT.js → graph-iy97f49o.js} +1 -1
  30. package/dashboard/dist/assets/index-BqxbS9Wf.css +1 -0
  31. package/dashboard/dist/assets/index-esLcRMJY.js +566 -0
  32. package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-jvCdU_x3.js → infoDiagram-LFFYTUFH-B_KPLd9N.js} +1 -1
  33. package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-B3LJ4cf3.js → ishikawaDiagram-PHBUUO56-D0i4hG75.js} +1 -1
  34. package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-CtEednnS.js → journeyDiagram-4ABVD52K-DxAv-6Dt.js} +1 -1
  35. package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-BhPQqjK5.js → kanban-definition-K7BYSVSG-CFV3hwVv.js} +1 -1
  36. package/dashboard/dist/assets/{layout-DBtJEEbD.js → layout-DkzGMO0p.js} +1 -1
  37. package/dashboard/dist/assets/{linear-CSinjjkH.js → linear-Di0t2dWQ.js} +1 -1
  38. package/dashboard/dist/assets/{mermaid.core-Cu6allRd.js → mermaid.core-BWdLQDB3.js} +4 -4
  39. package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-SFkGLxic.js → mindmap-definition-YRQLILUH-DHFtApR_.js} +1 -1
  40. package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-CM63Vi0v.js → pieDiagram-SKSYHLDU-CKv_gkpa.js} +1 -1
  41. package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-KNLfFOZV.js → quadrantDiagram-337W2JSQ-D8d0F939.js} +1 -1
  42. package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-CUTnDKwW.js → requirementDiagram-Z7DCOOCP-BpIRQ6xS.js} +1 -1
  43. package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-BJh1laae.js → sankeyDiagram-WA2Y5GQK-B6pEFLq9.js} +1 -1
  44. package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-DLrWjp9t.js → sequenceDiagram-2WXFIKYE-C_UzJJ9L.js} +1 -1
  45. package/dashboard/dist/assets/{stateDiagram-RAJIS63D-AYRZyAEg.js → stateDiagram-RAJIS63D-DffNJyzP.js} +1 -1
  46. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-Bb4Jseta.js +1 -0
  47. package/dashboard/dist/assets/{timeline-definition-YZTLITO2-BG2DbYEn.js → timeline-definition-YZTLITO2-BiMYMTvs.js} +1 -1
  48. package/dashboard/dist/assets/{treemap-KZPCXAKY-D8ZVNAo3.js → treemap-KZPCXAKY-CUEZz4mB.js} +1 -1
  49. package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-BqBHdSLd.js → vennDiagram-LZ73GAT5-Cpol_IHC.js} +1 -1
  50. package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-DBgm8PRH.js → xychartDiagram-JWTSCODW-CbnCJEuN.js} +1 -1
  51. package/dashboard/dist/index.html +2 -2
  52. package/dist/dashboard/server.js +2584 -431
  53. package/dist/dashboard/server.js.map +1 -1
  54. package/dist/index.js +4043 -999
  55. package/dist/index.js.map +1 -1
  56. package/dist/launch/index.d.ts +159 -6
  57. package/dist/launch/index.js +2162 -147
  58. package/dist/launch/index.js.map +1 -1
  59. package/package.json +1 -1
  60. package/platforms/claude-code/.claude-plugin/plugin.json +1 -1
  61. package/platforms/codex/.codex-plugin/plugin.json +1 -1
  62. package/platforms/hermes/plugins/syntaur/__pycache__/__init__.cpython-312.pyc +0 -0
  63. package/platforms/hermes/plugins/syntaur/__pycache__/boundary.cpython-312.pyc +0 -0
  64. package/dashboard/dist/assets/channel-CIhg4t-B.js +0 -1
  65. package/dashboard/dist/assets/classDiagram-VBA2DB6C-Bmt2MjbS.js +0 -1
  66. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-Bmt2MjbS.js +0 -1
  67. package/dashboard/dist/assets/clone-BfVm3try.js +0 -1
  68. package/dashboard/dist/assets/index-6uihSopA.css +0 -1
  69. package/dashboard/dist/assets/index-GK0h-4Nt.js +0 -566
  70. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-BRhe6_kr.js +0 -1
@@ -2,7 +2,7 @@ import { SpawnOptions, ChildProcess } from 'node:child_process';
2
2
 
3
3
  type TerminalChoice = 'terminal-app' | 'iterm' | 'ghostty' | 'alacritty' | 'warp' | 'kitty' | 'cmux';
4
4
 
5
- type OpenUrlErrorCode = 'bad-scheme' | 'bad-host' | 'missing-id' | 'both-ids' | 'malformed' | 'duplicate-param' | 'bad-terminal' | 'bad-mode';
5
+ type OpenUrlErrorCode = 'bad-scheme' | 'bad-host' | 'missing-id' | 'both-ids' | 'malformed' | 'duplicate-param' | 'bad-terminal' | 'bad-mode' | 'invalid-prompt';
6
6
  declare class OpenUrlError extends Error {
7
7
  readonly code: OpenUrlErrorCode;
8
8
  constructor(code: OpenUrlErrorCode, message: string);
@@ -34,6 +34,15 @@ interface ParsedOpenUrl {
34
34
  * parsed-but-ignored rather than rejected (keeps the parser simple).
35
35
  */
36
36
  agent?: string;
37
+ /**
38
+ * Optional one-shot launch-prompt override (the `prompt=` query param) — the
39
+ * dashboard's editable prompt box sends the (possibly edited) template here.
40
+ * Only set for `kind === 'assignment'` (sessions take their first message
41
+ * from history). Single-line and length-bounded (`MAX_OPEN_PROMPT_LENGTH`).
42
+ * Presence-significant: an empty string is a deliberate override (re-resolves
43
+ * to the fallback seed), distinct from `undefined` (no override).
44
+ */
45
+ prompt?: string;
37
46
  }
38
47
  /**
39
48
  * Parse a `syntaur://open?assignment=<id>` or `syntaur://open?session=<id>` URL.
@@ -85,12 +94,22 @@ interface AgentConfig {
85
94
  */
86
95
  model?: string;
87
96
  /**
88
- * Optional playbook slug for this runner profile. When set, a fresh "Open in
89
- * agent" launch seeds a prompt that grabs the assignment AND runs this
90
- * playbook end-to-end (see `INITIAL_PROMPT`). Blank/undefined keeps the plain
91
- * `/grab-assignment` seed.
97
+ * Optional playbook slug for this runner profile. Back-compat shorthand: when
98
+ * set (and no `launchPrompt`), a fresh "Open in agent" launch synthesizes a
99
+ * prompt that grabs the assignment AND runs this playbook end-to-end (see
100
+ * `resolveLaunchPrompt`). Blank/undefined keeps the plain `/grab-assignment`
101
+ * seed. Ignored for seed assembly when `launchPrompt` is also set.
92
102
  */
93
103
  playbook?: string;
104
+ /**
105
+ * Editable, user-owned launch prompt: the literal first message handed to the
106
+ * agent on a fresh "Open in agent" launch, with `@`-tokens resolved at launch
107
+ * time (`@assignment` → assignment id + records-dir path + grab/read
108
+ * instructions; `@<playbook-slug>` → a `/run-playbook` reference). When unset,
109
+ * falls back to back-compat `playbook`, then to the bare `/grab-assignment`
110
+ * seed. Takes precedence over `playbook`. Single-line (see `serializeAgentsConfig`).
111
+ */
112
+ launchPrompt?: string;
94
113
  }
95
114
 
96
115
  interface WorkspaceVisibilityConfig {
@@ -114,10 +133,43 @@ interface StatusTransition {
114
133
  description?: string;
115
134
  requiresReason?: boolean;
116
135
  }
136
+ /** One rung of the phase ladder (derived-status v3). Ordered low → high; the
137
+ * HIGHEST rung whose AQL `when` holds wins. Regressible by design (e.g. a
138
+ * replan invalidates approval and the phase drops). `phase` must be a defined
139
+ * status id; `next` is the human next-action label surfaced by views. */
140
+ interface PhaseRung {
141
+ phase: string;
142
+ when: string;
143
+ next?: string;
144
+ }
145
+ /** One disposition rule (first match wins). `when: null` is the `else` arm.
146
+ * `is` ∈ active|blocked|parked (terminal is never a rule — terminal statuses
147
+ * defer derivation entirely). */
148
+ interface DispositionRule {
149
+ when: string | null;
150
+ is: string;
151
+ }
152
+ /** Headline projection: which status id the single-column board shows.
153
+ * `terminal` is always passthrough and `active` always shows the phase; the
154
+ * configurable parts are which status ids represent parked/blocked. */
155
+ interface HeadlineProjection {
156
+ terminal: 'passthrough';
157
+ parked: string;
158
+ blocked: string;
159
+ active: 'phase';
160
+ }
161
+ interface DeriveConfig {
162
+ phaseLadder: PhaseRung[];
163
+ disposition: DispositionRule[];
164
+ headline: HeadlineProjection;
165
+ }
117
166
  interface StatusConfig {
118
167
  statuses: StatusDefinition[];
119
168
  order: string[];
120
169
  transitions: StatusTransition[];
170
+ /** Derived-status rules (v3). Null/absent → DEFAULT_DERIVE_CONFIG at resolve
171
+ * time. Persisted under `statuses:` so the Settings writer round-trips it. */
172
+ derive?: DeriveConfig | null;
121
173
  }
122
174
  interface TypeDefinition {
123
175
  id: string;
@@ -210,6 +262,8 @@ interface LaunchPlan {
210
262
  fallbackWarning: string | null;
211
263
  /** Non-fatal warning from shell-alias resolution falling back to /bin/sh. */
212
264
  shellFallbackWarning: string | null;
265
+ /** Non-fatal launch-prompt token warnings (unknown/malformed `@`-tokens). */
266
+ promptWarnings?: string[];
213
267
  }
214
268
  interface ResolveLaunchPlanInput {
215
269
  kind: 'assignment' | 'session';
@@ -238,6 +292,16 @@ interface ResolveLaunchPlanInput {
238
292
  * `LaunchError('agent-not-configured')`.
239
293
  */
240
294
  agentId?: string;
295
+ /**
296
+ * Only consulted when `kind === 'assignment'`. A one-shot launch-prompt
297
+ * override, wired from `?prompt=<text>` on the incoming `syntaur://` URL (the
298
+ * dashboard's editable prompt box). **Presence-significant:** when defined
299
+ * (including `''`) it is used as the `template` for `resolveLaunchPrompt`
300
+ * instead of `agent.launchPrompt`, so its `@`-tokens re-resolve and an empty
301
+ * value falls back through the normal empty-template path (never silently
302
+ * reusing `agent.launchPrompt`). Per-launch only — never written to config.
303
+ */
304
+ promptOverride?: string;
241
305
  }
242
306
  /**
243
307
  * Pick the agent the "Open in agent" flow should use. Order of preference:
@@ -340,6 +404,95 @@ declare const buildFreshArgv: typeof buildAgentArgv;
340
404
  */
341
405
  declare function buildSessionArgv(agent: AgentConfig, sessionId: string, mode: SessionMode, env?: NodeJS.ProcessEnv): BuiltArgv;
342
406
 
407
+ /**
408
+ * Editable launch-prompt resolution.
409
+ *
410
+ * An agent profile may carry an editable `launchPrompt` template whose
411
+ * `@`-tokens are expanded at launch time. This module is the single, pure home
412
+ * for that expansion plus the low-level seed builders shared with the
413
+ * (deprecated) `INITIAL_PROMPT`. It deliberately imports nothing from
414
+ * `../tui/launch.js` so there is no import cycle (`argv.ts` imports `tui/launch`,
415
+ * and `launch/index.ts` re-exports `argv.ts`) — callers import this module
416
+ * directly, not via the `launch/index.js` barrel.
417
+ */
418
+ /**
419
+ * The bare `/grab-assignment` seed — today's zero-config launch behavior. This
420
+ * is the single source of these strings, shared by `resolveLaunchPrompt`'s
421
+ * no-template fallback and `INITIAL_PROMPT`'s no-playbook branch (kept
422
+ * byte-identical for back-compat).
423
+ */
424
+ declare function bareGrabSeed(params: {
425
+ projectSlug: string | null;
426
+ assignmentSlug: string;
427
+ id?: string;
428
+ }): string;
429
+ /**
430
+ * The noun phrase a `@<playbook-slug>` token resolves to. The template author
431
+ * writes the surrounding verbs. NOTE: this is the new "via the /run-playbook
432
+ * skill" wording used ONLY by the resolver — `INITIAL_PROMPT`'s legacy playbook
433
+ * branch keeps its own "using the /run-playbook skill" sentence.
434
+ */
435
+ declare function runPlaybookClause(slug: string): string;
436
+ interface ResolveLaunchPromptInput {
437
+ /** The agent's editable launch prompt template (may contain `@`-tokens). */
438
+ template?: string | null;
439
+ /** Back-compat playbook slug; used only when `template` is empty. */
440
+ playbook?: string | null;
441
+ /** Assignment id (optional only to represent the rare slug-fallback seed). */
442
+ id?: string;
443
+ /** Records directory (where assignment.md lives), for `@assignment`. */
444
+ assignmentDir: string;
445
+ /** Null for a standalone assignment. */
446
+ projectSlug: string | null;
447
+ assignmentSlug: string;
448
+ /**
449
+ * Installed playbook slugs, injected by the call site. When provided, a
450
+ * well-formed `@<slug>` not in this set warns and is left literal. When
451
+ * undefined, every well-formed slug resolves without validation.
452
+ */
453
+ knownPlaybookSlugs?: ReadonlySet<string>;
454
+ }
455
+ interface ResolveLaunchPromptResult {
456
+ prompt: string;
457
+ /** Non-fatal warnings (unknown/malformed `@`-tokens). Never throws. */
458
+ warnings: string[];
459
+ }
460
+ /**
461
+ * Resolve the launch seed for a fresh "Open in agent" launch. Pure: never reads
462
+ * the filesystem, never prints. The caller owns warning output.
463
+ *
464
+ * Fallback chain:
465
+ * 1. `template` (trimmed non-empty) → resolve its `@`-tokens.
466
+ * 2. else `playbook` set → synthesize `<@assignment pointer> Run <clause> end-to-end.`
467
+ * (built directly — no `@`-token re-resolution, so a playbook literally named
468
+ * `assignment` cannot collide with the reserved token).
469
+ * 3. else → today's bare `/grab-assignment` seed.
470
+ * `template` wins over `playbook`.
471
+ */
472
+ declare function resolveLaunchPrompt(input: ResolveLaunchPromptInput): ResolveLaunchPromptResult;
473
+ /**
474
+ * The editable **template** to prefill the dashboard's "Open in agent" prompt
475
+ * box — NOT the resolved text. Returns:
476
+ * - `launchPrompt` verbatim when set (non-empty after trim); else
477
+ * - a synth template `@assignment Run <runPlaybookClause(playbook)> end-to-end.`
478
+ * when `playbook` is set — the playbook clause is LITERAL (only `@assignment`
479
+ * is a token), so re-resolving this through `resolveLaunchPrompt` reproduces
480
+ * this module's playbook synth (above) byte-for-byte for ANY playbook
481
+ * (installed / disabled / uninstalled / the reserved `assignment`); else
482
+ * - the bare `/grab-assignment` seed (no `@`-tokens).
483
+ *
484
+ * Prefilling the template (not resolved text) and resolving exactly once at
485
+ * launch avoids re-tokenizing an `@<slug>` that may appear inside an expanded
486
+ * records-dir path.
487
+ */
488
+ declare function effectiveLaunchTemplate(input: {
489
+ launchPrompt?: string | null;
490
+ playbook?: string | null;
491
+ projectSlug: string | null;
492
+ assignmentSlug: string;
493
+ id?: string;
494
+ }): string;
495
+
343
496
  type InstallKind = 'npx' | 'global' | 'local' | 'unknown';
344
497
  interface DetectOptions {
345
498
  realpath?: (p: string) => string;
@@ -387,4 +540,4 @@ declare function shouldNudgeForNpx(hash: string | null): Promise<boolean>;
387
540
  */
388
541
  declare function maybeNudgeForNpxInstall(scriptUrl: string): Promise<void>;
389
542
 
390
- export { type BuiltArgv, type InstallKind, LaunchError, type LaunchErrorCode, type LaunchPlan, OpenUrlError, type OpenUrlErrorCode, type ParsedOpenUrl, type ResolveLaunchPlanInput, type ResolvedArgv, type SessionMode, type SpawnFn, TerminalNotFoundError, buildFreshArgv, buildSessionArgv, buildShellCommandLine, buildTerminalInvocation, detectInstallKind, executeLaunchPlan, extractNpxHash, hasNudgedHash, isHandlerNudgeDisabled, maybeNudgeForNpxInstall, nudgeMessage, nudgeStampDir, nudgeStampPath, parseOpenUrl, pickAgent, recordNudge, resolveLaunchPlan, shouldNudgeForNpx };
543
+ export { type BuiltArgv, type InstallKind, LaunchError, type LaunchErrorCode, type LaunchPlan, OpenUrlError, type OpenUrlErrorCode, type ParsedOpenUrl, type ResolveLaunchPlanInput, type ResolveLaunchPromptInput, type ResolveLaunchPromptResult, type ResolvedArgv, type SessionMode, type SpawnFn, TerminalNotFoundError, bareGrabSeed, buildFreshArgv, buildSessionArgv, buildShellCommandLine, buildTerminalInvocation, detectInstallKind, effectiveLaunchTemplate, executeLaunchPlan, extractNpxHash, hasNudgedHash, isHandlerNudgeDisabled, maybeNudgeForNpxInstall, nudgeMessage, nudgeStampDir, nudgeStampPath, parseOpenUrl, pickAgent, recordNudge, resolveLaunchPlan, resolveLaunchPrompt, runPlaybookClause, shouldNudgeForNpx };