fuli-context 0.20.0-beta.8 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/README.zh-CN.md +1 -0
- package/dist/web/assets/{AboutPage-Dy3drTbS.css → AboutPage-Bxm7RJZg.css} +1 -1
- package/dist/web/assets/{AboutPage-BybzKsx-.js → AboutPage-CjDenGS_.js} +1 -1
- package/dist/web/assets/{AgentName-CXf8heW-.js → AgentName-DdlJlpT3.js} +1 -1
- package/dist/web/assets/{AgentProfilePage-D0YyiAA6.js → AgentProfilePage-Cx_Uf5Vf.js} +1 -1
- package/dist/web/assets/{AgentProfilePage-B2yMnmQP.css → AgentProfilePage-DXvLQu-C.css} +1 -1
- package/dist/web/assets/{AgentsDirectoryPage-DvPJNJm-.css → AgentsDirectoryPage-BwF-0nFO.css} +1 -1
- package/dist/web/assets/{AgentsDirectoryPage-LU-bRYPw.js → AgentsDirectoryPage-DylT-GSW.js} +1 -1
- package/dist/web/assets/{BackLink-Dgc1V1EN.js → BackLink-D7oAvDG5.js} +1 -1
- package/dist/web/assets/{BoardMoveMenu-XrAiFzGj.js → BoardMoveMenu-B0pA7LLx.js} +1 -1
- package/dist/web/assets/CaptureChangePage-Cch3mT4b.css +1 -0
- package/dist/web/assets/{CaptureChangePage-DcJKvaGf.js → CaptureChangePage-DEuqPb14.js} +1 -1
- package/dist/web/assets/{Card-96u8qomm.js → Card-BZFLZ_2I.js} +1 -1
- package/dist/web/assets/{CardHeader-4je7E12I.js → CardHeader-C_c0keQn.js} +1 -1
- package/dist/web/assets/{CardTitle-bjMusOR6.js → CardTitle-yXOhV577.js} +1 -1
- package/dist/web/assets/ConnectionsPage-DlnHdtwn.js +1 -0
- package/dist/web/assets/{CreateProjectDialog-BDwT_wZd.js → CreateProjectDialog-BVJqWdlT.js} +1 -1
- package/dist/web/assets/{DataFormatPage-PxwqDWeZ.js → DataFormatPage-BdcjcyhZ.js} +1 -1
- package/dist/web/assets/DataFormatPage-Dp7mePUw.css +1 -0
- package/dist/web/assets/{DialogFooter-DwgFgHdH.js → DialogFooter-DYawfDCD.js} +1 -1
- package/dist/web/assets/{EmployeeRecruitDialog-DjX_wOWx.js → EmployeeRecruitDialog-CB4ARFkM.js} +1 -1
- package/dist/web/assets/{EmployeeWorkbenchPage-DWhBevwY.js → EmployeeWorkbenchPage-BUMfMBc8.js} +2 -2
- package/dist/web/assets/{EmployeeWorkbenchPage-l_LYqBnr.css → EmployeeWorkbenchPage-BenZP7De.css} +1 -1
- package/dist/web/assets/{GrowthLoading-DssogOkP.js → GrowthLoading-smW3-Gfp.js} +1 -1
- package/dist/web/assets/{InboxPage-fFg4gETv.css → InboxPage-CbbiHgTr.css} +1 -1
- package/dist/web/assets/{InboxPage-BF38gnSV.js → InboxPage-Crn1UU7s.js} +2 -2
- package/dist/web/assets/{Input-DHF3Ivr3.js → Input-F1oftPWh.js} +1 -1
- package/dist/web/assets/{KnowledgeEditDialog-uAzeQbMB.js → KnowledgeEditDialog-VdQwbX4E.js} +1 -1
- package/dist/web/assets/{KnowledgeHardDeleteSection-qGeE1YrK.js → KnowledgeHardDeleteSection-CXRmNnZF.js} +1 -1
- package/dist/web/assets/{KnowledgeItemEditPage-Cj5uNVo6.js → KnowledgeItemEditPage-CQo3TbCJ.js} +1 -1
- package/dist/web/assets/{KnowledgeItemSummaryCard-CeOSN36n.js → KnowledgeItemSummaryCard-Dd2McM-d.js} +1 -1
- package/dist/web/assets/{KnowledgeOrganizerPage-7VC_JAWQ.css → KnowledgeOrganizerPage-BIOaMzgQ.css} +1 -1
- package/dist/web/assets/{KnowledgeOrganizerPage-BVLMc2jL.js → KnowledgeOrganizerPage-BVgAyu6U.js} +1 -1
- package/dist/web/assets/KnowledgePage-Bfbfz_Z8.js +1 -0
- package/dist/web/assets/{KnowledgePeek-BD2zoQqA.js → KnowledgePeek-BNBkh1ey.js} +1 -1
- package/dist/web/assets/KnowledgeTurnReceiptPage-Ckw_olrt.js +1 -0
- package/dist/web/assets/{KnowledgeWorkspace-CgFI31jK.js → KnowledgeWorkspace-pH2tAFld.js} +1 -1
- package/dist/web/assets/{Label-DM1yZ2CL.js → Label-yDCtlpkb.js} +1 -1
- package/dist/web/assets/ModelSettingsPage-C3eBDWRL.js +1 -0
- package/dist/web/assets/ModelSettingsPage-DZkrJw7R.css +1 -0
- package/dist/web/assets/NotFoundPage-8gVVukRR.js +1 -0
- package/dist/web/assets/OccupationsPage-BTormZIO.css +1 -0
- package/dist/web/assets/{OccupationsPage-CHgGGvDu.js → OccupationsPage-PNoqE21Y.js} +1 -1
- package/dist/web/assets/{OverviewPage-E0tfzQRr.js → OverviewPage-DiwYSnhh.js} +2 -2
- package/dist/web/assets/{OverviewPage-CpHmwB7u.css → OverviewPage-YBQHyU7s.css} +1 -1
- package/dist/web/assets/{PersonalProfilePage-CfqsnB1K.css → PersonalProfilePage-CGW50MHm.css} +1 -1
- package/dist/web/assets/{PersonalProfilePage-o5Gpo9nJ.js → PersonalProfilePage-C_v2BFee.js} +1 -1
- package/dist/web/assets/PersonalProjectsPage-Cf5mrQmy.css +1 -0
- package/dist/web/assets/{PersonalProjectsPage-Boj9kG6I.js → PersonalProjectsPage-DGRV8cM5.js} +1 -1
- package/dist/web/assets/{PopperContent-BDOio_9z.js → PopperContent-5zqbtnYr.js} +1 -1
- package/dist/web/assets/{Presence-Bk6m9rvx.js → Presence-BYfYJNMD.js} +1 -1
- package/dist/web/assets/{ProjectAgentDetailPage-Cyl3ZPBO.js → ProjectAgentDetailPage-BQ9ffaCX.js} +2 -2
- package/dist/web/assets/{ProjectAgentDetailPage-Ns2ATys8.css → ProjectAgentDetailPage-CRFE6n-s.css} +1 -1
- package/dist/web/assets/{ProjectAgentDialog-C1_KluEx.js → ProjectAgentDialog-BGckQDTq.js} +1 -1
- package/dist/web/assets/{ProjectAgentFirstTask-CXKvWwhZ.js → ProjectAgentFirstTask-DrSd3nR-.js} +1 -1
- package/dist/web/assets/{ProjectAgentsPage-DKNDXWow.css → ProjectAgentsPage-BBzKAhZx.css} +1 -1
- package/dist/web/assets/{ProjectAgentsPage-DHTo0uNy.js → ProjectAgentsPage-U4Om3EPu.js} +1 -1
- package/dist/web/assets/{ProjectScopePicker-GjK7Hm4N.js → ProjectScopePicker-D0oxbwOd.js} +1 -1
- package/dist/web/assets/{PublicProjectsPage-BuJo0ReR.js → PublicProjectsPage-CvkQ3E8I.js} +1 -1
- package/dist/web/assets/{PublicProjectsPage-yA6Md4oM.css → PublicProjectsPage-Ditr0SY-.css} +1 -1
- package/dist/web/assets/{RadioGroupItem-DxktHt0c.js → RadioGroupItem-CBpbQlHx.js} +1 -1
- package/dist/web/assets/{RoundtablesPage-Bd3XCn7B.js → RoundtablesPage-BEUaKOjI.js} +1 -1
- package/dist/web/assets/RoundtablesPage-BMYSDYH8.css +1 -0
- package/dist/web/assets/{RovingFocusGroup-DyZDm-Bn.js → RovingFocusGroup-X9U-ufYr.js} +1 -1
- package/dist/web/assets/{RovingFocusItem-BKyXKG9n.js → RovingFocusItem-_uA_OCLT.js} +1 -1
- package/dist/web/assets/SessionMigrationPage-WVFSDcUO.js +1 -0
- package/dist/web/assets/{SessionRecordsPage-CvGaB3h3.js → SessionRecordsPage-Bs2eLXEi.js} +1 -1
- package/dist/web/assets/{SettingsPage-DG3ialW3.css → SettingsPage-BbX9ysTX.css} +1 -1
- package/dist/web/assets/{SettingsPage-OasIZiIz.js → SettingsPage-DlIwICIz.js} +1 -1
- package/dist/web/assets/{SharedJefaReportPage-_f2bnFY-.js → SharedJefaReportPage-B_rreEep.js} +1 -1
- package/dist/web/assets/{TabsContent-CTM6GBGk.js → TabsContent-8pXwYJPz.js} +1 -1
- package/dist/web/assets/{TabsTrigger-BFj6S2XJ.js → TabsTrigger-Cd6SI2yI.js} +1 -1
- package/dist/web/assets/{TagVocabularyPage-Cp1UVDoe.js → TagVocabularyPage-BQiuKG-4.js} +1 -1
- package/dist/web/assets/{TaskExecutionPlan-D_MbMVvj.js → TaskExecutionPlan-CupxJeyo.js} +1 -1
- package/dist/web/assets/TaskSchedulesPage-DcmDdY10.css +1 -0
- package/dist/web/assets/{TaskSchedulesPage-Dd38ntqQ.js → TaskSchedulesPage-zYQs7s6T.js} +1 -1
- package/dist/web/assets/{Teleport-D5d1fEVm.js → Teleport-BZX1Eb7R.js} +1 -1
- package/dist/web/assets/{TextField-DUZTbKVz.js → TextField-CielK4l3.js} +1 -1
- package/dist/web/assets/{UiDialog-CU8nqGKC.js → UiDialog-BSDblUpR.js} +1 -1
- package/dist/web/assets/{UiDisclosure-DbxNZe0B.js → UiDisclosure-DLmVwmy1.js} +1 -1
- package/dist/web/assets/{UiIcon-DSkB5Juh.js → UiIcon-B8eZeuGI.js} +1 -1
- package/dist/web/assets/{UiIconButton-Bgy8Hoy4.js → UiIconButton-e754Tmnq.js} +1 -1
- package/dist/web/assets/{UiSegmented-BwkPHeLK.js → UiSegmented-D1HD-qin.js} +1 -1
- package/dist/web/assets/{UiSelect-CW3HNsRZ.js → UiSelect-CbkTsi2e.js} +1 -1
- package/dist/web/assets/{UiToggle--Z_LpW41.js → UiToggle-Dz93aXFK.js} +1 -1
- package/dist/web/assets/{UiWeight-D8U0orbz.js → UiWeight-CUvyApSB.js} +1 -1
- package/dist/web/assets/{UnassignedConversationsPanel-BeWzhuBr.js → UnassignedConversationsPanel-xY7gsFot.js} +1 -1
- package/dist/web/assets/{VirtualDirectoryList-BT099Zuk.js → VirtualDirectoryList-Dv6PwLjU.js} +1 -1
- package/dist/web/assets/{Workbench3D-BAb5m-Qk.js → Workbench3D--4N_uKzp.js} +1 -1
- package/dist/web/assets/WritingTastePage-B7KojA4r.js +1 -0
- package/dist/web/assets/{WritingTastePage-Dh1qW6bK.css → WritingTastePage-asIa-2U5.css} +1 -1
- package/dist/web/assets/{_plugin-vue_export-helper-Crd8aFkh.js → _plugin-vue_export-helper-BmfQlfI8.js} +1 -1
- package/dist/web/assets/{accordion-C-pFa1cg.js → accordion-gXElbGP_.js} +1 -1
- package/dist/web/assets/{agent-occupation-BooDHzf0.js → agent-occupation-ChN-1QjC.js} +1 -1
- package/dist/web/assets/{agent-pins-CFO-xYmz.js → agent-pins-Chh_rdBi.js} +1 -1
- package/dist/web/assets/{agent-profile-Bi--2zRQ.css → agent-profile-LzhgJINr.css} +1 -1
- package/dist/web/assets/{agent-profile.css_vue_type_style_index_0_src_true_lang-BKk2RVxy.js → agent-profile.css_vue_type_style_index_0_src_true_lang-DWlz7UoN.js} +1 -1
- package/dist/web/assets/{agent-work-summary-BIZoVGaT.js → agent-work-summary-C9yMf019.js} +1 -1
- package/dist/web/assets/{attention-store-dDH6VA6Z.js → attention-store-CG9cF6DX.js} +1 -1
- package/dist/web/assets/{badge-BnU2j9Nh.js → badge-DvvDq2Wb.js} +1 -1
- package/dist/web/assets/{button-B4gCj85U.js → button-CFEnxtio.js} +1 -1
- package/dist/web/assets/{checkbox-CzVOT2cF.js → checkbox-DovdRz8u.js} +1 -1
- package/dist/web/assets/{client-Cg0bLxrO.js → client-lh80ewvs.js} +1 -1
- package/dist/web/assets/{console-k05BnLkZ.js → console-CQMgYkk9.js} +1 -1
- package/dist/web/assets/{conversation-launcher-settings-C745vZJa.js → conversation-launcher-settings-B1QM-wZB.js} +1 -1
- package/dist/web/assets/{design-lab-CJiqHzsm.js → design-lab-BDKwIbI8.js} +1 -1
- package/dist/web/assets/{dialog-DQaUWk4W.js → dialog-D2mO6m3B.js} +1 -1
- package/dist/web/assets/{dist-2CLFk118.js → dist-PmK0PfVA.js} +1 -1
- package/dist/web/assets/{dropdown-menu-CN5wjWUD.js → dropdown-menu-YzCnvjAb.js} +1 -1
- package/dist/web/assets/{field-6gOLsuT_.js → field-BMEFEyVC.js} +1 -1
- package/dist/web/assets/{identity-NbL1GGSB.js → identity-bK-fJdnj.js} +1 -1
- package/dist/web/assets/index-BhekqRSJ.js +2 -0
- package/dist/web/assets/index-DedvhyS3.css +1 -0
- package/dist/web/assets/{judgment-types-DfSuVLnV.js → judgment-types-DJnAr9c0.js} +1 -1
- package/dist/web/assets/{model-BjNAHvfb.js → model-BwNZZZNP.js} +1 -1
- package/dist/web/assets/{model-DrZFCNN6.js → model-CPMYnu3S.js} +1 -1
- package/dist/web/assets/{model-DPykou4S.js → model-Cengn9fg.js} +1 -1
- package/dist/web/assets/{model-YYqd0CSe.js → model-CuY1vtEy.js} +1 -1
- package/dist/web/assets/{model-2BvryZbU.js → model-DpVrfbnj.js} +1 -1
- package/dist/web/assets/{model-BsfqK9w_.js → model-rumuELTi.js} +1 -1
- package/dist/web/assets/{motion-preference-CxKthhLy.js → motion-preference-A1AMssSH.js} +1 -1
- package/dist/web/assets/{occupation-catalog-JHFMVvBn.js → occupation-catalog-DxwlYD1L.js} +1 -1
- package/dist/web/assets/{orchestration-filters-B7ZbjZKo.js → orchestration-filters-DZpJ0FN3.js} +1 -1
- package/dist/web/assets/{page-title-BawJ25Bw.js → page-title-Bg-mVyrS.js} +1 -1
- package/dist/web/assets/{personal-profile-graph-BEjSAQMe.js → personal-profile-graph-tMneNj_m.js} +1 -1
- package/dist/web/assets/{project-capture-BUtkhbr1.js → project-capture-QgMw6qvo.js} +1 -1
- package/dist/web/assets/{project-origin-DI7ft7I8.js → project-origin-ppsYHpYL.js} +1 -1
- package/dist/web/assets/project-team-api-DwP0O3rn.js +1 -0
- package/dist/web/assets/{quick-edit-api-CTMfc9uz.js → quick-edit-api-BiyK3ih-.js} +1 -1
- package/dist/web/assets/{shared-report-o1Tvfyn-.js → shared-report-D3Hem1t5.js} +3 -3
- package/dist/web/assets/{task-labels-dW28Ybet.js → task-labels-7KyNw9id.js} +1 -1
- package/dist/web/assets/{ui-BkbPVq3y.js → ui-Ck58paqr.js} +1 -1
- package/dist/web/assets/{useAgentRecords-D6BTApmV.js → useAgentRecords-C6RrZwwv.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-BMswzZdS.js → useApi-CROJJdhE-BujjnKN_.js} +1 -1
- package/dist/web/assets/{useFocusReturn-DQOtrYO8.js → useFocusReturn-D9IOIg17.js} +1 -1
- package/dist/web/assets/{useKnowledgeItemPeek-CGzVMWJz.js → useKnowledgeItemPeek-C6nAzvDL.js} +1 -1
- package/dist/web/assets/{useMinimumLoadingDisplay-DEBBYuGI.js → useMinimumLoadingDisplay-HnxkDut6.js} +1 -1
- package/dist/web/assets/{useRoutePeek-R9W605pr.js → useRoutePeek-BvYFc1BA.js} +1 -1
- package/dist/web/assets/{vue-router-BUjBh_Iw.js → vue-router-Bl55c88B.js} +1 -1
- package/dist/web/index.html +33 -33
- package/docs/agent-apps.md +110 -0
- package/docs/employee-agents.md +1 -1
- package/graph-provider/fuli_graph/app.py +16 -11
- package/graph-provider/fuli_graph/graph_query.py +30 -2
- package/graph-provider/fuli_graph/knowledge_audit.py +9 -1
- package/graph-provider/fuli_graph/knowledge_item_routes.py +10 -6
- package/graph-provider/fuli_graph/knowledge_item_view.py +41 -12
- package/graph-provider/fuli_graph/knowledge_item_view_models.py +3 -3
- package/graph-provider/fuli_graph/knowledge_review.py +47 -10
- package/graph-provider/fuli_graph/knowledge_search.py +18 -22
- package/graph-provider/fuli_graph/knowledge_session_migration.py +14 -4
- package/graph-provider/fuli_graph/knowledge_session_migration_models.py +2 -2
- package/graph-provider/fuli_graph/knowledge_tag_routes.py +7 -5
- package/graph-provider/fuli_graph/knowledge_tags.py +8 -4
- package/graph-provider/fuli_graph/knowledge_visibility.py +195 -0
- package/graph-provider/fuli_graph/models.py +12 -2
- package/graph-provider/fuli_graph/preference_conflicts.py +50 -4
- package/graph-provider/fuli_graph/publication_source_copies.py +36 -0
- package/graph-provider/fuli_graph/session_records.py +33 -13
- package/graph-provider/fuli_graph/session_records_models.py +4 -2
- package/graph-provider/fuli_graph/store_knowledge.py +5 -1
- package/graph-provider/fuli_graph/store_publication.py +70 -12
- package/graph-provider/fuli_graph/task_context_models.py +2 -0
- package/graph-provider/fuli_graph/task_session_hints.py +7 -3
- package/graph-provider/pyproject.toml +1 -1
- package/native/win32/fuli-win-helper.exe +0 -0
- package/npm-shrinkwrap.json +8 -8
- package/package.json +3 -2
- package/skills/capturing-session-knowledge/references/retrieval.md +6 -0
- package/src/agent-apps/activation.js +3 -3
- package/src/agent-apps/app-host.js +2 -0
- package/src/agent-apps/app-launcher.js +25 -0
- package/src/agent-apps/authorization.js +6 -4
- package/src/agent-apps/bounded-wait.js +13 -0
- package/src/agent-apps/{verified-decisions.js → confirmed-decisions.js} +100 -55
- package/src/agent-apps/decision-source.js +17 -17
- package/src/agent-apps/host-identity.js +8 -2
- package/src/agent-apps/instances.js +218 -29
- package/src/agent-apps/operations.js +4 -3
- package/src/agent-apps/run-gate.js +25 -20
- package/src/agent-apps/service.js +40 -16
- package/src/agent-apps/store.js +28 -14
- package/src/agent-apps/trust-terms.js +23 -0
- package/src/agent-apps/trusted-runner.js +136 -0
- package/src/agent-apps/versions.js +5 -4
- package/src/agent-apps/views.js +11 -6
- package/src/agent-tools/agent-app-definitions.js +1 -1
- package/src/agent-tools/graph-definitions.js +4 -4
- package/src/agent-tools/interface-catalog.js +2 -2
- package/src/agent-tools/interface-definitions.js +2 -1
- package/src/agent-tools/session-fuli-gate.js +55 -26
- package/src/agent-tools.js +2 -4
- package/src/agents/claude-code/lifecycle-hook.js +29 -12
- package/src/agents/codex/lifecycle-hook.js +25 -10
- package/src/agents/lifecycle-message.js +18 -0
- package/src/agents/turn-receipt.js +15 -8
- package/src/app/agent-request-context.js +18 -0
- package/src/cli/app-command.js +46 -61
- package/src/cli/remote-mcp-command.js +6 -2
- package/src/cli/setup-command.js +6 -0
- package/src/cli/terminal-io.js +22 -0
- package/src/cli/update-command.js +14 -1
- package/src/cli/update-installation.js +46 -2
- package/src/conversations/entry-budget.js +116 -0
- package/src/conversations/preference-evidence.js +6 -2
- package/src/conversations/task-context-view.js +13 -8
- package/src/data-format/local-stores.js +2 -0
- package/src/graphiti/agent-conversations.js +24 -3
- package/src/graphiti/assistant-project-candidate.js +5 -2
- package/src/graphiti/capture-notice.js +4 -1
- package/src/graphiti/entry-hint-claim.js +13 -0
- package/src/graphiti/federated-application.js +55 -62
- package/src/graphiti/human-review-channel.js +9 -5
- package/src/graphiti/jefa-board-match.js +4 -1
- package/src/graphiti/knowledge-item-edit.js +7 -4
- package/src/graphiti/knowledge-reader.js +46 -0
- package/src/graphiti/knowledge-result-budget.js +63 -12
- package/src/graphiti/knowledge-tags.js +12 -1
- package/src/graphiti/provider-client.js +18 -25
- package/src/graphiti/publication-draft-capture.js +28 -0
- package/src/graphiti/session-knowledge-migration.js +7 -3
- package/src/graphiti/session-layer-decision.js +28 -6
- package/src/graphiti/session-records.js +26 -15
- package/src/graphiti/shared-project-list.js +36 -0
- package/src/graphiti/task-entry-preferences.js +87 -46
- package/src/graphiti/turn-receipt-delivery.js +5 -2
- package/src/graphiti/writing-taste-profile-workflow.js +13 -7
- package/src/http/api-router.js +2 -1
- package/src/http/graph-api-router.js +13 -10
- package/src/http/knowledge-item-api-router.js +17 -4
- package/src/http/knowledge-tags-api-router.js +21 -9
- package/src/http/request-policy.js +18 -2
- package/src/http/session-records-api-router.js +7 -3
- package/src/judgment/review-prompt.js +21 -1
- package/src/knowledge-owner-reads/console-port.js +51 -0
- package/src/knowledge-tags/console-port.js +3 -2
- package/src/mcp/preference-delivery.js +7 -4
- package/src/mcp/provider-task-context-registry.js +23 -0
- package/src/mcp/tool-result.js +3 -3
- package/src/presence/platforms.js +3 -2
- package/src/presence/port.js +2 -1
- package/src/presence/windows-helper-pin.js +1 -1
- package/src/server.js +14 -2
- package/src/standing-assignments/port.js +146 -0
- package/src/standing-assignments/store.js +151 -0
- package/src/standing-assignments/term-match.js +28 -0
- package/src/text/name-identity.js +33 -0
- package/dist/web/assets/CaptureChangePage-C833Eiqu.css +0 -1
- package/dist/web/assets/ConnectionsPage-EFMP-UeV.js +0 -1
- package/dist/web/assets/DataFormatPage-DERqhmng.css +0 -1
- package/dist/web/assets/KnowledgePage-8ct5iO0F.js +0 -1
- package/dist/web/assets/KnowledgeTurnReceiptPage-Yn3jhDyx.js +0 -1
- package/dist/web/assets/ModelSettingsPage-5RkvgNYN.js +0 -1
- package/dist/web/assets/ModelSettingsPage-BqtWIKEA.css +0 -1
- package/dist/web/assets/NotFoundPage-BUUf2-MZ.js +0 -1
- package/dist/web/assets/OccupationsPage-B55DftFp.css +0 -1
- package/dist/web/assets/PersonalProjectsPage-aU1rApzX.css +0 -1
- package/dist/web/assets/RoundtablesPage-BmmsB1mW.css +0 -1
- package/dist/web/assets/SessionMigrationPage-CQhrJ1OQ.js +0 -1
- package/dist/web/assets/TaskSchedulesPage-CDalUfNj.css +0 -1
- package/dist/web/assets/WritingTastePage-BsekLhC3.js +0 -1
- package/dist/web/assets/index-BczJo3GN.js +0 -2
- package/dist/web/assets/index-C2rHjaT6.css +0 -1
- package/dist/web/assets/project-team-api-BZMMPuUd.js +0 -1
- package/src/agent-apps/isolation.js +0 -23
|
@@ -7,8 +7,8 @@ import { storedPackageMatches } from './package-files.js';
|
|
|
7
7
|
|
|
8
8
|
// What approving or re-activating a version requires, and the one place a
|
|
9
9
|
// version becomes the running one. The console's unverified decisions
|
|
10
|
-
// (versions.js) and the CLI's
|
|
11
|
-
// share it; each says which
|
|
10
|
+
// (versions.js) and the CLI's terminal-confirmed ones (confirmed-decisions.js)
|
|
11
|
+
// share it; each says which confirmation the activation carries.
|
|
12
12
|
export function createActivation(context) {
|
|
13
13
|
const { store } = context;
|
|
14
14
|
|
|
@@ -59,7 +59,7 @@ export function createActivation(context) {
|
|
|
59
59
|
return dataTransition(app.dataFormat, version.manifest.data, options);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// detail: what the event records of the decision; check: its
|
|
62
|
+
// detail: what the event records of the decision; check: its confirmation.
|
|
63
63
|
function approve({ app, version, transition }, { at, actor, detail, check }) {
|
|
64
64
|
store.insertApproval({ appId: app.appId, version: version.version, ...approvalTerms(version), approvedBy: actor,
|
|
65
65
|
entrypoint: detail.entrypoint, approvedAt: at }, check);
|
|
@@ -34,6 +34,8 @@ export function createAppHost(context) {
|
|
|
34
34
|
const { store, leases, gates, instances, now } = context;
|
|
35
35
|
|
|
36
36
|
function authorizeCall({ token, toolName, input = {} }) {
|
|
37
|
+
// A closing process takes no new call; one already authorized still runs to its seal.
|
|
38
|
+
instances.assertOpen();
|
|
37
39
|
const tool = context.hostTools().get(toolName);
|
|
38
40
|
if (!tool || tool.marks.length) {
|
|
39
41
|
throw new ApplicationError('tool_not_permitted', `Apps may not call ${toolName}`, { status: 403 });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { closeSync, writeSync } from 'node:fs';
|
|
2
|
+
import { pathToFileURL } from 'node:url';
|
|
3
|
+
|
|
4
|
+
// The first module of an app process the trusted runner starts
|
|
5
|
+
// (trusted-runner.js): it ties the app to its FULI host, loads the app's
|
|
6
|
+
// service entry and then tells the host it loaded. The host holds the other
|
|
7
|
+
// end of stdin; when that FULI process exits, however it exits, the pipe
|
|
8
|
+
// closes and the app ends with it. The pipe does not keep an app alive that
|
|
9
|
+
// would otherwise finish. Trusted app code can undo this; it is a lifetime
|
|
10
|
+
// tie, not a fence.
|
|
11
|
+
const READY_FD = 3;
|
|
12
|
+
const [entry] = process.argv.slice(2);
|
|
13
|
+
const end = () => process.exit(0);
|
|
14
|
+
process.stdin.on('end', end);
|
|
15
|
+
process.stdin.on('error', end);
|
|
16
|
+
process.stdin.resume();
|
|
17
|
+
process.stdin.unref?.();
|
|
18
|
+
await import(pathToFileURL(entry).href);
|
|
19
|
+
// One byte on the ready pipe, which the runner opened; an end before it is a load failure.
|
|
20
|
+
try {
|
|
21
|
+
writeSync(READY_FD, 'r');
|
|
22
|
+
closeSync(READY_FD);
|
|
23
|
+
} catch {
|
|
24
|
+
// Not started by the trusted runner: there is no ready pipe to tell.
|
|
25
|
+
}
|
|
@@ -24,12 +24,14 @@ export function dataDeleting() {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// What no app may ask for, refused at submission and never silently dropped
|
|
27
|
-
// (rec#7 D-28.3, D-28.4): network
|
|
28
|
-
// or launch in the host tool catalog.
|
|
27
|
+
// (rec#7 D-28.3, D-28.4): a network grant, and any tool marked egress, model
|
|
28
|
+
// or launch in the host tool catalog. These limit only what the FULI Host API
|
|
29
|
+
// grants; an app in trusted mode can still use the network or start programs
|
|
30
|
+
// itself (rec#11 D-36.10).
|
|
29
31
|
export function rejectedManifest(submitted, manifest) {
|
|
30
32
|
const reasons = [];
|
|
31
33
|
if (submitted !== null && typeof submitted === 'object' && Object.hasOwn(submitted, 'network')) {
|
|
32
|
-
reasons.push('network:
|
|
34
|
+
reasons.push('network: the FULI host grants apps no network access');
|
|
33
35
|
}
|
|
34
36
|
if (manifest) {
|
|
35
37
|
for (const permission of manifest.permissions) {
|
|
@@ -38,7 +40,7 @@ export function rejectedManifest(submitted, manifest) {
|
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
return reasons.length ? new ApplicationError('manifest_rejected',
|
|
41
|
-
`
|
|
43
|
+
`The FULI host grants apps nothing that sends data off this computer, spends model budget or starts other programs: ${reasons.join('; ')}`,
|
|
42
44
|
{ status: 400 }) : null;
|
|
43
45
|
}
|
|
44
46
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { setTimeout as delay } from 'node:timers/promises';
|
|
2
|
+
|
|
3
|
+
// Whether work settles (either way) within ms. The timer is cleared as soon
|
|
4
|
+
// as the work settles.
|
|
5
|
+
export async function settledWithin(work, ms) {
|
|
6
|
+
const timeout = new AbortController();
|
|
7
|
+
try {
|
|
8
|
+
return await Promise.race([work.then(() => true, () => true),
|
|
9
|
+
delay(ms, false, { signal: timeout.signal }).catch(() => false)]);
|
|
10
|
+
} finally {
|
|
11
|
+
timeout.abort();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -4,8 +4,9 @@ import { contentHash } from '../../packages/roundtable/src/canonical-json.js';
|
|
|
4
4
|
import { ApplicationError } from '../app/application-error.js';
|
|
5
5
|
import { createActivation } from './activation.js';
|
|
6
6
|
import { approvalTerms } from './authorization.js';
|
|
7
|
-
import { decisionSource,
|
|
7
|
+
import { decisionSource, TERMINAL_CONFIRMATION } from './decision-source.js';
|
|
8
8
|
import { appConflict } from './errors.js';
|
|
9
|
+
import { CONFIRMATION_NOTICE, TERMS_VERSION, TRUST_MODE, TRUST_WARNING } from './trust-terms.js';
|
|
9
10
|
|
|
10
11
|
// A challenge is answered within this window, once.
|
|
11
12
|
const CHALLENGE_WINDOW_MS = 10 * 60_000;
|
|
@@ -13,30 +14,40 @@ const NONCE_BYTES = 32;
|
|
|
13
14
|
const CHALLENGE_ID_BYTES = 16;
|
|
14
15
|
const CLAIM_BYTES = 16;
|
|
15
16
|
const EVENT_DETAIL = /^[A-Za-z][A-Za-z0-9_]{0,63}$/;
|
|
17
|
+
// What a decision binds when no Windows Hello is added.
|
|
18
|
+
const NO_PRESENCE = 'none';
|
|
16
19
|
|
|
17
|
-
const
|
|
18
|
-
+ '(取消/失败/不可用一律记 unverified,不运行).';
|
|
20
|
+
const NOT_APPROVED = 'Nothing was approved or activated, and the app does not run (未批准、未激活,应用不运行).';
|
|
19
21
|
const PRESENCE_MESSAGES = Object.freeze({
|
|
20
22
|
presence_canceled: 'Windows Hello was canceled.',
|
|
21
23
|
presence_failed: 'Windows Hello did not verify the user.',
|
|
22
|
-
presence_unavailable: 'Windows Hello is unavailable here'
|
|
23
|
-
presence_unsupported_platform: 'This platform has no presence check yet, so apps cannot run (本平台尚无在场证明,应用不能运行).'
|
|
24
|
+
presence_unavailable: 'Windows Hello is unavailable here'
|
|
24
25
|
});
|
|
25
26
|
|
|
26
|
-
// `fuli app approve` and `fuli app rollback
|
|
27
|
-
// The
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
27
|
+
// `fuli app approve` and `fuli app rollback`: the terminal confirmation flow
|
|
28
|
+
// (rec#11 D-36.1, D-36.9). The CLI shows the app name, a short summary of this
|
|
29
|
+
// version's terms and the trusted-mode warning, and the user types the app
|
|
30
|
+
// name back. That completes the terminal confirmation flow; it does not prove
|
|
31
|
+
// a person did it and does not protect against other programs running as the
|
|
32
|
+
// same account. With `--hello` on Windows, Windows Hello is asked as well and
|
|
33
|
+
// its result is recorded as presence hello; it is never required.
|
|
34
|
+
//
|
|
35
|
+
// A challenge carries a 10-minute nonce that only this process holds and the
|
|
36
|
+
// digest of everything the decision covers: the exact action, the full
|
|
37
|
+
// approval terms with the package digest (approvalBinds), the trust mode and
|
|
38
|
+
// terms version (trust-terms.js), the app state it starts from and the
|
|
39
|
+
// confirmations given. The nonce is consumed once, by one claim that is
|
|
40
|
+
// committed before anything else, and only that claim can then commit the
|
|
41
|
+
// decision, after the terms are computed again. A cancellation, a wrong name,
|
|
42
|
+
// a failed Hello that was asked for, expiry, changed terms or a failed commit
|
|
43
|
+
// leaves the challenge consumed and approves nothing: no approval, no change
|
|
44
|
+
// of the active version, no earlier approval restored.
|
|
38
45
|
// Only the CLI composes this module; the console and Agent tools cannot reach it.
|
|
39
|
-
|
|
46
|
+
//
|
|
47
|
+
// confirmation.ask({ challengeId, message, appName }) shows message and
|
|
48
|
+
// returns the line typed, or null when the user cancelled. presence: the
|
|
49
|
+
// optional Windows Hello port (src/presence/port.js), or null.
|
|
50
|
+
export function createConfirmedDecisions(context, { confirmation, presence = null }) {
|
|
40
51
|
const { store, now } = context;
|
|
41
52
|
const activation = createActivation(context);
|
|
42
53
|
|
|
@@ -48,15 +59,19 @@ export function createVerifiedDecisions(context, { presence }) {
|
|
|
48
59
|
versionState: version.state, terms: approvalTerms(version) });
|
|
49
60
|
}
|
|
50
61
|
|
|
51
|
-
// Refuses before any presence prompt when the decision could not be committed
|
|
52
|
-
// now, including a resident service or data migration not yet confirmed.
|
|
53
62
|
// lease: the app's owner lease decide() holds; every transaction checks its fence.
|
|
54
63
|
const transaction = (lease, work) => store.transaction(() => {
|
|
55
64
|
if (lease) context.leases.assertOwned(lease);
|
|
56
65
|
return work();
|
|
57
66
|
});
|
|
58
67
|
|
|
59
|
-
|
|
68
|
+
// Refuses before anything is asked when the decision could not be committed
|
|
69
|
+
// now, including a resident service or data migration not yet confirmed.
|
|
70
|
+
// The decision binds the trust mode and terms version of this FULI and
|
|
71
|
+
// whether Windows Hello is part of it.
|
|
72
|
+
function issueChallenge(request, lease = null) {
|
|
73
|
+
const decision = { ...request, trustMode: TRUST_MODE, termsVersion: TERMS_VERSION,
|
|
74
|
+
presence: presence ? presence.kind : NO_PRESENCE };
|
|
60
75
|
return transaction(lease, () => {
|
|
61
76
|
const prepared = prepare(decision);
|
|
62
77
|
const nonce = randomBytes(NONCE_BYTES).toString('base64url');
|
|
@@ -66,23 +81,27 @@ export function createVerifiedDecisions(context, { presence }) {
|
|
|
66
81
|
terms: termsDigest(decision, prepared), expiresAt });
|
|
67
82
|
store.recordEvent({ appId: decision.appId, at: now(), action: 'challenge_issued', version: decision.version,
|
|
68
83
|
detail: { challengeId, decision: decision.action, expiresAt } });
|
|
69
|
-
|
|
84
|
+
const summary = termsSummary(decision, prepared, challengeId);
|
|
85
|
+
return { appId: decision.appId, challengeId, nonce, expiresAt, appName: prepared.app.name,
|
|
86
|
+
message: [...summary, TRUST_WARNING.zh, TRUST_WARNING.en, CONFIRMATION_NOTICE.zh, CONFIRMATION_NOTICE.en].join('\n'),
|
|
87
|
+
helloMessage: summary.join('\n') };
|
|
70
88
|
});
|
|
71
89
|
}
|
|
72
90
|
|
|
73
|
-
// outcome:
|
|
74
|
-
//
|
|
91
|
+
// outcome: { typed, presence } — the line typed for this challenge and, when
|
|
92
|
+
// Windows Hello is part of the decision, what it reported. The commit runs in
|
|
93
|
+
// two steps, and the first is what makes it one-time:
|
|
75
94
|
// 1. claim: one committed transaction consumes the challenge and stores a
|
|
76
95
|
// claim token only this call holds. Of concurrent commits exactly one
|
|
77
96
|
// claims it; every other one, then or later, is challenge_replayed.
|
|
78
97
|
// 2. finalize: one transaction checks the answer and the terms again and
|
|
79
98
|
// either approves (or activates) and releases the claim, or records the
|
|
80
99
|
// refusal and releases it. Only the claim holder can finalize.
|
|
81
|
-
// When finalizing throws (a
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
//
|
|
100
|
+
// When finalizing throws (a storage error), it rolls back whole, so nothing
|
|
101
|
+
// is approved, and a further transaction records the failure. The challenge
|
|
102
|
+
// was consumed in step 1 and stays consumed: a failed attempt is never
|
|
103
|
+
// offered to another submitter. A crash between the steps leaves it
|
|
104
|
+
// consumed and unapproved.
|
|
86
105
|
function commitChallenge(challenge, outcome, actor, lease = null) {
|
|
87
106
|
const claimed = transaction(lease, () => claimChallenge(challenge));
|
|
88
107
|
if (claimed.refusal) throw claimed.refusal;
|
|
@@ -121,13 +140,15 @@ export function createVerifiedDecisions(context, { presence }) {
|
|
|
121
140
|
}
|
|
122
141
|
const checked = checkedDecision(open, outcome);
|
|
123
142
|
if (checked.refusal) {
|
|
124
|
-
recordConsumed(open, { at, actor, outcome: checked.refusal.code, detail: outcome?.detail });
|
|
143
|
+
recordConsumed(open, { at, actor, outcome: checked.refusal.code, detail: outcome?.presence?.detail });
|
|
125
144
|
return checked;
|
|
126
145
|
}
|
|
127
|
-
recordConsumed(open, { at, actor, outcome: '
|
|
128
|
-
const check = { presence: presence
|
|
129
|
-
|
|
130
|
-
|
|
146
|
+
recordConsumed(open, { at, actor, outcome: 'confirmed' });
|
|
147
|
+
const check = { presence: decision.presence === NO_PRESENCE ? 'unverified' : decision.presence,
|
|
148
|
+
verification: TERMINAL_CONFIRMATION, challengeId, verifiedAt: at, trustMode: decision.trustMode,
|
|
149
|
+
termsVersion: decision.termsVersion };
|
|
150
|
+
const { verifiedAt: _at, ...recorded } = check;
|
|
151
|
+
const record = { at, actor: actor.user, check, detail: { entrypoint: 'cli', ...recorded } };
|
|
131
152
|
const result = decision.action === 'approve'
|
|
132
153
|
? activation.approve(checked.prepared, record) : activation.reactivate(checked.prepared, record);
|
|
133
154
|
return { result: { ...result, approval: { entrypoint: 'cli', ...check } } };
|
|
@@ -139,7 +160,7 @@ export function createVerifiedDecisions(context, { presence }) {
|
|
|
139
160
|
}
|
|
140
161
|
}
|
|
141
162
|
|
|
142
|
-
// detail: a short code from the presence port or the failed operation, never a path or
|
|
163
|
+
// detail: a short code from the presence port or the failed operation, never a path, a message or the line typed.
|
|
143
164
|
function recordConsumed({ challengeId, decision }, { at, actor, outcome, detail }) {
|
|
144
165
|
const code = typeof detail === 'string' && EVENT_DETAIL.test(detail) ? { detail } : {};
|
|
145
166
|
store.recordEvent({ appId: decision.appId, at, action: 'challenge_consumed', version: decision.version,
|
|
@@ -148,39 +169,62 @@ export function createVerifiedDecisions(context, { presence }) {
|
|
|
148
169
|
|
|
149
170
|
// Runs after the challenge is consumed: any refusal here commits with it.
|
|
150
171
|
function checkedDecision(open, outcome) {
|
|
172
|
+
const { decision } = open;
|
|
151
173
|
if (Date.parse(open.expiresAt) <= context.clock().getTime()) {
|
|
152
|
-
return { refusal: appConflict('challenge_expired', `The challenge expired after 10 minutes. ${
|
|
174
|
+
return { refusal: appConflict('challenge_expired', `The challenge expired after 10 minutes. ${NOT_APPROVED}`) };
|
|
175
|
+
}
|
|
176
|
+
const typed = typeof outcome?.typed === 'string' ? outcome.typed.trim() : '';
|
|
177
|
+
if (!typed) return { refusal: appConflict('confirmation_canceled', `The confirmation was cancelled. ${NOT_APPROVED}`) };
|
|
178
|
+
if (typed !== store.existingApp(decision.appId).name) {
|
|
179
|
+
return { refusal: appConflict('confirmation_mismatch', `The name typed is not this app's name. ${NOT_APPROVED}`) };
|
|
180
|
+
}
|
|
181
|
+
if (decision.presence !== NO_PRESENCE && outcome.presence?.verified !== true) {
|
|
182
|
+
return { refusal: presenceRefusal(outcome.presence) };
|
|
183
|
+
}
|
|
184
|
+
if (decision.trustMode !== TRUST_MODE || decision.termsVersion !== TERMS_VERSION) {
|
|
185
|
+
return { refusal: appConflict('challenge_mismatch',
|
|
186
|
+
`The challenge was issued under other approval terms, so it does not cover these. ${NOT_APPROVED}`) };
|
|
153
187
|
}
|
|
154
|
-
if (outcome?.verified !== true) return { refusal: presenceRefusal(outcome) };
|
|
155
188
|
let prepared;
|
|
156
189
|
try {
|
|
157
|
-
prepared = prepare(
|
|
190
|
+
prepared = prepare(decision);
|
|
158
191
|
} catch (error) {
|
|
159
192
|
if (error instanceof ApplicationError) return { refusal: error };
|
|
160
193
|
throw error;
|
|
161
194
|
}
|
|
162
|
-
if (termsDigest(
|
|
195
|
+
if (termsDigest(decision, prepared) !== open.terms) {
|
|
163
196
|
return { refusal: appConflict('challenge_mismatch',
|
|
164
|
-
`The app or its terms changed after the
|
|
197
|
+
`The app or its terms changed after the confirmation, so it does not cover them. ${NOT_APPROVED}`) };
|
|
165
198
|
}
|
|
166
199
|
return { prepared };
|
|
167
200
|
}
|
|
168
201
|
|
|
202
|
+
// The line typed and, only when it names this app, the optional Hello result.
|
|
203
|
+
async function answer(challenge) {
|
|
204
|
+
let typed;
|
|
205
|
+
try {
|
|
206
|
+
typed = await confirmation.ask({ challengeId: challenge.challengeId, message: challenge.message,
|
|
207
|
+
appName: challenge.appName });
|
|
208
|
+
} catch {
|
|
209
|
+
// A prompt that failed to answer is a cancelled one; the challenge is consumed all the same.
|
|
210
|
+
typed = null;
|
|
211
|
+
}
|
|
212
|
+
if (!presence || typeof typed !== 'string' || typed.trim() !== challenge.appName) return { typed };
|
|
213
|
+
try {
|
|
214
|
+
return { typed, presence: await presence.verify({ challengeId: challenge.challengeId, message: challenge.helloMessage }) };
|
|
215
|
+
} catch {
|
|
216
|
+
return { typed, presence: { verified: false, reason: 'presence_unavailable', detail: 'presence_check_failed' } };
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
169
220
|
async function decide(decision, actor) {
|
|
170
|
-
if (decisionSource(actor).entrypoint !== 'cli') throw new TypeError('A
|
|
171
|
-
// The whole decision,
|
|
221
|
+
if (decisionSource(actor).entrypoint !== 'cli') throw new TypeError('A terminal-confirmed decision comes through the CLI');
|
|
222
|
+
// The whole decision, confirmation included, is one app operation
|
|
172
223
|
// (operations.js): refused before any prompt while another FULI process
|
|
173
224
|
// holds the app, and nothing else of this process changes it meanwhile.
|
|
174
225
|
return context.operations.run(decision.appId, decision.action, async (lease) => {
|
|
175
226
|
const challenge = issueChallenge(decision, lease);
|
|
176
|
-
|
|
177
|
-
try {
|
|
178
|
-
outcome = await presence.verify({ challengeId: challenge.challengeId, message: challenge.message });
|
|
179
|
-
} catch {
|
|
180
|
-
// A check that failed to answer is an unavailable one; the challenge is consumed all the same.
|
|
181
|
-
outcome = { verified: false, reason: 'presence_unavailable', detail: 'presence_check_failed' };
|
|
182
|
-
}
|
|
183
|
-
return commitChallenge(challenge, outcome, actor, lease);
|
|
227
|
+
return commitChallenge(challenge, await answer(challenge), actor, lease);
|
|
184
228
|
});
|
|
185
229
|
}
|
|
186
230
|
|
|
@@ -189,7 +233,7 @@ export function createVerifiedDecisions(context, { presence }) {
|
|
|
189
233
|
decide({ action: 'approve', appId, version, digest, confirmResident, confirmIrreversibleMigration }, approver),
|
|
190
234
|
rollback: ({ appId, version, actor, confirmIrreversibleMigration = false }) =>
|
|
191
235
|
decide({ action: 'rollback', appId, version, confirmIrreversibleMigration }, actor),
|
|
192
|
-
// The two halves of a decision, around the
|
|
236
|
+
// The two halves of a decision, around the confirmation.
|
|
193
237
|
issueChallenge, commitChallenge
|
|
194
238
|
};
|
|
195
239
|
}
|
|
@@ -197,21 +241,22 @@ export function createVerifiedDecisions(context, { presence }) {
|
|
|
197
241
|
function presenceRefusal(outcome) {
|
|
198
242
|
const reason = Object.hasOwn(PRESENCE_MESSAGES, outcome?.reason) ? outcome.reason : 'presence_unavailable';
|
|
199
243
|
const cause = reason === 'presence_unavailable' ? ` (${outcome?.detail ?? 'no answer'}).` : '';
|
|
200
|
-
return appConflict(reason, `${PRESENCE_MESSAGES[reason]}${cause} ${
|
|
244
|
+
return appConflict(reason, `${PRESENCE_MESSAGES[reason]}${cause} ${NOT_APPROVED}`);
|
|
201
245
|
}
|
|
202
246
|
|
|
203
|
-
//
|
|
204
|
-
function
|
|
247
|
+
// The short summary of what is decided: the app, the exact package and what it may do.
|
|
248
|
+
function termsSummary(decision, { app, version }, challengeId) {
|
|
205
249
|
const { manifest } = version;
|
|
206
250
|
const data = manifest.data.scope === 'app' ? `own data directory, format ${manifest.data.format}` : 'none';
|
|
207
251
|
return [
|
|
208
252
|
decision.action === 'approve' ? `FULI: approve Agent app ${app.name} ${version.version}`
|
|
209
253
|
: `FULI: activate approved version ${version.version} of Agent app ${app.name}`,
|
|
254
|
+
`${manifest.title} — by Agent ${app.agentId}`,
|
|
210
255
|
`App ${app.appId}`,
|
|
211
256
|
`Digest ${version.digest}`,
|
|
212
257
|
`Permissions ${manifest.permissions.join(', ') || 'none'}`,
|
|
213
258
|
`Data ${data}`,
|
|
214
259
|
`Resident service ${manifest.resident ? 'yes' : 'no'}`,
|
|
215
260
|
`Challenge ${challengeId}`
|
|
216
|
-
]
|
|
261
|
+
];
|
|
217
262
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
// Where a management decision (approve, rollback, disable, delete) came in, and
|
|
2
|
-
// what FULI
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// or a one-time token can be used by any process running as the
|
|
6
|
-
// account, and a CSRF token only stops cross-site web forgery: none of
|
|
7
|
-
// shows that a person decided
|
|
2
|
+
// what FULI checked about it. Normal Agent tools (MCP and fuli_call) expose
|
|
3
|
+
// none of these decisions, so they arrive through the CLI or the local HTTP
|
|
4
|
+
// console. An interactive terminal, a loopback address, a repeated digest, a
|
|
5
|
+
// typed app name or a one-time token can be used by any process running as the
|
|
6
|
+
// same OS account, and a CSRF token only stops cross-site web forgery: none of
|
|
7
|
+
// them shows that a person decided.
|
|
8
8
|
//
|
|
9
|
-
// Only `fuli app approve` and `fuli app rollback`
|
|
10
|
-
// (src/agent-apps/
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
9
|
+
// Only `fuli app approve` and `fuli app rollback` complete the terminal
|
|
10
|
+
// confirmation flow (src/agent-apps/confirmed-decisions.js): the CLI shows the
|
|
11
|
+
// app name, a summary of its terms and the trusted-mode warning, and the app
|
|
12
|
+
// name typed back commits that one challenge. This does not prove a person did
|
|
13
|
+
// it and does not protect against other programs of the same account (rec#11
|
|
14
|
+
// D-36.9). On Windows, `--hello` adds Windows Hello on top, recorded as
|
|
15
|
+
// presence hello; it is never required.
|
|
16
16
|
export const DECISION_ENTRYPOINTS = Object.freeze(['cli', 'http']);
|
|
17
17
|
export const PRESENCE_LEVELS = Object.freeze(['unverified', 'hello', 'touchid', 'polkit']);
|
|
18
|
-
// What
|
|
19
|
-
export const
|
|
18
|
+
// What an approval the run gate accepts went through.
|
|
19
|
+
export const TERMINAL_CONFIRMATION = 'terminal_confirmation';
|
|
20
20
|
|
|
21
|
-
// The
|
|
21
|
+
// The confirmation of a decision that had none (the console's).
|
|
22
22
|
export const UNVERIFIED_CHECK = Object.freeze({
|
|
23
|
-
presence: PRESENCE_LEVELS[0], verification: null, challengeId: null, verifiedAt: null
|
|
23
|
+
presence: PRESENCE_LEVELS[0], verification: null, challengeId: null, verifiedAt: null, trustMode: null, termsVersion: null
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
export function decisionSource(actor) {
|
|
@@ -60,9 +60,15 @@ export function createHostIdentity({
|
|
|
60
60
|
};
|
|
61
61
|
const adapter = adapters[platform] ?? null;
|
|
62
62
|
|
|
63
|
+
// The identity a later probe compares exactly: of this process for an owner
|
|
64
|
+
// lease, of an app process the trusted runner started for its instance.
|
|
65
|
+
async function identify(pid) {
|
|
66
|
+
return adapter ? adapter.identity(pid) : null;
|
|
67
|
+
}
|
|
68
|
+
|
|
63
69
|
// This process: what an owner lease records about its holder.
|
|
64
70
|
async function self() {
|
|
65
|
-
return { pid: process.pid, identity:
|
|
71
|
+
return { pid: process.pid, identity: await identify(process.pid), exePath: process.execPath };
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
async function probe({ pid, identity }) {
|
|
@@ -71,7 +77,7 @@ export function createHostIdentity({
|
|
|
71
77
|
return adapter.probe(pid, identity);
|
|
72
78
|
}
|
|
73
79
|
|
|
74
|
-
return { platform, self, probe };
|
|
80
|
+
return { platform, self, identify, probe };
|
|
75
81
|
}
|
|
76
82
|
|
|
77
83
|
// kill(pid, 0) sends no signal: it asks whether the PID exists here.
|