@knowzai/cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/assets/portable/.env.example +250 -0
- package/assets/portable/docker-compose.yml +444 -0
- package/assets/portable/postgres-initdb/00-databases-and-extensions.sql +16 -0
- package/assets/portable/releases.json +37 -0
- package/assets/portable/runtime-contract.json +149 -0
- package/bin/run.js +4 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/base-command.d.ts +47 -0
- package/dist/base-command.d.ts.map +1 -0
- package/dist/base-command.js +98 -0
- package/dist/base-command.js.map +1 -0
- package/dist/commands/activate.d.ts +39 -0
- package/dist/commands/activate.d.ts.map +1 -0
- package/dist/commands/activate.js +103 -0
- package/dist/commands/activate.js.map +1 -0
- package/dist/commands/ask.d.ts +14 -0
- package/dist/commands/ask.d.ts.map +1 -0
- package/dist/commands/ask.js +33 -0
- package/dist/commands/ask.js.map +1 -0
- package/dist/commands/auth/status.d.ts +7 -0
- package/dist/commands/auth/status.d.ts.map +1 -0
- package/dist/commands/auth/status.js +26 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/backup.d.ts +15 -0
- package/dist/commands/backup.d.ts.map +1 -0
- package/dist/commands/backup.js +52 -0
- package/dist/commands/backup.js.map +1 -0
- package/dist/commands/capture/observe.d.ts +23 -0
- package/dist/commands/capture/observe.d.ts.map +1 -0
- package/dist/commands/capture/observe.js +68 -0
- package/dist/commands/capture/observe.js.map +1 -0
- package/dist/commands/capture/seal.d.ts +27 -0
- package/dist/commands/capture/seal.d.ts.map +1 -0
- package/dist/commands/capture/seal.js +144 -0
- package/dist/commands/capture/seal.js.map +1 -0
- package/dist/commands/capture/status.d.ts +33 -0
- package/dist/commands/capture/status.d.ts.map +1 -0
- package/dist/commands/capture/status.js +52 -0
- package/dist/commands/capture/status.js.map +1 -0
- package/dist/commands/chat.d.ts +21 -0
- package/dist/commands/chat.d.ts.map +1 -0
- package/dist/commands/chat.js +142 -0
- package/dist/commands/chat.js.map +1 -0
- package/dist/commands/cmek/decrypt.d.ts +13 -0
- package/dist/commands/cmek/decrypt.d.ts.map +1 -0
- package/dist/commands/cmek/decrypt.js +25 -0
- package/dist/commands/cmek/decrypt.js.map +1 -0
- package/dist/commands/cmek/encrypt.d.ts +15 -0
- package/dist/commands/cmek/encrypt.d.ts.map +1 -0
- package/dist/commands/cmek/encrypt.js +26 -0
- package/dist/commands/cmek/encrypt.js.map +1 -0
- package/dist/commands/cmek/init.d.ts +13 -0
- package/dist/commands/cmek/init.d.ts.map +1 -0
- package/dist/commands/cmek/init.js +27 -0
- package/dist/commands/cmek/init.js.map +1 -0
- package/dist/commands/cmek/status.d.ts +11 -0
- package/dist/commands/cmek/status.d.ts.map +1 -0
- package/dist/commands/cmek/status.js +23 -0
- package/dist/commands/cmek/status.js.map +1 -0
- package/dist/commands/completion.d.ts +13 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +19 -0
- package/dist/commands/completion.js.map +1 -0
- package/dist/commands/config/get.d.ts +13 -0
- package/dist/commands/config/get.d.ts.map +1 -0
- package/dist/commands/config/get.js +28 -0
- package/dist/commands/config/get.js.map +1 -0
- package/dist/commands/config/list.d.ts +7 -0
- package/dist/commands/config/list.d.ts.map +1 -0
- package/dist/commands/config/list.js +28 -0
- package/dist/commands/config/list.js.map +1 -0
- package/dist/commands/config/path.d.ts +9 -0
- package/dist/commands/config/path.d.ts.map +1 -0
- package/dist/commands/config/path.js +15 -0
- package/dist/commands/config/path.js.map +1 -0
- package/dist/commands/config/set.d.ts +16 -0
- package/dist/commands/config/set.d.ts.map +1 -0
- package/dist/commands/config/set.js +36 -0
- package/dist/commands/config/set.js.map +1 -0
- package/dist/commands/doctor.d.ts +56 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +151 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/down.d.ts +30 -0
- package/dist/commands/down.d.ts.map +1 -0
- package/dist/commands/down.js +20 -0
- package/dist/commands/down.js.map +1 -0
- package/dist/commands/entities/find.d.ts +16 -0
- package/dist/commands/entities/find.d.ts.map +1 -0
- package/dist/commands/entities/find.js +27 -0
- package/dist/commands/entities/find.js.map +1 -0
- package/dist/commands/hooks/install.d.ts +19 -0
- package/dist/commands/hooks/install.d.ts.map +1 -0
- package/dist/commands/hooks/install.js +53 -0
- package/dist/commands/hooks/install.js.map +1 -0
- package/dist/commands/index/graph.d.ts +11 -0
- package/dist/commands/index/graph.d.ts.map +1 -0
- package/dist/commands/index/graph.js +31 -0
- package/dist/commands/index/graph.js.map +1 -0
- package/dist/commands/index/scan.d.ts +22 -0
- package/dist/commands/index/scan.d.ts.map +1 -0
- package/dist/commands/index/scan.js +48 -0
- package/dist/commands/index/scan.js.map +1 -0
- package/dist/commands/index/search.d.ts +18 -0
- package/dist/commands/index/search.d.ts.map +1 -0
- package/dist/commands/index/search.js +40 -0
- package/dist/commands/index/search.js.map +1 -0
- package/dist/commands/ingest/add.d.ts +15 -0
- package/dist/commands/ingest/add.d.ts.map +1 -0
- package/dist/commands/ingest/add.js +50 -0
- package/dist/commands/ingest/add.js.map +1 -0
- package/dist/commands/knowledge/amend.d.ts +19 -0
- package/dist/commands/knowledge/amend.d.ts.map +1 -0
- package/dist/commands/knowledge/amend.js +27 -0
- package/dist/commands/knowledge/amend.js.map +1 -0
- package/dist/commands/knowledge/comment.d.ts +16 -0
- package/dist/commands/knowledge/comment.d.ts.map +1 -0
- package/dist/commands/knowledge/comment.js +27 -0
- package/dist/commands/knowledge/comment.js.map +1 -0
- package/dist/commands/knowledge/comments.d.ts +11 -0
- package/dist/commands/knowledge/comments.d.ts.map +1 -0
- package/dist/commands/knowledge/comments.js +20 -0
- package/dist/commands/knowledge/comments.js.map +1 -0
- package/dist/commands/knowledge/create.d.ts +18 -0
- package/dist/commands/knowledge/create.d.ts.map +1 -0
- package/dist/commands/knowledge/create.js +45 -0
- package/dist/commands/knowledge/create.js.map +1 -0
- package/dist/commands/knowledge/delete.d.ts +14 -0
- package/dist/commands/knowledge/delete.d.ts.map +1 -0
- package/dist/commands/knowledge/delete.js +30 -0
- package/dist/commands/knowledge/delete.js.map +1 -0
- package/dist/commands/knowledge/get.d.ts +13 -0
- package/dist/commands/knowledge/get.d.ts.map +1 -0
- package/dist/commands/knowledge/get.js +20 -0
- package/dist/commands/knowledge/get.js.map +1 -0
- package/dist/commands/knowledge/list.d.ts +13 -0
- package/dist/commands/knowledge/list.d.ts.map +1 -0
- package/dist/commands/knowledge/list.js +31 -0
- package/dist/commands/knowledge/list.js.map +1 -0
- package/dist/commands/knowledge/status.d.ts +11 -0
- package/dist/commands/knowledge/status.d.ts.map +1 -0
- package/dist/commands/knowledge/status.js +23 -0
- package/dist/commands/knowledge/status.js.map +1 -0
- package/dist/commands/knowledge/update.d.ts +16 -0
- package/dist/commands/knowledge/update.d.ts.map +1 -0
- package/dist/commands/knowledge/update.js +32 -0
- package/dist/commands/knowledge/update.js.map +1 -0
- package/dist/commands/knowledge/versions.d.ts +11 -0
- package/dist/commands/knowledge/versions.d.ts.map +1 -0
- package/dist/commands/knowledge/versions.js +22 -0
- package/dist/commands/knowledge/versions.js.map +1 -0
- package/dist/commands/local/info.d.ts +17 -0
- package/dist/commands/local/info.d.ts.map +1 -0
- package/dist/commands/local/info.js +26 -0
- package/dist/commands/local/info.js.map +1 -0
- package/dist/commands/local/init.d.ts +16 -0
- package/dist/commands/local/init.d.ts.map +1 -0
- package/dist/commands/local/init.js +31 -0
- package/dist/commands/local/init.js.map +1 -0
- package/dist/commands/local/list.d.ts +13 -0
- package/dist/commands/local/list.d.ts.map +1 -0
- package/dist/commands/local/list.js +29 -0
- package/dist/commands/local/list.js.map +1 -0
- package/dist/commands/local/reset.d.ts +12 -0
- package/dist/commands/local/reset.d.ts.map +1 -0
- package/dist/commands/local/reset.js +34 -0
- package/dist/commands/local/reset.js.map +1 -0
- package/dist/commands/local/show.d.ts +15 -0
- package/dist/commands/local/show.d.ts.map +1 -0
- package/dist/commands/local/show.js +33 -0
- package/dist/commands/local/show.js.map +1 -0
- package/dist/commands/login.d.ts +23 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +139 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +11 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +23 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/menu.d.ts +10 -0
- package/dist/commands/menu.d.ts.map +1 -0
- package/dist/commands/menu.js +50 -0
- package/dist/commands/menu.js.map +1 -0
- package/dist/commands/pg/destroy.d.ts +13 -0
- package/dist/commands/pg/destroy.d.ts.map +1 -0
- package/dist/commands/pg/destroy.js +36 -0
- package/dist/commands/pg/destroy.js.map +1 -0
- package/dist/commands/pg/down.d.ts +12 -0
- package/dist/commands/pg/down.d.ts.map +1 -0
- package/dist/commands/pg/down.js +20 -0
- package/dist/commands/pg/down.js.map +1 -0
- package/dist/commands/pg/status.d.ts +13 -0
- package/dist/commands/pg/status.d.ts.map +1 -0
- package/dist/commands/pg/status.js +28 -0
- package/dist/commands/pg/status.js.map +1 -0
- package/dist/commands/pg/up.d.ts +13 -0
- package/dist/commands/pg/up.d.ts.map +1 -0
- package/dist/commands/pg/up.js +34 -0
- package/dist/commands/pg/up.js.map +1 -0
- package/dist/commands/platform/destroy.d.ts +18 -0
- package/dist/commands/platform/destroy.d.ts.map +1 -0
- package/dist/commands/platform/destroy.js +41 -0
- package/dist/commands/platform/destroy.js.map +1 -0
- package/dist/commands/platform/doctor.d.ts +11 -0
- package/dist/commands/platform/doctor.d.ts.map +1 -0
- package/dist/commands/platform/doctor.js +18 -0
- package/dist/commands/platform/doctor.js.map +1 -0
- package/dist/commands/platform/down.d.ts +26 -0
- package/dist/commands/platform/down.d.ts.map +1 -0
- package/dist/commands/platform/down.js +16 -0
- package/dist/commands/platform/down.js.map +1 -0
- package/dist/commands/platform/logs.d.ts +26 -0
- package/dist/commands/platform/logs.d.ts.map +1 -0
- package/dist/commands/platform/logs.js +24 -0
- package/dist/commands/platform/logs.js.map +1 -0
- package/dist/commands/platform/reset.d.ts +26 -0
- package/dist/commands/platform/reset.d.ts.map +1 -0
- package/dist/commands/platform/reset.js +49 -0
- package/dist/commands/platform/reset.js.map +1 -0
- package/dist/commands/platform/setup.d.ts +24 -0
- package/dist/commands/platform/setup.d.ts.map +1 -0
- package/dist/commands/platform/setup.js +21 -0
- package/dist/commands/platform/setup.js.map +1 -0
- package/dist/commands/platform/status.d.ts +28 -0
- package/dist/commands/platform/status.d.ts.map +1 -0
- package/dist/commands/platform/status.js +37 -0
- package/dist/commands/platform/status.js.map +1 -0
- package/dist/commands/platform/up.d.ts +42 -0
- package/dist/commands/platform/up.d.ts.map +1 -0
- package/dist/commands/platform/up.js +22 -0
- package/dist/commands/platform/up.js.map +1 -0
- package/dist/commands/platform/upgrade.d.ts +14 -0
- package/dist/commands/platform/upgrade.d.ts.map +1 -0
- package/dist/commands/platform/upgrade.js +22 -0
- package/dist/commands/platform/upgrade.js.map +1 -0
- package/dist/commands/profile/add.d.ts +18 -0
- package/dist/commands/profile/add.d.ts.map +1 -0
- package/dist/commands/profile/add.js +26 -0
- package/dist/commands/profile/add.js.map +1 -0
- package/dist/commands/profile/list.d.ts +10 -0
- package/dist/commands/profile/list.d.ts.map +1 -0
- package/dist/commands/profile/list.js +20 -0
- package/dist/commands/profile/list.js.map +1 -0
- package/dist/commands/profile/remove.d.ts +15 -0
- package/dist/commands/profile/remove.d.ts.map +1 -0
- package/dist/commands/profile/remove.js +19 -0
- package/dist/commands/profile/remove.js.map +1 -0
- package/dist/commands/profile/use.d.ts +12 -0
- package/dist/commands/profile/use.d.ts.map +1 -0
- package/dist/commands/profile/use.js +18 -0
- package/dist/commands/profile/use.js.map +1 -0
- package/dist/commands/recall.d.ts +29 -0
- package/dist/commands/recall.d.ts.map +1 -0
- package/dist/commands/recall.js +94 -0
- package/dist/commands/recall.js.map +1 -0
- package/dist/commands/repo/context.d.ts +24 -0
- package/dist/commands/repo/context.d.ts.map +1 -0
- package/dist/commands/repo/context.js +52 -0
- package/dist/commands/repo/context.js.map +1 -0
- package/dist/commands/repo/graph.d.ts +24 -0
- package/dist/commands/repo/graph.d.ts.map +1 -0
- package/dist/commands/repo/graph.js +72 -0
- package/dist/commands/repo/graph.js.map +1 -0
- package/dist/commands/repo/index/index.d.ts +28 -0
- package/dist/commands/repo/index/index.d.ts.map +1 -0
- package/dist/commands/repo/index/index.js +76 -0
- package/dist/commands/repo/index/index.js.map +1 -0
- package/dist/commands/repo/search.d.ts +22 -0
- package/dist/commands/repo/search.d.ts.map +1 -0
- package/dist/commands/repo/search.js +50 -0
- package/dist/commands/repo/search.js.map +1 -0
- package/dist/commands/repo/setup.d.ts +41 -0
- package/dist/commands/repo/setup.d.ts.map +1 -0
- package/dist/commands/repo/setup.js +144 -0
- package/dist/commands/repo/setup.js.map +1 -0
- package/dist/commands/repo/status.d.ts +31 -0
- package/dist/commands/repo/status.d.ts.map +1 -0
- package/dist/commands/repo/status.js +60 -0
- package/dist/commands/repo/status.js.map +1 -0
- package/dist/commands/restore.d.ts +16 -0
- package/dist/commands/restore.d.ts.map +1 -0
- package/dist/commands/restore.js +53 -0
- package/dist/commands/restore.js.map +1 -0
- package/dist/commands/search.d.ts +14 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +32 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/setup.d.ts +24 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +21 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/stats.d.ts +6 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +16 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/status.d.ts +20 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +33 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync/conflicts.d.ts +14 -0
- package/dist/commands/sync/conflicts.d.ts.map +1 -0
- package/dist/commands/sync/conflicts.js +23 -0
- package/dist/commands/sync/conflicts.js.map +1 -0
- package/dist/commands/sync/pull.d.ts +13 -0
- package/dist/commands/sync/pull.d.ts.map +1 -0
- package/dist/commands/sync/pull.js +26 -0
- package/dist/commands/sync/pull.js.map +1 -0
- package/dist/commands/sync/push.d.ts +13 -0
- package/dist/commands/sync/push.d.ts.map +1 -0
- package/dist/commands/sync/push.js +26 -0
- package/dist/commands/sync/push.js.map +1 -0
- package/dist/commands/sync/recover.d.ts +16 -0
- package/dist/commands/sync/recover.d.ts.map +1 -0
- package/dist/commands/sync/recover.js +29 -0
- package/dist/commands/sync/recover.js.map +1 -0
- package/dist/commands/sync/resolve.d.ts +21 -0
- package/dist/commands/sync/resolve.d.ts.map +1 -0
- package/dist/commands/sync/resolve.js +38 -0
- package/dist/commands/sync/resolve.js.map +1 -0
- package/dist/commands/sync/run.d.ts +13 -0
- package/dist/commands/sync/run.d.ts.map +1 -0
- package/dist/commands/sync/run.js +26 -0
- package/dist/commands/sync/run.js.map +1 -0
- package/dist/commands/sync/status.d.ts +13 -0
- package/dist/commands/sync/status.d.ts.map +1 -0
- package/dist/commands/sync/status.js +28 -0
- package/dist/commands/sync/status.js.map +1 -0
- package/dist/commands/topics/list.d.ts +11 -0
- package/dist/commands/topics/list.d.ts.map +1 -0
- package/dist/commands/topics/list.js +20 -0
- package/dist/commands/topics/list.js.map +1 -0
- package/dist/commands/tui.d.ts +10 -0
- package/dist/commands/tui.d.ts.map +1 -0
- package/dist/commands/tui.js +124 -0
- package/dist/commands/tui.js.map +1 -0
- package/dist/commands/up.d.ts +108 -0
- package/dist/commands/up.d.ts.map +1 -0
- package/dist/commands/up.js +210 -0
- package/dist/commands/up.js.map +1 -0
- package/dist/commands/vault/contents.d.ts +14 -0
- package/dist/commands/vault/contents.d.ts.map +1 -0
- package/dist/commands/vault/contents.js +24 -0
- package/dist/commands/vault/contents.js.map +1 -0
- package/dist/commands/vault/create.d.ts +15 -0
- package/dist/commands/vault/create.d.ts.map +1 -0
- package/dist/commands/vault/create.js +26 -0
- package/dist/commands/vault/create.js.map +1 -0
- package/dist/commands/vault/get.d.ts +10 -0
- package/dist/commands/vault/get.d.ts.map +1 -0
- package/dist/commands/vault/get.js +25 -0
- package/dist/commands/vault/get.js.map +1 -0
- package/dist/commands/vault/list.d.ts +7 -0
- package/dist/commands/vault/list.d.ts.map +1 -0
- package/dist/commands/vault/list.js +17 -0
- package/dist/commands/vault/list.js.map +1 -0
- package/dist/commands/web.d.ts +14 -0
- package/dist/commands/web.d.ts.map +1 -0
- package/dist/commands/web.js +50 -0
- package/dist/commands/web.js.map +1 -0
- package/dist/commands/whoami.d.ts +7 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +24 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/hooks/init/launch-menu.d.ts +10 -0
- package/dist/hooks/init/launch-menu.d.ts.map +1 -0
- package/dist/hooks/init/launch-menu.js +11 -0
- package/dist/hooks/init/launch-menu.js.map +1 -0
- package/dist/lib/activate.d.ts +92 -0
- package/dist/lib/activate.d.ts.map +1 -0
- package/dist/lib/activate.js +292 -0
- package/dist/lib/activate.js.map +1 -0
- package/dist/lib/browser.d.ts +30 -0
- package/dist/lib/browser.d.ts.map +1 -0
- package/dist/lib/browser.js +45 -0
- package/dist/lib/browser.js.map +1 -0
- package/dist/lib/chat.d.ts +41 -0
- package/dist/lib/chat.d.ts.map +1 -0
- package/dist/lib/chat.js +63 -0
- package/dist/lib/chat.js.map +1 -0
- package/dist/lib/claude-hooks.d.ts +34 -0
- package/dist/lib/claude-hooks.d.ts.map +1 -0
- package/dist/lib/claude-hooks.js +85 -0
- package/dist/lib/claude-hooks.js.map +1 -0
- package/dist/lib/completion.d.ts +9 -0
- package/dist/lib/completion.d.ts.map +1 -0
- package/dist/lib/completion.js +57 -0
- package/dist/lib/completion.js.map +1 -0
- package/dist/lib/container-engine.d.ts +45 -0
- package/dist/lib/container-engine.d.ts.map +1 -0
- package/dist/lib/container-engine.js +348 -0
- package/dist/lib/container-engine.js.map +1 -0
- package/dist/lib/content.d.ts +9 -0
- package/dist/lib/content.d.ts.map +1 -0
- package/dist/lib/content.js +20 -0
- package/dist/lib/content.js.map +1 -0
- package/dist/lib/doctor-fixture.d.ts +8 -0
- package/dist/lib/doctor-fixture.d.ts.map +1 -0
- package/dist/lib/doctor-fixture.js +50 -0
- package/dist/lib/doctor-fixture.js.map +1 -0
- package/dist/lib/embedding-guard.d.ts +34 -0
- package/dist/lib/embedding-guard.d.ts.map +1 -0
- package/dist/lib/embedding-guard.js +50 -0
- package/dist/lib/embedding-guard.js.map +1 -0
- package/dist/lib/hook-io.d.ts +24 -0
- package/dist/lib/hook-io.d.ts.map +1 -0
- package/dist/lib/hook-io.js +73 -0
- package/dist/lib/hook-io.js.map +1 -0
- package/dist/lib/ingest.d.ts +24 -0
- package/dist/lib/ingest.d.ts.map +1 -0
- package/dist/lib/ingest.js +44 -0
- package/dist/lib/ingest.js.map +1 -0
- package/dist/lib/login.d.ts +40 -0
- package/dist/lib/login.d.ts.map +1 -0
- package/dist/lib/login.js +56 -0
- package/dist/lib/login.js.map +1 -0
- package/dist/lib/pending-captures.d.ts +25 -0
- package/dist/lib/pending-captures.d.ts.map +1 -0
- package/dist/lib/pending-captures.js +143 -0
- package/dist/lib/pending-captures.js.map +1 -0
- package/dist/lib/platform-backup.d.ts +110 -0
- package/dist/lib/platform-backup.d.ts.map +1 -0
- package/dist/lib/platform-backup.js +579 -0
- package/dist/lib/platform-backup.js.map +1 -0
- package/dist/lib/platform-command-shared.d.ts +132 -0
- package/dist/lib/platform-command-shared.d.ts.map +1 -0
- package/dist/lib/platform-command-shared.js +159 -0
- package/dist/lib/platform-command-shared.js.map +1 -0
- package/dist/lib/platform-frontdoor-runtime.d.ts +33 -0
- package/dist/lib/platform-frontdoor-runtime.d.ts.map +1 -0
- package/dist/lib/platform-frontdoor-runtime.js +285 -0
- package/dist/lib/platform-frontdoor-runtime.js.map +1 -0
- package/dist/lib/platform-frontdoor.d.ts +155 -0
- package/dist/lib/platform-frontdoor.d.ts.map +1 -0
- package/dist/lib/platform-frontdoor.js +467 -0
- package/dist/lib/platform-frontdoor.js.map +1 -0
- package/dist/lib/platform-image-source.d.ts +81 -0
- package/dist/lib/platform-image-source.d.ts.map +1 -0
- package/dist/lib/platform-image-source.js +143 -0
- package/dist/lib/platform-image-source.js.map +1 -0
- package/dist/lib/platform-lifecycle.d.ts +112 -0
- package/dist/lib/platform-lifecycle.d.ts.map +1 -0
- package/dist/lib/platform-lifecycle.js +725 -0
- package/dist/lib/platform-lifecycle.js.map +1 -0
- package/dist/lib/platform-onboarding.d.ts +128 -0
- package/dist/lib/platform-onboarding.d.ts.map +1 -0
- package/dist/lib/platform-onboarding.js +227 -0
- package/dist/lib/platform-onboarding.js.map +1 -0
- package/dist/lib/platform-preflight.d.ts +48 -0
- package/dist/lib/platform-preflight.d.ts.map +1 -0
- package/dist/lib/platform-preflight.js +90 -0
- package/dist/lib/platform-preflight.js.map +1 -0
- package/dist/lib/platform-profile-purge.d.ts +18 -0
- package/dist/lib/platform-profile-purge.d.ts.map +1 -0
- package/dist/lib/platform-profile-purge.js +26 -0
- package/dist/lib/platform-profile-purge.js.map +1 -0
- package/dist/lib/platform-provider-fields.d.ts +2 -0
- package/dist/lib/platform-provider-fields.d.ts.map +1 -0
- package/dist/lib/platform-provider-fields.js +2 -0
- package/dist/lib/platform-provider-fields.js.map +1 -0
- package/dist/lib/platform-provider-probe.d.ts +75 -0
- package/dist/lib/platform-provider-probe.d.ts.map +1 -0
- package/dist/lib/platform-provider-probe.js +781 -0
- package/dist/lib/platform-provider-probe.js.map +1 -0
- package/dist/lib/platform-provider-prompt.d.ts +118 -0
- package/dist/lib/platform-provider-prompt.d.ts.map +1 -0
- package/dist/lib/platform-provider-prompt.js +245 -0
- package/dist/lib/platform-provider-prompt.js.map +1 -0
- package/dist/lib/platform-release-manifest.d.ts +34 -0
- package/dist/lib/platform-release-manifest.d.ts.map +1 -0
- package/dist/lib/platform-release-manifest.js +100 -0
- package/dist/lib/platform-release-manifest.js.map +1 -0
- package/dist/lib/platform-runtime.d.ts +212 -0
- package/dist/lib/platform-runtime.d.ts.map +1 -0
- package/dist/lib/platform-runtime.js +866 -0
- package/dist/lib/platform-runtime.js.map +1 -0
- package/dist/lib/poll.d.ts +9 -0
- package/dist/lib/poll.d.ts.map +1 -0
- package/dist/lib/poll.js +18 -0
- package/dist/lib/poll.js.map +1 -0
- package/dist/lib/prompt.d.ts +7 -0
- package/dist/lib/prompt.d.ts.map +1 -0
- package/dist/lib/prompt.js +28 -0
- package/dist/lib/prompt.js.map +1 -0
- package/dist/lib/provider-presets.d.ts +108 -0
- package/dist/lib/provider-presets.d.ts.map +1 -0
- package/dist/lib/provider-presets.js +184 -0
- package/dist/lib/provider-presets.js.map +1 -0
- package/dist/lib/recall.d.ts +32 -0
- package/dist/lib/recall.d.ts.map +1 -0
- package/dist/lib/recall.js +69 -0
- package/dist/lib/recall.js.map +1 -0
- package/dist/lib/redact.d.ts +41 -0
- package/dist/lib/redact.d.ts.map +1 -0
- package/dist/lib/redact.js +130 -0
- package/dist/lib/redact.js.map +1 -0
- package/dist/lib/render.d.ts +55 -0
- package/dist/lib/render.d.ts.map +1 -0
- package/dist/lib/render.js +172 -0
- package/dist/lib/render.js.map +1 -0
- package/dist/lib/repo-binding.d.ts +53 -0
- package/dist/lib/repo-binding.d.ts.map +1 -0
- package/dist/lib/repo-binding.js +127 -0
- package/dist/lib/repo-binding.js.map +1 -0
- package/dist/lib/repo-command-support.d.ts +18 -0
- package/dist/lib/repo-command-support.d.ts.map +1 -0
- package/dist/lib/repo-command-support.js +54 -0
- package/dist/lib/repo-command-support.js.map +1 -0
- package/dist/lib/seal-core.d.ts +34 -0
- package/dist/lib/seal-core.d.ts.map +1 -0
- package/dist/lib/seal-core.js +154 -0
- package/dist/lib/seal-core.js.map +1 -0
- package/dist/lib/setup-console.d.ts +46 -0
- package/dist/lib/setup-console.d.ts.map +1 -0
- package/dist/lib/setup-console.js +191 -0
- package/dist/lib/setup-console.js.map +1 -0
- package/dist/lib/setup-page.d.ts +21 -0
- package/dist/lib/setup-page.d.ts.map +1 -0
- package/dist/lib/setup-page.js +656 -0
- package/dist/lib/setup-page.js.map +1 -0
- package/dist/lib/setup-plan.d.ts +52 -0
- package/dist/lib/setup-plan.d.ts.map +1 -0
- package/dist/lib/setup-plan.js +154 -0
- package/dist/lib/setup-plan.js.map +1 -0
- package/dist/lib/setup-server.d.ts +71 -0
- package/dist/lib/setup-server.d.ts.map +1 -0
- package/dist/lib/setup-server.js +936 -0
- package/dist/lib/setup-server.js.map +1 -0
- package/dist/lib/tui.d.ts +77 -0
- package/dist/lib/tui.d.ts.map +1 -0
- package/dist/lib/tui.js +126 -0
- package/dist/lib/tui.js.map +1 -0
- package/dist/lib/ui.d.ts +23 -0
- package/dist/lib/ui.d.ts.map +1 -0
- package/dist/lib/ui.js +100 -0
- package/dist/lib/ui.js.map +1 -0
- package/dist/lib/vault.d.ts +10 -0
- package/dist/lib/vault.d.ts.map +1 -0
- package/dist/lib/vault.js +18 -0
- package/dist/lib/vault.js.map +1 -0
- package/dist/menu/forms.d.ts +13 -0
- package/dist/menu/forms.d.ts.map +1 -0
- package/dist/menu/forms.js +45 -0
- package/dist/menu/forms.js.map +1 -0
- package/dist/menu/frontends.d.ts +32 -0
- package/dist/menu/frontends.d.ts.map +1 -0
- package/dist/menu/frontends.js +31 -0
- package/dist/menu/frontends.js.map +1 -0
- package/dist/menu/help.d.ts +11 -0
- package/dist/menu/help.d.ts.map +1 -0
- package/dist/menu/help.js +33 -0
- package/dist/menu/help.js.map +1 -0
- package/dist/menu/palette.d.ts +28 -0
- package/dist/menu/palette.d.ts.map +1 -0
- package/dist/menu/palette.js +57 -0
- package/dist/menu/palette.js.map +1 -0
- package/dist/menu/reducer.d.ts +19 -0
- package/dist/menu/reducer.d.ts.map +1 -0
- package/dist/menu/reducer.js +37 -0
- package/dist/menu/reducer.js.map +1 -0
- package/dist/menu/run.d.ts +34 -0
- package/dist/menu/run.d.ts.map +1 -0
- package/dist/menu/run.js +490 -0
- package/dist/menu/run.js.map +1 -0
- package/dist/menu/screens.d.ts +15 -0
- package/dist/menu/screens.d.ts.map +1 -0
- package/dist/menu/screens.js +251 -0
- package/dist/menu/screens.js.map +1 -0
- package/dist/menu/should-launch.d.ts +19 -0
- package/dist/menu/should-launch.d.ts.map +1 -0
- package/dist/menu/should-launch.js +22 -0
- package/dist/menu/should-launch.js.map +1 -0
- package/dist/menu/types.d.ts +95 -0
- package/dist/menu/types.d.ts.map +1 -0
- package/dist/menu/types.js +7 -0
- package/dist/menu/types.js.map +1 -0
- package/oclif.manifest.json +7995 -0
- package/package.json +133 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
const KNOWLEDGE_TYPES = ['Note', 'Document', 'Code', 'Link', 'File'];
|
|
2
|
+
export const SCREENS = {
|
|
3
|
+
main: {
|
|
4
|
+
id: 'main',
|
|
5
|
+
title: 'What do you want to do?',
|
|
6
|
+
items: [
|
|
7
|
+
{ label: '💬 Chat with your knowledge', intent: { kind: 'custom', handler: 'chat' } },
|
|
8
|
+
{ label: '➕ Knowledge', intent: { kind: 'navigate', to: 'knowledge' } },
|
|
9
|
+
{ label: '🔍 Search & Ask', intent: { kind: 'navigate', to: 'search' } },
|
|
10
|
+
{ label: '🗂 Vaults', intent: { kind: 'navigate', to: 'vaults' } },
|
|
11
|
+
{ label: '🧩 Entities & Topics', intent: { kind: 'navigate', to: 'entities' } },
|
|
12
|
+
{ label: '💾 Local store & Sync', intent: { kind: 'navigate', to: 'localsync' } },
|
|
13
|
+
{ label: '🌲 Index (local code/docs)', intent: { kind: 'navigate', to: 'index' } },
|
|
14
|
+
{ label: '🔐 Encryption (CMEK)', intent: { kind: 'navigate', to: 'cmek' } },
|
|
15
|
+
{ label: '🐘 Postgres', intent: { kind: 'navigate', to: 'pg' } },
|
|
16
|
+
{ label: '🚀 Start the local platform (Docker)', intent: { kind: 'command', id: 'up' } },
|
|
17
|
+
{ label: '📥 Ingest files', intent: { kind: 'command', id: 'ingest:add', prompts: [
|
|
18
|
+
{ type: 'input', name: 'path', message: 'File or glob to ingest', required: true, target: { kind: 'positional' } },
|
|
19
|
+
{ type: 'select', name: 'type', message: 'Force type (optional)', choices: ['(auto)', 'Note', 'Document', 'Code'], default: '(auto)', target: { kind: 'flag', name: 'type' } },
|
|
20
|
+
] } },
|
|
21
|
+
{ label: '📊 Statistics', intent: { kind: 'command', id: 'stats' } },
|
|
22
|
+
{ label: '⚙️ Settings', intent: { kind: 'navigate', to: 'settings' } },
|
|
23
|
+
{ label: '✕ Exit', intent: { kind: 'exit' } },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
knowledge: {
|
|
27
|
+
id: 'knowledge',
|
|
28
|
+
title: 'Knowledge',
|
|
29
|
+
items: [
|
|
30
|
+
{ label: '➕ Add knowledge', intent: { kind: 'command', id: 'knowledge:create', prompts: [
|
|
31
|
+
{ type: 'input', name: 'title', message: 'Title', required: true, target: { kind: 'positional' } },
|
|
32
|
+
{ type: 'editor', name: 'content', message: 'Content (opens your editor)', target: { kind: 'flag', name: 'content' } },
|
|
33
|
+
{ type: 'select', name: 'type', message: 'Type', choices: KNOWLEDGE_TYPES, default: 'Note', target: { kind: 'flag', name: 'type' } },
|
|
34
|
+
{ type: 'input', name: 'tags', message: 'Tags (comma-separated, optional)', target: { kind: 'multiFlag', name: 'tag' } },
|
|
35
|
+
{ type: 'confirm', name: 'wait', message: 'Wait for enrichment to finish?', default: false, target: { kind: 'boolFlag', name: 'wait' } },
|
|
36
|
+
] } },
|
|
37
|
+
{ label: '📋 List knowledge', intent: { kind: 'command', id: 'knowledge:list' } },
|
|
38
|
+
{ label: '🔍 Search & open', intent: { kind: 'custom', handler: 'search-open' } },
|
|
39
|
+
{ label: '📄 Open / view by id', intent: { kind: 'custom', handler: 'knowledge-open' } },
|
|
40
|
+
{ label: '✏️ Update', intent: { kind: 'command', id: 'knowledge:update', prompts: [
|
|
41
|
+
{ type: 'input', name: 'id', message: 'Knowledge id', required: true, target: { kind: 'positional' } },
|
|
42
|
+
{ type: 'input', name: 'title', message: 'New title (blank = keep)', target: { kind: 'flag', name: 'title' } },
|
|
43
|
+
{ type: 'editor', name: 'content', message: 'New content (blank = keep)', target: { kind: 'flag', name: 'content' } },
|
|
44
|
+
{ type: 'input', name: 'tags', message: 'Replace tags (comma-separated, blank = keep)', target: { kind: 'multiFlag', name: 'tag' } },
|
|
45
|
+
] } },
|
|
46
|
+
{ label: '🗑 Delete', intent: { kind: 'custom', handler: 'knowledge-delete' } },
|
|
47
|
+
{ label: '⏳ Status', intent: { kind: 'command', id: 'knowledge:status', prompts: [
|
|
48
|
+
{ type: 'input', name: 'id', message: 'Knowledge id', required: true, target: { kind: 'positional' } },
|
|
49
|
+
] } },
|
|
50
|
+
{ label: '🕑 Versions', intent: { kind: 'command', id: 'knowledge:versions', prompts: [
|
|
51
|
+
{ type: 'input', name: 'id', message: 'Knowledge id', required: true, target: { kind: 'positional' } },
|
|
52
|
+
] } },
|
|
53
|
+
{ label: '✨ Amend (natural language)', intent: { kind: 'command', id: 'knowledge:amend', prompts: [
|
|
54
|
+
{ type: 'input', name: 'id', message: 'Knowledge id', required: true, target: { kind: 'positional' } },
|
|
55
|
+
{ type: 'input', name: 'instruction', message: 'What should change?', required: true, target: { kind: 'positional' } },
|
|
56
|
+
{ type: 'confirm', name: 'wait', message: 'Wait for it to finish?', default: true, target: { kind: 'boolFlag', name: 'wait' } },
|
|
57
|
+
] } },
|
|
58
|
+
{ label: '💬 Comments', intent: { kind: 'command', id: 'knowledge:comments', prompts: [
|
|
59
|
+
{ type: 'input', name: 'id', message: 'Knowledge id', required: true, target: { kind: 'positional' } },
|
|
60
|
+
] } },
|
|
61
|
+
{ label: '➕ Add comment', intent: { kind: 'command', id: 'knowledge:comment', prompts: [
|
|
62
|
+
{ type: 'input', name: 'id', message: 'Knowledge id', required: true, target: { kind: 'positional' } },
|
|
63
|
+
{ type: 'input', name: 'body', message: 'Comment', required: true, target: { kind: 'positional' } },
|
|
64
|
+
{ type: 'input', name: 'author', message: 'Author (optional)', target: { kind: 'flag', name: 'author' } },
|
|
65
|
+
] } },
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
search: {
|
|
69
|
+
id: 'search',
|
|
70
|
+
title: 'Search & Ask',
|
|
71
|
+
items: [
|
|
72
|
+
{ label: '🔍 Search & open a result', intent: { kind: 'custom', handler: 'search-open' } },
|
|
73
|
+
{ label: '🔎 Quick search', intent: { kind: 'command', id: 'search', prompts: [
|
|
74
|
+
{ type: 'input', name: 'query', message: 'Query', required: true, target: { kind: 'positional' } },
|
|
75
|
+
{ type: 'input', name: 'limit', message: 'Max results', default: '10', target: { kind: 'flag', name: 'limit' } },
|
|
76
|
+
] } },
|
|
77
|
+
{ label: '🤖 Ask (AI answer + sources)', intent: { kind: 'command', id: 'ask', prompts: [
|
|
78
|
+
{ type: 'input', name: 'question', message: 'Question', required: true, target: { kind: 'positional' } },
|
|
79
|
+
{ type: 'confirm', name: 'research', message: 'Deeper research mode?', default: false, target: { kind: 'boolFlag', name: 'research' } },
|
|
80
|
+
{ type: 'confirm', name: 'shared', message: 'Include shared vaults?', default: false, target: { kind: 'boolFlag', name: 'shared' } },
|
|
81
|
+
] } },
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
vaults: {
|
|
85
|
+
id: 'vaults',
|
|
86
|
+
title: 'Vaults',
|
|
87
|
+
items: [
|
|
88
|
+
{ label: '📋 List vaults', intent: { kind: 'command', id: 'vault:list' } },
|
|
89
|
+
{ label: '➕ Create vault', intent: { kind: 'command', id: 'vault:create', prompts: [
|
|
90
|
+
{ type: 'input', name: 'name', message: 'Vault name', required: true, target: { kind: 'positional' } },
|
|
91
|
+
{ type: 'input', name: 'description', message: 'Description (optional)', target: { kind: 'flag', name: 'description' } },
|
|
92
|
+
{ type: 'input', name: 'vault-type', message: 'Type (e.g. General, Code, QA — optional)', target: { kind: 'flag', name: 'vault-type' } },
|
|
93
|
+
] } },
|
|
94
|
+
{ label: '📄 Get vault', intent: { kind: 'command', id: 'vault:get', prompts: [
|
|
95
|
+
{ type: 'input', name: 'ref', message: 'Vault id or name', required: true, target: { kind: 'positional' } },
|
|
96
|
+
] } },
|
|
97
|
+
{ label: '🗂 Vault contents', intent: { kind: 'command', id: 'vault:contents', prompts: [
|
|
98
|
+
{ type: 'input', name: 'ref', message: 'Vault id or name', required: true, target: { kind: 'positional' } },
|
|
99
|
+
] } },
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
entities: {
|
|
103
|
+
id: 'entities',
|
|
104
|
+
title: 'Entities & Topics',
|
|
105
|
+
items: [
|
|
106
|
+
{ label: '🧑 Find entities', intent: { kind: 'command', id: 'entities:find', prompts: [
|
|
107
|
+
{ type: 'input', name: 'type', message: 'Type (person/location/event — blank = all)', target: { kind: 'positional' } },
|
|
108
|
+
{ type: 'input', name: 'query', message: 'Filter by name (optional)', target: { kind: 'flag', name: 'query' } },
|
|
109
|
+
] } },
|
|
110
|
+
{ label: '🏷 List topics', intent: { kind: 'command', id: 'topics:list' } },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
localsync: {
|
|
114
|
+
id: 'localsync',
|
|
115
|
+
title: 'Local store & Sync',
|
|
116
|
+
items: [
|
|
117
|
+
{ label: '💾 Local store', intent: { kind: 'navigate', to: 'local' } },
|
|
118
|
+
{ label: '🔄 Sync', intent: { kind: 'navigate', to: 'sync' } },
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
local: {
|
|
122
|
+
id: 'local',
|
|
123
|
+
title: 'Local store',
|
|
124
|
+
items: [
|
|
125
|
+
{ label: '⚙️ Init', intent: { kind: 'command', id: 'local:init' } },
|
|
126
|
+
{ label: 'ℹ️ Info', intent: { kind: 'command', id: 'local:info' } },
|
|
127
|
+
{ label: '📋 List', intent: { kind: 'command', id: 'local:list' } },
|
|
128
|
+
{ label: '📄 Show item', intent: { kind: 'command', id: 'local:show', prompts: [
|
|
129
|
+
{ type: 'input', name: 'id', message: 'Item id', required: true, target: { kind: 'positional' } },
|
|
130
|
+
{ type: 'confirm', name: 'content', message: 'Show full content?', default: true, target: { kind: 'boolFlag', name: 'content' } },
|
|
131
|
+
] } },
|
|
132
|
+
{ label: '🗑 Reset (delete local store)', intent: { kind: 'command', id: 'local:reset', prompts: [
|
|
133
|
+
{ type: 'confirm', name: '__proceed', message: 'Delete the local store for this profile?', default: false, target: { kind: 'boolFlag', name: 'yes' } },
|
|
134
|
+
] } },
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
sync: {
|
|
138
|
+
id: 'sync',
|
|
139
|
+
title: 'Sync',
|
|
140
|
+
items: [
|
|
141
|
+
{ label: '📊 Status', intent: { kind: 'command', id: 'sync:status' } },
|
|
142
|
+
{ label: '🔄 Run (pull + push)', intent: { kind: 'command', id: 'sync:run' } },
|
|
143
|
+
{ label: '⬇️ Pull', intent: { kind: 'command', id: 'sync:pull' } },
|
|
144
|
+
{ label: '⬆️ Push', intent: { kind: 'command', id: 'sync:push' } },
|
|
145
|
+
{ label: '⚠️ Conflicts', intent: { kind: 'command', id: 'sync:conflicts' } },
|
|
146
|
+
{ label: '🧩 Resolve a conflict', intent: { kind: 'command', id: 'sync:resolve', prompts: [
|
|
147
|
+
{ type: 'input', name: 'id', message: 'Knowledge id', required: true, target: { kind: 'positional' } },
|
|
148
|
+
{ type: 'select', name: 'keep', message: 'Keep which copy?', choices: ['keep-remote', 'keep-local'], target: { kind: 'valueFlag' } },
|
|
149
|
+
] } },
|
|
150
|
+
{ label: '♻️ Recover', intent: { kind: 'command', id: 'sync:recover' } },
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
index: {
|
|
154
|
+
id: 'index',
|
|
155
|
+
title: 'Index (local code/docs)',
|
|
156
|
+
items: [
|
|
157
|
+
{ label: '🌲 Scan a path', intent: { kind: 'command', id: 'index:scan', prompts: [
|
|
158
|
+
{ type: 'input', name: 'path', message: 'File or directory', default: '.', target: { kind: 'positional' } },
|
|
159
|
+
{ type: 'confirm', name: 'force', message: 'Re-index unchanged files?', default: false, target: { kind: 'boolFlag', name: 'force' } },
|
|
160
|
+
] } },
|
|
161
|
+
{ label: '🔎 Search index', intent: { kind: 'command', id: 'index:search', prompts: [
|
|
162
|
+
{ type: 'input', name: 'query', message: 'Query', required: true, target: { kind: 'positional' } },
|
|
163
|
+
{ type: 'input', name: 'limit', message: 'Max results', default: '5', target: { kind: 'flag', name: 'limit' } },
|
|
164
|
+
] } },
|
|
165
|
+
{ label: '📈 Graph stats', intent: { kind: 'command', id: 'index:graph' } },
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
cmek: {
|
|
169
|
+
id: 'cmek',
|
|
170
|
+
title: 'Encryption (CMEK)',
|
|
171
|
+
items: [
|
|
172
|
+
{ label: '⚙️ Init', intent: { kind: 'command', id: 'cmek:init' } },
|
|
173
|
+
{ label: '📊 Status', intent: { kind: 'command', id: 'cmek:status' } },
|
|
174
|
+
{ label: '🔒 Encrypt text', intent: { kind: 'command', id: 'cmek:encrypt', prompts: [
|
|
175
|
+
{ type: 'input', name: 'text', message: 'Text to encrypt', required: true, target: { kind: 'positional' } },
|
|
176
|
+
] } },
|
|
177
|
+
{ label: '🔓 Decrypt a file', intent: { kind: 'command', id: 'cmek:decrypt', prompts: [
|
|
178
|
+
{ type: 'input', name: 'file', message: 'Path to the envelope file', required: true, target: { kind: 'flag', name: 'file' } },
|
|
179
|
+
] } },
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
pg: {
|
|
183
|
+
id: 'pg',
|
|
184
|
+
title: 'Postgres (local pgvector)',
|
|
185
|
+
items: [
|
|
186
|
+
{ label: '▶️ Up', intent: { kind: 'command', id: 'pg:up' } },
|
|
187
|
+
{ label: '📊 Status', intent: { kind: 'command', id: 'pg:status' } },
|
|
188
|
+
{ label: '⏹ Down', intent: { kind: 'command', id: 'pg:down' } },
|
|
189
|
+
{ label: '🗑 Destroy (delete cluster + data)', intent: { kind: 'command', id: 'pg:destroy', prompts: [
|
|
190
|
+
{ type: 'confirm', name: '__proceed', message: 'Delete the local Postgres cluster and ALL its data?', default: false, target: { kind: 'boolFlag', name: 'yes' } },
|
|
191
|
+
] } },
|
|
192
|
+
],
|
|
193
|
+
},
|
|
194
|
+
settings: {
|
|
195
|
+
id: 'settings',
|
|
196
|
+
title: 'Settings',
|
|
197
|
+
items: [
|
|
198
|
+
{ label: '🔑 Authentication', intent: { kind: 'navigate', to: 'auth' } },
|
|
199
|
+
{ label: '⚙️ Config', intent: { kind: 'navigate', to: 'config' } },
|
|
200
|
+
{ label: '👥 Profiles', intent: { kind: 'navigate', to: 'profile' } },
|
|
201
|
+
{ label: '🌐 Open web dashboard', intent: { kind: 'command', id: 'web' } },
|
|
202
|
+
],
|
|
203
|
+
},
|
|
204
|
+
auth: {
|
|
205
|
+
id: 'auth',
|
|
206
|
+
title: 'Authentication',
|
|
207
|
+
items: [
|
|
208
|
+
{ label: '🔐 Log in', intent: { kind: 'custom', handler: 'login' } },
|
|
209
|
+
{ label: '📊 Status', intent: { kind: 'command', id: 'auth:status' } },
|
|
210
|
+
{ label: '🪪 Who am I', intent: { kind: 'command', id: 'whoami' } },
|
|
211
|
+
{ label: '🚪 Log out', intent: { kind: 'command', id: 'logout' } },
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
config: {
|
|
215
|
+
id: 'config',
|
|
216
|
+
title: 'Config',
|
|
217
|
+
items: [
|
|
218
|
+
{ label: '📋 List', intent: { kind: 'command', id: 'config:list' } },
|
|
219
|
+
{ label: '📄 Get a value', intent: { kind: 'command', id: 'config:get', prompts: [
|
|
220
|
+
{ type: 'input', name: 'key', message: 'Key (apiUrl | defaultVaultId | email | label | pgDsn)', required: true, target: { kind: 'positional' } },
|
|
221
|
+
] } },
|
|
222
|
+
{ label: '✏️ Set a value', intent: { kind: 'command', id: 'config:set', prompts: [
|
|
223
|
+
{ type: 'input', name: 'key', message: 'Key (apiUrl | defaultVaultId | email | label | pgDsn)', required: true, target: { kind: 'positional' } },
|
|
224
|
+
{ type: 'input', name: 'value', message: 'New value', required: true, target: { kind: 'positional' } },
|
|
225
|
+
] } },
|
|
226
|
+
{ label: '📁 Show config path', intent: { kind: 'command', id: 'config:path' } },
|
|
227
|
+
],
|
|
228
|
+
},
|
|
229
|
+
profile: {
|
|
230
|
+
id: 'profile',
|
|
231
|
+
title: 'Profiles',
|
|
232
|
+
items: [
|
|
233
|
+
{ label: '📋 List', intent: { kind: 'command', id: 'profile:list' } },
|
|
234
|
+
{ label: '🔀 Switch', intent: { kind: 'command', id: 'profile:use', prompts: [
|
|
235
|
+
{ type: 'input', name: 'name', message: 'Profile name', required: true, target: { kind: 'positional' } },
|
|
236
|
+
] } },
|
|
237
|
+
{ label: '➕ Add', intent: { kind: 'command', id: 'profile:add', prompts: [
|
|
238
|
+
{ type: 'input', name: 'name', message: 'Profile name', required: true, target: { kind: 'positional' } },
|
|
239
|
+
{ type: 'input', name: 'api-url', message: 'API base URL (optional)', target: { kind: 'flag', name: 'api-url' } },
|
|
240
|
+
{ type: 'confirm', name: 'use', message: 'Switch to it now?', default: true, target: { kind: 'boolFlag', name: 'use' } },
|
|
241
|
+
] } },
|
|
242
|
+
{ label: '🗑 Remove', intent: { kind: 'command', id: 'profile:remove', prompts: [
|
|
243
|
+
{ type: 'input', name: 'name', message: 'Profile name', required: true, target: { kind: 'positional' } },
|
|
244
|
+
{ type: 'confirm', name: '__proceed', message: 'Remove this profile?', default: false, target: { kind: 'boolFlag', name: 'yes' } },
|
|
245
|
+
] } },
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
/** Map of screen id → title, for breadcrumbs. */
|
|
250
|
+
export const SCREEN_TITLES = Object.fromEntries(Object.values(SCREENS).map((s) => [s.id, s.title]));
|
|
251
|
+
//# source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C,CAAC,CACnD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure predicate deciding whether bare `knowz` should drop into the interactive
|
|
3
|
+
* menu. The oclif `init` hook calls this with the resolved command id, the
|
|
4
|
+
* remaining argv, and TTY state.
|
|
5
|
+
*
|
|
6
|
+
* IMPORTANT: in an oclif `init` hook, `id` is the command being run and `argv`
|
|
7
|
+
* is only the args AFTER it — so `knowz login` arrives as id='login', argv=[].
|
|
8
|
+
* We must therefore gate on `id`, NOT on argv length, or every no-arg command
|
|
9
|
+
* (`knowz login`, `knowz status`, …) would be hijacked by the menu.
|
|
10
|
+
*
|
|
11
|
+
* Launch ONLY when there is NO command and NO args, in a full TTY. Any command,
|
|
12
|
+
* any flag (`--help`/`--version`/`--json`), or a non-interactive context
|
|
13
|
+
* (piped/redirected/CI) defers to oclif's normal behavior.
|
|
14
|
+
*/
|
|
15
|
+
export declare function shouldLaunchMenu(id: string | undefined, argv: string[], tty: {
|
|
16
|
+
stdin: boolean;
|
|
17
|
+
stdout: boolean;
|
|
18
|
+
}): boolean;
|
|
19
|
+
//# sourceMappingURL=should-launch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"should-launch.d.ts","sourceRoot":"","sources":["../../src/menu/should-launch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACvC,OAAO,CAIT"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure predicate deciding whether bare `knowz` should drop into the interactive
|
|
3
|
+
* menu. The oclif `init` hook calls this with the resolved command id, the
|
|
4
|
+
* remaining argv, and TTY state.
|
|
5
|
+
*
|
|
6
|
+
* IMPORTANT: in an oclif `init` hook, `id` is the command being run and `argv`
|
|
7
|
+
* is only the args AFTER it — so `knowz login` arrives as id='login', argv=[].
|
|
8
|
+
* We must therefore gate on `id`, NOT on argv length, or every no-arg command
|
|
9
|
+
* (`knowz login`, `knowz status`, …) would be hijacked by the menu.
|
|
10
|
+
*
|
|
11
|
+
* Launch ONLY when there is NO command and NO args, in a full TTY. Any command,
|
|
12
|
+
* any flag (`--help`/`--version`/`--json`), or a non-interactive context
|
|
13
|
+
* (piped/redirected/CI) defers to oclif's normal behavior.
|
|
14
|
+
*/
|
|
15
|
+
export function shouldLaunchMenu(id, argv, tty) {
|
|
16
|
+
if (!tty.stdin || !tty.stdout)
|
|
17
|
+
return false;
|
|
18
|
+
if (id)
|
|
19
|
+
return false;
|
|
20
|
+
return argv.length === 0;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=should-launch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"should-launch.js","sourceRoot":"","sources":["../../src/menu/should-launch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB,CAC9B,EAAsB,EACtB,IAAc,EACd,GAAwC;IAExC,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,EAAE;QAAE,OAAO,KAAK,CAAC;IACrB,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Menu type model. Screens are pure data (no functions) so the catalogue, the
|
|
3
|
+
* navigation reducer, and the argv builders are all unit-testable without a TTY.
|
|
4
|
+
* The only place these types meet inquirer/chalk is the IO shell `run.ts`.
|
|
5
|
+
*/
|
|
6
|
+
/** Where a collected answer goes when building the leaf command's argv. */
|
|
7
|
+
export type ArgTarget = {
|
|
8
|
+
kind: 'positional';
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'flag';
|
|
11
|
+
name: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'boolFlag';
|
|
14
|
+
name: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'multiFlag';
|
|
17
|
+
name: string;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'valueFlag';
|
|
20
|
+
};
|
|
21
|
+
/** A declarative input to collect before running a command. */
|
|
22
|
+
export type PromptSpec = {
|
|
23
|
+
type: 'input';
|
|
24
|
+
name: string;
|
|
25
|
+
message: string;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
default?: string;
|
|
28
|
+
target: ArgTarget;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'editor';
|
|
31
|
+
name: string;
|
|
32
|
+
message: string;
|
|
33
|
+
target: ArgTarget;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'select';
|
|
36
|
+
name: string;
|
|
37
|
+
message: string;
|
|
38
|
+
choices: string[];
|
|
39
|
+
default?: string;
|
|
40
|
+
target: ArgTarget;
|
|
41
|
+
} | {
|
|
42
|
+
type: 'confirm';
|
|
43
|
+
name: string;
|
|
44
|
+
message: string;
|
|
45
|
+
default?: boolean;
|
|
46
|
+
target: ArgTarget;
|
|
47
|
+
} | {
|
|
48
|
+
type: 'password';
|
|
49
|
+
name: string;
|
|
50
|
+
message: string;
|
|
51
|
+
target: ArgTarget;
|
|
52
|
+
};
|
|
53
|
+
/** What selecting a menu item does. */
|
|
54
|
+
export type Intent = {
|
|
55
|
+
kind: 'navigate';
|
|
56
|
+
to: string;
|
|
57
|
+
} | {
|
|
58
|
+
kind: 'back';
|
|
59
|
+
} | {
|
|
60
|
+
kind: 'exit';
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'command';
|
|
63
|
+
id: string;
|
|
64
|
+
prompts?: PromptSpec[];
|
|
65
|
+
} | {
|
|
66
|
+
kind: 'custom';
|
|
67
|
+
handler: string;
|
|
68
|
+
};
|
|
69
|
+
export interface MenuItem {
|
|
70
|
+
label: string;
|
|
71
|
+
intent: Intent;
|
|
72
|
+
}
|
|
73
|
+
export interface Screen {
|
|
74
|
+
id: string;
|
|
75
|
+
title: string;
|
|
76
|
+
items: MenuItem[];
|
|
77
|
+
}
|
|
78
|
+
/** Navigation state: a stack of screen ids; the top is the current screen. */
|
|
79
|
+
export interface NavState {
|
|
80
|
+
stack: string[];
|
|
81
|
+
}
|
|
82
|
+
/** What the shell should do after the reducer processes an intent. */
|
|
83
|
+
export type Effect = {
|
|
84
|
+
kind: 'render';
|
|
85
|
+
} | {
|
|
86
|
+
kind: 'command';
|
|
87
|
+
id: string;
|
|
88
|
+
prompts?: PromptSpec[];
|
|
89
|
+
} | {
|
|
90
|
+
kind: 'custom';
|
|
91
|
+
handler: string;
|
|
92
|
+
} | {
|
|
93
|
+
kind: 'quit';
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/menu/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,2EAA2E;AAC3E,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAE1B,+DAA+D;AAC/D,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,OA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AM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AAED,8EAA8E;AAC9E,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,sEAAsE;AACtE,MAAM,MAAM,MAAM,GACd;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Menu type model. Screens are pure data (no functions) so the catalogue, the
|
|
3
|
+
* navigation reducer, and the argv builders are all unit-testable without a TTY.
|
|
4
|
+
* The only place these types meet inquirer/chalk is the IO shell `run.ts`.
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/menu/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|