@owlmeans/viable-sdk 0.1.19-rc.0 → 0.1.19

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 (165) hide show
  1. package/README.md +1 -1
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/viable-sdk/SKILL.md +123 -13
  4. package/build/api/collect/types.d.ts +12 -1
  5. package/build/api/collect/types.d.ts.map +1 -1
  6. package/build/api/collect.d.ts.map +1 -1
  7. package/build/api/collect.js +18 -1
  8. package/build/api/collect.js.map +1 -1
  9. package/build/api/consts.local.d.ts +2 -0
  10. package/build/api/consts.local.d.ts.map +1 -1
  11. package/build/api/consts.local.js +2 -0
  12. package/build/api/consts.local.js.map +1 -1
  13. package/build/api/remote.d.ts.map +1 -1
  14. package/build/api/remote.js +13 -0
  15. package/build/api/remote.js.map +1 -1
  16. package/build/context/index.d.ts.map +1 -1
  17. package/build/context/index.js +7 -3
  18. package/build/context/index.js.map +1 -1
  19. package/build/context/types.d.ts +7 -1
  20. package/build/context/types.d.ts.map +1 -1
  21. package/build/session/consts.local.d.ts +2 -0
  22. package/build/session/consts.local.d.ts.map +1 -1
  23. package/build/session/consts.local.js +2 -0
  24. package/build/session/consts.local.js.map +1 -1
  25. package/build/session/index.d.ts.map +1 -1
  26. package/build/session/index.js +18 -1
  27. package/build/session/index.js.map +1 -1
  28. package/build/session/types.d.ts +7 -0
  29. package/build/session/types.d.ts.map +1 -1
  30. package/build/tools/catalogue.d.ts.map +1 -1
  31. package/build/tools/catalogue.js +13 -2
  32. package/build/tools/catalogue.js.map +1 -1
  33. package/build/tools/consts.d.ts +9 -1
  34. package/build/tools/consts.d.ts.map +1 -1
  35. package/build/tools/consts.js +16 -0
  36. package/build/tools/consts.js.map +1 -1
  37. package/build/tools/consts.local.d.ts +1 -9
  38. package/build/tools/consts.local.d.ts.map +1 -1
  39. package/build/tools/consts.local.js +2 -16
  40. package/build/tools/consts.local.js.map +1 -1
  41. package/build/tools/index.d.ts +6 -0
  42. package/build/tools/index.d.ts.map +1 -1
  43. package/build/tools/index.js +4 -0
  44. package/build/tools/index.js.map +1 -1
  45. package/build/tools/instructions/types.d.ts +21 -0
  46. package/build/tools/instructions/types.d.ts.map +1 -0
  47. package/build/tools/instructions/types.js +2 -0
  48. package/build/tools/instructions/types.js.map +1 -0
  49. package/build/tools/instructions.d.ts +4 -0
  50. package/build/tools/instructions.d.ts.map +1 -0
  51. package/build/tools/instructions.js +143 -0
  52. package/build/tools/instructions.js.map +1 -0
  53. package/build/tools/mcp.d.ts +2 -6
  54. package/build/tools/mcp.d.ts.map +1 -1
  55. package/build/tools/mcp.js +36 -122
  56. package/build/tools/mcp.js.map +1 -1
  57. package/build/tools/platform.d.ts.map +1 -1
  58. package/build/tools/platform.js +13 -4
  59. package/build/tools/platform.js.map +1 -1
  60. package/build/tools/profile/consts.d.ts +8 -0
  61. package/build/tools/profile/consts.d.ts.map +1 -0
  62. package/build/tools/profile/consts.js +10 -0
  63. package/build/tools/profile/consts.js.map +1 -0
  64. package/build/tools/profile/listing/consts.local.d.ts +44 -0
  65. package/build/tools/profile/listing/consts.local.d.ts.map +1 -0
  66. package/build/tools/profile/listing/consts.local.js +612 -0
  67. package/build/tools/profile/listing/consts.local.js.map +1 -0
  68. package/build/tools/profile/listing/presentation.d.ts +12 -0
  69. package/build/tools/profile/listing/presentation.d.ts.map +1 -0
  70. package/build/tools/profile/listing/presentation.js +38 -0
  71. package/build/tools/profile/listing/presentation.js.map +1 -0
  72. package/build/tools/profile/listing/text.d.ts +13 -0
  73. package/build/tools/profile/listing/text.d.ts.map +1 -0
  74. package/build/tools/profile/listing/text.js +51 -0
  75. package/build/tools/profile/listing/text.js.map +1 -0
  76. package/build/tools/profile/listing/types.d.ts +18 -0
  77. package/build/tools/profile/listing/types.d.ts.map +1 -0
  78. package/build/tools/profile/listing/types.js +2 -0
  79. package/build/tools/profile/listing/types.js.map +1 -0
  80. package/build/tools/profile/listing.d.ts +18 -0
  81. package/build/tools/profile/listing.d.ts.map +1 -0
  82. package/build/tools/profile/listing.js +66 -0
  83. package/build/tools/profile/listing.js.map +1 -0
  84. package/build/tools/profile/presentation/platform/account.d.ts +4 -0
  85. package/build/tools/profile/presentation/platform/account.d.ts.map +1 -0
  86. package/build/tools/profile/presentation/platform/account.js +46 -0
  87. package/build/tools/profile/presentation/platform/account.js.map +1 -0
  88. package/build/tools/profile/presentation/platform/consts.d.ts +541 -0
  89. package/build/tools/profile/presentation/platform/consts.d.ts.map +1 -0
  90. package/build/tools/profile/presentation/platform/consts.js +335 -0
  91. package/build/tools/profile/presentation/platform/consts.js.map +1 -0
  92. package/build/tools/profile/presentation/platform/git.d.ts +4 -0
  93. package/build/tools/profile/presentation/platform/git.d.ts.map +1 -0
  94. package/build/tools/profile/presentation/platform/git.js +123 -0
  95. package/build/tools/profile/presentation/platform/git.js.map +1 -0
  96. package/build/tools/profile/presentation/platform/iam.d.ts +4 -0
  97. package/build/tools/profile/presentation/platform/iam.d.ts.map +1 -0
  98. package/build/tools/profile/presentation/platform/iam.js +202 -0
  99. package/build/tools/profile/presentation/platform/iam.js.map +1 -0
  100. package/build/tools/profile/presentation/platform/production.d.ts +4 -0
  101. package/build/tools/profile/presentation/platform/production.d.ts.map +1 -0
  102. package/build/tools/profile/presentation/platform/production.js +73 -0
  103. package/build/tools/profile/presentation/platform/production.js.map +1 -0
  104. package/build/tools/profile/presentation/platform/read.d.ts +4 -0
  105. package/build/tools/profile/presentation/platform/read.d.ts.map +1 -0
  106. package/build/tools/profile/presentation/platform/read.js +68 -0
  107. package/build/tools/profile/presentation/platform/read.js.map +1 -0
  108. package/build/tools/profile/presentation/platform/settings.d.ts +4 -0
  109. package/build/tools/profile/presentation/platform/settings.d.ts.map +1 -0
  110. package/build/tools/profile/presentation/platform/settings.js +48 -0
  111. package/build/tools/profile/presentation/platform/settings.js.map +1 -0
  112. package/build/tools/profile/presentation/platform/types.d.ts +174 -0
  113. package/build/tools/profile/presentation/platform/types.d.ts.map +1 -0
  114. package/build/tools/profile/presentation/platform/types.js +2 -0
  115. package/build/tools/profile/presentation/platform/types.js.map +1 -0
  116. package/build/tools/profile/presentation/platform/workspace.d.ts +4 -0
  117. package/build/tools/profile/presentation/platform/workspace.d.ts.map +1 -0
  118. package/build/tools/profile/presentation/platform/workspace.js +37 -0
  119. package/build/tools/profile/presentation/platform/workspace.js.map +1 -0
  120. package/build/tools/profile/presentation/platform.d.ts +11 -0
  121. package/build/tools/profile/presentation/platform.d.ts.map +1 -0
  122. package/build/tools/profile/presentation/platform.js +64 -0
  123. package/build/tools/profile/presentation/platform.js.map +1 -0
  124. package/build/tools/profile/presentation/work/consts.d.ts +22 -0
  125. package/build/tools/profile/presentation/work/consts.d.ts.map +1 -0
  126. package/build/tools/profile/presentation/work/consts.js +22 -0
  127. package/build/tools/profile/presentation/work/consts.js.map +1 -0
  128. package/build/tools/profile/presentation/work/presenters.d.ts +4 -0
  129. package/build/tools/profile/presentation/work/presenters.d.ts.map +1 -0
  130. package/build/tools/profile/presentation/work/presenters.js +502 -0
  131. package/build/tools/profile/presentation/work/presenters.js.map +1 -0
  132. package/build/tools/profile/presentation/work/schemas.d.ts +496 -0
  133. package/build/tools/profile/presentation/work/schemas.d.ts.map +1 -0
  134. package/build/tools/profile/presentation/work/schemas.js +358 -0
  135. package/build/tools/profile/presentation/work/schemas.js.map +1 -0
  136. package/build/tools/profile/presentation/work/shape.d.ts +4 -0
  137. package/build/tools/profile/presentation/work/shape.d.ts.map +1 -0
  138. package/build/tools/profile/presentation/work/shape.js +35 -0
  139. package/build/tools/profile/presentation/work/shape.js.map +1 -0
  140. package/build/tools/profile/presentation/work/types.d.ts +109 -0
  141. package/build/tools/profile/presentation/work/types.d.ts.map +1 -0
  142. package/build/tools/profile/presentation/work/types.js +2 -0
  143. package/build/tools/profile/presentation/work/types.js.map +1 -0
  144. package/build/tools/profile/presentation/work.d.ts +13 -0
  145. package/build/tools/profile/presentation/work.d.ts.map +1 -0
  146. package/build/tools/profile/presentation/work.js +66 -0
  147. package/build/tools/profile/presentation/work.js.map +1 -0
  148. package/build/tools/profile/types.d.ts +125 -0
  149. package/build/tools/profile/types.d.ts.map +1 -0
  150. package/build/tools/profile/types.js +2 -0
  151. package/build/tools/profile/types.js.map +1 -0
  152. package/build/tools/profile.d.ts +9 -0
  153. package/build/tools/profile.d.ts.map +1 -0
  154. package/build/tools/profile.js +114 -0
  155. package/build/tools/profile.js.map +1 -0
  156. package/build/tools/status/types.d.ts +7 -1
  157. package/build/tools/status/types.d.ts.map +1 -1
  158. package/build/tools/status.d.ts.map +1 -1
  159. package/build/tools/status.js +5 -1
  160. package/build/tools/status.js.map +1 -1
  161. package/build/tools/types.d.ts +12 -1
  162. package/build/tools/types.d.ts.map +1 -1
  163. package/build/types.d.ts +7 -1
  164. package/build/types.d.ts.map +1 -1
  165. package/package.json +25 -25
@@ -0,0 +1,612 @@
1
+ import { z } from 'zod';
2
+ import { DESTRUCTIVE, IDEMPOTENT_WRITE, READ_ONLY, WRITE } from '../../consts.js';
3
+ // ── The annotation shapes of the listing ─────────────────────────────────────────────────────────
4
+ //
5
+ // MCP semantics, applied per tool (the table below names one for EVERY tool a listing offers):
6
+ // - readOnlyHint — the tool changes nothing.
7
+ // - destructiveHint — it may overwrite, delete, replace or rewrite code or data: an update, a
8
+ // regeneration, a develop/modify/reinitialize, a write, a discard, a revert, a revocation, a
9
+ // removal, a detach, a stop that ends a running thing. False only where the tool is purely additive.
10
+ // - idempotentHint — calling it again with the same arguments has no further effect. A call that
11
+ // starts paid model work again, or adds another record, is never idempotent.
12
+ // - openWorldHint — its effect is visible outside the person's OwlMeans account: the live
13
+ // production site, a custom domain at its DNS provider, GitHub, a person given access by e-mail,
14
+ // an external repository read.
15
+ /** Changes nothing. */
16
+ const READ = READ_ONLY;
17
+ /** Changes nothing on the platform, and reads a system beyond it (GitHub). */
18
+ const READ_OPEN = Object.freeze({ ...READ_ONLY, openWorldHint: true });
19
+ /** Adds something; calling it again adds (or starts) it again. */
20
+ const ADDS = WRITE;
21
+ /** Adds something beyond the account; calling it again adds it again. */
22
+ const ADDS_OPEN = Object.freeze({ ...WRITE, openWorldHint: true });
23
+ /** Adds or sets something additively; calling it again changes nothing more. */
24
+ const ENSURES = IDEMPOTENT_WRITE;
25
+ /** Additive and idempotent, beyond the account. */
26
+ const ENSURES_OPEN = Object.freeze({ ...IDEMPOTENT_WRITE, openWorldHint: true });
27
+ /** Overwrites, deletes or replaces to a value; calling it again changes nothing more. */
28
+ const REPLACES = Object.freeze({ ...DESTRUCTIVE, idempotentHint: true });
29
+ /** Replaces something visible beyond the account; calling it again changes nothing more. */
30
+ const REPLACES_OPEN = Object.freeze({ ...DESTRUCTIVE, idempotentHint: true, openWorldHint: true });
31
+ /** Rewrites code or data; calling it again rewrites (and, where it is model work, spends) again. */
32
+ const REWRITES = DESTRUCTIVE;
33
+ /** Rewrites what is visible beyond the account; calling it again does it again. */
34
+ const REWRITES_OPEN = Object.freeze({ ...DESTRUCTIVE, openWorldHint: true });
35
+ /** How a conversion is paid — the base description's sentence without its inference-mode clause. */
36
+ const CONVERSION_PAID = 'A plan that includes a project conversion covers its AI work up to the conversion limit'
37
+ + ' (1,000,000 credits); beyond it the organization\'s credit limits are spent first, then topped-up credits,'
38
+ + ' and every stage has an estimate. A step that would use the plan\'s conversion or spend credits first'
39
+ + ' answers with what it costs and starts nothing: tell the user, and repeat the call with confirm: true only'
40
+ + ' after they agree.';
41
+ const PREVIEW_ONLY = ' The published production site is never touched.';
42
+ const PRODUCTION_ONLY = ' The preview is never touched.';
43
+ const APP_SCOPED = ['projectId', 'scope'];
44
+ /**
45
+ * The seven multi-action tools of the catalogue, one tool per action under a listing. Each variant
46
+ * takes exactly the fields its action reads in the base tool's `run` (`projectId` and, for the
47
+ * generated application's sign-in, `scope` — every action reads both).
48
+ */
49
+ export const LISTING_SPLITS = Object.freeze([
50
+ {
51
+ tool: 'preview_control',
52
+ argument: 'action',
53
+ variants: [
54
+ {
55
+ name: 'start_preview', value: 'start', title: 'Start the preview', fields: ['projectId'], annotations: ENSURES,
56
+ description: 'Start a project\'s PREVIEW — the live development copy its sources run in —, creating its'
57
+ + ' workload when it has none. Starting a preview that already runs changes nothing.' + PREVIEW_ONLY,
58
+ },
59
+ {
60
+ name: 'restart_preview', value: 'restart', title: 'Restart the preview', fields: ['projectId'], annotations: ADDS,
61
+ description: 'Restart a project\'s PREVIEW from its current sources — the repair for a preview that stopped'
62
+ + ' answering; its sources and data are kept. Calling it again restarts it again.' + PREVIEW_ONLY,
63
+ },
64
+ {
65
+ name: 'stop_preview', value: 'stop', title: 'Stop the preview', fields: ['projectId'], annotations: REPLACES,
66
+ description: 'Stop a project\'s PREVIEW: its address stops answering until start_preview starts it again;'
67
+ + ' its sources and data are kept.' + PREVIEW_ONLY,
68
+ },
69
+ {
70
+ name: 'rebuild_preview', value: 'rebuild', title: 'Rebuild the preview from scratch', fields: ['projectId'],
71
+ annotations: REWRITES,
72
+ description: 'Rebuild a project\'s PREVIEW from scratch — a clean dependency install and build, the repair for'
73
+ + ' a preview that will not build. It goes on after the answer, holding the project lock (project_status'
74
+ + ' shows it); calling it again starts another rebuild.' + PREVIEW_ONLY,
75
+ },
76
+ ],
77
+ },
78
+ {
79
+ tool: 'production_control',
80
+ argument: 'action',
81
+ variants: [
82
+ {
83
+ name: 'restart_production', value: 'restart', title: 'Restart the production site', fields: ['projectId'],
84
+ annotations: REWRITES_OPEN,
85
+ description: 'Redeploy the last published build of a project\'s PRODUCTION site, which real users reach —'
86
+ + ' a stopped site comes back and takes one of the plan\'s published sites again. Calling it again'
87
+ + ' redeploys it again.' + PRODUCTION_ONLY,
88
+ },
89
+ {
90
+ name: 'stop_production', value: 'stop', title: 'Stop the production site', fields: ['projectId'],
91
+ annotations: REPLACES_OPEN,
92
+ description: 'Take a project\'s PRODUCTION site offline for its users and give its published site back to the'
93
+ + ' plan — its data is kept, and restart_production brings it back. Ask the user first.' + PRODUCTION_ONLY,
94
+ },
95
+ ],
96
+ },
97
+ {
98
+ tool: 'custom_domain',
99
+ argument: 'action',
100
+ variants: [
101
+ {
102
+ name: 'attach_custom_domain', value: 'attach', title: 'Attach a custom domain', fields: ['projectId', 'domain'],
103
+ annotations: REPLACES_OPEN,
104
+ description: 'Attach a domain the user owns to a project\'s PRODUCTION site (a feature the plan must include)'
105
+ + ' — answered with the two DNS records they create at their DNS provider; verify_custom_domain checks'
106
+ + ' them once they are in place. A different domain attached before is detached and replaced by this one;'
107
+ + ' attaching the same one again changes nothing. A domain attached to another project is refused, and a'
108
+ + ' project with no production site yet is told to publish first.',
109
+ },
110
+ {
111
+ name: 'verify_custom_domain', value: 'verify', title: 'Check the custom domain\'s DNS records',
112
+ fields: ['projectId'], annotations: ENSURES_OPEN,
113
+ description: 'Ask the DNS provider again whether the records of a project\'s custom domain are in place, and'
114
+ + ' answer the domain\'s status with the records still to be created. Nothing changes but the recorded'
115
+ + ' status.',
116
+ },
117
+ {
118
+ name: 'detach_custom_domain', value: 'detach', title: 'Detach the custom domain', fields: ['projectId'],
119
+ annotations: REPLACES_OPEN,
120
+ description: 'Remove the custom domain from a project\'s PRODUCTION site: the domain stops serving it and the'
121
+ + ' generated address keeps serving. Attaching it again needs its DNS records checked again.',
122
+ },
123
+ ],
124
+ },
125
+ {
126
+ tool: 'manage_app_user',
127
+ argument: 'action',
128
+ variants: [
129
+ {
130
+ name: 'invite_app_user', value: 'invite', title: 'Invite a person to the generated app',
131
+ fields: [...APP_SCOPED, 'email', 'name', 'role'], annotations: ENSURES_OPEN,
132
+ description: 'Give a person access to a project\'s generated application by their e-mail, optionally with a'
133
+ + ' name and a role; they sign in with that e-mail. Find-or-create: inviting someone who is already a'
134
+ + ' user of it changes nothing.',
135
+ },
136
+ {
137
+ name: 'update_app_user', value: 'update', title: 'Change an app user',
138
+ fields: [...APP_SCOPED, 'profileId', 'name', 'role', 'disabled'], annotations: REPLACES,
139
+ description: 'Change an end user of a project\'s generated application (profileId — app_users lists them):'
140
+ + ' their name, their role, or whether their sign-in is blocked (disabled). What you leave out keeps its'
141
+ + ' value.',
142
+ },
143
+ {
144
+ name: 'remove_app_user', value: 'remove', title: 'Remove an app user',
145
+ fields: [...APP_SCOPED, 'profileId', 'confirm'], annotations: REPLACES,
146
+ description: 'Remove an end user (profileId) from a project\'s generated application — their account and'
147
+ + ' other applications stay. It needs the user\'s agreement: ask first, then call it with confirm: true.',
148
+ },
149
+ ],
150
+ },
151
+ {
152
+ tool: 'manage_app_grant',
153
+ argument: 'action',
154
+ variants: [
155
+ {
156
+ name: 'assign_app_grant', value: 'assign', title: 'Grant a permission in the generated app',
157
+ fields: [...APP_SCOPED, 'permission', 'profileId', 'group', 'entitySlug', 'resources', 'mode'],
158
+ annotations: ENSURES,
159
+ description: 'Grant one of the generated application\'s permissions (app_permissions lists them) to exactly'
160
+ + ' ONE subject — a user (profileId; entitySlug binds the grant to that organization when the permission'
161
+ + ' is organization-bound) or a group (group with its entitySlug). A per-record permission takes'
162
+ + ' resources (record ids) or covers every record; mode (blanket or resources) names which form when'
163
+ + ' both exist. Granting what the subject already holds changes nothing.',
164
+ },
165
+ {
166
+ name: 'revoke_app_grant', value: 'revoke', title: 'Revoke a permission in the generated app',
167
+ fields: [...APP_SCOPED, 'permission', 'profileId', 'group', 'entitySlug', 'resources', 'mode'],
168
+ annotations: REPLACES,
169
+ description: 'Take one of the generated application\'s permissions back from exactly ONE subject — a user'
170
+ + ' (profileId) or a group (group with its entitySlug). Revoking a whole permission RESTRICTS the'
171
+ + ' subject: it also loses what it inherits (a default, a group, a bundle) until a revoke with mode:'
172
+ + ' inherit takes back only its own grant or restriction, so it holds what it inherits again.',
173
+ },
174
+ ],
175
+ },
176
+ {
177
+ tool: 'manage_app_organization',
178
+ argument: 'action',
179
+ variants: [
180
+ {
181
+ name: 'rename_app_organization', value: 'rename', title: 'Rename an organization of the generated app',
182
+ fields: [...APP_SCOPED, 'entitySlug', 'title'], annotations: REPLACES,
183
+ description: 'Give an organization of a project\'s generated application (entitySlug — app_organizations'
184
+ + ' lists them) a new title; its slug stays.',
185
+ },
186
+ {
187
+ name: 'add_app_organization_member', value: 'add-member', title: 'Add a member to an organization',
188
+ fields: [...APP_SCOPED, 'entitySlug', 'email', 'name', 'owner'], annotations: ENSURES_OPEN,
189
+ description: 'Give a person a place in an organization of a project\'s generated application by their'
190
+ + ' e-mail (owner: true makes them one of its owners). Find-or-create: adding a member who is already'
191
+ + ' there changes nothing.',
192
+ },
193
+ {
194
+ name: 'update_app_organization_member', value: 'update-member', title: 'Change an organization member',
195
+ fields: [...APP_SCOPED, 'entitySlug', 'profileId', 'owner', 'groups'], annotations: REPLACES,
196
+ description: 'Change a member (profileId) of an organization of a project\'s generated application: their'
197
+ + ' owner flag, or their whole group list (groups replaces it). The last owner always stays one.',
198
+ },
199
+ {
200
+ name: 'remove_app_organization_member', value: 'remove-member', title: 'Remove an organization member',
201
+ fields: [...APP_SCOPED, 'entitySlug', 'profileId'], annotations: REPLACES,
202
+ description: 'Remove a member (profileId) from an organization of a project\'s generated application. The last'
203
+ + ' owner always stays one.',
204
+ },
205
+ ],
206
+ },
207
+ {
208
+ tool: 'manage_app_group',
209
+ argument: 'action',
210
+ variants: [
211
+ {
212
+ name: 'create_app_group', value: 'create', title: 'Create a group in the generated app',
213
+ fields: [...APP_SCOPED, 'entitySlug', 'group', 'title'], annotations: ENSURES,
214
+ description: 'Create a group in an organization of a project\'s generated application, by its key and an'
215
+ + ' optional title. Find-or-create: a group that exists already is answered as it is.',
216
+ },
217
+ {
218
+ name: 'update_app_group', value: 'update', title: 'Change a group of the generated app',
219
+ fields: [...APP_SCOPED, 'entitySlug', 'group', 'title', 'bundles'], annotations: REPLACES,
220
+ description: 'Change a group of an organization of a project\'s generated application: its title, or what it'
221
+ + ' grants (bundles — the WHOLE list, it replaces the group\'s). The platform\'s own staff group keeps its'
222
+ + ' bundles; its permissions are granted with assign_app_grant (group).',
223
+ },
224
+ {
225
+ name: 'delete_app_group', value: 'delete', title: 'Delete a group of the generated app',
226
+ fields: [...APP_SCOPED, 'entitySlug', 'group', 'confirm'], annotations: REPLACES,
227
+ description: 'Delete a group of an organization of a project\'s generated application — what it grants is'
228
+ + ' taken from every member. It needs the user\'s agreement: ask first, then call it with confirm: true.'
229
+ + ' The platform\'s own staff group cannot be deleted.',
230
+ },
231
+ {
232
+ name: 'add_app_group_members', value: 'add-members', title: 'Add members to a group',
233
+ fields: [...APP_SCOPED, 'entitySlug', 'group', 'profileIds'], annotations: ENSURES,
234
+ description: 'Add people (profileIds) to a group of an organization of a project\'s generated application; a'
235
+ + ' member already in it stays as they are.',
236
+ },
237
+ {
238
+ name: 'remove_app_group_members', value: 'remove-members', title: 'Remove members from a group',
239
+ fields: [...APP_SCOPED, 'entitySlug', 'group', 'profileIds'], annotations: REPLACES,
240
+ description: 'Remove people (profileIds) from a group of an organization of a project\'s generated'
241
+ + ' application; they lose what the group grants.',
242
+ },
243
+ ],
244
+ },
245
+ ]);
246
+ /**
247
+ * The listing's own title, description and annotations of every tool a listing may offer that is
248
+ * not split — the annotation of each one decided here, the description where the catalogue's does
249
+ * not say what a listing must: that the tool spends credits, that calling it again repeats its
250
+ * effect, nothing about a mode a listing never runs in.
251
+ */
252
+ export const LISTING_TOOLS = Object.freeze({
253
+ // ── Descriptions and statuses ──────────────────────────────────────────────────────────────────
254
+ describe_blueprints: {
255
+ annotations: READ,
256
+ description: 'Read the installed blueprint registry, its complete case list, supported app categories,'
257
+ + ' tenancy and planning resources. Call before choosing a project type. Read-only: it needs no project'
258
+ + ' and spends no credits.',
259
+ },
260
+ describe_platform: {
261
+ annotations: READ,
262
+ description: 'Everything the platform runs — building an application from a description, implementing user'
263
+ + ' stories, converting an application you already have — what every application it generates carries,'
264
+ + ' and which of it you can drive from here. Read it before deciding how to approach a request. Needs no'
265
+ + ' project and makes no network call.',
266
+ },
267
+ session_status: {
268
+ annotations: READ,
269
+ description: 'The mode, the attached project, what this connection has handled so far, and how the platform'
270
+ + ' sees this connection.',
271
+ },
272
+ project_status: { annotations: READ },
273
+ list_projects: { annotations: READ },
274
+ story_status: { annotations: READ },
275
+ list_stories: { annotations: READ },
276
+ search_stories: { annotations: READ },
277
+ story_batch_status: { annotations: READ },
278
+ pipeline_status: { annotations: READ },
279
+ check_convertible: { annotations: READ },
280
+ conversion_status: { annotations: READ },
281
+ describe_planning_kits: { annotations: READ },
282
+ project_settings: { annotations: READ },
283
+ project_configuration: { annotations: READ },
284
+ organization_branding: { annotations: READ },
285
+ list_access_tokens: { annotations: READ },
286
+ privacy_choices: { annotations: READ },
287
+ list_files: { annotations: READ },
288
+ read_file: { annotations: READ },
289
+ git_status: { annotations: READ },
290
+ git_history: { annotations: READ },
291
+ github_repositories: { annotations: READ_OPEN },
292
+ production_status: { annotations: READ },
293
+ production_auth: { annotations: READ },
294
+ app_users: { annotations: READ },
295
+ app_permissions: { annotations: READ },
296
+ app_grants: { annotations: READ },
297
+ app_organizations: { annotations: READ },
298
+ app_groups: { annotations: READ },
299
+ list_slots: { annotations: READ },
300
+ project_activity: { annotations: READ },
301
+ notifications: { annotations: READ },
302
+ file_changes: { annotations: READ },
303
+ local_status: { annotations: READ },
304
+ local_setup_guide: { annotations: READ },
305
+ // ── Projects ───────────────────────────────────────────────────────────────────────────────────
306
+ create_project: {
307
+ annotations: ADDS,
308
+ description: 'Describe the application in a sentence or two. The platform writes a specification, names it'
309
+ + ' and drafts a vision — model work that spends credits (the plan\'s project allowance first). Returns'
310
+ + ' the project status; read the draft and call confirm_project. Each call drafts another project, so'
311
+ + ' calling it again spends again.',
312
+ },
313
+ confirm_project: {
314
+ annotations: ENSURES,
315
+ description: 'Confirm the drafted project, optionally editing what the analysis produced. This is what starts'
316
+ + ' the build: the template lands, dependencies install, the whole application is drawn — model work that'
317
+ + ' spends credits, or the plan\'s project allowance where it covers it. Returns the project status while'
318
+ + ' the build continues on the platform. Only a drafted project is confirmed, so calling it again starts'
319
+ + ' no second build.',
320
+ },
321
+ attach_project: { annotations: ENSURES },
322
+ reinitialize_project: {
323
+ annotations: REWRITES,
324
+ description: 'Wipe the generated sources and lay the template down again, then draw the application anew —'
325
+ + ' model work that spends credits unless the plan\'s project allowance still covers it. The user stories'
326
+ + ' are KEPT and reset to planned; the configuration and git history survive. Calling it again wipes and'
327
+ + ' rebuilds again, and spends again.',
328
+ },
329
+ rename_project: {
330
+ annotations: REWRITES,
331
+ description: 'Give the product a new name. The platform renames the project record, restates the name in its'
332
+ + ' specification and vision, and its coding agent restates it through the app\'s code (titles, copy,'
333
+ + ' docs). The project\'s web address does not change. A new name is model work that spends credits like'
334
+ + ' an open-ended change; a new description alone spends none. Calling it again renames and spends again.'
335
+ + ' Returns project status.',
336
+ },
337
+ delete_project: {
338
+ annotations: REPLACES_OPEN,
339
+ description: 'Delete a project and everything it owns: its preview and its production site (the live site and'
340
+ + ' its custom domain go offline), its user stories and documents, its configuration and secrets. This'
341
+ + ' CANNOT be undone — ask the user first. The project is always named: the attached one is never deleted'
342
+ + ' by default.',
343
+ },
344
+ apply_planning_kit: { annotations: REPLACES },
345
+ // ── Settings, configuration and branding ───────────────────────────────────────────────────────
346
+ update_project_settings: { annotations: REPLACES },
347
+ set_platform_credit: { annotations: REPLACES },
348
+ update_project_configuration: { annotations: REPLACES },
349
+ recollect_configuration: {
350
+ annotations: ADDS,
351
+ description: 'Let the platform\'s own agent read the generated sources again for the environment variables'
352
+ + ' they use, and declare any the configuration does not list yet — after a change that added one. It is'
353
+ + ' a model call that spends credits; calling it again reads the sources again and spends again. Answers'
354
+ + ' the configuration as it then stands.',
355
+ },
356
+ update_organization_branding: { annotations: REPLACES },
357
+ backfill_project_branding: { annotations: ENSURES },
358
+ // ── The account ────────────────────────────────────────────────────────────────────────────────
359
+ revoke_access_token: { annotations: REPLACES },
360
+ withdraw_marketing_consent: { annotations: REPLACES },
361
+ pickup_intent: {
362
+ annotations: ADDS,
363
+ description: 'Collect the project idea a visitor typed on the OwlMeans public site, by the code of the address'
364
+ + ' it sent them to (/start?ref=… — the whole address may be given). A code works ONCE and only for two'
365
+ + ' minutes: calling it again with the same code is refused. The prompt is then the user\'s to build with'
366
+ + ' create_project once they confirm it.',
367
+ },
368
+ // ── Stories and the agent ──────────────────────────────────────────────────────────────────────
369
+ create_story: {
370
+ annotations: ADDS,
371
+ description: 'Add a story in your own words. The platform rewrites it in the form its pipeline needs and'
372
+ + ' decides which area of the application it belongs to — a short model call that spends credits. Each'
373
+ + ' call adds another story, so calling it again adds a second one.',
374
+ },
375
+ update_story: {
376
+ annotations: REWRITES,
377
+ description: 'Change what a story says. The platform rewrites the new wording in the form its pipeline needs'
378
+ + ' — a short model call that spends credits; calling it again rewrites it and spends again. Its status'
379
+ + ' is not changed — develop_story does that.',
380
+ },
381
+ delete_story: { annotations: REPLACES },
382
+ develop_story: {
383
+ annotations: REWRITES,
384
+ description: 'Ask the platform to design and build one story: its screens, its data, its endpoints, its'
385
+ + ' navigation. Stories may extend an existing collection/detail host; editing, deletion and owned children'
386
+ + ' are contextual controls. This takes many minutes and spends credits (the plan\'s story allowance'
387
+ + ' first). Returns the story status. A story already in progress is refused; calling it again once its'
388
+ + ' run has ended starts another development and spends again.',
389
+ },
390
+ reset_story: { annotations: REPLACES },
391
+ complete_story: { annotations: REPLACES },
392
+ start_story_batch: {
393
+ annotations: REWRITES,
394
+ description: 'Hand several planned stories to the platform at once — the web application\'s Run all. It first'
395
+ + ' orders them for building (a story comes after the records, screens and navigation it builds on), then'
396
+ + ' implements them one at a time, each exactly as a single development would and each spending credits'
397
+ + ' (the plan\'s story allowance first); a story that fails does not stop the rest. Leave storyIds out for'
398
+ + ' every planned story. Takes many minutes per story and returns the batch — follow it with'
399
+ + ' story_batch_status. A second batch is refused while one runs; calling it again after it has ended'
400
+ + ' starts another batch. For one story, use develop_story.',
401
+ },
402
+ cancel_story_batch: { annotations: REPLACES },
403
+ modify_project: {
404
+ annotations: REWRITES,
405
+ description: 'Describe a change in words and let the platform\'s own coding agent make it — model work that'
406
+ + ' spends credits. For anything that is not a user story: a fix, a styling change. To rename the product,'
407
+ + ' use rename_project. Returns project status. Each call is a new change: calling it again makes it again'
408
+ + ' and spends again.',
409
+ },
410
+ steer_agent: {
411
+ annotations: ADDS,
412
+ description: 'Add a message to the open-ended change the platform\'s agent is making right now (modify_project,'
413
+ + ' rename_project) — a correction, a detail, a priority. It is checked like any prompt, read before the'
414
+ + ' agent\'s next model call, and the agent goes on from there; it starts no paid work of its own. Only a'
415
+ + ' running open-ended change takes messages; to ask for a new change, use modify_project. Each call adds'
416
+ + ' another message, so calling it again sends it twice.',
417
+ },
418
+ stop_agent: { annotations: REPLACES },
419
+ resume_pipeline: {
420
+ annotations: REWRITES,
421
+ description: 'Pick a crashed or interrupted run up where it stopped, rather than starting over — after fixing'
422
+ + ' whatever it failed on. Its model work is free under the plan allowance it started on, otherwise it'
423
+ + ' spends credits. Calling it again re-enters the run again, so call it once per stop.',
424
+ },
425
+ next_question: {
426
+ annotations: ADDS,
427
+ description: 'The platform sometimes needs a decision only the person you are working for can make. Returns'
428
+ + ' one question to put to them, or says there is none; calling it again hands over the next one (pass'
429
+ + ' questionId to read one again). Domain status responses also include parked questions directly.',
430
+ },
431
+ answer_question: {
432
+ annotations: ADDS,
433
+ description: 'Send the person\'s answer to a question the platform asked. If it is not one the question'
434
+ + ' allows, this says so and the question stays open. Answer with declined: true when nobody is available'
435
+ + ' to decide — the platform then assumes and records an assumption. An answer that resumes a parked run'
436
+ + ' continues its model work, which spends credits unless the plan allowance it started on covers it. An'
437
+ + ' answered question is closed: calling it again is refused.',
438
+ },
439
+ // ── Conversions ────────────────────────────────────────────────────────────────────────────────
440
+ convert_project: {
441
+ annotations: REWRITES_OPEN,
442
+ description: 'Bring an existing application onto the platform: it reads the code (a GitHub repository given'
443
+ + ' as repoUrl, or the project named), restores the specification and the user stories nobody wrote down,'
444
+ + ' and rebuilds it on the platform\'s stack. The original is kept beside it. Returns conversion status and'
445
+ + ` stops at your decision after each stage. ${CONVERSION_PAID} Without a project named, each call files`
446
+ + ' another conversion — name the project when calling it again.',
447
+ },
448
+ proceed_conversion: {
449
+ annotations: REWRITES,
450
+ description: 'A conversion stops after each stage and waits for a decision: analyze what was read, extract the'
451
+ + ' user stories, implement them, leave it as it stands, retry a stage that failed, or cancel. With the'
452
+ + ' decision that starts the extraction it also takes the user\'s edits to the name, description,'
453
+ + ' specification, vision and design system the analysis drafted — refused with any other decision.'
454
+ + ' Returns the conversion status. A stage the conversion limit still covers runs at once.'
455
+ + ` ${CONVERSION_PAID} A second call while that stage runs is refused; once the conversion waits again,`
456
+ + ' calling it again decides the next stage.',
457
+ },
458
+ purge_origin: {
459
+ annotations: REPLACES,
460
+ description: 'Delete the original sources a conversion kept beside the converted project, and rewrite the'
461
+ + ' conversion documents so they stop quoting them — model work billed as the conversion: free under the'
462
+ + ' plan\'s conversion limit, otherwise it spends credits. This CANNOT be undone — ask the user before'
463
+ + ' calling it. Calling it again once they are gone changes nothing.',
464
+ },
465
+ // ── Files, git and GitHub ──────────────────────────────────────────────────────────────────────
466
+ write_file: { annotations: REPLACES },
467
+ delete_file: { annotations: REPLACES },
468
+ git_commit: {
469
+ annotations: ADDS,
470
+ description: 'Commit every uncommitted change of a project whose sources live in its own slot, with a message'
471
+ + ' — what the web Git dialog\'s commit does. Refused while the platform\'s agent is working on the'
472
+ + ' project. Calling it again commits whatever changed since.',
473
+ },
474
+ git_discard: { annotations: REPLACES },
475
+ git_revert: {
476
+ annotations: REWRITES,
477
+ description: 'Bring back the tree of one earlier commit of a project whose sources live in its own slot, as a'
478
+ + ' NEW commit — history is never rewritten, so the later commits stay and can be reverted to in turn.'
479
+ + ' Uncommitted changes are committed first; the preview is rebuilt and the database migrated to the older'
480
+ + ' code, which may not match data written since. Ask the user first. Each call adds another commit, so'
481
+ + ' calling it again reverts again.',
482
+ },
483
+ connect_github: {
484
+ annotations: ADDS_OPEN,
485
+ description: 'Begin connecting a project whose sources live in its own slot to the user\'s GitHub account:'
486
+ + ' answers an address the USER opens in their browser to authorize it. The connection is finished by the'
487
+ + ' OwlMeans web application when GitHub returns there — never by a tool. Then publish_to_github, or'
488
+ + ' github_repositories and link_github_origin for an import. Calling it again begins another'
489
+ + ' authorization with a new address.',
490
+ },
491
+ publish_to_github: {
492
+ annotations: ADDS_OPEN,
493
+ description: 'Publish a project whose sources live in its own slot to GitHub: a NEW repository (repoName,'
494
+ + ' private unless private is false) or one that exists (owner and repo). The project\'s commits are pushed'
495
+ + ' there and github_sync works from then on. Never onto the repository a converted project came from'
496
+ + ' while its original sources are still kept. Calling it again publishes again.',
497
+ },
498
+ github_sync: {
499
+ annotations: REWRITES_OPEN,
500
+ description: 'For a project published to GitHub (publish_to_github): push its commits there, or pull GitHub\'s'
501
+ + ' into it — a pulled tree is checked before the preview is rebuilt from it, and a conflict aborts the'
502
+ + ' merge leaving nothing changed. Never a force push. Refused while the platform\'s agent is working on'
503
+ + ' the project. Calling it again pushes or pulls whatever changed since.',
504
+ },
505
+ disconnect_github: { annotations: REPLACES_OPEN },
506
+ link_github_origin: { annotations: REPLACES_OPEN },
507
+ // ── Production ─────────────────────────────────────────────────────────────────────────────────
508
+ publish_production: {
509
+ annotations: REWRITES_OPEN,
510
+ description: 'Build the current sources of a project whose sources live in its own slot and deploy them as its'
511
+ + ' PRODUCTION site, which real users reach — replacing whatever was published before. It holds one of the'
512
+ + ' plan\'s published sites (a republish holds the one it has). The build goes on after the answer;'
513
+ + ' production_status shows when it is live. Ask the user first. Each call builds and deploys again,'
514
+ + ' replacing the live site once more.',
515
+ },
516
+ set_production_redirects: { annotations: REPLACES_OPEN },
517
+ // ── The generated application's sign-in ────────────────────────────────────────────────────────
518
+ set_app_permission_default: { annotations: REPLACES },
519
+ // ── This machine (the local plugin) ────────────────────────────────────────────────────────────
520
+ run_local: {
521
+ annotations: ADDS,
522
+ description: 'Build the generated project and start it on this machine: the API on 3000, the app on 5173. The'
523
+ + ' build takes a while — this returns once it has started, and local_status says when it is up. Calling it'
524
+ + ' again builds and starts it again in place of the copy already running.',
525
+ },
526
+ stop_local: { annotations: REPLACES },
527
+ set_local_service: { annotations: REPLACES },
528
+ });
529
+ /** The `session_status` structured result under a listing: how the platform sees this connection. */
530
+ export const SESSION_STATUS_OUTPUT = {
531
+ client: z.object({
532
+ kind: z.string(),
533
+ version: z.string().optional(),
534
+ via: z.string(),
535
+ inference: z.boolean(),
536
+ }).nullable(),
537
+ };
538
+ /** Tools whose text is the user's own content (a file), which a listing's rewrite never touches. */
539
+ export const LISTING_RAW_TEXT = new Set(['read_file']);
540
+ /**
541
+ * The listing's wording rules for every text it answers or notifies. OpenAI's plugin guidelines
542
+ * forbid selling credits and linking to checkout or transaction pages, so a refusal that would send
543
+ * the person to top up — with a link — says instead that credits are managed in the web application.
544
+ */
545
+ export const LISTING_TEXT_RULES = Object.freeze([
546
+ {
547
+ // `ConnectOutOfCredits`, thrown or stored.
548
+ pattern: /Ask the user to top up here: \S+ — then retry\./g,
549
+ replace: 'Credits are managed in the OwlMeans web application, not through this connection: tell the user,'
550
+ + ' and retry only after they say the account can cover it.',
551
+ },
552
+ {
553
+ // A production body's bare 402.
554
+ pattern: /Ask the user to top up in Billing in the OwlMeans web application, then call this tool again\./g,
555
+ replace: 'Credits are managed in the OwlMeans web application, not through this connection: tell the user,'
556
+ + ' and call this tool again only after they say the account can cover it.',
557
+ },
558
+ {
559
+ // `ConnectConsentRequired` with its address.
560
+ pattern: /Ask the user to open https?:\/\/\S+ and confirm there in the browser\./g,
561
+ replace: 'Ask the user to open Billing in the OwlMeans web application and confirm there in the browser.',
562
+ },
563
+ {
564
+ // An organization notice phrased from the feed.
565
+ pattern: /the user tops up in the web application's Billing/g,
566
+ replace: 'credits are managed in the OwlMeans web application',
567
+ },
568
+ {
569
+ // `describe_platform`'s closing line, which a listing that publishes and attaches domains contradicts.
570
+ pattern: /Publishing to production, custom domains and billing are done by the user in the web application, and are deliberately not offered through a connector\./g,
571
+ replace: 'Credits, billing and the plan are managed by the user in the OwlMeans web application and are not'
572
+ + ' offered here.',
573
+ },
574
+ {
575
+ // A run waiting for a model task is performed by another connection: a listing reads the status.
576
+ pattern: /(?<![A-Za-z0-9_])next_task(?![A-Za-z0-9_])/g,
577
+ replace: 'project_status',
578
+ },
579
+ ]);
580
+ /** An address a listing never prints: a top-up or the billing screen of the web application. */
581
+ export const LISTING_BILLING_ADDRESS = /[?&]top-up=|\/account\/billing/;
582
+ /** What a billing address is said as instead. */
583
+ export const LISTING_BILLING_PLACE = 'the OwlMeans web application';
584
+ /** The listing's rules for its server instructions alone (the base text, said for a listing). */
585
+ export const LISTING_INSTRUCTION_RULES = Object.freeze([
586
+ {
587
+ pattern: /which of it this session can drive/g,
588
+ replace: 'which of it you can drive from here',
589
+ },
590
+ {
591
+ pattern: /MODEL TASKS: this session runs in the cloud mode: the platform performs every model call itself — a conversion's included — so there is no task for you to collect\./g,
592
+ replace: 'MODEL CALLS: the platform performs every model call itself, a conversion\'s included — there is no'
593
+ + ' model task for you to run.',
594
+ },
595
+ ]);
596
+ /** What every listing's instructions open with — what OwlMeans does, what it costs, what it asks. */
597
+ export const LISTING_PREFACE = [
598
+ 'OwlMeans builds full-stack web applications from a description: it writes the specification, generates the'
599
+ + ' code, and implements user stories on request.',
600
+ 'Credits: drafting, building, developing, changing and converting an application is model work the platform'
601
+ + ' performs and bills to the organization in credits (a plan\'s allowance is used first). Every tool that'
602
+ + ' spends them says so in its description; reading statuses, files and settings spends none.',
603
+ 'Confirmation: a tool whose effect cannot be undone refuses without confirm: true. Ask the user, and only after'
604
+ + ' they agree call it again with confirm: true — never on your own.',
605
+ 'Credits, billing and the plan are managed by the user in the OwlMeans web application, never through these'
606
+ + ' tools.',
607
+ ].join('\n\n');
608
+ /** What the local plugin's instructions add: the project is written into the client's workspace. */
609
+ export const LOCAL_PLUGIN_PREFACE = 'Workspace: the platform generates the application on its own models and'
610
+ + ' writes the project\'s files into the directory this server runs in — the client\'s workspace. Do not edit'
611
+ + ' those files while a platform run is active (project_status shows the agent busy).';
612
+ //# sourceMappingURL=consts.local.js.map