@lovrabet/rabetbase-cli 2.5.11-beta.1 → 2.5.12-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-group.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.js +1 -1
- package/lib/api/legacy-api-file.js +1 -1
- package/lib/api/model-registry-file.js +1 -1
- package/lib/api/model-registry-scaffold.js +1 -1
- package/lib/api/model-source.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/detail.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/logs.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/batch-design.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/cross-relation-create.js +1 -1
- package/lib/commands/dataset/cross-relation-delete.js +1 -1
- package/lib/commands/dataset/cross-relation-list.js +1 -1
- package/lib/commands/dataset/cross-relation-shared.js +1 -1
- package/lib/commands/dataset/cross-relation-update.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/design-context.js +1 -1
- package/lib/commands/dataset/design-start.js +1 -1
- package/lib/commands/dataset/design-status.js +1 -1
- package/lib/commands/dataset/design-sync-retry.js +1 -1
- package/lib/commands/dataset/design-sync-status.js +1 -1
- package/lib/commands/dataset/design-validate.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-restore.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/dataset/user-deleted-field-list.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/cross-db-analysis-shared.js +1 -1
- package/lib/commands/db/cross-db-analyze-latest.js +1 -1
- package/lib/commands/db/cross-db-analyze-start.js +1 -1
- package/lib/commands/db/cross-db-analyze-status.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/table-diff-shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/flow/create.js +1 -1
- package/lib/commands/flow/detail.js +1 -1
- package/lib/commands/flow/index.js +1 -1
- package/lib/commands/flow/list.js +1 -1
- package/lib/commands/flow/page-list.js +1 -1
- package/lib/commands/flow/publish.js +1 -1
- package/lib/commands/flow/runtime-resources-shared.js +1 -1
- package/lib/commands/flow/runtime-role-list.js +1 -1
- package/lib/commands/flow/runtime-role-user-list.js +1 -1
- package/lib/commands/flow/runtime-user-search.js +1 -1
- package/lib/commands/flow/shared.js +1 -1
- package/lib/commands/flow/update.js +1 -1
- package/lib/commands/flow/validate.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.js +1 -1
- package/lib/commands/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/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.d.ts +1 -0
- 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.d.ts +2 -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 +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase/references/rabetbase-kb.md +1 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x26d76d=a147_0x19d6;(function(_0x528a89,_0x51ced1){const _0xb96b8c=a147_0x19d6,_0x5c6f30=_0x528a89();while(!![]){try{const _0x2a06c5=parseInt(_0xb96b8c(0x106))/0x1+parseInt(_0xb96b8c(0x115))/0x2*(parseInt(_0xb96b8c(0x11b))/0x3)+-parseInt(_0xb96b8c(0x105))/0x4+-parseInt(_0xb96b8c(0x11a))/0x5+-parseInt(_0xb96b8c(0x111))/0x6+-parseInt(_0xb96b8c(0x104))/0x7+parseInt(_0xb96b8c(0x10f))/0x8;if(_0x2a06c5===_0x51ced1)break;else _0x5c6f30['push'](_0x5c6f30['shift']());}catch(_0x6aa663){_0x5c6f30['push'](_0x5c6f30['shift']());}}}(a147_0x2feb,0x511b4));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='Runtime\x20instances\x20may\x20take\x20up\x20to\x2030\x20seconds\x20to\x20observe\x20the\x20new\x20active\x20policy.';export const NON_ATOMIC_EXPECTED_REVISION_WARNING=a147_0x26d76d(0x11d);export const FORCE_FLAG={'name':a147_0x26d76d(0x10a),'type':a147_0x26d76d(0x126),'default':![],'description':'Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes'};export const CHANGE_SUMMARY_FLAG={'name':a147_0x26d76d(0x11c),'type':a147_0x26d76d(0x10e),'required':![],'description':'Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)'};export const REVISION_FLAG={'name':a147_0x26d76d(0x10c),'type':'number','required':!![],'description':'Positive\x20published\x20policy\x20revision'};export const EXPECTED_REVISION_FLAG={'name':'expected-revision','type':a147_0x26d76d(0xff),'required':![],'description':'Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured'};export function requireForceConfirmation(_0x305b3b){const _0x5d2cfa=a147_0x26d76d;if(!_0x305b3b[_0x5d2cfa(0x112)](_0x5d2cfa(0x10a))||_0x305b3b['bool'](_0x5d2cfa(0x128)))return;throw instantApiPolicyError(_0x5d2cfa(0x10b),_0x5d2cfa(0x103),'Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.');}function a147_0x2feb(){const _0x203338=['string','11984736pxeNkL','appCode','2558454nMwEUJ','bool','instant_api_policy_change_summary_invalid','gmtCreate','2dszhet','changeSummary','updateUserId','instant_api_policy_revision_invalid','configHash','1228460dpMZoW','10389PsoKmt','change-summary','--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.','changeType','isSafeInteger','version','flag','policyId','config','NaN','trim','boolean','gmtModified','yes','instantApi','--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.',';\x20current\x20revision\x20is\x20','str','number','Expected\x20revision\x20','--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.','createUserId','--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.','2563246AjjOID','1400500feFiGJ','219061wJggLH','expected-revision','length','enabled','force','instant_api_policy_force_confirmation_required','revision','instant_api_policy_expected_revision_invalid'];a147_0x2feb=function(){return _0x203338;};return a147_0x2feb();}export function readChangeSummary(_0x5573a6){const _0x39860b=a147_0x26d76d,_0x109fbb=_0x5573a6[_0x39860b(0xfe)](_0x39860b(0x11c))[_0x39860b(0x125)]();if(!_0x109fbb)return undefined;if(_0x109fbb[_0x39860b(0x108)]>0x7d0)throw instantApiPolicyError(_0x39860b(0x113),'--change-summary\x20cannot\x20exceed\x202000\x20characters.');return _0x109fbb;}export function readRevision(_0x469c2b){const _0x94957f=a147_0x26d76d,_0x10fbdc=_0x469c2b['num'](_0x94957f(0x10c),Number[_0x94957f(0x124)]);if(!Number[_0x94957f(0x11f)](_0x10fbdc)||_0x10fbdc<=0x0)throw instantApiPolicyError(_0x94957f(0x118),_0x94957f(0x101));return _0x10fbdc;}export function readExpectedRevision(_0xe07c18){const _0x45ae44=a147_0x26d76d;if(_0xe07c18[_0x45ae44(0x121)](_0x45ae44(0x107))===undefined)return undefined;const _0x22a65c=_0xe07c18['num'](_0x45ae44(0x107),Number[_0x45ae44(0x124)]);if(!Number['isSafeInteger'](_0x22a65c)||_0x22a65c<0x0)throw instantApiPolicyError(_0x45ae44(0x10d),_0x45ae44(0xfc));return _0x22a65c;}export function assertExpectedRevision(_0xc24659,_0x2df119){const _0x3987fd=a147_0x26d76d;if(_0x2df119===undefined)return;const _0xe9e8a2=_0xc24659?.[_0x3987fd(0x10c)]??0x0;if(_0xe9e8a2!==_0x2df119)throw instantApiPolicyError('instant_api_policy_revision_mismatch','The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.',_0x3987fd(0x100)+_0x2df119+_0x3987fd(0xfd)+_0xe9e8a2+'.\x20Run\x20current\x20and\x20review\x20before\x20retrying.');}export async function readFixedPolicy(_0x313cb1){const _0x51e873=a147_0x26d76d,_0x583c70=loadInstantApiPolicyLocalConfig(_0x313cb1[_0x51e873(0x110)]),_0x4c9d40=await readInstantApiPolicyConfigFile(_0x583c70);return{'local':_0x583c70,'config':_0x4c9d40};}function a147_0x19d6(_0x33c8d2,_0x5dd0fe){_0x33c8d2=_0x33c8d2-0xfb;const _0x2feb57=a147_0x2feb();let _0x19d6b1=_0x2feb57[_0x33c8d2];return _0x19d6b1;}export function projectCurrentPolicy(_0x4e9c62){const _0x55471f=a147_0x26d76d;if(!_0x4e9c62)return null;return{'id':_0x4e9c62['id'],'appCode':_0x4e9c62[_0x55471f(0x110)],'revision':_0x4e9c62[_0x55471f(0x10c)],'configHash':_0x4e9c62[_0x55471f(0x119)],'enabled':_0x4e9c62[_0x55471f(0x109)],'config':_0x4e9c62['config'],'createUserId':_0x4e9c62[_0x55471f(0x102)]??null,'updateUserId':_0x4e9c62[_0x55471f(0x117)]??null,'gmtCreate':_0x4e9c62['gmtCreate']??null,'gmtModified':_0x4e9c62[_0x55471f(0x127)]??null};}export function projectRevisionSummary(_0x166774){const _0x2d4c82=a147_0x26d76d;return{'id':_0x166774['id'],'policyId':_0x166774[_0x2d4c82(0x122)],'appCode':_0x166774[_0x2d4c82(0x110)],'revision':_0x166774[_0x2d4c82(0x10c)],'configHash':_0x166774[_0x2d4c82(0x119)],'changeType':_0x166774[_0x2d4c82(0x11e)],'changeSummary':_0x166774[_0x2d4c82(0x116)]??null,'operatorId':_0x166774['operatorId']??null,'gmtCreate':_0x166774[_0x2d4c82(0x114)]??null,'version':_0x166774[_0x2d4c82(0x123)][_0x2d4c82(0x120)],'defaultAction':_0x166774['config']['defaults'][_0x2d4c82(0xfb)],'ruleCount':_0x166774[_0x2d4c82(0x123)]['rules']?.[_0x2d4c82(0x108)]??0x0};}export function projectRevisionDetail(_0x1189e5){return{...projectRevisionSummary(_0x1189e5),'config':_0x1189e5['config']};}export function expectedRevisionWarnings(_0x4893b7){return _0x4893b7===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){return'rabetbase\x20instant-api-policy\x20current\x20--format\x20compress';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a148_0x38cc(_0x591fcb,_0x5cc858){_0x591fcb=_0x591fcb-0x1b3;const _0x51872d=a148_0x5187();let _0x38cc9=_0x51872d[_0x591fcb];return _0x38cc9;}const a148_0x94b49b=a148_0x38cc;(function(_0x2e4b0b,_0xcd7490){const _0x5461e8=a148_0x38cc,_0x34c776=_0x2e4b0b();while(!![]){try{const _0x57c9f0=parseInt(_0x5461e8(0x1c3))/0x1+-parseInt(_0x5461e8(0x1bc))/0x2+-parseInt(_0x5461e8(0x1be))/0x3*(-parseInt(_0x5461e8(0x1ba))/0x4)+-parseInt(_0x5461e8(0x1c1))/0x5+parseInt(_0x5461e8(0x1b5))/0x6+parseInt(_0x5461e8(0x1c2))/0x7*(-parseInt(_0x5461e8(0x1bf))/0x8)+-parseInt(_0x5461e8(0x1b9))/0x9;if(_0x57c9f0===_0xcd7490)break;else _0x34c776['push'](_0x34c776['shift']());}catch(_0xdc32fc){_0x34c776['push'](_0x34c776['shift']());}}}(a148_0x5187,0xadf8c));import{validateInstantApiPolicy}from'../../core/api-client.js';import{INSTANT_API_POLICY_PATHS,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';function a148_0x5187(){const _0x2be7c4=['11456MXDQcH','appCode','6071785JjhetE','357SkPDML','1309473dtobMQ','Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','Validated\x20Instant\x20API\x20policy\x20for\x20','policyFilePath','5266422pVsQuD','policyRelativePath','POST','instant-api-policy','6045039FwddlW','129720VhgHNH','valid','1301224xvgXhk','validate','105CzUuPq'];a148_0x5187=function(){return _0x2be7c4;};return a148_0x5187();}export const instantApiPolicyValidate={'service':a148_0x94b49b(0x1b8),'command':a148_0x94b49b(0x1bd),'description':a148_0x94b49b(0x1c4),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x271f78){const _0x190aee=a148_0x94b49b,{local:_0x2aa04d,config:_0x5eef39}=await readFixedPolicy(_0x271f78),_0x4791e9=await validateInstantApiPolicy({'appCode':_0x271f78['appCode'],'config':_0x5eef39});return{'ok':!![],'data':{'operation':_0x190aee(0x1bd),'selector':{'appCode':_0x271f78[_0x190aee(0x1c0)]},'filePath':_0x2aa04d[_0x190aee(0x1b4)],'relativePath':_0x2aa04d[_0x190aee(0x1b6)],'valid':_0x4791e9[_0x190aee(0x1bb)],'configHash':_0x4791e9['configHash'],'normalizedConfig':_0x4791e9['normalizedConfig'],'backend':{'method':_0x190aee(0x1b7),'path':INSTANT_API_POLICY_PATHS[_0x190aee(0x1bd)]}},'message':_0x190aee(0x1b3)+_0x271f78[_0x190aee(0x1c0)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a149_0x4906(){const _0x495acf=['username','953293uidUvd','appCode','232818UWnDud','tenant_code','150705ctYoUu','132280QXpCFh','nickname','2MHmWHr','7HLHwal','tenant','25XhFxDK','cookie','email','mergedCli','3357aMvBxf','5790ZCizXj','819528TjsCJr','276344QKruxp'];a149_0x4906=function(){return _0x495acf;};return a149_0x4906();}(function(_0x1d1ba6,_0x35f2c6){const _0x5c962f=a149_0x13d6,_0x546022=_0x1d1ba6();while(!![]){try{const _0x102aa1=-parseInt(_0x5c962f(0x181))/0x1*(parseInt(_0x5c962f(0x184))/0x2)+-parseInt(_0x5c962f(0x17a))/0x3+parseInt(_0x5c962f(0x182))/0x4+-parseInt(_0x5c962f(0x187))/0x5*(-parseInt(_0x5c962f(0x17f))/0x6)+-parseInt(_0x5c962f(0x185))/0x7*(-parseInt(_0x5c962f(0x17b))/0x8)+parseInt(_0x5c962f(0x178))/0x9*(parseInt(_0x5c962f(0x179))/0xa)+parseInt(_0x5c962f(0x17d))/0xb;if(_0x102aa1===_0x35f2c6)break;else _0x546022['push'](_0x546022['shift']());}catch(_0x43df8d){_0x546022['push'](_0x546022['shift']());}}}(a149_0x4906,0x22459));import{platform,release,arch}from'node:os';import{getSessionUserInfo}from'../../auth/get-session-user.js';function a149_0x13d6(_0x1f22e3,_0x43df69){_0x1f22e3=_0x1f22e3-0x176;const _0x490696=a149_0x4906();let _0x13d6b1=_0x490696[_0x1f22e3];return _0x13d6b1;}import{getConfigAppCode}from'../../utils/config.js';import{getEnv}from'../../constant/env.js';import{NPM_PACKAGE_NAME}from'../../constant/cli.js';import{VERSION,GIT_COMMIT}from'../../generated/build-info.js';export async function getIssueReportContext(_0x325229,_0x316292){const _0x403b04=a149_0x13d6,_0x1cb0fa=_0x316292?undefined:(await getSessionUserInfo(_0x325229[_0x403b04(0x188)]))?.['user'];return{'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'environment':getEnv(),'appCode':_0x325229[_0x403b04(0x17e)]||_0x325229[_0x403b04(0x177)]?.[_0x403b04(0x17e)]||getConfigAppCode(),'os':platform()+'\x20'+release()+'\x20'+arch(),'terminal':process.env.TERM,'user':_0x1cb0fa?{'id':_0x1cb0fa['id'],'username':_0x1cb0fa[_0x403b04(0x17c)],'nickname':_0x1cb0fa[_0x403b04(0x183)],'email':_0x1cb0fa[_0x403b04(0x176)],'tenantCode':_0x1cb0fa[_0x403b04(0x186)]?.[_0x403b04(0x180)]}:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a150_0x3c72(){const _0x4aaa0b=['2647590zhXEYX','8XBcBgY','249459iykfrl','4128341STlgGE','2mCyvaH','10mxnfCP','665991jSLyAr','7654966VPeivH','5qagbnm','1997508ajxMiZ','2260587YZKHFr'];a150_0x3c72=function(){return _0x4aaa0b;};return a150_0x3c72();}function a150_0x74bf(_0x291906,_0x59a39e){_0x291906=_0x291906-0xd8;const _0x3c7265=a150_0x3c72();let _0x74bff0=_0x3c7265[_0x291906];return _0x74bff0;}(function(_0x118504,_0x58beae){const _0x48609f=a150_0x74bf,_0x33fd3b=_0x118504();while(!![]){try{const _0x3d0dc8=-parseInt(_0x48609f(0xd8))/0x1+-parseInt(_0x48609f(0xda))/0x2*(-parseInt(_0x48609f(0xe0))/0x3)+parseInt(_0x48609f(0xdf))/0x4*(-parseInt(_0x48609f(0xde))/0x5)+parseInt(_0x48609f(0xe1))/0x6+parseInt(_0x48609f(0xd9))/0x7*(parseInt(_0x48609f(0xe2))/0x8)+parseInt(_0x48609f(0xdc))/0x9+-parseInt(_0x48609f(0xdb))/0xa*(parseInt(_0x48609f(0xdd))/0xb);if(_0x3d0dc8===_0x58beae)break;else _0x33fd3b['push'](_0x33fd3b['shift']());}catch(_0x2cf9bc){_0x33fd3b['push'](_0x33fd3b['shift']());}}}(a150_0x3c72,0x65076));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x34d232=a151_0x4116;(function(_0x3fc7db,_0xb28404){const _0x536153=a151_0x4116,_0x4c57b0=_0x3fc7db();while(!![]){try{const _0x4214ea=parseInt(_0x536153(0x16a))/0x1*(parseInt(_0x536153(0x164))/0x2)+parseInt(_0x536153(0x16c))/0x3+-parseInt(_0x536153(0x171))/0x4+parseInt(_0x536153(0x162))/0x5*(-parseInt(_0x536153(0x16e))/0x6)+-parseInt(_0x536153(0x154))/0x7+-parseInt(_0x536153(0x160))/0x8*(parseInt(_0x536153(0x159))/0x9)+parseInt(_0x536153(0x153))/0xa*(parseInt(_0x536153(0x156))/0xb);if(_0x4214ea===_0xb28404)break;else _0x4c57b0['push'](_0x4c57b0['shift']());}catch(_0xbf2482){_0x4c57b0['push'](_0x4c57b0['shift']());}}}(a151_0x5c17,0xf105d));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a151_0x34d232(0x15f);const NUDGE_SUPPRESSED_CODES=new Set([a151_0x34d232(0x16b),a151_0x34d232(0x155),a151_0x34d232(0x16f),a151_0x34d232(0x167),a151_0x34d232(0x165),a151_0x34d232(0x15a),a151_0x34d232(0x15b),a151_0x34d232(0x16d)]),defaultWriter=_0x193bf8=>{const _0x41b208=a151_0x34d232;process[_0x41b208(0x15d)][_0x41b208(0x170)](_0x193bf8);};export function shouldNudgeForError(_0x201762,_0x372c7c){const _0x3586bf=a151_0x34d232;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x372c7c[_0x3586bf(0x15c)]===_0x3586bf(0x151)&&_0x372c7c[_0x3586bf(0x176)]===_0x3586bf(0x168))return![];if(_0x201762 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x3586bf(0x15e)](_0x201762[_0x3586bf(0x152)]);return!![];}export function printIssueReportNudgeForError(_0x4843b6,_0x98ed4d,_0x34c8f9=defaultWriter){if(!shouldNudgeForError(_0x4843b6,_0x98ed4d))return;const _0x413b28=buildSuggestedTitle(_0x4843b6,_0x98ed4d);_0x34c8f9(formatNudge(_0x413b28));}function a151_0x4116(_0x2240da,_0x2b9009){_0x2240da=_0x2240da-0x150;const _0x5c177a=a151_0x5c17();let _0x411668=_0x5c177a[_0x2240da];return _0x411668;}function buildSuggestedTitle(_0x39843d,_0x46f2cb){const _0xa032e5=a151_0x34d232,_0x46c8b9=_0x39843d instanceof Error?_0x39843d[_0xa032e5(0x157)]:String(_0x39843d),_0x3bcb91=_0x46c8b9[_0xa032e5(0x169)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')['trim']()[_0xa032e5(0x158)](0x0,0x78)[_0xa032e5(0x169)](/"/g,'\x5c\x22'),_0x4f48fc=CLI_BIN_NAME+'\x20'+_0x46f2cb['service']+'\x20'+_0x46f2cb['command'];return _0x3bcb91[_0xa032e5(0x163)]>0x0?_0x4f48fc+':\x20'+_0x3bcb91:_0x4f48fc;}function a151_0x5c17(){const _0x244108=['2017810bnqWXI','length','3150878QnAiqp','unknown_command','\x20bug?\x20Help\x20us\x20fix\x20it:','not_in_project','report','replace','1kHeJIq','cancelled','1841553AQeYgl','network_error','6tOtEnk','config_missing','write','6764844PBWyKb','\x20\x20Set\x20','=1\x20to\x20silence\x20this\x20hint.','\x20issue\x20report\x20\x5c','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','command','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','issue','code','8736430TxkQdc','11556433ebHnOr','auth_required','44mgozLn','message','slice','30897FwTFIf','flag_missing','validation_error','service','stderr','has','RABETBASE_DISABLE_ISSUE_NUDGE','2216iRRrry','join'];a151_0x5c17=function(){return _0x244108;};return a151_0x5c17();}function formatNudge(_0x30045c){const _0x1a42fc=a151_0x34d232;return['','Hit\x20a\x20'+CLI_BIN_NAME+_0x1a42fc(0x166),'\x20\x20'+CLI_BIN_NAME+_0x1a42fc(0x174),'\x20\x20\x20\x20--title\x20\x22'+_0x30045c+'\x22\x20\x5c',_0x1a42fc(0x175),_0x1a42fc(0x150),_0x1a42fc(0x172)+NUDGE_OPT_OUT_ENV+_0x1a42fc(0x173),''][_0x1a42fc(0x161)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a152_0x477cfc=a152_0x18ac;function a152_0x18ac(_0x3e6158,_0x245316){_0x3e6158=_0x3e6158-0x156;const _0x38282f=a152_0x3828();let _0x18ace7=_0x38282f[_0x3e6158];return _0x18ace7;}(function(_0x47a0ed,_0x15aa5a){const _0x28d366=a152_0x18ac,_0x442e49=_0x47a0ed();while(!![]){try{const _0x217643=-parseInt(_0x28d366(0x159))/0x1*(-parseInt(_0x28d366(0x181))/0x2)+parseInt(_0x28d366(0x189))/0x3*(-parseInt(_0x28d366(0x172))/0x4)+-parseInt(_0x28d366(0x17b))/0x5+parseInt(_0x28d366(0x185))/0x6*(parseInt(_0x28d366(0x188))/0x7)+parseInt(_0x28d366(0x162))/0x8+-parseInt(_0x28d366(0x176))/0x9+parseInt(_0x28d366(0x169))/0xa;if(_0x217643===_0x15aa5a)break;else _0x442e49['push'](_0x442e49['shift']());}catch(_0x2d19e4){_0x442e49['push'](_0x442e49['shift']());}}}(a152_0x3828,0x5bb48));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{reportIssue}from'@lovrabet/cli-framework';function a152_0x3828(){const _0x48e901=['apiError','352744JyMycI','join','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','cwd','read','utf8','Issue\x20log\x20submitted','10080490TKPevx','POST','filter','str','descriptionSource','length','sanitize','\x20bytes','title','4Qwdttl','issue','report','Issue\x20log\x20submitted\x20(content\x20redacted\x20or\x20truncated)','6378201BzgTIF','validate','otel://','descriptionFile:\x20','One-line\x20issue\x20summary','1817125nGFKWO','Submit\x20the\x20issue\x20description\x20and\x20diagnostic\x20context\x20as\x20a\x20problem\x20log.','originalBytes','keys','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','validation','11278eiXdZl','inline','File\x20not\x20found:\x20','description-file','24RBwauS','Cannot\x20read\x20issue\x20description\x20file:\x20','traceName','814828nTVHSF','2087847qgAWRU','spanName','logData','redactionCount','Submit\x20a\x20problem\x20log','trim','file','111bYobUi','truncated','Report\x20a\x20problem\x20log\x20with\x20title\x20and\x20markdown\x20context','description','descriptionFilePath','redactionKinds','string','Check\x20your\x20login\x20and\x20network\x20connectivity.'];a152_0x3828=function(){return _0x48e901;};return a152_0x3828();}import{getIssueReportContext}from'./context.js';const DESCRIPTION_FILE_FLAG=a152_0x477cfc(0x184);export const issueReport={'service':a152_0x477cfc(0x173),'command':a152_0x477cfc(0x174),'description':a152_0x477cfc(0x15b),'risk':a152_0x477cfc(0x166),'confirmationDescription':a152_0x477cfc(0x17c),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':'compress','flags':[{'name':a152_0x477cfc(0x171),'type':a152_0x477cfc(0x15f),'required':!![],'description':a152_0x477cfc(0x17a)},{'name':a152_0x477cfc(0x15c),'type':a152_0x477cfc(0x15f),'description':a152_0x477cfc(0x17f)},{'name':DESCRIPTION_FILE_FLAG,'type':a152_0x477cfc(0x15f),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x7d2440){const _0x1e83ca=a152_0x477cfc,_0x42d99e=_0x7d2440[_0x1e83ca(0x16c)](_0x1e83ca(0x171))[_0x1e83ca(0x157)](),_0x2e2456=_0x7d2440['str'](_0x1e83ca(0x15c))['trim'](),_0x4766a2=_0x7d2440[_0x1e83ca(0x16c)](DESCRIPTION_FILE_FLAG)[_0x1e83ca(0x157)]();if(!_0x42d99e)throw CliErrors['flagMissing'](_0x1e83ca(0x171),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x52265d=_0x2e2456[_0x1e83ca(0x16e)]>0x0,_0x4df1dd=_0x4766a2[_0x1e83ca(0x16e)]>0x0;if(_0x52265d===_0x4df1dd)throw CliErrors[_0x1e83ca(0x180)](_0x1e83ca(0x164),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x4df1dd){const _0x590976=resolve(process['cwd'](),_0x4766a2);if(!existsSync(_0x590976))throw CliErrors[_0x1e83ca(0x180)](_0x1e83ca(0x183)+_0x590976);}},async 'dryRun'(_0x1baccf){const _0x2b6dc2=a152_0x477cfc,_0x556636=await prepareIssueReport(_0x1baccf,!![]);return{'method':_0x2b6dc2(0x16a),'url':_0x2b6dc2(0x178)+_0x556636['traceName']+'/'+_0x556636[_0x2b6dc2(0x18a)],'body':{'traceName':_0x556636[_0x2b6dc2(0x187)],'spanName':_0x556636[_0x2b6dc2(0x18a)],'logData':_0x556636[_0x2b6dc2(0x18b)]},'description':[_0x2b6dc2(0x156),'descriptionSource:\x20'+_0x556636['descriptionSource'],_0x556636[_0x2b6dc2(0x15d)]?_0x2b6dc2(0x179)+_0x556636[_0x2b6dc2(0x15d)]:null,_0x556636[_0x2b6dc2(0x16f)][_0x2b6dc2(0x15a)]?'truncated:\x20original\x20'+_0x556636[_0x2b6dc2(0x16f)]['originalBytes']+_0x2b6dc2(0x170):null,_0x556636[_0x2b6dc2(0x16f)][_0x2b6dc2(0x18c)]>0x0?'redactions:\x20'+_0x556636[_0x2b6dc2(0x16f)][_0x2b6dc2(0x18c)]+'\x20('+_0x556636['sanitize'][_0x2b6dc2(0x15e)][_0x2b6dc2(0x163)](',\x20')+')':null][_0x2b6dc2(0x16b)](Boolean)[_0x2b6dc2(0x163)]('\x0a')};},async 'execute'(_0x44f1d4){const _0x590761=a152_0x477cfc,_0x3477de=await prepareIssueReport(_0x44f1d4,![]);return{'ok':!![],'message':_0x3477de['sanitize']['redactionCount']||_0x3477de[_0x590761(0x16f)]['truncated']?_0x590761(0x175):_0x590761(0x168),'data':{'traceName':_0x3477de[_0x590761(0x187)],'spanName':_0x3477de[_0x590761(0x18a)],'logDataKeys':Object[_0x590761(0x17e)](_0x3477de[_0x590761(0x18b)]),'issue':{'title':_0x3477de['title'],'descriptionLength':_0x3477de[_0x590761(0x15c)][_0x590761(0x16e)],'descriptionSource':_0x3477de[_0x590761(0x16d)],..._0x3477de[_0x590761(0x15d)]?{'descriptionFile':_0x3477de[_0x590761(0x15d)]}:{},'sanitize':{'originalBytes':_0x3477de[_0x590761(0x16f)][_0x590761(0x17d)],'truncated':_0x3477de[_0x590761(0x16f)]['truncated'],'redactions':_0x3477de['sanitize'][_0x590761(0x18c)],'redactionKinds':_0x3477de[_0x590761(0x16f)][_0x590761(0x15e)]}}}};}};async function prepareIssueReport(_0x245c9b,_0x25f53e){const _0xc536c6=a152_0x477cfc;await issueReport[_0xc536c6(0x177)](_0x245c9b);const _0x32bec8=_0x245c9b[_0xc536c6(0x16c)](DESCRIPTION_FILE_FLAG)[_0xc536c6(0x157)](),_0xf8379e=_0x32bec8?resolve(process[_0xc536c6(0x165)](),_0x32bec8):undefined;let _0x22909e=_0x245c9b[_0xc536c6(0x16c)](_0xc536c6(0x15c));if(_0xf8379e)try{_0x22909e=await readFile(_0xf8379e,_0xc536c6(0x167));}catch{throw CliErrors[_0xc536c6(0x180)](_0xc536c6(0x186)+_0xf8379e);}if(!_0x22909e[_0xc536c6(0x157)]())throw CliErrors[_0xc536c6(0x180)]('Issue\x20description\x20cannot\x20be\x20empty.');const _0x2693bc=await getIssueReportContext(_0x245c9b,_0x25f53e);try{const _0x238cda=await reportIssue({'title':_0x245c9b[_0xc536c6(0x16c)](_0xc536c6(0x171)),'description':_0x22909e,'context':_0x2693bc,'dryRun':_0x25f53e,'redactDescription':process.env.RABETBASE_ISSUE_RAW_DESCRIPTION!=='1'});return{..._0x238cda,'descriptionSource':_0xf8379e?_0xc536c6(0x158):_0xc536c6(0x182),'descriptionFilePath':_0xf8379e};}catch(_0x3cd266){throw CliErrors[_0xc536c6(0x161)]('Failed\x20to\x20submit\x20issue\x20log:\x20'+(_0x3cd266 instanceof Error?_0x3cd266['message']:String(_0x3cd266)),_0xc536c6(0x160));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a153_0x510e3b=a153_0xbfa0;(function(_0x34da8e,_0x1b3fa4){const _0x2f02f5=a153_0xbfa0,_0xf3146a=_0x34da8e();while(!![]){try{const _0x2cc901=-parseInt(_0x2f02f5(0x1f5))/0x1*(-parseInt(_0x2f02f5(0x219))/0x2)+-parseInt(_0x2f02f5(0x20e))/0x3*(-parseInt(_0x2f02f5(0x20a))/0x4)+parseInt(_0x2f02f5(0x21e))/0x5+-parseInt(_0x2f02f5(0x203))/0x6+-parseInt(_0x2f02f5(0x21d))/0x7+-parseInt(_0x2f02f5(0x209))/0x8*(-parseInt(_0x2f02f5(0x207))/0x9)+parseInt(_0x2f02f5(0x20b))/0xa;if(_0x2cc901===_0x1b3fa4)break;else _0xf3146a['push'](_0xf3146a['shift']());}catch(_0x2d905b){_0xf3146a['push'](_0xf3146a['shift']());}}}(a153_0x4964,0xde4a6));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';function a153_0x4964(){const _0x45dd77=['stringify','1204702DTlNLc','rabetbase\x20kb\x20list\x20--title\x20','verified','version','8121512pPBLzZ','3058095AGyKQY','--file\x20is\x20required.','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','kb_already_exists','company','length','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','1nBvubM','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','Company\x20knowledge\x20base\x20','POST','write','rabetbase\x20kb\x20detail\x20--id\x20','kb_file_required','The\x20created\x20document\x20version\x20changed\x20after\x20its\x20write\x20response.\x20Inspect\x20it\x20without\x20resubmitting.','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','file','create','contentHash','cookie','\x20--format\x20compress','6965712BQknkv','\x20for\x20','byteSize','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','2080557jhTMVK','\x20--format\x20compress`\x20before\x20choosing\x20update.','32fEhUsF','8byItMj','8064180hxEulj','content','string','429885fblwYC','title','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','str','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','trim','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','\x20with\x20title\x20','Created\x20company\x20knowledge\x20base\x20','appCode'];a153_0x4964=function(){return _0x45dd77;};return a153_0x4964();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';function readCreateInput(_0xab3653){const _0x151155=a153_0xbfa0,_0x4ab5bf=_0xab3653[_0x151155(0x211)](_0x151155(0x20f))[_0x151155(0x213)]();if(!_0x4ab5bf)throw kbError('kb_title_required','--title\x20is\x20required.');const _0x45416f=_0xab3653[_0x151155(0x211)]('file')[_0x151155(0x213)]();if(!_0x45416f)throw kbError(_0x151155(0x1fb),_0x151155(0x21f),_0x151155(0x206));return{'title':_0x4ab5bf,'file':_0x45416f};}function a153_0xbfa0(_0x4357c1,_0x1a6272){_0x4357c1=_0x4357c1-0x1f3;const _0x4964ec=a153_0x4964();let _0xbfa058=_0x4964ec[_0x4357c1];return _0xbfa058;}async function prepareCreate(_0x517fd8){const _0x297140=a153_0xbfa0,_0x49833c=readCreateInput(_0x517fd8),_0x31631e=await readKbFile(_0x49833c[_0x297140(0x1fe)]),_0x2fdbad=await fetchAllCompanyKnowledgeBases(_0x517fd8,{'title':_0x49833c[_0x297140(0x20f)]}),_0x10c9d0=findExactCompanyKnowledgeBases(_0x2fdbad,_0x517fd8[_0x297140(0x217)],_0x49833c[_0x297140(0x20f)]);if(_0x10c9d0['length']>0x0)throw kbError(_0x297140(0x221),_0x297140(0x1f4)+_0x517fd8[_0x297140(0x217)]+_0x297140(0x215)+_0x49833c[_0x297140(0x20f)]+'.',_0x297140(0x1f6)+_0x10c9d0[0x0]['id']+_0x297140(0x208));return{..._0x49833c,'content':_0x31631e};}function plannedAfter(_0x44d50e,_0x27f77c){const _0x4d78ef=a153_0xbfa0;return{'scope':_0x4d78ef(0x222),'appCode':_0x44d50e['appCode'],'title':_0x27f77c[_0x4d78ef(0x20f)],'contentByteSize':_0x27f77c[_0x4d78ef(0x20c)][_0x4d78ef(0x205)],'contentHash':_0x27f77c[_0x4d78ef(0x20c)][_0x4d78ef(0x200)]};}function verifyCreatedState(_0x1ee88d,_0xd2c0e8,_0x246edd){const _0x5046d6=a153_0xbfa0;assertCompanyKnowledgeBase(_0x246edd,_0x1ee88d[_0x5046d6(0x217)],_0x246edd['id']);const _0x47f6fe=inspectKbContent(_0x246edd['content']);if(_0x246edd[_0x5046d6(0x20f)]!==_0xd2c0e8[_0x5046d6(0x20f)]||_0x47f6fe['contentHash']!==_0xd2c0e8[_0x5046d6(0x20c)][_0x5046d6(0x200)])throw kbError('kb_verification_failed',_0x5046d6(0x1f7)+_0x246edd['id']+'\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.',_0x5046d6(0x220)+_0x246edd['id']+_0x5046d6(0x210));return projectKb(_0x246edd);}export const kbCreate={'service':'kb','command':a153_0x510e3b(0x1ff),'description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':a153_0x510e3b(0x1f9),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a153_0x510e3b(0x20d),'required':!![],'description':'Knowledge-base\x20title'},{'name':'file','type':'string','required':!![],'description':a153_0x510e3b(0x212)}],async 'validate'(_0x1dd07c){readCreateInput(_0x1dd07c);},async 'dryRun'(_0x5a2eb2){const _0x2d91d8=a153_0x510e3b,_0x573579=await prepareCreate(_0x5a2eb2);return asDryRunResult({'operation':'create','selector':{'scope':_0x2d91d8(0x222),'appCode':_0x5a2eb2[_0x2d91d8(0x217)],'title':_0x573579['title']},'before':null,'after':plannedAfter(_0x5a2eb2,_0x573579),'dryRun':!![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x2d91d8(0x222),_0x2d91d8(0x1ff)),'body':{'appCode':_0x5a2eb2[_0x2d91d8(0x217)],'title':_0x573579[_0x2d91d8(0x20f)],'contentHash':_0x573579[_0x2d91d8(0x20c)]['contentHash'],'contentByteSize':_0x573579[_0x2d91d8(0x20c)][_0x2d91d8(0x205)]}},'warnings':[],'verification':{'lookupCommand':_0x2d91d8(0x21a)+JSON[_0x2d91d8(0x218)](_0x573579[_0x2d91d8(0x20f)])+_0x2d91d8(0x202)}},{'method':_0x2d91d8(0x1f8),'url':knowledgeDocumentsPath(_0x2d91d8(0x222),_0x2d91d8(0x1ff))});},async 'execute'(_0x11a57e){const _0x5c9048=a153_0x510e3b,_0x351bca=await prepareCreate(_0x11a57e);let _0x5b551a,_0x58a126,_0x56085a=![];try{const _0x22f621=await createEnterpriseKnowledgeBase(_0x11a57e[_0x5c9048(0x201)],{'appCode':_0x11a57e[_0x5c9048(0x217)],'title':_0x351bca[_0x5c9048(0x20f)],'content':_0x351bca['content']['content']});assertCompanyKnowledgeBase(_0x22f621,_0x11a57e['appCode'],_0x22f621['id']),_0x5b551a=_0x22f621['id'],_0x58a126=_0x22f621[_0x5c9048(0x21c)];}catch(_0xf04f35){if(!isPlatformTransportFailure(_0xf04f35))throw _0xf04f35;_0x56085a=!![];}if(_0x5b551a===undefined){const _0x8ef341=await verifyKbMutationReadback(_0x5c9048(0x1ff),!![],()=>fetchAllCompanyKnowledgeBases(_0x11a57e,{'title':_0x351bca[_0x5c9048(0x20f)]})),_0x46c17c=findExactCompanyKnowledgeBases(_0x8ef341,_0x11a57e[_0x5c9048(0x217)],_0x351bca[_0x5c9048(0x20f)]);if(_0x46c17c[_0x5c9048(0x1f3)]!==0x1)throw kbError('kb_create_outcome_unknown','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20'+_0x46c17c[_0x5c9048(0x1f3)]+'.',_0x5c9048(0x214));_0x5b551a=_0x46c17c[0x0]['id'];}const _0x592f6d=await verifyKbMutationReadback(_0x5c9048(0x1ff),_0x56085a,()=>requireKb(_0x11a57e,_0x5b551a));if(_0x58a126!==undefined&&_0x592f6d['version']!==_0x58a126)throw kbError('kb_verification_failed',_0x5c9048(0x1fc));const _0x27ab6b=verifyCreatedState(_0x11a57e,_0x351bca,_0x592f6d),_0x529f6d=_0x56085a?[_0x5c9048(0x1fd)]:[];return{'ok':!![],'data':{'operation':'create','selector':{'id':_0x27ab6b['id'],'scope':_0x5c9048(0x222),'appCode':_0x27ab6b[_0x5c9048(0x217)]},'before':null,'after':_0x27ab6b,'dryRun':![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x5c9048(0x222),_0x5c9048(0x1ff))},'warnings':_0x529f6d,'verification':{'status':_0x5c9048(0x21b),'recoveredAfterUnknownResponse':_0x56085a,'lookupCommand':_0x5c9048(0x1fa)+_0x27ab6b['id']+_0x5c9048(0x202)}},'message':_0x5c9048(0x216)+_0x27ab6b['id']+_0x5c9048(0x204)+_0x27ab6b[_0x5c9048(0x217)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a154_0x5bc77e=a154_0x3f23;(function(_0x259587,_0x590f69){const _0x8c0f3f=a154_0x3f23,_0x3ed791=_0x259587();while(!![]){try{const _0x3624a7=-parseInt(_0x8c0f3f(0x139))/0x1*(parseInt(_0x8c0f3f(0x13d))/0x2)+-parseInt(_0x8c0f3f(0x14e))/0x3+-parseInt(_0x8c0f3f(0x14c))/0x4+parseInt(_0x8c0f3f(0x136))/0x5+-parseInt(_0x8c0f3f(0x13c))/0x6*(parseInt(_0x8c0f3f(0x144))/0x7)+parseInt(_0x8c0f3f(0x135))/0x8+-parseInt(_0x8c0f3f(0x141))/0x9*(-parseInt(_0x8c0f3f(0x138))/0xa);if(_0x3624a7===_0x590f69)break;else _0x3ed791['push'](_0x3ed791['shift']());}catch(_0x4279e8){_0x3ed791['push'](_0x3ed791['shift']());}}}(a154_0x490e,0xbd740));function a154_0x490e(){const _0x59d5f5=['12122824dGazOh','3149240UxHcnZ','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','220OGhbyG','1vzJXsI','delete','\x20--format\x20compress','6000042CUbZZM','1026018PnEkJZ','--expected-version\x20must\x20be\x20a\x20positive\x20safe\x20integer.','expected-version','no_op','763713RXDLCt','high-risk-write','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','7CupUdE','already_absent','verified','Company\x20knowledge-base\x20id','version','company','unshift','isSafeInteger','2914396eSLQiV','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','2983320ibtFXA','Company\x20knowledge\x20base\x20','appCode','POST','rabetbase\x20kb\x20detail\x20--id\x20','kb_delete_outcome_unknown','string'];a154_0x490e=function(){return _0x59d5f5;};return a154_0x490e();}import{knowledgeDocumentsPath}from'../../core/api-client.js';import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const RAG_WARNING='Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.';function a154_0x3f23(_0x3e4b0d,_0x5829a0){_0x3e4b0d=_0x3e4b0d-0x132;const _0x490e6e=a154_0x490e();let _0x3f2350=_0x490e6e[_0x3e4b0d];return _0x3f2350;}function readExpectedVersion(_0x514703){const _0x5b1013=a154_0x3f23,_0x13fbb1=_0x514703['flag'](_0x5b1013(0x13f));if(_0x13fbb1===undefined)return undefined;const _0x2a23a6=Number(_0x13fbb1);if(!Number[_0x5b1013(0x14b)](_0x2a23a6)||_0x2a23a6<0x1)throw kbError('kb_expected_version_invalid',_0x5b1013(0x13e));return _0x2a23a6;}function noOpData(_0x41531b,_0xc9aa13,_0x58f5e8){const _0x474a31=a154_0x3f23;return{'operation':_0x474a31(0x140),'selector':{'id':_0xc9aa13,'scope':_0x474a31(0x149),'appCode':_0x41531b['appCode']},'before':null,'after':null,'dryRun':_0x58f5e8,'deleteCalled':![],'backend':{'method':_0x474a31(0x151),'path':knowledgeDocumentsPath(_0x474a31(0x149),'delete')},'warnings':[],'verification':{'status':_0x474a31(0x145),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a154_0x5bc77e(0x13a),'description':a154_0x5bc77e(0x14d),'risk':a154_0x5bc77e(0x142),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a154_0x5bc77e(0x134),'required':!![],'description':a154_0x5bc77e(0x147)},{'name':a154_0x5bc77e(0x13f),'type':'number','required':![],'description':'Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set'}],async 'validate'(_0x2bd54b){readKbId(_0x2bd54b),readExpectedVersion(_0x2bd54b),requireKbExplicitYes(_0x2bd54b);},async 'dryRun'(_0x5aef7a){const _0x544b67=a154_0x5bc77e,_0x2475e1=readKbId(_0x5aef7a),_0x1d7036=readExpectedVersion(_0x5aef7a),_0x18c4b4=await getKbOrNull(_0x5aef7a,_0x2475e1);if(!_0x18c4b4)return asDryRunResult(noOpData(_0x5aef7a,_0x2475e1,!![]),{'method':_0x544b67(0x151),'url':knowledgeDocumentsPath(_0x544b67(0x149),'delete')});assertExpectedKbVersion(_0x18c4b4,_0x1d7036);const _0x103f06=projectKb(_0x18c4b4),_0x4f5c3e=[RAG_WARNING];return asDryRunResult({'operation':_0x544b67(0x13a),'selector':{'id':_0x103f06['id'],'scope':'company','appCode':_0x103f06[_0x544b67(0x150)]},'before':_0x103f06,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x544b67(0x151),'path':knowledgeDocumentsPath(_0x544b67(0x149),'delete'),'body':{'appCode':_0x5aef7a[_0x544b67(0x150)],'id':_0x2475e1,'expectedVersion':_0x18c4b4[_0x544b67(0x148)]}},'warnings':_0x4f5c3e,'verification':{'expectedVersion':_0x18c4b4[_0x544b67(0x148)],'atomicCompareAndSet':!![],'snapshotHash':_0x103f06['snapshotHash'],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x544b67(0x132)+_0x103f06['id']+_0x544b67(0x13b)}},{'method':_0x544b67(0x151),'url':knowledgeDocumentsPath('company',_0x544b67(0x13a))});},async 'execute'(_0xaf3180){const _0x5bb27d=a154_0x5bc77e;requireKbExplicitYes(_0xaf3180);const _0x287f1b=readKbId(_0xaf3180),_0x44b0b7=readExpectedVersion(_0xaf3180),_0x5db1b6=await getKbOrNull(_0xaf3180,_0x287f1b);if(!_0x5db1b6)return{'ok':!![],'data':noOpData(_0xaf3180,_0x287f1b,![]),'message':_0x5bb27d(0x14f)+_0x287f1b+_0x5bb27d(0x143)};assertExpectedKbVersion(_0x5db1b6,_0x44b0b7);const _0x3433fc=projectKb(_0x5db1b6);let _0x18b2a2=![];try{await deleteEnterpriseKnowledgeBase(_0xaf3180['cookie'],_0x287f1b,_0xaf3180['appCode'],_0x5db1b6[_0x5bb27d(0x148)]);}catch(_0x5ed927){if(!isPlatformTransportFailure(_0x5ed927))throw _0x5ed927;_0x18b2a2=!![];}const _0x33586f=await verifyKbMutationReadback(_0x5bb27d(0x13a),_0x18b2a2,()=>getKbOrNull(_0xaf3180,_0x287f1b));if(_0x33586f)throw kbError(_0x18b2a2?_0x5bb27d(0x133):'kb_verification_failed',_0x5bb27d(0x14f)+_0x287f1b+'\x20remains\x20readable\x20after\x20delete.','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x287f1b+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x292a1f=[RAG_WARNING];return _0x18b2a2&&_0x292a1f[_0x5bb27d(0x14a)](_0x5bb27d(0x137)),{'ok':!![],'data':{'operation':_0x5bb27d(0x13a),'selector':{'id':_0x3433fc['id'],'scope':_0x5bb27d(0x149),'appCode':_0x3433fc['appCode']},'before':_0x3433fc,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':'POST','path':knowledgeDocumentsPath('company',_0x5bb27d(0x13a))},'warnings':_0x292a1f,'verification':{'status':_0x5bb27d(0x146),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x18b2a2,'lookupCommand':_0x5bb27d(0x132)+_0x3433fc['id']+'\x20--format\x20compress'}},'message':'Soft-deleted\x20company\x20knowledge\x20base\x20'+_0x3433fc['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a155_0x22d2(){const _0x3a7538=['11OUBEPA','detail','11064880klrQyD','6656964htUySP','7118632DjhvqU','string','content','3147322BseZFb','7IiiQok','162iwTuAy','456992QEQZPk','Company\x20knowledge-base\x20id','3XhYURQ','669028XRvbKN','8537595BROBuy','Show\x20one\x20company\x20knowledge\x20base\x20with\x20full\x20content\x20for\x20the\x20resolved\x20app','Loaded\x20company\x20knowledge\x20base\x20'];a155_0x22d2=function(){return _0x3a7538;};return a155_0x22d2();}function a155_0x115a(_0x8c37db,_0x8cc26e){_0x8c37db=_0x8c37db-0x1aa;const _0x22d2ca=a155_0x22d2();let _0x115a27=_0x22d2ca[_0x8c37db];return _0x115a27;}const a155_0x35a989=a155_0x115a;(function(_0x1bc8be,_0x41a5f0){const _0x4f8053=a155_0x115a,_0x8c8b86=_0x1bc8be();while(!![]){try{const _0x222ff0=-parseInt(_0x4f8053(0x1b4))/0x1+-parseInt(_0x4f8053(0x1ae))/0x2*(parseInt(_0x4f8053(0x1b3))/0x3)+-parseInt(_0x4f8053(0x1ab))/0x4+parseInt(_0x4f8053(0x1b5))/0x5+-parseInt(_0x4f8053(0x1aa))/0x6*(-parseInt(_0x4f8053(0x1af))/0x7)+-parseInt(_0x4f8053(0x1b1))/0x8*(-parseInt(_0x4f8053(0x1b0))/0x9)+parseInt(_0x4f8053(0x1ba))/0xa*(parseInt(_0x4f8053(0x1b8))/0xb);if(_0x222ff0===_0x41a5f0)break;else _0x8c8b86['push'](_0x8c8b86['shift']());}catch(_0x130fd2){_0x8c8b86['push'](_0x8c8b86['shift']());}}}(a155_0x22d2,0xe2e6a));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':a155_0x35a989(0x1b9),'description':a155_0x35a989(0x1b6),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a155_0x35a989(0x1ac),'required':!![],'description':a155_0x35a989(0x1b2)}],async 'validate'(_0x17d837){readKbId(_0x17d837);},async 'execute'(_0x3c8cfe){const _0x645dee=a155_0x35a989,_0x11943a=readKbId(_0x3c8cfe),_0xcd9d92=await requireKb(_0x3c8cfe,_0x11943a);return{'ok':!![],'data':{'knowledgeBase':{...projectKb(_0xcd9d92),'content':_0xcd9d92[_0x645dee(0x1ad)]}},'message':_0x645dee(0x1b7)+_0x11943a};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a156_0x359f76=a156_0x5dfb;(function(_0x35f393,_0x1504d3){const _0x4ef2bc=a156_0x5dfb,_0x3aaf8f=_0x35f393();while(!![]){try{const _0x5389d5=parseInt(_0x4ef2bc(0xdf))/0x1+parseInt(_0x4ef2bc(0xe9))/0x2*(-parseInt(_0x4ef2bc(0xe1))/0x3)+-parseInt(_0x4ef2bc(0xe3))/0x4+-parseInt(_0x4ef2bc(0xeb))/0x5+-parseInt(_0x4ef2bc(0xe8))/0x6+parseInt(_0x4ef2bc(0xec))/0x7+parseInt(_0x4ef2bc(0xe2))/0x8*(parseInt(_0x4ef2bc(0xe7))/0x9);if(_0x5389d5===_0x1504d3)break;else _0x3aaf8f['push'](_0x3aaf8f['shift']());}catch(_0x53a72b){_0x3aaf8f['push'](_0x3aaf8f['shift']());}}}(a156_0x5bac,0x58324));import{withKbManagementSession}from'../../core/kb-management-client.js';function a156_0x5bac(){const _0x584da3=['885OACwXL','120dlfulv','1629132TNYAJY','map','execute','dryRun','626733PohbrP','2945784aXwWRj','3064vtgIoY','signal','335820FkCOff','2385159vOdxVp','393311ZjKYgv','search'];a156_0x5bac=function(){return _0x584da3;};return a156_0x5bac();}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';function a156_0x5dfb(_0x2037b8,_0x363241){_0x2037b8=_0x2037b8-0xdf;const _0x5bac4d=a156_0x5bac();let _0x5dfb4f=_0x5bac4d[_0x2037b8];return _0x5dfb4f;}export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete][a156_0x359f76(0xe4)](_0xdededa=>_0xdededa['command']===a156_0x359f76(0xe0)?_0xdededa:{..._0xdededa,'execute':_0xf7a986=>withKbManagementSession(_0xf7a986[a156_0x359f76(0xea)],()=>_0xdededa[a156_0x359f76(0xe5)](_0xf7a986)),..._0xdededa[a156_0x359f76(0xe6)]?{'dryRun':_0x3fc9da=>withKbManagementSession(_0x3fc9da[a156_0x359f76(0xea)],()=>_0xdededa[a156_0x359f76(0xe6)](_0x3fc9da))}:{}});
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a157_0xe9b0(_0x732cb8,_0x20bd8f){_0x732cb8=_0x732cb8-0x1c3;const _0x5a2c34=a157_0x5a2c();let _0xe9b01b=_0x5a2c34[_0x732cb8];return _0xe9b01b;}const a157_0x41588a=a157_0xe9b0;function a157_0x5a2c(){const _0x47f11a=['27712TGEYkk','Found\x20','\x20company\x20knowledge\x20base(s)\x20for\x20','length','title','map','933264ENvWOZ','5568252eUaRsA','11876500IWaJsa','list','string','appCode','9HgvYIq','4328195xIrDNi','1826488ZAuxCf','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','728iquIsv','1KrYWAT','3336570YicBZX'];a157_0x5a2c=function(){return _0x47f11a;};return a157_0x5a2c();}(function(_0x4b3741,_0x586015){const _0x280141=a157_0xe9b0,_0x3b38ae=_0x4b3741();while(!![]){try{const _0x2aae13=parseInt(_0x280141(0x1c3))/0x1*(parseInt(_0x280141(0x1d3))/0x2)+parseInt(_0x280141(0x1d1))/0x3*(parseInt(_0x280141(0x1cb))/0x4)+-parseInt(_0x280141(0x1d2))/0x5+parseInt(_0x280141(0x1cc))/0x6+-parseInt(_0x280141(0x1d5))/0x7*(-parseInt(_0x280141(0x1c5))/0x8)+-parseInt(_0x280141(0x1c4))/0x9+-parseInt(_0x280141(0x1cd))/0xa;if(_0x2aae13===_0x586015)break;else _0x3b38ae['push'](_0x3b38ae['shift']());}catch(_0xc72856){_0x3b38ae['push'](_0x3b38ae['shift']());}}}(a157_0x5a2c,0x7491f));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a157_0x41588a(0x1ce),'description':a157_0x41588a(0x1d4),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a157_0x41588a(0x1cf),'required':![],'description':'Filter\x20by\x20knowledge-base\x20title'}],async 'execute'(_0x3f39da){const _0x57ca39=a157_0x41588a,_0x3a798a=_0x3f39da['str'](_0x57ca39(0x1c9))['trim'](),_0x50d2c0=await fetchAllCompanyKnowledgeBases(_0x3f39da,{..._0x3a798a?{'title':_0x3a798a}:{}}),_0x1d1af5=_0x50d2c0[_0x57ca39(0x1ca)](projectKb);return{'ok':!![],'data':{'total':_0x1d1af5[_0x57ca39(0x1c8)],'knowledgeBases':_0x1d1af5},'message':_0x57ca39(0x1c6)+_0x1d1af5['length']+_0x57ca39(0x1c7)+_0x3f39da[_0x57ca39(0x1d0)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a158_0x3f5674=a158_0x4aa4;(function(_0x27dd2f,_0x289376){const _0x436857=a158_0x4aa4,_0x3b463d=_0x27dd2f();while(!![]){try{const _0xda6b59=-parseInt(_0x436857(0x77))/0x1+-parseInt(_0x436857(0x93))/0x2*(parseInt(_0x436857(0x85))/0x3)+parseInt(_0x436857(0x78))/0x4+-parseInt(_0x436857(0x7f))/0x5+-parseInt(_0x436857(0x87))/0x6*(-parseInt(_0x436857(0x94))/0x7)+-parseInt(_0x436857(0x7b))/0x8*(parseInt(_0x436857(0x80))/0x9)+parseInt(_0x436857(0x83))/0xa*(parseInt(_0x436857(0x7c))/0xb);if(_0xda6b59===_0x289376)break;else _0x3b463d['push'](_0x3b463d['shift']());}catch(_0x146fbf){_0x3b463d['push'](_0x3b463d['shift']());}}}(a158_0x407c,0x335d6));import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';function a158_0x407c(){const _0x51ac39=['trim','\x20company/public\x20knowledge\x20hit(s)\x20for\x20','appCode','validation','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20--kb-service-url\x20<https-origin>\x20for\x20this\x20request.','topk','Company\x20and\x20public\x20knowledge\x20search\x20query','total','Found\x20','number','737056YXeIKL','627214EPPThx','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','Search\x20query\x20is\x20required.','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','277780orSHwO','1624616XdjCch','str','read','8GWUxlq','207427dLerQH','kb-service-url','num','1423670AHbKpX','2504853NeAAzW','cookie','string','490DERupV','signal','3vTJoBH','flag','6tdAuuC','query'];a158_0x407c=function(){return _0x51ac39;};return a158_0x407c();}function a158_0x4aa4(_0xd0512c,_0x27fbfb){_0xd0512c=_0xd0512c-0x73;const _0x407cf1=a158_0x407c();let _0x4aa4e4=_0x407cf1[_0xd0512c];return _0x4aa4e4;}function readSearchQuery(_0x151174){const _0x464e7e=a158_0x4aa4,_0x39ce93=_0x151174[_0x464e7e(0x79)](_0x464e7e(0x88))[_0x464e7e(0x89)]();if(!_0x39ce93)throw CliErrors['validation'](_0x464e7e(0x74));return _0x39ce93;}function readSearchTopK(_0xccdca6){const _0x56f559=a158_0x4aa4,_0x3b86a=_0xccdca6[_0x56f559(0x86)](_0x56f559(0x8e));if(_0x3b86a===undefined||_0x3b86a===null||_0x3b86a==='')return undefined;const _0x1bfa6d=_0xccdca6[_0x56f559(0x7e)]('topk');if(!Number['isSafeInteger'](_0x1bfa6d)||_0x1bfa6d<0x1||_0x1bfa6d>0x32)throw CliErrors[_0x56f559(0x8c)](_0x56f559(0x75));return _0x1bfa6d;}function readSearchServiceUrl(_0x269b90){const _0x4c7507=a158_0x4aa4;if(_0x269b90['flag'](_0x4c7507(0x7d))!==undefined)return normalizeKbServiceOrigin(_0x269b90[_0x4c7507(0x79)](_0x4c7507(0x7d)));const _0x4cccbe=getKbServiceDomain();if(!_0x4cccbe)throw CliErrors[_0x4c7507(0x8c)]('KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.',_0x4c7507(0x8d));return normalizeKbServiceOrigin(_0x4cccbe);}export const kbSearch={'service':'kb','command':'search','description':a158_0x3f5674(0x73),'risk':a158_0x3f5674(0x7a),'requiresAppCode':!![],'structuredErrors':!![],'strictFlags':!![],'flags':[{'name':a158_0x3f5674(0x88),'type':a158_0x3f5674(0x82),'required':!![],'description':a158_0x3f5674(0x8f)},{'name':a158_0x3f5674(0x8e),'type':a158_0x3f5674(0x92),'required':![],'description':'Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return'},{'name':'kb-service-url','type':a158_0x3f5674(0x82),'required':![],'description':a158_0x3f5674(0x76)}],async 'validate'(_0x13bd91){readSearchQuery(_0x13bd91),readSearchTopK(_0x13bd91),readSearchServiceUrl(_0x13bd91);},async 'execute'(_0x4266fa){const _0x149ba1=a158_0x3f5674,_0x8db59f=readSearchQuery(_0x4266fa),_0x3f26d7=readSearchTopK(_0x4266fa),_0x135e67=readSearchServiceUrl(_0x4266fa),_0x18e849={'cookie':_0x4266fa[_0x149ba1(0x81)],'query':_0x8db59f,'appCode':_0x4266fa['appCode'],..._0x3f26d7!==undefined?{'topK':_0x3f26d7}:{},'signal':_0x4266fa[_0x149ba1(0x84)]},_0x5526d2=await searchDirectKnowledge({..._0x18e849,'serviceUrl':_0x135e67});return{'ok':!![],'data':_0x5526d2,'message':_0x149ba1(0x91)+_0x5526d2[_0x149ba1(0x90)]+_0x149ba1(0x8a)+_0x4266fa[_0x149ba1(0x8b)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x582a0a,_0xa39a6b){const _0x33b5c7=a159_0x5668,_0x2c7a53=_0x582a0a();while(!![]){try{const _0x411ec2=parseInt(_0x33b5c7(0x1ac))/0x1*(-parseInt(_0x33b5c7(0x1a2))/0x2)+parseInt(_0x33b5c7(0x1dc))/0x3+-parseInt(_0x33b5c7(0x1b4))/0x4+parseInt(_0x33b5c7(0x1ab))/0x5+-parseInt(_0x33b5c7(0x19e))/0x6+-parseInt(_0x33b5c7(0x189))/0x7+parseInt(_0x33b5c7(0x194))/0x8;if(_0x411ec2===_0xa39a6b)break;else _0x2c7a53['push'](_0x2c7a53['shift']());}catch(_0x5e0fb5){_0x2c7a53['push'](_0x2c7a53['shift']());}}}(a159_0x58e3,0xdb0d9));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';function a159_0x5668(_0x393f12,_0x40874a){_0x393f12=_0x393f12-0x17e;const _0x58e33a=a159_0x58e3();let _0x5668c8=_0x58e33a[_0x393f12];return _0x5668c8;}import{KbManagementError}from'../../core/kb-management-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE='306';export function kbError(_0x3fe886,_0x4278d6,_0x2bf071){return new CliError(_0x3fe886,0x1,_0x4278d6,_0x2bf071);}export function readKbId(_0x50e713){const _0x2f4096=a159_0x5668,_0x518640=_0x50e713[_0x2f4096(0x184)]('id');if(!/^0*[1-9][0-9]*$/[_0x2f4096(0x1bc)](_0x518640))throw kbError('kb_id_invalid',_0x2f4096(0x1a9));return _0x518640;}export function requireKbExplicitYes(_0x414f6d){const _0x6d1593=a159_0x5668;if(_0x414f6d[_0x6d1593(0x1a3)](_0x6d1593(0x1bb))||_0x414f6d[_0x6d1593(0x1a3)](_0x6d1593(0x1d5)))return;throw kbError(_0x6d1593(0x1b0),_0x6d1593(0x186),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}function sha256(_0x4eb646){const _0x5097b5=a159_0x5668;return _0x5097b5(0x1bf)+createHash(_0x5097b5(0x1ae))[_0x5097b5(0x193)](_0x4eb646)[_0x5097b5(0x1c4)]('hex');}export function inspectKbContent(_0x5c77df){const _0x39bc1b=a159_0x5668,_0x30ce67=Buffer[_0x39bc1b(0x1c0)](_0x5c77df,_0x39bc1b(0x1b2));return{'content':_0x5c77df,'byteSize':_0x30ce67[_0x39bc1b(0x1d1)],'contentHash':sha256(_0x30ce67)};}export async function readKbFile(_0x388608){const _0x51815b=a159_0x5668,_0x435f7f=_0x388608['trim']();if(!_0x435f7f)throw kbError(_0x51815b(0x19f),_0x51815b(0x18e),_0x51815b(0x185));const _0x5d1ed2=resolve(_0x435f7f);let _0x4e8817;try{_0x4e8817=await stat(_0x5d1ed2);}catch(_0x574a24){throw kbError('kb_file_unreadable',_0x51815b(0x190)+_0x435f7f,_0x574a24 instanceof Error?_0x574a24[_0x51815b(0x1ca)]:String(_0x574a24));}if(!_0x4e8817[_0x51815b(0x1da)]())throw kbError(_0x51815b(0x18c),_0x51815b(0x1b6)+_0x435f7f);let _0x523891;try{_0x523891=await readFile(_0x5d1ed2);}catch(_0xb968c2){throw kbError(_0x51815b(0x19a),'Cannot\x20read\x20knowledge-base\x20content\x20file:\x20'+_0x435f7f,_0xb968c2 instanceof Error?_0xb968c2[_0x51815b(0x1ca)]:String(_0xb968c2));}let _0x55dbdd;try{_0x55dbdd=new TextDecoder(_0x51815b(0x1a7),{'fatal':!![],'ignoreBOM':!![]})[_0x51815b(0x1a4)](_0x523891);}catch{throw kbError(_0x51815b(0x1b8),_0x51815b(0x1d4)+_0x435f7f);}if(!_0x55dbdd[_0x51815b(0x1c3)]())throw kbError(_0x51815b(0x1b8),_0x51815b(0x198)+_0x435f7f);return inspectKbContent(_0x55dbdd);}export async function verifyKbMutationReadback(_0x55efff,_0x171f53,_0x16fd85){const _0x41bbcf=a159_0x5668;try{return await _0x16fd85();}catch(_0x13985a){const _0x4d66dc=kbError('kb_'+_0x55efff+'_'+(_0x171f53?_0x41bbcf(0x1df):_0x41bbcf(0x1db)),_0x41bbcf(0x1b9)+_0x55efff+_0x41bbcf(0x1d9),_0x41bbcf(0x1ce));Object[_0x41bbcf(0x181)](_0x4d66dc,_0x41bbcf(0x183),{'value':_0x13985a,'enumerable':![]});throw _0x4d66dc;}}function a159_0x58e3(){const _0x1a9b10=['kb_list_contract_invalid','sha256:','from','Knowledge-base\x20list\x20returned\x20page\x20','\x20was\x20requested.','trim','digest','\x20response\x20is\x20missing\x20','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','has','version','allowEmpty','message','content','indexStatus','\x20of\x20','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','max','Knowledge\x20base\x20','byteLength','cookie','createTime','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','yes','byteSize','Knowledge-base\x20list\x20total\x20changed\x20from\x20','string','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','isFile','verification_unavailable','422865suhQGO','title','paging','outcome_unknown','contentHash','Knowledge-base\x20list\x20returned\x20an\x20inconsistent\x20page\x20size\x20or\x20record\x20count.','company','defineProperty','appCode','cause','str','Pass\x20--file\x20<knowledge.md>.','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','Knowledge-base\x20list\x20stopped\x20at\x20','currentPage','10963022hsdizk','\x20during\x20paging.','pageTooLarge','kb_file_invalid','filter','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','number','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','Company\x20knowledge\x20base\x20not\x20found:\x20','update','20156488prBMYd','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','\x20to\x20','indexedVersion','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','items','kb_file_unreadable','sourceVersion','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','kb_not_found','3514698kDsUCg','kb_file_required','length','add','9018vnyXAW','bool','decode','stringify','clear','utf-8','scope','--id\x20must\x20be\x20a\x20positive\x20decimal\x20integer\x20string.','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','8046240WZhwWn','79ByjhVS','isSafeInteger','sha256','kb_response_invalid','kb_confirmation_required','\x20records.','utf8','totalCount','3457532wPpmES','kb_scope_mismatch','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','kb_content_invalid','The\x20','pageSize','dry-run','test','updateTime'];a159_0x58e3=function(){return _0x1a9b10;};return a159_0x58e3();}function requireRecordText(_0xe8487f,_0x26966a,_0x20003f,_0x5ccf9f={}){const _0x4d916d=a159_0x5668;if(typeof _0xe8487f===_0x4d916d(0x1d8)&&(_0x5ccf9f[_0x4d916d(0x1c9)]||_0xe8487f[_0x4d916d(0x1c3)]()))return _0xe8487f;throw kbError('kb_response_invalid',_0x4d916d(0x1d0)+String(_0x20003f)+_0x4d916d(0x1c5)+_0x26966a+'.');}export function projectKb(_0x235f93){const _0x54a2c1=a159_0x5668;if(typeof _0x235f93['id']!=='string'||!/^0*[1-9][0-9]*$/['test'](_0x235f93['id']))throw kbError('kb_response_invalid',_0x54a2c1(0x195));if(!Number['isSafeInteger'](_0x235f93[_0x54a2c1(0x1c8)])||_0x235f93[_0x54a2c1(0x1c8)]<0x1)throw kbError(_0x54a2c1(0x1af),_0x54a2c1(0x1d0)+_0x235f93['id']+'\x20response\x20contains\x20an\x20invalid\x20version.');if(_0x235f93['scope']!=='company')throw kbError(_0x54a2c1(0x1b5),_0x54a2c1(0x1d0)+_0x235f93['id']+'\x20is\x20not\x20company-scoped.');const _0x1fb21a=requireRecordText(_0x235f93[_0x54a2c1(0x182)],_0x54a2c1(0x182),_0x235f93['id']),_0x4fd80b=requireRecordText(_0x235f93[_0x54a2c1(0x1dd)],_0x54a2c1(0x1dd),_0x235f93['id']),_0x36b4ff=inspectKbContent(requireRecordText(_0x235f93[_0x54a2c1(0x1cb)],_0x54a2c1(0x1cb),_0x235f93['id'],{'allowEmpty':!![]})),_0xdc6be8=typeof _0x235f93[_0x54a2c1(0x1d3)]==='string'||typeof _0x235f93[_0x54a2c1(0x1d3)]==='number'?_0x235f93['createTime']:undefined,_0x5d8f50=typeof _0x235f93[_0x54a2c1(0x1bd)]===_0x54a2c1(0x1d8)||typeof _0x235f93[_0x54a2c1(0x1bd)]===_0x54a2c1(0x18f)?_0x235f93[_0x54a2c1(0x1bd)]:undefined,_0x426165=sha256(JSON[_0x54a2c1(0x1a5)]({'id':_0x235f93['id'],'scope':_0x235f93[_0x54a2c1(0x1a8)],'appCode':_0x1fb21a,'title':_0x4fd80b,'version':_0x235f93[_0x54a2c1(0x1c8)],'contentHash':_0x36b4ff[_0x54a2c1(0x17e)],'createTime':_0xdc6be8,'updateTime':_0x5d8f50}));return{'id':_0x235f93['id'],'scope':_0x54a2c1(0x180),'appCode':_0x1fb21a,'title':_0x4fd80b,'version':_0x235f93[_0x54a2c1(0x1c8)],..._0x235f93[_0x54a2c1(0x19b)]!==undefined?{'sourceVersion':_0x235f93['sourceVersion']}:{},..._0x235f93['indexStatus']!==undefined?{'indexStatus':_0x235f93[_0x54a2c1(0x1cc)],'indexedVersion':_0x235f93[_0x54a2c1(0x197)]}:{},'contentByteSize':_0x36b4ff[_0x54a2c1(0x1d6)],'contentHash':_0x36b4ff[_0x54a2c1(0x17e)],'snapshotHash':_0x426165,..._0xdc6be8!==undefined?{'createTime':_0xdc6be8}:{},..._0x5d8f50!==undefined?{'updateTime':_0x5d8f50}:{}};}export function assertCompanyKnowledgeBase(_0xa9959f,_0x27627c,_0xbab384){const _0x443a49=a159_0x5668;if(_0xbab384!==undefined&&_0xa9959f['id']!==_0xbab384)throw kbError('kb_response_invalid','Knowledge-base\x20get-one\x20returned\x20id\x20'+_0xa9959f['id']+'\x20while\x20id\x20'+_0xbab384+_0x443a49(0x1c2));if(_0xa9959f[_0x443a49(0x1a8)]!==_0x443a49(0x180)||_0xa9959f['appCode']!==_0x27627c)throw kbError(_0x443a49(0x1b5),_0x443a49(0x1d0)+_0xa9959f['id']+_0x443a49(0x1b7)+_0x27627c+'.');}export async function fetchAllCompanyKnowledgeBases(_0x3c2d53,_0x538ee3){const _0x5b41c5=a159_0x5668;let _0x2204c2=LIST_PAGE_SIZE;const _0x533a58=[],_0x42c978=new Set();let _0x2a24ef=0x1,_0x21a295=0x0,_0x2e498d;while(!![]){let _0x1e835f;try{_0x1e835f=await listEnterpriseKnowledgeBases(_0x3c2d53['cookie'],{'currentPage':_0x2a24ef,'pageSize':_0x2204c2,'appCode':_0x3c2d53[_0x5b41c5(0x182)],..._0x538ee3});}catch(_0x5bf4b7){if(!(_0x5bf4b7 instanceof KbManagementError)||!_0x5bf4b7[_0x5b41c5(0x18b)]||_0x2204c2===0x1)throw _0x5bf4b7;_0x2204c2=Math[_0x5b41c5(0x1cf)](0x1,Math['floor'](_0x2204c2/0x2)),_0x2a24ef=0x1,_0x21a295=0x0,_0x533a58[_0x5b41c5(0x1a0)]=0x0,_0x42c978[_0x5b41c5(0x1a6)]();continue;}const _0x55d1dd=_0x1e835f[_0x5b41c5(0x1de)]?.[_0x5b41c5(0x1b3)];if(!_0x1e835f[_0x5b41c5(0x1de)]||_0x1e835f[_0x5b41c5(0x1de)][_0x5b41c5(0x1ba)]!==_0x2204c2||!Number[_0x5b41c5(0x1ad)](_0x55d1dd)||_0x55d1dd<0x0||_0x1e835f[_0x5b41c5(0x199)][_0x5b41c5(0x1a0)]!==Math['min'](_0x2204c2,Math[_0x5b41c5(0x1cf)](0x0,_0x55d1dd-(_0x2a24ef-0x1)*_0x2204c2)))throw kbError(_0x5b41c5(0x1be),_0x5b41c5(0x17f));if(_0x1e835f[_0x5b41c5(0x1de)][_0x5b41c5(0x188)]!==_0x2a24ef)throw kbError(_0x5b41c5(0x1be),_0x5b41c5(0x1c1)+_0x1e835f[_0x5b41c5(0x1de)]['currentPage']+'\x20while\x20page\x20'+_0x2a24ef+_0x5b41c5(0x1c2));if(_0x55d1dd!==undefined){if(_0x2e498d!==undefined&&_0x55d1dd!==_0x2e498d)throw kbError(_0x5b41c5(0x1be),_0x5b41c5(0x1d7)+_0x2e498d+_0x5b41c5(0x196)+_0x55d1dd+_0x5b41c5(0x18a),_0x5b41c5(0x1aa));_0x2e498d=_0x55d1dd;}for(const _0x3a40b2 of _0x1e835f[_0x5b41c5(0x199)]){if(typeof _0x3a40b2['id']!==_0x5b41c5(0x1d8)||!/^0*[1-9][0-9]*$/[_0x5b41c5(0x1bc)](_0x3a40b2['id'])||_0x42c978[_0x5b41c5(0x1c7)](_0x3a40b2['id']))throw kbError('kb_list_contract_invalid',_0x5b41c5(0x1c6)+String(_0x3a40b2['id'])+'.');_0x42c978[_0x5b41c5(0x1a1)](_0x3a40b2['id']),_0x3a40b2[_0x5b41c5(0x1a8)]===_0x5b41c5(0x180)&&_0x3a40b2['appCode']===_0x3c2d53[_0x5b41c5(0x182)]&&_0x533a58['push'](_0x3a40b2);}_0x21a295+=_0x1e835f[_0x5b41c5(0x199)][_0x5b41c5(0x1a0)];if(_0x55d1dd!==undefined&&_0x21a295>=_0x55d1dd)break;if(_0x1e835f[_0x5b41c5(0x199)][_0x5b41c5(0x1a0)]<_0x2204c2){if(_0x55d1dd!==undefined&&_0x21a295<_0x55d1dd)throw kbError('kb_list_contract_invalid',_0x5b41c5(0x187)+_0x21a295+_0x5b41c5(0x1cd)+_0x55d1dd+_0x5b41c5(0x1b1));break;}_0x2a24ef+=0x1;}return _0x533a58;}export function findExactCompanyKnowledgeBases(_0x21510f,_0xf86505,_0x59e758){const _0x2955ca=a159_0x5668;return _0x21510f[_0x2955ca(0x18d)](_0x5ee9b5=>_0x5ee9b5[_0x2955ca(0x1a8)]==='company'&&_0x5ee9b5[_0x2955ca(0x182)]===_0xf86505&&_0x5ee9b5[_0x2955ca(0x1dd)]===_0x59e758);}export async function getKbOrNull(_0x2f45ad,_0x350b34){const _0x9ae0a9=a159_0x5668;try{const _0x43063c=await getEnterpriseKnowledgeBase(_0x2f45ad[_0x9ae0a9(0x1d2)],_0x350b34,_0x2f45ad['appCode']);return assertCompanyKnowledgeBase(_0x43063c,_0x2f45ad[_0x9ae0a9(0x182)],_0x350b34),_0x43063c;}catch(_0x2cc6d2){if(getPlatformErrorCode(_0x2cc6d2)===DATA_NOT_EXIST_ERROR_CODE&&getPlatformHttpStatus(_0x2cc6d2)===0x194)return null;throw _0x2cc6d2;}}export async function requireKb(_0x546df6,_0x1336c3){const _0x5e48d5=a159_0x5668,_0x4b642c=await getKbOrNull(_0x546df6,_0x1336c3);if(!_0x4b642c)throw kbError(_0x5e48d5(0x19d),_0x5e48d5(0x192)+_0x1336c3,_0x5e48d5(0x191));return _0x4b642c;}export function assertExpectedKbVersion(_0x4b10bc,_0x3ca2ef){const _0x58f301=a159_0x5668;if(_0x3ca2ef===undefined||_0x4b10bc['version']===_0x3ca2ef)return;throw kbError('kb_state_drift',_0x58f301(0x1d0)+_0x4b10bc['id']+'\x20version\x20changed:\x20expected\x20'+_0x3ca2ef+',\x20current\x20'+_0x4b10bc[_0x58f301(0x1c8)]+'.',_0x58f301(0x19c));}
|
|
1
|
+
const a159_0x4fe347=a159_0x37a4;(function(_0x4c7cb5,_0x1cc93d){const _0x3a025a=a159_0x37a4,_0x95516c=_0x4c7cb5();while(!![]){try{const _0x4bdc22=parseInt(_0x3a025a(0x128))/0x1*(-parseInt(_0x3a025a(0x121))/0x2)+-parseInt(_0x3a025a(0x14c))/0x3*(parseInt(_0x3a025a(0x147))/0x4)+parseInt(_0x3a025a(0x109))/0x5+parseInt(_0x3a025a(0x134))/0x6*(parseInt(_0x3a025a(0x130))/0x7)+-parseInt(_0x3a025a(0x13d))/0x8+-parseInt(_0x3a025a(0x10a))/0x9*(parseInt(_0x3a025a(0x117))/0xa)+-parseInt(_0x3a025a(0xfc))/0xb*(-parseInt(_0x3a025a(0x15c))/0xc);if(_0x4bdc22===_0x1cc93d)break;else _0x95516c['push'](_0x95516c['shift']());}catch(_0x4fec11){_0x95516c['push'](_0x95516c['shift']());}}}(a159_0x1245,0x1deba));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_0x37a4(_0x53957c,_0x25a044){_0x53957c=_0x53957c-0xfa;const _0x124511=a159_0x1245();let _0x37a496=_0x124511[_0x53957c];return _0x37a496;}import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a159_0x4fe347(0x132);export function kbError(_0x21f005,_0x46d1c2,_0x21e549){return new CliError(_0x21f005,0x1,_0x46d1c2,_0x21e549);}export function readKbId(_0x255354){const _0x107495=a159_0x4fe347,_0x52eb34=_0x255354[_0x107495(0x12e)]('id');if(!/^0*[1-9][0-9]*$/[_0x107495(0x112)](_0x52eb34))throw kbError(_0x107495(0x11e),_0x107495(0x136));return _0x52eb34;}export function requireKbExplicitYes(_0x52c62a){const _0x55c01d=a159_0x4fe347;if(_0x52c62a[_0x55c01d(0x11f)](_0x55c01d(0x124))||_0x52c62a['bool'](_0x55c01d(0x115)))return;throw kbError(_0x55c01d(0x139),_0x55c01d(0x100),_0x55c01d(0x103));}function sha256(_0x2d1eb7){const _0x3b3fa2=a159_0x4fe347;return _0x3b3fa2(0x155)+createHash(_0x3b3fa2(0x15a))['update'](_0x2d1eb7)['digest'](_0x3b3fa2(0x141));}export function inspectKbContent(_0x230f05){const _0x14f553=a159_0x4fe347,_0x9bb9de=Buffer[_0x14f553(0x105)](_0x230f05,_0x14f553(0x102));return{'content':_0x230f05,'byteSize':_0x9bb9de[_0x14f553(0x113)],'contentHash':sha256(_0x9bb9de)};}export async function readKbFile(_0x388b40){const _0x527b1d=a159_0x4fe347,_0xf0757b=_0x388b40[_0x527b1d(0x140)]();if(!_0xf0757b)throw kbError(_0x527b1d(0x120),_0x527b1d(0x106),_0x527b1d(0x15b));const _0x4dc427=resolve(_0xf0757b);let _0x453cfc;try{_0x453cfc=await stat(_0x4dc427);}catch(_0x5ec06a){throw kbError(_0x527b1d(0x125),_0x527b1d(0x145)+_0xf0757b,_0x5ec06a instanceof Error?_0x5ec06a[_0x527b1d(0x12f)]:String(_0x5ec06a));}if(!_0x453cfc[_0x527b1d(0x149)]())throw kbError('kb_file_invalid',_0x527b1d(0x146)+_0xf0757b);let _0x437a0e;try{_0x437a0e=await readFile(_0x4dc427);}catch(_0x331529){throw kbError('kb_file_unreadable',_0x527b1d(0x13b)+_0xf0757b,_0x331529 instanceof Error?_0x331529[_0x527b1d(0x12f)]:String(_0x331529));}let _0x1d7f61;try{_0x1d7f61=new TextDecoder(_0x527b1d(0x10e),{'fatal':!![],'ignoreBOM':!![]})[_0x527b1d(0x152)](_0x437a0e);}catch{throw kbError(_0x527b1d(0x15f),_0x527b1d(0xfe)+_0xf0757b);}if(!_0x1d7f61[_0x527b1d(0x140)]())throw kbError(_0x527b1d(0x15f),_0x527b1d(0x104)+_0xf0757b);return inspectKbContent(_0x1d7f61);}export async function verifyKbMutationReadback(_0x4fb42f,_0x5bcdad,_0x308030){const _0x8f7688=a159_0x4fe347;try{return await _0x308030();}catch(_0x4a8b47){const _0x20aa43=kbError(_0x8f7688(0x157)+_0x4fb42f+'_'+(_0x5bcdad?_0x8f7688(0x10b):'verification_unavailable'),_0x8f7688(0x14f)+_0x4fb42f+_0x8f7688(0x127),'Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.');Object[_0x8f7688(0x148)](_0x20aa43,_0x8f7688(0x13e),{'value':_0x4a8b47,'enumerable':![]});throw _0x20aa43;}}function requireRecordText(_0x22f521,_0x32ffad,_0x1a93d5,_0x3ef45b={}){const _0x403e97=a159_0x4fe347;if(typeof _0x22f521===_0x403e97(0x150)&&(_0x3ef45b[_0x403e97(0xfb)]||_0x22f521['trim']()))return _0x22f521;throw kbError(_0x403e97(0x11a),_0x403e97(0x122)+String(_0x1a93d5)+_0x403e97(0x15d)+_0x32ffad+'.');}export function projectKb(_0x5a7588){const _0x1d69c9=a159_0x4fe347;if(typeof _0x5a7588['id']!==_0x1d69c9(0x150)||!/^0*[1-9][0-9]*$/[_0x1d69c9(0x112)](_0x5a7588['id']))throw kbError(_0x1d69c9(0x11a),_0x1d69c9(0x142));if(!Number['isSafeInteger'](_0x5a7588[_0x1d69c9(0x108)])||_0x5a7588[_0x1d69c9(0x108)]<0x1)throw kbError(_0x1d69c9(0x11a),_0x1d69c9(0x122)+_0x5a7588['id']+_0x1d69c9(0x13f));if(_0x5a7588[_0x1d69c9(0x11b)]!==_0x1d69c9(0x126))throw kbError('kb_scope_mismatch',_0x1d69c9(0x122)+_0x5a7588['id']+_0x1d69c9(0x138));const _0x5438c0=requireRecordText(_0x5a7588['appCode'],'appCode',_0x5a7588['id']),_0x2f004c=requireRecordText(_0x5a7588[_0x1d69c9(0x114)],'title',_0x5a7588['id']),_0x5bbb5f=inspectKbContent(requireRecordText(_0x5a7588[_0x1d69c9(0x151)],_0x1d69c9(0x151),_0x5a7588['id'],{'allowEmpty':!![]})),_0x4c7671=typeof _0x5a7588[_0x1d69c9(0x13c)]===_0x1d69c9(0x150)||typeof _0x5a7588['createTime']===_0x1d69c9(0x158)?_0x5a7588[_0x1d69c9(0x13c)]:undefined,_0x870ce9=typeof _0x5a7588[_0x1d69c9(0x119)]===_0x1d69c9(0x150)||typeof _0x5a7588[_0x1d69c9(0x119)]===_0x1d69c9(0x158)?_0x5a7588['updateTime']:undefined,_0x2ad00d=sha256(JSON[_0x1d69c9(0x14d)]({'id':_0x5a7588['id'],'scope':_0x5a7588[_0x1d69c9(0x11b)],'appCode':_0x5438c0,'title':_0x2f004c,'version':_0x5a7588[_0x1d69c9(0x108)],'contentHash':_0x5bbb5f[_0x1d69c9(0x129)],'createTime':_0x4c7671,'updateTime':_0x870ce9}));return{'id':_0x5a7588['id'],'scope':_0x1d69c9(0x126),'appCode':_0x5438c0,'title':_0x2f004c,'version':_0x5a7588[_0x1d69c9(0x108)],..._0x5a7588[_0x1d69c9(0x12a)]!==undefined?{'sourceVersion':_0x5a7588[_0x1d69c9(0x12a)]}:{},..._0x5a7588[_0x1d69c9(0x11c)]!==undefined?{'indexStatus':_0x5a7588[_0x1d69c9(0x11c)],'indexedVersion':_0x5a7588[_0x1d69c9(0x12d)]}:{},'contentByteSize':_0x5bbb5f[_0x1d69c9(0x144)],'contentHash':_0x5bbb5f[_0x1d69c9(0x129)],'snapshotHash':_0x2ad00d,..._0x4c7671!==undefined?{'createTime':_0x4c7671}:{},..._0x870ce9!==undefined?{'updateTime':_0x870ce9}:{}};}export function assertCompanyKnowledgeBase(_0x2d3fd8,_0x2d8aae,_0x1c939f){const _0x187044=a159_0x4fe347;if(_0x1c939f!==undefined&&_0x2d3fd8['id']!==_0x1c939f)throw kbError(_0x187044(0x11a),_0x187044(0xfd)+_0x2d3fd8['id']+_0x187044(0x11d)+_0x1c939f+_0x187044(0x133));if(_0x2d3fd8[_0x187044(0x11b)]!==_0x187044(0x126)||_0x2d3fd8['appCode']!==_0x2d8aae)throw kbError('kb_scope_mismatch',_0x187044(0x122)+_0x2d3fd8['id']+_0x187044(0x159)+_0x2d8aae+'.');}export async function fetchAllCompanyKnowledgeBases(_0x2ed29a,_0x609ced){const _0x142240=a159_0x4fe347;let _0x4c94b8=LIST_PAGE_SIZE;const _0x4a50a0=[],_0x373940=new Set();let _0x57f934=0x1,_0x2eb081=0x0,_0x20da83;while(!![]){let _0x5a34df;try{_0x5a34df=await listEnterpriseKnowledgeBases(_0x2ed29a['cookie'],{'currentPage':_0x57f934,'pageSize':_0x4c94b8,'appCode':_0x2ed29a[_0x142240(0x107)],..._0x609ced});}catch(_0x180e59){if(!(_0x180e59 instanceof KbManagementError)||!_0x180e59[_0x142240(0x14b)]||_0x4c94b8===0x1)throw _0x180e59;_0x4c94b8=Math['max'](0x1,Math[_0x142240(0x10f)](_0x4c94b8/0x2)),_0x57f934=0x1,_0x2eb081=0x0,_0x4a50a0[_0x142240(0x160)]=0x0,_0x373940[_0x142240(0x143)]();continue;}const _0x23922c=_0x5a34df['paging']?.['totalCount'];if(!_0x5a34df[_0x142240(0x111)]||_0x5a34df['paging']['pageSize']!==_0x4c94b8||!Number['isSafeInteger'](_0x23922c)||_0x23922c<0x0||_0x5a34df[_0x142240(0xfa)][_0x142240(0x160)]!==Math['min'](_0x4c94b8,Math[_0x142240(0x135)](0x0,_0x23922c-(_0x57f934-0x1)*_0x4c94b8)))throw kbError('kb_list_contract_invalid',_0x142240(0x101));if(_0x5a34df['paging']['currentPage']!==_0x57f934)throw kbError(_0x142240(0x110),_0x142240(0x10d)+_0x5a34df[_0x142240(0x111)][_0x142240(0xff)]+_0x142240(0x14e)+_0x57f934+_0x142240(0x133));if(_0x23922c!==undefined){if(_0x20da83!==undefined&&_0x23922c!==_0x20da83)throw kbError(_0x142240(0x110),_0x142240(0x154)+_0x20da83+_0x142240(0x123)+_0x23922c+'\x20during\x20paging.',_0x142240(0x12c));_0x20da83=_0x23922c;}for(const _0x3c47bc of _0x5a34df[_0x142240(0xfa)]){if(typeof _0x3c47bc['id']!=='string'||!/^0*[1-9][0-9]*$/[_0x142240(0x112)](_0x3c47bc['id'])||_0x373940['has'](_0x3c47bc['id']))throw kbError(_0x142240(0x110),_0x142240(0x12b)+String(_0x3c47bc['id'])+'.');_0x373940[_0x142240(0x137)](_0x3c47bc['id']),_0x3c47bc[_0x142240(0x11b)]===_0x142240(0x126)&&_0x3c47bc[_0x142240(0x107)]===_0x2ed29a[_0x142240(0x107)]&&_0x4a50a0[_0x142240(0x10c)](_0x3c47bc);}_0x2eb081+=_0x5a34df['items']['length'];if(_0x23922c!==undefined&&_0x2eb081>=_0x23922c)break;if(_0x5a34df[_0x142240(0xfa)]['length']<_0x4c94b8){if(_0x23922c!==undefined&&_0x2eb081<_0x23922c)throw kbError('kb_list_contract_invalid',_0x142240(0x14a)+_0x2eb081+_0x142240(0x156)+_0x23922c+_0x142240(0x118));break;}_0x57f934+=0x1;}return _0x4a50a0;}export function findExactCompanyKnowledgeBases(_0x3b8ad3,_0x4bf45c,_0x5ddcc8){const _0x49d817=a159_0x4fe347;return _0x3b8ad3[_0x49d817(0x131)](_0x5a40cb=>_0x5a40cb[_0x49d817(0x11b)]==='company'&&_0x5a40cb[_0x49d817(0x107)]===_0x4bf45c&&_0x5a40cb['title']===_0x5ddcc8);}export async function getKbOrNull(_0x5cdcb4,_0x53c3b4){const _0x2b744d=a159_0x4fe347;try{const _0x3912fd=await getEnterpriseKnowledgeBase(_0x5cdcb4[_0x2b744d(0x116)],_0x53c3b4,_0x5cdcb4['appCode']);return assertCompanyKnowledgeBase(_0x3912fd,_0x5cdcb4['appCode'],_0x53c3b4),_0x3912fd;}catch(_0x3ac1e8){if(getPlatformErrorCode(_0x3ac1e8)===DATA_NOT_EXIST_ERROR_CODE&&getPlatformHttpStatus(_0x3ac1e8)===0x194)return null;throw _0x3ac1e8;}}export async function requireKb(_0x108663,_0x5dc55f){const _0x528b0e=a159_0x4fe347,_0x569a7c=await getKbOrNull(_0x108663,_0x5dc55f);if(!_0x569a7c)throw kbError(_0x528b0e(0x153),_0x528b0e(0x15e)+_0x5dc55f,'Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.');return _0x569a7c;}function a159_0x1245(){const _0xf75f27=['Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','createTime','190272drCmsa','cause','\x20response\x20contains\x20an\x20invalid\x20version.','trim','hex','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','clear','byteSize','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','45476pOOVUq','defineProperty','isFile','Knowledge-base\x20list\x20stopped\x20at\x20','pageTooLarge','30lkSvjr','stringify','\x20while\x20page\x20','The\x20','string','content','decode','kb_not_found','Knowledge-base\x20list\x20total\x20changed\x20from\x20','sha256:','\x20of\x20','kb_','number','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','sha256','Pass\x20--file\x20<knowledge.md>.','18612DuPPLD','\x20response\x20is\x20missing\x20','Company\x20knowledge\x20base\x20not\x20found:\x20','kb_content_invalid','length','items','allowEmpty','2233iuBtBs','Knowledge-base\x20get-one\x20returned\x20id\x20','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','currentPage','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','Knowledge-base\x20list\x20returned\x20an\x20inconsistent\x20page\x20size\x20or\x20record\x20count.','utf8','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','from','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','appCode','version','155480IyOPVy','9OuKaPS','outcome_unknown','push','Knowledge-base\x20list\x20returned\x20page\x20','utf-8','floor','kb_list_contract_invalid','paging','test','byteLength','title','yes','cookie','670340CRQUva','\x20records.','updateTime','kb_response_invalid','scope','indexStatus','\x20while\x20id\x20','kb_id_invalid','bool','kb_file_required','570nCbVYM','Knowledge\x20base\x20','\x20to\x20','dry-run','kb_file_unreadable','company','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','848zLTavl','contentHash','sourceVersion','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','indexedVersion','str','message','7xiPTlQ','filter','306','\x20was\x20requested.','1336758SeaFdI','max','--id\x20must\x20be\x20a\x20positive\x20decimal\x20integer\x20string.','add','\x20is\x20not\x20company-scoped.','kb_confirmation_required',',\x20current\x20'];a159_0x1245=function(){return _0xf75f27;};return a159_0x1245();}export function assertExpectedKbVersion(_0x3969d7,_0x46f28b){const _0x3285c3=a159_0x4fe347;if(_0x46f28b===undefined||_0x3969d7['version']===_0x46f28b)return;throw kbError('kb_state_drift','Knowledge\x20base\x20'+_0x3969d7['id']+'\x20version\x20changed:\x20expected\x20'+_0x46f28b+_0x3285c3(0x13a)+_0x3969d7[_0x3285c3(0x108)]+'.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a160_0x4dc14b=a160_0x28ac;function a160_0x28ac(_0x93fee,_0x2a4d00){_0x93fee=_0x93fee-0x176;const _0x4d371f=a160_0x4d37();let _0x28acb6=_0x4d371f[_0x93fee];return _0x28acb6;}function a160_0x4d37(){const _0x59b9bb=['update','patch','rabetbase\x20kb\x20detail\x20--id\x20','kb_verification_failed','write','appCode','version','1937750iKEYDi','\x20does\x20not\x20prove\x20the\x20requested\x20update\x20state.','file','expected-version','kb_update_empty','snapshotHash','42004euCbgw','700936XfuCLz','trim','--file\x20cannot\x20be\x20empty.','byteSize','--expected-version\x20must\x20be\x20a\x20positive\x20safe\x20integer.','title','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','verified','flag','34088JQnLam','number','343kXRhvm','company','isSafeInteger','11WuFsTH','Update\x20response\x20was\x20unavailable;\x20verified\x20applicable\x20postconditions\x20by\x20exact\x20ID\x20without\x20resubmitting.','before','Company\x20knowledge\x20base\x20','New\x20knowledge-base\x20title','push','string','3909198auKsHv','contentHash','kb_title_invalid','kb_update_outcome_unknown','6NrrJaJ','beforeRecord','expectedVersion','kb_expected_version_invalid','POST','10vmnsLP','content','Pass\x20at\x20least\x20one\x20of\x20--title\x20or\x20--file.','The\x20received\x20update\x20state\x20contradicts\x20the\x20requested\x20changes.','383585nDycqC','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','kb_file_required','\x20--format\x20compress','planned','2776923aTdZON','replacement'];a160_0x4d37=function(){return _0x59b9bb;};return a160_0x4d37();}(function(_0x267786,_0x458bd7){const _0x4797f0=a160_0x28ac,_0x5c7607=_0x267786();while(!![]){try{const _0x30c28a=parseInt(_0x4797f0(0x179))/0x1*(-parseInt(_0x4797f0(0x191))/0x2)+parseInt(_0x4797f0(0x1ab))/0x3*(parseInt(_0x4797f0(0x192))/0x4)+-parseInt(_0x4797f0(0x17d))/0x5+parseInt(_0x4797f0(0x1a7))/0x6+parseInt(_0x4797f0(0x19d))/0x7*(parseInt(_0x4797f0(0x19b))/0x8)+-parseInt(_0x4797f0(0x182))/0x9+parseInt(_0x4797f0(0x18b))/0xa*(-parseInt(_0x4797f0(0x1a0))/0xb);if(_0x30c28a===_0x458bd7)break;else _0x5c7607['push'](_0x5c7607['shift']());}catch(_0x57c215){_0x5c7607['push'](_0x5c7607['shift']());}}}(a160_0x4d37,0x66f63));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{isPlatformTransportFailure,updateEnterpriseKnowledgeBase}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,assertExpectedKbVersion,kbError,projectKb,readKbFile,readKbId,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';function readUpdatePatch(_0x1de8eb){const _0x5f4230=a160_0x28ac,_0x2d268c=readKbId(_0x1de8eb),_0x1bc455=_0x1de8eb[_0x5f4230(0x19a)](_0x5f4230(0x197)),_0xf96be7=_0x1de8eb[_0x5f4230(0x19a)](_0x5f4230(0x18d)),_0x3820c6=_0x1de8eb[_0x5f4230(0x19a)](_0x5f4230(0x18e)),_0x3928e6=_0x1bc455===undefined?undefined:String(_0x1bc455)[_0x5f4230(0x193)]();if(_0x1bc455!==undefined&&!_0x3928e6)throw kbError(_0x5f4230(0x1a9),'--title\x20cannot\x20be\x20empty.');const _0x44f23b=_0xf96be7===undefined?undefined:String(_0xf96be7)[_0x5f4230(0x193)]();if(_0xf96be7!==undefined&&!_0x44f23b)throw kbError(_0x5f4230(0x17f),_0x5f4230(0x194));if(_0x3928e6===undefined&&_0x44f23b===undefined)throw kbError(_0x5f4230(0x18f),'Nothing\x20to\x20update.',_0x5f4230(0x17b));let _0x4a1a4b;if(_0x3820c6!==undefined){_0x4a1a4b=Number(_0x3820c6);if(!Number[_0x5f4230(0x19f)](_0x4a1a4b)||_0x4a1a4b<0x1)throw kbError(_0x5f4230(0x177),_0x5f4230(0x196));}return{'id':_0x2d268c,'title':_0x3928e6,'file':_0x44f23b,'expectedVersion':_0x4a1a4b};}async function prepareUpdate(_0x30f3a9){const _0x2feb83=a160_0x28ac,_0x2994af=readUpdatePatch(_0x30f3a9),_0x59443a=await requireKb(_0x30f3a9,_0x2994af['id']);assertExpectedKbVersion(_0x59443a,_0x2994af[_0x2feb83(0x176)]);const _0x1d9631=_0x2994af[_0x2feb83(0x18d)]?await readKbFile(_0x2994af[_0x2feb83(0x18d)]):undefined,_0xd2c084=projectKb(_0x59443a),_0x4cd481=projectKb({..._0x59443a,..._0x2994af[_0x2feb83(0x197)]!==undefined?{'title':_0x2994af['title']}:{},..._0x1d9631?{'content':_0x1d9631[_0x2feb83(0x17a)]}:{}});return{'patch':_0x2994af,'beforeRecord':_0x59443a,'before':_0xd2c084,'planned':_0x4cd481,'replacement':_0x1d9631};}export const kbUpdate={'service':'kb','command':a160_0x4dc14b(0x184),'description':'Update\x20a\x20company\x20knowledge\x20base\x20with\x20preflight\x20drift\x20protection','risk':a160_0x4dc14b(0x188),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a160_0x4dc14b(0x1a6),'required':!![],'description':'Company\x20knowledge-base\x20id'},{'name':a160_0x4dc14b(0x197),'type':a160_0x4dc14b(0x1a6),'required':![],'description':a160_0x4dc14b(0x1a4)},{'name':'file','type':a160_0x4dc14b(0x1a6),'required':![],'description':'Replacement\x20UTF-8\x20text\x20or\x20Markdown\x20content\x20file'},{'name':a160_0x4dc14b(0x18e),'type':a160_0x4dc14b(0x19c),'required':![],'description':a160_0x4dc14b(0x17e)}],async 'validate'(_0x533254){readUpdatePatch(_0x533254);},async 'dryRun'(_0x442696){const _0x3e85f3=a160_0x4dc14b,_0x4470f3=await prepareUpdate(_0x442696),_0x1136b0=[];return asDryRunResult({'operation':_0x3e85f3(0x184),'selector':{'id':_0x4470f3[_0x3e85f3(0x1a2)]['id'],'scope':_0x3e85f3(0x19e),'appCode':_0x4470f3[_0x3e85f3(0x1a2)][_0x3e85f3(0x189)]},'before':_0x4470f3[_0x3e85f3(0x1a2)],'after':_0x4470f3[_0x3e85f3(0x181)],'dryRun':!![],'backend':{'method':_0x3e85f3(0x178),'path':knowledgeDocumentsPath(_0x3e85f3(0x19e),'update'),'body':{'appCode':_0x442696[_0x3e85f3(0x189)],'id':_0x4470f3['patch']['id'],'expectedVersion':_0x4470f3[_0x3e85f3(0x1ac)][_0x3e85f3(0x18a)],..._0x4470f3['patch'][_0x3e85f3(0x197)]!==undefined?{'title':_0x4470f3[_0x3e85f3(0x185)][_0x3e85f3(0x197)]}:{},..._0x4470f3['replacement']?{'contentHash':_0x4470f3['replacement'][_0x3e85f3(0x1a8)],'contentByteSize':_0x4470f3[_0x3e85f3(0x183)][_0x3e85f3(0x195)]}:{}}},'warnings':_0x1136b0,'verification':{'expectedVersion':_0x4470f3[_0x3e85f3(0x1ac)]['version'],'atomicCompareAndSet':!![],'plannedSnapshotHash':_0x4470f3[_0x3e85f3(0x1a2)][_0x3e85f3(0x190)],'lookupCommand':_0x3e85f3(0x186)+_0x4470f3[_0x3e85f3(0x1a2)]['id']+_0x3e85f3(0x180)}},{'method':_0x3e85f3(0x178),'url':knowledgeDocumentsPath('company',_0x3e85f3(0x184))});},async 'execute'(_0x5956aa){const _0x58e010=a160_0x4dc14b,_0x41eddd=await prepareUpdate(_0x5956aa),_0x419a69={'id':_0x41eddd[_0x58e010(0x185)]['id'],'appCode':_0x5956aa[_0x58e010(0x189)],'expectedVersion':_0x41eddd[_0x58e010(0x1ac)][_0x58e010(0x18a)],..._0x41eddd[_0x58e010(0x185)]['title']!==undefined?{'title':_0x41eddd[_0x58e010(0x185)][_0x58e010(0x197)]}:{},..._0x41eddd['replacement']?{'content':_0x41eddd[_0x58e010(0x183)]['content']}:{}},_0x33de53=_0x41eddd[_0x58e010(0x185)][_0x58e010(0x197)]??_0x41eddd[_0x58e010(0x1ac)][_0x58e010(0x197)],_0x2ed8a9=_0x41eddd[_0x58e010(0x183)]?.['content']??_0x41eddd[_0x58e010(0x1ac)][_0x58e010(0x17a)],_0x4258dd=_0x33de53!==_0x41eddd[_0x58e010(0x1ac)]['title']||_0x2ed8a9!==_0x41eddd[_0x58e010(0x1ac)][_0x58e010(0x17a)],_0x32976c=_0x41eddd[_0x58e010(0x1ac)][_0x58e010(0x18a)]+(_0x4258dd?0x1:0x0);let _0x3822f3,_0x578803=![];try{_0x3822f3=await updateEnterpriseKnowledgeBase(_0x5956aa['cookie'],_0x419a69),assertCompanyKnowledgeBase(_0x3822f3,_0x5956aa[_0x58e010(0x189)],_0x41eddd['patch']['id']);if(_0x3822f3[_0x58e010(0x197)]!==_0x33de53||_0x3822f3['content']!==_0x2ed8a9||_0x3822f3[_0x58e010(0x18a)]!==_0x32976c)throw kbError(_0x58e010(0x187),_0x58e010(0x17c),'Use\x20read-only\x20detail\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.');}catch(_0x3c067a){if(!isPlatformTransportFailure(_0x3c067a))throw _0x3c067a;_0x578803=!![];}const _0x461202=await verifyKbMutationReadback(_0x58e010(0x184),_0x578803,()=>requireKb(_0x5956aa,_0x41eddd[_0x58e010(0x185)]['id'])),_0x16f69f=projectKb(_0x461202),_0x107510=_0x461202['title']===_0x33de53,_0x287756=_0x461202[_0x58e010(0x17a)]===_0x2ed8a9,_0x4bc479=_0x461202[_0x58e010(0x18a)]===_0x32976c&&(!_0x3822f3||_0x461202['id']===_0x3822f3['id']&&_0x461202[_0x58e010(0x18a)]===_0x3822f3[_0x58e010(0x18a)]),_0x5ca219=!_0x578803||_0x41eddd[_0x58e010(0x183)]!==undefined||_0x41eddd[_0x58e010(0x185)][_0x58e010(0x197)]===undefined||_0x41eddd['beforeRecord'][_0x58e010(0x197)]!==_0x41eddd[_0x58e010(0x185)][_0x58e010(0x197)];if(!_0x107510||!_0x287756||!_0x4bc479||!_0x5ca219)throw kbError(_0x578803?_0x58e010(0x1aa):'kb_verification_failed',_0x58e010(0x1a3)+_0x41eddd['patch']['id']+_0x58e010(0x18c),_0x58e010(0x198)+_0x41eddd[_0x58e010(0x185)]['id']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x5a2e69=[];return _0x578803&&_0x5a2e69[_0x58e010(0x1a5)](_0x58e010(0x1a1)),{'ok':!![],'data':{'operation':_0x58e010(0x184),'selector':{'id':_0x16f69f['id'],'scope':_0x58e010(0x19e),'appCode':_0x16f69f[_0x58e010(0x189)]},'before':_0x41eddd[_0x58e010(0x1a2)],'after':_0x16f69f,'dryRun':![],'backend':{'method':_0x58e010(0x178),'path':knowledgeDocumentsPath(_0x58e010(0x19e),_0x58e010(0x184))},'warnings':_0x5a2e69,'verification':{'status':_0x58e010(0x199),'recoveredAfterUnknownResponse':_0x578803,'expectedVersion':_0x41eddd[_0x58e010(0x1ac)][_0x58e010(0x18a)],'atomicCompareAndSet':!![],'lookupCommand':_0x58e010(0x186)+_0x16f69f['id']+'\x20--format\x20compress'}},'message':'Updated\x20company\x20knowledge\x20base\x20'+_0x16f69f['id']};}};
|