opentasks 0.0.7 → 0.0.9
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/dist/daemon/entire-linker.d.ts.map +1 -1
- package/dist/daemon/entire-linker.js +42 -48
- package/dist/daemon/entire-linker.js.map +1 -1
- package/dist/daemon/entire-watcher.d.ts +0 -11
- package/dist/daemon/entire-watcher.d.ts.map +1 -1
- package/dist/daemon/entire-watcher.js +1 -32
- package/dist/daemon/entire-watcher.js.map +1 -1
- package/dist/graph/query.js +3 -3
- package/dist/graph/query.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/providers/entire.d.ts +0 -10
- package/dist/providers/entire.d.ts.map +1 -1
- package/dist/providers/entire.js +0 -13
- package/dist/providers/entire.js.map +1 -1
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +2 -0
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/map-connector.d.ts +87 -0
- package/dist/providers/map-connector.d.ts.map +1 -0
- package/dist/providers/map-connector.js +159 -0
- package/dist/providers/map-connector.js.map +1 -0
- package/dist/storage/interface.d.ts +6 -0
- package/dist/storage/interface.d.ts.map +1 -1
- package/dist/storage/interface.js.map +1 -1
- package/dist/storage/sqlite.d.ts +1 -0
- package/dist/storage/sqlite.d.ts.map +1 -1
- package/dist/storage/sqlite.js +11 -0
- package/dist/storage/sqlite.js.map +1 -1
- package/package.json +2 -2
- package/dist/__tests__/cli-tools.test.d.ts +0 -8
- package/dist/__tests__/cli-tools.test.d.ts.map +0 -1
- package/dist/__tests__/cli-tools.test.js +0 -546
- package/dist/__tests__/cli-tools.test.js.map +0 -1
- package/dist/__tests__/cli.test.d.ts +0 -5
- package/dist/__tests__/cli.test.d.ts.map +0 -1
- package/dist/__tests__/cli.test.js +0 -77
- package/dist/__tests__/cli.test.js.map +0 -1
- package/dist/__tests__/p1-p3-gaps.test.d.ts +0 -2
- package/dist/__tests__/p1-p3-gaps.test.d.ts.map +0 -1
- package/dist/__tests__/p1-p3-gaps.test.js +0 -463
- package/dist/__tests__/p1-p3-gaps.test.js.map +0 -1
- package/dist/client/__tests__/client-crud.test.d.ts +0 -7
- package/dist/client/__tests__/client-crud.test.d.ts.map +0 -1
- package/dist/client/__tests__/client-crud.test.js +0 -404
- package/dist/client/__tests__/client-crud.test.js.map +0 -1
- package/dist/client/__tests__/client.test.d.ts +0 -5
- package/dist/client/__tests__/client.test.d.ts.map +0 -1
- package/dist/client/__tests__/client.test.js +0 -518
- package/dist/client/__tests__/client.test.js.map +0 -1
- package/dist/config/__tests__/defaults.test.d.ts +0 -2
- package/dist/config/__tests__/defaults.test.d.ts.map +0 -1
- package/dist/config/__tests__/defaults.test.js +0 -57
- package/dist/config/__tests__/defaults.test.js.map +0 -1
- package/dist/config/__tests__/env.test.d.ts +0 -2
- package/dist/config/__tests__/env.test.d.ts.map +0 -1
- package/dist/config/__tests__/env.test.js +0 -136
- package/dist/config/__tests__/env.test.js.map +0 -1
- package/dist/config/__tests__/index.test.d.ts +0 -2
- package/dist/config/__tests__/index.test.d.ts.map +0 -1
- package/dist/config/__tests__/index.test.js +0 -113
- package/dist/config/__tests__/index.test.js.map +0 -1
- package/dist/config/__tests__/loader.test.d.ts +0 -2
- package/dist/config/__tests__/loader.test.d.ts.map +0 -1
- package/dist/config/__tests__/loader.test.js +0 -128
- package/dist/config/__tests__/loader.test.js.map +0 -1
- package/dist/config/__tests__/merge.test.d.ts +0 -2
- package/dist/config/__tests__/merge.test.d.ts.map +0 -1
- package/dist/config/__tests__/merge.test.js +0 -79
- package/dist/config/__tests__/merge.test.js.map +0 -1
- package/dist/config/__tests__/schema.test.d.ts +0 -2
- package/dist/config/__tests__/schema.test.d.ts.map +0 -1
- package/dist/config/__tests__/schema.test.js +0 -300
- package/dist/config/__tests__/schema.test.js.map +0 -1
- package/dist/core/__tests__/conditional-redirects.test.d.ts +0 -2
- package/dist/core/__tests__/conditional-redirects.test.d.ts.map +0 -1
- package/dist/core/__tests__/conditional-redirects.test.js +0 -83
- package/dist/core/__tests__/conditional-redirects.test.js.map +0 -1
- package/dist/core/__tests__/connections.test.d.ts +0 -2
- package/dist/core/__tests__/connections.test.d.ts.map +0 -1
- package/dist/core/__tests__/connections.test.js +0 -158
- package/dist/core/__tests__/connections.test.js.map +0 -1
- package/dist/core/__tests__/hash.test.d.ts +0 -2
- package/dist/core/__tests__/hash.test.d.ts.map +0 -1
- package/dist/core/__tests__/hash.test.js +0 -139
- package/dist/core/__tests__/hash.test.js.map +0 -1
- package/dist/core/__tests__/id.test.d.ts +0 -2
- package/dist/core/__tests__/id.test.d.ts.map +0 -1
- package/dist/core/__tests__/id.test.js +0 -142
- package/dist/core/__tests__/id.test.js.map +0 -1
- package/dist/core/__tests__/location.test.d.ts +0 -2
- package/dist/core/__tests__/location.test.d.ts.map +0 -1
- package/dist/core/__tests__/location.test.js +0 -77
- package/dist/core/__tests__/location.test.js.map +0 -1
- package/dist/core/__tests__/merge-driver.test.d.ts +0 -2
- package/dist/core/__tests__/merge-driver.test.d.ts.map +0 -1
- package/dist/core/__tests__/merge-driver.test.js +0 -218
- package/dist/core/__tests__/merge-driver.test.js.map +0 -1
- package/dist/core/__tests__/redirects.test.d.ts +0 -2
- package/dist/core/__tests__/redirects.test.d.ts.map +0 -1
- package/dist/core/__tests__/redirects.test.js +0 -123
- package/dist/core/__tests__/redirects.test.js.map +0 -1
- package/dist/core/__tests__/resolve-location-target.test.d.ts +0 -8
- package/dist/core/__tests__/resolve-location-target.test.d.ts.map +0 -1
- package/dist/core/__tests__/resolve-location-target.test.js +0 -303
- package/dist/core/__tests__/resolve-location-target.test.js.map +0 -1
- package/dist/core/__tests__/uri.test.d.ts +0 -2
- package/dist/core/__tests__/uri.test.d.ts.map +0 -1
- package/dist/core/__tests__/uri.test.js +0 -159
- package/dist/core/__tests__/uri.test.js.map +0 -1
- package/dist/core/__tests__/worktree.test.d.ts +0 -2
- package/dist/core/__tests__/worktree.test.d.ts.map +0 -1
- package/dist/core/__tests__/worktree.test.js +0 -120
- package/dist/core/__tests__/worktree.test.js.map +0 -1
- package/dist/daemon/__tests__/flush.test.d.ts +0 -5
- package/dist/daemon/__tests__/flush.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/flush.test.js +0 -213
- package/dist/daemon/__tests__/flush.test.js.map +0 -1
- package/dist/daemon/__tests__/integration.test.d.ts +0 -7
- package/dist/daemon/__tests__/integration.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/integration.test.js +0 -276
- package/dist/daemon/__tests__/integration.test.js.map +0 -1
- package/dist/daemon/__tests__/ipc.test.d.ts +0 -5
- package/dist/daemon/__tests__/ipc.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/ipc.test.js +0 -314
- package/dist/daemon/__tests__/ipc.test.js.map +0 -1
- package/dist/daemon/__tests__/lifecycle.test.d.ts +0 -5
- package/dist/daemon/__tests__/lifecycle.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/lifecycle.test.js +0 -301
- package/dist/daemon/__tests__/lifecycle.test.js.map +0 -1
- package/dist/daemon/__tests__/lock.test.d.ts +0 -5
- package/dist/daemon/__tests__/lock.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/lock.test.js +0 -192
- package/dist/daemon/__tests__/lock.test.js.map +0 -1
- package/dist/daemon/__tests__/methods/graph.test.d.ts +0 -5
- package/dist/daemon/__tests__/methods/graph.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/methods/graph.test.js +0 -309
- package/dist/daemon/__tests__/methods/graph.test.js.map +0 -1
- package/dist/daemon/__tests__/methods/provider.test.d.ts +0 -7
- package/dist/daemon/__tests__/methods/provider.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/methods/provider.test.js +0 -181
- package/dist/daemon/__tests__/methods/provider.test.js.map +0 -1
- package/dist/daemon/__tests__/methods/tools.test.d.ts +0 -5
- package/dist/daemon/__tests__/methods/tools.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/methods/tools.test.js +0 -587
- package/dist/daemon/__tests__/methods/tools.test.js.map +0 -1
- package/dist/daemon/__tests__/multi-location.test.d.ts +0 -8
- package/dist/daemon/__tests__/multi-location.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/multi-location.test.js +0 -669
- package/dist/daemon/__tests__/multi-location.test.js.map +0 -1
- package/dist/daemon/__tests__/registry.test.d.ts +0 -5
- package/dist/daemon/__tests__/registry.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/registry.test.js +0 -208
- package/dist/daemon/__tests__/registry.test.js.map +0 -1
- package/dist/daemon/__tests__/watcher.test.d.ts +0 -5
- package/dist/daemon/__tests__/watcher.test.d.ts.map +0 -1
- package/dist/daemon/__tests__/watcher.test.js +0 -234
- package/dist/daemon/__tests__/watcher.test.js.map +0 -1
- package/dist/daemon/methods/__tests__/graph.test.d.ts +0 -5
- package/dist/daemon/methods/__tests__/graph.test.d.ts.map +0 -1
- package/dist/daemon/methods/__tests__/graph.test.js +0 -274
- package/dist/daemon/methods/__tests__/graph.test.js.map +0 -1
- package/dist/daemon/methods/__tests__/provider.test.d.ts +0 -5
- package/dist/daemon/methods/__tests__/provider.test.d.ts.map +0 -1
- package/dist/daemon/methods/__tests__/provider.test.js +0 -184
- package/dist/daemon/methods/__tests__/provider.test.js.map +0 -1
- package/dist/daemon/methods/__tests__/tools.test.d.ts +0 -5
- package/dist/daemon/methods/__tests__/tools.test.d.ts.map +0 -1
- package/dist/daemon/methods/__tests__/tools.test.js +0 -295
- package/dist/daemon/methods/__tests__/tools.test.js.map +0 -1
- package/dist/entire/agent/agents/claude-code.d.ts +0 -76
- package/dist/entire/agent/agents/claude-code.d.ts.map +0 -1
- package/dist/entire/agent/agents/claude-code.js +0 -759
- package/dist/entire/agent/agents/claude-code.js.map +0 -1
- package/dist/entire/agent/agents/cursor.d.ts +0 -35
- package/dist/entire/agent/agents/cursor.d.ts.map +0 -1
- package/dist/entire/agent/agents/cursor.js +0 -294
- package/dist/entire/agent/agents/cursor.js.map +0 -1
- package/dist/entire/agent/agents/gemini-cli.d.ts +0 -62
- package/dist/entire/agent/agents/gemini-cli.d.ts.map +0 -1
- package/dist/entire/agent/agents/gemini-cli.js +0 -462
- package/dist/entire/agent/agents/gemini-cli.js.map +0 -1
- package/dist/entire/agent/agents/opencode.d.ts +0 -100
- package/dist/entire/agent/agents/opencode.d.ts.map +0 -1
- package/dist/entire/agent/agents/opencode.js +0 -423
- package/dist/entire/agent/agents/opencode.js.map +0 -1
- package/dist/entire/agent/registry.d.ts +0 -54
- package/dist/entire/agent/registry.d.ts.map +0 -1
- package/dist/entire/agent/registry.js +0 -123
- package/dist/entire/agent/registry.js.map +0 -1
- package/dist/entire/agent/session-types.d.ts +0 -45
- package/dist/entire/agent/session-types.d.ts.map +0 -1
- package/dist/entire/agent/session-types.js +0 -50
- package/dist/entire/agent/session-types.js.map +0 -1
- package/dist/entire/agent/types.d.ts +0 -126
- package/dist/entire/agent/types.d.ts.map +0 -1
- package/dist/entire/agent/types.js +0 -39
- package/dist/entire/agent/types.js.map +0 -1
- package/dist/entire/commands/clean.d.ts +0 -30
- package/dist/entire/commands/clean.d.ts.map +0 -1
- package/dist/entire/commands/clean.js +0 -99
- package/dist/entire/commands/clean.js.map +0 -1
- package/dist/entire/commands/disable.d.ts +0 -23
- package/dist/entire/commands/disable.d.ts.map +0 -1
- package/dist/entire/commands/disable.js +0 -57
- package/dist/entire/commands/disable.js.map +0 -1
- package/dist/entire/commands/doctor.d.ts +0 -43
- package/dist/entire/commands/doctor.d.ts.map +0 -1
- package/dist/entire/commands/doctor.js +0 -97
- package/dist/entire/commands/doctor.js.map +0 -1
- package/dist/entire/commands/enable.d.ts +0 -29
- package/dist/entire/commands/enable.d.ts.map +0 -1
- package/dist/entire/commands/enable.js +0 -102
- package/dist/entire/commands/enable.js.map +0 -1
- package/dist/entire/commands/explain.d.ts +0 -68
- package/dist/entire/commands/explain.d.ts.map +0 -1
- package/dist/entire/commands/explain.js +0 -182
- package/dist/entire/commands/explain.js.map +0 -1
- package/dist/entire/commands/reset.d.ts +0 -23
- package/dist/entire/commands/reset.d.ts.map +0 -1
- package/dist/entire/commands/reset.js +0 -68
- package/dist/entire/commands/reset.js.map +0 -1
- package/dist/entire/commands/resume.d.ts +0 -42
- package/dist/entire/commands/resume.d.ts.map +0 -1
- package/dist/entire/commands/resume.js +0 -134
- package/dist/entire/commands/resume.js.map +0 -1
- package/dist/entire/commands/rewind.d.ts +0 -34
- package/dist/entire/commands/rewind.d.ts.map +0 -1
- package/dist/entire/commands/rewind.js +0 -155
- package/dist/entire/commands/rewind.js.map +0 -1
- package/dist/entire/commands/status.d.ts +0 -51
- package/dist/entire/commands/status.d.ts.map +0 -1
- package/dist/entire/commands/status.js +0 -94
- package/dist/entire/commands/status.js.map +0 -1
- package/dist/entire/config.d.ts +0 -40
- package/dist/entire/config.d.ts.map +0 -1
- package/dist/entire/config.js +0 -126
- package/dist/entire/config.js.map +0 -1
- package/dist/entire/git-operations.d.ts +0 -170
- package/dist/entire/git-operations.d.ts.map +0 -1
- package/dist/entire/git-operations.js +0 -395
- package/dist/entire/git-operations.js.map +0 -1
- package/dist/entire/hooks/git-hooks.d.ts +0 -22
- package/dist/entire/hooks/git-hooks.d.ts.map +0 -1
- package/dist/entire/hooks/git-hooks.js +0 -145
- package/dist/entire/hooks/git-hooks.js.map +0 -1
- package/dist/entire/hooks/lifecycle.d.ts +0 -21
- package/dist/entire/hooks/lifecycle.d.ts.map +0 -1
- package/dist/entire/hooks/lifecycle.js +0 -179
- package/dist/entire/hooks/lifecycle.js.map +0 -1
- package/dist/entire/index.d.ts +0 -69
- package/dist/entire/index.d.ts.map +0 -1
- package/dist/entire/index.js +0 -152
- package/dist/entire/index.js.map +0 -1
- package/dist/entire/security/redaction.d.ts +0 -35
- package/dist/entire/security/redaction.d.ts.map +0 -1
- package/dist/entire/security/redaction.js +0 -221
- package/dist/entire/security/redaction.js.map +0 -1
- package/dist/entire/session/state-machine.d.ts +0 -90
- package/dist/entire/session/state-machine.d.ts.map +0 -1
- package/dist/entire/session/state-machine.js +0 -347
- package/dist/entire/session/state-machine.js.map +0 -1
- package/dist/entire/store/checkpoint-store.d.ts +0 -47
- package/dist/entire/store/checkpoint-store.d.ts.map +0 -1
- package/dist/entire/store/checkpoint-store.js +0 -307
- package/dist/entire/store/checkpoint-store.js.map +0 -1
- package/dist/entire/store/native-store.d.ts +0 -14
- package/dist/entire/store/native-store.d.ts.map +0 -1
- package/dist/entire/store/native-store.js +0 -159
- package/dist/entire/store/native-store.js.map +0 -1
- package/dist/entire/store/provider-types.d.ts +0 -78
- package/dist/entire/store/provider-types.d.ts.map +0 -1
- package/dist/entire/store/provider-types.js +0 -12
- package/dist/entire/store/provider-types.js.map +0 -1
- package/dist/entire/store/session-store.d.ts +0 -28
- package/dist/entire/store/session-store.d.ts.map +0 -1
- package/dist/entire/store/session-store.js +0 -187
- package/dist/entire/store/session-store.js.map +0 -1
- package/dist/entire/strategy/attribution.d.ts +0 -39
- package/dist/entire/strategy/attribution.d.ts.map +0 -1
- package/dist/entire/strategy/attribution.js +0 -227
- package/dist/entire/strategy/attribution.js.map +0 -1
- package/dist/entire/strategy/common.d.ts +0 -57
- package/dist/entire/strategy/common.d.ts.map +0 -1
- package/dist/entire/strategy/common.js +0 -156
- package/dist/entire/strategy/common.js.map +0 -1
- package/dist/entire/strategy/content-overlap.d.ts +0 -33
- package/dist/entire/strategy/content-overlap.d.ts.map +0 -1
- package/dist/entire/strategy/content-overlap.js +0 -168
- package/dist/entire/strategy/content-overlap.js.map +0 -1
- package/dist/entire/strategy/manual-commit.d.ts +0 -31
- package/dist/entire/strategy/manual-commit.d.ts.map +0 -1
- package/dist/entire/strategy/manual-commit.js +0 -730
- package/dist/entire/strategy/manual-commit.js.map +0 -1
- package/dist/entire/strategy/types.d.ts +0 -163
- package/dist/entire/strategy/types.d.ts.map +0 -1
- package/dist/entire/strategy/types.js +0 -49
- package/dist/entire/strategy/types.js.map +0 -1
- package/dist/entire/summarize/claude-generator.d.ts +0 -25
- package/dist/entire/summarize/claude-generator.d.ts.map +0 -1
- package/dist/entire/summarize/claude-generator.js +0 -87
- package/dist/entire/summarize/claude-generator.js.map +0 -1
- package/dist/entire/summarize/summarize.d.ts +0 -52
- package/dist/entire/summarize/summarize.d.ts.map +0 -1
- package/dist/entire/summarize/summarize.js +0 -335
- package/dist/entire/summarize/summarize.js.map +0 -1
- package/dist/entire/types.d.ts +0 -288
- package/dist/entire/types.d.ts.map +0 -1
- package/dist/entire/types.js +0 -94
- package/dist/entire/types.js.map +0 -1
- package/dist/entire/utils/chunk-files.d.ts +0 -25
- package/dist/entire/utils/chunk-files.d.ts.map +0 -1
- package/dist/entire/utils/chunk-files.js +0 -47
- package/dist/entire/utils/chunk-files.js.map +0 -1
- package/dist/entire/utils/commit-message.d.ts +0 -11
- package/dist/entire/utils/commit-message.d.ts.map +0 -1
- package/dist/entire/utils/commit-message.js +0 -54
- package/dist/entire/utils/commit-message.js.map +0 -1
- package/dist/entire/utils/detect-agent.d.ts +0 -19
- package/dist/entire/utils/detect-agent.d.ts.map +0 -1
- package/dist/entire/utils/detect-agent.js +0 -34
- package/dist/entire/utils/detect-agent.js.map +0 -1
- package/dist/entire/utils/hook-managers.d.ts +0 -24
- package/dist/entire/utils/hook-managers.d.ts.map +0 -1
- package/dist/entire/utils/hook-managers.js +0 -87
- package/dist/entire/utils/hook-managers.js.map +0 -1
- package/dist/entire/utils/ide-tags.d.ts +0 -12
- package/dist/entire/utils/ide-tags.d.ts.map +0 -1
- package/dist/entire/utils/ide-tags.js +0 -30
- package/dist/entire/utils/ide-tags.js.map +0 -1
- package/dist/entire/utils/paths.d.ts +0 -32
- package/dist/entire/utils/paths.d.ts.map +0 -1
- package/dist/entire/utils/paths.js +0 -55
- package/dist/entire/utils/paths.js.map +0 -1
- package/dist/entire/utils/preview-rewind.d.ts +0 -23
- package/dist/entire/utils/preview-rewind.d.ts.map +0 -1
- package/dist/entire/utils/preview-rewind.js +0 -63
- package/dist/entire/utils/preview-rewind.js.map +0 -1
- package/dist/entire/utils/rewind-conflict.d.ts +0 -52
- package/dist/entire/utils/rewind-conflict.d.ts.map +0 -1
- package/dist/entire/utils/rewind-conflict.js +0 -79
- package/dist/entire/utils/rewind-conflict.js.map +0 -1
- package/dist/entire/utils/shadow-branch.d.ts +0 -44
- package/dist/entire/utils/shadow-branch.d.ts.map +0 -1
- package/dist/entire/utils/shadow-branch.js +0 -93
- package/dist/entire/utils/shadow-branch.js.map +0 -1
- package/dist/entire/utils/string-utils.d.ts +0 -24
- package/dist/entire/utils/string-utils.d.ts.map +0 -1
- package/dist/entire/utils/string-utils.js +0 -47
- package/dist/entire/utils/string-utils.js.map +0 -1
- package/dist/entire/utils/todo-extract.d.ts +0 -52
- package/dist/entire/utils/todo-extract.d.ts.map +0 -1
- package/dist/entire/utils/todo-extract.js +0 -167
- package/dist/entire/utils/todo-extract.js.map +0 -1
- package/dist/entire/utils/trailers.d.ts +0 -36
- package/dist/entire/utils/trailers.d.ts.map +0 -1
- package/dist/entire/utils/trailers.js +0 -149
- package/dist/entire/utils/trailers.js.map +0 -1
- package/dist/entire/utils/transcript-parse.d.ts +0 -57
- package/dist/entire/utils/transcript-parse.d.ts.map +0 -1
- package/dist/entire/utils/transcript-parse.js +0 -126
- package/dist/entire/utils/transcript-parse.js.map +0 -1
- package/dist/entire/utils/transcript-timestamp.d.ts +0 -22
- package/dist/entire/utils/transcript-timestamp.d.ts.map +0 -1
- package/dist/entire/utils/transcript-timestamp.js +0 -56
- package/dist/entire/utils/transcript-timestamp.js.map +0 -1
- package/dist/entire/utils/tree-ops.d.ts +0 -47
- package/dist/entire/utils/tree-ops.d.ts.map +0 -1
- package/dist/entire/utils/tree-ops.js +0 -145
- package/dist/entire/utils/tree-ops.js.map +0 -1
- package/dist/entire/utils/tty.d.ts +0 -25
- package/dist/entire/utils/tty.d.ts.map +0 -1
- package/dist/entire/utils/tty.js +0 -70
- package/dist/entire/utils/tty.js.map +0 -1
- package/dist/entire/utils/validation.d.ts +0 -31
- package/dist/entire/utils/validation.d.ts.map +0 -1
- package/dist/entire/utils/validation.js +0 -59
- package/dist/entire/utils/validation.js.map +0 -1
- package/dist/entire/utils/worktree.d.ts +0 -16
- package/dist/entire/utils/worktree.d.ts.map +0 -1
- package/dist/entire/utils/worktree.js +0 -50
- package/dist/entire/utils/worktree.js.map +0 -1
- package/dist/graph/__tests__/EdgeTypeRegistry.test.d.ts +0 -2
- package/dist/graph/__tests__/EdgeTypeRegistry.test.d.ts.map +0 -1
- package/dist/graph/__tests__/EdgeTypeRegistry.test.js +0 -212
- package/dist/graph/__tests__/EdgeTypeRegistry.test.js.map +0 -1
- package/dist/graph/__tests__/FederatedGraph.test.d.ts +0 -2
- package/dist/graph/__tests__/FederatedGraph.test.d.ts.map +0 -1
- package/dist/graph/__tests__/FederatedGraph.test.js +0 -661
- package/dist/graph/__tests__/FederatedGraph.test.js.map +0 -1
- package/dist/graph/__tests__/GraphologyAdapter.test.d.ts +0 -2
- package/dist/graph/__tests__/GraphologyAdapter.test.d.ts.map +0 -1
- package/dist/graph/__tests__/GraphologyAdapter.test.js +0 -326
- package/dist/graph/__tests__/GraphologyAdapter.test.js.map +0 -1
- package/dist/graph/__tests__/HydratingFederatedGraph.test.d.ts +0 -2
- package/dist/graph/__tests__/HydratingFederatedGraph.test.d.ts.map +0 -1
- package/dist/graph/__tests__/HydratingFederatedGraph.test.js +0 -587
- package/dist/graph/__tests__/HydratingFederatedGraph.test.js.map +0 -1
- package/dist/graph/__tests__/debounce.test.d.ts +0 -5
- package/dist/graph/__tests__/debounce.test.d.ts.map +0 -1
- package/dist/graph/__tests__/debounce.test.js +0 -195
- package/dist/graph/__tests__/debounce.test.js.map +0 -1
- package/dist/graph/__tests__/edge-cases.test.d.ts +0 -8
- package/dist/graph/__tests__/edge-cases.test.d.ts.map +0 -1
- package/dist/graph/__tests__/edge-cases.test.js +0 -472
- package/dist/graph/__tests__/edge-cases.test.js.map +0 -1
- package/dist/graph/__tests__/expansion.test.d.ts +0 -2
- package/dist/graph/__tests__/expansion.test.d.ts.map +0 -1
- package/dist/graph/__tests__/expansion.test.js +0 -105
- package/dist/graph/__tests__/expansion.test.js.map +0 -1
- package/dist/graph/__tests__/provider-store.test.d.ts +0 -5
- package/dist/graph/__tests__/provider-store.test.d.ts.map +0 -1
- package/dist/graph/__tests__/provider-store.test.js +0 -791
- package/dist/graph/__tests__/provider-store.test.js.map +0 -1
- package/dist/graph/__tests__/query.test.d.ts +0 -5
- package/dist/graph/__tests__/query.test.d.ts.map +0 -1
- package/dist/graph/__tests__/query.test.js +0 -774
- package/dist/graph/__tests__/query.test.js.map +0 -1
- package/dist/graph/__tests__/store.test.d.ts +0 -5
- package/dist/graph/__tests__/store.test.d.ts.map +0 -1
- package/dist/graph/__tests__/store.test.js +0 -489
- package/dist/graph/__tests__/store.test.js.map +0 -1
- package/dist/graph/__tests__/sync.test.d.ts +0 -5
- package/dist/graph/__tests__/sync.test.d.ts.map +0 -1
- package/dist/graph/__tests__/sync.test.js +0 -129
- package/dist/graph/__tests__/sync.test.js.map +0 -1
- package/dist/graph/__tests__/validation.test.d.ts +0 -2
- package/dist/graph/__tests__/validation.test.d.ts.map +0 -1
- package/dist/graph/__tests__/validation.test.js +0 -521
- package/dist/graph/__tests__/validation.test.js.map +0 -1
- package/dist/providers/__tests__/beads.test.d.ts +0 -5
- package/dist/providers/__tests__/beads.test.d.ts.map +0 -1
- package/dist/providers/__tests__/beads.test.js +0 -591
- package/dist/providers/__tests__/beads.test.js.map +0 -1
- package/dist/providers/__tests__/claude-tasks.test.d.ts +0 -5
- package/dist/providers/__tests__/claude-tasks.test.d.ts.map +0 -1
- package/dist/providers/__tests__/claude-tasks.test.js +0 -392
- package/dist/providers/__tests__/claude-tasks.test.js.map +0 -1
- package/dist/providers/__tests__/from-config.test.d.ts +0 -5
- package/dist/providers/__tests__/from-config.test.d.ts.map +0 -1
- package/dist/providers/__tests__/from-config.test.js +0 -152
- package/dist/providers/__tests__/from-config.test.js.map +0 -1
- package/dist/providers/__tests__/materialization.test.d.ts +0 -5
- package/dist/providers/__tests__/materialization.test.d.ts.map +0 -1
- package/dist/providers/__tests__/materialization.test.js +0 -407
- package/dist/providers/__tests__/materialization.test.js.map +0 -1
- package/dist/providers/__tests__/native.test.d.ts +0 -5
- package/dist/providers/__tests__/native.test.d.ts.map +0 -1
- package/dist/providers/__tests__/native.test.js +0 -566
- package/dist/providers/__tests__/native.test.js.map +0 -1
- package/dist/providers/__tests__/registry.test.d.ts +0 -5
- package/dist/providers/__tests__/registry.test.d.ts.map +0 -1
- package/dist/providers/__tests__/registry.test.js +0 -183
- package/dist/providers/__tests__/registry.test.js.map +0 -1
- package/dist/providers/traits/__tests__/RelationshipQueryable.test.d.ts +0 -2
- package/dist/providers/traits/__tests__/RelationshipQueryable.test.d.ts.map +0 -1
- package/dist/providers/traits/__tests__/RelationshipQueryable.test.js +0 -169
- package/dist/providers/traits/__tests__/RelationshipQueryable.test.js.map +0 -1
- package/dist/providers/traits/__tests__/TaskManageable.test.d.ts +0 -2
- package/dist/providers/traits/__tests__/TaskManageable.test.d.ts.map +0 -1
- package/dist/providers/traits/__tests__/TaskManageable.test.js +0 -172
- package/dist/providers/traits/__tests__/TaskManageable.test.js.map +0 -1
- package/dist/schema/__tests__/validation.test.d.ts +0 -2
- package/dist/schema/__tests__/validation.test.d.ts.map +0 -1
- package/dist/schema/__tests__/validation.test.js +0 -241
- package/dist/schema/__tests__/validation.test.js.map +0 -1
- package/dist/storage/__tests__/atomic-write.test.d.ts +0 -5
- package/dist/storage/__tests__/atomic-write.test.d.ts.map +0 -1
- package/dist/storage/__tests__/atomic-write.test.js +0 -170
- package/dist/storage/__tests__/atomic-write.test.js.map +0 -1
- package/dist/storage/__tests__/file-lock.test.d.ts +0 -2
- package/dist/storage/__tests__/file-lock.test.d.ts.map +0 -1
- package/dist/storage/__tests__/file-lock.test.js +0 -89
- package/dist/storage/__tests__/file-lock.test.js.map +0 -1
- package/dist/storage/__tests__/jsonl.test.d.ts +0 -2
- package/dist/storage/__tests__/jsonl.test.d.ts.map +0 -1
- package/dist/storage/__tests__/jsonl.test.js +0 -228
- package/dist/storage/__tests__/jsonl.test.js.map +0 -1
- package/dist/storage/__tests__/locked-writer.test.d.ts +0 -2
- package/dist/storage/__tests__/locked-writer.test.d.ts.map +0 -1
- package/dist/storage/__tests__/locked-writer.test.js +0 -109
- package/dist/storage/__tests__/locked-writer.test.js.map +0 -1
- package/dist/storage/__tests__/sqlite.test.d.ts +0 -2
- package/dist/storage/__tests__/sqlite.test.d.ts.map +0 -1
- package/dist/storage/__tests__/sqlite.test.js +0 -470
- package/dist/storage/__tests__/sqlite.test.js.map +0 -1
- package/dist/tools/__tests__/annotate.test.d.ts +0 -5
- package/dist/tools/__tests__/annotate.test.d.ts.map +0 -1
- package/dist/tools/__tests__/annotate.test.js +0 -314
- package/dist/tools/__tests__/annotate.test.js.map +0 -1
- package/dist/tools/__tests__/link.test.d.ts +0 -5
- package/dist/tools/__tests__/link.test.d.ts.map +0 -1
- package/dist/tools/__tests__/link.test.js +0 -245
- package/dist/tools/__tests__/link.test.js.map +0 -1
- package/dist/tools/__tests__/query.test.d.ts +0 -5
- package/dist/tools/__tests__/query.test.d.ts.map +0 -1
- package/dist/tools/__tests__/query.test.js +0 -288
- package/dist/tools/__tests__/query.test.js.map +0 -1
- package/dist/tools/__tests__/task.test.d.ts +0 -5
- package/dist/tools/__tests__/task.test.d.ts.map +0 -1
- package/dist/tools/__tests__/task.test.js +0 -178
- package/dist/tools/__tests__/task.test.js.map +0 -1
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git Tree Manipulation
|
|
3
|
-
*
|
|
4
|
-
* Structured tree operations for building and modifying git tree objects.
|
|
5
|
-
* Provides higher-level abstractions over raw `git mktree` / `git ls-tree`.
|
|
6
|
-
*
|
|
7
|
-
* Ported from Go: checkpoint/parse_tree.go
|
|
8
|
-
*/
|
|
9
|
-
import { lsTree, mktree, hashObject, } from '../git-operations.js';
|
|
10
|
-
// ============================================================================
|
|
11
|
-
// Tree Operations
|
|
12
|
-
// ============================================================================
|
|
13
|
-
/**
|
|
14
|
-
* Update (or create) a subtree at a given path within a root tree.
|
|
15
|
-
*
|
|
16
|
-
* @param rootTree - The root tree hash (or empty string for a new tree)
|
|
17
|
-
* @param subtreePath - The path to the subtree (e.g., "a3/b2c4d5e6f7")
|
|
18
|
-
* @param newSubtreeHash - The hash of the new subtree to place at path
|
|
19
|
-
* @param mergeMode - How to handle existing entries at the path
|
|
20
|
-
* @param cwd - Working directory for git commands
|
|
21
|
-
*/
|
|
22
|
-
export async function updateSubtree(rootTree, subtreePath, newSubtreeHash, mergeMode = 0 /* MergeMode.ReplaceAll */, cwd) {
|
|
23
|
-
const parts = subtreePath.split('/').filter(Boolean);
|
|
24
|
-
if (parts.length === 0)
|
|
25
|
-
return newSubtreeHash;
|
|
26
|
-
// Walk the tree path, collecting existing entries at each level
|
|
27
|
-
return updateSubtreeRecursive(rootTree, parts, 0, newSubtreeHash, mergeMode, cwd);
|
|
28
|
-
}
|
|
29
|
-
async function updateSubtreeRecursive(currentTree, pathParts, depth, newSubtreeHash, mergeMode, cwd) {
|
|
30
|
-
const targetName = pathParts[depth];
|
|
31
|
-
const isLeaf = depth === pathParts.length - 1;
|
|
32
|
-
// Get existing entries at this tree level
|
|
33
|
-
let existingEntries = [];
|
|
34
|
-
if (currentTree) {
|
|
35
|
-
try {
|
|
36
|
-
existingEntries = await lsTree(currentTree, undefined, cwd);
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
// Tree doesn't exist or is empty
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
if (isLeaf) {
|
|
43
|
-
let finalHash = newSubtreeHash;
|
|
44
|
-
// If merge mode, combine existing and new entries
|
|
45
|
-
if (mergeMode === 1 /* MergeMode.MergeKeepExisting */) {
|
|
46
|
-
const existingEntry = existingEntries.find(e => e.name === targetName);
|
|
47
|
-
if (existingEntry && existingEntry.type === 'tree') {
|
|
48
|
-
finalHash = await mergeTreesKeepExisting(existingEntry.hash, newSubtreeHash, cwd);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// Replace or add the entry at this level
|
|
52
|
-
const filtered = existingEntries.filter(e => e.name !== targetName);
|
|
53
|
-
filtered.push({
|
|
54
|
-
mode: '040000',
|
|
55
|
-
type: 'tree',
|
|
56
|
-
hash: finalHash,
|
|
57
|
-
name: targetName,
|
|
58
|
-
});
|
|
59
|
-
return mktree(filtered, cwd);
|
|
60
|
-
}
|
|
61
|
-
// Intermediate level: find or create the subtree
|
|
62
|
-
const existingEntry = existingEntries.find(e => e.name === targetName);
|
|
63
|
-
const childTree = existingEntry?.hash ?? '';
|
|
64
|
-
const updatedChildHash = await updateSubtreeRecursive(childTree, pathParts, depth + 1, newSubtreeHash, mergeMode, cwd);
|
|
65
|
-
const filtered = existingEntries.filter(e => e.name !== targetName);
|
|
66
|
-
filtered.push({
|
|
67
|
-
mode: '040000',
|
|
68
|
-
type: 'tree',
|
|
69
|
-
hash: updatedChildHash,
|
|
70
|
-
name: targetName,
|
|
71
|
-
});
|
|
72
|
-
return mktree(filtered, cwd);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Merge two trees, keeping existing entries when conflicts arise.
|
|
76
|
-
*/
|
|
77
|
-
async function mergeTreesKeepExisting(existingTreeHash, newTreeHash, cwd) {
|
|
78
|
-
const existingEntries = await lsTree(existingTreeHash, undefined, cwd);
|
|
79
|
-
const newEntries = await lsTree(newTreeHash, undefined, cwd);
|
|
80
|
-
const existingNames = new Set(existingEntries.map(e => e.name));
|
|
81
|
-
const merged = [...existingEntries];
|
|
82
|
-
for (const entry of newEntries) {
|
|
83
|
-
if (!existingNames.has(entry.name)) {
|
|
84
|
-
merged.push(entry);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return mktree(merged, cwd);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Apply a batch of file-level changes to a tree.
|
|
91
|
-
* Returns the hash of the new root tree.
|
|
92
|
-
*/
|
|
93
|
-
export async function applyTreeChanges(rootTree, changes, cwd) {
|
|
94
|
-
if (changes.length === 0)
|
|
95
|
-
return rootTree;
|
|
96
|
-
// Get existing entries
|
|
97
|
-
let entries = [];
|
|
98
|
-
if (rootTree) {
|
|
99
|
-
try {
|
|
100
|
-
entries = await lsTree(rootTree, undefined, cwd);
|
|
101
|
-
}
|
|
102
|
-
catch {
|
|
103
|
-
// Empty tree
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
for (const change of changes) {
|
|
107
|
-
if (change.deleted) {
|
|
108
|
-
entries = entries.filter(e => e.name !== change.path);
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
const existing = entries.findIndex(e => e.name === change.path);
|
|
112
|
-
const entry = {
|
|
113
|
-
mode: change.mode,
|
|
114
|
-
type: change.mode === '040000' ? 'tree' : 'blob',
|
|
115
|
-
hash: change.hash,
|
|
116
|
-
name: change.path,
|
|
117
|
-
};
|
|
118
|
-
if (existing >= 0) {
|
|
119
|
-
entries[existing] = entry;
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
entries.push(entry);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return mktree(entries, cwd);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Create a tree from a map of file paths to content strings.
|
|
130
|
-
* Useful for building trees from scratch in tests.
|
|
131
|
-
*/
|
|
132
|
-
export async function createTreeFromMap(files, cwd) {
|
|
133
|
-
const entries = [];
|
|
134
|
-
for (const [name, content] of Object.entries(files)) {
|
|
135
|
-
const hash = await hashObject(content, cwd);
|
|
136
|
-
entries.push({
|
|
137
|
-
mode: '100644',
|
|
138
|
-
type: 'blob',
|
|
139
|
-
hash,
|
|
140
|
-
name,
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
return mktree(entries, cwd);
|
|
144
|
-
}
|
|
145
|
-
//# sourceMappingURL=tree-ops.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tree-ops.js","sourceRoot":"","sources":["../../../src/entire/utils/tree-ops.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TTY Interaction Helpers
|
|
3
|
-
*
|
|
4
|
-
* Utilities for detecting and interacting with a controlling terminal.
|
|
5
|
-
* Important for git hooks which need user confirmation even when stdin
|
|
6
|
-
* is redirected.
|
|
7
|
-
*
|
|
8
|
-
* Ported from Go: strategy/manual_commit_hooks.go
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Detect if a controlling terminal (TTY) is available.
|
|
12
|
-
*
|
|
13
|
-
* Respects environment variables:
|
|
14
|
-
* - `ENTIRE_TEST_TTY=1` forces TTY detection to true (for testing)
|
|
15
|
-
* - `GEMINI_CLI=1` forces TTY detection to false (Gemini runs non-interactively)
|
|
16
|
-
*/
|
|
17
|
-
export declare function hasTTY(): boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Prompt the user for yes/no confirmation via /dev/tty.
|
|
20
|
-
*
|
|
21
|
-
* This works even when stdin is redirected (important for git hooks).
|
|
22
|
-
* Returns false if no TTY is available or the user declines.
|
|
23
|
-
*/
|
|
24
|
-
export declare function askConfirmTTY(prompt: string): Promise<boolean>;
|
|
25
|
-
//# sourceMappingURL=tty.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tty.d.ts","sourceRoot":"","sources":["../../../src/entire/utils/tty.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH;;;;;;GAMG;AACH,wBAAgB,MAAM,IAAI,OAAO,CAahC;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA8BpE"}
|
package/dist/entire/utils/tty.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TTY Interaction Helpers
|
|
3
|
-
*
|
|
4
|
-
* Utilities for detecting and interacting with a controlling terminal.
|
|
5
|
-
* Important for git hooks which need user confirmation even when stdin
|
|
6
|
-
* is redirected.
|
|
7
|
-
*
|
|
8
|
-
* Ported from Go: strategy/manual_commit_hooks.go
|
|
9
|
-
*/
|
|
10
|
-
import * as fs from 'node:fs';
|
|
11
|
-
import * as readline from 'node:readline';
|
|
12
|
-
/**
|
|
13
|
-
* Detect if a controlling terminal (TTY) is available.
|
|
14
|
-
*
|
|
15
|
-
* Respects environment variables:
|
|
16
|
-
* - `ENTIRE_TEST_TTY=1` forces TTY detection to true (for testing)
|
|
17
|
-
* - `GEMINI_CLI=1` forces TTY detection to false (Gemini runs non-interactively)
|
|
18
|
-
*/
|
|
19
|
-
export function hasTTY() {
|
|
20
|
-
// Check environment overrides
|
|
21
|
-
if (process.env.ENTIRE_TEST_TTY === '1')
|
|
22
|
-
return true;
|
|
23
|
-
if (process.env.GEMINI_CLI === '1')
|
|
24
|
-
return false;
|
|
25
|
-
// Try opening /dev/tty — this works even when stdin is redirected
|
|
26
|
-
try {
|
|
27
|
-
const fd = fs.openSync('/dev/tty', 'r');
|
|
28
|
-
fs.closeSync(fd);
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Prompt the user for yes/no confirmation via /dev/tty.
|
|
37
|
-
*
|
|
38
|
-
* This works even when stdin is redirected (important for git hooks).
|
|
39
|
-
* Returns false if no TTY is available or the user declines.
|
|
40
|
-
*/
|
|
41
|
-
export async function askConfirmTTY(prompt) {
|
|
42
|
-
if (!hasTTY())
|
|
43
|
-
return false;
|
|
44
|
-
let ttyIn;
|
|
45
|
-
let ttyOut;
|
|
46
|
-
try {
|
|
47
|
-
ttyIn = fs.createReadStream('/dev/tty');
|
|
48
|
-
ttyOut = fs.createWriteStream('/dev/tty');
|
|
49
|
-
const rl = readline.createInterface({
|
|
50
|
-
input: ttyIn,
|
|
51
|
-
output: ttyOut,
|
|
52
|
-
});
|
|
53
|
-
const result = await new Promise((resolve) => {
|
|
54
|
-
rl.question(`${prompt} [y/N] `, (answer) => {
|
|
55
|
-
rl.close();
|
|
56
|
-
const normalized = answer.trim().toLowerCase();
|
|
57
|
-
resolve(normalized === 'y' || normalized === 'yes');
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
return result;
|
|
61
|
-
}
|
|
62
|
-
catch {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
finally {
|
|
66
|
-
ttyIn?.destroy();
|
|
67
|
-
ttyOut?.destroy();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=tty.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tty.js","sourceRoot":"","sources":["../../../src/entire/utils/tty.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,UAAU,MAAM;IACpB,8BAA8B;IAC9B,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,GAAG;QAAE,OAAO,IAAI,CAAC;IACrD,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,GAAG;QAAE,OAAO,KAAK,CAAC;IAEjD,kEAAkE;IAClE,IAAI,CAAC;QACH,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QACxC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAc;IAChD,IAAI,CAAC,MAAM,EAAE;QAAE,OAAO,KAAK,CAAC;IAE5B,IAAI,KAAgC,CAAC;IACrC,IAAI,MAAkC,CAAC;IAEvC,IAAI,CAAC;QACH,KAAK,GAAG,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,GAAG,EAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAE1C,MAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC;YAClC,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,IAAI,OAAO,CAAU,CAAC,OAAO,EAAE,EAAE;YACpD,EAAE,CAAC,QAAQ,CAAC,GAAG,MAAM,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE;gBACzC,EAAE,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;gBAC/C,OAAO,CAAC,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,KAAK,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;YAAS,CAAC;QACT,KAAK,EAAE,OAAO,EAAE,CAAC;QACjB,MAAM,EAAE,OAAO,EAAE,CAAC;IACpB,CAAC;AACH,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Input Validation
|
|
3
|
-
*
|
|
4
|
-
* Validates user-supplied IDs to prevent path traversal attacks when
|
|
5
|
-
* IDs are used to construct file paths (session state, metadata, etc.).
|
|
6
|
-
*
|
|
7
|
-
* This module has no dependencies to avoid import cycles.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Validate that a session ID doesn't contain path separators.
|
|
11
|
-
* Prevents path traversal when session IDs are used in file paths.
|
|
12
|
-
*/
|
|
13
|
-
export declare function validateSessionID(id: string): void;
|
|
14
|
-
/**
|
|
15
|
-
* Validate that a tool use ID contains only safe characters for paths.
|
|
16
|
-
* Tool use IDs can be UUIDs or prefixed identifiers like "toolu_xxx".
|
|
17
|
-
* Empty is allowed (optional field).
|
|
18
|
-
*/
|
|
19
|
-
export declare function validateToolUseID(id: string): void;
|
|
20
|
-
/**
|
|
21
|
-
* Validate that an agent ID contains only safe characters for paths.
|
|
22
|
-
* Empty is allowed (optional field).
|
|
23
|
-
*/
|
|
24
|
-
export declare function validateAgentID(id: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Validate that an agent session ID contains only safe characters for paths.
|
|
27
|
-
* Agent session IDs can be UUIDs (Claude Code), test identifiers, or other
|
|
28
|
-
* formats depending on the agent.
|
|
29
|
-
*/
|
|
30
|
-
export declare function validateAgentSessionID(id: string): void;
|
|
31
|
-
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/entire/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAOlD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAOlD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAOhD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CASvD"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Input Validation
|
|
3
|
-
*
|
|
4
|
-
* Validates user-supplied IDs to prevent path traversal attacks when
|
|
5
|
-
* IDs are used to construct file paths (session state, metadata, etc.).
|
|
6
|
-
*
|
|
7
|
-
* This module has no dependencies to avoid import cycles.
|
|
8
|
-
*/
|
|
9
|
-
/** Matches alphanumeric characters, underscores, and hyphens only. */
|
|
10
|
-
const pathSafeRegex = /^[a-zA-Z0-9_-]+$/;
|
|
11
|
-
/**
|
|
12
|
-
* Validate that a session ID doesn't contain path separators.
|
|
13
|
-
* Prevents path traversal when session IDs are used in file paths.
|
|
14
|
-
*/
|
|
15
|
-
export function validateSessionID(id) {
|
|
16
|
-
if (!id) {
|
|
17
|
-
throw new Error('session ID cannot be empty');
|
|
18
|
-
}
|
|
19
|
-
if (id.includes('/') || id.includes('\\')) {
|
|
20
|
-
throw new Error(`invalid session ID "${id}": contains path separators`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Validate that a tool use ID contains only safe characters for paths.
|
|
25
|
-
* Tool use IDs can be UUIDs or prefixed identifiers like "toolu_xxx".
|
|
26
|
-
* Empty is allowed (optional field).
|
|
27
|
-
*/
|
|
28
|
-
export function validateToolUseID(id) {
|
|
29
|
-
if (!id)
|
|
30
|
-
return;
|
|
31
|
-
if (!pathSafeRegex.test(id)) {
|
|
32
|
-
throw new Error(`invalid tool use ID "${id}": must be alphanumeric with underscores/hyphens only`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Validate that an agent ID contains only safe characters for paths.
|
|
37
|
-
* Empty is allowed (optional field).
|
|
38
|
-
*/
|
|
39
|
-
export function validateAgentID(id) {
|
|
40
|
-
if (!id)
|
|
41
|
-
return;
|
|
42
|
-
if (!pathSafeRegex.test(id)) {
|
|
43
|
-
throw new Error(`invalid agent ID "${id}": must be alphanumeric with underscores/hyphens only`);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Validate that an agent session ID contains only safe characters for paths.
|
|
48
|
-
* Agent session IDs can be UUIDs (Claude Code), test identifiers, or other
|
|
49
|
-
* formats depending on the agent.
|
|
50
|
-
*/
|
|
51
|
-
export function validateAgentSessionID(id) {
|
|
52
|
-
if (!id) {
|
|
53
|
-
throw new Error('agent session ID cannot be empty');
|
|
54
|
-
}
|
|
55
|
-
if (!pathSafeRegex.test(id)) {
|
|
56
|
-
throw new Error(`invalid agent session ID "${id}": must be alphanumeric with underscores/hyphens only`);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=validation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/entire/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,sEAAsE;AACtE,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,uBAAuB,EAAE,6BAA6B,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,IAAI,CAAC,EAAE;QAAE,OAAO;IAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,wBAAwB,EAAE,uDAAuD,CAClF,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,IAAI,CAAC,EAAE;QAAE,OAAO;IAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,qBAAqB,EAAE,uDAAuD,CAC/E,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAU;IAC/C,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,6BAA6B,EAAE,uDAAuD,CACvF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git Worktree Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides detection and identification of git worktrees.
|
|
5
|
-
* Linked worktrees have `.git` as a file pointing to the main repository,
|
|
6
|
-
* while the main worktree has `.git` as a directory.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Get the internal git worktree identifier for the given path.
|
|
10
|
-
*
|
|
11
|
-
* - For the main worktree (where .git is a directory), returns empty string.
|
|
12
|
-
* - For linked worktrees (where .git is a file), extracts the name from
|
|
13
|
-
* `.git/worktrees/<name>/` path. This name is stable across `git worktree move`.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getWorktreeID(worktreePath: string): Promise<string>;
|
|
16
|
-
//# sourceMappingURL=worktree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../../src/entire/utils/worktree.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAuCzE"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git Worktree Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides detection and identification of git worktrees.
|
|
5
|
-
* Linked worktrees have `.git` as a file pointing to the main repository,
|
|
6
|
-
* while the main worktree has `.git` as a directory.
|
|
7
|
-
*/
|
|
8
|
-
import * as fs from 'node:fs';
|
|
9
|
-
import * as path from 'node:path';
|
|
10
|
-
/**
|
|
11
|
-
* Get the internal git worktree identifier for the given path.
|
|
12
|
-
*
|
|
13
|
-
* - For the main worktree (where .git is a directory), returns empty string.
|
|
14
|
-
* - For linked worktrees (where .git is a file), extracts the name from
|
|
15
|
-
* `.git/worktrees/<name>/` path. This name is stable across `git worktree move`.
|
|
16
|
-
*/
|
|
17
|
-
export async function getWorktreeID(worktreePath) {
|
|
18
|
-
const gitPath = path.join(worktreePath, '.git');
|
|
19
|
-
let stat;
|
|
20
|
-
try {
|
|
21
|
-
stat = await fs.promises.stat(gitPath);
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
throw new Error(`failed to stat .git: ${gitPath}`);
|
|
25
|
-
}
|
|
26
|
-
// Main worktree has .git as a directory
|
|
27
|
-
if (stat.isDirectory()) {
|
|
28
|
-
return '';
|
|
29
|
-
}
|
|
30
|
-
// Linked worktree has .git as a file with content: "gitdir: /path/to/.git/worktrees/<name>"
|
|
31
|
-
const content = await fs.promises.readFile(gitPath, 'utf-8');
|
|
32
|
-
const line = content.trim();
|
|
33
|
-
if (!line.startsWith('gitdir: ')) {
|
|
34
|
-
throw new Error(`invalid .git file format: ${line}`);
|
|
35
|
-
}
|
|
36
|
-
const gitdir = line.slice('gitdir: '.length);
|
|
37
|
-
// Extract worktree name from path like /repo/.git/worktrees/<name>
|
|
38
|
-
const marker = '.git/worktrees/';
|
|
39
|
-
const idx = gitdir.indexOf(marker);
|
|
40
|
-
if (idx === -1) {
|
|
41
|
-
throw new Error(`unexpected gitdir format (no worktrees): ${gitdir}`);
|
|
42
|
-
}
|
|
43
|
-
let worktreeID = gitdir.slice(idx + marker.length);
|
|
44
|
-
// Remove trailing slashes if any
|
|
45
|
-
if (worktreeID.endsWith('/')) {
|
|
46
|
-
worktreeID = worktreeID.slice(0, -1);
|
|
47
|
-
}
|
|
48
|
-
return worktreeID;
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=worktree.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../../src/entire/utils/worktree.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,YAAoB;IACtD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAEhD,IAAI,IAAc,CAAC;IACnB,IAAI,CAAC;QACH,IAAI,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,wCAAwC;IACxC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,4FAA4F;IAC5F,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAE5B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,6BAA6B,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAE7C,mEAAmE;IACnE,MAAM,MAAM,GAAG,iBAAiB,CAAC;IACjC,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACnC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,4CAA4C,MAAM,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACnD,iCAAiC;IACjC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeTypeRegistry.test.d.ts","sourceRoot":"","sources":["../../../src/graph/__tests__/EdgeTypeRegistry.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
|
2
|
-
import { createEdgeTypeRegistry, getEdgeTypeRegistry, resetEdgeTypeRegistry, BUILTIN_EDGE_TYPES, } from '../EdgeTypeRegistry.js';
|
|
3
|
-
describe('EdgeTypeRegistry', () => {
|
|
4
|
-
let registry;
|
|
5
|
-
beforeEach(() => {
|
|
6
|
-
registry = createEdgeTypeRegistry();
|
|
7
|
-
});
|
|
8
|
-
describe('built-in types', () => {
|
|
9
|
-
it('has all built-in types registered', () => {
|
|
10
|
-
for (const type of BUILTIN_EDGE_TYPES) {
|
|
11
|
-
expect(registry.has(type.name)).toBe(true);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
it('includes blocks type with affectsReady=true', () => {
|
|
15
|
-
const result = registry.lookup('blocks');
|
|
16
|
-
expect(result).not.toBeNull();
|
|
17
|
-
expect(result.definition.affectsReady).toBe(true);
|
|
18
|
-
});
|
|
19
|
-
it('includes implements type with affectsReady=false', () => {
|
|
20
|
-
const result = registry.lookup('implements');
|
|
21
|
-
expect(result).not.toBeNull();
|
|
22
|
-
expect(result.definition.affectsReady).toBe(false);
|
|
23
|
-
});
|
|
24
|
-
it('has correct provider assignments', () => {
|
|
25
|
-
const blocks = registry.lookup('blocks');
|
|
26
|
-
expect(blocks.definition.providers).toContain('native');
|
|
27
|
-
expect(blocks.definition.providers).toContain('beads');
|
|
28
|
-
const implements_ = registry.lookup('implements');
|
|
29
|
-
expect(implements_.definition.providers).toContain('native');
|
|
30
|
-
expect(implements_.definition.providers).not.toContain('beads');
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
describe('lookup()', () => {
|
|
34
|
-
it('returns null for unknown type', () => {
|
|
35
|
-
const result = registry.lookup('unknown-type');
|
|
36
|
-
expect(result).toBeNull();
|
|
37
|
-
});
|
|
38
|
-
it('returns definition for known type', () => {
|
|
39
|
-
const result = registry.lookup('blocks');
|
|
40
|
-
expect(result).not.toBeNull();
|
|
41
|
-
expect(result.definition.name).toBe('blocks');
|
|
42
|
-
expect(result.definition.description).toBe('Source must complete before target can start');
|
|
43
|
-
});
|
|
44
|
-
it('identifies canonical type correctly', () => {
|
|
45
|
-
const blocks = registry.lookup('blocks');
|
|
46
|
-
expect(blocks.isCanonical).toBe(true);
|
|
47
|
-
expect(blocks.canonicalType).toBe('blocks');
|
|
48
|
-
const blockedBy = registry.lookup('blocked-by');
|
|
49
|
-
expect(blockedBy.isCanonical).toBe(false);
|
|
50
|
-
expect(blockedBy.canonicalType).toBe('blocks');
|
|
51
|
-
});
|
|
52
|
-
it('handles types without inverse', () => {
|
|
53
|
-
const result = registry.lookup('implements');
|
|
54
|
-
expect(result.isCanonical).toBe(true);
|
|
55
|
-
expect(result.canonicalType).toBe('implements');
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
describe('getInverse()', () => {
|
|
59
|
-
it('returns inverse for blocks', () => {
|
|
60
|
-
expect(registry.getInverse('blocks')).toBe('blocked-by');
|
|
61
|
-
});
|
|
62
|
-
it('returns inverse for blocked-by', () => {
|
|
63
|
-
expect(registry.getInverse('blocked-by')).toBe('blocks');
|
|
64
|
-
});
|
|
65
|
-
it('returns inverse for parent-of', () => {
|
|
66
|
-
expect(registry.getInverse('parent-of')).toBe('child-of');
|
|
67
|
-
});
|
|
68
|
-
it('returns null for types without inverse', () => {
|
|
69
|
-
expect(registry.getInverse('implements')).toBeNull();
|
|
70
|
-
expect(registry.getInverse('references')).toBeNull();
|
|
71
|
-
});
|
|
72
|
-
it('returns null for unknown types', () => {
|
|
73
|
-
expect(registry.getInverse('unknown')).toBeNull();
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
describe('affectsReady()', () => {
|
|
77
|
-
it('returns true for blocks', () => {
|
|
78
|
-
expect(registry.affectsReady('blocks')).toBe(true);
|
|
79
|
-
});
|
|
80
|
-
it('returns true for blocked-by', () => {
|
|
81
|
-
expect(registry.affectsReady('blocked-by')).toBe(true);
|
|
82
|
-
});
|
|
83
|
-
it('returns false for implements', () => {
|
|
84
|
-
expect(registry.affectsReady('implements')).toBe(false);
|
|
85
|
-
});
|
|
86
|
-
it('returns false for related', () => {
|
|
87
|
-
expect(registry.affectsReady('related')).toBe(false);
|
|
88
|
-
});
|
|
89
|
-
it('returns false for unknown types', () => {
|
|
90
|
-
expect(registry.affectsReady('unknown')).toBe(false);
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
describe('getReadyAffectingTypes()', () => {
|
|
94
|
-
it('returns only types that affect ready', () => {
|
|
95
|
-
const types = registry.getReadyAffectingTypes();
|
|
96
|
-
expect(types).toContain('blocks');
|
|
97
|
-
expect(types).toContain('blocked-by');
|
|
98
|
-
expect(types).not.toContain('implements');
|
|
99
|
-
expect(types).not.toContain('related');
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
describe('getTypesForProvider()', () => {
|
|
103
|
-
it('returns types for native provider', () => {
|
|
104
|
-
const types = registry.getTypesForProvider('native');
|
|
105
|
-
const names = types.map((t) => t.name);
|
|
106
|
-
expect(names).toContain('blocks');
|
|
107
|
-
expect(names).toContain('implements');
|
|
108
|
-
expect(names).toContain('references');
|
|
109
|
-
});
|
|
110
|
-
it('returns types for beads provider', () => {
|
|
111
|
-
const types = registry.getTypesForProvider('beads');
|
|
112
|
-
const names = types.map((t) => t.name);
|
|
113
|
-
expect(names).toContain('blocks');
|
|
114
|
-
expect(names).toContain('related');
|
|
115
|
-
expect(names).not.toContain('implements'); // Native only
|
|
116
|
-
});
|
|
117
|
-
it('returns empty for unknown provider', () => {
|
|
118
|
-
const types = registry.getTypesForProvider('unknown-provider');
|
|
119
|
-
expect(types).toHaveLength(0);
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
describe('register()', () => {
|
|
123
|
-
it('allows registering new types', () => {
|
|
124
|
-
const customType = {
|
|
125
|
-
name: 'custom-blocks',
|
|
126
|
-
description: 'Custom blocking relationship',
|
|
127
|
-
affectsReady: true,
|
|
128
|
-
direction: 'directed',
|
|
129
|
-
providers: ['custom-provider'],
|
|
130
|
-
};
|
|
131
|
-
registry.register(customType);
|
|
132
|
-
expect(registry.has('custom-blocks')).toBe(true);
|
|
133
|
-
const result = registry.lookup('custom-blocks');
|
|
134
|
-
expect(result.definition.description).toBe('Custom blocking relationship');
|
|
135
|
-
});
|
|
136
|
-
it('allows re-registering same definition (idempotent)', () => {
|
|
137
|
-
const type = BUILTIN_EDGE_TYPES[0];
|
|
138
|
-
expect(() => registry.register(type)).not.toThrow();
|
|
139
|
-
});
|
|
140
|
-
it('throws when re-registering with different definition', () => {
|
|
141
|
-
const conflicting = {
|
|
142
|
-
name: 'blocks',
|
|
143
|
-
description: 'Different description',
|
|
144
|
-
affectsReady: false, // Different!
|
|
145
|
-
direction: 'directed',
|
|
146
|
-
providers: ['native'],
|
|
147
|
-
};
|
|
148
|
-
expect(() => registry.register(conflicting)).toThrow("Edge type 'blocks' already registered with different definition");
|
|
149
|
-
});
|
|
150
|
-
it('tracks inverse relationships for custom types', () => {
|
|
151
|
-
const typeA = {
|
|
152
|
-
name: 'triggers',
|
|
153
|
-
description: 'Triggers execution of',
|
|
154
|
-
inverseOf: 'triggered-by',
|
|
155
|
-
affectsReady: false,
|
|
156
|
-
direction: 'directed',
|
|
157
|
-
providers: ['native'],
|
|
158
|
-
};
|
|
159
|
-
const typeB = {
|
|
160
|
-
name: 'triggered-by',
|
|
161
|
-
description: 'Is triggered by',
|
|
162
|
-
inverseOf: 'triggers',
|
|
163
|
-
affectsReady: false,
|
|
164
|
-
direction: 'directed',
|
|
165
|
-
providers: ['native'],
|
|
166
|
-
};
|
|
167
|
-
registry.register(typeA);
|
|
168
|
-
registry.register(typeB);
|
|
169
|
-
expect(registry.getInverse('triggers')).toBe('triggered-by');
|
|
170
|
-
expect(registry.getInverse('triggered-by')).toBe('triggers');
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
describe('getAll()', () => {
|
|
174
|
-
it('returns all registered types', () => {
|
|
175
|
-
const all = registry.getAll();
|
|
176
|
-
expect(all.length).toBeGreaterThanOrEqual(BUILTIN_EDGE_TYPES.length);
|
|
177
|
-
for (const type of BUILTIN_EDGE_TYPES) {
|
|
178
|
-
expect(all.find((t) => t.name === type.name)).toBeDefined();
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
describe('has()', () => {
|
|
183
|
-
it('returns true for registered types', () => {
|
|
184
|
-
expect(registry.has('blocks')).toBe(true);
|
|
185
|
-
expect(registry.has('implements')).toBe(true);
|
|
186
|
-
});
|
|
187
|
-
it('returns false for unregistered types', () => {
|
|
188
|
-
expect(registry.has('non-existent')).toBe(false);
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
describe('Global Registry', () => {
|
|
193
|
-
afterEach(() => {
|
|
194
|
-
resetEdgeTypeRegistry();
|
|
195
|
-
});
|
|
196
|
-
it('returns singleton instance', () => {
|
|
197
|
-
const reg1 = getEdgeTypeRegistry();
|
|
198
|
-
const reg2 = getEdgeTypeRegistry();
|
|
199
|
-
expect(reg1).toBe(reg2);
|
|
200
|
-
});
|
|
201
|
-
it('resets properly', () => {
|
|
202
|
-
const reg1 = getEdgeTypeRegistry();
|
|
203
|
-
resetEdgeTypeRegistry();
|
|
204
|
-
const reg2 = getEdgeTypeRegistry();
|
|
205
|
-
expect(reg1).not.toBe(reg2);
|
|
206
|
-
});
|
|
207
|
-
it('has built-in types', () => {
|
|
208
|
-
const reg = getEdgeTypeRegistry();
|
|
209
|
-
expect(reg.has('blocks')).toBe(true);
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
//# sourceMappingURL=EdgeTypeRegistry.test.js.map
|