chainlesschain 0.166.141 → 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.
- package/README.md +249 -14
- package/package.json +2 -2
- package/src/assets/linux-subreaper/linux-arm64/manifest.json +1 -1
- package/src/assets/linux-subreaper/linux-x64/manifest.json +1 -1
- package/src/assets/web-panel/assets/{AIOps-BefmcZw2.js → AIOps-DNySV2Kf.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BBlS9rmj.js → ActionButton-ByFuxJsa.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-DfNjXT9e.js → Analytics-ETbdywk5.js} +1 -1
- package/src/assets/web-panel/assets/{AppLayout-CIBZPPMS.js → AppLayout-CuHekZaP.js} +2 -2
- package/src/assets/web-panel/assets/{Artifacts-CE66rTTZ.js → Artifacts-BJJq2BDq.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-DOC8Lt8U.js → Audit-DXrietv8.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-9TMG041Q.js → BackgroundAgents-CFB1fxsr.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-us3KWb9F.js → Backup-VLtflRmp.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-D6Q95Wr5.js → BaseInput-BbqBaS2r.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-BPrM5ARp.js → Chat-t0g7BXL8.js} +1 -1
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-Drs9vSc4.js → ChatBubbleRenderer-JNFsjV0j.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-DqZGMV0o.js → Checkbox-BCSclHQb.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-CmolL6wr.js → Codegen-BcyINEHT.js} +1 -1
- package/src/assets/web-panel/assets/{Col-BwHSmoYQ.js → Col-C-0WNlwS.js} +1 -1
- package/src/assets/web-panel/assets/{Community-DGWqobpd.js → Community-DxZeoORX.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-t_yy09-r.js → Compact-BNnX4jpz.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-D0S8-EsN.js → Compliance-KnjHtn9C.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-Y1LiuRwP.js → Cowork-CDyCrhbX.js} +1 -1
- package/src/assets/web-panel/assets/{Cron-FTqEw7QV.js → Cron-DxpS3D1G.js} +1 -1
- package/src/assets/web-panel/assets/{Crosschain-C3rPZ4Qu.js → Crosschain-BSzTZYyc.js} +1 -1
- package/src/assets/web-panel/assets/{DID-Ba2zySM-.js → DID-Bfj9Vdne.js} +1 -1
- package/src/assets/web-panel/assets/{Dashboard-D6xyN2ND.js → Dashboard-CcERVdgo.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-BF4QuXJw.js → Dropdown-BtYXAz6E.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-s9dUxq14.js → EmailListRenderer-fdCMeGXU.js} +1 -1
- package/src/assets/web-panel/assets/{EvolutionSettings-CoAKOfqZ.js → EvolutionSettings-LHxhcuF2.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-CEznwH1c.js → FamilyGuardDashboard-MIgtLsos.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-rIzOt8-a.js → Federation-9-TOztwa.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-BARFiExr.js → FormItemContext-BKcwEE6w.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-DI0A4swS.js → GenericCardRenderer-DJBPVUK2.js} +1 -1
- package/src/assets/web-panel/assets/{Git-DdmysND4.js → Git-C_XYISjG.js} +1 -1
- package/src/assets/web-panel/assets/{Governance-DrdhwUz2.js → Governance-DWsbPrwq.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-Scm8tumd.js → Inference-D0_bYket.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-_6bgPs4W.js → KnowledgeGraph-BoA3VQlw.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-DW_v7bSo.js → Logs-LEGItChf.js} +1 -1
- package/src/assets/web-panel/assets/{MarkdownRenderer-7JABuv1j.js → MarkdownRenderer-DOHVc-Uw.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-0h3YSvME.js → Marketplace-BKovl9NH.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-Byrg0Y3e.js → McpTools-D61ktoGb.js} +1 -1
- package/src/assets/web-panel/assets/{Memory-Cyoq-o29.js → Memory-CllorS0l.js} +1 -1
- package/src/assets/web-panel/assets/{MobileBridge-ISIlploU.js → MobileBridge-D-dJ78bk.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-04EncaRx.js → MobileProjects-CaxMKkd3.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-BMzkpyOF.js → Mtc-qEc62Qsx.js} +1 -1
- package/src/assets/web-panel/assets/{MtcAudit-Cx7BR5sz.js → MtcAudit-BY68jOZJ.js} +1 -1
- package/src/assets/web-panel/assets/{Multisig-D4pmkSX4.js → Multisig-eCCR8ELt.js} +1 -1
- package/src/assets/web-panel/assets/{NLProgramming-CCfaaWNu.js → NLProgramming-VtGv8pky.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-Mq-1ZyaH.js → Notes-CPkYQySe.js} +1 -1
- package/src/assets/web-panel/assets/{NotificationSettings-rzf5V1TR.js → NotificationSettings-BuAvlHUu.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-OREUs5ue.js → OrderTableRenderer-CLf_HAGv.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-BQfOATgw.js → Organization-DjujhMbD.js} +1 -1
- package/src/assets/web-panel/assets/{Overflow-D7Pa6aaA.js → Overflow-RznznTS4.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CaJ79ZsC.js → P2P-DSa5ot0t.js} +1 -1
- package/src/assets/web-panel/assets/{PdhVaultBrowser-CtimQQN3.js → PdhVaultBrowser-oSEh6vkf.js} +2 -2
- package/src/assets/web-panel/assets/{Permissions-AzmmkLZ0.js → Permissions-CdOZguX9.js} +1 -1
- package/src/assets/web-panel/assets/{PersonalDataHub-BRU8ME7z.js → PersonalDataHub-B4--6iEF.js} +1 -1
- package/src/assets/web-panel/assets/{Pipeline-BnNqutXh.js → Pipeline-BnI57jE8.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-gMyZcxsz.js → Privacy-C8MId3ad.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-CkK-Fvr0.js → ProjectInit-DPGyYO8a.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectSettings-CGY_uiIX.js → ProjectSettings-qBMqaJaO.js} +1 -1
- package/src/assets/web-panel/assets/{Projects-DBNC7xXG.js → Projects-Bq87Syce.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-BVgWawtE.js → Providers-CVuG9Ugf.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-DZILESCa.js → QrScannerModal-C94c8m3q.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-DwRBzFWW.js → QuickAsk-BvfsXZ8s.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-B3VxvUih.js → Recommend-CoezBYH9.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-DM74lufU.js → RemoteSession-CcYC4v3u.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-DOOEuGHh.js → Reputation-diDbL4cO.js} +1 -1
- package/src/assets/web-panel/assets/{Row-BZJYAo0S.js → Row-5qp3_fNS.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-CYw44jcD.js → RssFeed-BCsMvpV4.js} +1 -1
- package/src/assets/web-panel/assets/{Search-CbypjDNG.js → Search-Br9nVxOp.js} +1 -1
- package/src/assets/web-panel/assets/{Security-0rSBDrXh.js → Security-BdOUzRfA.js} +1 -1
- package/src/assets/web-panel/assets/{Services-kqP79CBD.js → Services-Cp9TqzyN.js} +1 -1
- package/src/assets/web-panel/assets/{Skeleton-BjxvGVfI.js → Skeleton-DSdWsUMR.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-SOoWyPCO.js → Skills-DRczAMTe.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-kdRVAT19.js → Sla-B6G_Vd8N.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-DILtcMaJ.js → SpeechSettings-BCcLx5x4.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-C98Jauc4.js → SyncSettings-BFhwtxCp.js} +1 -1
- package/src/assets/web-panel/assets/{Tasks-Bw-KaQAs.js → Tasks-DGRE6VHO.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-CDJ027Hd.js → Templates-CJkJRFzd.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-BqNV62UA.js → Tenant-CAOv6p00.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-B8aQ3GLO.js → Terminal-CDrwwrKj.js} +1 -1
- package/src/assets/web-panel/assets/{TimelineRenderer-BSpccq11.js → TimelineRenderer-DI0YE2SN.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-BbGMoFO6.js → Tokens-DmqWTZSG.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-D75Mawa_.js → Trigger-CkXkhmjk.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-BiK_Pk05.js → Trust-U8YJLcoJ.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-Dv2xX_b9.js → UkeySign-BLTozMmr.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-CdBWfeEE.js → VideoEditing-DHKyFlZa.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-Cvrp4agg.js → Wallet-DapBxIQt.js} +1 -1
- package/src/assets/web-panel/assets/{WebAuthn-D0Htlf3v.js → WebAuthn-CkvG3yOr.js} +1 -1
- package/src/assets/web-panel/assets/{WorkflowEditor-nuUBOHIF.js → WorkflowEditor-cNLsinXP.js} +1 -1
- package/src/assets/web-panel/assets/{chat-C6MLShIo.js → chat-BzgkgfMC.js} +1 -1
- package/src/assets/web-panel/assets/{colors-9G5FqFOC.js → colors-BPpVKQsb.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-0M49EurU.js → compact-item-zepznuTv.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-CiDDLED_.js → createContext-BRto-SQH.js} +1 -1
- package/src/assets/web-panel/assets/{hasIn-wZvUczmn.js → hasIn-CqsmU_n6.js} +1 -1
- package/src/assets/web-panel/assets/{index-B0JZ_ccM.js → index-B-bNzvdU.js} +1 -1
- package/src/assets/web-panel/assets/{index-B_XOMujL.js → index-B0Z6rfV-.js} +1 -1
- package/src/assets/web-panel/assets/{index-DwX9cOL6.js → index-B9_jRD2e.js} +1 -1
- package/src/assets/web-panel/assets/{index-DwUOiN8M.js → index-BEXKES7V.js} +1 -1
- package/src/assets/web-panel/assets/{index-8jz-X3xg.js → index-BGHd4D8F.js} +1 -1
- package/src/assets/web-panel/assets/{index-BVV2mBbo.js → index-BLwY9y0X.js} +1 -1
- package/src/assets/web-panel/assets/{index-qJcOtd8J.js → index-B_l6gfDh.js} +1 -1
- package/src/assets/web-panel/assets/{index-B6TAOS4G.js → index-BeBxP1M6.js} +1 -1
- package/src/assets/web-panel/assets/{index-C63qiwQz.js → index-BeSzdB7x.js} +1 -1
- package/src/assets/web-panel/assets/{index-k0BVfcwQ.js → index-BuBnM6Kz.js} +1 -1
- package/src/assets/web-panel/assets/{index-BXIY2BIN.js → index-Bz7pG8z3.js} +1 -1
- package/src/assets/web-panel/assets/{index-D51V5vmz.js → index-CBI-7Q3W.js} +1 -1
- package/src/assets/web-panel/assets/{index-BWTcG128.js → index-CTk9gY88.js} +1 -1
- package/src/assets/web-panel/assets/{index-sBsJaBmM.js → index-CdHXVSZ4.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dclwd_lj.js → index-CmPnDXx4.js} +1 -1
- package/src/assets/web-panel/assets/{index-BlcOkfzz.js → index-CnezE05k.js} +1 -1
- package/src/assets/web-panel/assets/{index-DOxTmc3k.js → index-CwkhrUmw.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cs66y4oC.js → index-CzoKAiyT.js} +3 -3
- package/src/assets/web-panel/assets/{index-BzeA3eRQ.js → index-DDPmr5Yr.js} +1 -1
- package/src/assets/web-panel/assets/{index-CdaLWIz-.js → index-DEbAW3Ec.js} +1 -1
- package/src/assets/web-panel/assets/{index-DvWRS-s7.js → index-DJSn3owP.js} +1 -1
- package/src/assets/web-panel/assets/{index-DN9t1qjW.js → index-DKa_jSfj.js} +1 -1
- package/src/assets/web-panel/assets/{index-BTCIIdoS.js → index-DUclk35X.js} +1 -1
- package/src/assets/web-panel/assets/{index-BmS2P_eX.js → index-DXkw-nt5.js} +1 -1
- package/src/assets/web-panel/assets/{index-CoxzvhoN.js → index-D_-w4KkD.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cz1SAgnb.js → index-D_asIcU7.js} +1 -1
- package/src/assets/web-panel/assets/{index-BfwJm0DU.js → index-Df_CY0We.js} +1 -1
- package/src/assets/web-panel/assets/{index-JhfNEldK.js → index-Dnvj_XU-.js} +1 -1
- package/src/assets/web-panel/assets/index-DruOFzuF.js +1 -0
- package/src/assets/web-panel/assets/{index-D9J_tLGk.js → index-DvGttIXQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcZxOXd8.js → index-JrVhUwyh.js} +1 -1
- package/src/assets/web-panel/assets/{index-CdUmgLxP.js → index-LVvzNdPa.js} +1 -1
- package/src/assets/web-panel/assets/{index-CTy9gD3m.js → index-Q5sAV7wp.js} +1 -1
- package/src/assets/web-panel/assets/{index-CtbFv3Et.js → index-S8fkzbQ_.js} +1 -1
- package/src/assets/web-panel/assets/{index-BCfxxScC.js → index-Z6DBe2RU.js} +1 -1
- package/src/assets/web-panel/assets/{index-dJ_V_Fqy.js → index-faHHtBKj.js} +1 -1
- package/src/assets/web-panel/assets/index-hhOrZ6HO.js +1 -0
- package/src/assets/web-panel/assets/{index-DeHSwWVG.js → index-w36TkwyO.js} +1 -1
- package/src/assets/web-panel/assets/{index-D2wN6VIq.js → index-wbvZayBb.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-DyIyjurJ.js → initDefaultProps-BlhbrsQk.js} +1 -1
- package/src/assets/web-panel/assets/{motion-B2D0PuTM.js → motion-UZx12NPM.js} +1 -1
- package/src/assets/web-panel/assets/{move-B22T5MnN.js → move-BTby5W4q.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-i4b7HNzF.js → mtc-parser-BOOaGiCg.js} +1 -1
- package/src/assets/web-panel/assets/{omit-ByNIr_gz.js → omit-BVylGzEr.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-_xP2RvxA.js → pickAttrs-Cp3Nflbr.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-CVDvzK0z.js → placementArrow-BVXYvwH2.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-CI1toXJ_.js → responsiveObserve-C67SbpBN.js} +1 -1
- package/src/assets/web-panel/assets/{slide-2_VosSRQ.js → slide-CnBvM22R.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-CMiWWrZC.js → statusUtils-T8fy53tf.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-DY8wTVCe.js → styleChecker-Bf7i4nlm.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-DkdcgIyl.js → useFlexGapSupport-BUKk7jqw.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-gpl11PEF.js → useFs-T5lg6SpD.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DqnQ0H9y.js → usePersonalDataHub-Brvye8Tg.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-CgY9xUvr.js → vnode-CK992ojP.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-Ch0jan5_.js → zoom-CcABB_97.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +1 -1
- package/src/commands/goal.js +340 -145
- package/src/commands/setup.js +17 -0
- package/src/data/changelog.json +26 -0
- package/src/lib/llm-onboarding-catalog.json +4 -3
- package/src/lib/plugin-runtime/cli-goal-capabilities.js +29 -0
- package/src/lib/plugin-runtime/cli-goal-draft-request.js +25 -15
- package/src/lib/plugin-runtime/cli-goal-drafts.js +78 -35
- package/src/lib/plugin-runtime/cli-goal-event-history.js +284 -0
- package/src/lib/plugin-runtime/cli-goal-events.js +175 -0
- package/src/lib/plugin-runtime/cli-goal-extension-host.js +21 -13
- package/src/lib/plugin-runtime/cli-project-goal-events.js +212 -0
- package/src/lib/plugin-runtime/examples/goal-project-observer/plugin.json +20 -0
- package/src/lib/plugin-runtime/examples/goal-status-observer/plugin.json +17 -0
- package/src/lib/plugin-runtime/examples/goal-task-creator/README.md +60 -0
- package/src/lib/plugin-runtime/examples/goal-task-creator/plugin.json +13 -0
- package/src/lib/plugin-runtime/examples/project-delivery-assistant/README.md +125 -0
- package/src/lib/plugin-runtime/examples/project-delivery-assistant/plugin.json +8 -8
- package/src/lib/plugin-runtime/goal-extensions.js +17 -0
- package/src/lib/project-goal-connection.js +126 -30
- package/src/lib/project-goal-draft-connection.js +18 -11
- package/src/assets/web-panel/assets/index-C101Sec6.js +0 -1
- package/src/assets/web-panel/assets/index-D23TaGOp.js +0 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/** Explicit, bounded polling of standalone goal status. No durable event log. */
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { performance } from "node:perf_hooks";
|
|
4
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
5
|
+
import { cliGoalExtensionHost } from "./cli-goal-capabilities.js";
|
|
6
|
+
import { resolveConfigDataRoot } from "../paths.js";
|
|
7
|
+
import { managedSettingsPath } from "../settings-loader.cjs";
|
|
8
|
+
import { createCliGoalSnapshotReader } from "../cli-goal-source.js";
|
|
9
|
+
import {
|
|
10
|
+
collectGoalExtensions,
|
|
11
|
+
projectGoalExtensionEvent,
|
|
12
|
+
} from "./goal-extensions.js";
|
|
13
|
+
|
|
14
|
+
const TYPE = "goal.status.changed";
|
|
15
|
+
export const CLI_GOAL_EVENT_SCHEMA = "chainlesschain.goal-extension-stream/v1";
|
|
16
|
+
export const _deps = { projectGoalExtensionEvent };
|
|
17
|
+
const fail = (code) => {
|
|
18
|
+
throw new Error(code);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** Capture selection synchronously; retained iterators never change workspace. */
|
|
22
|
+
export function watchCliGoalExtensionEvents(id, options = {}) {
|
|
23
|
+
const cwd = path.resolve(options.cwd || process.cwd());
|
|
24
|
+
const env = Object.freeze({ ...(options.env || process.env) });
|
|
25
|
+
const root = path.resolve(
|
|
26
|
+
options.root ||
|
|
27
|
+
path.join(resolveConfigDataRoot({ cwd, env }).path, "goals"),
|
|
28
|
+
);
|
|
29
|
+
const managedSettingsFile = managedSettingsPath({
|
|
30
|
+
env,
|
|
31
|
+
managedSettingsFile: options.managedSettingsFile,
|
|
32
|
+
});
|
|
33
|
+
const name = options.plugin,
|
|
34
|
+
scope = options.scope;
|
|
35
|
+
const expectedStore = options.expectedStore;
|
|
36
|
+
const intervalMs = options.intervalMs ?? 1000;
|
|
37
|
+
const durationMs = options.durationMs ?? 60000;
|
|
38
|
+
const signal = options.signal;
|
|
39
|
+
if (options.connection !== undefined) fail("CLI_GOAL_EVENTS_STANDALONE_ONLY");
|
|
40
|
+
if (typeof name !== "string" || !name || name.length > 256)
|
|
41
|
+
fail("CLI_GOAL_INVALID_PLUGIN_NAME");
|
|
42
|
+
if (scope !== undefined && !["user", "project", "local"].includes(scope))
|
|
43
|
+
fail("CLI_GOAL_INVALID_PLUGIN_SCOPE");
|
|
44
|
+
if (
|
|
45
|
+
!Number.isSafeInteger(intervalMs) ||
|
|
46
|
+
intervalMs < 250 ||
|
|
47
|
+
intervalMs > 60000 ||
|
|
48
|
+
!Number.isSafeInteger(durationMs) ||
|
|
49
|
+
durationMs < 1000 ||
|
|
50
|
+
durationMs > 900000
|
|
51
|
+
)
|
|
52
|
+
fail("CLI_GOAL_INVALID_WATCH_LIMIT");
|
|
53
|
+
if (signal !== undefined && !(signal instanceof AbortSignal))
|
|
54
|
+
fail("CLI_GOAL_INVALID_WATCH_SIGNAL");
|
|
55
|
+
const host = cliGoalExtensionHost([`event:${TYPE}`]);
|
|
56
|
+
const admission = Object.freeze({ cwd, env, managedSettingsFile, host });
|
|
57
|
+
|
|
58
|
+
return (async function* () {
|
|
59
|
+
if (signal?.aborted) return;
|
|
60
|
+
const source = createCliGoalSnapshotReader(root);
|
|
61
|
+
if (expectedStore !== undefined && expectedStore !== source.storeId)
|
|
62
|
+
fail("CLI_GOAL_STORE_MISMATCH");
|
|
63
|
+
const matches = collectGoalExtensions(admission).extensions.filter(
|
|
64
|
+
(entry) =>
|
|
65
|
+
entry.name === name &&
|
|
66
|
+
(!scope || entry.scope === scope) &&
|
|
67
|
+
entry.declaration.events.includes(TYPE),
|
|
68
|
+
);
|
|
69
|
+
if (matches.length !== 1) fail("CLI_GOAL_EVENT_PLUGIN_UNAVAILABLE");
|
|
70
|
+
const plugin = matches[0];
|
|
71
|
+
const ref = Object.freeze({
|
|
72
|
+
name: plugin.name,
|
|
73
|
+
scope: plugin.scope,
|
|
74
|
+
version: plugin.version,
|
|
75
|
+
});
|
|
76
|
+
const declaration = JSON.stringify(plugin.declaration);
|
|
77
|
+
function revalidatePlugin() {
|
|
78
|
+
const current = collectGoalExtensions(admission).extensions.find(
|
|
79
|
+
(entry) =>
|
|
80
|
+
entry.name === ref.name &&
|
|
81
|
+
entry.scope === ref.scope &&
|
|
82
|
+
entry.version === ref.version,
|
|
83
|
+
);
|
|
84
|
+
if (!current || JSON.stringify(current.declaration) !== declaration)
|
|
85
|
+
fail("CLI_GOAL_EVENT_ADMISSION_CHANGED");
|
|
86
|
+
}
|
|
87
|
+
const reference = (goal) =>
|
|
88
|
+
Object.freeze({
|
|
89
|
+
id: goal.id,
|
|
90
|
+
storeId: goal.storeId,
|
|
91
|
+
revision: goal.revision,
|
|
92
|
+
controlGeneration: goal.controlGeneration,
|
|
93
|
+
});
|
|
94
|
+
let snapshot = source.read(id);
|
|
95
|
+
source.revalidate(snapshot);
|
|
96
|
+
revalidatePlugin();
|
|
97
|
+
const deadline = performance.now() + durationMs;
|
|
98
|
+
yield Object.freeze({
|
|
99
|
+
schema: CLI_GOAL_EVENT_SCHEMA,
|
|
100
|
+
kind: "ready",
|
|
101
|
+
plugin: ref,
|
|
102
|
+
goalRef: reference(snapshot.goal),
|
|
103
|
+
observedAt: new Date().toISOString(),
|
|
104
|
+
delivery: "polling",
|
|
105
|
+
replay: false,
|
|
106
|
+
});
|
|
107
|
+
while (!signal?.aborted && performance.now() < deadline) {
|
|
108
|
+
try {
|
|
109
|
+
await delay(
|
|
110
|
+
Math.min(intervalMs, Math.max(1, deadline - performance.now())),
|
|
111
|
+
undefined,
|
|
112
|
+
{ signal },
|
|
113
|
+
);
|
|
114
|
+
} catch (error) {
|
|
115
|
+
if (signal?.aborted && error.name === "AbortError") return;
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
if (signal?.aborted || performance.now() >= deadline) return;
|
|
119
|
+
revalidatePlugin();
|
|
120
|
+
const current = source.read(id);
|
|
121
|
+
if (
|
|
122
|
+
current.goal.revision < snapshot.goal.revision ||
|
|
123
|
+
current.goal.controlGeneration < snapshot.goal.controlGeneration
|
|
124
|
+
)
|
|
125
|
+
fail("CLI_GOAL_EVENT_SOURCE_REGRESSED");
|
|
126
|
+
if (current.digest === snapshot.digest) continue;
|
|
127
|
+
const previousStatus = snapshot.goal.status;
|
|
128
|
+
if (current.goal.status === previousStatus) {
|
|
129
|
+
snapshot = current;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
const goalRef = reference(current.goal);
|
|
133
|
+
// occurredAt is observation time: polling cannot establish mutation time.
|
|
134
|
+
const observedAt = new Date().toISOString();
|
|
135
|
+
const event = await _deps.projectGoalExtensionEvent(
|
|
136
|
+
ref,
|
|
137
|
+
{ type: TYPE, goalRef },
|
|
138
|
+
{
|
|
139
|
+
...admission,
|
|
140
|
+
authorize(context) {
|
|
141
|
+
if (
|
|
142
|
+
context.operation !== "read-event" ||
|
|
143
|
+
context.type !== TYPE ||
|
|
144
|
+
JSON.stringify(context.goalRef) !== JSON.stringify(goalRef)
|
|
145
|
+
)
|
|
146
|
+
return false;
|
|
147
|
+
source.revalidate(current);
|
|
148
|
+
revalidatePlugin();
|
|
149
|
+
return true;
|
|
150
|
+
},
|
|
151
|
+
readEvent() {
|
|
152
|
+
source.revalidate(current);
|
|
153
|
+
return {
|
|
154
|
+
summary: `status: ${previousStatus} -> ${current.goal.status}`,
|
|
155
|
+
occurredAt: observedAt,
|
|
156
|
+
};
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
);
|
|
160
|
+
source.revalidate(current);
|
|
161
|
+
revalidatePlugin();
|
|
162
|
+
if (signal?.aborted || performance.now() >= deadline) return;
|
|
163
|
+
snapshot = current;
|
|
164
|
+
yield Object.freeze({
|
|
165
|
+
schema: CLI_GOAL_EVENT_SCHEMA,
|
|
166
|
+
kind: "event",
|
|
167
|
+
plugin: ref,
|
|
168
|
+
observedAt,
|
|
169
|
+
delivery: "polling",
|
|
170
|
+
replay: false,
|
|
171
|
+
event,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
})();
|
|
175
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Explicit goal panels from standalone files or a short-lived desktop read lease. */
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
|
-
import {
|
|
4
|
+
import { cliGoalExtensionHost } from "./cli-goal-capabilities.js";
|
|
5
5
|
import { resolveConfigDataRoot } from "../paths.js";
|
|
6
6
|
import { managedSettingsPath } from "../settings-loader.cjs";
|
|
7
7
|
import { createCliGoalSnapshotReader } from "../cli-goal-source.js";
|
|
@@ -13,11 +13,9 @@ import {
|
|
|
13
13
|
} from "./goal-extensions.js";
|
|
14
14
|
|
|
15
15
|
export const CLI_GOAL_PANEL_SCHEMA = "chainlesschain.goal-extension-panels.v1";
|
|
16
|
-
export const CLI_GOAL_EXTENSION_HOST =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
capabilities: Object.freeze(["panel:goal.summary"]),
|
|
20
|
-
});
|
|
16
|
+
export const CLI_GOAL_EXTENSION_HOST = cliGoalExtensionHost([
|
|
17
|
+
"panel:goal.summary",
|
|
18
|
+
]);
|
|
21
19
|
export const _deps = { collectGoalExtensions, projectGoalExtensionPanel };
|
|
22
20
|
|
|
23
21
|
function fail(code) {
|
|
@@ -95,13 +93,7 @@ export async function readCliGoalExtensionPanels(id, options = {}) {
|
|
|
95
93
|
env,
|
|
96
94
|
managedSettingsFile,
|
|
97
95
|
host: connection?.evidence
|
|
98
|
-
?
|
|
99
|
-
...CLI_GOAL_EXTENSION_HOST,
|
|
100
|
-
capabilities: Object.freeze([
|
|
101
|
-
"panel:goal.summary",
|
|
102
|
-
"panel:goal.evidence",
|
|
103
|
-
]),
|
|
104
|
-
})
|
|
96
|
+
? cliGoalExtensionHost(["panel:goal.summary", "panel:goal.evidence"])
|
|
105
97
|
: CLI_GOAL_EXTENSION_HOST,
|
|
106
98
|
async authorize(context) {
|
|
107
99
|
if (
|
|
@@ -169,6 +161,22 @@ export async function readCliGoalExtensionPanels(id, options = {}) {
|
|
|
169
161
|
const projected = [];
|
|
170
162
|
try {
|
|
171
163
|
for (const panel of plugin.declaration.panels) {
|
|
164
|
+
if (
|
|
165
|
+
!hostOptions.host.activeCapabilities.includes(`panel:${panel.slot}`)
|
|
166
|
+
) {
|
|
167
|
+
if (
|
|
168
|
+
!dropped.some(
|
|
169
|
+
(entry) =>
|
|
170
|
+
entry.name === plugin.name && entry.scope === plugin.scope,
|
|
171
|
+
)
|
|
172
|
+
)
|
|
173
|
+
dropped.push({
|
|
174
|
+
name: plugin.name,
|
|
175
|
+
scope: plugin.scope,
|
|
176
|
+
reason: "unsupported_capabilities",
|
|
177
|
+
});
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
172
180
|
projected.push({
|
|
173
181
|
plugin: ref,
|
|
174
182
|
...(await _deps.projectGoalExtensionPanel(
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/** A separately consented v4 lease observes bounded native evidence snapshots. */
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { performance } from "node:perf_hooks";
|
|
4
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
6
|
+
import { cliGoalExtensionHost } from "./cli-goal-capabilities.js";
|
|
7
|
+
import { managedSettingsPath } from "../settings-loader.cjs";
|
|
8
|
+
import { createProjectGoalConnection } from "../project-goal-connection.js";
|
|
9
|
+
import {
|
|
10
|
+
collectGoalExtensions,
|
|
11
|
+
projectGoalExtensionEvent,
|
|
12
|
+
} from "./goal-extensions.js";
|
|
13
|
+
|
|
14
|
+
const TYPES = ["risk.review.completed", "action.receipt.updated"];
|
|
15
|
+
const SCHEMA = "chainlesschain.goal-extension-stream/v1";
|
|
16
|
+
export const _deps = { createProjectGoalConnection, projectGoalExtensionEvent };
|
|
17
|
+
const fail = (code) => {
|
|
18
|
+
throw new Error(code);
|
|
19
|
+
};
|
|
20
|
+
const digest = (value) =>
|
|
21
|
+
createHash("sha256").update(JSON.stringify(value)).digest("hex");
|
|
22
|
+
|
|
23
|
+
/** Capture options before any I/O. Never reinterpret another lease as events. */
|
|
24
|
+
export function watchCliProjectGoalEvents(id, options = {}) {
|
|
25
|
+
const cwd = path.resolve(options.cwd || process.cwd());
|
|
26
|
+
const env = Object.freeze({ ...(options.env || process.env) });
|
|
27
|
+
const managedSettingsFile = managedSettingsPath({
|
|
28
|
+
env,
|
|
29
|
+
managedSettingsFile: options.managedSettingsFile,
|
|
30
|
+
});
|
|
31
|
+
const name = options.plugin,
|
|
32
|
+
scope = options.scope,
|
|
33
|
+
expectedStore = options.expectedStore;
|
|
34
|
+
const connectionFile = options.connection;
|
|
35
|
+
const intervalMs = options.intervalMs ?? 1000,
|
|
36
|
+
durationMs = options.durationMs ?? 60000;
|
|
37
|
+
const signal = options.signal;
|
|
38
|
+
if (typeof name !== "string" || !name || name.length > 256)
|
|
39
|
+
fail("CLI_GOAL_INVALID_PLUGIN_NAME");
|
|
40
|
+
if (scope !== undefined && !["user", "project", "local"].includes(scope))
|
|
41
|
+
fail("CLI_GOAL_INVALID_PLUGIN_SCOPE");
|
|
42
|
+
if (
|
|
43
|
+
!Number.isSafeInteger(intervalMs) ||
|
|
44
|
+
intervalMs < 250 ||
|
|
45
|
+
intervalMs > 60000 ||
|
|
46
|
+
!Number.isSafeInteger(durationMs) ||
|
|
47
|
+
durationMs < 1000 ||
|
|
48
|
+
durationMs > 900000
|
|
49
|
+
)
|
|
50
|
+
fail("CLI_GOAL_INVALID_WATCH_LIMIT");
|
|
51
|
+
if (signal !== undefined && !(signal instanceof AbortSignal))
|
|
52
|
+
fail("CLI_GOAL_INVALID_WATCH_SIGNAL");
|
|
53
|
+
const host = cliGoalExtensionHost(TYPES.map((type) => `event:${type}`));
|
|
54
|
+
const admission = Object.freeze({ cwd, env, managedSettingsFile, host });
|
|
55
|
+
return (async function* () {
|
|
56
|
+
if (signal?.aborted) return;
|
|
57
|
+
const source = _deps.createProjectGoalConnection(connectionFile);
|
|
58
|
+
if (!source.events || typeof source.readEvents !== "function")
|
|
59
|
+
fail("CLI_GOAL_EVENT_CONNECTION_REQUIRED");
|
|
60
|
+
const goalRef = source.goalRef;
|
|
61
|
+
if (
|
|
62
|
+
id !== goalRef.id ||
|
|
63
|
+
(expectedStore !== undefined && expectedStore !== goalRef.storeId)
|
|
64
|
+
)
|
|
65
|
+
fail("CLI_GOAL_STORE_MISMATCH");
|
|
66
|
+
const matches = collectGoalExtensions(admission).extensions.filter(
|
|
67
|
+
(entry) =>
|
|
68
|
+
entry.name === name &&
|
|
69
|
+
(!scope || entry.scope === scope) &&
|
|
70
|
+
entry.declaration.events.some((type) => TYPES.includes(type)),
|
|
71
|
+
);
|
|
72
|
+
if (matches.length !== 1) fail("CLI_GOAL_EVENT_PLUGIN_UNAVAILABLE");
|
|
73
|
+
const plugin = matches[0];
|
|
74
|
+
const ref = Object.freeze({
|
|
75
|
+
name: plugin.name,
|
|
76
|
+
scope: plugin.scope,
|
|
77
|
+
version: plugin.version,
|
|
78
|
+
});
|
|
79
|
+
const declaration = digest(plugin.declaration);
|
|
80
|
+
function revalidatePlugin() {
|
|
81
|
+
const current = collectGoalExtensions(admission).extensions.find(
|
|
82
|
+
(entry) =>
|
|
83
|
+
entry.name === ref.name &&
|
|
84
|
+
entry.scope === ref.scope &&
|
|
85
|
+
entry.version === ref.version,
|
|
86
|
+
);
|
|
87
|
+
if (!current || digest(current.declaration) !== declaration)
|
|
88
|
+
fail("CLI_GOAL_EVENT_ADMISSION_CHANGED");
|
|
89
|
+
}
|
|
90
|
+
const deadline = performance.now() + durationMs;
|
|
91
|
+
const controller = new AbortController();
|
|
92
|
+
const stop = () => controller.abort();
|
|
93
|
+
const timer = setTimeout(stop, durationMs);
|
|
94
|
+
timer.unref();
|
|
95
|
+
signal?.addEventListener("abort", stop, { once: true });
|
|
96
|
+
if (signal?.aborted) stop();
|
|
97
|
+
async function read() {
|
|
98
|
+
revalidatePlugin();
|
|
99
|
+
const value = await source.readEvents(id, { signal: controller.signal });
|
|
100
|
+
revalidatePlugin();
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
async function revalidate(snapshot) {
|
|
104
|
+
if (digest(await read()) !== digest(snapshot))
|
|
105
|
+
fail("CLI_GOAL_EVENT_SOURCE_CHANGED");
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
let previous = await read();
|
|
109
|
+
await revalidate(previous);
|
|
110
|
+
if (controller.signal.aborted) return;
|
|
111
|
+
yield Object.freeze({
|
|
112
|
+
schema: SCHEMA,
|
|
113
|
+
kind: "ready",
|
|
114
|
+
source: "desktop-project",
|
|
115
|
+
plugin: ref,
|
|
116
|
+
goalRef,
|
|
117
|
+
observedAt: new Date().toISOString(),
|
|
118
|
+
delivery: "polling",
|
|
119
|
+
replay: false,
|
|
120
|
+
});
|
|
121
|
+
while (!controller.signal.aborted && performance.now() < deadline) {
|
|
122
|
+
await delay(
|
|
123
|
+
Math.min(intervalMs, Math.max(1, deadline - performance.now())),
|
|
124
|
+
undefined,
|
|
125
|
+
{ signal: controller.signal },
|
|
126
|
+
);
|
|
127
|
+
if (controller.signal.aborted || performance.now() >= deadline) return;
|
|
128
|
+
const current = await read();
|
|
129
|
+
if (digest(current) === digest(previous)) continue;
|
|
130
|
+
const events = [];
|
|
131
|
+
if (
|
|
132
|
+
(previous.risk.reviewId && !current.risk.reviewId) ||
|
|
133
|
+
(previous.receipts.state === "recorded" &&
|
|
134
|
+
current.receipts.state !== "recorded")
|
|
135
|
+
)
|
|
136
|
+
fail("CLI_GOAL_EVENT_SOURCE_REGRESSED");
|
|
137
|
+
if (
|
|
138
|
+
current.risk.reviewId &&
|
|
139
|
+
digest(current.risk) !== digest(previous.risk) &&
|
|
140
|
+
plugin.declaration.events.includes(TYPES[0])
|
|
141
|
+
)
|
|
142
|
+
events.push({
|
|
143
|
+
type: TYPES[0],
|
|
144
|
+
summary: `Historical risk check ${current.risk.reviewId}: ${current.risk.state}; risk task count ${current.risk.riskTaskCount ?? "unknown"}. Current risk and goal completion require native verification.`,
|
|
145
|
+
});
|
|
146
|
+
for (const receipt of current.receipts.entries) {
|
|
147
|
+
const before = previous.receipts.entries.find(
|
|
148
|
+
(entry) => entry.id === receipt.id,
|
|
149
|
+
);
|
|
150
|
+
if (
|
|
151
|
+
before &&
|
|
152
|
+
before.status !== "unresolved" &&
|
|
153
|
+
digest(before) !== digest(receipt)
|
|
154
|
+
)
|
|
155
|
+
fail("CLI_GOAL_EVENT_SOURCE_REGRESSED");
|
|
156
|
+
if (
|
|
157
|
+
(!before || digest(receipt) !== digest(before)) &&
|
|
158
|
+
plugin.declaration.events.includes(TYPES[1])
|
|
159
|
+
)
|
|
160
|
+
events.push({
|
|
161
|
+
type: TYPES[1],
|
|
162
|
+
summary: `Historical action receipt ${receipt.id}: ${receipt.status} (${receipt.actionType}). This does not prove goal completion.`,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
for (const candidate of events) {
|
|
166
|
+
const observedAt = new Date().toISOString();
|
|
167
|
+
const event = await _deps.projectGoalExtensionEvent(
|
|
168
|
+
ref,
|
|
169
|
+
{ type: candidate.type, goalRef },
|
|
170
|
+
{
|
|
171
|
+
...admission,
|
|
172
|
+
async authorize(context) {
|
|
173
|
+
if (
|
|
174
|
+
context.operation !== "read-event" ||
|
|
175
|
+
context.type !== candidate.type ||
|
|
176
|
+
JSON.stringify(context.goalRef) !== JSON.stringify(goalRef)
|
|
177
|
+
)
|
|
178
|
+
return false;
|
|
179
|
+
await revalidate(current);
|
|
180
|
+
return true;
|
|
181
|
+
},
|
|
182
|
+
async readEvent() {
|
|
183
|
+
await revalidate(current);
|
|
184
|
+
return { summary: candidate.summary, occurredAt: observedAt };
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
);
|
|
188
|
+
await revalidate(current);
|
|
189
|
+
if (controller.signal.aborted || performance.now() >= deadline)
|
|
190
|
+
return;
|
|
191
|
+
yield Object.freeze({
|
|
192
|
+
schema: SCHEMA,
|
|
193
|
+
kind: "event",
|
|
194
|
+
source: "desktop-project",
|
|
195
|
+
plugin: ref,
|
|
196
|
+
observedAt,
|
|
197
|
+
delivery: "polling",
|
|
198
|
+
replay: false,
|
|
199
|
+
event,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
previous = current;
|
|
203
|
+
}
|
|
204
|
+
} catch (error) {
|
|
205
|
+
if (!controller.signal.aborted) throw error;
|
|
206
|
+
} finally {
|
|
207
|
+
clearTimeout(timer);
|
|
208
|
+
signal?.removeEventListener("abort", stop);
|
|
209
|
+
controller.abort();
|
|
210
|
+
}
|
|
211
|
+
})();
|
|
212
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "goal-project-observer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Observe bounded native risk-check and action-receipt summaries through a separately authorized desktop event connection",
|
|
5
|
+
"permissions": {
|
|
6
|
+
"goalExtension": [
|
|
7
|
+
"event:risk.review.completed",
|
|
8
|
+
"event:action.receipt.updated"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"goalExtension": {
|
|
12
|
+
"apiVersion": "1.0.0",
|
|
13
|
+
"hosts": {
|
|
14
|
+
"cli": ">=0.166.142"
|
|
15
|
+
},
|
|
16
|
+
"events": ["risk.review.completed", "action.receipt.updated"],
|
|
17
|
+
"panels": [],
|
|
18
|
+
"proposals": []
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "goal-status-observer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Observe status changes of one explicitly selected standalone CLI goal",
|
|
5
|
+
"permissions": {
|
|
6
|
+
"goalExtension": ["event:goal.status.changed"]
|
|
7
|
+
},
|
|
8
|
+
"goalExtension": {
|
|
9
|
+
"apiVersion": "1.0.0",
|
|
10
|
+
"hosts": {
|
|
11
|
+
"cli": ">=0.166.142"
|
|
12
|
+
},
|
|
13
|
+
"events": ["goal.status.changed"],
|
|
14
|
+
"panels": [],
|
|
15
|
+
"proposals": []
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -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
|
+
}
|