@lovrabet/rabetbase-cli 2.5.9 → 2.5.10-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 +1 -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.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/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.js +1 -1
- package/lib/commands/flow/publish.js +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.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.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.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/kb-management-client.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.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- 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 +2 -2
- package/skills/rabetbase/SKILL.md +2 -2
- package/skills/rabetbase-dataset-generation/SKILL.md +2 -2
- package/skills/rabetbase-page-generation/SKILL.md +2 -2
- package/skills/rabetbase.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a146_0x555832=a146_0x2c21;(function(_0x10144c,_0x279271){const _0x304af5=a146_0x2c21,_0x54a1b1=_0x10144c();while(!![]){try{const _0x3c0ddf=-parseInt(_0x304af5(0x7f))/0x1*(parseInt(_0x304af5(0x84))/0x2)+parseInt(_0x304af5(0x74))/0x3*(parseInt(_0x304af5(0x87))/0x4)+parseInt(_0x304af5(0x6b))/0x5*(parseInt(_0x304af5(0x70))/0x6)+-parseInt(_0x304af5(0x6c))/0x7+-parseInt(_0x304af5(0x7c))/0x8*(-parseInt(_0x304af5(0x68))/0x9)+parseInt(_0x304af5(0x80))/0xa+-parseInt(_0x304af5(0x7a))/0xb;if(_0x3c0ddf===_0x279271)break;else _0x54a1b1['push'](_0x54a1b1['shift']());}catch(_0x413e51){_0x54a1b1['push'](_0x54a1b1['shift']());}}}(a146_0x310f,0x8b397));import{getCurrentInstantApiPolicy,getInstantApiPolicyRevision,isPlatformTransportFailure,rollbackInstantApiPolicy}from'../../core/api-client.js';function a146_0x2c21(_0x11f6d8,_0x15de74){_0x11f6d8=_0x11f6d8-0x67;const _0x310fd1=a146_0x310f();let _0x2c2136=_0x310fd1[_0x11f6d8];return _0x2c2136;}function a146_0x310f(){const _0x53020a=['11573452dTmQwE','revision','7447912tFmJtf','target','Rollback\x20response\x20was\x20unavailable;\x20current-policy\x20readback\x20proved\x20the\x20new\x20revision\x20without\x20resubmitting.','1269FdZFlT','5890260wbsAYx','Inspect\x20with\x20`','changeSummary','Rolled\x20Instant\x20API\x20policy\x20revision\x20','874RwkrAn','Restore\x20an\x20application-wide\x20Instant\x20API\x20policy\x20from\x20immutable\x20history\x20as\x20a\x20new\x20revision.','instant_api_policy_not_configured','833164ipPLNT','planned','expectedRevision','instant_api_policy_rollback_verification_unavailable','high-risk-write','Current\x20policy\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20rollback.','9JQLdgH','rollback','POST','15CtATvI','78862QPeGfG','instant_api_policy_rollback_outcome_unknown','/rollback','configHash','86652LfYLQq','verified','The\x20rollback\x20request\x20was\x20sent,\x20but\x20the\x20current\x20policy\x20could\x20not\x20be\x20verified.','\x20forward\x20to\x20revision\x20','9XjzWhV','Restore\x20a\x20historical\x20policy\x20as\x20a\x20new\x20active\x20revision','before','push','appCode','Instant\x20API\x20policy\x20is\x20not\x20configured\x20for\x20'];a146_0x310f=function(){return _0x53020a;};return a146_0x310f();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{instantApiPolicyError}from'../../core/instant-api-policy/config.js';import{assertExpectedRevision,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG,expectedRevisionWarnings,INSTANT_API_POLICY_BASE_PATH,mutationLookupCommand,projectCurrentPolicy,projectRevisionDetail,readChangeSummary,readExpectedRevision,readRevision,REVISION_FLAG,RUNTIME_CACHE_WARNING}from'../../commands/instant-api-policy/shared.js';async function prepareRollback(_0x8b1638){const _0x572094=a146_0x2c21,_0x5dbc11=readRevision(_0x8b1638),_0x4122f7=readChangeSummary(_0x8b1638),_0x3e4ade=readExpectedRevision(_0x8b1638),[_0x39d736,_0x419369]=await Promise['all']([getCurrentInstantApiPolicy(_0x8b1638[_0x572094(0x78)]),getInstantApiPolicyRevision(_0x8b1638[_0x572094(0x78)],_0x5dbc11)]);if(!_0x39d736)throw instantApiPolicyError(_0x572094(0x86),_0x572094(0x79)+_0x8b1638[_0x572094(0x78)]+'.');return assertExpectedRevision(_0x39d736,_0x3e4ade),{'revision':_0x5dbc11,'changeSummary':_0x4122f7,'expectedRevision':_0x3e4ade,'before':_0x39d736,'target':_0x419369};}export const instantApiPolicyRollback={'service':'instant-api-policy','command':a146_0x555832(0x69),'description':a146_0x555832(0x75),'risk':a146_0x555832(0x8b),'requiresAppCode':!![],'structuredErrors':!![],'confirmationDescription':a146_0x555832(0x85),'flags':[REVISION_FLAG,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG],async 'validate'(_0x26deca){readRevision(_0x26deca),readChangeSummary(_0x26deca),readExpectedRevision(_0x26deca);},async 'dryRun'(_0x49a91a){const _0x2274e5=a146_0x555832,_0xf03d34=await prepareRollback(_0x49a91a);return asDryRunResult({'operation':_0x2274e5(0x69),'selector':{'appCode':_0x49a91a['appCode'],'sourceRevision':_0xf03d34[_0x2274e5(0x7b)]},'before':projectCurrentPolicy(_0xf03d34[_0x2274e5(0x76)]),'after':{'revision':_0xf03d34[_0x2274e5(0x76)][_0x2274e5(0x7b)]+0x1,'sourceRevision':projectRevisionDetail(_0xf03d34[_0x2274e5(0x7d)])},'dryRun':!![],'backend':{'method':'POST','path':INSTANT_API_POLICY_BASE_PATH+_0x2274e5(0x6e)},'warnings':expectedRevisionWarnings(_0xf03d34[_0x2274e5(0x89)]),'verification':{'status':_0x2274e5(0x88),'expectedRevision':_0xf03d34[_0x2274e5(0x89)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},{'method':_0x2274e5(0x6a),'url':INSTANT_API_POLICY_BASE_PATH+_0x2274e5(0x6e)});},async 'execute'(_0x356e83){const _0x2479d9=a146_0x555832,_0xf2bd61=await prepareRollback(_0x356e83);let _0x476bc5=![];try{await rollbackInstantApiPolicy({'appCode':_0x356e83[_0x2479d9(0x78)],'revision':_0xf2bd61[_0x2479d9(0x7b)],..._0xf2bd61[_0x2479d9(0x82)]?{'changeSummary':_0xf2bd61[_0x2479d9(0x82)]}:{}});}catch(_0x3fa816){if(!isPlatformTransportFailure(_0x3fa816))throw _0x3fa816;_0x476bc5=!![];}let _0xb694fa;try{_0xb694fa=await getCurrentInstantApiPolicy(_0x356e83[_0x2479d9(0x78)]);}catch(_0x5a89d3){const _0x1492dd=instantApiPolicyError(_0x476bc5?_0x2479d9(0x6d):_0x2479d9(0x8a),_0x2479d9(0x72),_0x2479d9(0x81)+mutationLookupCommand()+'`;\x20do\x20not\x20resubmit\x20automatically.');Object['defineProperty'](_0x1492dd,'cause',{'value':_0x5a89d3,'enumerable':![]});throw _0x1492dd;}const _0x305a15=_0xb694fa&&_0xb694fa['revision']>_0xf2bd61['before'][_0x2479d9(0x7b)],_0x249a30=_0xb694fa?.['configHash']===_0xf2bd61['target'][_0x2479d9(0x6f)];if(!_0xb694fa||!_0x305a15||!_0x249a30)throw instantApiPolicyError(_0x476bc5?'instant_api_policy_rollback_outcome_unknown':'instant_api_policy_rollback_verification_failed',_0x2479d9(0x67),_0x2479d9(0x81)+mutationLookupCommand()+'`;\x20do\x20not\x20resubmit\x20automatically.');const _0x5cd5b0=[...expectedRevisionWarnings(_0xf2bd61[_0x2479d9(0x89)]),RUNTIME_CACHE_WARNING];return _0x476bc5&&_0x5cd5b0[_0x2479d9(0x77)](_0x2479d9(0x7e)),{'ok':!![],'data':{'operation':_0x2479d9(0x69),'selector':{'appCode':_0x356e83[_0x2479d9(0x78)],'sourceRevision':_0xf2bd61[_0x2479d9(0x7b)]},'before':projectCurrentPolicy(_0xf2bd61[_0x2479d9(0x76)]),'after':projectCurrentPolicy(_0xb694fa),'dryRun':![],'backend':{'method':_0x2479d9(0x6a),'path':INSTANT_API_POLICY_BASE_PATH+'/rollback'},'warnings':_0x5cd5b0,'verification':{'status':_0x2479d9(0x71),'recoveredAfterUnknownResponse':_0x476bc5,'expectedRevision':_0xf2bd61['expectedRevision']??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},'message':_0x2479d9(0x83)+_0xf2bd61[_0x2479d9(0x7b)]+_0x2479d9(0x73)+_0xb694fa[_0x2479d9(0x7b)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a147_0x432a(_0x1721e8,_0x2e6d80){_0x1721e8=_0x1721e8-0xc0;const _0x40db06=a147_0x40db();let _0x432ab1=_0x40db06[_0x1721e8];return _0x432ab1;}const a147_0x39c530=a147_0x432a;(function(_0x5a2fa6,_0x11758b){const _0x212117=a147_0x432a,_0x56d899=_0x5a2fa6();while(!![]){try{const _0x591160=parseInt(_0x212117(0xce))/0x1+parseInt(_0x212117(0xd4))/0x2+-parseInt(_0x212117(0xd3))/0x3*(parseInt(_0x212117(0xc2))/0x4)+-parseInt(_0x212117(0xf6))/0x5+parseInt(_0x212117(0xd5))/0x6*(parseInt(_0x212117(0xca))/0x7)+parseInt(_0x212117(0xc8))/0x8*(parseInt(_0x212117(0xea))/0x9)+parseInt(_0x212117(0xc0))/0xa*(parseInt(_0x212117(0xeb))/0xb);if(_0x591160===_0x11758b)break;else _0x56d899['push'](_0x56d899['shift']());}catch(_0x1d4de8){_0x56d899['push'](_0x56d899['shift']());}}}(a147_0x40db,0x5f555));import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,readInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';export const INSTANT_API_POLICY_BASE_PATH=a147_0x39c530(0xcf);export const RUNTIME_CACHE_WARNING=a147_0x39c530(0xcc);export const NON_ATOMIC_EXPECTED_REVISION_WARNING=a147_0x39c530(0xe6);export const FORCE_FLAG={'name':a147_0x39c530(0xdd),'type':a147_0x39c530(0xf4),'default':![],'description':'Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes'};function a147_0x40db(){const _0x277c4c=['defaults','updateUserId','.\x20Run\x20current\x20and\x20review\x20before\x20retrying.','instant_api_policy_revision_invalid','policyId','gmtModified','num','change-summary','--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.','config','number','rabetbase\x20instant-api-policy\x20current\x20--format\x20compress','282969pCSnEd','3743377IEfUJt','Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)','length','NaN','revision','instant_api_policy_expected_revision_invalid','expected-revision','isSafeInteger','Expected\x20revision\x20','boolean','Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.','3739805PkNDZN','gmtCreate','The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.','10IvfoFj','str','4gLKlBf','version','--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','flag','operatorId','instant_api_policy_revision_mismatch','32rKyPDF','--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.','1720187ypEhzh','bool','Runtime\x20instances\x20may\x20take\x20up\x20to\x2030\x20seconds\x20to\x20observe\x20the\x20new\x20active\x20policy.','appCode','473483cgPPyU','/smartapi/instant-api-policy','trim','rules','instant_api_policy_change_summary_invalid','986577JObSZR','72538zhGWvB','12JFXLMn','instant_api_policy_force_confirmation_required','changeSummary','configHash','string','Positive\x20published\x20policy\x20revision','Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured','createUserId','force'];a147_0x40db=function(){return _0x277c4c;};return a147_0x40db();}export const CHANGE_SUMMARY_FLAG={'name':a147_0x39c530(0xe5),'type':a147_0x39c530(0xd9),'required':![],'description':a147_0x39c530(0xec)};export const REVISION_FLAG={'name':a147_0x39c530(0xef),'type':a147_0x39c530(0xe8),'required':!![],'description':a147_0x39c530(0xda)};export const EXPECTED_REVISION_FLAG={'name':a147_0x39c530(0xf1),'type':a147_0x39c530(0xe8),'required':![],'description':a147_0x39c530(0xdb)};export function requireForceConfirmation(_0x108750){const _0x3a01ad=a147_0x39c530;if(!_0x108750[_0x3a01ad(0xcb)](_0x3a01ad(0xdd))||_0x108750[_0x3a01ad(0xcb)]('yes'))return;throw instantApiPolicyError(_0x3a01ad(0xd6),_0x3a01ad(0xc9),_0x3a01ad(0xf5));}export function readChangeSummary(_0x235a1b){const _0x12f6e4=a147_0x39c530,_0x2915e2=_0x235a1b[_0x12f6e4(0xc1)](_0x12f6e4(0xe5))[_0x12f6e4(0xd0)]();if(!_0x2915e2)return undefined;if(_0x2915e2[_0x12f6e4(0xed)]>0x7d0)throw instantApiPolicyError(_0x12f6e4(0xd2),'--change-summary\x20cannot\x20exceed\x202000\x20characters.');return _0x2915e2;}export function readRevision(_0xa06725){const _0x484e23=a147_0x39c530,_0x7441c9=_0xa06725[_0x484e23(0xe4)](_0x484e23(0xef),Number['NaN']);if(!Number[_0x484e23(0xf2)](_0x7441c9)||_0x7441c9<=0x0)throw instantApiPolicyError(_0x484e23(0xe1),'--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.');return _0x7441c9;}export function readExpectedRevision(_0x304400){const _0x5bc39b=a147_0x39c530;if(_0x304400[_0x5bc39b(0xc5)]('expected-revision')===undefined)return undefined;const _0x25ba4a=_0x304400['num'](_0x5bc39b(0xf1),Number[_0x5bc39b(0xee)]);if(!Number[_0x5bc39b(0xf2)](_0x25ba4a)||_0x25ba4a<0x0)throw instantApiPolicyError(_0x5bc39b(0xf0),_0x5bc39b(0xc4));return _0x25ba4a;}export function assertExpectedRevision(_0x4fd865,_0x41e22e){const _0x18e93e=a147_0x39c530;if(_0x41e22e===undefined)return;const _0x30d50e=_0x4fd865?.[_0x18e93e(0xef)]??0x0;if(_0x30d50e!==_0x41e22e)throw instantApiPolicyError(_0x18e93e(0xc7),_0x18e93e(0xf8),_0x18e93e(0xf3)+_0x41e22e+';\x20current\x20revision\x20is\x20'+_0x30d50e+_0x18e93e(0xe0));}export async function readFixedPolicy(_0x27b14e){const _0x4d1a02=loadInstantApiPolicyLocalConfig(_0x27b14e['appCode']),_0x489f1a=await readInstantApiPolicyConfigFile(_0x4d1a02);return{'local':_0x4d1a02,'config':_0x489f1a};}export function projectCurrentPolicy(_0x4b89f2){const _0x4d7dc7=a147_0x39c530;if(!_0x4b89f2)return null;return{'id':_0x4b89f2['id'],'appCode':_0x4b89f2[_0x4d7dc7(0xcd)],'revision':_0x4b89f2[_0x4d7dc7(0xef)],'configHash':_0x4b89f2[_0x4d7dc7(0xd8)],'enabled':_0x4b89f2['enabled'],'config':_0x4b89f2[_0x4d7dc7(0xe7)],'createUserId':_0x4b89f2[_0x4d7dc7(0xdc)]??null,'updateUserId':_0x4b89f2[_0x4d7dc7(0xdf)]??null,'gmtCreate':_0x4b89f2['gmtCreate']??null,'gmtModified':_0x4b89f2[_0x4d7dc7(0xe3)]??null};}export function projectRevisionSummary(_0x7daf0d){const _0x4adeb2=a147_0x39c530;return{'id':_0x7daf0d['id'],'policyId':_0x7daf0d[_0x4adeb2(0xe2)],'appCode':_0x7daf0d[_0x4adeb2(0xcd)],'revision':_0x7daf0d[_0x4adeb2(0xef)],'configHash':_0x7daf0d[_0x4adeb2(0xd8)],'changeType':_0x7daf0d['changeType'],'changeSummary':_0x7daf0d[_0x4adeb2(0xd7)]??null,'operatorId':_0x7daf0d[_0x4adeb2(0xc6)]??null,'gmtCreate':_0x7daf0d[_0x4adeb2(0xf7)]??null,'version':_0x7daf0d[_0x4adeb2(0xe7)][_0x4adeb2(0xc3)],'defaultAction':_0x7daf0d['config'][_0x4adeb2(0xde)]['instantApi'],'ruleCount':_0x7daf0d[_0x4adeb2(0xe7)][_0x4adeb2(0xd1)]?.['length']??0x0};}export function projectRevisionDetail(_0x28980b){return{...projectRevisionSummary(_0x28980b),'config':_0x28980b['config']};}export function expectedRevisionWarnings(_0x27b46b){return _0x27b46b===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){const _0x25a548=a147_0x39c530;return _0x25a548(0xe9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x1b6101=a148_0x16c5;(function(_0x461c9d,_0x52886a){const _0x4cdfbf=a148_0x16c5,_0x2129fb=_0x461c9d();while(!![]){try{const _0x1838ff=parseInt(_0x4cdfbf(0x127))/0x1*(-parseInt(_0x4cdfbf(0x123))/0x2)+-parseInt(_0x4cdfbf(0x113))/0x3*(parseInt(_0x4cdfbf(0x11c))/0x4)+parseInt(_0x4cdfbf(0x126))/0x5*(parseInt(_0x4cdfbf(0x117))/0x6)+-parseInt(_0x4cdfbf(0x125))/0x7*(-parseInt(_0x4cdfbf(0x116))/0x8)+-parseInt(_0x4cdfbf(0x119))/0x9+parseInt(_0x4cdfbf(0x121))/0xa*(parseInt(_0x4cdfbf(0x11e))/0xb)+parseInt(_0x4cdfbf(0x124))/0xc*(parseInt(_0x4cdfbf(0x122))/0xd);if(_0x1838ff===_0x52886a)break;else _0x2129fb['push'](_0x2129fb['shift']());}catch(_0x10581b){_0x2129fb['push'](_0x2129fb['shift']());}}}(a148_0x5727,0x6f85a));import{validateInstantApiPolicy}from'../../core/api-client.js';function a148_0x16c5(_0x5f46d5,_0x32e38f){_0x5f46d5=_0x5f46d5-0x112;const _0x5727a0=a148_0x5727();let _0x16c5d9=_0x5727a0[_0x5f46d5];return _0x16c5d9;}function a148_0x5727(){const _0x2644a0=['appCode','190040VPtTZD','12558uyasjU','14jNdvGG','8784CuAJBw','241766eLuErA','135515YWtsgc','69670XHuwFu','POST','Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','367905fKUhlE','validate','normalizedConfig','88LsakWr','6XPkJdQ','Validated\x20Instant\x20API\x20policy\x20for\x20','2304522mTbAWa','policyFilePath','valid','4QhArKS','/validate','121BydpMU','read'];a148_0x5727=function(){return _0x2644a0;};return a148_0x5727();}import{INSTANT_API_POLICY_BASE_PATH,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyValidate={'service':'instant-api-policy','command':a148_0x1b6101(0x114),'description':a148_0x1b6101(0x112),'risk':a148_0x1b6101(0x11f),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x4963e4){const _0x2514ff=a148_0x1b6101,{local:_0x280556,config:_0x391d66}=await readFixedPolicy(_0x4963e4),_0x1edf9c=await validateInstantApiPolicy({'appCode':_0x4963e4[_0x2514ff(0x120)],'config':_0x391d66});return{'ok':!![],'data':{'operation':_0x2514ff(0x114),'selector':{'appCode':_0x4963e4[_0x2514ff(0x120)]},'filePath':_0x280556[_0x2514ff(0x11a)],'relativePath':_0x280556['policyRelativePath'],'valid':_0x1edf9c[_0x2514ff(0x11b)],'configHash':_0x1edf9c['configHash'],'normalizedConfig':_0x1edf9c[_0x2514ff(0x115)],'backend':{'method':_0x2514ff(0x128),'path':INSTANT_API_POLICY_BASE_PATH+_0x2514ff(0x11d)}},'message':_0x2514ff(0x118)+_0x4963e4['appCode']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x258cfc,_0x1c8963){const _0x18636d=a149_0xa926,_0x2f31d4=_0x258cfc();while(!![]){try{const _0xf70863=-parseInt(_0x18636d(0x78))/0x1*(parseInt(_0x18636d(0x79))/0x2)+parseInt(_0x18636d(0x80))/0x3+parseInt(_0x18636d(0x77))/0x4+parseInt(_0x18636d(0x7e))/0x5+-parseInt(_0x18636d(0x7f))/0x6*(parseInt(_0x18636d(0x7b))/0x7)+-parseInt(_0x18636d(0x81))/0x8*(-parseInt(_0x18636d(0x7c))/0x9)+-parseInt(_0x18636d(0x7a))/0xa*(parseInt(_0x18636d(0x7d))/0xb);if(_0xf70863===_0x1c8963)break;else _0x2f31d4['push'](_0x2f31d4['shift']());}catch(_0x2ed035){_0x2f31d4['push'](_0x2f31d4['shift']());}}}(a149_0x2f2d,0x65f6e));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a149_0xa926(_0x19e540,_0x5809db){_0x19e540=_0x19e540-0x77;const _0x2f2da6=a149_0x2f2d();let _0xa92634=_0x2f2da6[_0x19e540];return _0xa92634;}function a149_0x2f2d(){const _0x26bb49=['30TRobyN','2460678tgLrOy','166696FwqooI','3269608ZaHaPq','282mjeRuB','3498auVyyY','15734500fVeGFA','310107UgfsbH','225kHZzJR','11NvYUlR','2736330VHdCFy'];a149_0x2f2d=function(){return _0x26bb49;};return a149_0x2f2d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a150_0x308a(_0xf5ca36,_0x3072bd){_0xf5ca36=_0xf5ca36-0x8a;const _0x1bd193=a150_0x1bd1();let _0x308acd=_0x1bd193[_0xf5ca36];return _0x308acd;}const a150_0x18af12=a150_0x308a;(function(_0x47fc42,_0x6af8b6){const _0x2d9bc6=a150_0x308a,_0x14e938=_0x47fc42();while(!![]){try{const _0x157a2c=-parseInt(_0x2d9bc6(0xa4))/0x1+parseInt(_0x2d9bc6(0xa3))/0x2+-parseInt(_0x2d9bc6(0x8f))/0x3+parseInt(_0x2d9bc6(0x8d))/0x4*(-parseInt(_0x2d9bc6(0x99))/0x5)+-parseInt(_0x2d9bc6(0x91))/0x6+-parseInt(_0x2d9bc6(0x9a))/0x7*(parseInt(_0x2d9bc6(0x9f))/0x8)+parseInt(_0x2d9bc6(0x97))/0x9;if(_0x157a2c===_0x6af8b6)break;else _0x14e938['push'](_0x14e938['shift']());}catch(_0x3351d9){_0x14e938['push'](_0x14e938['shift']());}}}(a150_0x1bd1,0x3e455));function a150_0x1bd1(){const _0x356c51=['117693nNknAj','issue','length','write','=1\x20to\x20silence\x20this\x20hint.','service','stderr','\x20bug?\x20Help\x20us\x20fix\x20it:','validation_error','slice','auth_required','100pSsIOw','report','711012BkYFOg','unknown_command','254970FOkQwm','\x20\x20\x20\x20--title\x20\x22','Hit\x20a\x20','replace','flag_missing','has','7641612EGUjmZ','network_error','82185dATkPx','182945BiWHfm','command','join','cancelled','message','24xzvpFI','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','config_missing','585030cNxFtt'];a150_0x1bd1=function(){return _0x356c51;};return a150_0x1bd1();}import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';const NUDGE_SUPPRESSED_CODES=new Set([a150_0x18af12(0x9d),a150_0x18af12(0x8c),a150_0x18af12(0xa2),'not_in_project',a150_0x18af12(0x90),a150_0x18af12(0x95),a150_0x18af12(0x8a),a150_0x18af12(0x98)]),defaultWriter=_0x2e446d=>{const _0x2488bd=a150_0x18af12;process[_0x2488bd(0xaa)][_0x2488bd(0xa7)](_0x2e446d);};export function shouldNudgeForError(_0x28ad5d,_0x38e3a3){const _0x14a6cf=a150_0x18af12;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x38e3a3[_0x14a6cf(0xa9)]===_0x14a6cf(0xa5)&&_0x38e3a3[_0x14a6cf(0x9b)]===_0x14a6cf(0x8e))return![];if(_0x28ad5d instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x14a6cf(0x96)](_0x28ad5d['code']);return!![];}export function printIssueReportNudgeForError(_0xdad49f,_0x4cdf2d,_0x129e74=defaultWriter){if(!shouldNudgeForError(_0xdad49f,_0x4cdf2d))return;const _0x611a40=buildSuggestedTitle(_0xdad49f,_0x4cdf2d);_0x129e74(formatNudge(_0x611a40));}function buildSuggestedTitle(_0x5f0424,_0x58b3da){const _0x493dea=a150_0x18af12,_0x2393ab=_0x5f0424 instanceof Error?_0x5f0424[_0x493dea(0x9e)]:String(_0x5f0424),_0x2d672c=_0x2393ab['replace'](/[\r\n]+/g,'\x20')[_0x493dea(0x94)](/\s+/g,'\x20')['trim']()[_0x493dea(0x8b)](0x0,0x78)[_0x493dea(0x94)](/"/g,'\x5c\x22'),_0x30a2e2=CLI_BIN_NAME+'\x20'+_0x58b3da[_0x493dea(0xa9)]+'\x20'+_0x58b3da[_0x493dea(0x9b)];return _0x2d672c[_0x493dea(0xa6)]>0x0?_0x30a2e2+':\x20'+_0x2d672c:_0x30a2e2;}function formatNudge(_0xa32dd7){const _0x455986=a150_0x18af12;return['',_0x455986(0x93)+CLI_BIN_NAME+_0x455986(0xab),'\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0x455986(0x92)+_0xa32dd7+'\x22\x20\x5c',_0x455986(0xa1),_0x455986(0xa0),'\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+_0x455986(0xa8),''][_0x455986(0x9c)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x5b4ddd=a151_0x27f9;(function(_0x57bff3,_0x32ea89){const _0x3a6589=a151_0x27f9,_0x288b6a=_0x57bff3();while(!![]){try{const _0x394241=-parseInt(_0x3a6589(0x1a1))/0x1+parseInt(_0x3a6589(0x1a7))/0x2*(parseInt(_0x3a6589(0x189))/0x3)+parseInt(_0x3a6589(0x1c0))/0x4*(-parseInt(_0x3a6589(0x18d))/0x5)+-parseInt(_0x3a6589(0x1c2))/0x6*(parseInt(_0x3a6589(0x18b))/0x7)+-parseInt(_0x3a6589(0x18a))/0x8+parseInt(_0x3a6589(0x1a9))/0x9*(-parseInt(_0x3a6589(0x186))/0xa)+parseInt(_0x3a6589(0x19c))/0xb;if(_0x394241===_0x32ea89)break;else _0x288b6a['push'](_0x288b6a['shift']());}catch(_0xd68d43){_0x288b6a['push'](_0x288b6a['shift']());}}}(a151_0x33ee,0xbb365));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';function a151_0x33ee(){const _0x3bca65=['str','redactionCount','1228253PFNBQP','redacted\x20','push','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','truncated\x20from\x20','issue','2mPijiF','string','2783385MOaHoA','issue.description','title','Platform\x20issue\x20reported','\x20secret(s):\x20','description-file','Issue\x20description\x20file\x20is\x20empty:\x20','utf8','validation','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','inline','flagMissing','Platform\x20issue\x20reported\x20(','apiError','truncated','descriptionFilePath','description','report','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','redactionKinds','write','originalBytes','cwd','3295312fXbRnB','sanitize','3589734SIxjXg','10jNSxSL','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','message','4308726yUprim','6374448zorPBZ','7sdYdKc','issue.description_truncated','5IbdoKz','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','trim','join','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','filter','issue.description_redaction_kinds','truncated:\x20original\x20','issue.title','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','file','POST','descriptionSource','issue.description_original_bytes','33957220otWzQH','\x20bytes','length'];a151_0x33ee=function(){return _0x3bca65;};return a151_0x33ee();}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_0x5b4ddd(0x1ae);export const issueReport={'service':a151_0x5b4ddd(0x1a6),'command':a151_0x5b4ddd(0x1ba),'description':a151_0x5b4ddd(0x1b2),'risk':a151_0x5b4ddd(0x1bd),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':'compress','flags':[{'name':a151_0x5b4ddd(0x1ab),'type':a151_0x5b4ddd(0x1a8),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':a151_0x5b4ddd(0x1b9),'type':a151_0x5b4ddd(0x1a8),'description':a151_0x5b4ddd(0x1a4)},{'name':DESCRIPTION_FILE_FLAG,'type':a151_0x5b4ddd(0x1a8),'description':a151_0x5b4ddd(0x191)}],async 'validate'(_0x5ab358){const _0x1be75c=a151_0x5b4ddd,_0x5cfff5=_0x5ab358['str'](_0x1be75c(0x1ab))[_0x1be75c(0x18f)](),_0x544f12=_0x5ab358['str'](_0x1be75c(0x1b9))['trim'](),_0x4afb0e=_0x5ab358['str'](DESCRIPTION_FILE_FLAG)[_0x1be75c(0x18f)]();if(!_0x5cfff5)throw CliErrors[_0x1be75c(0x1b4)](_0x1be75c(0x1ab),_0x1be75c(0x196));const _0x26e386=_0x544f12[_0x1be75c(0x19e)]>0x0,_0x3772f9=_0x4afb0e[_0x1be75c(0x19e)]>0x0;if(_0x26e386===_0x3772f9)throw CliErrors[_0x1be75c(0x1b1)](_0x1be75c(0x187),_0x1be75c(0x1bb));if(_0x3772f9){const _0x58dba5=resolve(process[_0x1be75c(0x1bf)](),_0x4afb0e);if(!existsSync(_0x58dba5))throw CliErrors[_0x1be75c(0x1b1)]('File\x20not\x20found:\x20'+_0x58dba5);}},async 'dryRun'(_0x354a81){const _0x34687f=a151_0x5b4ddd,_0x28e3d8=await prepareIssueReport(_0x354a81);return{'method':_0x34687f(0x199),'url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x28e3d8[_0x34687f(0x1ab)],'issue.description':_0x28e3d8[_0x34687f(0x1b9)],'issue.description_original_bytes':_0x28e3d8[_0x34687f(0x1c1)]['originalBytes'],'issue.description_truncated':_0x28e3d8['sanitize'][_0x34687f(0x1b7)],'issue.description_redactions':_0x28e3d8['sanitize'][_0x34687f(0x1a0)],'issue.description_redaction_kinds':_0x28e3d8[_0x34687f(0x1c1)][_0x34687f(0x1bc)][_0x34687f(0x190)](',')}},'description':[_0x34687f(0x18e),'descriptionSource:\x20'+_0x28e3d8[_0x34687f(0x19a)],_0x28e3d8[_0x34687f(0x1b8)]?'descriptionFile:\x20'+_0x28e3d8['descriptionFilePath']:null,_0x28e3d8[_0x34687f(0x1c1)][_0x34687f(0x1b7)]?_0x34687f(0x194)+_0x28e3d8[_0x34687f(0x1c1)][_0x34687f(0x1be)]+_0x34687f(0x19d):null,_0x28e3d8[_0x34687f(0x1c1)][_0x34687f(0x1a0)]>0x0?'redactions:\x20'+_0x28e3d8[_0x34687f(0x1c1)][_0x34687f(0x1a0)]+'\x20('+_0x28e3d8[_0x34687f(0x1c1)][_0x34687f(0x1bc)]['join'](',\x20')+')':null][_0x34687f(0x192)](Boolean)['join']('\x0a')};},async 'execute'(_0x498581){const _0x21c5e7=a151_0x5b4ddd,_0x5702c4=await prepareIssueReport(_0x498581);try{await sendPlatformIssueCollectLog({'title':_0x5702c4[_0x21c5e7(0x1ab)],'description':_0x5702c4[_0x21c5e7(0x1b9)],'sanitize':{'originalBytes':_0x5702c4[_0x21c5e7(0x1c1)]['originalBytes'],'truncated':_0x5702c4[_0x21c5e7(0x1c1)]['truncated'],'redactionCount':_0x5702c4[_0x21c5e7(0x1c1)]['redactionCount'],'redactionKinds':_0x5702c4[_0x21c5e7(0x1c1)][_0x21c5e7(0x1bc)]}});}catch(_0x228cc9){throw CliErrors[_0x21c5e7(0x1b6)]('Failed\x20to\x20report\x20platform\x20issue:\x20'+(_0x228cc9 instanceof Error?_0x228cc9[_0x21c5e7(0x188)]:String(_0x228cc9)),_0x21c5e7(0x197));}return{'ok':!![],'message':buildResultMessage(_0x5702c4[_0x21c5e7(0x1c1)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x21c5e7(0x195),_0x21c5e7(0x1aa),_0x21c5e7(0x19b),_0x21c5e7(0x18c),'issue.description_redactions',_0x21c5e7(0x193)],'issue':{'title':_0x5702c4[_0x21c5e7(0x1ab)],'descriptionLength':_0x5702c4[_0x21c5e7(0x1b9)][_0x21c5e7(0x19e)],'descriptionSource':_0x5702c4[_0x21c5e7(0x19a)],..._0x5702c4[_0x21c5e7(0x1b8)]?{'descriptionFile':_0x5702c4[_0x21c5e7(0x1b8)]}:{},'sanitize':{'originalBytes':_0x5702c4[_0x21c5e7(0x1c1)][_0x21c5e7(0x1be)],'truncated':_0x5702c4[_0x21c5e7(0x1c1)][_0x21c5e7(0x1b7)],'redactions':_0x5702c4[_0x21c5e7(0x1c1)]['redactionCount'],'redactionKinds':_0x5702c4['sanitize'][_0x21c5e7(0x1bc)]}}}};}};function a151_0x27f9(_0x5cf08e,_0x782f45){_0x5cf08e=_0x5cf08e-0x186;const _0x33eea5=a151_0x33ee();let _0x27f9a2=_0x33eea5[_0x5cf08e];return _0x27f9a2;}function buildResultMessage(_0x4cfd90){const _0x536e24=a151_0x5b4ddd,_0x52ec71=[];return _0x4cfd90['truncated']&&_0x52ec71[_0x536e24(0x1a3)](_0x536e24(0x1a5)+_0x4cfd90['originalBytes']+_0x536e24(0x19d)),_0x4cfd90[_0x536e24(0x1a0)]>0x0&&_0x52ec71[_0x536e24(0x1a3)](_0x536e24(0x1a2)+_0x4cfd90[_0x536e24(0x1a0)]+_0x536e24(0x1ad)+_0x4cfd90[_0x536e24(0x1bc)][_0x536e24(0x190)](',\x20')),_0x52ec71['length']===0x0?_0x536e24(0x1ac):_0x536e24(0x1b5)+_0x52ec71[_0x536e24(0x190)](';\x20')+')';}async function prepareIssueReport(_0x3c2594){const _0x5e0e02=a151_0x5b4ddd,_0x2c99c9=_0x3c2594[_0x5e0e02(0x19f)]('title')[_0x5e0e02(0x18f)](),_0x5b7e6b=_0x3c2594['str'](_0x5e0e02(0x1b9)),_0x35d1e3=_0x3c2594[_0x5e0e02(0x19f)](DESCRIPTION_FILE_FLAG)[_0x5e0e02(0x18f)]();if(!_0x35d1e3){const _0x55b683=_0x5b7e6b;if(!_0x55b683[_0x5e0e02(0x18f)]())throw CliErrors['validation']('Issue\x20description\x20cannot\x20be\x20empty.','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x2835ba=sanitizeIssueDescription(_0x55b683);return{'title':_0x2c99c9,'description':_0x2835ba[_0x5e0e02(0x1b9)],'descriptionSource':_0x5e0e02(0x1b3),'sanitize':_0x2835ba};}const _0x43017b=resolve(process['cwd'](),_0x35d1e3),_0x57cf84=await readFile(_0x43017b,_0x5e0e02(0x1b0));if(!_0x57cf84[_0x5e0e02(0x18f)]())throw CliErrors['validation'](_0x5e0e02(0x1af)+_0x43017b,'Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.');const _0x3a29fb=sanitizeIssueDescription(_0x57cf84);return{'title':_0x2c99c9,'description':_0x3a29fb['description'],'descriptionSource':_0x5e0e02(0x198),'descriptionFilePath':_0x43017b,'sanitize':_0x3a29fb};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a152_0x183727=a152_0xac39;(function(_0x3c1f10,_0x5414ca){const _0xe78831=a152_0xac39,_0x81a35d=_0x3c1f10();while(!![]){try{const _0x135013=parseInt(_0xe78831(0x96))/0x1+parseInt(_0xe78831(0x90))/0x2*(parseInt(_0xe78831(0x97))/0x3)+-parseInt(_0xe78831(0x92))/0x4*(parseInt(_0xe78831(0x99))/0x5)+parseInt(_0xe78831(0x8c))/0x6+parseInt(_0xe78831(0x86))/0x7+parseInt(_0xe78831(0x89))/0x8+-parseInt(_0xe78831(0x8f))/0x9;if(_0x135013===_0x5414ca)break;else _0x81a35d['push'](_0x81a35d['shift']());}catch(_0x204afd){_0x81a35d['push'](_0x81a35d['shift']());}}}(a152_0xf60c,0x99617));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a152_0x183727(0x9c),REDACTION_RULES=[{'kind':a152_0x183727(0xa3),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a152_0x183727(0x87),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a152_0x183727(0x9f)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a152_0x183727(0xa0)},{'kind':a152_0x183727(0x93),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':a152_0x183727(0xa4),'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_0xf60c(){const _0x14c4d7=['699528rwhHdJ','3057078nGCcjw','string','128585zvWdKW','length','toString','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','byteLength','kind','REDACTED:private-key','REDACTED:access-key','from','replace','cookie','bearer-jwt','description','2523906xHiDqh','authorization','utf8','3469456rENqKm','__RB_OSS_ID_','max','6713136ugqjuC','includes','push','26336268bLYKLQ','2KqHSSo','label','12vakXMH','password','pattern','restore'];a152_0xf60c=function(){return _0x14c4d7;};return a152_0xf60c();}export function sanitizeIssueDescription(_0xe44759){const _0x334d7c=a152_0x183727,_0x5c28fd=Buffer['byteLength'](_0xe44759,_0x334d7c(0x88)),_0x184e00=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x1f8ad8=_0xe44759,_0x18602e=0x0;const _0xccafc3=[];if(!_0x184e00){const _0x2867ca=protectOssAccessKeyIds(_0x1f8ad8);_0x1f8ad8=_0x2867ca[_0x334d7c(0xa5)];for(const _0x22b8d1 of REDACTION_RULES){let _0x512fdc=0x0;_0x1f8ad8=_0x1f8ad8['replace'](_0x22b8d1[_0x334d7c(0x94)],(_0x1fdad4,_0x4dd8bf)=>{const _0x2d55fc=_0x334d7c;_0x512fdc+=0x1;const _0x2bc870=typeof _0x4dd8bf===_0x2d55fc(0x98)?_0x4dd8bf:'';return _0x2bc870+'['+_0x22b8d1[_0x2d55fc(0x91)]+']';}),_0x512fdc>0x0&&(_0x18602e+=_0x512fdc,!_0xccafc3[_0x334d7c(0x8d)](_0x22b8d1['kind'])&&_0xccafc3[_0x334d7c(0x8e)](_0x22b8d1[_0x334d7c(0x9e)]));}_0x1f8ad8=_0x2867ca[_0x334d7c(0x95)](_0x1f8ad8);}let _0x4b9054=![];if(Buffer[_0x334d7c(0x9d)](_0x1f8ad8,_0x334d7c(0x88))>ISSUE_DESCRIPTION_MAX_BYTES){_0x4b9054=!![];const _0x3b95b7=Buffer[_0x334d7c(0x9d)](TRUNCATION_NOTICE,_0x334d7c(0x88)),_0x3137e1=Math[_0x334d7c(0x8b)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x3b95b7);_0x1f8ad8=sliceUtf8Bytes(_0x1f8ad8,_0x3137e1)+TRUNCATION_NOTICE;}return{'description':_0x1f8ad8,'originalBytes':_0x5c28fd,'truncated':_0x4b9054,'redactionCount':_0x18602e,'redactionKinds':_0xccafc3};}function protectOssAccessKeyIds(_0x3daa21){const _0x475eb8=a152_0x183727,_0x1b397b=[],_0xcd154=_0x3daa21[_0x475eb8(0xa2)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x729a7f,_0x20d239)=>{const _0x57373e=_0x475eb8,_0x2e4326=_0x1b397b[_0x57373e(0x8e)](_0x729a7f['slice'](_0x20d239[_0x57373e(0x9a)]))-0x1;return _0x20d239+_0x57373e(0x8a)+_0x2e4326+'__';});return{'description':_0xcd154,'restore':_0x25f59d=>_0x25f59d[_0x475eb8(0xa2)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x58f0a8,_0x519a6c,_0x26285e)=>{const _0x36ae80=_0x1b397b[Number(_0x26285e)];return _0x36ae80===undefined?_0x58f0a8:''+_0x519a6c+_0x36ae80;})};}function a152_0xac39(_0x11bf56,_0x2c9a3e){_0x11bf56=_0x11bf56-0x86;const _0xf60ced=a152_0xf60c();let _0xac39aa=_0xf60ced[_0x11bf56];return _0xac39aa;}function sliceUtf8Bytes(_0x296448,_0x69be84){const _0x37a50f=a152_0x183727;if(_0x69be84<=0x0)return'';const _0x1824ac=Buffer[_0x37a50f(0xa1)](_0x296448,'utf8');if(_0x1824ac[_0x37a50f(0x9d)]<=_0x69be84)return _0x296448;let _0x2ac711=_0x69be84;while(_0x2ac711>0x0){const _0x54b492=_0x1824ac[_0x2ac711];if(_0x54b492===undefined||(_0x54b492&0xc0)!==0x80)break;_0x2ac711-=0x1;}return _0x1824ac['subarray'](0x0,_0x2ac711)[_0x37a50f(0x9b)](_0x37a50f(0x88));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x2b55ca=a153_0x48f1;(function(_0x43038f,_0x1aaf3b){const _0x202436=a153_0x48f1,_0x2d4ea1=_0x43038f();while(!![]){try{const _0x7eb74c=-parseInt(_0x202436(0xef))/0x1*(-parseInt(_0x202436(0xe9))/0x2)+parseInt(_0x202436(0x102))/0x3*(-parseInt(_0x202436(0xfe))/0x4)+-parseInt(_0x202436(0xf0))/0x5+parseInt(_0x202436(0x108))/0x6*(-parseInt(_0x202436(0xf8))/0x7)+-parseInt(_0x202436(0x101))/0x8+parseInt(_0x202436(0xe8))/0x9*(-parseInt(_0x202436(0xf4))/0xa)+parseInt(_0x202436(0x112))/0xb;if(_0x7eb74c===_0x1aaf3b)break;else _0x2d4ea1['push'](_0x2d4ea1['shift']());}catch(_0x5b95bb){_0x2d4ea1['push'](_0x2d4ea1['shift']());}}}(a153_0x1544,0xebc61));import{knowledgeDocumentsPath}from'../../core/api-client.js';function a153_0x1544(){const _0x368f5d=['--file\x20is\x20required.','kb_verification_failed','\x20--format\x20compress','24136iifsVm','6573420ygOoKq','cookie','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','10wdcWXf','version','\x20with\x20title\x20','kb_file_required','7cNHbNU','create','appCode','rabetbase\x20kb\x20detail\x20--id\x20','kb_already_exists','--title\x20is\x20required.','13060OGyQTT','Knowledge-base\x20title','write','15148440hiExvx','627VDmXIB','contentHash','rabetbase\x20kb\x20list\x20--title\x20','content','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','Company\x20knowledge\x20base\x20','95754xcdqQg','The\x20created\x20document\x20version\x20changed\x20after\x20its\x20write\x20response.\x20Inspect\x20it\x20without\x20resubmitting.','string','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','company','\x20--format\x20compress`\x20before\x20choosing\x20update.','Created\x20company\x20knowledge\x20base\x20','trim','60033985RBMqbL','byteSize','stringify','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','title','file','length','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','kb_title_required','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','str','12001851NVmyXe','62mOuhoE','verified','POST'];a153_0x1544=function(){return _0x368f5d;};return a153_0x1544();}import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';function readCreateInput(_0x1e26e5){const _0x295199=a153_0x48f1,_0x4b6820=_0x1e26e5[_0x295199(0x11c)](_0x295199(0x116))[_0x295199(0x111)]();if(!_0x4b6820)throw kbError(_0x295199(0x11a),_0x295199(0xfd));const _0x33f787=_0x1e26e5['str'](_0x295199(0x117))[_0x295199(0x111)]();if(!_0x33f787)throw kbError(_0x295199(0xf7),_0x295199(0xec),_0x295199(0x10b));return{'title':_0x4b6820,'file':_0x33f787};}async function prepareCreate(_0x2a7d9d){const _0x4a645a=a153_0x48f1,_0x19e11f=readCreateInput(_0x2a7d9d),_0x4fd15d=await readKbFile(_0x19e11f[_0x4a645a(0x117)]),_0x45ec2b=await fetchAllCompanyKnowledgeBases(_0x2a7d9d,{'title':_0x19e11f[_0x4a645a(0x116)]}),_0x3f821c=findExactCompanyKnowledgeBases(_0x45ec2b,_0x2a7d9d[_0x4a645a(0xfa)],_0x19e11f[_0x4a645a(0x116)]);if(_0x3f821c[_0x4a645a(0x118)]>0x0)throw kbError(_0x4a645a(0xfc),_0x4a645a(0x10c)+_0x2a7d9d['appCode']+_0x4a645a(0xf6)+_0x19e11f[_0x4a645a(0x116)]+'.',_0x4a645a(0xf3)+_0x3f821c[0x0]['id']+_0x4a645a(0x10f));return{..._0x19e11f,'content':_0x4fd15d};}function a153_0x48f1(_0x580334,_0x1c9c5f){_0x580334=_0x580334-0xe8;const _0x154473=a153_0x1544();let _0x48f1b4=_0x154473[_0x580334];return _0x48f1b4;}function plannedAfter(_0x15825d,_0x45b6a1){const _0x1c7aa4=a153_0x48f1;return{'scope':_0x1c7aa4(0x10e),'appCode':_0x15825d[_0x1c7aa4(0xfa)],'title':_0x45b6a1[_0x1c7aa4(0x116)],'contentByteSize':_0x45b6a1[_0x1c7aa4(0x105)]['byteSize'],'contentHash':_0x45b6a1[_0x1c7aa4(0x105)]['contentHash']};}function verifyCreatedState(_0x218415,_0x42ad16,_0x4878ea){const _0x298ea0=a153_0x48f1;assertCompanyKnowledgeBase(_0x4878ea,_0x218415['appCode'],_0x4878ea['id']);const _0x2c59ba=inspectKbContent(_0x4878ea[_0x298ea0(0x105)]);if(_0x4878ea['title']!==_0x42ad16[_0x298ea0(0x116)]||_0x2c59ba[_0x298ea0(0x103)]!==_0x42ad16[_0x298ea0(0x105)][_0x298ea0(0x103)])throw kbError(_0x298ea0(0xed),_0x298ea0(0x107)+_0x4878ea['id']+_0x298ea0(0xf2),_0x298ea0(0x119)+_0x4878ea['id']+_0x298ea0(0x106));return projectKb(_0x4878ea);}export const kbCreate={'service':'kb','command':a153_0x2b55ca(0xf9),'description':a153_0x2b55ca(0x115),'risk':a153_0x2b55ca(0x100),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a153_0x2b55ca(0x10a),'required':!![],'description':a153_0x2b55ca(0xff)},{'name':a153_0x2b55ca(0x117),'type':a153_0x2b55ca(0x10a),'required':!![],'description':'UTF-8\x20text\x20or\x20Markdown\x20content\x20file'}],async 'validate'(_0x3ca279){readCreateInput(_0x3ca279);},async 'dryRun'(_0x2dd406){const _0x2386d6=a153_0x2b55ca,_0x282202=await prepareCreate(_0x2dd406);return asDryRunResult({'operation':_0x2386d6(0xf9),'selector':{'scope':_0x2386d6(0x10e),'appCode':_0x2dd406['appCode'],'title':_0x282202[_0x2386d6(0x116)]},'before':null,'after':plannedAfter(_0x2dd406,_0x282202),'dryRun':!![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x2386d6(0x10e),_0x2386d6(0xf9)),'body':{'appCode':_0x2dd406[_0x2386d6(0xfa)],'title':_0x282202['title'],'contentHash':_0x282202[_0x2386d6(0x105)][_0x2386d6(0x103)],'contentByteSize':_0x282202[_0x2386d6(0x105)][_0x2386d6(0x113)]}},'warnings':[],'verification':{'lookupCommand':_0x2386d6(0x104)+JSON[_0x2386d6(0x114)](_0x282202[_0x2386d6(0x116)])+_0x2386d6(0xee)}},{'method':_0x2386d6(0xeb),'url':knowledgeDocumentsPath('company',_0x2386d6(0xf9))});},async 'execute'(_0x2ad890){const _0x3621d5=a153_0x2b55ca,_0x16dc75=await prepareCreate(_0x2ad890);let _0x434def,_0x11a7fa,_0x12bf9e=![];try{const _0x52f65a=await createEnterpriseKnowledgeBase(_0x2ad890[_0x3621d5(0xf1)],{'appCode':_0x2ad890[_0x3621d5(0xfa)],'title':_0x16dc75[_0x3621d5(0x116)],'content':_0x16dc75[_0x3621d5(0x105)][_0x3621d5(0x105)]});assertCompanyKnowledgeBase(_0x52f65a,_0x2ad890[_0x3621d5(0xfa)],_0x52f65a['id']),_0x434def=_0x52f65a['id'],_0x11a7fa=_0x52f65a[_0x3621d5(0xf5)];}catch(_0x351bf2){if(!isPlatformTransportFailure(_0x351bf2))throw _0x351bf2;_0x12bf9e=!![];}if(_0x434def===undefined){const _0x2bf5b7=await verifyKbMutationReadback('create',!![],()=>fetchAllCompanyKnowledgeBases(_0x2ad890,{'title':_0x16dc75[_0x3621d5(0x116)]})),_0x49b2b3=findExactCompanyKnowledgeBases(_0x2bf5b7,_0x2ad890[_0x3621d5(0xfa)],_0x16dc75[_0x3621d5(0x116)]);if(_0x49b2b3[_0x3621d5(0x118)]!==0x1)throw kbError('kb_create_outcome_unknown',_0x3621d5(0x10d)+_0x49b2b3[_0x3621d5(0x118)]+'.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.');_0x434def=_0x49b2b3[0x0]['id'];}const _0x191149=await verifyKbMutationReadback(_0x3621d5(0xf9),_0x12bf9e,()=>requireKb(_0x2ad890,_0x434def));if(_0x11a7fa!==undefined&&_0x191149['version']!==_0x11a7fa)throw kbError('kb_verification_failed',_0x3621d5(0x109));const _0x496296=verifyCreatedState(_0x2ad890,_0x16dc75,_0x191149),_0x36dd7c=_0x12bf9e?[_0x3621d5(0x11b)]:[];return{'ok':!![],'data':{'operation':'create','selector':{'id':_0x496296['id'],'scope':_0x3621d5(0x10e),'appCode':_0x496296[_0x3621d5(0xfa)]},'before':null,'after':_0x496296,'dryRun':![],'backend':{'method':_0x3621d5(0xeb),'path':knowledgeDocumentsPath(_0x3621d5(0x10e),'create')},'warnings':_0x36dd7c,'verification':{'status':_0x3621d5(0xea),'recoveredAfterUnknownResponse':_0x12bf9e,'lookupCommand':_0x3621d5(0xfb)+_0x496296['id']+'\x20--format\x20compress'}},'message':_0x3621d5(0x110)+_0x496296['id']+'\x20for\x20'+_0x496296[_0x3621d5(0xfa)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a154_0x4c48dd=a154_0x9fed;(function(_0x372c20,_0x47101a){const _0x277e30=a154_0x9fed,_0x2c51f1=_0x372c20();while(!![]){try{const _0x19fd81=-parseInt(_0x277e30(0xc5))/0x1*(parseInt(_0x277e30(0xe2))/0x2)+-parseInt(_0x277e30(0xe4))/0x3*(-parseInt(_0x277e30(0xc8))/0x4)+-parseInt(_0x277e30(0xd6))/0x5*(parseInt(_0x277e30(0xe1))/0x6)+parseInt(_0x277e30(0xdd))/0x7*(parseInt(_0x277e30(0xda))/0x8)+parseInt(_0x277e30(0xd0))/0x9+parseInt(_0x277e30(0xe5))/0xa*(-parseInt(_0x277e30(0xd8))/0xb)+-parseInt(_0x277e30(0xde))/0xc*(-parseInt(_0x277e30(0xe0))/0xd);if(_0x19fd81===_0x47101a)break;else _0x2c51f1['push'](_0x2c51f1['shift']());}catch(_0x3ff7f1){_0x2c51f1['push'](_0x2c51f1['shift']());}}}(a154_0x4ae8,0xa2bce));function a154_0x9fed(_0x2e4d67,_0x23c0e6){_0x2e4d67=_0x2e4d67-0xbe;const _0x4ae86f=a154_0x4ae8();let _0x9fedd7=_0x4ae86f[_0x2e4d67];return _0x9fedd7;}import{knowledgeDocumentsPath}from'../../core/api-client.js';import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const RAG_WARNING='Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.';function a154_0x4ae8(){const _0x55b1a6=['kb_delete_outcome_unknown','3065257DVKKkZ','2798184aNKAMC','2YiZNFk','number','6uNLdEO','560fukpdl','isSafeInteger','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','company','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','snapshotHash','POST','Soft-deleted\x20company\x20knowledge\x20base\x20','27920ughUxj','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','cookie','2151368THPWcO','\x20--format\x20compress','version','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','--expected-version\x20must\x20be\x20a\x20positive\x20safe\x20integer.','expected-version','no_op','appCode','10711620bOmXqu','kb_verification_failed','rabetbase\x20kb\x20detail\x20--id\x20','\x20remains\x20readable\x20after\x20delete.','delete','unshift','10COfKgD','Company\x20knowledge\x20base\x20','251889JweSmM','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','1128JOYCqy','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','flag','20251CefiCC','12nfewow'];a154_0x4ae8=function(){return _0x55b1a6;};return a154_0x4ae8();}function readExpectedVersion(_0x323bfa){const _0x34e68b=a154_0x9fed,_0x464199=_0x323bfa[_0x34e68b(0xdc)]('expected-version');if(_0x464199===undefined)return undefined;const _0x43f353=Number(_0x464199);if(!Number[_0x34e68b(0xbe)](_0x43f353)||_0x43f353<0x1)throw kbError('kb_expected_version_invalid',_0x34e68b(0xcc));return _0x43f353;}function noOpData(_0x475a08,_0x3533f6,_0x46d937){const _0x152322=a154_0x9fed;return{'operation':_0x152322(0xce),'selector':{'id':_0x3533f6,'scope':'company','appCode':_0x475a08[_0x152322(0xcf)]},'before':null,'after':null,'dryRun':_0x46d937,'deleteCalled':![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x152322(0xc0),_0x152322(0xd4))},'warnings':[],'verification':{'status':'already_absent','databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a154_0x4c48dd(0xd4),'description':a154_0x4c48dd(0xbf),'risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'string','required':!![],'description':'Company\x20knowledge-base\x20id'},{'name':a154_0x4c48dd(0xcd),'type':a154_0x4c48dd(0xe3),'required':![],'description':a154_0x4c48dd(0xd9)}],async 'validate'(_0xa5939e){readKbId(_0xa5939e),readExpectedVersion(_0xa5939e),requireKbExplicitYes(_0xa5939e);},async 'dryRun'(_0x4ee9e1){const _0x1d74fe=a154_0x4c48dd,_0x34a440=readKbId(_0x4ee9e1),_0xfb916d=readExpectedVersion(_0x4ee9e1),_0x135f46=await getKbOrNull(_0x4ee9e1,_0x34a440);if(!_0x135f46)return asDryRunResult(noOpData(_0x4ee9e1,_0x34a440,!![]),{'method':_0x1d74fe(0xc3),'url':knowledgeDocumentsPath(_0x1d74fe(0xc0),_0x1d74fe(0xd4))});assertExpectedKbVersion(_0x135f46,_0xfb916d);const _0xe2bc93=projectKb(_0x135f46),_0x433090=[RAG_WARNING];return asDryRunResult({'operation':_0x1d74fe(0xd4),'selector':{'id':_0xe2bc93['id'],'scope':'company','appCode':_0xe2bc93[_0x1d74fe(0xcf)]},'before':_0xe2bc93,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x1d74fe(0xc3),'path':knowledgeDocumentsPath(_0x1d74fe(0xc0),_0x1d74fe(0xd4)),'body':{'appCode':_0x4ee9e1[_0x1d74fe(0xcf)],'id':_0x34a440,'expectedVersion':_0x135f46[_0x1d74fe(0xca)]}},'warnings':_0x433090,'verification':{'expectedVersion':_0x135f46[_0x1d74fe(0xca)],'atomicCompareAndSet':!![],'snapshotHash':_0xe2bc93[_0x1d74fe(0xc2)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x1d74fe(0xd2)+_0xe2bc93['id']+_0x1d74fe(0xc9)}},{'method':_0x1d74fe(0xc3),'url':knowledgeDocumentsPath(_0x1d74fe(0xc0),_0x1d74fe(0xd4))});},async 'execute'(_0x3cb743){const _0x5de091=a154_0x4c48dd;requireKbExplicitYes(_0x3cb743);const _0x34805=readKbId(_0x3cb743),_0x35ca43=readExpectedVersion(_0x3cb743),_0x110313=await getKbOrNull(_0x3cb743,_0x34805);if(!_0x110313)return{'ok':!![],'data':noOpData(_0x3cb743,_0x34805,![]),'message':'Company\x20knowledge\x20base\x20'+_0x34805+_0x5de091(0xc1)};assertExpectedKbVersion(_0x110313,_0x35ca43);const _0x25354b=projectKb(_0x110313);let _0xca282=![];try{await deleteEnterpriseKnowledgeBase(_0x3cb743[_0x5de091(0xc7)],_0x34805,_0x3cb743[_0x5de091(0xcf)],_0x110313['version']);}catch(_0x18e144){if(!isPlatformTransportFailure(_0x18e144))throw _0x18e144;_0xca282=!![];}const _0x1d58e8=await verifyKbMutationReadback(_0x5de091(0xd4),_0xca282,()=>getKbOrNull(_0x3cb743,_0x34805));if(_0x1d58e8)throw kbError(_0xca282?_0x5de091(0xdf):_0x5de091(0xd1),_0x5de091(0xd7)+_0x34805+_0x5de091(0xd3),_0x5de091(0xcb)+_0x34805+_0x5de091(0xc6));const _0x50f824=[RAG_WARNING];return _0xca282&&_0x50f824[_0x5de091(0xd5)](_0x5de091(0xdb)),{'ok':!![],'data':{'operation':_0x5de091(0xd4),'selector':{'id':_0x25354b['id'],'scope':_0x5de091(0xc0),'appCode':_0x25354b[_0x5de091(0xcf)]},'before':_0x25354b,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x5de091(0xc3),'path':knowledgeDocumentsPath(_0x5de091(0xc0),_0x5de091(0xd4))},'warnings':_0x50f824,'verification':{'status':'verified','databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0xca282,'lookupCommand':'rabetbase\x20kb\x20detail\x20--id\x20'+_0x25354b['id']+'\x20--format\x20compress'}},'message':_0x5de091(0xc4)+_0x25354b['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a155_0x12508c=a155_0x3f0f;function a155_0x3f0f(_0x47538b,_0x51ea9e){_0x47538b=_0x47538b-0xd7;const _0x1d067f=a155_0x1d06();let _0x3f0f9a=_0x1d067f[_0x47538b];return _0x3f0f9a;}(function(_0x5b8d63,_0x2730b0){const _0x274918=a155_0x3f0f,_0x5a1366=_0x5b8d63();while(!![]){try{const _0x2b3d95=parseInt(_0x274918(0xe2))/0x1+-parseInt(_0x274918(0xe6))/0x2*(-parseInt(_0x274918(0xe1))/0x3)+-parseInt(_0x274918(0xe3))/0x4+-parseInt(_0x274918(0xd8))/0x5*(-parseInt(_0x274918(0xda))/0x6)+-parseInt(_0x274918(0xd7))/0x7*(parseInt(_0x274918(0xde))/0x8)+parseInt(_0x274918(0xdf))/0x9+parseInt(_0x274918(0xd9))/0xa*(-parseInt(_0x274918(0xdc))/0xb);if(_0x2b3d95===_0x2730b0)break;else _0x5a1366['push'](_0x5a1366['shift']());}catch(_0x5209b9){_0x5a1366['push'](_0x5a1366['shift']());}}}(a155_0x1d06,0x2d91c));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';function a155_0x1d06(){const _0x374283=['248PafAPM','Loaded\x20company\x20knowledge\x20base\x20','string','2DlDanQ','read','469vlNxCS','10CybrFi','440agEkcP','567726xJJmMS','Show\x20one\x20company\x20knowledge\x20base\x20with\x20full\x20content\x20for\x20the\x20resolved\x20app','131065ZhneJt','detail','5912sbpvkN','2847087nDjzhP','content','637779wnLIxK','42309bTQdUE'];a155_0x1d06=function(){return _0x374283;};return a155_0x1d06();}export const kbDetail={'service':'kb','command':a155_0x12508c(0xdd),'description':a155_0x12508c(0xdb),'risk':a155_0x12508c(0xe7),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a155_0x12508c(0xe5),'required':!![],'description':'Company\x20knowledge-base\x20id'}],async 'validate'(_0x5c3b05){readKbId(_0x5c3b05);},async 'execute'(_0x55c0f8){const _0x50d85f=a155_0x12508c,_0x53ba0f=readKbId(_0x55c0f8),_0x3ed73c=await requireKb(_0x55c0f8,_0x53ba0f);return{'ok':!![],'data':{'knowledgeBase':{...projectKb(_0x3ed73c),'content':_0x3ed73c[_0x50d85f(0xe0)]}},'message':_0x50d85f(0xe4)+_0x53ba0f};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a156_0x56c368=a156_0x2ab0;function a156_0x2ab0(_0x5442fa,_0x3d4b73){_0x5442fa=_0x5442fa-0x109;const _0x33b19d=a156_0x33b1();let _0x2ab0b5=_0x33b19d[_0x5442fa];return _0x2ab0b5;}(function(_0x49dd1a,_0x4e33e4){const _0x1fdb49=a156_0x2ab0,_0x178916=_0x49dd1a();while(!![]){try{const _0x41f6e7=parseInt(_0x1fdb49(0x110))/0x1*(parseInt(_0x1fdb49(0x10d))/0x2)+-parseInt(_0x1fdb49(0x116))/0x3+-parseInt(_0x1fdb49(0x118))/0x4*(parseInt(_0x1fdb49(0x10e))/0x5)+parseInt(_0x1fdb49(0x115))/0x6*(parseInt(_0x1fdb49(0x11b))/0x7)+-parseInt(_0x1fdb49(0x112))/0x8*(parseInt(_0x1fdb49(0x10c))/0x9)+-parseInt(_0x1fdb49(0x113))/0xa*(-parseInt(_0x1fdb49(0x10f))/0xb)+-parseInt(_0x1fdb49(0x114))/0xc*(-parseInt(_0x1fdb49(0x10a))/0xd);if(_0x41f6e7===_0x4e33e4)break;else _0x178916['push'](_0x178916['shift']());}catch(_0x203557){_0x178916['push'](_0x178916['shift']());}}}(a156_0x33b1,0xf0a91));import{withKbManagementSession}from'../../core/kb-management-client.js';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';function a156_0x33b1(){const _0x2e6392=['618865FwwCzm','signal','3219003sGQYVx','204998DJiARp','10zBMKQw','34947vCjdFI','2Dizypr','execute','32wqTCZb','900FqmFin','168lMhAFw','90qCrCkM','691074YRjLAQ','map','63824lLBztE','search','dryRun','709933TAiCze','command'];a156_0x33b1=function(){return _0x2e6392;};return a156_0x33b1();}import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete][a156_0x56c368(0x117)](_0x26597b=>_0x26597b[a156_0x56c368(0x109)]===a156_0x56c368(0x119)?_0x26597b:{..._0x26597b,'execute':_0x1b8ac5=>withKbManagementSession(_0x1b8ac5[a156_0x56c368(0x10b)],()=>_0x26597b[a156_0x56c368(0x111)](_0x1b8ac5)),..._0x26597b[a156_0x56c368(0x11a)]?{'dryRun':_0x58c19c=>withKbManagementSession(_0x58c19c[a156_0x56c368(0x10b)],()=>_0x26597b[a156_0x56c368(0x11a)](_0x58c19c))}:{}});
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a157_0x5efd(){const _0x1bd166=['3770576wkuyrj','21RyhPOb','str','2237620zDAnfD','trim','2620650ojmzGA','Found\x20','appCode','length','31293396SSWTye','string','42QujQej','6630405taGTAV','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','\x20company\x20knowledge\x20base(s)\x20for\x20','map','35044SptPUJ','title','833100JwdTyn'];a157_0x5efd=function(){return _0x1bd166;};return a157_0x5efd();}const a157_0x1c794d=a157_0x304c;function a157_0x304c(_0x52e8d3,_0x17fe22){_0x52e8d3=_0x52e8d3-0xcd;const _0x5efd03=a157_0x5efd();let _0x304cd4=_0x5efd03[_0x52e8d3];return _0x304cd4;}(function(_0x2cb730,_0x5f2573){const _0x3da0a3=a157_0x304c,_0x27fb69=_0x2cb730();while(!![]){try{const _0x4762a6=-parseInt(_0x3da0a3(0xdf))/0x1+-parseInt(_0x3da0a3(0xd0))/0x2+-parseInt(_0x3da0a3(0xd8))/0x3*(parseInt(_0x3da0a3(0xdd))/0x4)+parseInt(_0x3da0a3(0xd9))/0x5+parseInt(_0x3da0a3(0xd2))/0x6*(-parseInt(_0x3da0a3(0xce))/0x7)+-parseInt(_0x3da0a3(0xcd))/0x8+parseInt(_0x3da0a3(0xd6))/0x9;if(_0x4762a6===_0x5f2573)break;else _0x27fb69['push'](_0x27fb69['shift']());}catch(_0x3ce29f){_0x27fb69['push'](_0x27fb69['shift']());}}}(a157_0x5efd,0xe72e2));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':'list','description':a157_0x1c794d(0xda),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a157_0x1c794d(0xde),'type':a157_0x1c794d(0xd7),'required':![],'description':'Filter\x20by\x20knowledge-base\x20title'}],async 'execute'(_0x3ede6d){const _0x2cb17d=a157_0x1c794d,_0x116f21=_0x3ede6d[_0x2cb17d(0xcf)](_0x2cb17d(0xde))[_0x2cb17d(0xd1)](),_0x36055e=await fetchAllCompanyKnowledgeBases(_0x3ede6d,{..._0x116f21?{'title':_0x116f21}:{}}),_0x1f06f8=_0x36055e[_0x2cb17d(0xdc)](projectKb);return{'ok':!![],'data':{'total':_0x1f06f8[_0x2cb17d(0xd5)],'knowledgeBases':_0x1f06f8},'message':_0x2cb17d(0xd3)+_0x1f06f8[_0x2cb17d(0xd5)]+_0x2cb17d(0xdb)+_0x3ede6d[_0x2cb17d(0xd4)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x62bc7e=a158_0x2041;(function(_0x598dab,_0x15f2b1){const _0x1b94d8=a158_0x2041,_0x31fe7b=_0x598dab();while(!![]){try{const _0x58875f=-parseInt(_0x1b94d8(0x198))/0x1*(-parseInt(_0x1b94d8(0x19d))/0x2)+-parseInt(_0x1b94d8(0x1b3))/0x3*(-parseInt(_0x1b94d8(0x1ae))/0x4)+parseInt(_0x1b94d8(0x1b5))/0x5+parseInt(_0x1b94d8(0x1a9))/0x6*(-parseInt(_0x1b94d8(0x1a6))/0x7)+-parseInt(_0x1b94d8(0x19b))/0x8+parseInt(_0x1b94d8(0x1b6))/0x9+-parseInt(_0x1b94d8(0x1ac))/0xa*(parseInt(_0x1b94d8(0x19a))/0xb);if(_0x58875f===_0x15f2b1)break;else _0x31fe7b['push'](_0x31fe7b['shift']());}catch(_0x5a703c){_0x31fe7b['push'](_0x31fe7b['shift']());}}}(a158_0x4ff5,0x6dcee));import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{CliErrors}from'../../errors.js';function a158_0x4ff5(){const _0x212a94=['topk','query','Search\x20query\x20is\x20required.','str','signal','flag','Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return','total','7FObLSZ','appCode','trim','475428lLKNns','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','130ohBrJa','string','328kLvKiw','number','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20--kb-service-url\x20<https-origin>\x20for\x20this\x20request.','num','cookie','17637jyiNGh','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','2979860gsUluA','2019717exKoiU','Found\x20','read','search','115421wlEDDb','kb-service-url','685135EZyaXe','633336zeOMtb','validation','2FepzJe'];a158_0x4ff5=function(){return _0x212a94;};return a158_0x4ff5();}import{getKbServiceDomain}from'../../constant/domain.js';function readSearchQuery(_0x126b44){const _0x46ebc9=a158_0x2041,_0x202803=_0x126b44[_0x46ebc9(0x1a1)](_0x46ebc9(0x19f))[_0x46ebc9(0x1a8)]();if(!_0x202803)throw CliErrors['validation'](_0x46ebc9(0x1a0));return _0x202803;}function readSearchTopK(_0x53ade5){const _0x481d7b=a158_0x2041,_0x291cce=_0x53ade5[_0x481d7b(0x1a3)](_0x481d7b(0x19e));if(_0x291cce===undefined||_0x291cce===null||_0x291cce==='')return undefined;const _0x32b442=_0x53ade5[_0x481d7b(0x1b1)](_0x481d7b(0x19e));if(!Number['isSafeInteger'](_0x32b442)||_0x32b442<0x1||_0x32b442>0x32)throw CliErrors[_0x481d7b(0x19c)]('--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');return _0x32b442;}function a158_0x2041(_0x4e9f87,_0x54cbf5){_0x4e9f87=_0x4e9f87-0x196;const _0x4ff510=a158_0x4ff5();let _0x2041d6=_0x4ff510[_0x4e9f87];return _0x2041d6;}function readSearchServiceUrl(_0x5d96ef){const _0x4d4b6a=a158_0x2041;if(_0x5d96ef['flag'](_0x4d4b6a(0x199))!==undefined)return normalizeKbServiceOrigin(_0x5d96ef[_0x4d4b6a(0x1a1)](_0x4d4b6a(0x199)));const _0x4aebc3=getKbServiceDomain();if(!_0x4aebc3)throw CliErrors['validation'](_0x4d4b6a(0x1ab),_0x4d4b6a(0x1b0));return normalizeKbServiceOrigin(_0x4aebc3);}export const kbSearch={'service':'kb','command':a158_0x62bc7e(0x197),'description':a158_0x62bc7e(0x1aa),'risk':a158_0x62bc7e(0x196),'requiresAppCode':!![],'structuredErrors':!![],'strictFlags':!![],'flags':[{'name':'query','type':a158_0x62bc7e(0x1ad),'required':!![],'description':'Company\x20and\x20public\x20knowledge\x20search\x20query'},{'name':a158_0x62bc7e(0x19e),'type':a158_0x62bc7e(0x1af),'required':![],'description':a158_0x62bc7e(0x1a4)},{'name':a158_0x62bc7e(0x199),'type':a158_0x62bc7e(0x1ad),'required':![],'description':a158_0x62bc7e(0x1b4)}],async 'validate'(_0x3da11a){readSearchQuery(_0x3da11a),readSearchTopK(_0x3da11a),readSearchServiceUrl(_0x3da11a);},async 'execute'(_0x476d2f){const _0x1e3a82=a158_0x62bc7e,_0xc281f9=readSearchQuery(_0x476d2f),_0x4f8489=readSearchTopK(_0x476d2f),_0x4c0d91=readSearchServiceUrl(_0x476d2f),_0x2b24cb={'cookie':_0x476d2f[_0x1e3a82(0x1b2)],'query':_0xc281f9,'appCode':_0x476d2f[_0x1e3a82(0x1a7)],..._0x4f8489!==undefined?{'topK':_0x4f8489}:{},'signal':_0x476d2f[_0x1e3a82(0x1a2)]},_0x32e6cb=await searchDirectKnowledge({..._0x2b24cb,'serviceUrl':_0x4c0d91});return{'ok':!![],'data':_0x32e6cb,'message':_0x1e3a82(0x1b7)+_0x32e6cb[_0x1e3a82(0x1a5)]+'\x20company/public\x20knowledge\x20hit(s)\x20for\x20'+_0x476d2f[_0x1e3a82(0x1a7)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2010d5,_0x35cb7d){const _0x4e79f2=a159_0x1a10,_0x379f9b=_0x2010d5();while(!![]){try{const _0x24df9a=parseInt(_0x4e79f2(0xd1))/0x1+parseInt(_0x4e79f2(0xbc))/0x2+-parseInt(_0x4e79f2(0x8b))/0x3+parseInt(_0x4e79f2(0xba))/0x4*(parseInt(_0x4e79f2(0x9a))/0x5)+parseInt(_0x4e79f2(0x94))/0x6+parseInt(_0x4e79f2(0xad))/0x7*(-parseInt(_0x4e79f2(0xa2))/0x8)+-parseInt(_0x4e79f2(0xb8))/0x9;if(_0x24df9a===_0x35cb7d)break;else _0x379f9b['push'](_0x379f9b['shift']());}catch(_0x43b02b){_0x379f9b['push'](_0x379f9b['shift']());}}}(a159_0x5096,0xd1965));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';function a159_0x5096(){const _0xa038fa=['add','filter','trim','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','isSafeInteger','kb_file_invalid','Knowledge-base\x20list\x20returned\x20an\x20inconsistent\x20page\x20size\x20or\x20record\x20count.','cause','scope','kb_confirmation_required','utf-8','totalCount','decode','pageSize','message','floor','sourceVersion','\x20version\x20changed:\x20expected\x20','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','kb_id_invalid','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','min','title','1707849Savdiv','number','stringify','sha256','contentHash','kb_content_invalid','content','isFile','byteSize','2570202xiVWtr','kb_file_unreadable','version','bool','Knowledge-base\x20list\x20returned\x20page\x20','clear','3550xjEPNT','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20',',\x20current\x20','allowEmpty','\x20during\x20paging.','items','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','\x20is\x20not\x20company-scoped.','192408WdnrbS','sha256:','pageTooLarge','dry-run','Company\x20knowledge\x20base\x20not\x20found:\x20','length','str','kb_state_drift','Knowledge-base\x20get-one\x20returned\x20id\x20','updateTime','currentPage','413eNXnjJ','indexStatus','cookie','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','push','string','\x20records.','outcome_unknown','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','update','kb_file_required','3316203RmClZo','kb_list_contract_invalid','8224BKrVHw','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','620754bVSWmr','max','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Knowledge\x20base\x20','Pass\x20--file\x20<knowledge.md>.','appCode','\x20to\x20','\x20response\x20is\x20missing\x20','paging','kb_','defineProperty','from','\x20was\x20requested.','kb_response_invalid','company','verification_unavailable','test','yes','\x20of\x20','createTime','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','1016724yxrJFA','kb_scope_mismatch'];a159_0x5096=function(){return _0xa038fa;};return a159_0x5096();}import{resolve}from'node:path';import{TextDecoder}from'node:util';import{getEnterpriseKnowledgeBase,getPlatformErrorCode,getPlatformHttpStatus,listEnterpriseKnowledgeBases}from'../../core/api-client.js';import{KbManagementError}from'../../core/kb-management-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE='306';export function kbError(_0x14a55c,_0xb3ca5f,_0x47094b){return new CliError(_0x14a55c,0x1,_0xb3ca5f,_0x47094b);}export function readKbId(_0x5547da){const _0x155792=a159_0x1a10,_0x43543c=_0x5547da[_0x155792(0xa8)]('id');if(!/^0*[1-9][0-9]*$/[_0x155792(0xcc)](_0x43543c))throw kbError(_0x155792(0x87),'--id\x20must\x20be\x20a\x20positive\x20decimal\x20integer\x20string.');return _0x43543c;}export function requireKbExplicitYes(_0x43e743){const _0x42b169=a159_0x1a10;if(_0x43e743['bool'](_0x42b169(0xa5))||_0x43e743[_0x42b169(0x97)](_0x42b169(0xcd)))return;throw kbError(_0x42b169(0x7d),'This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.',_0x42b169(0xbe));}function sha256(_0xe01d49){const _0x2df01a=a159_0x1a10;return _0x2df01a(0xa3)+createHash(_0x2df01a(0x8e))[_0x2df01a(0xb6)](_0xe01d49)['digest']('hex');}export function inspectKbContent(_0x5deb1){const _0x17aedb=a159_0x1a10,_0x4e52d9=Buffer[_0x17aedb(0xc7)](_0x5deb1,'utf8');return{'content':_0x5deb1,'byteSize':_0x4e52d9['byteLength'],'contentHash':sha256(_0x4e52d9)};}export async function readKbFile(_0xc8a6bf){const _0x492d8e=a159_0x1a10,_0x2d9f46=_0xc8a6bf[_0x492d8e(0xd5)]();if(!_0x2d9f46)throw kbError(_0x492d8e(0xb7),_0x492d8e(0x86),_0x492d8e(0xc0));const _0x3f75b0=resolve(_0x2d9f46);let _0x22cf88;try{_0x22cf88=await stat(_0x3f75b0);}catch(_0x7cc9b7){throw kbError(_0x492d8e(0x95),_0x492d8e(0x88)+_0x2d9f46,_0x7cc9b7 instanceof Error?_0x7cc9b7[_0x492d8e(0x82)]:String(_0x7cc9b7));}if(!_0x22cf88[_0x492d8e(0x92)]())throw kbError(_0x492d8e(0xd8),'Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2d9f46);let _0x1bca8f;try{_0x1bca8f=await readFile(_0x3f75b0);}catch(_0x14763e){throw kbError(_0x492d8e(0x95),'Cannot\x20read\x20knowledge-base\x20content\x20file:\x20'+_0x2d9f46,_0x14763e instanceof Error?_0x14763e[_0x492d8e(0x82)]:String(_0x14763e));}let _0x58f383;try{_0x58f383=new TextDecoder(_0x492d8e(0x7e),{'fatal':!![],'ignoreBOM':!![]})[_0x492d8e(0x80)](_0x1bca8f);}catch{throw kbError(_0x492d8e(0x90),'Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x2d9f46);}if(!_0x58f383[_0x492d8e(0xd5)]())throw kbError(_0x492d8e(0x90),'Knowledge-base\x20content\x20file\x20is\x20blank:\x20'+_0x2d9f46);return inspectKbContent(_0x58f383);}export async function verifyKbMutationReadback(_0x4cf375,_0x100712,_0x488687){const _0x54cb1f=a159_0x1a10;try{return await _0x488687();}catch(_0x1f87e1){const _0x53a609=kbError(_0x54cb1f(0xc5)+_0x4cf375+'_'+(_0x100712?_0x54cb1f(0xb4):_0x54cb1f(0xcb)),'The\x20'+_0x4cf375+_0x54cb1f(0xd0),_0x54cb1f(0xbb));Object[_0x54cb1f(0xc6)](_0x53a609,_0x54cb1f(0xda),{'value':_0x1f87e1,'enumerable':![]});throw _0x53a609;}}function requireRecordText(_0x478a2b,_0x3fba23,_0x2c2b82,_0x349c1e={}){const _0x595a53=a159_0x1a10;if(typeof _0x478a2b==='string'&&(_0x349c1e[_0x595a53(0x9d)]||_0x478a2b[_0x595a53(0xd5)]()))return _0x478a2b;throw kbError(_0x595a53(0xc9),_0x595a53(0xbf)+String(_0x2c2b82)+_0x595a53(0xc3)+_0x3fba23+'.');}export function projectKb(_0x3318a7){const _0x109c30=a159_0x1a10;if(typeof _0x3318a7['id']!==_0x109c30(0xb2)||!/^0*[1-9][0-9]*$/[_0x109c30(0xcc)](_0x3318a7['id']))throw kbError(_0x109c30(0xc9),_0x109c30(0xb0));if(!Number['isSafeInteger'](_0x3318a7[_0x109c30(0x96)])||_0x3318a7[_0x109c30(0x96)]<0x1)throw kbError(_0x109c30(0xc9),_0x109c30(0xbf)+_0x3318a7['id']+'\x20response\x20contains\x20an\x20invalid\x20version.');if(_0x3318a7[_0x109c30(0xdb)]!==_0x109c30(0xca))throw kbError(_0x109c30(0xd2),'Knowledge\x20base\x20'+_0x3318a7['id']+_0x109c30(0xa1));const _0x3c0bb2=requireRecordText(_0x3318a7['appCode'],_0x109c30(0xc1),_0x3318a7['id']),_0x3762b2=requireRecordText(_0x3318a7[_0x109c30(0x8a)],'title',_0x3318a7['id']),_0x4fb643=inspectKbContent(requireRecordText(_0x3318a7['content'],_0x109c30(0x91),_0x3318a7['id'],{'allowEmpty':!![]})),_0x350112=typeof _0x3318a7[_0x109c30(0xcf)]===_0x109c30(0xb2)||typeof _0x3318a7[_0x109c30(0xcf)]===_0x109c30(0x8c)?_0x3318a7['createTime']:undefined,_0xc31eb0=typeof _0x3318a7[_0x109c30(0xab)]===_0x109c30(0xb2)||typeof _0x3318a7[_0x109c30(0xab)]==='number'?_0x3318a7[_0x109c30(0xab)]:undefined,_0x53a01a=sha256(JSON[_0x109c30(0x8d)]({'id':_0x3318a7['id'],'scope':_0x3318a7[_0x109c30(0xdb)],'appCode':_0x3c0bb2,'title':_0x3762b2,'version':_0x3318a7[_0x109c30(0x96)],'contentHash':_0x4fb643[_0x109c30(0x8f)],'createTime':_0x350112,'updateTime':_0xc31eb0}));return{'id':_0x3318a7['id'],'scope':_0x109c30(0xca),'appCode':_0x3c0bb2,'title':_0x3762b2,'version':_0x3318a7[_0x109c30(0x96)],..._0x3318a7[_0x109c30(0x84)]!==undefined?{'sourceVersion':_0x3318a7[_0x109c30(0x84)]}:{},..._0x3318a7[_0x109c30(0xae)]!==undefined?{'indexStatus':_0x3318a7['indexStatus'],'indexedVersion':_0x3318a7['indexedVersion']}:{},'contentByteSize':_0x4fb643[_0x109c30(0x93)],'contentHash':_0x4fb643[_0x109c30(0x8f)],'snapshotHash':_0x53a01a,..._0x350112!==undefined?{'createTime':_0x350112}:{},..._0xc31eb0!==undefined?{'updateTime':_0xc31eb0}:{}};}export function assertCompanyKnowledgeBase(_0x50a017,_0xe508ad,_0x1562ff){const _0x52afbc=a159_0x1a10;if(_0x1562ff!==undefined&&_0x50a017['id']!==_0x1562ff)throw kbError('kb_response_invalid',_0x52afbc(0xaa)+_0x50a017['id']+'\x20while\x20id\x20'+_0x1562ff+_0x52afbc(0xc8));if(_0x50a017[_0x52afbc(0xdb)]!==_0x52afbc(0xca)||_0x50a017[_0x52afbc(0xc1)]!==_0xe508ad)throw kbError('kb_scope_mismatch',_0x52afbc(0xbf)+_0x50a017['id']+_0x52afbc(0x9b)+_0xe508ad+'.');}export async function fetchAllCompanyKnowledgeBases(_0x199eac,_0x1a2722){const _0x1a5c74=a159_0x1a10;let _0x6e2c5b=LIST_PAGE_SIZE;const _0xe12a69=[],_0x40b35d=new Set();let _0x3fc0e4=0x1,_0x617101=0x0,_0x4f1e24;while(!![]){let _0x5b605b;try{_0x5b605b=await listEnterpriseKnowledgeBases(_0x199eac['cookie'],{'currentPage':_0x3fc0e4,'pageSize':_0x6e2c5b,'appCode':_0x199eac['appCode'],..._0x1a2722});}catch(_0x185819){if(!(_0x185819 instanceof KbManagementError)||!_0x185819[_0x1a5c74(0xa4)]||_0x6e2c5b===0x1)throw _0x185819;_0x6e2c5b=Math['max'](0x1,Math[_0x1a5c74(0x83)](_0x6e2c5b/0x2)),_0x3fc0e4=0x1,_0x617101=0x0,_0xe12a69['length']=0x0,_0x40b35d[_0x1a5c74(0x99)]();continue;}const _0xd6fd6e=_0x5b605b['paging']?.[_0x1a5c74(0x7f)];if(!_0x5b605b[_0x1a5c74(0xc4)]||_0x5b605b[_0x1a5c74(0xc4)][_0x1a5c74(0x81)]!==_0x6e2c5b||!Number[_0x1a5c74(0xd7)](_0xd6fd6e)||_0xd6fd6e<0x0||_0x5b605b[_0x1a5c74(0x9f)][_0x1a5c74(0xa7)]!==Math[_0x1a5c74(0x89)](_0x6e2c5b,Math[_0x1a5c74(0xbd)](0x0,_0xd6fd6e-(_0x3fc0e4-0x1)*_0x6e2c5b)))throw kbError(_0x1a5c74(0xb9),_0x1a5c74(0xd9));if(_0x5b605b[_0x1a5c74(0xc4)][_0x1a5c74(0xac)]!==_0x3fc0e4)throw kbError('kb_list_contract_invalid',_0x1a5c74(0x98)+_0x5b605b['paging']['currentPage']+'\x20while\x20page\x20'+_0x3fc0e4+_0x1a5c74(0xc8));if(_0xd6fd6e!==undefined){if(_0x4f1e24!==undefined&&_0xd6fd6e!==_0x4f1e24)throw kbError(_0x1a5c74(0xb9),'Knowledge-base\x20list\x20total\x20changed\x20from\x20'+_0x4f1e24+_0x1a5c74(0xc2)+_0xd6fd6e+_0x1a5c74(0x9e),'Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.');_0x4f1e24=_0xd6fd6e;}for(const _0x388601 of _0x5b605b[_0x1a5c74(0x9f)]){if(typeof _0x388601['id']!==_0x1a5c74(0xb2)||!/^0*[1-9][0-9]*$/['test'](_0x388601['id'])||_0x40b35d['has'](_0x388601['id']))throw kbError('kb_list_contract_invalid',_0x1a5c74(0xb5)+String(_0x388601['id'])+'.');_0x40b35d[_0x1a5c74(0xd3)](_0x388601['id']),_0x388601[_0x1a5c74(0xdb)]==='company'&&_0x388601['appCode']===_0x199eac['appCode']&&_0xe12a69[_0x1a5c74(0xb1)](_0x388601);}_0x617101+=_0x5b605b[_0x1a5c74(0x9f)]['length'];if(_0xd6fd6e!==undefined&&_0x617101>=_0xd6fd6e)break;if(_0x5b605b[_0x1a5c74(0x9f)][_0x1a5c74(0xa7)]<_0x6e2c5b){if(_0xd6fd6e!==undefined&&_0x617101<_0xd6fd6e)throw kbError(_0x1a5c74(0xb9),'Knowledge-base\x20list\x20stopped\x20at\x20'+_0x617101+_0x1a5c74(0xce)+_0xd6fd6e+_0x1a5c74(0xb3));break;}_0x3fc0e4+=0x1;}return _0xe12a69;}function a159_0x1a10(_0x579af6,_0x4f935f){_0x579af6=_0x579af6-0x7d;const _0x509692=a159_0x5096();let _0x1a10e4=_0x509692[_0x579af6];return _0x1a10e4;}export function findExactCompanyKnowledgeBases(_0x2657da,_0x32c456,_0x576cd9){const _0x37402b=a159_0x1a10;return _0x2657da[_0x37402b(0xd4)](_0x5c4ae3=>_0x5c4ae3[_0x37402b(0xdb)]===_0x37402b(0xca)&&_0x5c4ae3[_0x37402b(0xc1)]===_0x32c456&&_0x5c4ae3['title']===_0x576cd9);}export async function getKbOrNull(_0x268f88,_0x317027){const _0xf42e84=a159_0x1a10;try{const _0x4340b1=await getEnterpriseKnowledgeBase(_0x268f88[_0xf42e84(0xaf)],_0x317027,_0x268f88['appCode']);return assertCompanyKnowledgeBase(_0x4340b1,_0x268f88[_0xf42e84(0xc1)],_0x317027),_0x4340b1;}catch(_0x13b056){if(getPlatformErrorCode(_0x13b056)===DATA_NOT_EXIST_ERROR_CODE&&getPlatformHttpStatus(_0x13b056)===0x194)return null;throw _0x13b056;}}export async function requireKb(_0x583430,_0x1ea042){const _0x268aed=a159_0x1a10,_0x29e950=await getKbOrNull(_0x583430,_0x1ea042);if(!_0x29e950)throw kbError('kb_not_found',_0x268aed(0xa6)+_0x1ea042,_0x268aed(0xa0));return _0x29e950;}export function assertExpectedKbVersion(_0x30b2f8,_0x1ede1e){const _0xc693de=a159_0x1a10;if(_0x1ede1e===undefined||_0x30b2f8[_0xc693de(0x96)]===_0x1ede1e)return;throw kbError(_0xc693de(0xa9),_0xc693de(0xbf)+_0x30b2f8['id']+_0xc693de(0x85)+_0x1ede1e+_0xc693de(0x9c)+_0x30b2f8[_0xc693de(0x96)]+'.',_0xc693de(0xd6));}
|
|
1
|
+
const a159_0x4b2859=a159_0x56c5;(function(_0x41a990,_0x36aaa7){const _0x4bfc52=a159_0x56c5,_0x1aa846=_0x41a990();while(!![]){try{const _0x5788f5=parseInt(_0x4bfc52(0x83))/0x1+parseInt(_0x4bfc52(0x6f))/0x2*(-parseInt(_0x4bfc52(0xc4))/0x3)+-parseInt(_0x4bfc52(0x72))/0x4+parseInt(_0x4bfc52(0x76))/0x5+parseInt(_0x4bfc52(0xa9))/0x6+-parseInt(_0x4bfc52(0xb7))/0x7+-parseInt(_0x4bfc52(0xc2))/0x8*(-parseInt(_0x4bfc52(0x73))/0x9);if(_0x5788f5===_0x36aaa7)break;else _0x1aa846['push'](_0x1aa846['shift']());}catch(_0x2080f0){_0x1aa846['push'](_0x1aa846['shift']());}}}(a159_0x4bd1,0xb26ea));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,getPlatformHttpStatus,listEnterpriseKnowledgeBases}from'../../core/api-client.js';import{KbManagementError}from'../../core/kb-management-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a159_0x4b2859(0xcf);export function kbError(_0x39b704,_0x361341,_0x15204f){return new CliError(_0x39b704,0x1,_0x361341,_0x15204f);}export function readKbId(_0x4454e9){const _0x2d1a1a=a159_0x4b2859,_0x4c9c49=_0x4454e9[_0x2d1a1a(0xc5)]('id');if(!/^0*[1-9][0-9]*$/['test'](_0x4c9c49))throw kbError(_0x2d1a1a(0xa7),_0x2d1a1a(0xaf));return _0x4c9c49;}function a159_0x56c5(_0xeb5570,_0xda22aa){_0xeb5570=_0xeb5570-0x6f;const _0x4bd14a=a159_0x4bd1();let _0x56c597=_0x4bd14a[_0xeb5570];return _0x56c597;}export function requireKbExplicitYes(_0x33115b){const _0x434072=a159_0x4b2859;if(_0x33115b['bool']('dry-run')||_0x33115b[_0x434072(0x9a)]('yes'))return;throw kbError(_0x434072(0x74),_0x434072(0x7b),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}function sha256(_0x4f8a73){const _0x59c363=a159_0x4b2859;return'sha256:'+createHash(_0x59c363(0x80))[_0x59c363(0xbb)](_0x4f8a73)[_0x59c363(0x96)](_0x59c363(0x92));}export function inspectKbContent(_0x335195){const _0x50098c=a159_0x4b2859,_0x1c1b6d=Buffer[_0x50098c(0x97)](_0x335195,_0x50098c(0xaa));return{'content':_0x335195,'byteSize':_0x1c1b6d[_0x50098c(0xb9)],'contentHash':sha256(_0x1c1b6d)};}export async function readKbFile(_0x4a04ec){const _0x4d91e0=a159_0x4b2859,_0xbb6ae=_0x4a04ec[_0x4d91e0(0xb4)]();if(!_0xbb6ae)throw kbError(_0x4d91e0(0xac),_0x4d91e0(0x9b),_0x4d91e0(0x8a));const _0x27a5c4=resolve(_0xbb6ae);let _0x506d75;try{_0x506d75=await stat(_0x27a5c4);}catch(_0x3695f3){throw kbError(_0x4d91e0(0x81),_0x4d91e0(0xb3)+_0xbb6ae,_0x3695f3 instanceof Error?_0x3695f3[_0x4d91e0(0xd0)]:String(_0x3695f3));}if(!_0x506d75[_0x4d91e0(0xb5)]())throw kbError('kb_file_invalid',_0x4d91e0(0x94)+_0xbb6ae);let _0x329a08;try{_0x329a08=await readFile(_0x27a5c4);}catch(_0x2bdab8){throw kbError(_0x4d91e0(0x81),_0x4d91e0(0xbd)+_0xbb6ae,_0x2bdab8 instanceof Error?_0x2bdab8['message']:String(_0x2bdab8));}let _0x3a3652;try{_0x3a3652=new TextDecoder(_0x4d91e0(0xbc),{'fatal':!![],'ignoreBOM':!![]})[_0x4d91e0(0x87)](_0x329a08);}catch{throw kbError(_0x4d91e0(0x71),_0x4d91e0(0x79)+_0xbb6ae);}if(!_0x3a3652[_0x4d91e0(0xb4)]())throw kbError('kb_content_invalid','Knowledge-base\x20content\x20file\x20is\x20blank:\x20'+_0xbb6ae);return inspectKbContent(_0x3a3652);}export async function verifyKbMutationReadback(_0x201c88,_0x537ab2,_0x445d11){const _0x3c67d4=a159_0x4b2859;try{return await _0x445d11();}catch(_0x919e8c){const _0xb87cff=kbError('kb_'+_0x201c88+'_'+(_0x537ab2?_0x3c67d4(0xa1):_0x3c67d4(0x70)),_0x3c67d4(0xc1)+_0x201c88+_0x3c67d4(0x75),_0x3c67d4(0x8c));Object[_0x3c67d4(0x8f)](_0xb87cff,_0x3c67d4(0x7f),{'value':_0x919e8c,'enumerable':![]});throw _0xb87cff;}}function requireRecordText(_0x38380c,_0x7fedd5,_0x9bbfd0,_0x3f4c00={}){const _0x3ec09b=a159_0x4b2859;if(typeof _0x38380c===_0x3ec09b(0x93)&&(_0x3f4c00[_0x3ec09b(0xa4)]||_0x38380c[_0x3ec09b(0xb4)]()))return _0x38380c;throw kbError('kb_response_invalid',_0x3ec09b(0xce)+String(_0x9bbfd0)+_0x3ec09b(0x84)+_0x7fedd5+'.');}export function projectKb(_0xd3b66c){const _0x2cfd6b=a159_0x4b2859;if(typeof _0xd3b66c['id']!==_0x2cfd6b(0x93)||!/^0*[1-9][0-9]*$/[_0x2cfd6b(0xc0)](_0xd3b66c['id']))throw kbError('kb_response_invalid','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.');if(!Number[_0x2cfd6b(0x9e)](_0xd3b66c['version'])||_0xd3b66c[_0x2cfd6b(0x98)]<0x1)throw kbError(_0x2cfd6b(0xa2),'Knowledge\x20base\x20'+_0xd3b66c['id']+'\x20response\x20contains\x20an\x20invalid\x20version.');if(_0xd3b66c['scope']!==_0x2cfd6b(0xb6))throw kbError(_0x2cfd6b(0xb8),_0x2cfd6b(0xce)+_0xd3b66c['id']+'\x20is\x20not\x20company-scoped.');const _0x2e14c5=requireRecordText(_0xd3b66c['appCode'],'appCode',_0xd3b66c['id']),_0x542d59=requireRecordText(_0xd3b66c[_0x2cfd6b(0xa3)],_0x2cfd6b(0xa3),_0xd3b66c['id']),_0x29c4d1=inspectKbContent(requireRecordText(_0xd3b66c['content'],_0x2cfd6b(0xb0),_0xd3b66c['id'],{'allowEmpty':!![]})),_0x379da7=typeof _0xd3b66c[_0x2cfd6b(0xa8)]===_0x2cfd6b(0x93)||typeof _0xd3b66c['createTime']===_0x2cfd6b(0xb1)?_0xd3b66c[_0x2cfd6b(0xa8)]:undefined,_0x3e36db=typeof _0xd3b66c[_0x2cfd6b(0xab)]==='string'||typeof _0xd3b66c[_0x2cfd6b(0xab)]===_0x2cfd6b(0xb1)?_0xd3b66c[_0x2cfd6b(0xab)]:undefined,_0x417329=sha256(JSON['stringify']({'id':_0xd3b66c['id'],'scope':_0xd3b66c['scope'],'appCode':_0x2e14c5,'title':_0x542d59,'version':_0xd3b66c[_0x2cfd6b(0x98)],'contentHash':_0x29c4d1[_0x2cfd6b(0xc8)],'createTime':_0x379da7,'updateTime':_0x3e36db}));return{'id':_0xd3b66c['id'],'scope':_0x2cfd6b(0xb6),'appCode':_0x2e14c5,'title':_0x542d59,'version':_0xd3b66c['version'],..._0xd3b66c['sourceVersion']!==undefined?{'sourceVersion':_0xd3b66c[_0x2cfd6b(0x77)]}:{},..._0xd3b66c[_0x2cfd6b(0x9f)]!==undefined?{'indexStatus':_0xd3b66c[_0x2cfd6b(0x9f)],'indexedVersion':_0xd3b66c[_0x2cfd6b(0xb2)]}:{},'contentByteSize':_0x29c4d1['byteSize'],'contentHash':_0x29c4d1[_0x2cfd6b(0xc8)],'snapshotHash':_0x417329,..._0x379da7!==undefined?{'createTime':_0x379da7}:{},..._0x3e36db!==undefined?{'updateTime':_0x3e36db}:{}};}export function assertCompanyKnowledgeBase(_0x34367c,_0x16bb56,_0x19c4e8){const _0x42d5dc=a159_0x4b2859;if(_0x19c4e8!==undefined&&_0x34367c['id']!==_0x19c4e8)throw kbError('kb_response_invalid',_0x42d5dc(0x86)+_0x34367c['id']+'\x20while\x20id\x20'+_0x19c4e8+_0x42d5dc(0xcb));if(_0x34367c[_0x42d5dc(0xc3)]!=='company'||_0x34367c['appCode']!==_0x16bb56)throw kbError(_0x42d5dc(0xb8),_0x42d5dc(0xce)+_0x34367c['id']+'\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20'+_0x16bb56+'.');}function a159_0x4bd1(){const _0x22617c=['This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','Knowledge-base\x20list\x20returned\x20an\x20inconsistent\x20page\x20size\x20or\x20record\x20count.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','\x20to\x20','cause','sha256','kb_file_unreadable','max','739100PaKzjJ','\x20response\x20is\x20missing\x20','min','Knowledge-base\x20get-one\x20returned\x20id\x20','decode','\x20during\x20paging.','\x20while\x20page\x20','Pass\x20--file\x20<knowledge.md>.','Knowledge-base\x20list\x20total\x20changed\x20from\x20','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','appCode','defineProperty','paging','pageTooLarge','hex','string','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','clear','digest','from','version','currentPage','bool','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','\x20of\x20','kb_not_found','isSafeInteger','indexStatus','filter','outcome_unknown','kb_response_invalid','title','allowEmpty','has','cookie','kb_id_invalid','createTime','883290FUCehv','utf8','updateTime','kb_file_required','kb_state_drift','Knowledge-base\x20list\x20returned\x20page\x20','--id\x20must\x20be\x20a\x20positive\x20decimal\x20integer\x20string.','content','number','indexedVersion','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','trim','isFile','company','1359323duvgOc','kb_scope_mismatch','byteLength','\x20records.','update','utf-8','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','kb_list_contract_invalid',',\x20current\x20','test','The\x20','41648DUHqAc','scope','4656FEwWDj','str','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','\x20version\x20changed:\x20expected\x20','contentHash','items','Knowledge-base\x20list\x20stopped\x20at\x20','\x20was\x20requested.','Company\x20knowledge\x20base\x20not\x20found:\x20','floor','Knowledge\x20base\x20','306','message','1586hpLRvS','verification_unavailable','kb_content_invalid','3981664FSvmcd','3267rRFrJD','kb_confirmation_required','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','1875530EokZDj','sourceVersion','length','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','add'];a159_0x4bd1=function(){return _0x22617c;};return a159_0x4bd1();}export async function fetchAllCompanyKnowledgeBases(_0x185785,_0x43bf5e){const _0x59a31e=a159_0x4b2859;let _0x13ba12=LIST_PAGE_SIZE;const _0x3a0aa1=[],_0x5d8999=new Set();let _0x2eaa11=0x1,_0x22904e=0x0,_0x5cc5c0;while(!![]){let _0x16fe3c;try{_0x16fe3c=await listEnterpriseKnowledgeBases(_0x185785[_0x59a31e(0xa6)],{'currentPage':_0x2eaa11,'pageSize':_0x13ba12,'appCode':_0x185785[_0x59a31e(0x8e)],..._0x43bf5e});}catch(_0x368b64){if(!(_0x368b64 instanceof KbManagementError)||!_0x368b64[_0x59a31e(0x91)]||_0x13ba12===0x1)throw _0x368b64;_0x13ba12=Math[_0x59a31e(0x82)](0x1,Math[_0x59a31e(0xcd)](_0x13ba12/0x2)),_0x2eaa11=0x1,_0x22904e=0x0,_0x3a0aa1[_0x59a31e(0x78)]=0x0,_0x5d8999[_0x59a31e(0x95)]();continue;}const _0x4dc484=_0x16fe3c[_0x59a31e(0x90)]?.['totalCount'];if(!_0x16fe3c[_0x59a31e(0x90)]||_0x16fe3c[_0x59a31e(0x90)]['pageSize']!==_0x13ba12||!Number[_0x59a31e(0x9e)](_0x4dc484)||_0x4dc484<0x0||_0x16fe3c['items'][_0x59a31e(0x78)]!==Math[_0x59a31e(0x85)](_0x13ba12,Math['max'](0x0,_0x4dc484-(_0x2eaa11-0x1)*_0x13ba12)))throw kbError(_0x59a31e(0xbe),_0x59a31e(0x7c));if(_0x16fe3c[_0x59a31e(0x90)]['currentPage']!==_0x2eaa11)throw kbError(_0x59a31e(0xbe),_0x59a31e(0xae)+_0x16fe3c[_0x59a31e(0x90)][_0x59a31e(0x99)]+_0x59a31e(0x89)+_0x2eaa11+'\x20was\x20requested.');if(_0x4dc484!==undefined){if(_0x5cc5c0!==undefined&&_0x4dc484!==_0x5cc5c0)throw kbError(_0x59a31e(0xbe),_0x59a31e(0x8b)+_0x5cc5c0+_0x59a31e(0x7e)+_0x4dc484+_0x59a31e(0x88),_0x59a31e(0xc6));_0x5cc5c0=_0x4dc484;}for(const _0x4aaa74 of _0x16fe3c['items']){if(typeof _0x4aaa74['id']!==_0x59a31e(0x93)||!/^0*[1-9][0-9]*$/[_0x59a31e(0xc0)](_0x4aaa74['id'])||_0x5d8999[_0x59a31e(0xa5)](_0x4aaa74['id']))throw kbError('kb_list_contract_invalid',_0x59a31e(0x8d)+String(_0x4aaa74['id'])+'.');_0x5d8999[_0x59a31e(0x7a)](_0x4aaa74['id']),_0x4aaa74[_0x59a31e(0xc3)]===_0x59a31e(0xb6)&&_0x4aaa74[_0x59a31e(0x8e)]===_0x185785[_0x59a31e(0x8e)]&&_0x3a0aa1['push'](_0x4aaa74);}_0x22904e+=_0x16fe3c['items'][_0x59a31e(0x78)];if(_0x4dc484!==undefined&&_0x22904e>=_0x4dc484)break;if(_0x16fe3c[_0x59a31e(0xc9)][_0x59a31e(0x78)]<_0x13ba12){if(_0x4dc484!==undefined&&_0x22904e<_0x4dc484)throw kbError('kb_list_contract_invalid',_0x59a31e(0xca)+_0x22904e+_0x59a31e(0x9c)+_0x4dc484+_0x59a31e(0xba));break;}_0x2eaa11+=0x1;}return _0x3a0aa1;}export function findExactCompanyKnowledgeBases(_0x2c26b6,_0x59639d,_0x80ac15){const _0x8c39f4=a159_0x4b2859;return _0x2c26b6[_0x8c39f4(0xa0)](_0x4fa66e=>_0x4fa66e['scope']===_0x8c39f4(0xb6)&&_0x4fa66e['appCode']===_0x59639d&&_0x4fa66e['title']===_0x80ac15);}export async function getKbOrNull(_0x5a189d,_0x49f6f0){const _0xda4c83=a159_0x4b2859;try{const _0x35ae9f=await getEnterpriseKnowledgeBase(_0x5a189d[_0xda4c83(0xa6)],_0x49f6f0,_0x5a189d[_0xda4c83(0x8e)]);return assertCompanyKnowledgeBase(_0x35ae9f,_0x5a189d['appCode'],_0x49f6f0),_0x35ae9f;}catch(_0x746a36){if(getPlatformErrorCode(_0x746a36)===DATA_NOT_EXIST_ERROR_CODE&&getPlatformHttpStatus(_0x746a36)===0x194)return null;throw _0x746a36;}}export async function requireKb(_0x8e3f45,_0x1ff7e3){const _0x4b09eb=a159_0x4b2859,_0x5e7a74=await getKbOrNull(_0x8e3f45,_0x1ff7e3);if(!_0x5e7a74)throw kbError(_0x4b09eb(0x9d),_0x4b09eb(0xcc)+_0x1ff7e3,'Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.');return _0x5e7a74;}export function assertExpectedKbVersion(_0x2ba241,_0xaa55c3){const _0x2133c6=a159_0x4b2859;if(_0xaa55c3===undefined||_0x2ba241[_0x2133c6(0x98)]===_0xaa55c3)return;throw kbError(_0x2133c6(0xad),'Knowledge\x20base\x20'+_0x2ba241['id']+_0x2133c6(0xc7)+_0xaa55c3+_0x2133c6(0xbf)+_0x2ba241[_0x2133c6(0x98)]+'.',_0x2133c6(0x7d));}
|