mulmoclaude 0.5.2 → 0.6.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/Dockerfile.sandbox +100 -0
- package/README.md +17 -4
- package/bin/mulmoclaude.js +46 -15
- package/bin/prepare-dist.js +18 -2
- package/client/assets/chunk-CernVdwh.js +1 -0
- package/client/assets/chunk-D8eiyYIV-C1eAZMzz.js +1 -0
- package/client/assets/html2canvas-CDGcmOD3-BbPeutDg.js +5 -0
- package/client/assets/index-BbgSjFQ8.js +4968 -0
- package/client/assets/index-ECD0lgIv.css +2 -0
- package/client/assets/{index.es-D4YyL_Dg-BgT6a3Nd.js → index.es-DqtpmBm8-DJdTPdnc.js} +5 -5
- package/client/assets/material-symbols-outlined-BLDfUw-_.woff2 +0 -0
- package/client/assets/runtime-protocol-vue-6WYa8hAs.js +1 -0
- package/client/assets/runtime-vue-BVUzgYGA.js +1 -0
- package/client/assets/typeof-DBp4T-Ny-C2xoZtcz.js +1 -0
- package/client/assets/vue-1e_vz2LW.js +1 -0
- package/client/assets/vue.runtime.esm-bundler-DQ8Kjjui.js +4 -0
- package/client/index.html +33 -2
- package/package.json +20 -18
- package/sandbox-entrypoint.sh +106 -0
- package/server/accounting/accountNormalize.ts +32 -0
- package/server/accounting/defaultAccounts.ts +87 -0
- package/server/accounting/eventPublisher.ts +51 -0
- package/server/accounting/journal.ts +252 -0
- package/server/accounting/openingBalances.ts +114 -0
- package/server/accounting/report.ts +237 -0
- package/server/accounting/service.ts +718 -0
- package/server/accounting/snapshotCache.ts +333 -0
- package/server/accounting/timeSeries.ts +265 -0
- package/server/accounting/types.ts +148 -0
- package/server/agent/activeTools.ts +128 -0
- package/server/agent/attachmentConverter.ts +10 -5
- package/server/agent/backend/claude-code.ts +8 -2
- package/server/agent/backend/types.ts +1 -1
- package/server/agent/config.ts +101 -31
- package/server/agent/index.ts +45 -33
- package/server/agent/mcp-server.ts +146 -69
- package/server/agent/mcp-tools/index.ts +1 -5
- package/server/agent/mcp-tools/notify.ts +2 -22
- package/server/agent/mcp-tools/x.ts +0 -4
- package/server/agent/mcpHealth.ts +168 -0
- package/server/agent/plugin-names.ts +20 -77
- package/server/agent/prompt.ts +259 -51
- package/server/agent/resumeFailover.ts +1 -1
- package/server/agent/stream.ts +0 -1
- package/server/api/auth/bearerAuth.ts +5 -5
- package/server/api/csrfGuard.ts +1 -1
- package/server/api/routes/accounting.ts +366 -0
- package/server/api/routes/agent.ts +509 -46
- package/server/api/routes/attachment.ts +104 -0
- package/server/api/routes/chart.ts +2 -1
- package/server/api/routes/config.ts +12 -12
- package/server/api/routes/files.ts +105 -48
- package/server/api/routes/image.ts +70 -25
- package/server/api/routes/journal.ts +35 -0
- package/server/api/routes/mulmo-script.ts +358 -118
- package/server/api/routes/mulmoScriptValidate.ts +1 -1
- package/server/api/routes/news.ts +1 -1
- package/server/api/routes/notifications.ts +92 -22
- package/server/api/routes/notifier.ts +98 -0
- package/server/api/routes/pdf.ts +188 -48
- package/server/api/routes/plugins.ts +34 -14
- package/server/api/routes/presentHtml.ts +58 -3
- package/server/api/routes/roles.ts +1 -8
- package/server/api/routes/runtime-plugin.ts +224 -0
- package/server/api/routes/scheduler.ts +7 -5
- package/server/api/routes/schedulerHandlers.ts +1 -1
- package/server/api/routes/schedulerTasks.ts +8 -7
- package/server/api/routes/sessions.ts +234 -121
- package/server/api/routes/skills.ts +56 -51
- package/server/api/routes/sources.ts +52 -45
- package/server/api/routes/translation.ts +44 -0
- package/server/api/routes/wiki/frontmatter.ts +13 -65
- package/server/api/routes/wiki/history.ts +261 -0
- package/server/api/routes/wiki/pageIndex.ts +1 -1
- package/server/api/routes/wiki.ts +50 -26
- package/server/events/file-change.ts +83 -0
- package/server/events/notifications.ts +247 -91
- package/server/events/pub-sub/index.ts +1 -1
- package/server/events/relay-client.ts +5 -5
- package/server/events/scheduler-adapter.ts +2 -2
- package/server/events/session-store/index.ts +110 -22
- package/server/events/task-manager/index.ts +10 -9
- package/server/index.ts +509 -33
- package/server/notifier/engine.ts +419 -0
- package/server/notifier/legacy-adapters.ts +76 -0
- package/server/notifier/runtime-api.ts +74 -0
- package/server/notifier/store.ts +70 -0
- package/server/notifier/types.ts +121 -0
- package/server/plugins/dev-loader.ts +171 -0
- package/server/plugins/dev-watcher.ts +150 -0
- package/server/plugins/diagnostics.ts +188 -0
- package/server/plugins/preset-list.ts +52 -0
- package/server/plugins/preset-loader.ts +112 -0
- package/server/plugins/runtime-chat-api.ts +38 -0
- package/server/plugins/runtime-loader.ts +430 -0
- package/server/plugins/runtime-registry.ts +112 -0
- package/server/plugins/runtime-tasks-api.ts +50 -0
- package/server/plugins/runtime.ts +378 -0
- package/server/services/translation/cache.ts +72 -0
- package/server/services/translation/index.ts +106 -0
- package/server/services/translation/llm.ts +140 -0
- package/server/services/translation/types.ts +35 -0
- package/server/system/credentials.ts +13 -2
- package/server/system/env.ts +6 -1
- package/server/system/logger/formatters.ts +46 -4
- package/server/system/logger/index.ts +4 -4
- package/server/system/logger/sinks.ts +26 -5
- package/server/system/logger/types.ts +2 -2
- package/server/utils/dev-plugin-args.d.mts +11 -0
- package/server/utils/dev-plugin-args.mjs +43 -0
- package/server/utils/errors.ts +13 -4
- package/server/utils/files/accounting-io.ts +295 -0
- package/server/utils/files/atomic.ts +17 -49
- package/server/utils/files/attachment-store.ts +182 -0
- package/server/utils/files/html-io.ts +1 -7
- package/server/utils/files/html-store.ts +19 -0
- package/server/utils/files/image-store.ts +20 -22
- package/server/utils/files/index.ts +5 -15
- package/server/utils/files/journal-io.ts +7 -35
- package/server/utils/files/json.ts +2 -29
- package/server/utils/files/markdown-image-fill.ts +6 -37
- package/server/utils/files/markdown-store.ts +6 -21
- package/server/utils/files/naming.ts +3 -39
- package/server/utils/files/plugins-io.ts +100 -0
- package/server/utils/files/reference-dirs-io.ts +1 -9
- package/server/utils/files/roles-io.ts +2 -10
- package/server/utils/files/safe.ts +17 -19
- package/server/utils/files/scheduler-io.ts +1 -7
- package/server/utils/files/scheduler-overrides-io.ts +3 -12
- package/server/utils/files/session-io.ts +21 -30
- package/server/utils/files/spreadsheet-store.ts +9 -22
- package/server/utils/files/translation-io.ts +46 -0
- package/server/utils/files/user-tasks-io.ts +1 -7
- package/server/utils/files/workspace-io.ts +3 -79
- package/server/utils/gemini.ts +33 -11
- package/server/utils/html/htmlArtifactSplicer.ts +41 -0
- package/server/utils/markdown/frontmatter.ts +112 -0
- package/server/utils/regex.ts +56 -0
- package/server/utils/router.ts +41 -0
- package/server/utils/slug.ts +5 -3
- package/server/utils/time.ts +12 -0
- package/server/workspace/chat-index/indexer.ts +15 -2
- package/server/workspace/chat-index/summarizer.ts +1 -1
- package/server/workspace/custom-dirs.ts +1 -1
- package/server/workspace/helps/gemini.md +1 -1
- package/server/workspace/helps/guide.md +61 -0
- package/server/workspace/helps/index.md +4 -0
- package/server/workspace/helps/presenthtml.md +80 -0
- package/server/workspace/helps/sandbox.md +7 -0
- package/server/workspace/helps/storyteller.md +101 -0
- package/server/workspace/helps/telegram.md +1 -0
- package/server/workspace/helps/wiki.md +9 -7
- package/server/workspace/journal/archivist-cli.ts +7 -33
- package/server/workspace/journal/archivist-schemas.ts +5 -43
- package/server/workspace/journal/dailyPass.ts +34 -187
- package/server/workspace/journal/diff.ts +3 -28
- package/server/workspace/journal/index.ts +10 -81
- package/server/workspace/journal/indexFile.ts +3 -24
- package/server/workspace/journal/latestDaily.ts +51 -0
- package/server/workspace/journal/memoryExtractor.ts +4 -20
- package/server/workspace/journal/optimizationPass.ts +4 -21
- package/server/workspace/journal/paths.ts +4 -23
- package/server/workspace/journal/state.ts +6 -29
- package/server/workspace/memory/io.ts +213 -0
- package/server/workspace/memory/llm-classifier.ts +158 -0
- package/server/workspace/memory/migrate.ts +263 -0
- package/server/workspace/memory/run.ts +84 -0
- package/server/workspace/memory/topic-cluster.ts +218 -0
- package/server/workspace/memory/topic-detect.ts +67 -0
- package/server/workspace/memory/topic-index-hook.ts +128 -0
- package/server/workspace/memory/topic-io.ts +180 -0
- package/server/workspace/memory/topic-migrate.ts +248 -0
- package/server/workspace/memory/topic-run.ts +172 -0
- package/server/workspace/memory/topic-swap.ts +135 -0
- package/server/workspace/memory/topic-types.ts +142 -0
- package/server/workspace/memory/types.ts +83 -0
- package/server/workspace/news/reader.ts +4 -5
- package/server/workspace/paths.ts +124 -47
- package/server/workspace/roles.ts +2 -11
- package/server/workspace/skills/parser.ts +38 -55
- package/server/workspace/skills/user-tasks.ts +1 -2
- package/server/workspace/skills-preset/mc-library/SKILL.md +188 -0
- package/server/workspace/skills-preset.ts +196 -0
- package/server/workspace/sources/fetchers/githubIssues.ts +13 -11
- package/server/workspace/sources/fetchers/index.ts +1 -1
- package/server/workspace/sources/fetchers/rssParser.ts +1 -1
- package/server/workspace/sources/pipeline/index.ts +2 -2
- package/server/workspace/sources/pipeline/notify.ts +3 -3
- package/server/workspace/sources/pipeline/write.ts +2 -2
- package/server/workspace/sources/registry.ts +39 -61
- package/server/workspace/sources/robots.ts +1 -1
- package/server/workspace/tool-trace/classify.ts +2 -1
- package/server/workspace/tool-trace/index.ts +1 -1
- package/server/workspace/tool-trace/writeSearch.ts +6 -1
- package/server/workspace/wiki-backlinks/index.ts +19 -7
- package/server/workspace/wiki-backlinks/sessionBacklinks.ts +1 -0
- package/server/workspace/wiki-history/hook/snapshot.mjs +98 -0
- package/server/workspace/wiki-history/hook/snapshot.ts +135 -0
- package/server/workspace/wiki-history/provision.ts +181 -0
- package/server/workspace/wiki-pages/io.ts +217 -0
- package/server/workspace/wiki-pages/snapshot.ts +380 -0
- package/server/workspace/workspace.ts +75 -13
- package/src/App.vue +115 -40
- package/src/_runtime/protocol-vue.ts +21 -0
- package/src/_runtime/vue.ts +22 -0
- package/src/components/ChatInput.vue +14 -10
- package/src/components/CopyChatButton.vue +76 -0
- package/src/components/FileContentRenderer.vue +67 -14
- package/src/components/FileTree.vue +2 -2
- package/src/components/FilesView.vue +17 -1
- package/src/components/NewsView.vue +16 -2
- package/src/components/NotificationBell.vue +320 -93
- package/src/components/PageChatComposer.vue +5 -4
- package/src/components/PluginLauncher.vue +42 -6
- package/src/components/PluginScopedRoot.vue +87 -0
- package/src/components/RoleSelector.vue +12 -1
- package/src/components/RolesView.vue +562 -0
- package/src/components/SentAttachmentChip.vue +102 -0
- package/src/components/SessionHistoryPanel.vue +109 -20
- package/src/components/SessionRoleIcon.vue +7 -4
- package/src/components/SessionSidebar.vue +20 -7
- package/src/components/SessionTabBar.vue +1 -1
- package/src/components/SettingsMcpTab.vue +4 -4
- package/src/components/SettingsModal.vue +2 -0
- package/src/components/SidebarHeader.vue +16 -5
- package/src/components/SourcesManager.vue +23 -9
- package/src/components/SourcesView.vue +1 -1
- package/src/components/StackView.vue +102 -6
- package/src/components/SuggestionsPanel.vue +105 -16
- package/src/components/SystemFileBanner.vue +1 -1
- package/src/components/TodoExplorer.vue +4 -5
- package/src/components/todo/TodoAddDialog.vue +2 -3
- package/src/components/todo/TodoEditDialog.vue +1 -2
- package/src/components/todo/TodoEditPanel.vue +2 -3
- package/src/components/todo/TodoKanbanView.vue +8 -5
- package/src/components/todo/TodoListView.vue +3 -5
- package/src/components/todo/TodoTableView.vue +7 -5
- package/src/composables/useAccountingChannel.ts +58 -0
- package/src/composables/useActiveSession.ts +4 -25
- package/src/composables/useAppApi.ts +6 -44
- package/src/composables/useClipboardCopy.ts +3 -20
- package/src/composables/useContentDisplay.ts +33 -2
- package/src/composables/useDevPluginReload.ts +23 -0
- package/src/composables/useDynamicFavicon.ts +5 -31
- package/src/composables/useEventListeners.ts +0 -20
- package/src/composables/useExpandedDirs.ts +4 -15
- package/src/composables/useFaviconState.ts +12 -46
- package/src/composables/useFileChange.ts +53 -0
- package/src/composables/useFreshPluginData.ts +6 -43
- package/src/composables/useHealth.ts +14 -43
- package/src/composables/useImageErrorRepair.ts +104 -0
- package/src/composables/useLatestDaily.ts +40 -0
- package/src/composables/useMarkdownDoc.ts +39 -0
- package/src/composables/useMarkdownLinkHandler.ts +1 -1
- package/src/composables/useMcpTools.ts +3 -16
- package/src/composables/useNotifications.ts +138 -112
- package/src/composables/usePdfDownload.ts +17 -3
- package/src/composables/usePendingCalls.ts +8 -26
- package/src/composables/usePluginErrorBoundary.ts +68 -0
- package/src/composables/usePubSub.ts +9 -17
- package/src/composables/useRunElapsed.ts +5 -22
- package/src/composables/useSandboxStatus.ts +4 -20
- package/src/composables/useSessionDerived.ts +7 -15
- package/src/composables/useSessionHistory.ts +70 -29
- package/src/composables/useSessionSync.ts +25 -3
- package/src/composables/useSkillsList.ts +59 -0
- package/src/composables/useTranslatedQueries.ts +109 -0
- package/src/config/apiRoutes.ts +181 -80
- package/src/config/historyFilters.ts +5 -3
- package/src/config/hostEvents.ts +17 -0
- package/src/config/mcpCatalog.ts +277 -5
- package/src/config/pubsubChannels.ts +134 -12
- package/src/config/roles.ts +212 -147
- package/src/config/systemFileDescriptors.ts +5 -5
- package/src/config/toolNames.ts +52 -30
- package/src/config/workspacePaths.ts +26 -2
- package/src/lang/de.ts +483 -27
- package/src/lang/en.ts +448 -27
- package/src/lang/es.ts +474 -27
- package/src/lang/fr.ts +476 -27
- package/src/lang/ja.ts +465 -27
- package/src/lang/ko.ts +466 -27
- package/src/lang/pt-BR.ts +473 -27
- package/src/lang/zh.ts +463 -27
- package/src/lib/vue-i18n.ts +1 -1
- package/src/lib/wiki-page/slug.ts +66 -0
- package/src/main.ts +85 -0
- package/src/plugins/_extras.ts +58 -0
- package/src/plugins/_generated/metas.ts +42 -0
- package/src/plugins/_generated/registrations.ts +44 -0
- package/src/plugins/_generated/server-bindings.ts +47 -0
- package/src/plugins/accounting/Preview.vue +106 -0
- package/src/plugins/accounting/View.vue +632 -0
- package/src/plugins/accounting/actions.ts +34 -0
- package/src/plugins/accounting/api.ts +301 -0
- package/src/plugins/accounting/components/AccountEditor.vue +250 -0
- package/src/plugins/accounting/components/AccountRow.vue +50 -0
- package/src/plugins/accounting/components/AccountsList.vue +102 -0
- package/src/plugins/accounting/components/AccountsModal.vue +300 -0
- package/src/plugins/accounting/components/BalanceSheet.vue +186 -0
- package/src/plugins/accounting/components/BookSettings.vue +284 -0
- package/src/plugins/accounting/components/BookSwitcher.vue +78 -0
- package/src/plugins/accounting/components/DateRangePicker.vue +140 -0
- package/src/plugins/accounting/components/JournalEntryForm.vue +504 -0
- package/src/plugins/accounting/components/JournalList.vue +553 -0
- package/src/plugins/accounting/components/Ledger.vue +206 -0
- package/src/plugins/accounting/components/NewBookForm.vue +211 -0
- package/src/plugins/accounting/components/OpeningBalancesForm.vue +271 -0
- package/src/plugins/accounting/components/ProfitLoss.vue +160 -0
- package/src/plugins/accounting/components/accountDraft.ts +13 -0
- package/src/plugins/accounting/components/accountNumbering.ts +103 -0
- package/src/plugins/accounting/components/accountValidation.ts +75 -0
- package/src/plugins/accounting/components/useLatestRequest.ts +44 -0
- package/src/plugins/accounting/countries.ts +158 -0
- package/src/plugins/accounting/currencies.ts +64 -0
- package/src/plugins/accounting/dates.ts +51 -0
- package/src/plugins/accounting/definition.ts +199 -0
- package/src/plugins/accounting/fiscalYear.ts +136 -0
- package/src/plugins/accounting/index.ts +49 -0
- package/src/plugins/accounting/meta.ts +91 -0
- package/src/plugins/accounting/timeSeriesEnums.ts +16 -0
- package/src/plugins/api.ts +125 -0
- package/src/plugins/canvas/View.vue +38 -28
- package/src/plugins/canvas/definition.ts +10 -8
- package/src/plugins/canvas/index.ts +15 -8
- package/src/plugins/canvas/meta.ts +12 -0
- package/src/plugins/chart/Preview.vue +1 -1
- package/src/plugins/chart/View.vue +2 -2
- package/src/plugins/chart/definition.ts +12 -2
- package/src/plugins/chart/index.ts +15 -7
- package/src/plugins/chart/meta.ts +18 -0
- package/src/plugins/editImages/definition.ts +44 -0
- package/src/plugins/editImages/index.ts +43 -0
- package/src/plugins/editImages/meta.ts +5 -0
- package/src/plugins/generateImage/View.vue +3 -1
- package/src/plugins/generateImage/definition.ts +2 -0
- package/src/plugins/generateImage/index.ts +13 -5
- package/src/plugins/generateImage/meta.ts +5 -0
- package/src/plugins/index.ts +35 -0
- package/src/plugins/manageRoles/Preview.vue +7 -4
- package/src/plugins/manageRoles/View.vue +12 -8
- package/src/plugins/manageRoles/definition.ts +6 -0
- package/src/plugins/manageRoles/index.ts +7 -6
- package/src/plugins/manageSkills/View.vue +11 -7
- package/src/plugins/manageSkills/definition.ts +4 -1
- package/src/plugins/manageSkills/index.ts +14 -7
- package/src/plugins/manageSkills/meta.ts +21 -0
- package/src/plugins/manageSource/definition.ts +4 -1
- package/src/plugins/manageSource/index.ts +15 -7
- package/src/plugins/manageSource/meta.ts +21 -0
- package/src/plugins/markdown/Preview.vue +10 -8
- package/src/plugins/markdown/View.vue +84 -17
- package/src/plugins/markdown/definition.ts +7 -1
- package/src/plugins/markdown/index.ts +15 -8
- package/src/plugins/markdown/meta.ts +16 -0
- package/src/plugins/meta-types.ts +97 -0
- package/src/plugins/metas.ts +224 -0
- package/src/plugins/presentForm/Preview.vue +4 -15
- package/src/plugins/presentForm/View.vue +35 -78
- package/src/plugins/presentForm/definition.ts +7 -6
- package/src/plugins/presentForm/index.ts +12 -5
- package/src/plugins/presentForm/meta.ts +11 -0
- package/src/plugins/presentForm/plugin.ts +8 -9
- package/src/plugins/presentForm/types.ts +0 -24
- package/src/plugins/presentHtml/Preview.vue +1 -8
- package/src/plugins/presentHtml/View.vue +401 -30
- package/src/plugins/presentHtml/definition.ts +8 -5
- package/src/plugins/presentHtml/index.ts +15 -8
- package/src/plugins/presentHtml/meta.ts +14 -0
- package/src/plugins/presentMulmoScript/View.vue +327 -107
- package/src/plugins/presentMulmoScript/definition.ts +34 -7
- package/src/plugins/presentMulmoScript/helpers.ts +4 -5
- package/src/plugins/presentMulmoScript/index.ts +20 -7
- package/src/plugins/presentMulmoScript/meta.ts +52 -0
- package/src/plugins/scheduler/AutomationsPreview.vue +2 -8
- package/src/plugins/scheduler/Preview.vue +5 -2
- package/src/plugins/scheduler/TasksTab.vue +16 -36
- package/src/plugins/scheduler/View.vue +22 -54
- package/src/plugins/scheduler/automationsDefinition.ts +14 -9
- package/src/plugins/scheduler/automationsMeta.ts +5 -0
- package/src/plugins/scheduler/calendarDefinition.ts +4 -7
- package/src/plugins/scheduler/calendarMeta.ts +28 -0
- package/src/plugins/scheduler/formatSchedule.ts +6 -24
- package/src/plugins/scheduler/index.ts +26 -52
- package/src/plugins/scope.ts +57 -0
- package/src/plugins/server-bindings-types.ts +38 -0
- package/src/plugins/server.ts +32 -0
- package/src/plugins/skill/Preview.vue +25 -0
- package/src/plugins/skill/View.vue +125 -0
- package/src/plugins/skill/definition.ts +23 -0
- package/src/plugins/skill/index.ts +36 -0
- package/src/plugins/skill/plugin.ts +31 -0
- package/src/plugins/skill/types.ts +21 -0
- package/src/plugins/spreadsheet/Preview.vue +1 -3
- package/src/plugins/spreadsheet/View.vue +29 -49
- package/src/plugins/spreadsheet/cellHighlights.ts +2 -3
- package/src/plugins/spreadsheet/definition.ts +5 -2
- package/src/plugins/spreadsheet/index.ts +15 -8
- package/src/plugins/spreadsheet/keyboardNav.ts +38 -0
- package/src/plugins/spreadsheet/meta.ts +14 -0
- package/src/plugins/textResponse/Preview.vue +9 -1
- package/src/plugins/textResponse/View.vue +59 -8
- package/src/plugins/textResponse/index.ts +11 -3
- package/src/plugins/textResponse/plugin.ts +8 -10
- package/src/plugins/textResponse/types.ts +28 -0
- package/src/plugins/wiki/Preview.vue +6 -4
- package/src/plugins/wiki/View.vue +463 -254
- package/src/plugins/wiki/components/WikiPageBody.vue +159 -0
- package/src/plugins/wiki/helpers.ts +17 -0
- package/src/plugins/wiki/history/HistoryDetail.vue +325 -0
- package/src/plugins/wiki/history/HistoryTab.vue +167 -0
- package/src/plugins/wiki/history/RestoreConfirm.vue +63 -0
- package/src/plugins/wiki/history/api.ts +52 -0
- package/src/plugins/wiki/history/diff.ts +145 -0
- package/src/plugins/wiki/index.ts +42 -32
- package/src/plugins/wiki/meta.ts +10 -0
- package/src/plugins/wiki/pageEditLoader.ts +53 -0
- package/src/plugins/wiki/route.ts +8 -0
- package/src/router/guards.ts +2 -1
- package/src/router/index.ts +19 -0
- package/src/router/pageRoutes.ts +1 -0
- package/src/tools/index.ts +50 -51
- package/src/tools/runtimeLoader.ts +141 -0
- package/src/tools/types.ts +44 -1
- package/src/types/notification.ts +23 -0
- package/src/types/pastedFile.ts +10 -0
- package/src/types/session.ts +61 -3
- package/src/types/sse.ts +21 -6
- package/src/utils/agent/eventDispatch.ts +12 -9
- package/src/utils/agent/pastedAttachment.ts +35 -0
- package/src/utils/agent/request.ts +32 -3
- package/src/utils/agent/toolCalls.ts +7 -1
- package/src/utils/api.ts +1 -1
- package/src/utils/chat/exportMarkdown.ts +243 -0
- package/src/utils/errors.ts +10 -2
- package/src/utils/files/expandedDirs.ts +1 -1
- package/src/utils/filesPreview/todoPreview.ts +13 -2
- package/src/utils/format/date.ts +1 -3
- package/src/utils/format/jsonSyntax.ts +5 -0
- package/src/utils/html/iframeHeightReporterScript.ts +62 -0
- package/src/utils/html/previewCsp.ts +29 -2
- package/src/utils/image/htmlSrcAttrs.ts +122 -0
- package/src/utils/image/imageRepairInlineScript.ts +115 -0
- package/src/utils/image/resolve.ts +17 -3
- package/src/utils/image/rewriteMarkdownImageRefs.ts +62 -9
- package/src/utils/markdown/frontmatter.ts +125 -0
- package/src/utils/markdown/taskList.ts +7 -2
- package/src/utils/plugin/runtime.ts +132 -0
- package/src/utils/session/mergeSessions.ts +40 -37
- package/src/utils/session/sessionEntries.ts +74 -18
- package/src/utils/session/sessionHelpers.ts +54 -10
- package/src/utils/tools/result.ts +76 -14
- package/src/vite-env.d.ts +6 -0
- package/client/assets/html2canvas-Cx501zZr-Bug0qRNv.js +0 -5
- package/client/assets/index-CY-WpQUm.css +0 -2
- package/client/assets/index-DbTz2Mfs.js +0 -4911
- package/client/assets/material-symbols-outlined-NzYEeyps.woff2 +0 -0
- package/server/api/routes/html.ts +0 -114
- package/server/api/routes/todos.ts +0 -293
- package/server/api/routes/todosColumnsHandlers.ts +0 -333
- package/server/api/routes/todosHandlers.ts +0 -274
- package/server/api/routes/todosItemsHandlers.ts +0 -386
- package/server/utils/files/todos-io.ts +0 -29
- package/src/components/NotificationToast.vue +0 -75
- package/src/plugins/editImage/definition.ts +0 -27
- package/src/plugins/editImage/index.ts +0 -37
- package/src/plugins/presentHtml/helpers.ts +0 -72
- package/src/plugins/scheduler/LegacySchedulerView.vue +0 -32
- package/src/plugins/scheduler/legacyShape.ts +0 -34
- package/src/plugins/todo/Preview.vue +0 -68
- package/src/plugins/todo/View.vue +0 -378
- package/src/plugins/todo/composables/useTodos.ts +0 -179
- package/src/plugins/todo/definition.ts +0 -45
- package/src/plugins/todo/index.ts +0 -62
- package/src/plugins/todo/labels.ts +0 -163
- package/src/plugins/todo/priority.ts +0 -98
- package/src/plugins/todo/viewModes.ts +0 -19
- package/src/plugins/wiki/definition.ts +0 -25
- package/src/tools/legacyPluginNames.ts +0 -13
- package/src/utils/format/frontmatter.ts +0 -80
- package/src/utils/image/rewriteHtmlImageRefs.ts +0 -50
- package/src/utils/notification/dispatch.ts +0 -58
- /package/client/assets/{purify.es-Fx1Nqyry-BwJECkqS.js → purify.es-Fx1Nqyry-BSVNht6S.js} +0 -0
- /package/src/plugins/{editImage → editImages}/Preview.vue +0 -0
- /package/src/plugins/{editImage → editImages}/View.vue +0 -0
- /package/src/{config/schedulerActions.ts → plugins/scheduler/actions.ts} +0 -0
package/src/lang/zh.ts
CHANGED
|
@@ -38,11 +38,13 @@ const zhMessages = {
|
|
|
38
38
|
attachFile: "附加文件",
|
|
39
39
|
fileTooLarge: "文件过大({sizeMB} MB)。上限为 30 MB。",
|
|
40
40
|
unsupportedFileType: "不支持的文件类型。支持:图像、PDF、DOCX、XLSX、PPTX、文本文件。",
|
|
41
|
+
attachImageFailed: "附加图片失败:{error}",
|
|
41
42
|
},
|
|
42
43
|
sessionHistoryPanel: {
|
|
43
44
|
filters: {
|
|
44
45
|
all: "全部",
|
|
45
46
|
unread: "未读",
|
|
47
|
+
bookmarked: "已收藏",
|
|
46
48
|
human: "人工",
|
|
47
49
|
scheduler: "调度器",
|
|
48
50
|
skill: "技能",
|
|
@@ -55,18 +57,44 @@ const zhMessages = {
|
|
|
55
57
|
running: "运行中",
|
|
56
58
|
noMessages: "(无消息)",
|
|
57
59
|
openRowAria: "打开会话: {preview}",
|
|
60
|
+
rowMenuAria: "会话操作",
|
|
61
|
+
bookmark: "添加收藏",
|
|
62
|
+
unbookmark: "取消收藏",
|
|
63
|
+
delete: "删除",
|
|
64
|
+
deleteConfirm: "确定要删除该会话吗?\n\n{preview}\n\n此操作无法撤销。",
|
|
58
65
|
},
|
|
59
66
|
notificationBell: {
|
|
60
67
|
notifications: "通知",
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
activeSection: "进行中",
|
|
69
|
+
historySection: "历史",
|
|
70
|
+
noActive: "暂无活跃通知",
|
|
71
|
+
noHistory: "暂无近期记录",
|
|
72
|
+
clearAll: "全部清除",
|
|
63
73
|
dismiss: "关闭",
|
|
74
|
+
cancel: "取消",
|
|
75
|
+
},
|
|
76
|
+
pluginDiagnostics: {
|
|
77
|
+
title: "插件配置问题",
|
|
78
|
+
hostBody: '插件 "{plugin}" 尝试注册 {label} 键 "{key}",但该键由宿主保留。该插件条目已被丢弃。',
|
|
79
|
+
intraBody: '插件 "{first}" 和 "{second}" 都注册了 {dimension} "{key}"。"{first}" 先注册,因此 "{second}" 的注册被忽略。',
|
|
80
|
+
},
|
|
81
|
+
pluginErrorBoundary: {
|
|
82
|
+
title: "插件 {pkg} 已崩溃",
|
|
83
|
+
subtitle: "插件渲染失败。错误已记录到控制台。",
|
|
84
|
+
showDetails: "显示详情",
|
|
85
|
+
hideDetails: "隐藏详情",
|
|
86
|
+
retry: "重试",
|
|
64
87
|
},
|
|
65
88
|
sidebarHeader: {
|
|
66
89
|
home: "前往最新对话",
|
|
67
90
|
toolCallHistory: "工具调用历史",
|
|
68
91
|
settings: "设置",
|
|
69
92
|
settingsGeminiMissing: "设置 — 缺少 Gemini API 密钥",
|
|
93
|
+
todayJournal: "今日总结",
|
|
94
|
+
todayJournalNotFound: "暂无总结 — 多聊一会儿,journal 会自动生成。",
|
|
95
|
+
todayJournalLoadFailed: "加载 journal 失败 (status {status}): {error}",
|
|
96
|
+
copyMarkdown: "将对话复制为 Markdown",
|
|
97
|
+
copiedMarkdown: "已复制",
|
|
70
98
|
},
|
|
71
99
|
rightSidebar: {
|
|
72
100
|
toggleSystemPrompt: "切换系统提示词",
|
|
@@ -203,6 +231,105 @@ const zhMessages = {
|
|
|
203
231
|
pdfPreview: "PDF 预览",
|
|
204
232
|
parseError: "解析错误",
|
|
205
233
|
},
|
|
234
|
+
filesView: {
|
|
235
|
+
chatPlaceholder: "询问关于此文件的问题…",
|
|
236
|
+
},
|
|
237
|
+
systemFiles: {
|
|
238
|
+
schemaLabel: "架构",
|
|
239
|
+
showDetails: "显示详情",
|
|
240
|
+
hideDetails: "隐藏详情",
|
|
241
|
+
editPolicy: {
|
|
242
|
+
"agent-managed-but-hand-editable": "代理管理(可手动编辑)",
|
|
243
|
+
"user-editable": "用户可编辑",
|
|
244
|
+
"agent-managed": "代理管理",
|
|
245
|
+
"fragile-format": "脆弱格式",
|
|
246
|
+
ephemeral: "临时文件",
|
|
247
|
+
},
|
|
248
|
+
interests: {
|
|
249
|
+
title: "Interests 配置",
|
|
250
|
+
summary: "新闻 / 信息源管线监控并打分的话题。可手动编辑,代理也会从对话中自动更新。",
|
|
251
|
+
},
|
|
252
|
+
mcp: {
|
|
253
|
+
title: "MCP 服务器",
|
|
254
|
+
summary: "附加到代理的外部 Model Context Protocol 服务器。添加 HTTP 或 stdio 服务器以扩展代理工具。",
|
|
255
|
+
},
|
|
256
|
+
settings: {
|
|
257
|
+
title: "应用设置",
|
|
258
|
+
summary: "用户可编辑的行为偏好 — Gemini API 密钥、允许的工具、沙箱配置等。",
|
|
259
|
+
},
|
|
260
|
+
schedulerTasks: {
|
|
261
|
+
title: "调度器任务",
|
|
262
|
+
summary: "按计划触发的定期代理自动化。通过 Automations UI 管理,本文件是磁盘上的权威来源。",
|
|
263
|
+
},
|
|
264
|
+
schedulerOverrides: {
|
|
265
|
+
title: "调度器覆盖",
|
|
266
|
+
summary: "在系统调度之上叠加的每任务时间 / 间隔覆盖。当你要求修改某个定期任务的时间时,代理会写入此文件。",
|
|
267
|
+
},
|
|
268
|
+
newsReadState: {
|
|
269
|
+
title: "新闻已读状态",
|
|
270
|
+
summary: "本地仅记录的已读追踪。临时文件 — 删除后阅读时会重新生成。",
|
|
271
|
+
},
|
|
272
|
+
schedulerItems: {
|
|
273
|
+
title: "调度器条目队列",
|
|
274
|
+
summary: "等待触发的预定调用队列。代理管理;除非你清楚每个字段的含义,否则不要手动编辑。",
|
|
275
|
+
},
|
|
276
|
+
todosItems: {
|
|
277
|
+
title: "待办事项",
|
|
278
|
+
summary: "看板各列中的所有任务。当你说「添加待办」时代理会写入此文件,也可以手动编辑。",
|
|
279
|
+
},
|
|
280
|
+
todosColumns: {
|
|
281
|
+
title: "待办列定义",
|
|
282
|
+
summary: "看板的列布局(标题、顺序、ID)。用户可编辑 — 可自由重命名或重排。",
|
|
283
|
+
},
|
|
284
|
+
wikiIndex: {
|
|
285
|
+
title: "Wiki 索引",
|
|
286
|
+
summary: "所有 Wiki 页面的自动生成索引。每次 Wiki 编辑后刷新;请勿手动编辑(更改会被覆盖)。",
|
|
287
|
+
},
|
|
288
|
+
wikiLog: {
|
|
289
|
+
title: "Wiki 编辑日志",
|
|
290
|
+
summary: "Wiki 页面创建与编辑的活动日志。代理管理且仅追加;适合作为最近变更动态。",
|
|
291
|
+
},
|
|
292
|
+
wikiSummary: {
|
|
293
|
+
title: "Wiki 总览",
|
|
294
|
+
summary: "Wiki 的自动生成概览 — 主题聚类、页面数量、近期活动。由代理刷新。",
|
|
295
|
+
},
|
|
296
|
+
wikiSchema: {
|
|
297
|
+
title: "Wiki 架构",
|
|
298
|
+
summary: "代理用于保持 Wiki 页面一致性的格式规范。脆弱 — 代理期望特定结构,建议交由代理编辑。",
|
|
299
|
+
},
|
|
300
|
+
memory: {
|
|
301
|
+
title: "记忆",
|
|
302
|
+
summary: "关于你的精炼事实,作为新对话的上下文始终加载。journal 提取器会自动追加,也可手动编辑。",
|
|
303
|
+
},
|
|
304
|
+
summariesIndex: {
|
|
305
|
+
title: "总结索引",
|
|
306
|
+
summary: "可浏览的索引,链接 journal 生成的日次与主题总结。代理管理;每次 journal 运行时刷新。",
|
|
307
|
+
},
|
|
308
|
+
rolesJson: {
|
|
309
|
+
title: "角色定义 (JSON)",
|
|
310
|
+
summary: "角色配置 — 模型选择、MCP 服务器、允许的插件、查询建议。用户可编辑,无需重启。",
|
|
311
|
+
},
|
|
312
|
+
rolesMd: {
|
|
313
|
+
title: "角色描述 (Markdown)",
|
|
314
|
+
summary: "角色的人设与系统提示正文,激活该角色时作为上下文加载。用户可编辑,下一条消息生效。",
|
|
315
|
+
},
|
|
316
|
+
sourceFeed: {
|
|
317
|
+
title: "信息源订阅",
|
|
318
|
+
summary: "一个订阅的信息源(RSS、GitHub 发布 / Issue、arXiv 等)。用户可编辑;信息源管线按计划轮询。",
|
|
319
|
+
},
|
|
320
|
+
sourceState: {
|
|
321
|
+
title: "信息源状态",
|
|
322
|
+
summary: "单个信息源的临时管线状态 — 已见 ID、ETag、抓取错误等。可删除 — 下次运行时会重新生成。",
|
|
323
|
+
},
|
|
324
|
+
journalDaily: {
|
|
325
|
+
title: "日次 journal 总结",
|
|
326
|
+
summary: "由 journal 流程从聊天会话中提炼出的当日活动自动生成回顾。",
|
|
327
|
+
},
|
|
328
|
+
journalTopic: {
|
|
329
|
+
title: "主题 journal",
|
|
330
|
+
summary: "围绕某个特定主题的长期笔记,随该主题的持续讨论而累积和修订。代理管理。",
|
|
331
|
+
},
|
|
332
|
+
},
|
|
206
333
|
settingsMcpTab: {
|
|
207
334
|
explanation:
|
|
208
335
|
"添加外部 MCP 服务器。HTTP 服务器在所有模式下都可用。Stdio 服务器使用沙箱镜像中的 {npx} / {node} / {tsx};启用 Docker 时,路径必须位于工作区内。",
|
|
@@ -287,10 +414,79 @@ const zhMessages = {
|
|
|
287
414
|
},
|
|
288
415
|
},
|
|
289
416
|
},
|
|
417
|
+
appleNative: {
|
|
418
|
+
displayName: "Apple 原生应用(macOS)",
|
|
419
|
+
description: "通过 AppleScript 读写 提醒事项 / 日历 / 备忘录 / 邮件 / 地图。仅限 macOS — 无需凭证。",
|
|
420
|
+
},
|
|
421
|
+
gmail: {
|
|
422
|
+
displayName: "Gmail",
|
|
423
|
+
description: "读取、发送和标记 Gmail 邮件。使用您自己 Google Cloud 项目中创建的 OAuth 客户端(无需应用审核)。",
|
|
424
|
+
field: {
|
|
425
|
+
credentials: {
|
|
426
|
+
label: "credentials.json 路径",
|
|
427
|
+
help: "Google Cloud Console → APIs & Services → Credentials → OAuth 客户端 ID(Desktop app)。下载 credentials.json 并粘贴其绝对路径。",
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
googleCalendar: {
|
|
432
|
+
displayName: "Google 日历",
|
|
433
|
+
description: "读取和创建 Google 日历事件。与 Gmail 相同的 BYO credentials.json 模式。",
|
|
434
|
+
field: {
|
|
435
|
+
credentials: {
|
|
436
|
+
label: "credentials.json 路径",
|
|
437
|
+
help: "可复用与 Gmail 相同的 Google Cloud OAuth 客户端,或单独创建一个仅供 Calendar 使用的客户端。",
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
googleDrive: {
|
|
442
|
+
displayName: "Google 云端硬盘",
|
|
443
|
+
description: "搜索和读取 Google 云端硬盘文件。BYO Google OAuth 凭证 — 令牌缓存在本地凭证文件旁。",
|
|
444
|
+
field: {
|
|
445
|
+
credentials: {
|
|
446
|
+
label: "credentials.json 路径",
|
|
447
|
+
help: "Google Cloud Console → APIs & Services → Credentials → OAuth 客户端 ID(Desktop app)。在同一项目中启用 Google Drive API。",
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
github: {
|
|
452
|
+
displayName: "GitHub",
|
|
453
|
+
description:
|
|
454
|
+
"通过 Personal Access Token 读取仓库 / Issues / PRs 并执行搜索。请窄化 token 权限 — 写权限(如 `repo`)允许 agent 推送到任何可访问的仓库。",
|
|
455
|
+
field: {
|
|
456
|
+
token: {
|
|
457
|
+
label: "Personal Access Token",
|
|
458
|
+
help: "GitHub → Settings → Developer settings → Personal access tokens。建议使用 fine-grained token 仅限于希望 agent 操作的仓库。",
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
linear: {
|
|
463
|
+
displayName: "Linear",
|
|
464
|
+
description: "通过 Personal API key 读写 Linear 的 Issue / 项目 / 周期。",
|
|
465
|
+
field: {
|
|
466
|
+
apiKey: {
|
|
467
|
+
label: "Linear API 密钥",
|
|
468
|
+
help: "Linear → Settings → API → Personal API keys。点击 🔑 打开页面并点击 Create key。",
|
|
469
|
+
},
|
|
470
|
+
},
|
|
471
|
+
},
|
|
290
472
|
weatherOpenMeteo: {
|
|
291
473
|
displayName: "天气(Open-Meteo)",
|
|
292
474
|
description: "全球免费天气预报和当前气象 — 无需 API 密钥。",
|
|
293
475
|
},
|
|
476
|
+
spotify: {
|
|
477
|
+
displayName: "Spotify",
|
|
478
|
+
description: "搜索曲目、管理播放列表、控制播放。BYO Spotify 开发者应用 — 仅需 Client ID(PKCE 流程,不需要 Client Secret)。",
|
|
479
|
+
field: {
|
|
480
|
+
clientId: {
|
|
481
|
+
label: "Client ID",
|
|
482
|
+
help: "Spotify Developer Dashboard → Create app,将 Redirect URI 设为 http://127.0.0.1:8888/callback,复制 Client ID。然后在终端运行一次 `SPOTIFY_CLIENT_ID=<id> npx spotify-mcp@latest auth` 登录(刷新令牌缓存在 ~/.spotify-mcp/tokens.json)。",
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
},
|
|
486
|
+
youtubeTranscript: {
|
|
487
|
+
displayName: "YouTube 字幕",
|
|
488
|
+
description: "通过 URL 获取任意公开 YouTube 视频的字幕。无需凭证。",
|
|
489
|
+
},
|
|
294
490
|
},
|
|
295
491
|
config: {
|
|
296
492
|
howToGet: "获取方式",
|
|
@@ -352,6 +548,8 @@ const zhMessages = {
|
|
|
352
548
|
redo: "重做",
|
|
353
549
|
clear: "清除",
|
|
354
550
|
styleLabel: "样式:",
|
|
551
|
+
stylePromptWithPath: "将 `{path}` 处的图像转换为 {style} 风格的图像。",
|
|
552
|
+
stylePromptNoPath: "将我在画布上的绘图转换为 {style} 风格的图像。",
|
|
355
553
|
},
|
|
356
554
|
pluginChart: {
|
|
357
555
|
untitled: "图表",
|
|
@@ -359,20 +557,220 @@ const zhMessages = {
|
|
|
359
557
|
chartTitle: "图表 {num}",
|
|
360
558
|
png: "PNG",
|
|
361
559
|
},
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
560
|
+
pluginAccounting: {
|
|
561
|
+
title: "会计",
|
|
562
|
+
noBook: '尚无账簿 — 点击上方 "+ 新建账簿" 创建第一个。',
|
|
563
|
+
common: {
|
|
564
|
+
cancel: "取消",
|
|
565
|
+
loading: "加载中…",
|
|
566
|
+
error: "错误: {error}",
|
|
567
|
+
empty: "尚无条目。",
|
|
568
|
+
},
|
|
569
|
+
tabs: {
|
|
570
|
+
journal: "日记账",
|
|
571
|
+
newEntry: "新建分录",
|
|
572
|
+
opening: "期初余额",
|
|
573
|
+
accounts: "科目",
|
|
574
|
+
ledger: "明细账",
|
|
575
|
+
balanceSheet: "资产负债表",
|
|
576
|
+
profitLoss: "损益",
|
|
577
|
+
settings: "设置",
|
|
578
|
+
},
|
|
579
|
+
bookSwitcher: {
|
|
580
|
+
label: "账簿",
|
|
581
|
+
newBook: "新建账簿…",
|
|
582
|
+
create: "创建",
|
|
583
|
+
nameLabel: "名称",
|
|
584
|
+
currencyLabel: "货币",
|
|
585
|
+
countryLabel: "国家/地区",
|
|
586
|
+
countryPlaceholder: "选择国家/地区…",
|
|
587
|
+
countryHint: "国家/地区决定税务管辖,助手可据此提供本地化建议(日本T号、欧盟VAT ID等)。",
|
|
588
|
+
fiscalYearEndLabel: "财年结束日",
|
|
589
|
+
fiscalYearEndQ1: "3月31日 (Q1)",
|
|
590
|
+
fiscalYearEndQ2: "6月30日 (Q2)",
|
|
591
|
+
fiscalYearEndQ3: "9月30日 (Q3)",
|
|
592
|
+
fiscalYearEndQ4: "12月31日 (Q4)",
|
|
593
|
+
fiscalYearEndHint: "决定本账簿日期范围快捷方式所使用的财年边界。默认 12月31日(Q4 — 自然年)。",
|
|
594
|
+
placeholder: "选择账簿…",
|
|
595
|
+
firstRunHint: "请为第一本账簿选择名称、货币、国家/地区与财年结束日。货币按账簿固定,登账后再更改会比较困难。",
|
|
596
|
+
},
|
|
597
|
+
deletedNotice: {
|
|
598
|
+
title: "“{bookName}” 已删除。",
|
|
599
|
+
body: "请从上方下拉菜单选择其他账簿,或新建一本。",
|
|
600
|
+
},
|
|
601
|
+
journalList: {
|
|
602
|
+
fromLabel: "起始",
|
|
603
|
+
toLabel: "结束",
|
|
604
|
+
accountLabel: "科目",
|
|
605
|
+
allAccounts: "所有科目",
|
|
606
|
+
void: "冲销",
|
|
607
|
+
edit: "编辑",
|
|
608
|
+
voidConfirm: "冲销此分录?原始分录保留在日记账中,会追加一对反向分录。",
|
|
609
|
+
voidReason: "原因(可选):",
|
|
610
|
+
columns: {
|
|
611
|
+
date: "日期",
|
|
612
|
+
kind: "类型",
|
|
613
|
+
memo: "备注",
|
|
614
|
+
lines: "明细",
|
|
615
|
+
},
|
|
616
|
+
kind: {
|
|
617
|
+
normal: "—",
|
|
618
|
+
opening: "期初",
|
|
619
|
+
void: "反向",
|
|
620
|
+
voidMarker: "冲销标记",
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
entryForm: {
|
|
624
|
+
title: "新建分录",
|
|
625
|
+
editTitle: "编辑分录",
|
|
626
|
+
editBanner: "提交后,原分录将被冲销并以此内容替换。",
|
|
627
|
+
dateLabel: "日期",
|
|
628
|
+
memoLabel: "备注",
|
|
629
|
+
accountLabel: "科目",
|
|
630
|
+
debitLabel: "借方",
|
|
631
|
+
creditLabel: "贷方",
|
|
632
|
+
taxRegistrationIdLabel: "税务登记号",
|
|
633
|
+
taxRegistrationIdPlaceholder: "T-number / VAT ID / GSTIN…",
|
|
634
|
+
taxRegistrationIdMissingWarning: "必填",
|
|
635
|
+
addLine: "添加行",
|
|
636
|
+
removeLine: "删除",
|
|
637
|
+
submit: "登账",
|
|
638
|
+
submitting: "登账中…",
|
|
639
|
+
update: "更新",
|
|
640
|
+
updating: "更新中…",
|
|
641
|
+
cancelEdit: "取消",
|
|
642
|
+
success: "已登账。",
|
|
643
|
+
editSuccess: "分录已更新。",
|
|
644
|
+
editVoidReason: "已编辑",
|
|
645
|
+
imbalance: "差额: {amount}",
|
|
646
|
+
balanced: "已平衡 ✓",
|
|
647
|
+
},
|
|
648
|
+
openingForm: {
|
|
649
|
+
title: "期初余额",
|
|
650
|
+
asOfLabel: "基准日",
|
|
651
|
+
explainer: "仅允许 B/S 科目(资产 / 负债 / 权益)。Σ借方=Σ贷方,差额会落入 Retained Earnings。",
|
|
652
|
+
emptyHint: "可以全部留空保存——期初余额稍后再更新。账簿只需先存在一条期初记录,其他标签页才会解锁。",
|
|
653
|
+
explainer2: "仅 B/S 科目。",
|
|
654
|
+
submit: "保存期初余额",
|
|
655
|
+
replaceWarning: "保存会替换现有期初余额(旧的会在日记账中冲销)。",
|
|
656
|
+
none: "尚未设置期初余额。",
|
|
657
|
+
setBy: "{date} 已设置",
|
|
658
|
+
success: "期初余额已保存。",
|
|
659
|
+
},
|
|
660
|
+
ledger: {
|
|
661
|
+
selectAccount: "选择科目",
|
|
662
|
+
closingBalance: "期末余额",
|
|
663
|
+
columns: {
|
|
664
|
+
date: "日期",
|
|
665
|
+
memo: "备注",
|
|
666
|
+
debit: "借方",
|
|
667
|
+
credit: "贷方",
|
|
668
|
+
balance: "余额",
|
|
669
|
+
taxRegistrationId: "税务登记号",
|
|
670
|
+
},
|
|
671
|
+
},
|
|
672
|
+
dateRange: {
|
|
673
|
+
shortcutLabel: "范围",
|
|
674
|
+
currentQuarter: "本季度",
|
|
675
|
+
previousQuarter: "上季度",
|
|
676
|
+
currentYear: "本年度",
|
|
677
|
+
previousYear: "上年度",
|
|
678
|
+
lifetime: "自开账以来",
|
|
679
|
+
all: "全部",
|
|
680
|
+
fromLabel: "起始",
|
|
681
|
+
toLabel: "结束",
|
|
682
|
+
},
|
|
683
|
+
balanceSheet: {
|
|
684
|
+
asOfLabel: "期间",
|
|
685
|
+
sections: {
|
|
686
|
+
asset: "资产",
|
|
687
|
+
liability: "负债",
|
|
688
|
+
equity: "权益",
|
|
689
|
+
},
|
|
690
|
+
total: "合计",
|
|
691
|
+
imbalance: "差额: {amount}",
|
|
692
|
+
currentEarnings: "当期净损益",
|
|
693
|
+
shortcutLabel: "快捷方式",
|
|
694
|
+
thisMonth: "本月",
|
|
695
|
+
lastMonth: "上月",
|
|
696
|
+
lastQuarter: "上季度",
|
|
697
|
+
lastYear: "上年",
|
|
698
|
+
},
|
|
699
|
+
profitLoss: {
|
|
700
|
+
fromLabel: "起始",
|
|
701
|
+
toLabel: "结束",
|
|
702
|
+
income: "收入",
|
|
703
|
+
expense: "支出",
|
|
704
|
+
netIncome: "净利润:",
|
|
705
|
+
},
|
|
706
|
+
accounts: {
|
|
707
|
+
listEmpty: "此分类下暂无科目。",
|
|
708
|
+
openLedgerAria: "打开 {code} {name} 的明细账",
|
|
709
|
+
manageButton: "管理科目",
|
|
710
|
+
modalTitle: "管理科目",
|
|
711
|
+
addAccount: "添加科目",
|
|
712
|
+
sectionTitle: {
|
|
713
|
+
asset: "资产",
|
|
714
|
+
liability: "负债",
|
|
715
|
+
equity: "权益",
|
|
716
|
+
income: "收入",
|
|
717
|
+
expense: "费用",
|
|
718
|
+
},
|
|
719
|
+
columnCode: "代码",
|
|
720
|
+
columnName: "名称",
|
|
721
|
+
columnType: "类型",
|
|
722
|
+
columnNote: "备注",
|
|
723
|
+
typeOption: {
|
|
724
|
+
asset: "资产",
|
|
725
|
+
liability: "负债",
|
|
726
|
+
equity: "权益",
|
|
727
|
+
income: "收入",
|
|
728
|
+
expense: "费用",
|
|
729
|
+
},
|
|
730
|
+
edit: "编辑",
|
|
731
|
+
save: "保存",
|
|
732
|
+
cancel: "取消",
|
|
733
|
+
saving: "保存中…",
|
|
734
|
+
addToCategory: "添加{type}",
|
|
735
|
+
deactivate: "停用",
|
|
736
|
+
reactivate: "启用",
|
|
737
|
+
deactivateConfirm: "在分录/明细账下拉框中隐藏“{name}”?现有日记账分录不受影响。",
|
|
738
|
+
errorEmptyCode: "代码不能为空。",
|
|
739
|
+
errorReservedCode: "以 “_” 开头的代码保留给系统行使用。",
|
|
740
|
+
errorInvalidCodeFormat: "科目代码必须为 4 位数字。",
|
|
741
|
+
errorCodeTypeMismatch: "代码首位必须与科目类型匹配:1xxx 资产,2xxx 负债,3xxx 权益,4xxx 收入,5xxx 费用。",
|
|
742
|
+
errorEmptyName: "名称不能为空。",
|
|
743
|
+
errorDuplicateCode: "此代码的科目已存在。",
|
|
744
|
+
errorDuplicateName: "此名称的科目已存在。",
|
|
745
|
+
success: "科目已保存。",
|
|
746
|
+
codeReadOnlyHint: "科目创建后代码不能更改。",
|
|
747
|
+
noteOptional: "(可选)",
|
|
748
|
+
},
|
|
749
|
+
settings: {
|
|
750
|
+
bookInfo: "账簿信息",
|
|
751
|
+
bookInfoExplain: "修改国家/地区可更新税务管辖相关建议。开始登账后货币不可更改。",
|
|
752
|
+
countryUnset: "(未设置)",
|
|
753
|
+
fiscalYearEndExplain: "仅影响今后日期范围快捷方式的解析方式;现有日记账分录不会移动。",
|
|
754
|
+
saveChanges: "保存更改",
|
|
755
|
+
updateOk: "账簿已更新。",
|
|
756
|
+
rebuild: "重建快照",
|
|
757
|
+
rebuildExplain: "删除全部月度快照缓存并从日记账重新计算。手动编辑日记账后可用。",
|
|
758
|
+
rebuildOk: "已重建 {count} 期。",
|
|
759
|
+
advanced: "高级设置…",
|
|
760
|
+
deleteBook: "删除账簿",
|
|
761
|
+
deleteBookExplain: "永久删除该账簿目录。无法撤销。",
|
|
762
|
+
deleteBookConfirm: '请输入 "{bookName}" 以确认:',
|
|
763
|
+
deleteBookButton: "彻底删除",
|
|
764
|
+
},
|
|
765
|
+
preview: {
|
|
766
|
+
entry: "已记账 {date} 的分录",
|
|
767
|
+
pl: "P&L {from} → {to}: 净额 {net}",
|
|
768
|
+
bs: "{date} 资产负债表 · 资产 {assets}",
|
|
769
|
+
bookCreated: '已创建账簿 "{name}" ({id})',
|
|
770
|
+
},
|
|
771
|
+
previewSummary: "会计 · {bookId}",
|
|
772
|
+
previewError: "会计: {error}",
|
|
773
|
+
previewGeneric: "会计结果",
|
|
376
774
|
},
|
|
377
775
|
todoExplorer: {
|
|
378
776
|
heading: "待办",
|
|
@@ -389,14 +787,6 @@ const zhMessages = {
|
|
|
389
787
|
newColumnPlaceholder: "Review",
|
|
390
788
|
noMatchingFilter: "没有项目匹配当前筛选",
|
|
391
789
|
},
|
|
392
|
-
todoPreview: {
|
|
393
|
-
completedRatio: "{done}/{total} 已完成",
|
|
394
|
-
moreItems: "+ 还有 {count} 项…",
|
|
395
|
-
headerIcon: "☑",
|
|
396
|
-
doneIcon: "✓",
|
|
397
|
-
pendingIcon: "○",
|
|
398
|
-
moreLabels: "+{count}",
|
|
399
|
-
},
|
|
400
790
|
todoDialogs: {
|
|
401
791
|
addTitle: "添加待办",
|
|
402
792
|
editTitle: "编辑待办",
|
|
@@ -426,6 +816,7 @@ const zhMessages = {
|
|
|
426
816
|
noMatchingFilter: "没有项目匹配当前筛选",
|
|
427
817
|
sortColumnAria: "按 {column} 排序",
|
|
428
818
|
expandRowAria: "展开任务: {task}",
|
|
819
|
+
deleteItem: "删除项目",
|
|
429
820
|
},
|
|
430
821
|
pluginWiki: {
|
|
431
822
|
backToIndex: "返回目录",
|
|
@@ -445,6 +836,35 @@ const zhMessages = {
|
|
|
445
836
|
noMatches: "没有带 #{tag} 标签的页面",
|
|
446
837
|
lintChat: "检查 Wiki",
|
|
447
838
|
taskCountMismatch: "Wiki 源与渲染输出的任务数不一致,为避免文件损坏,已拒绝切换。",
|
|
839
|
+
metadataCreated: "创建",
|
|
840
|
+
metadataUpdated: "更新",
|
|
841
|
+
metadataEditor: "编辑者",
|
|
842
|
+
pageEditHeader: "Wiki 编辑",
|
|
843
|
+
snapshotExpired: "快照已过期 — 显示当前页面",
|
|
844
|
+
pageDeleted: "页面已删除",
|
|
845
|
+
history: {
|
|
846
|
+
tabContent: "正文",
|
|
847
|
+
tabHistory: "历史",
|
|
848
|
+
empty: "暂无历史记录 — 编辑此页面后,第一个版本将记录在此。",
|
|
849
|
+
loading: "正在加载历史…",
|
|
850
|
+
backToList: "返回历史列表",
|
|
851
|
+
restoreButton: "恢复此版本",
|
|
852
|
+
restoreConfirmTitle: "恢复此版本?",
|
|
853
|
+
restoreConfirmBody: "将页面恢复为 {editor} 于 {ts} 保存的版本。当前页面将被替换,但现有历史将保留。",
|
|
854
|
+
restoreConfirmAction: "恢复",
|
|
855
|
+
restoreConfirmCancel: "取消",
|
|
856
|
+
restoreSuccessToast: "页面已恢复。",
|
|
857
|
+
restoreFailureBanner: "恢复失败: {error}",
|
|
858
|
+
compareCurrent: "与当前页面比较",
|
|
859
|
+
comparePrevious: "与上一版本比较",
|
|
860
|
+
diffNoPrevious: "没有可比较的上一版本。",
|
|
861
|
+
diffNoChanges: "此版本与比较对象之间没有内容差异。",
|
|
862
|
+
editorBadgeUser: "用户",
|
|
863
|
+
editorBadgeLLM: "LLM",
|
|
864
|
+
editorBadgeSystem: "系统",
|
|
865
|
+
hiddenLines: "已隐藏 {count} 行未变更内容",
|
|
866
|
+
expandHidden: "显示",
|
|
867
|
+
},
|
|
448
868
|
},
|
|
449
869
|
pluginPresentForm: {
|
|
450
870
|
fallbackTitle: "表单",
|
|
@@ -462,8 +882,13 @@ const zhMessages = {
|
|
|
462
882
|
saveAsPdf: "另存为 PDF(打开打印对话框)",
|
|
463
883
|
pdf: "PDF",
|
|
464
884
|
untitled: "HTML 页面",
|
|
465
|
-
|
|
466
|
-
|
|
885
|
+
editSource: "编辑 HTML 源代码",
|
|
886
|
+
cancel: "取消",
|
|
887
|
+
applyChanges: "应用更改",
|
|
888
|
+
saving: "保存中...",
|
|
889
|
+
saveError: "⚠ 保存失败:{error}",
|
|
890
|
+
loadingSource: "正在加载源代码…",
|
|
891
|
+
sourceError: "加载源代码失败:{error}",
|
|
467
892
|
},
|
|
468
893
|
pluginNews: {
|
|
469
894
|
title: "新闻",
|
|
@@ -580,7 +1005,6 @@ const zhMessages = {
|
|
|
580
1005
|
pluginManageRoles: {
|
|
581
1006
|
heading: "自定义角色",
|
|
582
1007
|
roleCount: "{count} 个角色",
|
|
583
|
-
previewCount: "{count} 个自定义角色",
|
|
584
1008
|
addButton: "+ 添加",
|
|
585
1009
|
createPanel: "创建新角色",
|
|
586
1010
|
fieldId: "ID",
|
|
@@ -629,6 +1053,8 @@ const zhMessages = {
|
|
|
629
1053
|
gen: "生成",
|
|
630
1054
|
play: "▶ 播放",
|
|
631
1055
|
stop: "■ 停止",
|
|
1056
|
+
playPresentation: "播放演示",
|
|
1057
|
+
regenerateMovie: "重新生成视频",
|
|
632
1058
|
errPrefix: "⚠ 错误",
|
|
633
1059
|
noBeats: "脚本中没有找到 beat",
|
|
634
1060
|
editSource: "编辑脚本源",
|
|
@@ -665,6 +1091,11 @@ const zhMessages = {
|
|
|
665
1091
|
copyLabel: "复制",
|
|
666
1092
|
copiedLabel: "已复制!",
|
|
667
1093
|
cancel: "取消",
|
|
1094
|
+
seededByPlugin: "来自 {pkg}",
|
|
1095
|
+
seededByPluginTooltip: "此消息由 {pkg} 插件生成,并非您发送。",
|
|
1096
|
+
},
|
|
1097
|
+
pluginSkill: {
|
|
1098
|
+
noDescription: "(无描述)",
|
|
668
1099
|
},
|
|
669
1100
|
pluginSpreadsheet: {
|
|
670
1101
|
previewUntitled: "电子表格",
|
|
@@ -692,6 +1123,11 @@ const zhMessages = {
|
|
|
692
1123
|
},
|
|
693
1124
|
suggestionsPanel: {
|
|
694
1125
|
suggestions: "建议",
|
|
1126
|
+
skills: "技能",
|
|
1127
|
+
tooltip: "建议和技能",
|
|
1128
|
+
emptySuggestions: "没有建议。",
|
|
1129
|
+
emptySkills: "未安装任何技能。",
|
|
1130
|
+
skillsError: "加载技能失败:{error}",
|
|
695
1131
|
sendEditHint: "点击发送 · shift+点击可编辑",
|
|
696
1132
|
},
|
|
697
1133
|
settingsToolsTab: {
|
package/src/lib/vue-i18n.ts
CHANGED
|
@@ -51,7 +51,7 @@ function primarySubtagIfSupported(tag: string): Locale | null {
|
|
|
51
51
|
for (const supported of SUPPORTED_LOCALES) {
|
|
52
52
|
if (supported.toLowerCase() === lower) return supported;
|
|
53
53
|
}
|
|
54
|
-
const primary = lower.split("-")
|
|
54
|
+
const [primary] = lower.split("-");
|
|
55
55
|
return isSupported(primary) ? primary : null;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Shared wiki-page slug logic — pure functions reused by:
|
|
2
|
+
//
|
|
3
|
+
// - server/workspace/wiki-pages/io.ts (the write chokepoint)
|
|
4
|
+
// - server/workspace/wiki-history/hook/snapshot.ts (the
|
|
5
|
+
// PostToolUse hook script that detects LLM Write/Edit on a
|
|
6
|
+
// wiki page and triggers a snapshot)
|
|
7
|
+
//
|
|
8
|
+
// Both call sites need the same answer: "given this absolute
|
|
9
|
+
// path and the pages directory, is it a wiki page, and if so
|
|
10
|
+
// what slug?". Before the extraction the hook re-implemented
|
|
11
|
+
// the rules as a JS-as-string template literal that drifted
|
|
12
|
+
// from the server-side logic — see #951's discussion of how to
|
|
13
|
+
// stop copying #lint logic between hook and server.
|
|
14
|
+
//
|
|
15
|
+
// Only `node:path` is allowed here so esbuild can bundle this
|
|
16
|
+
// file into the hook script (no Node-specific server-side
|
|
17
|
+
// imports leak into the bundle).
|
|
18
|
+
|
|
19
|
+
import path from "node:path";
|
|
20
|
+
|
|
21
|
+
/** Reject slugs that would escape `data/wiki/pages/` once
|
|
22
|
+
* joined back into a path, or that are otherwise invalid as
|
|
23
|
+
* page filenames. The chokepoint must defend itself even when
|
|
24
|
+
* callers derive the slug from a trusted source — a typo or
|
|
25
|
+
* future caller mistake should fail loud, not silently write
|
|
26
|
+
* outside the wiki tree.
|
|
27
|
+
*
|
|
28
|
+
* The rule is intentionally narrow — separators / `..` / NUL /
|
|
29
|
+
* empty — so it only rejects unambiguous violations. Aesthetic
|
|
30
|
+
* concerns (e.g. dot-prefixed filenames) are out of scope: a
|
|
31
|
+
* pre-existing `data/wiki/pages/.foo.md` should remain writable
|
|
32
|
+
* through the chokepoint (codex review iter-2 #883). */
|
|
33
|
+
export function isSafeSlug(slug: string): boolean {
|
|
34
|
+
if (slug.length === 0) return false;
|
|
35
|
+
if (slug === "." || slug === "..") return false;
|
|
36
|
+
if (slug.includes("/") || slug.includes("\\")) return false;
|
|
37
|
+
if (slug.includes("\0")) return false;
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Given an absolute path and the absolute `pagesDir`, return the
|
|
42
|
+
* slug if `absPath` is a direct `.md` child of `pagesDir`, else
|
|
43
|
+
* null. Pure path-string math — no fs IO, no symlink resolution.
|
|
44
|
+
*
|
|
45
|
+
* Caller responsibility: pass already-realpath'd values for both
|
|
46
|
+
* arguments. Mixing a realpath'd `absPath` with a symlinked
|
|
47
|
+
* `pagesDir` (or vice versa) silently mismatches because
|
|
48
|
+
* `path.relative` is plain string arithmetic. The trap caused
|
|
49
|
+
* #883 review-iter-1 — a symlinked workspace silently routed
|
|
50
|
+
* wiki writes through the generic writer. */
|
|
51
|
+
export function wikiSlugFromAbsPath(absPath: string, pagesDir: string): string | null {
|
|
52
|
+
const rel = path.relative(pagesDir, absPath);
|
|
53
|
+
if (rel.length === 0) return null;
|
|
54
|
+
if (path.isAbsolute(rel)) return null;
|
|
55
|
+
// Direct child only — no nested layout today. Any separator
|
|
56
|
+
// means the path either escapes (`../secret.md`) or descends
|
|
57
|
+
// (`subdir/foo.md`). A literal page name like `..foo.md` is a
|
|
58
|
+
// single segment without a separator and is allowed (codex
|
|
59
|
+
// iter-3 #883 — the prior `startsWith("..")` rule wrongly
|
|
60
|
+
// rejected it).
|
|
61
|
+
if (rel.includes(path.sep)) return null;
|
|
62
|
+
if (!rel.endsWith(".md")) return null;
|
|
63
|
+
const slug = rel.slice(0, -".md".length);
|
|
64
|
+
if (!isSafeSlug(slug)) return null;
|
|
65
|
+
return slug;
|
|
66
|
+
}
|