@aligndottech/cli 0.49.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +32 -8
- package/dist/cli.js.map +1 -1
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +4 -1
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +18 -2
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/config.d.ts +8 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +33 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/connect-agents.d.ts.map +1 -1
- package/dist/commands/connect-agents.js +3 -1
- package/dist/commands/connect-agents.js.map +1 -1
- package/dist/commands/connect.d.ts +5 -0
- package/dist/commands/connect.d.ts.map +1 -1
- package/dist/commands/connect.js +24 -0
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +11 -0
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/import/confluence.d.ts.map +1 -1
- package/dist/commands/import/confluence.js +24 -5
- package/dist/commands/import/confluence.js.map +1 -1
- package/dist/commands/import/docs.js +2 -2
- package/dist/commands/import/git.d.ts.map +1 -1
- package/dist/commands/import/git.js +15 -5
- package/dist/commands/import/git.js.map +1 -1
- package/dist/commands/import/github.d.ts.map +1 -1
- package/dist/commands/import/github.js +34 -7
- package/dist/commands/import/github.js.map +1 -1
- package/dist/commands/import/gitlab.d.ts.map +1 -1
- package/dist/commands/import/gitlab.js +10 -5
- package/dist/commands/import/gitlab.js.map +1 -1
- package/dist/commands/import/jira.d.ts.map +1 -1
- package/dist/commands/import/jira.js +10 -5
- package/dist/commands/import/jira.js.map +1 -1
- package/dist/commands/import/linear.d.ts.map +1 -1
- package/dist/commands/import/linear.js +10 -5
- package/dist/commands/import/linear.js.map +1 -1
- package/dist/commands/import/notion.d.ts.map +1 -1
- package/dist/commands/import/notion.js +10 -5
- package/dist/commands/import/notion.js.map +1 -1
- package/dist/commands/import/sessions.js +2 -2
- package/dist/commands/import/slack.d.ts.map +1 -1
- package/dist/commands/import/slack.js +12 -7
- package/dist/commands/import/slack.js.map +1 -1
- package/dist/commands/import/teams.d.ts.map +1 -1
- package/dist/commands/import/teams.js +10 -5
- package/dist/commands/import/teams.js.map +1 -1
- package/dist/commands/import/zoom.d.ts.map +1 -1
- package/dist/commands/import/zoom.js +10 -5
- package/dist/commands/import/zoom.js.map +1 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +43 -1
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/invite.d.ts +8 -18
- package/dist/commands/invite.d.ts.map +1 -1
- package/dist/commands/invite.js +23 -46
- package/dist/commands/invite.js.map +1 -1
- package/dist/commands/join.d.ts +5 -0
- package/dist/commands/join.d.ts.map +1 -0
- package/dist/commands/join.js +49 -0
- package/dist/commands/join.js.map +1 -0
- package/dist/commands/local-relink.d.ts +35 -0
- package/dist/commands/local-relink.d.ts.map +1 -0
- package/dist/commands/local-relink.js +72 -0
- package/dist/commands/local-relink.js.map +1 -0
- package/dist/commands/local.d.ts.map +1 -1
- package/dist/commands/local.js +113 -4
- package/dist/commands/local.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +21 -2
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/mark.d.ts +37 -0
- package/dist/commands/mark.d.ts.map +1 -0
- package/dist/commands/mark.js +105 -0
- package/dist/commands/mark.js.map +1 -0
- package/dist/commands/mcp.d.ts +149 -2
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +80 -15
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/registry.d.ts.map +1 -1
- package/dist/commands/registry.js +12 -2
- package/dist/commands/registry.js.map +1 -1
- package/dist/commands/setup.d.ts +39 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +65 -50
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/share.d.ts +7 -0
- package/dist/commands/share.d.ts.map +1 -0
- package/dist/commands/share.js +129 -0
- package/dist/commands/share.js.map +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +10 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +55 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +278 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/telemetry.d.ts +3 -3
- package/dist/commands/telemetry.js +6 -6
- package/dist/commands/telemetry.js.map +1 -1
- package/dist/commands/why.d.ts.map +1 -1
- package/dist/commands/why.js +6 -1
- package/dist/commands/why.js.map +1 -1
- package/dist/detector/detector-version.d.ts +16 -0
- package/dist/detector/detector-version.d.ts.map +1 -0
- package/dist/detector/detector-version.js +36 -0
- package/dist/detector/detector-version.js.map +1 -0
- package/dist/detector/relationship-contract.d.ts +30 -0
- package/dist/detector/relationship-contract.d.ts.map +1 -0
- package/dist/detector/relationship-contract.js +120 -0
- package/dist/detector/relationship-contract.js.map +1 -0
- package/dist/detector/relationship-contract.v1.json +53 -0
- package/dist/detector/relationship-prompt.d.ts +20 -0
- package/dist/detector/relationship-prompt.d.ts.map +1 -0
- package/dist/detector/relationship-prompt.js +55 -0
- package/dist/detector/relationship-prompt.js.map +1 -0
- package/dist/detector/relationship-prompt.v1.json +13 -0
- package/dist/detector/resolve-pair.d.ts +39 -0
- package/dist/detector/resolve-pair.d.ts.map +1 -0
- package/dist/detector/resolve-pair.js +345 -0
- package/dist/detector/resolve-pair.js.map +1 -0
- package/dist/detector/similar-item.d.ts +20 -0
- package/dist/detector/similar-item.d.ts.map +1 -0
- package/dist/detector/similar-item.js +16 -0
- package/dist/detector/similar-item.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -11
- package/dist/index.js.map +1 -1
- package/dist/lib/advisory-dedup.d.ts.map +1 -1
- package/dist/lib/advisory-dedup.js +16 -8
- package/dist/lib/advisory-dedup.js.map +1 -1
- package/dist/lib/advisory-verdict.d.ts +19 -0
- package/dist/lib/advisory-verdict.d.ts.map +1 -1
- package/dist/lib/advisory-verdict.js +6 -3
- package/dist/lib/advisory-verdict.js.map +1 -1
- package/dist/lib/backfill-state.d.ts +116 -0
- package/dist/lib/backfill-state.d.ts.map +1 -0
- package/dist/lib/backfill-state.js +342 -0
- package/dist/lib/backfill-state.js.map +1 -0
- package/dist/lib/backup-copy.d.ts +17 -0
- package/dist/lib/backup-copy.d.ts.map +1 -0
- package/dist/lib/backup-copy.js +13 -0
- package/dist/lib/backup-copy.js.map +1 -0
- package/dist/lib/backup-exclusion.d.ts +10 -0
- package/dist/lib/backup-exclusion.d.ts.map +1 -0
- package/dist/lib/backup-exclusion.js +58 -0
- package/dist/lib/backup-exclusion.js.map +1 -0
- package/dist/lib/capture-report.d.ts +22 -18
- package/dist/lib/capture-report.d.ts.map +1 -1
- package/dist/lib/capture-report.js +64 -2
- package/dist/lib/capture-report.js.map +1 -1
- package/dist/lib/cli-oauth.d.ts +2 -0
- package/dist/lib/cli-oauth.d.ts.map +1 -1
- package/dist/lib/cli-oauth.js +61 -10
- package/dist/lib/cli-oauth.js.map +1 -1
- package/dist/lib/config.d.ts +72 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +245 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/confirm-timeout.d.ts +8 -0
- package/dist/lib/confirm-timeout.d.ts.map +1 -0
- package/dist/lib/confirm-timeout.js +18 -0
- package/dist/lib/confirm-timeout.js.map +1 -0
- package/dist/lib/curation/check-marks.d.ts +48 -0
- package/dist/lib/curation/check-marks.d.ts.map +1 -0
- package/dist/lib/curation/check-marks.js +81 -0
- package/dist/lib/curation/check-marks.js.map +1 -0
- package/dist/lib/curation/guardrail.d.ts +39 -0
- package/dist/lib/curation/guardrail.d.ts.map +1 -0
- package/dist/lib/curation/guardrail.js +95 -0
- package/dist/lib/curation/guardrail.js.map +1 -0
- package/dist/lib/curation/judge.d.ts +3 -0
- package/dist/lib/curation/judge.d.ts.map +1 -0
- package/dist/lib/curation/judge.js +9 -0
- package/dist/lib/curation/judge.js.map +1 -0
- package/dist/lib/curation/judgements-db.d.ts +97 -0
- package/dist/lib/curation/judgements-db.d.ts.map +1 -0
- package/dist/lib/curation/judgements-db.js +206 -0
- package/dist/lib/curation/judgements-db.js.map +1 -0
- package/dist/lib/curation/last-check.d.ts +32 -0
- package/dist/lib/curation/last-check.d.ts.map +1 -0
- package/dist/lib/curation/last-check.js +81 -0
- package/dist/lib/curation/last-check.js.map +1 -0
- package/dist/lib/curation/mark.d.ts +76 -0
- package/dist/lib/curation/mark.d.ts.map +1 -0
- package/dist/lib/curation/mark.js +361 -0
- package/dist/lib/curation/mark.js.map +1 -0
- package/dist/lib/curation/text.d.ts +6 -0
- package/dist/lib/curation/text.d.ts.map +1 -0
- package/dist/lib/curation/text.js +35 -0
- package/dist/lib/curation/text.js.map +1 -0
- package/dist/lib/destination-name.d.ts +24 -0
- package/dist/lib/destination-name.d.ts.map +1 -0
- package/dist/lib/destination-name.js +39 -0
- package/dist/lib/destination-name.js.map +1 -0
- package/dist/lib/destination-summary.d.ts +6 -0
- package/dist/lib/destination-summary.d.ts.map +1 -0
- package/dist/lib/destination-summary.js +27 -0
- package/dist/lib/destination-summary.js.map +1 -0
- package/dist/lib/destination-trust.d.ts +54 -0
- package/dist/lib/destination-trust.d.ts.map +1 -0
- package/dist/lib/destination-trust.js +107 -0
- package/dist/lib/destination-trust.js.map +1 -0
- package/dist/lib/env-resolver.d.ts.map +1 -1
- package/dist/lib/env-resolver.js +3 -0
- package/dist/lib/env-resolver.js.map +1 -1
- package/dist/lib/fatal.d.ts +11 -0
- package/dist/lib/fatal.d.ts.map +1 -0
- package/dist/lib/fatal.js +22 -0
- package/dist/lib/fatal.js.map +1 -0
- package/dist/lib/fetchers/capture.d.ts +49 -2
- package/dist/lib/fetchers/capture.d.ts.map +1 -1
- package/dist/lib/fetchers/capture.js +7 -1
- package/dist/lib/fetchers/capture.js.map +1 -1
- package/dist/lib/fetchers/confluence.d.ts +2 -2
- package/dist/lib/fetchers/confluence.d.ts.map +1 -1
- package/dist/lib/fetchers/confluence.js.map +1 -1
- package/dist/lib/fetchers/git.d.ts +1 -0
- package/dist/lib/fetchers/git.d.ts.map +1 -1
- package/dist/lib/fetchers/git.js +3 -1
- package/dist/lib/fetchers/git.js.map +1 -1
- package/dist/lib/fetchers/github.d.ts +44 -5
- package/dist/lib/fetchers/github.d.ts.map +1 -1
- package/dist/lib/fetchers/github.js +122 -5
- package/dist/lib/fetchers/github.js.map +1 -1
- package/dist/lib/fetchers/gitlab.d.ts +2 -2
- package/dist/lib/fetchers/gitlab.d.ts.map +1 -1
- package/dist/lib/fetchers/gitlab.js.map +1 -1
- package/dist/lib/fetchers/jira.d.ts +2 -2
- package/dist/lib/fetchers/jira.d.ts.map +1 -1
- package/dist/lib/fetchers/jira.js.map +1 -1
- package/dist/lib/fetchers/linear.d.ts +2 -2
- package/dist/lib/fetchers/linear.d.ts.map +1 -1
- package/dist/lib/fetchers/linear.js.map +1 -1
- package/dist/lib/fetchers/notion.d.ts +2 -2
- package/dist/lib/fetchers/notion.d.ts.map +1 -1
- package/dist/lib/fetchers/notion.js.map +1 -1
- package/dist/lib/fetchers/slack.d.ts +2 -3
- package/dist/lib/fetchers/slack.d.ts.map +1 -1
- package/dist/lib/fetchers/slack.js.map +1 -1
- package/dist/lib/fetchers/teams.d.ts +2 -2
- package/dist/lib/fetchers/teams.d.ts.map +1 -1
- package/dist/lib/fetchers/teams.js.map +1 -1
- package/dist/lib/fetchers/zoom.d.ts +2 -2
- package/dist/lib/fetchers/zoom.d.ts.map +1 -1
- package/dist/lib/fetchers/zoom.js.map +1 -1
- package/dist/lib/gateway-client.d.ts +40 -14
- package/dist/lib/gateway-client.d.ts.map +1 -1
- package/dist/lib/gateway-client.js +47 -19
- package/dist/lib/gateway-client.js.map +1 -1
- package/dist/lib/github-text.d.ts +3 -0
- package/dist/lib/github-text.d.ts.map +1 -0
- package/dist/lib/github-text.js +18 -0
- package/dist/lib/github-text.js.map +1 -0
- package/dist/lib/hook-context.d.ts +10 -0
- package/dist/lib/hook-context.d.ts.map +1 -1
- package/dist/lib/hook-context.js +14 -0
- package/dist/lib/hook-context.js.map +1 -1
- package/dist/lib/import-defaults.d.ts +39 -23
- package/dist/lib/import-defaults.d.ts.map +1 -1
- package/dist/lib/import-defaults.js +28 -26
- package/dist/lib/import-defaults.js.map +1 -1
- package/dist/lib/invite-prompt.d.ts +4 -4
- package/dist/lib/invite-prompt.d.ts.map +1 -1
- package/dist/lib/invite-prompt.js +4 -4
- package/dist/lib/invite-prompt.js.map +1 -1
- package/dist/lib/invite-settings.d.ts +18 -0
- package/dist/lib/invite-settings.d.ts.map +1 -0
- package/dist/lib/invite-settings.js +29 -0
- package/dist/lib/invite-settings.js.map +1 -0
- package/dist/lib/join-flow.d.ts +60 -0
- package/dist/lib/join-flow.d.ts.map +1 -0
- package/dist/lib/join-flow.js +282 -0
- package/dist/lib/join-flow.js.map +1 -0
- package/dist/lib/launch/adapters/aider.d.ts +17 -0
- package/dist/lib/launch/adapters/aider.d.ts.map +1 -0
- package/dist/lib/launch/adapters/aider.js +30 -0
- package/dist/lib/launch/adapters/aider.js.map +1 -0
- package/dist/lib/launch/adapters/auggie.d.ts +18 -0
- package/dist/lib/launch/adapters/auggie.d.ts.map +1 -0
- package/dist/lib/launch/adapters/auggie.js +34 -0
- package/dist/lib/launch/adapters/auggie.js.map +1 -0
- package/dist/lib/launch/adapters/cline.d.ts +10 -0
- package/dist/lib/launch/adapters/cline.d.ts.map +1 -0
- package/dist/lib/launch/adapters/cline.js +41 -0
- package/dist/lib/launch/adapters/cline.js.map +1 -0
- package/dist/lib/launch/adapters/continue.d.ts +22 -0
- package/dist/lib/launch/adapters/continue.d.ts.map +1 -0
- package/dist/lib/launch/adapters/continue.js +46 -0
- package/dist/lib/launch/adapters/continue.js.map +1 -0
- package/dist/lib/launch/adapters/gemini-cli.d.ts +13 -14
- package/dist/lib/launch/adapters/gemini-cli.d.ts.map +1 -1
- package/dist/lib/launch/adapters/gemini-cli.js +38 -53
- package/dist/lib/launch/adapters/gemini-cli.js.map +1 -1
- package/dist/lib/launch/adapters/goose.d.ts +20 -0
- package/dist/lib/launch/adapters/goose.d.ts.map +1 -0
- package/dist/lib/launch/adapters/goose.js +47 -0
- package/dist/lib/launch/adapters/goose.js.map +1 -0
- package/dist/lib/launch/adapters/notes.d.ts +7 -0
- package/dist/lib/launch/adapters/notes.d.ts.map +1 -0
- package/dist/lib/launch/adapters/notes.js +5 -0
- package/dist/lib/launch/adapters/notes.js.map +1 -0
- package/dist/lib/launch/agents.d.ts +2 -0
- package/dist/lib/launch/agents.d.ts.map +1 -1
- package/dist/lib/launch/agents.js +3 -1
- package/dist/lib/launch/agents.js.map +1 -1
- package/dist/lib/launch/auggie-state.d.ts +25 -0
- package/dist/lib/launch/auggie-state.d.ts.map +1 -0
- package/dist/lib/launch/auggie-state.js +74 -0
- package/dist/lib/launch/auggie-state.js.map +1 -0
- package/dist/lib/launch/cline-state.d.ts +32 -0
- package/dist/lib/launch/cline-state.d.ts.map +1 -0
- package/dist/lib/launch/cline-state.js +108 -0
- package/dist/lib/launch/cline-state.js.map +1 -0
- package/dist/lib/launch/config-writes.d.ts +4 -0
- package/dist/lib/launch/config-writes.d.ts.map +1 -1
- package/dist/lib/launch/config-writes.js +8 -3
- package/dist/lib/launch/config-writes.js.map +1 -1
- package/dist/lib/launch/continue-state.d.ts +41 -0
- package/dist/lib/launch/continue-state.d.ts.map +1 -0
- package/dist/lib/launch/continue-state.js +142 -0
- package/dist/lib/launch/continue-state.js.map +1 -0
- package/dist/lib/launch/detect.d.ts.map +1 -1
- package/dist/lib/launch/detect.js +3 -1
- package/dist/lib/launch/detect.js.map +1 -1
- package/dist/lib/launch/gemini-state.d.ts +26 -20
- package/dist/lib/launch/gemini-state.d.ts.map +1 -1
- package/dist/lib/launch/gemini-state.js +95 -37
- package/dist/lib/launch/gemini-state.js.map +1 -1
- package/dist/lib/launch/gemini-system-file.d.ts +17 -0
- package/dist/lib/launch/gemini-system-file.d.ts.map +1 -0
- package/dist/lib/launch/gemini-system-file.js +55 -0
- package/dist/lib/launch/gemini-system-file.js.map +1 -0
- package/dist/lib/launch/gemini-trust.d.ts +3 -1
- package/dist/lib/launch/gemini-trust.d.ts.map +1 -1
- package/dist/lib/launch/gemini-trust.js +10 -3
- package/dist/lib/launch/gemini-trust.js.map +1 -1
- package/dist/lib/launch/goose-state.d.ts +53 -0
- package/dist/lib/launch/goose-state.d.ts.map +1 -0
- package/dist/lib/launch/goose-state.js +137 -0
- package/dist/lib/launch/goose-state.js.map +1 -0
- package/dist/lib/launch/launch-files.d.ts.map +1 -1
- package/dist/lib/launch/launch-files.js +3 -2
- package/dist/lib/launch/launch-files.js.map +1 -1
- package/dist/lib/launch/launch.d.ts +17 -2
- package/dist/lib/launch/launch.d.ts.map +1 -1
- package/dist/lib/launch/launch.js +36 -3
- package/dist/lib/launch/launch.js.map +1 -1
- package/dist/lib/launch/mcp-child-env.d.ts +30 -0
- package/dist/lib/launch/mcp-child-env.d.ts.map +1 -0
- package/dist/lib/launch/mcp-child-env.js +154 -0
- package/dist/lib/launch/mcp-child-env.js.map +1 -0
- package/dist/lib/launch/pick-agent.d.ts.map +1 -1
- package/dist/lib/launch/pick-agent.js +4 -4
- package/dist/lib/launch/pick-agent.js.map +1 -1
- package/dist/lib/launch/picker-options.d.ts.map +1 -1
- package/dist/lib/launch/picker-options.js +7 -2
- package/dist/lib/launch/picker-options.js.map +1 -1
- package/dist/lib/launch/registry/agents/aider.d.ts +3 -0
- package/dist/lib/launch/registry/agents/aider.d.ts.map +1 -0
- package/dist/lib/launch/registry/agents/aider.js +13 -0
- package/dist/lib/launch/registry/agents/aider.js.map +1 -0
- package/dist/lib/launch/registry/agents/auggie.d.ts +3 -0
- package/dist/lib/launch/registry/agents/auggie.d.ts.map +1 -0
- package/dist/lib/launch/registry/agents/auggie.js +11 -0
- package/dist/lib/launch/registry/agents/auggie.js.map +1 -0
- package/dist/lib/launch/registry/agents/cline.d.ts +3 -0
- package/dist/lib/launch/registry/agents/cline.d.ts.map +1 -0
- package/dist/lib/launch/registry/agents/cline.js +19 -0
- package/dist/lib/launch/registry/agents/cline.js.map +1 -0
- package/dist/lib/launch/registry/agents/continue.d.ts +3 -0
- package/dist/lib/launch/registry/agents/continue.d.ts.map +1 -0
- package/dist/lib/launch/registry/agents/continue.js +20 -0
- package/dist/lib/launch/registry/agents/continue.js.map +1 -0
- package/dist/lib/launch/registry/agents/gemini-cli.js +2 -2
- package/dist/lib/launch/registry/agents/gemini-cli.js.map +1 -1
- package/dist/lib/launch/registry/agents/goose.d.ts +3 -0
- package/dist/lib/launch/registry/agents/goose.d.ts.map +1 -0
- package/dist/lib/launch/registry/agents/goose.js +20 -0
- package/dist/lib/launch/registry/agents/goose.js.map +1 -0
- package/dist/lib/launch/registry/index.d.ts +1 -1
- package/dist/lib/launch/registry/index.d.ts.map +1 -1
- package/dist/lib/launch/registry/index.js +7 -2
- package/dist/lib/launch/registry/index.js.map +1 -1
- package/dist/lib/launch/registry/types.d.ts +12 -1
- package/dist/lib/launch/registry/types.d.ts.map +1 -1
- package/dist/lib/launch/strict-entry.d.ts +22 -2
- package/dist/lib/launch/strict-entry.d.ts.map +1 -1
- package/dist/lib/launch/strict-entry.js +80 -2
- package/dist/lib/launch/strict-entry.js.map +1 -1
- package/dist/lib/launch/yaml-scan.d.ts +59 -0
- package/dist/lib/launch/yaml-scan.d.ts.map +1 -0
- package/dist/lib/launch/yaml-scan.js +275 -0
- package/dist/lib/launch/yaml-scan.js.map +1 -0
- package/dist/lib/lead-prompt.d.ts +106 -0
- package/dist/lib/lead-prompt.d.ts.map +1 -0
- package/dist/lib/lead-prompt.js +175 -0
- package/dist/lib/lead-prompt.js.map +1 -0
- package/dist/lib/local-candidate-classify.d.ts +26 -0
- package/dist/lib/local-candidate-classify.d.ts.map +1 -0
- package/dist/lib/local-candidate-classify.js +53 -0
- package/dist/lib/local-candidate-classify.js.map +1 -0
- package/dist/lib/local-db-epoch.d.ts +4 -0
- package/dist/lib/local-db-epoch.d.ts.map +1 -0
- package/dist/lib/local-db-epoch.js +19 -0
- package/dist/lib/local-db-epoch.js.map +1 -0
- package/dist/lib/local-db-migrate.d.ts +85 -0
- package/dist/lib/local-db-migrate.d.ts.map +1 -0
- package/dist/lib/local-db-migrate.js +528 -0
- package/dist/lib/local-db-migrate.js.map +1 -0
- package/dist/lib/local-db-v10.d.ts +28 -0
- package/dist/lib/local-db-v10.d.ts.map +1 -0
- package/dist/lib/local-db-v10.js +49 -0
- package/dist/lib/local-db-v10.js.map +1 -0
- package/dist/lib/local-db-v11.d.ts +24 -0
- package/dist/lib/local-db-v11.d.ts.map +1 -0
- package/dist/lib/local-db-v11.js +25 -0
- package/dist/lib/local-db-v11.js.map +1 -0
- package/dist/lib/local-db-v12.d.ts +17 -0
- package/dist/lib/local-db-v12.d.ts.map +1 -0
- package/dist/lib/local-db-v12.js +8 -0
- package/dist/lib/local-db-v12.js.map +1 -0
- package/dist/lib/local-db-v7.d.ts +30 -0
- package/dist/lib/local-db-v7.d.ts.map +1 -0
- package/dist/lib/local-db-v7.js +285 -0
- package/dist/lib/local-db-v7.js.map +1 -0
- package/dist/lib/local-db-v8.d.ts +22 -0
- package/dist/lib/local-db-v8.d.ts.map +1 -0
- package/dist/lib/local-db-v8.js +33 -0
- package/dist/lib/local-db-v8.js.map +1 -0
- package/dist/lib/local-db-v9.d.ts +10 -0
- package/dist/lib/local-db-v9.d.ts.map +1 -0
- package/dist/lib/local-db-v9.js +8 -0
- package/dist/lib/local-db-v9.js.map +1 -0
- package/dist/lib/local-db.d.ts +73 -23
- package/dist/lib/local-db.d.ts.map +1 -1
- package/dist/lib/local-db.js +225 -375
- package/dist/lib/local-db.js.map +1 -1
- package/dist/lib/local-embeddings.d.ts.map +1 -1
- package/dist/lib/local-embeddings.js +2 -2
- package/dist/lib/local-embeddings.js.map +1 -1
- package/dist/lib/local-gateway-client.d.ts +31 -87
- package/dist/lib/local-gateway-client.d.ts.map +1 -1
- package/dist/lib/local-gateway-client.js +209 -187
- package/dist/lib/local-gateway-client.js.map +1 -1
- package/dist/lib/local-ingest.d.ts +131 -0
- package/dist/lib/local-ingest.d.ts.map +1 -0
- package/dist/lib/local-ingest.js +81 -0
- package/dist/lib/local-ingest.js.map +1 -0
- package/dist/lib/local-link-pass.d.ts +15 -0
- package/dist/lib/local-link-pass.d.ts.map +1 -0
- package/dist/lib/local-link-pass.js +57 -0
- package/dist/lib/local-link-pass.js.map +1 -0
- package/dist/lib/local-llm.d.ts +1 -1
- package/dist/lib/local-llm.d.ts.map +1 -1
- package/dist/lib/local-llm.js +3 -2
- package/dist/lib/local-llm.js.map +1 -1
- package/dist/lib/local-mode.d.ts +9 -2
- package/dist/lib/local-mode.d.ts.map +1 -1
- package/dist/lib/local-mode.js +27 -7
- package/dist/lib/local-mode.js.map +1 -1
- package/dist/lib/local-provenance.d.ts +14 -0
- package/dist/lib/local-provenance.d.ts.map +1 -0
- package/dist/lib/local-provenance.js +14 -0
- package/dist/lib/local-provenance.js.map +1 -0
- package/dist/lib/local-relationship-classifier.d.ts +4 -0
- package/dist/lib/local-relationship-classifier.d.ts.map +1 -1
- package/dist/lib/local-relationship-classifier.js +9 -4
- package/dist/lib/local-relationship-classifier.js.map +1 -1
- package/dist/lib/local-relink.d.ts +59 -0
- package/dist/lib/local-relink.d.ts.map +1 -0
- package/dist/lib/local-relink.js +171 -0
- package/dist/lib/local-relink.js.map +1 -0
- package/dist/lib/local-set-classifier.d.ts +36 -0
- package/dist/lib/local-set-classifier.d.ts.map +1 -0
- package/dist/lib/local-set-classifier.js +81 -0
- package/dist/lib/local-set-classifier.js.map +1 -0
- package/dist/lib/local-snapshot-loader.d.ts +29 -0
- package/dist/lib/local-snapshot-loader.d.ts.map +1 -0
- package/dist/lib/local-snapshot-loader.js +108 -0
- package/dist/lib/local-snapshot-loader.js.map +1 -0
- package/dist/lib/local-thresholds.d.ts +70 -0
- package/dist/lib/local-thresholds.d.ts.map +1 -0
- package/dist/lib/local-thresholds.js +79 -0
- package/dist/lib/local-thresholds.js.map +1 -0
- package/dist/lib/login-flow.d.ts +15 -0
- package/dist/lib/login-flow.d.ts.map +1 -1
- package/dist/lib/login-flow.js +80 -4
- package/dist/lib/login-flow.js.map +1 -1
- package/dist/lib/mcp/mark-tool.d.ts +27 -0
- package/dist/lib/mcp/mark-tool.d.ts.map +1 -0
- package/dist/lib/mcp/mark-tool.js +103 -0
- package/dist/lib/mcp/mark-tool.js.map +1 -0
- package/dist/lib/mcp/share-status-tool.d.ts +13 -0
- package/dist/lib/mcp/share-status-tool.d.ts.map +1 -0
- package/dist/lib/mcp/share-status-tool.js +116 -0
- package/dist/lib/mcp/share-status-tool.js.map +1 -0
- package/dist/lib/mcp/share-tool.d.ts +50 -0
- package/dist/lib/mcp/share-tool.d.ts.map +1 -0
- package/dist/lib/mcp/share-tool.js +174 -0
- package/dist/lib/mcp/share-tool.js.map +1 -0
- package/dist/lib/mcp/tool-rules.d.ts +30 -0
- package/dist/lib/mcp/tool-rules.d.ts.map +1 -0
- package/dist/lib/mcp/tool-rules.js +84 -0
- package/dist/lib/mcp/tool-rules.js.map +1 -0
- package/dist/lib/mcp-backfill.d.ts +89 -0
- package/dist/lib/mcp-backfill.d.ts.map +1 -0
- package/dist/lib/mcp-backfill.js +194 -0
- package/dist/lib/mcp-backfill.js.map +1 -0
- package/dist/lib/mcp-scope.d.ts +90 -0
- package/dist/lib/mcp-scope.d.ts.map +1 -0
- package/dist/lib/mcp-scope.js +125 -0
- package/dist/lib/mcp-scope.js.map +1 -0
- package/dist/lib/mcp-sync.d.ts +64 -0
- package/dist/lib/mcp-sync.d.ts.map +1 -0
- package/dist/lib/mcp-sync.js +183 -0
- package/dist/lib/mcp-sync.js.map +1 -0
- package/dist/lib/model-cache.d.ts +10 -0
- package/dist/lib/model-cache.d.ts.map +1 -0
- package/dist/lib/model-cache.js +35 -0
- package/dist/lib/model-cache.js.map +1 -0
- package/dist/lib/next-step.d.ts.map +1 -1
- package/dist/lib/next-step.js +2 -1
- package/dist/lib/next-step.js.map +1 -1
- package/dist/lib/personal-import.d.ts +7 -0
- package/dist/lib/personal-import.d.ts.map +1 -1
- package/dist/lib/personal-import.js +13 -1
- package/dist/lib/personal-import.js.map +1 -1
- package/dist/lib/private-files.d.ts +33 -0
- package/dist/lib/private-files.d.ts.map +1 -0
- package/dist/lib/private-files.js +96 -0
- package/dist/lib/private-files.js.map +1 -0
- package/dist/lib/redaction-notice.d.ts +7 -0
- package/dist/lib/redaction-notice.d.ts.map +1 -0
- package/dist/lib/redaction-notice.js +32 -0
- package/dist/lib/redaction-notice.js.map +1 -0
- package/dist/lib/relink-estimate.d.ts +16 -0
- package/dist/lib/relink-estimate.d.ts.map +1 -0
- package/dist/lib/relink-estimate.js +30 -0
- package/dist/lib/relink-estimate.js.map +1 -0
- package/dist/lib/resolve-env.d.ts +15 -1
- package/dist/lib/resolve-env.d.ts.map +1 -1
- package/dist/lib/resolve-env.js +27 -7
- package/dist/lib/resolve-env.js.map +1 -1
- package/dist/lib/safe-config-write.d.ts.map +1 -1
- package/dist/lib/safe-config-write.js +39 -2
- package/dist/lib/safe-config-write.js.map +1 -1
- package/dist/lib/scope-choices.d.ts +51 -0
- package/dist/lib/scope-choices.d.ts.map +1 -0
- package/dist/lib/scope-choices.js +193 -0
- package/dist/lib/scope-choices.js.map +1 -0
- package/dist/lib/scope-connect.d.ts +82 -0
- package/dist/lib/scope-connect.d.ts.map +1 -0
- package/dist/lib/scope-connect.js +258 -0
- package/dist/lib/scope-connect.js.map +1 -0
- package/dist/lib/scope-defaults.d.ts +3 -0
- package/dist/lib/scope-defaults.d.ts.map +1 -0
- package/dist/lib/scope-defaults.js +44 -0
- package/dist/lib/scope-defaults.js.map +1 -0
- package/dist/lib/scope-real.d.ts +280 -0
- package/dist/lib/scope-real.d.ts.map +1 -0
- package/dist/lib/scope-real.js +58 -0
- package/dist/lib/scope-real.js.map +1 -0
- package/dist/lib/scope-values.d.ts +76 -0
- package/dist/lib/scope-values.d.ts.map +1 -0
- package/dist/lib/scope-values.js +169 -0
- package/dist/lib/scope-values.js.map +1 -0
- package/dist/lib/scope.d.ts +161 -0
- package/dist/lib/scope.d.ts.map +1 -0
- package/dist/lib/scope.js +323 -0
- package/dist/lib/scope.js.map +1 -0
- package/dist/lib/setup-route.d.ts +4 -2
- package/dist/lib/setup-route.d.ts.map +1 -1
- package/dist/lib/setup-route.js +12 -6
- package/dist/lib/setup-route.js.map +1 -1
- package/dist/lib/share/approval.d.ts +71 -0
- package/dist/lib/share/approval.d.ts.map +1 -0
- package/dist/lib/share/approval.js +139 -0
- package/dist/lib/share/approval.js.map +1 -0
- package/dist/lib/share/approve-link.d.ts +31 -0
- package/dist/lib/share/approve-link.d.ts.map +1 -0
- package/dist/lib/share/approve-link.js +46 -0
- package/dist/lib/share/approve-link.js.map +1 -0
- package/dist/lib/share/browser-flow.d.ts +85 -0
- package/dist/lib/share/browser-flow.d.ts.map +1 -0
- package/dist/lib/share/browser-flow.js +168 -0
- package/dist/lib/share/browser-flow.js.map +1 -0
- package/dist/lib/share/command.d.ts +65 -0
- package/dist/lib/share/command.d.ts.map +1 -0
- package/dist/lib/share/command.js +278 -0
- package/dist/lib/share/command.js.map +1 -0
- package/dist/lib/share/delivery-options.d.ts +15 -0
- package/dist/lib/share/delivery-options.d.ts.map +1 -0
- package/dist/lib/share/delivery-options.js +16 -0
- package/dist/lib/share/delivery-options.js.map +1 -0
- package/dist/lib/share/delivery.d.ts +83 -0
- package/dist/lib/share/delivery.d.ts.map +1 -0
- package/dist/lib/share/delivery.js +134 -0
- package/dist/lib/share/delivery.js.map +1 -0
- package/dist/lib/share/envelope.d.ts +61 -0
- package/dist/lib/share/envelope.d.ts.map +1 -0
- package/dist/lib/share/envelope.js +99 -0
- package/dist/lib/share/envelope.js.map +1 -0
- package/dist/lib/share/ledger.d.ts +59 -0
- package/dist/lib/share/ledger.d.ts.map +1 -0
- package/dist/lib/share/ledger.js +137 -0
- package/dist/lib/share/ledger.js.map +1 -0
- package/dist/lib/share/payload.d.ts +101 -0
- package/dist/lib/share/payload.d.ts.map +1 -0
- package/dist/lib/share/payload.js +147 -0
- package/dist/lib/share/payload.js.map +1 -0
- package/dist/lib/share/pending.d.ts +94 -0
- package/dist/lib/share/pending.d.ts.map +1 -0
- package/dist/lib/share/pending.js +256 -0
- package/dist/lib/share/pending.js.map +1 -0
- package/dist/lib/share/preview.d.ts +22 -0
- package/dist/lib/share/preview.d.ts.map +1 -0
- package/dist/lib/share/preview.js +74 -0
- package/dist/lib/share/preview.js.map +1 -0
- package/dist/lib/share/qr.d.ts +13 -0
- package/dist/lib/share/qr.d.ts.map +1 -0
- package/dist/lib/share/qr.js +77 -0
- package/dist/lib/share/qr.js.map +1 -0
- package/dist/lib/share/requests-client.d.ts +63 -0
- package/dist/lib/share/requests-client.d.ts.map +1 -0
- package/dist/lib/share/requests-client.js +69 -0
- package/dist/lib/share/requests-client.js.map +1 -0
- package/dist/lib/share/run.d.ts +134 -0
- package/dist/lib/share/run.d.ts.map +1 -0
- package/dist/lib/share/run.js +278 -0
- package/dist/lib/share/run.js.map +1 -0
- package/dist/lib/share/salt.d.ts +2 -0
- package/dist/lib/share/salt.d.ts.map +1 -0
- package/dist/lib/share/salt.js +44 -0
- package/dist/lib/share/salt.js.map +1 -0
- package/dist/lib/share/secret-patterns.json +100 -0
- package/dist/lib/share/secret-scan.d.ts +24 -0
- package/dist/lib/share/secret-scan.d.ts.map +1 -0
- package/dist/lib/share/secret-scan.js +116 -0
- package/dist/lib/share/secret-scan.js.map +1 -0
- package/dist/lib/share/target.d.ts +38 -0
- package/dist/lib/share/target.d.ts.map +1 -0
- package/dist/lib/share/target.js +80 -0
- package/dist/lib/share/target.js.map +1 -0
- package/dist/lib/share/tty.d.ts +12 -0
- package/dist/lib/share/tty.d.ts.map +1 -0
- package/dist/lib/share/tty.js +102 -0
- package/dist/lib/share/tty.js.map +1 -0
- package/dist/lib/share/visible.d.ts +4 -0
- package/dist/lib/share/visible.d.ts.map +1 -0
- package/dist/lib/share/visible.js +30 -0
- package/dist/lib/share/visible.js.map +1 -0
- package/dist/lib/share/wire.d.ts +98 -0
- package/dist/lib/share/wire.d.ts.map +1 -0
- package/dist/lib/share/wire.js +43 -0
- package/dist/lib/share/wire.js.map +1 -0
- package/dist/lib/similarity/embedding-matrix.d.ts +64 -0
- package/dist/lib/similarity/embedding-matrix.d.ts.map +1 -0
- package/dist/lib/similarity/embedding-matrix.js +119 -0
- package/dist/lib/similarity/embedding-matrix.js.map +1 -0
- package/dist/lib/since-flag.d.ts +11 -0
- package/dist/lib/since-flag.d.ts.map +1 -0
- package/dist/lib/since-flag.js +24 -0
- package/dist/lib/since-flag.js.map +1 -0
- package/dist/lib/since.d.ts +59 -0
- package/dist/lib/since.d.ts.map +1 -0
- package/dist/lib/since.js +86 -0
- package/dist/lib/since.js.map +1 -0
- package/dist/lib/source-key.d.ts +13 -0
- package/dist/lib/source-key.d.ts.map +1 -0
- package/dist/lib/source-key.js +60 -0
- package/dist/lib/source-key.js.map +1 -0
- package/dist/lib/source-sync-state.d.ts +12 -0
- package/dist/lib/source-sync-state.d.ts.map +1 -0
- package/dist/lib/source-sync-state.js +45 -0
- package/dist/lib/source-sync-state.js.map +1 -0
- package/dist/lib/startup-backfill-track.d.ts +2 -0
- package/dist/lib/startup-backfill-track.d.ts.map +1 -0
- package/dist/lib/startup-backfill-track.js +6 -0
- package/dist/lib/startup-backfill-track.js.map +1 -0
- package/dist/lib/startup-xdg.d.ts +2 -0
- package/dist/lib/startup-xdg.d.ts.map +1 -0
- package/dist/lib/startup-xdg.js +9 -0
- package/dist/lib/startup-xdg.js.map +1 -0
- package/dist/lib/sync/after-connect.d.ts +2 -0
- package/dist/lib/sync/after-connect.d.ts.map +1 -0
- package/dist/lib/sync/after-connect.js +18 -0
- package/dist/lib/sync/after-connect.js.map +1 -0
- package/dist/lib/sync/bg-claim.d.ts +14 -0
- package/dist/lib/sync/bg-claim.d.ts.map +1 -0
- package/dist/lib/sync/bg-claim.js +97 -0
- package/dist/lib/sync/bg-claim.js.map +1 -0
- package/dist/lib/sync/blocked.d.ts +8 -0
- package/dist/lib/sync/blocked.d.ts.map +1 -0
- package/dist/lib/sync/blocked.js +45 -0
- package/dist/lib/sync/blocked.js.map +1 -0
- package/dist/lib/sync/classify.d.ts +34 -0
- package/dist/lib/sync/classify.d.ts.map +1 -0
- package/dist/lib/sync/classify.js +93 -0
- package/dist/lib/sync/classify.js.map +1 -0
- package/dist/lib/sync/drain.d.ts +16 -0
- package/dist/lib/sync/drain.d.ts.map +1 -0
- package/dist/lib/sync/drain.js +33 -0
- package/dist/lib/sync/drain.js.map +1 -0
- package/dist/lib/sync/forget.d.ts +12 -0
- package/dist/lib/sync/forget.d.ts.map +1 -0
- package/dist/lib/sync/forget.js +32 -0
- package/dist/lib/sync/forget.js.map +1 -0
- package/dist/lib/sync/launch-hook.d.ts +42 -0
- package/dist/lib/sync/launch-hook.d.ts.map +1 -0
- package/dist/lib/sync/launch-hook.js +117 -0
- package/dist/lib/sync/launch-hook.js.map +1 -0
- package/dist/lib/sync/lock.d.ts +35 -0
- package/dist/lib/sync/lock.d.ts.map +1 -0
- package/dist/lib/sync/lock.js +175 -0
- package/dist/lib/sync/lock.js.map +1 -0
- package/dist/lib/sync/purge.d.ts +38 -0
- package/dist/lib/sync/purge.d.ts.map +1 -0
- package/dist/lib/sync/purge.js +61 -0
- package/dist/lib/sync/purge.js.map +1 -0
- package/dist/lib/sync/real-env.d.ts +265 -0
- package/dist/lib/sync/real-env.d.ts.map +1 -0
- package/dist/lib/sync/real-env.js +47 -0
- package/dist/lib/sync/real-env.js.map +1 -0
- package/dist/lib/sync/relink.d.ts +14 -0
- package/dist/lib/sync/relink.d.ts.map +1 -0
- package/dist/lib/sync/relink.js +36 -0
- package/dist/lib/sync/relink.js.map +1 -0
- package/dist/lib/sync/report.d.ts +3 -0
- package/dist/lib/sync/report.d.ts.map +1 -0
- package/dist/lib/sync/report.js +54 -0
- package/dist/lib/sync/report.js.map +1 -0
- package/dist/lib/sync/run-all.d.ts +23 -0
- package/dist/lib/sync/run-all.d.ts.map +1 -0
- package/dist/lib/sync/run-all.js +30 -0
- package/dist/lib/sync/run-all.js.map +1 -0
- package/dist/lib/sync/run-source.d.ts +73 -0
- package/dist/lib/sync/run-source.d.ts.map +1 -0
- package/dist/lib/sync/run-source.js +262 -0
- package/dist/lib/sync/run-source.js.map +1 -0
- package/dist/lib/sync/safe-read.d.ts +4 -0
- package/dist/lib/sync/safe-read.d.ts.map +1 -0
- package/dist/lib/sync/safe-read.js +40 -0
- package/dist/lib/sync/safe-read.js.map +1 -0
- package/dist/lib/sync/should-background-sync.d.ts +31 -0
- package/dist/lib/sync/should-background-sync.d.ts.map +1 -0
- package/dist/lib/sync/should-background-sync.js +69 -0
- package/dist/lib/sync/should-background-sync.js.map +1 -0
- package/dist/lib/sync/source-ids.d.ts +10 -0
- package/dist/lib/sync/source-ids.d.ts.map +1 -0
- package/dist/lib/sync/source-ids.js +9 -0
- package/dist/lib/sync/source-ids.js.map +1 -0
- package/dist/lib/sync/sources.d.ts +33 -0
- package/dist/lib/sync/sources.d.ts.map +1 -0
- package/dist/lib/sync/sources.js +37 -0
- package/dist/lib/sync/sources.js.map +1 -0
- package/dist/lib/sync/spawn-background.d.ts +27 -0
- package/dist/lib/sync/spawn-background.d.ts.map +1 -0
- package/dist/lib/sync/spawn-background.js +66 -0
- package/dist/lib/sync/spawn-background.js.map +1 -0
- package/dist/lib/sync/status.d.ts +57 -0
- package/dist/lib/sync/status.d.ts.map +1 -0
- package/dist/lib/sync/status.js +166 -0
- package/dist/lib/sync/status.js.map +1 -0
- package/dist/lib/sync/summary-read.d.ts +19 -0
- package/dist/lib/sync/summary-read.d.ts.map +1 -0
- package/dist/lib/sync/summary-read.js +39 -0
- package/dist/lib/sync/summary-read.js.map +1 -0
- package/dist/lib/sync/summary.d.ts +10 -0
- package/dist/lib/sync/summary.d.ts.map +1 -0
- package/dist/lib/sync/summary.js +80 -0
- package/dist/lib/sync/summary.js.map +1 -0
- package/dist/lib/sync/sync-state.d.ts +128 -0
- package/dist/lib/sync/sync-state.d.ts.map +1 -0
- package/dist/lib/sync/sync-state.js +255 -0
- package/dist/lib/sync/sync-state.js.map +1 -0
- package/dist/lib/sync/telemetry.d.ts +20 -0
- package/dist/lib/sync/telemetry.d.ts.map +1 -0
- package/dist/lib/sync/telemetry.js +31 -0
- package/dist/lib/sync/telemetry.js.map +1 -0
- package/dist/lib/sync/threads.d.ts +48 -0
- package/dist/lib/sync/threads.d.ts.map +1 -0
- package/dist/lib/sync/threads.js +82 -0
- package/dist/lib/sync/threads.js.map +1 -0
- package/dist/lib/sync/window.d.ts +72 -0
- package/dist/lib/sync/window.d.ts.map +1 -0
- package/dist/lib/sync/window.js +112 -0
- package/dist/lib/sync/window.js.map +1 -0
- package/dist/lib/team-cta.d.ts +11 -0
- package/dist/lib/team-cta.d.ts.map +1 -0
- package/dist/lib/team-cta.js +16 -0
- package/dist/lib/team-cta.js.map +1 -0
- package/dist/lib/telemetry-ci.d.ts +2 -0
- package/dist/lib/telemetry-ci.d.ts.map +1 -0
- package/dist/lib/telemetry-ci.js +21 -0
- package/dist/lib/telemetry-ci.js.map +1 -0
- package/dist/lib/telemetry-consent.d.ts +44 -23
- package/dist/lib/telemetry-consent.d.ts.map +1 -1
- package/dist/lib/telemetry-consent.js +74 -35
- package/dist/lib/telemetry-consent.js.map +1 -1
- package/dist/lib/telemetry-env.d.ts +1 -1
- package/dist/lib/usage-telemetry.d.ts +89 -24
- package/dist/lib/usage-telemetry.d.ts.map +1 -1
- package/dist/lib/usage-telemetry.js +283 -76
- package/dist/lib/usage-telemetry.js.map +1 -1
- package/dist/lib/xdg.d.ts +27 -0
- package/dist/lib/xdg.d.ts.map +1 -0
- package/dist/lib/xdg.js +56 -0
- package/dist/lib/xdg.js.map +1 -0
- package/package.json +6 -3
- package/dist/commands/push.d.ts +0 -25
- package/dist/commands/push.d.ts.map +0 -1
- package/dist/commands/push.js +0 -98
- package/dist/commands/push.js.map +0 -1
- package/dist/lib/personal-email-domains.d.ts +0 -8
- package/dist/lib/personal-email-domains.d.ts.map +0 -1
- package/dist/lib/personal-email-domains.js +0 -39
- package/dist/lib/personal-email-domains.js.map +0 -1
|
@@ -1,111 +1,27 @@
|
|
|
1
|
-
import { createLocalDb, normaliseDecidedAt } from './local-db.js';
|
|
1
|
+
import { createLocalDb, identifyingSourceUrl, normaliseDecidedAt } from './local-db.js';
|
|
2
2
|
import { deriveDeciderKind } from './decider-kind.js';
|
|
3
|
+
import { provenanceOf } from './local-provenance.js';
|
|
3
4
|
import { currentRepoIdentity, repoFromSourceUrl } from './repo-identity.js';
|
|
4
5
|
import { cosineSimilarity, EMBEDDING_MODEL_ID, getEmbedding } from './local-embeddings.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
6
|
+
import { classifyCandidates } from './local-candidate-classify.js';
|
|
7
|
+
import { noProviderHintInline, RECOMMENDED_OLLAMA_PULL } from './local-llm.js';
|
|
7
8
|
import { repositoryOf } from './decision-links.js';
|
|
8
9
|
import { localCitationFor } from './commit-cite.js';
|
|
9
10
|
import { extractRefs, refIdentityFor } from './decision-refs.js';
|
|
10
11
|
import { contentWordQuery } from './search-query.js';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*
|
|
25
|
-
* Was an inline 0.1, the only unnamed threshold in this file and less than a quarter of
|
|
26
|
-
* its neighbours. It let align_ask answer "what happens when the brain service is down"
|
|
27
|
-
* with two unrelated decisions at 0.18 and 0.14 - noise the agent had to recognise by
|
|
28
|
-
* reading the decimals itself, and an audience cannot.
|
|
29
|
-
*
|
|
30
|
-
* 0.25 matches the gateway's own /decisions/smart-search floor, so the same question gets
|
|
31
|
-
* the same relevance bar in local and cloud mode. Lower than the 0.45 used for relatedness
|
|
32
|
-
* on purpose: search is a human asking a natural-language question, where a looser match is
|
|
33
|
-
* still worth showing, while relatedness is machinery acting on its own.
|
|
34
|
-
*
|
|
35
|
-
* An honest empty result is the point. "The graph has nothing on this" is a better answer
|
|
36
|
-
* than two wrong decisions, because the caller can act on it.
|
|
37
|
-
*/
|
|
38
|
-
export const SEARCH_THRESHOLD = 0.25;
|
|
39
|
-
/**
|
|
40
|
-
* Candidate floor for ADJUDICATION - the path that then pays an LLM per candidate.
|
|
41
|
-
*
|
|
42
|
-
* Deliberately higher than the retrieval floor below, because this surface is expensive in
|
|
43
|
-
* three ways the hook is not: up to 5 sequential calls to the user's own provider, ~11s of
|
|
44
|
-
* latency, and an exit code. A keyless CI runner that gets `no-context` today exits 0; the
|
|
45
|
-
* moment retrieval finds anything it gets `unknown` and exits 2. And the classifier cannot
|
|
46
|
-
* reject a candidate - its vocabulary is ten positive relations with no "unrelated" - so a
|
|
47
|
-
* loose candidate that reaches it is reported rather than filtered.
|
|
48
|
-
*
|
|
49
|
-
* Deliberately NOT recalibrated with the retrieval floor. Measured on the corpus, 0.30 would
|
|
50
|
-
* recover four more related pairs here too, and that trade is a separate decision with a
|
|
51
|
-
* separate blast radius (see relatedness-calibration.test.ts).
|
|
52
|
-
*/
|
|
53
|
-
export const RELATES_THRESHOLD = 0.45;
|
|
54
|
-
/**
|
|
55
|
-
* Candidate floor for RETRIEVAL ONLY (`depth: 'related'`, the agent editor hook).
|
|
56
|
-
*
|
|
57
|
-
* Measured, not chosen. Against fixtures/relatedness-corpus.json: 0.45 recovered 3 of 8 related
|
|
58
|
-
* pairs, 0.30 recovers 7 of 8, and neither admits a single unrelated pair. 0.25 scores the same
|
|
59
|
-
* 7 of 8, so the tie-break is margin over the worst false positive (0.2051): 0.30 clears it by
|
|
60
|
-
* 0.095 against 0.25's 0.045.
|
|
61
|
-
*
|
|
62
|
-
* 0.30 is also where this constant sat until commit 0cbef08 raised it to 0.45 inside a rename,
|
|
63
|
-
* unmentioned and unmeasured. So this is a revert with evidence attached rather than a new
|
|
64
|
-
* guess, and the evidence is a test that fails if the corpus stops supporting it.
|
|
65
|
-
*
|
|
66
|
-
* Safe to be looser here precisely because this path is cheap and honest: it returns above
|
|
67
|
-
* Stage 2, so it makes no provider call, and what the hook prints declines to assert anything
|
|
68
|
-
* ("related by content search and have NOT been adjudicated"). That is the same posture as
|
|
69
|
-
* `align search`, which has run at 0.25 all along - as has MCP `align_get_related_decisions`.
|
|
70
|
-
*/
|
|
71
|
-
export const RETRIEVAL_RELATES_THRESHOLD = 0.3;
|
|
72
|
-
// ALI-785: the ABSOLUTE floor above is unreachable for cross-register pairs on
|
|
73
|
-
// MiniLM-L6 - measured on a 403-decision six-source corpus, near-duplicates score
|
|
74
|
-
// ~0.95, genuine cross-tool paraphrases 0.45-0.62, background noise 0.28-0.40, and
|
|
75
|
-
// 0 of 1,729 links crossed a platform. So linking also takes each item's top few
|
|
76
|
-
// neighbours RELATIVE to its own ranking, floored where the noise band ends. 0.45 is
|
|
77
|
-
// the adjudication floor the product already uses elsewhere; text-cleaning schemes
|
|
78
|
-
// were lab-tested first and moved nothing (title+cleaned scored 0.274 vs 0.286 raw).
|
|
79
|
-
export const RELATED_TOP_K = 3;
|
|
80
|
-
export const RELATED_FLOOR = RELATES_THRESHOLD;
|
|
81
|
-
/**
|
|
82
|
-
* ALI-1065: the capture-time classification budget. Only the high-confidence tier
|
|
83
|
-
* (score >= SIMILARITY_THRESHOLD) is ever classified - the lower related-only tier stays
|
|
84
|
-
* a plain cosine `relates` edge, because typing a merely-related pair is exactly the
|
|
85
|
-
* manufactured-detection failure ALI-503 removed from the conflict counters.
|
|
86
|
-
*
|
|
87
|
-
* Capped at 3 regardless of how many candidates clear the high-confidence bar, and skipped
|
|
88
|
-
* entirely (0 calls) with no provider configured - see ingestOne. Worst case: 3 classifier
|
|
89
|
-
* calls per capture, each a single LLM round trip. Typical capture (0-1 near-duplicates)
|
|
90
|
-
* costs 0-1 calls.
|
|
91
|
-
*/
|
|
92
|
-
export const CAPTURE_CLASSIFY_TOP_K = 3;
|
|
93
|
-
// Below this similarity between a decision and new content, the content is
|
|
94
|
-
// considered to have drifted from the decision.
|
|
95
|
-
export const DRIFT_THRESHOLD = 0.5;
|
|
96
|
-
/**
|
|
97
|
-
* ALI-831: the provenance every decision payload carries, in wire spelling, so an agent
|
|
98
|
-
* reading this server can tell a claim from a rule. `ratified` is a boolean beside the
|
|
99
|
-
* stamp rather than instead of it: a consumer branches on the boolean and cites the stamp.
|
|
100
|
-
* A NULL column (a row from before the column existed) reads 'unknown', never a guess.
|
|
101
|
-
*/
|
|
102
|
-
function provenanceOf(row) {
|
|
103
|
-
return {
|
|
104
|
-
decider_kind: row.deciderKind ?? 'unknown',
|
|
105
|
-
ratified: row.ratifiedAt !== null,
|
|
106
|
-
...(row.ratifiedAt ? { ratified_at: row.ratifiedAt, ratified_by: row.ratifiedBy } : {}),
|
|
107
|
-
};
|
|
108
|
-
}
|
|
12
|
+
import { linkPass } from './local-link-pass.js';
|
|
13
|
+
import { redactSecrets } from './share/secret-scan.js';
|
|
14
|
+
import { noteRedacted } from './redaction-notice.js';
|
|
15
|
+
import { EmbeddingMatrix, MATRIX_MAX_ROWS } from './similarity/embedding-matrix.js';
|
|
16
|
+
import { captureFieldsForUrl, ingestStep } from './local-ingest.js';
|
|
17
|
+
import { annotatePairs, anyJudgements, reviewConflicts } from './curation/guardrail.js';
|
|
18
|
+
import { defaultJudge } from './curation/judge.js';
|
|
19
|
+
import { bannerFor, checkNotes, emptyCheck, offeredFiles, splitRetrieved } from './curation/check-marks.js';
|
|
20
|
+
import { notADecisionMarks } from './curation/judgements-db.js';
|
|
21
|
+
import { contextKeyFor, filesFromDiff } from './curation/mark.js';
|
|
22
|
+
import { DRIFT_THRESHOLD, RELATED_FLOOR, RELATED_TOP_K, RELATES_THRESHOLD, RETRIEVAL_RELATES_THRESHOLD, SEARCH_THRESHOLD, SIMILARITY_THRESHOLD, } from './local-thresholds.js';
|
|
23
|
+
export { DRIFT_THRESHOLD, RELATED_FLOOR, RELATED_TOP_K, RELATES_THRESHOLD, RETRIEVAL_RELATES_THRESHOLD, SEARCH_THRESHOLD, SIMILARITY_THRESHOLD, };
|
|
24
|
+
export { CAPTURE_CLASSIFY_TOP_K } from './local-ingest.js';
|
|
109
25
|
export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
110
26
|
const db = createLocalDb(dbPath);
|
|
111
27
|
// Memoized: every retrieval call in one command invocation (a single `align ask`, one
|
|
@@ -120,6 +36,14 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
120
36
|
}
|
|
121
37
|
return cachedCurrentRepo;
|
|
122
38
|
}
|
|
39
|
+
/** LM: whose marks apply. Resolved only when the file holds any judgement, so a graph nobody marked never touches config. */
|
|
40
|
+
let cachedJudgeId;
|
|
41
|
+
async function activeJudge() {
|
|
42
|
+
if (!anyJudgements(dbPath))
|
|
43
|
+
return undefined;
|
|
44
|
+
cachedJudgeId ??= clientOpts.judgeId ?? (await defaultJudge()).judgeId;
|
|
45
|
+
return cachedJudgeId;
|
|
46
|
+
}
|
|
123
47
|
/**
|
|
124
48
|
* Resolves a `--repo <name>` argument against what actually exists, so a user can type
|
|
125
49
|
* the short repo name ("align-cli") or "owner/repo" instead of memorising the full
|
|
@@ -266,23 +190,57 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
266
190
|
}
|
|
267
191
|
return {};
|
|
268
192
|
}
|
|
269
|
-
|
|
193
|
+
/** What ranks a new item against the graph. Normally the in-memory matrix of every stored
|
|
194
|
+
* embedding, read from SQLite on first use and kept for the run (`session`) so N items read
|
|
195
|
+
* the table once. A kept matrix is trusted only while nothing under it moved: rowSetEpoch
|
|
196
|
+
* (this connection deleted or replaced rows, whichever code path did it) and dataVersion
|
|
197
|
+
* (ANOTHER connection committed) must both match what it was built at, else it is rebuilt.
|
|
198
|
+
* Above the row cap there is no matrix and each item streams the table, as before.
|
|
199
|
+
* Model-filtered exactly as findSimilar is: a stale-model vector must not be scored. */
|
|
200
|
+
function rankerFor(session) {
|
|
201
|
+
const epoch = db.rowSetEpoch();
|
|
202
|
+
const dataVersion = db.dataVersion();
|
|
203
|
+
if (session.matrix === undefined || session.epoch !== epoch || session.dataVersion !== dataVersion) {
|
|
204
|
+
session.matrix = undefined;
|
|
205
|
+
if (db.countEmbeddings() > (clientOpts.matrixMaxRows ?? MATRIX_MAX_ROWS)) {
|
|
206
|
+
return { topK: (q, k, o) => findSimilar(q, k, o?.threshold ?? 0, o?.excludeId) };
|
|
207
|
+
}
|
|
208
|
+
session.matrix = EmbeddingMatrix.fromRows(db.getAllEmbeddings({ model: EMBEDDING_MODEL_ID }));
|
|
209
|
+
session.epoch = epoch;
|
|
210
|
+
session.dataVersion = dataVersion;
|
|
211
|
+
}
|
|
212
|
+
return session.matrix;
|
|
213
|
+
}
|
|
214
|
+
async function ingestOne(rawInput, platform, opts = {}, session = {}) {
|
|
215
|
+
// Secrets go first, before anything reads the text: the title is cut from it, refs are
|
|
216
|
+
// extracted from it and the embedding is built from it. Each match becomes the pattern's
|
|
217
|
+
// placeholder (<GITHUB_TOKEN>, <PRIVATE_KEY>); the raw value never reaches the graph. Redacted
|
|
218
|
+
// before the 80-character cut, so a secret straddling the cut cannot leave half of itself behind.
|
|
219
|
+
const body = redactSecrets(rawInput);
|
|
220
|
+
const input = body.text;
|
|
221
|
+
const titleOverride = opts.titleOverride === undefined ? undefined : redactSecrets(opts.titleOverride);
|
|
222
|
+
const urlOverride = opts.sourceUrlOverride == null ? undefined : redactSecrets(opts.sourceUrlOverride);
|
|
223
|
+
const redacted = body.count + (titleOverride?.count ?? 0) + (urlOverride?.count ?? 0);
|
|
224
|
+
noteRedacted(redacted);
|
|
270
225
|
let title = input.slice(0, 80);
|
|
271
226
|
let summary = input;
|
|
272
|
-
let sourceUrl =
|
|
227
|
+
let sourceUrl = urlOverride?.text ?? null;
|
|
273
228
|
let capturedAsUrl = false;
|
|
274
229
|
if (opts.sourceUrlOverride === undefined) {
|
|
275
230
|
try {
|
|
276
231
|
const url = new URL(input);
|
|
277
232
|
sourceUrl = url.href;
|
|
278
|
-
title = url
|
|
279
|
-
summary = `Captured from ${url.hostname}`;
|
|
233
|
+
({ title, summary } = captureFieldsForUrl(url));
|
|
280
234
|
capturedAsUrl = true;
|
|
281
235
|
}
|
|
282
236
|
catch { /* plain text - use as-is */ }
|
|
283
237
|
}
|
|
284
|
-
if (
|
|
285
|
-
title =
|
|
238
|
+
if (titleOverride?.text)
|
|
239
|
+
title = titleOverride.text.slice(0, 80);
|
|
240
|
+
// L2: a capture of a URL whose item a connector already imported adds nothing to it.
|
|
241
|
+
const heldRow = capturedAsUrl ? db.noteCaptureOfHeldItem(sourceUrl) : null;
|
|
242
|
+
if (heldRow)
|
|
243
|
+
return { id: heldRow.id, title: heldRow.title, summary: heldRow.summary, sourceUrl: heldRow.sourceUrl, platform: heldRow.platform, related: [], created: false, changed: false, redacted };
|
|
286
244
|
// ALI-792: what the text points at, stored beside the decision. When the whole
|
|
287
245
|
// input IS the URL being captured, there is nothing to point at - and comparing
|
|
288
246
|
// the extracted ref against the WHATWG-normalized href leaks on every
|
|
@@ -302,80 +260,78 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
302
260
|
// refreshed, so this is the only moment the difference is visible. Without it a
|
|
303
261
|
// re-import reports every decision as imported while the graph does not move, which
|
|
304
262
|
// reads as having imported twice (ALI-770).
|
|
305
|
-
|
|
263
|
+
//
|
|
306
264
|
// ALI-829: a Slack thread arriving under a real title replaces the tombstone-titled row
|
|
307
|
-
// an older fetcher may have written for the same source_url (see local-db.ts).
|
|
265
|
+
// an older fetcher may have written for the same source_url (see local-db.ts). Removed
|
|
266
|
+
// BEFORE the lookup: L2 finds a Slack thread by its source_key, which the tombstone shares.
|
|
267
|
+
//
|
|
268
|
+
// One normalisation, used by both folds: the tombstone delete and insertDecision's own fold
|
|
269
|
+
// already trim, and a raw url here made the two disagree about which twin they were looking at.
|
|
270
|
+
const identity = identifyingSourceUrl(sourceUrl);
|
|
308
271
|
if (platform === 'slack')
|
|
309
|
-
db.deleteSlackTombstoneTwin(
|
|
272
|
+
db.deleteSlackTombstoneTwin(identity);
|
|
273
|
+
if (opts.keyed)
|
|
274
|
+
db.foldPendingTwin(identity, title, platform, true);
|
|
275
|
+
const existingId = db.findIdBySource(sourceUrl, title, platform, opts.keyed);
|
|
276
|
+
// L3: an items-first arrival over a complete row merges onto the stored discussion; the row stays complete.
|
|
277
|
+
let pending = opts.detailPending;
|
|
278
|
+
if (opts.keyed && existingId !== null) {
|
|
279
|
+
const kept = db.keepProtectedText(existingId, title, summary, opts.detailPending);
|
|
280
|
+
({ title, summary } = kept);
|
|
281
|
+
if (kept.keptDiscussion)
|
|
282
|
+
pending = false;
|
|
283
|
+
}
|
|
284
|
+
const created = existingId === null;
|
|
310
285
|
// ALI-829: the source's own date, normalised once. An unparseable date drops the FIELD,
|
|
311
286
|
// never the item: the summary is the thing the user came for.
|
|
312
287
|
const decidedAt = normaliseDecidedAt(opts.createdAt);
|
|
288
|
+
// L1/L2: connector imports (classify:false) only - capture re-ranks every time. Only the
|
|
289
|
+
// missing steps run (Decision 30): nothing for a finished row, the link pass alone for a
|
|
290
|
+
// row whose ingest died after storing its embedding. Refs stay current and citations INTO
|
|
291
|
+
// the row resolve either way: both are local and cheap.
|
|
292
|
+
if (opts.classify === false && existingId !== null) {
|
|
293
|
+
const step = ingestStep(db.getDecisionById(existingId), { title, summary, platform, repo, decidedAt }, db.getEmbeddingModel(existingId), EMBEDDING_MODEL_ID, db.getEnrichedAt(existingId));
|
|
294
|
+
const stored = step === 'full' ? null : db.getEmbedding(existingId);
|
|
295
|
+
if (stored !== null) {
|
|
296
|
+
db.replaceRefs(existingId, refs);
|
|
297
|
+
db.resolveRefs(existingId, refIdentityFor(platform, sourceUrl));
|
|
298
|
+
const related = step === 'relink' ? await linkPass(db, rankerFor(session), existingId, stored, title, summary, opts.classify) : [];
|
|
299
|
+
if (step === 'relink')
|
|
300
|
+
db.markEnriched(existingId);
|
|
301
|
+
return { id: existingId, title, summary, sourceUrl, platform, related, created: false, changed: false, redacted };
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
// Embed title + summary so URL captures (whose summary is just "Captured
|
|
305
|
+
// from <host>") still carry the path-derived title's semantic content. Embedded BEFORE the
|
|
306
|
+
// row is rewritten: a failed embed then leaves the row (and its enriched_at) as it was,
|
|
307
|
+
// rather than new text beside the old text's vector.
|
|
308
|
+
const embedText = title === summary ? summary : `${title}. ${summary}`;
|
|
309
|
+
const embedding = await getEmbedding(embedText);
|
|
313
310
|
// ALI-831: origin, from the platform - the same rule the cloud applies on insert.
|
|
314
311
|
const deciderKind = deriveDeciderKind(platform);
|
|
315
|
-
const id = db.insertDecision({ title, summary, sourceUrl, platform, repo, decidedAt, deciderKind });
|
|
312
|
+
const id = db.insertDecision({ title, summary, sourceUrl, platform, repo, decidedAt, deciderKind, keyed: opts.keyed, detailPending: pending });
|
|
316
313
|
db.replaceRefs(id, refs);
|
|
317
314
|
// ALI-796's payoff: if some earlier decision already cited THIS one (a git commit
|
|
318
315
|
// citing a Jira key before Jira was ever connected), resolve that gap into a real
|
|
319
316
|
// link now that the cited item has arrived. Harmless no-op for platforms with no
|
|
320
317
|
// citable identity (refIdentityFor returns [] for a plain git/slack/cli capture).
|
|
321
318
|
db.resolveRefs(id, refIdentityFor(platform, sourceUrl));
|
|
322
|
-
|
|
323
|
-
// from <host>") still carry the path-derived title's semantic content.
|
|
324
|
-
const embedText = title === summary ? summary : `${title}. ${summary}`;
|
|
325
|
-
const embedding = await getEmbedding(embedText);
|
|
319
|
+
const epochBefore = db.rowSetEpoch();
|
|
326
320
|
db.setEmbedding(id, embedding, EMBEDDING_MODEL_ID);
|
|
327
|
-
//
|
|
328
|
-
//
|
|
329
|
-
//
|
|
330
|
-
//
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
// ALI-1065: classify only the high-confidence tier, capped, and only with a provider
|
|
335
|
-
// configured - hasConfiguredProvider is an env-only check, so this costs nothing when
|
|
336
|
-
// no key exists (the common case for a fresh clone). chainStopped mirrors
|
|
337
|
-
// checkAlignment's own short-circuit: once one candidate's classification fails with a
|
|
338
|
-
// stopped provider, further calls in THIS capture are skipped rather than repeated.
|
|
339
|
-
const toClassify = hasConfiguredProvider()
|
|
340
|
-
? candidates.filter(c => c.score >= SIMILARITY_THRESHOLD).slice(0, CAPTURE_CLASSIFY_TOP_K)
|
|
341
|
-
: [];
|
|
342
|
-
const classifyIds = new Set(toClassify.map(c => c.decisionId));
|
|
343
|
-
const newDecision = { title, summary };
|
|
344
|
-
let chainStopped = false;
|
|
345
|
-
for (const c of candidates) {
|
|
346
|
-
if (classifyIds.has(c.decisionId) && !chainStopped) {
|
|
347
|
-
// The EXISTING decision is the subject (A); the new capture is the candidate (B) -
|
|
348
|
-
// "how does B relate to A" reads naturally as "does this new thing supersede/conflict
|
|
349
|
-
// with what's already there", which is the direction a capture-time check asks in.
|
|
350
|
-
const existingRow = db.getDecisionById(c.decisionId);
|
|
351
|
-
const outcome = existingRow
|
|
352
|
-
? await classifyRelationship({ title: existingRow.title, summary: existingRow.summary }, newDecision)
|
|
353
|
-
: { ok: false, reason: 'classifier_error' };
|
|
354
|
-
if (!outcome.ok && outcome.failure?.kind === 'provider_stopped')
|
|
355
|
-
chainStopped = true;
|
|
356
|
-
if (outcome.ok) {
|
|
357
|
-
// replaceLink, not insertLink: this upgrades the cosine `relates` edge findSimilar
|
|
358
|
-
// would otherwise also write below into a typed one, rather than leaving both on
|
|
359
|
-
// the pair (local-db.ts's unique index is per-relation, so both would coexist).
|
|
360
|
-
db.replaceLink({
|
|
361
|
-
sourceId: id,
|
|
362
|
-
targetId: c.decisionId,
|
|
363
|
-
relation: outcome.relationship.type,
|
|
364
|
-
confidence: outcome.relationship.confidence,
|
|
365
|
-
});
|
|
366
|
-
continue;
|
|
367
|
-
}
|
|
368
|
-
// Falls through to the untyped write below on any classifier failure - a candidate
|
|
369
|
-
// still worth surfacing as related even when nothing could type it.
|
|
370
|
-
}
|
|
371
|
-
// ALI-503: `relates`, not `conflicts_with`. This is a cosine score with no judgement
|
|
372
|
-
// behind it, and labelling it a conflict made `align local status` and the
|
|
373
|
-
// align_get_conflicts MCP tool report manufactured findings as detections.
|
|
374
|
-
db.insertLink({ sourceId: id, targetId: c.decisionId, relation: 'relates', confidence: c.score });
|
|
321
|
+
// This run's own write: the matrix learns it by append, so the bump setEmbedding makes when
|
|
322
|
+
// it REPLACES a vector is not a graph that moved under the copy. But only a matrix that was
|
|
323
|
+
// current before the write may absorb it; one the insert's own fold already outdated is
|
|
324
|
+
// left alone and rebuilt by rankerFor.
|
|
325
|
+
if (session.matrix !== undefined && session.epoch === epochBefore) {
|
|
326
|
+
session.matrix.add(id, embedding);
|
|
327
|
+
session.epoch = db.rowSetEpoch();
|
|
375
328
|
}
|
|
376
|
-
|
|
329
|
+
const candidates = await linkPass(db, rankerFor(session), id, embedding, title, summary, opts.classify);
|
|
330
|
+
// L2, Decision 30: the LAST write. Only now is the ingest done.
|
|
331
|
+
db.markEnriched(id);
|
|
332
|
+
return { id, title, summary, sourceUrl, platform, related: candidates, created, changed: true, redacted };
|
|
377
333
|
}
|
|
378
|
-
|
|
334
|
+
const client = {
|
|
379
335
|
/** Release the underlying SQLite handle (required on Windows before deleting the file). */
|
|
380
336
|
close() {
|
|
381
337
|
db.close();
|
|
@@ -393,19 +349,25 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
393
349
|
id: r.id, title: r.title, summary: r.summary, sourceUrl: r.sourceUrl, platform: r.platform,
|
|
394
350
|
related: r.related.map(c => c.decisionId),
|
|
395
351
|
...(row ? provenanceOf(row) : {}),
|
|
352
|
+
// How many secrets were replaced with placeholders before the write (absent when none):
|
|
353
|
+
// MCP align_capture hands this to the agent, which is the only place its person sees it.
|
|
354
|
+
...(r.redacted > 0 ? { secretsRedacted: r.redacted } : {}),
|
|
396
355
|
};
|
|
397
356
|
},
|
|
398
|
-
async ingestBatch(items) {
|
|
357
|
+
async ingestBatch(items, opts = {}) {
|
|
399
358
|
const snapshots = [];
|
|
359
|
+
const session = {};
|
|
400
360
|
for (const item of items) {
|
|
401
361
|
const r = await ingestOne(item.raw_text, item.platform ?? 'cli', {
|
|
402
362
|
titleOverride: item.title,
|
|
403
363
|
sourceUrlOverride: item.source_url ?? null,
|
|
404
364
|
createdAt: item.created_at,
|
|
405
|
-
|
|
365
|
+
classify: opts.classify, keyed: opts.keyed, detailPending: item.detail_pending,
|
|
366
|
+
}, session);
|
|
406
367
|
snapshots.push({
|
|
407
368
|
id: r.id,
|
|
408
369
|
created: r.created,
|
|
370
|
+
changed: r.changed,
|
|
409
371
|
title: r.title,
|
|
410
372
|
summary: r.summary,
|
|
411
373
|
analysis: {
|
|
@@ -422,6 +384,39 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
422
384
|
}
|
|
423
385
|
return { snapshots };
|
|
424
386
|
},
|
|
387
|
+
/**
|
|
388
|
+
* L5, Decision 30: finish ingests that never finished (`enriched_at` NULL: every row after the
|
|
389
|
+
* v7 upgrade, or one that died between its embedding and its link pass). Runs only the
|
|
390
|
+
* missing step, the way ingestOne does for a connector re-ingest: a row that already holds a
|
|
391
|
+
* current-model embedding gets the link pass alone (no embed call); one that does not is
|
|
392
|
+
* re-ingested from its own stored text. A row with no URL and no embedding cannot be
|
|
393
|
+
* re-ingested without inserting a twin, so it is counted and left. Never classifies.
|
|
394
|
+
*/
|
|
395
|
+
async relinkUnfinished(rows) {
|
|
396
|
+
const session = {};
|
|
397
|
+
const out = { linked: 0, embedded: 0, skipped: 0 };
|
|
398
|
+
for (const { id, keyed, pending } of rows) {
|
|
399
|
+
const row = db.getDecisionById(id);
|
|
400
|
+
if (!row)
|
|
401
|
+
continue;
|
|
402
|
+
const stored = db.getEmbeddingModel(id) === EMBEDDING_MODEL_ID ? db.getEmbedding(id) : null;
|
|
403
|
+
if (stored !== null) {
|
|
404
|
+
await linkPass(db, rankerFor(session), id, stored, row.title, row.summary, false);
|
|
405
|
+
db.markEnriched(id);
|
|
406
|
+
out.linked += 1;
|
|
407
|
+
}
|
|
408
|
+
else if (row.sourceUrl === null) {
|
|
409
|
+
out.skipped += 1;
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
await ingestOne(row.summary, row.platform, { titleOverride: row.title, sourceUrlOverride: row.sourceUrl, createdAt: row.decidedAt ?? undefined, classify: false, keyed,
|
|
413
|
+
// The stored flag, passed through: a re-ingest that says nothing resets a row still waiting for its discussion.
|
|
414
|
+
detailPending: pending === true }, session);
|
|
415
|
+
out.embedded += 1;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return out;
|
|
419
|
+
},
|
|
425
420
|
/**
|
|
426
421
|
* ALI-808: the confirm-each session importer's one write path. Ingests exactly like
|
|
427
422
|
* ingestBatch does above (same ingestOne, so platform 'agent-session' derives
|
|
@@ -560,7 +555,16 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
560
555
|
const { dbFilter, effectiveRepo } = await resolveScope(scope);
|
|
561
556
|
const boundedFilter = { ...dbFilter, createdBefore };
|
|
562
557
|
const embedding = await getEmbedding(query);
|
|
563
|
-
|
|
558
|
+
// LM: decisions this person marked not-a-decision are skipped, so ask for that many extra.
|
|
559
|
+
const judge = await activeJudge();
|
|
560
|
+
const hidden = judge ? notADecisionMarks(dbPath, judge) : new Map();
|
|
561
|
+
const dropNotes = [];
|
|
562
|
+
const visible = (rows) => {
|
|
563
|
+
const split = splitRetrieved(rows, hidden, limit, (id) => db.getDecisionById(id)?.title, 'answer');
|
|
564
|
+
dropNotes.splice(0, dropNotes.length, ...split.notes);
|
|
565
|
+
return split.kept;
|
|
566
|
+
};
|
|
567
|
+
let similar = visible(await findSimilar(embedding, limit + hidden.size, SEARCH_THRESHOLD, undefined, boundedFilter));
|
|
564
568
|
// A natural-language question embeds less densely than its subject does, so on a
|
|
565
569
|
// small graph it can miss a decision that its own content words hit. Retry once,
|
|
566
570
|
// only on an empty result, mirroring the gateway's own keyword-to-semantic
|
|
@@ -569,7 +573,7 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
569
573
|
if (!similar.length) {
|
|
570
574
|
const reduced = contentWordQuery(query);
|
|
571
575
|
if (reduced) {
|
|
572
|
-
similar = await findSimilar(await getEmbedding(reduced), limit, SEARCH_THRESHOLD, undefined, boundedFilter);
|
|
576
|
+
similar = visible(await findSimilar(await getEmbedding(reduced), limit + hidden.size, SEARCH_THRESHOLD, undefined, boundedFilter));
|
|
573
577
|
}
|
|
574
578
|
}
|
|
575
579
|
const results = similar
|
|
@@ -603,7 +607,7 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
603
607
|
};
|
|
604
608
|
})
|
|
605
609
|
.filter((d) => d !== null);
|
|
606
|
-
return { results, count: results.length, strategy: 'semantic', scope: effectiveRepo };
|
|
610
|
+
return { results, count: results.length, strategy: 'semantic', scope: effectiveRepo, ...(dropNotes.length ? { notes: dropNotes } : {}) };
|
|
607
611
|
},
|
|
608
612
|
async checkAlignment(diff, _context,
|
|
609
613
|
// 'exhaustive' deliberately collapses into 'full' here: local mode has no gateway
|
|
@@ -620,7 +624,10 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
620
624
|
// the stricter bar. One constant could not serve both.
|
|
621
625
|
const threshold = opts.depth === 'related' ? RETRIEVAL_RELATES_THRESHOLD : RELATES_THRESHOLD;
|
|
622
626
|
const embedding = await getEmbedding(diff);
|
|
623
|
-
const
|
|
627
|
+
const judge = await activeJudge();
|
|
628
|
+
const hidden = judge ? notADecisionMarks(dbPath, judge) : new Map();
|
|
629
|
+
const retrieved = splitRetrieved(await findSimilar(embedding, 5 + hidden.size, threshold), hidden, 5, (id) => db.getDecisionById(id)?.title);
|
|
630
|
+
const similar = retrieved.kept;
|
|
624
631
|
const candidates = similar
|
|
625
632
|
.map(s => {
|
|
626
633
|
const row = db.getDecisionById(s.decisionId);
|
|
@@ -628,7 +635,7 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
628
635
|
})
|
|
629
636
|
.filter((d) => d !== null);
|
|
630
637
|
if (!candidates.length) {
|
|
631
|
-
return
|
|
638
|
+
return emptyCheck(retrieved);
|
|
632
639
|
}
|
|
633
640
|
// `depth:'related'` means retrieval only, and honouring it matters more here than in the
|
|
634
641
|
// cloud client. The editor hook asks for it to fit a <=10s budget (check.ts), but in
|
|
@@ -656,6 +663,7 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
656
663
|
...provenanceOf(c),
|
|
657
664
|
})),
|
|
658
665
|
conflicts: [],
|
|
666
|
+
...(retrieved.notes.length ? { notes: [...bannerFor(retrieved.agentApplied), ...retrieved.notes] } : {}),
|
|
659
667
|
message: `Found ${candidates.length} related decision(s) - retrieval only, not adjudicated.`,
|
|
660
668
|
};
|
|
661
669
|
}
|
|
@@ -668,19 +676,15 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
668
676
|
// ALI-845: the classifier's own buildUserPrompt is now budget-derived (local-relationship-
|
|
669
677
|
// classifier.ts), so capping the subject at a literal here would be a second writer of the
|
|
670
678
|
// same fact, at a number unrelated to any window. Send the diff uncut.
|
|
671
|
-
const subject = { title: opts.title ?? 'Proposed change', summary: diff };
|
|
679
|
+
const subject = { title: opts.title ?? 'Proposed change', summary: diff, decidedAt: null, platform: 'cli' };
|
|
680
|
+
// ALIGN_DETECTOR (local-candidate-classify.ts): v0 types each candidate in turn, v1 types the set in one call.
|
|
681
|
+
const { outcomes } = await classifyCandidates(subject, candidates.map(c => ({
|
|
682
|
+
id: c.id, title: c.title, summary: c.summary, similarity: c.score, platform: c.platform, decidedAt: c.decidedAt,
|
|
683
|
+
status: db.isSuperseded(c.id) ? 'superseded' : null,
|
|
684
|
+
})), 'subject-first');
|
|
672
685
|
const typed = [];
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
// ALI-692: a recorded chain stop is a property of the PROVIDER, not of this
|
|
676
|
-
// candidate, so asking again per candidate repeats one doomed call N times -
|
|
677
|
-
// on a 429 that burns the retry budget while `--advisory` races its deadline.
|
|
678
|
-
// The remaining candidates still report, untyped, which is what `unknown` means.
|
|
679
|
-
const outcome = chainStopped
|
|
680
|
-
? { ok: false, reason: 'classifier_error' }
|
|
681
|
-
: await classifyRelationship(subject, { title: c.title, summary: c.summary });
|
|
682
|
-
if (!outcome.ok && outcome.failure?.kind === 'provider_stopped')
|
|
683
|
-
chainStopped = true;
|
|
686
|
+
for (const [i, c] of candidates.entries()) {
|
|
687
|
+
const outcome = outcomes[i];
|
|
684
688
|
const rel = outcome.ok ? outcome.relationship : null;
|
|
685
689
|
typed.push({
|
|
686
690
|
id: c.id,
|
|
@@ -700,8 +704,13 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
700
704
|
similarity: c.score,
|
|
701
705
|
});
|
|
702
706
|
}
|
|
703
|
-
|
|
704
|
-
const
|
|
707
|
+
// LM: a decision a person said was replaced is named as replaced, with its successor.
|
|
708
|
+
const replacedBy = (id) => {
|
|
709
|
+
const r = relationFieldsFor(id);
|
|
710
|
+
return r.status === 'superseded' ? { status: r.status, successor: r.successor } : {};
|
|
711
|
+
};
|
|
712
|
+
const relevant_decisions = typed.map(t => ({ id: t.id, title: t.title, summary: t.summary, similarity: t.similarity, url: t.url, ...t.provenance, ...replacedBy(t.id) }));
|
|
713
|
+
const rawConflicts = typed
|
|
705
714
|
.filter(t => t.relationship === 'conflicts_with' || t.relationship === 'contradicts')
|
|
706
715
|
.map(t => ({
|
|
707
716
|
decision_id: t.id,
|
|
@@ -712,6 +721,13 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
712
721
|
reason: t.reason ?? 'Conflicts with an existing decision in your local graph',
|
|
713
722
|
severity: (t.confidence >= 0.8 ? 'critical' : 'warning'),
|
|
714
723
|
}));
|
|
724
|
+
// LM: this person's false-alarm marks hide a hit for exactly this set of files, or annotate it.
|
|
725
|
+
const files = filesFromDiff(diff);
|
|
726
|
+
const reviewed = judge ? reviewConflicts(dbPath, judge, rawConflicts, contextKeyFor(files), files) : { conflicts: rawConflicts, notes: [], agentApplied: [] };
|
|
727
|
+
const conflicts = reviewed.conflicts;
|
|
728
|
+
// LM: say what a mark changed - a decision left out, a decision a person declared replaced.
|
|
729
|
+
const allNotes = checkNotes(dbPath, judge, retrieved, relevant_decisions, reviewed, files);
|
|
730
|
+
const notes = allNotes.length ? { notes: allNotes } : {};
|
|
715
731
|
// ALI-414: a candidate we retrieved but could not classify is exactly the case
|
|
716
732
|
// where we do not know - it could be the conflict. Reporting `aligned` there is
|
|
717
733
|
// a fail-open, and an agent reads `aligned` as permission to proceed. A conflict
|
|
@@ -724,6 +740,8 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
724
740
|
confidence,
|
|
725
741
|
relevant_decisions,
|
|
726
742
|
conflicts,
|
|
743
|
+
...notes,
|
|
744
|
+
...(offeredFiles(files) ? { checked_files: files } : {}),
|
|
727
745
|
message: `This change conflicts with ${conflicts.length} existing decision(s) in your local graph - review before proceeding.`,
|
|
728
746
|
};
|
|
729
747
|
}
|
|
@@ -747,6 +765,7 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
747
765
|
confidence: 0,
|
|
748
766
|
relevant_decisions,
|
|
749
767
|
conflicts: [],
|
|
768
|
+
...notes,
|
|
750
769
|
message: `Could not check ${relevant_decisions.length} related decision(s) - the relationship classifier did not run. ` +
|
|
751
770
|
`This is NOT a pass: treat it as unchecked and review these decisions before proceeding.${hint}`,
|
|
752
771
|
};
|
|
@@ -756,6 +775,7 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
756
775
|
confidence,
|
|
757
776
|
relevant_decisions,
|
|
758
777
|
conflicts,
|
|
778
|
+
...notes,
|
|
759
779
|
message: `Found ${relevant_decisions.length} related decision(s) to review.`,
|
|
760
780
|
};
|
|
761
781
|
},
|
|
@@ -800,8 +820,10 @@ export function createLocalGatewayClient(dbPath, clientOpts = {}) {
|
|
|
800
820
|
...db.listLinks({ relation: 'conflicts_with' }),
|
|
801
821
|
...db.listLinks({ relation: 'contradicts' }),
|
|
802
822
|
];
|
|
803
|
-
|
|
823
|
+
const judge = await activeJudge();
|
|
824
|
+
return { links: judge ? annotatePairs(dbPath, judge, links) : links, conflict_count: links.length };
|
|
804
825
|
},
|
|
805
826
|
};
|
|
827
|
+
return client;
|
|
806
828
|
}
|
|
807
829
|
//# sourceMappingURL=local-gateway-client.js.map
|