@qontinui/shared-types 0.8.1 → 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.
Files changed (36) hide show
  1. package/dist/index.cjs.map +1 -1
  2. package/dist/index.d.cts +412 -1
  3. package/dist/index.d.ts +412 -1
  4. package/package.json +1 -1
  5. package/src/generated/AgentCommand.d.ts +81 -0
  6. package/src/generated/AgentCommandError.d.ts +23 -0
  7. package/src/generated/AgentCommandVersion.d.ts +67 -0
  8. package/src/generated/App.d.ts +34 -0
  9. package/src/generated/AppError.d.ts +5 -0
  10. package/src/generated/ComponentActionInfo.d.ts +33 -0
  11. package/src/generated/ElementState.d.ts +27 -1
  12. package/src/generated/GitCommitLite.d.ts +24 -0
  13. package/src/generated/GitLite.d.ts +27 -0
  14. package/src/generated/HealthLevel.d.ts +11 -0
  15. package/src/generated/HealthLite.d.ts +28 -0
  16. package/src/generated/HelperAnswer.d.ts +47 -0
  17. package/src/generated/HelperAnswerSchema.d.ts +40 -0
  18. package/src/generated/HelperTask.d.ts +59 -0
  19. package/src/generated/HelperTaskKind.d.ts +16 -0
  20. package/src/generated/HelperTaskPayload.d.ts +37 -0
  21. package/src/generated/HelperTaskSource.d.ts +31 -0
  22. package/src/generated/HelperTaskStatus.d.ts +14 -0
  23. package/src/generated/HelperVerdict.d.ts +21 -0
  24. package/src/generated/PendingQuestion.d.ts +32 -0
  25. package/src/generated/ProcessStatusLite.d.ts +38 -0
  26. package/src/generated/ProjectSnapshot.d.ts +63 -0
  27. package/src/generated/RegisterAppRequest.d.ts +24 -0
  28. package/src/generated/SavedProject.d.ts +102 -0
  29. package/src/generated/SessionLite.d.ts +44 -0
  30. package/src/generated/SessionSource.d.ts +11 -0
  31. package/src/generated/SpecCheckResult.d.ts +7 -0
  32. package/src/generated/StateMatchResult.d.ts +5 -0
  33. package/src/generated/UIBridgeComponent.d.ts +10 -0
  34. package/src/generated/UpdateAppRequest.d.ts +24 -0
  35. package/src/generated/index.ts +21 -0
  36. package/src/index.ts +14 -0
package/dist/index.d.ts CHANGED
@@ -327,6 +327,417 @@ interface SpecValidation {
327
327
  */
328
328
  type ProposalStatus = "proposed" | "pending" | "promoted";
329
329
 
330
+ /* eslint-disable */
331
+ /**
332
+ * This file was automatically generated.
333
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
334
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
335
+ */
336
+
337
+ /**
338
+ * A project the user has told the runner about (typically via the setup
339
+ * wizard's project picker, the new-project flow, or the Projects
340
+ * dashboard's "find on disk" discovery).
341
+ *
342
+ * Persisted to `settings.json` under the `saved_projects` key.
343
+ *
344
+ * `id` is the stable key: a project's `path` can move on disk (renamed
345
+ * folder, relocated workspace) but its identity must not. Entries persisted
346
+ * before `id` existed are backfilled with a freshly-minted UUID on first
347
+ * load — `#[serde(default)]` exists only so that load succeeds, never as a
348
+ * legitimate steady-state value.
349
+ *
350
+ * `project_type` is deliberately a free-form `String` so a new framework
351
+ * never requires a schema change.
352
+ * `Default` exists so a producer that only knows a few fields can write
353
+ * `SavedProject { path, name, ..Default::default() }` — the new-project flow
354
+ * and the setup wizard both do. A defaulted `id` is the empty string, which
355
+ * the registry treats as "mint me one" (see the field docs), never as a key.
356
+ */
357
+ interface SavedProject {
358
+ /**
359
+ * Accent colour for the card, as a CSS colour string.
360
+ */
361
+ color?: string | null;
362
+ /**
363
+ * One-line plain-English description ("Website for the pizzeria, with
364
+ * menu + ordering"). Shown on the project card under the name.
365
+ */
366
+ description?: string | null;
367
+ /**
368
+ * Emoji used as the card's visual identity (e.g. "🍕").
369
+ */
370
+ emoji?: string | null;
371
+ /**
372
+ * The project's front page ("http://localhost:3000"). Seeded from the
373
+ * setup wizard's dev-server port detection; user-correctable.
374
+ */
375
+ frontPageUrl?: string | null;
376
+ /**
377
+ * Stable identifier (UUID). Survives a path move; the registry key.
378
+ */
379
+ id: string;
380
+ /**
381
+ * Unix epoch milliseconds of the last time the project was activated.
382
+ */
383
+ lastOpenedMs?: number | null;
384
+ /**
385
+ * Manifest file that identified the project (e.g. "package.json").
386
+ */
387
+ manifest: string;
388
+ /**
389
+ * Human-friendly display name (usually the directory basename).
390
+ */
391
+ name: string;
392
+ /**
393
+ * The user's own free-form notes about the project.
394
+ */
395
+ notes?: string | null;
396
+ /**
397
+ * Absolute path to the project root.
398
+ */
399
+ path: string;
400
+ /**
401
+ * Pinned projects sort first and render as sidebar entries.
402
+ */
403
+ pinned: boolean;
404
+ /**
405
+ * Ids of the `ProcessConfig` entries this project owns.
406
+ */
407
+ processIds: string[];
408
+ /**
409
+ * Framework/language tag, e.g. "react", "python", "rust", "node".
410
+ */
411
+ projectType: string;
412
+ /**
413
+ * `owner/name` GitHub slug, from `repo_detection::detect_repo_slug`.
414
+ */
415
+ repoSlug?: string | null;
416
+ /**
417
+ * Bound Terminal page id.
418
+ *
419
+ * **A hint, not a handle.** Terminal pages persist to the frontend's
420
+ * `instanceStorage` (localStorage, port-namespaced), which Rust cannot
421
+ * read, so this id can name a page that does not exist in the current
422
+ * window. Activation must treat an unknown id as "not created yet" —
423
+ * create a page named after the project and rewrite the id — and must
424
+ * never fail on a dangling value.
425
+ */
426
+ terminalPageId?: string | null;
427
+ /**
428
+ * Terminal zone profile to restore when the project is activated.
429
+ */
430
+ zoneProfile?: string | null;
431
+ }
432
+
433
+ /* eslint-disable */
434
+ /**
435
+ * This file was automatically generated.
436
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
437
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
438
+ */
439
+
440
+ /**
441
+ * One commit in [`GitLite::last_commits`].
442
+ */
443
+ interface GitCommitLite {
444
+ /**
445
+ * Unix epoch milliseconds of the commit timestamp.
446
+ */
447
+ committedMs: number;
448
+ /**
449
+ * Abbreviated commit sha.
450
+ */
451
+ sha: string;
452
+ /**
453
+ * Commit subject line.
454
+ */
455
+ subject: string;
456
+ }
457
+
458
+ /* eslint-disable */
459
+ /**
460
+ * This file was automatically generated.
461
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
462
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
463
+ */
464
+
465
+
466
+
467
+ /**
468
+ * Git state of the project root. `None` on the snapshot when the root is
469
+ * not a git working tree (or git is unavailable).
470
+ */
471
+ interface GitLite {
472
+ /**
473
+ * Current branch. `None` on a detached HEAD.
474
+ */
475
+ branch?: string | null;
476
+ /**
477
+ * Number of `git status --porcelain` entries (uncommitted changes).
478
+ */
479
+ dirtyCount: number;
480
+ /**
481
+ * Newest commits first.
482
+ */
483
+ lastCommits: GitCommitLite[];
484
+ }
485
+
486
+ /* eslint-disable */
487
+ /**
488
+ * This file was automatically generated.
489
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
490
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
491
+ */
492
+
493
+ /**
494
+ * Traffic-light level for [`HealthLite`].
495
+ */
496
+ type HealthLevel = "green" | "amber" | "red" | "unknown";
497
+
498
+ /* eslint-disable */
499
+ /**
500
+ * This file was automatically generated.
501
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
502
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
503
+ */
504
+
505
+
506
+
507
+ /**
508
+ * One green/amber/red answer to "is it broken?", plus the plain-English
509
+ * reason behind it.
510
+ */
511
+ interface HealthLite {
512
+ /**
513
+ * Names of the processes driving an amber/red verdict.
514
+ */
515
+ failingProcesses: string[];
516
+ /**
517
+ * The traffic light.
518
+ */
519
+ level?: HealthLevel & string;
520
+ /**
521
+ * Why — a sentence a non-developer can read
522
+ * ("The website still starts up fine").
523
+ */
524
+ reason: string;
525
+ }
526
+
527
+ /* eslint-disable */
528
+ /**
529
+ * This file was automatically generated.
530
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
531
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
532
+ */
533
+
534
+ /**
535
+ * A question an agent is blocked on, awaiting the user's answer.
536
+ */
537
+ interface PendingQuestion {
538
+ /**
539
+ * Unix epoch milliseconds the question was raised.
540
+ */
541
+ createdAtMs?: number | null;
542
+ /**
543
+ * `deferred_questions.id`.
544
+ */
545
+ id: string;
546
+ /**
547
+ * The question text, as shown to the user.
548
+ */
549
+ question: string;
550
+ /**
551
+ * Risk level the asking agent assigned ("low" | "medium" | "high").
552
+ */
553
+ riskLevel?: string | null;
554
+ /**
555
+ * The session that asked.
556
+ */
557
+ taskRunId: string;
558
+ }
559
+
560
+ /* eslint-disable */
561
+ /**
562
+ * This file was automatically generated.
563
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
564
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
565
+ */
566
+
567
+ /**
568
+ * State of a managed process.
569
+ *
570
+ * Ordering mirrors the lifecycle progression:
571
+ * `Stopped → Starting → (Building) → Running → Healthy → Stopping → Stopped`,
572
+ * or to `Failed` on any abnormal exit.
573
+ * `ExternallyOwned` is a special out-of-band state meaning "a process is
574
+ * running on our port, but this runner did not spawn it" — used by the
575
+ * process-reconcile feature to surface port squatters without touching the
576
+ * normal lifecycle.
577
+ */
578
+ type ProcessState =
579
+ | (
580
+ | "stopped"
581
+ | "starting"
582
+ | "building"
583
+ | "running"
584
+ | "healthy"
585
+ | "stopping"
586
+ | "failed"
587
+ )
588
+ | "externally_owned";
589
+
590
+ /* eslint-disable */
591
+ /**
592
+ * This file was automatically generated.
593
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
594
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
595
+ */
596
+
597
+
598
+
599
+ /**
600
+ * A managed process attributed to a project, reduced to what the dashboard
601
+ * renders. Full detail stays in `ProcessStatus` / `ProcessConfig`.
602
+ */
603
+ interface ProcessStatusLite {
604
+ /**
605
+ * Working directory — the field that attributed this process to the
606
+ * project in the first place.
607
+ */
608
+ cwd: string;
609
+ /**
610
+ * Health port, when the process declares one.
611
+ */
612
+ healthPort?: number | null;
613
+ /**
614
+ * `ProcessConfig.id`.
615
+ */
616
+ id: string;
617
+ /**
618
+ * Human-readable process name ("Website").
619
+ */
620
+ name: string;
621
+ /**
622
+ * Whether the health port is currently responding. `None` when the
623
+ * process declares no health port.
624
+ */
625
+ portHealthy?: boolean | null;
626
+ state: ProcessState;
627
+ }
628
+
629
+ /* eslint-disable */
630
+ /**
631
+ * This file was automatically generated.
632
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
633
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
634
+ */
635
+
636
+ /**
637
+ * Where a [`SessionLite`] was observed.
638
+ */
639
+ type SessionSource = "terminal" | "touched_files";
640
+
641
+ /* eslint-disable */
642
+ /**
643
+ * This file was automatically generated.
644
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
645
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
646
+ */
647
+
648
+
649
+
650
+ /**
651
+ * One session attributed to a project — either a live terminal or an AI
652
+ * session reconstructed from its touched files.
653
+ */
654
+ interface SessionLite {
655
+ /**
656
+ * Number of distinct files this session touched **under this project
657
+ * root**. Zero for terminal-sourced rows.
658
+ */
659
+ filesTouched: number;
660
+ /**
661
+ * `task_runs.id` for AI sessions, the terminal id for live terminals.
662
+ */
663
+ id: string;
664
+ /**
665
+ * Unix epoch milliseconds of the most recent observed activity —
666
+ * `max(recorded_at)` over the session's touched files, or the
667
+ * terminal's creation time.
668
+ */
669
+ lastActivityMs?: number | null;
670
+ /**
671
+ * Session name — `task_runs.task_name` or the terminal's title.
672
+ */
673
+ name?: string | null;
674
+ source: SessionSource;
675
+ /**
676
+ * `task_runs.status` ("running", "completed", …) for AI sessions;
677
+ * `None` for terminals (liveness is `is_alive` in the terminal list).
678
+ */
679
+ status?: string | null;
680
+ /**
681
+ * Working directory, when known (terminal sessions always carry one).
682
+ */
683
+ workingDir?: string | null;
684
+ }
685
+
686
+ /* eslint-disable */
687
+ /**
688
+ * This file was automatically generated.
689
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
690
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
691
+ */
692
+
693
+
694
+
695
+ /**
696
+ * The joined dashboard view of one project.
697
+ *
698
+ * Every field on both the grid card and the detail page is a projection of
699
+ * this single struct — computed server-side in one call so the page never
700
+ * fans out.
701
+ */
702
+ interface ProjectSnapshot {
703
+ /**
704
+ * Git state of the root, when it is a git working tree.
705
+ */
706
+ git?: GitLite | null;
707
+ /**
708
+ * The project's traffic light.
709
+ */
710
+ health?: HealthLite & {};
711
+ /**
712
+ * Unix epoch milliseconds of the newest activity of any kind.
713
+ */
714
+ lastActivityMs?: number | null;
715
+ /**
716
+ * Live terminal sessions whose `working_dir` is under the project root.
717
+ */
718
+ liveSessions: SessionLite[];
719
+ /**
720
+ * Managed processes whose `cwd` is under the project root.
721
+ */
722
+ processes: ProcessStatusLite[];
723
+ project: SavedProject;
724
+ /**
725
+ * Questions waiting on the user, from `deferred_questions`.
726
+ */
727
+ questions: PendingQuestion[];
728
+ /**
729
+ * Recent AI sessions, newest first, attributed via
730
+ * `coord.session_touched_files`.
731
+ */
732
+ recentSessions: SessionLite[];
733
+ /**
734
+ * Rolling 7-day spend attributed to this project, in USD. `None` when
735
+ * cost data is unavailable — distinct from `Some(0.0)`, which means
736
+ * "measured, and it was free".
737
+ */
738
+ spend7dUsd?: number | null;
739
+ }
740
+
330
741
  /* eslint-disable */
331
742
  /**
332
743
  * This file was automatically generated.
@@ -1553,4 +1964,4 @@ declare const DETECTION_METHODS: {
1553
1964
  label: string;
1554
1965
  }[];
1555
1966
 
1556
- export { type AcceptanceCriteriaData, type AlertData, type CanvasComponentType, type CanvasPanel, type CanvasUpdateEvent, type ChecklistData, type CodeDiffData, type ComponentRenderLogEntry, type CostBreakdownData, type CreateKnownIssueRequest, type CreatePatternTemplateRequest, type CreateRenderLogRequest, DETECTION_METHODS, type DependencyGraphData, type DetectionMethod, type DiscoveredState, type DiscoveredStateImage, type DiscoveredTransition, type DiscoveryBoundingBox, type DiscoverySourceType, type DiscoveryTransitionTrigger, type DomElementSnapshot, type DomMutationType, type DomSnapshot, type DomSnapshotRenderLogEntry, type ElementRect, type FileTreeData, type FindingListData, type FormSnapshot, ISSUE_CATEGORIES, ISSUE_SEVERITIES, type ImageSnapshot, type IssueCategory, type IssuePatternTemplate, type IssueProvenance, type IssueStatus, type IterationComparisonData, type KeyValueData, type KnownIssue, type KnownIssueSeverity, type LinkSnapshot, type ListKnownIssuesQuery, type MarkdownData, type MemoryListQuery, type MemoryListResponse, type MemoryRestoreRequest, type MemoryRow, type MemorySummary, type MemoryUpsertRequest, type MemoryUpsertResponse, type MemoryWithHistory, type MissionBriefData, type PhaseDistributionData, type PhaseTimelineData, type ProgressChartData, type ProposalStatus, type RenderLogEntry, type RenderLogEntryBase, type RenderLogList, type RenderLogResponse, type RenderLogStats, type RenderLogSummary, type RenderLogTrigger, SOURCE_TYPE_COLORS, SOURCE_TYPE_LABELS, type ScopeType, type SparklineData, type SpecValidation, type StateDiscoveryResult, type StateDiscoveryResultCreate, type StateDiscoveryResultListResponse, type StateDiscoveryResultSummary, type StateDiscoveryResultUpdate, type StateMachineExport, type StateMachineImport, type StateTimelineData, type StepDurationChartData, type SummaryStatsData, type TableData, type TemplateParameter, type TerminalData, type TimelineData, type TransitionTriggerType, type UpdateKnownIssueRequest, type WaffleChartData, type WaterfallData, isComponentRenderLog, isDomSnapshotRenderLog, toDiscoveredState, toDiscoveredStateImage, toDiscoveredTransition, toStateDiscoveryResult, toStateDiscoveryResultSummary };
1967
+ export { type AcceptanceCriteriaData, type AlertData, type CanvasComponentType, type CanvasPanel, type CanvasUpdateEvent, type ChecklistData, type CodeDiffData, type ComponentRenderLogEntry, type CostBreakdownData, type CreateKnownIssueRequest, type CreatePatternTemplateRequest, type CreateRenderLogRequest, DETECTION_METHODS, type DependencyGraphData, type DetectionMethod, type DiscoveredState, type DiscoveredStateImage, type DiscoveredTransition, type DiscoveryBoundingBox, type DiscoverySourceType, type DiscoveryTransitionTrigger, type DomElementSnapshot, type DomMutationType, type DomSnapshot, type DomSnapshotRenderLogEntry, type ElementRect, type FileTreeData, type FindingListData, type FormSnapshot, type GitCommitLite, type GitLite, type HealthLevel, type HealthLite, ISSUE_CATEGORIES, ISSUE_SEVERITIES, type ImageSnapshot, type IssueCategory, type IssuePatternTemplate, type IssueProvenance, type IssueStatus, type IterationComparisonData, type KeyValueData, type KnownIssue, type KnownIssueSeverity, type LinkSnapshot, type ListKnownIssuesQuery, type MarkdownData, type MemoryListQuery, type MemoryListResponse, type MemoryRestoreRequest, type MemoryRow, type MemorySummary, type MemoryUpsertRequest, type MemoryUpsertResponse, type MemoryWithHistory, type MissionBriefData, type PendingQuestion, type PhaseDistributionData, type PhaseTimelineData, type ProcessStatusLite, type ProgressChartData, type ProjectSnapshot, type ProposalStatus, type RenderLogEntry, type RenderLogEntryBase, type RenderLogList, type RenderLogResponse, type RenderLogStats, type RenderLogSummary, type RenderLogTrigger, SOURCE_TYPE_COLORS, SOURCE_TYPE_LABELS, type SavedProject, type ScopeType, type SessionLite, type SessionSource, type SparklineData, type SpecValidation, type StateDiscoveryResult, type StateDiscoveryResultCreate, type StateDiscoveryResultListResponse, type StateDiscoveryResultSummary, type StateDiscoveryResultUpdate, type StateMachineExport, type StateMachineImport, type StateTimelineData, type StepDurationChartData, type SummaryStatsData, type TableData, type TemplateParameter, type TerminalData, type TimelineData, type TransitionTriggerType, type UpdateKnownIssueRequest, type WaffleChartData, type WaterfallData, isComponentRenderLog, isDomSnapshotRenderLog, toDiscoveredState, toDiscoveredStateImage, toDiscoveredTransition, toStateDiscoveryResult, toStateDiscoveryResultSummary };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qontinui/shared-types",
3
- "version": "0.8.1",
3
+ "version": "0.12.0",
4
4
  "description": "Shared TypeScript types for the Qontinui ecosystem",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,81 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ /**
9
+ * An account-scoped **override** of a runner-embedded default agent command.
10
+ *
11
+ * Presence of this record means "this organization has customized the command
12
+ * named `name`"; absence means the embedded default applies. See the module
13
+ * docs for the full resolution order and the delete-is-reset semantics.
14
+ *
15
+ * `body` is the whole markdown procedure — the exact bytes written to
16
+ * `.claude/commands/<name>.md`. It is **untrusted remote content** from the
17
+ * runner's point of view: it is markdown rather than code, but it is
18
+ * instructions to an agent, so consumers fail soft (a malformed override falls
19
+ * back to the embedded default and warns) and never fetch cross-org.
20
+ */
21
+ export interface AgentCommand {
22
+ /**
23
+ * The full markdown body of the command.
24
+ */
25
+ body: string;
26
+ /**
27
+ * Content hash of [`body`](Self::body), for cheap change detection
28
+ * (cache invalidation, diff-against-default). `None` on rows written
29
+ * before a checksum was computed.
30
+ *
31
+ * Computed by [`agent_command_checksum`] — `"sha256-<hex>"` over the
32
+ * LF-normalized body. Do not hand-roll it; a producer that hashes raw
33
+ * bytes disagrees with one that hashes a CRLF round-trip.
34
+ */
35
+ checksum?: string | null;
36
+ /**
37
+ * ISO 8601 (RFC 3339) creation timestamp.
38
+ */
39
+ created_at: string;
40
+ /**
41
+ * User who last authored this override. **Attribution only** — it does not
42
+ * scope visibility; [`organization_id`](Self::organization_id) does.
43
+ */
44
+ created_by_user_id?: string | null;
45
+ /**
46
+ * Head of the version chain — the `version_number` of the
47
+ * [`AgentCommandVersion`] whose body this record currently carries.
48
+ * Starts at 1 and only ever increases (a revert bumps it; see the module
49
+ * docs).
50
+ */
51
+ current_version: number;
52
+ /**
53
+ * Override record id (UUID v4 string).
54
+ */
55
+ id: string;
56
+ /**
57
+ * Whether this override is visible to the whole organization rather than
58
+ * only its author. Absent means `false`.
59
+ */
60
+ is_shared: boolean;
61
+ /**
62
+ * The command slug, e.g. `vet-plan` or `implement-plan`. This is the
63
+ * override key: it must equal the name of the embedded default it
64
+ * replaces, and it is the filename stem under `.claude/commands/`.
65
+ *
66
+ * Because it becomes a path component, it is a write-boundary value —
67
+ * validate it with [`validate_agent_command_name`] before persisting.
68
+ */
69
+ name: string;
70
+ /**
71
+ * Owning organization (`auth.organizations.id`). `None` where the row has
72
+ * been orphaned by an organization deletion (`ondelete SET NULL`); such a
73
+ * row is not resolvable by any account and behaves as no override.
74
+ */
75
+ organization_id?: string | null;
76
+ /**
77
+ * ISO 8601 (RFC 3339) last-modification timestamp.
78
+ */
79
+ updated_at: string;
80
+ [k: string]: unknown;
81
+ }
@@ -0,0 +1,23 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ /**
9
+ * Failure modes for agent-command overrides. Mirrors the tagged-enum shape of
10
+ * [`crate::apps::AppError`], so the qontinui-web layer can surface a rejected
11
+ * override the same way it surfaces a rejected app registration.
12
+ */
13
+ export type AgentCommandError =
14
+ | {
15
+ name: string;
16
+ reason: "invalid-name";
17
+ [k: string]: unknown;
18
+ }
19
+ | {
20
+ name: string;
21
+ reason: "reserved-name";
22
+ [k: string]: unknown;
23
+ };
@@ -0,0 +1,67 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated.
4
+ * DO NOT MODIFY IT BY HAND. Regenerate with `just generate-types` or
5
+ * `qontinui-runner/src-tauri/scripts/generate_types.sh`.
6
+ */
7
+
8
+ /**
9
+ * One immutable entry in an [`AgentCommand`]'s append-only version chain.
10
+ *
11
+ * Rows are **only ever inserted**. An edit appends the next `version_number`;
12
+ * a revert appends a new version whose `body` is copied from an older one and
13
+ * whose [`restored_from`](Self::restored_from) names that older version.
14
+ * Nothing in the chain is updated or deleted, so the chain is the complete
15
+ * edit history and "revert" is itself a recorded edit.
16
+ */
17
+ export interface AgentCommandVersion {
18
+ /**
19
+ * The [`AgentCommand`] this version belongs to. Deleting the override
20
+ * cascades to its versions — resetting to the default discards the
21
+ * account's edit history along with the override.
22
+ */
23
+ agent_command_id: string;
24
+ /**
25
+ * The full markdown body as of this version.
26
+ */
27
+ body: string;
28
+ /**
29
+ * Free-text note describing what changed, supplied by the editor. Revert
30
+ * writes a generated one (e.g. `"Restored from version 2"`).
31
+ */
32
+ change_description?: string | null;
33
+ /**
34
+ * Content hash of [`body`](Self::body) at this version, from
35
+ * [`agent_command_checksum`]. Equal checksums on two versions mean the
36
+ * bodies are identical — which is what lets the UI show a revert as
37
+ * "back to v2's content" without refetching either body.
38
+ */
39
+ checksum?: string | null;
40
+ /**
41
+ * ISO 8601 (RFC 3339) creation timestamp. Versions are immutable, so
42
+ * there is deliberately no `updated_at`.
43
+ */
44
+ created_at: string;
45
+ /**
46
+ * User who authored this version. Attribution only.
47
+ */
48
+ created_by_user_id?: string | null;
49
+ /**
50
+ * Version-row id (UUID v4 string).
51
+ */
52
+ id: string;
53
+ /**
54
+ * Provenance for a revert: the `version_number` this version's body was
55
+ * copied from. `None` for an ordinary edit. Present only on versions
56
+ * produced by a restore, which is how the UI distinguishes "edited" from
57
+ * "reverted to v2" in the history list.
58
+ */
59
+ restored_from?: number | null;
60
+ /**
61
+ * Monotonic version number within this command, starting at 1. Unique per
62
+ * `(agent_command_id, version_number)`; the DB constraint — not
63
+ * application code — is what rejects a duplicate under concurrent appends.
64
+ */
65
+ version_number: number;
66
+ [k: string]: unknown;
67
+ }
@@ -7,10 +7,44 @@
7
7
 
8
8
  export interface App {
9
9
  appId: string;
10
+ /**
11
+ * Whether this app requires authentication before spec checks.
12
+ * If true, workflows will auto-inject an auth setup step.
13
+ */
14
+ authRequired: boolean;
15
+ /**
16
+ * Build command to run after pulling updated source (P3 auto-fresh).
17
+ * Ignored if `update_strategy` is "pull_only". Optional; if None,
18
+ * the auto-fresh engine skips build and goes straight to start_command.
19
+ */
20
+ buildCommand?: string | null;
10
21
  createdAtMs: number;
11
22
  displayName: string;
12
23
  lastSeenAtMs: number;
24
+ /**
25
+ * Red threshold for spec match rates (0.0–1.0). Match rates below this are Red (fail).
26
+ * Must be less than `yellow_threshold`. Defaults to 0.5.
27
+ */
28
+ redThreshold: number;
13
29
  repoRoot: string;
30
+ /**
31
+ * Start command to run after a successful build (P3 auto-fresh).
32
+ * Restarts the deployed instance and updates app_deploy_state.
33
+ * Ignored if `update_strategy` is "pull_only". Optional.
34
+ */
35
+ startCommand?: string | null;
14
36
  uiBridgeUrl: string;
37
+ /**
38
+ * Auto-fresh update strategy: "pull_only" (pull code, no restart) or
39
+ * "pull_build" (pull, run build_command, run start_command). Used by the
40
+ * runner's P3 auto-fresh engine to decide what actions to take when
41
+ * pulling updated source code. Defaults to "pull_only".
42
+ */
43
+ updateStrategy: string;
44
+ /**
45
+ * Yellow threshold for spec match rates (0.0–1.0). Match rates >= this are Green (pass),
46
+ * below are Yellow (warn). Must be greater than `red_threshold`. Defaults to 0.8.
47
+ */
48
+ yellowThreshold: number;
15
49
  [k: string]: unknown;
16
50
  }
@@ -30,4 +30,9 @@ export type AppError =
30
30
  appId: string;
31
31
  reason: "already-registered";
32
32
  [k: string]: unknown;
33
+ }
34
+ | {
35
+ reason: "invalid-update-strategy";
36
+ updateStrategy: string;
37
+ [k: string]: unknown;
33
38
  };