@wirecat/cli-core 0.753.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 +142 -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/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/person-kinds.d.ts +3 -1
- 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/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 +1 -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 +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/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 +1 -1
- package/dist/store/sqlite/messages.js +1 -1
- 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/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/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/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
package/dist/sends/guarded.js
CHANGED
|
@@ -36,7 +36,10 @@ const refuseStopped = (scopes) => {
|
|
|
36
36
|
if (stopped.has(scope))
|
|
37
37
|
throw stopped.get(scope);
|
|
38
38
|
};
|
|
39
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* The write in progress, so the run events of the calls it makes name it without the port passing it along.
|
|
41
|
+
* @experimental
|
|
42
|
+
*/
|
|
40
43
|
export const currentOperation = () => current.getStore();
|
|
41
44
|
/**
|
|
42
45
|
* **Checked before it goes, recorded after, on every outcome** — the shape of every write. The chat
|
package/dist/sends/journal.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import type { AppIdentity } from "../ports/app.js";
|
|
|
5
5
|
export type SendOutcome = "sent" | "outcome_unknown" | "refused" | "failed" | "reserved";
|
|
6
6
|
/** Absent in the journal means a message: that is every line written before reactions were guarded. */
|
|
7
7
|
export type SendKind = "message" | "reaction" | "edit" | "forward" | "pin" | "read" | "delete" | "chat" | "account";
|
|
8
|
-
/** What a `chat` entry did. Never a title, a description or a link — only which action. */
|
|
8
|
+
/** What a `chat` entry did. Never a title, a description or a link — only which action. @experimental */
|
|
9
9
|
export type ChatAction = "create" | "join" | "leave" | "delete" | "clear" | "members.add" | "members.remove" | "admins.add" | "admins.remove" | "update" | "settings" | "requests.accept" | "requests.decline" | "link.reset" | "link.create" | "link.revoke" | "link.update" | "forum-upgrade" | "forum-enable" | "topic-create" | "topic-edit" | "topic-delete" | "topic-close" | "topic-reopen" | "topic-pin" | "topic-unpin" | "topic-order" | "topic-hide" | "topic-unhide";
|
|
10
|
-
/** What an `account` entry changed. Never the value it changed it to — no name, number or title. */
|
|
10
|
+
/** What an `account` entry changed. Never the value it changed it to — no name, number or title. @experimental */
|
|
11
11
|
export type AccountAction = "contact-add" | "contact-remove" | "contact-import" | "contact-rename" | "contact-block" | "contact-unblock" | "profile" | "folder-create" | "folder-update" | "folder-delete" | "folder-order" | "folder-join" | "sessions-end" | "chat-mute" | "chat-unmute" | "chat-archive" | "chat-unarchive" | "chat-pin" | "chat-unpin" | "chat-mark-unread" | "message-star" | "message-unstar" | "message-flag" | "message-move" | "message-copy" | "message-delete" | "message-restore" | "privacy";
|
|
12
12
|
/** One attempt to send. **Never the text** — only its length. */
|
|
13
13
|
export interface SendEntry {
|
package/dist/sends/pace.d.ts
CHANGED
|
@@ -7,7 +7,10 @@ export interface PaceRate {
|
|
|
7
7
|
/** Calls that may go at once before the rest are spaced. */
|
|
8
8
|
burst: number;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* One call a second after a burst of 20: what a single `messages sync` already did with its 1 s page pause.
|
|
12
|
+
* @experimental
|
|
13
|
+
*/
|
|
11
14
|
export declare const DEFAULT_PACE: PaceRate;
|
|
12
15
|
/** `<state dir>/pace/<profile>.json`, beside `flood/`. */
|
|
13
16
|
export declare const pacePathFor: (app: AppIdentity, profile: string, env?: NodeJS.ProcessEnv) => string;
|
|
@@ -31,6 +34,7 @@ export declare class Pacer {
|
|
|
31
34
|
private read;
|
|
32
35
|
private write;
|
|
33
36
|
}
|
|
37
|
+
/** @experimental */
|
|
34
38
|
export interface TurnOptions {
|
|
35
39
|
/** The provider, as a person calls it: `Telegram`, `Bitrix24`. */
|
|
36
40
|
name: string;
|
|
@@ -48,5 +52,6 @@ export interface TurnOptions {
|
|
|
48
52
|
* Waits for this call's turn in the profile's pace, the same wait for every provider: a short one silently, a long
|
|
49
53
|
* one with a warning, and one longer than a run would wait is refused as `rate_limited`, nothing sent. A pace file
|
|
50
54
|
* that cannot be read lets the call go: pacing is a courtesy to the provider, not a lock.
|
|
55
|
+
* @experimental
|
|
51
56
|
*/
|
|
52
57
|
export declare const waitForTurn: (pacer: Pacer, options: TurnOptions) => Promise<void>;
|
package/dist/sends/pace.js
CHANGED
|
@@ -2,7 +2,10 @@ import { readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { CliError, resolvePaths } from "@wirecat/cli-base";
|
|
4
4
|
import { withFileLockAsync } from "./file-lock.js";
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* One call a second after a burst of 20: what a single `messages sync` already did with its 1 s page pause.
|
|
7
|
+
* @experimental
|
|
8
|
+
*/
|
|
6
9
|
export const DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
7
10
|
/** `<state dir>/pace/<profile>.json`, beside `flood/`. */
|
|
8
11
|
export const pacePathFor = (app, profile, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "pace", `${profile}.json`);
|
|
@@ -78,6 +81,7 @@ const LONGEST_PACE_WAIT_MS = 5 * 60_000;
|
|
|
78
81
|
* Waits for this call's turn in the profile's pace, the same wait for every provider: a short one silently, a long
|
|
79
82
|
* one with a warning, and one longer than a run would wait is refused as `rate_limited`, nothing sent. A pace file
|
|
80
83
|
* that cannot be read lets the call go: pacing is a courtesy to the provider, not a lock.
|
|
84
|
+
* @experimental
|
|
81
85
|
*/
|
|
82
86
|
export const waitForTurn = async (pacer, options) => {
|
|
83
87
|
const { name, operation, warn } = options;
|
|
@@ -2,11 +2,11 @@ import type { AccountAction, ChatAction, SendKind } from "./journal.js";
|
|
|
2
2
|
/** What a profile may do with one command path — the standard's "Permissions". */
|
|
3
3
|
export declare const LEVELS: readonly ["deny", "readonly", "ask", "allow"];
|
|
4
4
|
export type Level = (typeof LEVELS)[number];
|
|
5
|
-
/** A command path, dotted: `messages`, `messages.delete`, `chats.members.remove`. */
|
|
5
|
+
/** A command path, dotted: `messages`, `messages.delete`, `chats.members.remove`. @experimental */
|
|
6
6
|
export type PermissionKey = string;
|
|
7
|
-
/** Deleting has its own word for "yes": the flag a person has to mean, not a habit
|
|
7
|
+
/** Deleting has its own word for "yes": the flag a person has to mean, not a habit. @experimental */
|
|
8
8
|
export declare const skipFlagFor: (key: string) => "--allow-dangerous" | "--yes";
|
|
9
|
-
/** Only what cannot be undone asks; the tool is meant to work without questions (owner
|
|
9
|
+
/** Only what cannot be undone asks; the tool is meant to work without questions (the owner's decision). */
|
|
10
10
|
export declare const DEFAULT_PERMISSIONS: Readonly<Record<PermissionKey, Level>>;
|
|
11
11
|
/** Commands under a housekeeping word, or store maintenance, that still have a key of their own: their path. */
|
|
12
12
|
export declare const KEYED_UNDER_HOUSEKEEPING: ReadonlySet<PermissionKey>;
|
|
@@ -14,7 +14,7 @@ export declare const KEYED_UNDER_HOUSEKEEPING: ReadonlySet<PermissionKey>;
|
|
|
14
14
|
export declare const AUTHORITY_KEY: PermissionKey;
|
|
15
15
|
/** Whether these levels let an agent run a command that changes what a later run may do; `ask` does, as for any write. */
|
|
16
16
|
export declare const authorityAllowed: (levels: Readonly<Record<PermissionKey, Level>>) => boolean;
|
|
17
|
-
/** Lets an MCP server offer `bot api`, whose calls skip the send guard and the bot's recipient list
|
|
17
|
+
/** Lets an MCP server offer `bot api`, whose calls skip the send guard and the bot's recipient list. */
|
|
18
18
|
export declare const BOT_API_KEY: PermissionKey;
|
|
19
19
|
export declare const isBotApi: (path: readonly string[]) => boolean;
|
|
20
20
|
/**
|
|
@@ -28,7 +28,7 @@ export declare const RESOURCES: readonly ["messages", "drafts", "reactions", "po
|
|
|
28
28
|
/**
|
|
29
29
|
* Layers come nearest first. A key a nearer layer sets hides that key and every key under it in the
|
|
30
30
|
* farther layers, so a profile's `messages: readonly` is not undone by `messages.delete: allow` in
|
|
31
|
-
* `defaults` — the nearest section wins, as it does for every other setting
|
|
31
|
+
* `defaults` — the nearest section wins, as it does for every other setting.
|
|
32
32
|
*/
|
|
33
33
|
export declare const layerPermissions: (layers: readonly [string, Readonly<Record<PermissionKey, Level>> | undefined][]) => {
|
|
34
34
|
levels: Record<string, "allow" | "ask" | "deny" | "readonly">;
|
|
@@ -63,15 +63,16 @@ export declare const levelFor: (permissions: Readonly<Record<PermissionKey, Leve
|
|
|
63
63
|
level: Level;
|
|
64
64
|
key: PermissionKey | null;
|
|
65
65
|
};
|
|
66
|
-
/** The command path a guarded write belongs to, when the caller did not name it. */
|
|
66
|
+
/** The command path a guarded write belongs to, when the caller did not name it. @experimental */
|
|
67
67
|
export declare const keyForWrite: (kind: SendKind, action?: string) => PermissionKey;
|
|
68
68
|
/** `keyForWrite` read backwards, as far as a command's key says it: an unpin is a `pin`, a chat change names its action. */
|
|
69
69
|
export declare const writeOfKey: (key: PermissionKey) => {
|
|
70
70
|
kind?: SendKind;
|
|
71
71
|
action?: ChatAction | AccountAction;
|
|
72
72
|
};
|
|
73
|
-
/** Every key a write is checked against that a command path may not spell out. */
|
|
73
|
+
/** Every key a write is checked against that a command path may not spell out. @experimental */
|
|
74
74
|
export declare const WRITE_KEYS: readonly PermissionKey[];
|
|
75
|
+
/** @experimental */
|
|
75
76
|
export declare const readKeysForCommand: (path: readonly string[]) => PermissionKey[];
|
|
76
77
|
/**
|
|
77
78
|
* The key a command path is checked against: `null` for housekeeping, which no level stops, and
|
|
@@ -84,10 +85,14 @@ export declare const RESOURCE_KEY: RegExp;
|
|
|
84
85
|
* A key of a CLI that declares its own commands (`commandPermissions`): any command path. Which paths exist is
|
|
85
86
|
* checked against the program, not here. Past the first word a key may hold capitals, as Google's method ids do
|
|
86
87
|
* (`api.calendar.calendarList.list`).
|
|
88
|
+
* @experimental
|
|
87
89
|
*/
|
|
88
90
|
export declare const COMMAND_PATH_KEY: RegExp;
|
|
89
|
-
/** Startup overrides are a nearer layer than the saved profile, and never write that profile. */
|
|
91
|
+
/** Startup overrides are a nearer layer than the saved profile, and never write that profile. @experimental */
|
|
90
92
|
export declare const permissionOverrides: (entries?: readonly string[], shape?: RegExp) => Record<PermissionKey, Level>;
|
|
91
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* No startup flag grants access: an override may narrow the profile's level, never lift it or a key under it.
|
|
95
|
+
* @experimental
|
|
96
|
+
*/
|
|
92
97
|
export declare const assertOverridesTighten: (overrides: Readonly<Record<PermissionKey, Level>>, profile: Readonly<Record<PermissionKey, Level>>, defaults?: Readonly<Record<PermissionKey, Level>>) => void;
|
|
93
98
|
export declare const assertRetentionEvidenceRead: (permissions: Readonly<Record<string, Level>>) => void;
|
|
@@ -10,9 +10,9 @@ const DANGEROUS = new Set([
|
|
|
10
10
|
"chats.delete",
|
|
11
11
|
"chats.clear",
|
|
12
12
|
]);
|
|
13
|
-
/** Deleting has its own word for "yes": the flag a person has to mean, not a habit
|
|
13
|
+
/** Deleting has its own word for "yes": the flag a person has to mean, not a habit. @experimental */
|
|
14
14
|
export const skipFlagFor = (key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes";
|
|
15
|
-
/** Only what cannot be undone asks; the tool is meant to work without questions (owner
|
|
15
|
+
/** Only what cannot be undone asks; the tool is meant to work without questions (the owner's decision). */
|
|
16
16
|
export const DEFAULT_PERMISSIONS = {
|
|
17
17
|
// Owner, 2026-11-14: deleting a message does not ask; a profile that wants the question sets `ask`.
|
|
18
18
|
"messages.delete": "allow",
|
|
@@ -63,7 +63,7 @@ export const authorityAllowed = (levels) => {
|
|
|
63
63
|
const { level } = levelFor(levels, AUTHORITY_KEY);
|
|
64
64
|
return level === "allow" || level === "ask";
|
|
65
65
|
};
|
|
66
|
-
/** Lets an MCP server offer `bot api`, whose calls skip the send guard and the bot's recipient list
|
|
66
|
+
/** Lets an MCP server offer `bot api`, whose calls skip the send guard and the bot's recipient list. */
|
|
67
67
|
export const BOT_API_KEY = "bot.api";
|
|
68
68
|
export const isBotApi = (path) => path[0] === "bot" && path[1] === "api";
|
|
69
69
|
/**
|
|
@@ -107,7 +107,7 @@ export const RESOURCES = [
|
|
|
107
107
|
/**
|
|
108
108
|
* Layers come nearest first. A key a nearer layer sets hides that key and every key under it in the
|
|
109
109
|
* farther layers, so a profile's `messages: readonly` is not undone by `messages.delete: allow` in
|
|
110
|
-
* `defaults` — the nearest section wins, as it does for every other setting
|
|
110
|
+
* `defaults` — the nearest section wins, as it does for every other setting.
|
|
111
111
|
*/
|
|
112
112
|
export const layerPermissions = (layers) => {
|
|
113
113
|
const levels = {};
|
|
@@ -240,7 +240,7 @@ const KIND_KEYS = {
|
|
|
240
240
|
read: "chats.mark-read",
|
|
241
241
|
delete: "messages.delete",
|
|
242
242
|
};
|
|
243
|
-
/** The command path a guarded write belongs to, when the caller did not name it. */
|
|
243
|
+
/** The command path a guarded write belongs to, when the caller did not name it. @experimental */
|
|
244
244
|
export const keyForWrite = (kind, action) => {
|
|
245
245
|
if (kind === "chat")
|
|
246
246
|
return CHAT_KEYS[action] ?? `chats.${action ?? "update"}`;
|
|
@@ -345,7 +345,7 @@ const NAMED_WRITE_KEYS = [
|
|
|
345
345
|
"topics.edit",
|
|
346
346
|
"topics.enable",
|
|
347
347
|
];
|
|
348
|
-
/** Every key a write is checked against that a command path may not spell out. */
|
|
348
|
+
/** Every key a write is checked against that a command path may not spell out. @experimental */
|
|
349
349
|
export const WRITE_KEYS = [
|
|
350
350
|
...new Set([
|
|
351
351
|
...NAMED_WRITE_KEYS,
|
|
@@ -383,6 +383,7 @@ const BOT_HOUSEKEEPING = new Set(["auth", "list", "sends", "recipients", "mcp"])
|
|
|
383
383
|
const STORE_MAINTENANCE = new Set(["info", "check", "copies"]);
|
|
384
384
|
/** Commands outside `messages` that print what people wrote, so `deny messages` reaches them too. */
|
|
385
385
|
const SHOW_MESSAGES = new Set(["inbox", "review", "watch", "serve", "store", "conversations", "projects"]);
|
|
386
|
+
/** @experimental */
|
|
386
387
|
export const readKeysForCommand = (path) => {
|
|
387
388
|
if (path[0] === "bot")
|
|
388
389
|
return readKeysForCommand(path.slice(1)).map((key) => `bot.${key}`);
|
|
@@ -477,9 +478,10 @@ export const RESOURCE_KEY = new RegExp(`^(${RESOURCES.join("|")})(\\.[a-z][a-z-]
|
|
|
477
478
|
* A key of a CLI that declares its own commands (`commandPermissions`): any command path. Which paths exist is
|
|
478
479
|
* checked against the program, not here. Past the first word a key may hold capitals, as Google's method ids do
|
|
479
480
|
* (`api.calendar.calendarList.list`).
|
|
481
|
+
* @experimental
|
|
480
482
|
*/
|
|
481
483
|
export const COMMAND_PATH_KEY = /^[a-z][a-z-]*(\.[a-zA-Z][a-zA-Z-]*)*$/;
|
|
482
|
-
/** Startup overrides are a nearer layer than the saved profile, and never write that profile. */
|
|
484
|
+
/** Startup overrides are a nearer layer than the saved profile, and never write that profile. @experimental */
|
|
483
485
|
export const permissionOverrides = (entries = [], shape = RESOURCE_KEY) => {
|
|
484
486
|
const levels = {};
|
|
485
487
|
const example = shape === RESOURCE_KEY ? "messages.send=allow" : "api=readonly";
|
|
@@ -491,7 +493,10 @@ export const permissionOverrides = (entries = [], shape = RESOURCE_KEY) => {
|
|
|
491
493
|
}
|
|
492
494
|
return levels;
|
|
493
495
|
};
|
|
494
|
-
/**
|
|
496
|
+
/**
|
|
497
|
+
* No startup flag grants access: an override may narrow the profile's level, never lift it or a key under it.
|
|
498
|
+
* @experimental
|
|
499
|
+
*/
|
|
495
500
|
export const assertOverridesTighten = (overrides, profile, defaults = DEFAULT_PERMISSIONS) => {
|
|
496
501
|
for (const [key, level] of Object.entries(overrides)) {
|
|
497
502
|
const under = Object.keys(profile).filter((named) => named.startsWith(`${key}.`));
|
package/dist/sends/polls.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const pollVoters: (connection: MessengerAdapter, { chat, message,
|
|
|
13
13
|
messageId: Id;
|
|
14
14
|
total: number;
|
|
15
15
|
}>;
|
|
16
|
-
/** A vote is shown to the others like a reaction, and counts toward nothing. */
|
|
16
|
+
/** A vote is shown to the others like a reaction, and counts toward nothing. @experimental */
|
|
17
17
|
export declare const guardedVote: (guard: SendGuard, connection: MessengerAdapter, { chat, message, answers }: {
|
|
18
18
|
chat: string;
|
|
19
19
|
message: string;
|
|
@@ -21,14 +21,17 @@ export declare const guardedVote: (guard: SendGuard, connection: MessengerAdapte
|
|
|
21
21
|
}) => Promise<Operated<{
|
|
22
22
|
poll: Poll;
|
|
23
23
|
}>>;
|
|
24
|
-
/** Closing changes the owner's own message for everyone in the chat, like an edit. */
|
|
24
|
+
/** Closing changes the owner's own message for everyone in the chat, like an edit. @experimental */
|
|
25
25
|
export declare const guardedClose: (guard: SendGuard, connection: MessengerAdapter, { chat, message }: {
|
|
26
26
|
chat: string;
|
|
27
27
|
message: string;
|
|
28
28
|
}) => Promise<Operated<{
|
|
29
29
|
poll: Poll;
|
|
30
30
|
}>>;
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* A new poll is a new message: the recipient list and the hourly limit apply, and a send id makes a retry safe.
|
|
33
|
+
* @experimental
|
|
34
|
+
*/
|
|
32
35
|
export declare const guardedCreatePoll: (guard: SendGuard, connection: MessengerAdapter, { chat, poll, silent, sendId, threadId: typedThread, sendAs, }: {
|
|
33
36
|
chat: string;
|
|
34
37
|
poll: NewPoll;
|
package/dist/sends/polls.js
CHANGED
|
@@ -17,7 +17,7 @@ export const pollVoters = async (connection, { chat, message, answer, limit }) =
|
|
|
17
17
|
const page = await voters(chatId, message, { limit, ...(answer === undefined ? {} : { answerId: answer }) });
|
|
18
18
|
return { chatId, messageId: message, ...page };
|
|
19
19
|
};
|
|
20
|
-
/** A vote is shown to the others like a reaction, and counts toward nothing. */
|
|
20
|
+
/** A vote is shown to the others like a reaction, and counts toward nothing. @experimental */
|
|
21
21
|
export const guardedVote = async (guard, connection, { chat, message, answers }) => {
|
|
22
22
|
const vote = capability(connection, "vote", "vote in a poll");
|
|
23
23
|
const { id: chatId } = await connection.resolve(chat);
|
|
@@ -25,7 +25,7 @@ export const guardedVote = async (guard, connection, { chat, message, answers })
|
|
|
25
25
|
const poll = await guardedWrite(guard, { operationId, chatId, kind: "reaction", messageId: message, key: "polls.vote" }, () => vote(chatId, message, answers));
|
|
26
26
|
return { operationId, poll };
|
|
27
27
|
};
|
|
28
|
-
/** Closing changes the owner's own message for everyone in the chat, like an edit. */
|
|
28
|
+
/** Closing changes the owner's own message for everyone in the chat, like an edit. @experimental */
|
|
29
29
|
export const guardedClose = async (guard, connection, { chat, message }) => {
|
|
30
30
|
const close = capability(connection, "closePoll", "close a poll");
|
|
31
31
|
const { id: chatId } = await connection.resolve(chat);
|
|
@@ -33,7 +33,10 @@ export const guardedClose = async (guard, connection, { chat, message }) => {
|
|
|
33
33
|
const poll = await guardedWrite(guard, { operationId, chatId, kind: "edit", messageId: message, key: "polls.close" }, () => close(chatId, message));
|
|
34
34
|
return { operationId, poll };
|
|
35
35
|
};
|
|
36
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* A new poll is a new message: the recipient list and the hourly limit apply, and a send id makes a retry safe.
|
|
38
|
+
* @experimental
|
|
39
|
+
*/
|
|
37
40
|
export const guardedCreatePoll = async (guard, connection, { chat, poll, silent, sendId, threadId: typedThread, sendAs, }) => {
|
|
38
41
|
if (poll.answers.length < 2)
|
|
39
42
|
throw new CliError("validation_error", "a poll needs two answers or more");
|
|
@@ -14,6 +14,7 @@ export interface RecipientFilter {
|
|
|
14
14
|
/**
|
|
15
15
|
* A state file, not a setting: the configuration schema has deliberately no place for a chat id,
|
|
16
16
|
* and this list is data about a profile rather than a preference.
|
|
17
|
+
* @experimental
|
|
17
18
|
*/
|
|
18
19
|
export declare const recipientsPathFor: (app: AppIdentity, profile: string, env?: NodeJS.ProcessEnv) => string;
|
|
19
20
|
/**
|
package/dist/sends/recipients.js
CHANGED
|
@@ -5,6 +5,7 @@ import { withFileLock, withFileLockAsync } from "./file-lock.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* A state file, not a setting: the configuration schema has deliberately no place for a chat id,
|
|
7
7
|
* and this list is data about a profile rather than a preference.
|
|
8
|
+
* @experimental
|
|
8
9
|
*/
|
|
9
10
|
export const recipientsPathFor = (app, profile, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`);
|
|
10
11
|
/**
|
package/dist/sends/send-as.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { type MessengerAdapter } from "../ports/messenger.js";
|
|
|
4
4
|
* Found before the chat is resolved, so a messenger without identities refuses before any lookup;
|
|
5
5
|
* the returned check runs once the chat id is known, in the same connection. With no identity named,
|
|
6
6
|
* a chat whose saved sender is not the account is refused: the messenger would post as that sender,
|
|
7
|
-
* and nothing the owner typed said so (owner
|
|
7
|
+
* and nothing the owner typed said so (the owner's decision).
|
|
8
8
|
*/
|
|
9
9
|
export declare const sendAsCheck: (connection: MessengerAdapter, sendAs: Id | undefined) => (chatId: Id) => Promise<void>;
|
|
10
10
|
/** `--send-as` as typed; blank is refused rather than read as "no identity". */
|
package/dist/sends/send-as.js
CHANGED
|
@@ -4,7 +4,7 @@ import { capability } from "../ports/messenger.js";
|
|
|
4
4
|
* Found before the chat is resolved, so a messenger without identities refuses before any lookup;
|
|
5
5
|
* the returned check runs once the chat id is known, in the same connection. With no identity named,
|
|
6
6
|
* a chat whose saved sender is not the account is refused: the messenger would post as that sender,
|
|
7
|
-
* and nothing the owner typed said so (owner
|
|
7
|
+
* and nothing the owner typed said so (the owner's decision).
|
|
8
8
|
*/
|
|
9
9
|
export const sendAsCheck = (connection, sendAs) => {
|
|
10
10
|
if (sendAs === undefined) {
|
package/dist/sends/upload.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { StickerFile, Upload, UploadKind, UploadSource } from "../domain/attachments.js";
|
|
2
2
|
import { type AppIdentity } from "../ports/app.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* The most `uploadBytes` holds in memory; an adapter that can stream uses `uploadBlob` and has no such cap.
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
4
7
|
export declare const MAX_BUFFERED_UPLOAD_BYTES: number;
|
|
8
|
+
/** @experimental */
|
|
5
9
|
export declare const uploadSize: (source: UploadSource) => number;
|
|
6
10
|
/** The upload as a Blob that reads the file as it is sent. */
|
|
7
11
|
export declare const uploadBlob: (source: UploadSource, type?: string) => Promise<Blob>;
|
|
8
|
-
/** The upload's bytes in memory, for a messenger library that takes nothing else. */
|
|
12
|
+
/** The upload's bytes in memory, for a messenger library that takes nothing else. @experimental */
|
|
9
13
|
export declare const uploadBytes: (source: UploadSource) => Promise<Uint8Array>;
|
|
10
14
|
/** `[".jpg", ".jpeg"]` as help says it: ".jpg or .jpeg". */
|
|
11
15
|
export declare const typesText: (types: readonly string[]) => string;
|
package/dist/sends/upload.js
CHANGED
|
@@ -5,8 +5,12 @@ import { CliError, resolvePaths } from "@wirecat/cli-base";
|
|
|
5
5
|
import { ancestorValue, envName, readOnlyLockOf } from "../ports/app.js";
|
|
6
6
|
import { WIRECAT_TOOLS } from "../ports/wirecat-tools.js";
|
|
7
7
|
import { storePath, wirecatDirectory } from "../store/path.js";
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* The most `uploadBytes` holds in memory; an adapter that can stream uses `uploadBlob` and has no such cap.
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
9
12
|
export const MAX_BUFFERED_UPLOAD_BYTES = 256 * 1024 * 1024;
|
|
13
|
+
/** @experimental */
|
|
10
14
|
export const uploadSize = (source) => source.kind === "file" ? source.size : source.bytes.byteLength;
|
|
11
15
|
const changed = () => new CliError("validation_error", "the file changed after it was checked — nothing was sent");
|
|
12
16
|
/** The upload as a Blob that reads the file as it is sent. */
|
|
@@ -18,7 +22,7 @@ export const uploadBlob = async (source, type) => {
|
|
|
18
22
|
throw changed();
|
|
19
23
|
return blob;
|
|
20
24
|
};
|
|
21
|
-
/** The upload's bytes in memory, for a messenger library that takes nothing else. */
|
|
25
|
+
/** The upload's bytes in memory, for a messenger library that takes nothing else. @experimental */
|
|
22
26
|
export const uploadBytes = async (source) => {
|
|
23
27
|
if (source.kind === "bytes")
|
|
24
28
|
return source.bytes;
|
|
@@ -29,7 +29,7 @@ export declare const keyOf: ({ provider, account }: AccountKey) => string;
|
|
|
29
29
|
* given. A row no account reported — the owner's, an agent's — is always in it. `left` collects every account whose
|
|
30
30
|
* rows were kept out, so `coverage` can say so. `denied` holds the kinds the profile denies (`deals.list`,
|
|
31
31
|
* `leads.list`): no row, title or count of them is answered, and `coverage` says they were denied. `viewers` are the
|
|
32
|
-
* CRM copies' rules for the profile (
|
|
32
|
+
* CRM copies' rules for the profile (`crmViewerOf`): a deal or lead one may not read is never named, and each
|
|
33
33
|
* note on why a copy shows less goes to `coverage`.
|
|
34
34
|
*/
|
|
35
35
|
export interface Scope {
|
|
@@ -110,7 +110,7 @@ export declare const grouped: (edges: Edge[], pick: (edge: Edge) => string | und
|
|
|
110
110
|
export declare const usable: (edge: Edge) => boolean;
|
|
111
111
|
export { CATEGORIES, type Category };
|
|
112
112
|
/**
|
|
113
|
-
* Each organization's categories, derived from usable relationships in scope and never stored
|
|
113
|
+
* Each organization's categories, derived from usable relationships in scope and never stored: `client`
|
|
114
114
|
* is `customer-of` an own organization, `supplier` one an own organization is `customer-of`, `partner` `partner-of`
|
|
115
115
|
* one, `employer` one the owner's person is `member-of` as employee, contractor or founder. Read once per answer.
|
|
116
116
|
*/
|
|
@@ -106,7 +106,7 @@ export { CATEGORIES };
|
|
|
106
106
|
/** The roles that make an organization the owner's employer. */
|
|
107
107
|
const EMPLOYED = new Set(["employee", "contractor", "founder"]);
|
|
108
108
|
/**
|
|
109
|
-
* Each organization's categories, derived from usable relationships in scope and never stored
|
|
109
|
+
* Each organization's categories, derived from usable relationships in scope and never stored: `client`
|
|
110
110
|
* is `customer-of` an own organization, `supplier` one an own organization is `customer-of`, `partner` `partner-of`
|
|
111
111
|
* one, `employer` one the owner's person is `member-of` as employee, contractor or founder. Read once per answer.
|
|
112
112
|
*/
|
|
@@ -50,7 +50,7 @@ export interface DealContextOptions {
|
|
|
50
50
|
/** The kinds the profile denies: a deal or lead of one is not answered. */
|
|
51
51
|
deniedKinds?: readonly DealKind[];
|
|
52
52
|
/**
|
|
53
|
-
* Each CRM copy's rule for the profile (`crmViewerOf
|
|
53
|
+
* Each CRM copy's rule for the profile (`crmViewerOf`): a deal or lead it may not read is not found.
|
|
54
54
|
*/
|
|
55
55
|
viewing?: readonly CrmViewing[];
|
|
56
56
|
}
|
|
@@ -19,8 +19,6 @@ export interface SyncOptions<M extends SourceFile> {
|
|
|
19
19
|
* sync goes on from there, so a tree of any size is synced over several calls.
|
|
20
20
|
*/
|
|
21
21
|
maxEntries: number;
|
|
22
|
-
/** @deprecated No longer used: a walk past `maxEntries` stops and goes on in the next sync instead of failing. */
|
|
23
|
-
limitError?(): CliError;
|
|
24
22
|
/** Asked before each folder listing and each file read: a stop ends the call with its work saved. */
|
|
25
23
|
budget?: {
|
|
26
24
|
take(): "requests" | "deadline" | "cancelled" | null;
|
|
@@ -52,7 +52,7 @@ export interface EmbeddingsService {
|
|
|
52
52
|
}>;
|
|
53
53
|
/**
|
|
54
54
|
* The conversations nearest in meaning to `query`, in one chat or every one of the account (E7). With no
|
|
55
|
-
* local model downloaded it answers by words alone
|
|
55
|
+
* local model downloaded it answers by words alone: never a download, never a remote model.
|
|
56
56
|
*/
|
|
57
57
|
search(query: string, options: {
|
|
58
58
|
chat?: string;
|
|
@@ -93,7 +93,7 @@ export interface EmbeddingsService {
|
|
|
93
93
|
}>;
|
|
94
94
|
/**
|
|
95
95
|
* Builds and embeds, on this machine, the chats that changed or were never built — one chat, or every built
|
|
96
|
-
* chat and every group chat never built — within the bounds
|
|
96
|
+
* chat and every group chat never built — within the bounds. Never downloads a model.
|
|
97
97
|
*/
|
|
98
98
|
refresh(options: RefreshOptions): Promise<Refreshed>;
|
|
99
99
|
}
|
|
@@ -219,7 +219,7 @@ export interface FoundConversation {
|
|
|
219
219
|
/** `context`: the hit is an image, found by the messages around it; its message is `chunk`. */
|
|
220
220
|
matchedIn?: "context";
|
|
221
221
|
by: ("meaning" | "words")[];
|
|
222
|
-
/** The chunk's text changed after it was embedded: the score is for what it said then
|
|
222
|
+
/** The chunk's text changed after it was embedded: the score is for what it said then. */
|
|
223
223
|
stale: boolean;
|
|
224
224
|
/** The chunk's messages that share most words with the query, as "sender: text", so a reader need not open it. */
|
|
225
225
|
lines?: string[];
|
package/dist/services/inbox.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type ServiceDeps } from "./deps.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* **At most this many history reads per `inbox`**, as in max-cli: a person opening twenty chats in
|
|
7
7
|
* one burst is already more than a person does, and the rest are named in `skipped`, not lost.
|
|
8
|
+
* @experimental
|
|
8
9
|
*/
|
|
9
10
|
export declare const INBOX_CHATS = 20;
|
|
10
11
|
/** Owner's ruling in max-cli: without a boundary, a review looks at the last three days. */
|
|
@@ -16,7 +17,7 @@ export declare const heard: (chats: Chat[], all: boolean) => {
|
|
|
16
17
|
heard: Chat[];
|
|
17
18
|
quiet: number;
|
|
18
19
|
};
|
|
19
|
-
/** What `inbox` and `review` read: the messenger's own answers, or the local store's in store mode. */
|
|
20
|
+
/** What `inbox` and `review` read: the messenger's own answers, or the local store's in store mode. @experimental */
|
|
20
21
|
export type InboxReader = Pick<ServerReads, "chats" | "history"> & Pick<MessengerAdapter, "resolve" | "admins" | "unreadChats">;
|
|
21
22
|
/**
|
|
22
23
|
* The stored chats and messages, read as the messenger would answer. Saving a message does not move
|
|
@@ -43,6 +44,7 @@ export declare const capped: (chats: Chat[], most: number) => {
|
|
|
43
44
|
*
|
|
44
45
|
* Muted and archived chats are left out unless `all`, or they mention the owner: on a busy account
|
|
45
46
|
* they are most of what is unread, and they would take the history reads a person's chat needs.
|
|
47
|
+
* @experimental
|
|
46
48
|
*/
|
|
47
49
|
export declare const unreadIn: (adapter: InboxReader, { limit, all, kinds }: {
|
|
48
50
|
limit: number;
|
|
@@ -60,6 +62,7 @@ export declare const unreadIn: (adapter: InboxReader, { limit, all, kinds }: {
|
|
|
60
62
|
* one after another, so a chat read early can gain a message while a later one is read; anything
|
|
61
63
|
* newer than the snapshot waits for the next run and shows once there. Each chat read is `checked`
|
|
62
64
|
* up to that cut.
|
|
65
|
+
* @experimental
|
|
63
66
|
*/
|
|
64
67
|
export declare const newIn: (adapter: InboxReader, { since, points, limit, all, kinds, }: {
|
|
65
68
|
since: number;
|
|
@@ -68,7 +71,7 @@ export declare const newIn: (adapter: InboxReader, { since, points, limit, all,
|
|
|
68
71
|
all?: boolean;
|
|
69
72
|
kinds?: readonly ChatKind[];
|
|
70
73
|
}) => Promise<Inbox>;
|
|
71
|
-
/** Every page is a history request; 20 chats of 3 pages stays well inside what one account may ask. */
|
|
74
|
+
/** Every page is a history request; 20 chats of 3 pages stays well inside what one account may ask. @experimental */
|
|
72
75
|
export declare const REVIEW_CHATS = 20;
|
|
73
76
|
export interface ReviewOptions {
|
|
74
77
|
since: number;
|
|
@@ -91,6 +94,7 @@ export interface ReviewOptions {
|
|
|
91
94
|
* **Every message, both sides, in each chat that changed after `since`** — what a review of who
|
|
92
95
|
* owes what reads, where `inbox` reads only other people's newest few. Cut at the chat list's newest
|
|
93
96
|
* message, as `inbox --new` is, so the next review starting at `until` misses nothing.
|
|
97
|
+
* @experimental
|
|
94
98
|
*/
|
|
95
99
|
export declare const reviewIn: (adapter: InboxReader, { since, points, chat, kinds, all, unansweredAfterHours, now, enrich, onReviewed, }: ReviewOptions) => Promise<Review>;
|
|
96
100
|
export interface InboxService {
|
package/dist/services/inbox.js
CHANGED
|
@@ -8,6 +8,7 @@ import { applyTaskRules, withWatched } from "./task-rules.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* **At most this many history reads per `inbox`**, as in max-cli: a person opening twenty chats in
|
|
10
10
|
* one burst is already more than a person does, and the rest are named in `skipped`, not lost.
|
|
11
|
+
* @experimental
|
|
11
12
|
*/
|
|
12
13
|
export const INBOX_CHATS = 20;
|
|
13
14
|
/** Owner's ruling in max-cli: without a boundary, a review looks at the last three days. */
|
|
@@ -80,6 +81,7 @@ export const capped = (chats, most) => ({
|
|
|
80
81
|
*
|
|
81
82
|
* Muted and archived chats are left out unless `all`, or they mention the owner: on a busy account
|
|
82
83
|
* they are most of what is unread, and they would take the history reads a person's chat needs.
|
|
84
|
+
* @experimental
|
|
83
85
|
*/
|
|
84
86
|
export const unreadIn = async (adapter, { limit, all = false, kinds }) => {
|
|
85
87
|
const page = await everyChat(adapter);
|
|
@@ -113,6 +115,7 @@ export const unreadIn = async (adapter, { limit, all = false, kinds }) => {
|
|
|
113
115
|
* one after another, so a chat read early can gain a message while a later one is read; anything
|
|
114
116
|
* newer than the snapshot waits for the next run and shows once there. Each chat read is `checked`
|
|
115
117
|
* up to that cut.
|
|
118
|
+
* @experimental
|
|
116
119
|
*/
|
|
117
120
|
export const newIn = async (adapter, { since, points, limit, all = false, kinds, }) => {
|
|
118
121
|
const page = await everyChat(adapter);
|
|
@@ -150,7 +153,7 @@ export const newIn = async (adapter, { since, points, limit, all = false, kinds,
|
|
|
150
153
|
checked,
|
|
151
154
|
};
|
|
152
155
|
};
|
|
153
|
-
/** Every page is a history request; 20 chats of 3 pages stays well inside what one account may ask. */
|
|
156
|
+
/** Every page is a history request; 20 chats of 3 pages stays well inside what one account may ask. @experimental */
|
|
154
157
|
export const REVIEW_CHATS = 20;
|
|
155
158
|
const REVIEW_PAGE = 100;
|
|
156
159
|
const REVIEW_PER_CHAT = 300;
|
|
@@ -178,6 +181,7 @@ const window = async (adapter, chat, since, cut) => {
|
|
|
178
181
|
* **Every message, both sides, in each chat that changed after `since`** — what a review of who
|
|
179
182
|
* owes what reads, where `inbox` reads only other people's newest few. Cut at the chat list's newest
|
|
180
183
|
* message, as `inbox --new` is, so the next review starting at `until` misses nothing.
|
|
184
|
+
* @experimental
|
|
181
185
|
*/
|
|
182
186
|
export const reviewIn = async (adapter, { since, points, chat, kinds, all = false, unansweredAfterHours, now = Date.now(), enrich, onReviewed, }) => {
|
|
183
187
|
const page = await everyChat(adapter);
|
package/dist/services/index.d.ts
CHANGED
|
@@ -218,7 +218,6 @@ export { type Decided, type Decision, emptyProposalRegistry, FACT_SUMMARIES, ORG
|
|
|
218
218
|
export type { RetentionQuery, RetentionService } from "./retention.js";
|
|
219
219
|
export { retentionService } from "./retention.js";
|
|
220
220
|
export { RESOURCES_SEARCHED, type SearchAllFound, type SearchAllItem, type SearchAllMessenger, type SearchAllRecordItem, type SearchAllRequest, type SearchedResource, searchAll, } from "./search-all.js";
|
|
221
|
-
export { type MeetingSearchCoverage, type MeetingSearchCursor, type ResourceWithMeetings, type SearchAllIncludingMeetingsFound, type SearchAllIncludingMeetingsRequest, searchAllIncludingMeetings, } from "./search-all-deprecated.js";
|
|
222
221
|
export { type MeetingAccountCoverage, type MeetingSearchItem, MOST_HITS_PER_MEETING, } from "./search-all-meetings.js";
|
|
223
222
|
export { CATCH_UP_BOUNDS, type CatchUpOptions, type CatchUpResult, catchUpSearch, validateCatchUp, } from "./search-catchup.js";
|
|
224
223
|
export { HARDER_MODELS, HARDER_REASON_IDS, type HarderOptions, type HarderReasonId, type HarderResult, harderRanking, readHarderSetting, writeHarderSetting, } from "./search-harder.js";
|
package/dist/services/index.js
CHANGED
|
@@ -169,7 +169,6 @@ export { approveAsTask, proposalSource } from "./proposal-tasks.js";
|
|
|
169
169
|
export { emptyProposalRegistry, FACT_SUMMARIES, ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND, parseProposalIds, proposalRegistry, } from "./proposals/index.js";
|
|
170
170
|
export { retentionService } from "./retention.js";
|
|
171
171
|
export { RESOURCES_SEARCHED, searchAll, } from "./search-all.js";
|
|
172
|
-
export { searchAllIncludingMeetings, } from "./search-all-deprecated.js";
|
|
173
172
|
export { MOST_HITS_PER_MEETING, } from "./search-all-meetings.js";
|
|
174
173
|
export { CATCH_UP_BOUNDS, catchUpSearch, validateCatchUp, } from "./search-catchup.js";
|
|
175
174
|
export { HARDER_MODELS, HARDER_REASON_IDS, harderRanking, readHarderSetting, writeHarderSetting, } from "./search-harder.js";
|
|
@@ -18,7 +18,7 @@ export interface ModerateOptions {
|
|
|
18
18
|
maxActions?: number;
|
|
19
19
|
confirm?: (finding: Finding) => Promise<boolean | undefined>;
|
|
20
20
|
}
|
|
21
|
-
/** A group's rules, and the one command that acts on them
|
|
21
|
+
/** A group's rules, and the one command that acts on them. */
|
|
22
22
|
export interface ModerationService {
|
|
23
23
|
rules(chat: string): Promise<ShownRules>;
|
|
24
24
|
set(chat: string, key: string, value: string): Promise<ShownRules>;
|
|
@@ -4,6 +4,7 @@ export { aheadOf };
|
|
|
4
4
|
/**
|
|
5
5
|
* `--since` as a moment, in the shared time grammar (`readMoment`). Unlike max-cli, never a message id — a MAX id
|
|
6
6
|
* carries its time, and a Telegram id is only a counter within one chat.
|
|
7
|
+
* @experimental
|
|
7
8
|
*/
|
|
8
9
|
export declare const momentOf: (reference: string, flag?: string, now?: number, at?: MomentZone) => number;
|
|
9
10
|
export interface DateWindow {
|
package/dist/services/moment.js
CHANGED
|
@@ -11,6 +11,7 @@ const read = (reference, flag, now, at) => {
|
|
|
11
11
|
/**
|
|
12
12
|
* `--since` as a moment, in the shared time grammar (`readMoment`). Unlike max-cli, never a message id — a MAX id
|
|
13
13
|
* carries its time, and a Telegram id is only a counter within one chat.
|
|
14
|
+
* @experimental
|
|
14
15
|
*/
|
|
15
16
|
export const momentOf = (reference, flag = "--since", now = Date.now(), at = {}) => read(reference, flag, now, at).time;
|
|
16
17
|
/** `--since-time` and `--until-time` together, as the filter and the `meta` an answer reports it by. */
|
|
@@ -64,7 +64,7 @@ export interface OrganizationContextOptions {
|
|
|
64
64
|
/** The kinds the profile denies: none of their rows, titles or counts is answered. */
|
|
65
65
|
deniedKinds?: readonly DealKind[];
|
|
66
66
|
/**
|
|
67
|
-
* Each CRM copy's rule for the profile (`crmViewerOf
|
|
67
|
+
* Each CRM copy's rule for the profile (`crmViewerOf`): a deal or lead it may not read is left out, and
|
|
68
68
|
* `coverage.notRead` carries the rule's note.
|
|
69
69
|
*/
|
|
70
70
|
viewing?: readonly CrmViewing[];
|
|
@@ -14,7 +14,7 @@ export interface ContactSync {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* A contact is somebody this account has a one-to-one chat with — a query over the chat list, never
|
|
17
|
-
* a flag somebody maintains
|
|
17
|
+
* a flag somebody maintains. Where the store holds who is in each one-to-one
|
|
18
18
|
* chat, it answers; otherwise the dialogs themselves do, offline from the stored chats.
|
|
19
19
|
*/
|
|
20
20
|
export interface PeopleService {
|
|
@@ -114,7 +114,7 @@ export type LinkedPeople = PersonRecord & {
|
|
|
114
114
|
export declare const linkPeople: (store: MessageStore, account: AccountKey, person: string, other: string, { by, reason, method }: LinkPeopleOptions) => Promise<LinkedPeople>;
|
|
115
115
|
/** Digits, with the `+` and the spaces, dashes and brackets people type dropped. */
|
|
116
116
|
export declare const phoneOf: (typed: string) => string;
|
|
117
|
-
/** `--hide-phone`: the answer without the number, for output that will be pasted somewhere. */
|
|
117
|
+
/** `--hide-phone`: the answer without the number, for output that will be pasted somewhere. @experimental */
|
|
118
118
|
export declare const withoutPhone: <T extends {
|
|
119
119
|
phone?: string | null;
|
|
120
120
|
}>(answer: T) => T;
|
package/dist/services/people.js
CHANGED
|
@@ -301,7 +301,7 @@ const toContact = (chat) => ({
|
|
|
301
301
|
});
|
|
302
302
|
const byRecency = (a, b) => (b.lastMessagedAt ?? "").localeCompare(a.lastMessagedAt ?? "");
|
|
303
303
|
const byName = (a, b) => (a.name ?? "").localeCompare(b.name ?? "");
|
|
304
|
-
/** `--hide-phone`: the answer without the number, for output that will be pasted somewhere. */
|
|
304
|
+
/** `--hide-phone`: the answer without the number, for output that will be pasted somewhere. @experimental */
|
|
305
305
|
export const withoutPhone = (answer) => {
|
|
306
306
|
const { phone: _phone, ...rest } = answer;
|
|
307
307
|
return rest;
|