@lovrabet/rabetbase-cli 2.5.6-beta.1 → 2.5.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- 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.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- 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/detail.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.js +1 -1
- 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.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.js +1 -1
- 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.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.d.ts +1 -0
- package/lib/commands/dataset/design-context.js +1 -0
- package/lib/commands/dataset/design-start.d.ts +1 -0
- package/lib/commands/dataset/design-start.js +1 -0
- package/lib/commands/dataset/design-status.d.ts +1 -0
- package/lib/commands/dataset/design-status.js +1 -0
- package/lib/commands/dataset/design-sync-retry.d.ts +1 -0
- package/lib/commands/dataset/design-sync-retry.js +1 -0
- package/lib/commands/dataset/design-sync-status.d.ts +1 -0
- package/lib/commands/dataset/design-sync-status.js +1 -0
- package/lib/commands/dataset/design-validate.d.ts +1 -0
- package/lib/commands/dataset/design-validate.js +1 -0
- 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/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.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.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.d.ts +2 -0
- package/lib/commands/flow/page-list.js +1 -0
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.d.ts +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.d.ts +6 -2
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- 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/path.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/subapp-assets.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/subapp-assets-status.js +1 -1
- package/lib/commands/menu/subapp-assets-update.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.js +1 -1
- 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.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/feishu-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.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +37 -6
- 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.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.d.ts +12 -0
- package/lib/core/flow-config.js +1 -1
- 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.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/services/dataset-design/checkpoint.d.ts +17 -0
- package/lib/services/dataset-design/checkpoint.js +1 -0
- package/lib/services/dataset-design/commands.d.ts +6 -0
- package/lib/services/dataset-design/commands.js +1 -0
- package/lib/services/dataset-design/contract.d.ts +7 -0
- package/lib/services/dataset-design/contract.js +1 -0
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- 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/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.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 +3 -2
- package/skills/rabetbase/SKILL.md +11 -7
- package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
- package/skills/rabetbase/guides/backend-function.md +26 -4
- package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
- package/skills/rabetbase/guides/cross-database-bff.md +1 -0
- package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
- package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
- package/skills/rabetbase/guides/flow-config-examples.md +75 -0
- package/skills/rabetbase/guides/form-flow-start.md +61 -0
- package/skills/rabetbase/guides/typescript-sdk.md +1 -1
- package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
- package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
- package/skills/rabetbase/references/rabetbase-dataset-design.md +25 -0
- package/skills/rabetbase/references/rabetbase-dataset-generate.md +2 -255
- package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
- package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
- package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
- package/skills/rabetbase/references/rabetbase-kb.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +45 -0
- package/skills/rabetbase-dataset-generation/references/workflow.md +60 -0
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a147_0x1df5(){const _0x5b0dc6=['change-summary','trim','instant_api_policy_force_confirmation_required',';\x20current\x20revision\x20is\x20','Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes','--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.','boolean','instantApi','instant_api_policy_revision_invalid','--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.','8446496MjqRQT','number','revision','changeType','Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.','Positive\x20published\x20policy\x20revision','8156iYuKet','defaults','rabetbase\x20instant-api-policy\x20current\x20--format\x20compress','config','length','version','num','16105113FNCQXO','NaN','677861AcHPbp','createUserId','rules','str','instant_api_policy_expected_revision_invalid','12hxlvjP','policyId','Expected\x20revision\x20','instant_api_policy_revision_mismatch','1563flqksg','appCode','configHash','gmtCreate','--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','string','Runtime\x20instances\x20may\x20take\x20up\x20to\x2030\x20seconds\x20to\x20observe\x20the\x20new\x20active\x20policy.','bool','The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.','56068GfdGmh','updateUserId','/smartapi/instant-api-policy','flag','--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.','18755rdPIjN','isSafeInteger','expected-revision','--change-summary\x20cannot\x20exceed\x202000\x20characters.','operatorId','1598037jFfPRh','yes'];a147_0x1df5=function(){return _0x5b0dc6;};return a147_0x1df5();}const a147_0xee422f=a147_0x2949;function a147_0x2949(_0x34134a,_0x4f1c39){_0x34134a=_0x34134a-0x1ca;const _0x1df5f3=a147_0x1df5();let _0x2949cb=_0x1df5f3[_0x34134a];return _0x2949cb;}(function(_0x2695ae,_0x174d90){const _0x5b290f=a147_0x2949,_0x57bd8f=_0x2695ae();while(!![]){try{const _0x52ae5b=parseInt(_0x5b290f(0x1ff))/0x1+-parseInt(_0x5b290f(0x1da))/0x2+parseInt(_0x5b290f(0x1d1))/0x3*(-parseInt(_0x5b290f(0x1f6))/0x4)+-parseInt(_0x5b290f(0x1df))/0x5*(parseInt(_0x5b290f(0x1cd))/0x6)+parseInt(_0x5b290f(0x1e4))/0x7+-parseInt(_0x5b290f(0x1f0))/0x8+parseInt(_0x5b290f(0x1fd))/0x9;if(_0x52ae5b===_0x174d90)break;else _0x57bd8f['push'](_0x57bd8f['shift']());}catch(_0x4beb87){_0x57bd8f['push'](_0x57bd8f['shift']());}}}(a147_0x1df5,0x844f6));import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,readInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';export const INSTANT_API_POLICY_BASE_PATH=a147_0xee422f(0x1dc);export const RUNTIME_CACHE_WARNING=a147_0xee422f(0x1d7);export const NON_ATOMIC_EXPECTED_REVISION_WARNING=a147_0xee422f(0x1ef);export const FORCE_FLAG={'name':'force','type':a147_0xee422f(0x1ec),'default':![],'description':a147_0xee422f(0x1ea)};export const CHANGE_SUMMARY_FLAG={'name':a147_0xee422f(0x1e6),'type':a147_0xee422f(0x1d6),'required':![],'description':'Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)'};export const REVISION_FLAG={'name':'revision','type':'number','required':!![],'description':a147_0xee422f(0x1f5)};export const EXPECTED_REVISION_FLAG={'name':a147_0xee422f(0x1e1),'type':a147_0xee422f(0x1f1),'required':![],'description':'Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured'};export function requireForceConfirmation(_0x445a42){const _0x1d8149=a147_0xee422f;if(!_0x445a42[_0x1d8149(0x1d8)]('force')||_0x445a42[_0x1d8149(0x1d8)](_0x1d8149(0x1e5)))return;throw instantApiPolicyError(_0x1d8149(0x1e8),_0x1d8149(0x1de),_0x1d8149(0x1f4));}export function readChangeSummary(_0xbb9032){const _0x4a91a7=a147_0xee422f,_0x2eef42=_0xbb9032[_0x4a91a7(0x1cb)](_0x4a91a7(0x1e6))[_0x4a91a7(0x1e7)]();if(!_0x2eef42)return undefined;if(_0x2eef42['length']>0x7d0)throw instantApiPolicyError('instant_api_policy_change_summary_invalid',_0x4a91a7(0x1e2));return _0x2eef42;}export function readRevision(_0x14691a){const _0x1ac9b5=a147_0xee422f,_0x56924e=_0x14691a[_0x1ac9b5(0x1fc)](_0x1ac9b5(0x1f2),Number[_0x1ac9b5(0x1fe)]);if(!Number[_0x1ac9b5(0x1e0)](_0x56924e)||_0x56924e<=0x0)throw instantApiPolicyError(_0x1ac9b5(0x1ee),_0x1ac9b5(0x1eb));return _0x56924e;}export function readExpectedRevision(_0x4fab4b){const _0x3cf432=a147_0xee422f;if(_0x4fab4b[_0x3cf432(0x1dd)](_0x3cf432(0x1e1))===undefined)return undefined;const _0x18e200=_0x4fab4b['num']('expected-revision',Number[_0x3cf432(0x1fe)]);if(!Number['isSafeInteger'](_0x18e200)||_0x18e200<0x0)throw instantApiPolicyError(_0x3cf432(0x1cc),_0x3cf432(0x1d5));return _0x18e200;}export function assertExpectedRevision(_0x431b1e,_0x469e36){const _0x5c9d22=a147_0xee422f;if(_0x469e36===undefined)return;const _0xdc7899=_0x431b1e?.[_0x5c9d22(0x1f2)]??0x0;if(_0xdc7899!==_0x469e36)throw instantApiPolicyError(_0x5c9d22(0x1d0),_0x5c9d22(0x1d9),_0x5c9d22(0x1cf)+_0x469e36+_0x5c9d22(0x1e9)+_0xdc7899+'.\x20Run\x20current\x20and\x20review\x20before\x20retrying.');}export async function readFixedPolicy(_0x49af0a){const _0x2d99b8=a147_0xee422f,_0x4bf3c0=loadInstantApiPolicyLocalConfig(_0x49af0a[_0x2d99b8(0x1d2)]),_0x1e8793=await readInstantApiPolicyConfigFile(_0x4bf3c0);return{'local':_0x4bf3c0,'config':_0x1e8793};}export function projectCurrentPolicy(_0x2d12b1){const _0x24c220=a147_0xee422f;if(!_0x2d12b1)return null;return{'id':_0x2d12b1['id'],'appCode':_0x2d12b1[_0x24c220(0x1d2)],'revision':_0x2d12b1['revision'],'configHash':_0x2d12b1[_0x24c220(0x1d3)],'enabled':_0x2d12b1['enabled'],'config':_0x2d12b1[_0x24c220(0x1f9)],'createUserId':_0x2d12b1[_0x24c220(0x200)]??null,'updateUserId':_0x2d12b1[_0x24c220(0x1db)]??null,'gmtCreate':_0x2d12b1[_0x24c220(0x1d4)]??null,'gmtModified':_0x2d12b1['gmtModified']??null};}export function projectRevisionSummary(_0x6e982a){const _0xd991d4=a147_0xee422f;return{'id':_0x6e982a['id'],'policyId':_0x6e982a[_0xd991d4(0x1ce)],'appCode':_0x6e982a['appCode'],'revision':_0x6e982a['revision'],'configHash':_0x6e982a[_0xd991d4(0x1d3)],'changeType':_0x6e982a[_0xd991d4(0x1f3)],'changeSummary':_0x6e982a['changeSummary']??null,'operatorId':_0x6e982a[_0xd991d4(0x1e3)]??null,'gmtCreate':_0x6e982a[_0xd991d4(0x1d4)]??null,'version':_0x6e982a[_0xd991d4(0x1f9)][_0xd991d4(0x1fb)],'defaultAction':_0x6e982a[_0xd991d4(0x1f9)][_0xd991d4(0x1f7)][_0xd991d4(0x1ed)],'ruleCount':_0x6e982a['config'][_0xd991d4(0x1ca)]?.[_0xd991d4(0x1fa)]??0x0};}export function projectRevisionDetail(_0xd73326){const _0x128537=a147_0xee422f;return{...projectRevisionSummary(_0xd73326),'config':_0xd73326[_0x128537(0x1f9)]};}export function expectedRevisionWarnings(_0x5b4c05){return _0x5b4c05===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){const _0x16e7cf=a147_0xee422f;return _0x16e7cf(0x1f8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a148_0x161f(){const _0x5931e6=['valid','221343YAHxhr','72ItNppM','policyRelativePath','validate','2EIlPjk','44ZYmMGJ','738521BHIwCH','appCode','496AUwErK','795hRLWdb','policyFilePath','Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','7513430RRotfa','44442DyfmDN','configHash','normalizedConfig','2519508BFuFml','367957TxXdBf','12548JpSito','Validated\x20Instant\x20API\x20policy\x20for\x20','POST'];a148_0x161f=function(){return _0x5931e6;};return a148_0x161f();}const a148_0x282c1=a148_0x40f1;(function(_0x4e7a51,_0x3a1e2f){const _0x2bd973=a148_0x40f1,_0x10537d=_0x4e7a51();while(!![]){try{const _0x6b6439=parseInt(_0x2bd973(0x167))/0x1+parseInt(_0x2bd973(0x170))/0x2*(-parseInt(_0x2bd973(0x16c))/0x3)+parseInt(_0x2bd973(0x168))/0x4*(-parseInt(_0x2bd973(0x175))/0x5)+parseInt(_0x2bd973(0x16d))/0x6*(parseInt(_0x2bd973(0x172))/0x7)+parseInt(_0x2bd973(0x174))/0x8*(-parseInt(_0x2bd973(0x179))/0x9)+parseInt(_0x2bd973(0x178))/0xa+-parseInt(_0x2bd973(0x171))/0xb*(parseInt(_0x2bd973(0x166))/0xc);if(_0x6b6439===_0x3a1e2f)break;else _0x10537d['push'](_0x10537d['shift']());}catch(_0x4996eb){_0x10537d['push'](_0x10537d['shift']());}}}(a148_0x161f,0xa2c9c));import{validateInstantApiPolicy}from'../../core/api-client.js';import{INSTANT_API_POLICY_BASE_PATH,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';function a148_0x40f1(_0x40be89,_0xa33669){_0x40be89=_0x40be89-0x165;const _0x161f4f=a148_0x161f();let _0x40f1ec=_0x161f4f[_0x40be89];return _0x40f1ec;}export const instantApiPolicyValidate={'service':'instant-api-policy','command':'validate','description':a148_0x282c1(0x177),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x42fdc6){const _0x529f91=a148_0x282c1,{local:_0xa129d1,config:_0x2d2538}=await readFixedPolicy(_0x42fdc6),_0x56add1=await validateInstantApiPolicy({'appCode':_0x42fdc6[_0x529f91(0x173)],'config':_0x2d2538});return{'ok':!![],'data':{'operation':_0x529f91(0x16f),'selector':{'appCode':_0x42fdc6['appCode']},'filePath':_0xa129d1[_0x529f91(0x176)],'relativePath':_0xa129d1[_0x529f91(0x16e)],'valid':_0x56add1[_0x529f91(0x16b)],'configHash':_0x56add1[_0x529f91(0x17a)],'normalizedConfig':_0x56add1[_0x529f91(0x165)],'backend':{'method':_0x529f91(0x16a),'path':INSTANT_API_POLICY_BASE_PATH+'/validate'}},'message':_0x529f91(0x169)+_0x42fdc6[_0x529f91(0x173)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57dee9,_0x3cb47d){const _0xdab69f=a149_0x59d1,_0x4ab47e=_0x57dee9();while(!![]){try{const _0x4a1df6=-parseInt(_0xdab69f(0xaa))/0x1*(parseInt(_0xdab69f(0xa3))/0x2)+-parseInt(_0xdab69f(0xa5))/0x3+-parseInt(_0xdab69f(0xa9))/0x4+parseInt(_0xdab69f(0xa6))/0x5+parseInt(_0xdab69f(0xab))/0x6*(-parseInt(_0xdab69f(0xa7))/0x7)+-parseInt(_0xdab69f(0xa4))/0x8+-parseInt(_0xdab69f(0xac))/0x9*(-parseInt(_0xdab69f(0xa8))/0xa);if(_0x4a1df6===_0x3cb47d)break;else _0x4ab47e['push'](_0x4ab47e['shift']());}catch(_0x1c6db7){_0x4ab47e['push'](_0x4ab47e['shift']());}}}(a149_0x3adf,0x525b5));function a149_0x3adf(){const _0x1f4e25=['20080oaOaUe','1644556trodzI','369428pdHYjs','186drWajs','11394uVlWCD','2MjtLpo','5391160Yqwulp','1938591QIonCC','1366135HuinUb','85211kJzqwi'];a149_0x3adf=function(){return _0x1f4e25;};return a149_0x3adf();}import{issueReport}from'../../commands/issue/report.js';function a149_0x59d1(_0x254d9e,_0x1c9ba7){_0x254d9e=_0x254d9e-0xa3;const _0x3adf61=a149_0x3adf();let _0x59d15c=_0x3adf61[_0x254d9e];return _0x59d15c;}export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a150_0xb17021=a150_0x5389;(function(_0x1803a9,_0xc50d87){const _0x175397=a150_0x5389,_0x404592=_0x1803a9();while(!![]){try{const _0x4c26ea=parseInt(_0x175397(0xce))/0x1+-parseInt(_0x175397(0xb8))/0x2+parseInt(_0x175397(0xc2))/0x3*(-parseInt(_0x175397(0xc5))/0x4)+-parseInt(_0x175397(0xd6))/0x5*(parseInt(_0x175397(0xd5))/0x6)+-parseInt(_0x175397(0xcf))/0x7+-parseInt(_0x175397(0xca))/0x8*(parseInt(_0x175397(0xbc))/0x9)+parseInt(_0x175397(0xbf))/0xa*(parseInt(_0x175397(0xb4))/0xb);if(_0x4c26ea===_0xc50d87)break;else _0x404592['push'](_0x404592['shift']());}catch(_0x540a27){_0x404592['push'](_0x404592['shift']());}}}(a150_0x1ffa,0xa2256));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a150_0x5389(_0x328bba,_0xb569c3){_0x328bba=_0x328bba-0xb4;const _0x1ffa9d=a150_0x1ffa();let _0x53896c=_0x1ffa9d[_0x328bba];return _0x53896c;}export const NUDGE_OPT_OUT_ENV=a150_0xb17021(0xba);const NUDGE_SUPPRESSED_CODES=new Set([a150_0xb17021(0xcd),'auth_required',a150_0xb17021(0xbe),a150_0xb17021(0xd2),a150_0xb17021(0xd1),a150_0xb17021(0xd8),a150_0xb17021(0xd3),a150_0xb17021(0xb5)]),defaultWriter=_0x5f3fc3=>{const _0xa68a0e=a150_0xb17021;process['stderr'][_0xa68a0e(0xbd)](_0x5f3fc3);};export function shouldNudgeForError(_0x1529dc,_0x151a81){const _0x1cfab7=a150_0xb17021;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x151a81[_0x1cfab7(0xb7)]===_0x1cfab7(0xb9)&&_0x151a81[_0x1cfab7(0xc3)]===_0x1cfab7(0xbb))return![];if(_0x1529dc instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x1cfab7(0xc1)](_0x1529dc[_0x1cfab7(0xd7)]);return!![];}export function printIssueReportNudgeForError(_0x27dc1c,_0x14e828,_0x105555=defaultWriter){if(!shouldNudgeForError(_0x27dc1c,_0x14e828))return;const _0x5949c6=buildSuggestedTitle(_0x27dc1c,_0x14e828);_0x105555(formatNudge(_0x5949c6));}function buildSuggestedTitle(_0xb9f781,_0x445775){const _0x1df2c3=a150_0xb17021,_0x40c167=_0xb9f781 instanceof Error?_0xb9f781[_0x1df2c3(0xc4)]:String(_0xb9f781),_0x474d33=_0x40c167[_0x1df2c3(0xc8)](/[\r\n]+/g,'\x20')[_0x1df2c3(0xc8)](/\s+/g,'\x20')[_0x1df2c3(0xcc)]()[_0x1df2c3(0xc7)](0x0,0x78)[_0x1df2c3(0xc8)](/"/g,'\x5c\x22'),_0x995a20=CLI_BIN_NAME+'\x20'+_0x445775[_0x1df2c3(0xb7)]+'\x20'+_0x445775[_0x1df2c3(0xc3)];return _0x474d33[_0x1df2c3(0xd0)]>0x0?_0x995a20+':\x20'+_0x474d33:_0x995a20;}function formatNudge(_0xcb58d6){const _0x7a3542=a150_0xb17021;return['',_0x7a3542(0xc6)+CLI_BIN_NAME+_0x7a3542(0xcb),'\x20\x20'+CLI_BIN_NAME+_0x7a3542(0xc0),_0x7a3542(0xc9)+_0xcb58d6+'\x22\x20\x5c',_0x7a3542(0xd9),_0x7a3542(0xb6),'\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.',''][_0x7a3542(0xd4)]('\x0a');}function a150_0x1ffa(){const _0xc3fdd9=['join','6ZduMuo','3927895BHwhwZ','code','flag_missing','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','33153615tPmQsv','network_error','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','service','1685024dLIDcY','issue','RABETBASE_DISABLE_ISSUE_NUDGE','report','6252813CmvDeK','write','config_missing','10qUqabj','\x20issue\x20report\x20\x5c','has','524679kaHKWL','command','message','12ICbOWY','Hit\x20a\x20','slice','replace','\x20\x20\x20\x20--title\x20\x22','8JIMNnW','\x20bug?\x20Help\x20us\x20fix\x20it:','trim','cancelled','505545mfkrUO','54831OPENzU','length','unknown_command','not_in_project','validation_error'];a150_0x1ffa=function(){return _0xc3fdd9;};return a150_0x1ffa();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x4bea7b=a151_0x1ef5;(function(_0xf787f1,_0xc0349e){const _0x33ef6d=a151_0x1ef5,_0x58c02e=_0xf787f1();while(!![]){try{const _0x43b291=-parseInt(_0x33ef6d(0x113))/0x1*(-parseInt(_0x33ef6d(0x108))/0x2)+-parseInt(_0x33ef6d(0x10d))/0x3+parseInt(_0x33ef6d(0x109))/0x4+-parseInt(_0x33ef6d(0x10b))/0x5*(parseInt(_0x33ef6d(0x102))/0x6)+parseInt(_0x33ef6d(0xf9))/0x7+parseInt(_0x33ef6d(0x105))/0x8+-parseInt(_0x33ef6d(0xf8))/0x9*(parseInt(_0x33ef6d(0xfd))/0xa);if(_0x43b291===_0xc0349e)break;else _0x58c02e['push'](_0x58c02e['shift']());}catch(_0x1ab462){_0x58c02e['push'](_0x58c02e['shift']());}}}(a151_0x49c8,0xc616c));import{existsSync}from'node:fs';function a151_0x1ef5(_0x34a46f,_0x3c4a0d){_0x34a46f=_0x34a46f-0xec;const _0x49c8bb=a151_0x49c8();let _0x1ef5ac=_0x49c8bb[_0x34a46f];return _0x1ef5ac;}import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a151_0x49c8(){const _0x57a525=['Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Issue\x20description\x20cannot\x20be\x20empty.','otel://','str','Platform\x20issue\x20reported\x20(','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','description','description-file','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','flagMissing','truncated:\x20original\x20','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','push','compress','title','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','965628kLBtBG','1307418tAnKDz','write','report','redactionKinds','50opCfkH','\x20secret(s):\x20','utf8','string','issue.description_redactions','6goyfIt','message','redactions:\x20','696720nHphtm','File\x20not\x20found:\x20','join','4dyRjpY','1815412cwJfdF','descriptionFilePath','685085pidAwX','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','1654368WwqUfM','issue.description_truncated','sanitize','issue.description','trim','descriptionSource:\x20','654294qYdtuN','length','descriptionFile:\x20','POST','file','truncated','issue','descriptionSource','apiError','Failed\x20to\x20report\x20platform\x20issue:\x20','redactionCount','validation','Platform\x20issue\x20reported','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','One-line\x20issue\x20summary','truncated\x20from\x20','cwd','originalBytes'];a151_0x49c8=function(){return _0x57a525;};return a151_0x49c8();}import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG=a151_0x4bea7b(0xef);export const issueReport={'service':a151_0x4bea7b(0x119),'command':a151_0x4bea7b(0xfb),'description':a151_0x4bea7b(0xed),'risk':a151_0x4bea7b(0xfa),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a151_0x4bea7b(0xf5),'flags':[{'name':a151_0x4bea7b(0xf6),'type':a151_0x4bea7b(0x100),'required':!![],'description':a151_0x4bea7b(0x121)},{'name':a151_0x4bea7b(0xee),'type':a151_0x4bea7b(0x100),'description':a151_0x4bea7b(0xec)},{'name':DESCRIPTION_FILE_FLAG,'type':a151_0x4bea7b(0x100),'description':a151_0x4bea7b(0xf0)}],async 'validate'(_0x53fcfa){const _0x3d15c0=a151_0x4bea7b,_0x1adf42=_0x53fcfa[_0x3d15c0(0x128)](_0x3d15c0(0xf6))[_0x3d15c0(0x111)](),_0x24fcdd=_0x53fcfa[_0x3d15c0(0x128)](_0x3d15c0(0xee))[_0x3d15c0(0x111)](),_0xc95451=_0x53fcfa[_0x3d15c0(0x128)](DESCRIPTION_FILE_FLAG)[_0x3d15c0(0x111)]();if(!_0x1adf42)throw CliErrors[_0x3d15c0(0xf1)](_0x3d15c0(0xf6),_0x3d15c0(0xf7));const _0x5c28a8=_0x24fcdd[_0x3d15c0(0x114)]>0x0,_0x5282e2=_0xc95451[_0x3d15c0(0x114)]>0x0;if(_0x5c28a8===_0x5282e2)throw CliErrors[_0x3d15c0(0x11e)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x5282e2){const _0xcbf83=resolve(process[_0x3d15c0(0x123)](),_0xc95451);if(!existsSync(_0xcbf83))throw CliErrors[_0x3d15c0(0x11e)](_0x3d15c0(0x106)+_0xcbf83);}},async 'dryRun'(_0x21d102){const _0x918fcf=a151_0x4bea7b,_0x3b80ea=await prepareIssueReport(_0x21d102);return{'method':_0x918fcf(0x116),'url':_0x918fcf(0x127)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x3b80ea[_0x918fcf(0xf6)],'issue.description':_0x3b80ea[_0x918fcf(0xee)],'issue.description_original_bytes':_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x124)],'issue.description_truncated':_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x118)],'issue.description_redactions':_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x11d)],'issue.description_redaction_kinds':_0x3b80ea[_0x918fcf(0x10f)]['redactionKinds'][_0x918fcf(0x107)](',')}},'description':[_0x918fcf(0x10c),_0x918fcf(0x112)+_0x3b80ea[_0x918fcf(0x11a)],_0x3b80ea[_0x918fcf(0x10a)]?_0x918fcf(0x115)+_0x3b80ea[_0x918fcf(0x10a)]:null,_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x118)]?_0x918fcf(0xf2)+_0x3b80ea['sanitize'][_0x918fcf(0x124)]+'\x20bytes':null,_0x3b80ea['sanitize'][_0x918fcf(0x11d)]>0x0?_0x918fcf(0x104)+_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x11d)]+'\x20('+_0x3b80ea['sanitize'][_0x918fcf(0xfc)][_0x918fcf(0x107)](',\x20')+')':null]['filter'](Boolean)['join']('\x0a')};},async 'execute'(_0x23a4f8){const _0x28fbc3=a151_0x4bea7b,_0x58bfce=await prepareIssueReport(_0x23a4f8);try{await sendPlatformIssueCollectLog({'title':_0x58bfce['title'],'description':_0x58bfce[_0x28fbc3(0xee)],'sanitize':{'originalBytes':_0x58bfce[_0x28fbc3(0x10f)][_0x28fbc3(0x124)],'truncated':_0x58bfce['sanitize']['truncated'],'redactionCount':_0x58bfce[_0x28fbc3(0x10f)]['redactionCount'],'redactionKinds':_0x58bfce[_0x28fbc3(0x10f)][_0x28fbc3(0xfc)]}});}catch(_0xc7d217){throw CliErrors[_0x28fbc3(0x11b)](_0x28fbc3(0x11c)+(_0xc7d217 instanceof Error?_0xc7d217[_0x28fbc3(0x103)]:String(_0xc7d217)),_0x28fbc3(0xf3));}return{'ok':!![],'message':buildResultMessage(_0x58bfce[_0x28fbc3(0x10f)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title',_0x28fbc3(0x110),'issue.description_original_bytes',_0x28fbc3(0x10e),_0x28fbc3(0x101),'issue.description_redaction_kinds'],'issue':{'title':_0x58bfce[_0x28fbc3(0xf6)],'descriptionLength':_0x58bfce[_0x28fbc3(0xee)][_0x28fbc3(0x114)],'descriptionSource':_0x58bfce[_0x28fbc3(0x11a)],..._0x58bfce[_0x28fbc3(0x10a)]?{'descriptionFile':_0x58bfce[_0x28fbc3(0x10a)]}:{},'sanitize':{'originalBytes':_0x58bfce[_0x28fbc3(0x10f)][_0x28fbc3(0x124)],'truncated':_0x58bfce[_0x28fbc3(0x10f)][_0x28fbc3(0x118)],'redactions':_0x58bfce[_0x28fbc3(0x10f)]['redactionCount'],'redactionKinds':_0x58bfce['sanitize'][_0x28fbc3(0xfc)]}}}};}};function buildResultMessage(_0xbc5d78){const _0x4ad1c8=a151_0x4bea7b,_0x189cd1=[];return _0xbc5d78[_0x4ad1c8(0x118)]&&_0x189cd1[_0x4ad1c8(0xf4)](_0x4ad1c8(0x122)+_0xbc5d78['originalBytes']+'\x20bytes'),_0xbc5d78[_0x4ad1c8(0x11d)]>0x0&&_0x189cd1[_0x4ad1c8(0xf4)]('redacted\x20'+_0xbc5d78[_0x4ad1c8(0x11d)]+_0x4ad1c8(0xfe)+_0xbc5d78[_0x4ad1c8(0xfc)][_0x4ad1c8(0x107)](',\x20')),_0x189cd1['length']===0x0?_0x4ad1c8(0x11f):_0x4ad1c8(0x129)+_0x189cd1[_0x4ad1c8(0x107)](';\x20')+')';}async function prepareIssueReport(_0x2670ef){const _0x2ac860=a151_0x4bea7b,_0x95b0ea=_0x2670ef[_0x2ac860(0x128)](_0x2ac860(0xf6))[_0x2ac860(0x111)](),_0x59c441=_0x2670ef[_0x2ac860(0x128)]('description'),_0x3d6835=_0x2670ef[_0x2ac860(0x128)](DESCRIPTION_FILE_FLAG)[_0x2ac860(0x111)]();if(!_0x3d6835){const _0x543a44=_0x59c441;if(!_0x543a44['trim']())throw CliErrors[_0x2ac860(0x11e)](_0x2ac860(0x126),_0x2ac860(0x120));const _0x2a2873=sanitizeIssueDescription(_0x543a44);return{'title':_0x95b0ea,'description':_0x2a2873['description'],'descriptionSource':'inline','sanitize':_0x2a2873};}const _0x42c47d=resolve(process['cwd'](),_0x3d6835),_0x34e8ad=await readFile(_0x42c47d,_0x2ac860(0xff));if(!_0x34e8ad[_0x2ac860(0x111)]())throw CliErrors[_0x2ac860(0x11e)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x42c47d,_0x2ac860(0x125));const _0x347297=sanitizeIssueDescription(_0x34e8ad);return{'title':_0x95b0ea,'description':_0x347297[_0x2ac860(0xee)],'descriptionSource':_0x2ac860(0x117),'descriptionFilePath':_0x42c47d,'sanitize':_0x347297};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a152_0x5773(){const _0x22a0b0=['replace','authorization','__RB_OSS_ID_','cookie','12xmbqjc','5816244uyGgnA','kind','539241MDhqLq','byteLength','includes','max','REDACTED:password','string','utf8','length','5875135iRiPzW','private-key','push','description','bearer-jwt','27oREJTJ','pattern','2735127uwGNAu','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','access-key','5236136gKfNao','6499130JSmQvV','328830vkBsNe','REDACTED:cookie','label','subarray'];a152_0x5773=function(){return _0x22a0b0;};return a152_0x5773();}const a152_0x49b205=a152_0xa5a9;(function(_0x249d32,_0x3ecfd8){const _0x275ae1=a152_0xa5a9,_0x178bec=_0x249d32();while(!![]){try{const _0x3f7378=-parseInt(_0x275ae1(0x146))/0x1+-parseInt(_0x275ae1(0x13b))/0x2+-parseInt(_0x275ae1(0x136))/0x3+parseInt(_0x275ae1(0x144))/0x4+parseInt(_0x275ae1(0x13a))/0x5+-parseInt(_0x275ae1(0x143))/0x6*(-parseInt(_0x275ae1(0x14e))/0x7)+-parseInt(_0x275ae1(0x139))/0x8*(parseInt(_0x275ae1(0x134))/0x9);if(_0x3f7378===_0x3ecfd8)break;else _0x178bec['push'](_0x178bec['shift']());}catch(_0x5305a8){_0x178bec['push'](_0x178bec['shift']());}}}(a152_0x5773,0xd064d));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a152_0x49b205(0x137),REDACTION_RULES=[{'kind':a152_0x49b205(0x142),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a152_0x49b205(0x13c)},{'kind':a152_0x49b205(0x140),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a152_0x49b205(0x130),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':'REDACTED:private-key'},{'kind':a152_0x49b205(0x138),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a152_0x49b205(0x14a)},{'kind':a152_0x49b205(0x133),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':'REDACTED:bearer-jwt'}];function a152_0xa5a9(_0x2d761c,_0xf6b500){_0x2d761c=_0x2d761c-0x130;const _0x57730d=a152_0x5773();let _0xa5a94b=_0x57730d[_0x2d761c];return _0xa5a94b;}export function sanitizeIssueDescription(_0x5c6df){const _0x40182c=a152_0x49b205,_0x2148c3=Buffer[_0x40182c(0x147)](_0x5c6df,_0x40182c(0x14c)),_0x529bce=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x3dc19e=_0x5c6df,_0x1e5eb3=0x0;const _0x201e81=[];if(!_0x529bce){const _0x4a5420=protectOssAccessKeyIds(_0x3dc19e);_0x3dc19e=_0x4a5420[_0x40182c(0x132)];for(const _0x57ae7e of REDACTION_RULES){let _0x7a9c0a=0x0;_0x3dc19e=_0x3dc19e['replace'](_0x57ae7e[_0x40182c(0x135)],(_0x2d89f7,_0x2eaa20)=>{const _0x224f73=_0x40182c;_0x7a9c0a+=0x1;const _0x313657=typeof _0x2eaa20===_0x224f73(0x14b)?_0x2eaa20:'';return _0x313657+'['+_0x57ae7e[_0x224f73(0x13d)]+']';}),_0x7a9c0a>0x0&&(_0x1e5eb3+=_0x7a9c0a,!_0x201e81[_0x40182c(0x148)](_0x57ae7e[_0x40182c(0x145)])&&_0x201e81[_0x40182c(0x131)](_0x57ae7e[_0x40182c(0x145)]));}_0x3dc19e=_0x4a5420['restore'](_0x3dc19e);}let _0x18afc1=![];if(Buffer['byteLength'](_0x3dc19e,_0x40182c(0x14c))>ISSUE_DESCRIPTION_MAX_BYTES){_0x18afc1=!![];const _0x186887=Buffer[_0x40182c(0x147)](TRUNCATION_NOTICE,_0x40182c(0x14c)),_0x54e767=Math[_0x40182c(0x149)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x186887);_0x3dc19e=sliceUtf8Bytes(_0x3dc19e,_0x54e767)+TRUNCATION_NOTICE;}return{'description':_0x3dc19e,'originalBytes':_0x2148c3,'truncated':_0x18afc1,'redactionCount':_0x1e5eb3,'redactionKinds':_0x201e81};}function protectOssAccessKeyIds(_0x14e47a){const _0x43f9ef=a152_0x49b205,_0x44845d=[],_0xc2ff2d=_0x14e47a[_0x43f9ef(0x13f)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x4202de,_0x3ca7f9)=>{const _0x5c04e7=_0x43f9ef,_0x347f54=_0x44845d[_0x5c04e7(0x131)](_0x4202de['slice'](_0x3ca7f9[_0x5c04e7(0x14d)]))-0x1;return _0x3ca7f9+_0x5c04e7(0x141)+_0x347f54+'__';});return{'description':_0xc2ff2d,'restore':_0x34acde=>_0x34acde[_0x43f9ef(0x13f)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0xac6f9d,_0xaef1e7,_0x505a0c)=>{const _0x12459c=_0x44845d[Number(_0x505a0c)];return _0x12459c===undefined?_0xac6f9d:''+_0xaef1e7+_0x12459c;})};}function sliceUtf8Bytes(_0x336519,_0x51f94b){const _0x1936a6=a152_0x49b205;if(_0x51f94b<=0x0)return'';const _0x23ad42=Buffer['from'](_0x336519,_0x1936a6(0x14c));if(_0x23ad42[_0x1936a6(0x147)]<=_0x51f94b)return _0x336519;let _0x31ae28=_0x51f94b;while(_0x31ae28>0x0){const _0x423060=_0x23ad42[_0x31ae28];if(_0x423060===undefined||(_0x423060&0xc0)!==0x80)break;_0x31ae28-=0x1;}return _0x23ad42[_0x1936a6(0x13e)](0x0,_0x31ae28)['toString'](_0x1936a6(0x14c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x3e62a5=a153_0x4f5f;(function(_0x4265c4,_0x2dc9f5){const _0x21901d=a153_0x4f5f,_0x2cc4fc=_0x4265c4();while(!![]){try{const _0x1bf2ea=parseInt(_0x21901d(0xf7))/0x1+-parseInt(_0x21901d(0xf1))/0x2*(-parseInt(_0x21901d(0x102))/0x3)+-parseInt(_0x21901d(0xe1))/0x4*(-parseInt(_0x21901d(0x108))/0x5)+-parseInt(_0x21901d(0xec))/0x6*(parseInt(_0x21901d(0x10c))/0x7)+-parseInt(_0x21901d(0x10d))/0x8*(parseInt(_0x21901d(0x10e))/0x9)+-parseInt(_0x21901d(0x103))/0xa*(parseInt(_0x21901d(0x109))/0xb)+parseInt(_0x21901d(0xea))/0xc*(parseInt(_0x21901d(0xe3))/0xd);if(_0x1bf2ea===_0x2dc9f5)break;else _0x2cc4fc['push'](_0x2cc4fc['shift']());}catch(_0x905ccd){_0x2cc4fc['push'](_0x2cc4fc['shift']());}}}(a153_0x4d17,0x6ca20));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';function a153_0x4d17(){const _0x37cfba=['6LeazHl','620vsJnes','cookie','POST','content','\x20--format\x20compress`\x20before\x20choosing\x20update.','27865RZxVor','18337XfnZOX','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','645134XHmWqc','16wLuMto','1889739DqXxRj','Created\x20company\x20knowledge\x20base\x20','\x20with\x20title\x20','144KGrIYP','\x20for\x20','39ezMEYw','kb_already_exists','title','length','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','--file\x20is\x20required.','1728876BDkgtb','create','30ZoLTZN','/admin/knowledge-base/create','trim','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','write','19930qkcOQW','string','stringify','kb_title_required','file','--title\x20is\x20required.','776289JwODuh','rabetbase\x20kb\x20list\x20--title\x20','kb_create_outcome_unknown','Knowledge-base\x20title','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','byteSize','appCode','company','rabetbase\x20kb\x20detail\x20--id\x20','contentHash','\x20--format\x20compress'];a153_0x4d17=function(){return _0x37cfba;};return a153_0x4d17();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a153_0x3e62a5(0xed);function readCreateInput(_0x29faa6){const _0xd385a9=a153_0x3e62a5,_0x3b8aa4=_0x29faa6['str'](_0xd385a9(0xe5))[_0xd385a9(0xee)]();if(!_0x3b8aa4)throw kbError(_0xd385a9(0xf4),_0xd385a9(0xf6));const _0x427ab1=_0x29faa6['str'](_0xd385a9(0xf5))[_0xd385a9(0xee)]();if(!_0x427ab1)throw kbError('kb_file_required',_0xd385a9(0xe9),'Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.');return{'title':_0x3b8aa4,'file':_0x427ab1};}async function prepareCreate(_0x1f2085){const _0x498815=a153_0x3e62a5,_0x5b6484=readCreateInput(_0x1f2085),_0x316b3b=await readKbFile(_0x5b6484[_0x498815(0xf5)]),_0x21d713=await fetchAllCompanyKnowledgeBases(_0x1f2085,{'title':_0x5b6484[_0x498815(0xe5)]}),_0x3c4285=findExactCompanyKnowledgeBases(_0x21d713,_0x1f2085['appCode'],_0x5b6484[_0x498815(0xe5)]);if(_0x3c4285['length']>0x0)throw kbError(_0x498815(0xe4),'Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'+_0x1f2085[_0x498815(0xfd)]+_0x498815(0xe0)+_0x5b6484['title']+'.',_0x498815(0xe7)+_0x3c4285[0x0]['id']+_0x498815(0x107));return{..._0x5b6484,'content':_0x316b3b};}function a153_0x4f5f(_0x5a5b44,_0x5129a7){_0x5a5b44=_0x5a5b44-0xdf;const _0x4d17eb=a153_0x4d17();let _0x4f5fc0=_0x4d17eb[_0x5a5b44];return _0x4f5fc0;}function plannedAfter(_0x5911d8,_0x5c518e){const _0xb388e5=a153_0x3e62a5;return{'scope':_0xb388e5(0xfe),'appCode':_0x5911d8[_0xb388e5(0xfd)],'title':_0x5c518e['title'],'contentByteSize':_0x5c518e[_0xb388e5(0x106)][_0xb388e5(0xfc)],'contentHash':_0x5c518e[_0xb388e5(0x106)]['contentHash']};}function verifyCreatedState(_0x10e9b1,_0x53448e,_0x1d18ae){const _0x2e6567=a153_0x3e62a5;assertCompanyKnowledgeBase(_0x1d18ae,_0x10e9b1[_0x2e6567(0xfd)],_0x1d18ae['id']);const _0x5e1e9f=inspectKbContent(_0x1d18ae[_0x2e6567(0x106)]);if(_0x1d18ae[_0x2e6567(0xe5)]!==_0x53448e[_0x2e6567(0xe5)]||_0x5e1e9f[_0x2e6567(0x100)]!==_0x53448e['content'][_0x2e6567(0x100)])throw kbError('kb_verification_failed','Company\x20knowledge\x20base\x20'+_0x1d18ae['id']+_0x2e6567(0xef),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x1d18ae['id']+_0x2e6567(0x10a));return projectKb(_0x1d18ae);}export const kbCreate={'service':'kb','command':'create','description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':a153_0x3e62a5(0xf0),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a153_0x3e62a5(0xe5),'type':a153_0x3e62a5(0xf2),'required':!![],'description':a153_0x3e62a5(0xfa)},{'name':a153_0x3e62a5(0xf5),'type':'string','required':!![],'description':a153_0x3e62a5(0xfb)}],async 'validate'(_0xc00128){readCreateInput(_0xc00128);},async 'dryRun'(_0xfc833a){const _0x52495d=a153_0x3e62a5,_0x12568a=await prepareCreate(_0xfc833a);return asDryRunResult({'operation':'create','selector':{'scope':_0x52495d(0xfe),'appCode':_0xfc833a[_0x52495d(0xfd)],'title':_0x12568a[_0x52495d(0xe5)]},'before':null,'after':plannedAfter(_0xfc833a,_0x12568a),'dryRun':!![],'backend':{'method':_0x52495d(0x105),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x52495d(0xf8)+JSON[_0x52495d(0xf3)](_0x12568a['title'])+_0x52495d(0x101)}},{'method':_0x52495d(0x105),'url':CREATE_PATH});},async 'execute'(_0x3bf031){const _0x4489f2=a153_0x3e62a5,_0x1258ac=await prepareCreate(_0x3bf031);let _0x53c97b,_0x400152=![];try{const _0x5be670=await createEnterpriseKnowledgeBase(_0x3bf031[_0x4489f2(0x104)],{'appCode':_0x3bf031[_0x4489f2(0xfd)],'title':_0x1258ac[_0x4489f2(0xe5)],'content':_0x1258ac[_0x4489f2(0x106)][_0x4489f2(0x106)]});assertCompanyKnowledgeBase(_0x5be670,_0x3bf031[_0x4489f2(0xfd)],_0x5be670['id']),_0x53c97b=_0x5be670['id'];}catch(_0x146b1b){if(!isPlatformTransportFailure(_0x146b1b))throw _0x146b1b;_0x400152=!![];}if(_0x53c97b===undefined){const _0x50121e=await verifyKbMutationReadback(_0x4489f2(0xeb),!![],()=>fetchAllCompanyKnowledgeBases(_0x3bf031,{'title':_0x1258ac[_0x4489f2(0xe5)]})),_0x1b826e=findExactCompanyKnowledgeBases(_0x50121e,_0x3bf031[_0x4489f2(0xfd)],_0x1258ac[_0x4489f2(0xe5)]);if(_0x1b826e['length']!==0x1)throw kbError(_0x4489f2(0xf9),_0x4489f2(0xe8)+_0x1b826e[_0x4489f2(0xe6)]+'.',_0x4489f2(0x10b));_0x53c97b=_0x1b826e[0x0]['id'];}const _0x22ae61=await verifyKbMutationReadback(_0x4489f2(0xeb),_0x400152,()=>requireKb(_0x3bf031,_0x53c97b)),_0x5d7840=verifyCreatedState(_0x3bf031,_0x1258ac,_0x22ae61),_0x4ba1a7=_0x400152?['Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x4489f2(0xeb),'selector':{'id':_0x5d7840['id'],'scope':'company','appCode':_0x5d7840[_0x4489f2(0xfd)]},'before':null,'after':_0x5d7840,'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':_0x4ba1a7,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x400152,'lookupCommand':_0x4489f2(0xff)+_0x5d7840['id']+_0x4489f2(0x101)}},'message':_0x4489f2(0xdf)+_0x5d7840['id']+_0x4489f2(0xe2)+_0x5d7840['appCode']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a154_0x2fbf2a=a154_0x3e8c;(function(_0x4e9935,_0xda8b9f){const _0x4e1c5e=a154_0x3e8c,_0x2435c8=_0x4e9935();while(!![]){try{const _0x5e3731=parseInt(_0x4e1c5e(0x108))/0x1*(parseInt(_0x4e1c5e(0xe9))/0x2)+-parseInt(_0x4e1c5e(0xee))/0x3*(parseInt(_0x4e1c5e(0xf4))/0x4)+parseInt(_0x4e1c5e(0x105))/0x5*(parseInt(_0x4e1c5e(0xeb))/0x6)+parseInt(_0x4e1c5e(0xe6))/0x7*(-parseInt(_0x4e1c5e(0xf5))/0x8)+parseInt(_0x4e1c5e(0xec))/0x9*(-parseInt(_0x4e1c5e(0xf0))/0xa)+-parseInt(_0x4e1c5e(0xfb))/0xb+parseInt(_0x4e1c5e(0x106))/0xc;if(_0x5e3731===_0xda8b9f)break;else _0x2435c8['push'](_0x2435c8['shift']());}catch(_0x989593){_0x2435c8['push'](_0x2435c8['shift']());}}}(a154_0x534a,0x32c6f));function a154_0x3e8c(_0x16ea2c,_0x3b73a7){_0x16ea2c=_0x16ea2c-0xe6;const _0x534a11=a154_0x534a();let _0x3e8cc3=_0x534a11[_0x16ea2c];return _0x3e8cc3;}import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a154_0x534a(){const _0x39f631=['flag','10fmAciv','9734568JoHTAM','kb_expected_version_invalid','1pZRzwO','\x20remains\x20readable\x20after\x20delete.','84uFxlyx','Company\x20knowledge-base\x20id','expected-version','137128hAKXNi','Soft-deleted\x20company\x20knowledge\x20base\x20','1024722qXbupR','25227EDMGYK','no_op','51aFziob','already_absent','1000XnzIsI','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','rabetbase\x20kb\x20detail\x20--id\x20','number','80588aCfZqY','194280CWgAVH','delete','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','unshift','isSafeInteger','POST','1090650jMHPTH','kb_delete_outcome_unknown','snapshotHash','company','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','Company\x20knowledge\x20base\x20','\x20--format\x20compress','high-risk-write','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app'];a154_0x534a=function(){return _0x39f631;};return a154_0x534a();}import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH='/admin/knowledge-base/delete',RAG_WARNING=a154_0x2fbf2a(0xf7),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.';function readExpectedVersion(_0x5b4d0e){const _0x50d7f3=a154_0x2fbf2a,_0x41fad8=_0x5b4d0e[_0x50d7f3(0x104)](_0x50d7f3(0xe8));if(_0x41fad8===undefined)return undefined;const _0x34febb=Number(_0x41fad8);if(!Number[_0x50d7f3(0xf9)](_0x34febb)||_0x34febb<0x0)throw kbError(_0x50d7f3(0x107),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');return _0x34febb;}function noOpData(_0x1764ce,_0x1627cf,_0x384478){const _0x37a509=a154_0x2fbf2a;return{'operation':_0x37a509(0xed),'selector':{'id':_0x1627cf,'scope':'company','appCode':_0x1764ce['appCode']},'before':null,'after':null,'dryRun':_0x384478,'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[],'verification':{'status':_0x37a509(0xef),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a154_0x2fbf2a(0xf6),'description':a154_0x2fbf2a(0x103),'risk':a154_0x2fbf2a(0x102),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'number','required':!![],'description':a154_0x2fbf2a(0xe7)},{'name':'expected-version','type':a154_0x2fbf2a(0xf3),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x39600d){readKbId(_0x39600d),readExpectedVersion(_0x39600d),requireKbExplicitYes(_0x39600d);},async 'dryRun'(_0xc4ab1a){const _0x5c2a8d=a154_0x2fbf2a,_0x583e95=readKbId(_0xc4ab1a),_0x48e8d3=readExpectedVersion(_0xc4ab1a),_0x394947=await getKbOrNull(_0xc4ab1a,_0x583e95);if(!_0x394947)return asDryRunResult(noOpData(_0xc4ab1a,_0x583e95,!![]),{'method':_0x5c2a8d(0xfa),'url':DELETE_PATH});assertExpectedKbVersion(_0x394947,_0x48e8d3);const _0xe35d6d=projectKb(_0x394947),_0x530f94=[RAG_WARNING];if(_0x48e8d3!==undefined)_0x530f94['unshift'](NON_ATOMIC_WARNING);return asDryRunResult({'operation':'delete','selector':{'id':_0xe35d6d['id'],'scope':'company','appCode':_0xe35d6d['appCode']},'before':_0xe35d6d,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x5c2a8d(0xfa),'path':DELETE_PATH},'warnings':_0x530f94,'verification':{'expectedVersion':_0x48e8d3??null,'atomicCompareAndSet':![],'snapshotHash':_0xe35d6d[_0x5c2a8d(0xfd)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x5c2a8d(0xf2)+_0xe35d6d['id']+_0x5c2a8d(0x101)}},{'method':_0x5c2a8d(0xfa),'url':DELETE_PATH});},async 'execute'(_0x5ece12){const _0x4ad1ba=a154_0x2fbf2a;requireKbExplicitYes(_0x5ece12);const _0x48aabc=readKbId(_0x5ece12),_0x296177=readExpectedVersion(_0x5ece12),_0xf15a7a=await getKbOrNull(_0x5ece12,_0x48aabc);if(!_0xf15a7a)return{'ok':!![],'data':noOpData(_0x5ece12,_0x48aabc,![]),'message':'Company\x20knowledge\x20base\x20'+_0x48aabc+_0x4ad1ba(0xf1)};assertExpectedKbVersion(_0xf15a7a,_0x296177);const _0x1c90b7=projectKb(_0xf15a7a);let _0x4f0919=![];try{await deleteEnterpriseKnowledgeBase(_0x5ece12['cookie'],_0x48aabc);}catch(_0x57db17){if(!isPlatformTransportFailure(_0x57db17))throw _0x57db17;_0x4f0919=!![];}const _0x2ac118=await verifyKbMutationReadback(_0x4ad1ba(0xf6),_0x4f0919,()=>getKbOrNull(_0x5ece12,_0x48aabc));if(_0x2ac118)throw kbError(_0x4f0919?_0x4ad1ba(0xfc):'kb_verification_failed',_0x4ad1ba(0x100)+_0x48aabc+_0x4ad1ba(0x109),_0x4ad1ba(0xff)+_0x48aabc+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x3934b6=[RAG_WARNING];if(_0x296177!==undefined)_0x3934b6[_0x4ad1ba(0xf8)](NON_ATOMIC_WARNING);return _0x4f0919&&_0x3934b6['unshift']('Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x4ad1ba(0xf6),'selector':{'id':_0x1c90b7['id'],'scope':_0x4ad1ba(0xfe),'appCode':_0x1c90b7['appCode']},'before':_0x1c90b7,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x4ad1ba(0xfa),'path':DELETE_PATH},'warnings':_0x3934b6,'verification':{'status':'verified','databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x4f0919,'lookupCommand':_0x4ad1ba(0xf2)+_0x1c90b7['id']+_0x4ad1ba(0x101)}},'message':_0x4ad1ba(0xea)+_0x1c90b7['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a155_0x2813(){const _0x1079dc=['491136WPvxeD','detail','178281kdWVtu','385620SBZwiU','content','7fNJdLg','13073380YQiHPZ','Loaded\x20company\x20knowledge\x20base\x20','Company\x20knowledge-base\x20id','11nCuGgC','192488BYhiUo','read','4LgvRPI','number','2759235OslGfX','1191120IPUznk'];a155_0x2813=function(){return _0x1079dc;};return a155_0x2813();}const a155_0x3b7981=a155_0x5d0e;(function(_0xdc6f57,_0x37e5ac){const _0x5dbd1c=a155_0x5d0e,_0x6378a=_0xdc6f57();while(!![]){try{const _0x39cb83=parseInt(_0x5dbd1c(0x7b))/0x1*(-parseInt(_0x5dbd1c(0x7c))/0x2)+-parseInt(_0x5dbd1c(0x81))/0x3+parseInt(_0x5dbd1c(0x7e))/0x4*(parseInt(_0x5dbd1c(0x80))/0x5)+-parseInt(_0x5dbd1c(0x85))/0x6*(-parseInt(_0x5dbd1c(0x87))/0x7)+parseInt(_0x5dbd1c(0x82))/0x8+parseInt(_0x5dbd1c(0x84))/0x9+parseInt(_0x5dbd1c(0x88))/0xa;if(_0x39cb83===_0x37e5ac)break;else _0x6378a['push'](_0x6378a['shift']());}catch(_0x3a5dc3){_0x6378a['push'](_0x6378a['shift']());}}}(a155_0x2813,0x86044));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';function a155_0x5d0e(_0x2ebf5e,_0x446679){_0x2ebf5e=_0x2ebf5e-0x7a;const _0x2813fe=a155_0x2813();let _0x5d0ece=_0x2813fe[_0x2ebf5e];return _0x5d0ece;}export const kbDetail={'service':'kb','command':a155_0x3b7981(0x83),'description':'Show\x20one\x20company\x20knowledge\x20base\x20with\x20full\x20content\x20for\x20the\x20resolved\x20app','risk':a155_0x3b7981(0x7d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a155_0x3b7981(0x7f),'required':!![],'description':a155_0x3b7981(0x7a)}],async 'validate'(_0x38c38d){readKbId(_0x38c38d);},async 'execute'(_0x324dba){const _0x2dbc26=a155_0x3b7981,_0x315260=readKbId(_0x324dba),_0x211831=await requireKb(_0x324dba,_0x315260);return{'ok':!![],'data':{'knowledgeBase':{...projectKb(_0x211831),'content':_0x211831[_0x2dbc26(0x86)]}},'message':_0x2dbc26(0x89)+_0x315260};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x229b50,_0x4bfd70){const _0x365373=a156_0x4917,_0x4abe36=_0x229b50();while(!![]){try{const _0x4f3366=parseInt(_0x365373(0x1fa))/0x1*(-parseInt(_0x365373(0x1f9))/0x2)+parseInt(_0x365373(0x1fb))/0x3*(parseInt(_0x365373(0x1fd))/0x4)+parseInt(_0x365373(0x1f8))/0x5*(-parseInt(_0x365373(0x1fc))/0x6)+parseInt(_0x365373(0x1f4))/0x7+-parseInt(_0x365373(0x1f3))/0x8+-parseInt(_0x365373(0x1f6))/0x9*(-parseInt(_0x365373(0x1f5))/0xa)+-parseInt(_0x365373(0x1fe))/0xb*(-parseInt(_0x365373(0x1f7))/0xc);if(_0x4f3366===_0x4bfd70)break;else _0x4abe36['push'](_0x4abe36['shift']());}catch(_0x35d6d9){_0x4abe36['push'](_0x4abe36['shift']());}}}(a156_0x40c2,0xd718d));import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';import{kbSearch}from'../../commands/kb/search.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';function a156_0x4917(_0x2426eb,_0x146b2d){_0x2426eb=_0x2426eb-0x1f3;const _0x40c2df=a156_0x40c2();let _0x491758=_0x40c2df[_0x2426eb];return _0x491758;}function a156_0x40c2(){const _0x5b2235=['4qqVFic','423293pERZtg','31947xqFoOQ','30xycRNf','72eypffM','1715791XJPUiy','9457328AdbfSr','4726330ICLrDQ','20FiyDqq','950364ycTJhf','240dDizGb','1287895BBmcme'];a156_0x40c2=function(){return _0x5b2235;};return a156_0x40c2();}import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete];
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a157_0x4dc0cb=a157_0x1c20;(function(_0x246e88,_0x4659d6){const _0x422341=a157_0x1c20,_0x355bd9=_0x246e88();while(!![]){try{const _0x430fae=parseInt(_0x422341(0x1a8))/0x1*(-parseInt(_0x422341(0x1a6))/0x2)+parseInt(_0x422341(0x1a2))/0x3*(parseInt(_0x422341(0x1ad))/0x4)+parseInt(_0x422341(0x1a9))/0x5*(-parseInt(_0x422341(0x1a3))/0x6)+-parseInt(_0x422341(0x1a1))/0x7*(-parseInt(_0x422341(0x1b3))/0x8)+-parseInt(_0x422341(0x1a5))/0x9*(-parseInt(_0x422341(0x1b1))/0xa)+-parseInt(_0x422341(0x1a7))/0xb+-parseInt(_0x422341(0x1ae))/0xc;if(_0x430fae===_0x4659d6)break;else _0x355bd9['push'](_0x355bd9['shift']());}catch(_0x542366){_0x355bd9['push'](_0x355bd9['shift']());}}}(a157_0x4aea,0x79b91));function a157_0x1c20(_0xdf152,_0x197001){_0xdf152=_0xdf152-0x1a0;const _0x4aeab7=a157_0x4aea();let _0x1c209f=_0x4aeab7[_0xdf152];return _0x1c209f;}function a157_0x4aea(){const _0x2f9a73=['479922RPkMhv','map','5113593UpSOuU','26iDNrfp','389367SldWKN','24018oZmoZK','15XrgUgj','appCode','list','title','4DWCCpn','7948068bgsrWi','string','Filter\x20by\x20knowledge-base\x20title','10qCcNTk','\x20company\x20knowledge\x20base(s)\x20for\x20','8lJFspv','length','str','1928136AsnLqc','2714649FgHcdr'];a157_0x4aea=function(){return _0x2f9a73;};return a157_0x4aea();}import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a157_0x4dc0cb(0x1ab),'description':'List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a157_0x4dc0cb(0x1ac),'type':a157_0x4dc0cb(0x1af),'required':![],'description':a157_0x4dc0cb(0x1b0)}],async 'execute'(_0x392985){const _0x367d1f=a157_0x4dc0cb,_0x1f13cd=_0x392985[_0x367d1f(0x1a0)]('title')['trim'](),_0x5d4106=await fetchAllCompanyKnowledgeBases(_0x392985,{..._0x1f13cd?{'title':_0x1f13cd}:{}}),_0x6493e2=_0x5d4106[_0x367d1f(0x1a4)](projectKb);return{'ok':!![],'data':{'total':_0x6493e2[_0x367d1f(0x1b4)],'knowledgeBases':_0x6493e2},'message':'Found\x20'+_0x6493e2[_0x367d1f(0x1b4)]+_0x367d1f(0x1b2)+_0x392985[_0x367d1f(0x1aa)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x141380=a158_0x504f;(function(_0x17fc40,_0x270b9c){const _0x6aa2e=a158_0x504f,_0x1a295a=_0x17fc40();while(!![]){try{const _0x598b87=-parseInt(_0x6aa2e(0xf2))/0x1*(parseInt(_0x6aa2e(0xfd))/0x2)+parseInt(_0x6aa2e(0xf0))/0x3+parseInt(_0x6aa2e(0xf9))/0x4*(parseInt(_0x6aa2e(0x100))/0x5)+-parseInt(_0x6aa2e(0xe5))/0x6+parseInt(_0x6aa2e(0xfc))/0x7+-parseInt(_0x6aa2e(0xf1))/0x8+parseInt(_0x6aa2e(0xfb))/0x9;if(_0x598b87===_0x270b9c)break;else _0x1a295a['push'](_0x1a295a['shift']());}catch(_0x464ef1){_0x1a295a['push'](_0x1a295a['shift']());}}}(a158_0x105b,0x7c844));import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';function a158_0x105b(){const _0x3e62c1=['Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20--kb-service-url\x20<https-origin>\x20for\x20this\x20request.','signal','2502805RlTMSo','topk','read','str','string','3041376NGIyaJ','total','search','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Found\x20','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','kb-service-url','flag','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','trim','571215ihLbmc','4788096QhLFXo','4NTuWRn','Company\x20and\x20public\x20knowledge\x20search\x20query','Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return','query','\x20company/public\x20knowledge\x20hit(s)\x20for\x20','appCode','cookie','4LvSokt','validation','4337424izylGP','6006966zMrSvt','207806ibuczf'];a158_0x105b=function(){return _0x3e62c1;};return a158_0x105b();}function readSearchQuery(_0x425f9e){const _0x13065a=a158_0x504f,_0x340831=_0x425f9e['str'](_0x13065a(0xf5))[_0x13065a(0xef)]();if(!_0x340831)throw CliErrors[_0x13065a(0xfa)]('Search\x20query\x20is\x20required.');return _0x340831;}function a158_0x504f(_0x42f7cc,_0x59f705){_0x42f7cc=_0x42f7cc-0xe3;const _0x105bb2=a158_0x105b();let _0x504ff3=_0x105bb2[_0x42f7cc];return _0x504ff3;}function readSearchTopK(_0x2e942c){const _0x36a6ce=a158_0x504f,_0x110743=_0x2e942c[_0x36a6ce(0xec)](_0x36a6ce(0x101));if(_0x110743===undefined||_0x110743===null||_0x110743==='')return undefined;const _0x50d4d4=_0x2e942c['num'](_0x36a6ce(0x101));if(!Number['isSafeInteger'](_0x50d4d4)||_0x50d4d4<0x1||_0x50d4d4>0x32)throw CliErrors[_0x36a6ce(0xfa)](_0x36a6ce(0xe8));return _0x50d4d4;}function readSearchServiceUrl(_0x3c91c0){const _0x47f83f=a158_0x504f;if(_0x3c91c0[_0x47f83f(0xec)]('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x3c91c0[_0x47f83f(0xe3)](_0x47f83f(0xeb)));const _0x3959b0=getKbServiceDomain();if(!_0x3959b0)throw CliErrors[_0x47f83f(0xfa)](_0x47f83f(0xee),_0x47f83f(0xfe));return normalizeKbServiceOrigin(_0x3959b0);}export const kbSearch={'service':'kb','command':a158_0x141380(0xe7),'description':a158_0x141380(0xed),'risk':a158_0x141380(0x102),'requiresAppCode':!![],'structuredErrors':!![],'strictFlags':!![],'flags':[{'name':'query','type':a158_0x141380(0xe4),'required':!![],'description':a158_0x141380(0xf3)},{'name':a158_0x141380(0x101),'type':'number','required':![],'description':a158_0x141380(0xf4)},{'name':a158_0x141380(0xeb),'type':a158_0x141380(0xe4),'required':![],'description':a158_0x141380(0xea)}],async 'validate'(_0x4c720b){readSearchQuery(_0x4c720b),readSearchTopK(_0x4c720b),readSearchServiceUrl(_0x4c720b);},async 'execute'(_0x380cb1){const _0x143037=a158_0x141380,_0x531999=readSearchQuery(_0x380cb1),_0x2156af=readSearchTopK(_0x380cb1),_0x137b64=readSearchServiceUrl(_0x380cb1),_0x2c382f={'cookie':_0x380cb1[_0x143037(0xf8)],'query':_0x531999,'appCode':_0x380cb1[_0x143037(0xf7)],..._0x2156af!==undefined?{'topK':_0x2156af}:{},'signal':_0x380cb1[_0x143037(0xff)]},_0x53619b=await searchDirectKnowledge({..._0x2c382f,'serviceUrl':_0x137b64});return{'ok':!![],'data':_0x53619b,'message':_0x143037(0xe9)+_0x53619b[_0x143037(0xe6)]+_0x143037(0xf6)+_0x380cb1[_0x143037(0xf7)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a152_0x5cb4eb=a152_0x72e0;(function(_0x1201e8,_0x1202a4){const _0x1d0a00=a152_0x72e0,_0x106c33=_0x1201e8();while(!![]){try{const _0x5933e4=-parseInt(_0x1d0a00(0x153))/0x1+-parseInt(_0x1d0a00(0x13e))/0x2+-parseInt(_0x1d0a00(0x10d))/0x3+parseInt(_0x1d0a00(0x102))/0x4+parseInt(_0x1d0a00(0x105))/0x5*(-parseInt(_0x1d0a00(0x137))/0x6)+-parseInt(_0x1d0a00(0x109))/0x7+parseInt(_0x1d0a00(0x152))/0x8;if(_0x5933e4===_0x1202a4)break;else _0x106c33['push'](_0x106c33['shift']());}catch(_0x4a1147){_0x106c33['push'](_0x106c33['shift']());}}}(a152_0x3649,0x30f59));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{getEnterpriseKnowledgeBase,getPlatformErrorCode,listEnterpriseKnowledgeBases}from'../../core/api-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a152_0x5cb4eb(0x11f);function a152_0x72e0(_0x460ed1,_0x32c08b){_0x460ed1=_0x460ed1-0xfc;const _0x3649a0=a152_0x3649();let _0x72e09a=_0x3649a0[_0x460ed1];return _0x72e09a;}export function kbError(_0x584cea,_0x49b209,_0x4cf799){return new CliError(_0x584cea,0x1,_0x49b209,_0x4cf799);}export function readKbId(_0x17d6e8){const _0x4806bc=a152_0x5cb4eb,_0xa8aacb=_0x17d6e8[_0x4806bc(0x114)]('id');if(!Number['isSafeInteger'](_0xa8aacb)||_0xa8aacb<=0x0)throw kbError(_0x4806bc(0x113),_0x4806bc(0x110));return _0xa8aacb;}export function requireKbExplicitYes(_0x19c774){const _0x4f8a05=a152_0x5cb4eb;if(_0x19c774[_0x4f8a05(0x131)](_0x4f8a05(0x130))||_0x19c774['bool'](_0x4f8a05(0x135)))return;throw kbError('kb_confirmation_required',_0x4f8a05(0x10a),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}function sha256(_0x27afe1){const _0x45bb86=a152_0x5cb4eb;return _0x45bb86(0x106)+createHash(_0x45bb86(0x141))[_0x45bb86(0x14b)](_0x27afe1)[_0x45bb86(0x149)](_0x45bb86(0x128));}export function inspectKbContent(_0x49bce8){const _0x4946a5=a152_0x5cb4eb,_0x4c5a38=Buffer['from'](_0x49bce8,_0x4946a5(0x133));return{'content':_0x49bce8,'byteSize':_0x4c5a38[_0x4946a5(0x14a)],'contentHash':sha256(_0x4c5a38)};}export async function readKbFile(_0x5a80ab){const _0x6c2730=a152_0x5cb4eb,_0x3284e6=_0x5a80ab[_0x6c2730(0x104)]();if(!_0x3284e6)throw kbError('kb_file_required',_0x6c2730(0x11c),_0x6c2730(0x146));const _0x54b543=resolve(_0x3284e6);let _0x2752ab;try{_0x2752ab=await stat(_0x54b543);}catch(_0x28525f){throw kbError('kb_file_unreadable',_0x6c2730(0x129)+_0x3284e6,_0x28525f instanceof Error?_0x28525f['message']:String(_0x28525f));}if(!_0x2752ab['isFile']())throw kbError('kb_file_invalid',_0x6c2730(0x100)+_0x3284e6);let _0x1d51c3;try{_0x1d51c3=await readFile(_0x54b543);}catch(_0x35a437){throw kbError(_0x6c2730(0x11e),_0x6c2730(0x108)+_0x3284e6,_0x35a437 instanceof Error?_0x35a437[_0x6c2730(0x115)]:String(_0x35a437));}let _0x46c768;try{_0x46c768=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x6c2730(0x11d)](_0x1d51c3);}catch{throw kbError(_0x6c2730(0x13f),_0x6c2730(0x121)+_0x3284e6);}if(!_0x46c768[_0x6c2730(0x104)]())throw kbError(_0x6c2730(0x13f),_0x6c2730(0x118)+_0x3284e6);return inspectKbContent(_0x46c768);}function a152_0x3649(){const _0x485b77=['kb_list_contract_invalid','1280868JCHtFv','cause','trim','315eQAYhW','sha256:','updateTime','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','2052414EWsska','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','kb_response_invalid','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','792552YLuVsW','outcome_unknown','Knowledge-base\x20get-one\x20returned\x20id\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','kb_scope_mismatch','\x20while\x20page\x20','kb_id_invalid','num','message','cookie','filter','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','appCode','kb_state_drift','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','decode','kb_file_unreadable','306','content','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','add','isSafeInteger','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','string','length','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','hex','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','\x20response\x20is\x20missing\x20','totalCount','paging','version','title','\x20is\x20not\x20company-scoped.','dry-run','bool','The\x20','utf8','\x20during\x20paging.','yes','currentPage','25626xGEbbE','\x20was\x20requested.','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','allowEmpty','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','company','items','506862djlVCd','kb_content_invalid','Knowledge-base\x20list\x20total\x20changed\x20from\x20','sha256','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','kb_','\x20response\x20contains\x20an\x20invalid\x20version.','Knowledge-base\x20list\x20returned\x20page\x20','Pass\x20--file\x20<knowledge.md>.','push','stringify','digest','byteLength','update','\x20while\x20id\x20','verification_unavailable','Company\x20knowledge\x20base\x20not\x20found:\x20','Knowledge\x20base\x20','scope','kb_not_found','9127104gvtMiS','180678JHxpSQ','createTime','contentHash','\x20of\x20','\x20version\x20changed:\x20expected\x20','\x20records.','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'];a152_0x3649=function(){return _0x485b77;};return a152_0x3649();}export async function verifyKbMutationReadback(_0x4ed8aa,_0x28caaf,_0x26840b){const _0x3e23fb=a152_0x5cb4eb;try{return await _0x26840b();}catch(_0x4d9497){const _0x47a070=kbError(_0x3e23fb(0x143)+_0x4ed8aa+'_'+(_0x28caaf?_0x3e23fb(0x10e):_0x3e23fb(0x14d)),_0x3e23fb(0x132)+_0x4ed8aa+_0x3e23fb(0x10c),_0x3e23fb(0x119));Object['defineProperty'](_0x47a070,_0x3e23fb(0x103),{'value':_0x4d9497,'enumerable':![]});throw _0x47a070;}}function requireRecordText(_0x1dcc8a,_0x1e28cd,_0x796e34,_0x2b7b27={}){const _0x42fd2f=a152_0x5cb4eb;if(typeof _0x1dcc8a===_0x42fd2f(0x125)&&(_0x2b7b27[_0x42fd2f(0x13a)]||_0x1dcc8a[_0x42fd2f(0x104)]()))return _0x1dcc8a;throw kbError('kb_response_invalid',_0x42fd2f(0x14f)+String(_0x796e34)+_0x42fd2f(0x12a)+_0x1e28cd+'.');}export function projectKb(_0x2a12df){const _0x148d06=a152_0x5cb4eb;if(!Number[_0x148d06(0x123)](_0x2a12df['id'])||_0x2a12df['id']<=0x0)throw kbError(_0x148d06(0x10b),_0x148d06(0x127));if(!Number[_0x148d06(0x123)](_0x2a12df[_0x148d06(0x12d)])||_0x2a12df['version']<0x0)throw kbError(_0x148d06(0x10b),_0x148d06(0x14f)+_0x2a12df['id']+_0x148d06(0x144));if(_0x2a12df['scope']!==_0x148d06(0x13c))throw kbError('kb_scope_mismatch',_0x148d06(0x14f)+_0x2a12df['id']+_0x148d06(0x12f));const _0x183a3a=requireRecordText(_0x2a12df['appCode'],_0x148d06(0x11a),_0x2a12df['id']),_0x334dac=requireRecordText(_0x2a12df['title'],_0x148d06(0x12e),_0x2a12df['id']),_0x294d90=inspectKbContent(requireRecordText(_0x2a12df[_0x148d06(0x120)],'content',_0x2a12df['id'],{'allowEmpty':!![]})),_0x54ba5d=typeof _0x2a12df[_0x148d06(0x154)]===_0x148d06(0x125)||typeof _0x2a12df[_0x148d06(0x154)]==='number'?_0x2a12df[_0x148d06(0x154)]:undefined,_0x5f53ce=typeof _0x2a12df[_0x148d06(0x107)]===_0x148d06(0x125)||typeof _0x2a12df[_0x148d06(0x107)]==='number'?_0x2a12df['updateTime']:undefined,_0x4c17fe=sha256(JSON[_0x148d06(0x148)]({'id':_0x2a12df['id'],'scope':_0x2a12df[_0x148d06(0x150)],'appCode':_0x183a3a,'title':_0x334dac,'version':_0x2a12df[_0x148d06(0x12d)],'contentHash':_0x294d90[_0x148d06(0xfc)],'createTime':_0x54ba5d,'updateTime':_0x5f53ce}));return{'id':_0x2a12df['id'],'scope':'company','appCode':_0x183a3a,'title':_0x334dac,'version':_0x2a12df[_0x148d06(0x12d)],'contentByteSize':_0x294d90['byteSize'],'contentHash':_0x294d90[_0x148d06(0xfc)],'snapshotHash':_0x4c17fe,..._0x54ba5d!==undefined?{'createTime':_0x54ba5d}:{},..._0x5f53ce!==undefined?{'updateTime':_0x5f53ce}:{}};}export function assertCompanyKnowledgeBase(_0x358c86,_0x38aee7,_0x2a1d6c){const _0x3ca3f2=a152_0x5cb4eb;if(_0x2a1d6c!==undefined&&_0x358c86['id']!==_0x2a1d6c)throw kbError(_0x3ca3f2(0x10b),_0x3ca3f2(0x10f)+_0x358c86['id']+_0x3ca3f2(0x14c)+_0x2a1d6c+_0x3ca3f2(0x138));if(_0x358c86['scope']!==_0x3ca3f2(0x13c)||_0x358c86[_0x3ca3f2(0x11a)]!==_0x38aee7)throw kbError(_0x3ca3f2(0x111),_0x3ca3f2(0x14f)+_0x358c86['id']+_0x3ca3f2(0x124)+_0x38aee7+'.');}export async function fetchAllCompanyKnowledgeBases(_0x4a15ea,_0x383d78){const _0x40f0f8=a152_0x5cb4eb,_0x41509c=[],_0xbaf9b7=new Set();let _0x2b26a1=0x1,_0xa15a3a=0x0,_0x5ed109;while(!![]){const _0x80cee1=await listEnterpriseKnowledgeBases(_0x4a15ea[_0x40f0f8(0x116)],{'currentPage':_0x2b26a1,'pageSize':LIST_PAGE_SIZE,'appCode':_0x4a15ea['appCode'],..._0x383d78}),_0x25528d=_0x80cee1[_0x40f0f8(0x12c)]?.[_0x40f0f8(0x12b)];if(_0x80cee1['paging']?.[_0x40f0f8(0x136)]!==undefined&&_0x80cee1['paging'][_0x40f0f8(0x136)]!==_0x2b26a1)throw kbError(_0x40f0f8(0x101),_0x40f0f8(0x145)+_0x80cee1[_0x40f0f8(0x12c)][_0x40f0f8(0x136)]+_0x40f0f8(0x112)+_0x2b26a1+'\x20was\x20requested.');if(_0x25528d!==undefined){if(_0x5ed109!==undefined&&_0x25528d!==_0x5ed109)throw kbError(_0x40f0f8(0x101),_0x40f0f8(0x140)+_0x5ed109+'\x20to\x20'+_0x25528d+_0x40f0f8(0x134),'Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.');_0x5ed109=_0x25528d;}for(const _0x29c437 of _0x80cee1['items']){if(!Number['isSafeInteger'](_0x29c437['id'])||_0xbaf9b7['has'](_0x29c437['id']))throw kbError(_0x40f0f8(0x101),_0x40f0f8(0x13b)+String(_0x29c437['id'])+'.');_0xbaf9b7[_0x40f0f8(0x122)](_0x29c437['id']),_0x29c437['scope']===_0x40f0f8(0x13c)&&_0x29c437[_0x40f0f8(0x11a)]===_0x4a15ea[_0x40f0f8(0x11a)]&&_0x41509c[_0x40f0f8(0x147)](_0x29c437);}_0xa15a3a+=_0x80cee1[_0x40f0f8(0x13d)][_0x40f0f8(0x126)];if(_0x25528d!==undefined&&_0xa15a3a>=_0x25528d)break;if(_0x80cee1[_0x40f0f8(0x13d)]['length']<LIST_PAGE_SIZE){if(_0x25528d!==undefined&&_0xa15a3a<_0x25528d)throw kbError(_0x40f0f8(0x101),'Knowledge-base\x20list\x20stopped\x20at\x20'+_0xa15a3a+_0x40f0f8(0xfd)+_0x25528d+_0x40f0f8(0xff));break;}_0x2b26a1+=0x1;}return _0x41509c;}export function findExactCompanyKnowledgeBases(_0x47da0b,_0x44ab1c,_0x520f8b){const _0x189e87=a152_0x5cb4eb;return _0x47da0b[_0x189e87(0x117)](_0x240196=>_0x240196['scope']===_0x189e87(0x13c)&&_0x240196[_0x189e87(0x11a)]===_0x44ab1c&&_0x240196[_0x189e87(0x12e)]===_0x520f8b);}export async function getKbOrNull(_0x263d41,_0x272112){const _0x19b9bc=a152_0x5cb4eb;try{const _0x301f1c=await getEnterpriseKnowledgeBase(_0x263d41[_0x19b9bc(0x116)],_0x272112);return assertCompanyKnowledgeBase(_0x301f1c,_0x263d41[_0x19b9bc(0x11a)],_0x272112),_0x301f1c;}catch(_0x28b152){if(getPlatformErrorCode(_0x28b152)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0x28b152;}}export async function requireKb(_0x4d06d3,_0x5b8f93){const _0xfc56a6=a152_0x5cb4eb,_0x5bf0e1=await getKbOrNull(_0x4d06d3,_0x5b8f93);if(!_0x5bf0e1)throw kbError(_0xfc56a6(0x151),_0xfc56a6(0x14e)+_0x5b8f93,_0xfc56a6(0x139));return _0x5bf0e1;}export function assertExpectedKbVersion(_0xcb66a7,_0xf2f3e){const _0xb55da0=a152_0x5cb4eb;if(_0xf2f3e===undefined||_0xcb66a7[_0xb55da0(0x12d)]===_0xf2f3e)return;throw kbError(_0xb55da0(0x11b),'Knowledge\x20base\x20'+_0xcb66a7['id']+_0xb55da0(0xfe)+_0xf2f3e+',\x20current\x20'+_0xcb66a7['version']+'.',_0xb55da0(0x142));}
|
|
1
|
+
const a159_0x557f4a=a159_0x5682;(function(_0x3e3811,_0x3ea004){const _0x244234=a159_0x5682,_0xae4cf9=_0x3e3811();while(!![]){try{const _0x26a8d2=-parseInt(_0x244234(0x18a))/0x1+-parseInt(_0x244234(0x1d6))/0x2+-parseInt(_0x244234(0x1bc))/0x3*(-parseInt(_0x244234(0x185))/0x4)+-parseInt(_0x244234(0x183))/0x5+-parseInt(_0x244234(0x194))/0x6*(-parseInt(_0x244234(0x1a1))/0x7)+parseInt(_0x244234(0x1a3))/0x8*(-parseInt(_0x244234(0x1d2))/0x9)+parseInt(_0x244234(0x186))/0xa;if(_0x26a8d2===_0x3ea004)break;else _0xae4cf9['push'](_0xae4cf9['shift']());}catch(_0x5df150){_0xae4cf9['push'](_0xae4cf9['shift']());}}}(a159_0xe163,0x21f5b));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{getEnterpriseKnowledgeBase,getPlatformErrorCode,listEnterpriseKnowledgeBases}from'../../core/api-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a159_0x557f4a(0x1ad);export function kbError(_0x1a686d,_0x5d8646,_0x208884){return new CliError(_0x1a686d,0x1,_0x5d8646,_0x208884);}function a159_0x5682(_0x281bd5,_0x19fe5b){_0x281bd5=_0x281bd5-0x17f;const _0xe163e4=a159_0xe163();let _0x56829e=_0xe163e4[_0x281bd5];return _0x56829e;}export function readKbId(_0x5df5f5){const _0x19394d=a159_0x557f4a,_0x253e4b=_0x5df5f5[_0x19394d(0x184)]('id');if(!Number[_0x19394d(0x1c0)](_0x253e4b)||_0x253e4b<=0x0)throw kbError(_0x19394d(0x1ab),_0x19394d(0x1b9));return _0x253e4b;}export function requireKbExplicitYes(_0x1373d5){const _0x364866=a159_0x557f4a;if(_0x1373d5[_0x364866(0x1a6)](_0x364866(0x192))||_0x1373d5[_0x364866(0x1a6)](_0x364866(0x1d3)))return;throw kbError(_0x364866(0x191),_0x364866(0x1ba),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}function sha256(_0x274c69){const _0x5ccd78=a159_0x557f4a;return _0x5ccd78(0x1ac)+createHash('sha256')[_0x5ccd78(0x18e)](_0x274c69)['digest'](_0x5ccd78(0x1cb));}export function inspectKbContent(_0x5bef02){const _0x19b672=a159_0x557f4a,_0x34dfb9=Buffer[_0x19b672(0x1a0)](_0x5bef02,_0x19b672(0x19a));return{'content':_0x5bef02,'byteSize':_0x34dfb9[_0x19b672(0x18d)],'contentHash':sha256(_0x34dfb9)};}export async function readKbFile(_0x42a4b5){const _0x29dbce=a159_0x557f4a,_0x4a9aa8=_0x42a4b5['trim']();if(!_0x4a9aa8)throw kbError(_0x29dbce(0x1d8),_0x29dbce(0x188),'Pass\x20--file\x20<knowledge.md>.');const _0x2d6df1=resolve(_0x4a9aa8);let _0xe36441;try{_0xe36441=await stat(_0x2d6df1);}catch(_0x26ed81){throw kbError(_0x29dbce(0x1c8),_0x29dbce(0x1c6)+_0x4a9aa8,_0x26ed81 instanceof Error?_0x26ed81[_0x29dbce(0x1b3)]:String(_0x26ed81));}if(!_0xe36441[_0x29dbce(0x1b6)]())throw kbError('kb_file_invalid','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x4a9aa8);let _0x5514e2;try{_0x5514e2=await readFile(_0x2d6df1);}catch(_0x5a86dc){throw kbError('kb_file_unreadable',_0x29dbce(0x1c7)+_0x4a9aa8,_0x5a86dc instanceof Error?_0x5a86dc[_0x29dbce(0x1b3)]:String(_0x5a86dc));}let _0x563069;try{_0x563069=new TextDecoder(_0x29dbce(0x1b5),{'fatal':!![],'ignoreBOM':!![]})[_0x29dbce(0x19e)](_0x5514e2);}catch{throw kbError(_0x29dbce(0x17f),_0x29dbce(0x18c)+_0x4a9aa8);}if(!_0x563069[_0x29dbce(0x1be)]())throw kbError('kb_content_invalid','Knowledge-base\x20content\x20file\x20is\x20blank:\x20'+_0x4a9aa8);return inspectKbContent(_0x563069);}export async function verifyKbMutationReadback(_0x2e557a,_0x3b60d4,_0x86a639){const _0xe8f5a9=a159_0x557f4a;try{return await _0x86a639();}catch(_0xc45a88){const _0x184cac=kbError(_0xe8f5a9(0x19f)+_0x2e557a+'_'+(_0x3b60d4?_0xe8f5a9(0x1c4):_0xe8f5a9(0x1bb)),_0xe8f5a9(0x180)+_0x2e557a+_0xe8f5a9(0x195),_0xe8f5a9(0x1bd));Object[_0xe8f5a9(0x1d4)](_0x184cac,'cause',{'value':_0xc45a88,'enumerable':![]});throw _0x184cac;}}function requireRecordText(_0x73f761,_0x10eb4b,_0x313994,_0x442a02={}){const _0x3514ef=a159_0x557f4a;if(typeof _0x73f761==='string'&&(_0x442a02[_0x3514ef(0x1c2)]||_0x73f761[_0x3514ef(0x1be)]()))return _0x73f761;throw kbError(_0x3514ef(0x1d0),_0x3514ef(0x1ae)+String(_0x313994)+_0x3514ef(0x1c3)+_0x10eb4b+'.');}export function projectKb(_0x149871){const _0x58438d=a159_0x557f4a;if(!Number[_0x58438d(0x1c0)](_0x149871['id'])||_0x149871['id']<=0x0)throw kbError(_0x58438d(0x1d0),_0x58438d(0x1d9));if(!Number[_0x58438d(0x1c0)](_0x149871['version'])||_0x149871['version']<0x0)throw kbError(_0x58438d(0x1d0),'Knowledge\x20base\x20'+_0x149871['id']+'\x20response\x20contains\x20an\x20invalid\x20version.');if(_0x149871[_0x58438d(0x1a9)]!==_0x58438d(0x1af))throw kbError(_0x58438d(0x1cd),'Knowledge\x20base\x20'+_0x149871['id']+'\x20is\x20not\x20company-scoped.');const _0x5d2267=requireRecordText(_0x149871[_0x58438d(0x1b1)],_0x58438d(0x1b1),_0x149871['id']),_0x594185=requireRecordText(_0x149871['title'],_0x58438d(0x1c9),_0x149871['id']),_0x537e73=inspectKbContent(requireRecordText(_0x149871[_0x58438d(0x199)],_0x58438d(0x199),_0x149871['id'],{'allowEmpty':!![]})),_0x492d0c=typeof _0x149871[_0x58438d(0x18b)]===_0x58438d(0x18f)||typeof _0x149871[_0x58438d(0x18b)]===_0x58438d(0x1b2)?_0x149871[_0x58438d(0x18b)]:undefined,_0x538d41=typeof _0x149871[_0x58438d(0x1a7)]===_0x58438d(0x18f)||typeof _0x149871[_0x58438d(0x1a7)]===_0x58438d(0x1b2)?_0x149871['updateTime']:undefined,_0x5a4bcf=sha256(JSON[_0x58438d(0x1c5)]({'id':_0x149871['id'],'scope':_0x149871['scope'],'appCode':_0x5d2267,'title':_0x594185,'version':_0x149871[_0x58438d(0x187)],'contentHash':_0x537e73[_0x58438d(0x1ca)],'createTime':_0x492d0c,'updateTime':_0x538d41}));return{'id':_0x149871['id'],'scope':_0x58438d(0x1af),'appCode':_0x5d2267,'title':_0x594185,'version':_0x149871['version'],'contentByteSize':_0x537e73[_0x58438d(0x1c1)],'contentHash':_0x537e73[_0x58438d(0x1ca)],'snapshotHash':_0x5a4bcf,..._0x492d0c!==undefined?{'createTime':_0x492d0c}:{},..._0x538d41!==undefined?{'updateTime':_0x538d41}:{}};}export function assertCompanyKnowledgeBase(_0x41e6e1,_0x2bb1f9,_0x38f2fa){const _0x43d92c=a159_0x557f4a;if(_0x38f2fa!==undefined&&_0x41e6e1['id']!==_0x38f2fa)throw kbError(_0x43d92c(0x1d0),_0x43d92c(0x182)+_0x41e6e1['id']+_0x43d92c(0x1a4)+_0x38f2fa+_0x43d92c(0x181));if(_0x41e6e1['scope']!==_0x43d92c(0x1af)||_0x41e6e1[_0x43d92c(0x1b1)]!==_0x2bb1f9)throw kbError('kb_scope_mismatch',_0x43d92c(0x1ae)+_0x41e6e1['id']+_0x43d92c(0x1aa)+_0x2bb1f9+'.');}export async function fetchAllCompanyKnowledgeBases(_0x31db93,_0x2feabe){const _0x5951cc=a159_0x557f4a,_0x5ede07=[],_0x468139=new Set();let _0x71c9f8=0x1,_0x30141f=0x0,_0x1dca28;while(!![]){const _0x202070=await listEnterpriseKnowledgeBases(_0x31db93[_0x5951cc(0x19c)],{'currentPage':_0x71c9f8,'pageSize':LIST_PAGE_SIZE,'appCode':_0x31db93[_0x5951cc(0x1b1)],..._0x2feabe}),_0x2a9633=_0x202070[_0x5951cc(0x1b0)]?.[_0x5951cc(0x190)];if(_0x202070[_0x5951cc(0x1b0)]?.['currentPage']!==undefined&&_0x202070['paging'][_0x5951cc(0x19b)]!==_0x71c9f8)throw kbError(_0x5951cc(0x1ce),_0x5951cc(0x1b7)+_0x202070[_0x5951cc(0x1b0)][_0x5951cc(0x19b)]+'\x20while\x20page\x20'+_0x71c9f8+'\x20was\x20requested.');if(_0x2a9633!==undefined){if(_0x1dca28!==undefined&&_0x2a9633!==_0x1dca28)throw kbError(_0x5951cc(0x1ce),_0x5951cc(0x189)+_0x1dca28+'\x20to\x20'+_0x2a9633+'\x20during\x20paging.',_0x5951cc(0x197));_0x1dca28=_0x2a9633;}for(const _0x54d66f of _0x202070[_0x5951cc(0x1d5)]){if(!Number[_0x5951cc(0x1c0)](_0x54d66f['id'])||_0x468139[_0x5951cc(0x193)](_0x54d66f['id']))throw kbError('kb_list_contract_invalid',_0x5951cc(0x1bf)+String(_0x54d66f['id'])+'.');_0x468139[_0x5951cc(0x1d7)](_0x54d66f['id']),_0x54d66f['scope']===_0x5951cc(0x1af)&&_0x54d66f[_0x5951cc(0x1b1)]===_0x31db93[_0x5951cc(0x1b1)]&&_0x5ede07[_0x5951cc(0x196)](_0x54d66f);}_0x30141f+=_0x202070['items'][_0x5951cc(0x1cc)];if(_0x2a9633!==undefined&&_0x30141f>=_0x2a9633)break;if(_0x202070['items']['length']<LIST_PAGE_SIZE){if(_0x2a9633!==undefined&&_0x30141f<_0x2a9633)throw kbError(_0x5951cc(0x1ce),_0x5951cc(0x1a2)+_0x30141f+_0x5951cc(0x1b4)+_0x2a9633+_0x5951cc(0x1d1));break;}_0x71c9f8+=0x1;}return _0x5ede07;}function a159_0xe163(){const _0x380775=['\x20version\x20changed:\x20expected\x20','scope','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','kb_id_invalid','sha256:','306','Knowledge\x20base\x20','company','paging','appCode','number','message','\x20of\x20','utf-8','isFile','Knowledge-base\x20list\x20returned\x20page\x20','filter','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','verification_unavailable','10977tvyhkU','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','trim','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','isSafeInteger','byteSize','allowEmpty','\x20response\x20is\x20missing\x20','outcome_unknown','stringify','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','kb_file_unreadable','title','contentHash','hex','length','kb_scope_mismatch','kb_list_contract_invalid','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','kb_response_invalid','\x20records.','125937IsAgKp','yes','defineProperty','items','485840KwZQwL','add','kb_file_required','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','kb_content_invalid','The\x20','\x20was\x20requested.','Knowledge-base\x20get-one\x20returned\x20id\x20','678960RjlygK','num','68mkqYAv','4092550QhhmsX','version','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','Knowledge-base\x20list\x20total\x20changed\x20from\x20','11329DhkHiS','createTime','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','byteLength','update','string','totalCount','kb_confirmation_required','dry-run','has','396XLscFa','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','push','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','content','utf8','currentPage','cookie','kb_not_found','decode','kb_','from','9086BmPJAx','Knowledge-base\x20list\x20stopped\x20at\x20','16QWMwqT','\x20while\x20id\x20',',\x20current\x20','bool','updateTime'];a159_0xe163=function(){return _0x380775;};return a159_0xe163();}export function findExactCompanyKnowledgeBases(_0x5f2c71,_0x3154cb,_0x467ed3){const _0x2a16d=a159_0x557f4a;return _0x5f2c71[_0x2a16d(0x1b8)](_0x1bfc41=>_0x1bfc41[_0x2a16d(0x1a9)]==='company'&&_0x1bfc41[_0x2a16d(0x1b1)]===_0x3154cb&&_0x1bfc41[_0x2a16d(0x1c9)]===_0x467ed3);}export async function getKbOrNull(_0x55546e,_0x50fbdd){const _0x5ea462=a159_0x557f4a;try{const _0x392108=await getEnterpriseKnowledgeBase(_0x55546e['cookie'],_0x50fbdd);return assertCompanyKnowledgeBase(_0x392108,_0x55546e[_0x5ea462(0x1b1)],_0x50fbdd),_0x392108;}catch(_0x5aeea1){if(getPlatformErrorCode(_0x5aeea1)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0x5aeea1;}}export async function requireKb(_0xdb90f9,_0xcef420){const _0x2330b4=a159_0x557f4a,_0xeeaf71=await getKbOrNull(_0xdb90f9,_0xcef420);if(!_0xeeaf71)throw kbError(_0x2330b4(0x19d),'Company\x20knowledge\x20base\x20not\x20found:\x20'+_0xcef420,_0x2330b4(0x1cf));return _0xeeaf71;}export function assertExpectedKbVersion(_0x2813cf,_0x426b85){const _0x31f748=a159_0x557f4a;if(_0x426b85===undefined||_0x2813cf[_0x31f748(0x187)]===_0x426b85)return;throw kbError('kb_state_drift',_0x31f748(0x1ae)+_0x2813cf['id']+_0x31f748(0x1a8)+_0x426b85+_0x31f748(0x1a5)+_0x2813cf[_0x31f748(0x187)]+'.',_0x31f748(0x198));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a160_0x325b26=a160_0x5af7;(function(_0x4b112c,_0x31c609){const _0x4ba272=a160_0x5af7,_0x44307e=_0x4b112c();while(!![]){try{const _0x5b28a8=-parseInt(_0x4ba272(0x1b0))/0x1*(-parseInt(_0x4ba272(0x1d3))/0x2)+-parseInt(_0x4ba272(0x1b3))/0x3+-parseInt(_0x4ba272(0x1bb))/0x4*(parseInt(_0x4ba272(0x1e3))/0x5)+parseInt(_0x4ba272(0x1ad))/0x6+-parseInt(_0x4ba272(0x1cf))/0x7+parseInt(_0x4ba272(0x1d0))/0x8*(parseInt(_0x4ba272(0x1c2))/0x9)+-parseInt(_0x4ba272(0x1e2))/0xa*(-parseInt(_0x4ba272(0x1e4))/0xb);if(_0x5b28a8===_0x31c609)break;else _0x44307e['push'](_0x44307e['shift']());}catch(_0x24878a){_0x44307e['push'](_0x44307e['shift']());}}}(a160_0x4882,0x3f29f));import{isPlatformTransportFailure,updateEnterpriseKnowledgeBase}from'../../core/api-client.js';function a160_0x4882(){const _0x415dfa=['content','151094OSWMqM','beforeRecord','Pass\x20at\x20least\x20one\x20of\x20--title\x20or\x20--file.','Updated\x20company\x20knowledge\x20base\x20','\x20--format\x20compress','cookie','expected-version','contentHash','company','before','planned','appCode','number','kb_title_invalid','--file\x20cannot\x20be\x20empty.','1670lBXPBc','5jCVkGI','65021qNyazn','flag','332496CXddIW','rabetbase\x20kb\x20detail\x20--id\x20','/admin/knowledge-base/update','1IURhYD','kb_verification_failed','--title\x20cannot\x20be\x20empty.','1411485oMfTPK','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','kb_update_empty','patch','file','push','expectedVersion','1225508KPQOjB','title','verified','kb_file_required','Update\x20a\x20company\x20knowledge\x20base\x20with\x20preflight\x20drift\x20protection','New\x20knowledge-base\x20title','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20update\x20contract\x20has\x20no\x20version\x20predicate.','15048kWQgkr','trim','update','kb_expected_version_invalid','isSafeInteger','\x20does\x20not\x20prove\x20the\x20requested\x20update\x20state.','replacement','version','Nothing\x20to\x20update.','POST','kb_update_outcome_unknown','Company\x20knowledge-base\x20id','snapshotHash','2731099ipreir','1472hgpCzX','string'];a160_0x4882=function(){return _0x415dfa;};return a160_0x4882();}function a160_0x5af7(_0x39776,_0x4c6351){_0x39776=_0x39776-0x1ad;const _0x4882da=a160_0x4882();let _0x5af7d0=_0x4882da[_0x39776];return _0x5af7d0;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,assertExpectedKbVersion,inspectKbContent,kbError,projectKb,readKbFile,readKbId,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';const UPDATE_PATH=a160_0x325b26(0x1af),NON_ATOMIC_WARNING=a160_0x325b26(0x1c1);function readUpdatePatch(_0x7bf008){const _0x31f4d9=a160_0x325b26,_0x2a9827=readKbId(_0x7bf008),_0x2635b8=_0x7bf008[_0x31f4d9(0x1e5)](_0x31f4d9(0x1bc)),_0x2cc537=_0x7bf008[_0x31f4d9(0x1e5)]('file'),_0x4bdf2f=_0x7bf008[_0x31f4d9(0x1e5)](_0x31f4d9(0x1d9)),_0x366bf0=_0x2635b8===undefined?undefined:String(_0x2635b8)[_0x31f4d9(0x1c3)]();if(_0x2635b8!==undefined&&!_0x366bf0)throw kbError(_0x31f4d9(0x1e0),_0x31f4d9(0x1b2));const _0x5f091d=_0x2cc537===undefined?undefined:String(_0x2cc537)[_0x31f4d9(0x1c3)]();if(_0x2cc537!==undefined&&!_0x5f091d)throw kbError(_0x31f4d9(0x1be),_0x31f4d9(0x1e1));if(_0x366bf0===undefined&&_0x5f091d===undefined)throw kbError(_0x31f4d9(0x1b6),_0x31f4d9(0x1ca),_0x31f4d9(0x1d5));let _0x4f1201;if(_0x4bdf2f!==undefined){_0x4f1201=Number(_0x4bdf2f);if(!Number[_0x31f4d9(0x1c6)](_0x4f1201)||_0x4f1201<0x0)throw kbError(_0x31f4d9(0x1c5),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');}return{'id':_0x2a9827,'title':_0x366bf0,'file':_0x5f091d,'expectedVersion':_0x4f1201};}async function prepareUpdate(_0x47e729){const _0x2170b1=a160_0x325b26,_0x2ec2bc=readUpdatePatch(_0x47e729),_0x310282=await requireKb(_0x47e729,_0x2ec2bc['id']);assertExpectedKbVersion(_0x310282,_0x2ec2bc[_0x2170b1(0x1ba)]);const _0x367942=_0x2ec2bc['file']?await readKbFile(_0x2ec2bc['file']):undefined,_0x78d5be=projectKb(_0x310282),_0x2e3730=projectKb({..._0x310282,..._0x2ec2bc[_0x2170b1(0x1bc)]!==undefined?{'title':_0x2ec2bc[_0x2170b1(0x1bc)]}:{},..._0x367942?{'content':_0x367942['content']}:{}});return{'patch':_0x2ec2bc,'beforeRecord':_0x310282,'before':_0x78d5be,'planned':_0x2e3730,'replacement':_0x367942};}export const kbUpdate={'service':'kb','command':a160_0x325b26(0x1c4),'description':a160_0x325b26(0x1bf),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a160_0x325b26(0x1df),'required':!![],'description':a160_0x325b26(0x1cd)},{'name':'title','type':a160_0x325b26(0x1d1),'required':![],'description':a160_0x325b26(0x1c0)},{'name':a160_0x325b26(0x1b8),'type':'string','required':![],'description':'Replacement\x20UTF-8\x20text\x20or\x20Markdown\x20content\x20file'},{'name':'expected-version','type':'number','required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x3e303a){readUpdatePatch(_0x3e303a);},async 'dryRun'(_0x4134bb){const _0x48d83c=a160_0x325b26,_0x4e2246=await prepareUpdate(_0x4134bb),_0x37f964=_0x4e2246[_0x48d83c(0x1b7)][_0x48d83c(0x1ba)]!==undefined?[NON_ATOMIC_WARNING]:[];return asDryRunResult({'operation':_0x48d83c(0x1c4),'selector':{'id':_0x4e2246['before']['id'],'scope':'company','appCode':_0x4e2246[_0x48d83c(0x1dc)][_0x48d83c(0x1de)]},'before':_0x4e2246[_0x48d83c(0x1dc)],'after':_0x4e2246[_0x48d83c(0x1dd)],'dryRun':!![],'backend':{'method':_0x48d83c(0x1cb),'path':UPDATE_PATH},'warnings':_0x37f964,'verification':{'expectedVersion':_0x4e2246[_0x48d83c(0x1b7)][_0x48d83c(0x1ba)]??null,'atomicCompareAndSet':![],'plannedSnapshotHash':_0x4e2246['before'][_0x48d83c(0x1ce)],'lookupCommand':_0x48d83c(0x1ae)+_0x4e2246[_0x48d83c(0x1dc)]['id']+_0x48d83c(0x1d7)}},{'method':_0x48d83c(0x1cb),'url':UPDATE_PATH});},async 'execute'(_0x27dd2b){const _0x5e9b37=a160_0x325b26,_0x32317f=await prepareUpdate(_0x27dd2b),_0x463dad={'id':_0x32317f['patch']['id'],..._0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)]!==undefined?{'title':_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)]}:{},..._0x32317f['replacement']?{'content':_0x32317f[_0x5e9b37(0x1c8)][_0x5e9b37(0x1d2)]}:{}};let _0x4dede7=![];try{const _0x205145=await updateEnterpriseKnowledgeBase(_0x27dd2b[_0x5e9b37(0x1d8)],_0x463dad);assertCompanyKnowledgeBase(_0x205145,_0x27dd2b[_0x5e9b37(0x1de)],_0x32317f[_0x5e9b37(0x1b7)]['id']);}catch(_0x2847a8){if(!isPlatformTransportFailure(_0x2847a8))throw _0x2847a8;_0x4dede7=!![];}const _0x1e64c9=await verifyKbMutationReadback(_0x5e9b37(0x1c4),_0x4dede7,()=>requireKb(_0x27dd2b,_0x32317f[_0x5e9b37(0x1b7)]['id'])),_0x271fba=projectKb(_0x1e64c9),_0x538a14=_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)]===undefined||_0x1e64c9[_0x5e9b37(0x1bc)]===_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)],_0x3580a2=!_0x32317f[_0x5e9b37(0x1c8)]||inspectKbContent(_0x1e64c9[_0x5e9b37(0x1d2)])[_0x5e9b37(0x1da)]===_0x32317f[_0x5e9b37(0x1c8)][_0x5e9b37(0x1da)],_0x2c84fc=!_0x32317f[_0x5e9b37(0x1c8)]||_0x1e64c9[_0x5e9b37(0x1c9)]>_0x32317f[_0x5e9b37(0x1d4)][_0x5e9b37(0x1c9)],_0x598f7c=!_0x4dede7||_0x32317f[_0x5e9b37(0x1c8)]!==undefined||_0x32317f[_0x5e9b37(0x1b7)]['title']===undefined||_0x32317f['beforeRecord'][_0x5e9b37(0x1bc)]!==_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)];if(!_0x538a14||!_0x3580a2||!_0x2c84fc||!_0x598f7c)throw kbError(_0x4dede7?_0x5e9b37(0x1cc):_0x5e9b37(0x1b1),'Company\x20knowledge\x20base\x20'+_0x32317f[_0x5e9b37(0x1b7)]['id']+_0x5e9b37(0x1c7),_0x5e9b37(0x1b5)+_0x32317f['patch']['id']+_0x5e9b37(0x1b4));const _0x47e0d0=[];return _0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1ba)]!==undefined&&_0x47e0d0[_0x5e9b37(0x1b9)](NON_ATOMIC_WARNING),_0x4dede7&&_0x47e0d0[_0x5e9b37(0x1b9)]('Update\x20response\x20was\x20unavailable;\x20verified\x20applicable\x20postconditions\x20by\x20exact\x20ID\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x5e9b37(0x1c4),'selector':{'id':_0x271fba['id'],'scope':_0x5e9b37(0x1db),'appCode':_0x271fba[_0x5e9b37(0x1de)]},'before':_0x32317f[_0x5e9b37(0x1dc)],'after':_0x271fba,'dryRun':![],'backend':{'method':_0x5e9b37(0x1cb),'path':UPDATE_PATH},'warnings':_0x47e0d0,'verification':{'status':_0x5e9b37(0x1bd),'recoveredAfterUnknownResponse':_0x4dede7,'expectedVersion':_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1ba)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x5e9b37(0x1ae)+_0x271fba['id']+_0x5e9b37(0x1d7)}},'message':_0x5e9b37(0x1d6)+_0x271fba['id']};}};
|