@askdkc/kiokuko 0.1.17 → 0.1.20
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.ja.md +91 -112
- package/README.ko.md +90 -102
- package/README.md +103 -262
- package/README.zh-CN.md +88 -102
- package/dist/agent-file/atomic-write.d.ts +90 -3
- package/dist/agent-file/atomic-write.d.ts.map +1 -1
- package/dist/agent-file/atomic-write.js +990 -14
- package/dist/agent-file/atomic-write.js.map +1 -1
- package/dist/agent-file/managed-block.d.ts +12 -1
- package/dist/agent-file/managed-block.d.ts.map +1 -1
- package/dist/agent-file/managed-block.js +49 -4
- package/dist/agent-file/managed-block.js.map +1 -1
- package/dist/agent-file/render.d.ts +1 -1
- package/dist/agent-file/render.d.ts.map +1 -1
- package/dist/agent-file/render.js +10 -7
- package/dist/agent-file/render.js.map +1 -1
- package/dist/akinator/agent-task.d.ts +11 -22
- package/dist/akinator/agent-task.d.ts.map +1 -1
- package/dist/akinator/agent-task.js +454 -99
- package/dist/akinator/agent-task.js.map +1 -1
- package/dist/akinator/capabilities.d.ts +18 -6
- package/dist/akinator/capabilities.d.ts.map +1 -1
- package/dist/akinator/capabilities.js +72 -35
- package/dist/akinator/capabilities.js.map +1 -1
- package/dist/akinator/capability-binding.d.ts +11 -0
- package/dist/akinator/capability-binding.d.ts.map +1 -0
- package/dist/akinator/capability-binding.js +56 -0
- package/dist/akinator/capability-binding.js.map +1 -0
- package/dist/akinator/domain.js +2 -2
- package/dist/akinator/domain.js.map +1 -1
- package/dist/akinator/knowledge-path.d.ts.map +1 -1
- package/dist/akinator/knowledge-path.js +409 -39
- package/dist/akinator/knowledge-path.js.map +1 -1
- package/dist/akinator/orchestrator.d.ts +3 -4
- package/dist/akinator/orchestrator.d.ts.map +1 -1
- package/dist/akinator/orchestrator.js +1 -4
- package/dist/akinator/orchestrator.js.map +1 -1
- package/dist/akinator/service.d.ts +0 -4
- package/dist/akinator/service.d.ts.map +1 -1
- package/dist/akinator/service.js +19 -35
- package/dist/akinator/service.js.map +1 -1
- package/dist/akinator/skill-discovery-attempt.d.ts +20 -0
- package/dist/akinator/skill-discovery-attempt.d.ts.map +1 -0
- package/dist/akinator/skill-discovery-attempt.js +390 -0
- package/dist/akinator/skill-discovery-attempt.js.map +1 -0
- package/dist/akinator/store.d.ts.map +1 -1
- package/dist/akinator/store.js +107 -52
- package/dist/akinator/store.js.map +1 -1
- package/dist/akinator/types.d.ts +0 -12
- package/dist/akinator/types.d.ts.map +1 -1
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +560 -150
- package/dist/cli.js.map +1 -1
- package/dist/client/server-client.d.ts +5 -3
- package/dist/client/server-client.d.ts.map +1 -1
- package/dist/client/server-client.js +486 -181
- package/dist/client/server-client.js.map +1 -1
- package/dist/commands/agent.d.ts +2 -0
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +861 -86
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/backup.d.ts +2 -1
- package/dist/commands/backup.d.ts.map +1 -1
- package/dist/commands/backup.js +71 -8
- package/dist/commands/backup.js.map +1 -1
- package/dist/commands/doctor.d.ts +5 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +70 -26
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/export.d.ts +0 -4
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +191 -32
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/import.d.ts +10 -1
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +592 -113
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/init.d.ts +19 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +569 -22
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/purge.d.ts.map +1 -1
- package/dist/commands/purge.js +3 -0
- package/dist/commands/purge.js.map +1 -1
- package/dist/commands/setup.d.ts +37 -8
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +448 -86
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skills.d.ts +9 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +317 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/use.d.ts +10 -2
- package/dist/commands/use.d.ts.map +1 -1
- package/dist/commands/use.js +851 -73
- package/dist/commands/use.js.map +1 -1
- package/dist/config/paths.d.ts +11 -1
- package/dist/config/paths.d.ts.map +1 -1
- package/dist/config/paths.js +64 -29
- package/dist/config/paths.js.map +1 -1
- package/dist/config/project-config.d.ts +1 -0
- package/dist/config/project-config.d.ts.map +1 -1
- package/dist/config/project-config.js +70 -32
- package/dist/config/project-config.js.map +1 -1
- package/dist/context/broker.d.ts +28 -14
- package/dist/context/broker.d.ts.map +1 -1
- package/dist/context/broker.js +604 -145
- package/dist/context/broker.js.map +1 -1
- package/dist/context/delivery.d.ts +6 -21
- package/dist/context/delivery.d.ts.map +1 -1
- package/dist/context/delivery.js +196 -147
- package/dist/context/delivery.js.map +1 -1
- package/dist/context/feedback.d.ts +11 -12
- package/dist/context/feedback.d.ts.map +1 -1
- package/dist/context/feedback.js +229 -261
- package/dist/context/feedback.js.map +1 -1
- package/dist/context/ranking.d.ts +1 -12
- package/dist/context/ranking.d.ts.map +1 -1
- package/dist/context/ranking.js +13 -4
- package/dist/context/ranking.js.map +1 -1
- package/dist/context/recommendations.d.ts +0 -5
- package/dist/context/recommendations.d.ts.map +1 -1
- package/dist/context/recommendations.js +0 -1
- package/dist/context/recommendations.js.map +1 -1
- package/dist/context/run-state.d.ts +26 -0
- package/dist/context/run-state.d.ts.map +1 -0
- package/dist/context/run-state.js +399 -0
- package/dist/context/run-state.js.map +1 -0
- package/dist/context/scoped-broker.d.ts +17 -5
- package/dist/context/scoped-broker.d.ts.map +1 -1
- package/dist/context/scoped-broker.js +512 -106
- package/dist/context/scoped-broker.js.map +1 -1
- package/dist/context/selection-state.d.ts +19 -0
- package/dist/context/selection-state.d.ts.map +1 -0
- package/dist/context/selection-state.js +250 -0
- package/dist/context/selection-state.js.map +1 -0
- package/dist/db/adapter.d.ts +5 -3
- package/dist/db/adapter.d.ts.map +1 -1
- package/dist/db/adapter.js +7 -3
- package/dist/db/adapter.js.map +1 -1
- package/dist/db/capabilities.d.ts.map +1 -1
- package/dist/db/capabilities.js +34 -16
- package/dist/db/capabilities.js.map +1 -1
- package/dist/db/connection.d.ts +8 -0
- package/dist/db/connection.d.ts.map +1 -1
- package/dist/db/connection.js +55 -26
- package/dist/db/connection.js.map +1 -1
- package/dist/db/migrate.d.ts +28 -7
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +106 -78
- package/dist/db/migrate.js.map +1 -1
- package/dist/db/sqlite-retry.d.ts +11 -0
- package/dist/db/sqlite-retry.d.ts.map +1 -0
- package/dist/db/sqlite-retry.js +66 -0
- package/dist/db/sqlite-retry.js.map +1 -0
- package/dist/db/transaction.d.ts +13 -0
- package/dist/db/transaction.d.ts.map +1 -1
- package/dist/db/transaction.js +53 -24
- package/dist/db/transaction.js.map +1 -1
- package/dist/db/upgrade-backup.d.ts +58 -2
- package/dist/db/upgrade-backup.d.ts.map +1 -1
- package/dist/db/upgrade-backup.js +758 -28
- package/dist/db/upgrade-backup.js.map +1 -1
- package/dist/errors.d.ts +4 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +29 -1
- package/dist/errors.js.map +1 -1
- package/dist/gateway/agent-service.d.ts +4 -1
- package/dist/gateway/agent-service.d.ts.map +1 -1
- package/dist/gateway/agent-service.js +71 -58
- package/dist/gateway/agent-service.js.map +1 -1
- package/dist/gateway/checkpoint-service.d.ts +1 -0
- package/dist/gateway/checkpoint-service.d.ts.map +1 -1
- package/dist/gateway/checkpoint-service.js +47 -24
- package/dist/gateway/checkpoint-service.js.map +1 -1
- package/dist/ledger/archive.d.ts +1 -4
- package/dist/ledger/archive.d.ts.map +1 -1
- package/dist/ledger/archive.js +77 -39
- package/dist/ledger/archive.js.map +1 -1
- package/dist/ledger/maintenance.d.ts +0 -11
- package/dist/ledger/maintenance.d.ts.map +1 -1
- package/dist/ledger/maintenance.js +24 -40
- package/dist/ledger/maintenance.js.map +1 -1
- package/dist/ledger/projection.d.ts +0 -1
- package/dist/ledger/projection.d.ts.map +1 -1
- package/dist/ledger/projection.js.map +1 -1
- package/dist/ledger/promotion.d.ts +0 -9
- package/dist/ledger/promotion.d.ts.map +1 -1
- package/dist/ledger/promotion.js.map +1 -1
- package/dist/ledger/query.d.ts +1 -15
- package/dist/ledger/query.d.ts.map +1 -1
- package/dist/ledger/query.js.map +1 -1
- package/dist/ledger/store.d.ts +0 -1
- package/dist/ledger/store.d.ts.map +1 -1
- package/dist/ledger/store.js +11 -8
- package/dist/ledger/store.js.map +1 -1
- package/dist/ledger/types.d.ts +0 -4
- package/dist/ledger/types.d.ts.map +1 -1
- package/dist/ledger/types.js.map +1 -1
- package/dist/ledger/validate.d.ts.map +1 -1
- package/dist/ledger/validate.js +0 -5
- package/dist/ledger/validate.js.map +1 -1
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +105 -54
- package/dist/mcp/server.js.map +1 -1
- package/dist/memory/audit.d.ts +0 -1
- package/dist/memory/audit.d.ts.map +1 -1
- package/dist/memory/audit.js +0 -1
- package/dist/memory/audit.js.map +1 -1
- package/dist/memory/curator.d.ts.map +1 -1
- package/dist/memory/curator.js +172 -96
- package/dist/memory/curator.js.map +1 -1
- package/dist/memory/entries.d.ts +12 -2
- package/dist/memory/entries.d.ts.map +1 -1
- package/dist/memory/entries.js +199 -115
- package/dist/memory/entries.js.map +1 -1
- package/dist/memory/federated-retrieval.d.ts +12 -1
- package/dist/memory/federated-retrieval.d.ts.map +1 -1
- package/dist/memory/federated-retrieval.js +183 -70
- package/dist/memory/federated-retrieval.js.map +1 -1
- package/dist/memory/hybrid-retrieval.d.ts +5 -11
- package/dist/memory/hybrid-retrieval.d.ts.map +1 -1
- package/dist/memory/hybrid-retrieval.js +78 -58
- package/dist/memory/hybrid-retrieval.js.map +1 -1
- package/dist/memory/lifecycle.d.ts.map +1 -1
- package/dist/memory/lifecycle.js +17 -13
- package/dist/memory/lifecycle.js.map +1 -1
- package/dist/memory/rebuild-search.d.ts +5 -0
- package/dist/memory/rebuild-search.d.ts.map +1 -1
- package/dist/memory/rebuild-search.js +101 -76
- package/dist/memory/rebuild-search.js.map +1 -1
- package/dist/memory/retrieval-query.d.ts +0 -5
- package/dist/memory/retrieval-query.d.ts.map +1 -1
- package/dist/memory/retrieval-query.js +0 -5
- package/dist/memory/retrieval-query.js.map +1 -1
- package/dist/memory/retrieval.d.ts.map +1 -1
- package/dist/memory/retrieval.js +25 -131
- package/dist/memory/retrieval.js.map +1 -1
- package/dist/memory/revisions.d.ts +76 -1
- package/dist/memory/revisions.d.ts.map +1 -1
- package/dist/memory/revisions.js +540 -36
- package/dist/memory/revisions.js.map +1 -1
- package/dist/memory/scoped-memory.d.ts +16 -1
- package/dist/memory/scoped-memory.d.ts.map +1 -1
- package/dist/memory/scoped-memory.js +240 -107
- package/dist/memory/scoped-memory.js.map +1 -1
- package/dist/memory/secrets.d.ts +2 -0
- package/dist/memory/secrets.d.ts.map +1 -1
- package/dist/memory/secrets.js +36 -0
- package/dist/memory/secrets.js.map +1 -1
- package/dist/memory/structured-memory.d.ts +3 -2
- package/dist/memory/structured-memory.d.ts.map +1 -1
- package/dist/memory/structured-memory.js +54 -22
- package/dist/memory/structured-memory.js.map +1 -1
- package/dist/memory/workspaces.d.ts +9 -0
- package/dist/memory/workspaces.d.ts.map +1 -1
- package/dist/memory/workspaces.js +67 -0
- package/dist/memory/workspaces.js.map +1 -1
- package/dist/package-version.d.ts +2 -0
- package/dist/package-version.d.ts.map +1 -0
- package/dist/package-version.js +7 -0
- package/dist/package-version.js.map +1 -0
- package/dist/repository/binding.d.ts +5 -0
- package/dist/repository/binding.d.ts.map +1 -1
- package/dist/repository/binding.js +117 -17
- package/dist/repository/binding.js.map +1 -1
- package/dist/repository/framework-version.d.ts +8 -0
- package/dist/repository/framework-version.d.ts.map +1 -0
- package/dist/repository/framework-version.js +29 -0
- package/dist/repository/framework-version.js.map +1 -0
- package/dist/repository/identity-value.d.ts +4 -0
- package/dist/repository/identity-value.d.ts.map +1 -0
- package/dist/repository/identity-value.js +24 -0
- package/dist/repository/identity-value.js.map +1 -0
- package/dist/repository/identity.d.ts.map +1 -1
- package/dist/repository/identity.js +2 -0
- package/dist/repository/identity.js.map +1 -1
- package/dist/repository/project-fingerprint.d.ts +14 -2
- package/dist/repository/project-fingerprint.d.ts.map +1 -1
- package/dist/repository/project-fingerprint.js +312 -33
- package/dist/repository/project-fingerprint.js.map +1 -1
- package/dist/repository/remote-url.d.ts +0 -1
- package/dist/repository/remote-url.d.ts.map +1 -1
- package/dist/repository/remote-url.js +0 -1
- package/dist/repository/remote-url.js.map +1 -1
- package/dist/runtime-version.d.ts +2 -1
- package/dist/runtime-version.d.ts.map +1 -1
- package/dist/runtime-version.js +21 -4
- package/dist/runtime-version.js.map +1 -1
- package/dist/serialization/boundary-json.d.ts +20 -0
- package/dist/serialization/boundary-json.d.ts.map +1 -0
- package/dist/serialization/boundary-json.js +129 -0
- package/dist/serialization/boundary-json.js.map +1 -0
- package/dist/serialization/envelope.js +1 -1
- package/dist/serialization/envelope.js.map +1 -1
- package/dist/serialization/validate.d.ts +7 -0
- package/dist/serialization/validate.d.ts.map +1 -1
- package/dist/serialization/validate.js +53 -13
- package/dist/serialization/validate.js.map +1 -1
- package/dist/server/app.js +1 -1
- package/dist/server/app.js.map +1 -1
- package/dist/server/http.d.ts +4 -3
- package/dist/server/http.d.ts.map +1 -1
- package/dist/server/http.js +90 -50
- package/dist/server/http.js.map +1 -1
- package/dist/server/idempotency.d.ts +0 -6
- package/dist/server/idempotency.d.ts.map +1 -1
- package/dist/server/idempotency.js.map +1 -1
- package/dist/server/router.d.ts.map +1 -1
- package/dist/server/router.js +21 -4
- package/dist/server/router.js.map +1 -1
- package/dist/server/routes/agent-capability-gate.d.ts +40 -0
- package/dist/server/routes/agent-capability-gate.d.ts.map +1 -0
- package/dist/server/routes/agent-capability-gate.js +182 -0
- package/dist/server/routes/agent-capability-gate.js.map +1 -0
- package/dist/server/routes/agent-events.d.ts.map +1 -1
- package/dist/server/routes/agent-events.js +8 -1
- package/dist/server/routes/agent-events.js.map +1 -1
- package/dist/server/routes/agent-intake.d.ts.map +1 -1
- package/dist/server/routes/agent-intake.js +10 -2
- package/dist/server/routes/agent-intake.js.map +1 -1
- package/dist/server/routes/agent-promotions.d.ts.map +1 -1
- package/dist/server/routes/agent-promotions.js +5 -2
- package/dist/server/routes/agent-promotions.js.map +1 -1
- package/dist/server/routes/agent-runs.d.ts.map +1 -1
- package/dist/server/routes/agent-runs.js +18 -4
- package/dist/server/routes/agent-runs.js.map +1 -1
- package/dist/server/routes/request-binding.d.ts +5 -0
- package/dist/server/routes/request-binding.d.ts.map +1 -0
- package/dist/server/routes/request-binding.js +49 -0
- package/dist/server/routes/request-binding.js.map +1 -0
- package/dist/server/routes/task5-support.d.ts +1 -8
- package/dist/server/routes/task5-support.d.ts.map +1 -1
- package/dist/server/routes/task5-support.js +1 -17
- package/dist/server/routes/task5-support.js.map +1 -1
- package/dist/server/routes/task5.d.ts.map +1 -1
- package/dist/server/routes/task5.js +106 -36
- package/dist/server/routes/task5.js.map +1 -1
- package/dist/server/write-queue.js +2 -2
- package/dist/server/write-queue.js.map +1 -1
- package/dist/setup/claude-config.d.ts +4 -1
- package/dist/setup/claude-config.d.ts.map +1 -1
- package/dist/setup/claude-config.js +62 -4
- package/dist/setup/claude-config.js.map +1 -1
- package/dist/setup/client-detection.d.ts +7 -2
- package/dist/setup/client-detection.d.ts.map +1 -1
- package/dist/setup/client-detection.js +27 -9
- package/dist/setup/client-detection.js.map +1 -1
- package/dist/setup/hermes-config.d.ts +4 -1
- package/dist/setup/hermes-config.d.ts.map +1 -1
- package/dist/setup/hermes-config.js +71 -17
- package/dist/setup/hermes-config.js.map +1 -1
- package/dist/setup/legacy-client-cleanup.d.ts +6 -0
- package/dist/setup/legacy-client-cleanup.d.ts.map +1 -0
- package/dist/setup/legacy-client-cleanup.js +152 -0
- package/dist/setup/legacy-client-cleanup.js.map +1 -0
- package/dist/setup/managed-text.d.ts.map +1 -1
- package/dist/setup/managed-text.js +11 -1
- package/dist/setup/managed-text.js.map +1 -1
- package/dist/setup/mcp-conflict.d.ts +4 -0
- package/dist/setup/mcp-conflict.d.ts.map +1 -0
- package/dist/setup/mcp-conflict.js +15 -0
- package/dist/setup/mcp-conflict.js.map +1 -0
- package/dist/setup/opencode-config.d.ts +4 -1
- package/dist/setup/opencode-config.d.ts.map +1 -1
- package/dist/setup/opencode-config.js +65 -5
- package/dist/setup/opencode-config.js.map +1 -1
- package/dist/setup/render.d.ts +4 -1
- package/dist/setup/render.d.ts.map +1 -1
- package/dist/setup/render.js +168 -18
- package/dist/setup/render.js.map +1 -1
- package/dist/setup/standard-skills.d.ts +16 -2
- package/dist/setup/standard-skills.d.ts.map +1 -1
- package/dist/setup/standard-skills.js +37 -13
- package/dist/setup/standard-skills.js.map +1 -1
- package/dist/setup/strict-json.d.ts +7 -0
- package/dist/setup/strict-json.d.ts.map +1 -0
- package/dist/setup/strict-json.js +98 -0
- package/dist/setup/strict-json.js.map +1 -0
- package/dist/setup/strict-toml.d.ts +18 -0
- package/dist/setup/strict-toml.d.ts.map +1 -0
- package/dist/setup/strict-toml.js +491 -0
- package/dist/setup/strict-toml.js.map +1 -0
- package/dist/skills/cache.d.ts +15 -0
- package/dist/skills/cache.d.ts.map +1 -0
- package/dist/skills/cache.js +19 -0
- package/dist/skills/cache.js.map +1 -0
- package/dist/skills/candidate-ranking.d.ts +15 -0
- package/dist/skills/candidate-ranking.d.ts.map +1 -0
- package/dist/skills/candidate-ranking.js +52 -0
- package/dist/skills/candidate-ranking.js.map +1 -0
- package/dist/skills/chunking.d.ts +11 -0
- package/dist/skills/chunking.d.ts.map +1 -0
- package/dist/skills/chunking.js +291 -0
- package/dist/skills/chunking.js.map +1 -0
- package/dist/skills/config.d.ts +19 -0
- package/dist/skills/config.d.ts.map +1 -0
- package/dist/skills/config.js +103 -0
- package/dist/skills/config.js.map +1 -0
- package/dist/skills/discovery-service.d.ts +26 -0
- package/dist/skills/discovery-service.d.ts.map +1 -0
- package/dist/skills/discovery-service.js +921 -0
- package/dist/skills/discovery-service.js.map +1 -0
- package/dist/skills/external-transport.d.ts +2 -0
- package/dist/skills/external-transport.d.ts.map +1 -0
- package/dist/skills/external-transport.js +30 -0
- package/dist/skills/external-transport.js.map +1 -0
- package/dist/skills/find.d.ts +16 -0
- package/dist/skills/find.d.ts.map +1 -0
- package/dist/skills/find.js +58 -0
- package/dist/skills/find.js.map +1 -0
- package/dist/skills/gap-detection.d.ts +23 -0
- package/dist/skills/gap-detection.d.ts.map +1 -0
- package/dist/skills/gap-detection.js +62 -0
- package/dist/skills/gap-detection.js.map +1 -0
- package/dist/skills/import-preparation.d.ts +4 -0
- package/dist/skills/import-preparation.d.ts.map +1 -0
- package/dist/skills/import-preparation.js +20 -0
- package/dist/skills/import-preparation.js.map +1 -0
- package/dist/skills/materialization-authority.d.ts +11 -0
- package/dist/skills/materialization-authority.d.ts.map +1 -0
- package/dist/skills/materialization-authority.js +92 -0
- package/dist/skills/materialization-authority.js.map +1 -0
- package/dist/skills/materialization-service.d.ts +22 -0
- package/dist/skills/materialization-service.d.ts.map +1 -0
- package/dist/skills/materialization-service.js +101 -0
- package/dist/skills/materialization-service.js.map +1 -0
- package/dist/skills/official-catalog.d.ts +31 -0
- package/dist/skills/official-catalog.d.ts.map +1 -0
- package/dist/skills/official-catalog.js +110 -0
- package/dist/skills/official-catalog.js.map +1 -0
- package/dist/skills/providers/schema.d.ts +30 -0
- package/dist/skills/providers/schema.d.ts.map +1 -0
- package/dist/skills/providers/schema.js +354 -0
- package/dist/skills/providers/schema.js.map +1 -0
- package/dist/skills/providers/skills-sh-compat.d.ts +17 -0
- package/dist/skills/providers/skills-sh-compat.d.ts.map +1 -0
- package/dist/skills/providers/skills-sh-compat.js +71 -0
- package/dist/skills/providers/skills-sh-compat.js.map +1 -0
- package/dist/skills/providers/skills-sh-v1.d.ts +23 -0
- package/dist/skills/providers/skills-sh-v1.d.ts.map +1 -0
- package/dist/skills/providers/skills-sh-v1.js +134 -0
- package/dist/skills/providers/skills-sh-v1.js.map +1 -0
- package/dist/skills/query-builder.d.ts +18 -0
- package/dist/skills/query-builder.d.ts.map +1 -0
- package/dist/skills/query-builder.js +93 -0
- package/dist/skills/query-builder.js.map +1 -0
- package/dist/skills/source/errors.d.ts +9 -0
- package/dist/skills/source/errors.d.ts.map +1 -0
- package/dist/skills/source/errors.js +15 -0
- package/dist/skills/source/errors.js.map +1 -0
- package/dist/skills/source/frontmatter.d.ts +9 -0
- package/dist/skills/source/frontmatter.d.ts.map +1 -0
- package/dist/skills/source/frontmatter.js +77 -0
- package/dist/skills/source/frontmatter.js.map +1 -0
- package/dist/skills/source/github-fetcher.d.ts +20 -0
- package/dist/skills/source/github-fetcher.d.ts.map +1 -0
- package/dist/skills/source/github-fetcher.js +292 -0
- package/dist/skills/source/github-fetcher.js.map +1 -0
- package/dist/skills/source/snapshot-validator.d.ts +28 -0
- package/dist/skills/source/snapshot-validator.d.ts.map +1 -0
- package/dist/skills/source/snapshot-validator.js +186 -0
- package/dist/skills/source/snapshot-validator.js.map +1 -0
- package/dist/skills/store.d.ts +181 -0
- package/dist/skills/store.d.ts.map +1 -0
- package/dist/skills/store.js +1710 -0
- package/dist/skills/store.js.map +1 -0
- package/dist/skills/types.d.ts +169 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/types.js +2 -0
- package/dist/skills/types.js.map +1 -0
- package/dist/web/i18n.d.ts +32 -0
- package/dist/web/i18n.d.ts.map +1 -1
- package/dist/web/i18n.js +128 -0
- package/dist/web/i18n.js.map +1 -1
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +386 -38
- package/dist/web/server.js.map +1 -1
- package/dist/web/ui.d.ts +4 -0
- package/dist/web/ui.d.ts.map +1 -1
- package/dist/web/ui.js +382 -6
- package/dist/web/ui.js.map +1 -1
- package/migrations/009_external_skill_discovery.sql +126 -0
- package/package.json +6 -3
- package/skills/kiokuko-single-purpose-functions/SKILL.md +288 -0
- package/skills/kiokuko-single-purpose-functions/references/kiokuko-patterns.md +344 -0
- package/skills/kiokuko-single-purpose-functions/references/review-checklist.md +97 -0
- package/skills/kiokuko-ui-design-soul/SKILL.md +1186 -28
- package/templates/AGENTS.md +8 -7
- package/dist/client/runtime-discovery.d.ts +0 -15
- package/dist/client/runtime-discovery.d.ts.map +0 -1
- package/dist/client/runtime-discovery.js +0 -45
- package/dist/client/runtime-discovery.js.map +0 -1
- package/dist/commands/call.d.ts +0 -7
- package/dist/commands/call.d.ts.map +0 -1
- package/dist/commands/call.js +0 -10
- package/dist/commands/call.js.map +0 -1
- package/dist/commands/link.d.ts +0 -6
- package/dist/commands/link.d.ts.map +0 -1
- package/dist/commands/link.js +0 -6
- package/dist/commands/link.js.map +0 -1
- package/dist/commands/promote.d.ts +0 -6
- package/dist/commands/promote.d.ts.map +0 -1
- package/dist/commands/promote.js +0 -6
- package/dist/commands/promote.js.map +0 -1
- package/dist/commands/read.d.ts +0 -6
- package/dist/commands/read.d.ts.map +0 -1
- package/dist/commands/read.js +0 -4
- package/dist/commands/read.js.map +0 -1
- package/dist/commands/recall.d.ts +0 -6
- package/dist/commands/recall.d.ts.map +0 -1
- package/dist/commands/recall.js +0 -4
- package/dist/commands/recall.js.map +0 -1
- package/dist/commands/record.d.ts +0 -6
- package/dist/commands/record.d.ts.map +0 -1
- package/dist/commands/record.js +0 -4
- package/dist/commands/record.js.map +0 -1
- package/dist/commands/search.d.ts +0 -6
- package/dist/commands/search.d.ts.map +0 -1
- package/dist/commands/search.js +0 -4
- package/dist/commands/search.js.map +0 -1
- package/dist/commands/supersede.d.ts +0 -6
- package/dist/commands/supersede.d.ts.map +0 -1
- package/dist/commands/supersede.js +0 -6
- package/dist/commands/supersede.js.map +0 -1
- package/dist/knowledge/sources.d.ts +0 -72
- package/dist/knowledge/sources.d.ts.map +0 -1
- package/dist/knowledge/sources.js +0 -388
- package/dist/knowledge/sources.js.map +0 -1
- package/dist/setup/opencode-evidence.d.ts +0 -37
- package/dist/setup/opencode-evidence.d.ts.map +0 -1
- package/dist/setup/opencode-evidence.js +0 -58
- package/dist/setup/opencode-evidence.js.map +0 -1
- package/dist/setup/opencode-loop-guard.d.ts +0 -9
- package/dist/setup/opencode-loop-guard.d.ts.map +0 -1
- package/dist/setup/opencode-loop-guard.js +0 -248
- package/dist/setup/opencode-loop-guard.js.map +0 -1
|
@@ -1,15 +1,66 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KiokukoError } from '../errors.js';
|
|
2
|
+
import { canonicalContentHash, compareCanonicalStrings } from '../serialization/validate.js';
|
|
3
|
+
import { readEntry } from '../memory/entries.js';
|
|
4
|
+
import { decodeStoredStructuredScope, readEntryRevision } from '../memory/revisions.js';
|
|
2
5
|
import { ensureGlobalWorkspace, GLOBAL_WORKSPACE, resolveProjectWorkspace } from '../memory/workspaces.js';
|
|
3
6
|
import { federatedEntries } from '../memory/federated-retrieval.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
7
|
+
import { isRetrievableEntry } from '../memory/hybrid-retrieval.js';
|
|
8
|
+
import { effectiveRetrievalScope, hasExplicitApplicability } from '../memory/structured-memory.js';
|
|
9
|
+
import { readContextDelivery, recordContextDeliveryInTransaction } from './delivery.js';
|
|
6
10
|
import { CONTEXT_SELECTION_REASON_ORDER } from './ranking.js';
|
|
7
|
-
|
|
11
|
+
import { withImmediateTransaction } from '../db/transaction.js';
|
|
12
|
+
import { contextFeedbackSignals } from './feedback.js';
|
|
13
|
+
import { captureProjectManifestSnapshot, resolveProjectFingerprint, } from '../repository/project-fingerprint.js';
|
|
14
|
+
import { entryOriginMatchesWorkspace } from './origin.js';
|
|
15
|
+
import { isExternalSkillReference } from '../skills/store.js';
|
|
16
|
+
import { contextRetrievalStateHash, ordinaryContextSelectionStateHash } from './selection-state.js';
|
|
17
|
+
import { readContextRunRetrievalState } from './run-state.js';
|
|
18
|
+
export const SCOPED_CONTEXT_POLICY_VERSION = 'context-ranking-v4';
|
|
19
|
+
export const SCOPED_CONTEXT_DEFAULT_CHARACTER_BUDGET = 8_000;
|
|
20
|
+
export const SCOPED_CONTEXT_MAX_CHARACTER_BUDGET = 100_000;
|
|
21
|
+
function normalizedScopedGateDecision(value) {
|
|
22
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
23
|
+
throw new TypeError('Scoped context gate returned an invalid decision');
|
|
24
|
+
}
|
|
25
|
+
const prototype = Object.getPrototypeOf(value);
|
|
26
|
+
const keys = Reflect.ownKeys(value);
|
|
27
|
+
if ((prototype !== Object.prototype && prototype !== null)
|
|
28
|
+
|| keys.some((key) => typeof key !== 'string'
|
|
29
|
+
|| key !== 'persist' && key !== 'value' && key !== 'assertBeforePersist')
|
|
30
|
+
|| !keys.includes('persist')
|
|
31
|
+
|| !keys.includes('value')) {
|
|
32
|
+
throw new TypeError('Scoped context gate returned an invalid decision');
|
|
33
|
+
}
|
|
34
|
+
const persistDescriptor = Object.getOwnPropertyDescriptor(value, 'persist');
|
|
35
|
+
const resultDescriptor = Object.getOwnPropertyDescriptor(value, 'value');
|
|
36
|
+
const assertionDescriptor = Object.getOwnPropertyDescriptor(value, 'assertBeforePersist');
|
|
37
|
+
if (persistDescriptor === undefined
|
|
38
|
+
|| !Object.hasOwn(persistDescriptor, 'value')
|
|
39
|
+
|| typeof persistDescriptor.value !== 'boolean'
|
|
40
|
+
|| resultDescriptor === undefined
|
|
41
|
+
|| !Object.hasOwn(resultDescriptor, 'value')
|
|
42
|
+
|| assertionDescriptor !== undefined
|
|
43
|
+
&& (!Object.hasOwn(assertionDescriptor, 'value') || typeof assertionDescriptor.value !== 'function')) {
|
|
44
|
+
throw new TypeError('Scoped context gate returned an invalid decision');
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
persist: persistDescriptor.value,
|
|
48
|
+
value: resultDescriptor.value,
|
|
49
|
+
...(assertionDescriptor === undefined
|
|
50
|
+
? {}
|
|
51
|
+
: { assertBeforePersist: assertionDescriptor.value }),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
8
54
|
const MAX_LIMIT = 100;
|
|
9
|
-
const MAX_BUDGET = 100_000;
|
|
10
55
|
function normalize(value) {
|
|
11
56
|
return value.normalize('NFKC').toLowerCase();
|
|
12
57
|
}
|
|
58
|
+
function characterCount(value) {
|
|
59
|
+
return Array.from(value).length;
|
|
60
|
+
}
|
|
61
|
+
function takeCharacters(value, limit) {
|
|
62
|
+
return Array.from(value).slice(0, Math.max(0, limit)).join('');
|
|
63
|
+
}
|
|
13
64
|
function textFor(query) {
|
|
14
65
|
return [
|
|
15
66
|
query.task,
|
|
@@ -60,7 +111,7 @@ function applicabilityScore(entry, queryText, origin) {
|
|
|
60
111
|
conflict: false,
|
|
61
112
|
};
|
|
62
113
|
}
|
|
63
|
-
function entryScore(entry, origin, retrieval, exact,
|
|
114
|
+
function entryScore(entry, origin, retrieval, exact, queryText) {
|
|
64
115
|
const scope = origin;
|
|
65
116
|
const status = entry.status === 'verified' ? 100 : entry.status === 'candidate' ? 40 : 0;
|
|
66
117
|
const trust = entry.trustLevel === 'system_verified' ? 30 : entry.trustLevel === 'source_verified' ? 25 : entry.trustLevel === 'user_asserted' ? 15 : 0;
|
|
@@ -76,7 +127,7 @@ function entryScore(entry, origin, retrieval, exact, query, queryText) {
|
|
|
76
127
|
origin: scope,
|
|
77
128
|
title: entry.title,
|
|
78
129
|
summary: entry.summary,
|
|
79
|
-
bodyPreview: entry.
|
|
130
|
+
bodyPreview: entry.body,
|
|
80
131
|
score,
|
|
81
132
|
scoreComponents: {
|
|
82
133
|
status,
|
|
@@ -99,51 +150,378 @@ function entryScore(entry, origin, retrieval, exact, query, queryText) {
|
|
|
99
150
|
};
|
|
100
151
|
}
|
|
101
152
|
function feedbackScore(database, entryId) {
|
|
102
|
-
const rows = database.prepare(`
|
|
103
|
-
SELECT verdict, COUNT(DISTINCT run_id) AS runs
|
|
104
|
-
FROM context_feedback
|
|
105
|
-
WHERE entry_id = ?
|
|
106
|
-
GROUP BY verdict
|
|
107
|
-
`).all(entryId);
|
|
108
153
|
let score = 0;
|
|
109
154
|
const reasons = [];
|
|
110
|
-
for (const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
score += 3 * influence;
|
|
155
|
+
for (const signal of contextFeedbackSignals(database, entryId)) {
|
|
156
|
+
if (signal.verdict === 'helpful') {
|
|
157
|
+
score += 3 * signal.boundedInfluence;
|
|
114
158
|
reasons.push('helpful_feedback');
|
|
115
159
|
}
|
|
116
|
-
if (
|
|
117
|
-
score -= 2 *
|
|
160
|
+
if (signal.verdict === 'irrelevant') {
|
|
161
|
+
score -= 2 * signal.boundedInfluence;
|
|
118
162
|
reasons.push('irrelevant_feedback');
|
|
119
163
|
}
|
|
120
|
-
if (
|
|
121
|
-
score -= 3 *
|
|
164
|
+
if (signal.verdict === 'stale') {
|
|
165
|
+
score -= 3 * signal.boundedInfluence;
|
|
122
166
|
reasons.push('stale_feedback');
|
|
123
167
|
}
|
|
124
|
-
if (
|
|
125
|
-
score -= 3 *
|
|
168
|
+
if (signal.verdict === 'conflicting') {
|
|
169
|
+
score -= 3 * signal.boundedInfluence;
|
|
126
170
|
reasons.push('conflicting_feedback');
|
|
127
171
|
}
|
|
128
172
|
}
|
|
129
173
|
return { score: Math.max(-6, Math.min(6, score)), reasons };
|
|
130
174
|
}
|
|
131
|
-
|
|
132
|
-
|
|
175
|
+
function assertScopedSelectionState(database, workspaces, expectedHash) {
|
|
176
|
+
if (contextRetrievalStateHash(database, workspaces, { includeEcosystem: workspaces.length > 0 }) !== expectedHash) {
|
|
177
|
+
throw new KiokukoError('CONFLICT', 'Scoped context catalog changed after ranking');
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function fitScopedItems(ordered, limit, characterBudget) {
|
|
181
|
+
const items = [];
|
|
182
|
+
let remaining = characterBudget;
|
|
183
|
+
let truncated = false;
|
|
184
|
+
for (const item of ordered) {
|
|
185
|
+
if (items.length >= limit) {
|
|
186
|
+
truncated = true;
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
const metadataCost = characterCount(item.title) + characterCount(item.summary ?? '');
|
|
190
|
+
if (metadataCost > remaining) {
|
|
191
|
+
if (items.length === 0) {
|
|
192
|
+
throw new KiokukoError('VALIDATION_ERROR', 'Scoped context character budget cannot fit candidate metadata');
|
|
193
|
+
}
|
|
194
|
+
truncated = true;
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
const bodyPreview = takeCharacters(item.bodyPreview, remaining - metadataCost);
|
|
198
|
+
if (characterCount(bodyPreview) < characterCount(item.bodyPreview))
|
|
199
|
+
truncated = true;
|
|
200
|
+
const cost = metadataCost + characterCount(bodyPreview);
|
|
201
|
+
items.push({
|
|
202
|
+
...item,
|
|
203
|
+
bodyPreview,
|
|
204
|
+
scoreComponents: { ...item.scoreComponents },
|
|
205
|
+
selectionReasons: [...item.selectionReasons],
|
|
206
|
+
});
|
|
207
|
+
remaining -= cost;
|
|
208
|
+
}
|
|
209
|
+
return { items, charCount: characterBudget - remaining, truncated };
|
|
210
|
+
}
|
|
211
|
+
function scopedRunContext(database, runId) {
|
|
212
|
+
if (runId === undefined)
|
|
213
|
+
return null;
|
|
214
|
+
let state;
|
|
215
|
+
try {
|
|
216
|
+
state = readContextRunRetrievalState(database, runId);
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
if (error instanceof KiokukoError && error.code === 'NOT_FOUND') {
|
|
220
|
+
throw new KiokukoError('VALIDATION_ERROR', 'Scoped context run is invalid');
|
|
221
|
+
}
|
|
222
|
+
throw error;
|
|
223
|
+
}
|
|
224
|
+
return {
|
|
225
|
+
runId,
|
|
226
|
+
workspace: state.run.workspace,
|
|
227
|
+
status: state.run.status,
|
|
228
|
+
throughSequence: state.run.lastSequence,
|
|
229
|
+
createdAt: state.run.createdAt,
|
|
230
|
+
intakeSessionId: state.intakeSessionId,
|
|
231
|
+
profileHash: state.profileHash,
|
|
232
|
+
stateHash: state.stateHash,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function scopedDeliveryId(delivery) {
|
|
236
|
+
return `context-${canonicalContentHash({
|
|
237
|
+
kind: 'scoped-context-delivery-v1',
|
|
238
|
+
workspace: delivery.workspace,
|
|
239
|
+
runId: delivery.runId,
|
|
240
|
+
throughSequence: delivery.throughSequence,
|
|
241
|
+
intakeSessionId: delivery.intakeSessionId,
|
|
242
|
+
taskProfileHash: delivery.taskProfileHash,
|
|
243
|
+
queryHash: delivery.queryHash,
|
|
244
|
+
policyVersion: delivery.policyVersion,
|
|
245
|
+
charBudget: delivery.charBudget,
|
|
246
|
+
charCount: delivery.charCount,
|
|
247
|
+
truncated: delivery.truncated,
|
|
248
|
+
createdAt: delivery.createdAt,
|
|
249
|
+
scoreSchemaVersion: delivery.scoreSchemaVersion ?? 1,
|
|
250
|
+
items: delivery.items.map((item) => ({
|
|
251
|
+
entryId: item.entryId,
|
|
252
|
+
entryRevision: item.entryRevision,
|
|
253
|
+
rank: item.rank,
|
|
254
|
+
scoreComponents: item.scoreComponents,
|
|
255
|
+
selectionReasons: item.selectionReasons,
|
|
256
|
+
...(item.origin === undefined ? {} : { origin: item.origin }),
|
|
257
|
+
})),
|
|
258
|
+
})}`;
|
|
259
|
+
}
|
|
260
|
+
function assertScopedDeliveryIdentity(delivery) {
|
|
261
|
+
if (delivery.deliveryId !== scopedDeliveryId(delivery)) {
|
|
262
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context character accounting is invalid');
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function assertScopedReplayDeliveryUnchanged(database, expected) {
|
|
266
|
+
let current;
|
|
267
|
+
try {
|
|
268
|
+
current = readContextDelivery(database, {
|
|
269
|
+
workspace: expected.workspace,
|
|
270
|
+
deliveryId: expected.deliveryId,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
catch (error) {
|
|
274
|
+
if (error instanceof KiokukoError && error.code === 'NOT_FOUND') {
|
|
275
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context delivery disappeared during replay');
|
|
276
|
+
}
|
|
277
|
+
throw error;
|
|
278
|
+
}
|
|
279
|
+
assertScopedDeliveryIdentity(current);
|
|
280
|
+
if (scopedDeliveryId(current) !== scopedDeliveryId(expected)) {
|
|
281
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context delivery changed during replay');
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
function currentRetrievableDeliveryEntry(database, runWorkspace, item) {
|
|
285
|
+
const candidate = database.prepare('SELECT workspace FROM entries WHERE id = ?')
|
|
286
|
+
.get(item.entryId);
|
|
287
|
+
if (candidate === undefined) {
|
|
288
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context entry is missing');
|
|
289
|
+
}
|
|
290
|
+
if (typeof candidate.workspace !== 'string' || candidate.workspace.length === 0) {
|
|
291
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context entry is invalid');
|
|
292
|
+
}
|
|
293
|
+
const origin = item.origin ?? 'project';
|
|
294
|
+
let deliveredRevision;
|
|
295
|
+
try {
|
|
296
|
+
deliveredRevision = readEntryRevision(database, {
|
|
297
|
+
workspace: candidate.workspace,
|
|
298
|
+
entryId: item.entryId,
|
|
299
|
+
revision: item.entryRevision,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
catch (error) {
|
|
303
|
+
if (error instanceof KiokukoError && error.code === 'NOT_FOUND') {
|
|
304
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context entry revision is missing');
|
|
305
|
+
}
|
|
306
|
+
throw error;
|
|
307
|
+
}
|
|
308
|
+
const deliveredScope = decodeStoredStructuredScope(deliveredRevision.scope, origin !== 'project').canonicalScope;
|
|
309
|
+
if (!entryOriginMatchesWorkspace({ origin, runWorkspace, entryWorkspace: deliveredRevision.workspace })) {
|
|
310
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context entry origin is invalid');
|
|
311
|
+
}
|
|
312
|
+
if (origin === 'global'
|
|
313
|
+
&& (deliveredScope.visibility !== 'global' || effectiveRetrievalScope(deliveredScope) !== 'global')) {
|
|
314
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context entry scope is invalid');
|
|
315
|
+
}
|
|
316
|
+
if (origin === 'ecosystem'
|
|
317
|
+
&& (!Object.hasOwn(deliveredScope, 'retrievalScope')
|
|
318
|
+
|| effectiveRetrievalScope(deliveredScope) !== 'ecosystem'
|
|
319
|
+
|| !hasExplicitApplicability(deliveredScope))) {
|
|
320
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context entry scope is invalid');
|
|
321
|
+
}
|
|
322
|
+
if (isExternalSkillReference(deliveredRevision)) {
|
|
323
|
+
const mappings = database.prepare('SELECT COUNT(*) AS count FROM external_skill_entries WHERE entry_id = ?')
|
|
324
|
+
.get(item.entryId)?.count;
|
|
325
|
+
if (typeof mappings !== 'number' || !Number.isSafeInteger(mappings) || mappings < 1) {
|
|
326
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context external entry mapping is missing');
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const entry = readEntry(database, { workspace: candidate.workspace, entryId: item.entryId }, { requireStructuredScope: origin !== 'project' });
|
|
330
|
+
const retrievable = isRetrievableEntry(database, entry);
|
|
331
|
+
if (entry.revision !== item.entryRevision)
|
|
332
|
+
return null;
|
|
333
|
+
if (!retrievable)
|
|
334
|
+
return null;
|
|
335
|
+
if (entry.status === 'superseded')
|
|
336
|
+
return null;
|
|
337
|
+
return entry;
|
|
338
|
+
}
|
|
339
|
+
function storedDeliveryIsRetrievable(database, delivery, throughSequence, taskProfileHash, limit, characterBudget) {
|
|
340
|
+
assertScopedDeliveryIdentity(delivery);
|
|
341
|
+
if (delivery.throughSequence !== throughSequence)
|
|
342
|
+
return false;
|
|
343
|
+
if (!delivery.items.every((item) => currentRetrievableDeliveryEntry(database, delivery.workspace, item) !== null))
|
|
344
|
+
return false;
|
|
345
|
+
return !(delivery.taskProfileHash !== taskProfileHash
|
|
346
|
+
|| delivery.policyVersion !== SCOPED_CONTEXT_POLICY_VERSION
|
|
347
|
+
|| delivery.scoreSchemaVersion !== 2
|
|
348
|
+
|| delivery.charBudget !== characterBudget
|
|
349
|
+
|| delivery.items.length > limit);
|
|
350
|
+
}
|
|
351
|
+
function replayableDelivery(database, run, queryHash, taskProfileHash, limit, characterBudget) {
|
|
352
|
+
if (run === null)
|
|
353
|
+
return null;
|
|
354
|
+
const rows = database.prepare(`
|
|
355
|
+
SELECT delivery_id AS deliveryId
|
|
356
|
+
FROM context_deliveries
|
|
357
|
+
WHERE run_id = ? AND query_hash = ?
|
|
358
|
+
ORDER BY delivery_id ASC
|
|
359
|
+
`).all(run.runId, queryHash);
|
|
360
|
+
for (const row of rows) {
|
|
361
|
+
const delivery = readContextDelivery(database, { workspace: run.workspace, deliveryId: row.deliveryId });
|
|
362
|
+
if (storedDeliveryIsRetrievable(database, delivery, run.throughSequence, taskProfileHash, limit, characterBudget))
|
|
363
|
+
return delivery;
|
|
364
|
+
}
|
|
365
|
+
return null;
|
|
366
|
+
}
|
|
367
|
+
function storedScopedItems(database, delivery) {
|
|
368
|
+
assertScopedDeliveryIdentity(delivery);
|
|
369
|
+
const fullItems = delivery.items.map((item) => {
|
|
370
|
+
const current = currentRetrievableDeliveryEntry(database, delivery.workspace, item);
|
|
371
|
+
if (current === null)
|
|
372
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context entry is no longer retrievable');
|
|
373
|
+
const revision = readEntryRevision(database, {
|
|
374
|
+
entryId: item.entryId,
|
|
375
|
+
workspace: current.workspace,
|
|
376
|
+
revision: item.entryRevision,
|
|
377
|
+
});
|
|
378
|
+
const scoreComponents = item.scoreComponents;
|
|
379
|
+
return {
|
|
380
|
+
entryId: item.entryId,
|
|
381
|
+
revision: item.entryRevision,
|
|
382
|
+
origin: item.origin ?? 'project',
|
|
383
|
+
title: revision.title,
|
|
384
|
+
summary: revision.summary,
|
|
385
|
+
bodyPreview: revision.body,
|
|
386
|
+
score: Object.values(scoreComponents).reduce((total, component) => total + component, 0),
|
|
387
|
+
scoreComponents: { ...scoreComponents },
|
|
388
|
+
selectionReasons: [...item.selectionReasons],
|
|
389
|
+
metadata: { storedData: true, untrusted: true, instructions: false },
|
|
390
|
+
};
|
|
391
|
+
});
|
|
392
|
+
const fitted = fitScopedItems(fullItems, fullItems.length || 1, delivery.charBudget);
|
|
393
|
+
if (fitted.charCount !== delivery.charCount
|
|
394
|
+
|| fitted.items.length !== delivery.items.length
|
|
395
|
+
|| (fitted.truncated && !delivery.truncated)) {
|
|
396
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context character accounting is invalid');
|
|
397
|
+
}
|
|
398
|
+
return fitted.items;
|
|
399
|
+
}
|
|
400
|
+
function deliveryItems(items) {
|
|
401
|
+
const allowedReasons = new Set(CONTEXT_SELECTION_REASON_ORDER);
|
|
402
|
+
return items.map((item, index) => ({
|
|
403
|
+
entryId: item.entryId,
|
|
404
|
+
entryRevision: item.revision,
|
|
405
|
+
rank: index + 1,
|
|
406
|
+
scoreComponents: { ...item.scoreComponents },
|
|
407
|
+
selectionReasons: [...new Set([
|
|
408
|
+
...item.selectionReasons.filter((reason) => allowedReasons.has(reason)),
|
|
409
|
+
item.scoreComponents.status >= 100 ? 'verified' : 'candidate',
|
|
410
|
+
])].sort((left, right) => CONTEXT_SELECTION_REASON_ORDER.findIndex((reason) => reason === left)
|
|
411
|
+
- CONTEXT_SELECTION_REASON_ORDER.findIndex((reason) => reason === right)),
|
|
412
|
+
...(item.origin === 'project' ? {} : { origin: item.origin }),
|
|
413
|
+
}));
|
|
414
|
+
}
|
|
415
|
+
function deliveryRequest(run, taskProfileHash, queryHash, characterBudget, fitted) {
|
|
416
|
+
return {
|
|
417
|
+
workspace: run.workspace,
|
|
418
|
+
runId: run.runId,
|
|
419
|
+
throughSequence: run.throughSequence,
|
|
420
|
+
intakeSessionId: run.intakeSessionId,
|
|
421
|
+
taskProfileHash,
|
|
422
|
+
queryHash,
|
|
423
|
+
policyVersion: SCOPED_CONTEXT_POLICY_VERSION,
|
|
424
|
+
charBudget: characterBudget,
|
|
425
|
+
charCount: fitted.charCount,
|
|
426
|
+
truncated: fitted.truncated,
|
|
427
|
+
createdAt: run.createdAt,
|
|
428
|
+
scoreSchemaVersion: 2,
|
|
429
|
+
items: deliveryItems(fitted.items),
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
async function prepareScopedContext(database, raw) {
|
|
433
|
+
const taskProfileHash = canonicalContentHash(raw.taskProfile);
|
|
434
|
+
const run = scopedRunContext(database, raw.runId);
|
|
435
|
+
if (run !== null && run.profileHash !== taskProfileHash) {
|
|
436
|
+
throw new KiokukoError('CONFLICT', 'Scoped context task profile does not match its run');
|
|
437
|
+
}
|
|
438
|
+
const resolvedProject = raw.project ?? await resolveProjectWorkspace(database, raw.cwd);
|
|
439
|
+
const project = resolvedProject === undefined ? undefined : { ...resolvedProject };
|
|
440
|
+
if (run !== null && (project === undefined || run.workspace !== project.workspace)) {
|
|
441
|
+
throw new KiokukoError('VALIDATION_ERROR', 'Scoped context run is invalid');
|
|
442
|
+
}
|
|
443
|
+
if (raw.fingerprint !== undefined && project === undefined) {
|
|
444
|
+
throw new KiokukoError('VALIDATION_ERROR', 'Scoped context fingerprint requires a project');
|
|
445
|
+
}
|
|
446
|
+
const manifestSnapshot = project === undefined ? undefined : captureProjectManifestSnapshot(project);
|
|
447
|
+
if (raw.fingerprint !== undefined
|
|
448
|
+
&& manifestSnapshot !== undefined
|
|
449
|
+
&& raw.fingerprint.manifestDigest !== manifestSnapshot.manifestDigest) {
|
|
450
|
+
throw new KiokukoError('CONFLICT', 'Project manifest changed while task context was being prepared');
|
|
451
|
+
}
|
|
452
|
+
const fingerprint = project === undefined || manifestSnapshot === undefined
|
|
453
|
+
? undefined
|
|
454
|
+
: resolveProjectFingerprint(database, project, manifestSnapshot);
|
|
455
|
+
if (raw.fingerprint !== undefined
|
|
456
|
+
&& fingerprint !== undefined
|
|
457
|
+
&& canonicalContentHash(raw.fingerprint) !== canonicalContentHash(fingerprint)) {
|
|
458
|
+
throw new KiokukoError('CONFLICT', 'Project manifest changed while task context was being prepared');
|
|
459
|
+
}
|
|
460
|
+
const projectState = project === undefined || fingerprint === undefined ? null : { project, fingerprint };
|
|
133
461
|
ensureGlobalWorkspace(database);
|
|
134
462
|
const limit = raw.limit ?? 20;
|
|
135
|
-
const characterBudget = raw.characterBudget ??
|
|
136
|
-
if (!Number.isSafeInteger(limit) || limit < 1 || limit > MAX_LIMIT || !Number.isSafeInteger(characterBudget) || characterBudget < 1 || characterBudget >
|
|
137
|
-
throw new
|
|
463
|
+
const characterBudget = raw.characterBudget ?? SCOPED_CONTEXT_DEFAULT_CHARACTER_BUDGET;
|
|
464
|
+
if (!Number.isSafeInteger(limit) || limit < 1 || limit > MAX_LIMIT || !Number.isSafeInteger(characterBudget) || characterBudget < 1 || characterBudget > SCOPED_CONTEXT_MAX_CHARACTER_BUDGET) {
|
|
465
|
+
throw new KiokukoError('VALIDATION_ERROR', 'Scoped context bounds are invalid');
|
|
138
466
|
}
|
|
139
467
|
const queryText = textFor(raw);
|
|
140
|
-
const
|
|
141
|
-
const
|
|
468
|
+
const selectionWorkspaces = project === undefined ? [] : [project.workspace, GLOBAL_WORKSPACE];
|
|
469
|
+
const selectionStateHash = ordinaryContextSelectionStateHash(database, selectionWorkspaces, {
|
|
470
|
+
includeEcosystem: project !== undefined,
|
|
471
|
+
});
|
|
472
|
+
const retrievalStateHash = contextRetrievalStateHash(database, selectionWorkspaces, {
|
|
473
|
+
includeEcosystem: project !== undefined,
|
|
474
|
+
});
|
|
475
|
+
const queryHash = canonicalContentHash({
|
|
476
|
+
task: raw.task,
|
|
477
|
+
taskProfile: raw.taskProfile,
|
|
478
|
+
recommendedTags: raw.recommendedTags ?? [],
|
|
479
|
+
changedPaths: raw.changedPaths ?? [],
|
|
480
|
+
errorSignatures: raw.errorSignatures ?? [],
|
|
481
|
+
project: project === undefined ? null : {
|
|
482
|
+
workspace: project.workspace,
|
|
483
|
+
repositoryId: project.repositoryId,
|
|
484
|
+
repositoryRoot: project.repositoryRoot,
|
|
485
|
+
fingerprint,
|
|
486
|
+
},
|
|
487
|
+
limit,
|
|
488
|
+
characterBudget,
|
|
489
|
+
policyVersion: SCOPED_CONTEXT_POLICY_VERSION,
|
|
490
|
+
retrievalStateHash,
|
|
491
|
+
runStateHash: run?.stateHash ?? null,
|
|
492
|
+
});
|
|
493
|
+
const replay = replayableDelivery(database, run, queryHash, taskProfileHash, limit, characterBudget);
|
|
494
|
+
if (replay !== null) {
|
|
495
|
+
return {
|
|
496
|
+
result: {
|
|
497
|
+
project: project ?? null,
|
|
498
|
+
taskProfileHash,
|
|
499
|
+
queryHash,
|
|
500
|
+
policyVersion: SCOPED_CONTEXT_POLICY_VERSION,
|
|
501
|
+
items: storedScopedItems(database, replay),
|
|
502
|
+
deliveryId: replay.deliveryId,
|
|
503
|
+
truncated: replay.truncated,
|
|
504
|
+
untrusted: true,
|
|
505
|
+
},
|
|
506
|
+
replayDelivery: replay,
|
|
507
|
+
selectionStateHash,
|
|
508
|
+
retrievalStateHash,
|
|
509
|
+
selectionWorkspaces,
|
|
510
|
+
pendingDelivery: null,
|
|
511
|
+
run,
|
|
512
|
+
projectState,
|
|
513
|
+
};
|
|
514
|
+
}
|
|
142
515
|
const candidates = new Map();
|
|
143
|
-
const federated = project === undefined ? [] : await federatedEntries(database, {
|
|
516
|
+
const federated = project === undefined ? [] : await federatedEntries(database, {
|
|
517
|
+
project,
|
|
518
|
+
...(fingerprint === undefined ? {} : { fingerprint }),
|
|
519
|
+
query: queryText,
|
|
520
|
+
limit: 200,
|
|
521
|
+
});
|
|
144
522
|
for (const hit of federated) {
|
|
145
523
|
const entry = hit.entry;
|
|
146
|
-
const item = entryScore(entry, hit.origin, hit.score, hit.selectionReasons.includes('exact_signal_match'),
|
|
524
|
+
const item = entryScore(entry, hit.origin, hit.score, hit.selectionReasons.includes('exact_signal_match'), queryText);
|
|
147
525
|
item.selectionReasons.push(...hit.selectionReasons);
|
|
148
526
|
item.selectionReasons = [...new Set(item.selectionReasons)];
|
|
149
527
|
const feedback = feedbackScore(database, entry.id);
|
|
@@ -156,86 +534,114 @@ export async function queryScopedContext(database, raw) {
|
|
|
156
534
|
if (previous === undefined || item.score > previous.score)
|
|
157
535
|
candidates.set(item.entryId, item);
|
|
158
536
|
}
|
|
159
|
-
const ordered = [...candidates.values()].sort((left, right) => right.score - left.score || left.entryId
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
const cost = Array.from(item.title).length + Array.from(item.summary ?? '').length + body.length;
|
|
165
|
-
if (remaining <= 0)
|
|
166
|
-
break;
|
|
167
|
-
items.push({ ...item, bodyPreview: body, scoreComponents: { ...item.scoreComponents }, selectionReasons: [...item.selectionReasons] });
|
|
168
|
-
remaining -= cost;
|
|
169
|
-
}
|
|
170
|
-
let deliveryId = null;
|
|
171
|
-
if (raw.runId !== undefined) {
|
|
172
|
-
const run = database.prepare('SELECT run_id, workspace, last_sequence, created_at FROM ledger_runs WHERE run_id = ?').get(raw.runId);
|
|
173
|
-
if (!run || project === undefined || run.workspace !== project.workspace)
|
|
174
|
-
throw new Error('Scoped context run is invalid');
|
|
175
|
-
const link = readRunIntakeLink(database, { workspace: run.workspace, runId: raw.runId });
|
|
176
|
-
// queryHash is intentionally stable, but delivery_id is a global primary
|
|
177
|
-
// key. Include the run so the same successful reasoning path can recur in
|
|
178
|
-
// independent runs without colliding, while replay within one run remains
|
|
179
|
-
// idempotent.
|
|
180
|
-
deliveryId = `context-${canonicalContentHash({ runId: raw.runId, queryHash })}`;
|
|
181
|
-
const allowedReasons = new Set(CONTEXT_SELECTION_REASON_ORDER);
|
|
182
|
-
const deliveryItems = items.slice(0, limit).map((item, index) => ({
|
|
183
|
-
entryId: item.entryId,
|
|
184
|
-
entryRevision: item.revision,
|
|
185
|
-
rank: index + 1,
|
|
186
|
-
scoreComponents: {
|
|
187
|
-
status: item.scoreComponents.status,
|
|
188
|
-
trust: item.scoreComponents.trust,
|
|
189
|
-
confidence: item.scoreComponents.confidence,
|
|
190
|
-
retrieval: item.scoreComponents.retrieval,
|
|
191
|
-
taskAffinity: item.scoreComponents.taskAffinity,
|
|
192
|
-
recommendedTags: item.scoreComponents.recommendedTags,
|
|
193
|
-
scopeAffinity: item.scoreComponents.scopeAffinity,
|
|
194
|
-
applicability: item.scoreComponents.applicability,
|
|
195
|
-
pathOverlap: item.scoreComponents.pathOverlap,
|
|
196
|
-
errorSignature: item.scoreComponents.errorSignature,
|
|
197
|
-
exactSignal: item.scoreComponents.exactSignal,
|
|
198
|
-
feedback: item.scoreComponents.feedback,
|
|
199
|
-
recency: 0,
|
|
200
|
-
contradiction: 0,
|
|
201
|
-
},
|
|
202
|
-
selectionReasons: [...new Set([...item.selectionReasons.filter((reason) => allowedReasons.has(reason)), item.scoreComponents.status >= 100 ? 'verified' : 'candidate'])]
|
|
203
|
-
.sort((left, right) => CONTEXT_SELECTION_REASON_ORDER.findIndex((reason) => reason === left) - CONTEXT_SELECTION_REASON_ORDER.findIndex((reason) => reason === right)),
|
|
204
|
-
...(item.origin === 'project' ? {} : { origin: item.origin }),
|
|
205
|
-
}));
|
|
206
|
-
recordContextDelivery(database, {
|
|
207
|
-
workspace: run.workspace,
|
|
208
|
-
deliveryId,
|
|
209
|
-
runId: raw.runId,
|
|
210
|
-
throughSequence: run.last_sequence,
|
|
211
|
-
intakeSessionId: link.sessionId,
|
|
537
|
+
const ordered = [...candidates.values()].sort((left, right) => right.score - left.score || compareCanonicalStrings(left.entryId, right.entryId));
|
|
538
|
+
const fitted = fitScopedItems(ordered, limit, characterBudget);
|
|
539
|
+
return {
|
|
540
|
+
result: {
|
|
541
|
+
project: project ?? null,
|
|
212
542
|
taskProfileHash,
|
|
213
543
|
queryHash,
|
|
214
544
|
policyVersion: SCOPED_CONTEXT_POLICY_VERSION,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
545
|
+
items: fitted.items,
|
|
546
|
+
deliveryId: null,
|
|
547
|
+
truncated: fitted.truncated,
|
|
548
|
+
untrusted: true,
|
|
549
|
+
},
|
|
550
|
+
replayDelivery: null,
|
|
551
|
+
selectionStateHash,
|
|
552
|
+
retrievalStateHash,
|
|
553
|
+
selectionWorkspaces,
|
|
554
|
+
pendingDelivery: run === null ? null : deliveryRequest(run, taskProfileHash, queryHash, characterBudget, fitted),
|
|
555
|
+
run,
|
|
556
|
+
projectState,
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
function assertPreparedScopedRun(database, run) {
|
|
560
|
+
const current = readContextRunRetrievalState(database, run.runId);
|
|
561
|
+
if (run.status !== 'active'
|
|
562
|
+
|| current.run.workspace !== run.workspace
|
|
563
|
+
|| current.run.status !== run.status
|
|
564
|
+
|| current.run.lastSequence !== run.throughSequence
|
|
565
|
+
|| current.intakeSessionId !== run.intakeSessionId
|
|
566
|
+
|| current.profileHash !== run.profileHash
|
|
567
|
+
|| current.stateHash !== run.stateHash) {
|
|
568
|
+
throw new KiokukoError('CONFLICT', 'Scoped context run changed before persistence');
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
function assertPreparedScopedState(database, prepared) {
|
|
572
|
+
if (prepared.projectState !== null) {
|
|
573
|
+
const manifestSnapshot = captureProjectManifestSnapshot(prepared.projectState.project);
|
|
574
|
+
if (manifestSnapshot.manifestDigest !== prepared.projectState.fingerprint.manifestDigest) {
|
|
575
|
+
throw new KiokukoError('CONFLICT', 'Scoped context project state changed after ranking');
|
|
576
|
+
}
|
|
577
|
+
const currentFingerprint = resolveProjectFingerprint(database, prepared.projectState.project, manifestSnapshot, { readOnly: true });
|
|
578
|
+
if (canonicalContentHash(currentFingerprint) !== canonicalContentHash(prepared.projectState.fingerprint)) {
|
|
579
|
+
throw new KiokukoError('CONFLICT', 'Scoped context project state changed after ranking');
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
if (prepared.run !== null)
|
|
583
|
+
assertPreparedScopedRun(database, prepared.run);
|
|
584
|
+
const workspace = prepared.run?.workspace ?? prepared.result.project?.workspace;
|
|
585
|
+
if (workspace !== undefined && prepared.result.items.some((item) => currentRetrievableDeliveryEntry(database, workspace, {
|
|
586
|
+
entryId: item.entryId,
|
|
587
|
+
entryRevision: item.revision,
|
|
588
|
+
origin: item.origin,
|
|
589
|
+
}) === null)) {
|
|
590
|
+
throw new KiokukoError('CONFLICT', 'Scoped context selection changed before return');
|
|
591
|
+
}
|
|
592
|
+
assertScopedSelectionState(database, prepared.selectionWorkspaces, prepared.retrievalStateHash);
|
|
593
|
+
if (prepared.replayDelivery !== null) {
|
|
594
|
+
assertScopedReplayDeliveryUnchanged(database, prepared.replayDelivery);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
function persistPreparedScopedContext(database, prepared, assertBeforePersist) {
|
|
598
|
+
if (prepared.pendingDelivery === null) {
|
|
599
|
+
return withImmediateTransaction(database, () => {
|
|
600
|
+
assertPreparedScopedState(database, prepared);
|
|
601
|
+
if (assertBeforePersist !== undefined) {
|
|
602
|
+
assertBeforePersist();
|
|
603
|
+
assertPreparedScopedState(database, prepared);
|
|
604
|
+
}
|
|
605
|
+
return prepared.result;
|
|
222
606
|
});
|
|
223
607
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
608
|
+
const request = prepared.pendingDelivery;
|
|
609
|
+
return withImmediateTransaction(database, () => {
|
|
610
|
+
if (prepared.run === null)
|
|
611
|
+
throw new KiokukoError('INTEGRITY_ERROR', 'Stored scoped context run is invalid');
|
|
612
|
+
assertPreparedScopedState(database, prepared);
|
|
613
|
+
if (assertBeforePersist !== undefined) {
|
|
614
|
+
assertBeforePersist();
|
|
615
|
+
assertPreparedScopedState(database, prepared);
|
|
616
|
+
}
|
|
617
|
+
const delivery = recordContextDeliveryInTransaction(database, { ...request, deliveryId: scopedDeliveryId(request) });
|
|
618
|
+
return {
|
|
619
|
+
...prepared.result,
|
|
620
|
+
items: storedScopedItems(database, delivery),
|
|
621
|
+
deliveryId: delivery.deliveryId,
|
|
622
|
+
truncated: delivery.truncated,
|
|
623
|
+
};
|
|
624
|
+
});
|
|
234
625
|
}
|
|
235
|
-
export function
|
|
236
|
-
return
|
|
626
|
+
export async function queryScopedContext(database, raw) {
|
|
627
|
+
return persistPreparedScopedContext(database, await prepareScopedContext(database, raw));
|
|
237
628
|
}
|
|
238
|
-
export function
|
|
239
|
-
|
|
629
|
+
export async function queryScopedContextGated(database, raw, decide) {
|
|
630
|
+
const prepared = await prepareScopedContext(database, raw);
|
|
631
|
+
const decision = normalizedScopedGateDecision(decide(prepared.result));
|
|
632
|
+
if (!decision.persist) {
|
|
633
|
+
withImmediateTransaction(database, () => {
|
|
634
|
+
assertPreparedScopedState(database, prepared);
|
|
635
|
+
if (decision.assertBeforePersist !== undefined) {
|
|
636
|
+
decision.assertBeforePersist();
|
|
637
|
+
assertPreparedScopedState(database, prepared);
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
return {
|
|
642
|
+
context: decision.persist ? persistPreparedScopedContext(database, prepared, decision.assertBeforePersist) : null,
|
|
643
|
+
value: decision.value,
|
|
644
|
+
selectionStateHash: prepared.selectionStateHash,
|
|
645
|
+
};
|
|
240
646
|
}
|
|
241
647
|
//# sourceMappingURL=scoped-broker.js.map
|