@wirecat/cli-core 0.752.0 → 1.0.0-rc.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 +162 -0
- package/README.md +9 -6
- 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/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 +1 -0
- 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 +3 -2
- package/dist/cli/bot/api-input.js +3 -2
- 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/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/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 +4 -1
- 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/index.d.ts +1 -1
- package/dist/crm/index.js +1 -1
- package/dist/crm/manifest/paths.d.ts +1 -1
- package/dist/crm/manifest/writer.d.ts +23 -4
- package/dist/crm/manifest/writer.js +46 -8
- 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/writer.d.ts +3 -2
- package/dist/crm/writer.js +9 -3
- package/dist/crm/writes.d.ts +4 -2
- package/dist/crm/writes.js +8 -5
- 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/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/knowledge-lists.d.ts +3 -0
- package/dist/entities/knowledge-lists.js +3 -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 +5 -38
- 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/headers.d.ts +9 -5
- package/dist/mail/headers.js +63 -5
- 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/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.d.ts +1 -1
- package/dist/services/search-all.js +2 -2
- 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/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 +40 -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/index.js +1 -0
- 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/messages.js +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 +5 -4
- 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/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/email-activity.d.ts +1 -1
- package/dist/store/sqlite/email-activity.js +4 -1
- 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/manifest.js +105 -0
- package/dist/store/sqlite/meeting-documents.js +0 -6
- package/dist/store/sqlite/messages.d.ts +6 -1
- package/dist/store/sqlite/messages.js +14 -4
- package/dist/store/sqlite/migrations.generated.js +652 -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/people-list.d.ts +5 -0
- package/dist/store/sqlite/people-list.js +28 -5
- 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 +17 -17
- 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/record-projectors-phone.js +2 -1
- 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/tag-consolidations.js +5 -2
- package/dist/store/sqlite/schema/templates.js +1 -1
- package/dist/store/sqlite/schema.js +243 -108
- package/dist/store/sqlite/sender-signals.d.ts +42 -0
- package/dist/store/sqlite/sender-signals.js +106 -0
- 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-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.js +3 -1
- 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 +12 -5
- package/dist/tracker/testing/manifest-fake.d.ts +2 -1
- 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,7 +4,7 @@ import { SnapshotBudget } from "../sqlite/project-transfer/budget.js";
|
|
|
4
4
|
import { projectAnnotationSnapshot } from "../sqlite/project-transfer/snapshot.js";
|
|
5
5
|
import { projectAnnotationSnapshotFingerprint } from "./snapshot-model.js";
|
|
6
6
|
export { decodeProjectAnnotationSnapshot, projectAnnotationSnapshotFingerprint, projectAnnotationSnapshotSchema, } from "./snapshot-model.js";
|
|
7
|
-
/** No source maintenance, source fetching or output-file publication belongs to a snapshot read. */
|
|
7
|
+
/** No source maintenance, source fetching or output-file publication belongs to a snapshot read. @experimental */
|
|
8
8
|
export const snapshotProjectAnnotations = async (options) => {
|
|
9
9
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
10
10
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import type { ProjectAnnotationPreview } from "./snapshot-plan.js";
|
|
2
|
+
/** @experimental */
|
|
2
3
|
export interface ProjectAnnotationTargetRequest {
|
|
3
4
|
snapshot: string;
|
|
4
5
|
project: string;
|
|
5
6
|
bindings: Record<string, string>;
|
|
6
7
|
maxReadBytes?: number;
|
|
7
8
|
}
|
|
9
|
+
/** @experimental */
|
|
8
10
|
export interface ProjectAnnotationRestoreRequest extends ProjectAnnotationTargetRequest {
|
|
9
11
|
fingerprint: string;
|
|
10
12
|
}
|
|
13
|
+
/** @experimental */
|
|
11
14
|
export interface ProjectAnnotationRestoreReceipt {
|
|
12
15
|
project: string;
|
|
13
16
|
fingerprint: string;
|
|
@@ -18,7 +21,7 @@ export interface ProjectAnnotationRestoreReceipt {
|
|
|
18
21
|
links: number;
|
|
19
22
|
};
|
|
20
23
|
}
|
|
21
|
-
/** Hosts authorize restore before calling; historical accepted state is not a new agent decision. */
|
|
24
|
+
/** Hosts authorize restore before calling; historical accepted state is not a new agent decision. @experimental */
|
|
22
25
|
export interface ProjectAnnotationStore {
|
|
23
26
|
preview(request: ProjectAnnotationTargetRequest): Promise<ProjectAnnotationPreview>;
|
|
24
27
|
restore(request: ProjectAnnotationRestoreRequest): Promise<ProjectAnnotationRestoreReceipt>;
|
|
@@ -3,5 +3,6 @@ import type { MessageStore } from "./store.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* A CLI's entry, written into the store on every run so cli-core in every other CLI knows its provider's kind and
|
|
5
5
|
* aliases. Two entries that disagree on a kind, or an alias another provider already has, are an error.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
export declare const registerProvider: (store: Pick<MessageStore, "accounts">, entry: ProviderEntry) => Promise<void>;
|
package/dist/store/providers.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A CLI's entry, written into the store on every run so cli-core in every other CLI knows its provider's kind and
|
|
3
3
|
* aliases. Two entries that disagree on a kind, or an alias another provider already has, are an error.
|
|
4
|
+
* @experimental
|
|
4
5
|
*/
|
|
5
6
|
export const registerProvider = (store, entry) => store.accounts.registerProvider(entry);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type { ContextEvidenceItem, ContextEvidencePage, ContextEvidenceReader, ContextEvidenceRequest, ContextEvidenceSender, ContextSource, } from "../context/evidence.js";
|
|
2
|
+
export { BUSINESS_KINDS, type BusinessKind } from "../domain/business.js";
|
|
3
|
+
export { FACT_STATUSES, FACT_TYPES, MEMORY_KINDS, MEMORY_SCOPES, MEMORY_STATUSES, TASK_TYPES, WORK_TASK_TYPES, } from "../domain/knowledge.js";
|
|
4
|
+
export { type KindSignal, PERSON_KINDS, type PersonKind } from "../domain/person-kinds.js";
|
|
5
|
+
export type { RefState, RefSummary, RefSummaryKind, RefsStore } from "../domain/ref-summaries.js";
|
|
6
|
+
export type { TagConsolidationApplyOptions, TagConsolidationOptions, TagConsolidationPreview, TagConsolidationReceipt, TagConsolidationStore, } from "../domain/tag-consolidation.js";
|
|
7
|
+
export type { TagRedirectIndex, TagRedirectResolution, TagRedirectSnapshot } from "../domain/tag-redirects.js";
|
|
8
|
+
export { createTagRedirectIndex } from "../domain/tag-redirects.js";
|
|
9
|
+
export { note } from "../entities/note.js";
|
|
10
|
+
export type { FindingEvidence, FindingOutcome, MeetingContextReadCapabilities, MeetingFactFinding, MeetingFinding, MeetingFindingsInput, MeetingFindingsReceipt, MeetingReadCapabilities, MeetingReadScope, MeetingTaskFinding, TranscriptContextInput, TranscriptContextPage, TranscriptPage, TranscriptReadScope, TranscriptRowPage, } from "../meetings/index.js";
|
|
11
|
+
export { PAYMENT_DIRECTIONS, PAYMENT_STATES, type Payment, paymentTitle, validatePayment } from "../meetings/index.js";
|
|
12
|
+
export { CLOSED_STATES, isClosedState, PRIORITY_LABELS, type PriorityLabel, priorityLabel, priorityOf, priorityOption, TASK_STATES, type TaskState, } from "../tasks/index.js";
|
|
13
|
+
export type { AccountMail, AccountMeetings, AccountStore } from "./account-store.js";
|
|
14
|
+
export { type DamageCause, type DamageFindings, type RecoveryStep, type StoreDamageReport, storeDamageReport, } from "./damage.js";
|
|
15
|
+
export { CALLBACK_PREFIX, callbackDataOf, DECISION_ACTIONS, DECISION_TTL_MS, type DecisionAction, isDecisionToken, parseCallbackData, } from "./decision-requests.js";
|
|
16
|
+
export { assertMayDecide, DEFAULT_DECISION_POLICY, type Decider, type DecisionPolicy, isOwnerOnlyKind, mayDecide, type Proposer, type Refusal, } from "./decisions.js";
|
|
17
|
+
export type { DocumentTransferOptions, DocumentTransferPreview, DocumentTransferReceipt, } from "./document-transfer/index.js";
|
|
18
|
+
export { applyDocumentTransfer, previewDocumentTransfer } from "./document-transfer/index.js";
|
|
19
|
+
export type { CacheDatabase, CacheStatement, OpenDatabase, SqlValue } from "./driver.js";
|
|
20
|
+
export { PRAGMAS } from "./driver.js";
|
|
21
|
+
export { type CitableRecord, EVIDENCE_FINDINGS_KIND, type EvidenceFindingsBatch, type EvidenceFindingsDecider, type EvidenceFindingsReceipt, type EvidenceFindingsStore, validateEvidenceFindings, } from "./evidence-findings.js";
|
|
22
|
+
export { type DamagedTable, type InvalidJson, QUICK_HEALTH_CHECKS, type SearchIndexHealth, type StoreHealth, storeHealth, } from "./health.js";
|
|
23
|
+
export { type AgentLink, type AgentLinkInput, type AgentMerge, IDENTITY_LINK_KIND, IDENTITY_LINK_SIGNALS, type IdentityLinkDecision, type IdentityLinkFilter, type IdentityLinkInput, type IdentityLinkPayload, type IdentityLinkRow, type IdentityLinkSignal, LINK_WEAKNESSES, type LinkEvidence, type LinkFact, type LinkHold, type LinkWeakness, type MatchScan, type SharedMailbox, } from "./identity-links.js";
|
|
24
|
+
export { IDENTITY_SPLIT_KIND, type IdentitySplitDecision, type IdentitySplitFilter, type IdentitySplitInput, type IdentitySplitMove, type IdentitySplitPayload, type IdentitySplitRow, } from "./identity-splits.js";
|
|
25
|
+
export { ORGANIZATIONS_QUERY, organization, PROJECTS_QUERY, project, REMINDERS_QUERY, reminder, } from "./knowledge-query.js";
|
|
26
|
+
export { MAIL_FINDINGS_KIND, type MailFindingsBatch, type MailFindingsCheck, type MailFindingsStore, } from "./mail-findings.js";
|
|
27
|
+
export { clearDamageMark, type DamageMark, damageMarkPath, type HealthMark, healthMarkPath, type JournalMark, journalMarkPath, markStoreDamaged, readDamageMark, readHealthMark, readJournalMark, recordDeepCheck, } from "./marks.js";
|
|
28
|
+
export type { MeetingFindingsBatch, MeetingFindingsStore } from "./meeting-findings.js";
|
|
29
|
+
export { MIGRATIONS, type Migration, migrate } from "./migrations.js";
|
|
30
|
+
export { openCache } from "./open.js";
|
|
31
|
+
export { storePath } from "./path.js";
|
|
32
|
+
export { decodeProjectAnnotations, PROJECT_ANNOTATIONS_MAX_BYTES, type ProjectAnnotations, projectAnnotationsFingerprint, } from "./project-transfer/manifest.js";
|
|
33
|
+
export { type ProjectAnnotationsPlan, type ProjectAnnotationsTarget, planProjectAnnotations, } from "./project-transfer/plan.js";
|
|
34
|
+
export { type ProjectAnnotationPreview, type ProjectAnnotationPreviewOptions, previewProjectAnnotationSnapshot, } from "./project-transfer/preview.js";
|
|
35
|
+
export { decodeProjectAnnotationSnapshot, type ProjectAnnotationSnapshot, type ProjectAnnotationSnapshotOptions, type ProjectAnnotationSnapshotResult, projectAnnotationSnapshotFingerprint, projectAnnotationSnapshotSchema, snapshotProjectAnnotations, } from "./project-transfer/snapshot.js";
|
|
36
|
+
export { planProjectAnnotationSnapshot } from "./project-transfer/snapshot-plan.js";
|
|
37
|
+
export type { ProjectAnnotationRestoreReceipt, ProjectAnnotationRestoreRequest, ProjectAnnotationStore, ProjectAnnotationTargetRequest, } from "./project-transfer/store.js";
|
|
38
|
+
export { registerProvider } from "./providers.js";
|
|
39
|
+
export { type ChangedSource, SOURCE_REVIEW_CAUSES, SOURCE_REVIEW_KIND, type SourceCheck, type SourceReviewCause, type SourceReviewChallenge, type SourceReviewMarker, type SourceReviewPayload, type SourceReviewSource, type SourceReviewText, } from "./source-review.js";
|
|
40
|
+
export { type AccountAccounts, type AccountAttachments, type AccountCounters, type AccountGroupChange, type AccountKey, type AccountMentions, type AccountMessageFilter, type AccountMessages, type AccountPeople, type AccountsStore, type AccountVectors, type AttachmentsStore, type ChatStats, type ChatsStore, type ConversationsStore, type CountersStore, type DeletionScope, type Delta, type IdentityRef, type IngestedVia, type LinkedIdentity, type LinkOptions, type MentionsStore, type MessageFilter, type MessageStore, type MessageStoreAreas, type MessageStoreCore, type MessagesStore, openStore, type PeopleStore, type PersonFacts, type PersonRecord, type QueriesStore, type Range, type RosterStore, type SearchesStore, type SearchIndexStore, type StoredAccount, type StoredChatFilter, type StoredHit, type StoreOptions, type SyncStore, type TagsStore, type TaskAnalysisMark, type TaskAnalysisMarkWrite, type VectorsStore, } from "./store.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { BUSINESS_KINDS } from "../domain/business.js";
|
|
2
|
+
export { FACT_STATUSES, FACT_TYPES, MEMORY_KINDS, MEMORY_SCOPES, MEMORY_STATUSES, TASK_TYPES, WORK_TASK_TYPES, } from "../domain/knowledge.js";
|
|
3
|
+
export { PERSON_KINDS } from "../domain/person-kinds.js";
|
|
4
|
+
export { createTagRedirectIndex } from "../domain/tag-redirects.js";
|
|
5
|
+
export { note } from "../entities/note.js";
|
|
6
|
+
export { PAYMENT_DIRECTIONS, PAYMENT_STATES, paymentTitle, validatePayment } from "../meetings/index.js";
|
|
7
|
+
export { CLOSED_STATES, isClosedState, PRIORITY_LABELS, priorityLabel, priorityOf, priorityOption, TASK_STATES, } from "../tasks/index.js";
|
|
8
|
+
export { storeDamageReport, } from "./damage.js";
|
|
9
|
+
export { CALLBACK_PREFIX, callbackDataOf, DECISION_ACTIONS, DECISION_TTL_MS, isDecisionToken, parseCallbackData, } from "./decision-requests.js";
|
|
10
|
+
export { assertMayDecide, DEFAULT_DECISION_POLICY, isOwnerOnlyKind, mayDecide, } from "./decisions.js";
|
|
11
|
+
export { applyDocumentTransfer, previewDocumentTransfer } from "./document-transfer/index.js";
|
|
12
|
+
export { PRAGMAS } from "./driver.js";
|
|
13
|
+
export { EVIDENCE_FINDINGS_KIND, validateEvidenceFindings, } from "./evidence-findings.js";
|
|
14
|
+
export { QUICK_HEALTH_CHECKS, storeHealth, } from "./health.js";
|
|
15
|
+
export { IDENTITY_LINK_KIND, IDENTITY_LINK_SIGNALS, LINK_WEAKNESSES, } from "./identity-links.js";
|
|
16
|
+
export { IDENTITY_SPLIT_KIND, } from "./identity-splits.js";
|
|
17
|
+
export { ORGANIZATIONS_QUERY, organization, PROJECTS_QUERY, project, REMINDERS_QUERY, reminder, } from "./knowledge-query.js";
|
|
18
|
+
export { MAIL_FINDINGS_KIND, } from "./mail-findings.js";
|
|
19
|
+
export { clearDamageMark, damageMarkPath, healthMarkPath, journalMarkPath, markStoreDamaged, readDamageMark, readHealthMark, readJournalMark, recordDeepCheck, } from "./marks.js";
|
|
20
|
+
export { MIGRATIONS, migrate } from "./migrations.js";
|
|
21
|
+
export { openCache } from "./open.js";
|
|
22
|
+
export { storePath } from "./path.js";
|
|
23
|
+
export { decodeProjectAnnotations, PROJECT_ANNOTATIONS_MAX_BYTES, projectAnnotationsFingerprint, } from "./project-transfer/manifest.js";
|
|
24
|
+
export { planProjectAnnotations, } from "./project-transfer/plan.js";
|
|
25
|
+
export { previewProjectAnnotationSnapshot, } from "./project-transfer/preview.js";
|
|
26
|
+
export { decodeProjectAnnotationSnapshot, projectAnnotationSnapshotFingerprint, projectAnnotationSnapshotSchema, snapshotProjectAnnotations, } from "./project-transfer/snapshot.js";
|
|
27
|
+
export { planProjectAnnotationSnapshot } from "./project-transfer/snapshot-plan.js";
|
|
28
|
+
export { registerProvider } from "./providers.js";
|
|
29
|
+
export { SOURCE_REVIEW_CAUSES, SOURCE_REVIEW_KIND, } from "./source-review.js";
|
|
30
|
+
export { openStore, } from "./store.js";
|
package/dist/store/queries.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { type RankedEvidence, type RankingEvidenceRequest } from "./sqlite/ranki
|
|
|
9
9
|
import { type RankedStoreFound, type RankingRequest } from "./sqlite/rankings.js";
|
|
10
10
|
import { type ChatScope, type NewestMessage, type ReplyDelay, type WaitingChat } from "./sqlite/reply-times.js";
|
|
11
11
|
import type { ScoredHit } from "./sqlite/words.js";
|
|
12
|
-
/** A resolved Lucene query run over the store: hits, counts, rankings and the statistics behind them. */
|
|
12
|
+
/** A resolved Lucene query run over the store: hits, counts, rankings and the statistics behind them. @experimental */
|
|
13
13
|
export interface QueriesStore {
|
|
14
14
|
matchQuery(execution: QueryExecution): Promise<Page<ScoredHit>>;
|
|
15
15
|
/** The same matches as `matchQuery`, each counted once, grouped by chat, sender or quarter hour. */
|
package/dist/store/repair.d.ts
CHANGED
|
@@ -32,8 +32,8 @@ export interface RepairReport {
|
|
|
32
32
|
}[];
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* **Brings each table of the file to the shape this build's migrations give it, deleting nothing
|
|
36
|
-
*
|
|
35
|
+
* **Brings each table of the file to the shape this build's migrations give it, deleting nothing**.
|
|
36
|
+
* A table only missing columns it can take gets them added; any other difference keeps
|
|
37
37
|
* the table as a copy named `<table>__repair_<hash>` beside a new one holding every row that fits.
|
|
38
38
|
* `messages` is never renamed — its search index and triggers hang off it — so a difference there
|
|
39
39
|
* is reported, not rebuilt. With `dryRun` the same work runs and is rolled back, so the report is
|
package/dist/store/repair.js
CHANGED
|
@@ -117,8 +117,8 @@ const expectedShapes = (fresh) => {
|
|
|
117
117
|
return new Map([...plainTables(fresh)].map(([name, sql]) => [name, shapeOf(fresh, name, sql)]));
|
|
118
118
|
};
|
|
119
119
|
/**
|
|
120
|
-
* **Brings each table of the file to the shape this build's migrations give it, deleting nothing
|
|
121
|
-
*
|
|
120
|
+
* **Brings each table of the file to the shape this build's migrations give it, deleting nothing**.
|
|
121
|
+
* A table only missing columns it can take gets them added; any other difference keeps
|
|
122
122
|
* the table as a copy named `<table>__repair_<hash>` beside a new one holding every row that fits.
|
|
123
123
|
* `messages` is never renamed — its search index and triggers hang off it — so a difference there
|
|
124
124
|
* is reported, not rebuilt. With `dryRun` the same work runs and is rolled back, so the report is
|
package/dist/store/roster.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { Where } from "./sqlite/query-filter.js";
|
|
|
5
5
|
import { type RetentionResult } from "./sqlite/retention.js";
|
|
6
6
|
import type { MemberCount, MemberStay, ProfileRevision, RosterChange, RosterRead, TrackedChat } from "./sqlite/roster.js";
|
|
7
7
|
import type { AccountKey } from "./types.js";
|
|
8
|
+
/** @experimental */
|
|
8
9
|
export interface RosterStore {
|
|
9
10
|
/** Replaces who is in a chat with this list, whole: a person left out has left. */
|
|
10
11
|
saveMembers(key: AccountKey, chatId: Id, memberIds: Id[]): Promise<void>;
|
|
@@ -2,6 +2,7 @@ import type { Stemmers } from "../search/stem.js";
|
|
|
2
2
|
import type { StoreContext } from "./sqlite/open.js";
|
|
3
3
|
import type { SearchIndexFill, SearchIndexState } from "./sqlite/search-index.js";
|
|
4
4
|
import type { StemsFill, StemsState } from "./sqlite/stems.js";
|
|
5
|
+
/** @experimental */
|
|
5
6
|
export interface SearchIndexStore {
|
|
6
7
|
/** Of `terms`, those the index knows as a word or the beginning of one. */
|
|
7
8
|
knownTerms(terms: string[]): Promise<Set<string>>;
|
package/dist/store/searches.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ListResult } from "@wirecat/cli-base/standards";
|
|
2
2
|
import type { StoreContext } from "./sqlite/open.js";
|
|
3
3
|
import type { SearchCommand, SearchRecord, StoredSearch } from "./sqlite/searches.js";
|
|
4
|
+
/** @experimental */
|
|
4
5
|
export interface SearchesStore {
|
|
5
6
|
/** One run of a search or stats; the same unnamed run again counts on its row. `saved` is the saved search it ran. */
|
|
6
7
|
recordSearch(run: SearchRecord, options?: {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
/** @experimental */
|
|
1
2
|
export declare const SOURCE_REVIEW_KIND = "memory_source_review";
|
|
2
|
-
/** Least severe first: a review moves forward in the queue only when its cause moves right. */
|
|
3
|
+
/** Least severe first: a review moves forward in the queue only when its cause moves right. @experimental */
|
|
3
4
|
export declare const SOURCE_REVIEW_CAUSES: readonly ["changed", "outdated", "deleted", "contradicted"];
|
|
5
|
+
/** @experimental */
|
|
4
6
|
export type SourceReviewCause = (typeof SOURCE_REVIEW_CAUSES)[number];
|
|
5
|
-
/** The open review of a memory or fact, as its reads show it. */
|
|
7
|
+
/** The open review of a memory or fact, as its reads show it. @experimental */
|
|
6
8
|
export interface SourceReviewMarker {
|
|
7
9
|
id: string;
|
|
8
10
|
cause: SourceReviewCause;
|
|
9
11
|
}
|
|
10
|
-
/** One cited source that needs a look; it names the cited version and never copies its text. */
|
|
12
|
+
/** One cited source that needs a look; it names the cited version and never copies its text. @experimental */
|
|
11
13
|
export interface SourceReviewSource {
|
|
12
14
|
/** The `evidence` link's id. */
|
|
13
15
|
link: number;
|
|
@@ -21,6 +23,7 @@ export interface SourceReviewSource {
|
|
|
21
23
|
/** For `outdated`: what replaced the cited fact or memory, following `supersedes`. */
|
|
22
24
|
replacement?: string;
|
|
23
25
|
}
|
|
26
|
+
/** @experimental */
|
|
24
27
|
export interface SourceReviewChallenge {
|
|
25
28
|
evidence: string[];
|
|
26
29
|
reason: string;
|
|
@@ -37,7 +40,7 @@ export interface SourceReviewSuggestion {
|
|
|
37
40
|
evidence: string[];
|
|
38
41
|
at: string;
|
|
39
42
|
}
|
|
40
|
-
/** A `memory_source_review` proposal's payload. */
|
|
43
|
+
/** A `memory_source_review` proposal's payload. @experimental */
|
|
41
44
|
export interface SourceReviewPayload {
|
|
42
45
|
target: string;
|
|
43
46
|
cause: SourceReviewCause;
|
|
@@ -46,6 +49,7 @@ export interface SourceReviewPayload {
|
|
|
46
49
|
challenges: SourceReviewChallenge[];
|
|
47
50
|
suggestions?: SourceReviewSuggestion[];
|
|
48
51
|
}
|
|
52
|
+
/** @experimental */
|
|
49
53
|
export interface SourceCheck {
|
|
50
54
|
/** Evidence links read. */
|
|
51
55
|
checked: number;
|
|
@@ -63,12 +67,15 @@ export interface SourceCheck {
|
|
|
63
67
|
*/
|
|
64
68
|
changedRefs: string[];
|
|
65
69
|
}
|
|
66
|
-
/** A cited source found changed since it was cited, by a check at `checkedAt`. */
|
|
70
|
+
/** A cited source found changed since it was cited, by a check at `checkedAt`. @experimental */
|
|
67
71
|
export interface ChangedSource {
|
|
68
72
|
ref: string;
|
|
69
73
|
checkedAt: string;
|
|
70
74
|
}
|
|
71
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* One source of a review as it was cited and as it is now, for the owner to compare; both are the source's text.
|
|
77
|
+
* @experimental
|
|
78
|
+
*/
|
|
72
79
|
export interface SourceReviewText {
|
|
73
80
|
link: number;
|
|
74
81
|
ref: string | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/** @experimental */
|
|
1
2
|
export const SOURCE_REVIEW_KIND = "memory_source_review";
|
|
2
|
-
/** Least severe first: a review moves forward in the queue only when its cause moves right. */
|
|
3
|
+
/** Least severe first: a review moves forward in the queue only when its cause moves right. @experimental */
|
|
3
4
|
export const SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
4
5
|
/** What stands in a review for words about a source that was erased since. */
|
|
5
6
|
export const ERASED_TEXT = "[source erased]";
|
|
@@ -554,13 +554,18 @@ export const eventStoreOver = (context) => {
|
|
|
554
554
|
}),
|
|
555
555
|
saveEntries: async (calendarId, entries, now) => write(database, () => saveAll(calendarId, entries, now)),
|
|
556
556
|
removeEntries: async (calendarId, externalIds, now) => write(database, () => removeAll(calendarId, externalIds, now)),
|
|
557
|
-
markUnseen: async (calendarId, seenBefore, window, now) => write(database, () => {
|
|
557
|
+
markUnseen: async (calendarId, seenBefore, window, now, { keep = [], dryRun = false } = {}) => write(database, () => {
|
|
558
|
+
const kept = new Set(keep);
|
|
558
559
|
const marked = database
|
|
559
560
|
.prepare(`SELECT * FROM calendar_entries WHERE calendar_id = ? AND deleted_at IS NULL AND (seen_at IS NULL OR seen_at < ?)
|
|
560
561
|
AND min(coalesce(starts_at, original_starts_at), coalesce(original_starts_at, starts_at)) < ? AND (kind = 'series'
|
|
561
562
|
OR max(coalesce(ends_at, 0), coalesce(starts_at, 0) + 1, coalesce(original_starts_at, 0)) >= ?)`)
|
|
562
563
|
.all(calendarId, seenBefore, window.to, window.from)
|
|
563
|
-
.filter((row) => entryInWindow(entryOf(row), window))
|
|
564
|
+
.filter((row) => entryInWindow(entryOf(row), window))
|
|
565
|
+
.filter((row) => !kept.has(String(row.external_id)) &&
|
|
566
|
+
(row.series_external_id == null || !kept.has(String(row.series_external_id))));
|
|
567
|
+
if (dryRun)
|
|
568
|
+
return marked.length;
|
|
564
569
|
const mark = database.prepare("UPDATE calendar_entries SET deleted_at = ?, updated_at = ? WHERE id = ?");
|
|
565
570
|
for (const row of marked)
|
|
566
571
|
mark.run(now, now, Number(row.id));
|
|
@@ -19,7 +19,7 @@ export interface ChatCompleteness {
|
|
|
19
19
|
fetchedAt: string | null;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Three facts per chat
|
|
22
|
+
* Three facts per chat: the newest held against the chat list's, the stretches, and the start reached.
|
|
23
23
|
* A start mark that a later fetch reached past was wrong, so it stops counting.
|
|
24
24
|
*/
|
|
25
25
|
export declare const chatCompleteness: ({ database }: StoreContext, accountKey: number, chatIds: Id[]) => ChatCompleteness[];
|
|
@@ -6,7 +6,7 @@ export const fetchedKey = (chatId) => `fetched:${chatId}`;
|
|
|
6
6
|
/** Set when the store was handed the account's whole chat list (`markChatsLeft`); its `at` is when. */
|
|
7
7
|
export const CHAT_LIST_KEY = "chat_list_complete";
|
|
8
8
|
/**
|
|
9
|
-
* Three facts per chat
|
|
9
|
+
* Three facts per chat: the newest held against the chat list's, the stretches, and the start reached.
|
|
10
10
|
* A start mark that a later fetch reached past was wrong, so it stops counting.
|
|
11
11
|
*/
|
|
12
12
|
export const chatCompleteness = ({ database }, accountKey, chatIds) => {
|
|
@@ -14,7 +14,7 @@ export declare const linkInputs: ({ orm }: StoreContext, chatKey: number, { afte
|
|
|
14
14
|
/** The usernames of everyone who wrote in the chat, lowercased, to their id: what a mention names. */
|
|
15
15
|
export declare const senderHandles: ({ orm }: StoreContext, chatKey: number) => Map<string, Id>;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* The chat's provider and rule links and its conversations are
|
|
18
18
|
* written under a new build number in short transactions; one more makes that build the one readers
|
|
19
19
|
* see; older builds are then deleted, a batch at a time. Until the switch readers see the previous
|
|
20
20
|
* build, so a failed build leaves it in place. Agent links have no build and stay; one whose message
|
|
@@ -89,7 +89,7 @@ const highestBuild = ({ orm }, chatKey) => Number(orm
|
|
|
89
89
|
.from(sql `(SELECT 1)`)
|
|
90
90
|
.get()?.n);
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
92
|
+
* The chat's provider and rule links and its conversations are
|
|
93
93
|
* written under a new build number in short transactions; one more makes that build the one readers
|
|
94
94
|
* see; older builds are then deleted, a batch at a time. Until the switch readers see the previous
|
|
95
95
|
* build, so a failed build leaves it in place. Agent links have no build and stay; one whose message
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AccountKey } from "../types.js";
|
|
2
2
|
/**
|
|
3
|
-
* A profile that may read only part of one CRM account's copy
|
|
3
|
+
* A profile that may read only part of one CRM account's copy: the deals and leads assigned to `assignee`,
|
|
4
4
|
* the identity `<account>/user/<id>`, or none when it is `null`.
|
|
5
5
|
*/
|
|
6
6
|
export interface CopyViewer {
|
|
@@ -39,7 +39,7 @@ export interface ActivityFilter {
|
|
|
39
39
|
/** The identity `<account>/user/<id>` it is assigned to; `null` is none. */
|
|
40
40
|
owner?: string | null;
|
|
41
41
|
/**
|
|
42
|
-
* A profile that may read only part of the copy
|
|
42
|
+
* A profile that may read only part of the copy: the activities on its deals and leads, and those on
|
|
43
43
|
* contacts or companies alone that are assigned to it. A hidden deal or lead is never named in `on`.
|
|
44
44
|
*/
|
|
45
45
|
viewer?: CopyViewer;
|
|
@@ -69,8 +69,9 @@ export interface CrmActivityNearest {
|
|
|
69
69
|
/**
|
|
70
70
|
* The deals and leads of one account whose activities are nearest to `query` by their best chunk's vector of
|
|
71
71
|
* `model`, best first, each with its nearest activity. An activity counts only through a live deal or lead of `kinds`
|
|
72
|
-
* the viewer may read
|
|
73
|
-
* deal is never named. By the model's vector index, or by a scan of the
|
|
72
|
+
* the viewer may read, so a search never shows what the viewer may not see: one on contacts or companies alone, or on
|
|
73
|
+
* a hidden deal, is never found, and a hidden deal is never named. By the model's vector index, or by a scan of the
|
|
74
|
+
* account's chunks while it has none.
|
|
74
75
|
*/
|
|
75
76
|
export declare const nearestCrmActivities: (database: CacheDatabase, model: string, query: Float32Array, { account, accountId, limit, kinds, viewers, }: {
|
|
76
77
|
account: AccountKey;
|
|
@@ -182,8 +182,9 @@ const ranked = (best, limit) => [...best.values()].sort((a, b) => b.score - a.sc
|
|
|
182
182
|
/**
|
|
183
183
|
* The deals and leads of one account whose activities are nearest to `query` by their best chunk's vector of
|
|
184
184
|
* `model`, best first, each with its nearest activity. An activity counts only through a live deal or lead of `kinds`
|
|
185
|
-
* the viewer may read
|
|
186
|
-
* deal is never named. By the model's vector index, or by a scan of the
|
|
185
|
+
* the viewer may read, so a search never shows what the viewer may not see: one on contacts or companies alone, or on
|
|
186
|
+
* a hidden deal, is never found, and a hidden deal is never named. By the model's vector index, or by a scan of the
|
|
187
|
+
* account's chunks while it has none.
|
|
187
188
|
*/
|
|
188
189
|
export const nearestCrmActivities = (database, model, query, { account, accountId, limit, kinds = DEAL_KINDS, viewers = [], }) => {
|
|
189
190
|
const rules = viewers
|
|
@@ -45,7 +45,7 @@ export interface ChangeFilter {
|
|
|
45
45
|
/** A pipeline's store id: only the changes of its deals or leads. */
|
|
46
46
|
pipeline?: number;
|
|
47
47
|
/**
|
|
48
|
-
* A profile that may read only part of the copy
|
|
48
|
+
* A profile that may read only part of the copy: the deals and leads assigned to it, the activities on
|
|
49
49
|
* them, and the contacts linked to them or assigned to it.
|
|
50
50
|
*/
|
|
51
51
|
viewer?: CopyViewer;
|
|
@@ -40,7 +40,7 @@ export interface CrmFileSearch {
|
|
|
40
40
|
exact?: boolean;
|
|
41
41
|
/** Absent: every CRM account's. */
|
|
42
42
|
accounts?: AccountKey[];
|
|
43
|
-
/** Each limits its own account's rows to the files of records assigned to its user
|
|
43
|
+
/** Each limits its own account's rows to the files of records assigned to its user. */
|
|
44
44
|
viewers?: CopyViewer[];
|
|
45
45
|
limit?: number;
|
|
46
46
|
}
|
|
@@ -13,7 +13,7 @@ export declare const CRM_SCOPES: readonly ["mine", "all"];
|
|
|
13
13
|
/** `activities`: whether a sync also reads the activities and tasks on the deals and leads it keeps; off by default. */
|
|
14
14
|
export declare const CRM_ACTIVITIES: readonly ["on", "off"];
|
|
15
15
|
/**
|
|
16
|
-
* What `files sync` and `files download` may take
|
|
16
|
+
* What `files sync` and `files download` may take: a run's files, a prefetched file's and a run's
|
|
17
17
|
* megabytes, a run's minutes, how many days back a run looks, and the account's folder's megabytes. A value outside
|
|
18
18
|
* its range is refused, never clamped.
|
|
19
19
|
*/
|
|
@@ -9,7 +9,7 @@ export const CRM_SCOPES = ["mine", "all"];
|
|
|
9
9
|
/** `activities`: whether a sync also reads the activities and tasks on the deals and leads it keeps; off by default. */
|
|
10
10
|
export const CRM_ACTIVITIES = ["on", "off"];
|
|
11
11
|
/**
|
|
12
|
-
* What `files sync` and `files download` may take
|
|
12
|
+
* What `files sync` and `files download` may take: a run's files, a prefetched file's and a run's
|
|
13
13
|
* megabytes, a run's minutes, how many days back a run looks, and the account's folder's megabytes. A value outside
|
|
14
14
|
* its range is refused, never clamped.
|
|
15
15
|
*/
|
|
@@ -33,7 +33,7 @@ export interface CrmSaved {
|
|
|
33
33
|
droppedPending?: number;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* A CRM account's copies in the store, written as the CRM has them: nothing waits for review
|
|
36
|
+
* A CRM account's copies in the store, written as the CRM has them: nothing waits for review, and
|
|
37
37
|
* nothing is ever matched by name (WC-DATA-6). Rows the CRM no longer has are marked deleted, never removed
|
|
38
38
|
* (WC-DATA-7). Every write is one transaction per call.
|
|
39
39
|
*/
|
|
@@ -136,7 +136,7 @@ export interface CrmCopies extends CrmReads, CrmActivityWrites {
|
|
|
136
136
|
}): Promise<CrmContactsRemoved>;
|
|
137
137
|
/**
|
|
138
138
|
* Removes one contact from the copy, as `removeContacts` removes those outside the scope: a write made it another
|
|
139
|
-
* user's client, which the copy does not keep
|
|
139
|
+
* user's client, which the copy does not keep. Answers what went.
|
|
140
140
|
*/
|
|
141
141
|
removeContact(key: AccountKey, externalId: string): Promise<CrmContactsRemoved>;
|
|
142
142
|
/** How many of the kind the account holds, not deleted; every contact it ever saved. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { and, asc, desc, eq, gt, gte, inArray, isNotNull, isNull, lte, ne, notInArray, or, type Placeholder, type SQL, sql, } from "drizzle-orm";
|
|
2
|
-
export { type AnySQLiteColumn, alias, blob, index, integer, primaryKey, real, type SQLiteAsyncDatabase, sqliteTable, text, unique, uniqueIndex, } from "drizzle-orm/sqlite-core";
|
|
2
|
+
export { type AnySQLiteColumn, alias, blob, check, index, integer, primaryKey, real, type SQLiteAsyncDatabase, sqliteTable, text, unique, uniqueIndex, } from "drizzle-orm/sqlite-core";
|
|
@@ -25,6 +25,41 @@ import {
|
|
|
25
25
|
text
|
|
26
26
|
} from "./shared-5XR7K42U.js";
|
|
27
27
|
|
|
28
|
+
// node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/drizzle-orm/sqlite-core/checks.js
|
|
29
|
+
var CheckBuilder = class {
|
|
30
|
+
name;
|
|
31
|
+
value;
|
|
32
|
+
static [entityKind] = "SQLiteCheckBuilder";
|
|
33
|
+
static [Symbol.hasInstance](value) {
|
|
34
|
+
return is(value, this);
|
|
35
|
+
}
|
|
36
|
+
brand;
|
|
37
|
+
constructor(name2, value) {
|
|
38
|
+
this.name = name2;
|
|
39
|
+
this.value = value;
|
|
40
|
+
}
|
|
41
|
+
build(table) {
|
|
42
|
+
return new Check(table, this);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var Check = class {
|
|
46
|
+
table;
|
|
47
|
+
static [entityKind] = "SQLiteCheck";
|
|
48
|
+
static [Symbol.hasInstance](value) {
|
|
49
|
+
return is(value, this);
|
|
50
|
+
}
|
|
51
|
+
name;
|
|
52
|
+
value;
|
|
53
|
+
constructor(table, builder) {
|
|
54
|
+
this.table = table;
|
|
55
|
+
this.name = builder.name;
|
|
56
|
+
this.value = builder.value;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
function check(name2, value) {
|
|
60
|
+
return new CheckBuilder(name2, value);
|
|
61
|
+
}
|
|
62
|
+
|
|
28
63
|
// node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/drizzle-orm/sqlite-core/indexes.js
|
|
29
64
|
var IndexBuilderOn = class {
|
|
30
65
|
name;
|
|
@@ -200,6 +235,7 @@ export {
|
|
|
200
235
|
and,
|
|
201
236
|
asc,
|
|
202
237
|
blob,
|
|
238
|
+
check,
|
|
203
239
|
desc,
|
|
204
240
|
eq,
|
|
205
241
|
gt,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/src/sqlite-core/indexes.ts", "../../../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/src/sqlite-core/primary-keys.ts", "../../../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/src/sqlite-core/unique-constraint.ts", "../../../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/src/sqlite-core/alias.ts"],
|
|
4
|
-
"sourcesContent": ["import { entityKind, is } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport interface IndexConfig {\n\tname: string;\n\tcolumns: IndexColumn[];\n\tunique: boolean;\n\twhere: SQL | undefined;\n}\n\nexport type IndexColumn = SQLiteColumn | SQL;\n\nexport class IndexBuilderOn {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilderOn';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tconstructor(private name: string, private unique: boolean) {}\n\n\ton(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder {\n\t\treturn new IndexBuilder(this.name, columns, this.unique);\n\t}\n}\n\nexport class IndexBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilder';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndexBuilder';\n\t};\n\n\t/** @internal */\n\tconfig: IndexConfig;\n\n\tconstructor(name: string, columns: IndexColumn[], unique: boolean) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tunique,\n\t\t\twhere: undefined,\n\t\t};\n\t}\n\n\t/**\n\t * Condition for partial index.\n\t */\n\twhere(condition: SQL): this {\n\t\tthis.config.where = condition;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): Index {\n\t\treturn new Index(this.config, table);\n\t}\n}\n\nexport class Index {\n\tstatic readonly [entityKind]: string = 'SQLiteIndex';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndex';\n\t};\n\n\treadonly config: IndexConfig & { table: SQLiteTable };\n\treadonly isNameExplicit: boolean;\n\n\tconstructor(config: IndexConfig, table: SQLiteTable) {\n\t\tthis.config = { ...config, table };\n\t\tthis.isNameExplicit = !!config.name;\n\t}\n}\n\nexport function index(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, false);\n}\n\nexport function uniqueIndex(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, true);\n}\n", "import { entityKind, is } from '~/entity.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport { SQLiteTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnySQLiteColumn<{ tableName: TTableName }>,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKeyBuilder';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tdeclare _: {\n\t\tbrand: 'SQLitePrimaryKeyBuilder';\n\t};\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKey';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\treadonly isNameExplicit: boolean;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t\tthis.isNameExplicit = !!name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name\n\t\t\t?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { entityKind, is } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { SQLiteColumn } from './columns/common.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport function uniqueKeyName(table: SQLiteTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraintBuilder';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueOnConstraintBuilder';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [SQLiteColumn, ...SQLiteColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraint';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name: string;\n\treadonly isNameExplicit: boolean;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.isNameExplicit = !!name;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { SQLiteTable } from './table.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport function alias<TTable extends SQLiteTable | SQLiteViewBase, TAlias extends string>(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable<TTable, TAlias> {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
6
|
-
"names": ["name", "unique", "name", "name", "alias"]
|
|
3
|
+
"sources": ["../../../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/src/sqlite-core/checks.ts", "../../../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/src/sqlite-core/indexes.ts", "../../../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/src/sqlite-core/primary-keys.ts", "../../../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/src/sqlite-core/unique-constraint.ts", "../../../../node_modules/.pnpm/drizzle-orm@1.0.0-rc.5_@opentelemetry+api@1.10.0_@types+pg@8.23.1_mysql2@3.24.6_@types+_2744d70e8ef51f490b8a561cf31abd26/node_modules/src/sqlite-core/alias.ts"],
|
|
4
|
+
"sourcesContent": ["import { entityKind, is } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport class CheckBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteCheckBuilder';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tprotected brand!: 'SQLiteConstraintBuilder';\n\n\tconstructor(public name: string, public value: SQL) {}\n\n\tbuild(table: SQLiteTable): Check {\n\t\treturn new Check(table, this);\n\t}\n}\n\nexport class Check {\n\tstatic readonly [entityKind]: string = 'SQLiteCheck';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteCheck';\n\t};\n\n\treadonly name: string;\n\treadonly value: SQL;\n\n\tconstructor(public table: SQLiteTable, builder: CheckBuilder) {\n\t\tthis.name = builder.name;\n\t\tthis.value = builder.value;\n\t}\n}\n\nexport function check(name: string, value: SQL): CheckBuilder {\n\treturn new CheckBuilder(name, value);\n}\n", "import { entityKind, is } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { SQLiteColumn } from './columns/index.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport interface IndexConfig {\n\tname: string;\n\tcolumns: IndexColumn[];\n\tunique: boolean;\n\twhere: SQL | undefined;\n}\n\nexport type IndexColumn = SQLiteColumn | SQL;\n\nexport class IndexBuilderOn {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilderOn';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tconstructor(private name: string, private unique: boolean) {}\n\n\ton(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder {\n\t\treturn new IndexBuilder(this.name, columns, this.unique);\n\t}\n}\n\nexport class IndexBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteIndexBuilder';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndexBuilder';\n\t};\n\n\t/** @internal */\n\tconfig: IndexConfig;\n\n\tconstructor(name: string, columns: IndexColumn[], unique: boolean) {\n\t\tthis.config = {\n\t\t\tname,\n\t\t\tcolumns,\n\t\t\tunique,\n\t\t\twhere: undefined,\n\t\t};\n\t}\n\n\t/**\n\t * Condition for partial index.\n\t */\n\twhere(condition: SQL): this {\n\t\tthis.config.where = condition;\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): Index {\n\t\treturn new Index(this.config, table);\n\t}\n}\n\nexport class Index {\n\tstatic readonly [entityKind]: string = 'SQLiteIndex';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tdeclare _: {\n\t\tbrand: 'SQLiteIndex';\n\t};\n\n\treadonly config: IndexConfig & { table: SQLiteTable };\n\treadonly isNameExplicit: boolean;\n\n\tconstructor(config: IndexConfig, table: SQLiteTable) {\n\t\tthis.config = { ...config, table };\n\t\tthis.isNameExplicit = !!config.name;\n\t}\n}\n\nexport function index(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, false);\n}\n\nexport function uniqueIndex(name: string): IndexBuilderOn {\n\treturn new IndexBuilderOn(name, true);\n}\n", "import { entityKind, is } from '~/entity.ts';\nimport type { AnySQLiteColumn, SQLiteColumn } from './columns/index.ts';\nimport { SQLiteTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnySQLiteColumn<{ tableName: TTableName }>,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnySQLiteColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKeyBuilder';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\tdeclare _: {\n\t\tbrand: 'SQLitePrimaryKeyBuilder';\n\t};\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'SQLitePrimaryKey';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name?: string;\n\treadonly isNameExplicit: boolean;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t\tthis.isNameExplicit = !!name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name\n\t\t\t?? `${this.table[SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n", "import { entityKind, is } from '~/entity.ts';\nimport { TableName } from '~/table.utils.ts';\nimport type { SQLiteColumn } from './columns/common.ts';\nimport type { SQLiteTable } from './table.ts';\n\nexport function uniqueKeyName(table: SQLiteTable, columns: string[]) {\n\treturn `${table[TableName]}_${columns.join('_')}_unique`;\n}\n\nexport function unique(name?: string): UniqueOnConstraintBuilder {\n\treturn new UniqueOnConstraintBuilder(name);\n}\n\nexport class UniqueConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraintBuilder';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\t/** @internal */\n\tcolumns: SQLiteColumn[];\n\n\tconstructor(\n\t\tcolumns: SQLiteColumn[],\n\t\tprivate name?: string,\n\t) {\n\t\tthis.columns = columns;\n\t}\n\n\t/** @internal */\n\tbuild(table: SQLiteTable): UniqueConstraint {\n\t\treturn new UniqueConstraint(table, this.columns, this.name);\n\t}\n}\n\nexport class UniqueOnConstraintBuilder {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueOnConstraintBuilder';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tname?: string,\n\t) {\n\t\tthis.name = name;\n\t}\n\n\ton(...columns: [SQLiteColumn, ...SQLiteColumn[]]) {\n\t\treturn new UniqueConstraintBuilder(columns, this.name);\n\t}\n}\n\nexport class UniqueConstraint {\n\tstatic readonly [entityKind]: string = 'SQLiteUniqueConstraint';\n\tstatic [Symbol.hasInstance](value: unknown): boolean {\n\t\treturn is(value, this);\n\t}\n\n\treadonly columns: SQLiteColumn[];\n\treadonly name: string;\n\treadonly isNameExplicit: boolean;\n\n\tconstructor(readonly table: SQLiteTable, columns: SQLiteColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.isNameExplicit = !!name;\n\t\tthis.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));\n\t}\n\n\tgetName() {\n\t\treturn this.name;\n\t}\n}\n", "import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { SQLiteTable } from './table.ts';\nimport type { SQLiteViewBase } from './view-base.ts';\n\nexport function alias<TTable extends SQLiteTable | SQLiteViewBase, TAlias extends string>(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable<TTable, TAlias> {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAa,eAAb,MAA0B;EAQN;EAAqB;EAPxC,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;EAEA;EAEA,YAAYA,OAAqB,OAAmB;AAAjC,SAAA,OAAAA;AAAqB,SAAA,QAAA;EAAa;EAErD,MAAM,OAA2B;AAChC,WAAO,IAAI,MAAM,OAAO,IAAI;EAC7B;AACD;AAEA,IAAa,QAAb,MAAmB;EAaC;EAZnB,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;EAMA;EACA;EAEA,YAAY,OAA2B,SAAuB;AAA3C,SAAA,QAAA;AAClB,SAAK,OAAO,QAAQ;AACpB,SAAK,QAAQ,QAAQ;EACtB;AACD;AAEA,SAAgB,MAAMA,OAAc,OAA0B;AAC7D,SAAO,IAAI,aAAaA,OAAM,KAAK;AACpC;;;AC1BA,IAAa,iBAAb,MAA4B;EAMP;EAAsB;EAL1C,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;EAEA,YAAYC,OAAsBC,SAAyB;AAAvC,SAAA,OAAAD;AAAsB,SAAA,SAAAC;EAAkB;EAE5D,MAAM,SAAwD;AAC7D,WAAO,IAAI,aAAa,KAAK,MAAM,SAAS,KAAK,MAAM;EACxD;AACD;AAEA,IAAa,eAAb,MAA0B;EACzB,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;;EAOA;EAEA,YAAYD,OAAc,SAAwBC,SAAiB;AAClE,SAAK,SAAS;MACb,MAAAD;MACA;MACA,QAAAC;MACA,OAAO;IACR;EACD;;;;EAKA,MAAM,WAAsB;AAC3B,SAAK,OAAO,QAAQ;AACpB,WAAO;EACR;;EAGA,MAAM,OAA2B;AAChC,WAAO,IAAI,MAAM,KAAK,QAAQ,KAAK;EACpC;AACD;AAEA,IAAa,QAAb,MAAmB;EAClB,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;EAMA;EACA;EAEA,YAAY,QAAqB,OAAoB;AACpD,SAAK,SAAS;MAAE,GAAG;MAAQ;IAAM;AACjC,SAAK,iBAAiB,CAAC,CAAC,OAAO;EAChC;AACD;AAEA,SAAgB,MAAMD,OAA8B;AACnD,SAAO,IAAI,eAAeA,OAAM,KAAK;AACtC;AAEA,SAAgB,YAAYA,OAA8B;AACzD,SAAO,IAAI,eAAeA,OAAM,IAAI;AACrC;;;ACvEA,SAAgB,cAAc,QAAa;AAC1C,MAAI,OAAO,CAAA,EAAG,QACb,QAAO,IAAI,kBAAkB,OAAO,CAAA,EAAG,SAAS,OAAO,CAAA,EAAG,IAAI;AAE/D,SAAO,IAAI,kBAAkB,MAAM;AACpC;AACA,IAAa,oBAAb,MAA+B;EAC9B,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;;EAOA;;EAGA;EAEA,YACC,SACAE,OACC;AACD,SAAK,UAAU;AACf,SAAK,OAAOA;EACb;;EAGA,MAAM,OAAgC;AACrC,WAAO,IAAI,WAAW,OAAO,KAAK,SAAS,KAAK,IAAI;EACrD;AACD;AAEA,IAAa,aAAb,MAAwB;EAUF;EATrB,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;EAEA;EACA;EACA;EAEA,YAAY,OAA6B,SAAyBA,OAAe;AAA5D,SAAA,QAAA;AACpB,SAAK,UAAU;AACf,SAAK,OAAOA;AACZ,SAAK,iBAAiB,CAAC,CAACA;EACzB;EAEA,UAAkB;AACjB,WAAO,KAAK,QACR,GAAG,KAAK,MAAM,YAAY,OAAO,IAAA,CAAA,IAAS,KAAK,QAAQ,IAAA,CAAK,WAAW,OAAO,IAAI,EAAE,KAAK,GAAG,CAAA;EACjG;AACD;;;ACpEA,SAAgB,cAAc,OAAoB,SAAmB;AACpE,SAAO,GAAG,MAAM,SAAA,CAAA,IAAc,QAAQ,KAAK,GAAG,CAAA;AAC/C;AAEA,SAAgB,OAAOC,OAA0C;AAChE,SAAO,IAAI,0BAA0BA,KAAI;AAC1C;AAEA,IAAa,0BAAb,MAAqC;EAW3B;EAVT,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;;EAGA;EAEA,YACC,SACAA,OACC;AADO,SAAA,OAAAA;AAER,SAAK,UAAU;EAChB;;EAGA,MAAM,OAAsC;AAC3C,WAAO,IAAI,iBAAiB,OAAO,KAAK,SAAS,KAAK,IAAI;EAC3D;AACD;AAEA,IAAa,4BAAb,MAAuC;EACtC,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;;EAGA;EAEA,YACCA,OACC;AACD,SAAK,OAAOA;EACb;EAEA,MAAM,SAA4C;AACjD,WAAO,IAAI,wBAAwB,SAAS,KAAK,IAAI;EACtD;AACD;AAEA,IAAa,mBAAb,MAA8B;EAUR;EATrB,QAAiB,UAAA,IAAsB;EACvC,QAAQ,OAAO,WAAA,EAAa,OAAyB;AACpD,WAAO,GAAG,OAAO,IAAI;EACtB;EAEA;EACA;EACA;EAEA,YAAY,OAA6B,SAAyBA,OAAe;AAA5D,SAAA,QAAA;AACpB,SAAK,UAAU;AACf,SAAK,iBAAiB,CAAC,CAACA;AACxB,SAAK,OAAOA,SAAQ,cAAc,KAAK,OAAO,KAAK,QAAQ,IAAA,CAAK,WAAW,OAAO,IAAI,CAAC;EACxF;EAEA,UAAU;AACT,WAAO,KAAK;EACb;AACD;;;ACpEA,SAAgB,MACf,OACAC,QACkC;AAClC,SAAO,IAAI,MAAM,OAAO,IAAI,uBAAuBA,QAAO,KAAK,CAAC;AACjE;",
|
|
6
|
+
"names": ["name", "name", "unique", "name", "name", "alias"]
|
|
7
7
|
}
|
|
@@ -6,7 +6,7 @@ export interface NewestEmail {
|
|
|
6
6
|
/** ms: when it was received, or sent when that is unknown. */
|
|
7
7
|
at: number;
|
|
8
8
|
outgoing: boolean;
|
|
9
|
-
/**
|
|
9
|
+
/** One of the mailbox's own addresses (its own, an alias in `mail_own_addresses`) is in To or Cc. */
|
|
10
10
|
addressed: boolean;
|
|
11
11
|
/** Filed in the mailbox of mail sent to many. */
|
|
12
12
|
bulk: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { contextEvidenceFingerprint } from "../../context/evidence.js";
|
|
2
2
|
import { formatLocator } from "../../domain/locator.js";
|
|
3
3
|
import { int, str } from "./events.js";
|
|
4
|
+
import { OWN_MAIL_ADDRESSES } from "./own-identities.js";
|
|
4
5
|
/** `tasks agenda` fields over `threadActivity`'s threads: an email thread counts as a dialog. */
|
|
5
6
|
export const MAIL_AGENDA_COLUMNS = { chat_kind: { type: "enum", sql: "'dialog'" } };
|
|
6
7
|
// The thread's own time is the Date header where sync stored one, so a thread is picked by it; the newest email is
|
|
@@ -10,7 +11,9 @@ const ACTIVITY = `
|
|
|
10
11
|
e.external_id, coalesce(e.received_at, e.sent_at) AS at,
|
|
11
12
|
coalesce(e.outgoing, lower(e.from_address) = lower(a.external_id)) AS outgoing,
|
|
12
13
|
EXISTS (SELECT 1 FROM email_recipients r WHERE r.email_id = e.id AND r.role IN ('to', 'cc')
|
|
13
|
-
AND lower(r.address) = lower(a.external_id))
|
|
14
|
+
AND (lower(r.address) = lower(a.external_id) OR lower(trim(r.address)) IN (SELECT j.value FROM sync_cursors s,
|
|
15
|
+
json_each(CASE WHEN json_valid(s.value) THEN s.value ELSE '[]' END) j
|
|
16
|
+
WHERE s.account_id = a.id AND s.key = '${OWN_MAIL_ADDRESSES}'))) AS addressed,
|
|
14
17
|
EXISTS (SELECT 1 FROM email_mailboxes m JOIN mailboxes b ON b.id = m.mailbox_id
|
|
15
18
|
WHERE m.email_id = e.id AND b.kind = 'bulk') AS bulk,
|
|
16
19
|
coalesce(json_extract(e.headers, '$."list-id"'), json_extract(e.metadata, '$.listId')) IS NOT NULL AS list,
|
|
@@ -25,7 +25,7 @@ export declare const linkRows: (database: CacheDatabase, statuses?: readonly str
|
|
|
25
25
|
}) => LinkRow[];
|
|
26
26
|
/**
|
|
27
27
|
* What a proposal rests on: its signal and the two identities it names, in either order. The owner's rejection
|
|
28
|
-
* holds against this evidence only
|
|
28
|
+
* holds against this evidence only; a new signal or identity for the same people proposes them again.
|
|
29
29
|
*/
|
|
30
30
|
export declare const evidenceKeyOf: ({ signal, identity, with: other, }: Pick<IdentityLinkPayload, "signal" | "identity" | "with">) => string;
|
|
31
31
|
/** The evidence the owner rejected for linking these two people, by any proposal that names them now. */
|
|
@@ -40,7 +40,7 @@ export const linkRows = (database, statuses = ["proposed", "rejected"], page) =>
|
|
|
40
40
|
});
|
|
41
41
|
/**
|
|
42
42
|
* What a proposal rests on: its signal and the two identities it names, in either order. The owner's rejection
|
|
43
|
-
* holds against this evidence only
|
|
43
|
+
* holds against this evidence only; a new signal or identity for the same people proposes them again.
|
|
44
44
|
*/
|
|
45
45
|
export const evidenceKeyOf = ({ signal, identity, with: other, }) => `${signal} ${[identity, other ?? ""].sort().join(" ")}`;
|
|
46
46
|
/** The evidence the owner rejected for linking these two people, by any proposal that names them now. */
|