@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.6
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/lib/api/api-doc.d.ts +9 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.d.ts +2 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +8 -0
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.d.ts +13 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +25 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.d.ts +2 -0
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.d.ts +1 -0
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +51 -0
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.d.ts +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.d.ts +5 -0
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.d.ts +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.d.ts +12 -0
- package/lib/cli-flags.js +1 -1
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.d.ts +2 -0
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.d.ts +2 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.d.ts +2 -0
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.d.ts +2 -0
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.d.ts +18 -0
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.d.ts +5 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.d.ts +10 -0
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.d.ts +2 -0
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.d.ts +11 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +46 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.d.ts +2 -0
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.d.ts +2 -0
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.d.ts +2 -0
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.d.ts +105 -0
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.d.ts +2 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.d.ts +4 -0
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.d.ts +2 -0
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.d.ts +2 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.d.ts +5 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.d.ts +2 -0
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.d.ts +2 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.d.ts +2 -0
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.d.ts +2 -0
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +8 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.d.ts +2 -0
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.d.ts +2 -0
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.d.ts +2 -0
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.d.ts +2 -0
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.d.ts +17 -0
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.d.ts +17 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.d.ts +11 -0
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.d.ts +12 -0
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +26 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.d.ts +13 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.d.ts +5 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.d.ts +5 -0
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.d.ts +5 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.d.ts +5 -0
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.d.ts +16 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.d.ts +7 -0
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.d.ts +7 -0
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.d.ts +8 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.d.ts +33 -0
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.d.ts +18 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.d.ts +11 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.d.ts +2 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.d.ts +2 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.d.ts +26 -0
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.d.ts +27 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.d.ts +3 -0
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.d.ts +2 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +2 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.d.ts +2 -0
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.d.ts +2 -0
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.d.ts +2 -0
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.d.ts +2 -0
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.d.ts +128 -0
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.d.ts +2 -0
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.d.ts +53 -0
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.d.ts +17 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.d.ts +2 -0
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.d.ts +30 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.d.ts +2 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.d.ts +2 -0
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.d.ts +2 -0
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.d.ts +2 -0
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.d.ts +2 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.d.ts +2 -0
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.d.ts +2 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.d.ts +5 -0
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.d.ts +2 -0
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.d.ts +15 -0
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.d.ts +2 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.d.ts +2 -0
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.d.ts +2 -0
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.d.ts +11 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.d.ts +2 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.d.ts +23 -0
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.d.ts +2 -0
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.d.ts +32 -0
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.d.ts +2 -0
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.d.ts +2 -0
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.d.ts +2 -0
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.d.ts +2 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.d.ts +2 -0
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.d.ts +33 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.d.ts +2 -0
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.d.ts +5 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.d.ts +2 -0
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.d.ts +2 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.d.ts +3 -0
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.d.ts +2 -0
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.d.ts +2 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.d.ts +2 -0
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.d.ts +17 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.d.ts +2 -0
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.d.ts +2 -0
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.d.ts +2 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.d.ts +2 -0
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.d.ts +27 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.d.ts +12 -0
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.d.ts +12 -0
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.d.ts +10 -0
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +12 -0
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +28 -0
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.d.ts +69 -0
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.d.ts +17 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.d.ts +7 -0
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +162 -0
- package/lib/commands/menu/shared/update-core.d.ts +11 -0
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.d.ts +6 -0
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.d.ts +2 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.d.ts +2 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.d.ts +2 -0
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.d.ts +2 -0
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.d.ts +2 -0
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.d.ts +2 -0
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.d.ts +2 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.d.ts +2 -0
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +105 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.d.ts +2 -0
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.d.ts +2 -0
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.d.ts +2 -0
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.d.ts +74 -0
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.d.ts +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +6 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.d.ts +9 -0
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.d.ts +4 -0
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.d.ts +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.d.ts +2 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +1 -0
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +66 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +107 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.d.ts +2 -0
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.d.ts +2 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.d.ts +5 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.d.ts +10 -0
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.d.ts +5 -0
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.d.ts +2 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +5 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.d.ts +2 -0
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.d.ts +5 -0
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.d.ts +5 -0
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.d.ts +23 -0
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.d.ts +5 -0
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.d.ts +2 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.d.ts +2 -0
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.d.ts +2 -0
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.d.ts +2 -0
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.d.ts +2 -0
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.d.ts +10 -0
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.d.ts +6 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.d.ts +11 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.d.ts +6 -0
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.d.ts +50 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +1 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.d.ts +34 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +10 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +14 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +11 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +1 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.d.ts +5 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.d.ts +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.d.ts +36 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.d.ts +5 -0
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +61 -0
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +102 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +31 -0
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1018 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +8 -0
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +28 -0
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +7 -0
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +25 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +92 -0
- package/lib/core/bff/utils.d.ts +25 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.d.ts +43 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.d.ts +6 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.d.ts +4 -0
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.d.ts +8 -0
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/types.d.ts +22 -0
- package/lib/core/sql-index-auditor.d.ts +33 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.d.ts +7 -0
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.d.ts +7 -0
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.d.ts +5 -0
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.d.ts +14 -0
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/types.d.ts +43 -0
- package/lib/core/sql-sync/utils.d.ts +10 -0
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +34 -0
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +2 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.d.ts +9 -0
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.d.ts +3 -0
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.d.ts +3 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +4 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +11 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +15 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.d.ts +2 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +14 -0
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.d.ts +36 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +3 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +63 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +1 -0
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +4 -0
- package/lib/runtime/confirmation.js +1 -0
- package/lib/runtime/event.d.ts +5 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +5 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +8 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +50 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/main.d.ts +41 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +99 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.d.ts +44 -0
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.d.ts +12 -0
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.d.ts +8 -0
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +93 -0
- package/lib/utils/ai_config.d.ts +47 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.d.ts +42 -0
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.d.ts +23 -0
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.d.ts +37 -0
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +9 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +42 -0
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.d.ts +1 -0
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.d.ts +30 -0
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.d.ts +25 -0
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.d.ts +80 -0
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.d.ts +30 -0
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.d.ts +7 -0
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.d.ts +62 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.d.ts +15 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +21 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.d.ts +38 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.d.ts +1 -0
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +55 -0
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.d.ts +1 -0
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export type { ArgDef, FlagDef, CommandAuthMode, CommandResult, DeprecatedCommandInfo, DryRunResult, OutputFormat, OutputEnvelope, Risk, } from "@lovrabet/cli-framework";
|
|
2
|
+
import type { CommandDefinition as CoreCommandDefinition, CommandResult as CoreCommandResult, RuntimeContext as CoreRuntimeContext } from "@lovrabet/cli-framework";
|
|
3
|
+
export { riskLevelOrder, normalizeLegacyOutputFormat, isValidFormat, commandAllowsOptionalAuth, commandRequiresAuth, formatDeprecatedCommandMessage, resolveCommandAuthMode, } from "@lovrabet/cli-framework";
|
|
4
|
+
export interface MergedCliSnapshot {
|
|
5
|
+
defaultApp?: string;
|
|
6
|
+
currentApp?: string;
|
|
7
|
+
appCode?: string;
|
|
8
|
+
apps?: Record<string, {
|
|
9
|
+
appcode?: string;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
export interface RuntimeContextExtras {
|
|
13
|
+
appCode: string;
|
|
14
|
+
cookie: string;
|
|
15
|
+
apiDomain: string;
|
|
16
|
+
apiDir: string;
|
|
17
|
+
selectedAppName?: string;
|
|
18
|
+
mergedCli?: MergedCliSnapshot;
|
|
19
|
+
}
|
|
20
|
+
export type RuntimeContext = CoreRuntimeContext<RuntimeContextExtras>;
|
|
21
|
+
export interface RuntimeUpdateNotice {
|
|
22
|
+
command: string;
|
|
23
|
+
current: string;
|
|
24
|
+
latest: string;
|
|
25
|
+
url: string;
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
export interface RuntimeNotice {
|
|
29
|
+
update?: RuntimeUpdateNotice;
|
|
30
|
+
}
|
|
31
|
+
export type CommandResultWithNotice<T = any> = CoreCommandResult<T> & {
|
|
32
|
+
_notice?: RuntimeNotice;
|
|
33
|
+
};
|
|
34
|
+
export type CommandDefinition = CoreCommandDefinition<RuntimeContext> & {
|
|
35
|
+
/**
|
|
36
|
+
* 嵌入式原生工具在写入前展示的静态影响说明。
|
|
37
|
+
* 该字段不得拼入 argv、凭证或业务内容;缺省时 runtime 生成脱敏通用文案。
|
|
38
|
+
*/
|
|
39
|
+
confirmationDescription?: string;
|
|
40
|
+
/**
|
|
41
|
+
* When `true`, the command is excluded from generated help text and the
|
|
42
|
+
* machine-readable schema, but remains dispatchable (e.g. deprecated
|
|
43
|
+
* aliases kept only for a migration warning). Pair with `deprecated` to
|
|
44
|
+
* print a migration notice when the command is invoked directly.
|
|
45
|
+
*/
|
|
46
|
+
hidden?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Emit a structured CliError envelope for this command in json/compress
|
|
49
|
+
* modes. Commands opt in explicitly so adding one mutation does not change
|
|
50
|
+
* stderr/stdout behavior for every declarative command.
|
|
51
|
+
*/
|
|
52
|
+
structuredErrors?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Reject previously accepted raw CLI flags without exposing them in help or
|
|
55
|
+
* schema. This is used for removed mutation capabilities that meow still
|
|
56
|
+
* needs to recognize long enough to return an actionable error.
|
|
57
|
+
*/
|
|
58
|
+
rejectedFlags?: Array<{
|
|
59
|
+
name: string;
|
|
60
|
+
message: string;
|
|
61
|
+
hint?: string;
|
|
62
|
+
}>;
|
|
63
|
+
};
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a240_0x47e7(){var _0x31c170=['65401LZMvEs','4TcPHen','60xeqcZi','3399475tQFRaE','486FZqoDe','2644518TcCJen','3468344IxZNXZ','1LjlCXv','1392705lkyFyH','16586zYabuL','39177952GmNVkx'];a240_0x47e7=function(){return _0x31c170;};return a240_0x47e7();}(function(_0x437508,_0x45ee14){var _0x3faf85=a240_0x41a1,_0x246eb0=_0x437508();while(!![]){try{var _0xe088ed=-parseInt(_0x3faf85(0x1ca))/0x1*(parseInt(_0x3faf85(0x1cc))/0x2)+parseInt(_0x3faf85(0x1c8))/0x3*(-parseInt(_0x3faf85(0x1cf))/0x4)+-parseInt(_0x3faf85(0x1d1))/0x5+-parseInt(_0x3faf85(0x1d2))/0x6*(parseInt(_0x3faf85(0x1ce))/0x7)+parseInt(_0x3faf85(0x1c9))/0x8+-parseInt(_0x3faf85(0x1cb))/0x9*(parseInt(_0x3faf85(0x1d0))/0xa)+parseInt(_0x3faf85(0x1cd))/0xb;if(_0xe088ed===_0x45ee14)break;else _0x246eb0['push'](_0x246eb0['shift']());}catch(_0x5b012e){_0x246eb0['push'](_0x246eb0['shift']());}}}(a240_0x47e7,0xb4b84));function a240_0x41a1(_0x3d8965,_0x9c6872){_0x3d8965=_0x3d8965-0x1c8;var _0x47e761=a240_0x47e7();var _0x41a1a6=_0x47e761[_0x3d8965];return _0x41a1a6;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a241_0x9257(_0x2d5dfb,_0x3ab862){_0x2d5dfb=_0x2d5dfb-0x1ca;const _0x3cbebb=a241_0x3cbe();let _0x925714=_0x3cbebb[_0x2d5dfb];return _0x925714;}const a241_0x2a549c=a241_0x9257;(function(_0xe06f24,_0xc3412){const _0x3b6a3c=a241_0x9257,_0x32e3ef=_0xe06f24();while(!![]){try{const _0x24da35=parseInt(_0x3b6a3c(0x1ca))/0x1+-parseInt(_0x3b6a3c(0x1d2))/0x2*(-parseInt(_0x3b6a3c(0x1d3))/0x3)+-parseInt(_0x3b6a3c(0x1d0))/0x4+-parseInt(_0x3b6a3c(0x1cf))/0x5+parseInt(_0x3b6a3c(0x1d1))/0x6*(parseInt(_0x3b6a3c(0x1d4))/0x7)+-parseInt(_0x3b6a3c(0x1d5))/0x8*(-parseInt(_0x3b6a3c(0x1ce))/0x9)+parseInt(_0x3b6a3c(0x1cc))/0xa*(-parseInt(_0x3b6a3c(0x1cb))/0xb);if(_0x24da35===_0xc3412)break;else _0x32e3ef['push'](_0x32e3ef['shift']());}catch(_0x1fe01e){_0x32e3ef['push'](_0x32e3ef['shift']());}}}(a241_0x3cbe,0x2e558));export const VERSION=a241_0x2a549c(0x1cd);export const GIT_TAG='v2.3.16-beta.6';function a241_0x3cbe(){const _0x4f94ee=['753039HsQJae','459080TOcqeX','847512IyrPOt','6558Wpwbut','36KMZaCN','26382gWbRvD','2086MvfgDL','24TFLvHl','6b281f5','82905rOgwex','11dDAMXu','3244460FldVQh','2.3.16-beta.6'];a241_0x3cbe=function(){return _0x4f94ee;};return a241_0x3cbe();}export const GIT_COMMIT=a241_0x2a549c(0x1d6);export const BUILD_TIME='2026-08-11T07:09:35.649Z';
|
package/lib/help.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showHelp(): void;
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a242_0x1c50(_0x3b0042,_0x29f5ec){_0x3b0042=_0x3b0042-0x15b;var _0x1324d0=a242_0x1324();var _0x1c50e0=_0x1324d0[_0x3b0042];return _0x1c50e0;}(function(_0x2e1c4b,_0x56b1f5){var _0x21fdf5=a242_0x1c50,_0x174825=_0x2e1c4b();while(!![]){try{var _0x2e206f=parseInt(_0x21fdf5(0x15e))/0x1+parseInt(_0x21fdf5(0x168))/0x2+-parseInt(_0x21fdf5(0x161))/0x3+-parseInt(_0x21fdf5(0x15b))/0x4+-parseInt(_0x21fdf5(0x15c))/0x5*(-parseInt(_0x21fdf5(0x166))/0x6)+parseInt(_0x21fdf5(0x167))/0x7*(parseInt(_0x21fdf5(0x160))/0x8)+parseInt(_0x21fdf5(0x165))/0x9*(-parseInt(_0x21fdf5(0x162))/0xa);if(_0x2e206f===_0x56b1f5)break;else _0x174825['push'](_0x174825['shift']());}catch(_0x4deccc){_0x174825['push'](_0x174825['shift']());}}}(a242_0x1324,0x2ce83));import a242_0x3b4465 from'chalk';function a242_0x1324(){var _0x2fe85d=['124347MernuF','170IDhCQb','bold','log','123147NnTGAX','13056jJNOkN','19439UpznyA','691666OrSbDJ','885036eopelK','15xlhehR','green','124176VbJHLe','\x20\x20Use\x20','584ijNsMa'];a242_0x1324=function(){return _0x2fe85d;};return a242_0x1324();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0xbefe00=a242_0x1c50;console['log'](),console['log'](a242_0x3b4465[_0xbefe00(0x15d)][_0xbefe00(0x163)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0xbefe00(0x164)](),console[_0xbefe00(0x164)](_0xbefe00(0x15f)+a242_0x3b4465[_0xbefe00(0x15d)][_0xbefe00(0x163)](CLI_BIN_NAME+'\x20--help')+'\x20to\x20view\x20available\x20commands.'),console[_0xbefe00(0x164)]();}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** 将命令声明收敛为脱敏、单行且有长度上限的原生确认请求。 */
|
|
2
|
+
import type { CommandDefinition } from "../framework/types.js";
|
|
3
|
+
import type { RabetbaseConfirmationRequest } from "../runtime/types.js";
|
|
4
|
+
export declare function buildRabetbaseConfirmationRequest(definition: CommandDefinition, operation: string, signal?: AbortSignal): RabetbaseConfirmationRequest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a243_0x4f3a(){const _0x549503=['871UFYfWM','108432aNkhhH','244CEkZyb','1731730ONIztE','2fuqoDv','confirmationDescription','replace','write','216EShsRW','high-risk-write','10AlwsEv','slice',';该操作可能创建或修改业务数据或本地配置。',';该操作可能覆盖、删除或明显影响线上运行行为。','Rabetbase\x20confirmation\x20requires\x20a\x20write\x20command.','107704viZcRm','risk','750EZYtHa','18529rbgAIB','string','14481FXtfZp','573047VpHjPQ','trim','5891138pSpYHk'];a243_0x4f3a=function(){return _0x549503;};return a243_0x4f3a();}(function(_0x702b26,_0x7922a5){const _0x543448=a243_0x5ef4,_0x26dcf8=_0x702b26();while(!![]){try{const _0x343204=-parseInt(_0x543448(0xe1))/0x1*(-parseInt(_0x543448(0xe8))/0x2)+parseInt(_0x543448(0xe0))/0x3*(-parseInt(_0x543448(0xe6))/0x4)+-parseInt(_0x543448(0xe7))/0x5+parseInt(_0x543448(0xdd))/0x6*(-parseInt(_0x543448(0xde))/0x7)+-parseInt(_0x543448(0xdb))/0x8*(parseInt(_0x543448(0xec))/0x9)+-parseInt(_0x543448(0xee))/0xa*(-parseInt(_0x543448(0xe3))/0xb)+-parseInt(_0x543448(0xe5))/0xc*(-parseInt(_0x543448(0xe4))/0xd);if(_0x343204===_0x7922a5)break;else _0x26dcf8['push'](_0x26dcf8['shift']());}catch(_0x52461b){_0x26dcf8['push'](_0x26dcf8['shift']());}}}(a243_0x4f3a,0x665a5));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildRabetbaseConfirmationRequest(_0x57abb5,_0x2cddae,_0x50a281){const _0x39abf0=a243_0x5ef4,_0x47f8d2=normalizeText(_0x57abb5[_0x39abf0(0xe9)],DESCRIPTION_MAX_LENGTH),_0x49d5d0=_0x47f8d2||normalizeText(defaultDescription(requireWriteRisk(_0x57abb5),_0x2cddae),DESCRIPTION_MAX_LENGTH);return{'operation':_0x2cddae,'risk':requireWriteRisk(_0x57abb5),'description':_0x49d5d0,..._0x50a281?{'signal':_0x50a281}:{}};}function a243_0x5ef4(_0x3d4d1d,_0x22f4c9){_0x3d4d1d=_0x3d4d1d-0xd7;const _0x4f3a52=a243_0x4f3a();let _0x5ef48a=_0x4f3a52[_0x3d4d1d];return _0x5ef48a;}function requireWriteRisk(_0x37d30e){const _0x1f2eed=a243_0x5ef4;if(_0x37d30e[_0x1f2eed(0xdc)]===_0x1f2eed(0xeb)||_0x37d30e[_0x1f2eed(0xdc)]===_0x1f2eed(0xed))return _0x37d30e[_0x1f2eed(0xdc)];throw new Error(_0x1f2eed(0xda));}function defaultDescription(_0x485b47,_0x1eb949){const _0xb65f7d=a243_0x5ef4;if(_0x485b47===_0xb65f7d(0xed))return'将执行高风险写入操作\x20'+_0x1eb949+_0xb65f7d(0xd9);return'将执行写入操作\x20'+_0x1eb949+_0xb65f7d(0xd8);}function normalizeText(_0x6f6987,_0x16e3f0){const _0x4a7a74=a243_0x5ef4;if(typeof _0x6f6987!==_0x4a7a74(0xdf))return'';return _0x6f6987[_0x4a7a74(0xea)](/[\u0000-\u001f\u007f]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x4a7a74(0xe2)]()[_0x4a7a74(0xd7)](0x0,_0x16e3f0);}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** 生成不含 argv、凭证或业务内容的最小写入成功事件。 */
|
|
2
|
+
import type { CommandDefinition, CommandResult } from "../framework/types.js";
|
|
3
|
+
import type { RabetbaseStructuredMetadata } from "../runtime/types.js";
|
|
4
|
+
export declare function canonicalRabetbaseOperation(definition: Pick<CommandDefinition, "service" | "command">): string;
|
|
5
|
+
export declare function createRabetbaseWriteMetadata(definition: CommandDefinition, operation: string, result: CommandResult, dryRun: boolean): RabetbaseStructuredMetadata | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x5a8360,_0x5b5744){var _0x13913e=a244_0x5269,_0x35d7c8=_0x5a8360();while(!![]){try{var _0x318a3a=-parseInt(_0x13913e(0xff))/0x1*(-parseInt(_0x13913e(0xfc))/0x2)+-parseInt(_0x13913e(0x100))/0x3+parseInt(_0x13913e(0xfb))/0x4+-parseInt(_0x13913e(0x101))/0x5+parseInt(_0x13913e(0xfd))/0x6*(-parseInt(_0x13913e(0xf6))/0x7)+parseInt(_0x13913e(0xf8))/0x8*(parseInt(_0x13913e(0xfa))/0x9)+-parseInt(_0x13913e(0x102))/0xa*(parseInt(_0x13913e(0xf4))/0xb);if(_0x318a3a===_0x5b5744)break;else _0x35d7c8['push'](_0x35d7c8['shift']());}catch(_0x360299){_0x35d7c8['push'](_0x35d7c8['shift']());}}}(a244_0x60ac,0xc0fc1));function a244_0x5269(_0x50716a,_0x405870){_0x50716a=_0x50716a-0xf3;var _0x60acf1=a244_0x60ac();var _0x5269d4=_0x60acf1[_0x50716a];return _0x5269d4;}export function canonicalRabetbaseOperation(_0x5b851b){var _0x4e3766=a244_0x5269;return[_0x5b851b['service'],..._0x5b851b['command'][_0x4e3766(0xfe)]()['split'](/\s+/)]['filter'](Boolean)['join']('.');}export function createRabetbaseWriteMetadata(_0x81dd08,_0x4878b7,_0x1280ee,_0x9dc102){var _0x3dbfc0=a244_0x5269;if(_0x9dc102||_0x1280ee['ok']!==!![]||_0x81dd08[_0x3dbfc0(0xf5)]!==_0x3dbfc0(0xf7)&&_0x81dd08[_0x3dbfc0(0xf5)]!==_0x3dbfc0(0xf9))return undefined;return{'rabetbase':{'schemaVersion':0x1,'event':{'type':_0x3dbfc0(0xf3),'operation':_0x4878b7,'risk':_0x81dd08[_0x3dbfc0(0xf5)]}}};}function a244_0x60ac(){var _0x4a14c3=['1138806YGcFCb','2518072SRaroH','49562zRtvab','282RDHAHR','trim','43CYDxte','853413qpauZn','2827545MQuYqa','60nTWtQy','rabetbase.write.completed','73601yiityw','risk','115234pECCMb','write','48yvMzOV','high-risk-write'];a244_0x60ac=function(){return _0x4a14c3;};return a244_0x60ac();}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Rabetbase CLI 嵌入式运行时入口。 */
|
|
2
|
+
import type { InvokeRabetbaseOptions, InvokeRabetbaseResult } from "../runtime/types.js";
|
|
3
|
+
export type { InvokeRabetbaseOptions, InvokeRabetbaseResult, RabetbaseConfirmationAdapter, RabetbaseConfirmationRequest, RabetbasePresentationAdapter, RabetbasePresentationRequest, RabetbaseStructuredMetadata, RabetbaseWriteCompletedEvent, } from "../runtime/types.js";
|
|
4
|
+
/**
|
|
5
|
+
* 通过终端同一 registry/runner 执行 argv;write/high-risk-write 在副作用前确认。
|
|
6
|
+
*/
|
|
7
|
+
export declare function invokeRabetbase(argv: readonly string[], options: InvokeRabetbaseOptions): Promise<InvokeRabetbaseResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x4eec16,_0x38f750){const _0x5c8b25=a245_0x2c5f,_0x32a9e5=_0x4eec16();while(!![]){try{const _0x402690=parseInt(_0x5c8b25(0x1bc))/0x1+-parseInt(_0x5c8b25(0x1d5))/0x2+-parseInt(_0x5c8b25(0x1c7))/0x3+-parseInt(_0x5c8b25(0x1d6))/0x4*(parseInt(_0x5c8b25(0x1cd))/0x5)+-parseInt(_0x5c8b25(0x1b8))/0x6*(-parseInt(_0x5c8b25(0x1ce))/0x7)+parseInt(_0x5c8b25(0x1bd))/0x8+parseInt(_0x5c8b25(0x1bb))/0x9;if(_0x402690===_0x38f750)break;else _0x32a9e5['push'](_0x32a9e5['shift']());}catch(_0x4adf6f){_0x32a9e5['push'](_0x32a9e5['shift']());}}}(a245_0x2870,0x71823));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createPipelineEnv,createRabetbaseRunnerAdapter,finalizeRabetbaseRuntimeState,runCommand}from'../framework/runner.js';function a245_0x2c5f(_0x27fa3b,_0x2f80e5){_0x27fa3b=_0x27fa3b-0x1b4;const _0x2870f5=a245_0x2870();let _0x2c5f84=_0x2870f5[_0x27fa3b];return _0x2c5f84;}import{buildRabetbaseConfirmationRequest}from'../runtime/confirmation.js';import{canonicalRabetbaseOperation,createRabetbaseWriteMetadata}from'../runtime/event.js';import{runSerialized}from'../runtime/queue.js';import{resolveRabetbaseInvocation}from'../runtime/resolve.js';function a245_0x2870(){const _0x1996c4=['724871zHMlZC','risk','presentation','execute','present','result','aborted','1593308agkpGr','2972TTYpSD','confirm','rawFlags','Rabetbase\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','data','12KsFqSJ','message','definition','16467660XYcpbN','323654EBmIVA','151048vesLIY','high-risk-write','stringify','isNonInteractive','command','AbortError','confirmation','args','reason','riskLevel','1438677TGFKEF','format','dry-run','signal','Rabetbase\x20invocation\x20aborted.','dryRun','4295zWSewD'];a245_0x2870=function(){return _0x1996c4;};return a245_0x2870();}const defaultPresentation={'present'({result:_0x41f2d4,command:_0x79a633,risk:_0x1d0b8c,dryRun:_0x3d094e}){const _0x99ee3=a245_0x2c5f;return JSON[_0x99ee3(0x1bf)]({'ok':_0x41f2d4['ok'],'command':_0x79a633,'risk':_0x1d0b8c,..._0x3d094e?{'dryRun':!![]}:{},..._0x41f2d4[_0x99ee3(0x1b7)]!==undefined?{'data':_0x41f2d4[_0x99ee3(0x1b7)]}:{},..._0x41f2d4[_0x99ee3(0x1b9)]?{'message':_0x41f2d4[_0x99ee3(0x1b9)]}:{}});}};export async function invokeRabetbase(_0x58415f,_0x457082){const _0x2750e2=a245_0x2c5f;throwIfAborted(_0x457082[_0x2750e2(0x1ca)]);const _0x51e8c4=await resolveRabetbaseInvocation(_0x58415f),_0x1b713a=canonicalRabetbaseOperation(_0x51e8c4[_0x2750e2(0x1ba)]);return await confirmWriteBeforeQueue(_0x51e8c4[_0x2750e2(0x1ba)],_0x51e8c4[_0x2750e2(0x1b5)],_0x1b713a,_0x457082),runSerialized(async()=>{const _0x3c63cb=_0x2750e2,_0x387700={};try{throwIfAborted(_0x457082['signal']);const _0x13b6b1=buildConfigFromFlags(_0x51e8c4[_0x3c63cb(0x1b5)]);await initGlobalEnvironment(_0x13b6b1);const _0x44665b=createPipelineEnv(_0x13b6b1,{..._0x51e8c4[_0x3c63cb(0x1b5)],'yes':_0x51e8c4[_0x3c63cb(0x1ba)][_0x3c63cb(0x1cf)]==='high-risk-write'?!![]:_0x51e8c4[_0x3c63cb(0x1b5)]['yes'],'nonInteractive':!![]},_0x51e8c4[_0x3c63cb(0x1c4)]);_0x44665b[_0x3c63cb(0x1c0)]=!![],_0x44665b[_0x3c63cb(0x1c6)]=_0x3c63cb(0x1be);const _0xe862db=withAbortSignal(_0x51e8c4[_0x3c63cb(0x1ba)],_0x457082['signal']),_0x13e0bd=createRabetbaseRunnerAdapter({'formatOutput'(_0x3dce90,_0x2a11d0){const _0x478004=_0x3c63cb;_0x387700[_0x478004(0x1d3)]=_0x3dce90,_0x387700[_0x478004(0x1c1)]=_0x2a11d0[_0x478004(0x1c1)],_0x387700[_0x478004(0x1cf)]=_0x2a11d0[_0x478004(0x1cf)],_0x387700[_0x478004(0x1c8)]=_0x2a11d0[_0x478004(0x1c8)],_0x387700[_0x478004(0x1cc)]=_0x2a11d0[_0x478004(0x1cc)]===!![];},async 'confirmHighRisk'(){throw new Error('Embedded\x20Rabetbase\x20confirmation\x20must\x20run\x20before\x20the\x20execution\x20queue.');}});await runCommand(_0xe862db,_0x44665b,_0x13e0bd);if(!_0x387700['result']||!_0x387700['command']||!_0x387700[_0x3c63cb(0x1cf)]||!_0x387700[_0x3c63cb(0x1c8)])throw new Error(_0x3c63cb(0x1b6));const _0x2a59ac=_0x387700[_0x3c63cb(0x1cc)]===!![],_0x446e12=_0x457082[_0x3c63cb(0x1d0)]??defaultPresentation,_0x2ab47c={'result':_0x387700[_0x3c63cb(0x1d3)],'command':_0x387700['command'],'operation':_0x1b713a,'risk':_0x387700['risk'],'format':_0x387700[_0x3c63cb(0x1c8)],'dryRun':_0x2a59ac},_0xcb08ef=createRabetbaseWriteMetadata(_0x51e8c4[_0x3c63cb(0x1ba)],_0x1b713a,_0x387700['result'],_0x2a59ac);let _0x214045;try{_0x214045=await _0x446e12[_0x3c63cb(0x1d2)](_0x2ab47c);}catch(_0x31896b){if(!_0xcb08ef||_0x446e12===defaultPresentation)throw _0x31896b;_0x214045=await defaultPresentation[_0x3c63cb(0x1d2)](_0x2ab47c);}return{'operation':_0x1b713a,'risk':_0x387700[_0x3c63cb(0x1cf)],'mode':_0x2a59ac?_0x3c63cb(0x1c9):_0x3c63cb(0x1d1),'result':_0x387700[_0x3c63cb(0x1d3)],'output':_0x214045,..._0xcb08ef?{'metadata':_0xcb08ef}:{}};}finally{await finalizeRabetbaseRuntimeState();}});}async function confirmWriteBeforeQueue(_0x322f6e,_0x4ea8ec,_0x1775c4,_0x3d2de9){const _0xa71c05=a245_0x2c5f;if(_0x4ea8ec[_0xa71c05(0x1cc)]===!![]||_0x322f6e['risk']!=='write'&&_0x322f6e[_0xa71c05(0x1cf)]!==_0xa71c05(0x1be))return;await _0x3d2de9[_0xa71c05(0x1c3)][_0xa71c05(0x1b4)](buildRabetbaseConfirmationRequest(_0x322f6e,_0x1775c4,_0x3d2de9['signal']));}function withAbortSignal(_0x23855f,_0x5316e4){return{..._0x23855f,async 'execute'(_0x221fdf){return throwIfAborted(_0x5316e4),_0x23855f['execute'](_0x221fdf);}};}function throwIfAborted(_0x2955a2){const _0x4f4cc6=a245_0x2c5f;if(_0x2955a2?.[_0x4f4cc6(0x1d4)])throw _0x2955a2[_0x4f4cc6(0x1c5)]instanceof Error?_0x2955a2[_0x4f4cc6(0x1c5)]:new DOMException(_0x4f4cc6(0x1cb),_0x4f4cc6(0x1c2));}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a246_0x52ba(_0x4c05d3,_0x4b393c){_0x4c05d3=_0x4c05d3-0xdb;const _0x101cd7=a246_0x101c();let _0x52ba9f=_0x101cd7[_0x4c05d3];return _0x52ba9f;}const a246_0x152857=a246_0x52ba;(function(_0x513db6,_0x4b2af9){const _0x4a1301=a246_0x52ba,_0x169076=_0x513db6();while(!![]){try{const _0xcedde8=-parseInt(_0x4a1301(0xe2))/0x1*(-parseInt(_0x4a1301(0xe7))/0x2)+parseInt(_0x4a1301(0xdf))/0x3*(parseInt(_0x4a1301(0xe8))/0x4)+parseInt(_0x4a1301(0xdd))/0x5*(parseInt(_0x4a1301(0xe0))/0x6)+parseInt(_0x4a1301(0xde))/0x7*(-parseInt(_0x4a1301(0xdb))/0x8)+parseInt(_0x4a1301(0xdc))/0x9+-parseInt(_0x4a1301(0xe5))/0xa*(parseInt(_0x4a1301(0xe4))/0xb)+-parseInt(_0x4a1301(0xe3))/0xc;if(_0xcedde8===_0x4b2af9)break;else _0x169076['push'](_0x169076['shift']());}catch(_0x304c09){_0x169076['push'](_0x169076['shift']());}}}(a246_0x101c,0x1ff95));let tail=Promise[a246_0x152857(0xe1)]();export async function runSerialized(_0x1186e9){const _0x8e9360=a246_0x152857,_0x21444d=tail;let _0x47085e;tail=new Promise(_0x386b29=>{_0x47085e=_0x386b29;}),await _0x21444d[_0x8e9360(0xe6)](()=>undefined);try{return await _0x1186e9();}finally{_0x47085e();}}function a246_0x101c(){const _0x779fbe=['catch','10kjjAkP','36gghwoB','69496ErjmTm','1767564rIfgeJ','5OGbJwW','189hVXOTh','57003VjvZGq','599604ZEiPAI','resolve','36397BvUjfG','1594020VmpLVz','1660725XKkDOh','10jqRbfY'];a246_0x101c=function(){return _0x779fbe;};return a246_0x101c();}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** 用终端 CLI 的 registry 与 meow flags 解析一次嵌入式调用。 */
|
|
2
|
+
import type { CommandDefinition } from "../framework/types.js";
|
|
3
|
+
export interface ResolvedRabetbaseInvocation {
|
|
4
|
+
definition: CommandDefinition;
|
|
5
|
+
rawFlags: Record<string, any>;
|
|
6
|
+
args: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare function resolveRabetbaseInvocation(argv: readonly string[]): Promise<ResolvedRabetbaseInvocation>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a247_0x5daf(_0x1d03f0,_0x5ef8fa){_0x1d03f0=_0x1d03f0-0x14d;const _0x5a61b9=a247_0x5a61();let _0x5daf73=_0x5a61b9[_0x1d03f0];return _0x5daf73;}(function(_0x308add,_0x181a97){const _0x34261f=a247_0x5daf,_0x222172=_0x308add();while(!![]){try{const _0x359eb9=-parseInt(_0x34261f(0x15a))/0x1*(parseInt(_0x34261f(0x157))/0x2)+parseInt(_0x34261f(0x15b))/0x3+-parseInt(_0x34261f(0x14d))/0x4+-parseInt(_0x34261f(0x154))/0x5+parseInt(_0x34261f(0x158))/0x6*(parseInt(_0x34261f(0x160))/0x7)+parseInt(_0x34261f(0x15e))/0x8*(parseInt(_0x34261f(0x155))/0x9)+parseInt(_0x34261f(0x152))/0xa*(-parseInt(_0x34261f(0x15d))/0xb);if(_0x359eb9===_0x181a97)break;else _0x222172['push'](_0x222172['shift']());}catch(_0x22f96a){_0x222172['push'](_0x222172['shift']());}}}(a247_0x5a61,0x45106));import a247_0x45f76c from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveRabetbaseInvocation(_0x9de578){const _0x34bf2e=a247_0x5daf,_0x154766=a247_0x45f76c('',{'importMeta':import.meta,'argv':[..._0x9de578],'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x39ed8c=[..._0x154766[_0x34bf2e(0x159)]],_0x2f5050=_0x154766['flags'],_0x4afe58=_0x39ed8c[0x0];if(!_0x4afe58)throw CliErrors[_0x34bf2e(0x151)]('Rabetbase\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.');const _0x57f3d5=resolveRemovedCommand(_0x4afe58,_0x39ed8c[0x1]);if(_0x57f3d5)throw CliErrors['validation'](_0x57f3d5['message'],_0x57f3d5[_0x34bf2e(0x15f)]);if(_0x4afe58===_0x34bf2e(0x156))throw CliErrors['validation'](_0x34bf2e(0x150),'Use\x20an\x20explicit\x20shell\x20tool\x20only\x20when\x20script\x20execution\x20is\x20intentionally\x20requested.');if(!isKnownService(_0x4afe58))throw CliErrors[_0x34bf2e(0x14e)](_0x39ed8c['join']('\x20'));const _0x21d38f=getServiceEntry(_0x4afe58),_0x2cea36=_0x39ed8c[0x1],_0x43f4ce=_0x2cea36||_0x21d38f[_0x34bf2e(0x14f)];if(!_0x43f4ce){if(_0x21d38f[_0x34bf2e(0x153)])return{'definition':_0x21d38f['wildcardDef'],'rawFlags':_0x2f5050,'args':[]};throw CliErrors['validation']('Rabetbase\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22'+_0x4afe58+'\x22.');}const _0x30ce4f=findDefinition(_0x4afe58,_0x43f4ce);if(_0x30ce4f)return{'definition':_0x30ce4f,'rawFlags':_0x2f5050,'args':_0x39ed8c[_0x34bf2e(0x15c)](0x2)};if(_0x21d38f['wildcardDef'])return{'definition':_0x21d38f[_0x34bf2e(0x153)],'rawFlags':_0x2f5050,'args':[_0x43f4ce,..._0x39ed8c[_0x34bf2e(0x15c)](0x2)]};throw CliErrors['unknownCommand'](_0x4afe58+'\x20'+_0x43f4ce);}function a247_0x5a61(){const _0xe098e7=['206569MriKJB','1463216khPVdB','hint','33509QBZDvR','1544536PGxvAR','unknownCommand','defaultCommand','`rabetbase\x20run`\x20is\x20unavailable\x20through\x20the\x20embedded\x20runtime\x20because\x20it\x20executes\x20arbitrary\x20package\x20scripts.','validation','130dGbYFu','wildcardDef','459900wQQBVr','27svSrqU','run','914HlNXce','456VhwLhF','input','233WHufQK','597270FEjAgV','slice'];a247_0x5a61=function(){return _0xe098e7;};return a247_0x5a61();}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Rabetbase 嵌入式运行时与 Coworker 原生工具之间的稳定公共契约。 */
|
|
2
|
+
import type { CommandResult, OutputFormat, Risk } from "../framework/types.js";
|
|
3
|
+
export interface RabetbaseConfirmationRequest {
|
|
4
|
+
operation: string;
|
|
5
|
+
risk: Extract<Risk, "write" | "high-risk-write">;
|
|
6
|
+
description: string;
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
}
|
|
9
|
+
export interface RabetbaseConfirmationAdapter {
|
|
10
|
+
/** 在任何写入副作用发生前请求调用方确认;拒绝时通过抛错终止执行。 */
|
|
11
|
+
confirm(request: RabetbaseConfirmationRequest): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export interface RabetbasePresentationRequest {
|
|
14
|
+
result: CommandResult;
|
|
15
|
+
command: string;
|
|
16
|
+
operation: string;
|
|
17
|
+
risk: Risk;
|
|
18
|
+
format: OutputFormat;
|
|
19
|
+
dryRun: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface RabetbasePresentationAdapter {
|
|
22
|
+
present(request: RabetbasePresentationRequest): string | Promise<string>;
|
|
23
|
+
}
|
|
24
|
+
export interface RabetbaseWriteCompletedEvent {
|
|
25
|
+
type: "rabetbase.write.completed";
|
|
26
|
+
operation: string;
|
|
27
|
+
risk: Extract<Risk, "write" | "high-risk-write">;
|
|
28
|
+
}
|
|
29
|
+
export interface RabetbaseStructuredMetadata {
|
|
30
|
+
rabetbase: {
|
|
31
|
+
schemaVersion: 1;
|
|
32
|
+
event: RabetbaseWriteCompletedEvent;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface InvokeRabetbaseOptions {
|
|
36
|
+
confirmation: RabetbaseConfirmationAdapter;
|
|
37
|
+
/**
|
|
38
|
+
* 自定义展示失败时,已成功的写入会降级为默认 JSON 输出,避免误报副作用失败。
|
|
39
|
+
*/
|
|
40
|
+
presentation?: RabetbasePresentationAdapter;
|
|
41
|
+
signal?: AbortSignal;
|
|
42
|
+
}
|
|
43
|
+
export interface InvokeRabetbaseResult {
|
|
44
|
+
operation: string;
|
|
45
|
+
risk: Risk;
|
|
46
|
+
mode: "execute" | "dry-run";
|
|
47
|
+
result: CommandResult;
|
|
48
|
+
output: string;
|
|
49
|
+
metadata?: RabetbaseStructuredMetadata;
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill helper utilities. Public installation is exposed as `cli-skill install`.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 将 camelCase 对象的键转换为 kebab-case 字符串数组
|
|
6
|
+
*
|
|
7
|
+
* 扫描 flags 对象中所有值为 true 的键,转换为 kebab-case 格式
|
|
8
|
+
* 用于与指南中说明的 MCP/CLI 标志一致(如 enable-bff-save)
|
|
9
|
+
*
|
|
10
|
+
* @param flags - meow 解析后的 flags 对象
|
|
11
|
+
* @returns kebab-case 格式的标志名称数组
|
|
12
|
+
*/
|
|
13
|
+
export declare function camelCaseFlagsToKebab(flags: Record<string, unknown>): string[];
|
|
14
|
+
/**
|
|
15
|
+
* 从 process.argv 手动解析 --xxx 格式的 flags
|
|
16
|
+
*
|
|
17
|
+
* meow 只解析在 flags 配置中声明的选项,为了支持动态 flags(如 --enable-bff-save、旧名 --dangerously-bff-save),
|
|
18
|
+
* 需要手动从命令行参数中提取
|
|
19
|
+
*
|
|
20
|
+
* @returns kebab-case 格式的标志名称数组
|
|
21
|
+
*/
|
|
22
|
+
export declare function parseDynamicFlags(): string[];
|
|
23
|
+
/**
|
|
24
|
+
* 获取所有提供的标志(包括 meow 解析的 + 手动解析的)
|
|
25
|
+
*
|
|
26
|
+
* @param flags - meow 解析后的 flags 对象
|
|
27
|
+
* @returns kebab-case 格式的标志名称数组(去重)
|
|
28
|
+
*/
|
|
29
|
+
export declare function getAllProvidedFlags(flags: Record<string, unknown>): string[];
|
|
30
|
+
/**
|
|
31
|
+
* 将旧版 `--dangerously-bff-save` 与新版 `--enable-bff-save` 视为等价(与 MCP 启动参数一致)
|
|
32
|
+
*/
|
|
33
|
+
export declare function normalizeLegacyBffSaveFlags(flags: string[]): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Legacy helper entry used by older unit tests and internal tooling.
|
|
36
|
+
* Public CLI installation is `rabetbase cli-skill install`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function skillsCommand(subCmd?: string, _args?: string[], flags?: {
|
|
39
|
+
help?: boolean;
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}): Promise<void>;
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5debff,_0x98df80){const _0x16441e=a249_0x5c23,_0x11c488=_0x5debff();while(!![]){try{const _0x5061f9=-parseInt(_0x16441e(0x16f))/0x1+parseInt(_0x16441e(0x16b))/0x2*(-parseInt(_0x16441e(0x184))/0x3)+-parseInt(_0x16441e(0x17d))/0x4+-parseInt(_0x16441e(0x181))/0x5*(parseInt(_0x16441e(0x176))/0x6)+parseInt(_0x16441e(0x180))/0x7*(-parseInt(_0x16441e(0x16d))/0x8)+parseInt(_0x16441e(0x186))/0x9+-parseInt(_0x16441e(0x171))/0xa*(-parseInt(_0x16441e(0x179))/0xb);if(_0x5061f9===_0x98df80)break;else _0x11c488['push'](_0x11c488['shift']());}catch(_0x37e77d){_0x11c488['push'](_0x11c488['shift']());}}}(a249_0x347d,0x51c93));function a249_0x347d(){const _0x39546a=['40642qdbYiA','\x0aAvailable\x20commands:','3170cSkeZy','(empty)','dangerously-bff-save','log','exit','6066gIhbed','from','enable-bff-save','11110KGuulQ','argv','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','push','10064JLorjB','add','has','5943OadMLQ','405ZDkJkY','\x20cli-skill\x20install\x0a\x0aEquivalent\x20command:\x20','error','15BuGuCF','-$1','5784048EKASFe','slice','--help','Error:\x20Unsupported\x20command:\x20','length','skill','setLogPath','help','49318lZmssg','toLowerCase','3576dWGvHm','replace'];a249_0x347d=function(){return _0x39546a;};return a249_0x347d();}import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x447db7){const _0x163b65=a249_0x5c23,_0x2b5a68=[];for(const [_0x107035,_0x36491c]of Object['entries'](_0x447db7)){if(_0x36491c===!![]){const _0x169af3=_0x107035[_0x163b65(0x16e)](/([A-Z])/g,_0x163b65(0x185))[_0x163b65(0x16c)]();_0x2b5a68[_0x163b65(0x17c)](_0x169af3);}}return _0x2b5a68;}export function parseDynamicFlags(){const _0x192cc7=a249_0x5c23,_0x396c1c=[];for(let _0x4e76ff=0x3;_0x4e76ff<process[_0x192cc7(0x17a)][_0x192cc7(0x167)];_0x4e76ff++){const _0x4ff981=process[_0x192cc7(0x17a)][_0x4e76ff];if(_0x4ff981&&_0x4ff981['startsWith']('--')){const _0x515410=_0x4ff981[_0x192cc7(0x187)](0x2);_0x515410&&!_0x515410['includes']('=')&&_0x396c1c[_0x192cc7(0x17c)](_0x515410);}}return _0x396c1c;}export function getAllProvidedFlags(_0x248685){const _0xf1c630=a249_0x5c23,_0x13eeb8=camelCaseFlagsToKebab(_0x248685),_0x4672de=parseDynamicFlags(),_0x51befc=new Set([..._0x13eeb8,..._0x4672de]);return Array[_0xf1c630(0x177)](_0x51befc);}function a249_0x5c23(_0x252edd,_0x56b173){_0x252edd=_0x252edd-0x165;const _0x347d56=a249_0x347d();let _0x5c23b3=_0x347d56[_0x252edd];return _0x5c23b3;}export function normalizeLegacyBffSaveFlags(_0x42e5d9){const _0x15824f=a249_0x5c23,_0x47ced4=new Set(_0x42e5d9);return _0x47ced4[_0x15824f(0x17f)](_0x15824f(0x173))&&_0x47ced4[_0x15824f(0x17e)](_0x15824f(0x178)),Array[_0x15824f(0x177)](_0x47ced4);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x3e373f,_0x19f8f6,_0x517b78){const _0x2c60f1=a249_0x5c23;logger[_0x2c60f1(0x169)](process['cwd']());if(_0x517b78?.[_0x2c60f1(0x16a)]||_0x3e373f===_0x2c60f1(0x165)){showHelp();return;}console[_0x2c60f1(0x183)](_0x2c60f1(0x166)+(_0x3e373f||_0x2c60f1(0x172))),console[_0x2c60f1(0x174)](_0x2c60f1(0x170)),console[_0x2c60f1(0x174)]('\x20\x20'+CLI_BIN_NAME+_0x2c60f1(0x17b)),console[_0x2c60f1(0x174)](''),console[_0x2c60f1(0x174)]('Equivalent\x20command:\x20'+SKILLS_INSTALL_COMMAND_LINE),logger[_0x2c60f1(0x183)](_0x2c60f1(0x168),'不支持的命令:\x20'+_0x3e373f),process[_0x2c60f1(0x175)](0x1);}function showHelp(){const _0x1a591e=a249_0x5c23;console[_0x1a591e(0x174)]('\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20'+CLI_BIN_NAME+_0x1a591e(0x182)+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/rabetbase/guides/.\x0a');}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通过官方 skills CLI 安装 lovrabet/rabetbase(与 npx skills 生态一致)
|
|
3
|
+
*
|
|
4
|
+
* 命令片段与默认完整命令行均在此文件维护,避免散落各处。
|
|
5
|
+
*/
|
|
6
|
+
import { type ResolveSkillPresenceOptions } from "../skills/skill-presence.js";
|
|
7
|
+
/** `npx` 的 `-y`(非交互拉取包) */
|
|
8
|
+
export declare const NPX_FLAG_YES: "-y";
|
|
9
|
+
/** `skills add` 的全局安装短参数 */
|
|
10
|
+
export declare const SKILLS_FLAG_GLOBAL: "-g";
|
|
11
|
+
/** `skills add` 的非交互确认短参数 */
|
|
12
|
+
export declare const SKILLS_FLAG_YES: "-y";
|
|
13
|
+
/** skills CLI 主命令名 */
|
|
14
|
+
export declare const NPX_SKILLS_CLI: "skills";
|
|
15
|
+
/** `skills` 子命令:add */
|
|
16
|
+
export declare const NPX_SKILLS_SUBCOMMAND_ADD: "add";
|
|
17
|
+
/** `--skill` 长选项名 */
|
|
18
|
+
export declare const NPX_SKILLS_FLAG_SKILL: "--skill";
|
|
19
|
+
/** 当前官方 rabetbase skill 源标识(GitHub 式 repo/slug) */
|
|
20
|
+
export declare const RABETBASE_SKILL_SOURCE = "lovrabet/rabetbase";
|
|
21
|
+
/** 历史旧 skill 源,仅用于升级迁移时移除旧安装 */
|
|
22
|
+
export declare const LEGACY_RABETBASE_SKILL_SOURCE = "lovrabet/lovrabet-skill";
|
|
23
|
+
/** 旧安装迁移时使用的历史 skill 名称。默认安装不再依赖 `--skill`。 */
|
|
24
|
+
export declare const DEFAULT_RABETBASE_SKILL_NAME = "Lovrabet";
|
|
25
|
+
/** 全局安装后的 Skill 名(即全局 Skill 目录名),与安装源写法解耦 */
|
|
26
|
+
export declare const RABETBASE_GLOBAL_SKILL_NAME = "rabetbase";
|
|
27
|
+
/** CodeUp Git 真源,与官方 shorthand 安装同一个全局 Skill */
|
|
28
|
+
export declare const RABETBASE_SKILL_GIT_SOURCE = "git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git";
|
|
29
|
+
/**
|
|
30
|
+
* 由安装源推导全局安装后的 Skill 名。
|
|
31
|
+
*
|
|
32
|
+
* 已登记源(官方 shorthand 与 CodeUp Git 真源)返回同一个 Skill 名;未登记源返回
|
|
33
|
+
* `undefined`,表示跳过安装事实校验——不猜测产物名,宁可放行。
|
|
34
|
+
*
|
|
35
|
+
* 查表写在函数体内(而非顶层 `const`),避免混淆器重排顶层语句触发 TDZ。
|
|
36
|
+
*
|
|
37
|
+
* @param source `npx skills add` 的安装源
|
|
38
|
+
* @returns 已登记源对应的全局 Skill 名;未登记时返回 `undefined`
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveGlobalSkillName(source: string): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* 传给 `spawnSync(npx, argv)` 的 argv(不含可执行文件名 `npx` / `npx.cmd`)
|
|
43
|
+
*/
|
|
44
|
+
export declare function buildNpxSkillsAddArgv(skillName?: string): string[];
|
|
45
|
+
/**
|
|
46
|
+
* 文档 / 成功页提示用的可复制命令(统一写 `npx`,与 `buildNpxSkillsAddArgv` 的 argv 一致)
|
|
47
|
+
*/
|
|
48
|
+
export declare const NPX_SKILLS_ADD_COMMAND_LINE: string;
|
|
49
|
+
/**
|
|
50
|
+
* User-facing global install command for rabetbase skill.
|
|
51
|
+
*/
|
|
52
|
+
export declare const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE: string;
|
|
53
|
+
export interface RunNpxSkillsAddResult {
|
|
54
|
+
ok: boolean;
|
|
55
|
+
status: number | null;
|
|
56
|
+
code?: NpxSkillsErrorCode;
|
|
57
|
+
error?: string;
|
|
58
|
+
/** 未执行 npx(RABETBASE_SKIP_NPX_SKILLS=1),仅用于测试或离线假定已安装 */
|
|
59
|
+
skipped?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface RunNpxSkillsAddOptions {
|
|
62
|
+
/** 默认 inherit;CI 可用 pipe */
|
|
63
|
+
stdio?: "inherit" | "pipe";
|
|
64
|
+
/** 可选 `--skill` 筛选;普通安装依赖仓内 `metadata.internal` 过滤维护型 skill。 */
|
|
65
|
+
skill?: string;
|
|
66
|
+
/** 传 `-y` 给 skills CLI 本身,跳过交互确认(与 npx 的 -y 不同) */
|
|
67
|
+
yes?: boolean;
|
|
68
|
+
/** 覆盖全局 Skill 安装事实的探测来源,适用于隔离环境或测试。 */
|
|
69
|
+
presence?: ResolveSkillPresenceOptions;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 失败分类。优先使用 OS / Node 层稳定信号与本地可解析的安装事实。
|
|
73
|
+
* 外部输出仅识别安装器的 `Failed to install N` 汇总,其余文案只作为诊断信息。
|
|
74
|
+
*/
|
|
75
|
+
export type NpxSkillsErrorCode = "NPX_NOT_FOUND" | "PERMISSION_DENIED" | "SPAWN_FAILED" | "CHILD_TERMINATED" | "CHILD_EXIT_NONZERO" | "INSTALL_PARTIAL" | "SKILL_NOT_INSTALLED";
|
|
76
|
+
/**
|
|
77
|
+
* 若设置 RABETBASE_SKIP_NPX_SKILLS=1,跳过执行(供离线/测试注入;对 add / remove / add -g 均生效)
|
|
78
|
+
*/
|
|
79
|
+
export declare function shouldSkipNpxSkillsAdd(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* 在项目根目录执行与 {@link NPX_SKILLS_ADD_COMMAND_LINE} 等价的 npx 调用
|
|
82
|
+
*
|
|
83
|
+
* @param projectRoot 项目根目录
|
|
84
|
+
* @param options.stdio - inherit(交互式终端)或 pipe(CI)
|
|
85
|
+
* @param options.skill - 可选 `--skill` 名称;仅显式筛选多 skill 包时使用
|
|
86
|
+
*/
|
|
87
|
+
export declare function runNpxSkillsAdd(projectRoot: string, options?: RunNpxSkillsAddOptions): RunNpxSkillsAddResult;
|
|
88
|
+
/**
|
|
89
|
+
* 执行 `npx -y skills remove lovrabet/lovrabet-skill --skill Lovrabet`
|
|
90
|
+
*
|
|
91
|
+
* 与 {@link runNpxSkillsAdd} 相同:若设置 `RABETBASE_SKIP_NPX_SKILLS=1` 则跳过(供升级流程自动化测试)。
|
|
92
|
+
*/
|
|
93
|
+
export declare function runNpxSkillsRemove(projectRoot: string, options?: RunNpxSkillsAddOptions, source?: string): RunNpxSkillsAddResult;
|
|
94
|
+
/**
|
|
95
|
+
* 执行与 `npx skills add <source> -g -y` 等价的全局安装调用。
|
|
96
|
+
*
|
|
97
|
+
* 若设置 `RABETBASE_SKIP_NPX_SKILLS=1` 则跳过(与 {@link runNpxSkillsAdd} 一致,避免升级流程在 CI 中长时间阻塞)。
|
|
98
|
+
*/
|
|
99
|
+
export declare function runNpxSkillsAddGlobal(projectRoot: string, source: string, options?: RunNpxSkillsAddOptions): RunNpxSkillsAddResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a250_0x5f52be=a250_0x477c;(function(_0x4042ae,_0x409281){const _0x44687f=a250_0x477c,_0x428295=_0x4042ae();while(!![]){try{const _0x56bfef=-parseInt(_0x44687f(0x18f))/0x1*(-parseInt(_0x44687f(0x195))/0x2)+parseInt(_0x44687f(0x1ae))/0x3+-parseInt(_0x44687f(0x1ac))/0x4+-parseInt(_0x44687f(0x19c))/0x5*(-parseInt(_0x44687f(0x194))/0x6)+parseInt(_0x44687f(0x193))/0x7*(-parseInt(_0x44687f(0x1bd))/0x8)+parseInt(_0x44687f(0x1aa))/0x9+-parseInt(_0x44687f(0x19f))/0xa*(parseInt(_0x44687f(0x190))/0xb);if(_0x56bfef===_0x409281)break;else _0x428295['push'](_0x428295['shift']());}catch(_0x21d875){_0x428295['push'](_0x428295['shift']());}}}(a250_0x33c6,0xd4b11));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a250_0x5f52be(0x1bf);export const NPX_SKILLS_SUBCOMMAND_ADD=a250_0x5f52be(0x196);export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE=a250_0x5f52be(0x1b3);export const LEGACY_RABETBASE_SKILL_SOURCE=a250_0x5f52be(0x1b8);export const DEFAULT_RABETBASE_SKILL_NAME=a250_0x5f52be(0x1be);function a250_0x477c(_0x5d3b43,_0x1cf1c2){_0x5d3b43=_0x5d3b43-0x18d;const _0x33c6a7=a250_0x33c6();let _0x477cbc=_0x33c6a7[_0x5d3b43];return _0x477cbc;}export const RABETBASE_GLOBAL_SKILL_NAME=a250_0x5f52be(0x1b2);function a250_0x33c6(){const _0x4fe1c3=['presence','Skill\x20\x22','inherit','message','lovrabet/lovrabet-skill','code','npx','npx\x20terminated\x20by\x20signal\x20','remove','13857968MAlGrF','Lovrabet','skills','INSTALL_PARTIAL','stderr','EACCES','722ysftWp','11Moekbq','pipe','skill','7QgBwdR','12NUZvNP','2766MUILeN','add','state','stdout','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','signal','checked','3255905VdvblK','CHILD_TERMINATED','!\x20Could\x20not\x20verify\x20\x22','12896170Cvvukb','Installer\x20reported\x20','PERMISSION_DENIED','trim','warn','join','match','EPERM','SPAWN_FAILED','error','filter','8263278NVijUK','stdio','1047076hYFGRg','exit\x20','2807361KZzfTB','log','status','SKILL_NOT_INSTALLED','rabetbase','lovrabet/rabetbase'];a250_0x33c6=function(){return _0x4fe1c3;};return a250_0x33c6();}export const RABETBASE_SKILL_GIT_SOURCE='git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git';export function resolveGlobalSkillName(_0x210271){const _0x5ae609=a250_0x5f52be;switch(_0x210271[_0x5ae609(0x1a2)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x58e3ff){const _0x29bf9e=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x58e3ff&&_0x29bf9e['push'](NPX_SKILLS_FLAG_SKILL,_0x58e3ff),_0x29bf9e;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a250_0x5f52be(0x1ba),...buildNpxSkillsAddArgv()][a250_0x5f52be(0x1a4)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a250_0x5f52be(0x1ba),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a250_0x5f52be(0x1a4)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x95408c,_0x1b6a8e,_0x49089b){return{'ok':![],'status':_0x1b6a8e,'code':_0x95408c,'error':'['+_0x95408c+']\x20'+_0x49089b};}function spawnOptions(_0x431ea2,_0x49a66f){const _0x47219=a250_0x5f52be;return{'cwd':_0x431ea2,'stdio':_0x49a66f,'env':process.env,'shell':![],..._0x49a66f===_0x47219(0x191)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x1f0506,_0x5df395,_0x1fe5ba,_0x4142af){const _0x459693=a250_0x5f52be,_0x448ac8=[_0x1f0506[_0x459693(0x198)]?_0x1f0506[_0x459693(0x198)]['toString']():'',_0x1f0506['stderr']?_0x1f0506[_0x459693(0x18d)]['toString']():''][_0x459693(0x1a9)](Boolean)[_0x459693(0x1a4)]('\x0a')[_0x459693(0x1a2)]();_0x4142af!==_0x459693(0x191)&&_0x448ac8&&console[_0x459693(0x1af)](_0x448ac8);if(_0x1f0506[_0x459693(0x1a8)]){const _0x5ed944=_0x1f0506['error'],_0x465d17=_0x5ed944['code']==='ENOENT'?'NPX_NOT_FOUND':_0x5ed944[_0x459693(0x1b9)]===_0x459693(0x1a6)||_0x5ed944['code']===_0x459693(0x18e)?_0x459693(0x1a1):_0x459693(0x1a7);return failure(_0x465d17,_0x1f0506['status'],_0x5ed944[_0x459693(0x1b7)]);}if(_0x1f0506[_0x459693(0x19a)])return failure(_0x459693(0x19d),_0x1f0506[_0x459693(0x1b0)],_0x459693(0x1bb)+_0x1f0506[_0x459693(0x19a)]);if(_0x1f0506[_0x459693(0x1b0)]!==0x0)return failure('CHILD_EXIT_NONZERO',_0x1f0506[_0x459693(0x1b0)],_0x448ac8||_0x459693(0x1ad)+(_0x1f0506[_0x459693(0x1b0)]??'unknown'));const _0x416428=_0x448ac8[_0x459693(0x1a5)](/Failed to install\s+(\d+)/i);if(_0x416428&&Number(_0x416428[0x1])>0x0)return failure(_0x459693(0x1c0),0x0,_0x459693(0x1a0)+_0x416428[0x1]+'\x20failed\x20target(s)'+(_0x448ac8?':\x0a'+_0x448ac8:''));if(_0x5df395){const _0x4323d9=resolveInstalledSkill(_0x5df395,_0x1fe5ba);if(_0x4323d9[_0x459693(0x197)]==='absent')return failure(_0x459693(0x1b1),0x0,_0x459693(0x1b5)+_0x5df395+_0x459693(0x199)+_0x4323d9[_0x459693(0x19b)][_0x459693(0x1a4)](',\x20')+')');_0x4323d9[_0x459693(0x197)]==='unverifiable'&&console[_0x459693(0x1a3)](_0x459693(0x19e)+_0x5df395+'\x22\x20install\x20state:\x20'+_0x4323d9['reason']);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x1430c2,_0x4b7b6b){const _0x5d7ed1=a250_0x5f52be;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x47ff27=_0x4b7b6b?.[_0x5d7ed1(0x1ab)]??_0x5d7ed1(0x1b6),_0x36135b=resolveNpmBin(_0x5d7ed1(0x1ba)),_0x7bfec7=buildNpxSkillsAddArgv(_0x4b7b6b?.[_0x5d7ed1(0x192)]),_0xee38a0=[_0x5d7ed1(0x1ba),..._0x7bfec7][_0x5d7ed1(0x1a4)]('\x20');console['log']('*\x20'+_0xee38a0);const _0x296ea4=spawnSync(_0x36135b,_0x7bfec7,spawnOptions(_0x1430c2,_0x47ff27));return normalizeSpawnResult(_0x296ea4,undefined,undefined,_0x47ff27);}export function runNpxSkillsRemove(_0x195af1,_0x5ec28a,_0x58f389=LEGACY_RABETBASE_SKILL_SOURCE){const _0x4e4fdc=a250_0x5f52be;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5e774a=_0x5ec28a?.[_0x4e4fdc(0x1ab)]??_0x4e4fdc(0x1b6),_0x1e3dc4=resolveNpmBin(_0x4e4fdc(0x1ba)),_0x51c10d=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x4e4fdc(0x1bc),_0x58f389,NPX_SKILLS_FLAG_SKILL,_0x5ec28a?.[_0x4e4fdc(0x192)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x5ec28a?.['yes']?['-y']:[]],_0x2c57d1=[_0x1e3dc4,..._0x51c10d]['join']('\x20');console[_0x4e4fdc(0x1af)]('*\x20'+_0x2c57d1);const _0x565bae=spawnSync(_0x1e3dc4,_0x51c10d,spawnOptions(_0x195af1,_0x5e774a));return normalizeSpawnResult(_0x565bae,undefined,undefined,_0x5e774a);}export function runNpxSkillsAddGlobal(_0x853fb4,_0x175980,_0x5414ef){const _0x501ebd=a250_0x5f52be;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2065c6=resolveNpmBin(_0x501ebd(0x1ba)),_0x2a7da6=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x175980,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x36dfb8=['npx',NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x175980,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x501ebd(0x1a4)]('\x20');console[_0x501ebd(0x1af)]('*\x20'+_0x36dfb8);const _0x20d28f=spawnSync(_0x2065c6,_0x2a7da6,spawnOptions(_0x853fb4,_0x501ebd(0x191)));return normalizeSpawnResult(_0x20d28f,resolveGlobalSkillName(_0x175980),_0x5414ef?.[_0x501ebd(0x1b4)],_0x5414ef?.[_0x501ebd(0x1ab)]);}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 全局 Skill 安装事实解析(与外部 skills CLI 解耦)
|
|
3
|
+
*
|
|
4
|
+
* 判定原则:只依据可信度较高的信号,且区分「确认未安装」与「无法确认」。
|
|
5
|
+
* - 产物探测:消费方真正解析的 `<globalSkillsDir>/<name>/SKILL.md`
|
|
6
|
+
* - 安装记账:skills CLI 自己维护的 `~/.agents/.skill-lock.json`
|
|
7
|
+
*
|
|
8
|
+
* 目录布局归外部工具所有,因此布局假设失效时必须落到 `unverifiable`(放行 + 说明原因),
|
|
9
|
+
* 不能落到 `absent`(判失败)。只有产物与记账两个来源都表明没装,才是 `absent`。
|
|
10
|
+
*/
|
|
11
|
+
/** skills CLI 安装记账文件(相对 HOME) */
|
|
12
|
+
export declare const SKILL_LOCK_RELATIVE_PATH: string;
|
|
13
|
+
/** 已知的全局 Skill 目录(相对 HOME),按探测优先级排列 */
|
|
14
|
+
export declare const GLOBAL_SKILLS_DIR_RELATIVE_PATHS: string[];
|
|
15
|
+
/**
|
|
16
|
+
* 全局 Skill 的安装事实。
|
|
17
|
+
*
|
|
18
|
+
* `unverifiable` 是刻意保留的第三态:表示本地假设不足以判断,调用方应放行而非报错。
|
|
19
|
+
*/
|
|
20
|
+
export type SkillPresence = {
|
|
21
|
+
state: "present";
|
|
22
|
+
path: string;
|
|
23
|
+
} | {
|
|
24
|
+
state: "absent";
|
|
25
|
+
checked: string[];
|
|
26
|
+
} | {
|
|
27
|
+
state: "unverifiable";
|
|
28
|
+
reason: string;
|
|
29
|
+
};
|
|
30
|
+
export interface ResolveSkillPresenceOptions {
|
|
31
|
+
/** 覆盖候选全局 Skill 目录(隔离环境 / 测试用) */
|
|
32
|
+
globalSkillsDirs?: string[];
|
|
33
|
+
/** 覆盖 skills CLI 安装记账文件路径 */
|
|
34
|
+
lockFile?: string;
|
|
35
|
+
/** 覆盖 HOME,仅用于测试 */
|
|
36
|
+
home?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 解析指定全局 Skill 当前是否可被消费方解析到。
|
|
40
|
+
*
|
|
41
|
+
* @param skillName 全局 Skill 名(目录名),如 `rabetbase`
|
|
42
|
+
* @returns `present` / `absent` / `unverifiable`
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveInstalledSkill(skillName: string, options?: ResolveSkillPresenceOptions): SkillPresence;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a251_0x185632=a251_0x2150;(function(_0x2efc6c,_0x1d0b9f){const _0x3e5e3f=a251_0x2150,_0x1a878b=_0x2efc6c();while(!![]){try{const _0x1d9869=-parseInt(_0x3e5e3f(0x1ea))/0x1+parseInt(_0x3e5e3f(0x1de))/0x2*(-parseInt(_0x3e5e3f(0x1d8))/0x3)+-parseInt(_0x3e5e3f(0x1e5))/0x4*(parseInt(_0x3e5e3f(0x1d1))/0x5)+parseInt(_0x3e5e3f(0x1ce))/0x6+parseInt(_0x3e5e3f(0x1e6))/0x7+-parseInt(_0x3e5e3f(0x1db))/0x8+-parseInt(_0x3e5e3f(0x1d4))/0x9*(-parseInt(_0x3e5e3f(0x1e9))/0xa);if(_0x1d9869===_0x1d0b9f)break;else _0x1a878b['push'](_0x1a878b['shift']());}catch(_0x1f0ccd){_0x1a878b['push'](_0x1a878b['shift']());}}}(a251_0x16ea,0x3b24f));import{existsSync,readFileSync}from'node:fs';function a251_0x16ea(){const _0x4d1f68=['unverifiable','\x20is\x20unreadable:\x20','parse','lockFile','60lhtKvC','1796613ttjOja','map','skills','70NOvHTQ','366730uZsguO','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','recorded','absent','not-recorded','.skill-lock.json','601218dGQMNe','utf8','.agents','144295RBlJXy','find','reason','1724022AdmyPD','present','version','\x20has\x20no\x20skills\x20map','129AepBQf','unusable','.claude','3252328Vgtjqc','includes','\x20records\x20\x22','11598rbDNWK','home','number'];a251_0x16ea=function(){return _0x4d1f68;};return a251_0x16ea();}import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a251_0x185632(0x1d0),a251_0x185632(0x1cd));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a251_0x185632(0x1d0),a251_0x185632(0x1e8)),join(a251_0x185632(0x1da),a251_0x185632(0x1e8))];function a251_0x2150(_0x4da891,_0x16e3df){_0x4da891=_0x4da891-0x1c9;const _0x16ea00=a251_0x16ea();let _0x2150c6=_0x16ea00[_0x4da891];return _0x2150c6;}const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0xc425f0,_0x2de490){const _0x21c07b=a251_0x185632;if(!existsSync(_0xc425f0))return{'kind':_0x21c07b(0x1cc)};let _0x813d12;try{_0x813d12=JSON[_0x21c07b(0x1e3)](readFileSync(_0xc425f0,_0x21c07b(0x1cf)));}catch(_0x427948){return{'kind':'unusable','reason':_0xc425f0+_0x21c07b(0x1e2)+_0x427948['message']};}const _0x3d9fe8=_0x813d12;if(typeof _0x3d9fe8?.[_0x21c07b(0x1d6)]!==_0x21c07b(0x1e0)||!SUPPORTED_LOCK_VERSIONS[_0x21c07b(0x1dc)](_0x3d9fe8[_0x21c07b(0x1d6)]))return{'kind':_0x21c07b(0x1d9),'reason':_0xc425f0+'\x20uses\x20unsupported\x20version\x20'+String(_0x3d9fe8?.[_0x21c07b(0x1d6)])};if(!_0x3d9fe8[_0x21c07b(0x1e8)]||typeof _0x3d9fe8[_0x21c07b(0x1e8)]!=='object')return{'kind':'unusable','reason':_0xc425f0+_0x21c07b(0x1d7)};return _0x3d9fe8[_0x21c07b(0x1e8)][_0x2de490]?{'kind':_0x21c07b(0x1ca)}:{'kind':_0x21c07b(0x1cc)};}export function resolveInstalledSkill(_0x569e21,_0x53cc24){const _0x9329a2=a251_0x185632,_0x431418=_0x53cc24?.[_0x9329a2(0x1df)]??homedir(),_0x89cb77=_0x53cc24?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x48fed1=>join(_0x431418,_0x48fed1)),_0x30d4cd=_0x53cc24?.[_0x9329a2(0x1e4)]??join(_0x431418,SKILL_LOCK_RELATIVE_PATH),_0xf31848=_0x89cb77[_0x9329a2(0x1e7)](_0xcbe0df=>join(_0xcbe0df,_0x569e21,'SKILL.md')),_0x4d32f9=_0xf31848[_0x9329a2(0x1d2)](_0x52a911=>existsSync(_0x52a911));if(_0x4d32f9)return{'state':_0x9329a2(0x1d5),'path':_0x4d32f9};const _0x38272b=readLockLookup(_0x30d4cd,_0x569e21);if(_0x38272b['kind']===_0x9329a2(0x1d9))return{'state':_0x9329a2(0x1e1),'reason':_0x38272b[_0x9329a2(0x1d3)]};if(_0x38272b['kind']===_0x9329a2(0x1ca))return{'state':'unverifiable','reason':_0x30d4cd+_0x9329a2(0x1dd)+_0x569e21+_0x9329a2(0x1c9)+('('+_0xf31848['join'](',\x20')+')')};return{'state':_0x9329a2(0x1cb),'checked':_0xf31848};}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ReportCommandTraceParams = {
|
|
2
|
+
service: string;
|
|
3
|
+
command: string;
|
|
4
|
+
flags: Record<string, unknown>;
|
|
5
|
+
durationMs?: number;
|
|
6
|
+
error?: unknown;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* 命令执行遥测上报(不抛错,不影响主流程)。
|
|
10
|
+
* 退出前由 `registerOtelShutdownOnExit` 调用 `shutdownTraces`。
|
|
11
|
+
*/
|
|
12
|
+
export declare function reportCommandTrace(params: ReportCommandTraceParams): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb1271d,_0xab051){const _0x492c3f=a252_0x2e74,_0x3d1677=_0xb1271d();while(!![]){try{const _0x290ee2=parseInt(_0x492c3f(0x166))/0x1*(-parseInt(_0x492c3f(0x16a))/0x2)+parseInt(_0x492c3f(0x165))/0x3*(parseInt(_0x492c3f(0x164))/0x4)+-parseInt(_0x492c3f(0x159))/0x5*(-parseInt(_0x492c3f(0x15e))/0x6)+-parseInt(_0x492c3f(0x167))/0x7+-parseInt(_0x492c3f(0x15a))/0x8+parseInt(_0x492c3f(0x15d))/0x9*(parseInt(_0x492c3f(0x162))/0xa)+parseInt(_0x492c3f(0x160))/0xb;if(_0x290ee2===_0xab051)break;else _0x3d1677['push'](_0x3d1677['shift']());}catch(_0x320380){_0x3d1677['push'](_0x3d1677['shift']());}}}(a252_0x11d4,0xae70b));function a252_0x11d4(){const _0x111da8=['2670808GyLsyS','service','error','2OzKWkN','test','command','59845xGFixU','5033672KxCxRw','flags','rabetbase.command','9FfPHnp','534wdQIPN','message','4098259pYvyiQ','some','7497680IjrasR','durationMs','3628AFNhOM','993jvkkXO','762535UqdURq'];a252_0x11d4=function(){return _0x111da8;};return a252_0x11d4();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x41fb00){const _0x5d90f7=a252_0x2e74;return SENSITIVE_PATTERNS[_0x5d90f7(0x161)](_0x2edec9=>_0x2edec9[_0x5d90f7(0x157)](_0x41fb00));}function sanitizeFlags(_0x675853){const _0x8fd660={};for(const [_0x1a8f1c,_0x2cc6d3]of Object['entries'](_0x675853)){isSensitiveKey(_0x1a8f1c)?_0x8fd660[_0x1a8f1c]=_0x2cc6d3!=null&&_0x2cc6d3!==''?'[REDACTED]':_0x2cc6d3:_0x8fd660[_0x1a8f1c]=_0x2cc6d3;}return _0x8fd660;}function a252_0x2e74(_0x2a1567,_0x51accc){_0x2a1567=_0x2a1567-0x157;const _0x11d415=a252_0x11d4();let _0x2e74e8=_0x11d415[_0x2a1567];return _0x2e74e8;}export async function reportCommandTrace(_0x5cd3ef){const _0x37989a=a252_0x2e74;try{const _0x550056=sanitizeFlags(_0x5cd3ef[_0x37989a(0x15b)]);await sendCliTraceLog({'spanName':_0x37989a(0x15c),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x5cd3ef[_0x37989a(0x168)],'command.name':_0x5cd3ef[_0x37989a(0x158)],'command.flags':JSON['stringify'](_0x550056),..._0x5cd3ef[_0x37989a(0x163)]!=null?{'command.duration_ms':_0x5cd3ef[_0x37989a(0x163)]}:{},..._0x5cd3ef[_0x37989a(0x169)]?{'command.error':_0x5cd3ef['error']instanceof Error?_0x5cd3ef[_0x37989a(0x169)][_0x37989a(0x15f)]:String(_0x5cd3ef['error'])}:{}}});}catch{}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type CliHelpTraceKind = "global" | "unknown_service";
|
|
2
|
+
/**
|
|
3
|
+
* CLI 展示帮助时上报 OTel(不抛错,不影响主流程)。
|
|
4
|
+
* 退出前由 `registerOtelShutdownOnExit` 调用 `shutdownTraces`。
|
|
5
|
+
*/
|
|
6
|
+
export declare function reportCliHelpTrace(kind: CliHelpTraceKind, options?: {
|
|
7
|
+
service?: string;
|
|
8
|
+
}): Promise<void>;
|