@owlmeans/viable-common 0.0.23 → 0.0.25

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 (62) hide show
  1. package/README.md +4 -4
  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 +10 -9
  5. package/build/blueprint/case.js +3 -3
  6. package/build/connect/consts.d.ts +24 -43
  7. package/build/connect/consts.d.ts.map +1 -1
  8. package/build/connect/consts.js +27 -48
  9. package/build/connect/consts.js.map +1 -1
  10. package/build/connect/entrypoints.d.ts +22 -19
  11. package/build/connect/entrypoints.d.ts.map +1 -1
  12. package/build/connect/entrypoints.js +8 -4
  13. package/build/connect/entrypoints.js.map +1 -1
  14. package/build/connect/index.d.ts +0 -1
  15. package/build/connect/index.d.ts.map +1 -1
  16. package/build/connect/index.js +0 -1
  17. package/build/connect/index.js.map +1 -1
  18. package/build/connect/ops.d.ts +1 -4
  19. package/build/connect/ops.d.ts.map +1 -1
  20. package/build/connect/references.d.ts +20 -16
  21. package/build/connect/references.d.ts.map +1 -1
  22. package/build/connect/references.js +3 -1
  23. package/build/connect/references.js.map +1 -1
  24. package/build/connect/schemas.d.ts +6 -3
  25. package/build/connect/schemas.d.ts.map +1 -1
  26. package/build/connect/schemas.js +4 -4
  27. package/build/connect/schemas.js.map +1 -1
  28. package/build/connect/types.d.ts +36 -66
  29. package/build/connect/types.d.ts.map +1 -1
  30. package/build/convert/schemas.d.ts.map +1 -1
  31. package/build/convert/schemas.js +9 -7
  32. package/build/convert/schemas.js.map +1 -1
  33. package/build/convert/types.d.ts +9 -6
  34. package/build/convert/types.d.ts.map +1 -1
  35. package/build/design/runtime.d.ts +1 -1
  36. package/build/design/runtime.d.ts.map +1 -1
  37. package/build/planning/consts.d.ts +1 -1
  38. package/build/planning/consts.js +1 -1
  39. package/build/skills/catalogue.d.ts.map +1 -1
  40. package/build/skills/catalogue.js +22 -15
  41. package/build/skills/catalogue.js.map +1 -1
  42. package/package.json +8 -8
  43. package/src/blueprint/case.ts +3 -3
  44. package/src/connect/consts.ts +25 -45
  45. package/src/connect/entrypoints.ts +26 -20
  46. package/src/connect/index.ts +0 -1
  47. package/src/connect/ops.ts +1 -4
  48. package/src/connect/references.ts +34 -28
  49. package/src/connect/schemas.ts +8 -8
  50. package/src/connect/types.ts +38 -69
  51. package/src/convert/schemas.ts +9 -7
  52. package/src/convert/types.ts +9 -6
  53. package/src/design/runtime.ts +1 -1
  54. package/src/planning/consts.ts +1 -1
  55. package/src/skills/catalogue.ts +22 -15
  56. package/tests/connect-convert.spec.ts +2 -8
  57. package/tests/connect-entrypoints.spec.ts +11 -29
  58. package/build/connect/jobs.d.ts +0 -25
  59. package/build/connect/jobs.d.ts.map +0 -1
  60. package/build/connect/jobs.js +0 -29
  61. package/build/connect/jobs.js.map +0 -1
  62. package/src/connect/jobs.ts +0 -40
@@ -6,16 +6,17 @@ import { connect } from './consts.js'
6
6
  import {
7
7
  ConnectAttachBodySchema, ConnectConfirmBodySchema, ConnectConvertCreateBodySchema,
8
8
  ConnectConvertProceedBodySchema, ConnectCreateBodySchema, ConnectInquiryParamsSchema,
9
- ConnectJobParamsSchema, ConnectModifyBodySchema, ConnectOpParamsSchema, ConnectOpResultSchema,
9
+ ConnectModifyBodySchema, ConnectOpParamsSchema, ConnectOpResultSchema,
10
10
  ConnectPipelineParamsSchema, ConnectPipelineResumeBodySchema, ConnectProjectIdSchema,
11
11
  ConnectProjectLlmBodySchema, ConnectSessionOpenSchema, ConnectSessionParamsSchema,
12
- ConnectWaitQuerySchema, InquiryAnswerSchema,
12
+ ConnectPullQuerySchema, ConnectStoryParamsSchema, InquiryAnswerSchema,
13
13
  } from './schemas.js'
14
14
  import type {
15
15
  ConnectAttachBody, ConnectConfirmBody, ConnectConvertCreateBody, ConnectConvertProceedBody,
16
- ConnectCreateBody, ConnectInquiryAnswerBody, ConnectJob, ConnectJobParams, ConnectModifyBody,
16
+ ConnectCreateBody, ConnectInquiryAnswerBody, ConnectModifyBody,
17
17
  ConnectPipelineParams, ConnectPipelineResumeBody, ConnectProjectLlmBody, ConnectSessionOpen,
18
- ConnectSessionParams, ConnectWaitQuery, ConversionStatusView, ConvertCheck,
18
+ ConnectPipelineState, ConnectProjectStatus, ConnectPullQuery, ConnectSessionParams,
19
+ ConnectStoryStatus, ConversionStatusView, ConvertCheck,
19
20
  } from './types.js'
20
21
  import type { ConnectOpResult } from './ops.js'
21
22
  import type { ConverterProjectLlmBody } from '../convert/types.js'
@@ -115,7 +116,7 @@ export const connectProtocols = (opts: ConnectEntrypointOptions) => {
115
116
  route(connect.op.pull, '/session/:sessionId/ops', {
116
117
  parent: base, method: RouteMethod.GET
117
118
  }),
118
- contract.request({ params: typed<ConnectSessionParams>(ConnectSessionParamsSchema), query: typed<ConnectWaitQuery>(ConnectWaitQuerySchema) }, typed())
119
+ contract.request({ params: typed<ConnectSessionParams>(ConnectSessionParamsSchema), query: typed<ConnectPullQuery>(ConnectPullQuerySchema) }, typed())
119
120
  ),
120
121
  submit: protocol(
121
122
  route(connect.op.submit, '/session/:sessionId/ops/:opId', {
@@ -130,7 +131,7 @@ export const connectProtocols = (opts: ConnectEntrypointOptions) => {
130
131
  project: {
131
132
  create: protocol(
132
133
  route(connect.project.create, '/project', { parent: base, method: RouteMethod.POST }),
133
- contract.request({ body: typed<ConnectCreateBody>(ConnectCreateBodySchema) }, typed())
134
+ contract.request({ body: typed<ConnectCreateBody>(ConnectCreateBodySchema) }, typed<ConnectProjectStatus>())
134
135
  ),
135
136
  list: protocol(
136
137
  route(connect.project.list, '/project', { parent: base, method: RouteMethod.GET }),
@@ -146,25 +147,25 @@ export const connectProtocols = (opts: ConnectEntrypointOptions) => {
146
147
  route(connect.project.confirm, '/project/:id/confirm', {
147
148
  parent: base, method: RouteMethod.POST
148
149
  }),
149
- contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema), body: typed<ConnectConfirmBody>(ConnectConfirmBodySchema) }, typed())
150
+ contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema), body: typed<ConnectConfirmBody>(ConnectConfirmBodySchema) }, typed<ConnectProjectStatus>())
150
151
  ),
151
152
  status: protocol(
152
153
  route(connect.project.status, '/project/:id/status', {
153
154
  parent: base, method: RouteMethod.GET
154
155
  }),
155
- contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed())
156
+ contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed<ConnectProjectStatus>())
156
157
  ),
157
158
  reinit: protocol(
158
159
  route(connect.project.reinit, '/project/:id/reinit', {
159
160
  parent: base, method: RouteMethod.POST
160
161
  }),
161
- contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed())
162
+ contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed<ConnectProjectStatus>())
162
163
  ),
163
164
  modify: protocol(
164
165
  route(connect.project.modify, '/project/:id/modify', {
165
166
  parent: base, method: RouteMethod.POST
166
167
  }),
167
- contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema), body: typed<ConnectModifyBody>(ConnectModifyBodySchema) }, typed())
168
+ contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema), body: typed<ConnectModifyBody>(ConnectModifyBodySchema) }, typed<ConnectProjectStatus>())
168
169
  ),
169
170
  settings: protocol(
170
171
  route(connect.project.settings, '/project/:id/settings', {
@@ -187,11 +188,16 @@ export const connectProtocols = (opts: ConnectEntrypointOptions) => {
187
188
  body: typed<ConverterProjectLlmBody>(ConverterProjectLlmBodySchema),
188
189
  }, typed()),
189
190
  ),
190
- job: protocol(
191
- route(connect.project.job, '/project/:id/job/:jobId', {
191
+ },
192
+
193
+ story: {
194
+ status: protocol(
195
+ route(connect.story.status, '/project/:id/story/:storyId/status', {
192
196
  parent: base, method: RouteMethod.GET
193
197
  }),
194
- contract.request({ params: typed<ConnectJobParams>(ConnectJobParamsSchema), query: typed<ConnectWaitQuery>(ConnectWaitQuerySchema) }, typed())
198
+ contract.request({
199
+ params: typed<{ id: string, storyId: string }>(ConnectStoryParamsSchema),
200
+ }, typed<ConnectStoryStatus>())
195
201
  ),
196
202
 
197
203
  },
@@ -207,7 +213,7 @@ export const connectProtocols = (opts: ConnectEntrypointOptions) => {
207
213
  convert: {
208
214
  create: protocol(
209
215
  route(connect.convert.create, '/convert', { parent: base, method: RouteMethod.POST }),
210
- contract.request({ body: typed<ConnectConvertCreateBody>(ConnectConvertCreateBodySchema) }, typed<ConnectJob>()),
216
+ contract.request({ body: typed<ConnectConvertCreateBody>(ConnectConvertCreateBodySchema) }, typed<ConversionStatusView>()),
211
217
  ),
212
218
  check: protocol(
213
219
  route(connect.convert.check, '/convert/:id/check', { parent: base, method: RouteMethod.GET }),
@@ -215,18 +221,18 @@ export const connectProtocols = (opts: ConnectEntrypointOptions) => {
215
221
  ),
216
222
  start: protocol(
217
223
  route(connect.convert.start, '/convert/:id/start', { parent: base, method: RouteMethod.POST }),
218
- contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed<ConnectJob>()),
224
+ contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed<ConversionStatusView>()),
219
225
  ),
220
226
  proceed: protocol(
221
227
  route(connect.convert.proceed, '/convert/:id/proceed', { parent: base, method: RouteMethod.POST }),
222
228
  contract.request({
223
229
  params: typed<{ id: string }>(ConnectProjectIdSchema),
224
230
  body: typed<ConnectConvertProceedBody>(ConnectConvertProceedBodySchema),
225
- }, typed<ConnectJob>()),
231
+ }, typed<ConversionStatusView>()),
226
232
  ),
227
233
  cancel: protocol(
228
234
  route(connect.convert.cancel, '/convert/:id/cancel', { parent: base, method: RouteMethod.POST }),
229
- contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed<ConnectJob>()),
235
+ contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed<ConversionStatusView>()),
230
236
  ),
231
237
  status: protocol(
232
238
  route(connect.convert.status, '/convert/:id', { parent: base, method: RouteMethod.GET }),
@@ -234,7 +240,7 @@ export const connectProtocols = (opts: ConnectEntrypointOptions) => {
234
240
  ),
235
241
  purge: protocol(
236
242
  route(connect.convert.purge, '/convert/:id/purge', { parent: base, method: RouteMethod.POST }),
237
- contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed<ConnectJob>()),
243
+ contract.request({ params: typed<{ id: string }>(ConnectProjectIdSchema) }, typed<ConversionStatusView>()),
238
244
  ),
239
245
  },
240
246
 
@@ -256,13 +262,13 @@ export const connectProtocols = (opts: ConnectEntrypointOptions) => {
256
262
  route(connect.pipeline.state, '/pipeline/:id/:runId', {
257
263
  parent: base, method: RouteMethod.GET
258
264
  }),
259
- contract.request({ params: typed<ConnectPipelineParams>(ConnectPipelineParamsSchema) }, typed())
265
+ contract.request({ params: typed<ConnectPipelineParams>(ConnectPipelineParamsSchema) }, typed<ConnectPipelineState>())
260
266
  ),
261
267
  resume: protocol(
262
268
  route(connect.pipeline.resume, '/pipeline/:id/:runId/resume', {
263
269
  parent: base, method: RouteMethod.POST
264
270
  }),
265
- contract.request({ params: typed<ConnectPipelineParams>(ConnectPipelineParamsSchema), body: typed<ConnectPipelineResumeBody>(ConnectPipelineResumeBodySchema) }, typed())
271
+ contract.request({ params: typed<ConnectPipelineParams>(ConnectPipelineParamsSchema), body: typed<ConnectPipelineResumeBody>(ConnectPipelineResumeBodySchema) }, typed<ConnectPipelineState>())
266
272
  ),
267
273
  },
268
274
  }
@@ -3,6 +3,5 @@ export * from './schemas.js'
3
3
  export * from './errors.js'
4
4
  export * from './entrypoints.js'
5
5
  export * from './references.js'
6
- export * from './jobs.js'
7
6
  export type * from './types.js'
8
7
  export type * from './ops.js'
@@ -91,8 +91,6 @@ export interface ConfigureResult {
91
91
  export interface ModelTask {
92
92
  id: string
93
93
  projectId: string
94
- /** The job the call belongs to, so a parent can say what it is working on. */
95
- jobId?: string
96
94
  /** The platform role that asked. Informational; the tier is what decides the model. */
97
95
  role: string
98
96
  tier: ModelTier
@@ -170,14 +168,13 @@ export interface ConnectInquiryOption {
170
168
  /**
171
169
  * One question put to the person the connector is working for.
172
170
  *
173
- * It carries where it came from — the job, the run and the step — because an answer is recorded
171
+ * It carries where it came from — the run and the step — because an answer is recorded
174
172
  * against the run that asked and re-read when that run resumes. `expiresAt` is what makes an
175
173
  * unanswered question fail its step instead of parking a project lock forever.
176
174
  */
177
175
  export interface InquiryPayload {
178
176
  id: string
179
177
  projectId: string
180
- jobId?: string
181
178
  runId?: string
182
179
  /** The pipeline step that asked, so a resumed run can match the answer to the place it belongs. */
183
180
  step?: string
@@ -5,12 +5,12 @@ import { connect } from './consts.js'
5
5
  import type { ConnectOp, ConnectOpResult } from './ops.js'
6
6
  import type { ConverterProjectLlmBody } from '../convert/index.js'
7
7
  import type {
8
- ConnectAttachBody, ConnectCapabilitiesView, ConnectConfirmBody, ConnectCreateBody, ConnectJob,
9
- ConnectConvertCreateBody, ConnectConvertProceedBody, ConnectInquiryAnswerBody, ConnectJobParams,
8
+ ConnectAttachBody, ConnectCapabilitiesView, ConnectConfirmBody, ConnectCreateBody,
9
+ ConnectConvertCreateBody, ConnectConvertProceedBody, ConnectInquiryAnswerBody,
10
10
  ConnectModifyBody, ConnectOpSubmission, ConnectPipelineParams, ConnectPipelineResumeBody,
11
11
  ConnectPipelineState, ConnectProjectLlmBody, ConnectProjectSettings, ConnectProjectStatus,
12
- ConnectProjectSummary, ConnectSessionOpen, ConnectSessionParams, ConnectSessionView,
13
- ConnectWaitQuery, ConversionStatusView, ConvertCheck,
12
+ ConnectProjectSummary, ConnectPullQuery, ConnectSessionOpen, ConnectSessionParams,
13
+ ConnectSessionView, ConnectStoryStatus, ConversionStatusView, ConvertCheck,
14
14
  } from './types.js'
15
15
 
16
16
  type ConnectReference<Request extends RequestShape, Response> =
@@ -26,39 +26,41 @@ export interface ConnectReferences {
26
26
  close: ConnectReference<{ params: ConnectSessionParams }, ConnectSessionView>
27
27
  }
28
28
  op: {
29
- pull: ConnectReference<{ params: ConnectSessionParams, query: ConnectWaitQuery }, ConnectOp[]>
29
+ pull: ConnectReference<{ params: ConnectSessionParams, query: ConnectPullQuery }, ConnectOp[]>
30
30
  submit: ConnectReference<{
31
31
  params: { sessionId: string, opId: string }, body: ConnectOpResult
32
32
  }, ConnectOpSubmission>
33
33
  }
34
34
  project: {
35
- create: ConnectReference<{ body: ConnectCreateBody }, ConnectJob>
36
- confirm: ConnectReference<{ params: { id: string }, body: ConnectConfirmBody }, ConnectJob>
35
+ create: ConnectReference<{ body: ConnectCreateBody }, ConnectProjectStatus>
36
+ confirm: ConnectReference<{ params: { id: string }, body: ConnectConfirmBody }, ConnectProjectStatus>
37
37
  list: ConnectReference<{}, ConnectProjectSummary[]>
38
38
  status: ConnectReference<{ params: { id: string } }, ConnectProjectStatus>
39
39
  attach: ConnectReference<{ body: ConnectAttachBody }, ConnectProjectStatus>
40
- reinit: ConnectReference<{ params: { id: string } }, ConnectJob>
41
- modify: ConnectReference<{ params: { id: string }, body: ConnectModifyBody }, ConnectJob>
40
+ reinit: ConnectReference<{ params: { id: string } }, ConnectProjectStatus>
41
+ modify: ConnectReference<{ params: { id: string }, body: ConnectModifyBody }, ConnectProjectStatus>
42
42
  settings: ConnectReference<{ params: { id: string } }, ConnectProjectSettings>
43
43
  llm: ConnectReference<{ params: { id: string }, body: ConnectProjectLlmBody }, ConnectProjectSettings>
44
44
  converterLlm: ConnectReference<{
45
45
  params: { id: string }, body: ConverterProjectLlmBody
46
46
  }, ConnectProjectSettings>
47
- job: ConnectReference<{ params: ConnectJobParams, query: ConnectWaitQuery }, ConnectJob>
47
+ }
48
+ story: {
49
+ status: ConnectReference<{ params: { id: string, storyId: string } }, ConnectStoryStatus>
48
50
  }
49
51
  files: {
50
52
  list: ConnectReference<{ params: { id: string } }, string[]>
51
53
  }
52
54
  convert: {
53
- create: ConnectReference<{ body: ConnectConvertCreateBody }, ConnectJob>
55
+ create: ConnectReference<{ body: ConnectConvertCreateBody }, ConversionStatusView>
54
56
  check: ConnectReference<{ params: { id: string } }, ConvertCheck>
55
- start: ConnectReference<{ params: { id: string } }, ConnectJob>
57
+ start: ConnectReference<{ params: { id: string } }, ConversionStatusView>
56
58
  proceed: ConnectReference<{
57
59
  params: { id: string }, body: ConnectConvertProceedBody
58
- }, ConnectJob>
59
- cancel: ConnectReference<{ params: { id: string } }, ConnectJob>
60
+ }, ConversionStatusView>
61
+ cancel: ConnectReference<{ params: { id: string } }, ConversionStatusView>
60
62
  status: ConnectReference<{ params: { id: string } }, ConversionStatusView>
61
- purge: ConnectReference<{ params: { id: string } }, ConnectJob>
63
+ purge: ConnectReference<{ params: { id: string } }, ConversionStatusView>
62
64
  }
63
65
  inquiry: {
64
66
  answer: ConnectReference<{
@@ -69,7 +71,7 @@ export interface ConnectReferences {
69
71
  state: ConnectReference<{ params: ConnectPipelineParams }, ConnectPipelineState>
70
72
  resume: ConnectReference<{
71
73
  params: ConnectPipelineParams, body: ConnectPipelineResumeBody
72
- }, ConnectJob>
74
+ }, ConnectPipelineState>
73
75
  }
74
76
  }
75
77
 
@@ -88,19 +90,19 @@ export const connectRef: ConnectReferences = {
88
90
  close: entrypointRef<{ params: ConnectSessionParams }, ConnectSessionView>(connect.session.close),
89
91
  },
90
92
  op: {
91
- pull: entrypointRef<{ params: ConnectSessionParams, query: ConnectWaitQuery }, ConnectOp[]>(connect.op.pull),
93
+ pull: entrypointRef<{ params: ConnectSessionParams, query: ConnectPullQuery }, ConnectOp[]>(connect.op.pull),
92
94
  submit: entrypointRef<{
93
95
  params: { sessionId: string, opId: string }, body: ConnectOpResult
94
96
  }, ConnectOpSubmission>(connect.op.submit),
95
97
  },
96
98
  project: {
97
- create: entrypointRef<{ body: ConnectCreateBody }, ConnectJob>(connect.project.create),
98
- confirm: entrypointRef<{ params: { id: string }, body: ConnectConfirmBody }, ConnectJob>(connect.project.confirm),
99
+ create: entrypointRef<{ body: ConnectCreateBody }, ConnectProjectStatus>(connect.project.create),
100
+ confirm: entrypointRef<{ params: { id: string }, body: ConnectConfirmBody }, ConnectProjectStatus>(connect.project.confirm),
99
101
  list: entrypointRef<{}, ConnectProjectSummary[]>(connect.project.list),
100
102
  status: entrypointRef<{ params: { id: string } }, ConnectProjectStatus>(connect.project.status),
101
103
  attach: entrypointRef<{ body: ConnectAttachBody }, ConnectProjectStatus>(connect.project.attach),
102
- reinit: entrypointRef<{ params: { id: string } }, ConnectJob>(connect.project.reinit),
103
- modify: entrypointRef<{ params: { id: string }, body: ConnectModifyBody }, ConnectJob>(connect.project.modify),
104
+ reinit: entrypointRef<{ params: { id: string } }, ConnectProjectStatus>(connect.project.reinit),
105
+ modify: entrypointRef<{ params: { id: string }, body: ConnectModifyBody }, ConnectProjectStatus>(connect.project.modify),
104
106
  settings: entrypointRef<{ params: { id: string } }, ConnectProjectSettings>(connect.project.settings),
105
107
  llm: entrypointRef<{
106
108
  params: { id: string }, body: ConnectProjectLlmBody
@@ -108,20 +110,24 @@ export const connectRef: ConnectReferences = {
108
110
  converterLlm: entrypointRef<{
109
111
  params: { id: string }, body: ConverterProjectLlmBody
110
112
  }, ConnectProjectSettings>(connect.project.converterLlm),
111
- job: entrypointRef<{ params: ConnectJobParams, query: ConnectWaitQuery }, ConnectJob>(connect.project.job),
113
+ },
114
+ story: {
115
+ status: entrypointRef<{
116
+ params: { id: string, storyId: string }
117
+ }, ConnectStoryStatus>(connect.story.status),
112
118
  },
113
119
  convert: {
114
- create: entrypointRef<{ body: ConnectConvertCreateBody }, ConnectJob>(connect.convert.create),
120
+ create: entrypointRef<{ body: ConnectConvertCreateBody }, ConversionStatusView>(connect.convert.create),
115
121
  check: entrypointRef<{ params: { id: string } }, ConvertCheck>(connect.convert.check),
116
- start: entrypointRef<{ params: { id: string } }, ConnectJob>(connect.convert.start),
122
+ start: entrypointRef<{ params: { id: string } }, ConversionStatusView>(connect.convert.start),
117
123
  proceed: entrypointRef<{
118
124
  params: { id: string }, body: ConnectConvertProceedBody
119
- }, ConnectJob>(connect.convert.proceed),
120
- cancel: entrypointRef<{ params: { id: string } }, ConnectJob>(connect.convert.cancel),
125
+ }, ConversionStatusView>(connect.convert.proceed),
126
+ cancel: entrypointRef<{ params: { id: string } }, ConversionStatusView>(connect.convert.cancel),
121
127
  status: entrypointRef<{
122
128
  params: { id: string }
123
129
  }, ConversionStatusView>(connect.convert.status),
124
- purge: entrypointRef<{ params: { id: string } }, ConnectJob>(connect.convert.purge),
130
+ purge: entrypointRef<{ params: { id: string } }, ConversionStatusView>(connect.convert.purge),
125
131
  },
126
132
  inquiry: {
127
133
  answer: entrypointRef<{
@@ -135,6 +141,6 @@ export const connectRef: ConnectReferences = {
135
141
  state: entrypointRef<{ params: ConnectPipelineParams }, ConnectPipelineState>(connect.pipeline.state),
136
142
  resume: entrypointRef<{
137
143
  params: ConnectPipelineParams, body: ConnectPipelineResumeBody
138
- }, ConnectJob>(connect.pipeline.resume),
144
+ }, ConnectPipelineState>(connect.pipeline.resume),
139
145
  },
140
146
  }
@@ -7,9 +7,9 @@ import {
7
7
  import type { ConnectOpResult, InquiryAnswerPayload } from './ops.js'
8
8
  import type {
9
9
  ConnectAttachBody, ConnectConfirmBody, ConnectConvertCreateBody, ConnectConvertProceedBody,
10
- ConnectCreateBody, ConnectJobParams, ConnectLlmBody, ConnectModifyBody, ConnectPipelineParams,
10
+ ConnectCreateBody, ConnectLlmBody, ConnectModifyBody, ConnectPipelineParams,
11
11
  ConnectPipelineResumeBody, ConnectProjectLlmBody, ConnectSession, ConnectSessionOpen,
12
- ConnectSessionParams, ConnectWaitQuery
12
+ ConnectPullQuery, ConnectSessionParams
13
13
  } from './types.js'
14
14
 
15
15
  /**
@@ -140,12 +140,12 @@ export const ConnectOpResultSchema = {
140
140
  additionalProperties: false,
141
141
  } as unknown as JSONSchemaType<ConnectOpResult>
142
142
 
143
- export const ConnectWaitQuerySchema = {
143
+ export const ConnectPullQuerySchema = {
144
144
  type: 'object',
145
145
  properties: { wait: { type: 'integer', minimum: 0, maximum: 45, nullable: true } },
146
146
  required: [],
147
147
  additionalProperties: false,
148
- } as JSONSchemaType<ConnectWaitQuery>
148
+ } as JSONSchemaType<ConnectPullQuery>
149
149
 
150
150
  /** Every project-scoped connector route addresses the project by `:id`. */
151
151
  export const ConnectProjectIdSchema = {
@@ -162,12 +162,12 @@ export const ConnectOpParamsSchema = {
162
162
  additionalProperties: false,
163
163
  } as JSONSchemaType<{ sessionId: string, opId: string }>
164
164
 
165
- export const ConnectJobParamsSchema = {
165
+ export const ConnectStoryParamsSchema = {
166
166
  type: 'object',
167
- properties: { id: idValue, jobId: { type: 'string', minLength: 1, maxLength: 256 } },
168
- required: ['id', 'jobId'],
167
+ properties: { id: idValue, storyId: idValue },
168
+ required: ['id', 'storyId'],
169
169
  additionalProperties: false,
170
- } as JSONSchemaType<ConnectJobParams>
170
+ } as JSONSchemaType<{ id: string, storyId: string }>
171
171
 
172
172
  export const ConnectCreateBodySchema = {
173
173
  type: 'object',
@@ -4,8 +4,8 @@ import type {
4
4
  OriginState, StoryEstimateBand
5
5
  } from '../convert/index.js'
6
6
  import type {
7
- ConnectExecutor, ConnectHarness, ConnectJobBlock, ConnectJobKind, ConnectJobStatus, ConnectLlm,
8
- ConnectSessionStatus, ConnectTarget, ConnectTransport, ModelTier
7
+ ConnectExecutor, ConnectHarness, ConnectLlm, ConnectSessionStatus, ConnectTarget,
8
+ ConnectTransport, ConnectWaitReason, ModelTier
9
9
  } from './consts.js'
10
10
  import type { InquiryAnswerPayload, InquiryPayload } from './ops.js'
11
11
 
@@ -82,68 +82,22 @@ export interface ConnectSessionView {
82
82
  expiresAt: string
83
83
  }
84
84
 
85
- /**
86
- * A derived view of "what the platform is doing for this project right now".
87
- *
88
- * Never stored. It is composed per request from the project lock, the slot record, the story
89
- * card, the latest pipeline run row and the operations queued for the project — the same facts
90
- * the manager UI reads, arranged for a caller that has one question ("may I stop waiting?") and
91
- * one follow-up ("what do I call next?").
92
- *
93
- * Its `id` is composed and parsed only through `jobIdOf` / `parseJobId`.
94
- */
95
- export interface ConnectJob {
96
- id: string
97
- kind: ConnectJobKind
98
- status: ConnectJobStatus
99
- /** The project CARD id. */
100
- projectId: string
101
- /**
102
- * The story CARD id — never the story's code.
103
- *
104
- * The name is kept because a parent agent reads it: a wire field name is that agent's
105
- * vocabulary and is never renamed, only re-documented.
106
- */
107
- storyId?: string
108
- runId?: string
109
- /** The pipeline step in flight, when a run row says. */
110
- phase?: string
111
- progress?: ConnectJobProgress
112
- blockedOn?: ConnectJobBlock
113
- /**
114
- * The question a parked run is waiting on — present exactly when it is blocked on one.
115
- *
116
- * Carried on the job rather than left to a second lookup because a parent reads a job and
117
- * nothing else while it polls: a run that stopped for a person, described only as "blocked",
118
- * is a run whose parent waits out the timeout for a question it was never shown. It is also
119
- * the ONLY way back to a question whose operation timed out while nobody was attached — the
120
- * connector's own queue holds nothing at that point.
121
- */
122
- inquiry?: InquiryPayload
123
- /** One sentence a parent agent can show a human. */
124
- message?: string
125
- /** Present on `Failed`, and on `Done` where the run recorded a warning. */
126
- error?: string
127
- /** Kind-specific payload once `Done`. */
128
- result?: Record<string, unknown>
129
- startedAt?: string
130
- updatedAt: string
85
+ export interface ConnectPullQuery {
86
+ /** Seconds to wait before answering; clamped to the pull ceiling. */
87
+ wait?: number
131
88
  }
132
89
 
133
- export interface ConnectJobProgress {
90
+ export interface ConnectRunStatus {
91
+ runId: string
92
+ pipeline: string
93
+ status: string
134
94
  step?: string
135
95
  completed: string[]
136
96
  pending: string[]
137
- }
138
-
139
- export interface ConnectJobParams {
140
- id: string
141
- jobId: string
142
- }
143
-
144
- export interface ConnectWaitQuery {
145
- /** Seconds to wait before answering; clamped to the pull ceiling. */
146
- wait?: number
97
+ warnings?: string[]
98
+ error?: string
99
+ startedAt?: string
100
+ updatedAt?: string
147
101
  }
148
102
 
149
103
  /** What a connector needs to know about a project in one call. */
@@ -181,18 +135,30 @@ export interface ConnectProjectStatus {
181
135
  }
182
136
  production?: { id: string, status: string, host?: string }
183
137
  agent: { locked: boolean, task?: string, lockedAt?: string }
184
- run?: {
185
- runId: string
186
- pipeline: string
187
- status: string
188
- step?: string
189
- completed: string[]
190
- pending: string[]
191
- error?: string
192
- }
138
+ run?: ConnectRunStatus
139
+ waitingFor?: ConnectWaitReason
140
+ pendingInquiry?: InquiryPayload
193
141
  session?: ConnectSessionView
194
142
  /** Set for a local target: the connector should not offer cloud-only operations. */
195
143
  local: boolean
144
+ updatedAt: string
145
+ }
146
+
147
+ /** A story card composed with its deterministic development run. */
148
+ export interface ConnectStoryStatus {
149
+ projectId: string
150
+ story: {
151
+ id: string
152
+ code: string
153
+ title: string
154
+ status: string
155
+ intrinsic: string
156
+ warning?: string
157
+ }
158
+ run?: ConnectRunStatus
159
+ waitingFor?: ConnectWaitReason
160
+ pendingInquiry?: InquiryPayload
161
+ updatedAt: string
196
162
  }
197
163
 
198
164
  /** The record a local project keeps so a later session knows what it is. */
@@ -217,7 +183,7 @@ export interface ConnectProfileSettingsView extends ConnectProfileSettings {
217
183
  * The profile's preference for who performs a CONVERSION's model calls.
218
184
  *
219
185
  * Its own setting rather than a reading of `llmMode`, because the two answer for different
220
- * work: a conversion reads somebody else's whole repository, which is the one job where handing
186
+ * work: a conversion reads somebody else's whole repository, which is the one case where handing
221
187
  * the inference to the parent agent is the cheap default rather than the experimental option.
222
188
  *
223
189
  * OPTIONAL for the same reason {@link ConnectCapabilitiesView.defaults} carries `converterLlm`
@@ -397,6 +363,7 @@ export interface ConversionStatusView {
397
363
  runId?: string
398
364
  /** Set exactly when `status` is `Waiting`: the question the run stopped on. */
399
365
  pendingInquiry?: InquiryPayload
366
+ waitingFor?: ConnectWaitReason
400
367
  lastError?: string
401
368
  updatedAt: string
402
369
  }
@@ -428,6 +395,8 @@ export interface ConnectPipelineState {
428
395
  failedAt?: string
429
396
  error?: string
430
397
  note?: string
398
+ waitingFor?: ConnectWaitReason
399
+ pendingInquiry?: InquiryPayload
431
400
  attempts: number
432
401
  startedAt: string
433
402
  heartbeatAt: string
@@ -492,9 +492,10 @@ export const ConversionEstimateSchema = {
492
492
  inputTokens: { type: 'number' },
493
493
  outputTokens: { type: 'number' },
494
494
  usd: { type: 'number' },
495
- credits: { type: 'number' },
496
- // A delegated conversion runs its model calls on the parent agent, so `usd`/`credits` are 0
497
- // and this is what says the zero is a mode rather than a missing price.
495
+ // Deprecated: kept nullable so a record stored before the change still validates.
496
+ credits: { type: 'number', nullable: true },
497
+ // A delegated conversion runs its model calls on the parent agent, so `usd` is 0 and this is
498
+ // what says the zero is a mode rather than a missing price.
498
499
  delegated: { type: 'boolean' },
499
500
  basis: {
500
501
  type: 'object',
@@ -511,7 +512,7 @@ export const ConversionEstimateSchema = {
511
512
  computedAt: isoDate,
512
513
  },
513
514
  required: [
514
- 'stage', 'version', 'roles', 'inputTokens', 'outputTokens', 'usd', 'credits', 'delegated',
515
+ 'stage', 'version', 'roles', 'inputTokens', 'outputTokens', 'usd', 'delegated',
515
516
  'basis', 'computedAt'
516
517
  ],
517
518
  additionalProperties: false,
@@ -522,8 +523,9 @@ export const StoryEstimateBandSchema = {
522
523
  properties: {
523
524
  minUsd: { type: 'number' },
524
525
  maxUsd: { type: 'number' },
525
- minCredits: { type: 'number' },
526
- maxCredits: { type: 'number' },
526
+ // Deprecated: kept nullable so a record stored before the change still validates.
527
+ minCredits: { type: 'number', nullable: true },
528
+ maxCredits: { type: 'number', nullable: true },
527
529
  perStory: {
528
530
  type: 'array',
529
531
  items: {
@@ -539,7 +541,7 @@ export const StoryEstimateBandSchema = {
539
541
  },
540
542
  },
541
543
  },
542
- required: ['minUsd', 'maxUsd', 'minCredits', 'maxCredits', 'perStory'],
544
+ required: ['minUsd', 'maxUsd', 'perStory'],
543
545
  additionalProperties: false,
544
546
  } as unknown as JSONSchemaType<StoryEstimateBand>
545
547
 
@@ -409,9 +409,9 @@ export interface RoleEstimate {
409
409
  * What one stage is expected to cost, as the platform stores it on the conversion record.
410
410
  *
411
411
  * Priced on the agent, where the model presets and the run mode are: a DELEGATED conversion runs
412
- * its model calls on the parent agent and costs the platform nothing, so `usd` and `credits` are
413
- * zero and `delegated` says why. `basis` is kept so a user can see what the number was projected
414
- * from rather than being handed a figure with no provenance.
412
+ * its model calls on the parent agent and costs the platform nothing, so `usd` is zero and
413
+ * `delegated` says why. `basis` is kept so a user can see what the number was projected from
414
+ * rather than being handed a figure with no provenance.
415
415
  */
416
416
  export interface ConversionEstimate {
417
417
  stage: ConversionStage
@@ -420,7 +420,8 @@ export interface ConversionEstimate {
420
420
  inputTokens: number
421
421
  outputTokens: number
422
422
  usd: number
423
- credits: number
423
+ /** @deprecated Credits are USD at the reference rate now — read `usd`. Kept for records stored before the change. */
424
+ credits?: number
424
425
  delegated: boolean
425
426
  basis: {
426
427
  files: number
@@ -441,8 +442,10 @@ export interface ConversionEstimate {
441
442
  export interface StoryEstimateBand {
442
443
  minUsd: number
443
444
  maxUsd: number
444
- minCredits: number
445
- maxCredits: number
445
+ /** @deprecated Credits are USD at the reference rate now — read `minUsd`. Kept for records stored before the change. */
446
+ minCredits?: number
447
+ /** @deprecated Credits are USD at the reference rate now — read `maxUsd`. Kept for records stored before the change. */
448
+ maxCredits?: number
446
449
  perStory: { code: string, complexity: number, minUsd: number, maxUsd: number }[]
447
450
  }
448
451
 
@@ -40,7 +40,7 @@ export const isEphemeralActor = (actor?: StoryActor): boolean =>
40
40
  export interface StoryDesignJob {
41
41
  /** The queue it is enqueued onto. */
42
42
  queue: string
43
- /** The job name, which IS its entrypoint alias — `app.job.<name>`. */
43
+ /** The job name, which becomes the backend-only `job:<name>` protocol alias. */
44
44
  name: string
45
45
  /** The processor module, relative to the worker package's `src`. */
46
46
  path: string
@@ -35,7 +35,7 @@ export const VIABLE_SPEC_FLOW = 'viable:spec'
35
35
  * The story flow's status keys.
36
36
  *
37
37
  * Byte-identical to the strings a story has always carried — the frontmatter of
38
- * `docs/stories/<code>.md`, the connector's job status mapping, the board's columns, their i18n
38
+ * `docs/stories/<code>.md`, connector status rendering, the board's columns, their i18n
39
39
  * keys and every end-to-end selector read these exact values. A key is a wire contract and is
40
40
  * never renamed.
41
41
  */