@supportpages.io/wtfm 0.0.0-stage → 0.3.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 (275) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +23 -0
  3. package/README.md +392 -2
  4. package/dist/actions.d.ts +98 -0
  5. package/dist/actions.js +86 -0
  6. package/dist/actions.js.map +1 -0
  7. package/dist/agent-settings.d.ts +22 -0
  8. package/dist/agent-settings.js +35 -0
  9. package/dist/agent-settings.js.map +1 -0
  10. package/dist/api.d.ts +14 -0
  11. package/dist/api.js +159 -0
  12. package/dist/api.js.map +1 -0
  13. package/dist/article-link.d.ts +16 -0
  14. package/dist/article-link.js +25 -0
  15. package/dist/article-link.js.map +1 -0
  16. package/dist/artifacts.d.ts +45 -0
  17. package/dist/artifacts.js +144 -0
  18. package/dist/artifacts.js.map +1 -0
  19. package/dist/brand.d.ts +4 -0
  20. package/dist/brand.js +9 -0
  21. package/dist/brand.js.map +1 -0
  22. package/dist/bridge.d.ts +2964 -0
  23. package/dist/bridge.js +1036 -0
  24. package/dist/bridge.js.map +1 -0
  25. package/dist/capacity.d.ts +5 -0
  26. package/dist/capacity.js +11 -0
  27. package/dist/capacity.js.map +1 -0
  28. package/dist/credentials.d.ts +13 -0
  29. package/dist/credentials.js +88 -0
  30. package/dist/credentials.js.map +1 -0
  31. package/dist/development-tls.d.ts +8 -0
  32. package/dist/development-tls.js +38 -0
  33. package/dist/development-tls.js.map +1 -0
  34. package/dist/errors.d.ts +15 -0
  35. package/dist/errors.js +18 -0
  36. package/dist/errors.js.map +1 -0
  37. package/dist/export.d.ts +11 -0
  38. package/dist/export.js +91 -0
  39. package/dist/export.js.map +1 -0
  40. package/dist/hosted-operations.d.ts +108 -0
  41. package/dist/hosted-operations.js +120 -0
  42. package/dist/hosted-operations.js.map +1 -0
  43. package/dist/hosting-benefits.d.ts +66 -0
  44. package/dist/hosting-benefits.js +67 -0
  45. package/dist/hosting-benefits.js.map +1 -0
  46. package/dist/index.d.ts +2 -0
  47. package/dist/index.js +49 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/local-inventory.d.ts +22 -0
  50. package/dist/local-inventory.js +59 -0
  51. package/dist/local-inventory.js.map +1 -0
  52. package/dist/local-setup.d.ts +208 -0
  53. package/dist/local-setup.js +140 -0
  54. package/dist/local-setup.js.map +1 -0
  55. package/dist/pairing.d.ts +71 -0
  56. package/dist/pairing.js +235 -0
  57. package/dist/pairing.js.map +1 -0
  58. package/dist/preferences.d.ts +18 -0
  59. package/dist/preferences.js +44 -0
  60. package/dist/preferences.js.map +1 -0
  61. package/dist/progress.d.ts +205 -0
  62. package/dist/progress.js +224 -0
  63. package/dist/progress.js.map +1 -0
  64. package/dist/reminders.d.ts +31 -0
  65. package/dist/reminders.js +73 -0
  66. package/dist/reminders.js.map +1 -0
  67. package/dist/replace-connection.d.ts +6 -0
  68. package/dist/replace-connection.js +77 -0
  69. package/dist/replace-connection.js.map +1 -0
  70. package/dist/repository-actions.d.ts +18 -0
  71. package/dist/repository-actions.js +9 -0
  72. package/dist/repository-actions.js.map +1 -0
  73. package/dist/repository-benefits.d.ts +96 -0
  74. package/dist/repository-benefits.js +64 -0
  75. package/dist/repository-benefits.js.map +1 -0
  76. package/dist/run-update.d.ts +17 -0
  77. package/dist/run-update.js +27 -0
  78. package/dist/run-update.js.map +1 -0
  79. package/dist/runs.d.ts +541 -0
  80. package/dist/runs.js +146 -0
  81. package/dist/runs.js.map +1 -0
  82. package/dist/runtime.d.ts +12 -0
  83. package/dist/runtime.js +58 -0
  84. package/dist/runtime.js.map +1 -0
  85. package/dist/schema.d.ts +277 -0
  86. package/dist/schema.js +66 -0
  87. package/dist/schema.js.map +1 -0
  88. package/dist/server.d.ts +4 -0
  89. package/dist/server.js +298 -0
  90. package/dist/server.js.map +1 -0
  91. package/dist/session.d.ts +1714 -0
  92. package/dist/session.js +619 -0
  93. package/dist/session.js.map +1 -0
  94. package/dist/settings.d.ts +9 -0
  95. package/dist/settings.js +21 -0
  96. package/dist/settings.js.map +1 -0
  97. package/dist/sync.d.ts +495 -0
  98. package/dist/sync.js +191 -0
  99. package/dist/sync.js.map +1 -0
  100. package/dist/telemetry-scrub.d.ts +13 -0
  101. package/dist/telemetry-scrub.js +51 -0
  102. package/dist/telemetry-scrub.js.map +1 -0
  103. package/dist/telemetry.d.ts +73 -0
  104. package/dist/telemetry.js +173 -0
  105. package/dist/telemetry.js.map +1 -0
  106. package/dist/walkthroughs.d.ts +224 -0
  107. package/dist/walkthroughs.js +109 -0
  108. package/dist/walkthroughs.js.map +1 -0
  109. package/dist/workspace.d.ts +14 -0
  110. package/dist/workspace.js +127 -0
  111. package/dist/workspace.js.map +1 -0
  112. package/dist/writer-agent.d.ts +21 -0
  113. package/dist/writer-agent.js +27 -0
  114. package/dist/writer-agent.js.map +1 -0
  115. package/dist/writer-entry.d.ts +171 -0
  116. package/dist/writer-entry.js +233 -0
  117. package/dist/writer-entry.js.map +1 -0
  118. package/dist/writing-style.d.ts +7 -0
  119. package/dist/writing-style.js +52 -0
  120. package/dist/writing-style.js.map +1 -0
  121. package/engine/SYNC.json +4 -0
  122. package/engine/VERSION +1 -0
  123. package/engine/detect-project/README.md +141 -0
  124. package/engine/detect-project/SKILL.md +1421 -0
  125. package/engine/detect-project/assets/desktop/desktop-frame.css +428 -0
  126. package/engine/detect-project/assets/game/game-frame.css +132 -0
  127. package/engine/detect-project/assets/macosui/LICENSE-puppertino.txt +21 -0
  128. package/engine/detect-project/assets/macosui/VERSIONS.txt +1 -0
  129. package/engine/detect-project/assets/macosui/fonts.css +15 -0
  130. package/engine/detect-project/assets/macosui/macos-frame.css +481 -0
  131. package/engine/detect-project/assets/macosui/puppertino.css +2153 -0
  132. package/engine/detect-project/assets/mobileui/LICENSE-fonts.txt +13 -0
  133. package/engine/detect-project/assets/mobileui/LICENSE-framework7.txt +52 -0
  134. package/engine/detect-project/assets/mobileui/VERSIONS.txt +6 -0
  135. package/engine/detect-project/assets/mobileui/device-frame.css +316 -0
  136. package/engine/detect-project/assets/mobileui/f7-color-theme.mjs +1345 -0
  137. package/engine/detect-project/assets/mobileui/f7-icons-names.json +1254 -0
  138. package/engine/detect-project/assets/mobileui/fonts.css +16 -0
  139. package/engine/detect-project/assets/mobileui/framework7-components.css +39 -0
  140. package/engine/detect-project/assets/mobileui/framework7-core.css +5245 -0
  141. package/engine/detect-project/assets/mobileui/icons.css +31 -0
  142. package/engine/detect-project/assets/mobileui/md3-defaults.css +89 -0
  143. package/engine/detect-project/assets/mobileui/platforms.json +46 -0
  144. package/engine/detect-project/assets/tailwind-fallback.css +1729 -0
  145. package/engine/detect-project/assets/webtui/LICENSE-webtui.txt +28 -0
  146. package/engine/detect-project/assets/webtui/VERSIONS.txt +7 -0
  147. package/engine/detect-project/assets/webtui/terminal-frame.css +195 -0
  148. package/engine/detect-project/assets/webtui/theme-catppuccin.css +1 -0
  149. package/engine/detect-project/assets/webtui/theme-everforest.css +1 -0
  150. package/engine/detect-project/assets/webtui/theme-gruvbox.css +1 -0
  151. package/engine/detect-project/assets/webtui/theme-nord.css +1 -0
  152. package/engine/detect-project/assets/webtui/theme-vitesse.css +1 -0
  153. package/engine/detect-project/assets/webtui/themes.json +37 -0
  154. package/engine/detect-project/assets/webtui/webtui-core.css +1 -0
  155. package/engine/detect-project/assets/win32ui/7css.css +2 -0
  156. package/engine/detect-project/assets/win32ui/LICENSE-7css.txt +21 -0
  157. package/engine/detect-project/assets/win32ui/VERSIONS.txt +1 -0
  158. package/engine/detect-project/assets/win32ui/win32-frame.css +278 -0
  159. package/engine/detect-project/package-lock.json +12 -0
  160. package/engine/detect-project/package.json +10 -0
  161. package/engine/detect-project/scripts/apply_runtime_profiles.js +313 -0
  162. package/engine/detect-project/scripts/check_css_health.js +412 -0
  163. package/engine/detect-project/scripts/check_project_map.js +150 -0
  164. package/engine/detect-project/scripts/check_runtime_coverage.js +311 -0
  165. package/engine/detect-project/scripts/check_runtime_recipe_quality.js +184 -0
  166. package/engine/detect-project/scripts/classify_app_type.sh +246 -0
  167. package/engine/detect-project/scripts/classify_surface.sh +95 -0
  168. package/engine/detect-project/scripts/classify_workspace.js +39 -0
  169. package/engine/detect-project/scripts/compile_css.sh +447 -0
  170. package/engine/detect-project/scripts/detect_static.js +645 -0
  171. package/engine/detect-project/scripts/detect_structure.js +187 -0
  172. package/engine/detect-project/scripts/include_census.js +451 -0
  173. package/engine/detect-project/scripts/json_get.js +142 -0
  174. package/engine/detect-project/scripts/merge_json.js +52 -0
  175. package/engine/detect-project/scripts/recommend_model_tier.js +252 -0
  176. package/engine/detect-project/scripts/resolve_route_chains.js +135 -0
  177. package/engine/detect-project/scripts/run_css_build.sh +40 -0
  178. package/engine/detect-project/scripts/sanitize_css.js +83 -0
  179. package/engine/detect-project/scripts/test_classify_surface.js +108 -0
  180. package/engine/detect-project/scripts/test_node_helpers.js +142 -0
  181. package/engine/detect-project/scripts/test_recommend_model_tier.js +119 -0
  182. package/engine/detect-project/scripts/test_resolve_route_chains.js +182 -0
  183. package/engine/detect-project/scripts/test_runtime_coverage.js +323 -0
  184. package/engine/detect-project/scripts/test_runtime_recipe_quality.js +187 -0
  185. package/engine/detect-project/scripts/theme_overrides.js +169 -0
  186. package/engine/detect-project/scripts/write_branding.js +129 -0
  187. package/engine/generate-illustrated-article/SKILL.md +461 -0
  188. package/engine/generate-illustrated-article/contracts/desktop.md +90 -0
  189. package/engine/generate-illustrated-article/contracts/game.md +38 -0
  190. package/engine/generate-illustrated-article/contracts/label-evidence.md +38 -0
  191. package/engine/generate-illustrated-article/contracts/macos.md +79 -0
  192. package/engine/generate-illustrated-article/contracts/mobile.md +40 -0
  193. package/engine/generate-illustrated-article/contracts/terminal.md +29 -0
  194. package/engine/generate-illustrated-article/contracts/win32.md +43 -0
  195. package/engine/generate-illustrated-article/package-lock.json +366 -0
  196. package/engine/generate-illustrated-article/package.json +15 -0
  197. package/engine/generate-illustrated-article/scripts/article_blocks.js +34 -0
  198. package/engine/generate-illustrated-article/scripts/check_article_json.js +105 -0
  199. package/engine/generate-illustrated-article/scripts/emit_walkthrough_signals.js +100 -0
  200. package/engine/generate-illustrated-article/scripts/extract_images.js +187 -0
  201. package/engine/generate-illustrated-article/scripts/generate_content_images.js +376 -0
  202. package/engine/generate-illustrated-article/scripts/include_census.js +451 -0
  203. package/engine/generate-illustrated-article/scripts/inject_assets.js +1691 -0
  204. package/engine/generate-illustrated-article/scripts/jit_mockup_css.js +191 -0
  205. package/engine/generate-illustrated-article/scripts/label_evidence.js +87 -0
  206. package/engine/generate-illustrated-article/scripts/lint_article_copy.js +252 -0
  207. package/engine/generate-illustrated-article/scripts/lint_mockup_fidelity.js +2403 -0
  208. package/engine/generate-illustrated-article/scripts/polish_tickets.js +1148 -0
  209. package/engine/generate-illustrated-article/scripts/related_repos.sh +52 -0
  210. package/engine/generate-illustrated-article/scripts/render_all.js +177 -0
  211. package/engine/generate-illustrated-article/scripts/render_mockup.js +665 -0
  212. package/engine/generate-illustrated-article/scripts/render_ready.js +164 -0
  213. package/engine/generate-illustrated-article/scripts/resolve_workspace.sh +86 -0
  214. package/engine/generate-illustrated-article/scripts/runtime_region_geometry.js +55 -0
  215. package/engine/generate-illustrated-article/scripts/source_paths.js +49 -0
  216. package/engine/generate-illustrated-article/scripts/test_control_visibility.js +30 -0
  217. package/engine/generate-illustrated-article/scripts/test_emit_walkthrough_signals.js +157 -0
  218. package/engine/generate-illustrated-article/scripts/test_generate_content_images.js +168 -0
  219. package/engine/generate-illustrated-article/scripts/test_include_census.js +126 -0
  220. package/engine/generate-illustrated-article/scripts/test_label_evidence.js +49 -0
  221. package/engine/generate-illustrated-article/scripts/test_lint_article_copy.js +138 -0
  222. package/engine/generate-illustrated-article/scripts/test_lint_mockup_fidelity.js +653 -0
  223. package/engine/generate-illustrated-article/scripts/test_node_ports.js +152 -0
  224. package/engine/generate-illustrated-article/scripts/test_polish_tickets.js +481 -0
  225. package/engine/generate-illustrated-article/scripts/test_related_repos.js +64 -0
  226. package/engine/generate-illustrated-article/scripts/test_render_ready.js +85 -0
  227. package/engine/generate-illustrated-article/scripts/test_source_paths.js +68 -0
  228. package/engine/generate-illustrated-article/scripts/trace_hook.js +79 -0
  229. package/engine/generate-illustrated-article/scripts/trace_hook.sh +4 -0
  230. package/engine/generate-illustrated-article/scripts/validate_html.js +114 -0
  231. package/engine/generate-illustrated-article/scripts/watermark.js +69 -0
  232. package/install.sh +14 -0
  233. package/package.json +57 -4
  234. package/scripts/auth.mjs +33 -0
  235. package/scripts/auto-update.mjs +7 -0
  236. package/scripts/build-plugin.mjs +58 -0
  237. package/scripts/build-release.mjs +94 -0
  238. package/scripts/check-release.mjs +40 -0
  239. package/scripts/check-runtime.mjs +10 -0
  240. package/scripts/cli.mjs +8 -0
  241. package/scripts/install.mjs +64 -0
  242. package/scripts/lib/agent-runner.mjs +181 -0
  243. package/scripts/lib/agent-settings.mjs +215 -0
  244. package/scripts/lib/article-skills.mjs +82 -0
  245. package/scripts/lib/auto-update.mjs +50 -0
  246. package/scripts/lib/brand.mjs +9 -0
  247. package/scripts/lib/browser.mjs +12 -0
  248. package/scripts/lib/claude-connection.mjs +33 -0
  249. package/scripts/lib/claude-permissions.mjs +47 -0
  250. package/scripts/lib/claude-plugin.mjs +15 -0
  251. package/scripts/lib/claude-writer.mjs +10 -0
  252. package/scripts/lib/cli-main.mjs +85 -0
  253. package/scripts/lib/cli.mjs +888 -0
  254. package/scripts/lib/codex-config.mjs +51 -0
  255. package/scripts/lib/codex-integration.mjs +61 -0
  256. package/scripts/lib/codex-skill.mjs +34 -0
  257. package/scripts/lib/harness-models.mjs +109 -0
  258. package/scripts/lib/install.mjs +269 -0
  259. package/scripts/lib/managed-writer.mjs +38 -0
  260. package/scripts/lib/planning.mjs +263 -0
  261. package/scripts/lib/prepare-update.mjs +85 -0
  262. package/scripts/lib/refresh-writers.mjs +12 -0
  263. package/scripts/lib/remove.mjs +167 -0
  264. package/scripts/lib/renderer.mjs +34 -0
  265. package/scripts/lib/terminal.mjs +252 -0
  266. package/scripts/lib/uninit.mjs +72 -0
  267. package/scripts/lib/update.mjs +55 -0
  268. package/scripts/lib/writer-recovery.mjs +35 -0
  269. package/scripts/lib/yolo.mjs +362 -0
  270. package/scripts/plugin-session.mjs +65 -0
  271. package/scripts/prepare-update.mjs +12 -0
  272. package/scripts/publish-release.mjs +92 -0
  273. package/scripts/skills/supportpages/SKILL.md +120 -0
  274. package/scripts/smoke-release.mjs +101 -0
  275. package/server.json +27 -0
@@ -0,0 +1,1714 @@
1
+ import { type WriterAction } from './actions.js';
2
+ import { Workspace } from './workspace.js';
3
+ import { Bridge } from './bridge.js';
4
+ import { type Account } from './credentials.js';
5
+ import { type Approval, type PairingRuntime } from './pairing.js';
6
+ import { publicError } from './errors.js';
7
+ /** One credential per API origin: signing in covers every help centre the account can access. */
8
+ export declare function credentialLocation(origin: string, configDir: string): {
9
+ reference: string;
10
+ filename: string;
11
+ };
12
+ export declare const defaultConfigDir: () => string;
13
+ /** Bounded display label for the approval page; never a path. */
14
+ export declare function deviceLabel(hostname?: string): string;
15
+ export type LoginResult = {
16
+ status: 'signed_in';
17
+ api_origin: string;
18
+ account?: Account;
19
+ already_signed_in?: boolean;
20
+ };
21
+ export type FormSchema = {
22
+ type: 'object';
23
+ properties: Record<string, {
24
+ type: 'string';
25
+ title?: string;
26
+ description?: string;
27
+ enum?: string[];
28
+ enumNames?: string[];
29
+ default?: string;
30
+ minLength?: number;
31
+ maxLength?: number;
32
+ }>;
33
+ required?: string[];
34
+ };
35
+ export type AccountOffer = {
36
+ status: 'unavailable';
37
+ } | {
38
+ status: 'declined';
39
+ asked: boolean;
40
+ } | {
41
+ status: 'linked';
42
+ project_id: string;
43
+ account?: Account;
44
+ } | ({
45
+ status: string;
46
+ } & Record<string, unknown>);
47
+ export type HostedSetupInput = {
48
+ workspace?: string;
49
+ project_id?: string;
50
+ signup?: boolean;
51
+ action: 'find_article_gaps' | 'suggest_sections' | 'recommend_articles' | 'create_video_walkthrough';
52
+ article_id?: string;
53
+ resume_arguments?: {
54
+ article_id?: string;
55
+ expected_revision?: string;
56
+ request_id?: string;
57
+ prefer_background?: boolean;
58
+ open_when_ready?: boolean;
59
+ };
60
+ };
61
+ export declare class Session {
62
+ options: {
63
+ workspace?: string;
64
+ projectDir?: string;
65
+ cwd: string;
66
+ origin: string;
67
+ dev: boolean;
68
+ skillsDir: string;
69
+ configDir: string;
70
+ tokenFile?: string;
71
+ token?: string;
72
+ pairingRuntime?: PairingRuntime;
73
+ callBudgetMs?: number;
74
+ };
75
+ roots?: () => Promise<string[] | undefined>;
76
+ private selected?;
77
+ private pairings;
78
+ private initializing;
79
+ private hostedConnecting;
80
+ private setupPages;
81
+ openBrowser: (url: string) => Promise<boolean>;
82
+ approval?: (request: Approval) => Promise<'accept' | 'decline' | 'cancel' | 'unsupported'>;
83
+ approvalCompleted?: (id: string) => Promise<void>;
84
+ /** Form elicitation: the client renders the question itself, so the choice never
85
+ * depends on how the model phrases it. Undefined when the client has no dialog. */
86
+ askForm?: (message: string, requestedSchema: FormSchema) => Promise<{
87
+ action: 'accept' | 'decline' | 'cancel';
88
+ content?: Record<string, unknown>;
89
+ } | undefined>;
90
+ private declinedAccount;
91
+ private bridges;
92
+ private closed;
93
+ close(): void;
94
+ constructor(options: {
95
+ workspace?: string;
96
+ projectDir?: string;
97
+ cwd: string;
98
+ origin: string;
99
+ dev: boolean;
100
+ skillsDir: string;
101
+ configDir: string;
102
+ tokenFile?: string;
103
+ token?: string;
104
+ pairingRuntime?: PairingRuntime;
105
+ callBudgetMs?: number;
106
+ });
107
+ workspace(requested?: string): Promise<Workspace>;
108
+ /** Explicit token overrides win; otherwise the device credential for this origin; otherwise an inherited environment token. */
109
+ private credential;
110
+ account(): Promise<Account | undefined>;
111
+ bridge(ws?: Workspace, options?: {
112
+ resumeCompletion?: boolean;
113
+ }): Promise<Bridge>;
114
+ /** Sign this device in. Reuses a working credential; otherwise runs browser approval and saves the delivered account token. */
115
+ login(input?: {
116
+ publish?: boolean;
117
+ scopes?: ('publish' | 'manage' | 'generate')[];
118
+ onApproval?: (request: Approval) => Promise<void>;
119
+ }): Promise<LoginResult>;
120
+ /** A new request never expands the existing token. Only the explicit browser
121
+ * grant can deliver a replacement credential. Declining keeps the old one. */
122
+ requestPermissions(input: {
123
+ workspace?: string;
124
+ action: WriterAction;
125
+ article_id?: string;
126
+ scopes: ('publish' | 'manage' | 'generate')[];
127
+ }): Promise<{
128
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
129
+ allowed: boolean;
130
+ execution: "local" | "remote" | "hosted";
131
+ required_scopes: string[];
132
+ next_step: {
133
+ code: string;
134
+ message: string;
135
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
136
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
137
+ url?: string | undefined;
138
+ } | null;
139
+ } | {
140
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
141
+ status: string;
142
+ verification_uri: string | undefined;
143
+ user_code: string | undefined;
144
+ expires_at: string;
145
+ instructions: string;
146
+ }>;
147
+ saveCredential(delivery: {
148
+ token: string;
149
+ account?: Account;
150
+ }): Promise<void>;
151
+ /** Active setup for an explicitly requested hosted action. Inspection tools
152
+ * never call this: opening setup is not approval and never starts a job. */
153
+ setupHosted(input: HostedSetupInput): Promise<Record<string, unknown>>;
154
+ /** Ask, in the client's own dialog, whether to sign in before a hosted request
155
+ * the device cannot serve; then sign in, choose the help centre and link this
156
+ * folder, all through dialogs. Declining is remembered for this session so the
157
+ * user is not asked again unless they raise it. */
158
+ offerAccount(ws: Workspace, input: {
159
+ need: string;
160
+ explicit?: boolean;
161
+ }): Promise<AccountOffer>;
162
+ private linkAfterSignIn;
163
+ private openSetupPage;
164
+ private hostedSetup;
165
+ /** CLI-only: move this folder to another help centre after the user confirmed it. The device credential is untouched. */
166
+ switchProject(ws: Workspace, expectedProjectId: string, projectId: string): Promise<{
167
+ archive: string;
168
+ restored_history: boolean;
169
+ }>;
170
+ logout(): Promise<{
171
+ status: string;
172
+ api_origin: string;
173
+ } | {
174
+ already_logged_out: boolean;
175
+ status: string;
176
+ api_origin: string;
177
+ }>;
178
+ status(input?: {
179
+ workspace?: string;
180
+ run_id?: string;
181
+ }): Promise<{
182
+ status: string;
183
+ instructions: string;
184
+ verification_uri: string | undefined;
185
+ user_code: string | undefined;
186
+ expires_at: string;
187
+ workspace: string;
188
+ api_origin: string;
189
+ dev_mode: boolean;
190
+ account: Account | undefined;
191
+ article_run: {
192
+ open_when_ready: boolean;
193
+ browser_opened: boolean | undefined;
194
+ instructions: string | undefined;
195
+ editor_url: string | null;
196
+ link_message: string;
197
+ link_instructions: string;
198
+ run_id: string;
199
+ title: string | undefined;
200
+ phase: "published" | "failed" | "prepared" | "cancelled" | "interrupted" | "writing" | "finalizing" | "uploading" | "upload_failed" | "ready_for_review" | "saved";
201
+ generation_completed_locally: boolean;
202
+ delivery_pending: boolean;
203
+ recovery: string | undefined;
204
+ artifact_dir: string;
205
+ execution_mode: "background" | "foreground" | undefined;
206
+ host_task_id: string | undefined;
207
+ progress_source: string;
208
+ session_current: boolean;
209
+ started_at: string;
210
+ updated_at: string;
211
+ project_id: string | undefined;
212
+ error: {
213
+ code: string;
214
+ message: string;
215
+ } | undefined;
216
+ article: {
217
+ id: string;
218
+ revision: string;
219
+ status: "draft" | "published";
220
+ editor_url: string;
221
+ public_url: string | null;
222
+ repository_connection?: {
223
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
224
+ connect_url: string;
225
+ capabilities: {
226
+ sections: boolean;
227
+ suggestions: boolean;
228
+ code_analysis: boolean;
229
+ maintenance: boolean;
230
+ };
231
+ writer?: {
232
+ version: 1;
233
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
234
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
235
+ allowed: boolean;
236
+ execution: "local" | "remote" | "hosted";
237
+ required_scopes: string[];
238
+ next_step: {
239
+ code: string;
240
+ message: string;
241
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
242
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
243
+ url?: string | undefined;
244
+ } | null;
245
+ }>>;
246
+ } | undefined;
247
+ } | undefined;
248
+ } | undefined;
249
+ export_path: string | undefined;
250
+ preview: {
251
+ id: string;
252
+ revision: string;
253
+ status: "draft" | "published";
254
+ editor_url: string;
255
+ public_url: string | null;
256
+ repository_connection?: {
257
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
258
+ connect_url: string;
259
+ capabilities: {
260
+ sections: boolean;
261
+ suggestions: boolean;
262
+ code_analysis: boolean;
263
+ maintenance: boolean;
264
+ };
265
+ writer?: {
266
+ version: 1;
267
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
268
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
269
+ allowed: boolean;
270
+ execution: "local" | "remote" | "hosted";
271
+ required_scopes: string[];
272
+ next_step: {
273
+ code: string;
274
+ message: string;
275
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
276
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
277
+ url?: string | undefined;
278
+ } | null;
279
+ }>>;
280
+ } | undefined;
281
+ } | undefined;
282
+ } | undefined;
283
+ local_preview_path: string | undefined;
284
+ synchronization_error: string | undefined;
285
+ } | null;
286
+ } | {
287
+ status: string;
288
+ error: {
289
+ code: string;
290
+ message: string;
291
+ details: unknown;
292
+ } | {
293
+ code: string;
294
+ message: string;
295
+ details?: undefined;
296
+ };
297
+ instructions: string;
298
+ workspace: string;
299
+ api_origin: string;
300
+ dev_mode: boolean;
301
+ account: Account | undefined;
302
+ article_run: {
303
+ open_when_ready: boolean;
304
+ browser_opened: boolean | undefined;
305
+ instructions: string | undefined;
306
+ editor_url: string | null;
307
+ link_message: string;
308
+ link_instructions: string;
309
+ run_id: string;
310
+ title: string | undefined;
311
+ phase: "published" | "failed" | "prepared" | "cancelled" | "interrupted" | "writing" | "finalizing" | "uploading" | "upload_failed" | "ready_for_review" | "saved";
312
+ generation_completed_locally: boolean;
313
+ delivery_pending: boolean;
314
+ recovery: string | undefined;
315
+ artifact_dir: string;
316
+ execution_mode: "background" | "foreground" | undefined;
317
+ host_task_id: string | undefined;
318
+ progress_source: string;
319
+ session_current: boolean;
320
+ started_at: string;
321
+ updated_at: string;
322
+ project_id: string | undefined;
323
+ error: {
324
+ code: string;
325
+ message: string;
326
+ } | undefined;
327
+ article: {
328
+ id: string;
329
+ revision: string;
330
+ status: "draft" | "published";
331
+ editor_url: string;
332
+ public_url: string | null;
333
+ repository_connection?: {
334
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
335
+ connect_url: string;
336
+ capabilities: {
337
+ sections: boolean;
338
+ suggestions: boolean;
339
+ code_analysis: boolean;
340
+ maintenance: boolean;
341
+ };
342
+ writer?: {
343
+ version: 1;
344
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
345
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
346
+ allowed: boolean;
347
+ execution: "local" | "remote" | "hosted";
348
+ required_scopes: string[];
349
+ next_step: {
350
+ code: string;
351
+ message: string;
352
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
353
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
354
+ url?: string | undefined;
355
+ } | null;
356
+ }>>;
357
+ } | undefined;
358
+ } | undefined;
359
+ } | undefined;
360
+ export_path: string | undefined;
361
+ preview: {
362
+ id: string;
363
+ revision: string;
364
+ status: "draft" | "published";
365
+ editor_url: string;
366
+ public_url: string | null;
367
+ repository_connection?: {
368
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
369
+ connect_url: string;
370
+ capabilities: {
371
+ sections: boolean;
372
+ suggestions: boolean;
373
+ code_analysis: boolean;
374
+ maintenance: boolean;
375
+ };
376
+ writer?: {
377
+ version: 1;
378
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
379
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
380
+ allowed: boolean;
381
+ execution: "local" | "remote" | "hosted";
382
+ required_scopes: string[];
383
+ next_step: {
384
+ code: string;
385
+ message: string;
386
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
387
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
388
+ url?: string | undefined;
389
+ } | null;
390
+ }>>;
391
+ } | undefined;
392
+ } | undefined;
393
+ } | undefined;
394
+ local_preview_path: string | undefined;
395
+ synchronization_error: string | undefined;
396
+ } | null;
397
+ } | {
398
+ status: string;
399
+ instructions: string;
400
+ workspace: string;
401
+ api_origin: string;
402
+ dev_mode: boolean;
403
+ account: Account | undefined;
404
+ article_run: {
405
+ open_when_ready: boolean;
406
+ browser_opened: boolean | undefined;
407
+ instructions: string | undefined;
408
+ editor_url: string | null;
409
+ link_message: string;
410
+ link_instructions: string;
411
+ run_id: string;
412
+ title: string | undefined;
413
+ phase: "published" | "failed" | "prepared" | "cancelled" | "interrupted" | "writing" | "finalizing" | "uploading" | "upload_failed" | "ready_for_review" | "saved";
414
+ generation_completed_locally: boolean;
415
+ delivery_pending: boolean;
416
+ recovery: string | undefined;
417
+ artifact_dir: string;
418
+ execution_mode: "background" | "foreground" | undefined;
419
+ host_task_id: string | undefined;
420
+ progress_source: string;
421
+ session_current: boolean;
422
+ started_at: string;
423
+ updated_at: string;
424
+ project_id: string | undefined;
425
+ error: {
426
+ code: string;
427
+ message: string;
428
+ } | undefined;
429
+ article: {
430
+ id: string;
431
+ revision: string;
432
+ status: "draft" | "published";
433
+ editor_url: string;
434
+ public_url: string | null;
435
+ repository_connection?: {
436
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
437
+ connect_url: string;
438
+ capabilities: {
439
+ sections: boolean;
440
+ suggestions: boolean;
441
+ code_analysis: boolean;
442
+ maintenance: boolean;
443
+ };
444
+ writer?: {
445
+ version: 1;
446
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
447
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
448
+ allowed: boolean;
449
+ execution: "local" | "remote" | "hosted";
450
+ required_scopes: string[];
451
+ next_step: {
452
+ code: string;
453
+ message: string;
454
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
455
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
456
+ url?: string | undefined;
457
+ } | null;
458
+ }>>;
459
+ } | undefined;
460
+ } | undefined;
461
+ } | undefined;
462
+ export_path: string | undefined;
463
+ preview: {
464
+ id: string;
465
+ revision: string;
466
+ status: "draft" | "published";
467
+ editor_url: string;
468
+ public_url: string | null;
469
+ repository_connection?: {
470
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
471
+ connect_url: string;
472
+ capabilities: {
473
+ sections: boolean;
474
+ suggestions: boolean;
475
+ code_analysis: boolean;
476
+ maintenance: boolean;
477
+ };
478
+ writer?: {
479
+ version: 1;
480
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
481
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
482
+ allowed: boolean;
483
+ execution: "local" | "remote" | "hosted";
484
+ required_scopes: string[];
485
+ next_step: {
486
+ code: string;
487
+ message: string;
488
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
489
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
490
+ url?: string | undefined;
491
+ } | null;
492
+ }>>;
493
+ } | undefined;
494
+ } | undefined;
495
+ } | undefined;
496
+ local_preview_path: string | undefined;
497
+ synchronization_error: string | undefined;
498
+ } | null;
499
+ } | {
500
+ status: string;
501
+ export_dir: string;
502
+ writing_style: string | undefined;
503
+ generation_ready: boolean;
504
+ instructions: string;
505
+ workspace: string;
506
+ api_origin: string;
507
+ dev_mode: boolean;
508
+ credentials_configured: boolean;
509
+ article_run: {
510
+ open_when_ready: boolean;
511
+ browser_opened: boolean | undefined;
512
+ instructions: string | undefined;
513
+ editor_url: string | null;
514
+ link_message: string;
515
+ link_instructions: string;
516
+ run_id: string;
517
+ title: string | undefined;
518
+ phase: "published" | "failed" | "prepared" | "cancelled" | "interrupted" | "writing" | "finalizing" | "uploading" | "upload_failed" | "ready_for_review" | "saved";
519
+ generation_completed_locally: boolean;
520
+ delivery_pending: boolean;
521
+ recovery: string | undefined;
522
+ artifact_dir: string;
523
+ execution_mode: "background" | "foreground" | undefined;
524
+ host_task_id: string | undefined;
525
+ progress_source: string;
526
+ session_current: boolean;
527
+ started_at: string;
528
+ updated_at: string;
529
+ project_id: string | undefined;
530
+ error: {
531
+ code: string;
532
+ message: string;
533
+ } | undefined;
534
+ article: {
535
+ id: string;
536
+ revision: string;
537
+ status: "draft" | "published";
538
+ editor_url: string;
539
+ public_url: string | null;
540
+ repository_connection?: {
541
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
542
+ connect_url: string;
543
+ capabilities: {
544
+ sections: boolean;
545
+ suggestions: boolean;
546
+ code_analysis: boolean;
547
+ maintenance: boolean;
548
+ };
549
+ writer?: {
550
+ version: 1;
551
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
552
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
553
+ allowed: boolean;
554
+ execution: "local" | "remote" | "hosted";
555
+ required_scopes: string[];
556
+ next_step: {
557
+ code: string;
558
+ message: string;
559
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
560
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
561
+ url?: string | undefined;
562
+ } | null;
563
+ }>>;
564
+ } | undefined;
565
+ } | undefined;
566
+ } | undefined;
567
+ export_path: string | undefined;
568
+ preview: {
569
+ id: string;
570
+ revision: string;
571
+ status: "draft" | "published";
572
+ editor_url: string;
573
+ public_url: string | null;
574
+ repository_connection?: {
575
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
576
+ connect_url: string;
577
+ capabilities: {
578
+ sections: boolean;
579
+ suggestions: boolean;
580
+ code_analysis: boolean;
581
+ maintenance: boolean;
582
+ };
583
+ writer?: {
584
+ version: 1;
585
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
586
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
587
+ allowed: boolean;
588
+ execution: "local" | "remote" | "hosted";
589
+ required_scopes: string[];
590
+ next_step: {
591
+ code: string;
592
+ message: string;
593
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
594
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
595
+ url?: string | undefined;
596
+ } | null;
597
+ }>>;
598
+ } | undefined;
599
+ } | undefined;
600
+ } | undefined;
601
+ local_preview_path: string | undefined;
602
+ synchronization_error: string | undefined;
603
+ } | null;
604
+ analysis: {
605
+ status: "required";
606
+ completed_at?: undefined;
607
+ skills_version?: undefined;
608
+ output_dir?: undefined;
609
+ source_commit?: undefined;
610
+ codebase_dir?: undefined;
611
+ summary?: undefined;
612
+ overview?: undefined;
613
+ app_type?: undefined;
614
+ framework?: undefined;
615
+ } | {
616
+ status: "invalid";
617
+ completed_at?: undefined;
618
+ skills_version?: undefined;
619
+ output_dir?: undefined;
620
+ source_commit?: undefined;
621
+ codebase_dir?: undefined;
622
+ summary?: undefined;
623
+ overview?: undefined;
624
+ app_type?: undefined;
625
+ framework?: undefined;
626
+ } | {
627
+ status: "ready";
628
+ completed_at: string;
629
+ skills_version: string;
630
+ output_dir: string;
631
+ source_commit: string | null;
632
+ codebase_dir: string;
633
+ summary: string;
634
+ overview: string;
635
+ app_type: "win32" | "web" | "terminal" | "mobile" | "desktop" | "macos" | "game";
636
+ framework: string;
637
+ } | {
638
+ status: "invalid";
639
+ error: {
640
+ code: string;
641
+ message: string;
642
+ details: unknown;
643
+ } | {
644
+ code: string;
645
+ message: string;
646
+ details?: undefined;
647
+ };
648
+ completed_at?: undefined;
649
+ skills_version?: undefined;
650
+ output_dir?: undefined;
651
+ source_commit?: undefined;
652
+ codebase_dir?: undefined;
653
+ summary?: undefined;
654
+ overview?: undefined;
655
+ app_type?: undefined;
656
+ framework?: undefined;
657
+ };
658
+ setup_task: {
659
+ progress_source: "last_reported";
660
+ skill: "generate-illustrated-article" | "detect-project" | "suggest-sections" | "recommend-articles";
661
+ status: "running" | "failed" | "cancelled" | "completed";
662
+ started_at: string;
663
+ finished_at?: string | undefined;
664
+ total?: number | undefined;
665
+ completed?: number | undefined;
666
+ failed?: number | undefined;
667
+ } | null;
668
+ account: Account | undefined;
669
+ } | {
670
+ status: string;
671
+ instructions: string;
672
+ workspace: string;
673
+ api_origin: string;
674
+ dev_mode: boolean;
675
+ credentials_configured: boolean;
676
+ article_run: {
677
+ open_when_ready: boolean;
678
+ browser_opened: boolean | undefined;
679
+ instructions: string | undefined;
680
+ editor_url: string | null;
681
+ link_message: string;
682
+ link_instructions: string;
683
+ run_id: string;
684
+ title: string | undefined;
685
+ phase: "published" | "failed" | "prepared" | "cancelled" | "interrupted" | "writing" | "finalizing" | "uploading" | "upload_failed" | "ready_for_review" | "saved";
686
+ generation_completed_locally: boolean;
687
+ delivery_pending: boolean;
688
+ recovery: string | undefined;
689
+ artifact_dir: string;
690
+ execution_mode: "background" | "foreground" | undefined;
691
+ host_task_id: string | undefined;
692
+ progress_source: string;
693
+ session_current: boolean;
694
+ started_at: string;
695
+ updated_at: string;
696
+ project_id: string | undefined;
697
+ error: {
698
+ code: string;
699
+ message: string;
700
+ } | undefined;
701
+ article: {
702
+ id: string;
703
+ revision: string;
704
+ status: "draft" | "published";
705
+ editor_url: string;
706
+ public_url: string | null;
707
+ repository_connection?: {
708
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
709
+ connect_url: string;
710
+ capabilities: {
711
+ sections: boolean;
712
+ suggestions: boolean;
713
+ code_analysis: boolean;
714
+ maintenance: boolean;
715
+ };
716
+ writer?: {
717
+ version: 1;
718
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
719
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
720
+ allowed: boolean;
721
+ execution: "local" | "remote" | "hosted";
722
+ required_scopes: string[];
723
+ next_step: {
724
+ code: string;
725
+ message: string;
726
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
727
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
728
+ url?: string | undefined;
729
+ } | null;
730
+ }>>;
731
+ } | undefined;
732
+ } | undefined;
733
+ } | undefined;
734
+ export_path: string | undefined;
735
+ preview: {
736
+ id: string;
737
+ revision: string;
738
+ status: "draft" | "published";
739
+ editor_url: string;
740
+ public_url: string | null;
741
+ repository_connection?: {
742
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
743
+ connect_url: string;
744
+ capabilities: {
745
+ sections: boolean;
746
+ suggestions: boolean;
747
+ code_analysis: boolean;
748
+ maintenance: boolean;
749
+ };
750
+ writer?: {
751
+ version: 1;
752
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
753
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
754
+ allowed: boolean;
755
+ execution: "local" | "remote" | "hosted";
756
+ required_scopes: string[];
757
+ next_step: {
758
+ code: string;
759
+ message: string;
760
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
761
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
762
+ url?: string | undefined;
763
+ } | null;
764
+ }>>;
765
+ } | undefined;
766
+ } | undefined;
767
+ } | undefined;
768
+ local_preview_path: string | undefined;
769
+ synchronization_error: string | undefined;
770
+ } | null;
771
+ analysis: {
772
+ status: "required";
773
+ completed_at?: undefined;
774
+ skills_version?: undefined;
775
+ output_dir?: undefined;
776
+ source_commit?: undefined;
777
+ codebase_dir?: undefined;
778
+ summary?: undefined;
779
+ overview?: undefined;
780
+ app_type?: undefined;
781
+ framework?: undefined;
782
+ } | {
783
+ status: "invalid";
784
+ completed_at?: undefined;
785
+ skills_version?: undefined;
786
+ output_dir?: undefined;
787
+ source_commit?: undefined;
788
+ codebase_dir?: undefined;
789
+ summary?: undefined;
790
+ overview?: undefined;
791
+ app_type?: undefined;
792
+ framework?: undefined;
793
+ } | {
794
+ status: "ready";
795
+ completed_at: string;
796
+ skills_version: string;
797
+ output_dir: string;
798
+ source_commit: string | null;
799
+ codebase_dir: string;
800
+ summary: string;
801
+ overview: string;
802
+ app_type: "win32" | "web" | "terminal" | "mobile" | "desktop" | "macos" | "game";
803
+ framework: string;
804
+ } | {
805
+ status: "invalid";
806
+ error: {
807
+ code: string;
808
+ message: string;
809
+ details: unknown;
810
+ } | {
811
+ code: string;
812
+ message: string;
813
+ details?: undefined;
814
+ };
815
+ completed_at?: undefined;
816
+ skills_version?: undefined;
817
+ output_dir?: undefined;
818
+ source_commit?: undefined;
819
+ codebase_dir?: undefined;
820
+ summary?: undefined;
821
+ overview?: undefined;
822
+ app_type?: undefined;
823
+ framework?: undefined;
824
+ };
825
+ setup_task: {
826
+ progress_source: "last_reported";
827
+ skill: "generate-illustrated-article" | "detect-project" | "suggest-sections" | "recommend-articles";
828
+ status: "running" | "failed" | "cancelled" | "completed";
829
+ started_at: string;
830
+ finished_at?: string | undefined;
831
+ total?: number | undefined;
832
+ completed?: number | undefined;
833
+ failed?: number | undefined;
834
+ } | null;
835
+ generation_ready: boolean;
836
+ account: Account | undefined;
837
+ } | {
838
+ status: string;
839
+ projects: {
840
+ id: string;
841
+ name: string;
842
+ help_centre_url?: string | undefined;
843
+ repository_connection?: {
844
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
845
+ connect_url: string;
846
+ capabilities: {
847
+ sections: boolean;
848
+ suggestions: boolean;
849
+ code_analysis: boolean;
850
+ maintenance: boolean;
851
+ };
852
+ writer?: {
853
+ version: 1;
854
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
855
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
856
+ allowed: boolean;
857
+ execution: "local" | "remote" | "hosted";
858
+ required_scopes: string[];
859
+ next_step: {
860
+ code: string;
861
+ message: string;
862
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
863
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
864
+ url?: string | undefined;
865
+ } | null;
866
+ }>>;
867
+ } | undefined;
868
+ } | undefined;
869
+ }[];
870
+ instructions: string;
871
+ workspace: string;
872
+ api_origin: string;
873
+ dev_mode: boolean;
874
+ credentials_configured: boolean;
875
+ article_run: {
876
+ open_when_ready: boolean;
877
+ browser_opened: boolean | undefined;
878
+ instructions: string | undefined;
879
+ editor_url: string | null;
880
+ link_message: string;
881
+ link_instructions: string;
882
+ run_id: string;
883
+ title: string | undefined;
884
+ phase: "published" | "failed" | "prepared" | "cancelled" | "interrupted" | "writing" | "finalizing" | "uploading" | "upload_failed" | "ready_for_review" | "saved";
885
+ generation_completed_locally: boolean;
886
+ delivery_pending: boolean;
887
+ recovery: string | undefined;
888
+ artifact_dir: string;
889
+ execution_mode: "background" | "foreground" | undefined;
890
+ host_task_id: string | undefined;
891
+ progress_source: string;
892
+ session_current: boolean;
893
+ started_at: string;
894
+ updated_at: string;
895
+ project_id: string | undefined;
896
+ error: {
897
+ code: string;
898
+ message: string;
899
+ } | undefined;
900
+ article: {
901
+ id: string;
902
+ revision: string;
903
+ status: "draft" | "published";
904
+ editor_url: string;
905
+ public_url: string | null;
906
+ repository_connection?: {
907
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
908
+ connect_url: string;
909
+ capabilities: {
910
+ sections: boolean;
911
+ suggestions: boolean;
912
+ code_analysis: boolean;
913
+ maintenance: boolean;
914
+ };
915
+ writer?: {
916
+ version: 1;
917
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
918
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
919
+ allowed: boolean;
920
+ execution: "local" | "remote" | "hosted";
921
+ required_scopes: string[];
922
+ next_step: {
923
+ code: string;
924
+ message: string;
925
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
926
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
927
+ url?: string | undefined;
928
+ } | null;
929
+ }>>;
930
+ } | undefined;
931
+ } | undefined;
932
+ } | undefined;
933
+ export_path: string | undefined;
934
+ preview: {
935
+ id: string;
936
+ revision: string;
937
+ status: "draft" | "published";
938
+ editor_url: string;
939
+ public_url: string | null;
940
+ repository_connection?: {
941
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
942
+ connect_url: string;
943
+ capabilities: {
944
+ sections: boolean;
945
+ suggestions: boolean;
946
+ code_analysis: boolean;
947
+ maintenance: boolean;
948
+ };
949
+ writer?: {
950
+ version: 1;
951
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
952
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
953
+ allowed: boolean;
954
+ execution: "local" | "remote" | "hosted";
955
+ required_scopes: string[];
956
+ next_step: {
957
+ code: string;
958
+ message: string;
959
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
960
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
961
+ url?: string | undefined;
962
+ } | null;
963
+ }>>;
964
+ } | undefined;
965
+ } | undefined;
966
+ } | undefined;
967
+ local_preview_path: string | undefined;
968
+ synchronization_error: string | undefined;
969
+ } | null;
970
+ analysis: {
971
+ status: "required";
972
+ completed_at?: undefined;
973
+ skills_version?: undefined;
974
+ output_dir?: undefined;
975
+ source_commit?: undefined;
976
+ codebase_dir?: undefined;
977
+ summary?: undefined;
978
+ overview?: undefined;
979
+ app_type?: undefined;
980
+ framework?: undefined;
981
+ } | {
982
+ status: "invalid";
983
+ completed_at?: undefined;
984
+ skills_version?: undefined;
985
+ output_dir?: undefined;
986
+ source_commit?: undefined;
987
+ codebase_dir?: undefined;
988
+ summary?: undefined;
989
+ overview?: undefined;
990
+ app_type?: undefined;
991
+ framework?: undefined;
992
+ } | {
993
+ status: "ready";
994
+ completed_at: string;
995
+ skills_version: string;
996
+ output_dir: string;
997
+ source_commit: string | null;
998
+ codebase_dir: string;
999
+ summary: string;
1000
+ overview: string;
1001
+ app_type: "win32" | "web" | "terminal" | "mobile" | "desktop" | "macos" | "game";
1002
+ framework: string;
1003
+ } | {
1004
+ status: "invalid";
1005
+ error: {
1006
+ code: string;
1007
+ message: string;
1008
+ details: unknown;
1009
+ } | {
1010
+ code: string;
1011
+ message: string;
1012
+ details?: undefined;
1013
+ };
1014
+ completed_at?: undefined;
1015
+ skills_version?: undefined;
1016
+ output_dir?: undefined;
1017
+ source_commit?: undefined;
1018
+ codebase_dir?: undefined;
1019
+ summary?: undefined;
1020
+ overview?: undefined;
1021
+ app_type?: undefined;
1022
+ framework?: undefined;
1023
+ };
1024
+ setup_task: {
1025
+ progress_source: "last_reported";
1026
+ skill: "generate-illustrated-article" | "detect-project" | "suggest-sections" | "recommend-articles";
1027
+ status: "running" | "failed" | "cancelled" | "completed";
1028
+ started_at: string;
1029
+ finished_at?: string | undefined;
1030
+ total?: number | undefined;
1031
+ completed?: number | undefined;
1032
+ failed?: number | undefined;
1033
+ } | null;
1034
+ generation_ready: boolean;
1035
+ account: Account | undefined;
1036
+ } | {
1037
+ status: string;
1038
+ project_id: string;
1039
+ instructions: string;
1040
+ workspace: string;
1041
+ api_origin: string;
1042
+ dev_mode: boolean;
1043
+ credentials_configured: boolean;
1044
+ article_run: {
1045
+ open_when_ready: boolean;
1046
+ browser_opened: boolean | undefined;
1047
+ instructions: string | undefined;
1048
+ editor_url: string | null;
1049
+ link_message: string;
1050
+ link_instructions: string;
1051
+ run_id: string;
1052
+ title: string | undefined;
1053
+ phase: "published" | "failed" | "prepared" | "cancelled" | "interrupted" | "writing" | "finalizing" | "uploading" | "upload_failed" | "ready_for_review" | "saved";
1054
+ generation_completed_locally: boolean;
1055
+ delivery_pending: boolean;
1056
+ recovery: string | undefined;
1057
+ artifact_dir: string;
1058
+ execution_mode: "background" | "foreground" | undefined;
1059
+ host_task_id: string | undefined;
1060
+ progress_source: string;
1061
+ session_current: boolean;
1062
+ started_at: string;
1063
+ updated_at: string;
1064
+ project_id: string | undefined;
1065
+ error: {
1066
+ code: string;
1067
+ message: string;
1068
+ } | undefined;
1069
+ article: {
1070
+ id: string;
1071
+ revision: string;
1072
+ status: "draft" | "published";
1073
+ editor_url: string;
1074
+ public_url: string | null;
1075
+ repository_connection?: {
1076
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
1077
+ connect_url: string;
1078
+ capabilities: {
1079
+ sections: boolean;
1080
+ suggestions: boolean;
1081
+ code_analysis: boolean;
1082
+ maintenance: boolean;
1083
+ };
1084
+ writer?: {
1085
+ version: 1;
1086
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
1087
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1088
+ allowed: boolean;
1089
+ execution: "local" | "remote" | "hosted";
1090
+ required_scopes: string[];
1091
+ next_step: {
1092
+ code: string;
1093
+ message: string;
1094
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1095
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
1096
+ url?: string | undefined;
1097
+ } | null;
1098
+ }>>;
1099
+ } | undefined;
1100
+ } | undefined;
1101
+ } | undefined;
1102
+ export_path: string | undefined;
1103
+ preview: {
1104
+ id: string;
1105
+ revision: string;
1106
+ status: "draft" | "published";
1107
+ editor_url: string;
1108
+ public_url: string | null;
1109
+ repository_connection?: {
1110
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
1111
+ connect_url: string;
1112
+ capabilities: {
1113
+ sections: boolean;
1114
+ suggestions: boolean;
1115
+ code_analysis: boolean;
1116
+ maintenance: boolean;
1117
+ };
1118
+ writer?: {
1119
+ version: 1;
1120
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
1121
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1122
+ allowed: boolean;
1123
+ execution: "local" | "remote" | "hosted";
1124
+ required_scopes: string[];
1125
+ next_step: {
1126
+ code: string;
1127
+ message: string;
1128
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1129
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
1130
+ url?: string | undefined;
1131
+ } | null;
1132
+ }>>;
1133
+ } | undefined;
1134
+ } | undefined;
1135
+ } | undefined;
1136
+ local_preview_path: string | undefined;
1137
+ synchronization_error: string | undefined;
1138
+ } | null;
1139
+ analysis: {
1140
+ status: "required";
1141
+ completed_at?: undefined;
1142
+ skills_version?: undefined;
1143
+ output_dir?: undefined;
1144
+ source_commit?: undefined;
1145
+ codebase_dir?: undefined;
1146
+ summary?: undefined;
1147
+ overview?: undefined;
1148
+ app_type?: undefined;
1149
+ framework?: undefined;
1150
+ } | {
1151
+ status: "invalid";
1152
+ completed_at?: undefined;
1153
+ skills_version?: undefined;
1154
+ output_dir?: undefined;
1155
+ source_commit?: undefined;
1156
+ codebase_dir?: undefined;
1157
+ summary?: undefined;
1158
+ overview?: undefined;
1159
+ app_type?: undefined;
1160
+ framework?: undefined;
1161
+ } | {
1162
+ status: "ready";
1163
+ completed_at: string;
1164
+ skills_version: string;
1165
+ output_dir: string;
1166
+ source_commit: string | null;
1167
+ codebase_dir: string;
1168
+ summary: string;
1169
+ overview: string;
1170
+ app_type: "win32" | "web" | "terminal" | "mobile" | "desktop" | "macos" | "game";
1171
+ framework: string;
1172
+ } | {
1173
+ status: "invalid";
1174
+ error: {
1175
+ code: string;
1176
+ message: string;
1177
+ details: unknown;
1178
+ } | {
1179
+ code: string;
1180
+ message: string;
1181
+ details?: undefined;
1182
+ };
1183
+ completed_at?: undefined;
1184
+ skills_version?: undefined;
1185
+ output_dir?: undefined;
1186
+ source_commit?: undefined;
1187
+ codebase_dir?: undefined;
1188
+ summary?: undefined;
1189
+ overview?: undefined;
1190
+ app_type?: undefined;
1191
+ framework?: undefined;
1192
+ };
1193
+ setup_task: {
1194
+ progress_source: "last_reported";
1195
+ skill: "generate-illustrated-article" | "detect-project" | "suggest-sections" | "recommend-articles";
1196
+ status: "running" | "failed" | "cancelled" | "completed";
1197
+ started_at: string;
1198
+ finished_at?: string | undefined;
1199
+ total?: number | undefined;
1200
+ completed?: number | undefined;
1201
+ failed?: number | undefined;
1202
+ } | null;
1203
+ generation_ready: boolean;
1204
+ account: Account | undefined;
1205
+ } | {
1206
+ instructions?: string | undefined;
1207
+ status: string;
1208
+ project_id: string;
1209
+ project: {
1210
+ id: string;
1211
+ name: string;
1212
+ help_centre_url?: string | undefined;
1213
+ repository_connection?: {
1214
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
1215
+ connect_url: string;
1216
+ capabilities: {
1217
+ sections: boolean;
1218
+ suggestions: boolean;
1219
+ code_analysis: boolean;
1220
+ maintenance: boolean;
1221
+ };
1222
+ writer?: {
1223
+ version: 1;
1224
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
1225
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1226
+ allowed: boolean;
1227
+ execution: "local" | "remote" | "hosted";
1228
+ required_scopes: string[];
1229
+ next_step: {
1230
+ code: string;
1231
+ message: string;
1232
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1233
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
1234
+ url?: string | undefined;
1235
+ } | null;
1236
+ }>>;
1237
+ } | undefined;
1238
+ } | undefined;
1239
+ };
1240
+ repository_connection: {
1241
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
1242
+ connect_url: string;
1243
+ capabilities: {
1244
+ sections: boolean;
1245
+ suggestions: boolean;
1246
+ code_analysis: boolean;
1247
+ maintenance: boolean;
1248
+ };
1249
+ writer?: {
1250
+ version: 1;
1251
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
1252
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1253
+ allowed: boolean;
1254
+ execution: "local" | "remote" | "hosted";
1255
+ required_scopes: string[];
1256
+ next_step: {
1257
+ code: string;
1258
+ message: string;
1259
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1260
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
1261
+ url?: string | undefined;
1262
+ } | null;
1263
+ }>>;
1264
+ } | undefined;
1265
+ } | undefined;
1266
+ hosted_operation: {
1267
+ operation_id: string;
1268
+ open_when_ready: boolean;
1269
+ instructions: string;
1270
+ id: string;
1271
+ project_id: string;
1272
+ action: string;
1273
+ execution: "hosted";
1274
+ attempt: number;
1275
+ status: "queued" | "running" | "succeeded" | "failed";
1276
+ article_id: string | null;
1277
+ result: Record<string, unknown>;
1278
+ error: {
1279
+ code: string;
1280
+ message: string;
1281
+ } | null;
1282
+ review_url: string | null;
1283
+ created_at: string;
1284
+ started_at: string | null;
1285
+ finished_at: string | null;
1286
+ walkthrough_id?: string | null | undefined;
1287
+ } | undefined;
1288
+ generation_ready: boolean;
1289
+ writer_action: {
1290
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1291
+ allowed: boolean;
1292
+ execution: "local" | "remote" | "hosted";
1293
+ required_scopes: string[];
1294
+ next_step: {
1295
+ code: string;
1296
+ message: string;
1297
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1298
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
1299
+ url?: string | undefined;
1300
+ } | null;
1301
+ } | undefined;
1302
+ workspace: string;
1303
+ api_origin: string;
1304
+ dev_mode: boolean;
1305
+ credentials_configured: boolean;
1306
+ article_run: {
1307
+ open_when_ready: boolean;
1308
+ browser_opened: boolean | undefined;
1309
+ instructions: string | undefined;
1310
+ editor_url: string | null;
1311
+ link_message: string;
1312
+ link_instructions: string;
1313
+ run_id: string;
1314
+ title: string | undefined;
1315
+ phase: "published" | "failed" | "prepared" | "cancelled" | "interrupted" | "writing" | "finalizing" | "uploading" | "upload_failed" | "ready_for_review" | "saved";
1316
+ generation_completed_locally: boolean;
1317
+ delivery_pending: boolean;
1318
+ recovery: string | undefined;
1319
+ artifact_dir: string;
1320
+ execution_mode: "background" | "foreground" | undefined;
1321
+ host_task_id: string | undefined;
1322
+ progress_source: string;
1323
+ session_current: boolean;
1324
+ started_at: string;
1325
+ updated_at: string;
1326
+ project_id: string | undefined;
1327
+ error: {
1328
+ code: string;
1329
+ message: string;
1330
+ } | undefined;
1331
+ article: {
1332
+ id: string;
1333
+ revision: string;
1334
+ status: "draft" | "published";
1335
+ editor_url: string;
1336
+ public_url: string | null;
1337
+ repository_connection?: {
1338
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
1339
+ connect_url: string;
1340
+ capabilities: {
1341
+ sections: boolean;
1342
+ suggestions: boolean;
1343
+ code_analysis: boolean;
1344
+ maintenance: boolean;
1345
+ };
1346
+ writer?: {
1347
+ version: 1;
1348
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
1349
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1350
+ allowed: boolean;
1351
+ execution: "local" | "remote" | "hosted";
1352
+ required_scopes: string[];
1353
+ next_step: {
1354
+ code: string;
1355
+ message: string;
1356
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1357
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
1358
+ url?: string | undefined;
1359
+ } | null;
1360
+ }>>;
1361
+ } | undefined;
1362
+ } | undefined;
1363
+ } | undefined;
1364
+ export_path: string | undefined;
1365
+ preview: {
1366
+ id: string;
1367
+ revision: string;
1368
+ status: "draft" | "published";
1369
+ editor_url: string;
1370
+ public_url: string | null;
1371
+ repository_connection?: {
1372
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
1373
+ connect_url: string;
1374
+ capabilities: {
1375
+ sections: boolean;
1376
+ suggestions: boolean;
1377
+ code_analysis: boolean;
1378
+ maintenance: boolean;
1379
+ };
1380
+ writer?: {
1381
+ version: 1;
1382
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
1383
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1384
+ allowed: boolean;
1385
+ execution: "local" | "remote" | "hosted";
1386
+ required_scopes: string[];
1387
+ next_step: {
1388
+ code: string;
1389
+ message: string;
1390
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1391
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
1392
+ url?: string | undefined;
1393
+ } | null;
1394
+ }>>;
1395
+ } | undefined;
1396
+ } | undefined;
1397
+ } | undefined;
1398
+ local_preview_path: string | undefined;
1399
+ synchronization_error: string | undefined;
1400
+ } | null;
1401
+ analysis: {
1402
+ status: "required";
1403
+ completed_at?: undefined;
1404
+ skills_version?: undefined;
1405
+ output_dir?: undefined;
1406
+ source_commit?: undefined;
1407
+ codebase_dir?: undefined;
1408
+ summary?: undefined;
1409
+ overview?: undefined;
1410
+ app_type?: undefined;
1411
+ framework?: undefined;
1412
+ } | {
1413
+ status: "invalid";
1414
+ completed_at?: undefined;
1415
+ skills_version?: undefined;
1416
+ output_dir?: undefined;
1417
+ source_commit?: undefined;
1418
+ codebase_dir?: undefined;
1419
+ summary?: undefined;
1420
+ overview?: undefined;
1421
+ app_type?: undefined;
1422
+ framework?: undefined;
1423
+ } | {
1424
+ status: "ready";
1425
+ completed_at: string;
1426
+ skills_version: string;
1427
+ output_dir: string;
1428
+ source_commit: string | null;
1429
+ codebase_dir: string;
1430
+ summary: string;
1431
+ overview: string;
1432
+ app_type: "win32" | "web" | "terminal" | "mobile" | "desktop" | "macos" | "game";
1433
+ framework: string;
1434
+ } | {
1435
+ status: "invalid";
1436
+ error: {
1437
+ code: string;
1438
+ message: string;
1439
+ details: unknown;
1440
+ } | {
1441
+ code: string;
1442
+ message: string;
1443
+ details?: undefined;
1444
+ };
1445
+ completed_at?: undefined;
1446
+ skills_version?: undefined;
1447
+ output_dir?: undefined;
1448
+ source_commit?: undefined;
1449
+ codebase_dir?: undefined;
1450
+ summary?: undefined;
1451
+ overview?: undefined;
1452
+ app_type?: undefined;
1453
+ framework?: undefined;
1454
+ };
1455
+ setup_task: {
1456
+ progress_source: "last_reported";
1457
+ skill: "generate-illustrated-article" | "detect-project" | "suggest-sections" | "recommend-articles";
1458
+ status: "running" | "failed" | "cancelled" | "completed";
1459
+ started_at: string;
1460
+ finished_at?: string | undefined;
1461
+ total?: number | undefined;
1462
+ completed?: number | undefined;
1463
+ failed?: number | undefined;
1464
+ } | null;
1465
+ account: Account | undefined;
1466
+ } | {
1467
+ status: string;
1468
+ error: {
1469
+ code: string;
1470
+ message: string;
1471
+ details: unknown;
1472
+ } | {
1473
+ code: string;
1474
+ message: string;
1475
+ details?: undefined;
1476
+ };
1477
+ instructions: string;
1478
+ workspace: string;
1479
+ api_origin: string;
1480
+ dev_mode: boolean;
1481
+ credentials_configured: boolean;
1482
+ article_run: {
1483
+ open_when_ready: boolean;
1484
+ browser_opened: boolean | undefined;
1485
+ instructions: string | undefined;
1486
+ editor_url: string | null;
1487
+ link_message: string;
1488
+ link_instructions: string;
1489
+ run_id: string;
1490
+ title: string | undefined;
1491
+ phase: "published" | "failed" | "prepared" | "cancelled" | "interrupted" | "writing" | "finalizing" | "uploading" | "upload_failed" | "ready_for_review" | "saved";
1492
+ generation_completed_locally: boolean;
1493
+ delivery_pending: boolean;
1494
+ recovery: string | undefined;
1495
+ artifact_dir: string;
1496
+ execution_mode: "background" | "foreground" | undefined;
1497
+ host_task_id: string | undefined;
1498
+ progress_source: string;
1499
+ session_current: boolean;
1500
+ started_at: string;
1501
+ updated_at: string;
1502
+ project_id: string | undefined;
1503
+ error: {
1504
+ code: string;
1505
+ message: string;
1506
+ } | undefined;
1507
+ article: {
1508
+ id: string;
1509
+ revision: string;
1510
+ status: "draft" | "published";
1511
+ editor_url: string;
1512
+ public_url: string | null;
1513
+ repository_connection?: {
1514
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
1515
+ connect_url: string;
1516
+ capabilities: {
1517
+ sections: boolean;
1518
+ suggestions: boolean;
1519
+ code_analysis: boolean;
1520
+ maintenance: boolean;
1521
+ };
1522
+ writer?: {
1523
+ version: 1;
1524
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
1525
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1526
+ allowed: boolean;
1527
+ execution: "local" | "remote" | "hosted";
1528
+ required_scopes: string[];
1529
+ next_step: {
1530
+ code: string;
1531
+ message: string;
1532
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1533
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
1534
+ url?: string | undefined;
1535
+ } | null;
1536
+ }>>;
1537
+ } | undefined;
1538
+ } | undefined;
1539
+ } | undefined;
1540
+ export_path: string | undefined;
1541
+ preview: {
1542
+ id: string;
1543
+ revision: string;
1544
+ status: "draft" | "published";
1545
+ editor_url: string;
1546
+ public_url: string | null;
1547
+ repository_connection?: {
1548
+ state: "not_connected" | "connected" | "disconnected" | "suspended";
1549
+ connect_url: string;
1550
+ capabilities: {
1551
+ sections: boolean;
1552
+ suggestions: boolean;
1553
+ code_analysis: boolean;
1554
+ maintenance: boolean;
1555
+ };
1556
+ writer?: {
1557
+ version: 1;
1558
+ actions: Partial<Record<"read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre", {
1559
+ action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1560
+ allowed: boolean;
1561
+ execution: "local" | "remote" | "hosted";
1562
+ required_scopes: string[];
1563
+ next_step: {
1564
+ code: string;
1565
+ message: string;
1566
+ requested_action: "read_articles" | "create_article" | "update_article" | "edit_article" | "publish_article" | "unpublish_article" | "delete_article" | "find_article_gaps" | "suggest_sections" | "recommend_articles" | "review_sections" | "review_recommendations" | "create_video_walkthrough" | "get_operation" | "generate_help_centre";
1567
+ missing_scopes?: ("read" | "import" | "publish" | "manage" | "generate")[] | undefined;
1568
+ url?: string | undefined;
1569
+ } | null;
1570
+ }>>;
1571
+ } | undefined;
1572
+ } | undefined;
1573
+ } | undefined;
1574
+ local_preview_path: string | undefined;
1575
+ synchronization_error: string | undefined;
1576
+ } | null;
1577
+ analysis: {
1578
+ status: "required";
1579
+ completed_at?: undefined;
1580
+ skills_version?: undefined;
1581
+ output_dir?: undefined;
1582
+ source_commit?: undefined;
1583
+ codebase_dir?: undefined;
1584
+ summary?: undefined;
1585
+ overview?: undefined;
1586
+ app_type?: undefined;
1587
+ framework?: undefined;
1588
+ } | {
1589
+ status: "invalid";
1590
+ completed_at?: undefined;
1591
+ skills_version?: undefined;
1592
+ output_dir?: undefined;
1593
+ source_commit?: undefined;
1594
+ codebase_dir?: undefined;
1595
+ summary?: undefined;
1596
+ overview?: undefined;
1597
+ app_type?: undefined;
1598
+ framework?: undefined;
1599
+ } | {
1600
+ status: "ready";
1601
+ completed_at: string;
1602
+ skills_version: string;
1603
+ output_dir: string;
1604
+ source_commit: string | null;
1605
+ codebase_dir: string;
1606
+ summary: string;
1607
+ overview: string;
1608
+ app_type: "win32" | "web" | "terminal" | "mobile" | "desktop" | "macos" | "game";
1609
+ framework: string;
1610
+ } | {
1611
+ status: "invalid";
1612
+ error: {
1613
+ code: string;
1614
+ message: string;
1615
+ details: unknown;
1616
+ } | {
1617
+ code: string;
1618
+ message: string;
1619
+ details?: undefined;
1620
+ };
1621
+ completed_at?: undefined;
1622
+ skills_version?: undefined;
1623
+ output_dir?: undefined;
1624
+ source_commit?: undefined;
1625
+ codebase_dir?: undefined;
1626
+ summary?: undefined;
1627
+ overview?: undefined;
1628
+ app_type?: undefined;
1629
+ framework?: undefined;
1630
+ };
1631
+ setup_task: {
1632
+ progress_source: "last_reported";
1633
+ skill: "generate-illustrated-article" | "detect-project" | "suggest-sections" | "recommend-articles";
1634
+ status: "running" | "failed" | "cancelled" | "completed";
1635
+ started_at: string;
1636
+ finished_at?: string | undefined;
1637
+ total?: number | undefined;
1638
+ completed?: number | undefined;
1639
+ failed?: number | undefined;
1640
+ } | null;
1641
+ generation_ready: boolean;
1642
+ account: Account | undefined;
1643
+ }>;
1644
+ private authentication;
1645
+ init(input: {
1646
+ workspace?: string;
1647
+ project_id?: string;
1648
+ signup?: boolean;
1649
+ host_local?: boolean;
1650
+ }): Promise<unknown>;
1651
+ /** MCP equivalent of the CLI's publish flow. Each response names the next user choice. */
1652
+ publish(input?: {
1653
+ workspace?: string;
1654
+ project_id?: string;
1655
+ slugs?: string[];
1656
+ signup?: boolean;
1657
+ }): Promise<{
1658
+ status: string;
1659
+ project_id: string;
1660
+ articles: {
1661
+ slug: string;
1662
+ title: string;
1663
+ local_article_id: string;
1664
+ artifact_dir: string;
1665
+ export_path?: string;
1666
+ run_id?: string;
1667
+ }[];
1668
+ instructions: string;
1669
+ uploaded?: undefined;
1670
+ already_uploaded?: undefined;
1671
+ failed?: undefined;
1672
+ skipped?: undefined;
1673
+ } | {
1674
+ status: string;
1675
+ project_id: string;
1676
+ uploaded: {
1677
+ slug: string;
1678
+ title: string;
1679
+ editor_url: string;
1680
+ }[];
1681
+ already_uploaded: {
1682
+ slug: string;
1683
+ editor_url: string;
1684
+ }[];
1685
+ failed: {
1686
+ slug: string;
1687
+ title: string;
1688
+ error: ReturnType<typeof publicError>;
1689
+ }[];
1690
+ skipped: string[];
1691
+ instructions: string;
1692
+ articles?: undefined;
1693
+ } | {
1694
+ status: string;
1695
+ uploaded: never[];
1696
+ instructions: string;
1697
+ articles?: undefined;
1698
+ } | {
1699
+ status: string;
1700
+ articles: {
1701
+ slug: string;
1702
+ title: string;
1703
+ local_article_id: string;
1704
+ artifact_dir: string;
1705
+ export_path?: string;
1706
+ run_id?: string;
1707
+ }[];
1708
+ instructions: string;
1709
+ uploaded?: undefined;
1710
+ }>;
1711
+ private connect;
1712
+ private initWorkspace;
1713
+ private initialize;
1714
+ }