@lovrabet/rabetbase-cli 2.5.3-beta.1 → 2.5.3-beta.3
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.js +1 -1
- package/lib/api/api-group.d.ts +22 -0
- package/lib/api/api-group.js +1 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +18 -2
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.d.ts +11 -0
- package/lib/api/legacy-api-file.js +1 -0
- package/lib/api/model-registry-file.d.ts +36 -0
- package/lib/api/model-registry-file.js +1 -0
- package/lib/api/model-registry-scaffold.d.ts +7 -0
- package/lib/api/model-registry-scaffold.js +1 -0
- package/lib/api/model-source.d.ts +6 -0
- package/lib/api/model-source.js +1 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.d.ts +7 -0
- package/lib/commands/bff/logs.js +1 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +7 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.d.ts +21 -0
- package/lib/commands/dataset/batch-design.js +1 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-create.js +1 -0
- package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-delete.js +1 -0
- package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-list.js +1 -0
- package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
- package/lib/commands/dataset/cross-relation-shared.js +1 -0
- package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
- package/lib/commands/dataset/cross-relation-update.js +1 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.d.ts +2 -0
- package/lib/commands/flow/create.js +1 -0
- package/lib/commands/flow/detail.d.ts +2 -0
- package/lib/commands/flow/detail.js +1 -0
- package/lib/commands/flow/index.d.ts +3 -0
- package/lib/commands/flow/index.js +1 -0
- package/lib/commands/flow/list.d.ts +2 -0
- package/lib/commands/flow/list.js +1 -0
- package/lib/commands/flow/publish.d.ts +2 -0
- package/lib/commands/flow/publish.js +1 -0
- package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
- package/lib/commands/flow/runtime-resources-shared.js +1 -0
- package/lib/commands/flow/runtime-role-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-list.js +1 -0
- package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
- package/lib/commands/flow/runtime-role-user-list.js +1 -0
- package/lib/commands/flow/runtime-user-search.d.ts +2 -0
- package/lib/commands/flow/runtime-user-search.js +1 -0
- package/lib/commands/flow/shared.d.ts +41 -0
- package/lib/commands/flow/shared.js +1 -0
- package/lib/commands/flow/update.d.ts +2 -0
- package/lib/commands/flow/update.js +1 -0
- package/lib/commands/flow/validate.d.ts +3 -0
- package/lib/commands/flow/validate.js +1 -0
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/api-architecture-upgrade.d.ts +28 -0
- package/lib/commands/project/api-architecture-upgrade.js +1 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/domain-routing-sync.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +30 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/rule/get.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +2 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +2 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +13 -17
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +176 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.d.ts +55 -0
- package/lib/core/bff/hook-directory.js +1 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +15 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-relation.d.ts +41 -0
- package/lib/core/cross-db-relation.js +1 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +628 -0
- package/lib/core/flow-config.js +1 -0
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +0 -10
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +11 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +12 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +4 -1
- package/skills/rabetbase/SKILL.md +31 -9
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
- package/skills/rabetbase/guides/backend-function.md +19 -9
- package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
- package/skills/rabetbase/guides/conflict-detection.md +2 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +112 -60
- package/skills/rabetbase/guides/typescript-sdk.md +9 -0
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
- package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
- package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
- package/skills/rabetbase/references/rabetbase-bff-pull.md +7 -3
- package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
- package/skills/rabetbase/references/rabetbase-config.md +2 -1
- package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
- package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
- package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
- package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
- package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
- package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
- package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
- package/skills/rabetbase.manifest.json +10 -3
- package/templates/README.md +16 -4
- package/templates/generate-api/model-runtime.ts.tpl +101 -0
- package/templates/generate-api/profile-api.ts.tpl +21 -0
- package/templates/generate-api/profile-client.ts.tpl +14 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a312_0x5f0a68=a312_0x4de6;(function(_0x248afb,_0x336275){const _0x22b5bc=a312_0x4de6,_0x33cc2a=_0x248afb();while(!![]){try{const _0x29ba89=parseInt(_0x22b5bc(0x124))/0x1*(-parseInt(_0x22b5bc(0x130))/0x2)+-parseInt(_0x22b5bc(0x13d))/0x3*(parseInt(_0x22b5bc(0x12e))/0x4)+parseInt(_0x22b5bc(0x13c))/0x5+-parseInt(_0x22b5bc(0x132))/0x6*(-parseInt(_0x22b5bc(0x147))/0x7)+-parseInt(_0x22b5bc(0x13a))/0x8+-parseInt(_0x22b5bc(0x135))/0x9*(-parseInt(_0x22b5bc(0x137))/0xa)+parseInt(_0x22b5bc(0x146))/0xb*(-parseInt(_0x22b5bc(0x148))/0xc);if(_0x29ba89===_0x336275)break;else _0x33cc2a['push'](_0x33cc2a['shift']());}catch(_0x383905){_0x33cc2a['push'](_0x33cc2a['shift']());}}}(a312_0x4124,0x5ca13));export const ROUTING_CATALOG_DIGEST='3106fb4f7940b1f4446307e8a7f0c6f6e4a71affd6f8ebe7e5f23e055c08ca3f';export const DEFAULT_REGION='cn';function a312_0x4de6(_0x2595e9,_0x11bf3d){_0x2595e9=_0x2595e9-0x124;const _0x412408=a312_0x4124();let _0x4de6c1=_0x412408[_0x2595e9];return _0x4de6c1;}function a312_0x4124(){const _0xcb66ce=['11409HMtPov','https://skills.lovrabet.com','https://user.lovrabet.com','https://daily-api.lovrabet.com','Mainland\x20China','Global','https://dev.lovrabet.id','https://api.lovrabet.id','https://runtime.lovrabet.id','660JQFBOT','5010138YbvvXv','75564ZUkqEE','https://api.lovrabet.com','6416LPrIBT','https://g.lovrabet.com','https://app.lovrabet.id','https://skills-daily.lovrabet.com','https://dev.lovrabet.com','https://api.lovrabet.ai','https://user.lovrabet.ai','china','https://g.alicdn.com/code/lib','indonesia','64JtClwu','https://runtime.lovrabet.com','200WTXxQP','https://skills.lovrabet.ai','6WAuuMY','https://cdnjs.cloudflare.com/ajax/libs','https://g.lovrabet.id','25731URuQOJ','https://daily-runtime.lovrabet.com','2060DsvoSe','https://app.lovrabet.ai','https://dev.lovrabet.ai','1914832uwWkPG','global','1971725ctFXSb'];a312_0x4124=function(){return _0xcb66ce;};return a312_0x4124();}export const REGION_VALUES=['cn','id',a312_0x5f0a68(0x13b)];export const ENABLED_REGION_VALUES=['cn','id'];export const OFFICIAL_ROUTING_PROFILES={'cn':{'enabled':!![],'label':a312_0x5f0a68(0x141),'aliases':[a312_0x5f0a68(0x12b)],'serviceDomains':{'production':{'user':a312_0x5f0a68(0x13f),'api':a312_0x5f0a68(0x149),'runtime':a312_0x5f0a68(0x12f),'skill':a312_0x5f0a68(0x13e),'kb':a312_0x5f0a68(0x149),'app':'https://app.lovrabet.com'},'daily':{'user':'https://user-daily.lovrabet.com','api':a312_0x5f0a68(0x140),'runtime':a312_0x5f0a68(0x136),'skill':a312_0x5f0a68(0x127),'kb':'https://daily-api.lovrabet.com','app':'https://daily.lovrabet.com'}},'cdn':{'libraries':a312_0x5f0a68(0x12c),'lovrabet':a312_0x5f0a68(0x125)},'local':{'origin':a312_0x5f0a68(0x128)}},'id':{'enabled':!![],'label':'Indonesia','aliases':[a312_0x5f0a68(0x12d)],'serviceDomains':{'production':{'user':'https://user.lovrabet.id','api':a312_0x5f0a68(0x144),'runtime':a312_0x5f0a68(0x145),'skill':'https://skills.lovrabet.id','kb':a312_0x5f0a68(0x144),'app':a312_0x5f0a68(0x126)}},'cdn':{'libraries':a312_0x5f0a68(0x133),'lovrabet':a312_0x5f0a68(0x134)},'local':{'origin':a312_0x5f0a68(0x143)}},'global':{'enabled':![],'label':a312_0x5f0a68(0x142),'aliases':[],'serviceDomains':{'production':{'user':a312_0x5f0a68(0x12a),'api':'https://api.lovrabet.ai','runtime':'https://runtime.lovrabet.ai','skill':a312_0x5f0a68(0x131),'kb':a312_0x5f0a68(0x129),'app':a312_0x5f0a68(0x138)}},'cdn':{'libraries':a312_0x5f0a68(0x133)},'local':{'origin':a312_0x5f0a68(0x139)}}};export const REGION_ALIASES={'china':'cn','indonesia':'id'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a313_0x3e42bb=a313_0x2ba2;(function(_0x287b97,_0x3e440d){const _0x33fc63=a313_0x2ba2,_0x28f116=_0x287b97();while(!![]){try{const _0x1c82dc=-parseInt(_0x33fc63(0x1d2))/0x1+parseInt(_0x33fc63(0x1dd))/0x2+parseInt(_0x33fc63(0x1d1))/0x3+-parseInt(_0x33fc63(0x1da))/0x4+parseInt(_0x33fc63(0x1dc))/0x5*(-parseInt(_0x33fc63(0x1d7))/0x6)+parseInt(_0x33fc63(0x1d4))/0x7+parseInt(_0x33fc63(0x1db))/0x8;if(_0x1c82dc===_0x3e440d)break;else _0x28f116['push'](_0x28f116['shift']());}catch(_0x620dc1){_0x28f116['push'](_0x28f116['shift']());}}}(a313_0x54d8,0xf3e1b));function a313_0x54d8(){const _0x4e6005=['15626120FYDxmI','10bIQgIS','2059564NxnDnv','enterprise','lovrabet','appDomain','apiDomain','lovrabet-routing/v1','libraries','305802OGEHYz','360035GnbimF','localDomain','2597070YykITS','d83929cbced3959b68435d16131e5ff12a4bfc6095e6b7f15bada2bfd03a72cc','runtimeDomain','5514324VhUVzp','kbDomain','userDomain','1035636NpdLoU'];a313_0x54d8=function(){return _0x4e6005;};return a313_0x54d8();}export const ENTERPRISE_ROUTING_SCHEMA_DIGEST=a313_0x3e42bb(0x1d5);export const ENTERPRISE_ROUTING_PROTOCOL=a313_0x3e42bb(0x1cf);export const ENTERPRISE_ROUTING_KIND=a313_0x3e42bb(0x1de);export const ENTERPRISE_ROUTING_DOMAIN_FIELDS=['userDomain',a313_0x3e42bb(0x1ce),a313_0x3e42bb(0x1d6),'skillDomain',a313_0x3e42bb(0x1d8),a313_0x3e42bb(0x1cd),a313_0x3e42bb(0x1d3),'certificateDomain'];export const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a313_0x3e42bb(0x1d9),a313_0x3e42bb(0x1ce),a313_0x3e42bb(0x1d6),'skillDomain',a313_0x3e42bb(0x1d8),'appDomain'];export const ENTERPRISE_ROUTING_CDN_FIELDS=[a313_0x3e42bb(0x1d0),'lovrabet'];function a313_0x2ba2(_0x34dc69,_0x2f6293){_0x34dc69=_0x34dc69-0x1cd;const _0x54d8f5=a313_0x54d8();let _0x2ba27b=_0x54d8f5[_0x34dc69];return _0x2ba27b;}export const REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS=[a313_0x3e42bb(0x1d0),a313_0x3e42bb(0x1df)];
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dd270,_0x8d7fcc){var _0xcb566=a314_0x4e84,_0xb9547c=_0x3dd270();while(!![]){try{var _0x1c9ff4=-parseInt(_0xcb566(0xa9))/0x1*(-parseInt(_0xcb566(0xae))/0x2)+parseInt(_0xcb566(0xa5))/0x3*(-parseInt(_0xcb566(0xa0))/0x4)+parseInt(_0xcb566(0xa8))/0x5*(-parseInt(_0xcb566(0xac))/0x6)+-parseInt(_0xcb566(0x9f))/0x7+parseInt(_0xcb566(0xa4))/0x8*(-parseInt(_0xcb566(0xa6))/0x9)+parseInt(_0xcb566(0xa1))/0xa+-parseInt(_0xcb566(0xa2))/0xb*(-parseInt(_0xcb566(0x9d))/0xc);if(_0x1c9ff4===_0x8d7fcc)break;else _0xb9547c['push'](_0xb9547c['shift']());}catch(_0x1cffc0){_0xb9547c['push'](_0xb9547c['shift']());}}}(a314_0x4196,0xe44e8));function a314_0x4196(){var _0x1512c0=['56002tetUhl','12rewcsM','green','12625263keXxPh','5236796FdpyMc','2157630bCYfUE','43349174uFCkaj','\x20--help','80AQjidH','3NtmAHo','109206YkSGtG','\x20to\x20view\x20available\x20commands.','5lCUNxV','8aNqiJj','bold','\x20\x20Use\x20','1267878GHCvHG','log'];a314_0x4196=function(){return _0x1512c0;};return a314_0x4196();}function a314_0x4e84(_0x576709,_0x43588a){_0x576709=_0x576709-0x9d;var _0x419612=a314_0x4196();var _0x4e847a=_0x419612[_0x576709];return _0x4e847a;}import a314_0x9f87fe from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0x15d250=a314_0x4e84;console[_0x15d250(0xad)](),console[_0x15d250(0xad)](a314_0x9f87fe['green'][_0x15d250(0xaa)]('\x20\x20'+CLI_DISPLAY_NAME)),console['log'](),console[_0x15d250(0xad)](_0x15d250(0xab)+a314_0x9f87fe[_0x15d250(0x9e)]['bold'](CLI_BIN_NAME+_0x15d250(0xa3))+_0x15d250(0xa7)),console['log']();}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11f24b,_0x50b598){const _0x24f1f0=a315_0x20f1,_0x40623d=_0x11f24b();while(!![]){try{const _0x6090ad=parseInt(_0x24f1f0(0x11a))/0x1*(parseInt(_0x24f1f0(0x108))/0x2)+-parseInt(_0x24f1f0(0x103))/0x3+parseInt(_0x24f1f0(0x106))/0x4*(-parseInt(_0x24f1f0(0x102))/0x5)+parseInt(_0x24f1f0(0x10f))/0x6+-parseInt(_0x24f1f0(0x116))/0x7*(parseInt(_0x24f1f0(0x115))/0x8)+parseInt(_0x24f1f0(0x101))/0x9*(-parseInt(_0x24f1f0(0x110))/0xa)+parseInt(_0x24f1f0(0x107))/0xb*(parseInt(_0x24f1f0(0x10d))/0xc);if(_0x6090ad===_0x50b598)break;else _0x40623d['push'](_0x40623d['shift']());}catch(_0x3ac39a){_0x40623d['push'](_0x40623d['shift']());}}}(a315_0x590d,0xd8ce2));import{installBuiltinSkill}from'./skills/builtin-skill.js';function a315_0x590d(){const _0x47ae4d=['1876203QlxDGd','warn','Installation\x20failed','64lWxalQ','176gLLFPy','1003346WLkVHN','repairCommand','[BUILTIN_SKILL_INSTALL_','code','SOURCE_INVALID','1643112ZswZcF','Repair\x20with:\x20','1431864dhVAKL','10nXxSUW','installedPath','Rabetbase\x20Built-in\x20Skill\x20','error','\x20at\x20','628408iyoDyJ','77ojlJtN','already\x20current','log','changed','1LcFNKj','1455453hccTjE','122475CaXvwY'];a315_0x590d=function(){return _0x47ae4d;};return a315_0x590d();}function a315_0x20f1(_0x4f01d7,_0x1fa568){_0x4f01d7=_0x4f01d7-0x101;const _0x590d70=a315_0x590d();let _0x20f18c=_0x590d70[_0x4f01d7];return _0x20f18c;}export async function runPostinstall(_0x14feac={}){const _0x43cd90=a315_0x20f1,_0x280531=installBuiltinSkill(_0x14feac);if(_0x280531['ok']){const _0x34483e=_0x280531[_0x43cd90(0x119)]?'installed':_0x43cd90(0x117),_0x168d6d=_0x280531[_0x43cd90(0x111)]?_0x43cd90(0x114)+_0x280531[_0x43cd90(0x111)]:'\x20via\x20skills@latest';return console[_0x43cd90(0x118)](_0x43cd90(0x112)+_0x280531['skillVersion']+'\x20'+_0x34483e+_0x168d6d),_0x280531;}const _0x24357d=_0x43cd90(0x10a)+(_0x280531[_0x43cd90(0x10b)]??'FAILED')+']\x20'+(_0x280531[_0x43cd90(0x113)]??_0x43cd90(0x105))+'.\x20'+(_0x43cd90(0x10e)+_0x280531[_0x43cd90(0x109)]);if(_0x280531[_0x43cd90(0x10b)]===_0x43cd90(0x10c))throw new Error(_0x24357d);return console[_0x43cd90(0x104)](_0x24357d),_0x280531;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5269f2,_0x2986e8){const _0x298b99=a316_0x335c,_0x15ec88=_0x5269f2();while(!![]){try{const _0x28fe73=-parseInt(_0x298b99(0xaa))/0x1*(-parseInt(_0x298b99(0xa4))/0x2)+parseInt(_0x298b99(0x9e))/0x3*(parseInt(_0x298b99(0xa7))/0x4)+-parseInt(_0x298b99(0x9d))/0x5*(-parseInt(_0x298b99(0xa2))/0x6)+-parseInt(_0x298b99(0x9a))/0x7+-parseInt(_0x298b99(0xab))/0x8*(parseInt(_0x298b99(0xa3))/0x9)+parseInt(_0x298b99(0x9c))/0xa+parseInt(_0x298b99(0xa6))/0xb*(-parseInt(_0x298b99(0xa5))/0xc);if(_0x28fe73===_0x2986e8)break;else _0x15ec88['push'](_0x15ec88['shift']());}catch(_0x38f17b){_0x15ec88['push'](_0x15ec88['shift']());}}}(a316_0x1e8e,0xe98d4));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildRabetbaseConfirmationRequest(_0x22d36d,_0x5bed51,_0x35676e){const _0x1fc10d=a316_0x335c,_0x3883fd=normalizeText(_0x22d36d[_0x1fc10d(0xad)],DESCRIPTION_MAX_LENGTH),_0x59387e=_0x3883fd||normalizeText(defaultDescription(requireWriteRisk(_0x22d36d),_0x5bed51),DESCRIPTION_MAX_LENGTH);return{'operation':_0x5bed51,'risk':requireWriteRisk(_0x22d36d),'description':_0x59387e,..._0x35676e?{'signal':_0x35676e}:{}};}function requireWriteRisk(_0x36fe8c){const _0x534304=a316_0x335c;if(_0x36fe8c[_0x534304(0xa1)]===_0x534304(0xa8)||_0x36fe8c[_0x534304(0xa1)]===_0x534304(0xac))return _0x36fe8c['risk'];throw new Error('Rabetbase\x20confirmation\x20requires\x20a\x20write\x20command.');}function defaultDescription(_0x2998d5,_0x20e3d7){const _0x16e404=a316_0x335c;if(_0x2998d5===_0x16e404(0xac))return'This\x20will\x20run\x20the\x20high-risk\x20write\x20'+_0x20e3d7+_0x16e404(0xa0);return _0x16e404(0x99)+_0x20e3d7+_0x16e404(0xa9);}function a316_0x335c(_0x25270d,_0x3656a5){_0x25270d=_0x25270d-0x98;const _0x1e8e3c=a316_0x1e8e();let _0x335c12=_0x1e8e3c[_0x25270d];return _0x335c12;}function a316_0x1e8e(){const _0x45dcdd=['3793732jexQNL','write','.\x20It\x20may\x20create\x20or\x20change\x20business\x20data\x20or\x20local\x20configuration.','1225BLmlVQ','16VmgZDi','high-risk-write','confirmationDescription','replace','string','This\x20will\x20run\x20the\x20write\x20','1197511JLLdqa','trim','5968170McvwiX','335310rQqHNa','3DfvkoX','slice','.\x20It\x20may\x20overwrite,\x20delete,\x20or\x20materially\x20change\x20live\x20behavior.','risk','36aHRXev','4679577WUsvnf','882EChBqd','12EOpfpN','3522640TMEkQV'];a316_0x1e8e=function(){return _0x45dcdd;};return a316_0x1e8e();}function normalizeText(_0x3ea6b8,_0x29dcb0){const _0x551de4=a316_0x335c;if(typeof _0x3ea6b8!==_0x551de4(0x98))return'';return _0x3ea6b8[_0x551de4(0xae)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x551de4(0xae)](/\s+/g,'\x20')[_0x551de4(0x9b)]()[_0x551de4(0x9f)](0x0,_0x29dcb0);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2572ff,_0x31c275){const _0x823df7=a317_0x4a7b,_0x3903f6=_0x2572ff();while(!![]){try{const _0x5d3eef=-parseInt(_0x823df7(0xee))/0x1*(parseInt(_0x823df7(0xec))/0x2)+parseInt(_0x823df7(0xf3))/0x3*(parseInt(_0x823df7(0xe5))/0x4)+-parseInt(_0x823df7(0xf4))/0x5+parseInt(_0x823df7(0xe6))/0x6+-parseInt(_0x823df7(0xf0))/0x7+parseInt(_0x823df7(0xea))/0x8*(-parseInt(_0x823df7(0xed))/0x9)+parseInt(_0x823df7(0xe9))/0xa*(parseInt(_0x823df7(0xe4))/0xb);if(_0x5d3eef===_0x31c275)break;else _0x3903f6['push'](_0x3903f6['shift']());}catch(_0x44cff0){_0x3903f6['push'](_0x3903f6['shift']());}}}(a317_0x1391,0x7f0d2));function a317_0x1391(){const _0x452f4e=['586asIoRG','6192837pWIjDL','3191StipSy','rabetbase.write.completed','407456sWJsIX','conflicts','isArray','411FMYULq','868665shDhhv','service','filter','command','split','771177BKabdZ','29388EbBVtz','1062246ioDBpk','high-risk-write','risk','170PwqbDu','8Gwmhjz','join'];a317_0x1391=function(){return _0x452f4e;};return a317_0x1391();}export function canonicalRabetbaseOperation(_0x2bfa5e){const _0x40706e=a317_0x4a7b;return[_0x2bfa5e[_0x40706e(0xf5)],..._0x2bfa5e[_0x40706e(0xf7)]['trim']()[_0x40706e(0xe3)](/\s+/)][_0x40706e(0xf6)](Boolean)[_0x40706e(0xeb)]('.');}export function createRabetbaseWriteMetadata(_0x4f30d5,_0x5a2ce5,_0x478e39,_0x12f3d4){const _0x38eff4=a317_0x4a7b;if(_0x12f3d4||_0x478e39['ok']!==!![]||hasUnresolvedConflicts(_0x478e39)||_0x4f30d5[_0x38eff4(0xe8)]!=='write'&&_0x4f30d5[_0x38eff4(0xe8)]!==_0x38eff4(0xe7))return undefined;return{'rabetbase':{'schemaVersion':0x1,'event':{'type':_0x38eff4(0xef),'operation':_0x5a2ce5,'risk':_0x4f30d5[_0x38eff4(0xe8)]}}};}function a317_0x4a7b(_0x2914d2,_0x3d79d0){_0x2914d2=_0x2914d2-0xe3;const _0x1391d5=a317_0x1391();let _0x4a7bf1=_0x1391d5[_0x2914d2];return _0x4a7bf1;}function hasUnresolvedConflicts(_0x38526c){const _0x12f5ec=a317_0x4a7b,_0xd7f7b2=_0x38526c['data'];return Boolean(_0xd7f7b2&&typeof _0xd7f7b2==='object'&&!Array['isArray'](_0xd7f7b2)&&Array[_0x12f5ec(0xf2)](_0xd7f7b2[_0x12f5ec(0xf1)])&&_0xd7f7b2[_0x12f5ec(0xf1)]['length']>0x0);}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fc4b7,_0x1939e6){const _0x2ab61a=a318_0x144a,_0x40c41a=_0x2fc4b7();while(!![]){try{const _0x4c809d=-parseInt(_0x2ab61a(0x1fa))/0x1*(-parseInt(_0x2ab61a(0x1fd))/0x2)+parseInt(_0x2ab61a(0x1f6))/0x3*(-parseInt(_0x2ab61a(0x1f8))/0x4)+parseInt(_0x2ab61a(0x1e1))/0x5+parseInt(_0x2ab61a(0x1ea))/0x6*(-parseInt(_0x2ab61a(0x1e8))/0x7)+-parseInt(_0x2ab61a(0x1e0))/0x8+-parseInt(_0x2ab61a(0x1f9))/0x9*(-parseInt(_0x2ab61a(0x1e5))/0xa)+parseInt(_0x2ab61a(0x1fe))/0xb;if(_0x4c809d===_0x1939e6)break;else _0x40c41a['push'](_0x40c41a['shift']());}catch(_0x40ea7e){_0x40c41a['push'](_0x40c41a['shift']());}}}(a318_0x3345,0xc865f));import{buildConfigFromFlags,initGlobalEnvironment,isRoutingRecoveryService}from'../context.js';import{createPipelineEnv,createRabetbaseRunnerAdapter,finalizeRabetbaseRuntimeState,runCommand}from'../framework/runner.js';function a318_0x3345(){const _0xe686fd=['service','high-risk-write','confirm','stringify','Rabetbase\x20invocation\x20aborted.','data','signal','7079232xGmvTa','1028880WvmGcz','riskLevel','aborted','message','110cuyWaC','definition','reason','70pIdkWs','result','924906KjaBcV','Rabetbase\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','dryRun','args','present','rawFlags','risk','presentation','command','isNonInteractive','AbortError','Embedded\x20Rabetbase\x20confirmation\x20must\x20run\x20before\x20the\x20execution\x20queue.','75GRznxE','execute','218936rEJUCv','510993nEOLwm','38603ZwPRnO','dry-run','format','26JjoSrx','36117763xVOwUC','yes'];a318_0x3345=function(){return _0xe686fd;};return a318_0x3345();}function a318_0x144a(_0x28fcca,_0x53d536){_0x28fcca=_0x28fcca-0x1dc;const _0x3345f7=a318_0x3345();let _0x144ae3=_0x3345f7[_0x28fcca];return _0x144ae3;}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';const defaultPresentation={'present'({result:_0x4bb78a,command:_0x1cb696,risk:_0x2c2603,dryRun:_0x33716a}){const _0x1e907d=a318_0x144a;return JSON[_0x1e907d(0x1dc)]({'ok':_0x4bb78a['ok'],'command':_0x1cb696,'risk':_0x2c2603,..._0x33716a?{'dryRun':!![]}:{},..._0x4bb78a[_0x1e907d(0x1de)]!==undefined?{'data':_0x4bb78a[_0x1e907d(0x1de)]}:{},..._0x4bb78a['message']?{'message':_0x4bb78a[_0x1e907d(0x1e4)]}:{}});}};export async function invokeRabetbase(_0x48a646,_0x1d83e3){const _0x31294b=a318_0x144a;throwIfAborted(_0x1d83e3[_0x31294b(0x1df)]);const _0x1b3c13=await resolveRabetbaseInvocation(_0x48a646),_0x40c9b7=canonicalRabetbaseOperation(_0x1b3c13[_0x31294b(0x1e6)]);return await confirmWriteBeforeQueue(_0x1b3c13[_0x31294b(0x1e6)],_0x1b3c13['rawFlags'],_0x40c9b7,_0x1d83e3),runSerialized(async()=>{const _0x139363=_0x31294b,_0x51e042={};try{throwIfAborted(_0x1d83e3[_0x139363(0x1df)]);const _0x3f8792=buildConfigFromFlags(_0x1b3c13[_0x139363(0x1ef)]);!isRoutingRecoveryService(_0x1b3c13[_0x139363(0x1e6)][_0x139363(0x200)])&&await initGlobalEnvironment(_0x3f8792);const _0x13b4e1=createPipelineEnv(_0x3f8792,{..._0x1b3c13['rawFlags'],'yes':_0x1b3c13[_0x139363(0x1e6)][_0x139363(0x1f0)]===_0x139363(0x201)?!![]:_0x1b3c13[_0x139363(0x1ef)][_0x139363(0x1ff)],'nonInteractive':!![]},_0x1b3c13[_0x139363(0x1ed)]);_0x13b4e1[_0x139363(0x1f3)]=!![],_0x13b4e1[_0x139363(0x1e2)]='high-risk-write';const _0x342a3c=withAbortSignal(_0x1b3c13[_0x139363(0x1e6)],_0x1d83e3[_0x139363(0x1df)]),_0x17503e=createRabetbaseRunnerAdapter({'formatOutput'(_0x3531be,_0xb2d8ea){const _0x536fde=_0x139363;_0x51e042[_0x536fde(0x1e9)]=_0x3531be,_0x51e042[_0x536fde(0x1f2)]=_0xb2d8ea[_0x536fde(0x1f2)],_0x51e042[_0x536fde(0x1f0)]=_0xb2d8ea[_0x536fde(0x1f0)],_0x51e042['format']=_0xb2d8ea[_0x536fde(0x1fc)],_0x51e042['dryRun']=_0xb2d8ea[_0x536fde(0x1ec)]===!![];},async 'confirmHighRisk'(){const _0xc6c389=_0x139363;throw new Error(_0xc6c389(0x1f5));}});await runCommand(_0x342a3c,_0x13b4e1,_0x17503e);if(!_0x51e042['result']||!_0x51e042[_0x139363(0x1f2)]||!_0x51e042[_0x139363(0x1f0)]||!_0x51e042['format'])throw new Error(_0x139363(0x1eb));const _0x18cbf0=_0x51e042[_0x139363(0x1ec)]===!![],_0x1a9b29=_0x1d83e3[_0x139363(0x1f1)]??defaultPresentation,_0x57de58={'result':_0x51e042['result'],'command':_0x51e042['command'],'operation':_0x40c9b7,'risk':_0x51e042[_0x139363(0x1f0)],'format':_0x51e042[_0x139363(0x1fc)],'dryRun':_0x18cbf0},_0x12c9bd=createRabetbaseWriteMetadata(_0x1b3c13['definition'],_0x40c9b7,_0x51e042[_0x139363(0x1e9)],_0x18cbf0);let _0xb45e37;try{_0xb45e37=await _0x1a9b29[_0x139363(0x1ee)](_0x57de58);}catch(_0x3196d7){if(!_0x12c9bd||_0x1a9b29===defaultPresentation)throw _0x3196d7;_0xb45e37=await defaultPresentation[_0x139363(0x1ee)](_0x57de58);}return{'operation':_0x40c9b7,'risk':_0x51e042[_0x139363(0x1f0)],'mode':_0x18cbf0?_0x139363(0x1fb):'execute','result':_0x51e042[_0x139363(0x1e9)],'output':_0xb45e37,..._0x12c9bd?{'metadata':_0x12c9bd}:{}};}finally{await finalizeRabetbaseRuntimeState();}});}async function confirmWriteBeforeQueue(_0x603272,_0x50b66e,_0x334aea,_0x9fd8b4){const _0x4258b4=a318_0x144a;if(_0x50b66e['dryRun']===!![]||_0x603272['risk']!=='write'&&_0x603272[_0x4258b4(0x1f0)]!==_0x4258b4(0x201))return;await _0x9fd8b4['confirmation'][_0x4258b4(0x202)](buildRabetbaseConfirmationRequest(_0x603272,_0x334aea,_0x9fd8b4[_0x4258b4(0x1df)]));}function withAbortSignal(_0x22e1f2,_0x113c45){return{..._0x22e1f2,async 'execute'(_0x3f1290){const _0x38713e=a318_0x144a;return throwIfAborted(_0x113c45),_0x22e1f2[_0x38713e(0x1f7)]({..._0x3f1290,'signal':_0x113c45});}};}function throwIfAborted(_0x3a41cb){const _0x5916cb=a318_0x144a;if(_0x3a41cb?.[_0x5916cb(0x1e3)])throw _0x3a41cb['reason']instanceof Error?_0x3a41cb[_0x5916cb(0x1e7)]:new DOMException(_0x5916cb(0x1dd),_0x5916cb(0x1f4));}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x48e5cb,_0x338a6f){const _0x5ba924=a319_0x24ca,_0x1521f8=_0x48e5cb();while(!![]){try{const _0x42eb1e=parseInt(_0x5ba924(0xa4))/0x1+-parseInt(_0x5ba924(0x9f))/0x2+-parseInt(_0x5ba924(0xa1))/0x3*(-parseInt(_0x5ba924(0xa3))/0x4)+parseInt(_0x5ba924(0xa0))/0x5*(-parseInt(_0x5ba924(0xa8))/0x6)+-parseInt(_0x5ba924(0xa2))/0x7+parseInt(_0x5ba924(0xa9))/0x8*(-parseInt(_0x5ba924(0xa5))/0x9)+parseInt(_0x5ba924(0xa7))/0xa;if(_0x42eb1e===_0x338a6f)break;else _0x1521f8['push'](_0x1521f8['shift']());}catch(_0x1e036d){_0x1521f8['push'](_0x1521f8['shift']());}}}(a319_0x2299,0xa1c3e));function a319_0x2299(){const _0x1f6e91=['1118814iuezgz','504MRtufd','1614916SwJlyU','30dgdUcH','1553757rlJjnV','1222081QHXBzF','4eRDdAM','1146258AOtkZg','121950OUkdwG','catch','19529180NimaKK'];a319_0x2299=function(){return _0x1f6e91;};return a319_0x2299();}function a319_0x24ca(_0xc101ba,_0x3205f1){_0xc101ba=_0xc101ba-0x9f;const _0x22991a=a319_0x2299();let _0x24ca12=_0x22991a[_0xc101ba];return _0x24ca12;}let tail=Promise['resolve']();export async function runSerialized(_0x4b8112){const _0x3de72f=a319_0x24ca,_0x140f98=tail;let _0x377663;tail=new Promise(_0x137214=>{_0x377663=_0x137214;}),await _0x140f98[_0x3de72f(0xa6)](()=>undefined);try{return await _0x4b8112();}finally{_0x377663();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a320_0x1635(){const _0x5e595e=['13Pcysrq','slice','2070fmboxW','`rabetbase\x20run`\x20is\x20unavailable\x20through\x20the\x20embedded\x20runtime\x20because\x20it\x20executes\x20arbitrary\x20package\x20scripts.','run','flags','join','validation','input','920084PkWMFE','defaultCommand','715629lFWPQL','56925LkLanv','Rabetbase\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','4yALCwV','message','4PkNkdQ','10ECPqoq','16570740zRpshW','9961SEQZxV','125453cTOPCg','Use\x20an\x20explicit\x20shell\x20tool\x20only\x20when\x20script\x20execution\x20is\x20intentionally\x20requested.','Rabetbase\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','791040PiBnnX','32VXoxFX','unknownCommand','wildcardDef'];a320_0x1635=function(){return _0x5e595e;};return a320_0x1635();}(function(_0x34ba6f,_0x197170){const _0x240283=a320_0x4a3a,_0x4d233e=_0x34ba6f();while(!![]){try{const _0x5c8b78=parseInt(_0x240283(0x74))/0x1*(-parseInt(_0x240283(0x6e))/0x2)+-parseInt(_0x240283(0x86))/0x3*(parseInt(_0x240283(0x70))/0x4)+-parseInt(_0x240283(0x77))/0x5+-parseInt(_0x240283(0x7d))/0x6*(parseInt(_0x240283(0x73))/0x7)+-parseInt(_0x240283(0x78))/0x8*(parseInt(_0x240283(0x87))/0x9)+-parseInt(_0x240283(0x71))/0xa*(-parseInt(_0x240283(0x84))/0xb)+parseInt(_0x240283(0x72))/0xc*(parseInt(_0x240283(0x7b))/0xd);if(_0x5c8b78===_0x197170)break;else _0x4d233e['push'](_0x4d233e['shift']());}catch(_0x5bfe60){_0x4d233e['push'](_0x4d233e['shift']());}}}(a320_0x1635,0x49667));function a320_0x4a3a(_0xa1def5,_0x125378){_0xa1def5=_0xa1def5-0x6d;const _0x1635b5=a320_0x1635();let _0x4a3a4b=_0x1635b5[_0xa1def5];return _0x4a3a4b;}import a320_0x4f0dad from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';import{assertSupportedCommandFlags}from'../framework/supported-flags.js';export async function resolveRabetbaseInvocation(_0x559c7e){const _0x41caa9=a320_0x4a3a,_0x59afb0=a320_0x4f0dad('',{'importMeta':import.meta,'argv':[..._0x559c7e],'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x5b7f40=[..._0x59afb0[_0x41caa9(0x83)]],_0x4cd00d=_0x59afb0[_0x41caa9(0x80)],_0xabe6c1=_0x5b7f40[0x0];if(!_0xabe6c1)throw CliErrors[_0x41caa9(0x82)](_0x41caa9(0x6d));const _0x4863be=resolveRemovedCommand(_0xabe6c1,_0x5b7f40[0x1]);if(_0x4863be)throw CliErrors[_0x41caa9(0x82)](_0x4863be[_0x41caa9(0x6f)],_0x4863be['hint']);if(_0xabe6c1===_0x41caa9(0x7f))throw CliErrors[_0x41caa9(0x82)](_0x41caa9(0x7e),_0x41caa9(0x75));if(!isKnownService(_0xabe6c1))throw CliErrors[_0x41caa9(0x79)](_0x5b7f40[_0x41caa9(0x81)]('\x20'));const _0x4ab90f=getServiceEntry(_0xabe6c1),_0x209c04=_0x5b7f40[0x1],_0x2463d7=_0x209c04||_0x4ab90f[_0x41caa9(0x85)];if(!_0x2463d7){if(_0x4ab90f[_0x41caa9(0x7a)])return{'definition':_0x4ab90f[_0x41caa9(0x7a)],'rawFlags':_0x4cd00d,'args':[]};throw CliErrors[_0x41caa9(0x82)](_0x41caa9(0x76)+_0xabe6c1+'\x22.');}const _0x4da597=findDefinition(_0xabe6c1,_0x2463d7);if(_0x4da597)return assertSupportedCommandFlags(_0x4da597,_0x4cd00d),{'definition':_0x4da597,'rawFlags':_0x4cd00d,'args':_0x5b7f40[_0x41caa9(0x7c)](0x2)};if(_0x4ab90f[_0x41caa9(0x7a)])return{'definition':_0x4ab90f[_0x41caa9(0x7a)],'rawFlags':_0x4cd00d,'args':[_0x2463d7,..._0x5b7f40[_0x41caa9(0x7c)](0x2)]};throw CliErrors[_0x41caa9(0x79)](_0xabe6c1+'\x20'+_0x2463d7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a294_0x2a3801=a294_0x3c48;(function(_0x1d2d59,_0x5d1ba1){const _0xd50e98=a294_0x3c48,_0x35752b=_0x1d2d59();while(!![]){try{const _0x325faf=parseInt(_0xd50e98(0xce))/0x1+-parseInt(_0xd50e98(0xd4))/0x2*(-parseInt(_0xd50e98(0xcc))/0x3)+-parseInt(_0xd50e98(0xba))/0x4+-parseInt(_0xd50e98(0xc2))/0x5+parseInt(_0xd50e98(0xf1))/0x6+parseInt(_0xd50e98(0xed))/0x7*(-parseInt(_0xd50e98(0xde))/0x8)+parseInt(_0xd50e98(0xeb))/0x9;if(_0x325faf===_0x5d1ba1)break;else _0x35752b['push'](_0x35752b['shift']());}catch(_0x12e6a4){_0x35752b['push'](_0x35752b['shift']());}}}(a294_0x3176,0xf4019));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a294_0x2a3801(0xc6),SKILL_NAME=a294_0x2a3801(0xe5);function frontmatterValue(_0xd72907,_0x54b3e0){const _0x96f61c=a294_0x2a3801;return _0xd72907[_0x96f61c(0xc7)](new RegExp('^'+_0x54b3e0+_0x96f61c(0xd2),'m'))?.[0x1]?.[_0x96f61c(0xef)]()??'';}function listFiles(_0x564308,_0x12e774=_0x564308){return readdirSync(_0x12e774,{'withFileTypes':!![]})['flatMap'](_0x56323b=>{const _0x1ed45c=a294_0x3c48,_0x14fb5e=join(_0x12e774,_0x56323b[_0x1ed45c(0xe2)]),_0x22b401=lstatSync(_0x14fb5e);if(_0x22b401[_0x1ed45c(0xe9)]())throw new Error('Symbolic\x20link\x20is\x20not\x20allowed:\x20'+_0x14fb5e);if(_0x22b401[_0x1ed45c(0xec)]())return listFiles(_0x564308,_0x14fb5e);if(!_0x22b401['isFile']())throw new Error('Unsupported\x20Skill\x20entry:\x20'+_0x14fb5e);return[relative(_0x564308,_0x14fb5e)['split'](sep)[_0x1ed45c(0xc8)]('/')];})['sort']((_0xe9cce5,_0x57ff0e)=>_0xe9cce5<_0x57ff0e?-0x1:_0xe9cce5>_0x57ff0e?0x1:0x0);}function digestFiles(_0xc625af,_0x21d849){const _0x27a447=a294_0x2a3801,_0x1aa54d=createHash(_0x27a447(0xcf));for(const _0x47aa8e of _0x21d849){if(_0x47aa8e[_0x27a447(0xdc)]('/')||_0x47aa8e['split']('/')[_0x27a447(0xe4)]('..')||_0x47aa8e[_0x27a447(0xe4)]('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x47aa8e);_0x1aa54d[_0x27a447(0xdf)](_0x47aa8e),_0x1aa54d['update']('\x00'),_0x1aa54d['update'](readFileSync(join(_0xc625af,..._0x47aa8e[_0x27a447(0xd9)]('/')))),_0x1aa54d[_0x27a447(0xdf)]('\x00');}return _0x1aa54d[_0x27a447(0xbd)]('hex');}function sameFiles(_0x1d18ba,_0x53e111){const _0x4f077c=a294_0x2a3801;return _0x1d18ba[_0x4f077c(0xd6)]===_0x53e111['length']&&_0x1d18ba['every']((_0x37dcdb,_0xf3453b)=>_0x37dcdb===_0x53e111[_0xf3453b]);}function readSource(_0x10ebf2){const _0x49ac26=a294_0x2a3801,_0x4befff=JSON[_0x49ac26(0xd5)](readFileSync(join(_0x10ebf2,'package.json'),_0x49ac26(0xda))),_0x539925=JSON[_0x49ac26(0xd5)](readFileSync(join(_0x10ebf2,_0x49ac26(0xc9),_0x49ac26(0xbe)),_0x49ac26(0xda))),_0xb0d0ad=join(_0x10ebf2,_0x49ac26(0xc9),SKILL_NAME),_0x33af33=frontmatterValue(readFileSync(join(_0xb0d0ad,_0x49ac26(0xe0)),_0x49ac26(0xda)),_0x49ac26(0xe1)),_0x561db4=listFiles(_0xb0d0ad);if(_0x539925['schemaVersion']!==0x1||_0x539925[_0x49ac26(0xe2)]!==SKILL_NAME||!_0x4befff[_0x49ac26(0xe1)]||_0x539925[_0x49ac26(0xbf)]!==_0x4befff[_0x49ac26(0xe1)]||_0x539925[_0x49ac26(0xf2)]!==_0x4befff[_0x49ac26(0xe1)]||_0x33af33!==_0x4befff[_0x49ac26(0xe1)]||!sameFiles(_0x561db4,_0x539925[_0x49ac26(0xdb)])||digestFiles(_0xb0d0ad,_0x561db4)!==_0x539925[_0x49ac26(0xbd)])throw new Error(_0x49ac26(0xee));return{'packageVersion':_0x4befff[_0x49ac26(0xe1)],'skillVersion':_0x33af33,'root':_0xb0d0ad,'manifest':_0x539925};}function installedSkillPath(_0x195806){const _0x31df72=a294_0x2a3801,_0x1be6d7=resolveInstalledSkill(SKILL_NAME,{'home':_0x195806});if(_0x1be6d7[_0x31df72(0xd7)]===_0x31df72(0xc0))return{'state':_0x31df72(0xc0),'path':dirname(_0x1be6d7[_0x31df72(0xc5)])};if(_0x1be6d7['state']===_0x31df72(0xc1))return{'state':'missing'};return{'state':'unverifiable','reason':_0x1be6d7[_0x31df72(0xcd)]};}function a294_0x3c48(_0x1efaa4,_0x4f6c86){_0x1efaa4=_0x1efaa4-0xba;const _0x31763f=a294_0x3176();let _0x3c48f0=_0x31763f[_0x1efaa4];return _0x3c48f0;}export function inspectInstalledBuiltinSkillVersion(_0x23f56e,_0x4962db={}){const _0x36e0e9=a294_0x2a3801,_0x320088=installedSkillPath(_0x4962db[_0x36e0e9(0xd8)]??homedir());if(_0x320088[_0x36e0e9(0xd7)]==='missing')return{'state':_0x36e0e9(0xea),'expectedVersion':_0x23f56e,'repairCommand':REPAIR_COMMAND};if(_0x320088[_0x36e0e9(0xd7)]==='unverifiable')return{'state':_0x36e0e9(0xe7),'expectedVersion':_0x23f56e,'reason':_0x320088[_0x36e0e9(0xcd)],'repairCommand':REPAIR_COMMAND};try{const _0x4b7399=frontmatterValue(readFileSync(join(_0x320088['path'],'SKILL.md'),_0x36e0e9(0xda)),_0x36e0e9(0xe1));return{'state':_0x4b7399===_0x23f56e?_0x36e0e9(0xd3):_0x36e0e9(0xf5),'expectedVersion':_0x23f56e,'skillVersion':_0x4b7399,'installedPath':_0x320088[_0x36e0e9(0xc5)],'repairCommand':REPAIR_COMMAND};}catch(_0x3ef23a){return{'state':_0x36e0e9(0xe7),'expectedVersion':_0x23f56e,'installedPath':_0x320088[_0x36e0e9(0xc5)],'reason':_0x3ef23a instanceof Error?_0x3ef23a[_0x36e0e9(0xe6)]:String(_0x3ef23a),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x47a01c={}){const _0x18433=a294_0x2a3801,_0x4257db=_0x47a01c[_0x18433(0xf4)]??DEFAULT_PACKAGE_ROOT;let _0x5ebaa5;try{_0x5ebaa5=readSource(_0x4257db);}catch(_0x57d5fb){return{'state':_0x18433(0xe7),'packageVersion':'unknown','reason':_0x57d5fb instanceof Error?_0x57d5fb[_0x18433(0xe6)]:String(_0x57d5fb),'repairCommand':REPAIR_COMMAND};}const _0x318d76=installedSkillPath(_0x47a01c[_0x18433(0xd8)]??homedir());if(_0x318d76[_0x18433(0xd7)]===_0x18433(0xea))return{'state':_0x18433(0xea),'packageVersion':_0x5ebaa5[_0x18433(0xbf)],'repairCommand':REPAIR_COMMAND};if(_0x318d76['state']==='unverifiable')return{'state':_0x18433(0xe7),'packageVersion':_0x5ebaa5[_0x18433(0xbf)],'reason':_0x318d76['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x734654=frontmatterValue(readFileSync(join(_0x318d76[_0x18433(0xc5)],_0x18433(0xe0)),_0x18433(0xda)),_0x18433(0xe1));if(_0x734654!==_0x5ebaa5['skillVersion'])return{'state':_0x18433(0xf5),'packageVersion':_0x5ebaa5[_0x18433(0xbf)],'skillVersion':_0x734654,'installedPath':_0x318d76['path'],'repairCommand':REPAIR_COMMAND};const _0x2a6cef=listFiles(_0x318d76[_0x18433(0xc5)]),_0x58c0d3=digestFiles(_0x318d76['path'],_0x2a6cef);return{'state':sameFiles(_0x2a6cef,_0x5ebaa5[_0x18433(0xf0)]['files'])&&_0x58c0d3===_0x5ebaa5[_0x18433(0xf0)][_0x18433(0xbd)]?_0x18433(0xd3):_0x18433(0xca),'packageVersion':_0x5ebaa5[_0x18433(0xbf)],'skillVersion':_0x734654,'installedPath':_0x318d76[_0x18433(0xc5)],'digest':_0x58c0d3,'repairCommand':REPAIR_COMMAND};}catch(_0x26dee8){return{'state':'unverifiable','packageVersion':_0x5ebaa5['packageVersion'],'installedPath':_0x318d76[_0x18433(0xc5)],'reason':_0x26dee8 instanceof Error?_0x26dee8[_0x18433(0xe6)]:String(_0x26dee8),'repairCommand':REPAIR_COMMAND};}}function failure(_0x5263ae,_0x3ea4e1,_0x119f53,_0x4da10d){const _0x46306c=a294_0x2a3801;return{'ok':![],'code':_0x5263ae,'packageVersion':_0x3ea4e1['packageVersion'],'skillVersion':_0x3ea4e1[_0x46306c(0xf2)],'installedPath':_0x4da10d,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x119f53 instanceof Error?_0x119f53[_0x46306c(0xe6)]:String(_0x119f53)};}function a294_0x3176(){const _0xb507b2=['rabetbase','message','unverifiable','error','isSymbolicLink','missing','1042119AChyak','isDirectory','349944hGthxI','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','trim','manifest','10150776YSfVvB','skillVersion','SOURCE_INVALID','packageRoot','version_mismatch','6456076rqFLqF','stdio','installedPath','digest','rabetbase.manifest.json','packageVersion','present','absent','527035jEikNE','skipped','unknown','path','rabetbase\x20cli-skill\x20install','match','join','skills','content_mismatch','INSTALL_FAILED','651ONiCON','reason','497397cKmZZQ','sha256','VERIFY_FAILED','pipe',':\x5cs*(.+)$','current','10726HsOIZA','parse','length','state','home','split','utf8','files','startsWith','root','120ZhYNvU','update','SKILL.md','version','name','Installed\x20Skill\x20state\x20is\x20','includes'];a294_0x3176=function(){return _0xb507b2;};return a294_0x3176();}export function installBuiltinSkill(_0x481943={}){const _0x3c72be=a294_0x2a3801,_0xb7e061=_0x481943[_0x3c72be(0xf4)]??DEFAULT_PACKAGE_ROOT,_0x19f158=_0x481943[_0x3c72be(0xd8)]??homedir();let _0x181774;try{_0x181774=readSource(_0xb7e061);}catch(_0x629e84){return failure(_0x3c72be(0xf3),{'packageVersion':_0x3c72be(0xc4),'skillVersion':'unknown'},_0x629e84);}const _0x1d2107=inspectBuiltinSkill({'packageRoot':_0xb7e061,'home':_0x19f158}),_0x518978=runNpxSkillsAddGlobal(_0xb7e061,_0x181774[_0x3c72be(0xdd)],{'stdio':_0x481943[_0x3c72be(0xbb)]??_0x3c72be(0xd1),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x19f158}});if(_0x518978[_0x3c72be(0xc3)])return{'ok':!![],'packageVersion':_0x181774['packageVersion'],'skillVersion':_0x181774[_0x3c72be(0xf2)],'installedPath':_0x1d2107['installedPath'],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x518978['ok'])return failure(_0x3c72be(0xcb),_0x181774,_0x518978[_0x3c72be(0xe8)]??'skills@latest\x20exited\x20'+_0x518978['status']);const _0x40fd51=inspectBuiltinSkill({'packageRoot':_0xb7e061,'home':_0x19f158});if(_0x40fd51['state']!==_0x3c72be(0xd3))return failure(_0x3c72be(0xd0),_0x181774,_0x40fd51[_0x3c72be(0xcd)]??_0x3c72be(0xe3)+_0x40fd51[_0x3c72be(0xd7)],_0x40fd51['installedPath']);return{'ok':!![],'packageVersion':_0x181774[_0x3c72be(0xbf)],'skillVersion':_0x181774[_0x3c72be(0xf2)],'installedPath':_0x40fd51[_0x3c72be(0xbc)],'changed':_0x1d2107['state']!=='current','repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
const a322_0x392074=a322_0x2c8e;(function(_0x3641b8,_0x4e3982){const _0x492052=a322_0x2c8e,_0xcadde6=_0x3641b8();while(!![]){try{const _0x157557=-parseInt(_0x492052(0x115))/0x1*(-parseInt(_0x492052(0x129))/0x2)+parseInt(_0x492052(0x13b))/0x3+parseInt(_0x492052(0x116))/0x4+parseInt(_0x492052(0x10d))/0x5+parseInt(_0x492052(0x132))/0x6*(parseInt(_0x492052(0x119))/0x7)+-parseInt(_0x492052(0xfe))/0x8*(parseInt(_0x492052(0x11d))/0x9)+parseInt(_0x492052(0x13c))/0xa*(-parseInt(_0x492052(0x10b))/0xb);if(_0x157557===_0x4e3982)break;else _0xcadde6['push'](_0xcadde6['shift']());}catch(_0xcd4012){_0xcadde6['push'](_0xcadde6['shift']());}}}(a322_0x56a9,0xa016e));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';function a322_0x2c8e(_0xedfec0,_0x2b750c){_0xedfec0=_0xedfec0-0xfe;const _0x56a990=a322_0x56a9();let _0x2c8e4d=_0x56a990[_0xedfec0];return _0x2c8e4d;}import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a322_0x392074(0x133),SKILL_NAME=a322_0x392074(0x11b);function frontmatterValue(_0x3ec1c0,_0xa8b2f5){const _0x1759b5=a322_0x392074;return _0x3ec1c0[_0x1759b5(0x112)](new RegExp('^'+_0xa8b2f5+_0x1759b5(0x130),'m'))?.[0x1]?.[_0x1759b5(0x117)]()??'';}function listFiles(_0x554b87,_0x2ca5cf=_0x554b87){const _0x476099=a322_0x392074;return readdirSync(_0x2ca5cf,{'withFileTypes':!![]})[_0x476099(0x125)](_0x128d4c=>{const _0x222c8f=_0x476099,_0x5caf14=join(_0x2ca5cf,_0x128d4c[_0x222c8f(0x109)]),_0x489aee=lstatSync(_0x5caf14);if(_0x489aee[_0x222c8f(0x12e)]())throw new Error(_0x222c8f(0x123)+_0x5caf14);if(_0x489aee[_0x222c8f(0x11e)]())return listFiles(_0x554b87,_0x5caf14);if(!_0x489aee['isFile']())throw new Error(_0x222c8f(0x118)+_0x5caf14);return[relative(_0x554b87,_0x5caf14)[_0x222c8f(0x140)](sep)[_0x222c8f(0x10a)]('/')];})[_0x476099(0x11f)]((_0x3c7649,_0x43bb19)=>_0x3c7649<_0x43bb19?-0x1:_0x3c7649>_0x43bb19?0x1:0x0);}function digestFiles(_0x2d4b06,_0xead006){const _0x47a68d=a322_0x392074,_0x187f13=createHash(_0x47a68d(0x10c));for(const _0x3ad696 of _0xead006){if(_0x3ad696[_0x47a68d(0x11a)]('/')||_0x3ad696[_0x47a68d(0x140)]('/')[_0x47a68d(0x12c)]('..')||_0x3ad696[_0x47a68d(0x12c)]('\x5c'))throw new Error(_0x47a68d(0x127)+_0x3ad696);_0x187f13[_0x47a68d(0x11c)](_0x3ad696),_0x187f13[_0x47a68d(0x11c)]('\x00'),_0x187f13[_0x47a68d(0x11c)](readFileSync(join(_0x2d4b06,..._0x3ad696[_0x47a68d(0x140)]('/')))),_0x187f13['update']('\x00');}return _0x187f13[_0x47a68d(0x13e)](_0x47a68d(0x135));}function sameFiles(_0x2d4b35,_0x430dd5){const _0x334755=a322_0x392074;return _0x2d4b35[_0x334755(0x10f)]===_0x430dd5[_0x334755(0x10f)]&&_0x2d4b35[_0x334755(0x122)]((_0x3ede3a,_0x2cd296)=>_0x3ede3a===_0x430dd5[_0x2cd296]);}function readSource(_0x5c69b0){const _0x12c4c9=a322_0x392074,_0x356c40=JSON[_0x12c4c9(0x120)](readFileSync(join(_0x5c69b0,_0x12c4c9(0x104)),_0x12c4c9(0x12f))),_0x3c11eb=JSON[_0x12c4c9(0x120)](readFileSync(join(_0x5c69b0,_0x12c4c9(0x143),_0x12c4c9(0xff)),'utf8')),_0x4158e0=join(_0x5c69b0,_0x12c4c9(0x143),SKILL_NAME),_0x3772ca=frontmatterValue(readFileSync(join(_0x4158e0,_0x12c4c9(0x131)),'utf8'),_0x12c4c9(0x12d)),_0x3d8964=listFiles(_0x4158e0);if(_0x3c11eb[_0x12c4c9(0x126)]!==0x1||_0x3c11eb[_0x12c4c9(0x109)]!==SKILL_NAME||!_0x356c40[_0x12c4c9(0x12d)]||_0x3c11eb[_0x12c4c9(0x12b)]!==_0x356c40[_0x12c4c9(0x12d)]||_0x3c11eb[_0x12c4c9(0x13d)]!==_0x356c40[_0x12c4c9(0x12d)]||_0x3772ca!==_0x356c40[_0x12c4c9(0x12d)]||!sameFiles(_0x3d8964,_0x3c11eb[_0x12c4c9(0x106)])||digestFiles(_0x4158e0,_0x3d8964)!==_0x3c11eb['digest'])throw new Error(_0x12c4c9(0x108));return{'packageVersion':_0x356c40[_0x12c4c9(0x12d)],'skillVersion':_0x3772ca,'root':_0x4158e0,'manifest':_0x3c11eb};}function installedSkillPath(_0x51c222){const _0x1feaeb=a322_0x392074,_0x54bfbe=resolveInstalledSkill(SKILL_NAME,{'home':_0x51c222});if(_0x54bfbe[_0x1feaeb(0x141)]===_0x1feaeb(0x142))return{'state':'present','path':dirname(_0x54bfbe[_0x1feaeb(0x100)])};if(_0x54bfbe[_0x1feaeb(0x141)]===_0x1feaeb(0x10e))return{'state':_0x1feaeb(0x128)};return{'state':'unverifiable','reason':_0x54bfbe[_0x1feaeb(0x13a)]};}export function inspectInstalledBuiltinSkillVersion(_0x23aa7a,_0x5dfa6e={}){const _0x3560cb=a322_0x392074,_0x2ec19b=installedSkillPath(_0x5dfa6e[_0x3560cb(0x137)]??homedir());if(_0x2ec19b[_0x3560cb(0x141)]==='missing')return{'state':_0x3560cb(0x128),'expectedVersion':_0x23aa7a,'repairCommand':REPAIR_COMMAND};if(_0x2ec19b[_0x3560cb(0x141)]===_0x3560cb(0x134))return{'state':'unverifiable','expectedVersion':_0x23aa7a,'reason':_0x2ec19b[_0x3560cb(0x13a)],'repairCommand':REPAIR_COMMAND};try{const _0x2653a7=frontmatterValue(readFileSync(join(_0x2ec19b[_0x3560cb(0x100)],_0x3560cb(0x131)),_0x3560cb(0x12f)),_0x3560cb(0x12d));return{'state':_0x2653a7===_0x23aa7a?_0x3560cb(0x111):_0x3560cb(0x101),'expectedVersion':_0x23aa7a,'skillVersion':_0x2653a7,'installedPath':_0x2ec19b[_0x3560cb(0x100)],'repairCommand':REPAIR_COMMAND};}catch(_0x52f7c2){return{'state':_0x3560cb(0x134),'expectedVersion':_0x23aa7a,'installedPath':_0x2ec19b[_0x3560cb(0x100)],'reason':_0x52f7c2 instanceof Error?_0x52f7c2[_0x3560cb(0x103)]:String(_0x52f7c2),'repairCommand':REPAIR_COMMAND};}}function a322_0x56a9(){const _0x3349ed=['skillVersion','digest','error','split','state','present','skills','manifest','184npZdeU','rabetbase.manifest.json','path','version_mismatch','INSTALL_FAILED','message','package.json','content_mismatch','files','stdio','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','name','join','23309PEsFvJ','sha256','4320915MIKIMF','absent','length','unknown','current','match','pipe','SOURCE_INVALID','54623FGotTM','5087080fOodLa','trim','Unsupported\x20Skill\x20entry:\x20','2906015JisOXY','startsWith','rabetbase','update','349776FLFXst','isDirectory','sort','parse','Installed\x20Skill\x20state\x20is\x20','every','Symbolic\x20link\x20is\x20not\x20allowed:\x20','packageRoot','flatMap','schemaVersion','Unsafe\x20manifest\x20path:\x20','missing','10IiDyDa','skipped','packageVersion','includes','version','isSymbolicLink','utf8',':\x5cs*(.+)$','SKILL.md','18phmrma','rabetbase\x20cli-skill\x20install','unverifiable','hex','skills@latest\x20exited\x20','home','installedPath','status','reason','143997jRnqCn','10160AefHdz'];a322_0x56a9=function(){return _0x3349ed;};return a322_0x56a9();}export function inspectBuiltinSkill(_0x3dbb70={}){const _0x4a5b1a=a322_0x392074,_0x295591=_0x3dbb70[_0x4a5b1a(0x124)]??DEFAULT_PACKAGE_ROOT;let _0x34391e;try{_0x34391e=readSource(_0x295591);}catch(_0x3033ba){return{'state':_0x4a5b1a(0x134),'packageVersion':'unknown','reason':_0x3033ba instanceof Error?_0x3033ba[_0x4a5b1a(0x103)]:String(_0x3033ba),'repairCommand':REPAIR_COMMAND};}const _0x544a1a=installedSkillPath(_0x3dbb70[_0x4a5b1a(0x137)]??homedir());if(_0x544a1a[_0x4a5b1a(0x141)]===_0x4a5b1a(0x128))return{'state':_0x4a5b1a(0x128),'packageVersion':_0x34391e[_0x4a5b1a(0x12b)],'repairCommand':REPAIR_COMMAND};if(_0x544a1a[_0x4a5b1a(0x141)]==='unverifiable')return{'state':_0x4a5b1a(0x134),'packageVersion':_0x34391e[_0x4a5b1a(0x12b)],'reason':_0x544a1a[_0x4a5b1a(0x13a)],'repairCommand':REPAIR_COMMAND};try{const _0x580d32=frontmatterValue(readFileSync(join(_0x544a1a[_0x4a5b1a(0x100)],_0x4a5b1a(0x131)),'utf8'),_0x4a5b1a(0x12d));if(_0x580d32!==_0x34391e['skillVersion'])return{'state':_0x4a5b1a(0x101),'packageVersion':_0x34391e[_0x4a5b1a(0x12b)],'skillVersion':_0x580d32,'installedPath':_0x544a1a[_0x4a5b1a(0x100)],'repairCommand':REPAIR_COMMAND};const _0x56ab76=listFiles(_0x544a1a[_0x4a5b1a(0x100)]),_0x53fc9c=digestFiles(_0x544a1a[_0x4a5b1a(0x100)],_0x56ab76);return{'state':sameFiles(_0x56ab76,_0x34391e['manifest'][_0x4a5b1a(0x106)])&&_0x53fc9c===_0x34391e[_0x4a5b1a(0x144)][_0x4a5b1a(0x13e)]?'current':_0x4a5b1a(0x105),'packageVersion':_0x34391e['packageVersion'],'skillVersion':_0x580d32,'installedPath':_0x544a1a[_0x4a5b1a(0x100)],'digest':_0x53fc9c,'repairCommand':REPAIR_COMMAND};}catch(_0x21f7b0){return{'state':_0x4a5b1a(0x134),'packageVersion':_0x34391e[_0x4a5b1a(0x12b)],'installedPath':_0x544a1a[_0x4a5b1a(0x100)],'reason':_0x21f7b0 instanceof Error?_0x21f7b0[_0x4a5b1a(0x103)]:String(_0x21f7b0),'repairCommand':REPAIR_COMMAND};}}function failure(_0x3112eb,_0x191758,_0x329a51,_0x3a26de){const _0x5b910e=a322_0x392074;return{'ok':![],'code':_0x3112eb,'packageVersion':_0x191758[_0x5b910e(0x12b)],'skillVersion':_0x191758[_0x5b910e(0x13d)],'installedPath':_0x3a26de,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x329a51 instanceof Error?_0x329a51['message']:String(_0x329a51)};}export function installBuiltinSkill(_0x2ec0a8={}){const _0x2be9f6=a322_0x392074,_0x504157=_0x2ec0a8['packageRoot']??DEFAULT_PACKAGE_ROOT,_0x24d7dc=_0x2ec0a8[_0x2be9f6(0x137)]??homedir();let _0x569550;try{_0x569550=readSource(_0x504157);}catch(_0x3fa970){return failure(_0x2be9f6(0x114),{'packageVersion':_0x2be9f6(0x110),'skillVersion':_0x2be9f6(0x110)},_0x3fa970);}const _0x46c93d=inspectBuiltinSkill({'packageRoot':_0x504157,'home':_0x24d7dc}),_0x274edc=runNpxSkillsAddGlobal(_0x504157,_0x569550['root'],{'stdio':_0x2ec0a8[_0x2be9f6(0x107)]??_0x2be9f6(0x113),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x24d7dc}});if(_0x274edc[_0x2be9f6(0x12a)])return{'ok':!![],'packageVersion':_0x569550[_0x2be9f6(0x12b)],'skillVersion':_0x569550[_0x2be9f6(0x13d)],'installedPath':_0x46c93d[_0x2be9f6(0x138)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x274edc['ok'])return failure(_0x2be9f6(0x102),_0x569550,_0x274edc[_0x2be9f6(0x13f)]??_0x2be9f6(0x136)+_0x274edc[_0x2be9f6(0x139)]);const _0x5dc7d6=inspectBuiltinSkill({'packageRoot':_0x504157,'home':_0x24d7dc});if(_0x5dc7d6[_0x2be9f6(0x141)]!==_0x2be9f6(0x111))return failure('VERIFY_FAILED',_0x569550,_0x5dc7d6['reason']??_0x2be9f6(0x121)+_0x5dc7d6[_0x2be9f6(0x141)],_0x5dc7d6['installedPath']);return{'ok':!![],'packageVersion':_0x569550['packageVersion'],'skillVersion':_0x569550['skillVersion'],'installedPath':_0x5dc7d6[_0x2be9f6(0x138)],'changed':_0x46c93d[_0x2be9f6(0x141)]!=='current','repairCommand':REPAIR_COMMAND};}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x107078,_0x154bf3){const _0x51b43c=a323_0x4ead,_0x1760dd=_0x107078();while(!![]){try{const _0x530be0=-parseInt(_0x51b43c(0x1ab))/0x1*(-parseInt(_0x51b43c(0x1b1))/0x2)+-parseInt(_0x51b43c(0x1a5))/0x3+-parseInt(_0x51b43c(0x1c2))/0x4+parseInt(_0x51b43c(0x1a4))/0x5*(parseInt(_0x51b43c(0x1a8))/0x6)+-parseInt(_0x51b43c(0x1c3))/0x7+parseInt(_0x51b43c(0x1aa))/0x8*(-parseInt(_0x51b43c(0x1c0))/0x9)+parseInt(_0x51b43c(0x1b5))/0xa;if(_0x530be0===_0x154bf3)break;else _0x1760dd['push'](_0x1760dd['shift']());}catch(_0x260e52){_0x1760dd['push'](_0x1760dd['shift']());}}}(a323_0x4ea6,0x5bce2));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(_0x939f65){const _0x27fea9=a323_0x4ead,_0x309842=[];for(const [_0x117362,_0x506957]of Object['entries'](_0x939f65)){if(_0x506957===!![]){const _0x3dcd32=_0x117362[_0x27fea9(0x1ae)](/([A-Z])/g,_0x27fea9(0x1b9))[_0x27fea9(0x1a7)]();_0x309842['push'](_0x3dcd32);}}return _0x309842;}export function parseDynamicFlags(){const _0x4be301=a323_0x4ead,_0x307515=[];for(let _0x5716bf=0x3;_0x5716bf<process['argv'][_0x4be301(0x1b3)];_0x5716bf++){const _0x17ad86=process['argv'][_0x5716bf];if(_0x17ad86&&_0x17ad86[_0x4be301(0x1b0)]('--')){const _0x3559f0=_0x17ad86[_0x4be301(0x1ac)](0x2);_0x3559f0&&!_0x3559f0[_0x4be301(0x1b6)]('=')&&_0x307515[_0x4be301(0x1bb)](_0x3559f0);}}return _0x307515;}export function getAllProvidedFlags(_0x4d6cfd){const _0x19bece=camelCaseFlagsToKebab(_0x4d6cfd),_0x3fb5ee=parseDynamicFlags(),_0x7b0af8=new Set([..._0x19bece,..._0x3fb5ee]);return Array['from'](_0x7b0af8);}export function normalizeLegacyBffSaveFlags(_0x235b83){const _0x22b916=a323_0x4ead,_0x3b0da2=new Set(_0x235b83);return _0x3b0da2[_0x22b916(0x1c1)](_0x22b916(0x1b4))&&_0x3b0da2['add'](_0x22b916(0x1b2)),Array[_0x22b916(0x1bd)](_0x3b0da2);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;function a323_0x4ead(_0x48bf78,_0x100960){_0x48bf78=_0x48bf78-0x1a2;const _0x4ea67b=a323_0x4ea6();let _0x4ead7b=_0x4ea67b[_0x48bf78];return _0x4ead7b;}export async function skillsCommand(_0x418fa9,_0x52adc1,_0x4fe407){const _0x5295de=a323_0x4ead;logger[_0x5295de(0x1b7)](process[_0x5295de(0x1a6)]());if(_0x4fe407?.['help']||_0x418fa9===_0x5295de(0x1be)){showHelp();return;}console['error'](_0x5295de(0x1bc)+(_0x418fa9||_0x5295de(0x1a3))),console[_0x5295de(0x1a2)](_0x5295de(0x1af)),console[_0x5295de(0x1a2)]('\x20\x20'+CLI_BIN_NAME+_0x5295de(0x1a9)),console['log'](''),console[_0x5295de(0x1a2)](_0x5295de(0x1ad)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x5295de(0x1ba)]('skill','Unsupported\x20command:\x20'+_0x418fa9),process[_0x5295de(0x1bf)](0x1);}function showHelp(){const _0x35a2d0=a323_0x4ead;console[_0x35a2d0(0x1a2)](_0x35a2d0(0x1b8)+CLI_BIN_NAME+'\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20'+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a');}function a323_0x4ea6(){const _0x2e3a43=['push','Error:\x20Unsupported\x20command:\x20','from','--help','exit','1017WVBIED','has','1144716GxqOav','3696595iFbykH','log','(empty)','2245IUKdgc','527928RROZsr','cwd','toLowerCase','9378SNyouX','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','44768wjCuYz','346626BEmLyc','slice','Public\x20Open\x20Skill\x20source:\x20','replace','\x0aAvailable\x20commands:','startsWith','4MoNShL','enable-bff-save','length','dangerously-bff-save','6035830DcYZvO','includes','setLogPath','\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','-$1','error'];a323_0x4ea6=function(){return _0x2e3a43;};return a323_0x4ea6();}
|
|
@@ -18,10 +18,6 @@ export declare const NPX_SKILLS_SUBCOMMAND_ADD: "add";
|
|
|
18
18
|
export declare const NPX_SKILLS_FLAG_SKILL: "--skill";
|
|
19
19
|
/** 当前官方 rabetbase skill 源标识(GitHub 式 repo/slug) */
|
|
20
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
21
|
/** 全局安装后的 Skill 名(即全局 Skill 目录名),与安装源写法解耦 */
|
|
26
22
|
export declare const RABETBASE_GLOBAL_SKILL_NAME = "rabetbase";
|
|
27
23
|
/** CodeUp Git 真源,与官方 shorthand 安装同一个全局 Skill */
|
|
@@ -87,12 +83,6 @@ export declare function shouldSkipNpxSkillsAdd(): boolean;
|
|
|
87
83
|
* @param options.skill - 可选 `--skill` 名称;仅显式筛选多 skill 包时使用
|
|
88
84
|
*/
|
|
89
85
|
export declare function runNpxSkillsAdd(projectRoot: string, options?: RunNpxSkillsAddOptions): RunNpxSkillsAddResult;
|
|
90
|
-
/**
|
|
91
|
-
* 执行 `npx -y skills remove lovrabet/lovrabet-skill --skill Lovrabet`
|
|
92
|
-
*
|
|
93
|
-
* 与 {@link runNpxSkillsAdd} 相同:若设置 `RABETBASE_SKIP_NPX_SKILLS=1` 则跳过(供升级流程自动化测试)。
|
|
94
|
-
*/
|
|
95
|
-
export declare function runNpxSkillsRemove(projectRoot: string, options?: RunNpxSkillsAddOptions, source?: string): RunNpxSkillsAddResult;
|
|
96
86
|
/**
|
|
97
87
|
* 执行与 `npx skills add <source> -g -y` 等价的全局安装调用。
|
|
98
88
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a324_0x4f2a04=a324_0x8ec5;(function(_0x489122,_0x245e66){const _0x458244=a324_0x8ec5,_0x502837=_0x489122();while(!![]){try{const _0xe1d413=-parseInt(_0x458244(0xeb))/0x1+parseInt(_0x458244(0xda))/0x2*(parseInt(_0x458244(0x105))/0x3)+-parseInt(_0x458244(0xfe))/0x4+parseInt(_0x458244(0xdc))/0x5*(parseInt(_0x458244(0x107))/0x6)+-parseInt(_0x458244(0x109))/0x7*(parseInt(_0x458244(0xe9))/0x8)+-parseInt(_0x458244(0xe8))/0x9*(parseInt(_0x458244(0xde))/0xa)+parseInt(_0x458244(0xe0))/0xb*(parseInt(_0x458244(0x101))/0xc);if(_0xe1d413===_0x245e66)break;else _0x502837['push'](_0x502837['shift']());}catch(_0x25c893){_0x502837['push'](_0x502837['shift']());}}}(a324_0xb186,0x8ba6b));import{execaSync}from'execa';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';function a324_0x8ec5(_0x260235,_0x4c5f60){_0x260235=_0x260235-0xd1;const _0xb186ea=a324_0xb186();let _0x8ec59d=_0xb186ea[_0x260235];return _0x8ec59d;}function a324_0xb186(){const _0x44698=['code','76730UtsfRC','exitCode','215310zgGSrY','npx\x20terminated\x20by\x20signal\x20','90LXNRMY','warn','11eLOwmZ','filter','NPX_NOT_FOUND','expectedSkillName','add','ENOENT','match','signal','235755BBUJtx','1928FixwKB','state','1085681uCufZx','SPAWN_FAILED','failed','stderr','skill','NPM_CONFIG_GLOBAL','CHILD_TERMINATED','checked','skills@latest','shortMessage','\x22\x20install\x20state:\x20','CHILD_EXIT_NONZERO','PERMISSION_DENIED','stdout','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','inherit','unknown','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','join','1077328TAfHeF','rabetbase','push','15730668wsKGCw','stdio','trim','exit\x20','39iAxXhi','SKILL_NOT_INSTALLED','144neMJRF','EACCES','19761mEpVxU','Installer\x20reported\x20','lovrabet/rabetbase','pipe','npx','log','message','Skill\x20\x22','INSTALL_PARTIAL'];a324_0xb186=function(){return _0x44698;};return a324_0xb186();}export const NPX_SKILLS_CLI=a324_0x4f2a04(0xf3);export const NPX_SKILLS_SUBCOMMAND_ADD=a324_0x4f2a04(0xe4);export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE=a324_0x4f2a04(0xd2);export const RABETBASE_GLOBAL_SKILL_NAME=a324_0x4f2a04(0xff);export const RABETBASE_SKILL_GIT_SOURCE=a324_0x4f2a04(0xf9);export function resolveGlobalSkillName(_0x242818){const _0x6da266=a324_0x4f2a04;switch(_0x242818[_0x6da266(0x103)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x30e9c0){const _0x5c61ac=a324_0x4f2a04,_0xc7e924=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x30e9c0&&_0xc7e924[_0x5c61ac(0x100)](NPX_SKILLS_FLAG_SKILL,_0x30e9c0),_0xc7e924;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a324_0x4f2a04(0xd4),...buildNpxSkillsAddArgv()][a324_0x4f2a04(0xfd)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a324_0x4f2a04(0xd4),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a324_0x4f2a04(0xfd)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x17eb28,_0x4a10c7,_0x42168d){return{'ok':![],'status':_0x4a10c7,'code':_0x17eb28,'error':'['+_0x17eb28+']\x20'+_0x42168d};}function execaOptions(_0x5a1fa1,_0x56339e){const _0x50ad8f=a324_0x4f2a04,_0x5b0d5f={...process.env};return delete _0x5b0d5f['npm_config_global'],delete _0x5b0d5f[_0x50ad8f(0xf0)],{'cwd':_0x5a1fa1,'stdio':_0x56339e,'env':_0x5b0d5f,'extendEnv':![],'shell':![],'reject':![],..._0x56339e==='pipe'?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0x55f239,_0x45c4bc,_0x29410c,_0x42863c){const _0x3415a2=a324_0x4f2a04,_0x1b10b9=[_0x55f239[_0x3415a2(0xf8)]?String(_0x55f239[_0x3415a2(0xf8)]):'',_0x55f239[_0x3415a2(0xee)]?String(_0x55f239[_0x3415a2(0xee)]):''][_0x3415a2(0xe1)](Boolean)[_0x3415a2(0xfd)]('\x0a')['trim'](),_0x210145=_0x55f239[_0x3415a2(0xdb)]??null;_0x42863c!==_0x3415a2(0xd3)&&_0x1b10b9&&console[_0x3415a2(0xd5)](_0x1b10b9);if(_0x55f239[_0x3415a2(0xd9)]){const _0x1999ce=_0x55f239[_0x3415a2(0xd9)]===_0x3415a2(0xe5)?_0x3415a2(0xe2):_0x55f239['code']==='EPERM'||_0x55f239[_0x3415a2(0xd9)]===_0x3415a2(0x108)?_0x3415a2(0xf7):_0x3415a2(0xec);return failure(_0x1999ce,_0x210145,_0x55f239[_0x3415a2(0xf4)]??_0x55f239['message']??_0x55f239[_0x3415a2(0xd9)]);}if(_0x55f239[_0x3415a2(0xe7)])return failure(_0x3415a2(0xf1),_0x210145,_0x3415a2(0xdd)+_0x55f239[_0x3415a2(0xe7)]);if(_0x55f239[_0x3415a2(0xed)]&&_0x210145===null)return failure(_0x3415a2(0xec),_0x210145,_0x55f239['shortMessage']??_0x55f239[_0x3415a2(0xd6)]??'npx\x20failed\x20to\x20start');if(_0x210145!==0x0)return failure(_0x3415a2(0xf6),_0x210145,_0x1b10b9||_0x55f239[_0x3415a2(0xf4)]||_0x3415a2(0x104)+(_0x210145??_0x3415a2(0xfb)));const _0x8ecddb=_0x45c4bc?resolveInstalledSkill(_0x45c4bc,_0x29410c):undefined,_0x1fc88c=_0x1b10b9[_0x3415a2(0xe6)](/Failed to install\s+(\d+)/i);if(_0x1fc88c&&Number(_0x1fc88c[0x1])>0x0){const _0x155f51=_0x3415a2(0xd1)+_0x1fc88c[0x1]+'\x20failed\x20target(s)'+(_0x1b10b9?':\x0a'+_0x1b10b9:'');if(_0x8ecddb?.[_0x3415a2(0xea)]==='present')return console[_0x3415a2(0xdf)]('!\x20'+_0x155f51),{'ok':!![],'status':0x0};return failure(_0x3415a2(0xd8),0x0,_0x155f51);}if(_0x8ecddb){if(_0x8ecddb['state']==='absent')return failure(_0x3415a2(0x106),0x0,_0x3415a2(0xd7)+_0x45c4bc+_0x3415a2(0xfc)+_0x8ecddb[_0x3415a2(0xf2)][_0x3415a2(0xfd)](',\x20')+')');_0x8ecddb['state']==='unverifiable'&&console[_0x3415a2(0xdf)]('!\x20Could\x20not\x20verify\x20\x22'+_0x45c4bc+_0x3415a2(0xf5)+_0x8ecddb['reason']);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x4c614d,_0x1e0545){const _0x2b1355=a324_0x4f2a04;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1719ab=_0x1e0545?.[_0x2b1355(0x102)]??_0x2b1355(0xfa),_0x4c478e=buildNpxSkillsAddArgv(_0x1e0545?.[_0x2b1355(0xef)]),_0x984a20=[_0x2b1355(0xd4),..._0x4c478e][_0x2b1355(0xfd)]('\x20');console['log']('*\x20'+_0x984a20);const _0x4fe696=execaSync('npx',_0x4c478e,execaOptions(_0x4c614d,_0x1719ab));return normalizeExecaResult(_0x4fe696,undefined,undefined,_0x1719ab);}export function runNpxSkillsAddGlobal(_0x341ebd,_0x3dcedb,_0x391f21){const _0x5cc5bc=a324_0x4f2a04;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x387a48=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3dcedb,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x2b0019=[_0x5cc5bc(0xd4),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3dcedb,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x5cc5bc(0xfd)]('\x20');console[_0x5cc5bc(0xd5)]('*\x20'+_0x2b0019);const _0x30c0e9=execaSync(_0x5cc5bc(0xd4),_0x387a48,execaOptions(_0x341ebd,_0x5cc5bc(0xd3)));return normalizeExecaResult(_0x30c0e9,_0x391f21?.[_0x5cc5bc(0xe3)]??resolveGlobalSkillName(_0x3dcedb),_0x391f21?.['presence'],_0x391f21?.[_0x5cc5bc(0x102)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a325_0x744c(_0x4251c7,_0x3bcbd7){_0x4251c7=_0x4251c7-0xd0;const _0x2fd11f=a325_0x2fd1();let _0x744c63=_0x2fd11f[_0x4251c7];return _0x744c63;}const a325_0x28a664=a325_0x744c;(function(_0x4c8e16,_0x4b1d09){const _0x444138=a325_0x744c,_0x3b512c=_0x4c8e16();while(!![]){try{const _0x1cad46=-parseInt(_0x444138(0xdd))/0x1+-parseInt(_0x444138(0xde))/0x2*(parseInt(_0x444138(0xe9))/0x3)+parseInt(_0x444138(0xec))/0x4+-parseInt(_0x444138(0xf5))/0x5+parseInt(_0x444138(0xe6))/0x6*(-parseInt(_0x444138(0xd0))/0x7)+-parseInt(_0x444138(0xdf))/0x8*(parseInt(_0x444138(0xd2))/0x9)+-parseInt(_0x444138(0xda))/0xa*(-parseInt(_0x444138(0xe2))/0xb);if(_0x1cad46===_0x4b1d09)break;else _0x3b512c['push'](_0x3b512c['shift']());}catch(_0x779858){_0x3b512c['push'](_0x3b512c['shift']());}}}(a325_0x2fd1,0x8e51a));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a325_0x28a664(0xf2));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a325_0x28a664(0xd5),'skills'),join('.claude','skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function a325_0x2fd1(){const _0x51e431=['join','\x20is\x20unreadable:\x20','1678074VFgbXf','globalSkillsDirs','reason','9GVMzRR','\x20records\x20\x22','parse','2067628GcxwgY','present','lockFile','utf8','\x20uses\x20unsupported\x20version\x20','version','.skill-lock.json','unusable','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','2884265yGdNaN','SKILL.md','14nAXsfe','kind','9XEdrLv','home','not-recorded','.agents','skills','recorded','unverifiable','includes','30BqNbTs','number','\x20has\x20no\x20skills\x20map','62853eoxlca','227946RPQaRH','3647176vLcMkE','map','absent','7564007DGkxwr','find'];a325_0x2fd1=function(){return _0x51e431;};return a325_0x2fd1();}function readLockLookup(_0x35dba1,_0x47a54c){const _0x1f0141=a325_0x28a664;if(!existsSync(_0x35dba1))return{'kind':_0x1f0141(0xd4)};let _0x2973fe;try{_0x2973fe=JSON[_0x1f0141(0xeb)](readFileSync(_0x35dba1,_0x1f0141(0xef)));}catch(_0x1788bc){return{'kind':_0x1f0141(0xf3),'reason':_0x35dba1+_0x1f0141(0xe5)+_0x1788bc['message']};}const _0x42e1c3=_0x2973fe;if(typeof _0x42e1c3?.['version']!==_0x1f0141(0xdb)||!SUPPORTED_LOCK_VERSIONS[_0x1f0141(0xd9)](_0x42e1c3[_0x1f0141(0xf1)]))return{'kind':_0x1f0141(0xf3),'reason':_0x35dba1+_0x1f0141(0xf0)+String(_0x42e1c3?.[_0x1f0141(0xf1)])};if(!_0x42e1c3[_0x1f0141(0xd6)]||typeof _0x42e1c3[_0x1f0141(0xd6)]!=='object')return{'kind':_0x1f0141(0xf3),'reason':_0x35dba1+_0x1f0141(0xdc)};return _0x42e1c3[_0x1f0141(0xd6)][_0x47a54c]?{'kind':_0x1f0141(0xd7)}:{'kind':_0x1f0141(0xd4)};}export function resolveInstalledSkill(_0x563172,_0x5a9bfb){const _0x313b98=a325_0x28a664,_0x5d3e12=_0x5a9bfb?.[_0x313b98(0xd3)]??homedir(),_0x3f90c2=_0x5a9bfb?.[_0x313b98(0xe7)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x18186a=>join(_0x5d3e12,_0x18186a)),_0x31c907=_0x5a9bfb?.[_0x313b98(0xee)]??join(_0x5d3e12,SKILL_LOCK_RELATIVE_PATH),_0x1539e7=_0x3f90c2[_0x313b98(0xe0)](_0x4d3885=>join(_0x4d3885,_0x563172,_0x313b98(0xf6))),_0xca429b=_0x1539e7[_0x313b98(0xe3)](_0x33130a=>existsSync(_0x33130a));if(_0xca429b)return{'state':_0x313b98(0xed),'path':_0xca429b};const _0x55e0e9=readLockLookup(_0x31c907,_0x563172);if(_0x55e0e9[_0x313b98(0xd1)]==='unusable')return{'state':_0x313b98(0xd8),'reason':_0x55e0e9[_0x313b98(0xe8)]};if(_0x55e0e9[_0x313b98(0xd1)]===_0x313b98(0xd7))return{'state':_0x313b98(0xd8),'reason':_0x31c907+_0x313b98(0xea)+_0x563172+_0x313b98(0xf4)+('('+_0x1539e7[_0x313b98(0xe4)](',\x20')+')')};return{'state':_0x313b98(0xe1),'checked':_0x1539e7};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x372f18,_0x91496d){const _0x76e291=a326_0x39cb,_0x292f9f=_0x372f18();while(!![]){try{const _0x51c1fa=-parseInt(_0x76e291(0x1f3))/0x1+parseInt(_0x76e291(0x1f9))/0x2*(-parseInt(_0x76e291(0x1f5))/0x3)+parseInt(_0x76e291(0x1ff))/0x4+-parseInt(_0x76e291(0x1f7))/0x5+-parseInt(_0x76e291(0x1f6))/0x6*(parseInt(_0x76e291(0x202))/0x7)+parseInt(_0x76e291(0x204))/0x8*(parseInt(_0x76e291(0x1fe))/0x9)+-parseInt(_0x76e291(0x1fd))/0xa*(-parseInt(_0x76e291(0x1f2))/0xb);if(_0x51c1fa===_0x91496d)break;else _0x292f9f['push'](_0x292f9f['shift']());}catch(_0x106168){_0x292f9f['push'](_0x292f9f['shift']());}}}(a326_0x55c4,0x53670));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';function a326_0x39cb(_0x252d17,_0x4f2cd8){_0x252d17=_0x252d17-0x1f1;const _0x55c471=a326_0x55c4();let _0x39cb26=_0x55c471[_0x252d17];return _0x39cb26;}const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x2d1441){return SENSITIVE_PATTERNS['some'](_0x1caf99=>_0x1caf99['test'](_0x2d1441));}function sanitizeFlags(_0x57ffef){const _0x44553b=a326_0x39cb,_0x4b6256={};for(const [_0x4bd8d4,_0x3d477a]of Object[_0x44553b(0x203)](_0x57ffef)){isSensitiveKey(_0x4bd8d4)?_0x4b6256[_0x4bd8d4]=_0x3d477a!=null&&_0x3d477a!==''?_0x44553b(0x1f8):_0x3d477a:_0x4b6256[_0x4bd8d4]=_0x3d477a;}return _0x4b6256;}function a326_0x55c4(){const _0x12aae2=['33boRfRt','66xEiiAl','906670lBjBEF','[REDACTED]','118246fwprrd','message','error','command','37720ifHPgI','135axAgem','688820OAoGMZ','service','stringify','164759ojWxFd','entries','44536LaXElJ','durationMs','4664vXlvQo','422828XqgYPs','rabetbase.command'];a326_0x55c4=function(){return _0x12aae2;};return a326_0x55c4();}export async function reportCommandTrace(_0x21b4ab){const _0x347dca=a326_0x39cb;try{const _0x193a6a=sanitizeFlags(_0x21b4ab['flags']);await sendCliTraceLog({'spanName':_0x347dca(0x1f4),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x21b4ab[_0x347dca(0x200)],'command.name':_0x21b4ab[_0x347dca(0x1fc)],'command.flags':JSON[_0x347dca(0x201)](_0x193a6a),..._0x21b4ab[_0x347dca(0x1f1)]!=null?{'command.duration_ms':_0x21b4ab[_0x347dca(0x1f1)]}:{},..._0x21b4ab[_0x347dca(0x1fb)]?{'command.error':_0x21b4ab[_0x347dca(0x1fb)]instanceof Error?_0x21b4ab[_0x347dca(0x1fb)][_0x347dca(0x1fa)]:String(_0x21b4ab[_0x347dca(0x1fb)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a327_0x5338(_0x763de1,_0x1505f5){_0x763de1=_0x763de1-0xe0;var _0x536c97=a327_0x536c();var _0x533863=_0x536c97[_0x763de1];return _0x533863;}function a327_0x536c(){var _0xa24cc6=['error','23466ysNTdn','8rAHHzD','196ptDfWa','94458HjFbrX','7827239FkNDRt','service','14351454oYKGGH','22781436wHkLhz','88215MSEgCV','10xoYGNN','cli.help','Failed\x20to\x20report\x20CLI\x20help\x20trace:','19740523aDObjq','1970tGNGCf','16ksutNU'];a327_0x536c=function(){return _0xa24cc6;};return a327_0x536c();}(function(_0x22e823,_0x75c2a0){var _0x55f6c1=a327_0x5338,_0xce6bff=_0x22e823();while(!![]){try{var _0x3fb734=-parseInt(_0x55f6c1(0xe9))/0x1*(-parseInt(_0x55f6c1(0xee))/0x2)+parseInt(_0x55f6c1(0xe3))/0x3*(-parseInt(_0x55f6c1(0xed))/0x4)+-parseInt(_0x55f6c1(0xe8))/0x5*(parseInt(_0x55f6c1(0xeb))/0x6)+parseInt(_0x55f6c1(0xef))/0x7*(parseInt(_0x55f6c1(0xec))/0x8)+-parseInt(_0x55f6c1(0xe1))/0x9+-parseInt(_0x55f6c1(0xe4))/0xa*(-parseInt(_0x55f6c1(0xe7))/0xb)+parseInt(_0x55f6c1(0xe2))/0xc;if(_0x3fb734===_0x75c2a0)break;else _0xce6bff['push'](_0xce6bff['shift']());}catch(_0x1cfcff){_0xce6bff['push'](_0xce6bff['shift']());}}}(a327_0x536c,0xf1d26));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x557821,_0x946c01){var _0x421b55=a327_0x5338;try{await sendCliTraceLog({'spanName':_0x421b55(0xe5),'logData':{'rabetbase.help.kind':_0x557821,..._0x946c01?.[_0x421b55(0xe0)]&&{'rabetbase.help.service':_0x946c01[_0x421b55(0xe0)]}}});}catch(_0xb7f88b){console[_0x421b55(0xea)](_0x421b55(0xe6),_0xb7f88b);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a328_0xccae(_0x5b918f,_0x106b5a){_0x5b918f=_0x5b918f-0xb8;const _0x854acc=a328_0x854a();let _0xccae6=_0x854acc[_0x5b918f];return _0xccae6;}(function(_0x272b31,_0x3246c3){const _0x29db5c=a328_0xccae,_0x1d3943=_0x272b31();while(!![]){try{const _0x3bd634=-parseInt(_0x29db5c(0xbf))/0x1*(parseInt(_0x29db5c(0xc4))/0x2)+parseInt(_0x29db5c(0xc6))/0x3+-parseInt(_0x29db5c(0xc2))/0x4*(parseInt(_0x29db5c(0xc5))/0x5)+parseInt(_0x29db5c(0xc8))/0x6+-parseInt(_0x29db5c(0xbd))/0x7*(-parseInt(_0x29db5c(0xba))/0x8)+-parseInt(_0x29db5c(0xbc))/0x9*(-parseInt(_0x29db5c(0xcb))/0xa)+-parseInt(_0x29db5c(0xc9))/0xb;if(_0x3bd634===_0x3246c3)break;else _0x1d3943['push'](_0x1d3943['shift']());}catch(_0x1260dc){_0x1d3943['push'](_0x1d3943['shift']());}}}(a328_0x854a,0x8d55c));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x5421a5=a328_0xccae,_0x5dc3e7=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0xfd2691=_0x5dc3e7?.[_0x5421a5(0xbe)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x5421a5(0xc0)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x5421a5(0xc7):_0x5421a5(0xb8))}),setUserContext({'id':_0xfd2691?.['id'],'username':_0xfd2691?.[_0x5421a5(0xb9)],'nickname':_0xfd2691?.[_0x5421a5(0xbb)],'email':_0xfd2691?.[_0x5421a5(0xc3)],'tenantCode':_0xfd2691?.[_0x5421a5(0xca)]?.[_0x5421a5(0xc1)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x5dc3e7;}function a328_0x854a(){const _0x46aa3a=['production','username','544nHPfaC','nickname','9ZqsrPO','44359QAatSt','user','57183ehxXnK','unknown','tenant_code','632WYlXks','email','14elLhzy','19315QDrjfG','3465672Zocumw','daily','4989936AnWsrl','16951902BLrujz','tenant','7128290lKAxBG'];a328_0x854a=function(){return _0x46aa3a;};return a328_0x854a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a329_0x3bb5(_0x73d454,_0x1d7b7c){_0x73d454=_0x73d454-0xb7;const _0x419340=a329_0x4193();let _0x3bb573=_0x419340[_0x73d454];return _0x3bb573;}(function(_0x58a945,_0x5f46cc){const _0x47363f=a329_0x3bb5,_0x411ace=_0x58a945();while(!![]){try{const _0x70f86e=-parseInt(_0x47363f(0xbd))/0x1*(-parseInt(_0x47363f(0xc5))/0x2)+-parseInt(_0x47363f(0xc4))/0x3+-parseInt(_0x47363f(0xc1))/0x4*(-parseInt(_0x47363f(0xc3))/0x5)+-parseInt(_0x47363f(0xbc))/0x6*(parseInt(_0x47363f(0xba))/0x7)+parseInt(_0x47363f(0xb9))/0x8*(-parseInt(_0x47363f(0xbf))/0x9)+-parseInt(_0x47363f(0xb8))/0xa+parseInt(_0x47363f(0xc2))/0xb;if(_0x70f86e===_0x5f46cc)break;else _0x411ace['push'](_0x411ace['shift']());}catch(_0x1548cc){_0x411ace['push'](_0x411ace['shift']());}}}(a329_0x4193,0x296c1));import{shutdownTraces}from'@lovrabet/otel-logger';function a329_0x4193(){const _0x354d31=['SIGINT','8055jYYvhg','exit','53644unREvW','7938711JhfLsV','15xLtWMY','848403shpdtR','32FXAAmC','beforeExit','1529080uAwWxb','1168TdjSnx','7TqcoRh','once','1975308boceTM','18958SNdkVM'];a329_0x4193=function(){return _0x354d31;};return a329_0x4193();}let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x535260=a329_0x3bb5;process[_0x535260(0xbb)](_0x535260(0xb7),()=>{void flushOtelNodeIfUsed();});const _0xe1588e=()=>{const _0x1f6a38=_0x535260;void flushOtelNodeIfUsed()['then'](()=>process[_0x1f6a38(0xc0)](0x0));};process['once'](_0x535260(0xbe),_0xe1588e),process[_0x535260(0xbb)]('SIGTERM',_0xe1588e);}export async function exitWithOtelShutdown(_0x11a03f){const _0x4bc0fd=a329_0x3bb5;await flushOtelNodeIfUsed(),process[_0x4bc0fd(0xc0)](_0x11a03f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a330_0x162966=a330_0x4bac;(function(_0x3fd11d,_0x5f5515){const _0x567519=a330_0x4bac,_0x47c616=_0x3fd11d();while(!![]){try{const _0x4173bc=parseInt(_0x567519(0x1c6))/0x1*(parseInt(_0x567519(0x1c4))/0x2)+parseInt(_0x567519(0x1cb))/0x3+-parseInt(_0x567519(0x1ca))/0x4*(-parseInt(_0x567519(0x1c2))/0x5)+parseInt(_0x567519(0x1cd))/0x6*(parseInt(_0x567519(0x1c5))/0x7)+parseInt(_0x567519(0x1c1))/0x8+parseInt(_0x567519(0x1cc))/0x9*(parseInt(_0x567519(0x1c9))/0xa)+-parseInt(_0x567519(0x1ce))/0xb;if(_0x4173bc===_0x5f5515)break;else _0x47c616['push'](_0x47c616['shift']());}catch(_0x506c8c){_0x47c616['push'](_0x47c616['shift']());}}}(a330_0x4008,0xdefa6));import{sendTraceLog}from'@lovrabet/otel-logger';function a330_0x4008(){const _0x4d3cce=['traceparent','28qKmewC','81179SjTtTd','8627rlhiyR','rabetbase-cli','version','20AbPGQj','28uKdDDM','4455939KefcGy','5121108VwjvRG','66OsvHQh','45176296VtIAnL','manual','logData','6028728gLgdqf','996415NyzavD'];a330_0x4008=function(){return _0x4d3cce;};return a330_0x4008();}import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a330_0x4bac(_0x40d77c,_0x4ae292){_0x40d77c=_0x40d77c-0x1c1;const _0x400870=a330_0x4008();let _0x4bac77=_0x400870[_0x40d77c];return _0x4bac77;}const DEFAULT_TRACE_NAME=a330_0x162966(0x1c7);export async function sendCliTraceLog(_0x87a93a){const _0x40d4d6=a330_0x162966;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x87a93a['traceName']??DEFAULT_TRACE_NAME,'version':_0x87a93a[_0x40d4d6(0x1c8)]??getCliVersion(),'spanName':_0x87a93a['spanName'],'eventType':_0x40d4d6(0x1cf),'logData':_0x87a93a[_0x40d4d6(0x1d0)],..._0x87a93a[_0x40d4d6(0x1c3)]&&{'traceparent':_0x87a93a[_0x40d4d6(0x1c3)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a331_0x3d9d(_0x1c78ec,_0x4da7d5){_0x1c78ec=_0x1c78ec-0x118;const _0x492270=a331_0x4922();let _0x3d9da2=_0x492270[_0x1c78ec];return _0x3d9da2;}const a331_0x4c4fe5=a331_0x3d9d;(function(_0x5d6b7a,_0x37e594){const _0x1f8d4a=a331_0x3d9d,_0x4a9870=_0x5d6b7a();while(!![]){try{const _0x31e089=-parseInt(_0x1f8d4a(0x123))/0x1+-parseInt(_0x1f8d4a(0x11c))/0x2+-parseInt(_0x1f8d4a(0x11e))/0x3+-parseInt(_0x1f8d4a(0x118))/0x4*(-parseInt(_0x1f8d4a(0x127))/0x5)+parseInt(_0x1f8d4a(0x122))/0x6+-parseInt(_0x1f8d4a(0x11d))/0x7*(parseInt(_0x1f8d4a(0x129))/0x8)+-parseInt(_0x1f8d4a(0x11a))/0x9*(-parseInt(_0x1f8d4a(0x125))/0xa);if(_0x31e089===_0x37e594)break;else _0x4a9870['push'](_0x4a9870['shift']());}catch(_0x525706){_0x4a9870['push'](_0x4a9870['shift']());}}}(a331_0x4922,0x4bc04));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a331_0x4c4fe5(0x124);export const PLATFORM_ISSUE_SPAN_NAME=a331_0x4c4fe5(0x11b);function a331_0x4922(){const _0x19a07c=['9aVwsFB','issue.log.collect','164216pTfyLz','21HTeUGG','1046364BXGEhE','description','title','sanitize','3337002pBsmjd','286986lDrMai','platform-issue-log-collect','4531570YEWHKP','originalBytes','306165iTxqgL','join','766216QgDLOu','20HqmZSZ','redactionCount'];a331_0x4922=function(){return _0x19a07c;};return a331_0x4922();}export async function sendPlatformIssueCollectLog(_0x329501){const _0x330983=a331_0x4c4fe5;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x329501[_0x330983(0x120)],'issue.description':_0x329501[_0x330983(0x11f)],..._0x329501['sanitize']?{'issue.description_original_bytes':_0x329501[_0x330983(0x121)][_0x330983(0x126)],'issue.description_truncated':_0x329501[_0x330983(0x121)]['truncated'],'issue.description_redactions':_0x329501[_0x330983(0x121)][_0x330983(0x119)],'issue.description_redaction_kinds':_0x329501[_0x330983(0x121)]['redactionKinds'][_0x330983(0x128)](',')}:{}}});}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface FetchModelListResult {
|
|
|
36
36
|
* api.ts / client.ts 的 CLI 写入动作。
|
|
37
37
|
* `preserved` 表示文件已存在且本次未覆盖,Agent 必须按 data.models 合并。
|
|
38
38
|
*/
|
|
39
|
-
export type ApiPullFileAction = "created" | "overwritten" | "preserved" | "refreshed";
|
|
39
|
+
export type ApiPullFileAction = "created" | "overwritten" | "preserved" | "refreshed" | "missing";
|
|
40
40
|
export interface ApiPullFileStatus {
|
|
41
41
|
path: string;
|
|
42
42
|
action: ApiPullFileAction;
|
|
@@ -54,6 +54,12 @@ export interface GenerateApiFileResult {
|
|
|
54
54
|
apiFilePath: string;
|
|
55
55
|
clientFilePath: string;
|
|
56
56
|
sdkConfigPath: string;
|
|
57
|
+
/** Profile-aware model facts. Present for the stable api.ts/client.ts entrypoint. */
|
|
58
|
+
modelRegistryPath?: string;
|
|
59
|
+
/** Stable profile selection helper used by api.ts. */
|
|
60
|
+
modelRuntimePath?: string;
|
|
61
|
+
/** Profile updated in modelRegistryPath. */
|
|
62
|
+
modelProfile?: string;
|
|
57
63
|
/** 公开协议:默认应用为 `"default"`,具名应用为 profile 名或 appCode,不含 TS 引号 */
|
|
58
64
|
configName: string;
|
|
59
65
|
isDefaultConfig: boolean;
|
|
@@ -64,9 +70,13 @@ export interface GenerateApiFileResult {
|
|
|
64
70
|
api: ApiPullFileStatus;
|
|
65
71
|
client: ApiPullFileStatus;
|
|
66
72
|
sdkConfig: ApiPullFileStatus;
|
|
73
|
+
modelRegistry?: ApiPullFileStatus;
|
|
74
|
+
modelRuntime?: ApiPullFileStatus;
|
|
67
75
|
};
|
|
68
76
|
/** 任一 TypeScript 文件被保留时为 true,Agent 必须按 models 合并,不能当成脚手架已写完 */
|
|
69
77
|
needsAgentMerge: boolean;
|
|
78
|
+
/** Profile-aware facts are current, but project upgrade is required for stable source entrypoints. */
|
|
79
|
+
needsProjectUpgrade?: boolean;
|
|
70
80
|
}
|
|
71
81
|
/**
|
|
72
82
|
* 获取文档的选项
|