@qontinui/shared-types 0.13.0 → 0.14.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qontinui/shared-types",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Shared TypeScript types for the Qontinui ecosystem",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,110 @@
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 embedded default as the **runner binary** ships it, on its way to the
10
+ * account so there is a baseline to diff an override against.
11
+ *
12
+ * ## Why this exists as a third layer
13
+ *
14
+ * [`AgentTextUnit`]'s resolution chain is
15
+ * `account override → fleet default → embedded default (runner binary)`, and
16
+ * the store holds rows for the first two only — the binary's copy has never
17
+ * had a row anywhere. That is the gap this type closes. A user who overrode
18
+ * `/implement-plan` can diff their versions against each other but not
19
+ * against what actually ships, and `ResetToDefaultDialog` cannot preview the
20
+ * text it is about to restore, because there is no baseline to put on the
21
+ * left-hand side.
22
+ *
23
+ * Plan `2026-08-31-runner-publishes-embedded-command-defaults`; the deferral
24
+ * it discharges is recorded in the code at qontinui-web's
25
+ * `settings/agent-commands/_components/VersionDiff.tsx`.
26
+ *
27
+ * ## What it is NOT
28
+ *
29
+ * * **Not an [`AgentTextUnit`].** There is no `id`, no version chain, and no
30
+ * `is_shared` — a published default is content plus provenance, not a
31
+ * corpus row with an edit history. It is the *input* to a row.
32
+ * * **Not fleet-scoped.** `organization_id` is deliberately absent from the
33
+ * wire: the runner publishes with the operator's own user bearer, so the
34
+ * server assigns the org from that credential. A client-supplied org — or
35
+ * the fleet layer's `organization_id IS NULL` — would let any signed-in
36
+ * user rewrite another tenant's baseline, or silently clobber an
37
+ * operator's deliberate fleet default.
38
+ * * **Not authoritative for provisioning.** The runner keeps resolving
39
+ * `fresh fetch → disk cache → embedded default`; this is a *display*
40
+ * baseline. Publishing it must never put the network on the
41
+ * out-of-the-box path.
42
+ *
43
+ * ## The checksum is the files-map digest, not the single-body one
44
+ *
45
+ * [`checksum`](Self::checksum) is [`agent_text_unit_files_checksum`] — the
46
+ * same digest [`AgentTextUnit::checksum`] and [`AgentTextUnitVersion`] carry,
47
+ * so a published default and the override it is diffed against are
48
+ * comparable. It is **not**
49
+ * [`crate::agent_commands::agent_command_checksum`], which digests a single
50
+ * body and is what the legacy `/agent-commands` wire still carries. Those two
51
+ * deliberately disagree even for a one-entry map, so a default digested with
52
+ * the wrong one would never compare equal to its override — an always-drifted
53
+ * baseline, which is strictly worse than the honest "baseline unavailable"
54
+ * state it would replace.
55
+ */
56
+ export interface AgentTextUnitDefault {
57
+ /**
58
+ * Canonical digest over [`files`](Self::files), from
59
+ * [`agent_text_unit_files_checksum`].
60
+ *
61
+ * Required, unlike [`AgentTextUnit::checksum`] — that one is optional only
62
+ * to describe rows written before a checksum was computed, whereas a
63
+ * publish is always freshly computed. The receiving store **recomputes it
64
+ * and rejects a mismatch**: a client-asserted digest is not evidence.
65
+ * [`checksum_matches`](Self::checksum_matches) is that check.
66
+ */
67
+ checksum: string;
68
+ /**
69
+ * The embedded content: **relative path → text**. A command carries one
70
+ * entry; a skill carries `SKILL.md` plus siblings. Same arity-agnostic
71
+ * shape as [`AgentTextUnit::files`].
72
+ */
73
+ files: {
74
+ [k: string]: string;
75
+ };
76
+ /**
77
+ * What sort of unit this default is. The corpus is `kind`-discriminated,
78
+ * so the default layer must be too — otherwise a command and a skill of
79
+ * the same name collapse into one baseline.
80
+ */
81
+ kind: string;
82
+ /**
83
+ * The unit slug, e.g. `vet-plan`. Must satisfy the same
84
+ * [`validate_agent_text_unit_name`] rules as an override: a default that
85
+ * could not be named as an override could never be paired with one for a
86
+ * diff, which is the only thing it is for.
87
+ */
88
+ name: string;
89
+ /**
90
+ * ISO 8601 (RFC 3339) publish timestamp, matching this module's wire
91
+ * convention for [`AgentTextUnit::updated_at`] and
92
+ * [`AgentTextUnitVersion::created_at`].
93
+ */
94
+ published_at: string;
95
+ /**
96
+ * The runner version that published this body, e.g. `"0.4.12"`.
97
+ *
98
+ * Carried so the UI can label the baseline **"published by runner
99
+ * vX.Y.Z"** rather than "the default" — an org whose devices run
100
+ * different builds has no single default, and the label must not claim
101
+ * otherwise. It is also the monotonic guard's input: the store rejects a
102
+ * publish older than the version it already holds.
103
+ *
104
+ * That guard is a **mitigation, not a fix** — a genuine downgrade still
105
+ * wins and equal versions tie-break last-writer — so neither this field
106
+ * nor the UI built on it may describe the baseline as authoritative.
107
+ */
108
+ published_by_version: string;
109
+ [k: string]: unknown;
110
+ }
@@ -22,6 +22,7 @@ export type { AgentCommand } from './AgentCommand';
22
22
  export type { AgentCommandError } from './AgentCommandError';
23
23
  export type { AgentCommandVersion } from './AgentCommandVersion';
24
24
  export type { AgentTextUnit } from './AgentTextUnit';
25
+ export type { AgentTextUnitDefault } from './AgentTextUnitDefault';
25
26
  export type { AgentTextUnitError } from './AgentTextUnitError';
26
27
  export type { AgentTextUnitFile } from './AgentTextUnitFile';
27
28
  export type { AgentTextUnitVersion } from './AgentTextUnitVersion';