chainlesschain 0.166.142 → 0.166.143

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 (169) hide show
  1. package/README.md +107 -2
  2. package/package.json +2 -2
  3. package/src/assets/linux-subreaper/linux-arm64/manifest.json +1 -1
  4. package/src/assets/linux-subreaper/linux-x64/manifest.json +1 -1
  5. package/src/assets/web-panel/assets/{AIOps-BefmcZw2.js → AIOps-DNySV2Kf.js} +1 -1
  6. package/src/assets/web-panel/assets/{ActionButton-BBlS9rmj.js → ActionButton-ByFuxJsa.js} +1 -1
  7. package/src/assets/web-panel/assets/{Analytics-DfNjXT9e.js → Analytics-ETbdywk5.js} +1 -1
  8. package/src/assets/web-panel/assets/{AppLayout-CIBZPPMS.js → AppLayout-CuHekZaP.js} +2 -2
  9. package/src/assets/web-panel/assets/{Artifacts-CE66rTTZ.js → Artifacts-BJJq2BDq.js} +1 -1
  10. package/src/assets/web-panel/assets/{Audit-DOC8Lt8U.js → Audit-DXrietv8.js} +1 -1
  11. package/src/assets/web-panel/assets/{BackgroundAgents-9TMG041Q.js → BackgroundAgents-CFB1fxsr.js} +1 -1
  12. package/src/assets/web-panel/assets/{Backup-us3KWb9F.js → Backup-VLtflRmp.js} +1 -1
  13. package/src/assets/web-panel/assets/{BaseInput-D6Q95Wr5.js → BaseInput-BbqBaS2r.js} +1 -1
  14. package/src/assets/web-panel/assets/{Chat-BPrM5ARp.js → Chat-t0g7BXL8.js} +1 -1
  15. package/src/assets/web-panel/assets/{ChatBubbleRenderer-Drs9vSc4.js → ChatBubbleRenderer-JNFsjV0j.js} +1 -1
  16. package/src/assets/web-panel/assets/{Checkbox-DqZGMV0o.js → Checkbox-BCSclHQb.js} +1 -1
  17. package/src/assets/web-panel/assets/{Codegen-CmolL6wr.js → Codegen-BcyINEHT.js} +1 -1
  18. package/src/assets/web-panel/assets/{Col-BwHSmoYQ.js → Col-C-0WNlwS.js} +1 -1
  19. package/src/assets/web-panel/assets/{Community-DGWqobpd.js → Community-DxZeoORX.js} +1 -1
  20. package/src/assets/web-panel/assets/{Compact-t_yy09-r.js → Compact-BNnX4jpz.js} +1 -1
  21. package/src/assets/web-panel/assets/{Compliance-D0S8-EsN.js → Compliance-KnjHtn9C.js} +1 -1
  22. package/src/assets/web-panel/assets/{Cowork-Y1LiuRwP.js → Cowork-CDyCrhbX.js} +1 -1
  23. package/src/assets/web-panel/assets/{Cron-FTqEw7QV.js → Cron-DxpS3D1G.js} +1 -1
  24. package/src/assets/web-panel/assets/{Crosschain-C3rPZ4Qu.js → Crosschain-BSzTZYyc.js} +1 -1
  25. package/src/assets/web-panel/assets/{DID-Ba2zySM-.js → DID-Bfj9Vdne.js} +1 -1
  26. package/src/assets/web-panel/assets/{Dashboard-D6xyN2ND.js → Dashboard-CcERVdgo.js} +2 -2
  27. package/src/assets/web-panel/assets/{Dropdown-BF4QuXJw.js → Dropdown-BtYXAz6E.js} +1 -1
  28. package/src/assets/web-panel/assets/{EmailListRenderer-s9dUxq14.js → EmailListRenderer-fdCMeGXU.js} +1 -1
  29. package/src/assets/web-panel/assets/{EvolutionSettings-CoAKOfqZ.js → EvolutionSettings-LHxhcuF2.js} +1 -1
  30. package/src/assets/web-panel/assets/{FamilyGuardDashboard-CEznwH1c.js → FamilyGuardDashboard-MIgtLsos.js} +1 -1
  31. package/src/assets/web-panel/assets/{Federation-rIzOt8-a.js → Federation-9-TOztwa.js} +1 -1
  32. package/src/assets/web-panel/assets/{FormItemContext-BARFiExr.js → FormItemContext-BKcwEE6w.js} +1 -1
  33. package/src/assets/web-panel/assets/{GenericCardRenderer-DI0A4swS.js → GenericCardRenderer-DJBPVUK2.js} +1 -1
  34. package/src/assets/web-panel/assets/{Git-DdmysND4.js → Git-C_XYISjG.js} +1 -1
  35. package/src/assets/web-panel/assets/{Governance-DrdhwUz2.js → Governance-DWsbPrwq.js} +1 -1
  36. package/src/assets/web-panel/assets/{Inference-Scm8tumd.js → Inference-D0_bYket.js} +1 -1
  37. package/src/assets/web-panel/assets/{KnowledgeGraph-_6bgPs4W.js → KnowledgeGraph-BoA3VQlw.js} +1 -1
  38. package/src/assets/web-panel/assets/{Logs-DW_v7bSo.js → Logs-LEGItChf.js} +1 -1
  39. package/src/assets/web-panel/assets/{MarkdownRenderer-7JABuv1j.js → MarkdownRenderer-DOHVc-Uw.js} +1 -1
  40. package/src/assets/web-panel/assets/{Marketplace-0h3YSvME.js → Marketplace-BKovl9NH.js} +1 -1
  41. package/src/assets/web-panel/assets/{McpTools-Byrg0Y3e.js → McpTools-D61ktoGb.js} +1 -1
  42. package/src/assets/web-panel/assets/{Memory-Cyoq-o29.js → Memory-CllorS0l.js} +1 -1
  43. package/src/assets/web-panel/assets/{MobileBridge-ISIlploU.js → MobileBridge-D-dJ78bk.js} +1 -1
  44. package/src/assets/web-panel/assets/{MobileProjects-04EncaRx.js → MobileProjects-CaxMKkd3.js} +1 -1
  45. package/src/assets/web-panel/assets/{Mtc-BMzkpyOF.js → Mtc-qEc62Qsx.js} +1 -1
  46. package/src/assets/web-panel/assets/{MtcAudit-Cx7BR5sz.js → MtcAudit-BY68jOZJ.js} +1 -1
  47. package/src/assets/web-panel/assets/{Multisig-D4pmkSX4.js → Multisig-eCCR8ELt.js} +1 -1
  48. package/src/assets/web-panel/assets/{NLProgramming-CCfaaWNu.js → NLProgramming-VtGv8pky.js} +1 -1
  49. package/src/assets/web-panel/assets/{Notes-Mq-1ZyaH.js → Notes-CPkYQySe.js} +1 -1
  50. package/src/assets/web-panel/assets/{NotificationSettings-rzf5V1TR.js → NotificationSettings-BuAvlHUu.js} +1 -1
  51. package/src/assets/web-panel/assets/{OrderTableRenderer-OREUs5ue.js → OrderTableRenderer-CLf_HAGv.js} +1 -1
  52. package/src/assets/web-panel/assets/{Organization-BQfOATgw.js → Organization-DjujhMbD.js} +1 -1
  53. package/src/assets/web-panel/assets/{Overflow-D7Pa6aaA.js → Overflow-RznznTS4.js} +1 -1
  54. package/src/assets/web-panel/assets/{P2P-CaJ79ZsC.js → P2P-DSa5ot0t.js} +1 -1
  55. package/src/assets/web-panel/assets/{PdhVaultBrowser-CtimQQN3.js → PdhVaultBrowser-oSEh6vkf.js} +2 -2
  56. package/src/assets/web-panel/assets/{Permissions-AzmmkLZ0.js → Permissions-CdOZguX9.js} +1 -1
  57. package/src/assets/web-panel/assets/{PersonalDataHub-BRU8ME7z.js → PersonalDataHub-B4--6iEF.js} +1 -1
  58. package/src/assets/web-panel/assets/{Pipeline-BnNqutXh.js → Pipeline-BnI57jE8.js} +1 -1
  59. package/src/assets/web-panel/assets/{Privacy-gMyZcxsz.js → Privacy-C8MId3ad.js} +1 -1
  60. package/src/assets/web-panel/assets/{ProjectInit-CkK-Fvr0.js → ProjectInit-DPGyYO8a.js} +1 -1
  61. package/src/assets/web-panel/assets/{ProjectSettings-CGY_uiIX.js → ProjectSettings-qBMqaJaO.js} +1 -1
  62. package/src/assets/web-panel/assets/{Projects-DBNC7xXG.js → Projects-Bq87Syce.js} +1 -1
  63. package/src/assets/web-panel/assets/{Providers-BVgWawtE.js → Providers-CVuG9Ugf.js} +1 -1
  64. package/src/assets/web-panel/assets/{QrScannerModal-DZILESCa.js → QrScannerModal-C94c8m3q.js} +1 -1
  65. package/src/assets/web-panel/assets/{QuickAsk-DwRBzFWW.js → QuickAsk-BvfsXZ8s.js} +1 -1
  66. package/src/assets/web-panel/assets/{Recommend-B3VxvUih.js → Recommend-CoezBYH9.js} +1 -1
  67. package/src/assets/web-panel/assets/{RemoteSession-DM74lufU.js → RemoteSession-CcYC4v3u.js} +1 -1
  68. package/src/assets/web-panel/assets/{Reputation-DOOEuGHh.js → Reputation-diDbL4cO.js} +1 -1
  69. package/src/assets/web-panel/assets/{Row-BZJYAo0S.js → Row-5qp3_fNS.js} +1 -1
  70. package/src/assets/web-panel/assets/{RssFeed-CYw44jcD.js → RssFeed-BCsMvpV4.js} +1 -1
  71. package/src/assets/web-panel/assets/{Search-CbypjDNG.js → Search-Br9nVxOp.js} +1 -1
  72. package/src/assets/web-panel/assets/{Security-0rSBDrXh.js → Security-BdOUzRfA.js} +1 -1
  73. package/src/assets/web-panel/assets/{Services-kqP79CBD.js → Services-Cp9TqzyN.js} +1 -1
  74. package/src/assets/web-panel/assets/{Skeleton-BjxvGVfI.js → Skeleton-DSdWsUMR.js} +1 -1
  75. package/src/assets/web-panel/assets/{Skills-SOoWyPCO.js → Skills-DRczAMTe.js} +1 -1
  76. package/src/assets/web-panel/assets/{Sla-kdRVAT19.js → Sla-B6G_Vd8N.js} +1 -1
  77. package/src/assets/web-panel/assets/{SpeechSettings-DILtcMaJ.js → SpeechSettings-BCcLx5x4.js} +1 -1
  78. package/src/assets/web-panel/assets/{SyncSettings-C98Jauc4.js → SyncSettings-BFhwtxCp.js} +1 -1
  79. package/src/assets/web-panel/assets/{Tasks-Bw-KaQAs.js → Tasks-DGRE6VHO.js} +1 -1
  80. package/src/assets/web-panel/assets/{Templates-CDJ027Hd.js → Templates-CJkJRFzd.js} +1 -1
  81. package/src/assets/web-panel/assets/{Tenant-BqNV62UA.js → Tenant-CAOv6p00.js} +1 -1
  82. package/src/assets/web-panel/assets/{Terminal-B8aQ3GLO.js → Terminal-CDrwwrKj.js} +1 -1
  83. package/src/assets/web-panel/assets/{TimelineRenderer-BSpccq11.js → TimelineRenderer-DI0YE2SN.js} +1 -1
  84. package/src/assets/web-panel/assets/{Tokens-BbGMoFO6.js → Tokens-DmqWTZSG.js} +1 -1
  85. package/src/assets/web-panel/assets/{Trigger-D75Mawa_.js → Trigger-CkXkhmjk.js} +1 -1
  86. package/src/assets/web-panel/assets/{Trust-BiK_Pk05.js → Trust-U8YJLcoJ.js} +1 -1
  87. package/src/assets/web-panel/assets/{UkeySign-Dv2xX_b9.js → UkeySign-BLTozMmr.js} +1 -1
  88. package/src/assets/web-panel/assets/{VideoEditing-CdBWfeEE.js → VideoEditing-DHKyFlZa.js} +1 -1
  89. package/src/assets/web-panel/assets/{Wallet-Cvrp4agg.js → Wallet-DapBxIQt.js} +1 -1
  90. package/src/assets/web-panel/assets/{WebAuthn-D0Htlf3v.js → WebAuthn-CkvG3yOr.js} +1 -1
  91. package/src/assets/web-panel/assets/{WorkflowEditor-nuUBOHIF.js → WorkflowEditor-cNLsinXP.js} +1 -1
  92. package/src/assets/web-panel/assets/{chat-C6MLShIo.js → chat-BzgkgfMC.js} +1 -1
  93. package/src/assets/web-panel/assets/{colors-9G5FqFOC.js → colors-BPpVKQsb.js} +1 -1
  94. package/src/assets/web-panel/assets/{compact-item-0M49EurU.js → compact-item-zepznuTv.js} +1 -1
  95. package/src/assets/web-panel/assets/{createContext-CiDDLED_.js → createContext-BRto-SQH.js} +1 -1
  96. package/src/assets/web-panel/assets/{hasIn-wZvUczmn.js → hasIn-CqsmU_n6.js} +1 -1
  97. package/src/assets/web-panel/assets/{index-B0JZ_ccM.js → index-B-bNzvdU.js} +1 -1
  98. package/src/assets/web-panel/assets/{index-B_XOMujL.js → index-B0Z6rfV-.js} +1 -1
  99. package/src/assets/web-panel/assets/{index-DwX9cOL6.js → index-B9_jRD2e.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-DwUOiN8M.js → index-BEXKES7V.js} +1 -1
  101. package/src/assets/web-panel/assets/{index-8jz-X3xg.js → index-BGHd4D8F.js} +1 -1
  102. package/src/assets/web-panel/assets/{index-BVV2mBbo.js → index-BLwY9y0X.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-qJcOtd8J.js → index-B_l6gfDh.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-B6TAOS4G.js → index-BeBxP1M6.js} +1 -1
  105. package/src/assets/web-panel/assets/{index-C63qiwQz.js → index-BeSzdB7x.js} +1 -1
  106. package/src/assets/web-panel/assets/{index-k0BVfcwQ.js → index-BuBnM6Kz.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-BXIY2BIN.js → index-Bz7pG8z3.js} +1 -1
  108. package/src/assets/web-panel/assets/{index-D51V5vmz.js → index-CBI-7Q3W.js} +1 -1
  109. package/src/assets/web-panel/assets/{index-BWTcG128.js → index-CTk9gY88.js} +1 -1
  110. package/src/assets/web-panel/assets/{index-sBsJaBmM.js → index-CdHXVSZ4.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-Dclwd_lj.js → index-CmPnDXx4.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-BlcOkfzz.js → index-CnezE05k.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-DOxTmc3k.js → index-CwkhrUmw.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-Cs66y4oC.js → index-CzoKAiyT.js} +3 -3
  115. package/src/assets/web-panel/assets/{index-BzeA3eRQ.js → index-DDPmr5Yr.js} +1 -1
  116. package/src/assets/web-panel/assets/{index-CdaLWIz-.js → index-DEbAW3Ec.js} +1 -1
  117. package/src/assets/web-panel/assets/{index-DvWRS-s7.js → index-DJSn3owP.js} +1 -1
  118. package/src/assets/web-panel/assets/{index-DN9t1qjW.js → index-DKa_jSfj.js} +1 -1
  119. package/src/assets/web-panel/assets/{index-BTCIIdoS.js → index-DUclk35X.js} +1 -1
  120. package/src/assets/web-panel/assets/{index-BmS2P_eX.js → index-DXkw-nt5.js} +1 -1
  121. package/src/assets/web-panel/assets/{index-CoxzvhoN.js → index-D_-w4KkD.js} +1 -1
  122. package/src/assets/web-panel/assets/{index-Cz1SAgnb.js → index-D_asIcU7.js} +1 -1
  123. package/src/assets/web-panel/assets/{index-BfwJm0DU.js → index-Df_CY0We.js} +1 -1
  124. package/src/assets/web-panel/assets/{index-JhfNEldK.js → index-Dnvj_XU-.js} +1 -1
  125. package/src/assets/web-panel/assets/index-DruOFzuF.js +1 -0
  126. package/src/assets/web-panel/assets/{index-D9J_tLGk.js → index-DvGttIXQ.js} +1 -1
  127. package/src/assets/web-panel/assets/{index-DcZxOXd8.js → index-JrVhUwyh.js} +1 -1
  128. package/src/assets/web-panel/assets/{index-CdUmgLxP.js → index-LVvzNdPa.js} +1 -1
  129. package/src/assets/web-panel/assets/{index-CTy9gD3m.js → index-Q5sAV7wp.js} +1 -1
  130. package/src/assets/web-panel/assets/{index-CtbFv3Et.js → index-S8fkzbQ_.js} +1 -1
  131. package/src/assets/web-panel/assets/{index-BCfxxScC.js → index-Z6DBe2RU.js} +1 -1
  132. package/src/assets/web-panel/assets/{index-dJ_V_Fqy.js → index-faHHtBKj.js} +1 -1
  133. package/src/assets/web-panel/assets/index-hhOrZ6HO.js +1 -0
  134. package/src/assets/web-panel/assets/{index-DeHSwWVG.js → index-w36TkwyO.js} +1 -1
  135. package/src/assets/web-panel/assets/{index-D2wN6VIq.js → index-wbvZayBb.js} +1 -1
  136. package/src/assets/web-panel/assets/{initDefaultProps-DyIyjurJ.js → initDefaultProps-BlhbrsQk.js} +1 -1
  137. package/src/assets/web-panel/assets/{motion-B2D0PuTM.js → motion-UZx12NPM.js} +1 -1
  138. package/src/assets/web-panel/assets/{move-B22T5MnN.js → move-BTby5W4q.js} +1 -1
  139. package/src/assets/web-panel/assets/{mtc-parser-i4b7HNzF.js → mtc-parser-BOOaGiCg.js} +1 -1
  140. package/src/assets/web-panel/assets/{omit-ByNIr_gz.js → omit-BVylGzEr.js} +1 -1
  141. package/src/assets/web-panel/assets/{pickAttrs-_xP2RvxA.js → pickAttrs-Cp3Nflbr.js} +1 -1
  142. package/src/assets/web-panel/assets/{placementArrow-CVDvzK0z.js → placementArrow-BVXYvwH2.js} +1 -1
  143. package/src/assets/web-panel/assets/{responsiveObserve-CI1toXJ_.js → responsiveObserve-C67SbpBN.js} +1 -1
  144. package/src/assets/web-panel/assets/{slide-2_VosSRQ.js → slide-CnBvM22R.js} +1 -1
  145. package/src/assets/web-panel/assets/{statusUtils-CMiWWrZC.js → statusUtils-T8fy53tf.js} +1 -1
  146. package/src/assets/web-panel/assets/{styleChecker-DY8wTVCe.js → styleChecker-Bf7i4nlm.js} +1 -1
  147. package/src/assets/web-panel/assets/{useFlexGapSupport-DkdcgIyl.js → useFlexGapSupport-BUKk7jqw.js} +1 -1
  148. package/src/assets/web-panel/assets/{useFs-gpl11PEF.js → useFs-T5lg6SpD.js} +1 -1
  149. package/src/assets/web-panel/assets/{usePersonalDataHub-DqnQ0H9y.js → usePersonalDataHub-Brvye8Tg.js} +1 -1
  150. package/src/assets/web-panel/assets/{vnode-CgY9xUvr.js → vnode-CK992ojP.js} +1 -1
  151. package/src/assets/web-panel/assets/{zoom-Ch0jan5_.js → zoom-CcABB_97.js} +1 -1
  152. package/src/assets/web-panel/index.html +1 -1
  153. package/src/command-help-index.json +1 -1
  154. package/src/commands/goal.js +211 -177
  155. package/src/commands/setup.js +17 -0
  156. package/src/data/changelog.json +14 -1
  157. package/src/lib/llm-onboarding-catalog.json +4 -3
  158. package/src/lib/plugin-runtime/cli-goal-capabilities.js +1 -0
  159. package/src/lib/plugin-runtime/cli-goal-draft-request.js +24 -10
  160. package/src/lib/plugin-runtime/cli-goal-drafts.js +77 -30
  161. package/src/lib/plugin-runtime/examples/goal-task-creator/README.md +60 -0
  162. package/src/lib/plugin-runtime/examples/goal-task-creator/plugin.json +13 -0
  163. package/src/lib/plugin-runtime/examples/project-delivery-assistant/README.md +47 -14
  164. package/src/lib/plugin-runtime/examples/project-delivery-assistant/plugin.json +8 -7
  165. package/src/lib/plugin-runtime/goal-extensions.js +1 -0
  166. package/src/lib/project-goal-connection.js +15 -3
  167. package/src/lib/project-goal-draft-connection.js +18 -11
  168. package/src/assets/web-panel/assets/index-C101Sec6.js +0 -1
  169. package/src/assets/web-panel/assets/index-D23TaGOp.js +0 -1
@@ -11,20 +11,26 @@ import { readGoalDraftDescription } from "./cli-goal-draft-request.js";
11
11
  import { digestBusinessObjectContent as digest } from "@chainlesschain/session-core/business-object-contract";
12
12
  import {
13
13
  ACCESS_SCHEMA,
14
+ CREATE_ACCESS_SCHEMA,
14
15
  MAX_SUBMISSION_REFERENCE_BYTES,
15
16
  validateGoalDraftAccess,
17
+ validateGoalCreateDraftAccess,
16
18
  validateGoalDraftProposal,
19
+ validateGoalCreateDraftProposal,
17
20
  validateGoalDraftReceipt,
18
21
  validateGoalDraftSources,
19
22
  createGoalDraftSubmissionReference,
20
23
  validateGoalDraftSubmissionReference,
21
24
  } from "@chainlesschain/session-core/goal-draft-connection-contract";
22
25
 
23
- const HOST = cliGoalExtensionHost(["proposal:task.description.update"]);
24
26
  export const CLI_GOAL_DRAFT_SUBMISSION_SCHEMA =
25
27
  "chainlesschain.goal-draft-submission/v1";
26
28
  export const CLI_GOAL_DRAFT_SOURCES_SCHEMA =
27
29
  "chainlesschain.goal-draft-source-page/v1";
30
+ export const CLI_GOAL_CREATE_DRAFT_SUBMISSION_SCHEMA =
31
+ "chainlesschain.goal-create-draft-submission/v1";
32
+ export const CLI_GOAL_CREATE_DRAFT_SOURCES_SCHEMA =
33
+ "chainlesschain.goal-create-draft-source-page/v1";
28
34
  export const _deps = {
29
35
  createProjectGoalConnection,
30
36
  collectGoalExtensions,
@@ -44,7 +50,7 @@ function required(value) {
44
50
  fail("CLI_GOAL_DRAFT_ARGUMENTS_REQUIRED");
45
51
  return value;
46
52
  }
47
- function fixedOptions(raw) {
53
+ function fixedOptions(raw, creation = false) {
48
54
  const options = { ...raw },
49
55
  env = Object.freeze({ ...(options.env || process.env) });
50
56
  const cwd = path.resolve(options.cwd || process.cwd());
@@ -68,6 +74,8 @@ function fixedOptions(raw) {
68
74
  );
69
75
  return Object.freeze({
70
76
  ...options,
77
+ creation,
78
+ draftType: creation ? "task.create" : "task.description.update",
71
79
  cwd,
72
80
  env,
73
81
  managedSettingsFile: managedSettingsPath({
@@ -81,7 +89,7 @@ function hostOptions(options) {
81
89
  cwd: options.cwd,
82
90
  env: options.env,
83
91
  managedSettingsFile: options.managedSettingsFile,
84
- host: HOST,
92
+ host: cliGoalExtensionHost([`proposal:${options.draftType}`]),
85
93
  });
86
94
  }
87
95
  function admitted(options, expected) {
@@ -90,13 +98,12 @@ function admitted(options, expected) {
90
98
  .extensions.find(
91
99
  (item) => item.name === options.plugin && item.scope === options.scope,
92
100
  );
93
- if (
94
- !entry ||
95
- !entry.declaration.proposals.includes("task.description.update")
96
- )
101
+ if (!entry || !entry.declaration.proposals.includes(options.draftType))
97
102
  fail("CLI_GOAL_DRAFT_NOT_ADMITTED");
98
- const access = validateGoalDraftAccess({
99
- schema: ACCESS_SCHEMA,
103
+ const access = (
104
+ options.creation ? validateGoalCreateDraftAccess : validateGoalDraftAccess
105
+ )({
106
+ schema: options.creation ? CREATE_ACCESS_SCHEMA : ACCESS_SCHEMA,
100
107
  plugin: { name: entry.name, scope: entry.scope, version: entry.version },
101
108
  declarationDigest: digest(entry.declaration),
102
109
  });
@@ -109,7 +116,9 @@ function connected(id, options) {
109
116
  required(options.connection);
110
117
  const connection = _deps.createProjectGoalConnection(options.connection);
111
118
  if (
112
- connection.drafts !== true ||
119
+ (options.creation
120
+ ? connection.createDrafts !== true || connection.drafts === true
121
+ : connection.drafts !== true || connection.createDrafts === true) ||
113
122
  !["read", "sources", "receipt", "enqueue"].every(
114
123
  (key) => typeof connection[key] === "function",
115
124
  )
@@ -225,9 +234,12 @@ function referenceFor(connection, access, requestId, inputDigest) {
225
234
  inputDigest,
226
235
  });
227
236
  }
228
- function outcome(reference, file, receipt) {
237
+ function outcome(reference, file, receipt, creation = false) {
229
238
  return {
230
- schema: CLI_GOAL_DRAFT_SUBMISSION_SCHEMA,
239
+ schema: creation
240
+ ? CLI_GOAL_CREATE_DRAFT_SUBMISSION_SCHEMA
241
+ : CLI_GOAL_DRAFT_SUBMISSION_SCHEMA,
242
+ ...(creation ? { type: "task.create" } : {}),
231
243
  state: receipt?.state ?? "unknown",
232
244
  goalRef: reference.goalRef,
233
245
  plugin: reference.plugin,
@@ -253,28 +265,40 @@ async function queryReceipt(connection, saved, file) {
253
265
  receipt.inputDigest !== saved.reference.inputDigest
254
266
  )
255
267
  fail("CLI_GOAL_DRAFT_RECEIPT_MISMATCH");
256
- return outcome(saved.reference, file, receipt);
268
+ return outcome(
269
+ saved.reference,
270
+ file,
271
+ receipt,
272
+ connection.createDrafts === true,
273
+ );
257
274
  } catch {
258
- return outcome(saved.reference, file);
275
+ return outcome(
276
+ saved.reference,
277
+ file,
278
+ undefined,
279
+ connection.createDrafts === true,
280
+ );
259
281
  }
260
282
  }
261
283
 
262
284
  /** Exports an identity label and declaration digest, never native authority. */
263
- export async function exportCliGoalDraftAccess(raw = {}) {
264
- const options = fixedOptions(raw);
285
+ async function exportAccess(raw = {}, creation = false) {
286
+ const options = fixedOptions(raw, creation);
265
287
  required(options.out);
266
288
  const access = admitted(options);
267
289
  writeNew(options.out, access);
268
290
  return {
269
- schema: "chainlesschain.goal-draft-access-export/v1",
291
+ schema: options.creation
292
+ ? "chainlesschain.goal-create-draft-access-export/v1"
293
+ : "chainlesschain.goal-draft-access-export/v1",
270
294
  state: "access-exported",
271
295
  plugin: access.plugin,
272
296
  declarationDigest: access.declarationDigest,
273
297
  file: options.out,
274
298
  };
275
299
  }
276
- export async function readCliGoalDraftSources(id, raw = {}) {
277
- const options = fixedOptions(raw),
300
+ async function readSources(id, raw = {}, creation = false) {
301
+ const options = fixedOptions(raw, creation),
278
302
  { connection, access } = connected(id, options);
279
303
  if (
280
304
  options.after !== undefined &&
@@ -287,7 +311,9 @@ export async function readCliGoalDraftSources(id, raw = {}) {
287
311
  );
288
312
  admitted(options, access);
289
313
  return {
290
- schema: CLI_GOAL_DRAFT_SOURCES_SCHEMA,
314
+ schema: options.creation
315
+ ? CLI_GOAL_CREATE_DRAFT_SOURCES_SCHEMA
316
+ : CLI_GOAL_DRAFT_SOURCES_SCHEMA,
291
317
  goalRef: connection.goalRef,
292
318
  plugin: access.plugin,
293
319
  declarationDigest: access.declarationDigest,
@@ -295,13 +321,17 @@ export async function readCliGoalDraftSources(id, raw = {}) {
295
321
  sources,
296
322
  };
297
323
  }
298
- export async function sendCliGoalDraft(id, raw = {}) {
299
- const options = fixedOptions(raw);
324
+ async function sendDraft(id, raw = {}, creation = false) {
325
+ const options = fixedOptions(raw, creation);
300
326
  required(options.record);
301
327
  required(options.descriptionFile);
302
328
  const { connection, access } = connected(id, options);
303
- const proposal = validateGoalDraftProposal({
304
- type: "task.description.update",
329
+ const validateProposal = options.creation
330
+ ? validateGoalCreateDraftProposal
331
+ : validateGoalDraftProposal;
332
+ const proposal = validateProposal({
333
+ type: options.draftType,
334
+ ...(options.creation ? { taskType: options.taskType } : {}),
305
335
  goalRef: connection.goalRef,
306
336
  sourceRef: options.source,
307
337
  requestId: options.requestId,
@@ -345,7 +375,7 @@ export async function sendCliGoalDraft(id, raw = {}) {
345
375
  return true;
346
376
  },
347
377
  async enqueueProposal(context) {
348
- const projected = validateGoalDraftProposal(
378
+ const projected = validateProposal(
349
379
  Object.fromEntries(
350
380
  [
351
381
  "type",
@@ -354,6 +384,7 @@ export async function sendCliGoalDraft(id, raw = {}) {
354
384
  "requestId",
355
385
  "title",
356
386
  "description",
387
+ ...(options.creation ? ["taskType"] : []),
357
388
  ].map((key) => [key, context[key]]),
358
389
  ),
359
390
  );
@@ -385,16 +416,22 @@ export async function sendCliGoalDraft(id, raw = {}) {
385
416
  });
386
417
  if (!nativeReceipt) fail("CLI_GOAL_DRAFT_RECEIPT_MISMATCH");
387
418
  // A verified saved receipt is not undone by a later local admission change.
388
- return outcome(reference, options.record, nativeReceipt);
419
+ return outcome(reference, options.record, nativeReceipt, options.creation);
389
420
  } catch (error) {
390
- if (nativeReceipt) return outcome(reference, options.record, nativeReceipt);
421
+ if (nativeReceipt)
422
+ return outcome(
423
+ reference,
424
+ options.record,
425
+ nativeReceipt,
426
+ options.creation,
427
+ );
391
428
  if (dispatched || error.outcomeUnknown)
392
- return outcome(reference, options.record);
429
+ return outcome(reference, options.record, undefined, options.creation);
393
430
  throw error;
394
431
  }
395
432
  }
396
- export async function readCliGoalDraftReceipt(id, raw = {}) {
397
- const options = fixedOptions(raw);
433
+ async function readReceipt(id, raw = {}, creation = false) {
434
+ const options = fixedOptions(raw, creation);
398
435
  required(options.record);
399
436
  const { connection, access } = connected(id, options),
400
437
  saved = readReference(options.record);
@@ -407,3 +444,13 @@ export async function readCliGoalDraftReceipt(id, raw = {}) {
407
444
  if (!same(expected, saved.reference)) fail("CLI_GOAL_DRAFT_RECORD_CONFLICT");
408
445
  return queryReceipt(connection, saved, options.record);
409
446
  }
447
+ export const exportCliGoalDraftAccess = (raw) => exportAccess(raw, false);
448
+ export const exportCliGoalCreateDraftAccess = (raw) => exportAccess(raw, true);
449
+ export const readCliGoalDraftSources = (id, raw) => readSources(id, raw, false);
450
+ export const readCliGoalCreateDraftSources = (id, raw) =>
451
+ readSources(id, raw, true);
452
+ export const sendCliGoalDraft = (id, raw) => sendDraft(id, raw, false);
453
+ export const sendCliGoalCreateDraft = (id, raw) => sendDraft(id, raw, true);
454
+ export const readCliGoalDraftReceipt = (id, raw) => readReceipt(id, raw, false);
455
+ export const readCliGoalCreateDraftReceipt = (id, raw) =>
456
+ readReceipt(id, raw, true);
@@ -0,0 +1,60 @@
1
+ # Goal task creator (source-only)
2
+
3
+ This declaration-only plugin exports task-creation requests or submits pending
4
+ creation drafts through separately authorized native connections. It requires a matching source build of the CLI,
5
+ Session Core and desktop app. The compatibility floor in plugin.json does not
6
+ mean the published CLI 0.166.142 already contains this command.
7
+
8
+ From the repository root:
9
+
10
+ ```powershell
11
+ cc plugin add packages/cli/src/lib/plugin-runtime/examples/goal-task-creator --scope project --json
12
+ cc plugin trust goal-task-creator --scope project
13
+ cc plugin consent goal-task-creator --scope project --grant --json
14
+ cc goal draft-create-request <goal-id> --connection "<summary-connection.json>" --plugin goal-task-creator --scope project --source "<current-native-creation-proposal-id>" --request-id "<stable-id>" --title "Delivery follow-up" --task-type analyze_data --description-file "<description.txt>" --out "<new-create-request.json>" --json
15
+ ```
16
+
17
+ Use a separately authorized goal summary connection to read the exact goal
18
+ reference. Copy a current `task.create` risk proposal ID from the desktop;
19
+ description proposal IDs cannot substitute for creation sources. Supported task
20
+ types are `create_file`, `edit_file`, `query_info`, `analyze_data`, `export_file`
21
+ and `deploy_project`. The file is an untrusted request, with no native draft,
22
+ approval or task created by export. Existing output files are never overwritten.
23
+
24
+ In the desktop's external-request panel, choose this request with the native file
25
+ picker. Review the full description, task type and source before adopting it.
26
+ Adoption stores only this pending draft under a native importer identity;
27
+ the plugin name in the file is metadata, not proof of its origin. Task creation
28
+ still requires a fresh native preview and a second explicit native confirmation.
29
+ Creating the pending task does not execute it or prove the original risk resolved.
30
+
31
+ Keep the same exported file after an uncertain adoption; reopen its saved record
32
+ instead of exporting a new request identity. Revocation retains history and does
33
+ not re-enable the old file. Online v3 description connections, the old description
34
+ file schema and the combined assistant 0.2.0 do not gain creation permission.
35
+ Matching source IDE builds provide **Export task creation request…** with a native
36
+ type selector. There is no autonomous generation.
37
+
38
+ For online pending drafts, allow goal creation suggestions and run a fresh risk
39
+ check. Export a separate creation access file and select it from the desktop's
40
+ **另行授权在线创建任务待审连接** control. Inspect the native consent and save a
41
+ new private v6 connection:
42
+
43
+ ```powershell
44
+ cc goal draft-create-access --plugin goal-task-creator --scope project --out "<new-creation-access.json>" --json
45
+ cc goal draft-create-sources <goal-id> --connection "<creation-v6.json>" --plugin goal-task-creator --scope project --json
46
+ cc goal draft-create-send <goal-id> --connection "<creation-v6.json>" --plugin goal-task-creator --scope project --source "<current-creation-source-id>" --request-id "<stable-id>" --title "Delivery follow-up" --task-type analyze_data --description-file "<description.txt>" --record "<new-submission.json>" --json
47
+ cc goal draft-create-receipt <goal-id> --connection "<creation-v6.json>" --plugin goal-task-creator --scope project --record "<submission.json>" --json
48
+ ```
49
+
50
+ Only a pending draft is saved. Actual task creation requires desktop preview and
51
+ individual native confirmation. Preserve the same submission reference after
52
+ an unknown response; an existing reference only queries, even on `not-found`.
53
+ Task-type changes conflict with that request identity. Disconnect keeps drafts;
54
+ native grant revocation invalidates unconfirmed work and preserves completed
55
+ receipts. v3 description authority cannot substitute for v6 creation consent.
56
+ Both source IDEs expose **Export online creation access…**, **Submit pending
57
+ creation…** and **Look up creation receipt…** with native selectors. Creation
58
+ results require successful exit and independent schema/action validation. After
59
+ an interruption, use the same saved reference to query, without a new send.
60
+ File export remains available. This requires matching unpublished source builds.
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "goal-task-creator",
3
+ "version": "0.1.0",
4
+ "description": "Export task creation requests for separate per-file native desktop adoption",
5
+ "permissions": { "goalExtension": ["proposal:task.create"] },
6
+ "goalExtension": {
7
+ "apiVersion": "1.0.0",
8
+ "hosts": { "cli": ">=0.166.143" },
9
+ "events": [],
10
+ "panels": [],
11
+ "proposals": ["task.create"]
12
+ }
13
+ }
@@ -1,16 +1,20 @@
1
- # Project delivery assistant 0.2.0
1
+ # Project delivery assistant 0.3.0 (source-only)
2
2
 
3
3
  This data-only scenario package combines evidence panels, bounded observations,
4
- retained event replay and user-selected task-description drafts. It runs through
5
- the existing CLI and both IDE plugin managers. Requires CLI 0.166.142, Session
4
+ retained event replay, user-selected task-description drafts and separately
5
+ adopted task-creation request files, with separate CLI online creation drafts. It runs through
6
+ the existing CLI and both IDE plugin managers. Requires CLI 0.166.143, Session
6
7
  Core 0.3.25 and a matching desktop build with the separately authorized goal
7
- connections. Paired IDE releases are Open VSX 0.37.178 and JetBrains 0.4.195.
8
+ connections. Paired IDE releases are Open VSX 0.37.179 and JetBrains 0.4.196.
8
9
  The version ranges in the manifest are compatibility floors; each operation
9
10
  still needs its native source authorization.
10
11
 
12
+ This 0.3.0 source package requires matching local CLI and IDE builds. Its host
13
+ version floors do not add creation controls to the already published products.
11
14
  The package contains no hooks, binaries, arbitrary code or autonomous scheduler.
12
- It does not create tasks, choose a description for you, approve actions or mark a
13
- goal complete. Task creation remains a future extension surface.
15
+ It exports creation requests or saves pending creation drafts; the desktop
16
+ requires a current preview and individual native confirmation before creating a
17
+ pending task. It does not execute that task or mark a goal complete.
14
18
 
15
19
  From the repository root, install at the scope you will use:
16
20
 
@@ -23,13 +27,15 @@ cc plugin consent project-delivery-assistant --scope project --grant --json
23
27
  Consent covers the full declared capability set. Each command still needs its
24
28
  own selected source and separate desktop authorization:
25
29
 
26
- | Entry | Source and result |
27
- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
- | `goal panels` | A separately authorized evidence connection; objective/status and historical risk/receipt summary. A summary-only connection cannot supply evidence fields. |
29
- | `goal watch` with a connection | A v4 event connection; risk-check and action-receipt observations for a bounded interval. Polling can miss intermediate changes. |
30
- | `goal watch` without a connection | A standalone CLI goal; status changes only. This does not subscribe to native project status. |
31
- | `goal replay` | A v5 retained-history connection and explicit new/resume checkpoint; one page per invocation. |
32
- | `goal draft-access`, `draft-sources`, `draft-send`, `draft-receipt` | A separate v3 pending-draft authorization bound to this plugin/version/declaration. The user selects a current native source and a UTF-8 description file. |
30
+ | Entry | Source and result |
31
+ | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
32
+ | `goal panels` | A separately authorized evidence connection; objective/status and historical risk/receipt summary. A summary-only connection cannot supply evidence fields. |
33
+ | `goal watch` with a connection | A v4 event connection; risk-check and action-receipt observations for a bounded interval. Polling can miss intermediate changes. |
34
+ | `goal watch` without a connection | A standalone CLI goal; status changes only. This does not subscribe to native project status. |
35
+ | `goal replay` | A v5 retained-history connection and explicit new/resume checkpoint; one page per invocation. |
36
+ | `goal draft-create-request` | A selected goal connection, current native creation proposal ID, explicit task type and body; exports a file for separate per-file desktop adoption. |
37
+ | `goal draft-access`, `draft-sources`, `draft-send`, `draft-receipt` | A separate v3 pending-draft authorization bound to this plugin/version/declaration. The user selects a current native source and a UTF-8 description file. |
38
+ | `goal draft-create-access`, `draft-create-sources`, `draft-create-send`, `draft-create-receipt` | Separate native v6 creation consent, current creation source, explicit task type and durable reference; saves pending only. |
33
39
 
34
40
  In the desktop goal area, export the relevant connection with its separate native
35
41
  confirmation. Connections are short-lived and tied to the active identity and
@@ -73,6 +79,31 @@ and run a fresh risk check to assess the outcome; a description edit does not
73
79
  prove that a deadline or dependency risk was resolved. If submission is unknown,
74
80
  keep its record and look up the receipt before deciding whether to send again.
75
81
 
82
+ For creation, enable the goal's creation suggestion scope and run a fresh risk
83
+ check. Copy a current creation proposal ID from the desktop, then export:
84
+
85
+ ```powershell
86
+ cc goal draft-create-request <goal-id> --connection "<summary-connection.json>" --plugin project-delivery-assistant --scope project --source "<current-native-creation-proposal-id>" --request-id "<stable-request-id>" --title "Delivery follow-up" --task-type analyze_data --description-file "<description.txt>" --out "<new-creation-request.json>" --json
87
+ ```
88
+
89
+ In either IDE use **Export task creation request…** and select the task type,
90
+ connection, source ID, description and new output file through native controls.
91
+ The IDE checks a separate creation export result and only reports success after
92
+ the CLI exits successfully. Import the same request in the desktop, inspect its
93
+ full body and task type, adopt it, then build and confirm the native preview.
94
+ An interrupted or failed export may have created the output file; inspect and
95
+ reuse it explicitly. Do not replace its request identity to recover an unknown
96
+ adoption outcome. Online v3 description grants never authorize creation.
97
+
98
+ For online creation, use the same commands from the
99
+ [creation example](../goal-task-creator/README.md) with
100
+ `--plugin project-delivery-assistant`. Export a creation access file and obtain
101
+ independent native v6 consent; the v3 description connection cannot substitute.
102
+ Keep the submission reference to query unknown outcomes without resending.
103
+ Both source IDEs expose dedicated online creation access/send/receipt controls
104
+ with native connection, source, task type and reference selections. File export
105
+ remains available; source builds require matching local CLI/Core/desktop code.
106
+
76
107
  In VS Code / JetBrains choose this installed plugin, then **CLI goal panels…**,
77
108
  **Observe desktop events…**, **Recover retained history…** or the draft controls.
78
109
  Recovery uses native connection and new/resume checkpoint dialogs; **Read next
@@ -88,5 +119,7 @@ project trust again, capability expansion requires new consent, and a changed
88
119
  declaration/goal binding requires a matching new desktop authorization and an
89
120
  explicit new checkpoint when the old binding no longer matches.
90
121
 
91
- Real IDE/Electron GUI journeys, automatic drafting, task-creation proposals,
122
+ Upgrading from 0.2.0 requires trust for 0.3.0 and additional consent for
123
+ `proposal:task.create`. Previous consents cannot silently grant that capability.
124
+ Real IDE/Electron GUI journeys, automatic drafting,
92
125
  independent business-effect evaluation and release gates remain pending.
@@ -1,22 +1,23 @@
1
1
  {
2
2
  "name": "project-delivery-assistant",
3
- "version": "0.2.0",
4
- "description": "Project evidence, bounded event observation and retained replay, and user-selected description drafts through separately authorized CLI surfaces",
3
+ "version": "0.3.0",
4
+ "description": "Project evidence, bounded observations, retained replay, description drafts and separately adopted task-creation request files",
5
5
  "permissions": {
6
6
  "goalExtension": [
7
7
  "event:goal.status.changed",
8
8
  "event:risk.review.completed",
9
9
  "event:action.receipt.updated",
10
10
  "panel:goal.evidence",
11
- "proposal:task.description.update"
11
+ "proposal:task.description.update",
12
+ "proposal:task.create"
12
13
  ]
13
14
  },
14
15
  "goalExtension": {
15
16
  "apiVersion": "1.0.0",
16
17
  "hosts": {
17
- "cli": ">=0.166.142",
18
- "vscode": ">=0.37.178",
19
- "jetbrains": ">=0.4.195"
18
+ "cli": ">=0.166.143",
19
+ "vscode": ">=0.37.179",
20
+ "jetbrains": ">=0.4.196"
20
21
  },
21
22
  "events": [
22
23
  "goal.status.changed",
@@ -32,6 +33,6 @@
32
33
  "fallback": "text"
33
34
  }
34
35
  ],
35
- "proposals": ["task.description.update"]
36
+ "proposals": ["task.description.update", "task.create"]
36
37
  }
37
38
  }
@@ -259,6 +259,7 @@ export async function proposeGoalExtensionAction(ref, raw, options = {}) {
259
259
  type: raw.type,
260
260
  sourceRef: raw.sourceRef,
261
261
  requestId: raw.requestId,
262
+ ...(raw.type === "task.create" ? { taskType: raw.taskType } : {}),
262
263
  });
263
264
  await authorize(options.authorize, context);
264
265
  if (typeof options.enqueueProposal !== "function")
@@ -10,7 +10,10 @@ import {
10
10
  validateGoalEventHistoryPage,
11
11
  parseGoalEventCursor,
12
12
  } from "@chainlesschain/session-core/goal-evidence-contract";
13
- import { validateGoalDraftDescriptor } from "@chainlesschain/session-core/goal-draft-connection-contract";
13
+ import {
14
+ validateGoalDraftDescriptor,
15
+ validateGoalCreateDraftDescriptor,
16
+ } from "@chainlesschain/session-core/goal-draft-connection-contract";
14
17
  import { createProjectGoalDraftClient } from "./project-goal-draft-connection.js";
15
18
  function fail() {
16
19
  throw new Error("CLI_GOAL_CONNECTION_UNAVAILABLE");
@@ -51,8 +54,17 @@ export function createProjectGoalConnection(file) {
51
54
  const count = fs.readSync(fd, raw, 0, raw.length, 0);
52
55
  if (count > 4096 || !sameFile(opened, fs.fstatSync(fd))) fail();
53
56
  const descriptor = JSON.parse(raw.subarray(0, count).toString("utf8"));
54
- if (descriptor.schema === "chainlesschain.project-goal-connection/v3") {
55
- const verified = validateGoalDraftDescriptor(descriptor);
57
+ if (
58
+ [
59
+ "chainlesschain.project-goal-connection/v3",
60
+ "chainlesschain.project-goal-connection/v6",
61
+ ].includes(descriptor.schema)
62
+ ) {
63
+ const verified = (
64
+ descriptor.schema.endsWith("/v6")
65
+ ? validateGoalCreateDraftDescriptor
66
+ : validateGoalDraftDescriptor
67
+ )(descriptor);
56
68
  return createProjectGoalDraftClient(verified, () => {
57
69
  if (
58
70
  Date.now() >= verified.expiresAt ||
@@ -10,6 +10,7 @@ import {
10
10
  validateGoalDraftSources,
11
11
  validateGoalDraftReceipt,
12
12
  validateGoalDraftProposal,
13
+ validateGoalCreateDraftProposal,
13
14
  } from "@chainlesschain/session-core/goal-draft-connection-contract";
14
15
  function unavailable() {
15
16
  return new Error("CLI_GOAL_CONNECTION_UNAVAILABLE");
@@ -26,6 +27,12 @@ function exact(raw, keys) {
26
27
  }
27
28
  /** Constructed only after the shared private-file reader verifies the descriptor. */
28
29
  export function createProjectGoalDraftClient(descriptor, validate) {
30
+ const creation =
31
+ descriptor.schema === "chainlesschain.project-goal-connection/v6";
32
+ const domain = creation ? "v6" : "v3",
33
+ endpointPath = creation ? "/goal-create-drafts" : "/goal-drafts";
34
+ const schema = (name) =>
35
+ `chainlesschain.${creation ? name.replace("goal-draft", "goal-create-draft") : name}/v1`;
29
36
  const ref = Object.freeze({ ...descriptor.goalRef }),
30
37
  grant = Object.freeze({
31
38
  id: descriptor.grantRef.id,
@@ -58,7 +65,7 @@ export function createProjectGoalDraftClient(descriptor, validate) {
58
65
  headers: {
59
66
  "X-CC-Nonce": nonce,
60
67
  "X-CC-Signature": mac(
61
- `request-v3\n${method}\n/goal-drafts\n${nonce}\n${bodyHash}`,
68
+ `request-${domain}\n${method}\n${endpointPath}\n${nonce}\n${bodyHash}`,
62
69
  ),
63
70
  ...(method === "POST"
64
71
  ? {
@@ -90,7 +97,7 @@ export function createProjectGoalDraftClient(descriptor, validate) {
90
97
  Buffer.from(signature),
91
98
  Buffer.from(
92
99
  mac(
93
- `response-v3\n${nonce}\n${response.statusCode}\n${text}`,
100
+ `response-${domain}\n${nonce}\n${response.statusCode}\n${text}`,
94
101
  ),
95
102
  ),
96
103
  )
@@ -135,7 +142,7 @@ export function createProjectGoalDraftClient(descriptor, validate) {
135
142
  "sources",
136
143
  ]);
137
144
  if (
138
- result.schema !== "chainlesschain.project-goal-drafts/v1" ||
145
+ result.schema !== schema("project-goal-drafts") ||
139
146
  typeof result.objective !== "string" ||
140
147
  result.objective.length > 4096 ||
141
148
  result.status !== "active" ||
@@ -151,8 +158,7 @@ export function createProjectGoalDraftClient(descriptor, validate) {
151
158
  ...(afterId !== undefined ? { afterId } : {}),
152
159
  });
153
160
  exact(result, ["schema", "goalRef", "sources"]);
154
- if (result.schema !== "chainlesschain.goal-draft-sources/v1")
155
- throw unavailable();
161
+ if (result.schema !== schema("goal-draft-sources")) throw unavailable();
156
162
  return validateGoalDraftSources(result.sources);
157
163
  }
158
164
  async function receipt({ requestId, inputDigest }) {
@@ -162,15 +168,16 @@ export function createProjectGoalDraftClient(descriptor, validate) {
162
168
  inputDigest,
163
169
  });
164
170
  exact(result, ["schema", "goalRef", "receipt"]);
165
- if (result.schema !== "chainlesschain.goal-draft-receipt/v1")
166
- throw unavailable();
171
+ if (result.schema !== schema("goal-draft-receipt")) throw unavailable();
167
172
  const value = validateGoalDraftReceipt(result.receipt);
168
173
  if (value.requestId !== requestId || value.inputDigest !== inputDigest)
169
174
  throw unavailable();
170
175
  return value;
171
176
  }
172
177
  async function enqueue(raw) {
173
- const proposal = validateGoalDraftProposal(raw),
178
+ const proposal = (
179
+ creation ? validateGoalCreateDraftProposal : validateGoalDraftProposal
180
+ )(raw),
174
181
  inputDigest = digest(proposal);
175
182
  let received = false;
176
183
  try {
@@ -181,8 +188,7 @@ export function createProjectGoalDraftClient(descriptor, validate) {
181
188
  );
182
189
  received = true;
183
190
  exact(result, ["schema", "goalRef", "receipt"]);
184
- if (result.schema !== "chainlesschain.goal-draft-submit/v1")
185
- throw unavailable();
191
+ if (result.schema !== schema("goal-draft-submit")) throw unavailable();
186
192
  const value = validateGoalDraftReceipt(result.receipt);
187
193
  if (
188
194
  value.state !== "saved" ||
@@ -205,7 +211,8 @@ export function createProjectGoalDraftClient(descriptor, validate) {
205
211
  return Object.freeze({
206
212
  goalRef: ref,
207
213
  evidence: false,
208
- drafts: true,
214
+ drafts: !creation,
215
+ ...(creation ? { createDrafts: true } : {}),
209
216
  plugin: grant.plugin,
210
217
  declarationDigest: grant.declarationDigest,
211
218
  grantRef: Object.freeze({ ...descriptor.grantRef }),
@@ -1 +0,0 @@
1
- import{A as o}from"./Row-BZJYAo0S.js";import{$ as t}from"./index-Cs66y4oC.js";import"./responsiveObserve-CI1toXJ_.js";import"./vendor-BXcBOG8b.js";import"./useFlexGapSupport-DkdcgIyl.js";import"./styleChecker-DY8wTVCe.js";import"./index-BlcOkfzz.js";import"./icons-DlxlFL4g.js";const l=t(o);export{l as default};
@@ -1 +0,0 @@
1
- import{C as o}from"./Col-BwHSmoYQ.js";import{$ as t}from"./index-Cs66y4oC.js";import"./index-BlcOkfzz.js";import"./vendor-BXcBOG8b.js";import"./icons-DlxlFL4g.js";const s=t(o);export{s as default};