@inkeep/open-knowledge 0.49.1 → 0.50.0-beta.1
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/dist/{acp-harness-probe-C8FhVWZi.mjs → acp-harness-probe-DwJF1QrM.mjs} +2 -2
- package/dist/cli.mjs +62 -62
- package/dist/constants-C9EGLQ-u.mjs +2 -0
- package/dist/{git-handle-r3d7s3VF.mjs → git-handle-B9WUn7B2.mjs} +2 -2
- package/dist/git-handle-BfyNyc1q.mjs +1 -0
- package/dist/index.d.mts +36 -5
- package/dist/index.mjs +192 -192
- package/dist/{init-VslWN3Iz.mjs → init-8_iXriiz.mjs} +3 -3
- package/dist/init-D5SAyEIp.mjs +1 -0
- package/dist/{launch-json-removal-9-8M5r9e.mjs → launch-json-removal-CXPn5A7N.mjs} +2 -2
- package/dist/{loader-f3tIWlWk.mjs → loader-CJqV3lQK.mjs} +2 -2
- package/dist/loader-CU-Nz3ee.mjs +1 -0
- package/dist/md-manager-DGG55-uN.mjs +2 -0
- package/dist/{open-browser-BgReR_t5.mjs → open-browser-Bu1KY-5f.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-CdESX2Ja.mjs → preview-CXrbuj-R.mjs} +2 -2
- package/dist/preview-CjwSh-52.mjs +1 -0
- package/dist/public/assets/ActivityModeContent-HRSmxB9_.js +1 -0
- package/dist/public/assets/{AgentDiffPane-T499-ugv.js → AgentDiffPane-BGYo5UN6.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-BlMGv16y.js → AgentThreadClientBinder-0uU00Tq4.js} +1 -1
- package/dist/public/assets/{AppMenubar-dik_dmjC.js → AppMenubar-Dk1BEmD9.js} +1 -1
- package/dist/public/assets/{BugReportHistory-DymFE_6x.js → BugReportHistory-CRlvJE2K.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-D28ahq-6.js → BugReportHistoryDialog-DIqnZXkT.js} +1 -1
- package/dist/public/assets/ChangedOutsideBadge-CG45zoCT.js +1 -0
- package/dist/public/assets/{CodeMirrorPropInput-3TWUbzXY.js → CodeMirrorPropInput-B__Dqs8P.js} +3 -3
- package/dist/public/assets/{ConfigSharingInfoTooltip-Bwt_R43K.js → ConfigSharingInfoTooltip-BNI3Q3Qo.js} +1 -1
- package/dist/public/assets/ConsentDialogBody-BlayjFQq.js +2 -0
- package/dist/public/assets/{CopyButton-DysciFW5.js → CopyButton-Q-6hSzy6.js} +1 -1
- package/dist/public/assets/{DiffView-DY54R06f.js → DiffView-BnNY_4OT.js} +1 -1
- package/dist/public/assets/DocumentContext-Dxzqsjf0.js +38 -0
- package/dist/public/assets/EditorModeToggle-OACqdrIA.js +1 -0
- package/dist/public/assets/EnableSyncConfirmDialog-DBMws9uC.js +1 -0
- package/dist/public/assets/FeedbackForm-YQbdmBFL.js +1 -0
- package/dist/public/assets/GraphPanel-BlBOG-me.js +44 -0
- package/dist/public/assets/ImportSkillDialog-CgeVAxXn.js +1 -0
- package/dist/public/assets/{LintConfigEditor-3f4-NF1O.js → LintConfigEditor-v0oqzBfd.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BfO4jYnj.js +2 -0
- package/dist/public/assets/ManagedArtifactProperties-Dmjq1ugS.js +1 -0
- package/dist/public/assets/McpConsentDialogBody-DcaMMYmf.js +1 -0
- package/dist/public/assets/{Mermaid-Cr48L9fH.js → Mermaid-cUFqNhzC.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-C30-UfMg.js → MermaidDocEditor-YEj8k0Fj.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-Cdt1gfjt.js → RegisteredAgentIcon-CCgDsAUc.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-BUGec7jk.js → ReportBugDialogBody-f7fl9dVO.js} +1 -1
- package/dist/public/assets/SchemaConfigEditor-C_BBar0x.js +1 -0
- package/dist/public/assets/SessionsHost-DPObQsYR.js +2 -0
- package/dist/public/assets/SettingsDialogBody-C53PpDiP.js +12 -0
- package/dist/public/assets/ShareBranchSwitchDialog-DMbjNni-.js +1 -0
- package/dist/public/assets/ShareReceiveDialog-DMLSpBoi.js +1 -0
- package/dist/public/assets/{ShareReceiveMissDialog-B03ClkaE.js → ShareReceiveMissDialog-TTjnDvC9.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-C7z-32HN.js → SkillEditBanner-Dmsi4hSW.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DgWSnmXH.js → SkillOriginInline-BoGssBkU.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-PvRY_LHn.js → SkillToolbarControls-C8yypIJ3.js} +1 -1
- package/dist/public/assets/SlidesToolbarControls-CWIkYgNX.js +1 -0
- package/dist/public/assets/SourceEditor-D3dXest3.js +1 -0
- package/dist/public/assets/{TerminalPanel-Bl3bWVA_.js → TerminalPanel-D_OODFVz.js} +3 -3
- package/dist/public/assets/{TerminalWindowApp-CFxcrkfe.js → TerminalWindowApp-Dwoah4yb.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CHDC5byq.js → TextDocEditor-DzdzVGmP.js} +1 -1
- package/dist/public/assets/ThreadView-DJxvdzfd.js +10 -0
- package/dist/public/assets/TimelineDiffPane-D5U46urB.js +2 -0
- package/dist/public/assets/{agent-diff-store-B7oQn7l7.js → agent-diff-store-DmpkFUx3.js} +1 -1
- package/dist/public/assets/arrow-up-right-CXYxHO7Z.js +1 -0
- package/dist/public/assets/auth-state-cache-Dm1J9vyz.js +11 -0
- package/dist/public/assets/{braces-Ytg60O62.js → braces-54VO1tdr.js} +1 -1
- package/dist/public/assets/{calendar-GynmFVw0.js → calendar-BhCmsdcp.js} +1 -1
- package/dist/public/assets/{case-sensitive-DvBZDISP.js → case-sensitive-BpYLDHFG.js} +1 -1
- package/dist/public/assets/check-DA6LolTH.js +1 -0
- package/dist/public/assets/{checkbox-V0IoPAe3.js → checkbox-gpfWb1pY.js} +1 -1
- package/dist/public/assets/{chevron-down-DrpHBSgH.js → chevron-down-Ccgt58N5.js} +1 -1
- package/dist/public/assets/chevron-left-DY9flfyc.js +1 -0
- package/dist/public/assets/chevron-right-2RK4DD3b.js +1 -0
- package/dist/public/assets/{chevron-up-CsH_dTwv.js → chevron-up-DXAtCwKR.js} +1 -1
- package/dist/public/assets/client-version-BbTOZkhQ.js +1 -0
- package/dist/public/assets/{cm-theme-BJSRL90r.js → cm-theme-DPWSzbOc.js} +1 -1
- package/dist/public/assets/comment-chips-CNh6cTT4.js +5 -0
- package/dist/public/assets/config-provider-CZ_6SNHv.js +5 -0
- package/dist/public/assets/{dialog-eak3pI7G.js → dialog-O4u6_xiQ.js} +1 -1
- package/dist/public/assets/{dist-DndwauQ3.js → dist-BpOfJRMm.js} +1 -1
- package/dist/public/assets/{dist-hwUYIgzz.js → dist-C1TyNsxp.js} +1 -1
- package/dist/public/assets/{dist-BCM06z1D.js → dist-CDMQmWZl.js} +1 -1
- package/dist/public/assets/{dist-BDJLSjo2.js → dist-CI5_cNui.js} +1 -1
- package/dist/public/assets/{dist-CkHhDuKZ.js → dist-CJuiZAB0.js} +1 -1
- package/dist/public/assets/{dist-DvtYFuZI.js → dist-CNm9tACe.js} +1 -1
- package/dist/public/assets/{dist-DJ3iQH0N.js → dist-CebtYbHb.js} +1 -1
- package/dist/public/assets/{dist--4AcVRue.js → dist-CpwfhxFl.js} +1 -1
- package/dist/public/assets/{dist-DNV7r8rH.js → dist-DU2smIGg.js} +1 -1
- package/dist/public/assets/{dist-PVtTd_Sj2.js → dist-TVrIGknK2.js} +111 -111
- package/dist/public/assets/{dist-Wj2cwRLU.js → dist-hrQOAqN1.js} +1 -1
- package/dist/public/assets/{dist-yYRRvtMr.js → dist-wfUjMP-v.js} +1 -1
- package/dist/public/assets/{dist-ClczuKkQ.js → dist-y6w4IT08.js} +1 -1
- package/dist/public/assets/doc-paths-BKAhPn1c.js +1 -0
- package/dist/public/assets/{documents-events-COSAPFkC.js → documents-events-B6nWdFan.js} +1 -1
- package/dist/public/assets/{download-Bq4sKAdj.js → download-BuEN0lZf.js} +1 -1
- package/dist/public/assets/{dropdown-menu-BhMtMvZp.js → dropdown-menu-CP1RnfZI.js} +1 -1
- package/dist/public/assets/{eye-DYUvwA0Z.js → eye-CYj_zi2W.js} +1 -1
- package/dist/public/assets/{field-DN11CYjs.js → field-BADrt9_J.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-B9dmiTPy.js → file-tree-adapter-Dhf8gmFi.js} +1 -1
- package/dist/public/assets/{file-tree-utils-CvsKsHRh.js → file-tree-utils-Cx1c51Ql.js} +1 -1
- package/dist/public/assets/{folder-Cnftw7jd.js → folder-CWVPrRtx.js} +1 -1
- package/dist/public/assets/folder-config-api-CKhPo3Lt.js +1 -0
- package/dist/public/assets/{folder-open-DoQalFip.js → folder-open-BXfoqsrp.js} +1 -1
- package/dist/public/assets/{follow-file-BymUhAtT.js → follow-file-BRGwJuKy.js} +1 -1
- package/dist/public/assets/{git-branch-BWBPTGqT.js → git-branch-CMN6cdzm.js} +1 -1
- package/dist/public/assets/globals-CIRDbOmQ.css +1 -0
- package/dist/public/assets/{hash-BZXl_HqD.js → hash-BS4ux6bl.js} +1 -1
- package/dist/public/assets/history-CiIvI4I4.js +1 -0
- package/dist/public/assets/i18n-iRTrMKQI.js +1 -0
- package/dist/public/assets/index-Dask65mE.js +2097 -0
- package/dist/public/assets/{info-Jj1j2YxC.js → info-160SNOuG.js} +1 -1
- package/dist/public/assets/{input-group-H-ZoGiXT.js → input-group-CPKSxoq5.js} +1 -1
- package/dist/public/assets/{lint-config-client-DkwFMG_T.js → lint-config-client-KRlZx1_T.js} +1 -1
- package/dist/public/assets/{list-plus-IYEFhKGU.js → list-plus-BPvSuFZX.js} +1 -1
- package/dist/public/assets/loader-circle-BbuX0POi.js +1 -0
- package/dist/public/assets/{local-menu-action-bus-DLozq_c4.js → local-menu-action-bus-BDB0W02w.js} +1 -1
- package/dist/public/assets/markdownlint-rule-browser-BAnqBevm.js +1 -0
- package/dist/public/assets/{mcp-consent-store-B_Tog3LX.js → mcp-consent-store-yqsuAEir.js} +1 -1
- package/dist/public/assets/messages-52Q73NDn.js +1 -0
- package/dist/public/assets/messages-B-LUKCxb.js +1 -0
- package/dist/public/assets/messages-Bjt29O_q.js +1 -0
- package/dist/public/assets/messages-BzwBNPDu.js +1 -0
- package/dist/public/assets/messages-CGjveR2E.js +1 -0
- package/dist/public/assets/messages-CkanzrCR.js +1 -0
- package/dist/public/assets/messages-Cy75Ipbk.js +1 -0
- package/dist/public/assets/messages-D2UntltU.js +1 -0
- package/dist/public/assets/messages-D8H0FnV4.js +1 -0
- package/dist/public/assets/messages-Dl7JEKLk.js +1 -0
- package/dist/public/assets/messages-s-nrsPLp.js +1 -0
- package/dist/public/assets/minus-Ba4o_31L.js +1 -0
- package/dist/public/assets/{miss-dialog-store--ihxgGwV.js → miss-dialog-store-CdaZpyLg.js} +1 -1
- package/dist/public/assets/{navigation-targets-DKe7BSku.js → navigation-targets-BhdJAW-R.js} +1 -1
- package/dist/public/assets/open-managed-artifact-tab-CgUiYJiR.js +1 -0
- package/dist/public/assets/{panel-right-open-BhUOm1Eq.js → panel-right-open-_nL1w4h-.js} +1 -1
- package/dist/public/assets/{paperclip-9gdTBktj.js → paperclip-DV67TMJS.js} +1 -1
- package/dist/public/assets/pending-receive-nav-store-Crda7hlg.js +1 -0
- package/dist/public/assets/{project-paths-fLhDAPyF.js → project-paths-BWmSfpDI.js} +1 -1
- package/dist/public/assets/prop-types-CvU-2DkU.js +1 -0
- package/dist/public/assets/{receive-store-BvkW9HUo.js → receive-store--Bc0z-E4.js} +1 -1
- package/dist/public/assets/{refresh-cw-REpEMEB2.js → refresh-cw-Bjv-Fpq5.js} +1 -1
- package/dist/public/assets/{schema-fields-view-intent-DZFjFt0c.js → schema-fields-view-intent-BMlW8LRz.js} +1 -1
- package/dist/public/assets/{select-CRztynyQ.js → select-BaOsrrG7.js} +1 -1
- package/dist/public/assets/{selection-context-CSP8zK1H.js → selection-context-CsRnyGFj.js} +1 -1
- package/dist/public/assets/{separator-k0mwGcaM.js → separator-BXBsYPiB.js} +1 -1
- package/dist/public/assets/skill-actions-B7Cmxryy.js +2 -0
- package/dist/public/assets/{skill-scope-Dr7iwSW3.js → skill-scope-CwmLPgmT.js} +1 -1
- package/dist/public/assets/{skills-api-qDbnaMmu.js → skills-api-DDfyPLwg.js} +1 -1
- package/dist/public/assets/{square-pen-D3oI-YUs.js → square-pen-CW0s3lqC.js} +1 -1
- package/dist/public/assets/{src-VcUCSe0b.js → src-DfI4uz3u.js} +1 -1
- package/dist/public/assets/{tag-pill-input-pBac7WXR.js → tag-pill-input-DnM-Fz1E.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DAyeqt__.js → target-navigation-intent-D8zAsaUV.js} +1 -1
- package/dist/public/assets/{telemetry-impl-C9jF13xo.js → telemetry-impl-DFcgjFFc.js} +1 -1
- package/dist/public/assets/{telemetry-startup-1DamiHqT.js → telemetry-startup-0F_AW_hr.js} +1 -1
- package/dist/public/assets/terminal-BNdVsbND.js +1 -0
- package/dist/public/assets/terminal-cli-display-Djf7X5gE.js +1 -0
- package/dist/public/assets/terminal-launch-events-B76nHQ-9.js +1 -0
- package/dist/public/assets/terminal-telemetry-CynEAJPS.js +1 -0
- package/dist/public/assets/{text-viewer-languages-BTzKrM_y.js → text-viewer-languages-BBrkAtBf.js} +2 -2
- package/dist/public/assets/thread-client-CER-baRK.js +1 -0
- package/dist/public/assets/{trash-2-BSr7FcE8.js → trash-2-rgduGgZB.js} +1 -1
- package/dist/public/assets/{triangle-alert-DNTyNeem.js → triangle-alert-CnW4IElJ.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BOmjXV-P.js → typing-burst-detector-DzIKrNKg.js} +4 -4
- package/dist/public/assets/{undo-2-u9f9OoCF.js → undo-2-BmxrL5XS.js} +1 -1
- package/dist/public/assets/{uninstall-36twrq5C.js → uninstall-DT91VYMe.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BwANCYjg.js → use-activity-panel-CbIsW8Oq.js} +1 -1
- package/dist/public/assets/use-apply-config-color-theme-Cd_bVm8F.js +1 -0
- package/dist/public/assets/{use-collab-url-TKpnPAW8.js → use-collab-url-DESxkkaS.js} +1 -1
- package/dist/public/assets/use-live-xterm-theme-D9HFWiME.js +1 -0
- package/dist/public/assets/use-open-skill-DyTRfvTr.js +1 -0
- package/dist/public/assets/use-settings-route-BXWhuQbZ.js +1 -0
- package/dist/public/assets/{use-skill-directory-D9S5f8By.js → use-skill-directory-BaP9hj7C.js} +1 -1
- package/dist/public/assets/use-skill-origin-DBXnPKZS.js +1 -0
- package/dist/public/assets/{use-skills-D5kEHDif.js → use-skills-CVci-eTA.js} +1 -1
- package/dist/public/assets/use-terminal-enabled-DDthawVX.js +1 -0
- package/dist/public/assets/{use-timeline-entry-diff-CB_cI1yy.js → use-timeline-entry-diff-BC2rFPLm.js} +2 -2
- package/dist/public/assets/{use-workspace--QTATo27.js → use-workspace-CAcWHNxj.js} +1 -1
- package/dist/public/assets/{wrench-BPXVnAE5.js → wrench-DtGaC8XY.js} +1 -1
- package/dist/public/assets/x-D8xzRaMT.js +1 -0
- package/dist/public/index.html +122 -122
- package/dist/public/uninstall.html +14 -14
- package/dist/{repair-launch-json-DwJ_yLw4.mjs → repair-launch-json-V-un1HwF.mjs} +2 -2
- package/dist/{repair-mcp-configs-Q1hO02co.mjs → repair-mcp-configs-CgS2qBwI.mjs} +2 -2
- package/dist/repair-skills-KPpoS1oT.mjs +1 -0
- package/dist/{repair-skills-DADI6iaT.mjs → repair-skills-cQdbD3lz.mjs} +2 -2
- package/dist/server-lock-CMPaDe7b.mjs +1 -0
- package/dist/server-lock-CVlhIOaP.mjs +2 -0
- package/dist/{skill-teardown-onVYT1VF.mjs → skill-teardown-BVQqx1VE.mjs} +2 -2
- package/dist/src-C1NIOm2S.mjs +1 -0
- package/dist/{src-TKCctdpc.mjs → src-Cb3i1kcm.mjs} +5 -5
- package/dist/src-Dn98dNdR.mjs +1 -0
- package/dist/src-Mfncsy21.mjs +20 -0
- package/dist/src-q9JjDIHN.mjs +2032 -0
- package/dist/{start-DRG6a2sz.mjs → start-BSLZXd-A.mjs} +3 -3
- package/dist/start-CJ3wdpkC.mjs +1 -0
- package/dist/{write-project-skill-DOogyZge.mjs → write-project-skill-DPVCl9Kv.mjs} +2 -2
- package/package.json +5 -5
- package/dist/constants-BkYBCRUx.mjs +0 -2
- package/dist/git-handle-DBSzQutT.mjs +0 -1
- package/dist/init-BlCMJ0yB.mjs +0 -1
- package/dist/loader-Birwg2h1.mjs +0 -1
- package/dist/md-manager-BbSzMHHE.mjs +0 -2
- package/dist/preview-gKyXf1a0.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-C08FYohG.js +0 -1
- package/dist/public/assets/ChangedOutsideBadge-GeQfL_b-.js +0 -1
- package/dist/public/assets/ConsentDialogBody-Clb82Qbo.js +0 -2
- package/dist/public/assets/DocumentContext-C-Lo65-_.js +0 -38
- package/dist/public/assets/EditorModeToggle-BjgmECAn.js +0 -1
- package/dist/public/assets/EnableSyncConfirmDialog-B1Eo_sVE.js +0 -1
- package/dist/public/assets/FeedbackForm-C_A-lpjC.js +0 -1
- package/dist/public/assets/GraphPanel-CxJeFUDp.js +0 -44
- package/dist/public/assets/ImportSkillDialog-ChsGV6eb.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-B1ZA0ofn.js +0 -2
- package/dist/public/assets/ManagedArtifactProperties-B_ecuboX.js +0 -1
- package/dist/public/assets/McpConsentDialogBody-CG5af4os.js +0 -1
- package/dist/public/assets/SchemaConfigEditor-DPK5XbMd.js +0 -1
- package/dist/public/assets/SessionsHost-BRUQMi7f.js +0 -2
- package/dist/public/assets/SettingsDialogBody-COTbFRqi.js +0 -12
- package/dist/public/assets/ShareBranchSwitchDialog-C0mAHHVQ.js +0 -1
- package/dist/public/assets/ShareReceiveDialog-Coi9tYAP.js +0 -1
- package/dist/public/assets/SlidesToolbarControls-8TzXHMwI.js +0 -1
- package/dist/public/assets/SourceEditor-Duqpede9.js +0 -1
- package/dist/public/assets/ThreadView-CAGruMiN.js +0 -10
- package/dist/public/assets/TimelineDiffPane-DnaRcvCk.js +0 -2
- package/dist/public/assets/agent-visibility-CHYjRInm.js +0 -1
- package/dist/public/assets/arrow-up-right-0IN5lFEX.js +0 -1
- package/dist/public/assets/auth-state-cache-BUYyIMUZ.js +0 -11
- package/dist/public/assets/check-BLuQ2zvV.js +0 -1
- package/dist/public/assets/chevron-left-BUr-yKA4.js +0 -1
- package/dist/public/assets/chevron-right-BU8AeJST.js +0 -1
- package/dist/public/assets/client-version-DfXcf1Qf.js +0 -1
- package/dist/public/assets/comment-chips-BhvfCPCk.js +0 -5
- package/dist/public/assets/config-context-DNY4at5d.js +0 -1
- package/dist/public/assets/config-provider-B7dMDFNr.js +0 -5
- package/dist/public/assets/doc-paths-CH8QyanF.js +0 -1
- package/dist/public/assets/folder-config-api-IGZhtkRo.js +0 -1
- package/dist/public/assets/globals-D9Q1kf3c.css +0 -1
- package/dist/public/assets/history-BNEST2Cx.js +0 -1
- package/dist/public/assets/i18n-CIRn0AvV.js +0 -1
- package/dist/public/assets/index-B-snLDY1.js +0 -2097
- package/dist/public/assets/loader-circle-Coob8S41.js +0 -1
- package/dist/public/assets/markdownlint-rule-browser-DY5CRVFm.js +0 -1
- package/dist/public/assets/messages-6Fd7I7zn.js +0 -1
- package/dist/public/assets/messages-BJIB1I1L.js +0 -1
- package/dist/public/assets/messages-BOXmrfhw.js +0 -1
- package/dist/public/assets/messages-BeOM8jWl.js +0 -1
- package/dist/public/assets/messages-CCWKIebo.js +0 -1
- package/dist/public/assets/messages-CQFityfC.js +0 -1
- package/dist/public/assets/messages-CzRXVtjz.js +0 -1
- package/dist/public/assets/messages-DYiuNk7y.js +0 -1
- package/dist/public/assets/messages-Db5U-G1d.js +0 -1
- package/dist/public/assets/messages-DohtKbKM.js +0 -1
- package/dist/public/assets/messages-WWFblTuV.js +0 -1
- package/dist/public/assets/minus-DPAjfzCa.js +0 -1
- package/dist/public/assets/open-managed-artifact-tab-DGO7syz6.js +0 -1
- package/dist/public/assets/pending-receive-nav-store-SZ8w-xKW.js +0 -1
- package/dist/public/assets/prop-types-DoONHMUn.js +0 -1
- package/dist/public/assets/skill-actions-98H3SnCL.js +0 -2
- package/dist/public/assets/terminal-launch-events-CIULxHeu.js +0 -1
- package/dist/public/assets/terminal-mGTI25Qq.js +0 -1
- package/dist/public/assets/terminal-telemetry-CqkILJJU.js +0 -1
- package/dist/public/assets/thread-client-DSDduEdo.js +0 -1
- package/dist/public/assets/use-live-xterm-theme-B8OPZLR3.js +0 -1
- package/dist/public/assets/use-open-skill-DCSEJ3jJ.js +0 -1
- package/dist/public/assets/use-settings-route-CKMxexs3.js +0 -1
- package/dist/public/assets/use-skill-origin-8_nwflm6.js +0 -1
- package/dist/public/assets/use-terminal-enabled-Ctosnrg_.js +0 -1
- package/dist/public/assets/x-COTyTduF.js +0 -1
- package/dist/repair-skills-DKwDAoHc.mjs +0 -1
- package/dist/server-lock-U8YDpJpq.mjs +0 -1
- package/dist/server-lock-aXnDVUI8.mjs +0 -2
- package/dist/src-BgeIHNkQ.mjs +0 -1
- package/dist/src-DNPRz0-U.mjs +0 -20
- package/dist/src-Dt5dAyFQ.mjs +0 -2032
- package/dist/src-cRpQSbXB.mjs +0 -1
- package/dist/start-CWIlNpAT.mjs +0 -1
- /package/dist/public/assets/{asset-dispatch-Dst62kKY.js → asset-dispatch-_dEhJuVP.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-B92v76dM.js → auth-prompt-store-CeaWNesV.js} +0 -0
- /package/dist/public/assets/{badge-B89o8Vy9.js → badge-CY_v_nGy.js} +0 -0
- /package/dist/public/assets/{copilot-qpaFt06v.js → copilot-D0J83lOh.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-BbftclCc.js → createLucideIcon-BcLKHslE.js} +0 -0
- /package/dist/public/assets/{cursor-Df-vt--2.js → cursor-B6-YoFzF.js} +0 -0
- /package/dist/public/assets/{desktop-bridge-types-BjBBs_pU.js → desktop-bridge-types-rBjHIYSI.js} +0 -0
- /package/dist/public/assets/{dist-BlH6jxEE.js → dist-BTu6o3T-.js} +0 -0
- /package/dist/public/assets/{dist-CEwo98ia.js → dist-Bkx5dDHT2.js} +0 -0
- /package/dist/public/assets/{dist-C7IFraT6.js → dist-DoS8xGN6.js} +0 -0
- /package/dist/public/assets/{documents-fetch-BTUkzxjd.js → documents-fetch-B8A9IAH3.js} +0 -0
- /package/dist/public/assets/{external-link-BkNoUOYg.js → external-link-Bw5EK5AQ.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-CEz8MVWM.js → file-tree-rename-validation-Dt6fQYnB.js} +0 -0
- /package/dist/public/assets/{globals-C-kRTFCu.js → globals-C9aYStL7.js} +0 -0
- /package/dist/public/assets/{input-BKUcczSW.js → input-_CzMpvY9.js} +0 -0
- /package/dist/public/assets/{overlay-layers-BqWhClsR.js → overlay-layers-C1Y78Wu8.js} +0 -0
- /package/dist/public/assets/{panel-CbGx_cRv.js → panel-DVJ8gssn.js} +0 -0
- /package/dist/public/assets/{parse-api-error-Cyn4P6OR.js → parse-api-error-Mgtc4OJu.js} +0 -0
- /package/dist/public/assets/{startup-marks-BzFN1cqP.js → startup-marks-BPO-vrjH.js} +0 -0
- /package/dist/public/assets/{stex-CyLY7DTo.js → stex-Cj2UNqUe.js} +0 -0
- /package/dist/public/assets/{workspace-paths-EgbOaHls.js → workspace-paths-D7hYulMY.js} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DTipWd-i.mjs";import{Y as t}from"./sleep-DVOInM4H.mjs";import{Es as n,Ts as r,X as i,Z as a}from"./src-Cb3i1kcm.mjs";import{Jr as o,Tn as s,_i as c,at as l,it as u,ot as d,rt as f}from"./src-q9JjDIHN.mjs";import{O as p,P as m}from"./fs-traced-DVpoNaQJ.mjs";import{C as ee,S as h,d as g,y as _}from"./server-lock-CVlhIOaP.mjs";import{t as v}from"./yazl-DZr4PyKA.mjs";import{m as y,p as b,v as x}from"./write-project-skill-DPVCl9Kv.mjs";import{c as S}from"./colors-BsmVIwfM.mjs";import"./acp-harness-probe-DwJF1QrM.mjs";import{E as C,T as w,_ as te,o as ne,w as T,x as E,y as re}from"./init-8_iXriiz.mjs";import{n as D}from"./constants-C9EGLQ-u.mjs";import{t as O}from"./is-object-ByG7RnjH.mjs";import"./loader-CJqV3lQK.mjs";import"./skill-teardown-BVQqx1VE.mjs";import"./preview-CXrbuj-R.mjs";import{execSync as k,spawnSync as A}from"node:child_process";import{basename as j,dirname as M,join as N,relative as ie,resolve as P,sep as ae}from"node:path";import{cpSync as oe,createWriteStream as F,existsSync as I,lstatSync as se,mkdirSync as L,mkdtempSync as ce,readFileSync as R,readdirSync as z,readlinkSync as le,rmSync as B,statSync as ue,writeFileSync as V}from"node:fs";import{arch as de,freemem as fe,homedir as H,hostname as pe,platform as me,release as he,tmpdir as ge,totalmem as _e,type as ve,uptime as ye}from"node:os";import"node:fs/promises";import{createHash as be}from"node:crypto";var U=t();const xe=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function Se(e,t,n=s){if(e!==void 0&&!xe.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let Ce=null;function we(e){Ce=e}function Te(){return Ce??process.cwd()}function Ee(){return N(H(),`.ok`,`bug-reports`)}function De(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`),n=Ee(),r=`${t}-bugreport`,i=N(n,`${r}.zip`);for(let e=2;I(i);e+=1)i=N(n,`${r}-${e}.zip`);return i}function Oe(e,t){let n=N(e,`.ok`,`config.yml`);if(I(n))try{let e=R(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return I(N(e,`.ok`))?be(`sha256`).update(P(e)).digest(`hex`).slice(0,12):null}function ke(){let e={timestamp:new Date().toISOString(),platform:me(),osType:ve(),osRelease:he(),hostname:`[redacted]`,uptime:ye(),freeMem:fe(),totalMem:_e(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=k(`sw_vers -productVersion 2>/dev/null`,o({encoding:`utf8`})).trim()}catch{}try{let t=N(__dirname,`..`,`..`,`package.json`);I(t)&&(e.okVersion=JSON.parse(R(t,`utf8`)).version)}catch{}return e}const Ae=[{prefix:`cli`,projectTagged:!0},{prefix:`desktop`,projectTagged:!1},{prefix:`mcp`,projectTagged:!1}];function W(e){let t=j(e);return Ae.some(e=>e.projectTagged&&t.startsWith(`${e.prefix}.`))}function je(e,t){return Me(e,t).files}function Me(e,t){if(!I(t))return{files:[],excludedByProjectSlug:0};let n=z(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>N(t,e));if(!e)return{files:n,excludedByProjectSlug:0};let r=n.filter(W),i=[],a=r.filter(t=>{try{return R(t,`utf8`).includes(`"project":"${e}"`)}catch{return i.push(t),!1}});if(a.length===0)return{files:n,excludedByProjectSlug:0};let o=new Set([...a,...i]);return{files:n.filter(e=>!W(e)||o.has(e)),excludedByProjectSlug:r.length-o.size}}function Ne(e){let t=N(e,`.ok`,`local`);return I(t)?{files:[`server.lock`,`last-spawn-error.log`,i].map(e=>N(t,e)).filter(e=>I(e))}:{files:[]}}function Pe(e){let t=N(e,`.ok`,`local`,`logs`);return I(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>N(t,e)).filter(e=>I(e))}:{files:[]}}function Fe(e){if(e.redact){let{redacted:t,patterns:r,lineCount:i}=n(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),r.length>0&&e.redactions.push({file:e.name,lineCount:i,patterns:r})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function G(e){for(let t of e.files)try{Fe({zipfile:e.zipfile,name:`${e.prefix}/${j(t)}`,content:R(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n},`bug-report: skipped unreadable file`)}}async function Ie(t){let{redact:n,outputPath:i,logger:a}=t,o=t.userLogsDir??N(H(),`.ok`,`logs`),s=t.projectDir?Oe(t.projectDir,a):null;L(M(i),{recursive:!0}),a?.info({projectSlug:s},`gathering diagnostic data`);let c=ke();c.desktop=t.desktop??null;let{files:l,excludedByProjectSlug:u}=Me(s,o),{files:d}=t.projectDir?Ne(t.projectDir):{files:[]},{files:f}=t.projectDir?Pe(t.projectDir):{files:[]};a?.info({logFileCount:l.length,logFilesExcludedByProjectSlug:u,lockFileCount:d.length,localSinkFileCount:f.length},`files collected`);let p=[],m=[],{ZipFile:ee}=await import(`./yazl-jVENrf5i.mjs`).then(t=>e(t.default,1)),h=new ee;G({zipfile:h,files:l,prefix:`logs`,redact:n,bundleFiles:m,redactions:p,logger:a}),G({zipfile:h,files:d,prefix:`lockdir`,redact:n,bundleFiles:m,redactions:p,logger:a}),G({zipfile:h,files:f,prefix:`local-logs`,redact:n,bundleFiles:m,redactions:p,logger:a});for(let e of t.extraFiles??[])try{let t=R(e.sourcePath),n=`extra/${e.zipName??j(e.sourcePath)}`;h.addBuffer(t,n),m.push(n)}catch(t){a?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&Fe({zipfile:h,name:`note.txt`,content:t.note,redact:n,bundleFiles:m,redactions:p});let g=JSON.stringify(c,null,2);h.addBuffer(Buffer.from(g,`utf8`),`sysinfo.json`),m.push(`sysinfo.json`);let _={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:s,files:m,redactions:p,sysinfo:c};h.addBuffer(Buffer.from(JSON.stringify(_,null,2),`utf8`),`MANIFEST.json`);let v=p.reduce((e,t)=>e+t.lineCount,0),y=s?m.filter(e=>e.startsWith(`logs/`)&&!W(e)):[],b=[`# Bug Report Bundle`,``,`Generated: ${_.generatedAt}`,`Project: ${s??`(unscoped)`}`,`Discipline version: ${_.disciplineVersion}`,``,`## Contents`,``,...m.map(e=>`- ${e}`),``,`## Privacy`,``,...y.length>0?[`Scope: some collected logs are user-wide rather than project-scoped.`,`These are written once per machine per day and can contain activity`,`from other projects open on this machine, including captured console`,`output:`,...y.map(e=>`- ${e}`),``]:[],...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${r.join(`, `)}`,v>0?`${v} line(s) were scrubbed across ${p.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,``,`This bundle is safe to attach to a GitHub issue.`]:[`Redaction was disabled for this bundle; file contents are unmodified.`]].join(`
|
|
2
|
+
`);h.addBuffer(Buffer.from(b,`utf8`),`README.md`),h.end();let x=F(i);return h.outputStream.pipe(x),await new Promise((e,t)=>{x.on(`close`,e),x.on(`error`,t)}),a?.info({bundlePath:i,fileCount:m.length,redactionCount:v},`bundle written`),{zipPath:i,summary:{projectSlug:s,files:m,redactions:p,redactedLineCount:v,generatedAt:_.generatedAt}}}var Le=e(v(),1),K=e(S(),1);function Re(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function ze(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q(e,t){if(typeof e==`string`)return Re(e,t.contentDir);if(Array.isArray(e))return e.map(e=>q(e,t));if(!ze(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=q(i,t);return n}function Be(e,t){let n=R(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
|
|
3
|
+
`),i=n.split(`
|
|
4
|
+
`),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(!(e===i.length-1&&n===``)){if(n.length===0){a.push(``);continue}try{let e=q(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}V(e,r?`${a.join(`
|
|
5
|
+
`)}\n`:a.join(`
|
|
6
|
+
`))}function Ve(e,t){let n=R(e,`utf-8`);if(n.trim().length!==0)try{let r=q(JSON.parse(n),t),i=n.endsWith(`
|
|
7
|
+
`)?`
|
|
8
|
+
`:``;V(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=Re(n,t.contentDir);r!==n&&V(e,r)}}function He(e,t){let n=R(e,`utf-8`),r=Re(n,t.contentDir);r!==n&&V(e,r)}function Ue(e){try{return z(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>N(e,t.name))}catch{return[]}}const We=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function Ge(e){return/\.log\.\d+$/.test(e)}function Ke(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||Ge(e)}function qe(e){let t={contentDir:e.contentDir};for(let n of[`telemetry`,`logs`,`process`])for(let r of Ue(N(e.stagingDir,n)))Ke(r)?Be(r,t):r.endsWith(`.json`)?Ve(r,t):He(r,t);for(let n of Ue(N(e.stagingDir,`state`))){let e=j(n);n.endsWith(`.jsonl`)?Be(n,t):We.has(e)?Ve(n,t):He(n,t)}}const Je=[`.ok`,`local`,`telemetry`],Ye=[`.ok`,`local`,`logs`],Xe=[`.ok`,`local`,`loss-capture`],Ze=`spans-current.jsonl`,Qe=`spans-prev.jsonl`,$e=`server-current.jsonl`,et=`server-prev.jsonl`,tt=`loss-current.jsonl`,nt=`loss-prev.jsonl`;function rt(e){return N(e,...Je,Ze)}function it(e){return N(e,...Je,Qe)}function at(e){return N(e,...Ye,$e)}function ot(e){return N(e,...Ye,et)}function st(e){return N(e,...Xe,tt)}function ct(e){return N(e,...Xe,nt)}const lt=1e3;async function ut(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(lt)});return t.ok?await t.text():null}catch{return null}}async function dt(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(lt)});return t.ok?await t.text():null}catch{return null}}async function ft(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/watcher-recent`,{signal:AbortSignal.timeout(lt)});return t.ok?await t.text():null}catch{return null}}function pt(e){try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t.decisions;return Array.isArray(n)?n.length===0?``:`${n.map(e=>JSON.stringify(e)).join(`
|
|
9
|
+
`)}\n`:null}catch{return null}}function mt(e){let t=N(e,`.git`,`ok`);if(!I(t))return null;let n=A(`git`,[`-C`,t,`log`,`--oneline`,`-50`],o({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function ht(e){let t=N(e,`.git`,`ok`);if(!I(t))return null;let n=A(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],o({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function gt(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function _t(){return{nodeVersion:process.version,platform:me(),arch:de()}}function vt(){return process.env.OTEL_SDK_DISABLED===`false`}function J(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yt(e){if(!I(e))return{};let t;try{t=(0,U.parse)(R(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!J(t))return{};let n=t.telemetry;if(!J(n))return{};let r=n.localSink;return J(r)?r:{}}function bt(e){return typeof e==`boolean`?e:void 0}function xt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function Y(e){if(J(e))return xt(e.maxBytes)}function St(e){let t=yt(p(`project`,e)),n=yt(p(`project-local`,e));return{enabled:bt(n.enabled)??bt(t.enabled)??!0,spansMaxBytes:Y(n.spans)??Y(t.spans)??52428800,logsMaxBytes:Y(n.logs)??Y(t.logs)??26214400}}function Ct(e){return be(`sha256`).update(e).digest(`hex`)}function wt(e){let t=R(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function Tt(e){let t=R(e,`utf-8`),n=`"doc.name"`,r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+10);return r}function X(e,t){if(!I(e))return!1;try{return L(M(t),{recursive:!0}),oe(e,t),!0}catch{return!1}}function Et(e){let t=[],n=e=>{let r=z(e,{withFileTypes:!0});for(let i of r){let r=N(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const Dt=new Set([`.jsonl`]);function Ot(e){let t=e.lastIndexOf(`.`);return t===-1?!1:Dt.has(e.slice(t))}const kt=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function At(e){if(Ge(e))return!0;let t=e.lastIndexOf(`.`);return t===-1?!1:kt.has(e.slice(t))}function jt(e){let t=[];for(let r of Et(e)){let i=Mt(e,r);if(!At(i))continue;let{redacted:a,patterns:o,lineCount:s}=n(R(r,`utf-8`));o.length!==0&&(V(r,a),t.push({file:i,lineCount:s,patterns:o}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function Mt(e,t){return ie(e,t).split(ae).join(`/`)}async function Nt(e){let t=P(e.contentDir),n=P(e.projectDir??e.contentDir),r=e.deps??{},o=r.fetchAgentPresence??ut,s=r.fetchAgentEffects??dt,c=r.fetchWatcherRecent??ft,l=r.readShadowHead??mt,u=r.readCheckpointRefs??ht,d=r.now??(()=>new Date),f=r.okVersion??(()=>D),p=r.readDesktopEnv??gt,m=r.readRuntime??_t,ee=r.isOtlpPushEnabled??vt,h=ce(N(ge(),`ok-bundle-`));try{L(N(h,`telemetry`),{recursive:!0}),L(N(h,`logs`),{recursive:!0}),L(N(h,`state`),{recursive:!0}),X(rt(n),N(h,`telemetry`,Ze)),X(it(n),N(h,`telemetry`,Qe)),X(at(n),N(h,`logs`,$e)),X(ot(n),N(h,`logs`,et));for(let t of e.userLogFiles??[])X(t,N(h,`logs`,j(t)));let g=N(n,`.ok`,`local`),_=N(g,`server.lock`),v=`not-running`,y=`no server.lock`,b=null;if(I(_)){X(_,N(h,`state`,`server.lock`));try{let e=R(_,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?b=t.port:y=`lock present but no port`}catch{y=`lock present but unparseable`}}if(b!==null){let e=await o(b);e===null?y=`agent-presence endpoint at :${b} unreachable`:(V(N(h,`state`,`agent-presence.json`),e),v=`running`,y=``);let t=await s(b);t!==null&&V(N(h,`state`,`agent-effects.json`),t);let n=await c(b);if(n!==null){let e=pt(n);e!==null&&V(N(h,`state`,`watcher-recent.jsonl`),e)}}let x=l(t);x!==null&&V(N(h,`state`,`shadow-head.txt`),x);let S=u(t);S!==null&&V(N(h,`state`,`checkpoint-refs.txt`),S),X(st(n),N(h,`state`,tt)),X(ct(n),N(h,`state`,nt)),X(N(g,`last-spawn-error.log`),N(h,`state`,`last-spawn-error.log`)),X(N(g,a),N(h,`state`,a)),X(N(g,i),N(h,`state`,i));let C=m(),w=p(),te={ok:{version:f(),nodeVersion:C.nodeVersion,platform:C.platform,arch:C.arch},host:{desktop:w}};V(N(h,`state`,`runtime.json`),`${JSON.stringify(te,null,2)}\n`);let ne=v===`running`?`running
|
|
10
|
+
`:`not-running (${y})\n`;if(V(N(h,`state`,`server-status.txt`),ne),e.processDir&&I(e.processDir)){let t=N(h,`process`);L(t,{recursive:!0}),oe(e.processDir,t,{recursive:!0})}let T=e.redact===!0;T&&qe({stagingDir:h,contentDir:t}),e.note&&V(N(h,`note.txt`),e.note);let E=null;e.scrubSecrets===!0&&(E=jt(h));for(let t of e.extraFiles??[])X(t.sourcePath,N(h,`extra`,t.zipName??j(t.sourcePath)))||r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let re=St(n),D=Et(h),O=[],k=0,A=0;for(let e of D){let t=Mt(h,e),n=ue(e).size,r=Ot(t)?wt(e):0;O.push({path:t,bytes:n,lines:r}),k+=n,t.startsWith(`telemetry/`)&&Ot(t)&&(A+=Tt(e))}let M={applied:T};E!==null&&(M.secretScrub=E);let ie={schemaVersion:2,createdAt:d().toISOString(),ok:{version:f(),nodeVersion:C.nodeVersion,platform:C.platform,arch:C.arch},host:{desktop:w},contentDir:{pathSha256:Ct(t),absolutePath:T?`<CONTENT_DIR>`:t},telemetry:{localSink:re,otlpPushEnabled:ee()},redaction:M,serverStatus:v,files:O};V(N(h,`manifest.json`),`${JSON.stringify(ie,null,2)}\n`);let P=D.some(e=>{try{return R(e,`utf-8`).includes(t)}catch{return!1}}),ae={totalBytes:k,fileCount:O.length,docNameCount:A,contentDirVisible:P,redacted:T},F=!1;return{stagingDir:h,manifest:ie,summary:ae,cleanup:()=>{F||(F=!0,B(h,{recursive:!0,force:!0}))}}}catch(e){throw B(h,{recursive:!0,force:!0}),e}}async function Pt(e){let{collected:t,outputPath:n}=e,r=M(n);if(!I(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);let i=new Le.ZipFile,a=Et(t.stagingDir);for(let e of a){let n=Mt(t.stagingDir,e);i.addFile(e,n)}i.end();let o=F(n);return i.outputStream.pipe(o),await new Promise((e,t)=>{o.on(`close`,e),o.on(`error`,t),i.outputStream.on(`error`,t)}),n}function Ft(e,t){let n=N(e,`.ok`,`config.yml`);if(I(n))try{let t=(0,U.parse)(R(n,`utf-8`)),r=O(t)?t.content:void 0,i=O(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return P(e,i)}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return P(e)}async function It(e,t,n){let r=Oe(t,e.logger),i=await Nt({contentDir:Ft(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:je(r,e.userLogsDir??N(H(),`.ok`,`logs`)),deps:{readDesktopEnv:n,logger:e.logger}});try{L(M(e.outputPath),{recursive:!0}),await Pt({collected:i,outputPath:e.outputPath});let t=i.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:r,files:i.manifest.files.map(e=>e.path),redactions:t?.redactions??[],redactedLineCount:t?.redactedLineCount??0,generatedAt:i.manifest.createdAt}}}finally{i.cleanup()}}async function Lt(e){let{projectDir:t}=e,n=e.readDesktopEnv??gt;if(e.level===`full`&&t!==void 0)return It(e,t,n);let{zipPath:r,summary:i}=await Ie({projectDir:t,redact:e.redact,outputPath:e.outputPath,userLogsDir:e.userLogsDir,logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n()});return{zipPath:r,summary:{level:e.level,systemWide:t===void 0,projectSlug:i.projectSlug,files:i.files,redactions:i.redactions,redactedLineCount:i.redactedLineCount,generatedAt:i.generatedAt}}}function Z(e,t,n={}){let r=g(e,t);if(!I(r))return{status:`missing`,lockPath:r};let i;try{i=JSON.parse(R(r,`utf-8`))}catch{return{status:`corrupt`,lockPath:r}}if(!i||typeof i!=`object`||!ee(i.pid))return{status:`corrupt`,lockPath:r};let a=i;if(!(n.isAlive??h)(a.pid))return{status:`dead-pid`,lockPath:r,lock:a};if(typeof a.machineId==`string`)return a.machineId===(n.machineId??_())?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a};let o=n.host??pe();return a.hostname===o?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a}}function Rt(e){return e.replace(/:\d+$/,``)}function zt(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:Rt(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:Rt(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:Rt(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.-]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}const Bt=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function Vt(e){return N(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}const Ht={existsSync:e=>I(e),readFileSync:(e,t)=>R(e,t),lstatSync:e=>se(e),readlinkSync:e=>le(e)};function Ut(e,t=Ht){let n=Vt(e);if(!t.existsSync(n))return null;try{let e=JSON.parse(t.readFileSync(n,`utf8`));return e?.version===1?e:null}catch{return null}}function Wt(e){let t=e.replace(Bt,``);return{text:t,changed:t!==e,emptyAfter:t.trim()===``}}function Gt(e,t,n=Ht){try{return n.lstatSync(e).isSymbolicLink()?n.readlinkSync(e)===t:!1}catch{return!1}}function Kt(e){return b(e)||y(e)||E(e)}const qt=10*1024*1024;function Jt(e,t,n,r){let i=ne(e,t,n,r);if(i.kind===`absent`||i.kind===`no-entry`)return{kind:`not-present`};if(i.kind===`decline`)return{kind:`declined`,reason:i.reason};if(!Kt(i.entry))return{kind:`left-foreign`};let a;try{a=r??e.configPath(t,n)}catch{return{kind:`not-present`}}let o=e.serverName(t);return e.format===`file`?(B(a,{force:!0}),{kind:`removed`}):e.format===`toml`?Zt(a,o):e.format===`yaml`?Xt(a,e.topLevelKey,o):Yt(a,e.topLevelKey,e.serverMapSubKey,o)}function Yt(e,t,n,r){let i;try{i=R(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(i,`utf-8`)>qt)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=C(i,te(t,n,r));return o?(m(e,a,{mode:T(e)}),{kind:`removed`}):{kind:`not-present`}}function Xt(e,t,n){let r;try{r=R(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(r,`utf-8`)>qt)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,U.parseDocument)(a);if(o.errors.length>0)return{kind:`declined`,reason:`unparseable`};let s=[t,n];if(!o.hasIn(s))return{kind:`not-present`};o.deleteIn(s);let c=o.toString(),l=w(a);a.trim()===``||a.endsWith(`
|
|
11
|
+
`)?c.endsWith(`
|
|
12
|
+
`)||(c=`${c}\n`):c=c.replace(/\n+$/,``),l&&(c=c.replace(/\r\n/g,`
|
|
13
|
+
`).replace(/\n/g,`\r
|
|
14
|
+
`));let u=`${i?``:``}${c}`;return u!==r&&m(e,u,{mode:T(e)}),{kind:`removed`}}function Zt(e,t){let n=re();if(n.backend===`fallback`)return{kind:`declined`,reason:`no-native-writer`};let r;try{r=R(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=w(a),s=a.trim()===``||a.endsWith(`
|
|
15
|
+
`),c;try{c=n.removeEntry(a,t)}catch{return{kind:`declined`,reason:`unparseable`}}if(!c.existed)return{kind:`not-present`};let l=c.text;s?l.endsWith(`
|
|
16
|
+
`)||(l=`${l}\n`):l=l.replace(/\n+$/,``),o&&(l=l.replace(/\r\n/g,`
|
|
17
|
+
`).replace(/\n/g,`\r
|
|
18
|
+
`));let u=`${i?``:``}${l}`;return u!==r&&m(e,u,{mode:T(e)}),{kind:`removed`}}function Qt(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function $t(e,t=Date.now()){let n=new Date(e).getTime();if(Number.isNaN(n))return`—`;let r=t-n,i=Math.floor(r/1e3);if(i<60)return`${i}s`;let a=Math.floor(i/60);if(a<60)return`${a}m ago`;let o=Math.floor(a/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function en(e,t,n,r,i,a){if(t.status===`missing`||t.status===`corrupt`)return null;let o=t.lock,s=null;if(n.status!==`missing`&&n.status!==`corrupt`){let e=n.lock;s={port:e.port,status:n.status,pid:e.pid,startedAt:e.startedAt,usage:a}}return{directory:o.worktreeRoot,server:{port:o.port,status:t.status,pid:o.pid,startedAt:o.startedAt,usage:i},ui:s,hostname:o.hostname,lockPath:t.lockPath,binary:r==null?null:u(r),command:r,isDesktop:Qt(r)}}function tn(e){return e.ui==null?!1:e.ui.status===`alive`||e.ui.status===`foreign-host`}function Q(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:t===`dead-pid`&&tn(e)?`ui-orphan`:`stale`}const nn=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function rn(e){switch(e){case`running`:return K.default.green(e);case`desktop`:return K.default.blue(e);case`foreign`:return K.default.cyan(e);case`ui-orphan`:return K.default.magenta(e);case`stale`:return K.default.yellow(e)}}function an(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function on(e){return`${an(e.server.usage)} | ${an(e.ui?.usage??null)}`}function sn(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function cn(e){if(e.length===0)return`No open-knowledge servers found.`;let t=[`DIRECTORY`,`PORTS (API/UI)`,`CPU/MEM (API | UI)`,`STATUS`,`PID`,`STARTED`,`BINARY`],n=e.map(e=>{let t=Q(e),n=t===`ui-orphan`&&e.ui!=null?e.ui.pid:e.server.pid;return[e.directory,sn(e),on(e),t,String(n),$t(e.server.startedAt),e.binary??`—`]}),r=t.length,i=t.map(e=>e.length);for(let e of n)for(let t=0;t<r;t++)i[t]=Math.max(i[t]??0,(e[t]??``).length);let a=t.map((e,t)=>e.padEnd(i[t]??0)).join(` `).trimEnd(),o=e.map((e,t)=>{let a=n[t]??[],o=[];for(let t=0;t<r;t++){let n=(a[t]??``).padEnd(i[t]??0);if(t===3){let r=a[t]??``;n=rn(Q(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=K.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
|
|
19
|
+
`)}async function ln(e={}){let t=e.discover??f,n=e.inspect??Z,r=e.log??(e=>console.log(e)),i=e.resolveCommand??l,a=e.resolveUsage??d,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=en(e,t,r,t.status===`missing`||t.status===`corrupt`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`?null:a(t.lock.pid),r.status===`missing`||r.status===`corrupt`?null:a(r.lock.pid));o!=null&&s.push(o)}if(e.json){let e=s.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(cn(e.all?s:s.filter(e=>nn.has(Q(e)))))}function un(){return new x(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale (dead-pid) entries`).option(`--all`,`Include stale (dead-pid) entries (foreign-host shows by default)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await ln({all:t.all===!0||e===`all`,json:t.json===!0})})}function dn(e,t,n={}){let r=n.isAlive??h,i=[];for(let[n,a]of[[`server`,e],[`ui`,t]])(a.status===`alive`||a.status===`foreign-host`&&r(a.lock.pid))&&i.push({name:n,pid:a.lock.pid,port:a.lock.port});return{targets:i}}function fn(e){let t=e.inspect??(t=>Z(e.lockDir,t)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=dn(t(`server`),t(`ui`),{isAlive:e.isAlive});if(a.targets.length===0)return r(`No running open-knowledge processes.`),{stopped:[],failed:[],hadTargets:!1};let o=[],s=[];for(let e of a.targets)try{n(e.pid,`SIGTERM`),o.push(e)}catch(t){s.push({target:e,error:t instanceof Error?t.message:String(t)})}return o.length>0&&r(`Stopped: ${o.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),s.length>0&&i(`Failed to stop: ${s.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:o,failed:s,hadTargets:!0}}function $(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function pn(e,t=h){let n=await f(),r=null;for(let i of n){let n=Z(i,`server`),a=Z(i,`ui`);if($(n,t)&&n.lock.port===e||$(a,t)&&a.lock.port===e)return i;r===null&&($(n,t)&&n.lock.pid===e||$(a,t)&&a.lock.pid===e)&&(r=i)}return r}function mn(e){let t=fn({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function hn(e){return new x(`stop`).description(`Stop open-knowledge server(s). With no argument: stops the server for the current directory. Pass a port number, a directory path, or "all" to target globally.`).argument(`[target...]`,`port number, directory path (spaces OK), or "all"`).action(async t=>{let n=t.length===0?void 0:t.join(` `);if(n===void 0){e();let t=fn({lockDir:c(process.cwd()),log:()=>{}});if(t.hadTargets){if(t.stopped.length>0){let e=t.stopped.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `);console.log(`Stopped: ${e}`)}t.failed.length>0&&(process.exitCode=1)}else await ln({});return}if(n===`all`){let e=await f();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=Z(n,`server`),r=Z(n,`ui`);!$(e,h)&&!$(r,h)||(mn(n),t++)}t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(n)){let e=Number.parseInt(n,10),t=await pn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}mn(t);return}mn(c(P(Te(),n)))})}export{Te as _,Bt as a,Ut as c,Z as d,Lt as f,Ee as g,De as h,Jt as i,Wt as l,Pt as m,hn as n,Gt as o,Nt as p,un as r,Vt as s,fn as t,zt as u,we as v,Se as y};
|
|
20
|
+
//# sourceMappingURL=src-Mfncsy21.mjs.map
|