@lovrabet/rabetbase-cli 2.5.10-beta.2 → 2.5.10-beta.4
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 +10 -0
- 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.d.ts +2 -2
- 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/context.d.ts +3 -0
- package/lib/commands/issue/context.js +1 -0
- 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/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/instant-api-policy/endpoints.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/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/references/rabetbase-issue-report.md +4 -1
- package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
- package/skills/rabetbase-page-generation/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
- package/lib/commands/issue/shared.d.ts +0 -32
- package/lib/commands/issue/shared.js +0 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +0 -26
- package/lib/telemetry/send-platform-issue-collect-log.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a144_0x14c1(){const _0x197145=['12521106gnlvpU','6GTlnUt','7329368xxKPOA','revision','appCode','Get\x20one\x20immutable\x20Instant\x20API\x20policy\x20revision','instant-api-policy','1175335USlVXi','3909024BiGtkB','2972247tpAtQD','4ONNnmA','4247EmfAKu','2374841TzoEvi','Loaded\x20Instant\x20API\x20policy\x20revision\x20','read'];a144_0x14c1=function(){return _0x197145;};return a144_0x14c1();}const a144_0x30a027=a144_0x2b6e;function a144_0x2b6e(_0x1d3dc2,_0x53a81e){_0x1d3dc2=_0x1d3dc2-0x1c4;const _0x14c113=a144_0x14c1();let _0x2b6e93=_0x14c113[_0x1d3dc2];return _0x2b6e93;}(function(_0x2dc632,_0x49c4e9){const _0x183433=a144_0x2b6e,_0xd134dd=_0x2dc632();while(!![]){try{const _0x3cf3c9=-parseInt(_0x183433(0x1c9))/0x1*(-parseInt(_0x183433(0x1c8))/0x2)+parseInt(_0x183433(0x1c7))/0x3+-parseInt(_0x183433(0x1c6))/0x4+-parseInt(_0x183433(0x1c5))/0x5+-parseInt(_0x183433(0x1ce))/0x6*(-parseInt(_0x183433(0x1ca))/0x7)+-parseInt(_0x183433(0x1cf))/0x8+parseInt(_0x183433(0x1cd))/0x9;if(_0x3cf3c9===_0x49c4e9)break;else _0xd134dd['push'](_0xd134dd['shift']());}catch(_0x2a4e82){_0xd134dd['push'](_0xd134dd['shift']());}}}(a144_0x14c1,0x92c9e));import{getInstantApiPolicyRevision}from'../../core/api-client.js';import{projectRevisionDetail,readRevision,REVISION_FLAG}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyRevision={'service':a144_0x30a027(0x1c4),'command':a144_0x30a027(0x1d0),'description':a144_0x30a027(0x1d2),'risk':a144_0x30a027(0x1cc),'requiresAppCode':!![],'structuredErrors':!![],'flags':[REVISION_FLAG],async 'validate'(_0x44244a){readRevision(_0x44244a);},async 'execute'(_0x28c580){const _0x83df14=a144_0x30a027,_0x5eeae0=readRevision(_0x28c580),_0x589f4b=await getInstantApiPolicyRevision(_0x28c580[_0x83df14(0x1d1)],_0x5eeae0);return{'ok':!![],'data':{'revision':projectRevisionDetail(_0x589f4b)},'message':_0x83df14(0x1cb)+_0x5eeae0};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a145_0x145e81=a145_0x2a59;function a145_0x2a59(_0x400f19,_0xf6620d){_0x400f19=_0x400f19-0xb4;const _0x5ec122=a145_0x5ec1();let _0x2a5918=_0x5ec122[_0x400f19];return _0x2a5918;}(function(_0x3b21a2,_0x5ba0f4){const _0x40dd9c=a145_0x2a59,_0x2699ae=_0x3b21a2();while(!![]){try{const _0x1065aa=-parseInt(_0x40dd9c(0xbd))/0x1+parseInt(_0x40dd9c(0xb4))/0x2+parseInt(_0x40dd9c(0xb6))/0x3*(-parseInt(_0x40dd9c(0xc3))/0x4)+-parseInt(_0x40dd9c(0xc2))/0x5+-parseInt(_0x40dd9c(0xc1))/0x6*(-parseInt(_0x40dd9c(0xc0))/0x7)+parseInt(_0x40dd9c(0xbf))/0x8+parseInt(_0x40dd9c(0xbe))/0x9;if(_0x1065aa===_0x5ba0f4)break;else _0x2699ae['push'](_0x2699ae['shift']());}catch(_0x45a9bd){_0x2699ae['push'](_0x2699ae['shift']());}}}(a145_0x5ec1,0x518d6));function a145_0x5ec1(){const _0x1622be=['21oQhKVD','1235634jovhIg','1122810fiCaTQ','32652LJLWhU','Found\x20','1017532AzyhPR','length','162xxoTDN','appCode','\x20Instant\x20API\x20policy\x20revision(s)','List\x20immutable\x20Instant\x20API\x20policy\x20revisions','read','revisions','instant-api-policy','641438AHcmUR','4174821gfiAeI','403104ZADvzu'];a145_0x5ec1=function(){return _0x1622be;};return a145_0x5ec1();}import{listInstantApiPolicyRevisions}from'../../core/api-client.js';import{projectRevisionSummary}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyRevisions={'service':a145_0x145e81(0xbc),'command':a145_0x145e81(0xbb),'description':a145_0x145e81(0xb9),'risk':a145_0x145e81(0xba),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x95f0ca){const _0x5c38cd=a145_0x145e81,_0x10626d=await listInstantApiPolicyRevisions(_0x95f0ca[_0x5c38cd(0xb7)]);return{'ok':!![],'data':{'appCode':_0x95f0ca[_0x5c38cd(0xb7)],'total':_0x10626d['length'],'revisions':_0x10626d['map'](projectRevisionSummary)},'message':_0x5c38cd(0xc4)+_0x10626d[_0x5c38cd(0xb5)]+_0x5c38cd(0xb8)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a146_0x1e1da2=a146_0x31b0;(function(_0x45dbc3,_0x77c1d4){const _0x3eb912=a146_0x31b0,_0x1bfa66=_0x45dbc3();while(!![]){try{const _0x28c625=parseInt(_0x3eb912(0x18e))/0x1+-parseInt(_0x3eb912(0x177))/0x2+parseInt(_0x3eb912(0x178))/0x3+-parseInt(_0x3eb912(0x194))/0x4*(-parseInt(_0x3eb912(0x18b))/0x5)+parseInt(_0x3eb912(0x17a))/0x6*(parseInt(_0x3eb912(0x175))/0x7)+-parseInt(_0x3eb912(0x173))/0x8+parseInt(_0x3eb912(0x193))/0x9*(-parseInt(_0x3eb912(0x17b))/0xa);if(_0x28c625===_0x77c1d4)break;else _0x1bfa66['push'](_0x1bfa66['shift']());}catch(_0x2cf2f0){_0x1bfa66['push'](_0x1bfa66['shift']());}}}(a146_0x15c7,0x55f4e));import{getCurrentInstantApiPolicy,getInstantApiPolicyRevision,isPlatformTransportFailure,rollbackInstantApiPolicy}from'../../core/api-client.js';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_PATHS,mutationLookupCommand,projectCurrentPolicy,projectRevisionDetail,readChangeSummary,readExpectedRevision,readRevision,REVISION_FLAG,RUNTIME_CACHE_WARNING}from'../../commands/instant-api-policy/shared.js';async function prepareRollback(_0x4b22b4){const _0x500863=a146_0x31b0,_0x24f763=readRevision(_0x4b22b4),_0x3a3448=readChangeSummary(_0x4b22b4),_0x3e3210=readExpectedRevision(_0x4b22b4),[_0x3157d9,_0x3c8450]=await Promise['all']([getCurrentInstantApiPolicy(_0x4b22b4[_0x500863(0x18d)]),getInstantApiPolicyRevision(_0x4b22b4[_0x500863(0x18d)],_0x24f763)]);if(!_0x3157d9)throw instantApiPolicyError(_0x500863(0x18f),_0x500863(0x191)+_0x4b22b4[_0x500863(0x18d)]+'.');return assertExpectedRevision(_0x3157d9,_0x3e3210),{'revision':_0x24f763,'changeSummary':_0x3a3448,'expectedRevision':_0x3e3210,'before':_0x3157d9,'target':_0x3c8450};}function a146_0x31b0(_0x492827,_0x5c77d8){_0x492827=_0x492827-0x171;const _0x15c776=a146_0x15c7();let _0x31b0ff=_0x15c776[_0x492827];return _0x31b0ff;}export const instantApiPolicyRollback={'service':a146_0x1e1da2(0x17e),'command':a146_0x1e1da2(0x17f),'description':a146_0x1e1da2(0x184),'risk':a146_0x1e1da2(0x180),'requiresAppCode':!![],'structuredErrors':!![],'confirmationDescription':a146_0x1e1da2(0x179),'flags':[REVISION_FLAG,CHANGE_SUMMARY_FLAG,EXPECTED_REVISION_FLAG],async 'validate'(_0x4bfda2){readRevision(_0x4bfda2),readChangeSummary(_0x4bfda2),readExpectedRevision(_0x4bfda2);},async 'dryRun'(_0x5c16c2){const _0xc5d3e5=a146_0x1e1da2,_0xb358d9=await prepareRollback(_0x5c16c2);return asDryRunResult({'operation':_0xc5d3e5(0x17f),'selector':{'appCode':_0x5c16c2[_0xc5d3e5(0x18d)],'sourceRevision':_0xb358d9[_0xc5d3e5(0x174)]},'before':projectCurrentPolicy(_0xb358d9[_0xc5d3e5(0x189)]),'after':{'revision':_0xb358d9[_0xc5d3e5(0x189)][_0xc5d3e5(0x174)]+0x1,'sourceRevision':projectRevisionDetail(_0xb358d9['target'])},'dryRun':!![],'backend':{'method':'POST','path':INSTANT_API_POLICY_PATHS['rollback']},'warnings':expectedRevisionWarnings(_0xb358d9[_0xc5d3e5(0x18a)]),'verification':{'status':_0xc5d3e5(0x171),'expectedRevision':_0xb358d9[_0xc5d3e5(0x18a)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},{'method':'POST','url':INSTANT_API_POLICY_PATHS[_0xc5d3e5(0x17f)]});},async 'execute'(_0x417d6f){const _0x527547=a146_0x1e1da2,_0x22416f=await prepareRollback(_0x417d6f);let _0x3275e5=![];try{await rollbackInstantApiPolicy({'appCode':_0x417d6f[_0x527547(0x18d)],'revision':_0x22416f[_0x527547(0x174)],..._0x22416f['changeSummary']?{'changeSummary':_0x22416f[_0x527547(0x18c)]}:{}});}catch(_0xd86ec5){if(!isPlatformTransportFailure(_0xd86ec5))throw _0xd86ec5;_0x3275e5=!![];}let _0x2db325;try{_0x2db325=await getCurrentInstantApiPolicy(_0x417d6f['appCode']);}catch(_0xefc75){const _0x5c0212=instantApiPolicyError(_0x3275e5?_0x527547(0x176):_0x527547(0x186),_0x527547(0x17d),'Inspect\x20with\x20`'+mutationLookupCommand()+_0x527547(0x192));Object[_0x527547(0x183)](_0x5c0212,'cause',{'value':_0xefc75,'enumerable':![]});throw _0x5c0212;}const _0x29fbca=_0x2db325&&_0x2db325['revision']>_0x22416f[_0x527547(0x189)][_0x527547(0x174)],_0x5633f3=_0x2db325?.[_0x527547(0x188)]===_0x22416f[_0x527547(0x172)][_0x527547(0x188)];if(!_0x2db325||!_0x29fbca||!_0x5633f3)throw instantApiPolicyError(_0x3275e5?_0x527547(0x176):_0x527547(0x17c),_0x527547(0x190),_0x527547(0x185)+mutationLookupCommand()+'`;\x20do\x20not\x20resubmit\x20automatically.');const _0x2f0b44=[...expectedRevisionWarnings(_0x22416f[_0x527547(0x18a)]),RUNTIME_CACHE_WARNING];return _0x3275e5&&_0x2f0b44['push'](_0x527547(0x182)),{'ok':!![],'data':{'operation':_0x527547(0x17f),'selector':{'appCode':_0x417d6f[_0x527547(0x18d)],'sourceRevision':_0x22416f['revision']},'before':projectCurrentPolicy(_0x22416f[_0x527547(0x189)]),'after':projectCurrentPolicy(_0x2db325),'dryRun':![],'backend':{'method':'POST','path':INSTANT_API_POLICY_PATHS[_0x527547(0x17f)]},'warnings':_0x2f0b44,'verification':{'status':_0x527547(0x181),'recoveredAfterUnknownResponse':_0x3275e5,'expectedRevision':_0x22416f[_0x527547(0x18a)]??null,'atomicCompareAndSet':![],'lookupCommand':mutationLookupCommand()}},'message':_0x527547(0x187)+_0x22416f['revision']+'\x20forward\x20to\x20revision\x20'+_0x2db325[_0x527547(0x174)]};}};function a146_0x15c7(){const _0x47f00a=['instant_api_policy_rollback_verification_failed','The\x20rollback\x20request\x20was\x20sent,\x20but\x20the\x20current\x20policy\x20could\x20not\x20be\x20verified.','instant-api-policy','rollback','high-risk-write','verified','Rollback\x20response\x20was\x20unavailable;\x20current-policy\x20readback\x20proved\x20the\x20new\x20revision\x20without\x20resubmitting.','defineProperty','Restore\x20a\x20historical\x20policy\x20as\x20a\x20new\x20active\x20revision','Inspect\x20with\x20`','instant_api_policy_rollback_verification_unavailable','Rolled\x20Instant\x20API\x20policy\x20revision\x20','configHash','before','expectedRevision','20vBFTuK','changeSummary','appCode','408371BizTHq','instant_api_policy_not_configured','Current\x20policy\x20readback\x20does\x20not\x20prove\x20the\x20requested\x20rollback.','Instant\x20API\x20policy\x20is\x20not\x20configured\x20for\x20','`;\x20do\x20not\x20resubmit\x20automatically.','306jqMmdK','94236uKiiMU','planned','target','4783936oBwYYB','revision','1600683zEATZW','instant_api_policy_rollback_outcome_unknown','39386XGynAa','1017075KsLniB','Restore\x20an\x20application-wide\x20Instant\x20API\x20policy\x20from\x20immutable\x20history\x20as\x20a\x20new\x20revision.','6WBMWWn','29570uutVNw'];a146_0x15c7=function(){return _0x47f00a;};return a146_0x15c7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x5a1f5c=a147_0x108c;(function(_0x16525b,_0xe54e79){const _0x39f11d=a147_0x108c,_0x3af7e3=_0x16525b();while(!![]){try{const _0x42280f=parseInt(_0x39f11d(0x17c))/0x1*(-parseInt(_0x39f11d(0x19f))/0x2)+parseInt(_0x39f11d(0x1a9))/0x3+-parseInt(_0x39f11d(0x197))/0x4*(parseInt(_0x39f11d(0x17d))/0x5)+parseInt(_0x39f11d(0x196))/0x6*(parseInt(_0x39f11d(0x18d))/0x7)+parseInt(_0x39f11d(0x192))/0x8*(-parseInt(_0x39f11d(0x18f))/0x9)+-parseInt(_0x39f11d(0x189))/0xa+parseInt(_0x39f11d(0x185))/0xb;if(_0x42280f===_0xe54e79)break;else _0x3af7e3['push'](_0x3af7e3['shift']());}catch(_0x58d927){_0x3af7e3['push'](_0x3af7e3['shift']());}}}(a147_0x33fb,0x42172));import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,readInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';export{INSTANT_API_POLICY_PATHS}from'../../core/instant-api-policy/endpoints.js';export const RUNTIME_CACHE_WARNING=a147_0x5a1f5c(0x1a8);export const NON_ATOMIC_EXPECTED_REVISION_WARNING=a147_0x5a1f5c(0x17b);export const FORCE_FLAG={'name':a147_0x5a1f5c(0x190),'type':a147_0x5a1f5c(0x1aa),'default':![],'description':a147_0x5a1f5c(0x1ab)};export const CHANGE_SUMMARY_FLAG={'name':'change-summary','type':a147_0x5a1f5c(0x181),'required':![],'description':a147_0x5a1f5c(0x184)};export const REVISION_FLAG={'name':a147_0x5a1f5c(0x183),'type':a147_0x5a1f5c(0x1a3),'required':!![],'description':a147_0x5a1f5c(0x19c)};export const EXPECTED_REVISION_FLAG={'name':a147_0x5a1f5c(0x1a7),'type':a147_0x5a1f5c(0x1a3),'required':![],'description':a147_0x5a1f5c(0x199)};export function requireForceConfirmation(_0x43e99f){const _0x1e6236=a147_0x5a1f5c;if(!_0x43e99f[_0x1e6236(0x1a4)]('force')||_0x43e99f[_0x1e6236(0x1a4)](_0x1e6236(0x187)))return;throw instantApiPolicyError(_0x1e6236(0x193),'--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.',_0x1e6236(0x198));}export function readChangeSummary(_0x2bedbe){const _0x4153fa=a147_0x5a1f5c,_0x5766f0=_0x2bedbe['str']('change-summary')[_0x4153fa(0x19e)]();if(!_0x5766f0)return undefined;if(_0x5766f0['length']>0x7d0)throw instantApiPolicyError(_0x4153fa(0x18c),_0x4153fa(0x19d));return _0x5766f0;}export function readRevision(_0x52a718){const _0x4de962=a147_0x5a1f5c,_0x337e63=_0x52a718['num'](_0x4de962(0x183),Number[_0x4de962(0x195)]);if(!Number[_0x4de962(0x179)](_0x337e63)||_0x337e63<=0x0)throw instantApiPolicyError(_0x4de962(0x17a),_0x4de962(0x18b));return _0x337e63;}export function readExpectedRevision(_0x54c75e){const _0x1803ff=a147_0x5a1f5c;if(_0x54c75e[_0x1803ff(0x1af)]('expected-revision')===undefined)return undefined;const _0x23c8e4=_0x54c75e[_0x1803ff(0x182)](_0x1803ff(0x1a7),Number[_0x1803ff(0x195)]);if(!Number[_0x1803ff(0x179)](_0x23c8e4)||_0x23c8e4<0x0)throw instantApiPolicyError(_0x1803ff(0x18e),_0x1803ff(0x1a2));return _0x23c8e4;}export function assertExpectedRevision(_0x2ba916,_0x5bd0df){const _0x2f3b3e=a147_0x5a1f5c;if(_0x5bd0df===undefined)return;const _0x15d22c=_0x2ba916?.[_0x2f3b3e(0x183)]??0x0;if(_0x15d22c!==_0x5bd0df)throw instantApiPolicyError(_0x2f3b3e(0x1ad),_0x2f3b3e(0x17f),'Expected\x20revision\x20'+_0x5bd0df+_0x2f3b3e(0x1a1)+_0x15d22c+'.\x20Run\x20current\x20and\x20review\x20before\x20retrying.');}export async function readFixedPolicy(_0x1fd3af){const _0x2d80e8=loadInstantApiPolicyLocalConfig(_0x1fd3af['appCode']),_0x19b417=await readInstantApiPolicyConfigFile(_0x2d80e8);return{'local':_0x2d80e8,'config':_0x19b417};}function a147_0x33fb(){const _0x5a3596=['instant_api_policy_force_confirmation_required','enabled','NaN','6AaNNlN','380XeOOQE','Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.','Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured','gmtModified','operatorId','Positive\x20published\x20policy\x20revision','--change-summary\x20cannot\x20exceed\x202000\x20characters.','trim','711498HuhSmb','configHash',';\x20current\x20revision\x20is\x20','--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','number','bool','createUserId','appCode','expected-revision','Runtime\x20instances\x20may\x20take\x20up\x20to\x2030\x20seconds\x20to\x20observe\x20the\x20new\x20active\x20policy.','1109979BsVRiw','boolean','Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes','length','instant_api_policy_revision_mismatch','updateUserId','flag','isSafeInteger','instant_api_policy_revision_invalid','--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.','1fNxquv','2770WqRUIx','changeType','The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.','version','string','num','revision','Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)','5442877bKoJpx','gmtCreate','yes','config','3433290TAOSdP','defaults','--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.','instant_api_policy_change_summary_invalid','2946825YPieEl','instant_api_policy_expected_revision_invalid','112869bpqYbZ','force','policyId','168mCsxoZ'];a147_0x33fb=function(){return _0x5a3596;};return a147_0x33fb();}export function projectCurrentPolicy(_0x5807d0){const _0x5605a1=a147_0x5a1f5c;if(!_0x5807d0)return null;return{'id':_0x5807d0['id'],'appCode':_0x5807d0[_0x5605a1(0x1a6)],'revision':_0x5807d0[_0x5605a1(0x183)],'configHash':_0x5807d0[_0x5605a1(0x1a0)],'enabled':_0x5807d0[_0x5605a1(0x194)],'config':_0x5807d0[_0x5605a1(0x188)],'createUserId':_0x5807d0[_0x5605a1(0x1a5)]??null,'updateUserId':_0x5807d0[_0x5605a1(0x1ae)]??null,'gmtCreate':_0x5807d0[_0x5605a1(0x186)]??null,'gmtModified':_0x5807d0[_0x5605a1(0x19a)]??null};}function a147_0x108c(_0x4f15e2,_0x32a4fa){_0x4f15e2=_0x4f15e2-0x179;const _0x33fb77=a147_0x33fb();let _0x108c0f=_0x33fb77[_0x4f15e2];return _0x108c0f;}export function projectRevisionSummary(_0x28eed1){const _0x2f86a4=a147_0x5a1f5c;return{'id':_0x28eed1['id'],'policyId':_0x28eed1[_0x2f86a4(0x191)],'appCode':_0x28eed1['appCode'],'revision':_0x28eed1[_0x2f86a4(0x183)],'configHash':_0x28eed1[_0x2f86a4(0x1a0)],'changeType':_0x28eed1[_0x2f86a4(0x17e)],'changeSummary':_0x28eed1['changeSummary']??null,'operatorId':_0x28eed1[_0x2f86a4(0x19b)]??null,'gmtCreate':_0x28eed1['gmtCreate']??null,'version':_0x28eed1[_0x2f86a4(0x188)][_0x2f86a4(0x180)],'defaultAction':_0x28eed1[_0x2f86a4(0x188)][_0x2f86a4(0x18a)]['instantApi'],'ruleCount':_0x28eed1[_0x2f86a4(0x188)]['rules']?.[_0x2f86a4(0x1ac)]??0x0};}export function projectRevisionDetail(_0x30cb0a){const _0x2251b4=a147_0x5a1f5c;return{...projectRevisionSummary(_0x30cb0a),'config':_0x30cb0a[_0x2251b4(0x188)]};}export function expectedRevisionWarnings(_0x5a5419){return _0x5a5419===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){return'rabetbase\x20instant-api-policy\x20current\x20--format\x20compress';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a148_0x10deba=a148_0x5522;(function(_0x5906e3,_0x480fc2){const _0x3df36b=a148_0x5522,_0x7d5efe=_0x5906e3();while(!![]){try{const _0x4f675=-parseInt(_0x3df36b(0x15a))/0x1+parseInt(_0x3df36b(0x156))/0x2*(parseInt(_0x3df36b(0x15b))/0x3)+parseInt(_0x3df36b(0x163))/0x4*(parseInt(_0x3df36b(0x15f))/0x5)+parseInt(_0x3df36b(0x159))/0x6*(parseInt(_0x3df36b(0x160))/0x7)+-parseInt(_0x3df36b(0x14f))/0x8+-parseInt(_0x3df36b(0x15d))/0x9*(-parseInt(_0x3df36b(0x151))/0xa)+-parseInt(_0x3df36b(0x161))/0xb*(parseInt(_0x3df36b(0x154))/0xc);if(_0x4f675===_0x480fc2)break;else _0x7d5efe['push'](_0x7d5efe['shift']());}catch(_0x1a99fa){_0x7d5efe['push'](_0x7d5efe['shift']());}}}(a148_0x2421,0xac7d5));import{validateInstantApiPolicy}from'../../core/api-client.js';import{INSTANT_API_POLICY_PATHS,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';function a148_0x2421(){const _0x19d08c=['3414453DKjHtO','valid','15381PlVRUk','policyFilePath','3227855TuXDmW','7XHIutE','11DDudmp','configHash','4RKSWUa','validate','4903808bawpdt','Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','5410RKMLdo','POST','appCode','13851072iOtUsz','read','2uqkMmG','policyRelativePath','normalizedConfig','5715894LmZWdT','1187191JvHTdW'];a148_0x2421=function(){return _0x19d08c;};return a148_0x2421();}function a148_0x5522(_0x7d0a7f,_0x536991){_0x7d0a7f=_0x7d0a7f-0x14e;const _0x242183=a148_0x2421();let _0x55226f=_0x242183[_0x7d0a7f];return _0x55226f;}export const instantApiPolicyValidate={'service':'instant-api-policy','command':a148_0x10deba(0x14e),'description':a148_0x10deba(0x150),'risk':a148_0x10deba(0x155),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x4950d8){const _0x3ba1b5=a148_0x10deba,{local:_0x5169c7,config:_0x16b52e}=await readFixedPolicy(_0x4950d8),_0x479c72=await validateInstantApiPolicy({'appCode':_0x4950d8[_0x3ba1b5(0x153)],'config':_0x16b52e});return{'ok':!![],'data':{'operation':_0x3ba1b5(0x14e),'selector':{'appCode':_0x4950d8[_0x3ba1b5(0x153)]},'filePath':_0x5169c7[_0x3ba1b5(0x15e)],'relativePath':_0x5169c7[_0x3ba1b5(0x157)],'valid':_0x479c72[_0x3ba1b5(0x15c)],'configHash':_0x479c72[_0x3ba1b5(0x162)],'normalizedConfig':_0x479c72[_0x3ba1b5(0x158)],'backend':{'method':_0x3ba1b5(0x152),'path':INSTANT_API_POLICY_PATHS['validate']}},'message':'Validated\x20Instant\x20API\x20policy\x20for\x20'+_0x4950d8[_0x3ba1b5(0x153)]};}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a149_0x4383(_0x41b1b2,_0x3e50a0){_0x41b1b2=_0x41b1b2-0x16a;const _0xb9377f=a149_0xb937();let _0x438355=_0xb9377f[_0x41b1b2];return _0x438355;}(function(_0xd91148,_0x1b37e6){const _0x586e48=a149_0x4383,_0x4e89a2=_0xd91148();while(!![]){try{const _0x3e42d4=parseInt(_0x586e48(0x16a))/0x1+parseInt(_0x586e48(0x17a))/0x2+-parseInt(_0x586e48(0x174))/0x3*(parseInt(_0x586e48(0x173))/0x4)+-parseInt(_0x586e48(0x16c))/0x5+-parseInt(_0x586e48(0x17d))/0x6*(-parseInt(_0x586e48(0x170))/0x7)+parseInt(_0x586e48(0x177))/0x8*(-parseInt(_0x586e48(0x16b))/0x9)+parseInt(_0x586e48(0x16f))/0xa*(parseInt(_0x586e48(0x172))/0xb);if(_0x3e42d4===_0x1b37e6)break;else _0x4e89a2['push'](_0x4e89a2['shift']());}catch(_0x11d086){_0x4e89a2['push'](_0x4e89a2['shift']());}}}(a149_0xb937,0x861ec));import{platform,release,arch}from'node:os';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{getConfigAppCode}from'../../utils/config.js';import{getEnv}from'../../constant/env.js';import{NPM_PACKAGE_NAME}from'../../constant/cli.js';function a149_0xb937(){const _0x4572bf=['859838RtvDch','user','2321bNvAjR','388PKASoZ','8286OxyNZu','username','mergedCli','32TmCWpJ','unknown','nickname','435162tJxAJE','tenant_code','tenant','6PEAaWe','544185yJkyGH','2402802MgjaBZ','1602445FMAjlM','email','cookie','62610SFlosC'];a149_0xb937=function(){return _0x4572bf;};return a149_0xb937();}import{VERSION,GIT_COMMIT}from'../../generated/build-info.js';export async function getIssueReportContext(_0x18e47,_0x253160){const _0x5c95e0=a149_0x4383,_0x2734c2=_0x253160?undefined:(await getSessionUserInfo(_0x18e47[_0x5c95e0(0x16e)]))?.[_0x5c95e0(0x171)];return{'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x5c95e0(0x178)?VERSION+'+'+GIT_COMMIT:VERSION,'environment':getEnv(),'appCode':_0x18e47['appCode']||_0x18e47[_0x5c95e0(0x176)]?.['appCode']||getConfigAppCode(),'os':platform()+'\x20'+release()+'\x20'+arch(),'terminal':process.env.TERM,'user':_0x2734c2?{'id':_0x2734c2['id'],'username':_0x2734c2[_0x5c95e0(0x175)],'nickname':_0x2734c2[_0x5c95e0(0x179)],'email':_0x2734c2[_0x5c95e0(0x16d)],'tenantCode':_0x2734c2[_0x5c95e0(0x17c)]?.[_0x5c95e0(0x17b)]}:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c543e,_0x583020){const _0x25b84e=a150_0x31c7,_0x42a98f=_0x5c543e();while(!![]){try{const _0x5d37ec=parseInt(_0x25b84e(0x11b))/0x1*(parseInt(_0x25b84e(0x11d))/0x2)+parseInt(_0x25b84e(0x11c))/0x3+parseInt(_0x25b84e(0x11f))/0x4+-parseInt(_0x25b84e(0x122))/0x5+-parseInt(_0x25b84e(0x123))/0x6*(parseInt(_0x25b84e(0x120))/0x7)+parseInt(_0x25b84e(0x11e))/0x8+-parseInt(_0x25b84e(0x121))/0x9*(parseInt(_0x25b84e(0x11a))/0xa);if(_0x5d37ec===_0x583020)break;else _0x42a98f['push'](_0x42a98f['shift']());}catch(_0x32fa55){_0x42a98f['push'](_0x42a98f['shift']());}}}(a150_0x4e2c,0x98a71));function a150_0x4e2c(){const _0x53c3c7=['1999415JNpOxs','4238538QJxXLd','19730niVVuk','1OfgOwg','383694WMwhnl','2223678HnApzg','9585024EnBwjX','1799536ZfbLvE','7wezlfk','5274NUUnbR'];a150_0x4e2c=function(){return _0x53c3c7;};return a150_0x4e2c();}import{issueReport}from'../../commands/issue/report.js';function a150_0x31c7(_0x23a569,_0xa4ccae){_0x23a569=_0x23a569-0x11a;const _0x4e2cdd=a150_0x4e2c();let _0x31c7b5=_0x4e2cdd[_0x23a569];return _0x31c7b5;}export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a151_0xfacc81=a151_0x4804;(function(_0x171d41,_0xae4bcf){const _0x3caa11=a151_0x4804,_0x3a4ae7=_0x171d41();while(!![]){try{const _0x860f40=parseInt(_0x3caa11(0x1f4))/0x1*(parseInt(_0x3caa11(0x1f6))/0x2)+parseInt(_0x3caa11(0x1f3))/0x3*(parseInt(_0x3caa11(0x1ef))/0x4)+parseInt(_0x3caa11(0x211))/0x5*(-parseInt(_0x3caa11(0x20a))/0x6)+-parseInt(_0x3caa11(0x1fd))/0x7*(parseInt(_0x3caa11(0x1fe))/0x8)+-parseInt(_0x3caa11(0x1fa))/0x9+-parseInt(_0x3caa11(0x206))/0xa*(-parseInt(_0x3caa11(0x1f2))/0xb)+parseInt(_0x3caa11(0x212))/0xc*(parseInt(_0x3caa11(0x203))/0xd);if(_0x860f40===_0xae4bcf)break;else _0x3a4ae7['push'](_0x3a4ae7['shift']());}catch(_0x5d888f){_0x3a4ae7['push'](_0x3a4ae7['shift']());}}}(a151_0x2a94,0xadd5f));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a151_0xfacc81(0x20b);const NUDGE_SUPPRESSED_CODES=new Set([a151_0xfacc81(0x1fc),'auth_required',a151_0xfacc81(0x209),a151_0xfacc81(0x1f1),'unknown_command',a151_0xfacc81(0x20f),a151_0xfacc81(0x1f9),a151_0xfacc81(0x1f5)]),defaultWriter=_0x45a659=>{const _0x3e5d01=a151_0xfacc81;process['stderr'][_0x3e5d01(0x1f0)](_0x45a659);};export function shouldNudgeForError(_0x479f6d,_0x1bf32d){const _0x3bd08b=a151_0xfacc81;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x1bf32d['service']===_0x3bd08b(0x210)&&_0x1bf32d['command']==='report')return![];if(_0x479f6d instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x3bd08b(0x20e)](_0x479f6d['code']);return!![];}function a151_0x4804(_0x3cd1f9,_0x4f01af){_0x3cd1f9=_0x3cd1f9-0x1ef;const _0x2a9488=a151_0x2a94();let _0x48049f=_0x2a9488[_0x3cd1f9];return _0x48049f;}export function printIssueReportNudgeForError(_0xa16a3e,_0xf68954,_0x43eeee=defaultWriter){if(!shouldNudgeForError(_0xa16a3e,_0xf68954))return;const _0x2dba1e=buildSuggestedTitle(_0xa16a3e,_0xf68954);_0x43eeee(formatNudge(_0x2dba1e));}function buildSuggestedTitle(_0x28077b,_0xd6e1af){const _0x208812=a151_0xfacc81,_0x1c2e9b=_0x28077b instanceof Error?_0x28077b[_0x208812(0x1f8)]:String(_0x28077b),_0x1d667f=_0x1c2e9b[_0x208812(0x207)](/[\r\n]+/g,'\x20')[_0x208812(0x207)](/\s+/g,'\x20')[_0x208812(0x204)]()[_0x208812(0x20c)](0x0,0x78)[_0x208812(0x207)](/"/g,'\x5c\x22'),_0x47c413=CLI_BIN_NAME+'\x20'+_0xd6e1af['service']+'\x20'+_0xd6e1af[_0x208812(0x208)];return _0x1d667f[_0x208812(0x1f7)]>0x0?_0x47c413+':\x20'+_0x1d667f:_0x47c413;}function a151_0x2a94(){const _0x26c095=['132CCfiwz','write','not_in_project','357423NJrwcw','84207AMUPCX','204201PlBUkG','network_error','6yuhghU','length','message','validation_error','6761286dJvUPO','=1\x20to\x20silence\x20this\x20hint.','cancelled','3367oijUdN','2232JoxnwB','\x20bug?\x20Help\x20us\x20fix\x20it:','Hit\x20a\x20','join','\x20issue\x20report\x20\x5c','641303OtcZGQ','trim','\x20\x20Set\x20','290KnTVwO','replace','command','config_missing','116034XsNTzH','RABETBASE_DISABLE_ISSUE_NUDGE','slice','\x20\x20\x20\x20--title\x20\x22','has','flag_missing','issue','305jxTgyS','72mQPPAG'];a151_0x2a94=function(){return _0x26c095;};return a151_0x2a94();}function formatNudge(_0x38116a){const _0x386706=a151_0xfacc81;return['',_0x386706(0x200)+CLI_BIN_NAME+_0x386706(0x1ff),'\x20\x20'+CLI_BIN_NAME+_0x386706(0x202),_0x386706(0x20d)+_0x38116a+'\x22\x20\x5c','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)',_0x386706(0x205)+NUDGE_OPT_OUT_ENV+_0x386706(0x1fb),''][_0x386706(0x201)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a152_0x12fc(){const _0xf5a9c3=['Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','title','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Issue\x20description\x20cannot\x20be\x20empty.','spanName','One-line\x20issue\x20summary','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','trim','2VUKukY','compress','string','11DgcZCB','truncated:\x20original\x20','Submit\x20a\x20problem\x20log','cwd','descriptionSource','inline','Report\x20a\x20problem\x20log\x20with\x20title\x20and\x20markdown\x20context','utf8','Issue\x20log\x20submitted\x20(content\x20redacted\x20or\x20truncated)','validate','descriptionSource:\x20','File\x20not\x20found:\x20','\x20bytes','file','descriptionFilePath','report','write','136wCTpzG','redactionCount','POST','4022670BnwUbl','Cannot\x20read\x20issue\x20description\x20file:\x20','redactionKinds','message','3uNaCpg','str','description','321399SgqFYV','length','join','descriptionFile:\x20','validation','redactions:\x20','filter','19588530fWfxpN','keys','logData','273148vyLlPj','sanitize','3788134zfpdQo','141203ZFdkur','1595200ginwBp','traceName','truncated'];a152_0x12fc=function(){return _0xf5a9c3;};return a152_0x12fc();}const a152_0xc41c9c=a152_0x1a18;(function(_0x6eb94d,_0x464e10){const _0x279621=a152_0x1a18,_0x1df6fa=_0x6eb94d();while(!![]){try{const _0x32130d=-parseInt(_0x279621(0x13c))/0x1*(parseInt(_0x279621(0x149))/0x2)+parseInt(_0x279621(0x164))/0x3*(parseInt(_0x279621(0x139))/0x4)+parseInt(_0x279621(0x13d))/0x5+-parseInt(_0x279621(0x160))/0x6+-parseInt(_0x279621(0x13b))/0x7+parseInt(_0x279621(0x15d))/0x8*(-parseInt(_0x279621(0x167))/0x9)+-parseInt(_0x279621(0x136))/0xa*(-parseInt(_0x279621(0x14c))/0xb);if(_0x32130d===_0x464e10)break;else _0x1df6fa['push'](_0x1df6fa['shift']());}catch(_0x13ec01){_0x1df6fa['push'](_0x1df6fa['shift']());}}}(a152_0x12fc,0x5e4eb));import{existsSync}from'node:fs';function a152_0x1a18(_0x1ec7b9,_0x2aa832){_0x1ec7b9=_0x1ec7b9-0x135;const _0x12fc21=a152_0x12fc();let _0x1a1873=_0x12fc21[_0x1ec7b9];return _0x1a1873;}import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{reportIssue}from'@lovrabet/cli-framework';import{getIssueReportContext}from'./context.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':'issue','command':a152_0xc41c9c(0x15b),'description':a152_0xc41c9c(0x152),'risk':a152_0xc41c9c(0x15c),'confirmationDescription':'Submit\x20the\x20issue\x20description\x20and\x20diagnostic\x20context\x20as\x20a\x20problem\x20log.','requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a152_0xc41c9c(0x14a),'flags':[{'name':a152_0xc41c9c(0x142),'type':a152_0xc41c9c(0x14b),'required':!![],'description':a152_0xc41c9c(0x146)},{'name':a152_0xc41c9c(0x166),'type':a152_0xc41c9c(0x14b),'description':a152_0xc41c9c(0x143)},{'name':DESCRIPTION_FILE_FLAG,'type':a152_0xc41c9c(0x14b),'description':a152_0xc41c9c(0x140)}],async 'validate'(_0x580d44){const _0x170797=a152_0xc41c9c,_0x391110=_0x580d44[_0x170797(0x165)](_0x170797(0x142))[_0x170797(0x148)](),_0x179205=_0x580d44[_0x170797(0x165)](_0x170797(0x166))[_0x170797(0x148)](),_0x26d5e3=_0x580d44['str'](DESCRIPTION_FILE_FLAG)[_0x170797(0x148)]();if(!_0x391110)throw CliErrors['flagMissing'](_0x170797(0x142),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x1f29b1=_0x179205[_0x170797(0x168)]>0x0,_0x47130f=_0x26d5e3[_0x170797(0x168)]>0x0;if(_0x1f29b1===_0x47130f)throw CliErrors[_0x170797(0x16b)](_0x170797(0x141),_0x170797(0x147));if(_0x47130f){const _0x14dca7=resolve(process[_0x170797(0x14f)](),_0x26d5e3);if(!existsSync(_0x14dca7))throw CliErrors[_0x170797(0x16b)](_0x170797(0x157)+_0x14dca7);}},async 'dryRun'(_0x21159c){const _0x44f13a=a152_0xc41c9c,_0x390373=await prepareIssueReport(_0x21159c,!![]);return{'method':_0x44f13a(0x15f),'url':'otel://'+_0x390373['traceName']+'/'+_0x390373['spanName'],'body':{'traceName':_0x390373[_0x44f13a(0x13e)],'spanName':_0x390373['spanName'],'logData':_0x390373['logData']},'description':[_0x44f13a(0x14e),_0x44f13a(0x156)+_0x390373[_0x44f13a(0x150)],_0x390373['descriptionFilePath']?_0x44f13a(0x16a)+_0x390373[_0x44f13a(0x15a)]:null,_0x390373[_0x44f13a(0x13a)][_0x44f13a(0x13f)]?_0x44f13a(0x14d)+_0x390373[_0x44f13a(0x13a)]['originalBytes']+_0x44f13a(0x158):null,_0x390373[_0x44f13a(0x13a)]['redactionCount']>0x0?_0x44f13a(0x16c)+_0x390373[_0x44f13a(0x13a)][_0x44f13a(0x15e)]+'\x20('+_0x390373[_0x44f13a(0x13a)][_0x44f13a(0x162)][_0x44f13a(0x169)](',\x20')+')':null][_0x44f13a(0x135)](Boolean)[_0x44f13a(0x169)]('\x0a')};},async 'execute'(_0x19517c){const _0x199137=a152_0xc41c9c,_0x1cca5e=await prepareIssueReport(_0x19517c,![]);return{'ok':!![],'message':_0x1cca5e[_0x199137(0x13a)][_0x199137(0x15e)]||_0x1cca5e['sanitize'][_0x199137(0x13f)]?_0x199137(0x154):'Issue\x20log\x20submitted','data':{'traceName':_0x1cca5e[_0x199137(0x13e)],'spanName':_0x1cca5e[_0x199137(0x145)],'logDataKeys':Object[_0x199137(0x137)](_0x1cca5e[_0x199137(0x138)]),'issue':{'title':_0x1cca5e[_0x199137(0x142)],'descriptionLength':_0x1cca5e['description']['length'],'descriptionSource':_0x1cca5e[_0x199137(0x150)],..._0x1cca5e[_0x199137(0x15a)]?{'descriptionFile':_0x1cca5e[_0x199137(0x15a)]}:{},'sanitize':{'originalBytes':_0x1cca5e['sanitize']['originalBytes'],'truncated':_0x1cca5e[_0x199137(0x13a)][_0x199137(0x13f)],'redactions':_0x1cca5e['sanitize'][_0x199137(0x15e)],'redactionKinds':_0x1cca5e[_0x199137(0x13a)][_0x199137(0x162)]}}}};}};async function prepareIssueReport(_0x2bb47a,_0x2b408f){const _0xa32c1f=a152_0xc41c9c;await issueReport[_0xa32c1f(0x155)](_0x2bb47a);const _0x19a6db=_0x2bb47a[_0xa32c1f(0x165)](DESCRIPTION_FILE_FLAG)['trim'](),_0x548a6d=_0x19a6db?resolve(process[_0xa32c1f(0x14f)](),_0x19a6db):undefined;let _0xaadc4=_0x2bb47a[_0xa32c1f(0x165)]('description');if(_0x548a6d)try{_0xaadc4=await readFile(_0x548a6d,_0xa32c1f(0x153));}catch{throw CliErrors[_0xa32c1f(0x16b)](_0xa32c1f(0x161)+_0x548a6d);}if(!_0xaadc4[_0xa32c1f(0x148)]())throw CliErrors[_0xa32c1f(0x16b)](_0xa32c1f(0x144));const _0x4a748a=await getIssueReportContext(_0x2bb47a,_0x2b408f);try{const _0x51c7b4=await reportIssue({'title':_0x2bb47a['str'](_0xa32c1f(0x142)),'description':_0xaadc4,'context':_0x4a748a,'dryRun':_0x2b408f,'redactDescription':process.env.RABETBASE_ISSUE_RAW_DESCRIPTION!=='1'});return{..._0x51c7b4,'descriptionSource':_0x548a6d?_0xa32c1f(0x159):_0xa32c1f(0x151),'descriptionFilePath':_0x548a6d};}catch(_0x4f1922){throw CliErrors['apiError']('Failed\x20to\x20submit\x20issue\x20log:\x20'+(_0x4f1922 instanceof Error?_0x4f1922[_0xa32c1f(0x163)]:String(_0x4f1922)),'Check\x20your\x20login\x20and\x20network\x20connectivity.');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x2382c1=a153_0x203a;(function(_0x53968e,_0x2fe66c){const _0x182f7a=a153_0x203a,_0x5dfc2f=_0x53968e();while(!![]){try{const _0x43aee0=-parseInt(_0x182f7a(0xf4))/0x1+parseInt(_0x182f7a(0xd9))/0x2+-parseInt(_0x182f7a(0xd0))/0x3+parseInt(_0x182f7a(0xe3))/0x4*(parseInt(_0x182f7a(0xdf))/0x5)+parseInt(_0x182f7a(0xe4))/0x6+parseInt(_0x182f7a(0xdb))/0x7*(parseInt(_0x182f7a(0xd4))/0x8)+-parseInt(_0x182f7a(0xf0))/0x9*(-parseInt(_0x182f7a(0xd7))/0xa);if(_0x43aee0===_0x2fe66c)break;else _0x5dfc2f['push'](_0x5dfc2f['shift']());}catch(_0x50a181){_0x5dfc2f['push'](_0x5dfc2f['shift']());}}}(a153_0x54be,0x75e1d));import{knowledgeDocumentsPath}from'../../core/api-client.js';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 a153_0x203a(_0x733426,_0x4222dc){_0x733426=_0x733426-0xd0;const _0x54be22=a153_0x54be();let _0x203a13=_0x54be22[_0x733426];return _0x203a13;}function readCreateInput(_0x482141){const _0x5d5785=a153_0x203a,_0x4f0913=_0x482141[_0x5d5785(0xdc)](_0x5d5785(0xed))[_0x5d5785(0xd8)]();if(!_0x4f0913)throw kbError(_0x5d5785(0xe2),'--title\x20is\x20required.');const _0x2f6e51=_0x482141['str'](_0x5d5785(0xde))[_0x5d5785(0xd8)]();if(!_0x2f6e51)throw kbError(_0x5d5785(0xfa),_0x5d5785(0xf2),_0x5d5785(0xfc));return{'title':_0x4f0913,'file':_0x2f6e51};}async function prepareCreate(_0x5e0c40){const _0x1c4a9a=a153_0x203a,_0x23898f=readCreateInput(_0x5e0c40),_0x31a2d5=await readKbFile(_0x23898f[_0x1c4a9a(0xde)]),_0x51dd11=await fetchAllCompanyKnowledgeBases(_0x5e0c40,{'title':_0x23898f[_0x1c4a9a(0xed)]}),_0x5a4e76=findExactCompanyKnowledgeBases(_0x51dd11,_0x5e0c40[_0x1c4a9a(0xf3)],_0x23898f[_0x1c4a9a(0xed)]);if(_0x5a4e76[_0x1c4a9a(0xfb)]>0x0)throw kbError(_0x1c4a9a(0xef),'Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'+_0x5e0c40[_0x1c4a9a(0xf3)]+_0x1c4a9a(0xf7)+_0x23898f[_0x1c4a9a(0xed)]+'.',_0x1c4a9a(0xe5)+_0x5a4e76[0x0]['id']+_0x1c4a9a(0xf9));return{..._0x23898f,'content':_0x31a2d5};}function a153_0x54be(){const _0x95e587=['\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','rabetbase\x20kb\x20detail\x20--id\x20','title','kb_verification_failed','kb_already_exists','9cwwfVo','POST','--file\x20is\x20required.','appCode','748070IjkqTd','contentHash','Company\x20knowledge\x20base\x20','\x20with\x20title\x20','byteSize','\x20--format\x20compress`\x20before\x20choosing\x20update.','kb_file_required','length','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','content','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','2404701fkjmic','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','company','The\x20created\x20document\x20version\x20changed\x20after\x20its\x20write\x20response.\x20Inspect\x20it\x20without\x20resubmitting.','3032888AfqGCa','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','verified','6917810WpvCJl','trim','1059908TzKXLG','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','7skgVve','str','\x20--format\x20compress','file','204920AAcXdQ','create','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','kb_title_required','24CBqaal','1114392SnZXQN','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','kb_create_outcome_unknown','stringify','string','rabetbase\x20kb\x20list\x20--title\x20','UTF-8\x20text\x20or\x20Markdown\x20content\x20file'];a153_0x54be=function(){return _0x95e587;};return a153_0x54be();}function plannedAfter(_0x5cd2b1,_0xc0489f){const _0xcea56f=a153_0x203a;return{'scope':'company','appCode':_0x5cd2b1['appCode'],'title':_0xc0489f[_0xcea56f(0xed)],'contentByteSize':_0xc0489f[_0xcea56f(0xfd)][_0xcea56f(0xf8)],'contentHash':_0xc0489f[_0xcea56f(0xfd)][_0xcea56f(0xf5)]};}function verifyCreatedState(_0x1c7467,_0x42f12e,_0x3a3ede){const _0x379d5b=a153_0x203a;assertCompanyKnowledgeBase(_0x3a3ede,_0x1c7467[_0x379d5b(0xf3)],_0x3a3ede['id']);const _0x39dedb=inspectKbContent(_0x3a3ede[_0x379d5b(0xfd)]);if(_0x3a3ede[_0x379d5b(0xed)]!==_0x42f12e[_0x379d5b(0xed)]||_0x39dedb[_0x379d5b(0xf5)]!==_0x42f12e['content'][_0x379d5b(0xf5)])throw kbError('kb_verification_failed',_0x379d5b(0xf6)+_0x3a3ede['id']+_0x379d5b(0xeb),_0x379d5b(0xfe)+_0x3a3ede['id']+_0x379d5b(0xda));return projectKb(_0x3a3ede);}export const kbCreate={'service':'kb','command':a153_0x2382c1(0xe0),'description':a153_0x2382c1(0xd1),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a153_0x2382c1(0xed),'type':'string','required':!![],'description':'Knowledge-base\x20title'},{'name':a153_0x2382c1(0xde),'type':a153_0x2382c1(0xe8),'required':!![],'description':a153_0x2382c1(0xea)}],async 'validate'(_0x453d1f){readCreateInput(_0x453d1f);},async 'dryRun'(_0x5bc5f2){const _0x4313c4=a153_0x2382c1,_0x2aab1d=await prepareCreate(_0x5bc5f2);return asDryRunResult({'operation':'create','selector':{'scope':_0x4313c4(0xd2),'appCode':_0x5bc5f2['appCode'],'title':_0x2aab1d[_0x4313c4(0xed)]},'before':null,'after':plannedAfter(_0x5bc5f2,_0x2aab1d),'dryRun':!![],'backend':{'method':_0x4313c4(0xf1),'path':knowledgeDocumentsPath(_0x4313c4(0xd2),_0x4313c4(0xe0)),'body':{'appCode':_0x5bc5f2[_0x4313c4(0xf3)],'title':_0x2aab1d[_0x4313c4(0xed)],'contentHash':_0x2aab1d[_0x4313c4(0xfd)][_0x4313c4(0xf5)],'contentByteSize':_0x2aab1d['content'][_0x4313c4(0xf8)]}},'warnings':[],'verification':{'lookupCommand':_0x4313c4(0xe9)+JSON[_0x4313c4(0xe7)](_0x2aab1d[_0x4313c4(0xed)])+_0x4313c4(0xdd)}},{'method':'POST','url':knowledgeDocumentsPath(_0x4313c4(0xd2),'create')});},async 'execute'(_0x5f5277){const _0x277fa6=a153_0x2382c1,_0x1bc825=await prepareCreate(_0x5f5277);let _0x5e1eef,_0x1e9038,_0x5bbc28=![];try{const _0x55d924=await createEnterpriseKnowledgeBase(_0x5f5277['cookie'],{'appCode':_0x5f5277[_0x277fa6(0xf3)],'title':_0x1bc825[_0x277fa6(0xed)],'content':_0x1bc825[_0x277fa6(0xfd)][_0x277fa6(0xfd)]});assertCompanyKnowledgeBase(_0x55d924,_0x5f5277[_0x277fa6(0xf3)],_0x55d924['id']),_0x5e1eef=_0x55d924['id'],_0x1e9038=_0x55d924['version'];}catch(_0x487490){if(!isPlatformTransportFailure(_0x487490))throw _0x487490;_0x5bbc28=!![];}if(_0x5e1eef===undefined){const _0x59ee1c=await verifyKbMutationReadback(_0x277fa6(0xe0),!![],()=>fetchAllCompanyKnowledgeBases(_0x5f5277,{'title':_0x1bc825[_0x277fa6(0xed)]})),_0x1c6f58=findExactCompanyKnowledgeBases(_0x59ee1c,_0x5f5277[_0x277fa6(0xf3)],_0x1bc825[_0x277fa6(0xed)]);if(_0x1c6f58[_0x277fa6(0xfb)]!==0x1)throw kbError(_0x277fa6(0xe6),_0x277fa6(0xd5)+_0x1c6f58[_0x277fa6(0xfb)]+'.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.');_0x5e1eef=_0x1c6f58[0x0]['id'];}const _0x3e7d5d=await verifyKbMutationReadback('create',_0x5bbc28,()=>requireKb(_0x5f5277,_0x5e1eef));if(_0x1e9038!==undefined&&_0x3e7d5d['version']!==_0x1e9038)throw kbError(_0x277fa6(0xee),_0x277fa6(0xd3));const _0xb38aa5=verifyCreatedState(_0x5f5277,_0x1bc825,_0x3e7d5d),_0xcef619=_0x5bbc28?[_0x277fa6(0xe1)]:[];return{'ok':!![],'data':{'operation':_0x277fa6(0xe0),'selector':{'id':_0xb38aa5['id'],'scope':'company','appCode':_0xb38aa5[_0x277fa6(0xf3)]},'before':null,'after':_0xb38aa5,'dryRun':![],'backend':{'method':_0x277fa6(0xf1),'path':knowledgeDocumentsPath(_0x277fa6(0xd2),'create')},'warnings':_0xcef619,'verification':{'status':_0x277fa6(0xd6),'recoveredAfterUnknownResponse':_0x5bbc28,'lookupCommand':_0x277fa6(0xec)+_0xb38aa5['id']+_0x277fa6(0xdd)}},'message':'Created\x20company\x20knowledge\x20base\x20'+_0xb38aa5['id']+'\x20for\x20'+_0xb38aa5[_0x277fa6(0xf3)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a154_0x52749a=a154_0x32d6;(function(_0x174a29,_0x3fe8fd){const _0x27f814=a154_0x32d6,_0x436fbe=_0x174a29();while(!![]){try{const _0x2e041e=-parseInt(_0x27f814(0x13a))/0x1+-parseInt(_0x27f814(0x134))/0x2+parseInt(_0x27f814(0x144))/0x3+-parseInt(_0x27f814(0x13e))/0x4+-parseInt(_0x27f814(0x152))/0x5+-parseInt(_0x27f814(0x143))/0x6+parseInt(_0x27f814(0x13c))/0x7;if(_0x2e041e===_0x3fe8fd)break;else _0x436fbe['push'](_0x436fbe['shift']());}catch(_0x57ceea){_0x436fbe['push'](_0x436fbe['shift']());}}}(a154_0x4274,0xe0a29));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';function a154_0x4274(){const _0x592296=['appCode','\x20--format\x20compress','2110386OWCska','Company\x20knowledge\x20base\x20','kb_verification_failed','--expected-version\x20must\x20be\x20a\x20positive\x20safe\x20integer.','flag','\x20remains\x20readable\x20after\x20delete.','1819195NqUGhz','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','29461726oAXWEr','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','1010972diYeTw','no_op','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','version','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','1184520sRQNNk','508230OjjdYT','string','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','snapshotHash','company','isSafeInteger','rabetbase\x20kb\x20detail\x20--id\x20','already_absent','high-risk-write','cookie','kb_expected_version_invalid','expected-version','POST','unshift','667860WMNPAy','delete','kb_delete_outcome_unknown'];a154_0x4274=function(){return _0x592296;};return a154_0x4274();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const RAG_WARNING=a154_0x52749a(0x140);function readExpectedVersion(_0x1f6bd5){const _0x3ed0bb=a154_0x52749a,_0x25f56c=_0x1f6bd5[_0x3ed0bb(0x138)](_0x3ed0bb(0x14f));if(_0x25f56c===undefined)return undefined;const _0x1e6f91=Number(_0x25f56c);if(!Number[_0x3ed0bb(0x149)](_0x1e6f91)||_0x1e6f91<0x1)throw kbError(_0x3ed0bb(0x14e),_0x3ed0bb(0x137));return _0x1e6f91;}function a154_0x32d6(_0x177333,_0x2c35d3){_0x177333=_0x177333-0x132;const _0x4274a=a154_0x4274();let _0x32d6c9=_0x4274a[_0x177333];return _0x32d6c9;}function noOpData(_0x247546,_0x53e659,_0x545b0c){const _0x18e629=a154_0x52749a;return{'operation':_0x18e629(0x13f),'selector':{'id':_0x53e659,'scope':_0x18e629(0x148),'appCode':_0x247546[_0x18e629(0x132)]},'before':null,'after':null,'dryRun':_0x545b0c,'deleteCalled':![],'backend':{'method':_0x18e629(0x150),'path':knowledgeDocumentsPath(_0x18e629(0x148),_0x18e629(0x153))},'warnings':[],'verification':{'status':_0x18e629(0x14b),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':'delete','description':a154_0x52749a(0x146),'risk':a154_0x52749a(0x14c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a154_0x52749a(0x145),'required':!![],'description':'Company\x20knowledge-base\x20id'},{'name':a154_0x52749a(0x14f),'type':'number','required':![],'description':a154_0x52749a(0x13b)}],async 'validate'(_0x4a2ff1){readKbId(_0x4a2ff1),readExpectedVersion(_0x4a2ff1),requireKbExplicitYes(_0x4a2ff1);},async 'dryRun'(_0x164283){const _0x4d980e=a154_0x52749a,_0x34c5b5=readKbId(_0x164283),_0x315b39=readExpectedVersion(_0x164283),_0x429af2=await getKbOrNull(_0x164283,_0x34c5b5);if(!_0x429af2)return asDryRunResult(noOpData(_0x164283,_0x34c5b5,!![]),{'method':_0x4d980e(0x150),'url':knowledgeDocumentsPath(_0x4d980e(0x148),_0x4d980e(0x153))});assertExpectedKbVersion(_0x429af2,_0x315b39);const _0x1dca82=projectKb(_0x429af2),_0x4d38f4=[RAG_WARNING];return asDryRunResult({'operation':_0x4d980e(0x153),'selector':{'id':_0x1dca82['id'],'scope':_0x4d980e(0x148),'appCode':_0x1dca82['appCode']},'before':_0x1dca82,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x4d980e(0x150),'path':knowledgeDocumentsPath(_0x4d980e(0x148),_0x4d980e(0x153)),'body':{'appCode':_0x164283['appCode'],'id':_0x34c5b5,'expectedVersion':_0x429af2[_0x4d980e(0x141)]}},'warnings':_0x4d38f4,'verification':{'expectedVersion':_0x429af2[_0x4d980e(0x141)],'atomicCompareAndSet':!![],'snapshotHash':_0x1dca82[_0x4d980e(0x147)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x4d980e(0x14a)+_0x1dca82['id']+'\x20--format\x20compress'}},{'method':_0x4d980e(0x150),'url':knowledgeDocumentsPath(_0x4d980e(0x148),_0x4d980e(0x153))});},async 'execute'(_0x527020){const _0x1ef8b6=a154_0x52749a;requireKbExplicitYes(_0x527020);const _0x2643fe=readKbId(_0x527020),_0x2a7044=readExpectedVersion(_0x527020),_0x3879ac=await getKbOrNull(_0x527020,_0x2643fe);if(!_0x3879ac)return{'ok':!![],'data':noOpData(_0x527020,_0x2643fe,![]),'message':_0x1ef8b6(0x135)+_0x2643fe+'\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made'};assertExpectedKbVersion(_0x3879ac,_0x2a7044);const _0x10ddb3=projectKb(_0x3879ac);let _0x1b1445=![];try{await deleteEnterpriseKnowledgeBase(_0x527020[_0x1ef8b6(0x14d)],_0x2643fe,_0x527020[_0x1ef8b6(0x132)],_0x3879ac[_0x1ef8b6(0x141)]);}catch(_0x3115d6){if(!isPlatformTransportFailure(_0x3115d6))throw _0x3115d6;_0x1b1445=!![];}const _0x4def96=await verifyKbMutationReadback('delete',_0x1b1445,()=>getKbOrNull(_0x527020,_0x2643fe));if(_0x4def96)throw kbError(_0x1b1445?_0x1ef8b6(0x154):_0x1ef8b6(0x136),'Company\x20knowledge\x20base\x20'+_0x2643fe+_0x1ef8b6(0x139),_0x1ef8b6(0x13d)+_0x2643fe+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x1a9dc2=[RAG_WARNING];return _0x1b1445&&_0x1a9dc2[_0x1ef8b6(0x151)](_0x1ef8b6(0x142)),{'ok':!![],'data':{'operation':'delete','selector':{'id':_0x10ddb3['id'],'scope':_0x1ef8b6(0x148),'appCode':_0x10ddb3['appCode']},'before':_0x10ddb3,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':'POST','path':knowledgeDocumentsPath('company',_0x1ef8b6(0x153))},'warnings':_0x1a9dc2,'verification':{'status':'verified','databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x1b1445,'lookupCommand':'rabetbase\x20kb\x20detail\x20--id\x20'+_0x10ddb3['id']+_0x1ef8b6(0x133)}},'message':'Soft-deleted\x20company\x20knowledge\x20base\x20'+_0x10ddb3['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a155_0x392177=a155_0x1192;function a155_0x1192(_0xdd1a6c,_0x672e49){_0xdd1a6c=_0xdd1a6c-0x6c;const _0x224a03=a155_0x224a();let _0x1192ef=_0x224a03[_0xdd1a6c];return _0x1192ef;}function a155_0x224a(){const _0x344885=['Show\x20one\x20company\x20knowledge\x20base\x20with\x20full\x20content\x20for\x20the\x20resolved\x20app','string','1022055PLvtgl','91lVdLKA','303BjxkVG','18660OvxYCu','content','read','2246yPQuwV','60360lmltCV','5873112rREHmy','Company\x20knowledge-base\x20id','detail','1023192OzKTJA','126000rvFIni'];a155_0x224a=function(){return _0x344885;};return a155_0x224a();}(function(_0x49be65,_0x525102){const _0x1cafa7=a155_0x1192,_0xa6531b=_0x49be65();while(!![]){try{const _0x53383d=parseInt(_0x1cafa7(0x73))/0x1+parseInt(_0x1cafa7(0x72))/0x2*(parseInt(_0x1cafa7(0x6e))/0x3)+parseInt(_0x1cafa7(0x6f))/0x4+parseInt(_0x1cafa7(0x6c))/0x5+parseInt(_0x1cafa7(0x77))/0x6+parseInt(_0x1cafa7(0x6d))/0x7*(parseInt(_0x1cafa7(0x78))/0x8)+-parseInt(_0x1cafa7(0x74))/0x9;if(_0x53383d===_0x525102)break;else _0xa6531b['push'](_0xa6531b['shift']());}catch(_0x19fe2b){_0xa6531b['push'](_0xa6531b['shift']());}}}(a155_0x224a,0x19c65));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':a155_0x392177(0x76),'description':a155_0x392177(0x79),'risk':a155_0x392177(0x71),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a155_0x392177(0x7a),'required':!![],'description':a155_0x392177(0x75)}],async 'validate'(_0x1d240f){readKbId(_0x1d240f);},async 'execute'(_0x1796e4){const _0x445dcd=a155_0x392177,_0x5c85ea=readKbId(_0x1796e4),_0x1d6ae1=await requireKb(_0x1796e4,_0x5c85ea);return{'ok':!![],'data':{'knowledgeBase':{...projectKb(_0x1d6ae1),'content':_0x1d6ae1[_0x445dcd(0x70)]}},'message':'Loaded\x20company\x20knowledge\x20base\x20'+_0x5c85ea};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a156_0x325e0c=a156_0x7d9c;(function(_0x19f5d4,_0x373685){const _0x37de00=a156_0x7d9c,_0xcc5e1=_0x19f5d4();while(!![]){try{const _0x348a1f=parseInt(_0x37de00(0xb2))/0x1+parseInt(_0x37de00(0xab))/0x2+-parseInt(_0x37de00(0xa8))/0x3+parseInt(_0x37de00(0xb4))/0x4+-parseInt(_0x37de00(0xb0))/0x5*(parseInt(_0x37de00(0xb1))/0x6)+-parseInt(_0x37de00(0xa9))/0x7*(parseInt(_0x37de00(0xb3))/0x8)+-parseInt(_0x37de00(0xad))/0x9;if(_0x348a1f===_0x373685)break;else _0xcc5e1['push'](_0xcc5e1['shift']());}catch(_0x2c5808){_0xcc5e1['push'](_0xcc5e1['shift']());}}}(a156_0x2e5a,0x835ee));function a156_0x7d9c(_0x3e487e,_0x37791b){_0x3e487e=_0x3e487e-0xa7;const _0x2e5a8b=a156_0x2e5a();let _0x7d9c23=_0x2e5a8b[_0x3e487e];return _0x7d9c23;}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';import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete]['map'](_0x3eafcb=>_0x3eafcb[a156_0x325e0c(0xae)]===a156_0x325e0c(0xa7)?_0x3eafcb:{..._0x3eafcb,'execute':_0x3bc3a3=>withKbManagementSession(_0x3bc3a3['signal'],()=>_0x3eafcb[a156_0x325e0c(0xaf)](_0x3bc3a3)),..._0x3eafcb[a156_0x325e0c(0xac)]?{'dryRun':_0x335de1=>withKbManagementSession(_0x335de1[a156_0x325e0c(0xaa)],()=>_0x3eafcb[a156_0x325e0c(0xac)](_0x335de1))}:{}});function a156_0x2e5a(){const _0x32f815=['execute','12415jdbdxz','1008iefBHz','836056PGmRmG','505608ywFJPc','4057972oVORhA','search','1296762PLvcGW','35VOPNGD','signal','2030964UMpOkR','dryRun','10462806xMlUGm','command'];a156_0x2e5a=function(){return _0x32f815;};return a156_0x2e5a();}
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a157_0x440e94=a157_0x3769;function a157_0x3769(_0x3e4a5a,_0x51ad05){_0x3e4a5a=_0x3e4a5a-0xb2;const _0x1302e0=a157_0x1302();let _0x3769c9=_0x1302e0[_0x3e4a5a];return _0x3769c9;}(function(_0x5526f9,_0x5b1051){const _0x2d4aa0=a157_0x3769,_0x3e2409=_0x5526f9();while(!![]){try{const _0x2af89a=-parseInt(_0x2d4aa0(0xc0))/0x1*(parseInt(_0x2d4aa0(0xc1))/0x2)+parseInt(_0x2d4aa0(0xb5))/0x3+parseInt(_0x2d4aa0(0xbd))/0x4+parseInt(_0x2d4aa0(0xb6))/0x5+parseInt(_0x2d4aa0(0xb3))/0x6+parseInt(_0x2d4aa0(0xb8))/0x7+parseInt(_0x2d4aa0(0xb4))/0x8*(-parseInt(_0x2d4aa0(0xbe))/0x9);if(_0x2af89a===_0x5b1051)break;else _0x3e2409['push'](_0x3e2409['shift']());}catch(_0xa234fb){_0x3e2409['push'](_0x3e2409['shift']());}}}(a157_0x1302,0xe7700));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';function a157_0x1302(){const _0x1e3bbe=['4jAmdPT','appCode','7649556hYAwco','8eBVIYJ','2936127qDpYFe','7920640CsRHpq','map','11933138zqjCgY','str','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','Filter\x20by\x20knowledge-base\x20title','read','364112BxYEnd','34060239mBoBah','length','450543JeXFsq'];a157_0x1302=function(){return _0x1e3bbe;};return a157_0x1302();}export const kbList={'service':'kb','command':'list','description':a157_0x440e94(0xba),'risk':a157_0x440e94(0xbc),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':'string','required':![],'description':a157_0x440e94(0xbb)}],async 'execute'(_0x2f35fd){const _0x4a6e35=a157_0x440e94,_0x5b3e1a=_0x2f35fd[_0x4a6e35(0xb9)]('title')['trim'](),_0x1105f7=await fetchAllCompanyKnowledgeBases(_0x2f35fd,{..._0x5b3e1a?{'title':_0x5b3e1a}:{}}),_0x11fd9f=_0x1105f7[_0x4a6e35(0xb7)](projectKb);return{'ok':!![],'data':{'total':_0x11fd9f[_0x4a6e35(0xbf)],'knowledgeBases':_0x11fd9f},'message':'Found\x20'+_0x11fd9f[_0x4a6e35(0xbf)]+'\x20company\x20knowledge\x20base(s)\x20for\x20'+_0x2f35fd[_0x4a6e35(0xb2)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x298281=a158_0xb3c9;(function(_0x2badf1,_0x59de4c){const _0x10894a=a158_0xb3c9,_0x3d7673=_0x2badf1();while(!![]){try{const _0x1647df=parseInt(_0x10894a(0x1fb))/0x1+parseInt(_0x10894a(0x20c))/0x2+parseInt(_0x10894a(0x1f4))/0x3+-parseInt(_0x10894a(0x1f8))/0x4+-parseInt(_0x10894a(0x208))/0x5*(parseInt(_0x10894a(0x1fc))/0x6)+-parseInt(_0x10894a(0x206))/0x7+-parseInt(_0x10894a(0x1fe))/0x8;if(_0x1647df===_0x59de4c)break;else _0x3d7673['push'](_0x3d7673['shift']());}catch(_0x7766d6){_0x3d7673['push'](_0x3d7673['shift']());}}}(a158_0x5864,0x40a46));import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';function readSearchQuery(_0x261042){const _0xaf3f25=a158_0xb3c9,_0x580060=_0x261042[_0xaf3f25(0x1f2)](_0xaf3f25(0x1f9))[_0xaf3f25(0x1fd)]();if(!_0x580060)throw CliErrors[_0xaf3f25(0x1f6)](_0xaf3f25(0x1ff));return _0x580060;}function a158_0x5864(){const _0x6de7a1=['str','appCode','678621ssZbJS','Company\x20and\x20public\x20knowledge\x20search\x20query','validation','signal','705644UoJoPW','query','cookie','506902KDRSAP','126gpzJRK','trim','2891136vPffCs','Search\x20query\x20is\x20required.','topk','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','total','string','flag','search','276003fXXZWc','read','75085jlHySQ','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','kb-service-url','num','848508eRzgPH','\x20company/public\x20knowledge\x20hit(s)\x20for\x20','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20--kb-service-url\x20<https-origin>\x20for\x20this\x20request.','isSafeInteger'];a158_0x5864=function(){return _0x6de7a1;};return a158_0x5864();}function readSearchTopK(_0x4f07ab){const _0x31e1e4=a158_0xb3c9,_0x311e36=_0x4f07ab[_0x31e1e4(0x204)](_0x31e1e4(0x200));if(_0x311e36===undefined||_0x311e36===null||_0x311e36==='')return undefined;const _0xf43e0f=_0x4f07ab[_0x31e1e4(0x20b)](_0x31e1e4(0x200));if(!Number[_0x31e1e4(0x1f1)](_0xf43e0f)||_0xf43e0f<0x1||_0xf43e0f>0x32)throw CliErrors[_0x31e1e4(0x1f6)]('--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');return _0xf43e0f;}function a158_0xb3c9(_0x5172aa,_0x49ba14){_0x5172aa=_0x5172aa-0x1f0;const _0x5864a5=a158_0x5864();let _0xb3c9b6=_0x5864a5[_0x5172aa];return _0xb3c9b6;}function readSearchServiceUrl(_0x452242){const _0x4b5531=a158_0xb3c9;if(_0x452242[_0x4b5531(0x204)](_0x4b5531(0x20a))!==undefined)return normalizeKbServiceOrigin(_0x452242[_0x4b5531(0x1f2)](_0x4b5531(0x20a)));const _0x44a901=getKbServiceDomain();if(!_0x44a901)throw CliErrors[_0x4b5531(0x1f6)](_0x4b5531(0x20e),_0x4b5531(0x1f0));return normalizeKbServiceOrigin(_0x44a901);}export const kbSearch={'service':'kb','command':a158_0x298281(0x205),'description':a158_0x298281(0x209),'risk':a158_0x298281(0x207),'requiresAppCode':!![],'structuredErrors':!![],'strictFlags':!![],'flags':[{'name':a158_0x298281(0x1f9),'type':a158_0x298281(0x203),'required':!![],'description':a158_0x298281(0x1f5)},{'name':a158_0x298281(0x200),'type':'number','required':![],'description':'Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return'},{'name':'kb-service-url','type':a158_0x298281(0x203),'required':![],'description':a158_0x298281(0x201)}],async 'validate'(_0x5552f6){readSearchQuery(_0x5552f6),readSearchTopK(_0x5552f6),readSearchServiceUrl(_0x5552f6);},async 'execute'(_0xc0f6f9){const _0x2344bf=a158_0x298281,_0x10f2a7=readSearchQuery(_0xc0f6f9),_0x24ecf2=readSearchTopK(_0xc0f6f9),_0x50c069=readSearchServiceUrl(_0xc0f6f9),_0x3f6bd5={'cookie':_0xc0f6f9[_0x2344bf(0x1fa)],'query':_0x10f2a7,'appCode':_0xc0f6f9[_0x2344bf(0x1f3)],..._0x24ecf2!==undefined?{'topK':_0x24ecf2}:{},'signal':_0xc0f6f9[_0x2344bf(0x1f7)]},_0x5b55a1=await searchDirectKnowledge({..._0x3f6bd5,'serviceUrl':_0x50c069});return{'ok':!![],'data':_0x5b55a1,'message':'Found\x20'+_0x5b55a1[_0x2344bf(0x202)]+_0x2344bf(0x20d)+_0xc0f6f9[_0x2344bf(0x1f3)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a159_0x5f27f4=a159_0x106e;(function(_0x1cf236,_0x135b96){const _0x37f709=a159_0x106e,_0x187a99=_0x1cf236();while(!![]){try{const _0x2287db=-parseInt(_0x37f709(0x1b6))/0x1+parseInt(_0x37f709(0x1ab))/0x2+-parseInt(_0x37f709(0x191))/0x3*(parseInt(_0x37f709(0x1af))/0x4)+parseInt(_0x37f709(0x1c2))/0x5*(-parseInt(_0x37f709(0x194))/0x6)+-parseInt(_0x37f709(0x1b1))/0x7+-parseInt(_0x37f709(0x1b4))/0x8+parseInt(_0x37f709(0x19b))/0x9;if(_0x2287db===_0x135b96)break;else _0x187a99['push'](_0x187a99['shift']());}catch(_0x540dc9){_0x187a99['push'](_0x187a99['shift']());}}}(a159_0x5b1d,0x8e7a1));function a159_0x106e(_0x362896,_0x506b4c){_0x362896=_0x362896-0x166;const _0x5b1d27=a159_0x5b1d();let _0x106edf=_0x5b1d27[_0x362896];return _0x106edf;}import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';function a159_0x5b1d(){const _0x4a6e4a=['Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','Knowledge-base\x20list\x20returned\x20an\x20inconsistent\x20page\x20size\x20or\x20record\x20count.','paging',',\x20current\x20','\x20during\x20paging.','kb_','version','760710wGblVO','items','contentHash','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','verification_unavailable','kb_file_required','byteLength','str','\x20response\x20is\x20missing\x20','updateTime','min','cookie','Knowledge-base\x20list\x20returned\x20page\x20','hex','createTime','kb_list_contract_invalid','string','sha256:','indexedVersion','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','306','kb_id_invalid','Knowledge\x20base\x20','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','kb_state_drift','has','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','\x20while\x20page\x20','\x20of\x20','push','\x20while\x20id\x20','currentPage','--id\x20must\x20be\x20a\x20positive\x20decimal\x20integer\x20string.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','test','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','trim','indexStatus','add','stringify','message','kb_confirmation_required','Knowledge-base\x20get-one\x20returned\x20id\x20','237bdgzNu','max','company','6bSZJhz','pageSize','bool','\x20records.','kb_content_invalid','kb_file_invalid','scope','25431399jzPvsi','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','from','pageTooLarge','floor','cause','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','allowEmpty','clear','outcome_unknown','appCode','kb_file_unreadable','isSafeInteger','utf8','title','527904pGuuNd','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','\x20response\x20contains\x20an\x20invalid\x20version.','\x20was\x20requested.','12040ngPfpl','length','2773631vStWST','content','kb_response_invalid','4485048hSNQPn','yes','1159282iCZzdr','kb_not_found','dry-run','isFile','Knowledge-base\x20list\x20total\x20changed\x20from\x20'];a159_0x5b1d=function(){return _0x4a6e4a;};return a159_0x5b1d();}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_0x5f27f4(0x179);export function kbError(_0x3778dd,_0x48981e,_0x304fb8){return new CliError(_0x3778dd,0x1,_0x48981e,_0x304fb8);}export function readKbId(_0x225f84){const _0x289a3c=a159_0x5f27f4,_0xf63825=_0x225f84[_0x289a3c(0x16c)]('id');if(!/^0*[1-9][0-9]*$/[_0x289a3c(0x188)](_0xf63825))throw kbError(_0x289a3c(0x17a),_0x289a3c(0x186));return _0xf63825;}export function requireKbExplicitYes(_0x1d9421){const _0x361114=a159_0x5f27f4;if(_0x1d9421[_0x361114(0x196)](_0x361114(0x1b8))||_0x1d9421['bool'](_0x361114(0x1b5)))return;throw kbError(_0x361114(0x18f),_0x361114(0x189),_0x361114(0x180));}function sha256(_0x5b5662){const _0x8f6477=a159_0x5f27f4;return _0x8f6477(0x176)+createHash('sha256')['update'](_0x5b5662)['digest'](_0x8f6477(0x172));}export function inspectKbContent(_0x589f81){const _0x14f331=a159_0x5f27f4,_0x5cdb25=Buffer[_0x14f331(0x19e)](_0x589f81,_0x14f331(0x1a9));return{'content':_0x589f81,'byteSize':_0x5cdb25[_0x14f331(0x16b)],'contentHash':sha256(_0x5cdb25)};}export async function readKbFile(_0x560aea){const _0x3fc559=a159_0x5f27f4,_0x140b68=_0x560aea[_0x3fc559(0x18a)]();if(!_0x140b68)throw kbError(_0x3fc559(0x16a),_0x3fc559(0x168),'Pass\x20--file\x20<knowledge.md>.');const _0x42ac48=resolve(_0x140b68);let _0x5137d2;try{_0x5137d2=await stat(_0x42ac48);}catch(_0x4c92b2){throw kbError('kb_file_unreadable',_0x3fc559(0x178)+_0x140b68,_0x4c92b2 instanceof Error?_0x4c92b2[_0x3fc559(0x18e)]:String(_0x4c92b2));}if(!_0x5137d2[_0x3fc559(0x1b9)]())throw kbError(_0x3fc559(0x199),_0x3fc559(0x1bb)+_0x140b68);let _0x1309eb;try{_0x1309eb=await readFile(_0x42ac48);}catch(_0xd09753){throw kbError(_0x3fc559(0x1a7),'Cannot\x20read\x20knowledge-base\x20content\x20file:\x20'+_0x140b68,_0xd09753 instanceof Error?_0xd09753[_0x3fc559(0x18e)]:String(_0xd09753));}let _0x4c0051;try{_0x4c0051=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x1309eb);}catch{throw kbError(_0x3fc559(0x198),_0x3fc559(0x19d)+_0x140b68);}if(!_0x4c0051[_0x3fc559(0x18a)]())throw kbError(_0x3fc559(0x198),'Knowledge-base\x20content\x20file\x20is\x20blank:\x20'+_0x140b68);return inspectKbContent(_0x4c0051);}export async function verifyKbMutationReadback(_0x59b8c4,_0x2784aa,_0x25d280){const _0x378cbe=a159_0x5f27f4;try{return await _0x25d280();}catch(_0x4efcb3){const _0x556d6d=kbError(_0x378cbe(0x1c0)+_0x59b8c4+'_'+(_0x2784aa?_0x378cbe(0x1a5):_0x378cbe(0x169)),'The\x20'+_0x59b8c4+_0x378cbe(0x19c),'Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.');Object['defineProperty'](_0x556d6d,_0x378cbe(0x1a1),{'value':_0x4efcb3,'enumerable':![]});throw _0x556d6d;}}function requireRecordText(_0xb8e6fd,_0x352522,_0xf3a740,_0xe74ced={}){const _0x27e82f=a159_0x5f27f4;if(typeof _0xb8e6fd===_0x27e82f(0x175)&&(_0xe74ced[_0x27e82f(0x1a3)]||_0xb8e6fd[_0x27e82f(0x18a)]()))return _0xb8e6fd;throw kbError(_0x27e82f(0x1b3),_0x27e82f(0x17b)+String(_0xf3a740)+_0x27e82f(0x16d)+_0x352522+'.');}export function projectKb(_0x15dc92){const _0x5d4c85=a159_0x5f27f4;if(typeof _0x15dc92['id']!==_0x5d4c85(0x175)||!/^0*[1-9][0-9]*$/[_0x5d4c85(0x188)](_0x15dc92['id']))throw kbError(_0x5d4c85(0x1b3),_0x5d4c85(0x17f));if(!Number[_0x5d4c85(0x1a8)](_0x15dc92[_0x5d4c85(0x1c1)])||_0x15dc92[_0x5d4c85(0x1c1)]<0x1)throw kbError(_0x5d4c85(0x1b3),_0x5d4c85(0x17b)+_0x15dc92['id']+_0x5d4c85(0x1ad));if(_0x15dc92['scope']!=='company')throw kbError('kb_scope_mismatch',_0x5d4c85(0x17b)+_0x15dc92['id']+'\x20is\x20not\x20company-scoped.');const _0x38e986=requireRecordText(_0x15dc92[_0x5d4c85(0x1a6)],_0x5d4c85(0x1a6),_0x15dc92['id']),_0x185477=requireRecordText(_0x15dc92[_0x5d4c85(0x1aa)],_0x5d4c85(0x1aa),_0x15dc92['id']),_0x2ed35f=inspectKbContent(requireRecordText(_0x15dc92[_0x5d4c85(0x1b2)],_0x5d4c85(0x1b2),_0x15dc92['id'],{'allowEmpty':!![]})),_0x1ac04a=typeof _0x15dc92[_0x5d4c85(0x173)]===_0x5d4c85(0x175)||typeof _0x15dc92[_0x5d4c85(0x173)]==='number'?_0x15dc92[_0x5d4c85(0x173)]:undefined,_0x4f4966=typeof _0x15dc92[_0x5d4c85(0x16e)]===_0x5d4c85(0x175)||typeof _0x15dc92[_0x5d4c85(0x16e)]==='number'?_0x15dc92[_0x5d4c85(0x16e)]:undefined,_0x1ef394=sha256(JSON[_0x5d4c85(0x18d)]({'id':_0x15dc92['id'],'scope':_0x15dc92[_0x5d4c85(0x19a)],'appCode':_0x38e986,'title':_0x185477,'version':_0x15dc92[_0x5d4c85(0x1c1)],'contentHash':_0x2ed35f[_0x5d4c85(0x167)],'createTime':_0x1ac04a,'updateTime':_0x4f4966}));return{'id':_0x15dc92['id'],'scope':'company','appCode':_0x38e986,'title':_0x185477,'version':_0x15dc92[_0x5d4c85(0x1c1)],..._0x15dc92['sourceVersion']!==undefined?{'sourceVersion':_0x15dc92['sourceVersion']}:{},..._0x15dc92[_0x5d4c85(0x18b)]!==undefined?{'indexStatus':_0x15dc92['indexStatus'],'indexedVersion':_0x15dc92[_0x5d4c85(0x177)]}:{},'contentByteSize':_0x2ed35f['byteSize'],'contentHash':_0x2ed35f[_0x5d4c85(0x167)],'snapshotHash':_0x1ef394,..._0x1ac04a!==undefined?{'createTime':_0x1ac04a}:{},..._0x4f4966!==undefined?{'updateTime':_0x4f4966}:{}};}export function assertCompanyKnowledgeBase(_0x57a6e9,_0x377b31,_0x5c463e){const _0x1285ca=a159_0x5f27f4;if(_0x5c463e!==undefined&&_0x57a6e9['id']!==_0x5c463e)throw kbError(_0x1285ca(0x1b3),_0x1285ca(0x190)+_0x57a6e9['id']+_0x1285ca(0x184)+_0x5c463e+'\x20was\x20requested.');if(_0x57a6e9[_0x1285ca(0x19a)]!==_0x1285ca(0x193)||_0x57a6e9[_0x1285ca(0x1a6)]!==_0x377b31)throw kbError('kb_scope_mismatch',_0x1285ca(0x17b)+_0x57a6e9['id']+_0x1285ca(0x1a2)+_0x377b31+'.');}export async function fetchAllCompanyKnowledgeBases(_0x4e67d9,_0x3ecf60){const _0x47b91c=a159_0x5f27f4;let _0x3b0e41=LIST_PAGE_SIZE;const _0x507f33=[],_0x7f9a65=new Set();let _0x356769=0x1,_0x1cff37=0x0,_0x3b681e;while(!![]){let _0x1d0b6e;try{_0x1d0b6e=await listEnterpriseKnowledgeBases(_0x4e67d9[_0x47b91c(0x170)],{'currentPage':_0x356769,'pageSize':_0x3b0e41,'appCode':_0x4e67d9['appCode'],..._0x3ecf60});}catch(_0x252d08){if(!(_0x252d08 instanceof KbManagementError)||!_0x252d08[_0x47b91c(0x19f)]||_0x3b0e41===0x1)throw _0x252d08;_0x3b0e41=Math[_0x47b91c(0x192)](0x1,Math[_0x47b91c(0x1a0)](_0x3b0e41/0x2)),_0x356769=0x1,_0x1cff37=0x0,_0x507f33[_0x47b91c(0x1b0)]=0x0,_0x7f9a65[_0x47b91c(0x1a4)]();continue;}const _0x1929ad=_0x1d0b6e['paging']?.['totalCount'];if(!_0x1d0b6e['paging']||_0x1d0b6e[_0x47b91c(0x1bd)][_0x47b91c(0x195)]!==_0x3b0e41||!Number['isSafeInteger'](_0x1929ad)||_0x1929ad<0x0||_0x1d0b6e[_0x47b91c(0x166)][_0x47b91c(0x1b0)]!==Math[_0x47b91c(0x16f)](_0x3b0e41,Math[_0x47b91c(0x192)](0x0,_0x1929ad-(_0x356769-0x1)*_0x3b0e41)))throw kbError(_0x47b91c(0x174),_0x47b91c(0x1bc));if(_0x1d0b6e['paging']['currentPage']!==_0x356769)throw kbError(_0x47b91c(0x174),_0x47b91c(0x171)+_0x1d0b6e['paging'][_0x47b91c(0x185)]+_0x47b91c(0x181)+_0x356769+_0x47b91c(0x1ae));if(_0x1929ad!==undefined){if(_0x3b681e!==undefined&&_0x1929ad!==_0x3b681e)throw kbError(_0x47b91c(0x174),_0x47b91c(0x1ba)+_0x3b681e+'\x20to\x20'+_0x1929ad+_0x47b91c(0x1bf),'Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.');_0x3b681e=_0x1929ad;}for(const _0x2f702d of _0x1d0b6e[_0x47b91c(0x166)]){if(typeof _0x2f702d['id']!==_0x47b91c(0x175)||!/^0*[1-9][0-9]*$/[_0x47b91c(0x188)](_0x2f702d['id'])||_0x7f9a65[_0x47b91c(0x17e)](_0x2f702d['id']))throw kbError(_0x47b91c(0x174),_0x47b91c(0x1ac)+String(_0x2f702d['id'])+'.');_0x7f9a65[_0x47b91c(0x18c)](_0x2f702d['id']),_0x2f702d[_0x47b91c(0x19a)]===_0x47b91c(0x193)&&_0x2f702d[_0x47b91c(0x1a6)]===_0x4e67d9['appCode']&&_0x507f33[_0x47b91c(0x183)](_0x2f702d);}_0x1cff37+=_0x1d0b6e[_0x47b91c(0x166)][_0x47b91c(0x1b0)];if(_0x1929ad!==undefined&&_0x1cff37>=_0x1929ad)break;if(_0x1d0b6e['items']['length']<_0x3b0e41){if(_0x1929ad!==undefined&&_0x1cff37<_0x1929ad)throw kbError(_0x47b91c(0x174),'Knowledge-base\x20list\x20stopped\x20at\x20'+_0x1cff37+_0x47b91c(0x182)+_0x1929ad+_0x47b91c(0x197));break;}_0x356769+=0x1;}return _0x507f33;}export function findExactCompanyKnowledgeBases(_0x4e804c,_0x2b37cc,_0x1dc838){const _0x779c33=a159_0x5f27f4;return _0x4e804c['filter'](_0x8bf1f0=>_0x8bf1f0['scope']===_0x779c33(0x193)&&_0x8bf1f0[_0x779c33(0x1a6)]===_0x2b37cc&&_0x8bf1f0[_0x779c33(0x1aa)]===_0x1dc838);}export async function getKbOrNull(_0x9fa004,_0x233a61){const _0x15eab1=a159_0x5f27f4;try{const _0x306751=await getEnterpriseKnowledgeBase(_0x9fa004['cookie'],_0x233a61,_0x9fa004[_0x15eab1(0x1a6)]);return assertCompanyKnowledgeBase(_0x306751,_0x9fa004[_0x15eab1(0x1a6)],_0x233a61),_0x306751;}catch(_0x2e9f7e){if(getPlatformErrorCode(_0x2e9f7e)===DATA_NOT_EXIST_ERROR_CODE&&getPlatformHttpStatus(_0x2e9f7e)===0x194)return null;throw _0x2e9f7e;}}export async function requireKb(_0x2ab848,_0x5152ae){const _0xe9a185=a159_0x5f27f4,_0x24c8ba=await getKbOrNull(_0x2ab848,_0x5152ae);if(!_0x24c8ba)throw kbError(_0xe9a185(0x1b7),'Company\x20knowledge\x20base\x20not\x20found:\x20'+_0x5152ae,_0xe9a185(0x17c));return _0x24c8ba;}export function assertExpectedKbVersion(_0x2f009c,_0x12f4df){const _0x5187d8=a159_0x5f27f4;if(_0x12f4df===undefined||_0x2f009c[_0x5187d8(0x1c1)]===_0x12f4df)return;throw kbError(_0x5187d8(0x17d),_0x5187d8(0x17b)+_0x2f009c['id']+'\x20version\x20changed:\x20expected\x20'+_0x12f4df+_0x5187d8(0x1be)+_0x2f009c[_0x5187d8(0x1c1)]+'.',_0x5187d8(0x187));}
|
|
1
|
+
const a159_0x23de21=a159_0x1075;(function(_0x27c577,_0x3d95b1){const _0x7ae07e=a159_0x1075,_0x938ccf=_0x27c577();while(!![]){try{const _0x216d45=parseInt(_0x7ae07e(0x82))/0x1*(-parseInt(_0x7ae07e(0x7a))/0x2)+parseInt(_0x7ae07e(0xa7))/0x3+parseInt(_0x7ae07e(0x71))/0x4*(parseInt(_0x7ae07e(0x6d))/0x5)+-parseInt(_0x7ae07e(0xa1))/0x6*(-parseInt(_0x7ae07e(0xc4))/0x7)+-parseInt(_0x7ae07e(0xb7))/0x8*(parseInt(_0x7ae07e(0x93))/0x9)+parseInt(_0x7ae07e(0xc0))/0xa*(-parseInt(_0x7ae07e(0xbe))/0xb)+parseInt(_0x7ae07e(0xc9))/0xc;if(_0x216d45===_0x3d95b1)break;else _0x938ccf['push'](_0x938ccf['shift']());}catch(_0x3ab117){_0x938ccf['push'](_0x938ccf['shift']());}}}(a159_0x56ed,0x8bf40));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';function a159_0x1075(_0x69791a,_0x37bc56){_0x69791a=_0x69791a-0x6c;const _0x56ed24=a159_0x56ed();let _0x1075ad=_0x56ed24[_0x69791a];return _0x1075ad;}import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a159_0x23de21(0xd1);export function kbError(_0x1f0c77,_0x1e537a,_0x4c53c0){return new CliError(_0x1f0c77,0x1,_0x1e537a,_0x4c53c0);}export function readKbId(_0x42fe0f){const _0x40b7e0=a159_0x23de21,_0x5460fd=_0x42fe0f[_0x40b7e0(0xd0)]('id');if(!/^0*[1-9][0-9]*$/['test'](_0x5460fd))throw kbError('kb_id_invalid',_0x40b7e0(0xc3));return _0x5460fd;}export function requireKbExplicitYes(_0x35bb89){const _0x1b7dfa=a159_0x23de21;if(_0x35bb89[_0x1b7dfa(0x70)](_0x1b7dfa(0x7e))||_0x35bb89[_0x1b7dfa(0x70)](_0x1b7dfa(0xc5)))return;throw kbError(_0x1b7dfa(0xa8),_0x1b7dfa(0x8c),_0x1b7dfa(0x9b));}function sha256(_0x1c4cc8){const _0x1d3975=a159_0x23de21;return _0x1d3975(0x77)+createHash(_0x1d3975(0x95))[_0x1d3975(0x87)](_0x1c4cc8)['digest'](_0x1d3975(0xbb));}export function inspectKbContent(_0x28bca9){const _0x253a6c=a159_0x23de21,_0x2edd80=Buffer[_0x253a6c(0x84)](_0x28bca9,'utf8');return{'content':_0x28bca9,'byteSize':_0x2edd80[_0x253a6c(0xcd)],'contentHash':sha256(_0x2edd80)};}export async function readKbFile(_0xc02520){const _0x464c78=a159_0x23de21,_0x473050=_0xc02520[_0x464c78(0xbf)]();if(!_0x473050)throw kbError(_0x464c78(0xcc),'Knowledge-base\x20content\x20file\x20path\x20is\x20required.',_0x464c78(0xaf));const _0x58b7bc=resolve(_0x473050);let _0x25ad11;try{_0x25ad11=await stat(_0x58b7bc);}catch(_0x2c37f0){throw kbError('kb_file_unreadable',_0x464c78(0xac)+_0x473050,_0x2c37f0 instanceof Error?_0x2c37f0[_0x464c78(0x9f)]:String(_0x2c37f0));}if(!_0x25ad11[_0x464c78(0xb4)]())throw kbError('kb_file_invalid','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x473050);let _0x1e83f0;try{_0x1e83f0=await readFile(_0x58b7bc);}catch(_0x4cf6d3){throw kbError('kb_file_unreadable',_0x464c78(0xb2)+_0x473050,_0x4cf6d3 instanceof Error?_0x4cf6d3['message']:String(_0x4cf6d3));}let _0x398f5c;try{_0x398f5c=new TextDecoder(_0x464c78(0x7f),{'fatal':!![],'ignoreBOM':!![]})[_0x464c78(0xbc)](_0x1e83f0);}catch{throw kbError(_0x464c78(0x8f),_0x464c78(0xaa)+_0x473050);}if(!_0x398f5c['trim']())throw kbError(_0x464c78(0x8f),_0x464c78(0xcb)+_0x473050);return inspectKbContent(_0x398f5c);}export async function verifyKbMutationReadback(_0x2dfd27,_0x31539a,_0x20243d){const _0x54faf6=a159_0x23de21;try{return await _0x20243d();}catch(_0x11e16e){const _0x57b838=kbError(_0x54faf6(0xa4)+_0x2dfd27+'_'+(_0x31539a?_0x54faf6(0xa6):_0x54faf6(0xce)),_0x54faf6(0x74)+_0x2dfd27+_0x54faf6(0x76),'Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.');Object[_0x54faf6(0x89)](_0x57b838,_0x54faf6(0xcf),{'value':_0x11e16e,'enumerable':![]});throw _0x57b838;}}function a159_0x56ed(){const _0x52a6d1=['This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','currentPage','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','kb_content_invalid','contentHash','kb_response_invalid','items','117goNrqG','paging','sha256','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','title','allowEmpty','filter','Knowledge\x20base\x20','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','content','floor','message','\x20was\x20requested.','729720tGkaPL','indexedVersion','stringify','kb_','clear','outcome_unknown','1375548QZVcqH','kb_confirmation_required','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','number','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','updateTime','Knowledge-base\x20list\x20returned\x20an\x20inconsistent\x20page\x20size\x20or\x20record\x20count.','Pass\x20--file\x20<knowledge.md>.','totalCount','kb_not_found','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','\x20while\x20id\x20','isFile','cookie','push','452800NHGYyd','company','test','indexStatus','hex','decode','scope','1076713OIQRDW','trim','80GMCdsh','kb_scope_mismatch','\x20version\x20changed:\x20expected\x20','--id\x20must\x20be\x20a\x20positive\x20decimal\x20integer\x20string.','14ZmwrPo','yes','\x20response\x20contains\x20an\x20invalid\x20version.','has','byteSize','16307256MRomBD','\x20while\x20page\x20','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','kb_file_required','byteLength','verification_unavailable','cause','str','306',',\x20current\x20','125MEzTvo','add','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','bool','67100bGGPtR','\x20during\x20paging.','length','The\x20','Knowledge-base\x20get-one\x20returned\x20id\x20','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','sha256:','\x20to\x20','sourceVersion','775914lXhhTI','pageTooLarge','\x20is\x20not\x20company-scoped.','max','dry-run','utf-8','appCode','kb_list_contract_invalid','1hLcMEs','Company\x20knowledge\x20base\x20not\x20found:\x20','from','version','isSafeInteger','update','string','defineProperty','Knowledge-base\x20list\x20returned\x20page\x20','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20'];a159_0x56ed=function(){return _0x52a6d1;};return a159_0x56ed();}function requireRecordText(_0x19c65e,_0x35da82,_0x4da96c,_0x82737e={}){const _0x1d07e3=a159_0x23de21;if(typeof _0x19c65e===_0x1d07e3(0x88)&&(_0x82737e[_0x1d07e3(0x98)]||_0x19c65e[_0x1d07e3(0xbf)]()))return _0x19c65e;throw kbError(_0x1d07e3(0x91),_0x1d07e3(0x9a)+String(_0x4da96c)+'\x20response\x20is\x20missing\x20'+_0x35da82+'.');}export function projectKb(_0x483f9c){const _0x50d779=a159_0x23de21;if(typeof _0x483f9c['id']!=='string'||!/^0*[1-9][0-9]*$/[_0x50d779(0xb9)](_0x483f9c['id']))throw kbError(_0x50d779(0x91),_0x50d779(0x9c));if(!Number[_0x50d779(0x86)](_0x483f9c[_0x50d779(0x85)])||_0x483f9c[_0x50d779(0x85)]<0x1)throw kbError(_0x50d779(0x91),_0x50d779(0x9a)+_0x483f9c['id']+_0x50d779(0xc6));if(_0x483f9c[_0x50d779(0xbd)]!==_0x50d779(0xb8))throw kbError('kb_scope_mismatch',_0x50d779(0x9a)+_0x483f9c['id']+_0x50d779(0x7c));const _0x1d480e=requireRecordText(_0x483f9c[_0x50d779(0x80)],'appCode',_0x483f9c['id']),_0x5df6b6=requireRecordText(_0x483f9c[_0x50d779(0x97)],_0x50d779(0x97),_0x483f9c['id']),_0x405da5=inspectKbContent(requireRecordText(_0x483f9c[_0x50d779(0x9d)],_0x50d779(0x9d),_0x483f9c['id'],{'allowEmpty':!![]})),_0x4a8c05=typeof _0x483f9c['createTime']===_0x50d779(0x88)||typeof _0x483f9c['createTime']===_0x50d779(0xab)?_0x483f9c['createTime']:undefined,_0x1c266b=typeof _0x483f9c['updateTime']===_0x50d779(0x88)||typeof _0x483f9c[_0x50d779(0xad)]===_0x50d779(0xab)?_0x483f9c[_0x50d779(0xad)]:undefined,_0x42ceb6=sha256(JSON[_0x50d779(0xa3)]({'id':_0x483f9c['id'],'scope':_0x483f9c[_0x50d779(0xbd)],'appCode':_0x1d480e,'title':_0x5df6b6,'version':_0x483f9c[_0x50d779(0x85)],'contentHash':_0x405da5['contentHash'],'createTime':_0x4a8c05,'updateTime':_0x1c266b}));return{'id':_0x483f9c['id'],'scope':_0x50d779(0xb8),'appCode':_0x1d480e,'title':_0x5df6b6,'version':_0x483f9c[_0x50d779(0x85)],..._0x483f9c[_0x50d779(0x79)]!==undefined?{'sourceVersion':_0x483f9c[_0x50d779(0x79)]}:{},..._0x483f9c['indexStatus']!==undefined?{'indexStatus':_0x483f9c[_0x50d779(0xba)],'indexedVersion':_0x483f9c[_0x50d779(0xa2)]}:{},'contentByteSize':_0x405da5[_0x50d779(0xc8)],'contentHash':_0x405da5[_0x50d779(0x90)],'snapshotHash':_0x42ceb6,..._0x4a8c05!==undefined?{'createTime':_0x4a8c05}:{},..._0x1c266b!==undefined?{'updateTime':_0x1c266b}:{}};}export function assertCompanyKnowledgeBase(_0x34f53c,_0x504ec8,_0x4b3bdc){const _0x14651a=a159_0x23de21;if(_0x4b3bdc!==undefined&&_0x34f53c['id']!==_0x4b3bdc)throw kbError(_0x14651a(0x91),_0x14651a(0x75)+_0x34f53c['id']+_0x14651a(0xb3)+_0x4b3bdc+_0x14651a(0xa0));if(_0x34f53c['scope']!==_0x14651a(0xb8)||_0x34f53c[_0x14651a(0x80)]!==_0x504ec8)throw kbError(_0x14651a(0xc1),'Knowledge\x20base\x20'+_0x34f53c['id']+_0x14651a(0x8b)+_0x504ec8+'.');}export async function fetchAllCompanyKnowledgeBases(_0xb81e89,_0x46d1d4){const _0x5543ee=a159_0x23de21;let _0x39de1a=LIST_PAGE_SIZE;const _0x407936=[],_0x382b7d=new Set();let _0x4315c3=0x1,_0x7ab302=0x0,_0x140774;while(!![]){let _0x364bae;try{_0x364bae=await listEnterpriseKnowledgeBases(_0xb81e89[_0x5543ee(0xb5)],{'currentPage':_0x4315c3,'pageSize':_0x39de1a,'appCode':_0xb81e89[_0x5543ee(0x80)],..._0x46d1d4});}catch(_0x49d0b6){if(!(_0x49d0b6 instanceof KbManagementError)||!_0x49d0b6[_0x5543ee(0x7b)]||_0x39de1a===0x1)throw _0x49d0b6;_0x39de1a=Math[_0x5543ee(0x7d)](0x1,Math[_0x5543ee(0x9e)](_0x39de1a/0x2)),_0x4315c3=0x1,_0x7ab302=0x0,_0x407936[_0x5543ee(0x73)]=0x0,_0x382b7d[_0x5543ee(0xa5)]();continue;}const _0xb2798d=_0x364bae[_0x5543ee(0x94)]?.[_0x5543ee(0xb0)];if(!_0x364bae[_0x5543ee(0x94)]||_0x364bae[_0x5543ee(0x94)]['pageSize']!==_0x39de1a||!Number[_0x5543ee(0x86)](_0xb2798d)||_0xb2798d<0x0||_0x364bae['items'][_0x5543ee(0x73)]!==Math['min'](_0x39de1a,Math['max'](0x0,_0xb2798d-(_0x4315c3-0x1)*_0x39de1a)))throw kbError('kb_list_contract_invalid',_0x5543ee(0xae));if(_0x364bae[_0x5543ee(0x94)][_0x5543ee(0x8d)]!==_0x4315c3)throw kbError(_0x5543ee(0x81),_0x5543ee(0x8a)+_0x364bae[_0x5543ee(0x94)][_0x5543ee(0x8d)]+_0x5543ee(0xca)+_0x4315c3+_0x5543ee(0xa0));if(_0xb2798d!==undefined){if(_0x140774!==undefined&&_0xb2798d!==_0x140774)throw kbError(_0x5543ee(0x81),'Knowledge-base\x20list\x20total\x20changed\x20from\x20'+_0x140774+_0x5543ee(0x78)+_0xb2798d+_0x5543ee(0x72),_0x5543ee(0x96));_0x140774=_0xb2798d;}for(const _0x9700bf of _0x364bae['items']){if(typeof _0x9700bf['id']!==_0x5543ee(0x88)||!/^0*[1-9][0-9]*$/[_0x5543ee(0xb9)](_0x9700bf['id'])||_0x382b7d[_0x5543ee(0xc7)](_0x9700bf['id']))throw kbError(_0x5543ee(0x81),_0x5543ee(0xa9)+String(_0x9700bf['id'])+'.');_0x382b7d[_0x5543ee(0x6e)](_0x9700bf['id']),_0x9700bf[_0x5543ee(0xbd)]===_0x5543ee(0xb8)&&_0x9700bf[_0x5543ee(0x80)]===_0xb81e89['appCode']&&_0x407936[_0x5543ee(0xb6)](_0x9700bf);}_0x7ab302+=_0x364bae['items'][_0x5543ee(0x73)];if(_0xb2798d!==undefined&&_0x7ab302>=_0xb2798d)break;if(_0x364bae[_0x5543ee(0x92)][_0x5543ee(0x73)]<_0x39de1a){if(_0xb2798d!==undefined&&_0x7ab302<_0xb2798d)throw kbError(_0x5543ee(0x81),'Knowledge-base\x20list\x20stopped\x20at\x20'+_0x7ab302+'\x20of\x20'+_0xb2798d+'\x20records.');break;}_0x4315c3+=0x1;}return _0x407936;}export function findExactCompanyKnowledgeBases(_0xb9ea86,_0x16fa28,_0x34e95b){const _0x5093a1=a159_0x23de21;return _0xb9ea86[_0x5093a1(0x99)](_0xc69659=>_0xc69659[_0x5093a1(0xbd)]===_0x5093a1(0xb8)&&_0xc69659[_0x5093a1(0x80)]===_0x16fa28&&_0xc69659['title']===_0x34e95b);}export async function getKbOrNull(_0x3edc70,_0x1c0f84){const _0x5c34d=a159_0x23de21;try{const _0xc0f958=await getEnterpriseKnowledgeBase(_0x3edc70['cookie'],_0x1c0f84,_0x3edc70['appCode']);return assertCompanyKnowledgeBase(_0xc0f958,_0x3edc70[_0x5c34d(0x80)],_0x1c0f84),_0xc0f958;}catch(_0xfa31ea){if(getPlatformErrorCode(_0xfa31ea)===DATA_NOT_EXIST_ERROR_CODE&&getPlatformHttpStatus(_0xfa31ea)===0x194)return null;throw _0xfa31ea;}}export async function requireKb(_0x235c31,_0x401b6e){const _0x2465ab=a159_0x23de21,_0x3fd888=await getKbOrNull(_0x235c31,_0x401b6e);if(!_0x3fd888)throw kbError(_0x2465ab(0xb1),_0x2465ab(0x83)+_0x401b6e,_0x2465ab(0x6f));return _0x3fd888;}export function assertExpectedKbVersion(_0x454a3e,_0x2b12cd){const _0x30c8c3=a159_0x23de21;if(_0x2b12cd===undefined||_0x454a3e[_0x30c8c3(0x85)]===_0x2b12cd)return;throw kbError('kb_state_drift',_0x30c8c3(0x9a)+_0x454a3e['id']+_0x30c8c3(0xc2)+_0x2b12cd+_0x30c8c3(0x6c)+_0x454a3e[_0x30c8c3(0x85)]+'.',_0x30c8c3(0x8e));}
|