@owlmeans/viable-common 0.0.46 → 0.0.47

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 (153) hide show
  1. package/README.md +163 -14
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/agent-presentation/SKILL.md +1 -1
  4. package/agent-meta/skills/viable-common/SKILL.md +122 -30
  5. package/build/connect/account/types.d.ts +81 -0
  6. package/build/connect/account/types.d.ts.map +1 -0
  7. package/build/connect/account/types.js +2 -0
  8. package/build/connect/account/types.js.map +1 -0
  9. package/build/connect/branding/types.d.ts +26 -4
  10. package/build/connect/branding/types.d.ts.map +1 -1
  11. package/build/connect/call/types.d.ts +28 -0
  12. package/build/connect/call/types.d.ts.map +1 -0
  13. package/build/connect/call/types.js +2 -0
  14. package/build/connect/call/types.js.map +1 -0
  15. package/build/connect/config/types.d.ts +45 -0
  16. package/build/connect/config/types.d.ts.map +1 -0
  17. package/build/connect/config/types.js +2 -0
  18. package/build/connect/config/types.js.map +1 -0
  19. package/build/connect/consts.d.ts +383 -1
  20. package/build/connect/consts.d.ts.map +1 -1
  21. package/build/connect/consts.js +387 -1
  22. package/build/connect/consts.js.map +1 -1
  23. package/build/connect/conversion/types.d.ts +24 -0
  24. package/build/connect/conversion/types.d.ts.map +1 -1
  25. package/build/connect/entrypoints/types.d.ts +22 -13
  26. package/build/connect/entrypoints/types.d.ts.map +1 -1
  27. package/build/connect/entrypoints.d.ts +441 -8
  28. package/build/connect/entrypoints.d.ts.map +1 -1
  29. package/build/connect/entrypoints.js +292 -9
  30. package/build/connect/entrypoints.js.map +1 -1
  31. package/build/connect/errors.d.ts +12 -0
  32. package/build/connect/errors.d.ts.map +1 -1
  33. package/build/connect/errors.js +16 -0
  34. package/build/connect/errors.js.map +1 -1
  35. package/build/connect/feed/types.d.ts +71 -0
  36. package/build/connect/feed/types.d.ts.map +1 -0
  37. package/build/connect/feed/types.js +2 -0
  38. package/build/connect/feed/types.js.map +1 -0
  39. package/build/connect/files/types.d.ts +34 -0
  40. package/build/connect/files/types.d.ts.map +1 -0
  41. package/build/connect/files/types.js +2 -0
  42. package/build/connect/files/types.js.map +1 -0
  43. package/build/connect/git/types.d.ts +170 -0
  44. package/build/connect/git/types.d.ts.map +1 -0
  45. package/build/connect/git/types.js +14 -0
  46. package/build/connect/git/types.js.map +1 -0
  47. package/build/connect/iam/types.d.ts +25 -0
  48. package/build/connect/iam/types.d.ts.map +1 -0
  49. package/build/connect/iam/types.js +8 -0
  50. package/build/connect/iam/types.js.map +1 -0
  51. package/build/connect/index.d.ts +9 -0
  52. package/build/connect/index.d.ts.map +1 -1
  53. package/build/connect/production/types.d.ts +65 -0
  54. package/build/connect/production/types.d.ts.map +1 -0
  55. package/build/connect/production/types.js +2 -0
  56. package/build/connect/production/types.js.map +1 -0
  57. package/build/connect/project/types.d.ts +23 -16
  58. package/build/connect/project/types.d.ts.map +1 -1
  59. package/build/connect/references/types.d.ts +424 -2
  60. package/build/connect/references/types.d.ts.map +1 -1
  61. package/build/connect/references.d.ts.map +1 -1
  62. package/build/connect/references.js +122 -0
  63. package/build/connect/references.js.map +1 -1
  64. package/build/connect/schemas.d.ts +65 -2
  65. package/build/connect/schemas.d.ts.map +1 -1
  66. package/build/connect/schemas.js +306 -1
  67. package/build/connect/schemas.js.map +1 -1
  68. package/build/connect/settings/types.d.ts +0 -25
  69. package/build/connect/settings/types.d.ts.map +1 -1
  70. package/build/connect/slot/types.d.ts +24 -0
  71. package/build/connect/slot/types.d.ts.map +1 -0
  72. package/build/connect/slot/types.js +2 -0
  73. package/build/connect/slot/types.js.map +1 -0
  74. package/build/convert/record/types.d.ts +0 -9
  75. package/build/convert/record/types.d.ts.map +1 -1
  76. package/build/convert/schemas.d.ts +2 -5
  77. package/build/convert/schemas.d.ts.map +1 -1
  78. package/build/convert/schemas.js +2 -15
  79. package/build/convert/schemas.js.map +1 -1
  80. package/build/iam-console/consts.d.ts +13 -0
  81. package/build/iam-console/consts.d.ts.map +1 -0
  82. package/build/iam-console/consts.js +13 -0
  83. package/build/iam-console/consts.js.map +1 -0
  84. package/build/iam-console/consts.local.d.ts +123 -0
  85. package/build/iam-console/consts.local.d.ts.map +1 -0
  86. package/build/iam-console/consts.local.js +50 -0
  87. package/build/iam-console/consts.local.js.map +1 -0
  88. package/build/iam-console/index.d.ts +4 -0
  89. package/build/iam-console/index.d.ts.map +1 -0
  90. package/build/iam-console/index.js +3 -0
  91. package/build/iam-console/index.js.map +1 -0
  92. package/build/iam-console/schemas.d.ts +38 -0
  93. package/build/iam-console/schemas.d.ts.map +1 -0
  94. package/build/iam-console/schemas.js +217 -0
  95. package/build/iam-console/schemas.js.map +1 -0
  96. package/build/iam-console/types.d.ts +140 -0
  97. package/build/iam-console/types.d.ts.map +1 -0
  98. package/build/iam-console/types.js +2 -0
  99. package/build/iam-console/types.js.map +1 -0
  100. package/build/index.d.ts +1 -0
  101. package/build/index.d.ts.map +1 -1
  102. package/build/index.js +1 -0
  103. package/build/index.js.map +1 -1
  104. package/build/legal/consts.d.ts +33 -2
  105. package/build/legal/consts.d.ts.map +1 -1
  106. package/build/legal/consts.js +11 -3
  107. package/build/legal/consts.js.map +1 -1
  108. package/build/legal/types.d.ts +8 -1
  109. package/build/legal/types.d.ts.map +1 -1
  110. package/build/planning/schemas.d.ts.map +1 -1
  111. package/build/planning/schemas.js +0 -1
  112. package/build/planning/schemas.js.map +1 -1
  113. package/build/planning/types.d.ts +0 -2
  114. package/build/planning/types.d.ts.map +1 -1
  115. package/package.json +11 -2
  116. package/src/connect/account/types.ts +91 -0
  117. package/src/connect/branding/types.ts +28 -4
  118. package/src/connect/call/types.ts +31 -0
  119. package/src/connect/config/types.ts +51 -0
  120. package/src/connect/consts.ts +400 -1
  121. package/src/connect/conversion/types.ts +25 -0
  122. package/src/connect/entrypoints/types.ts +22 -7
  123. package/src/connect/entrypoints.ts +592 -15
  124. package/src/connect/errors.ts +18 -0
  125. package/src/connect/feed/types.ts +76 -0
  126. package/src/connect/files/types.ts +38 -0
  127. package/src/connect/git/types.ts +187 -0
  128. package/src/connect/iam/types.ts +28 -0
  129. package/src/connect/index.ts +9 -0
  130. package/src/connect/production/types.ts +71 -0
  131. package/src/connect/project/types.ts +25 -12
  132. package/src/connect/references/types.ts +166 -5
  133. package/src/connect/references.ts +210 -5
  134. package/src/connect/schemas.ts +366 -5
  135. package/src/connect/settings/types.ts +0 -25
  136. package/src/connect/slot/types.ts +24 -0
  137. package/src/convert/record/types.ts +0 -11
  138. package/src/convert/schemas.ts +3 -19
  139. package/src/iam-console/consts.local.ts +64 -0
  140. package/src/iam-console/consts.ts +15 -0
  141. package/src/iam-console/index.ts +3 -0
  142. package/src/iam-console/schemas.ts +251 -0
  143. package/src/iam-console/types.ts +165 -0
  144. package/src/index.ts +1 -0
  145. package/src/legal/consts.ts +13 -5
  146. package/src/legal/types.ts +12 -1
  147. package/src/planning/schemas.ts +0 -1
  148. package/src/planning/types.ts +0 -2
  149. package/tests/connect-convert.spec.ts +6 -2
  150. package/tests/connect-entrypoints.spec.ts +554 -16
  151. package/tests/error-status.spec.ts +2 -1
  152. package/tests/iam-console.spec.ts +89 -0
  153. package/tests/planning.spec.ts +8 -0
@@ -93,6 +93,23 @@ export class ConnectOpUnknown extends ConnectError {
93
93
  }
94
94
  }
95
95
 
96
+ /**
97
+ * A delegated write answered early (`{ pending }`) whose outcome was never recorded: the platform
98
+ * process holding it stopped and its heartbeat went stale (`CONNECT_CALL_LOST_MS`). Whether it took
99
+ * effect is unknown, so it is read from the domain's status before anything is repeated. The message
100
+ * carries the call id. Answered 410 — the outcome is gone, not merely late.
101
+ */
102
+ export class ConnectCallLost extends ConnectError {
103
+ public static override typeName = `CallLost${ConnectError.typeName}`
104
+ /** The call's outcome is gone: answered 410. */
105
+ public static httpStatus = 410
106
+
107
+ constructor(message: string = 'error') {
108
+ super(`call-lost:${message}`)
109
+ this.type = ConnectCallLost.typeName
110
+ }
111
+ }
112
+
96
113
  /**
97
114
  * The organization cannot pay for the action a connector just asked for.
98
115
  *
@@ -272,6 +289,7 @@ ResilientError.registerErrorClass(ConnectOpTimeout)
272
289
  ResilientError.registerErrorClass(ConnectOpRefused)
273
290
  ResilientError.registerErrorClass(LocalSlotUnsupported)
274
291
  ResilientError.registerErrorClass(ConnectOpUnknown)
292
+ ResilientError.registerErrorClass(ConnectCallLost)
275
293
  ResilientError.registerErrorClass(ConnectOutOfCredits)
276
294
  ResilientError.registerErrorClass(ConnectConsentRequired)
277
295
  ResilientError.registerErrorClass(ConnectConfirmationRequired)
@@ -0,0 +1,76 @@
1
+ import type { ConnectFeedDetail, ConnectFeedKind } from '../consts.js'
2
+
3
+ /**
4
+ * One feed entry before it has a position — what the platform appends. Small by construction: a
5
+ * projection of the event, never the record behind it (no namespace, no workload, no credential), and
6
+ * prose cut to a bounded excerpt.
7
+ */
8
+ export interface ConnectFeedRecord {
9
+ kind: ConnectFeedKind
10
+ /** When it happened, ISO 8601. */
11
+ at: string
12
+ /** The model call or platform step it belongs to. */
13
+ run?: string
14
+ /** The project it belongs to — on an organization notice, the project it is about, if any. */
15
+ projectId?: string
16
+ /** The story it belongs to. */
17
+ storyId?: string
18
+ /** The workload it belongs to. */
19
+ slotId?: string
20
+ /** The platform's own name for the step, model call or notice. */
21
+ action?: string
22
+ /** The platform agent that did it. */
23
+ agent?: string
24
+ /** Prose: a model excerpt, a notice, a step's note — bounded. */
25
+ text?: string
26
+ /** A small structured detail of the kind: a step's index, a card's status, a file's path. */
27
+ data?: Record<string, unknown>
28
+ }
29
+
30
+ /** One feed entry as a read answers it: the record and its position. */
31
+ export interface ConnectFeedEntry extends ConnectFeedRecord {
32
+ /** The entry's position — the cursor to read after it. */
33
+ id: string
34
+ }
35
+
36
+ /** What one feed read answers. */
37
+ export interface ConnectFeedPage {
38
+ /**
39
+ * The cursor to pass as `after` on the next read: the last entry this read SCANNED (a filtered-out
40
+ * entry included), or the cursor it was given when nothing came. A feed that had nothing yet
41
+ * answers `CONNECT_FEED_START`.
42
+ */
43
+ cursor: string
44
+ entries: ConnectFeedEntry[]
45
+ /**
46
+ * Entries after the cursor it was given were dropped before this read — the feed keeps a bounded
47
+ * tail for a bounded time. The domain status reads (`project_status`, `story_status`, …) say where
48
+ * the work stands.
49
+ */
50
+ gap: boolean
51
+ }
52
+
53
+ /** The preview's file changes, and whether its watcher runs. */
54
+ export interface ConnectFileChanges extends ConnectFeedPage {
55
+ /**
56
+ * The preview's file watcher is running. False while the preview is not ready: nothing records a
57
+ * change until it runs again.
58
+ */
59
+ watching: boolean
60
+ }
61
+
62
+ /** A feed read's query: after which entry, how many, and how long to hold for the next one. */
63
+ export interface ConnectFeedQuery {
64
+ /** The cursor the previous read answered; absent, the latest entries. */
65
+ after?: string
66
+ /** At most `CONNECT_FEED_LIMIT_MAX`; `CONNECT_FEED_LIMIT_DEFAULT` when absent. */
67
+ limit?: number
68
+ /** Seconds to hold for the next entry when none is there yet — at most `CONNECT_FEED_WAIT_MAX_SEC`. */
69
+ wait?: number
70
+ }
71
+
72
+ /** The project activity read's query: a feed query and how much of the activity it answers. */
73
+ export interface ConnectActivityQuery extends ConnectFeedQuery {
74
+ /** `progress` (absent) leaves the model's own words out; `thinking` includes them. */
75
+ detail?: ConnectFeedDetail
76
+ }
@@ -0,0 +1,38 @@
1
+ import type { SpecCategory } from '../../ba/consts.js'
2
+ import type { MetadataListKind } from '../../metadata/consts.js'
3
+
4
+ /** One file of a cloud target's tree, addressed by its path relative to the project root. */
5
+ export interface ConnectFileQuery {
6
+ path: string
7
+ }
8
+
9
+ /** A file read from a cloud target. */
10
+ export interface ConnectFileContent {
11
+ path: string
12
+ content: string
13
+ }
14
+
15
+ /** A whole-file write: the content replaces whatever the file held. */
16
+ export interface ConnectFileSaveBody {
17
+ path: string
18
+ content: string
19
+ }
20
+
21
+ /**
22
+ * What a write or a delete did. The platform rebuilds the preview after either; a build that failed
23
+ * leaves the last good preview serving and says why on `buildWarning` — the file change itself stands.
24
+ */
25
+ export interface ConnectFileWritten {
26
+ path: string
27
+ buildWarning?: string
28
+ }
29
+
30
+ /**
31
+ * Which of the project's metadata documents to list: `stories` (the story documents), `meta` (the
32
+ * specifications beside the sources, narrowed by `category`) or `all` (everything under `docs/` and
33
+ * `.agents/` plus the specifications beside the sources).
34
+ */
35
+ export interface ConnectFileMetaQuery {
36
+ kind: MetadataListKind
37
+ category?: SpecCategory
38
+ }
@@ -0,0 +1,187 @@
1
+ /**
2
+ * A cloud target's git repository and its GitHub connection, as a connector reads them.
3
+ *
4
+ * Self-contained mirrors of the platform's own git vocabulary (`@owlmeans/git/model` and the
5
+ * platform's `GithubConnection`): the connector contract depends on no git package, so these name the
6
+ * same fields and nothing more. A status is a plain string for the same reason a slot's is — this
7
+ * view crosses a version skew, and a newer platform may answer with a value an older connector has
8
+ * never heard of.
9
+ *
10
+ * NOTHING here carries the GitHub token. The platform stores it locked and relays it only to the
11
+ * project's own slot; no connector answer, and no field of any shape below, can hold it.
12
+ */
13
+
14
+ /** One commit of the project's repository. */
15
+ export interface ConnectGitCommit {
16
+ hash: string
17
+ shortHash: string
18
+ subject: string
19
+ authorName: string
20
+ authorEmail: string
21
+ committedAt: string
22
+ }
23
+
24
+ /** One changed path of the working tree, with git's porcelain status letters. */
25
+ export interface ConnectGitFileChange {
26
+ path: string
27
+ status: string
28
+ }
29
+
30
+ /** The working tree: its branch and head, what changed, and where it stands against its remote. */
31
+ export interface ConnectGitStatus {
32
+ initialized: boolean
33
+ head: ConnectGitCommit | null
34
+ branch: string
35
+ dirty: boolean
36
+ changedFiles: number
37
+ /** The changed paths — capped by the platform; `changedFiles` is the whole count. */
38
+ files: ConnectGitFileChange[]
39
+ /** The credential-free remote the project publishes to, once it has been published. */
40
+ remoteUrl: string | null
41
+ ahead: number | null
42
+ behind: number | null
43
+ }
44
+
45
+ /**
46
+ * The project's GitHub connection — who connected it and where it publishes. `status` is `connected`
47
+ * (authorized, not published yet), `published` (push and pull work) or `invalid` (GitHub refused the
48
+ * stored access: it has to be connected again).
49
+ */
50
+ export interface ConnectGithubConnection {
51
+ projectId: string
52
+ githubLogin: string
53
+ repoFullName?: string
54
+ repoUrl?: string
55
+ status: string
56
+ connectedAt: string
57
+ }
58
+
59
+ /**
60
+ * The project's git state: its GitHub connection (`null` when none) and its working tree (`null`
61
+ * while the preview is not ready — git lives in the preview's pod, and reading it there would start
62
+ * a stopped preview).
63
+ */
64
+ export interface ConnectGitState {
65
+ connection: ConnectGithubConnection | null
66
+ git: ConnectGitStatus | null
67
+ }
68
+
69
+ /** A commit of every change in the working tree. */
70
+ export interface ConnectGitCommitBody {
71
+ message: string
72
+ }
73
+
74
+ /** What a commit made — `null` when there was nothing to commit. */
75
+ export interface ConnectGitCommitResult {
76
+ commit: ConnectGitCommit | null
77
+ }
78
+
79
+ /** Go back to the tree of one earlier commit, as a NEW commit (history is never rewritten). */
80
+ export interface ConnectGitRevertBody {
81
+ hash: string
82
+ }
83
+
84
+ /**
85
+ * What a revert made. `dbWarning` is what the project's database migration said after the tree went
86
+ * back — a schema the older code no longer matches is reported, never silently left.
87
+ */
88
+ export interface ConnectGitRevertResult {
89
+ commit: ConnectGitCommit | null
90
+ dbWarning?: string | null
91
+ }
92
+
93
+ /**
94
+ * A push or a pull: `ok`, `up-to-date`, `conflict` (a pull that could not merge — aborted, nothing
95
+ * changed), `rejected` (the remote moved: pull first), `no-remote` or `auth-failed` (GitHub refused
96
+ * the stored access; the connection is then `invalid`).
97
+ */
98
+ export interface ConnectGitSyncResult {
99
+ status: string
100
+ ahead: number | null
101
+ behind: number | null
102
+ message?: string
103
+ }
104
+
105
+ /**
106
+ * The address the PERSON opens to connect GitHub. The authorization finishes in their browser — GitHub
107
+ * returns to the platform's web application, which completes it; nothing a connector can call does.
108
+ */
109
+ export interface ConnectGithubAuthorize {
110
+ authorizeUrl: string
111
+ }
112
+
113
+ /**
114
+ * Publish the project to GitHub: a new repository (`repoName`, private unless `private` is false) or
115
+ * one that exists (`existing`). The repository a converted project came FROM is refused while its
116
+ * original sources are still on the volume.
117
+ */
118
+ export interface ConnectGithubPublishBody {
119
+ repoName?: string
120
+ private?: boolean
121
+ existing?: { owner: string, repo: string }
122
+ }
123
+
124
+ /** The connection after a disconnect — there is none. */
125
+ export interface ConnectGithubDisconnected {
126
+ connection: null
127
+ }
128
+
129
+ /** One page of the person's repositories; `search` narrows the page that came back. */
130
+ export interface ConnectGithubRepoQuery {
131
+ page?: number
132
+ search?: string
133
+ }
134
+
135
+ /** One repository as the picker lists it. */
136
+ export interface ConnectGithubRepo {
137
+ fullName: string
138
+ name: string
139
+ owner: string
140
+ url: string
141
+ private: boolean
142
+ defaultBranch: string
143
+ updatedAt: string
144
+ archived: boolean
145
+ fork: boolean
146
+ sizeKb: number
147
+ description?: string
148
+ language?: string
149
+ }
150
+
151
+ export interface ConnectGithubRepoList {
152
+ repos: ConnectGithubRepo[]
153
+ page: number
154
+ hasMore: boolean
155
+ }
156
+
157
+ /** One page of one repository's branches. */
158
+ export interface ConnectGithubBranchQuery {
159
+ owner: string
160
+ repo: string
161
+ page?: number
162
+ }
163
+
164
+ export interface ConnectGithubBranch {
165
+ name: string
166
+ protected: boolean
167
+ }
168
+
169
+ export interface ConnectGithubBranchList {
170
+ branches: ConnectGithubBranch[]
171
+ page: number
172
+ hasMore: boolean
173
+ }
174
+
175
+ /**
176
+ * Record which repository an imported project came FROM — it pushes nothing and publishes nothing.
177
+ * Absent `branch` is the repository's own default branch, read back from GitHub.
178
+ */
179
+ export interface ConnectGithubLinkBody {
180
+ owner: string
181
+ repo: string
182
+ branch?: string
183
+ }
184
+
185
+ export interface ConnectGithubLinked {
186
+ connection: ConnectGithubConnection
187
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The connector's twins of the owner console's IAM (`connect.iam`): the same bodies, answers and
3
+ * refusals as the browser's `back.iam` routes (`../../iam-console/types.ts`), addressed under the
4
+ * connector's project path (`/project/:id/iam/…`) — so the project travels as `id`, like every other
5
+ * connector route. A read takes `scope` in its query, a write in its body.
6
+ */
7
+
8
+ /** One subject of the project's client, by its pairwise `profileId`. */
9
+ export interface ConnectIamUserParams {
10
+ id: string
11
+ profileId: string
12
+ }
13
+
14
+ /** One organization the project's client has members in, by its slug. */
15
+ export interface ConnectIamOrganizationParams {
16
+ id: string
17
+ entitySlug: string
18
+ }
19
+
20
+ /** One member of an organization, as the project's client sees them. */
21
+ export interface ConnectIamMemberParams extends ConnectIamOrganizationParams {
22
+ profileId: string
23
+ }
24
+
25
+ /** One group of (organization, the project's client), by its key. */
26
+ export interface ConnectIamGroupParams extends ConnectIamOrganizationParams {
27
+ group: string
28
+ }
@@ -9,9 +9,18 @@ export type * from './ops/types.js'
9
9
  export type * from './project/types.js'
10
10
  export type * from './settings/types.js'
11
11
  export type * from './branding/types.js'
12
+ export type * from './account/types.js'
13
+ export type * from './config/types.js'
12
14
  export type * from './pipeline/types.js'
13
15
  export type * from './conversion/types.js'
14
16
  export type * from './kit/types.js'
17
+ export type * from './files/types.js'
18
+ export type * from './slot/types.js'
19
+ export type * from './git/types.js'
20
+ export type * from './production/types.js'
21
+ export type * from './iam/types.js'
22
+ export type * from './call/types.js'
23
+ export type * from './feed/types.js'
15
24
  export type * from './entrypoints/types.js'
16
25
  export type * from './errors/types.js'
17
26
  export type * from './references/types.js'
@@ -0,0 +1,71 @@
1
+ import type { ConnectSlotState } from '../slot/types.js'
2
+
3
+ /**
4
+ * A project's production workload as a connector reads it: the published site, its address and the
5
+ * custom domain attached to it, and the standalone sign-in configuration a self-hosted copy uses.
6
+ *
7
+ * Every status is a plain string, like a slot's: this view crosses a version skew, and a newer
8
+ * platform may answer with a value an older connector has never heard of. No shape here can carry the
9
+ * production sign-in's client secret — it is reported only as set or not.
10
+ */
11
+
12
+ /**
13
+ * The custom domain of a production site, with the two DNS records the owner creates at their DNS
14
+ * provider: the traffic record (`customDomain` CNAME → `cnameTarget`) and the certificate's
15
+ * domain-control delegation (`dcvName` CNAME → `dcvValue`). `status` is the collapsed view
16
+ * (`none`, `pending`, `pending_validation`, `verified`, `linked`, `error`); `hostnameStatus` and
17
+ * `sslStatus` are the provider's own states of the two records, each answered as it reported them.
18
+ */
19
+ export interface ConnectProductionDomain {
20
+ /** The site's own address, minted by the platform — it serves whether or not a domain is attached. */
21
+ generatedHost: string
22
+ customDomain?: string
23
+ status: string
24
+ verifiedAt?: string
25
+ cnameTarget?: string
26
+ dcvName?: string
27
+ dcvValue?: string
28
+ hostnameStatus?: string
29
+ sslStatus?: string
30
+ /** The provider's validation errors, verbatim, while the domain is in error. */
31
+ message?: string
32
+ }
33
+
34
+ /**
35
+ * The project's production workload — `null` before its first publish — and its domain (`null`
36
+ * while it has none).
37
+ */
38
+ export interface ConnectProductionStatus {
39
+ workload: ConnectSlotState | null
40
+ domain: ConnectProductionDomain | null
41
+ }
42
+
43
+ /** The custom domain to attach — a DNS host name the owner controls. */
44
+ export interface ConnectProductionDomainBody {
45
+ domain: string
46
+ }
47
+
48
+ /**
49
+ * The production sign-in configuration a self-hosted copy of the project is configured with: the
50
+ * OIDC client, its issuer and the addresses it may return to. The client SECRET is never answered —
51
+ * `secretSet` says whether one exists; the owner reads it in the web application.
52
+ */
53
+ export interface ConnectProductionAuth {
54
+ clientId: string
55
+ issuerUrl: string
56
+ secretSet: boolean
57
+ /** The owner's own standalone redirect addresses — applied to the client on the next publish. */
58
+ redirectUris: string[]
59
+ generatedHost: string
60
+ customDomain?: string
61
+ }
62
+
63
+ /** Replace the owner's standalone redirect addresses — the whole list. */
64
+ export interface ConnectProductionRedirectsBody {
65
+ redirects: string[]
66
+ }
67
+
68
+ /** The list as stored: trimmed, without blanks, each address once. */
69
+ export interface ConnectProductionRedirects {
70
+ redirectUris: string[]
71
+ }
@@ -1,6 +1,7 @@
1
1
  import type { ConnectTarget, ConnectWaitReason } from '../consts.js'
2
2
  import type { InquiryPayload } from '../ops/types.js'
3
3
  import type { ConnectSessionView } from '../session/types.js'
4
+ import type { ConnectSlotState } from '../slot/types.js'
4
5
 
5
6
  export interface ConnectRunStatus {
6
7
  runId: string
@@ -37,19 +38,9 @@ export interface ConnectProjectStatus {
37
38
  vision?: string
38
39
  designSystem?: string
39
40
  }
40
- slot?: {
41
- id: string
42
- kind: string
43
- status: string
44
- slug: string
45
- host?: string
46
- initialized?: boolean
47
- lastError?: string
48
- buildWarning?: string
49
- backendWarning?: string
50
- }
41
+ slot?: ConnectSlotState
51
42
  production?: { id: string, status: string, host?: string }
52
- agent: { locked: boolean, task?: string, lockedAt?: string }
43
+ agent: ConnectAgentLock
53
44
  run?: ConnectRunStatus
54
45
  waitingFor?: ConnectWaitReason
55
46
  pendingInquiry?: InquiryPayload
@@ -59,6 +50,16 @@ export interface ConnectProjectStatus {
59
50
  updatedAt: string
60
51
  }
61
52
 
53
+ /**
54
+ * The project's agent lock as a connector reads it — held while a run, a conversion stage or a
55
+ * kit apply works on the project. `task` and `lockedAt` are set only while it is held.
56
+ */
57
+ export interface ConnectAgentLock {
58
+ locked: boolean
59
+ task?: string
60
+ lockedAt?: string
61
+ }
62
+
62
63
  /** A story card composed with its deterministic development run. */
63
64
  export interface ConnectStoryStatus {
64
65
  projectId: string
@@ -104,6 +105,11 @@ export interface ConnectAttachBody {
104
105
  export interface ConnectCreateBody {
105
106
  prompt: string
106
107
  target?: ConnectTarget
108
+ /**
109
+ * The caller's unattached delegated session; its pre-card checks are performed by that session's
110
+ * parent. Absent, the platform performs them.
111
+ */
112
+ sessionId?: string
107
113
  }
108
114
 
109
115
  /**
@@ -125,3 +131,10 @@ export interface ConnectConfirmBody {
125
131
  export interface ConnectModifyBody {
126
132
  prompt: string
127
133
  }
134
+
135
+ export interface ConnectRenameBody {
136
+ /** The new product name. */
137
+ name: string
138
+ /** A new one-line description, when the person gave one. */
139
+ description?: string
140
+ }