@owlmeans/viable-common 0.0.46 → 0.0.48-rc.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 (171) 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.map +1 -0
  8. package/build/connect/branding/types.d.ts +26 -4
  9. package/build/connect/branding/types.d.ts.map +1 -1
  10. package/build/connect/call/types.d.ts +28 -0
  11. package/build/connect/call/types.d.ts.map +1 -0
  12. package/build/connect/call/types.js +2 -0
  13. package/build/connect/call/types.js.map +1 -0
  14. package/build/connect/config/types.d.ts +45 -0
  15. package/build/connect/config/types.d.ts.map +1 -0
  16. package/build/connect/config/types.js +2 -0
  17. package/build/connect/config/types.js.map +1 -0
  18. package/build/connect/consts.d.ts +383 -1
  19. package/build/connect/consts.d.ts.map +1 -1
  20. package/build/connect/consts.js +387 -1
  21. package/build/connect/consts.js.map +1 -1
  22. package/build/connect/conversion/types.d.ts +24 -0
  23. package/build/connect/conversion/types.d.ts.map +1 -1
  24. package/build/connect/entrypoints/types.d.ts +22 -13
  25. package/build/connect/entrypoints/types.d.ts.map +1 -1
  26. package/build/connect/entrypoints.d.ts +441 -8
  27. package/build/connect/entrypoints.d.ts.map +1 -1
  28. package/build/connect/entrypoints.js +292 -9
  29. package/build/connect/entrypoints.js.map +1 -1
  30. package/build/connect/errors.d.ts +12 -0
  31. package/build/connect/errors.d.ts.map +1 -1
  32. package/build/connect/errors.js +16 -0
  33. package/build/connect/errors.js.map +1 -1
  34. package/build/connect/feed/types.d.ts +71 -0
  35. package/build/connect/feed/types.d.ts.map +1 -0
  36. package/build/connect/feed/types.js +2 -0
  37. package/build/connect/feed/types.js.map +1 -0
  38. package/build/connect/files/types.d.ts +34 -0
  39. package/build/connect/files/types.d.ts.map +1 -0
  40. package/build/connect/files/types.js +2 -0
  41. package/build/connect/files/types.js.map +1 -0
  42. package/build/connect/git/types.d.ts +170 -0
  43. package/build/connect/git/types.d.ts.map +1 -0
  44. package/build/connect/git/types.js +14 -0
  45. package/build/connect/git/types.js.map +1 -0
  46. package/build/connect/iam/types.d.ts +25 -0
  47. package/build/connect/iam/types.d.ts.map +1 -0
  48. package/build/connect/iam/types.js +8 -0
  49. package/build/connect/iam/types.js.map +1 -0
  50. package/build/connect/index.d.ts +9 -0
  51. package/build/connect/index.d.ts.map +1 -1
  52. package/build/connect/production/types.d.ts +65 -0
  53. package/build/connect/production/types.d.ts.map +1 -0
  54. package/build/connect/production/types.js +2 -0
  55. package/build/connect/production/types.js.map +1 -0
  56. package/build/connect/project/types.d.ts +23 -16
  57. package/build/connect/project/types.d.ts.map +1 -1
  58. package/build/connect/references/types.d.ts +424 -2
  59. package/build/connect/references/types.d.ts.map +1 -1
  60. package/build/connect/references.d.ts.map +1 -1
  61. package/build/connect/references.js +122 -0
  62. package/build/connect/references.js.map +1 -1
  63. package/build/connect/schemas.d.ts +65 -2
  64. package/build/connect/schemas.d.ts.map +1 -1
  65. package/build/connect/schemas.js +306 -1
  66. package/build/connect/schemas.js.map +1 -1
  67. package/build/connect/settings/types.d.ts +0 -25
  68. package/build/connect/settings/types.d.ts.map +1 -1
  69. package/build/connect/slot/types.d.ts +24 -0
  70. package/build/connect/slot/types.d.ts.map +1 -0
  71. package/build/connect/slot/types.js +2 -0
  72. package/build/connect/slot/types.js.map +1 -0
  73. package/build/convert/record/types.d.ts +0 -9
  74. package/build/convert/record/types.d.ts.map +1 -1
  75. package/build/convert/schemas.d.ts +2 -5
  76. package/build/convert/schemas.d.ts.map +1 -1
  77. package/build/convert/schemas.js +2 -15
  78. package/build/convert/schemas.js.map +1 -1
  79. package/build/iam-console/consts.d.ts +13 -0
  80. package/build/iam-console/consts.d.ts.map +1 -0
  81. package/build/iam-console/consts.js +13 -0
  82. package/build/iam-console/consts.js.map +1 -0
  83. package/build/iam-console/consts.local.d.ts +123 -0
  84. package/build/iam-console/consts.local.d.ts.map +1 -0
  85. package/build/iam-console/consts.local.js +50 -0
  86. package/build/iam-console/consts.local.js.map +1 -0
  87. package/build/iam-console/index.d.ts +4 -0
  88. package/build/iam-console/index.d.ts.map +1 -0
  89. package/build/iam-console/index.js +3 -0
  90. package/build/iam-console/index.js.map +1 -0
  91. package/build/iam-console/schemas.d.ts +38 -0
  92. package/build/iam-console/schemas.d.ts.map +1 -0
  93. package/build/iam-console/schemas.js +217 -0
  94. package/build/iam-console/schemas.js.map +1 -0
  95. package/build/iam-console/types.d.ts +140 -0
  96. package/build/iam-console/types.d.ts.map +1 -0
  97. package/build/iam-console/types.js +2 -0
  98. package/build/{connect → iam-console}/types.js.map +1 -1
  99. package/build/index.d.ts +1 -0
  100. package/build/index.d.ts.map +1 -1
  101. package/build/index.js +1 -0
  102. package/build/index.js.map +1 -1
  103. package/build/legal/consts.d.ts +33 -2
  104. package/build/legal/consts.d.ts.map +1 -1
  105. package/build/legal/consts.js +11 -3
  106. package/build/legal/consts.js.map +1 -1
  107. package/build/legal/types.d.ts +8 -1
  108. package/build/legal/types.d.ts.map +1 -1
  109. package/build/planning/schemas.d.ts.map +1 -1
  110. package/build/planning/schemas.js +0 -1
  111. package/build/planning/schemas.js.map +1 -1
  112. package/build/planning/types.d.ts +0 -2
  113. package/build/planning/types.d.ts.map +1 -1
  114. package/package.json +14 -5
  115. package/src/connect/account/types.ts +91 -0
  116. package/src/connect/branding/types.ts +28 -4
  117. package/src/connect/call/types.ts +31 -0
  118. package/src/connect/config/types.ts +51 -0
  119. package/src/connect/consts.ts +400 -1
  120. package/src/connect/conversion/types.ts +25 -0
  121. package/src/connect/entrypoints/types.ts +22 -7
  122. package/src/connect/entrypoints.ts +592 -15
  123. package/src/connect/errors.ts +18 -0
  124. package/src/connect/feed/types.ts +76 -0
  125. package/src/connect/files/types.ts +38 -0
  126. package/src/connect/git/types.ts +187 -0
  127. package/src/connect/iam/types.ts +28 -0
  128. package/src/connect/index.ts +9 -0
  129. package/src/connect/production/types.ts +71 -0
  130. package/src/connect/project/types.ts +25 -12
  131. package/src/connect/references/types.ts +166 -5
  132. package/src/connect/references.ts +210 -5
  133. package/src/connect/schemas.ts +366 -5
  134. package/src/connect/settings/types.ts +0 -25
  135. package/src/connect/slot/types.ts +24 -0
  136. package/src/convert/record/types.ts +0 -11
  137. package/src/convert/schemas.ts +3 -19
  138. package/src/iam-console/consts.local.ts +64 -0
  139. package/src/iam-console/consts.ts +15 -0
  140. package/src/iam-console/index.ts +3 -0
  141. package/src/iam-console/schemas.ts +251 -0
  142. package/src/iam-console/types.ts +165 -0
  143. package/src/index.ts +1 -0
  144. package/src/legal/consts.ts +13 -5
  145. package/src/legal/types.ts +12 -1
  146. package/src/planning/schemas.ts +0 -1
  147. package/src/planning/types.ts +0 -2
  148. package/tests/connect-convert.spec.ts +6 -2
  149. package/tests/connect-entrypoints.spec.ts +554 -16
  150. package/tests/error-status.spec.ts +2 -1
  151. package/tests/iam-console.spec.ts +89 -0
  152. package/tests/planning.spec.ts +8 -0
  153. package/build/connect/ops.d.ts +0 -189
  154. package/build/connect/ops.d.ts.map +0 -1
  155. package/build/connect/ops.js +0 -2
  156. package/build/connect/ops.js.map +0 -1
  157. package/build/connect/types.d.ts +0 -453
  158. package/build/connect/types.d.ts.map +0 -1
  159. package/build/intent/flow.d.ts +0 -17
  160. package/build/intent/flow.d.ts.map +0 -1
  161. package/build/intent/flow.js +0 -65
  162. package/build/intent/flow.js.map +0 -1
  163. package/build/planning/flows.d.ts +0 -34
  164. package/build/planning/flows.d.ts.map +0 -1
  165. package/build/planning/flows.js +0 -174
  166. package/build/planning/flows.js.map +0 -1
  167. package/build/skills/roles.d.ts +0 -43
  168. package/build/skills/roles.d.ts.map +0 -1
  169. package/build/skills/roles.js +0 -44
  170. package/build/skills/roles.js.map +0 -1
  171. /package/build/connect/{types.js → account/types.js} +0 -0
@@ -14,6 +14,7 @@ const DECLARED: Record<string, number | undefined> = {
14
14
  ConnectError: undefined,
15
15
  ConnectSessionNotFound: 404,
16
16
  ConnectOpUnknown: 404,
17
+ ConnectCallLost: 410,
17
18
  ConnectSessionGone: 409,
18
19
  LocalSlotUnsupported: 409,
19
20
  ConnectOpRefused: 422,
@@ -42,7 +43,7 @@ describe('viable-common refusals — declared HTTP statuses', () => {
42
43
  expect(classes.map(([name]) => name).sort()).toEqual(Object.keys(DECLARED).sort())
43
44
  })
44
45
 
45
- test('balance 402, an absent target 404, a conflicting state 409, refused content 422, a consent or a confirmation only a person gives 428; faults nothing', () => {
46
+ test('balance 402, an absent target 404, a conflicting state 409, a lost outcome 410, refused content 422, a consent or a confirmation only a person gives 428; faults nothing', () => {
46
47
  for (const [name, Class] of classes) {
47
48
  expect([name, statusOf(new Class('x'))]).toEqual([name, DECLARED[name]])
48
49
  }
@@ -0,0 +1,89 @@
1
+ import { describe, expect, test } from 'bun:test'
2
+ import Ajv from 'ajv'
3
+ import { aliasOf, protocols, type EntrypointProtocolDeclaration } from '@owlmeans/entrypoint'
4
+ import { DEFAULT_GUARD } from '@owlmeans/auth-common'
5
+ import { RouteMethod } from '@owlmeans/route'
6
+ import { connect, ConnectPaidGate } from '../src/connect/consts.js'
7
+ import {
8
+ ConnectIamGroupParamsSchema, ConnectIamMemberParamsSchema, ConnectIamOrganizationParamsSchema,
9
+ ConnectIamUserParamsSchema,
10
+ } from '../src/connect/schemas.js'
11
+ import { connectProtocols } from '../src/connect/entrypoints.js'
12
+ import {
13
+ IAM_REFUSED, IamAssignGrantSchema, IamDefaultClass, IamDefinitionUpdateSchema, IamGrantMode, IamGroupMembersChangeSchema,
14
+ IamProjectUserInviteSchema, IamScopedSchema,
15
+ } from '../src/iam-console/index.js'
16
+ import { WorkloadKind } from '../src/slot/consts.js'
17
+
18
+ const tree = connectProtocols({
19
+ guard: DEFAULT_GUARD,
20
+ gate: { alias: 'owner-gate', params: ['project'] },
21
+ accountGate: { alias: 'owner-gate', params: ['account'] },
22
+ paid: Object.fromEntries(Object.values(ConnectPaidGate).map(kind => [kind, { alias: `gate-${kind}`, params: [kind] }])),
23
+ })
24
+ const iamRoutes = protocols(tree.iam as never)
25
+ const ajv = new Ajv({ strict: false })
26
+
27
+ describe('@owlmeans/viable-common — the owner console contract', () => {
28
+ test('one schema set for both doors, a grant naming exactly one subject, and nullable enums carrying null', () => {
29
+ const grant = ajv.compile(IamAssignGrantSchema)
30
+ expect(grant({ profileId: 'shop:3vQB7B6MrGQZaxCuFg4oh', permission: 'order--view', mode: IamGrantMode.Blanket })).toBe(true)
31
+ expect(grant({ group: { entitySlug: 'acme', key: 'editors' }, permission: 'order--view' })).toBe(true)
32
+ expect(grant({ permission: 'order--view' })).toBe(false)
33
+ expect(grant({ profileId: 'p1', group: { entitySlug: 'acme', key: 'editors' }, permission: 'order--view' })).toBe(false)
34
+ expect(grant({ profileId: 'p1', permission: 'order--view', entityId: '64b7f0c2a1b2c3d4e5f60718' })).toBe(false)
35
+ // A connector sends an unset optional as null as readily as it drops the key.
36
+ expect(grant({ profileId: 'p1', permission: 'order--view', mode: null, scope: null })).toBe(true)
37
+ const update = ajv.compile(IamDefinitionUpdateSchema)
38
+ expect(update({ permission: 'order--view', defaultClass: IamDefaultClass.Owner })).toBe(true)
39
+ expect(update({ permission: 'order--view', defaultClass: 'everyone' })).toBe(false)
40
+ expect(ajv.compile(IamScopedSchema)({ scope: WorkloadKind.Production })).toBe(true)
41
+ expect(ajv.compile(IamScopedSchema)({ scope: 'staging' })).toBe(false)
42
+ expect(ajv.compile(IamProjectUserInviteSchema)({ email: 'a@b.test', entitySlug: 'acme' })).toBe(false)
43
+ expect(ajv.compile(IamGroupMembersChangeSchema)({ profileIds: [] })).toBe(false)
44
+ expect(IAM_REFUSED).toBe('iam-refused')
45
+ })
46
+ })
47
+
48
+ describe('@owlmeans/viable-common — the connector\'s IAM twins', () => {
49
+ test('every project route sits under the owned base with no paid gate; the customer-wide list under the account base', () => {
50
+ expect(iamRoutes).toHaveLength(22)
51
+ for (const protocol of iamRoutes) {
52
+ expect([protocol.alias, aliasOf(protocol.route.route.parent!), protocol.gate]).toEqual([protocol.alias, connect.base, undefined])
53
+ expect(protocol.route.route.path.startsWith('/project/:id/iam/')).toBe(true)
54
+ }
55
+ const users = tree.account.iam.users
56
+ expect([aliasOf(users.route.route.parent!), users.route.route.path, users.route.route.method])
57
+ .toEqual([connect.account.base, '/iam/users', RouteMethod.GET])
58
+ expect(tree.account.base.gate).toEqual({ alias: 'owner-gate', params: ['account'] })
59
+ })
60
+
61
+ test('every write is a POST carrying scope in its body — a remove included; every read takes it in the query', () => {
62
+ const propertiesOf = (schema: unknown): Record<string, unknown> =>
63
+ (schema as { properties?: Record<string, unknown> } | undefined)?.properties ?? {}
64
+ for (const protocol of iamRoutes as EntrypointProtocolDeclaration[]) {
65
+ const { method } = protocol.route.route
66
+ const schemas = protocol.contract?.requestSchemas
67
+ expect([protocol.alias, method === RouteMethod.GET || method === RouteMethod.POST]).toEqual([protocol.alias, true])
68
+ const carrier = method === RouteMethod.GET ? schemas?.query : schemas?.body
69
+ expect([protocol.alias, 'scope' in propertiesOf(carrier)]).toEqual([protocol.alias, true])
70
+ if (method === RouteMethod.GET) expect([protocol.alias, schemas?.body]).toEqual([protocol.alias, undefined])
71
+ }
72
+ expect(tree.iam.users.remove.contract?.requestSchemas?.body).toEqual(IamScopedSchema as never)
73
+ expect(tree.iam.grants.assign.contract?.requestSchemas?.body).toEqual(IamAssignGrantSchema as never)
74
+ })
75
+
76
+ test('the paths name the project as id, an organization by its slug, a subject and a group key — never a record id', () => {
77
+ const user = ajv.compile(ConnectIamUserParamsSchema)
78
+ expect(user({ id: 'p', profileId: 'shop:abc' })).toBe(true)
79
+ expect(user({ id: 'p', profileId: 'a/b' })).toBe(false)
80
+ const organization = ajv.compile(ConnectIamOrganizationParamsSchema)
81
+ expect(organization({ id: 'p', entitySlug: 'acme-corp' })).toBe(true)
82
+ expect(organization({ id: 'p', entitySlug: 'Acme' })).toBe(false)
83
+ expect(organization({ id: 'p', entitySlug: 'acme', entityId: 'x' })).toBe(false)
84
+ expect(ajv.compile(ConnectIamMemberParamsSchema)({ id: 'p', entitySlug: 'acme' })).toBe(false)
85
+ const group = ajv.compile(ConnectIamGroupParamsSchema)
86
+ expect(group({ id: 'p', entitySlug: 'acme', group: 'editors' })).toBe(true)
87
+ expect(group({ id: 'p', entitySlug: 'acme', group: 'a/b' })).toBe(false)
88
+ })
89
+ })
@@ -246,6 +246,14 @@ describe('viable-common - the viable field schemas', () => {
246
246
  expect(project({ alias: 'slot-booker' })).toBe(false)
247
247
  })
248
248
 
249
+ test('a project carries ONE inference setting: a conversion has no mode of its own', () => {
250
+ // A conversion follows the session that drives it, like every other run; a card still
251
+ // carrying the removed per-conversion key is refused rather than silently kept.
252
+ expect(project({ connectLlmMode: 'local' })).toBe(true)
253
+ expect(project({ converterLlmMode: 'local' })).toBe(false)
254
+ expect(project({ converterLlmMode: null })).toBe(false)
255
+ })
256
+
249
257
  test('a project records a work kind from the closed set and a bounded case quote', () => {
250
258
  expect(project({ blueprintCase: 'work-management', workKind: 'crm', caseQuote: 'A CRM for ski resorts.' })).toBe(true)
251
259
  expect(project({ workKind: null, caseQuote: null })).toBe(true)
@@ -1,189 +0,0 @@
1
- import type { SlotCommandPayload } from '../slot/index.js';
2
- import type { ConnectInquiryKind, ConnectOpErrorKind, ConnectOpKind, ModelTaskMode, ModelTaskResultKind, ModelTaskRole, ModelTier } from './consts.js';
3
- import type { ConnectServices } from './types.js';
4
- /**
5
- * One thing the platform asks a connector to do.
6
- *
7
- * Operations are addressed to a PROJECT, not to a session: a connector that restarts mid-run
8
- * re-attaches and is handed whatever is still pending, so an MCP server dying does not kill a
9
- * pipeline that is minutes into its work. `sessionId` records which session it was published to,
10
- * for tracing and for the redelivery counter — never for routing a result back.
11
- */
12
- export interface ConnectOp {
13
- id: string;
14
- projectId: string;
15
- sessionId: string;
16
- kind: ConnectOpKind;
17
- payload: SlotCommandPayload | ModelTask | ConfigurePayload | InquiryPayload;
18
- createdAt: string;
19
- /** When the asker stops waiting. A connector past this may skip the work and say so. */
20
- deadlineAt: string;
21
- /** How many times this op has been delivered. > 1 means a connector reconnected. */
22
- attempt: number;
23
- deliveredAt?: string;
24
- }
25
- /**
26
- * The answer to exactly one operation.
27
- *
28
- * `ok: false` with `kind: 'malformed'` is a RETRYABLE outcome — the platform asks again, with the
29
- * problem quoted back. `'unavailable'` says the connector cannot do this at all and the run should
30
- * fail rather than spin.
31
- */
32
- export interface ConnectOpResult {
33
- opId: string;
34
- sessionId: string;
35
- ok: boolean;
36
- value?: unknown;
37
- error?: ConnectOpError;
38
- }
39
- export interface ConnectOpError {
40
- type: string;
41
- message: string;
42
- kind?: ConnectOpErrorKind;
43
- }
44
- /**
45
- * The configuration a local target needs, as file CONTENT rather than as keys.
46
- *
47
- * The platform composes it — it is the only side that knows the OIDC client, its secret and the
48
- * redirect URIs — and the connector writes it into the managed block of each named file, leaving
49
- * every line the user added alone. `probe` names the services the platform wants to know about
50
- * before it asks for a database migration or a boot check.
51
- */
52
- export interface ConfigurePayload {
53
- files: ConfigureFile[];
54
- probe: Array<keyof ConnectServices>;
55
- }
56
- export interface ConfigureFile {
57
- /** Target-root-relative, e.g. `.env` or `sources/web/.env`. */
58
- path: string;
59
- /** The managed block's content. Written between the connector's own markers. */
60
- content: string;
61
- }
62
- export interface ConfigureResult {
63
- written: string[];
64
- /**
65
- * Keys the target still needs and the user must supply — a local database URL, say.
66
- *
67
- * Read exactly like the publisher's configure acknowledgement: a key with an EMPTY value counts
68
- * as missing, because a push that ran before a secret existed leaves one behind.
69
- */
70
- missing: string[];
71
- services: ConnectServices;
72
- }
73
- /**
74
- * One model call, handed to the parent agent.
75
- *
76
- * It carries everything a fresh subagent needs and nothing it does not: the persona as a system
77
- * prompt, the conversation so far, and the shape the answer must take. There is no platform
78
- * vocabulary in it — no pipeline, no step, no internal role semantics beyond a name and a tier —
79
- * because it is read by a model the platform does not own.
80
- */
81
- export interface ModelTask {
82
- id: string;
83
- projectId: string;
84
- /** The platform role that asked. Informational; the tier is what decides the model. */
85
- role: string;
86
- tier: ModelTier;
87
- /** Which attempt this is. > 0 means a previous answer was refused; `feedback` says why. */
88
- attempt: number;
89
- mode: ModelTaskMode;
90
- system?: string;
91
- messages: ModelTaskMessage[];
92
- /** `Tools` mode: what the subagent may call. JSON Schema per tool. */
93
- tools?: ModelTaskTool[];
94
- /** `Tools` mode: force one tool, or leave the choice open. */
95
- toolChoice?: ModelTaskToolChoice;
96
- /** `Json` mode: the schema the single returned object must satisfy. */
97
- outputSchema?: Record<string, unknown>;
98
- /** A soft cap, stated so a parent can size its own call. */
99
- maxOutputChars?: number;
100
- /** Present on a retry: what was wrong with the previous answer. */
101
- feedback?: string;
102
- expiresAt: string;
103
- }
104
- export interface ModelTaskMessage {
105
- role: ModelTaskRole;
106
- content: string;
107
- /** Assistant messages that called tools. */
108
- toolCalls?: ModelTaskToolCall[];
109
- /** Tool messages answer one call. */
110
- toolCallId?: string;
111
- /** Tool messages name the tool they answer. */
112
- name?: string;
113
- }
114
- export interface ModelTaskTool {
115
- name: string;
116
- description?: string;
117
- /** JSON Schema for the tool's arguments. */
118
- parameters: Record<string, unknown>;
119
- }
120
- export type ModelTaskToolChoice = 'auto' | 'none' | {
121
- name: string;
122
- };
123
- export interface ModelTaskToolCall {
124
- id?: string;
125
- name: string;
126
- args: Record<string, unknown>;
127
- }
128
- /** What the parent's subagent produced. */
129
- export interface ModelTaskResult {
130
- taskId: string;
131
- kind: ModelTaskResultKind;
132
- text?: string;
133
- json?: unknown;
134
- toolCalls?: ModelTaskToolCall[];
135
- /** Why the parent could not answer. Treated as a malformed answer and retried. */
136
- error?: string;
137
- /** What the parent spent. Recorded for the trace; it costs the platform nothing. */
138
- usage?: ModelTaskUsage;
139
- /** What the parent actually ran. Display only. */
140
- model?: string;
141
- }
142
- export interface ModelTaskUsage {
143
- inputTokens?: number;
144
- outputTokens?: number;
145
- }
146
- /** One option a {@link ConnectInquiryKind.Choice} question offers. */
147
- export interface ConnectInquiryOption {
148
- value: string;
149
- label: string;
150
- description?: string;
151
- }
152
- /**
153
- * One question put to the person the connector is working for.
154
- *
155
- * It carries where it came from — the run and the step — because an answer is recorded
156
- * against the run that asked and re-read when that run resumes. `expiresAt` is what makes an
157
- * unanswered question fail its step instead of parking a project lock forever.
158
- */
159
- export interface InquiryPayload {
160
- id: string;
161
- projectId: string;
162
- runId?: string;
163
- /** The pipeline step that asked, so a resumed run can match the answer to the place it belongs. */
164
- step?: string;
165
- kind: ConnectInquiryKind;
166
- question: string;
167
- /** What the asker already knows, so the person is not asked to go and find it out. */
168
- context?: string;
169
- options?: ConnectInquiryOption[];
170
- multiple?: boolean;
171
- /** Whether a choice question also accepts text the options do not cover. */
172
- allowText?: boolean;
173
- /** What the asker will assume if nobody answers. Recorded as an assumption when it is used. */
174
- default?: string | string[];
175
- expiresAt: string;
176
- }
177
- /**
178
- * The answer to one question.
179
- *
180
- * `declined` is a real answer and not an absence: it says a person saw the question and chose not
181
- * to decide, which the asker records as an assumption rather than waiting out the timeout.
182
- */
183
- export interface InquiryAnswerPayload {
184
- inquiryId: string;
185
- value?: string | string[];
186
- text?: string;
187
- declined?: boolean;
188
- }
189
- //# sourceMappingURL=ops.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../src/connect/ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAE,mBAAmB,EACzF,aAAa,EAAE,SAAS,EACzB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,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EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ops.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ops.js","sourceRoot":"","sources":["../../src/connect/ops.ts"],"names":[],"mappings":""}