@wirecat/cli-core 0.753.0 → 1.0.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/CHANGELOG.md +239 -0
- package/README.md +9 -6
- package/THIRD_PARTY_NOTICES +4 -0
- package/dist/analysis/settings.d.ts +3 -1
- package/dist/analysis/settings.js +2 -1
- package/dist/attachments/extract.d.ts +1 -1
- package/dist/attachments/extract.js +1 -1
- package/dist/background/daily-archive-timer.d.ts +1 -1
- package/dist/background/deliver.d.ts +3 -0
- package/dist/background/deliver.js +3 -0
- package/dist/background/lock.d.ts +1 -1
- package/dist/background/lock.js +1 -1
- package/dist/background/schedules.d.ts +13 -3
- package/dist/background/schedules.js +13 -3
- package/dist/background/when.d.ts +19 -5
- package/dist/background/when.js +17 -5
- package/dist/calendar/cli/answers.d.ts +1 -0
- package/dist/calendar/cli/answers.js +1 -0
- package/dist/calendar/cli/index.js +3 -1
- package/dist/calendar/feeds.d.ts +2 -0
- package/dist/calendar/feeds.js +10 -1
- package/dist/calendar/source.d.ts +5 -0
- package/dist/calendar/sync.d.ts +7 -1
- package/dist/calendar/sync.js +37 -7
- package/dist/calendar/testing/memory.js +7 -2
- package/dist/calendar/testing/sync-contract.js +2 -1
- package/dist/cli/account-rename.d.ts +3 -0
- package/dist/cli/account-rename.js +2 -1
- package/dist/cli/after-dashes.d.ts +1 -0
- package/dist/cli/after-dashes.js +1 -0
- package/dist/cli/agent-evaluation.d.ts +8 -1
- package/dist/cli/agent-evaluation.js +4 -1
- package/dist/cli/app-doctor-command.d.ts +1 -0
- package/dist/cli/app-doctor-command.js +1 -0
- package/dist/cli/ask-before-write.d.ts +1 -0
- package/dist/cli/ask-before-write.js +1 -0
- package/dist/cli/author.d.ts +1 -1
- package/dist/cli/author.js +1 -1
- package/dist/cli/base-stages-command.d.ts +2 -0
- package/dist/cli/base-stages-command.js +1 -0
- package/dist/cli/bot/api-http.d.ts +9 -3
- package/dist/cli/bot/api-http.js +7 -3
- package/dist/cli/bot/api-input.d.ts +8 -2
- package/dist/cli/bot/api-input.js +9 -3
- package/dist/cli/bot/api-rpc.d.ts +3 -1
- package/dist/cli/bot/api-rpc.js +2 -1
- package/dist/cli/bot/api.d.ts +1 -1
- package/dist/cli/bot/api.js +7 -1
- package/dist/cli/bot/context.d.ts +3 -2
- package/dist/cli/bot/context.js +1 -1
- package/dist/cli/bot/copy.d.ts +1 -0
- package/dist/cli/bot/messages.d.ts +5 -2
- package/dist/cli/bot/messages.js +5 -2
- package/dist/cli/bot/port.d.ts +10 -6
- package/dist/cli/bot/port.js +1 -1
- package/dist/cli/bot/registry.d.ts +6 -3
- package/dist/cli/bot/registry.js +6 -3
- package/dist/cli/bot/updates.d.ts +2 -1
- package/dist/cli/bot/updates.js +2 -1
- package/dist/cli/call-stats-command.d.ts +3 -0
- package/dist/cli/call-stats-command.js +1 -0
- package/dist/cli/command-contract.d.ts +3 -0
- package/dist/cli/command-contract.js +2 -0
- package/dist/cli/command-runs.d.ts +3 -1
- package/dist/cli/command-runs.js +2 -1
- package/dist/cli/commander-internals.d.ts +16 -0
- package/dist/cli/commander-internals.js +17 -0
- package/dist/cli/commands-command.d.ts +1 -0
- package/dist/cli/commands-command.js +3 -1
- package/dist/cli/compact.d.ts +13 -8
- package/dist/cli/compact.js +9 -6
- package/dist/cli/config-command.d.ts +3 -3
- package/dist/cli/config-command.js +4 -4
- package/dist/cli/config-issues.d.ts +7 -3
- package/dist/cli/config-issues.js +7 -3
- package/dist/cli/config-keys.d.ts +4 -1
- package/dist/cli/config-keys.js +4 -1
- package/dist/cli/context.d.ts +6 -2
- package/dist/cli/context.js +5 -1
- package/dist/cli/contract-evidence.d.ts +1 -0
- package/dist/cli/contract-evidence.js +1 -0
- package/dist/cli/csv.d.ts +3 -2
- package/dist/cli/csv.js +3 -2
- package/dist/cli/default-config.d.ts +2 -0
- package/dist/cli/default-config.js +2 -0
- package/dist/cli/doctor-reports-command.d.ts +5 -1
- package/dist/cli/doctor-reports-command.js +4 -1
- package/dist/cli/documents/catalog.js +2 -1
- package/dist/cli/documents/file-conflicts.js +2 -1
- package/dist/cli/documents/file-edit.js +5 -4
- package/dist/cli/documents/file-mirrors.js +4 -3
- package/dist/cli/documents/file-update.js +2 -1
- package/dist/cli/documents/folders.js +2 -1
- package/dist/cli/documents/words.d.ts +1 -1
- package/dist/cli/early-refusal.d.ts +4 -4
- package/dist/cli/early-refusal.js +4 -4
- package/dist/cli/effects.d.ts +41 -11
- package/dist/cli/effects.js +48 -13
- package/dist/cli/entry.d.ts +4 -1
- package/dist/cli/entry.js +4 -1
- package/dist/cli/envelope.d.ts +14 -4
- package/dist/cli/envelope.js +14 -4
- package/dist/cli/execution.d.ts +1 -0
- package/dist/cli/execution.js +1 -0
- package/dist/cli/findings-input.d.ts +10 -2
- package/dist/cli/findings-input.js +10 -2
- package/dist/cli/first-run.d.ts +9 -2
- package/dist/cli/first-run.js +7 -1
- package/dist/cli/group-lock.d.ts +6 -0
- package/dist/cli/group-lock.js +5 -0
- package/dist/cli/guide.d.ts +5 -2
- package/dist/cli/guide.js +8 -4
- package/dist/cli/help/command-help.d.ts +12 -4
- package/dist/cli/help/command-help.js +13 -6
- package/dist/cli/help/first-screen.d.ts +2 -0
- package/dist/cli/help/first-screen.js +2 -0
- package/dist/cli/help/sections.d.ts +1 -0
- package/dist/cli/help/sections.js +1 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/input-policy.d.ts +3 -0
- package/dist/cli/input-policy.js +3 -0
- package/dist/cli/json-fields.d.ts +1 -0
- package/dist/cli/json-fields.js +1 -0
- package/dist/cli/list-query.d.ts +11 -5
- package/dist/cli/list-query.js +11 -5
- package/dist/cli/listings.d.ts +13 -5
- package/dist/cli/listings.js +12 -5
- package/dist/cli/local-times.d.ts +3 -2
- package/dist/cli/local-times.js +2 -1
- package/dist/cli/mcp-server-command.d.ts +4 -1
- package/dist/cli/mcp-server-command.js +2 -0
- package/dist/cli/meeting-batch.d.ts +2 -1
- package/dist/cli/meeting-batch.js +2 -1
- package/dist/cli/meeting-evidence-answer.d.ts +2 -2
- package/dist/cli/meeting-evidence-answer.js +2 -2
- package/dist/cli/meeting-meaning-command.d.ts +5 -0
- package/dist/cli/meeting-meaning-command.js +2 -0
- package/dist/cli/meeting-passage-text.d.ts +1 -0
- package/dist/cli/meeting-passage-text.js +1 -0
- package/dist/cli/meeting-preparation-answer.d.ts +1 -0
- package/dist/cli/meeting-preparation-answer.js +1 -0
- package/dist/cli/meeting-preparation-read.d.ts +2 -0
- package/dist/cli/meeting-preparation-read.js +2 -0
- package/dist/cli/meeting-project-candidates-read.d.ts +1 -0
- package/dist/cli/meeting-project-candidates-read.js +1 -0
- package/dist/cli/meeting-results.d.ts +4 -1
- package/dist/cli/meeting-results.js +4 -1
- package/dist/cli/meeting-series-inventory-read.d.ts +2 -0
- package/dist/cli/meeting-series-inventory-read.js +1 -0
- package/dist/cli/meeting-tags-command.d.ts +2 -0
- package/dist/cli/meeting-tags-command.js +1 -0
- package/dist/cli/messenger/admin-folders-command.js +2 -1
- package/dist/cli/messenger/admin-moderation-command.d.ts +1 -1
- package/dist/cli/messenger/admin-moderation-command.js +1 -1
- package/dist/cli/messenger/ask.d.ts +1 -1
- package/dist/cli/messenger/ask.js +1 -1
- package/dist/cli/messenger/context.d.ts +2 -1
- package/dist/cli/messenger/context.js +1 -0
- package/dist/cli/messenger/doctor-command.d.ts +2 -1
- package/dist/cli/messenger/doctor-command.js +2 -1
- package/dist/cli/messenger/inbox.d.ts +2 -2
- package/dist/cli/messenger/inbox.js +2 -2
- package/dist/cli/messenger/lacks.d.ts +1 -0
- package/dist/cli/messenger/lacks.js +5 -3
- package/dist/cli/messenger/mcp-command.d.ts +8 -3
- package/dist/cli/messenger/mcp-command.js +6 -2
- package/dist/cli/messenger/message-items.d.ts +3 -1
- package/dist/cli/messenger/message-items.js +1 -0
- package/dist/cli/messenger/messages-delete-command.d.ts +1 -1
- package/dist/cli/messenger/messages-delete-command.js +1 -1
- package/dist/cli/messenger/report.d.ts +4 -1
- package/dist/cli/messenger/report.js +2 -0
- package/dist/cli/messenger/search-answers.d.ts +10 -4
- package/dist/cli/messenger/search-answers.js +6 -2
- package/dist/cli/messenger/searches-command.d.ts +4 -1
- package/dist/cli/messenger/searches-command.js +4 -1
- package/dist/cli/messenger/serve-command.d.ts +1 -1
- package/dist/cli/messenger/serve-command.js +1 -1
- package/dist/cli/messenger/serve-members.d.ts +4 -1
- package/dist/cli/messenger/serve-members.js +3 -1
- package/dist/cli/messenger/serve-outdated.d.ts +8 -3
- package/dist/cli/messenger/serve-outdated.js +8 -3
- package/dist/cli/messenger/serve-relay.d.ts +1 -1
- package/dist/cli/messenger/serve-relay.js +1 -1
- package/dist/cli/messenger/serve-stems.d.ts +4 -0
- package/dist/cli/messenger/serve-stems.js +3 -0
- package/dist/cli/messenger/server-command.d.ts +1 -1
- package/dist/cli/messenger/server-command.js +1 -1
- package/dist/cli/messenger/store-maintenance-command.d.ts +1 -0
- package/dist/cli/messenger/store-maintenance-command.js +9 -4
- package/dist/cli/messenger/stored.d.ts +2 -0
- package/dist/cli/messenger/stored.js +1 -0
- package/dist/cli/messenger/tasks-command.d.ts +1 -0
- package/dist/cli/messenger/tasks-command.js +1 -0
- package/dist/cli/model-catalogue-command.d.ts +1 -0
- package/dist/cli/model-catalogue-command.js +1 -0
- package/dist/cli/oauth-session.d.ts +14 -4
- package/dist/cli/oauth-session.js +9 -2
- package/dist/cli/option-hints.js +3 -4
- package/dist/cli/paging.d.ts +1 -0
- package/dist/cli/paging.js +1 -0
- package/dist/cli/path-options.d.ts +37 -0
- package/dist/cli/path-options.js +85 -0
- package/dist/cli/permission-keys.d.ts +10 -4
- package/dist/cli/permission-keys.js +9 -3
- package/dist/cli/profile.d.ts +5 -1
- package/dist/cli/profile.js +5 -1
- package/dist/cli/program.js +3 -0
- package/dist/cli/project-evidence.d.ts +9 -1
- package/dist/cli/project-evidence.js +8 -1
- package/dist/cli/project-status-rows.d.ts +2 -1
- package/dist/cli/project-status-rows.js +2 -1
- package/dist/cli/project-status.d.ts +12 -4
- package/dist/cli/project-status.js +10 -4
- package/dist/cli/provider-refs.d.ts +1 -1
- package/dist/cli/provider-refs.js +1 -1
- package/dist/cli/relay-route.js +5 -14
- package/dist/cli/result-fields.d.ts +2 -0
- package/dist/cli/result-fields.js +2 -0
- package/dist/cli/schedule/harnesses.d.ts +10 -5
- package/dist/cli/schedule/harnesses.js +9 -5
- package/dist/cli/schedule/schedule-command.d.ts +16 -6
- package/dist/cli/schedule/schedule-command.js +11 -4
- package/dist/cli/search-left-out.d.ts +5 -1
- package/dist/cli/search-left-out.js +3 -1
- package/dist/cli/service-api-call.d.ts +1 -1
- package/dist/cli/service-api-manifest.d.ts +9 -2
- package/dist/cli/service-api-manifest.js +5 -1
- package/dist/cli/service-api.d.ts +5 -2
- package/dist/cli/service-api.js +7 -2
- package/dist/cli/settings.d.ts +9 -3
- package/dist/cli/settings.js +7 -2
- package/dist/cli/setup-answers.d.ts +3 -0
- package/dist/cli/setup-answers.js +1 -0
- package/dist/cli/shadowed-options.d.ts +1 -1
- package/dist/cli/shadowed-options.js +1 -1
- package/dist/cli/shared-command-exports.d.ts +22 -0
- package/dist/cli/shared-command-exports.js +22 -0
- package/dist/cli/steps.d.ts +5 -1
- package/dist/cli/steps.js +5 -1
- package/dist/cli/store-info.d.ts +2 -0
- package/dist/cli/store-info.js +1 -0
- package/dist/cli/store-recover.d.ts +9 -3
- package/dist/cli/store-recover.js +7 -3
- package/dist/cli/store-settings.d.ts +7 -2
- package/dist/cli/store-settings.js +7 -2
- package/dist/cli/templates-command.d.ts +1 -0
- package/dist/cli/unknown-profile.d.ts +1 -1
- package/dist/cli/unknown-profile.js +1 -1
- package/dist/content/cli/index.js +3 -1
- package/dist/content/sync.d.ts +2 -0
- package/dist/content/sync.js +8 -3
- package/dist/content/testing/sync-contract.js +6 -2
- package/dist/content/writer.d.ts +1 -1
- package/dist/content/writer.js +1 -1
- package/dist/context/evidence.d.ts +4 -0
- package/dist/crm/cli/files.d.ts +1 -1
- package/dist/crm/cli/files.js +3 -2
- package/dist/crm/cli/index.d.ts +1 -1
- package/dist/crm/cli/index.js +5 -4
- package/dist/crm/cli/records.d.ts +1 -1
- package/dist/crm/cli/records.js +1 -1
- package/dist/crm/digest.d.ts +1 -1
- package/dist/crm/foreign-contacts.d.ts +2 -2
- package/dist/crm/foreign-contacts.js +2 -2
- package/dist/crm/manifest/map.d.ts +5 -2
- package/dist/crm/manifest/map.js +14 -2
- package/dist/crm/manifest/paths.d.ts +1 -1
- package/dist/crm/source.d.ts +2 -2
- package/dist/crm/sync.d.ts +6 -2
- package/dist/crm/sync.js +16 -6
- package/dist/crm/testing/manifest-fake.d.ts +2 -1
- package/dist/crm/testing/manifest-fake.js +1 -1
- package/dist/crm/testing/sync-contract.js +7 -2
- package/dist/crm/viewer.d.ts +2 -2
- package/dist/crm/viewer.js +2 -2
- package/dist/crm/writes.d.ts +2 -2
- package/dist/crm/writes.js +1 -1
- package/dist/domain/addresses.d.ts +7 -3
- package/dist/domain/addresses.js +7 -3
- package/dist/domain/business.d.ts +21 -4
- package/dist/domain/business.js +11 -4
- package/dist/domain/categories.d.ts +1 -1
- package/dist/domain/categories.js +1 -1
- package/dist/domain/config-repair.d.ts +1 -1
- package/dist/domain/config-repair.js +1 -1
- package/dist/domain/counters.d.ts +4 -0
- package/dist/domain/counters.js +2 -0
- package/dist/domain/crm.d.ts +18 -7
- package/dist/domain/crm.js +11 -4
- package/dist/domain/deals.d.ts +6 -3
- package/dist/domain/deals.js +4 -3
- package/dist/domain/display-names.d.ts +3 -1
- package/dist/domain/display-names.js +2 -0
- package/dist/domain/finance.d.ts +8 -2
- package/dist/domain/finance.js +4 -2
- package/dist/domain/formatting.d.ts +1 -0
- package/dist/domain/knowledge.d.ts +6 -1
- package/dist/domain/knowledge.js +6 -1
- package/dist/domain/links.d.ts +14 -2
- package/dist/domain/links.js +11 -2
- package/dist/domain/locator.d.ts +4 -1
- package/dist/domain/locator.js +3 -1
- package/dist/domain/markdown.d.ts +1 -0
- package/dist/domain/markdown.js +1 -0
- package/dist/domain/models.d.ts +38 -15
- package/dist/domain/models.js +6 -3
- package/dist/domain/money.d.ts +14 -4
- package/dist/domain/money.js +10 -3
- package/dist/domain/orders.d.ts +4 -1
- package/dist/domain/orders.js +2 -1
- package/dist/domain/organization-sectors.d.ts +10 -0
- package/dist/domain/organization-sectors.generated.d.ts +11 -0
- package/dist/domain/organization-sectors.generated.js +14 -0
- package/dist/domain/organization-sectors.js +9 -0
- package/dist/domain/person-kinds.d.ts +4 -2
- package/dist/domain/person-kinds.js +1 -0
- package/dist/domain/phones.d.ts +2 -0
- package/dist/domain/phones.js +1 -0
- package/dist/domain/polls.d.ts +1 -0
- package/dist/domain/polls.js +1 -0
- package/dist/domain/providers.d.ts +22 -7
- package/dist/domain/providers.js +22 -7
- package/dist/domain/rankings-graph.d.ts +2 -0
- package/dist/domain/rankings-options.d.ts +5 -0
- package/dist/domain/rankings-options.js +1 -0
- package/dist/domain/record-types.d.ts +5 -1
- package/dist/domain/record-types.js +1 -0
- package/dist/domain/records-table.d.ts +18 -3
- package/dist/domain/records-table.js +11 -2
- package/dist/domain/records.d.ts +18 -2
- package/dist/domain/records.js +8 -1
- package/dist/domain/ref-summaries.d.ts +22 -5
- package/dist/domain/ref-summaries.js +9 -2
- package/dist/domain/references.d.ts +4 -2
- package/dist/domain/references.js +3 -2
- package/dist/domain/relation-role-labels.d.ts +5 -1
- package/dist/domain/relation-role-labels.js +4 -1
- package/dist/domain/relations.d.ts +32 -8
- package/dist/domain/relations.js +28 -8
- package/dist/domain/send-time.d.ts +1 -2
- package/dist/domain/send-time.js +1 -2
- package/dist/domain/tag-consolidation.d.ts +5 -0
- package/dist/domain/tag-redirects.d.ts +4 -1
- package/dist/domain/tag-redirects.js +1 -1
- package/dist/domain/tags.d.ts +2 -0
- package/dist/domain/tags.js +1 -0
- package/dist/domain/vcard.d.ts +4 -1
- package/dist/domain/vcard.js +2 -1
- package/dist/entities/business-context.d.ts +10 -4
- package/dist/entities/business-context.js +10 -4
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/knowledge-lists.d.ts +4 -0
- package/dist/entities/knowledge-lists.js +5 -0
- package/dist/entities/list-results.d.ts +1 -0
- package/dist/entities/list-results.js +1 -0
- package/dist/entities/listings.d.ts +12 -5
- package/dist/entities/listings.js +12 -5
- package/dist/entities/note.d.ts +1 -0
- package/dist/entities/note.js +1 -0
- package/dist/entities/store-records.d.ts +1 -0
- package/dist/entities/store-records.js +1 -0
- package/dist/errors/failures.d.ts +3 -1
- package/dist/errors/failures.js +3 -1
- package/dist/errors/reasons.d.ts +1 -0
- package/dist/errors/reasons.js +17 -41
- package/dist/errors/store-reasons.d.ts +5 -0
- package/dist/errors/store-reasons.js +62 -0
- package/dist/http/link-fetch.d.ts +1 -0
- package/dist/http/link-fetch.js +1 -0
- package/dist/http/public-url.d.ts +6 -2
- package/dist/http/public-url.js +6 -2
- package/dist/kit/contract.d.ts +1 -1
- package/dist/kit/contract.js +1 -1
- package/dist/kit/fake.d.ts +2 -1
- package/dist/kit/fake.js +1 -0
- package/dist/kit/run-scope.js +2 -1
- package/dist/kit/search-recipes.d.ts +2 -0
- package/dist/kit/search-recipes.js +1 -0
- package/dist/kit/seed.d.ts +3 -2
- package/dist/kit/seed.js +3 -2
- package/dist/mail/findings.d.ts +1 -1
- package/dist/mail/findings.js +1 -1
- package/dist/mail/score.d.ts +2 -0
- package/dist/mail/score.js +9 -2
- package/dist/mail/sync.js +18 -9
- package/dist/mcp/agent.d.ts +4 -1
- package/dist/mcp/agent.js +2 -1
- package/dist/mcp/all-profiles.d.ts +12 -4
- package/dist/mcp/all-profiles.js +10 -3
- package/dist/mcp/bot/instructions.d.ts +4 -1
- package/dist/mcp/bot/instructions.js +4 -1
- package/dist/mcp/caller.d.ts +1 -0
- package/dist/mcp/caller.js +1 -0
- package/dist/mcp/http/oauth.d.ts +2 -1
- package/dist/mcp/http/oauth.js +2 -1
- package/dist/mcp/http/serve.d.ts +4 -1
- package/dist/mcp/http/serve.js +3 -1
- package/dist/mcp/http/state.d.ts +1 -1
- package/dist/mcp/http/state.js +1 -1
- package/dist/mcp/meeting-preparation.d.ts +5 -1
- package/dist/mcp/meeting-preparation.js +5 -1
- package/dist/mcp/meeting-project-candidates.d.ts +2 -0
- package/dist/mcp/meeting-project-candidates.js +2 -0
- package/dist/mcp/meeting-series-inventory.d.ts +2 -0
- package/dist/mcp/meeting-series-inventory.js +2 -0
- package/dist/mcp/prompts.d.ts +1 -0
- package/dist/mcp/prompts.js +1 -0
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/session.d.ts +2 -2
- package/dist/mcp/session.js +2 -2
- package/dist/mcp/surface.d.ts +3 -2
- package/dist/mcp/surface.js +2 -1
- package/dist/meetings/cli/query-options.js +3 -2
- package/dist/meetings/event-store.d.ts +7 -2
- package/dist/meetings/findings-rules.d.ts +2 -0
- package/dist/meetings/findings.d.ts +5 -0
- package/dist/meetings/mcp/agent-text.d.ts +12 -4
- package/dist/meetings/mcp/agent-text.js +12 -4
- package/dist/meetings/mcp/index.d.ts +24 -24
- package/dist/meetings/payment.d.ts +15 -3
- package/dist/meetings/payment.js +14 -3
- package/dist/meetings/read-store.d.ts +8 -0
- package/dist/meetings/reference.d.ts +3 -0
- package/dist/meetings/reference.js +3 -0
- package/dist/meetings/result-items.d.ts +1 -0
- package/dist/meetings/result-items.js +1 -0
- package/dist/meetings/transcript-store.d.ts +0 -1
- package/dist/moderation/check.d.ts +3 -1
- package/dist/moderation/check.js +2 -0
- package/dist/moderation/rules.d.ts +5 -2
- package/dist/moderation/rules.js +5 -3
- package/dist/ports/app.d.ts +1 -0
- package/dist/ports/app.js +1 -0
- package/dist/ports/messenger.d.ts +55 -27
- package/dist/ports/traits.d.ts +4 -1
- package/dist/ports/wirecat-tools.d.ts +1 -1
- package/dist/ports/wirecat-tools.js +1 -1
- package/dist/readers/engine.d.ts +2 -2
- package/dist/readers/engine.js +2 -2
- package/dist/render/messages.d.ts +7 -1
- package/dist/render/messages.js +6 -1
- package/dist/replies/dry-run.d.ts +1 -0
- package/dist/replies/dry-run.js +1 -0
- package/dist/replies/rendering.d.ts +2 -0
- package/dist/replies/rendering.js +1 -0
- package/dist/replies/rules.d.ts +1 -2
- package/dist/replies/rules.js +1 -2
- package/dist/replies/serve.d.ts +8 -2
- package/dist/replies/serve.js +6 -1
- package/dist/replies/state.d.ts +1 -0
- package/dist/replies/state.js +1 -0
- package/dist/resolve.d.ts +5 -1
- package/dist/resolve.js +5 -1
- package/dist/runs/events.d.ts +3 -2
- package/dist/runs/events.js +2 -1
- package/dist/runs/log-events.d.ts +4 -1
- package/dist/runs/log-events.js +4 -1
- package/dist/runs/provider-log.d.ts +9 -1
- package/dist/runs/provider-log.js +8 -1
- package/dist/runs/recording.d.ts +9 -1
- package/dist/runs/recording.js +7 -1
- package/dist/runs/run-context.d.ts +1 -0
- package/dist/runs/run-context.js +1 -0
- package/dist/runs/run.d.ts +1 -0
- package/dist/runs/run.js +1 -0
- package/dist/runs/scope.d.ts +1 -0
- package/dist/runs/scope.js +1 -0
- package/dist/search/languages.d.ts +4 -1
- package/dist/search/languages.js +4 -1
- package/dist/search/question-plan.d.ts +3 -3
- package/dist/search/question-plan.js +3 -3
- package/dist/search/service-query.d.ts +7 -2
- package/dist/search/service-query.js +2 -0
- package/dist/sends/buttons.d.ts +7 -3
- package/dist/sends/buttons.js +6 -3
- package/dist/sends/flood.d.ts +3 -1
- package/dist/sends/flood.js +3 -1
- package/dist/sends/guard.d.ts +1 -0
- package/dist/sends/guard.js +1 -0
- package/dist/sends/guarded.d.ts +4 -1
- package/dist/sends/guarded.js +4 -1
- package/dist/sends/journal.d.ts +2 -2
- package/dist/sends/pace.d.ts +6 -1
- package/dist/sends/pace.js +5 -1
- package/dist/sends/permissions.d.ts +14 -9
- package/dist/sends/permissions.js +13 -8
- package/dist/sends/polls.d.ts +6 -3
- package/dist/sends/polls.js +6 -3
- package/dist/sends/recipients.d.ts +1 -0
- package/dist/sends/recipients.js +1 -0
- package/dist/sends/send-as.d.ts +1 -1
- package/dist/sends/send-as.js +1 -1
- package/dist/sends/upload.d.ts +6 -2
- package/dist/sends/upload.js +6 -2
- package/dist/services/business-context.d.ts +2 -2
- package/dist/services/business-context.js +1 -1
- package/dist/services/deal-context.d.ts +1 -1
- package/dist/services/documents/ports.d.ts +0 -2
- package/dist/services/embeddings.d.ts +3 -3
- package/dist/services/inbox.d.ts +6 -2
- package/dist/services/inbox.js +5 -1
- package/dist/services/index.d.ts +0 -1
- package/dist/services/index.js +0 -1
- package/dist/services/metadata.d.ts +1 -1
- package/dist/services/moderation.d.ts +1 -1
- package/dist/services/moment.d.ts +1 -0
- package/dist/services/moment.js +1 -0
- package/dist/services/organization-context.d.ts +1 -1
- package/dist/services/people.d.ts +2 -2
- package/dist/services/people.js +1 -1
- package/dist/services/person-business.d.ts +1 -1
- package/dist/services/questions.d.ts +1 -0
- package/dist/services/questions.js +1 -0
- package/dist/services/search-all-rank.d.ts +44 -0
- package/dist/services/search-all-rank.js +112 -0
- package/dist/services/search-all-tracker.d.ts +58 -0
- package/dist/services/search-all-tracker.js +155 -0
- package/dist/services/search-all.d.ts +2 -9
- package/dist/services/search-all.js +19 -200
- package/dist/services/task-rules.d.ts +1 -0
- package/dist/services/task-rules.js +1 -0
- package/dist/services/tasks.d.ts +2 -0
- package/dist/services/tasks.js +2 -0
- package/dist/services/tracker-meaning.js +1 -1
- package/dist/setup/document.d.ts +20 -4
- package/dist/setup/document.js +20 -4
- package/dist/setup/plain.d.ts +1 -0
- package/dist/setup/plain.js +1 -0
- package/dist/speech/hearing.d.ts +1 -1
- package/dist/speech/hearing.js +1 -1
- package/dist/speech/models.d.ts +1 -1
- package/dist/sqlite-runtime.d.ts +2 -0
- package/dist/sqlite-runtime.js +2 -0
- package/dist/store/account-store.d.ts +3 -2
- package/dist/store/accounts.d.ts +1 -0
- package/dist/store/areas.d.ts +41 -0
- package/dist/store/areas.js +17 -0
- package/dist/store/attachments.d.ts +2 -0
- package/dist/store/conversations.d.ts +1 -0
- package/dist/store/counters.d.ts +2 -0
- package/dist/store/damage.d.ts +4 -1
- package/dist/store/damage.js +2 -1
- package/dist/store/decision-requests.d.ts +10 -3
- package/dist/store/decision-requests.js +9 -3
- package/dist/store/decisions.d.ts +5 -1
- package/dist/store/decisions.js +4 -1
- package/dist/store/document-transfer/index.d.ts +2 -0
- package/dist/store/document-transfer/index.js +2 -0
- package/dist/store/document-transfer/model.d.ts +3 -0
- package/dist/store/driver.d.ts +2 -0
- package/dist/store/driver.js +1 -0
- package/dist/store/evidence-findings.d.ts +10 -2
- package/dist/store/evidence-findings.js +2 -0
- package/dist/store/health.d.ts +4 -1
- package/dist/store/health.js +2 -1
- package/dist/store/identity-links.d.ts +13 -4
- package/dist/store/identity-links.js +4 -1
- package/dist/store/identity-splits.d.ts +2 -1
- package/dist/store/identity-splits.js +1 -0
- package/dist/store/index.d.ts +2 -1
- package/dist/store/knowledge-query.d.ts +3 -0
- package/dist/store/knowledge-query.js +3 -0
- package/dist/store/mail-findings.d.ts +4 -1
- package/dist/store/mail-findings.js +1 -0
- package/dist/store/marks.d.ts +20 -3
- package/dist/store/marks.js +12 -1
- package/dist/store/meeting-findings.d.ts +2 -0
- package/dist/store/mentions.d.ts +2 -0
- package/dist/store/message-store.d.ts +219 -0
- package/dist/store/message-store.js +1 -0
- package/dist/store/messages.d.ts +1 -0
- package/dist/store/migrations.d.ts +8 -0
- package/dist/store/migrations.js +59 -6
- package/dist/store/open.d.ts +1 -1
- package/dist/store/open.js +1 -1
- package/dist/store/people.d.ts +27 -5
- package/dist/store/people.js +15 -1
- package/dist/store/project-transfer/manifest.d.ts +3 -1
- package/dist/store/project-transfer/manifest.js +3 -1
- package/dist/store/project-transfer/plan.d.ts +3 -1
- package/dist/store/project-transfer/plan.js +1 -1
- package/dist/store/project-transfer/preview.d.ts +2 -0
- package/dist/store/project-transfer/preview.js +1 -0
- package/dist/store/project-transfer/schema.d.ts +1 -0
- package/dist/store/project-transfer/snapshot-model.d.ts +4 -0
- package/dist/store/project-transfer/snapshot-model.js +3 -0
- package/dist/store/project-transfer/snapshot-plan.d.ts +2 -1
- package/dist/store/project-transfer/snapshot-plan.js +1 -1
- package/dist/store/project-transfer/snapshot.d.ts +3 -1
- package/dist/store/project-transfer/snapshot.js +1 -1
- package/dist/store/project-transfer/store.d.ts +4 -1
- package/dist/store/providers.d.ts +1 -0
- package/dist/store/providers.js +1 -0
- package/dist/store/public.d.ts +40 -0
- package/dist/store/public.js +30 -0
- package/dist/store/queries.d.ts +1 -1
- package/dist/store/repair.d.ts +2 -2
- package/dist/store/repair.js +2 -2
- package/dist/store/roster.d.ts +1 -0
- package/dist/store/search-index.d.ts +1 -0
- package/dist/store/searches.d.ts +1 -0
- package/dist/store/source-review.d.ts +13 -6
- package/dist/store/source-review.js +2 -1
- package/dist/store/sqlite/calendar.js +7 -2
- package/dist/store/sqlite/completeness.d.ts +1 -1
- package/dist/store/sqlite/completeness.js +1 -1
- package/dist/store/sqlite/conversations.d.ts +1 -1
- package/dist/store/sqlite/conversations.js +1 -1
- package/dist/store/sqlite/copy-viewer.d.ts +1 -1
- package/dist/store/sqlite/crm-activities.d.ts +1 -1
- package/dist/store/sqlite/crm-activity-chunks.d.ts +3 -2
- package/dist/store/sqlite/crm-activity-chunks.js +3 -2
- package/dist/store/sqlite/crm-changes.d.ts +1 -1
- package/dist/store/sqlite/crm-files.d.ts +1 -1
- package/dist/store/sqlite/crm-settings.d.ts +1 -1
- package/dist/store/sqlite/crm-settings.js +1 -1
- package/dist/store/sqlite/crm.d.ts +2 -2
- package/dist/store/sqlite/domain-organizations.d.ts +33 -0
- package/dist/store/sqlite/domain-organizations.js +230 -0
- package/dist/store/sqlite/drizzle/core.d.ts +1 -1
- package/dist/store/sqlite/drizzle/core.js +36 -0
- package/dist/store/sqlite/drizzle/core.js.map +4 -4
- package/dist/store/sqlite/identity-link-rows.d.ts +1 -1
- package/dist/store/sqlite/identity-link-rows.js +1 -1
- package/dist/store/sqlite/knowledge.d.ts +2 -9
- package/dist/store/sqlite/manifest.js +107 -0
- package/dist/store/sqlite/meeting-documents.js +0 -6
- package/dist/store/sqlite/messages.d.ts +1 -1
- package/dist/store/sqlite/messages.js +1 -1
- package/dist/store/sqlite/migrations.generated.js +673 -0
- package/dist/store/sqlite/name-traces.d.ts +1 -1
- package/dist/store/sqlite/name-traces.js +1 -1
- package/dist/store/sqlite/organization-categories.d.ts +1 -1
- package/dist/store/sqlite/organization-categories.js +1 -1
- package/dist/store/sqlite/organizations.d.ts +12 -1
- package/dist/store/sqlite/organizations.js +9 -1
- package/dist/store/sqlite/people-list.d.ts +6 -1
- package/dist/store/sqlite/people-list.js +66 -14
- package/dist/store/sqlite/person-links.d.ts +2 -2
- package/dist/store/sqlite/person-links.js +3 -3
- package/dist/store/sqlite/person-match-scan.d.ts +5 -5
- package/dist/store/sqlite/person-match-scan.js +28 -18
- package/dist/store/sqlite/pipeline-period.d.ts +1 -1
- package/dist/store/sqlite/pipeline-period.js +1 -1
- package/dist/store/sqlite/rebuild.d.ts +52 -0
- package/dist/store/sqlite/rebuild.js +176 -0
- package/dist/store/sqlite/relation-list.d.ts +1 -1
- package/dist/store/sqlite/rollback-copy.d.ts +7 -3
- package/dist/store/sqlite/rollback-copy.js +43 -6
- package/dist/store/sqlite/schema/canonical-tags.js +1 -1
- package/dist/store/sqlite/schema/decision-requests.js +1 -1
- package/dist/store/sqlite/schema/document-changes.js +1 -1
- package/dist/store/sqlite/schema/link-revisions.js +6 -3
- package/dist/store/sqlite/schema/links.js +3 -2
- package/dist/store/sqlite/schema/sender-bots.d.ts +288 -0
- package/dist/store/sqlite/schema/sender-bots.js +22 -0
- package/dist/store/sqlite/schema/tag-consolidations.js +5 -2
- package/dist/store/sqlite/schema/templates.js +1 -1
- package/dist/store/sqlite/schema.d.ts +1 -0
- package/dist/store/sqlite/schema.js +245 -108
- package/dist/store/sqlite/sender-bots.d.ts +43 -0
- package/dist/store/sqlite/sender-bots.js +189 -0
- package/dist/store/sqlite/sender-signals.d.ts +5 -2
- package/dist/store/sqlite/sender-signals.js +6 -6
- package/dist/store/sqlite/tracker.d.ts +11 -9
- package/dist/store/sqlite/tracker.js +27 -12
- package/dist/store/sqlite/vectors.d.ts +1 -1
- package/dist/store/sqlite/vectors.js +1 -1
- package/dist/store/sqlite/version-73.d.ts +12 -0
- package/dist/store/sqlite/version-73.js +114 -0
- package/dist/store/sqlite/work-tasks.js +2 -0
- package/dist/store/sqlite-warning.d.ts +1 -1
- package/dist/store/sqlite-warning.js +1 -1
- package/dist/store/store.d.ts +2 -176
- package/dist/store/store.js +1 -1
- package/dist/store/sync.d.ts +1 -0
- package/dist/store/types.d.ts +5 -3
- package/dist/store/vectors.d.ts +2 -0
- package/dist/tasks/model.d.ts +7 -1
- package/dist/tasks/model.js +6 -1
- package/dist/tasks/priority.d.ts +11 -2
- package/dist/tasks/priority.js +10 -2
- package/dist/terminal/qr.d.ts +1 -0
- package/dist/terminal/qr.js +1 -0
- package/dist/tracker/cli/index.d.ts +1 -1
- package/dist/tracker/cli/index.js +86 -25
- package/dist/tracker/manifest/manifest.d.ts +1 -1
- package/dist/tracker/manifest/manifest.js +1 -1
- package/dist/tracker/sync.d.ts +2 -0
- package/dist/tracker/sync.js +55 -25
- package/dist/tracker/testing/manifest-fake.d.ts +2 -1
- package/dist/tracker/writes.d.ts +28 -0
- package/dist/tracker/writes.js +141 -19
- package/dist/update/index.d.ts +5 -1
- package/dist/update/index.js +4 -1
- package/package.json +29 -9
- package/parity.json +4 -1
- package/dist/services/search-all-deprecated.d.ts +0 -40
- package/dist/services/search-all-deprecated.js +0 -10
|
@@ -4,16 +4,14 @@ import { crmViewerOf } from "../crm/index.js";
|
|
|
4
4
|
import { hitFiles } from "../domain/attachments.js";
|
|
5
5
|
import { parseLocator } from "../domain/locator.js";
|
|
6
6
|
import { senderIsMe } from "../domain/models.js";
|
|
7
|
-
import {
|
|
8
|
-
import { trackerBodyOf, trackerTitleOf } from "../domain/tracker.js";
|
|
7
|
+
import { holdsKind, INTERNAL_NOTES, isDocumentAccountProvider } from "../domain/providers.js";
|
|
9
8
|
import { runEmbedders } from "../embeddings/embed.js";
|
|
10
9
|
import { chosenTextModel } from "../embeddings/models.js";
|
|
11
10
|
import { formatMeetingReference } from "../meetings/index.js";
|
|
12
11
|
import { entriesOfList, fitting, listedHolds } from "../search/account-list.js";
|
|
13
12
|
import { RRF_K } from "../search/fusion.js";
|
|
14
|
-
import { meaningWords } from "../search/lucene/meaning-parts.js";
|
|
15
13
|
import { plainQuery } from "../search/lucene/plain.js";
|
|
16
|
-
import { MESSAGE_PARSING
|
|
14
|
+
import { MESSAGE_PARSING } from "../search/lucene/types.js";
|
|
17
15
|
import { questionPeriod } from "../search/question-period.js";
|
|
18
16
|
import { planQuestion, questionLookup, questionText } from "../search/question-plan.js";
|
|
19
17
|
import { nearestCrmActivities } from "./crm-meaning.js";
|
|
@@ -24,9 +22,11 @@ import { nearEligible } from "./messages-discovery.js";
|
|
|
24
22
|
import { importAccounts, notesScopeOf, searchNotes } from "./notes-search.js";
|
|
25
23
|
import { BUSINESS_WORDS_ONLY, searchBusiness } from "./search-all-business.js";
|
|
26
24
|
import { meetingLane } from "./search-all-meetings.js";
|
|
25
|
+
import { contentWords, fusedLane, insidePeriodFirst, meaningWordsOf, oneList, PERIOD_DEPTH, titleWords, } from "./search-all-rank.js";
|
|
26
|
+
import { trackerLane } from "./search-all-tracker.js";
|
|
27
27
|
import { HARDER_CANDIDATES, reorderHarder } from "./search-harder.js";
|
|
28
28
|
import { listContextOf } from "./search-kind.js";
|
|
29
|
-
|
|
29
|
+
export { titleWords } from "./search-all-rank.js";
|
|
30
30
|
export const RESOURCES_SEARCHED = [
|
|
31
31
|
"messages",
|
|
32
32
|
"mail",
|
|
@@ -61,24 +61,6 @@ const filtersBeside = (text) => {
|
|
|
61
61
|
? planQuestion(text).scope
|
|
62
62
|
: undefined;
|
|
63
63
|
};
|
|
64
|
-
/**
|
|
65
|
-
* What a deal or a lead is found by: plain words or phrases, all of them, or any with OR. Anything else is refused,
|
|
66
|
-
* so `search all` skips deals with the reason instead of matching a field they do not have.
|
|
67
|
-
*/
|
|
68
|
-
export const titleWords = (text, refused = "deals and leads are found by the words of their title, company, contacts and activities only") => {
|
|
69
|
-
const { root } = parseLucene(text, SEARCH_QUERY);
|
|
70
|
-
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
71
|
-
const words = clauses.map(({ node, occur }) => occur !== "must_not" &&
|
|
72
|
-
node.kind === "predicate" &&
|
|
73
|
-
(node.field === "text" || node.field === "title") &&
|
|
74
|
-
(node.operator === "term" || node.operator === "phrase")
|
|
75
|
-
? // A title holds "invoice", not the question mark of "invoice?".
|
|
76
|
-
node.value.replace(/\?+$/u, "") || node.value
|
|
77
|
-
: (() => {
|
|
78
|
-
throw new CliError("validation_error", refused);
|
|
79
|
-
})());
|
|
80
|
-
return { words, anyWord: clauses.length > 1 && clauses.every(({ occur }) => occur === "should") };
|
|
81
|
-
};
|
|
82
64
|
/** The single words of an all-words query, when it has two to eight of them; none for OR, fields or phrases. */
|
|
83
65
|
const strictWords = (text) => {
|
|
84
66
|
try {
|
|
@@ -130,7 +112,7 @@ const sourceScope = async (store, account, source, asked, messenger) => {
|
|
|
130
112
|
.map((resource) => ({ resource, code: "not_found", reason: `--source names no ${resource} account` }));
|
|
131
113
|
return { only, scope, skipped: [...skipped, ...unnamed] };
|
|
132
114
|
};
|
|
133
|
-
/** Each CRM copy's viewer for the user its own sync signed in as
|
|
115
|
+
/** Each CRM copy's viewer for the user its own sync signed in as: what a run outside its CLI may read. */
|
|
134
116
|
const copyViewers = async (store) => {
|
|
135
117
|
const viewers = [];
|
|
136
118
|
for (const account of await crmAccounts(store)) {
|
|
@@ -140,75 +122,8 @@ const copyViewers = async (store) => {
|
|
|
140
122
|
}
|
|
141
123
|
return viewers;
|
|
142
124
|
};
|
|
143
|
-
const TRACKER_HIT_KINDS = { issue: "issue", project: "project", comment: "issue_comment" };
|
|
144
125
|
/** The accounts of every tracker the store holds copies of. */
|
|
145
126
|
export const trackerAccounts = async (store) => (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, "tracker"));
|
|
146
|
-
/** An issue is titled as people say it, `ENG-12 Fix login`; anything else by its name or its first line. */
|
|
147
|
-
const trackerTitle = ({ kind, record }) => {
|
|
148
|
-
const title = trackerTitleOf(kind, record);
|
|
149
|
-
const key = kind === "issue" ? record.key : undefined;
|
|
150
|
-
return key ? `${key} ${title}` : title;
|
|
151
|
-
};
|
|
152
|
-
/**
|
|
153
|
-
* What the meaning half embeds: the words and phrases asked for, OR included, as notes take them. `title:` narrows to
|
|
154
|
-
* the title, which a hit by meaning cannot be held to, so such a query is searched by words only.
|
|
155
|
-
*/
|
|
156
|
-
const meaningWordsOf = (text) => {
|
|
157
|
-
try {
|
|
158
|
-
const { root } = parseLucene(text, SEARCH_QUERY);
|
|
159
|
-
const nodes = root.kind === "boolean" ? root.clauses.map(({ node }) => node) : [root];
|
|
160
|
-
if (!nodes.every((node) => node.kind === "predicate" && node.field === "text"))
|
|
161
|
-
return undefined;
|
|
162
|
-
return meaningWords(root) || undefined;
|
|
163
|
-
}
|
|
164
|
-
catch {
|
|
165
|
-
return undefined;
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
const trackerExcerpt = ({ kind, record }, query) => excerpt([trackerTitleOf(kind, record), trackerBodyOf(kind, record)].filter(Boolean).join("\n"), query);
|
|
169
|
-
/**
|
|
170
|
-
* One hit per tracker item, best first: the copies other sign-ins hold of one item (`items` maps a hit's ref to the
|
|
171
|
-
* item, for a provider whose ids name one item across its accounts) join the best-placed one, which names every account and takes the best cosine and every way any was found.
|
|
172
|
-
*/
|
|
173
|
-
const oneHitPerItem = (ordered, cosines, items) => {
|
|
174
|
-
const kept = new Map();
|
|
175
|
-
for (const hit of ordered) {
|
|
176
|
-
const key = items.get(hit.ref) ?? hit.ref;
|
|
177
|
-
const held = kept.get(key);
|
|
178
|
-
if (!held) {
|
|
179
|
-
kept.set(key, hit);
|
|
180
|
-
continue;
|
|
181
|
-
}
|
|
182
|
-
held.accounts = [...(held.accounts ?? [held.account]), hit.account];
|
|
183
|
-
held.foundBy = ["words", "meaning"].filter((by) => [held, hit].some(({ foundBy }) => foundBy.includes(by)));
|
|
184
|
-
const cosine = cosines.get(hit.ref);
|
|
185
|
-
if (cosine !== undefined && cosine > (cosines.get(held.ref) ?? Number.NEGATIVE_INFINITY))
|
|
186
|
-
cosines.set(held.ref, cosine);
|
|
187
|
-
}
|
|
188
|
-
return [...kept.values()];
|
|
189
|
-
};
|
|
190
|
-
/**
|
|
191
|
-
* One list for a lane found both ways, as notes and messages fuse theirs: each hit's rank in either list votes, a
|
|
192
|
-
* question's hit voting once; a hit found both ways keeps its words' text and is found by meaning too.
|
|
193
|
-
*/
|
|
194
|
-
const fusedLane = (byWords, byMeaning, discover, cosines) => {
|
|
195
|
-
const fused = new Map();
|
|
196
|
-
byWords.forEach((item, rank) => {
|
|
197
|
-
fused.set(item.ref, { item, score: 1 / (RRF_K + rank + 1) });
|
|
198
|
-
});
|
|
199
|
-
byMeaning.forEach(({ hit, score }, rank) => {
|
|
200
|
-
cosines.set(hit.ref, score);
|
|
201
|
-
const held = fused.get(hit.ref);
|
|
202
|
-
if (held && !held.item.foundBy.includes("meaning"))
|
|
203
|
-
held.item.foundBy = [...held.item.foundBy, "meaning"];
|
|
204
|
-
const vote = 1 / (RRF_K + rank + 1);
|
|
205
|
-
if (held && discover)
|
|
206
|
-
held.score = Math.max(held.score, vote);
|
|
207
|
-
else
|
|
208
|
-
fused.set(hit.ref, { item: held?.item ?? hit, score: (held?.score ?? 0) + vote });
|
|
209
|
-
});
|
|
210
|
-
return [...fused.values()].sort((a, b) => b.score - a.score).map(({ item }) => item);
|
|
211
|
-
};
|
|
212
127
|
/** The accounts of every CRM the store holds copies of. */
|
|
213
128
|
export const crmAccounts = async (store) => (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, "crm"));
|
|
214
129
|
/**
|
|
@@ -429,7 +344,7 @@ export const searchAll = async (store, account, asked, messenger = {}, searchMes
|
|
|
429
344
|
accounts.push(...read.map(({ provider, account }) => ({ resource, provider, account })));
|
|
430
345
|
}
|
|
431
346
|
else if (resource === "crm") {
|
|
432
|
-
const { words, anyWord } = titleWords(request.text);
|
|
347
|
+
const { words, anyWord } = contentWords(titleWords(request.text), discover);
|
|
433
348
|
const chosen = scope?.crm;
|
|
434
349
|
// memo's, tg's and the MCP's search all pass no viewers: each copy's own rule decides, as a CRM CLI's does.
|
|
435
350
|
const viewers = request.crmViewers ?? (await copyViewers(store));
|
|
@@ -540,78 +455,25 @@ export const searchAll = async (store, account, asked, messenger = {}, searchMes
|
|
|
540
455
|
const read = scope?.tracker ?? (await trackerAccounts(store));
|
|
541
456
|
if (!read.length)
|
|
542
457
|
continue;
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
// that the folded list still fills the page.
|
|
546
|
-
const deep = Math.min(depth * read.length, 500);
|
|
547
|
-
const found = await store.tracker.find({
|
|
548
|
-
words,
|
|
549
|
-
anyWord: anyWord || discover,
|
|
550
|
-
...(request.exact ? { exact: true } : {}),
|
|
551
|
-
kinds: ["issue", "project", "comment"],
|
|
552
|
-
limit: deep,
|
|
458
|
+
const found = await trackerLane(store, {
|
|
459
|
+
text: request.text,
|
|
553
460
|
accounts: read,
|
|
461
|
+
depth,
|
|
462
|
+
discover,
|
|
463
|
+
cosines,
|
|
464
|
+
embedders,
|
|
465
|
+
...(request.exact ? { exact: true } : {}),
|
|
466
|
+
...(command === undefined ? {} : { command }),
|
|
467
|
+
...(request.env === undefined ? {} : { env: request.env }),
|
|
554
468
|
});
|
|
555
469
|
hasMore ||= found.hasMore;
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
const ref = `tracker:${at.provider}/${at.account}/${item.kind}/${item.record.externalId}`;
|
|
559
|
-
if (hasGlobalItemIds(at.provider))
|
|
560
|
-
items.set(ref, JSON.stringify([at.provider, item.kind, item.record.externalId]));
|
|
561
|
-
return {
|
|
562
|
-
kind: TRACKER_HIT_KINDS[item.kind],
|
|
563
|
-
// Two sign-ins see the same issue under the same id, so the account keeps their hits apart.
|
|
564
|
-
ref,
|
|
565
|
-
provider: at.provider,
|
|
566
|
-
account: at.account,
|
|
567
|
-
...(item.record.url ? { url: item.record.url } : {}),
|
|
568
|
-
title: trackerTitle(item),
|
|
569
|
-
timestamp: new Date(item.record.updatedAt ?? item.syncedAt).toISOString(),
|
|
570
|
-
text,
|
|
571
|
-
foundBy,
|
|
572
|
-
};
|
|
573
|
-
};
|
|
574
|
-
const byWords = found.items.map(({ account: at, item, excerpt: text }) => hitOf(at, item, text, ["words"]));
|
|
575
|
-
const plain = meaningWordsOf(discover ? questionText(request.text) : request.text);
|
|
576
|
-
let near;
|
|
577
|
-
let meaningSkipped;
|
|
578
|
-
if (request.exact)
|
|
579
|
-
meaningSkipped = "--exact searches words as written";
|
|
580
|
-
else if (plain === undefined)
|
|
581
|
-
meaningSkipped = "the query names a title, which meaning cannot follow";
|
|
582
|
-
else
|
|
583
|
-
try {
|
|
584
|
-
near = await nearestTracker(store, plain, {
|
|
585
|
-
limit: deep,
|
|
586
|
-
accounts: read,
|
|
587
|
-
embedders,
|
|
588
|
-
...(command === undefined ? {} : { command }),
|
|
589
|
-
...(request.env === undefined ? {} : { env: request.env }),
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
catch (error) {
|
|
593
|
-
if (!(error instanceof CliError && error.code === "not_found"))
|
|
594
|
-
throw error;
|
|
595
|
-
meaningSkipped = error.message;
|
|
596
|
-
}
|
|
597
|
-
tracker = {
|
|
598
|
-
by: near === undefined ? "words" : "words and meaning",
|
|
599
|
-
...(meaningSkipped === undefined ? {} : { meaningSkipped }),
|
|
600
|
-
};
|
|
601
|
-
if (near === undefined)
|
|
602
|
-
lists.push(oneHitPerItem(byWords, cosines, items));
|
|
603
|
-
else {
|
|
604
|
-
const byMeaning = near.map(({ account: at, item, score }) => ({
|
|
605
|
-
hit: hitOf(at, item, trackerExcerpt(item, request.text), ["meaning"]),
|
|
606
|
-
score,
|
|
607
|
-
}));
|
|
608
|
-
lists.push(oneHitPerItem(fusedLane(byWords, byMeaning, discover, cosines), cosines, items));
|
|
609
|
-
}
|
|
470
|
+
tracker = found.tracker;
|
|
471
|
+
lists.push(found.hits);
|
|
610
472
|
for (const { provider, account } of read)
|
|
611
473
|
accounts.push({ resource, provider, account });
|
|
612
474
|
}
|
|
613
475
|
else if (resource === "business") {
|
|
614
|
-
const { words, anyWord } = titleWords(request.text, BUSINESS_WORDS_ONLY);
|
|
476
|
+
const { words, anyWord } = contentWords(titleWords(request.text, BUSINESS_WORDS_ONLY), discover);
|
|
615
477
|
const found = await searchBusiness(store, {
|
|
616
478
|
words,
|
|
617
479
|
anyWord: anyWord || discover,
|
|
@@ -740,46 +602,3 @@ const withMeetingDocuments = async (store, lists, read) => {
|
|
|
740
602
|
];
|
|
741
603
|
}));
|
|
742
604
|
};
|
|
743
|
-
/** Passages of one meeting share its `ref`, the reference evidence cites; each is still a hit of its own. */
|
|
744
|
-
const hitKey = (item) => item.kind === "meeting" ? `${item.ref}\u0000${item.scope}\u0000${item.id}` : item.ref;
|
|
745
|
-
/**
|
|
746
|
-
* Every source's hits as one list: each source's best hit first, then every other hit by cosine, then by its rank in
|
|
747
|
-
* its source. Taking turns by rank (MEMO-37) gave each of two sources half of a ten-hit page however weak its hits;
|
|
748
|
-
* one model scores every source, so cosine compares across them (IDEA-249). A hit only words found takes the cosine of
|
|
749
|
-
* the hit above it in its source: its source ranked it there, and with none it would follow every hit meaning found.
|
|
750
|
-
*/
|
|
751
|
-
const oneList = (lists, cosines) => {
|
|
752
|
-
const place = new Map();
|
|
753
|
-
for (const list of lists) {
|
|
754
|
-
let above = Number.NEGATIVE_INFINITY;
|
|
755
|
-
list.forEach((item, rank) => {
|
|
756
|
-
const key = hitKey(item);
|
|
757
|
-
above = cosines.get(item.ref) ?? above;
|
|
758
|
-
const held = place.get(key);
|
|
759
|
-
if (!held || rank < held.rank)
|
|
760
|
-
place.set(key, { item, rank, cosine: above });
|
|
761
|
-
});
|
|
762
|
-
}
|
|
763
|
-
const head = (rank) => Math.min(rank, 1);
|
|
764
|
-
return [...place.values()]
|
|
765
|
-
.sort((a, b) => head(a.rank) - head(b.rank) || b.cosine - a.cosine || a.rank - b.rank)
|
|
766
|
-
.map(({ item }) => item);
|
|
767
|
-
};
|
|
768
|
-
const PERIOD_DEPTH = 100;
|
|
769
|
-
const PERIOD_BOOST = 0.5;
|
|
770
|
-
/**
|
|
771
|
-
* A hit dated inside the question's period gains 0.5 over its place, 1 - rank/100: by rank, because only some hits have
|
|
772
|
-
* a cosine to compare. One scale for every page, so paging past the first 100 never reorders what came before.
|
|
773
|
-
*/
|
|
774
|
-
const insidePeriodFirst = (ordered, period) => {
|
|
775
|
-
if (!period)
|
|
776
|
-
return ordered;
|
|
777
|
-
const inside = ({ timestamp }) => {
|
|
778
|
-
const at = timestamp === null ? Number.NaN : Date.parse(timestamp);
|
|
779
|
-
return at >= period.from && at < period.to;
|
|
780
|
-
};
|
|
781
|
-
return ordered
|
|
782
|
-
.map((item, rank) => ({ item, score: 1 - rank / PERIOD_DEPTH + (inside(item) ? PERIOD_BOOST : 0) }))
|
|
783
|
-
.sort((a, b) => b.score - a.score)
|
|
784
|
-
.map(({ item }) => item);
|
|
785
|
-
};
|
|
@@ -87,6 +87,7 @@ export declare const applyTaskRulesSinceLastPass: (store: MessageStore, account:
|
|
|
87
87
|
/**
|
|
88
88
|
* A reply rule's `task` action: one `request` task pointing at the message. The service gives back
|
|
89
89
|
* the task a source already has, so a message arriving twice opens one.
|
|
90
|
+
* @experimental
|
|
90
91
|
*/
|
|
91
92
|
export declare const openRequestTask: (store: MessageStore, account: AccountKey, message: Message) => Promise<boolean>;
|
|
92
93
|
/** What `tasks scan` did, or would do without `--yes`, in one chat. */
|
|
@@ -199,6 +199,7 @@ export const applyTaskRulesSinceLastPass = async (store, account, now = new Date
|
|
|
199
199
|
/**
|
|
200
200
|
* A reply rule's `task` action: one `request` task pointing at the message. The service gives back
|
|
201
201
|
* the task a source already has, so a message arriving twice opens one.
|
|
202
|
+
* @experimental
|
|
202
203
|
*/
|
|
203
204
|
export const openRequestTask = async (store, account, message) => {
|
|
204
205
|
const { created } = await createTaskService({ store: store.tasks }).add({
|
package/dist/services/tasks.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface TaskView extends Task {
|
|
|
22
22
|
updatedAt: string;
|
|
23
23
|
} | null;
|
|
24
24
|
}
|
|
25
|
+
/** @experimental */
|
|
25
26
|
export declare const TASK_QUERY: {
|
|
26
27
|
readonly entity: "task";
|
|
27
28
|
readonly backend: "sql";
|
|
@@ -42,6 +43,7 @@ export declare const TASK_STATS_QUERY: {
|
|
|
42
43
|
/** Which pairs `tasks duplicates list` lists: those waiting for the reviewing agent, or those it left to the owner. */
|
|
43
44
|
export declare const PAIR_DECISIONS: readonly ["review", "unsure"];
|
|
44
45
|
export type PairDecision = (typeof PAIR_DECISIONS)[number];
|
|
46
|
+
/** @experimental */
|
|
45
47
|
export declare const TASK_PAIR_QUERY: {
|
|
46
48
|
readonly entity: "task_pair";
|
|
47
49
|
readonly backend: "sql";
|
package/dist/services/tasks.js
CHANGED
|
@@ -12,6 +12,7 @@ import { taskAccount } from "./task-rules.js";
|
|
|
12
12
|
import { PERIOD_FIELD, taskStatsOf } from "./task-stats.js";
|
|
13
13
|
import { taskTagFilters } from "./task-tag-filters.js";
|
|
14
14
|
export { TASK_KINDS, TASK_STATES };
|
|
15
|
+
/** @experimental */
|
|
15
16
|
export const TASK_QUERY = {
|
|
16
17
|
entity: "task",
|
|
17
18
|
backend: "sql",
|
|
@@ -60,6 +61,7 @@ export const TASK_STATS_QUERY = {
|
|
|
60
61
|
};
|
|
61
62
|
/** Which pairs `tasks duplicates list` lists: those waiting for the reviewing agent, or those it left to the owner. */
|
|
62
63
|
export const PAIR_DECISIONS = ["review", "unsure"];
|
|
64
|
+
/** @experimental */
|
|
63
65
|
export const TASK_PAIR_QUERY = {
|
|
64
66
|
entity: "task_pair",
|
|
65
67
|
backend: "sql",
|
|
@@ -20,7 +20,7 @@ export const embedTracker = async (store, options = {}) => {
|
|
|
20
20
|
export const nearestTracker = async (store, words, { limit, accounts, env, command, embedders, }) => {
|
|
21
21
|
const { model, directory, key } = localModel(await meaningModel(store, env), env, command);
|
|
22
22
|
if (!(await store.tracker.embedded(key, accounts)))
|
|
23
|
-
throw new CliError("not_found", `no issue, project or comment has vectors of ${model.id} yet, so only words were matched
|
|
23
|
+
throw new CliError("not_found", `no issue, project or comment has vectors of ${model.id} yet, so only words were matched`, { reason: "tracker.no-vectors", model: model.id });
|
|
24
24
|
const [vector] = await withLocal(model, directory, undefined, (embedder) => embedder.embed([words], "query"), embedders);
|
|
25
25
|
const floor = meaningFloor(key);
|
|
26
26
|
return (await store.tracker.nearest(key, vector, { limit, accounts })).filter(({ score }) => score > floor);
|
package/dist/setup/document.d.ts
CHANGED
|
@@ -4,9 +4,12 @@ import * as v from "valibot";
|
|
|
4
4
|
* and the docs render. Desktop treats the document as untrusted input, so this schema is the contract it copies
|
|
5
5
|
* (`test/fixtures/setup-v1/`). Unknown keys pass everywhere but in conditions: a newer CLI may add an optional key,
|
|
6
6
|
* and an older renderer ignores it.
|
|
7
|
+
* @experimental
|
|
7
8
|
*/
|
|
8
9
|
export declare const SETUP_FORMAT = "wirecat.setup";
|
|
10
|
+
/** @experimental */
|
|
9
11
|
export declare const SETUP_VERSION = 1;
|
|
12
|
+
/** @experimental */
|
|
10
13
|
export declare const SETUP_LIMITS: {
|
|
11
14
|
readonly bytes: number;
|
|
12
15
|
readonly steps: 60;
|
|
@@ -15,6 +18,7 @@ export declare const SETUP_LIMITS: {
|
|
|
15
18
|
readonly transitions: 100;
|
|
16
19
|
readonly imageBytes: number;
|
|
17
20
|
};
|
|
21
|
+
/** @experimental */
|
|
18
22
|
export declare const SETUP_PATTERNS: {
|
|
19
23
|
readonly step: RegExp;
|
|
20
24
|
readonly input: RegExp;
|
|
@@ -31,16 +35,27 @@ export declare const SETUP_PATTERNS: {
|
|
|
31
35
|
readonly file: RegExp;
|
|
32
36
|
readonly href: RegExp;
|
|
33
37
|
};
|
|
38
|
+
/** @experimental */
|
|
34
39
|
export declare const BLOCK_TYPES: readonly ["text", "heading", "note", "image", "code", "input", "choice", "group", "link", "requirement", "divider"];
|
|
35
40
|
export type BlockType = (typeof BLOCK_TYPES)[number];
|
|
41
|
+
/** @experimental */
|
|
36
42
|
export declare const INPUT_KINDS: readonly ["text", "number", "port", "toggle", "password", "file", "folder", "select", "multiselect", "countries", "timezone"];
|
|
37
43
|
export type InputKind = (typeof INPUT_KINDS)[number];
|
|
38
44
|
export declare const STEP_KINDS: readonly ["form", "run", "done"];
|
|
39
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* What a block is; how it is laid out is `class`. A role a renderer does not know is drawn as the default.
|
|
47
|
+
* @experimental
|
|
48
|
+
*/
|
|
40
49
|
export declare const BLOCK_ROLES: Partial<Record<BlockType, readonly string[]>>;
|
|
41
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The reserved display classes. Desktop maps each to its own design tokens; any other name is ignored.
|
|
52
|
+
* @experimental
|
|
53
|
+
*/
|
|
42
54
|
export declare const DISPLAY_CLASSES: readonly ["w-auto", "w-1/3", "w-1/2", "w-2/3", "w-full", "w-narrow", "h-sm", "h-md", "h-lg", "h-xl", "grow-1", "grow-2", "grow-3", "grow-4", "mt-none", "mt-sm", "mt-md", "mt-lg", "mb-none", "mb-sm", "mb-md", "mb-lg", "gap-sm", "gap-md", "gap-lg", "start", "center", "end", "text-sm", "text-lg", "muted", "strong", "mono", "raised", "outlined", "accent", "first", "last", "hide-narrow", "hide-wide", "cols-2", "cols-3"];
|
|
43
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* The run actions cli-core runs itself. A tool's own (`oauth`, `qr`) are reserved in the format, not built in v1.
|
|
57
|
+
* @experimental
|
|
58
|
+
*/
|
|
44
59
|
export declare const BUILT_IN_ACTIONS: readonly ["apply"];
|
|
45
60
|
export type Condition = {
|
|
46
61
|
field: string;
|
|
@@ -199,7 +214,8 @@ export interface SetupDocument {
|
|
|
199
214
|
set: true;
|
|
200
215
|
}>;
|
|
201
216
|
}
|
|
217
|
+
/** @experimental */
|
|
202
218
|
export declare const setupDocumentSchema: v.GenericSchema<SetupDocument>;
|
|
203
|
-
/** The document's JSON Schema (draft-07), the one Desktop checks a description against. */
|
|
219
|
+
/** The document's JSON Schema (draft-07), the one Desktop checks a description against. @experimental */
|
|
204
220
|
export declare const setupJsonSchema: () => Record<string, unknown>;
|
|
205
221
|
export {};
|
package/dist/setup/document.js
CHANGED
|
@@ -5,9 +5,12 @@ import * as v from "valibot";
|
|
|
5
5
|
* and the docs render. Desktop treats the document as untrusted input, so this schema is the contract it copies
|
|
6
6
|
* (`test/fixtures/setup-v1/`). Unknown keys pass everywhere but in conditions: a newer CLI may add an optional key,
|
|
7
7
|
* and an older renderer ignores it.
|
|
8
|
+
* @experimental
|
|
8
9
|
*/
|
|
9
10
|
export const SETUP_FORMAT = "wirecat.setup";
|
|
11
|
+
/** @experimental */
|
|
10
12
|
export const SETUP_VERSION = 1;
|
|
13
|
+
/** @experimental */
|
|
11
14
|
export const SETUP_LIMITS = {
|
|
12
15
|
bytes: 256 * 1024,
|
|
13
16
|
steps: 60,
|
|
@@ -17,6 +20,7 @@ export const SETUP_LIMITS = {
|
|
|
17
20
|
imageBytes: 2 * 1024 * 1024,
|
|
18
21
|
};
|
|
19
22
|
// No lookahead anywhere: Desktop checks these patterns in Rust, whose regex has none.
|
|
23
|
+
/** @experimental */
|
|
20
24
|
export const SETUP_PATTERNS = {
|
|
21
25
|
step: /^[a-z][a-z0-9-]{0,47}$/,
|
|
22
26
|
input: /^[a-z][a-z0-9_-]{0,47}$/,
|
|
@@ -33,6 +37,7 @@ export const SETUP_PATTERNS = {
|
|
|
33
37
|
file: /^[A-Za-z0-9_-][A-Za-z0-9._-]*(\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*\.(png|jpe?g|webp)$/,
|
|
34
38
|
href: /^https:\/\/[^\s"<>]{1,2000}$/,
|
|
35
39
|
};
|
|
40
|
+
/** @experimental */
|
|
36
41
|
export const BLOCK_TYPES = [
|
|
37
42
|
"text",
|
|
38
43
|
"heading",
|
|
@@ -46,6 +51,7 @@ export const BLOCK_TYPES = [
|
|
|
46
51
|
"requirement",
|
|
47
52
|
"divider",
|
|
48
53
|
];
|
|
54
|
+
/** @experimental */
|
|
49
55
|
export const INPUT_KINDS = [
|
|
50
56
|
"text",
|
|
51
57
|
"number",
|
|
@@ -60,13 +66,19 @@ export const INPUT_KINDS = [
|
|
|
60
66
|
"timezone",
|
|
61
67
|
];
|
|
62
68
|
export const STEP_KINDS = ["form", "run", "done"];
|
|
63
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* What a block is; how it is laid out is `class`. A role a renderer does not know is drawn as the default.
|
|
71
|
+
* @experimental
|
|
72
|
+
*/
|
|
64
73
|
export const BLOCK_ROLES = {
|
|
65
74
|
note: ["tip", "info", "warning", "danger", "success"],
|
|
66
75
|
group: ["card", "details", "row"],
|
|
67
76
|
link: ["button", "inline"],
|
|
68
77
|
};
|
|
69
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* The reserved display classes. Desktop maps each to its own design tokens; any other name is ignored.
|
|
80
|
+
* @experimental
|
|
81
|
+
*/
|
|
70
82
|
export const DISPLAY_CLASSES = [
|
|
71
83
|
...["w-auto", "w-1/3", "w-1/2", "w-2/3", "w-full", "w-narrow"],
|
|
72
84
|
...["h-sm", "h-md", "h-lg", "h-xl"],
|
|
@@ -79,7 +91,10 @@ export const DISPLAY_CLASSES = [
|
|
|
79
91
|
...["hide-narrow", "hide-wide"],
|
|
80
92
|
...["cols-2", "cols-3"],
|
|
81
93
|
];
|
|
82
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* The run actions cli-core runs itself. A tool's own (`oauth`, `qr`) are reserved in the format, not built in v1.
|
|
96
|
+
* @experimental
|
|
97
|
+
*/
|
|
83
98
|
export const BUILT_IN_ACTIONS = ["apply"];
|
|
84
99
|
const pattern = (regex, what) => v.pipe(v.string(), v.regex(regex, `has to be ${what}`));
|
|
85
100
|
const textId = pattern(SETUP_PATTERNS.text, "a text id");
|
|
@@ -184,6 +199,7 @@ const STEP = v.looseObject({
|
|
|
184
199
|
result: v.optional(stepId),
|
|
185
200
|
});
|
|
186
201
|
const TEXTS = v.record(textId, v.pipe(v.string(), v.maxLength(4000)));
|
|
202
|
+
/** @experimental */
|
|
187
203
|
export const setupDocumentSchema = v.looseObject({
|
|
188
204
|
format: v.literal(SETUP_FORMAT),
|
|
189
205
|
version: v.literal(SETUP_VERSION),
|
|
@@ -200,7 +216,7 @@ export const setupDocumentSchema = v.looseObject({
|
|
|
200
216
|
texts: v.objectWithRest({ en: TEXTS }, TEXTS),
|
|
201
217
|
values: v.optional(v.record(v.string(), v.union([value, v.strictObject({ set: v.literal(true) })]))),
|
|
202
218
|
});
|
|
203
|
-
/** The document's JSON Schema (draft-07), the one Desktop checks a description against. */
|
|
219
|
+
/** The document's JSON Schema (draft-07), the one Desktop checks a description against. @experimental */
|
|
204
220
|
export const setupJsonSchema = () => {
|
|
205
221
|
const schema = toJsonSchema(setupDocumentSchema, {
|
|
206
222
|
errorMode: "ignore",
|
package/dist/setup/plain.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* `[…](…)` as typed. Headings, bold and code lose their marks. A link keeps its address beside its words, since the
|
|
4
4
|
* address is what a person copies, unless `link` draws it, as a terminal that shows OSC 8 links does. Single `*` and
|
|
5
5
|
* `_` stay: in plain text they are as often a product or a name as italics.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
export declare const plainSetupText: (text: string, { link, }?: {
|
|
8
9
|
link?: (label: string, href: string) => string;
|
package/dist/setup/plain.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* `[…](…)` as typed. Headings, bold and code lose their marks. A link keeps its address beside its words, since the
|
|
4
4
|
* address is what a person copies, unless `link` draws it, as a terminal that shows OSC 8 links does. Single `*` and
|
|
5
5
|
* `_` stay: in plain text they are as often a product or a name as italics.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
export const plainSetupText = (text, { link = (label, href) => `${label} (${href})`, } = {}) => text
|
|
8
9
|
.replace(/^#{1,3} +/gm, "")
|
package/dist/speech/hearing.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface Kept {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Transcripts already heard, in the shared store, for the account this profile last logged in as
|
|
41
|
-
* (owner
|
|
41
|
+
* (the owner's decision). A profile that has never been online has no account yet: nothing is kept for
|
|
42
42
|
* it, and a voice message is heard again next time.
|
|
43
43
|
*/
|
|
44
44
|
export declare const openKept: (messenger: Messenger, profile: string, env: NodeJS.ProcessEnv) => Promise<Kept>;
|
package/dist/speech/hearing.js
CHANGED
|
@@ -18,7 +18,7 @@ export const isVoice = (message) => message.attachments.some(({ kind, mime }) =>
|
|
|
18
18
|
export const hasAudio = (message) => message.attachments.some(isAudioFile);
|
|
19
19
|
/**
|
|
20
20
|
* Transcripts already heard, in the shared store, for the account this profile last logged in as
|
|
21
|
-
* (owner
|
|
21
|
+
* (the owner's decision). A profile that has never been online has no account yet: nothing is kept for
|
|
22
22
|
* it, and a voice message is heard again next time.
|
|
23
23
|
*/
|
|
24
24
|
export const openKept = async (messenger, profile, env) => {
|
package/dist/speech/models.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* holds the owner's session.
|
|
5
5
|
*
|
|
6
6
|
* Measured 2026-09-24 through the WebAssembly build of sherpa-onnx, one thread, a Ryzen AI 9 HX 470
|
|
7
|
-
* laptop, 5 minutes of Ogg Opus cut by VAD, Node 24 and Bun 1.3.14 alike
|
|
7
|
+
* laptop, 5 minutes of Ogg Opus cut by VAD, Node 24 and Bun 1.3.14 alike:
|
|
8
8
|
* `gigaam-v3` ×7 real time, `gigaam-v3-ctc` ×8, `parakeet-v3` ×5 and 1.3 GB of memory. Whisper small
|
|
9
9
|
* ran at ×1.1 and is not offered.
|
|
10
10
|
*/
|
package/dist/sqlite-runtime.d.ts
CHANGED
|
@@ -19,10 +19,12 @@ export interface SqliteRuntime {
|
|
|
19
19
|
* what makes it safe — later in the command it could repeat an action.
|
|
20
20
|
*/
|
|
21
21
|
export declare const ensureSqlite: (runtime?: SqliteRuntime) => Promise<void>;
|
|
22
|
+
/** @experimental */
|
|
22
23
|
export declare const nodeRuntime: () => SqliteRuntime;
|
|
23
24
|
/**
|
|
24
25
|
* The parent stays while the command runs in the child: it passes on what stops it — an MCP client
|
|
25
26
|
* or `kill <pid>` signals the process it started — and leaves with the child's code or signal. The
|
|
26
27
|
* terminal sends Ctrl-C to both, so the parent ignores SIGINT and waits.
|
|
28
|
+
* @experimental
|
|
27
29
|
*/
|
|
28
30
|
export declare const relay: (child: ChildProcess, host?: Pick<NodeJS.Process, "on" | "exit" | "kill" | "pid" | "removeAllListeners">) => Promise<never>;
|
package/dist/sqlite-runtime.js
CHANGED
|
@@ -53,6 +53,7 @@ const trialScript = (version) => `
|
|
|
53
53
|
if (database.prepare("SELECT sqlite_version() AS v").get().v !== ${JSON.stringify(version)}) process.exit(1)
|
|
54
54
|
for (const statement of ${JSON.stringify(CAPABILITY_STATEMENTS)}) database.exec(statement)
|
|
55
55
|
`;
|
|
56
|
+
/** @experimental */
|
|
56
57
|
export const nodeRuntime = () => ({
|
|
57
58
|
env: process.env,
|
|
58
59
|
platform: process.platform,
|
|
@@ -87,6 +88,7 @@ export const nodeRuntime = () => ({
|
|
|
87
88
|
* The parent stays while the command runs in the child: it passes on what stops it — an MCP client
|
|
88
89
|
* or `kill <pid>` signals the process it started — and leaves with the child's code or signal. The
|
|
89
90
|
* terminal sends Ctrl-C to both, so the parent ignores SIGINT and waits.
|
|
91
|
+
* @experimental
|
|
90
92
|
*/
|
|
91
93
|
export const relay = (child, host = process) => new Promise(() => {
|
|
92
94
|
for (const signal of FORWARDED)
|
|
@@ -45,7 +45,7 @@ export interface AccountAreas {
|
|
|
45
45
|
tags: () => Area<TagsStore>;
|
|
46
46
|
mentions: () => Area<AccountMentions>;
|
|
47
47
|
}
|
|
48
|
-
/** One account's mail: the thread and email ids of another account read as nothing. */
|
|
48
|
+
/** One account's mail: the thread and email ids of another account read as nothing. @experimental */
|
|
49
49
|
export interface AccountMail {
|
|
50
50
|
threads(filter?: Omit<MailFilter, "accountId">): Promise<EmailThread[]>;
|
|
51
51
|
thread(id: number): Promise<ThreadDetails | null>;
|
|
@@ -53,7 +53,7 @@ export interface AccountMail {
|
|
|
53
53
|
emails(filter?: Omit<EmailFilter, "accountId">): Promise<Email[]>;
|
|
54
54
|
mailboxes(): Promise<Mailbox[]>;
|
|
55
55
|
}
|
|
56
|
-
/** One account's meetings: a meeting id of another account reads as nothing. */
|
|
56
|
+
/** One account's meetings: a meeting id of another account reads as nothing. @experimental */
|
|
57
57
|
export interface AccountMeetings {
|
|
58
58
|
meetings(filter?: Omit<MeetingFilter, "accountId">): Promise<Meeting[]>;
|
|
59
59
|
meeting(id: number): Promise<MeetingDetails | null>;
|
|
@@ -62,6 +62,7 @@ export interface AccountMeetings {
|
|
|
62
62
|
/**
|
|
63
63
|
* The store with one account bound: every read and write takes the account from here, and a row id
|
|
64
64
|
* of another account is not found. A read across accounts goes to the whole store, by name.
|
|
65
|
+
* @experimental
|
|
65
66
|
*/
|
|
66
67
|
export interface AccountStore {
|
|
67
68
|
readonly account: AccountKey;
|
package/dist/store/accounts.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ProviderEntry } from "../domain/providers.js";
|
|
|
2
2
|
import { type AccountGroups, type Profiles } from "../search/account-list.js";
|
|
3
3
|
import type { StoreContext } from "./sqlite/open.js";
|
|
4
4
|
import type { AccountKey, StoredAccount } from "./types.js";
|
|
5
|
+
/** @experimental */
|
|
5
6
|
export interface AccountAccounts {
|
|
6
7
|
/**
|
|
7
8
|
* Answers the store's id for the account, which `meetings` and `mail` take. `scope` is what a new account starts
|