@method-ai-hq/sdk 0.0.0-stage → 0.14.2

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 (262) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +23 -2
  3. package/dist/packages/contracts/src/identity.d.ts +16 -0
  4. package/dist/packages/contracts/src/identity.js +41 -0
  5. package/dist/packages/contracts/src/method-package.d.ts +71 -0
  6. package/dist/packages/contracts/src/method-package.js +22 -0
  7. package/dist/packages/method-document/src/conversion-report.d.ts +138 -0
  8. package/dist/packages/method-document/src/conversion-report.js +23 -0
  9. package/dist/packages/sdk/examples/daily-briefing/README.md +31 -0
  10. package/dist/packages/sdk/examples/daily-briefing/TASK.md +3 -0
  11. package/dist/packages/sdk/examples/daily-briefing/approved-report.md +138 -0
  12. package/dist/packages/sdk/examples/daily-briefing/briefing_artifacts.py +39 -0
  13. package/dist/packages/sdk/examples/daily-briefing/briefing_check_inputs.py +47 -0
  14. package/dist/packages/sdk/examples/daily-briefing/briefing_files.py +31 -0
  15. package/dist/packages/sdk/examples/daily-briefing/briefing_manifest.py +23 -0
  16. package/dist/packages/sdk/examples/daily-briefing/briefing_markdown.py +67 -0
  17. package/dist/packages/sdk/examples/daily-briefing/briefing_progress.py +18 -0
  18. package/dist/packages/sdk/examples/daily-briefing/briefing_render.py +71 -0
  19. package/dist/packages/sdk/examples/daily-briefing/briefing_sessions.py +37 -0
  20. package/dist/packages/sdk/examples/daily-briefing/briefing_times.py +158 -0
  21. package/dist/packages/sdk/examples/daily-briefing/briefing_validation.py +101 -0
  22. package/dist/packages/sdk/examples/daily-briefing/briefing_website.py +215 -0
  23. package/dist/packages/sdk/examples/daily-briefing/checks.json +19 -0
  24. package/dist/packages/sdk/examples/daily-briefing/daily-briefing.method +158 -0
  25. package/dist/packages/sdk/examples/daily-briefing/inputs.json +1 -0
  26. package/dist/packages/sdk/examples/daily-briefing/package-lock.json +10 -0
  27. package/dist/packages/sdk/examples/daily-briefing/package.json +4 -0
  28. package/dist/packages/sdk/examples/daily-briefing/pyproject.toml +8 -0
  29. package/dist/packages/sdk/examples/daily-briefing/reader/reader.css +35 -0
  30. package/dist/packages/sdk/examples/daily-briefing/reader/reader.js +42 -0
  31. package/dist/packages/sdk/examples/daily-briefing/sample/context.json +1 -0
  32. package/dist/packages/sdk/examples/daily-briefing/sample/documents/document-001.md +219 -0
  33. package/dist/packages/sdk/examples/daily-briefing/sample/media.json +1 -0
  34. package/dist/packages/sdk/examples/daily-briefing/sample/metadata/documents.json +39 -0
  35. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0001.json +49 -0
  36. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0002.json +49 -0
  37. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0003.json +49 -0
  38. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0004.json +49 -0
  39. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0005.json +49 -0
  40. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0006.json +49 -0
  41. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0007.json +49 -0
  42. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0008.json +49 -0
  43. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0009.json +49 -0
  44. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0010.json +49 -0
  45. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0011.json +49 -0
  46. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0012.json +49 -0
  47. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0013.json +49 -0
  48. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0014.json +49 -0
  49. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0015.json +49 -0
  50. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0016.json +49 -0
  51. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0017.json +49 -0
  52. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0018.json +49 -0
  53. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0019.json +49 -0
  54. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0020.json +49 -0
  55. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0021.json +49 -0
  56. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0022.json +49 -0
  57. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0023.json +49 -0
  58. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0024.json +49 -0
  59. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0025.json +49 -0
  60. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0026.json +49 -0
  61. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0027.json +49 -0
  62. package/dist/packages/sdk/examples/daily-briefing/sample/records/chatgpt-0028.json +49 -0
  63. package/dist/packages/sdk/examples/daily-briefing/sample/sessions.json +1 -0
  64. package/dist/packages/sdk/examples/daily-briefing/sample/timeline.jsonl +28 -0
  65. package/dist/packages/sdk/examples/daily-briefing/sample/untimed.jsonl +0 -0
  66. package/dist/packages/sdk/examples/daily-briefing/sample-output.zip +0 -0
  67. package/dist/packages/sdk/examples/daily-briefing/sample-report.md +51 -0
  68. package/dist/packages/sdk/examples/daily-briefing/uv.lock +128 -0
  69. package/dist/packages/sdk/examples/daily-briefing/vendor/marked-LICENSE.md +44 -0
  70. package/dist/packages/sdk/examples/daily-briefing/vendor/marked.mjs +77 -0
  71. package/dist/packages/sdk/examples/files.json +126 -0
  72. package/dist/packages/sdk/examples/message-routing/README.md +23 -0
  73. package/dist/packages/sdk/examples/message-routing/TASK.md +5 -0
  74. package/dist/packages/sdk/examples/message-routing/choose-destination.mjs +10 -0
  75. package/dist/packages/sdk/examples/message-routing/create-ticket.mjs +15 -0
  76. package/dist/packages/sdk/examples/message-routing/inputs.json +1 -0
  77. package/dist/packages/sdk/examples/message-routing/message-routing.method +45 -0
  78. package/dist/packages/sdk/examples/message-routing/result.fixture.json +6 -0
  79. package/dist/packages/sdk/examples/message-routing/routing.mjs +29 -0
  80. package/dist/packages/sdk/examples/message-routing/routing.test.mjs +27 -0
  81. package/dist/packages/sdk/examples/message-routing/ticket.method +88 -0
  82. package/dist/packages/sdk/examples/message-routing/ticket.test.mjs +64 -0
  83. package/dist/packages/sdk/examples/notes-summary/README.md +23 -0
  84. package/dist/packages/sdk/examples/notes-summary/TASK.md +3 -0
  85. package/dist/packages/sdk/examples/notes-summary/cases/dates-in-decisions/case.json +36 -0
  86. package/dist/packages/sdk/examples/notes-summary/cases/dates-in-decisions/examples.json +16 -0
  87. package/dist/packages/sdk/examples/notes-summary/cases/dates-in-decisions/files/0 +10 -0
  88. package/dist/packages/sdk/examples/notes-summary/cases/dates-in-decisions/recording.json +195 -0
  89. package/dist/packages/sdk/examples/notes-summary/notes/2026-10-05-standup.md +4 -0
  90. package/dist/packages/sdk/examples/notes-summary/notes/2026-10-07-planning.md +3 -0
  91. package/dist/packages/sdk/examples/notes-summary/notes-summary.method +54 -0
  92. package/dist/packages/sdk/examples/notes-summary/out/.keep +0 -0
  93. package/dist/packages/sdk/examples/notes-summary/read-notes.mjs +4 -0
  94. package/dist/packages/sdk/examples/notes-summary/save.mjs +7 -0
  95. package/dist/packages/sdk/examples/outbound-management/README.md +119 -0
  96. package/dist/packages/sdk/examples/outbound-management/TASK.md +5 -0
  97. package/dist/packages/sdk/examples/outbound-management/check_plan.py +16 -0
  98. package/dist/packages/sdk/examples/outbound-management/check_sources.py +14 -0
  99. package/dist/packages/sdk/examples/outbound-management/crm.py +153 -0
  100. package/dist/packages/sdk/examples/outbound-management/crm_test.py +141 -0
  101. package/dist/packages/sdk/examples/outbound-management/fixtures/README.md +15 -0
  102. package/dist/packages/sdk/examples/outbound-management/fixtures/crm.json +54 -0
  103. package/dist/packages/sdk/examples/outbound-management/fixtures/day-1/messages.json +29 -0
  104. package/dist/packages/sdk/examples/outbound-management/fixtures/day-2/messages.json +38 -0
  105. package/dist/packages/sdk/examples/outbound-management/fixtures/observations.json +12 -0
  106. package/dist/packages/sdk/examples/outbound-management/fixtures/plan.json +69 -0
  107. package/dist/packages/sdk/examples/outbound-management/fixtures/receipt.json +1 -0
  108. package/dist/packages/sdk/examples/outbound-management/fixtures/state.json +99 -0
  109. package/dist/packages/sdk/examples/outbound-management/fixtures/tasks.md +16 -0
  110. package/dist/packages/sdk/examples/outbound-management/inputs.json +4 -0
  111. package/dist/packages/sdk/examples/outbound-management/outbound.method +277 -0
  112. package/dist/packages/sdk/examples/outbound-management/read_crm.py +4 -0
  113. package/dist/packages/sdk/examples/outbound-management/save_day.py +4 -0
  114. package/dist/packages/sdk/examples/outbound-management/starter/crm.json +11 -0
  115. package/dist/packages/sdk/examples/social-briefing/README.md +41 -0
  116. package/dist/packages/sdk/examples/social-briefing/TASK.md +5 -0
  117. package/dist/packages/sdk/examples/social-briefing/inputs.json +5 -0
  118. package/dist/packages/sdk/examples/social-briefing/result.fixture.json +14 -0
  119. package/dist/packages/sdk/examples/social-briefing/social-briefing.method +110 -0
  120. package/dist/packages/sdk/examples/support-triage/README.md +77 -0
  121. package/dist/packages/sdk/examples/support-triage/TASK.md +3 -0
  122. package/dist/packages/sdk/examples/support-triage/cases/double-charge-to-billing/case.json +40 -0
  123. package/dist/packages/sdk/examples/support-triage/cases/double-charge-to-billing/recording.json +460 -0
  124. package/dist/packages/sdk/examples/support-triage/fake-helpdesk.mjs +38 -0
  125. package/dist/packages/sdk/examples/support-triage/helpdesk.mjs +33 -0
  126. package/dist/packages/sdk/examples/support-triage/inputs.json +1 -0
  127. package/dist/packages/sdk/examples/support-triage/read-ticket.mjs +8 -0
  128. package/dist/packages/sdk/examples/support-triage/route.mjs +4 -0
  129. package/dist/packages/sdk/examples/support-triage/sample-tickets.json +5 -0
  130. package/dist/packages/sdk/examples/support-triage/set-ticket.mjs +9 -0
  131. package/dist/packages/sdk/examples/support-triage/support-triage.method +165 -0
  132. package/dist/packages/sdk/examples/support-triage/triage.mjs +38 -0
  133. package/dist/packages/sdk/examples/support-triage/triage.test.mjs +68 -0
  134. package/dist/packages/sdk/observers/mail.delivery/fetch.mjs +87 -0
  135. package/dist/packages/sdk/observers/mail.delivery/fixtures/bounce-by-recipient.json +1 -0
  136. package/dist/packages/sdk/observers/mail.delivery/fixtures/bounce.json +1 -0
  137. package/dist/packages/sdk/observers/mail.delivery/fixtures/delayed.json +1 -0
  138. package/dist/packages/sdk/observers/mail.delivery/fixtures/delivered.json +1 -0
  139. package/dist/packages/sdk/observers/mail.delivery/fixtures/empty.json +1 -0
  140. package/dist/packages/sdk/observers/mail.delivery/fixtures/other-message.json +1 -0
  141. package/dist/packages/sdk/observers/mail.delivery/judge.mjs +13 -0
  142. package/dist/packages/sdk/observers/mail.delivery/observer.json +14 -0
  143. package/dist/packages/sdk/package.json +232 -0
  144. package/dist/packages/sdk/src/authoring-example.d.ts +91 -0
  145. package/dist/packages/sdk/src/authoring-example.js +50 -0
  146. package/dist/packages/sdk/src/authoring-instructions.d.ts +20 -0
  147. package/dist/packages/sdk/src/authoring-instructions.js +151 -0
  148. package/dist/packages/sdk/src/authoring-prompt.d.ts +2 -0
  149. package/dist/packages/sdk/src/authoring-prompt.js +8 -0
  150. package/dist/packages/sdk/src/authoring.d.ts +10 -0
  151. package/dist/packages/sdk/src/authoring.js +287 -0
  152. package/dist/packages/sdk/src/bindings.d.ts +4 -0
  153. package/dist/packages/sdk/src/bindings.js +124 -0
  154. package/dist/packages/sdk/src/bridge.d.ts +2 -0
  155. package/dist/packages/sdk/src/bridge.js +23 -0
  156. package/dist/packages/sdk/src/browser-runtime/pyproject.toml +5 -0
  157. package/dist/packages/sdk/src/browser-runtime/tools.json +189 -0
  158. package/dist/packages/sdk/src/browser-runtime/uv.lock +3894 -0
  159. package/dist/packages/sdk/src/browser-service.py +127 -0
  160. package/dist/packages/sdk/src/browser.d.ts +38 -0
  161. package/dist/packages/sdk/src/browser.js +203 -0
  162. package/dist/packages/sdk/src/capabilities.d.ts +13 -0
  163. package/dist/packages/sdk/src/capabilities.js +68 -0
  164. package/dist/packages/sdk/src/classification-client.d.ts +4 -0
  165. package/dist/packages/sdk/src/classification-client.js +27 -0
  166. package/dist/packages/sdk/src/cloud.d.ts +23 -0
  167. package/dist/packages/sdk/src/cloud.js +43 -0
  168. package/dist/packages/sdk/src/computer-settings.d.ts +28 -0
  169. package/dist/packages/sdk/src/computer-settings.js +57 -0
  170. package/dist/packages/sdk/src/connect.d.ts +47 -0
  171. package/dist/packages/sdk/src/connect.js +203 -0
  172. package/dist/packages/sdk/src/current-inspection.d.ts +3 -0
  173. package/dist/packages/sdk/src/current-inspection.js +146 -0
  174. package/dist/packages/sdk/src/current-runtime.d.ts +14 -0
  175. package/dist/packages/sdk/src/current-runtime.js +167 -0
  176. package/dist/packages/sdk/src/doctor.d.ts +17 -0
  177. package/dist/packages/sdk/src/doctor.js +68 -0
  178. package/dist/packages/sdk/src/executable.d.ts +2 -0
  179. package/dist/packages/sdk/src/executable.js +22 -0
  180. package/dist/packages/sdk/src/explain-effects.d.ts +32 -0
  181. package/dist/packages/sdk/src/explain-effects.js +192 -0
  182. package/dist/packages/sdk/src/explain.d.ts +115 -0
  183. package/dist/packages/sdk/src/explain.js +441 -0
  184. package/dist/packages/sdk/src/files.d.ts +9 -0
  185. package/dist/packages/sdk/src/files.js +50 -0
  186. package/dist/packages/sdk/src/guard-keys.d.ts +5 -0
  187. package/dist/packages/sdk/src/guard-keys.js +42 -0
  188. package/dist/packages/sdk/src/hosted-models.d.ts +49 -0
  189. package/dist/packages/sdk/src/hosted-models.js +81 -0
  190. package/dist/packages/sdk/src/improve.d.ts +55 -0
  191. package/dist/packages/sdk/src/improve.js +159 -0
  192. package/dist/packages/sdk/src/index.d.ts +13 -0
  193. package/dist/packages/sdk/src/index.js +13 -0
  194. package/dist/packages/sdk/src/inspect.d.ts +6 -0
  195. package/dist/packages/sdk/src/inspect.js +17 -0
  196. package/dist/packages/sdk/src/link.d.ts +12 -0
  197. package/dist/packages/sdk/src/link.js +53 -0
  198. package/dist/packages/sdk/src/local-cli.d.ts +24 -0
  199. package/dist/packages/sdk/src/local-cli.js +146 -0
  200. package/dist/packages/sdk/src/local-setup.d.ts +15 -0
  201. package/dist/packages/sdk/src/local-setup.js +42 -0
  202. package/dist/packages/sdk/src/method-client.d.ts +30 -0
  203. package/dist/packages/sdk/src/method-client.js +250 -0
  204. package/dist/packages/sdk/src/method-files.d.ts +29 -0
  205. package/dist/packages/sdk/src/method-files.js +93 -0
  206. package/dist/packages/sdk/src/method-help.d.ts +19 -0
  207. package/dist/packages/sdk/src/method-help.js +404 -0
  208. package/dist/packages/sdk/src/method-issues.d.ts +86 -0
  209. package/dist/packages/sdk/src/method-issues.js +192 -0
  210. package/dist/packages/sdk/src/method-sync.d.ts +46 -0
  211. package/dist/packages/sdk/src/method-sync.js +293 -0
  212. package/dist/packages/sdk/src/method.d.ts +5 -0
  213. package/dist/packages/sdk/src/method.js +359 -0
  214. package/dist/packages/sdk/src/model-checks.d.ts +96 -0
  215. package/dist/packages/sdk/src/model-checks.js +181 -0
  216. package/dist/packages/sdk/src/outbox.d.ts +120 -0
  217. package/dist/packages/sdk/src/outbox.js +297 -0
  218. package/dist/packages/sdk/src/own-model-key.d.ts +22 -0
  219. package/dist/packages/sdk/src/own-model-key.js +76 -0
  220. package/dist/packages/sdk/src/prepare.d.ts +24 -0
  221. package/dist/packages/sdk/src/prepare.js +245 -0
  222. package/dist/packages/sdk/src/process.d.ts +15 -0
  223. package/dist/packages/sdk/src/process.js +107 -0
  224. package/dist/packages/sdk/src/production.d.ts +182 -0
  225. package/dist/packages/sdk/src/production.js +284 -0
  226. package/dist/packages/sdk/src/progress.d.ts +12 -0
  227. package/dist/packages/sdk/src/progress.js +48 -0
  228. package/dist/packages/sdk/src/proposals.d.ts +73 -0
  229. package/dist/packages/sdk/src/proposals.js +284 -0
  230. package/dist/packages/sdk/src/quality.d.ts +82 -0
  231. package/dist/packages/sdk/src/quality.js +294 -0
  232. package/dist/packages/sdk/src/result-files.d.ts +5 -0
  233. package/dist/packages/sdk/src/result-files.js +149 -0
  234. package/dist/packages/sdk/src/result-transfer.d.ts +21 -0
  235. package/dist/packages/sdk/src/result-transfer.js +37 -0
  236. package/dist/packages/sdk/src/run-data.d.ts +11 -0
  237. package/dist/packages/sdk/src/run-data.js +80 -0
  238. package/dist/packages/sdk/src/run-method.d.ts +2 -0
  239. package/dist/packages/sdk/src/run-method.js +2 -0
  240. package/dist/packages/sdk/src/run-saved.d.ts +5 -0
  241. package/dist/packages/sdk/src/run-saved.js +138 -0
  242. package/dist/packages/sdk/src/run-worker.d.ts +6 -0
  243. package/dist/packages/sdk/src/run-worker.js +131 -0
  244. package/dist/packages/sdk/src/secrets.d.ts +37 -0
  245. package/dist/packages/sdk/src/secrets.js +196 -0
  246. package/dist/packages/sdk/src/update.d.ts +5 -0
  247. package/dist/packages/sdk/src/update.js +39 -0
  248. package/dist/packages/sdk/src/versions.d.ts +58 -0
  249. package/dist/packages/sdk/src/versions.js +144 -0
  250. package/dist/packages/sdk/src/worker.d.ts +120 -0
  251. package/dist/packages/sdk/src/worker.js +443 -0
  252. package/dist/packages/workflow-language/src/execution.d.ts +1 -0
  253. package/dist/packages/workflow-language/src/execution.js +1 -0
  254. package/dist/packages/workflow-language/src/inspection.d.ts +990 -0
  255. package/dist/packages/workflow-language/src/inspection.js +130 -0
  256. package/dist/packages/workflow-language/src/result-files.d.ts +160 -0
  257. package/dist/packages/workflow-language/src/result-files.js +67 -0
  258. package/dist/packages/workflow-language/src/schema.d.ts +207 -0
  259. package/dist/packages/workflow-language/src/schema.js +56 -0
  260. package/dist/packages/workflow-language/src/validate.d.ts +11 -0
  261. package/dist/packages/workflow-language/src/validate.js +77 -0
  262. package/package.json +230 -4
@@ -0,0 +1,232 @@
1
+ {
2
+ "name": "@method-ai-hq/sdk",
3
+ "version": "0.14.2",
4
+ "description": "Build and run reusable .method files with checked steps and saved results.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "dist/packages/sdk/src/index.js",
8
+ "types": "dist/packages/sdk/src/index.d.ts",
9
+ "bin": {
10
+ "method": "dist/packages/sdk/src/method.js",
11
+ "method-bridge": "dist/packages/sdk/src/bridge.js"
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "README.md",
16
+ "LICENSE"
17
+ ],
18
+ "engines": {
19
+ "node": ">=22"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/method-ai-hq/method-sdk.git",
24
+ "directory": "packages/sdk"
25
+ },
26
+ "keywords": [
27
+ "workflow",
28
+ "agents",
29
+ "ai-agents",
30
+ "verification",
31
+ "mcp"
32
+ ],
33
+ "scripts": {
34
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/packages/sdk/src/bridge.js dist/packages/sdk/src/method.js && node scripts/copy-examples.mjs",
35
+ "prepack": "npm --prefix ../.. run build"
36
+ },
37
+ "dependencies": {
38
+ "@withmethod/runtime": "https://codeload.github.com/method-ai-hq/method-spec/tar.gz/c45c5ba1a3432b8d4e90ff07a7457eef5ea0f371",
39
+ "fflate": "^0.8.3",
40
+ "yaml": "^2.9.0",
41
+ "zod": "^3.25.76"
42
+ },
43
+ "homepage": "https://docs.withmethod.ai/sdk/overview",
44
+ "exports": {
45
+ ".": {
46
+ "types": "./dist/packages/sdk/src/index.d.ts",
47
+ "import": "./dist/packages/sdk/src/index.js",
48
+ "default": "./dist/packages/sdk/src/index.js"
49
+ },
50
+ "./schema": {
51
+ "types": "./dist/packages/workflow-language/src/schema.d.ts",
52
+ "import": "./dist/packages/workflow-language/src/schema.js",
53
+ "default": "./dist/packages/workflow-language/src/schema.js"
54
+ },
55
+ "./validate": {
56
+ "types": "./dist/packages/workflow-language/src/validate.d.ts",
57
+ "import": "./dist/packages/workflow-language/src/validate.js",
58
+ "default": "./dist/packages/workflow-language/src/validate.js"
59
+ },
60
+ "./execution": {
61
+ "types": "./dist/packages/workflow-language/src/execution.d.ts",
62
+ "import": "./dist/packages/workflow-language/src/execution.js",
63
+ "default": "./dist/packages/workflow-language/src/execution.js"
64
+ },
65
+ "./inspection": {
66
+ "types": "./dist/packages/workflow-language/src/inspection.d.ts",
67
+ "import": "./dist/packages/workflow-language/src/inspection.js",
68
+ "default": "./dist/packages/workflow-language/src/inspection.js"
69
+ },
70
+ "./result-files": {
71
+ "types": "./dist/packages/workflow-language/src/result-files.d.ts",
72
+ "import": "./dist/packages/workflow-language/src/result-files.js",
73
+ "default": "./dist/packages/workflow-language/src/result-files.js"
74
+ },
75
+ "./identity": {
76
+ "types": "./dist/packages/contracts/src/identity.d.ts",
77
+ "import": "./dist/packages/contracts/src/identity.js",
78
+ "default": "./dist/packages/contracts/src/identity.js"
79
+ },
80
+ "./method-package": {
81
+ "types": "./dist/packages/contracts/src/method-package.d.ts",
82
+ "import": "./dist/packages/contracts/src/method-package.js",
83
+ "default": "./dist/packages/contracts/src/method-package.js"
84
+ },
85
+ "./conversion": {
86
+ "types": "./dist/packages/method-document/src/conversion-report.d.ts",
87
+ "import": "./dist/packages/method-document/src/conversion-report.js",
88
+ "default": "./dist/packages/method-document/src/conversion-report.js"
89
+ },
90
+ "./method-client": {
91
+ "types": "./dist/packages/sdk/src/method-client.d.ts",
92
+ "import": "./dist/packages/sdk/src/method-client.js",
93
+ "default": "./dist/packages/sdk/src/method-client.js"
94
+ },
95
+ "./method-sync": {
96
+ "types": "./dist/packages/sdk/src/method-sync.d.ts",
97
+ "import": "./dist/packages/sdk/src/method-sync.js",
98
+ "default": "./dist/packages/sdk/src/method-sync.js"
99
+ },
100
+ "./method": {
101
+ "types": "./dist/packages/sdk/src/method.d.ts",
102
+ "import": "./dist/packages/sdk/src/method.js",
103
+ "default": "./dist/packages/sdk/src/method.js"
104
+ },
105
+ "./files": {
106
+ "types": "./dist/packages/sdk/src/files.d.ts",
107
+ "import": "./dist/packages/sdk/src/files.js",
108
+ "default": "./dist/packages/sdk/src/files.js"
109
+ },
110
+ "./inspect": {
111
+ "types": "./dist/packages/sdk/src/inspect.d.ts",
112
+ "import": "./dist/packages/sdk/src/inspect.js",
113
+ "default": "./dist/packages/sdk/src/inspect.js"
114
+ },
115
+ "./process": {
116
+ "types": "./dist/packages/sdk/src/process.d.ts",
117
+ "import": "./dist/packages/sdk/src/process.js",
118
+ "default": "./dist/packages/sdk/src/process.js"
119
+ },
120
+ "./executable": {
121
+ "types": "./dist/packages/sdk/src/executable.d.ts",
122
+ "import": "./dist/packages/sdk/src/executable.js",
123
+ "default": "./dist/packages/sdk/src/executable.js"
124
+ },
125
+ "./authoring": {
126
+ "types": "./dist/packages/sdk/src/authoring.d.ts",
127
+ "import": "./dist/packages/sdk/src/authoring.js",
128
+ "default": "./dist/packages/sdk/src/authoring.js"
129
+ },
130
+ "./method-help": {
131
+ "types": "./dist/packages/sdk/src/method-help.d.ts",
132
+ "import": "./dist/packages/sdk/src/method-help.js",
133
+ "default": "./dist/packages/sdk/src/method-help.js"
134
+ },
135
+ "./current-runtime": {
136
+ "types": "./dist/packages/sdk/src/current-runtime.d.ts",
137
+ "import": "./dist/packages/sdk/src/current-runtime.js",
138
+ "default": "./dist/packages/sdk/src/current-runtime.js"
139
+ },
140
+ "./local-setup": {
141
+ "types": "./dist/packages/sdk/src/local-setup.d.ts",
142
+ "import": "./dist/packages/sdk/src/local-setup.js",
143
+ "default": "./dist/packages/sdk/src/local-setup.js"
144
+ },
145
+ "./current-inspection": {
146
+ "types": "./dist/packages/sdk/src/current-inspection.d.ts",
147
+ "import": "./dist/packages/sdk/src/current-inspection.js",
148
+ "default": "./dist/packages/sdk/src/current-inspection.js"
149
+ },
150
+ "./method-files": {
151
+ "types": "./dist/packages/sdk/src/method-files.d.ts",
152
+ "import": "./dist/packages/sdk/src/method-files.js",
153
+ "default": "./dist/packages/sdk/src/method-files.js"
154
+ },
155
+ "./versions": {
156
+ "types": "./dist/packages/sdk/src/versions.d.ts",
157
+ "import": "./dist/packages/sdk/src/versions.js",
158
+ "default": "./dist/packages/sdk/src/versions.js"
159
+ },
160
+ "./outbox": {
161
+ "types": "./dist/packages/sdk/src/outbox.d.ts",
162
+ "import": "./dist/packages/sdk/src/outbox.js",
163
+ "default": "./dist/packages/sdk/src/outbox.js"
164
+ },
165
+ "./computer-settings": {
166
+ "types": "./dist/packages/sdk/src/computer-settings.d.ts",
167
+ "import": "./dist/packages/sdk/src/computer-settings.js",
168
+ "default": "./dist/packages/sdk/src/computer-settings.js"
169
+ },
170
+ "./bindings": {
171
+ "types": "./dist/packages/sdk/src/bindings.d.ts",
172
+ "import": "./dist/packages/sdk/src/bindings.js",
173
+ "default": "./dist/packages/sdk/src/bindings.js"
174
+ },
175
+ "./capabilities": {
176
+ "types": "./dist/packages/sdk/src/capabilities.d.ts",
177
+ "import": "./dist/packages/sdk/src/capabilities.js",
178
+ "default": "./dist/packages/sdk/src/capabilities.js"
179
+ },
180
+ "./prepare": {
181
+ "types": "./dist/packages/sdk/src/prepare.d.ts",
182
+ "import": "./dist/packages/sdk/src/prepare.js",
183
+ "default": "./dist/packages/sdk/src/prepare.js"
184
+ },
185
+ "./run-worker": {
186
+ "types": "./dist/packages/sdk/src/run-worker.d.ts",
187
+ "import": "./dist/packages/sdk/src/run-worker.js",
188
+ "default": "./dist/packages/sdk/src/run-worker.js"
189
+ },
190
+ "./local-cli": {
191
+ "types": "./dist/packages/sdk/src/local-cli.d.ts",
192
+ "import": "./dist/packages/sdk/src/local-cli.js",
193
+ "default": "./dist/packages/sdk/src/local-cli.js"
194
+ },
195
+ "./doctor": {
196
+ "types": "./dist/packages/sdk/src/doctor.d.ts",
197
+ "import": "./dist/packages/sdk/src/doctor.js",
198
+ "default": "./dist/packages/sdk/src/doctor.js"
199
+ },
200
+ "./run-saved": {
201
+ "types": "./dist/packages/sdk/src/run-saved.d.ts",
202
+ "import": "./dist/packages/sdk/src/run-saved.js",
203
+ "default": "./dist/packages/sdk/src/run-saved.js"
204
+ },
205
+ "./sdk-result-files": {
206
+ "types": "./dist/packages/sdk/src/result-files.d.ts",
207
+ "import": "./dist/packages/sdk/src/result-files.js",
208
+ "default": "./dist/packages/sdk/src/result-files.js"
209
+ },
210
+ "./package.json": "./package.json",
211
+ "./authoring-prompt": {
212
+ "types": "./dist/packages/sdk/src/authoring-prompt.d.ts",
213
+ "import": "./dist/packages/sdk/src/authoring-prompt.js",
214
+ "default": "./dist/packages/sdk/src/authoring-prompt.js"
215
+ },
216
+ "./progress": {
217
+ "types": "./dist/packages/sdk/src/progress.d.ts",
218
+ "import": "./dist/packages/sdk/src/progress.js",
219
+ "default": "./dist/packages/sdk/src/progress.js"
220
+ },
221
+ "./run-method": {
222
+ "types": "./dist/packages/sdk/src/run-method.d.ts",
223
+ "import": "./dist/packages/sdk/src/run-method.js",
224
+ "default": "./dist/packages/sdk/src/run-method.js"
225
+ },
226
+ "./authoring-example": {
227
+ "types": "./dist/packages/sdk/src/authoring-example.d.ts",
228
+ "import": "./dist/packages/sdk/src/authoring-example.js",
229
+ "default": "./dist/packages/sdk/src/authoring-example.js"
230
+ }
231
+ }
232
+ }
@@ -0,0 +1,91 @@
1
+ export declare const authoringExamples: readonly [{
2
+ readonly id: "notes-summary";
3
+ readonly description: "The smallest complete Method: reads a folder of meeting notes, finds decisions and action items with one model call that shows two good items, and saves a summary file. A recorded case keeps one correction.";
4
+ readonly teaches: "files connection, call with examples of good output, a recorded case in cases/";
5
+ readonly directory: "notes-summary";
6
+ readonly entrypoint: "notes-summary.method";
7
+ readonly lessonFiles: readonly ["TASK.md", "notes-summary.method", "read-notes.mjs", "save.mjs", "cases/dates-in-decisions/case.json", "README.md"];
8
+ }, {
9
+ readonly id: "message-routing";
10
+ readonly description: "Classifies a customer message with Method's classifier, then a script rule chooses a support destination. ticket.method adds one ticket write that a retry does not repeat.";
11
+ readonly teaches: "classify with an unclear option, a threshold in a script, an effect that reads the ticket back, retry without a duplicate write";
12
+ readonly directory: "message-routing";
13
+ readonly entrypoint: "message-routing.method";
14
+ readonly lessonFiles: readonly ["TASK.md", "message-routing.method", "routing.mjs", "choose-destination.mjs", "inputs.json", "result.fixture.json", "ticket.method", "create-ticket.mjs", "README.md"];
15
+ }, {
16
+ readonly id: "support-triage";
17
+ readonly description: "Reads a help desk ticket, classifies its team, refund request, and urgency, drafts a first reply, updates the ticket, and asks a person when the team is unclear.";
18
+ readonly teaches: "models and secrets, classify with options, yes_no and levels, an unclear path, ask, effects with an http observer, a committed case, run_data: device, method connect";
19
+ readonly directory: "support-triage";
20
+ readonly entrypoint: "support-triage.method";
21
+ readonly lessonFiles: readonly ["TASK.md", "support-triage.method", "triage.mjs", "helpdesk.mjs", "read-ticket.mjs", "route.mjs", "set-ticket.mjs", "triage.test.mjs", "inputs.json", "cases/double-charge-to-billing/case.json", "README.md"];
22
+ }, {
23
+ readonly id: "outbound-management";
24
+ readonly description: "Reads email and prospect sources, updates persistent CRM state, and saves daily tasks and outreach drafts for review.";
25
+ readonly teaches: "state across runs, script checks, examples of good output, accept, fixtures";
26
+ readonly directory: "outbound-management";
27
+ readonly entrypoint: "outbound.method";
28
+ readonly lessonFiles: readonly ["TASK.md", "outbound.method", "read_crm.py", "crm.py", "check_sources.py", "check_plan.py", "save_day.py", "starter/crm.json", "inputs.json", "fixtures/crm.json", "fixtures/observations.json", "fixtures/plan.json", "fixtures/tasks.md", "fixtures/receipt.json", "fixtures/state.json", "README.md"];
29
+ }, {
30
+ readonly id: "social-briefing";
31
+ readonly description: "Researches a topic through Grok, alphaXiv, and LinkedIn in the browser, then writes a briefing with quotes and source links.";
32
+ readonly teaches: "browser agent, call, no_effect_reason, accept";
33
+ readonly directory: "social-briefing";
34
+ readonly entrypoint: "social-briefing.method";
35
+ readonly lessonFiles: readonly ["TASK.md", "social-briefing.method", "inputs.json", "result.fixture.json", "README.md"];
36
+ }, {
37
+ readonly id: "daily-briefing";
38
+ readonly description: "Turns prepared records of one fictional day into a cited briefing website, using an approved writing example, a source check, and rendering scripts.";
39
+ readonly teaches: "approved example as an input, script tool, source check, website result";
40
+ readonly directory: "daily-briefing";
41
+ readonly entrypoint: "daily-briefing.method";
42
+ readonly lessonFiles: readonly ["TASK.md", "daily-briefing.method", "approved-report.md", "briefing_check_inputs.py", "briefing_files.py", "briefing_artifacts.py", "briefing_times.py", "briefing_sessions.py", "briefing_validation.py", "briefing_render.py", "briefing_manifest.py", "briefing_markdown.py", "briefing_website.py", "briefing_progress.py", "reader/reader.css", "reader/reader.js", "inputs.json", "sample-report.md", "README.md"];
43
+ }];
44
+ export declare function exampleDirectory(id: string): {
45
+ example: {
46
+ readonly id: "notes-summary";
47
+ readonly description: "The smallest complete Method: reads a folder of meeting notes, finds decisions and action items with one model call that shows two good items, and saves a summary file. A recorded case keeps one correction.";
48
+ readonly teaches: "files connection, call with examples of good output, a recorded case in cases/";
49
+ readonly directory: "notes-summary";
50
+ readonly entrypoint: "notes-summary.method";
51
+ readonly lessonFiles: readonly ["TASK.md", "notes-summary.method", "read-notes.mjs", "save.mjs", "cases/dates-in-decisions/case.json", "README.md"];
52
+ } | {
53
+ readonly id: "message-routing";
54
+ readonly description: "Classifies a customer message with Method's classifier, then a script rule chooses a support destination. ticket.method adds one ticket write that a retry does not repeat.";
55
+ readonly teaches: "classify with an unclear option, a threshold in a script, an effect that reads the ticket back, retry without a duplicate write";
56
+ readonly directory: "message-routing";
57
+ readonly entrypoint: "message-routing.method";
58
+ readonly lessonFiles: readonly ["TASK.md", "message-routing.method", "routing.mjs", "choose-destination.mjs", "inputs.json", "result.fixture.json", "ticket.method", "create-ticket.mjs", "README.md"];
59
+ } | {
60
+ readonly id: "support-triage";
61
+ readonly description: "Reads a help desk ticket, classifies its team, refund request, and urgency, drafts a first reply, updates the ticket, and asks a person when the team is unclear.";
62
+ readonly teaches: "models and secrets, classify with options, yes_no and levels, an unclear path, ask, effects with an http observer, a committed case, run_data: device, method connect";
63
+ readonly directory: "support-triage";
64
+ readonly entrypoint: "support-triage.method";
65
+ readonly lessonFiles: readonly ["TASK.md", "support-triage.method", "triage.mjs", "helpdesk.mjs", "read-ticket.mjs", "route.mjs", "set-ticket.mjs", "triage.test.mjs", "inputs.json", "cases/double-charge-to-billing/case.json", "README.md"];
66
+ } | {
67
+ readonly id: "outbound-management";
68
+ readonly description: "Reads email and prospect sources, updates persistent CRM state, and saves daily tasks and outreach drafts for review.";
69
+ readonly teaches: "state across runs, script checks, examples of good output, accept, fixtures";
70
+ readonly directory: "outbound-management";
71
+ readonly entrypoint: "outbound.method";
72
+ readonly lessonFiles: readonly ["TASK.md", "outbound.method", "read_crm.py", "crm.py", "check_sources.py", "check_plan.py", "save_day.py", "starter/crm.json", "inputs.json", "fixtures/crm.json", "fixtures/observations.json", "fixtures/plan.json", "fixtures/tasks.md", "fixtures/receipt.json", "fixtures/state.json", "README.md"];
73
+ } | {
74
+ readonly id: "social-briefing";
75
+ readonly description: "Researches a topic through Grok, alphaXiv, and LinkedIn in the browser, then writes a briefing with quotes and source links.";
76
+ readonly teaches: "browser agent, call, no_effect_reason, accept";
77
+ readonly directory: "social-briefing";
78
+ readonly entrypoint: "social-briefing.method";
79
+ readonly lessonFiles: readonly ["TASK.md", "social-briefing.method", "inputs.json", "result.fixture.json", "README.md"];
80
+ } | {
81
+ readonly id: "daily-briefing";
82
+ readonly description: "Turns prepared records of one fictional day into a cited briefing website, using an approved writing example, a source check, and rendering scripts.";
83
+ readonly teaches: "approved example as an input, script tool, source check, website result";
84
+ readonly directory: "daily-briefing";
85
+ readonly entrypoint: "daily-briefing.method";
86
+ readonly lessonFiles: readonly ["TASK.md", "daily-briefing.method", "approved-report.md", "briefing_check_inputs.py", "briefing_files.py", "briefing_artifacts.py", "briefing_times.py", "briefing_sessions.py", "briefing_validation.py", "briefing_render.py", "briefing_manifest.py", "briefing_markdown.py", "briefing_website.py", "briefing_progress.py", "reader/reader.css", "reader/reader.js", "inputs.json", "sample-report.md", "README.md"];
87
+ };
88
+ directory: string;
89
+ };
90
+ export declare function exampleCatalog(): string;
91
+ export declare function renderExample(id: string, installedPaths?: boolean): string;
@@ -0,0 +1,50 @@
1
+ import { exampleSelection } from "./authoring-instructions.js";
2
+ import { readFileSync, existsSync } from 'node:fs';
3
+ import { fileURLToPath } from 'node:url';
4
+ export const authoringExamples = [
5
+ { id: 'notes-summary', description: 'The smallest complete Method: reads a folder of meeting notes, finds decisions and action items with one model call that shows two good items, and saves a summary file. A recorded case keeps one correction.', teaches: 'files connection, call with examples of good output, a recorded case in cases/', directory: 'notes-summary', entrypoint: 'notes-summary.method', lessonFiles: [
6
+ 'TASK.md', 'notes-summary.method', 'read-notes.mjs', 'save.mjs', 'cases/dates-in-decisions/case.json', 'README.md',
7
+ ] },
8
+ { id: 'message-routing', description: "Classifies a customer message with Method's classifier, then a script rule chooses a support destination. ticket.method adds one ticket write that a retry does not repeat.", teaches: 'classify with an unclear option, a threshold in a script, an effect that reads the ticket back, retry without a duplicate write', directory: 'message-routing', entrypoint: 'message-routing.method', lessonFiles: [
9
+ 'TASK.md', 'message-routing.method', 'routing.mjs', 'choose-destination.mjs', 'inputs.json', 'result.fixture.json', 'ticket.method', 'create-ticket.mjs', 'README.md',
10
+ ] },
11
+ { id: 'support-triage', description: 'Reads a help desk ticket, classifies its team, refund request, and urgency, drafts a first reply, updates the ticket, and asks a person when the team is unclear.', teaches: 'models and secrets, classify with options, yes_no and levels, an unclear path, ask, effects with an http observer, a committed case, run_data: device, method connect', directory: 'support-triage', entrypoint: 'support-triage.method', lessonFiles: [
12
+ 'TASK.md', 'support-triage.method', 'triage.mjs', 'helpdesk.mjs', 'read-ticket.mjs', 'route.mjs', 'set-ticket.mjs', 'triage.test.mjs', 'inputs.json', 'cases/double-charge-to-billing/case.json', 'README.md',
13
+ ] },
14
+ { id: 'outbound-management', description: 'Reads email and prospect sources, updates persistent CRM state, and saves daily tasks and outreach drafts for review.', teaches: 'state across runs, script checks, examples of good output, accept, fixtures', directory: 'outbound-management', entrypoint: 'outbound.method', lessonFiles: [
15
+ 'TASK.md', 'outbound.method', 'read_crm.py', 'crm.py', 'check_sources.py', 'check_plan.py', 'save_day.py', 'starter/crm.json', 'inputs.json', 'fixtures/crm.json', 'fixtures/observations.json', 'fixtures/plan.json', 'fixtures/tasks.md', 'fixtures/receipt.json', 'fixtures/state.json', 'README.md',
16
+ ] },
17
+ { id: 'social-briefing', description: 'Researches a topic through Grok, alphaXiv, and LinkedIn in the browser, then writes a briefing with quotes and source links.', teaches: 'browser agent, call, no_effect_reason, accept', directory: 'social-briefing', entrypoint: 'social-briefing.method', lessonFiles: [
18
+ 'TASK.md', 'social-briefing.method', 'inputs.json', 'result.fixture.json', 'README.md',
19
+ ] },
20
+ { id: 'daily-briefing', description: 'Turns prepared records of one fictional day into a cited briefing website, using an approved writing example, a source check, and rendering scripts.', teaches: 'approved example as an input, script tool, source check, website result', directory: 'daily-briefing', entrypoint: 'daily-briefing.method', lessonFiles: [
21
+ 'TASK.md', 'daily-briefing.method', 'approved-report.md', 'briefing_check_inputs.py', 'briefing_files.py', 'briefing_artifacts.py', 'briefing_times.py', 'briefing_sessions.py', 'briefing_validation.py', 'briefing_render.py', 'briefing_manifest.py', 'briefing_markdown.py', 'briefing_website.py', 'briefing_progress.py', 'reader/reader.css', 'reader/reader.js', 'inputs.json', 'sample-report.md', 'README.md',
22
+ ] },
23
+ ];
24
+ export function exampleDirectory(id) {
25
+ const example = authoringExamples.find(example => example.id === id);
26
+ if (!example)
27
+ throw Error(`Unknown example '${id}'. Choose ${authoringExamples.map(example => example.id).join(', ')}.\n\n${exampleCatalog()}`);
28
+ return { example, directory: fileURLToPath(new URL(`../examples/${example.directory}/`, import.meta.url)) };
29
+ }
30
+ export function exampleCatalog() {
31
+ return '# Example catalog\n\n' + authoringExamples.map(example => `- \`method authoring example ${example.id}\`: ${example.description} Teaches: ${example.teaches}.`).join('\n') + '\n\n' + exampleSelection + '\n';
32
+ }
33
+ export function renderExample(id, installedPaths = true) {
34
+ const { example, directory } = exampleDirectory(id);
35
+ const files = JSON.parse(readFileSync(new URL('../examples/files.json', import.meta.url), 'utf8'));
36
+ const location = (name) => installedPaths ? directory + name : `${example.directory}/${name}`;
37
+ let result = `# Worked example: ${example.id}\n\n${example.description}\n\n`;
38
+ // The sample inputs show how the example runs.
39
+ const lessons = [...example.lessonFiles];
40
+ for (const name of [...lessons, ...['inputs.json'].filter(name => !lessons.includes(name) && existsSync(directory + name))]) {
41
+ const content = readFileSync(directory + name, 'utf8');
42
+ const language = name.endsWith('.method') ? 'yaml' : name.endsWith('.json') ? 'json' : name.endsWith('.py') ? 'python' : /\.(mjs|js)$/.test(name) ? 'javascript' : name.endsWith('.css') ? 'css' : 'markdown';
43
+ const runs = content.match(/`+/g) ?? [];
44
+ const fence = '`'.repeat(Math.max(3, ...runs.map(run => run.length + 1)));
45
+ result += `## ${name}\n\n${fence}${language}\n${content.trimEnd()}\n${fence}\n\n`;
46
+ }
47
+ result += '## Installed files\n\n';
48
+ result += files.filter(name => name.startsWith(example.directory + '/')).map(name => `- ${location(name.slice(example.directory.length + 1))}`).join('\n') + '\n';
49
+ return result;
50
+ }
@@ -0,0 +1,20 @@
1
+ /** Shared authoring text; safe to import in the dashboard and public site. */
2
+ export declare const authoringEntryRule = "Before creating, editing, or proposing a Method, run `method authoring` and read its guidance. Do this before choosing an existing Method as a reference.";
3
+ export declare const checkEditingRule = "Existing checks and tests are implementation choices, not user requirements. Remove a check that is unnecessary, repeats other validation, or enforces a requirement that nobody asked for. Delete the tests and instructions that exist only for it, and do not replace it. Do not change useful output only to satisfy a check.";
4
+ export declare const designProcedure = "# Choose the design\n\n| Requirement | Step type |\n| --- | --- |\n| Fixed rules, calculations, file changes, or an API that is not a model | run |\n| A structured model answer from supplied information | call |\n| Model-directed investigation or tool use | agent |\n| A choice from named options, a yes/no, or a score on ordered levels, with probabilities | classify |\n| An answer or decision that must come from the user | ask |\n\nFor browser work, declare a browser environment and select it with do.browser: environment.NAME; see method authoring example social-briefing.\n\nAdd a check only when it catches a failure that matters to the result. A change to a service, an API, email, or a browser that sends needs an effect that reads the result back; local file writes need neither. When you convert existing code, do not keep its checks and tests only because they exist. The rules are in method authoring concepts.\n\nUse when for conditions, each for collections, repeat for bounded iteration, and after for order without a data dependency. Split steps for a check, a retry, a human decision, or an external change.\n";
5
+ /** The full check rules; in concepts. */
6
+ export declare const checkRules = "# Checks\n\nAdd a check only when it catches a concrete failure that matters to the result. Output types and the runtime already validate shapes; do not repeat them. Do not check wording, headings, keywords, lengths, or counts unless the task requires them: \"write accurate prose\" is not a reason to match strings.\n\nUse the simplest check that proves the fact: a built-in equals, count, present, or file check, a script, or an agent check. Local file writes need no check: the runtime observes files connections itself. A change to a service, an API, email, or a browser that sends needs an effect that reads the result back, because a receipt or a 200 status shows only that the request was accepted. Use a built-in observer (http, sqlite, file) when one fits. When a change cannot or need not be observed, such as a browser step that only reads, write no_effect_reason instead.\n\nExisting checks and tests are implementation choices, not user requirements. Remove a check that is unnecessary, repeats other validation, or enforces a requirement that nobody asked for. Delete the tests and instructions that exist only for it, and do not replace it. Do not change useful output only to satisfy a check.\n";
7
+ /** The rules that make a first Method work quickly. They come before every other part of the guide. */
8
+ export declare const firstMethodRules = "# Build a Method\n\n1. **Sign in first.** Run `method status`. If it is not signed in, run `method login` and let the user approve in the browser. Signed in, model and classification steps need no keys, each run saves a version when the file changed, and runs appear on the dashboard.\n2. **Each model or classifier request is its own step**: `call`, `agent`, or `classify`, with its prompt in the Method, so the user can change one prompt, run again, and compare. A script never calls a model API. When the user already has code that does the work, keep its fixed logic as `run` steps and move each prompt and rubric into its own step; do not wrap the code. \"The same thing\" means the same behavior in steps. If a request cannot become a step because Method lacks a feature, tell the user what is missing.\n3. **Show the design, then build it in the same turn.** Show each step with its type, purpose, and output, and a table of the prompts and rubrics in the user's existing work, each with the step that holds it. Do not wait for approval unless the user asked to approve first. Ask only for information that you cannot find and that would change the design.\n4. **Run early and often.** Write the first steps, validate, run, then add the next steps. Fix errors. Fix each warning, or accept it with the user's reason. Never add a check only to remove a warning. A new run reuses every step whose definition and inputs did not change, so each run executes only what changed. `--rerun STEP` runs a step again anyway; `--fresh` runs every step.\n5. **Keep the inputs of the existing code.** If the code takes an ID and looks up the record, the Method takes the same ID and looks it up the same way.\n6. **Use the defaults without asking.** Model steps use the account's hosted models and `classify` uses Method's classifier, so no model or classifier keys are needed. To keep the model that existing code uses, add `models: {writer: provider/model}` to the Method and use `model: writer` in the steps (or `model: provider/model` on the step); it needs no key. Keep the models that the Method or the existing code names: when a model step fails, show the error and ask before you change its model. Run records go to the user's account. When the user asks that run data stay on this computer or not be uploaded, set `run_data: device`: the run's inputs, outputs, and files stay here, and the account keeps only each step's status and timing. Model steps still send each step's input to the model to answer it; nothing is kept. Tell the user that in one line, then run again.\n7. **Keys stay out of chat.** Declare each key that a script needs under `secrets:` with its purpose; every script of the Method receives all of its declared secrets. Run `method secret find` in the Method's folder: it lists the key files nearby and the names in each, never the values, and prints the import command. Run that command and tell the user which file each key came from: the key stays on this computer, so there is nothing to ask. If it finds nothing, ask the user to run `method secret set NAME`, which opens a private form in their browser. Never open, print, or search a key file (`cat`, `grep`, an editor), including Method's own secret store, and never ask for a value in chat: the values would go into the chat. When a run says Method's model credit is used up, run `method config model-key` yourself: it takes the user's own OpenRouter key from the one nearby key file that holds it, or opens a private form for it. Then run again.\n8. **Choose a sample yourself** from the user's data, and check that it has the sources the Method needs. Ask only when there is no good sample.\n9. **Iterate.** After a good run, show the result and the dashboard link, and ask what to change. Change the step and run again. Show only results that a run made: never write or edit a result by hand, and fix a wrong result in the Method, not in the data it reads. If you cannot run, say so.\n10. **Publish** with `method publish FILE --reason TEXT` when the user wants to share or schedule a version. It runs the Method's cases first.\n\nWhen a run fails, read its `fix` and `diagnostics`, change the step, and run again.\n";
9
+ /** How to write the prompt inside a call, agent, or classify step. */
10
+ export declare const promptRules = "# Write each prompt\n\n- **One task per prompt.** If a prompt says \"then\" or has several jobs, make several steps.\n- **Say what to do.** Leave out background that does not change the output.\n- **Show 1 to 3 examples of good output.** Take them from the user's work: examples in an existing prompt, a past output that the user approved, or the first run that the user accepts. Pass a long example as an input, not as text in the prompt.\n- **Put the output shape in `out`**, not in the prompt.\n- **Say what to do when the input does not have the answer**, for example \"leave due empty\". For classify, add an option such as `unclear`.\n\nBefore:\n\n```text\nYou are an expert support analyst with years of experience. Our company values clear\ncommunication. Read the tickets, decide which ones are urgent, write a summary, and\nreturn JSON with a \"summary\" key. Make it good.\n```\n\nAfter (urgency is a classify step before this one; the shape is in `out`):\n\n```text\nWrite a five-sentence summary of this week's support tickets for the team.\nStart with the high-urgency tickets. Quote no customer names.\nWrite it in the style of this summary from an earlier week:\n\n{{example}}\n```\n";
11
+ /** Enough of the format to write a Method without reading the JSON schema. */
12
+ export declare const fieldReference = "# Field reference\n\n```text\nformat: method/3.4\nname, goal text\ninputs {NAME: DATA} values the run receives (--inputs FILE)\nsecrets {NAME: purpose} keys that scripts receive as environment variables\nenvironment {NAME: {type: files | service | browser | desktop | tool, description}}\nfiles [PATH] helper files that scripts import or read\nsteps {ID: STEP}\nresult REF, or {NAME: REF}\nrun_data account (default) | device\n\nDATA {type: text | number | boolean | record | list | file, description,\n fields: {NAME: TYPE} (a record, or a list of records)\n items: TYPE (a list of one type)\n default: VALUE} A bare type such as text works inside fields and items.\nREF inputs.NAME | an output NAME | NAME.field | state.NAME | environment.NAME\n\nSTEP name, purpose give a run step both; purpose states its rules, result, and external changes\n in: {ALIAS: REF} the values that the step receives\n each: {ITEM: LIST_REF} run once per item; ITEM is given to the step, so do not repeat it in in\n concurrency: 1-32 items at once, for an each step that changes nothing\n when: BOOLEAN_REF after: ID or [ID] repeat: {max_iterations, until: BOOLEAN_OUTPUT}\n do: one of\n {kind: run, runtime: python | node, entrypoint: FILE, args: [...]}\n reads one JSON object (its in) on stdin, prints one JSON object (its out); files go under $METHOD_OUTPUT_DIR\n {kind: call, model: NAME, prompt: TEXT}\n the step's in go to the model as JSON; {{ALIAS}} puts a text, number, or boolean value into the prompt\n {kind: agent, model: NAME, prompt: TEXT, tools: [TOOL]}\n {kind: classify, question: TEXT, options: {ID: description}} value: {choice, probabilities}\n {kind: classify, question: TEXT, answer: yes_no} value: {answer, probability} (of yes)\n {kind: classify, question: TEXT, levels: [LOW, ..., HIGH]} value: {level, score, probabilities}; 2-10 levels\n Do counting, math, and date comparisons in a run step; the classifier reads the question literally. Choose thresholds from a few labeled samples.\n ask: TEXT in place of do: a question for the user\n out: {NAME: DATA} (classify: out: NAME)\n changes: [state.NAME | environment.NAME]; a service change needs effects or no_effect_reason\n check, limits: {timeout_ms, max_model_requests, max_agent_turns}\n accept: {CODE: reason} keep a warning or note with the user's reason\n\nmodels: {NAME: provider/model | {model, max_output_tokens, reasoning_effort}} hosted models; no key. A step without model uses the account default.\n NAME: {agent: codex | claude, model, reasoning_effort} a step with model: NAME runs on that local agent (it must be installed); --agent still overrides.\nlimits: {timeout_ms, max_model_requests, max_invocations, max_tool_calls, max_concurrency, ..., step: {timeout_ms, max_agent_turns, max_model_requests}}\ntools: {NAME: {description, in, out, run, effects}} script tools that agent steps list in tools\nid: wf_... written by the CLI at the first signed-in save; keep it. method new-id FILE makes a copy a new Method.\nConnections: a files connection uses the folder NAME beside the Method, or method bind FILE NAME --file PATH (this computer only).\nIssues: errors block; warnings and notes do not.\n```\n\n`method schema method` prints the complete JSON schema.\n";
13
+ export declare const designExamples = "# Contrasting design outlines\n\nThese are design outlines, not runnable Method files.\n\n| Request | Design | Explanation |\n| --- | --- | --- |\n| Summarize supplied text | call \u2192 return summary | The model receives all source text. Add a save step only if a saved file is requested. Use an agent if it must find or inspect additional sources. |\n| Investigate a claim | agent to research and assess \u2192 return findings | Add a separate planning, checking, or saving step only when the task needs that boundary or result. When the user requires that the findings say only what the sources say, add an agent check on the assess step (method authoring recipes). |\n| Route a message with human review for low confidence | classify \u2192 threshold run \u2192 conditional ask | Classification returns probabilities. Code applies the threshold. Human input resolves cases below the threshold. Add a separate action with an effect if the Method must send or change anything. |\n| Send a daily summary email | call to write \u2192 run to send, with an effect | The send script puts METHOD_OPERATION_ID in the Message-ID. A mail.delivery effect searches the bounce mailbox through its own read-only connection until a 5-day horizon. A bounce fails the run; no bounce by the horizon is unrefuted, not proven. |\n";
14
+ /** Cost rules for a design; in concepts, not in the start of the guide. */
15
+ export declare const costRules = "Before describing execution cost, check how the model steps run. With hosted models, a call is one request without tools, and an agent step can make several requests and use tools. With --agent, each model step starts a local agent process. State the expected model requests and agent processes when they are known; mark unknown counts as unknown.";
16
+ /** What to watch after a Method works. */
17
+ export declare const watchRules = "# Watch it\n\n- Look at failed and unconfirmed runs on the dashboard. A run that needs attention says which step failed and why.\n- For classify, watch how often the choice is `unclear` or below your threshold. A rise means the inputs changed.\n- For slow effects such as email delivery, schedule `method observe --pending`.\n";
18
+ /** What to do after a Method works: production, improvement, and script cards. */
19
+ export declare const afterRules = "# After it works\n\n- **Put it in an app:** `method connect APP_FOLDER` publishes it and prints the code to add.\n- **Improve the results:** when the user wants the results changed, `method improve FILE --note TEXT` makes a proposal from the recent runs; `method apply FILE` merges it.\n- **Explain the scripts:** `method explain FILE` writes a card for each script step.\n";
20
+ export declare const exampleSelection = "After choosing the step types, read the examples that fit the design. Use their syntax; choose the steps for this task yourself.";
@@ -0,0 +1,151 @@
1
+ /** Shared authoring text; safe to import in the dashboard and public site. */
2
+ export const authoringEntryRule = "Before creating, editing, or proposing a Method, run `method authoring` and read its guidance. Do this before choosing an existing Method as a reference.";
3
+ export const checkEditingRule = "Existing checks and tests are implementation choices, not user requirements. Remove a check that is unnecessary, repeats other validation, or enforces a requirement that nobody asked for. Delete the tests and instructions that exist only for it, and do not replace it. Do not change useful output only to satisfy a check.";
4
+ export const designProcedure = `# Choose the design
5
+
6
+ | Requirement | Step type |
7
+ | --- | --- |
8
+ | Fixed rules, calculations, file changes, or an API that is not a model | run |
9
+ | A structured model answer from supplied information | call |
10
+ | Model-directed investigation or tool use | agent |
11
+ | A choice from named options, a yes/no, or a score on ordered levels, with probabilities | classify |
12
+ | An answer or decision that must come from the user | ask |
13
+
14
+ For browser work, declare a browser environment and select it with do.browser: environment.NAME; see method authoring example social-briefing.
15
+
16
+ Add a check only when it catches a failure that matters to the result. A change to a service, an API, email, or a browser that sends needs an effect that reads the result back; local file writes need neither. When you convert existing code, do not keep its checks and tests only because they exist. The rules are in method authoring concepts.
17
+
18
+ Use when for conditions, each for collections, repeat for bounded iteration, and after for order without a data dependency. Split steps for a check, a retry, a human decision, or an external change.
19
+ `;
20
+ /** The full check rules; in concepts. */
21
+ export const checkRules = `# Checks
22
+
23
+ Add a check only when it catches a concrete failure that matters to the result. Output types and the runtime already validate shapes; do not repeat them. Do not check wording, headings, keywords, lengths, or counts unless the task requires them: "write accurate prose" is not a reason to match strings.
24
+
25
+ Use the simplest check that proves the fact: a built-in equals, count, present, or file check, a script, or an agent check. Local file writes need no check: the runtime observes files connections itself. A change to a service, an API, email, or a browser that sends needs an effect that reads the result back, because a receipt or a 200 status shows only that the request was accepted. Use a built-in observer (http, sqlite, file) when one fits. When a change cannot or need not be observed, such as a browser step that only reads, write no_effect_reason instead.
26
+
27
+ ${checkEditingRule}
28
+ `;
29
+ /** The rules that make a first Method work quickly. They come before every other part of the guide. */
30
+ export const firstMethodRules = `# Build a Method
31
+
32
+ 1. **Sign in first.** Run \`method status\`. If it is not signed in, run \`method login\` and let the user approve in the browser. Signed in, model and classification steps need no keys, each run saves a version when the file changed, and runs appear on the dashboard.
33
+ 2. **Each model or classifier request is its own step**: \`call\`, \`agent\`, or \`classify\`, with its prompt in the Method, so the user can change one prompt, run again, and compare. A script never calls a model API. When the user already has code that does the work, keep its fixed logic as \`run\` steps and move each prompt and rubric into its own step; do not wrap the code. "The same thing" means the same behavior in steps. If a request cannot become a step because Method lacks a feature, tell the user what is missing.
34
+ 3. **Show the design, then build it in the same turn.** Show each step with its type, purpose, and output, and a table of the prompts and rubrics in the user's existing work, each with the step that holds it. Do not wait for approval unless the user asked to approve first. Ask only for information that you cannot find and that would change the design.
35
+ 4. **Run early and often.** Write the first steps, validate, run, then add the next steps. Fix errors. Fix each warning, or accept it with the user's reason. Never add a check only to remove a warning. A new run reuses every step whose definition and inputs did not change, so each run executes only what changed. \`--rerun STEP\` runs a step again anyway; \`--fresh\` runs every step.
36
+ 5. **Keep the inputs of the existing code.** If the code takes an ID and looks up the record, the Method takes the same ID and looks it up the same way.
37
+ 6. **Use the defaults without asking.** Model steps use the account's hosted models and \`classify\` uses Method's classifier, so no model or classifier keys are needed. To keep the model that existing code uses, add \`models: {writer: provider/model}\` to the Method and use \`model: writer\` in the steps (or \`model: provider/model\` on the step); it needs no key. Keep the models that the Method or the existing code names: when a model step fails, show the error and ask before you change its model. Run records go to the user's account. When the user asks that run data stay on this computer or not be uploaded, set \`run_data: device\`: the run's inputs, outputs, and files stay here, and the account keeps only each step's status and timing. Model steps still send each step's input to the model to answer it; nothing is kept. Tell the user that in one line, then run again.
38
+ 7. **Keys stay out of chat.** Declare each key that a script needs under \`secrets:\` with its purpose; every script of the Method receives all of its declared secrets. Run \`method secret find\` in the Method's folder: it lists the key files nearby and the names in each, never the values, and prints the import command. Run that command and tell the user which file each key came from: the key stays on this computer, so there is nothing to ask. If it finds nothing, ask the user to run \`method secret set NAME\`, which opens a private form in their browser. Never open, print, or search a key file (\`cat\`, \`grep\`, an editor), including Method's own secret store, and never ask for a value in chat: the values would go into the chat. When a run says Method's model credit is used up, run \`method config model-key\` yourself: it takes the user's own OpenRouter key from the one nearby key file that holds it, or opens a private form for it. Then run again.
39
+ 8. **Choose a sample yourself** from the user's data, and check that it has the sources the Method needs. Ask only when there is no good sample.
40
+ 9. **Iterate.** After a good run, show the result and the dashboard link, and ask what to change. Change the step and run again. Show only results that a run made: never write or edit a result by hand, and fix a wrong result in the Method, not in the data it reads. If you cannot run, say so.
41
+ 10. **Publish** with \`method publish FILE --reason TEXT\` when the user wants to share or schedule a version. It runs the Method's cases first.
42
+
43
+ When a run fails, read its \`fix\` and \`diagnostics\`, change the step, and run again.
44
+ `;
45
+ /** How to write the prompt inside a call, agent, or classify step. */
46
+ export const promptRules = `# Write each prompt
47
+
48
+ - **One task per prompt.** If a prompt says "then" or has several jobs, make several steps.
49
+ - **Say what to do.** Leave out background that does not change the output.
50
+ - **Show 1 to 3 examples of good output.** Take them from the user's work: examples in an existing prompt, a past output that the user approved, or the first run that the user accepts. Pass a long example as an input, not as text in the prompt.
51
+ - **Put the output shape in \`out\`**, not in the prompt.
52
+ - **Say what to do when the input does not have the answer**, for example "leave due empty". For classify, add an option such as \`unclear\`.
53
+
54
+ Before:
55
+
56
+ \`\`\`text
57
+ You are an expert support analyst with years of experience. Our company values clear
58
+ communication. Read the tickets, decide which ones are urgent, write a summary, and
59
+ return JSON with a "summary" key. Make it good.
60
+ \`\`\`
61
+
62
+ After (urgency is a classify step before this one; the shape is in \`out\`):
63
+
64
+ \`\`\`text
65
+ Write a five-sentence summary of this week's support tickets for the team.
66
+ Start with the high-urgency tickets. Quote no customer names.
67
+ Write it in the style of this summary from an earlier week:
68
+
69
+ {{example}}
70
+ \`\`\`
71
+ `;
72
+ /** Enough of the format to write a Method without reading the JSON schema. */
73
+ export const fieldReference = `# Field reference
74
+
75
+ \`\`\`text
76
+ format: method/3.4
77
+ name, goal text
78
+ inputs {NAME: DATA} values the run receives (--inputs FILE)
79
+ secrets {NAME: purpose} keys that scripts receive as environment variables
80
+ environment {NAME: {type: files | service | browser | desktop | tool, description}}
81
+ files [PATH] helper files that scripts import or read
82
+ steps {ID: STEP}
83
+ result REF, or {NAME: REF}
84
+ run_data account (default) | device
85
+
86
+ DATA {type: text | number | boolean | record | list | file, description,
87
+ fields: {NAME: TYPE} (a record, or a list of records)
88
+ items: TYPE (a list of one type)
89
+ default: VALUE} A bare type such as text works inside fields and items.
90
+ REF inputs.NAME | an output NAME | NAME.field | state.NAME | environment.NAME
91
+
92
+ STEP name, purpose give a run step both; purpose states its rules, result, and external changes
93
+ in: {ALIAS: REF} the values that the step receives
94
+ each: {ITEM: LIST_REF} run once per item; ITEM is given to the step, so do not repeat it in in
95
+ concurrency: 1-32 items at once, for an each step that changes nothing
96
+ when: BOOLEAN_REF after: ID or [ID] repeat: {max_iterations, until: BOOLEAN_OUTPUT}
97
+ do: one of
98
+ {kind: run, runtime: python | node, entrypoint: FILE, args: [...]}
99
+ reads one JSON object (its in) on stdin, prints one JSON object (its out); files go under $METHOD_OUTPUT_DIR
100
+ {kind: call, model: NAME, prompt: TEXT}
101
+ the step's in go to the model as JSON; {{ALIAS}} puts a text, number, or boolean value into the prompt
102
+ {kind: agent, model: NAME, prompt: TEXT, tools: [TOOL]}
103
+ {kind: classify, question: TEXT, options: {ID: description}} value: {choice, probabilities}
104
+ {kind: classify, question: TEXT, answer: yes_no} value: {answer, probability} (of yes)
105
+ {kind: classify, question: TEXT, levels: [LOW, ..., HIGH]} value: {level, score, probabilities}; 2-10 levels
106
+ Do counting, math, and date comparisons in a run step; the classifier reads the question literally. Choose thresholds from a few labeled samples.
107
+ ask: TEXT in place of do: a question for the user
108
+ out: {NAME: DATA} (classify: out: NAME)
109
+ changes: [state.NAME | environment.NAME]; a service change needs effects or no_effect_reason
110
+ check, limits: {timeout_ms, max_model_requests, max_agent_turns}
111
+ accept: {CODE: reason} keep a warning or note with the user's reason
112
+
113
+ models: {NAME: provider/model | {model, max_output_tokens, reasoning_effort}} hosted models; no key. A step without model uses the account default.
114
+ NAME: {agent: codex | claude, model, reasoning_effort} a step with model: NAME runs on that local agent (it must be installed); --agent still overrides.
115
+ limits: {timeout_ms, max_model_requests, max_invocations, max_tool_calls, max_concurrency, ..., step: {timeout_ms, max_agent_turns, max_model_requests}}
116
+ tools: {NAME: {description, in, out, run, effects}} script tools that agent steps list in tools
117
+ id: wf_... written by the CLI at the first signed-in save; keep it. method new-id FILE makes a copy a new Method.
118
+ Connections: a files connection uses the folder NAME beside the Method, or method bind FILE NAME --file PATH (this computer only).
119
+ Issues: errors block; warnings and notes do not.
120
+ \`\`\`
121
+
122
+ \`method schema method\` prints the complete JSON schema.
123
+ `;
124
+ export const designExamples = `# Contrasting design outlines
125
+
126
+ These are design outlines, not runnable Method files.
127
+
128
+ | Request | Design | Explanation |
129
+ | --- | --- | --- |
130
+ | Summarize supplied text | call → return summary | The model receives all source text. Add a save step only if a saved file is requested. Use an agent if it must find or inspect additional sources. |
131
+ | Investigate a claim | agent to research and assess → return findings | Add a separate planning, checking, or saving step only when the task needs that boundary or result. When the user requires that the findings say only what the sources say, add an agent check on the assess step (method authoring recipes). |
132
+ | Route a message with human review for low confidence | classify → threshold run → conditional ask | Classification returns probabilities. Code applies the threshold. Human input resolves cases below the threshold. Add a separate action with an effect if the Method must send or change anything. |
133
+ | Send a daily summary email | call to write → run to send, with an effect | The send script puts METHOD_OPERATION_ID in the Message-ID. A mail.delivery effect searches the bounce mailbox through its own read-only connection until a 5-day horizon. A bounce fails the run; no bounce by the horizon is unrefuted, not proven. |
134
+ `;
135
+ /** Cost rules for a design; in concepts, not in the start of the guide. */
136
+ export const costRules = "Before describing execution cost, check how the model steps run. With hosted models, a call is one request without tools, and an agent step can make several requests and use tools. With --agent, each model step starts a local agent process. State the expected model requests and agent processes when they are known; mark unknown counts as unknown.";
137
+ /** What to watch after a Method works. */
138
+ export const watchRules = `# Watch it
139
+
140
+ - Look at failed and unconfirmed runs on the dashboard. A run that needs attention says which step failed and why.
141
+ - For classify, watch how often the choice is \`unclear\` or below your threshold. A rise means the inputs changed.
142
+ - For slow effects such as email delivery, schedule \`method observe --pending\`.
143
+ `;
144
+ /** What to do after a Method works: production, improvement, and script cards. */
145
+ export const afterRules = `# After it works
146
+
147
+ - **Put it in an app:** \`method connect APP_FOLDER\` publishes it and prints the code to add.
148
+ - **Improve the results:** when the user wants the results changed, \`method improve FILE --note TEXT\` makes a proposal from the recent runs; \`method apply FILE\` merges it.
149
+ - **Explain the scripts:** \`method explain FILE\` writes a card for each script step.
150
+ `;
151
+ export const exampleSelection = "After choosing the step types, read the examples that fit the design. Use their syntax; choose the steps for this task yourself.";
@@ -0,0 +1,2 @@
1
+ /** The prompt for agents without the Method plugin. The installed guide holds the rules; this prompt only starts them. */
2
+ export declare const authoringPrompt = "Help me turn repeated work into a Method with the Method CLI. Do the setup first, without asking me:\n\n1. If `which method` finds nothing, install Method now with `curl -fsSL https://app.withmethod.ai/install.sh | sh`. I approve this installer.\n2. Run `method login` and wait while I approve the sign-in in my browser.\n3. Run `method authoring` and follow it.\n\nThen ask me what work to turn into a Method. Make each prompt its own step, so that I can improve it. Run it on a sample, show me the result and the dashboard link, and ask me what to change.";
@@ -0,0 +1,8 @@
1
+ /** The prompt for agents without the Method plugin. The installed guide holds the rules; this prompt only starts them. */
2
+ export const authoringPrompt = `Help me turn repeated work into a Method with the Method CLI. Do the setup first, without asking me:
3
+
4
+ 1. If \`which method\` finds nothing, install Method now with \`curl -fsSL https://app.withmethod.ai/install.sh | sh\`. I approve this installer.
5
+ 2. Run \`method login\` and wait while I approve the sign-in in my browser.
6
+ 3. Run \`method authoring\` and follow it.
7
+
8
+ Then ask me what work to turn into a Method. Make each prompt its own step, so that I can improve it. Run it on a sample, show me the result and the dashboard link, and ask me what to change.`;
@@ -0,0 +1,10 @@
1
+ export declare function writeDocument(path: string, value: unknown): void;
2
+ export declare const authoringHelp: string;
3
+ export declare function authoringPath(path: string): string;
4
+ export declare const readDocument: (file: string) => any;
5
+ export declare function at(document: any, path: string): any;
6
+ export declare function change(document: any, path: string, value: any, remove?: boolean): any;
7
+ /** Read, change, and replace the file in one rename. */
8
+ export declare function editDocument(file: string, edit: (doc: any) => any): any;
9
+ export declare function differences(a: any, b: any, path?: string): any[];
10
+ export declare function localAuthoring(args: string[]): Promise<boolean>;