@lovrabet/rabetbase-cli 2.5.11-beta.1 → 2.5.11
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.js +1 -1
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/hook-directory.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/cross-db-analysis.js +1 -1
- package/lib/core/cross-db-relation.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/flow-config.js +1 -1
- package/lib/core/instant-api-policy/config.js +1 -1
- package/lib/core/instant-api-policy/endpoints.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/lr-smart-jsx.js +1 -1
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/supported-flags.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/services/dataset-design/checkpoint.js +1 -1
- package/lib/services/dataset-design/commands.js +1 -1
- package/lib/services/dataset-design/contract.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/rabetbase/SKILL.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_0x296531=a147_0x2c7b;(function(_0x266463,_0x6a043a){const _0x593a8e=a147_0x2c7b,_0x54a090=_0x266463();while(!![]){try{const _0xa23d27=parseInt(_0x593a8e(0x153))/0x1*(-parseInt(_0x593a8e(0x171))/0x2)+parseInt(_0x593a8e(0x15e))/0x3+-parseInt(_0x593a8e(0x14d))/0x4+-parseInt(_0x593a8e(0x15f))/0x5+-parseInt(_0x593a8e(0x157))/0x6+-parseInt(_0x593a8e(0x177))/0x7*(-parseInt(_0x593a8e(0x156))/0x8)+parseInt(_0x593a8e(0x178))/0x9;if(_0xa23d27===_0x6a043a)break;else _0x54a090['push'](_0x54a090['shift']());}catch(_0x2566d3){_0x54a090['push'](_0x54a090['shift']());}}}(a147_0x2d84,0xc0af0));import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,readInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';function a147_0x2c7b(_0x138df1,_0x1addc2){_0x138df1=_0x138df1-0x14b;const _0x2d841d=a147_0x2d84();let _0x2c7b88=_0x2d841d[_0x138df1];return _0x2c7b88;}export{INSTANT_API_POLICY_PATHS}from'../../core/instant-api-policy/endpoints.js';export const RUNTIME_CACHE_WARNING=a147_0x296531(0x15c);export const NON_ATOMIC_EXPECTED_REVISION_WARNING='--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.';export const FORCE_FLAG={'name':a147_0x296531(0x16f),'type':a147_0x296531(0x15d),'default':![],'description':a147_0x296531(0x17c)};export const CHANGE_SUMMARY_FLAG={'name':a147_0x296531(0x14b),'type':a147_0x296531(0x16a),'required':![],'description':a147_0x296531(0x173)};export const REVISION_FLAG={'name':a147_0x296531(0x17f),'type':a147_0x296531(0x16b),'required':!![],'description':a147_0x296531(0x152)};export const EXPECTED_REVISION_FLAG={'name':'expected-revision','type':'number','required':![],'description':a147_0x296531(0x180)};export function requireForceConfirmation(_0x2ab23a){const _0x3918f5=a147_0x296531;if(!_0x2ab23a[_0x3918f5(0x166)](_0x3918f5(0x16f))||_0x2ab23a['bool'](_0x3918f5(0x17e)))return;throw instantApiPolicyError(_0x3918f5(0x167),_0x3918f5(0x169),'Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.');}export function readChangeSummary(_0x518794){const _0x3989c0=a147_0x296531,_0xc529e3=_0x518794[_0x3989c0(0x176)](_0x3989c0(0x14b))['trim']();if(!_0xc529e3)return undefined;if(_0xc529e3[_0x3989c0(0x16e)]>0x7d0)throw instantApiPolicyError(_0x3989c0(0x158),_0x3989c0(0x168));return _0xc529e3;}export function readRevision(_0x90ad0f){const _0x5a4d34=a147_0x296531,_0x962a84=_0x90ad0f['num'](_0x5a4d34(0x17f),Number[_0x5a4d34(0x170)]);if(!Number[_0x5a4d34(0x181)](_0x962a84)||_0x962a84<=0x0)throw instantApiPolicyError(_0x5a4d34(0x15b),_0x5a4d34(0x14f));return _0x962a84;}function a147_0x2d84(){const _0x32ffbf=['31748OCawGH','gmtCreate','Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)','policyId','updateUserId','str','14nKGsMz','28245141SgqENN','defaults','The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.','instant_api_policy_revision_mismatch','Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes','changeSummary','yes','revision','Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured','isSafeInteger','change-summary','--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','5072628LzooVE','num','--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.','version','createUserId','Positive\x20published\x20policy\x20revision','41MhyedF','configHash',';\x20current\x20revision\x20is\x20','3227896QjBwNa','6965844xOVTKp','instant_api_policy_change_summary_invalid','rabetbase\x20instant-api-policy\x20current\x20--format\x20compress','config','instant_api_policy_revision_invalid','Runtime\x20instances\x20may\x20take\x20up\x20to\x2030\x20seconds\x20to\x20observe\x20the\x20new\x20active\x20policy.','boolean','609693XeZpZj','1396785oHIgsN','.\x20Run\x20current\x20and\x20review\x20before\x20retrying.','flag','instant_api_policy_expected_revision_invalid','changeType','instantApi','rules','bool','instant_api_policy_force_confirmation_required','--change-summary\x20cannot\x20exceed\x202000\x20characters.','--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.','string','number','expected-revision','appCode','length','force','NaN'];a147_0x2d84=function(){return _0x32ffbf;};return a147_0x2d84();}export function readExpectedRevision(_0x17009e){const _0x2876b5=a147_0x296531;if(_0x17009e[_0x2876b5(0x161)](_0x2876b5(0x16c))===undefined)return undefined;const _0x404d8b=_0x17009e[_0x2876b5(0x14e)]('expected-revision',Number[_0x2876b5(0x170)]);if(!Number['isSafeInteger'](_0x404d8b)||_0x404d8b<0x0)throw instantApiPolicyError(_0x2876b5(0x162),_0x2876b5(0x14c));return _0x404d8b;}export function assertExpectedRevision(_0x1ad87e,_0x27701a){const _0x5ccc2f=a147_0x296531;if(_0x27701a===undefined)return;const _0x39ff5a=_0x1ad87e?.[_0x5ccc2f(0x17f)]??0x0;if(_0x39ff5a!==_0x27701a)throw instantApiPolicyError(_0x5ccc2f(0x17b),_0x5ccc2f(0x17a),'Expected\x20revision\x20'+_0x27701a+_0x5ccc2f(0x155)+_0x39ff5a+_0x5ccc2f(0x160));}export async function readFixedPolicy(_0x1805ae){const _0x5076ea=a147_0x296531,_0x1d43f2=loadInstantApiPolicyLocalConfig(_0x1805ae[_0x5076ea(0x16d)]),_0xc83614=await readInstantApiPolicyConfigFile(_0x1d43f2);return{'local':_0x1d43f2,'config':_0xc83614};}export function projectCurrentPolicy(_0x32f098){const _0x4bb710=a147_0x296531;if(!_0x32f098)return null;return{'id':_0x32f098['id'],'appCode':_0x32f098['appCode'],'revision':_0x32f098[_0x4bb710(0x17f)],'configHash':_0x32f098[_0x4bb710(0x154)],'enabled':_0x32f098['enabled'],'config':_0x32f098['config'],'createUserId':_0x32f098[_0x4bb710(0x151)]??null,'updateUserId':_0x32f098[_0x4bb710(0x175)]??null,'gmtCreate':_0x32f098[_0x4bb710(0x172)]??null,'gmtModified':_0x32f098['gmtModified']??null};}export function projectRevisionSummary(_0x4e91b8){const _0x1963f6=a147_0x296531;return{'id':_0x4e91b8['id'],'policyId':_0x4e91b8[_0x1963f6(0x174)],'appCode':_0x4e91b8['appCode'],'revision':_0x4e91b8['revision'],'configHash':_0x4e91b8[_0x1963f6(0x154)],'changeType':_0x4e91b8[_0x1963f6(0x163)],'changeSummary':_0x4e91b8[_0x1963f6(0x17d)]??null,'operatorId':_0x4e91b8['operatorId']??null,'gmtCreate':_0x4e91b8[_0x1963f6(0x172)]??null,'version':_0x4e91b8['config'][_0x1963f6(0x150)],'defaultAction':_0x4e91b8[_0x1963f6(0x15a)][_0x1963f6(0x179)][_0x1963f6(0x164)],'ruleCount':_0x4e91b8[_0x1963f6(0x15a)][_0x1963f6(0x165)]?.[_0x1963f6(0x16e)]??0x0};}export function projectRevisionDetail(_0x4b740f){const _0x507f1d=a147_0x296531;return{...projectRevisionSummary(_0x4b740f),'config':_0x4b740f[_0x507f1d(0x15a)]};}export function expectedRevisionWarnings(_0x1644d4){return _0x1644d4===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){const _0x34e3a6=a147_0x296531;return _0x34e3a6(0x159);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a148_0x26f68d=a148_0x5000;(function(_0x2160da,_0x4c6942){const _0x19ed83=a148_0x5000,_0x13fc2c=_0x2160da();while(!![]){try{const _0x31fdc5=parseInt(_0x19ed83(0x153))/0x1+-parseInt(_0x19ed83(0x161))/0x2+-parseInt(_0x19ed83(0x151))/0x3+parseInt(_0x19ed83(0x15d))/0x4*(-parseInt(_0x19ed83(0x14f))/0x5)+parseInt(_0x19ed83(0x15b))/0x6+-parseInt(_0x19ed83(0x155))/0x7+parseInt(_0x19ed83(0x157))/0x8;if(_0x31fdc5===_0x4c6942)break;else _0x13fc2c['push'](_0x13fc2c['shift']());}catch(_0x3b4743){_0x13fc2c['push'](_0x13fc2c['shift']());}}}(a148_0x233b,0x2265b));function a148_0x233b(){const _0xcac4e2=['policyFilePath','56ILHhVU','policyRelativePath','Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','normalizedConfig','471448WlfgvS','Validated\x20Instant\x20API\x20policy\x20for\x20','82960vJgRuP','appCode','754239aEYhzw','configHash','91932yrHUMm','read','331114oFWEJA','valid','5641352biwHVm','validate','instant-api-policy','POST','663102oCmNWz'];a148_0x233b=function(){return _0xcac4e2;};return a148_0x233b();}import{validateInstantApiPolicy}from'../../core/api-client.js';function a148_0x5000(_0x4321aa,_0x18fe46){_0x4321aa=_0x4321aa-0x14f;const _0x233bfa=a148_0x233b();let _0x500009=_0x233bfa[_0x4321aa];return _0x500009;}import{INSTANT_API_POLICY_PATHS,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyValidate={'service':a148_0x26f68d(0x159),'command':a148_0x26f68d(0x158),'description':a148_0x26f68d(0x15f),'risk':a148_0x26f68d(0x154),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x3ac7af){const _0x696b2b=a148_0x26f68d,{local:_0x41e88d,config:_0x366a31}=await readFixedPolicy(_0x3ac7af),_0x3b0ee5=await validateInstantApiPolicy({'appCode':_0x3ac7af[_0x696b2b(0x150)],'config':_0x366a31});return{'ok':!![],'data':{'operation':'validate','selector':{'appCode':_0x3ac7af[_0x696b2b(0x150)]},'filePath':_0x41e88d[_0x696b2b(0x15c)],'relativePath':_0x41e88d[_0x696b2b(0x15e)],'valid':_0x3b0ee5[_0x696b2b(0x156)],'configHash':_0x3b0ee5[_0x696b2b(0x152)],'normalizedConfig':_0x3b0ee5[_0x696b2b(0x160)],'backend':{'method':_0x696b2b(0x15a),'path':INSTANT_API_POLICY_PATHS[_0x696b2b(0x158)]}},'message':_0x696b2b(0x162)+_0x3ac7af[_0x696b2b(0x150)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6a30a8,_0x59eb0a){const _0x55f91e=a149_0x5adc,_0x50634b=_0x6a30a8();while(!![]){try{const _0x350322=parseInt(_0x55f91e(0x13e))/0x1+-parseInt(_0x55f91e(0x140))/0x2*(parseInt(_0x55f91e(0x141))/0x3)+-parseInt(_0x55f91e(0x146))/0x4+parseInt(_0x55f91e(0x13f))/0x5*(-parseInt(_0x55f91e(0x13c))/0x6)+parseInt(_0x55f91e(0x145))/0x7+parseInt(_0x55f91e(0x137))/0x8*(-parseInt(_0x55f91e(0x144))/0x9)+parseInt(_0x55f91e(0x13a))/0xa;if(_0x350322===_0x59eb0a)break;else _0x50634b['push'](_0x50634b['shift']());}catch(_0x3be2e5){_0x50634b['push'](_0x50634b['shift']());}}}(a149_0x5e31,0x7205a));import{platform,release,arch}from'node:os';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{getConfigAppCode}from'../../utils/config.js';function a149_0x5e31(){const _0x1ed9f5=['tenant_code','tenant','24vVihBR','username','nickname','21163200BaLmVf','appCode','6puSYML','unknown','441128UZUGND','1196705Jgvrvv','4qhlrwx','995184MggmlB','mergedCli','email','2550906ZqpVDD','3280214iBPwtr','3223668zQMWiJ','cookie'];a149_0x5e31=function(){return _0x1ed9f5;};return a149_0x5e31();}function a149_0x5adc(_0x4d28a9,_0x54e6dd){_0x4d28a9=_0x4d28a9-0x134;const _0x5e31b3=a149_0x5e31();let _0x5adc94=_0x5e31b3[_0x4d28a9];return _0x5adc94;}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(_0x1f6950,_0x239d5f){const _0x1de6dc=a149_0x5adc,_0x5191a9=_0x239d5f?undefined:(await getSessionUserInfo(_0x1f6950[_0x1de6dc(0x134)]))?.['user'];return{'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x1de6dc(0x13d)?VERSION+'+'+GIT_COMMIT:VERSION,'environment':getEnv(),'appCode':_0x1f6950['appCode']||_0x1f6950[_0x1de6dc(0x142)]?.[_0x1de6dc(0x13b)]||getConfigAppCode(),'os':platform()+'\x20'+release()+'\x20'+arch(),'terminal':process.env.TERM,'user':_0x5191a9?{'id':_0x5191a9['id'],'username':_0x5191a9[_0x1de6dc(0x138)],'nickname':_0x5191a9[_0x1de6dc(0x139)],'email':_0x5191a9[_0x1de6dc(0x143)],'tenantCode':_0x5191a9[_0x1de6dc(0x136)]?.[_0x1de6dc(0x135)]}:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a150_0x37b8(){const _0x5881b9=['111723eztisV','424786KtysYQ','56epFDjr','943012ooVLNT','9uErhiA','105819QDmsdG','163422FcqsWm','1aacKyw','1221420wlOzqd','1689260tmGDqc'];a150_0x37b8=function(){return _0x5881b9;};return a150_0x37b8();}function a150_0x9f11(_0x27797b,_0xb4ee44){_0x27797b=_0x27797b-0x1e7;const _0x37b884=a150_0x37b8();let _0x9f115=_0x37b884[_0x27797b];return _0x9f115;}(function(_0x45f0cc,_0x463bdb){const _0x17f8de=a150_0x9f11,_0x4df74c=_0x45f0cc();while(!![]){try{const _0x145af8=parseInt(_0x17f8de(0x1f0))/0x1*(-parseInt(_0x17f8de(0x1ea))/0x2)+parseInt(_0x17f8de(0x1e9))/0x3+-parseInt(_0x17f8de(0x1ec))/0x4+parseInt(_0x17f8de(0x1e7))/0x5+parseInt(_0x17f8de(0x1ef))/0x6+parseInt(_0x17f8de(0x1ee))/0x7*(parseInt(_0x17f8de(0x1eb))/0x8)+parseInt(_0x17f8de(0x1ed))/0x9*(parseInt(_0x17f8de(0x1e8))/0xa);if(_0x145af8===_0x463bdb)break;else _0x4df74c['push'](_0x4df74c['shift']());}catch(_0x3eaca5){_0x4df74c['push'](_0x4df74c['shift']());}}}(a150_0x37b8,0x210c1));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a151_0x4aa0ae=a151_0x24ad;(function(_0x221d8e,_0x441a23){const _0x1a91b7=a151_0x24ad,_0x8b48fd=_0x221d8e();while(!![]){try{const _0x2c1fab=-parseInt(_0x1a91b7(0x160))/0x1+parseInt(_0x1a91b7(0x166))/0x2+parseInt(_0x1a91b7(0x14d))/0x3+parseInt(_0x1a91b7(0x15a))/0x4*(parseInt(_0x1a91b7(0x154))/0x5)+-parseInt(_0x1a91b7(0x156))/0x6+parseInt(_0x1a91b7(0x153))/0x7+-parseInt(_0x1a91b7(0x164))/0x8;if(_0x2c1fab===_0x441a23)break;else _0x8b48fd['push'](_0x8b48fd['shift']());}catch(_0x5a7238){_0x8b48fd['push'](_0x8b48fd['shift']());}}}(a151_0x24a6,0xdf2c0));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a151_0x4aa0ae(0x14e);function a151_0x24a6(){const _0x33bfca=['network_error','309684Lwqmai','unknown_command','stderr','\x20\x20\x20\x20--title\x20\x22','2339396pVwItt','cancelled','replace','service','not_in_project','=1\x20to\x20silence\x20this\x20hint.','1119708Gxyfxn','flag_missing','code','issue','4464208nZqVea','Hit\x20a\x20','1263524KIntam','trim','\x22\x20\x5c','slice','command','3212460qUZRYM','RABETBASE_DISABLE_ISSUE_NUDGE','write','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','message','validation_error','2492203vmgkkp','5tgZzQS'];a151_0x24a6=function(){return _0x33bfca;};return a151_0x24a6();}const NUDGE_SUPPRESSED_CODES=new Set([a151_0x4aa0ae(0x15b),'auth_required','config_missing',a151_0x4aa0ae(0x15e),a151_0x4aa0ae(0x157),a151_0x4aa0ae(0x161),a151_0x4aa0ae(0x152),a151_0x4aa0ae(0x155)]),defaultWriter=_0x552293=>{const _0x9a74be=a151_0x4aa0ae;process[_0x9a74be(0x158)][_0x9a74be(0x14f)](_0x552293);};export function shouldNudgeForError(_0x2b257f,_0x54ef62){const _0x834329=a151_0x4aa0ae;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x54ef62['service']===_0x834329(0x163)&&_0x54ef62['command']==='report')return![];if(_0x2b257f instanceof CliError)return!NUDGE_SUPPRESSED_CODES['has'](_0x2b257f[_0x834329(0x162)]);return!![];}function a151_0x24ad(_0x51aed4,_0x20b21b){_0x51aed4=_0x51aed4-0x14c;const _0x24a681=a151_0x24a6();let _0x24ad4e=_0x24a681[_0x51aed4];return _0x24ad4e;}export function printIssueReportNudgeForError(_0xe302eb,_0x258152,_0x61c6e0=defaultWriter){if(!shouldNudgeForError(_0xe302eb,_0x258152))return;const _0x3c82ac=buildSuggestedTitle(_0xe302eb,_0x258152);_0x61c6e0(formatNudge(_0x3c82ac));}function buildSuggestedTitle(_0x5b37f3,_0x4107cc){const _0x35d3d6=a151_0x4aa0ae,_0x47da00=_0x5b37f3 instanceof Error?_0x5b37f3[_0x35d3d6(0x151)]:String(_0x5b37f3),_0x201ec7=_0x47da00[_0x35d3d6(0x15c)](/[\r\n]+/g,'\x20')[_0x35d3d6(0x15c)](/\s+/g,'\x20')[_0x35d3d6(0x167)]()[_0x35d3d6(0x169)](0x0,0x78)['replace'](/"/g,'\x5c\x22'),_0xaba16c=CLI_BIN_NAME+'\x20'+_0x4107cc[_0x35d3d6(0x15d)]+'\x20'+_0x4107cc[_0x35d3d6(0x14c)];return _0x201ec7['length']>0x0?_0xaba16c+':\x20'+_0x201ec7:_0xaba16c;}function formatNudge(_0x26ecd4){const _0x4e492b=a151_0x4aa0ae;return['',_0x4e492b(0x165)+CLI_BIN_NAME+'\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0x4e492b(0x159)+_0x26ecd4+_0x4e492b(0x168),_0x4e492b(0x150),'\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+_0x4e492b(0x15f),'']['join']('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a152_0x397fd7=a152_0x512d;(function(_0x8561d3,_0x43c530){const _0xbd1d58=a152_0x512d,_0x37cd45=_0x8561d3();while(!![]){try{const _0x3d68db=parseInt(_0xbd1d58(0x1a5))/0x1+-parseInt(_0xbd1d58(0x19d))/0x2+-parseInt(_0xbd1d58(0x1af))/0x3+-parseInt(_0xbd1d58(0x1c0))/0x4*(parseInt(_0xbd1d58(0x1cb))/0x5)+-parseInt(_0xbd1d58(0x19e))/0x6*(parseInt(_0xbd1d58(0x1b8))/0x7)+-parseInt(_0xbd1d58(0x1b5))/0x8*(parseInt(_0xbd1d58(0x1a2))/0x9)+parseInt(_0xbd1d58(0x1d1))/0xa;if(_0x3d68db===_0x43c530)break;else _0x37cd45['push'](_0x37cd45['shift']());}catch(_0x361172){_0x37cd45['push'](_0x37cd45['shift']());}}}(a152_0xf8cf,0x3a28e));function a152_0xf8cf(){const _0xde46fc=['104rqHoXw','string','cwd','traceName','trim','str','descriptionFile:\x20','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','descriptionSource','apiError','descriptionSource:\x20','6965RZElQG','validate','read','description','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','description-file','7183110TbpNkw','keys','sanitize','464340LDOLRj','6vjIgkm','Submit\x20a\x20problem\x20log','truncated:\x20original\x20','logData','801dyIXai','inline','message','370174xfbukl','descriptionFilePath','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','redactionCount','Failed\x20to\x20submit\x20issue\x20log:\x20','utf8','redactions:\x20','validation','spanName','Cannot\x20read\x20issue\x20description\x20file:\x20','722649BfWNyq','Issue\x20log\x20submitted\x20(content\x20redacted\x20or\x20truncated)','truncated','redactionKinds','Report\x20a\x20problem\x20log\x20with\x20title\x20and\x20markdown\x20context','otel://','27784ynTJGJ','file','length','223265zYsAkv','File\x20not\x20found:\x20','One-line\x20issue\x20summary','issue','POST','title','join','filter'];a152_0xf8cf=function(){return _0xde46fc;};return a152_0xf8cf();}import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a152_0x512d(_0x31d599,_0x1b7a5a){_0x31d599=_0x31d599-0x19b;const _0xf8cfa8=a152_0xf8cf();let _0x512d47=_0xf8cfa8[_0x31d599];return _0x512d47;}import{CliErrors}from'../../errors.js';import{reportIssue}from'@lovrabet/cli-framework';import{getIssueReportContext}from'./context.js';const DESCRIPTION_FILE_FLAG=a152_0x397fd7(0x1d0);export const issueReport={'service':a152_0x397fd7(0x1bb),'command':'report','description':a152_0x397fd7(0x1b3),'risk':a152_0x397fd7(0x1cd),'confirmationDescription':'Submit\x20the\x20issue\x20description\x20and\x20diagnostic\x20context\x20as\x20a\x20problem\x20log.','requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':'compress','flags':[{'name':a152_0x397fd7(0x1bd),'type':a152_0x397fd7(0x1c1),'required':!![],'description':a152_0x397fd7(0x1ba)},{'name':a152_0x397fd7(0x1ce),'type':a152_0x397fd7(0x1c1),'description':a152_0x397fd7(0x1c7)},{'name':DESCRIPTION_FILE_FLAG,'type':a152_0x397fd7(0x1c1),'description':a152_0x397fd7(0x1cf)}],async 'validate'(_0x57b35b){const _0x523359=a152_0x397fd7,_0x1b9684=_0x57b35b[_0x523359(0x1c5)]('title')['trim'](),_0x12c3b6=_0x57b35b[_0x523359(0x1c5)](_0x523359(0x1ce))[_0x523359(0x1c4)](),_0x20414=_0x57b35b[_0x523359(0x1c5)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x1b9684)throw CliErrors['flagMissing'](_0x523359(0x1bd),'Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.');const _0x162662=_0x12c3b6['length']>0x0,_0x51355f=_0x20414[_0x523359(0x1b7)]>0x0;if(_0x162662===_0x51355f)throw CliErrors[_0x523359(0x1ac)](_0x523359(0x1a7),'Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x51355f){const _0x11cf46=resolve(process['cwd'](),_0x20414);if(!existsSync(_0x11cf46))throw CliErrors[_0x523359(0x1ac)](_0x523359(0x1b9)+_0x11cf46);}},async 'dryRun'(_0x4cf621){const _0x329b71=a152_0x397fd7,_0x592e81=await prepareIssueReport(_0x4cf621,!![]);return{'method':_0x329b71(0x1bc),'url':_0x329b71(0x1b4)+_0x592e81[_0x329b71(0x1c3)]+'/'+_0x592e81[_0x329b71(0x1ad)],'body':{'traceName':_0x592e81['traceName'],'spanName':_0x592e81[_0x329b71(0x1ad)],'logData':_0x592e81[_0x329b71(0x1a1)]},'description':[_0x329b71(0x19f),_0x329b71(0x1ca)+_0x592e81['descriptionSource'],_0x592e81[_0x329b71(0x1a6)]?_0x329b71(0x1c6)+_0x592e81[_0x329b71(0x1a6)]:null,_0x592e81[_0x329b71(0x19c)][_0x329b71(0x1b1)]?_0x329b71(0x1a0)+_0x592e81[_0x329b71(0x19c)]['originalBytes']+'\x20bytes':null,_0x592e81[_0x329b71(0x19c)][_0x329b71(0x1a8)]>0x0?_0x329b71(0x1ab)+_0x592e81[_0x329b71(0x19c)][_0x329b71(0x1a8)]+'\x20('+_0x592e81[_0x329b71(0x19c)][_0x329b71(0x1b2)][_0x329b71(0x1be)](',\x20')+')':null][_0x329b71(0x1bf)](Boolean)['join']('\x0a')};},async 'execute'(_0x43143d){const _0x2c3cee=a152_0x397fd7,_0x29bb2b=await prepareIssueReport(_0x43143d,![]);return{'ok':!![],'message':_0x29bb2b[_0x2c3cee(0x19c)][_0x2c3cee(0x1a8)]||_0x29bb2b['sanitize']['truncated']?_0x2c3cee(0x1b0):'Issue\x20log\x20submitted','data':{'traceName':_0x29bb2b[_0x2c3cee(0x1c3)],'spanName':_0x29bb2b[_0x2c3cee(0x1ad)],'logDataKeys':Object[_0x2c3cee(0x19b)](_0x29bb2b[_0x2c3cee(0x1a1)]),'issue':{'title':_0x29bb2b[_0x2c3cee(0x1bd)],'descriptionLength':_0x29bb2b['description'][_0x2c3cee(0x1b7)],'descriptionSource':_0x29bb2b[_0x2c3cee(0x1c8)],..._0x29bb2b[_0x2c3cee(0x1a6)]?{'descriptionFile':_0x29bb2b['descriptionFilePath']}:{},'sanitize':{'originalBytes':_0x29bb2b[_0x2c3cee(0x19c)]['originalBytes'],'truncated':_0x29bb2b[_0x2c3cee(0x19c)][_0x2c3cee(0x1b1)],'redactions':_0x29bb2b[_0x2c3cee(0x19c)]['redactionCount'],'redactionKinds':_0x29bb2b[_0x2c3cee(0x19c)][_0x2c3cee(0x1b2)]}}}};}};async function prepareIssueReport(_0x970fd6,_0x193221){const _0x62797c=a152_0x397fd7;await issueReport[_0x62797c(0x1cc)](_0x970fd6);const _0x4d7889=_0x970fd6[_0x62797c(0x1c5)](DESCRIPTION_FILE_FLAG)['trim'](),_0x1cd20b=_0x4d7889?resolve(process[_0x62797c(0x1c2)](),_0x4d7889):undefined;let _0x1b88d3=_0x970fd6[_0x62797c(0x1c5)](_0x62797c(0x1ce));if(_0x1cd20b)try{_0x1b88d3=await readFile(_0x1cd20b,_0x62797c(0x1aa));}catch{throw CliErrors[_0x62797c(0x1ac)](_0x62797c(0x1ae)+_0x1cd20b);}if(!_0x1b88d3[_0x62797c(0x1c4)]())throw CliErrors[_0x62797c(0x1ac)]('Issue\x20description\x20cannot\x20be\x20empty.');const _0x449384=await getIssueReportContext(_0x970fd6,_0x193221);try{const _0x44e6f8=await reportIssue({'title':_0x970fd6['str'](_0x62797c(0x1bd)),'description':_0x1b88d3,'context':_0x449384,'dryRun':_0x193221,'redactDescription':process.env.RABETBASE_ISSUE_RAW_DESCRIPTION!=='1'});return{..._0x44e6f8,'descriptionSource':_0x1cd20b?_0x62797c(0x1b6):_0x62797c(0x1a3),'descriptionFilePath':_0x1cd20b};}catch(_0x1abc8c){throw CliErrors[_0x62797c(0x1c9)](_0x62797c(0x1a9)+(_0x1abc8c instanceof Error?_0x1abc8c[_0x62797c(0x1a4)]:String(_0x1abc8c)),'Check\x20your\x20login\x20and\x20network\x20connectivity.');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a153_0x37dc(){const _0x167cf6=['1928PlCHUw','string','version','str','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','verified','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','contentHash','11PgeSLK','--title\x20is\x20required.','7042524Ixgfji','length','kb_verification_failed','399020AxivBT','\x20for\x20','cookie','338471EDOBQP','9ccADPG','kb_title_required','2536032LfEkJH','rabetbase\x20kb\x20detail\x20--id\x20','appCode','\x20with\x20title\x20','write','The\x20created\x20document\x20version\x20changed\x20after\x20its\x20write\x20response.\x20Inspect\x20it\x20without\x20resubmitting.','120AZkekw','rabetbase\x20kb\x20list\x20--title\x20','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','content','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','title','company','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','Company\x20knowledge\x20base\x20','\x20--format\x20compress','kb_file_required','280290meCyxu','create','786xKOCTy','15302DXceqf','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','2zcQKBF','byteSize','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','POST'];a153_0x37dc=function(){return _0x167cf6;};return a153_0x37dc();}const a153_0x1b0f49=a153_0x5a39;(function(_0x439cb8,_0x2d16b1){const _0x5eb7ab=a153_0x5a39,_0x544881=_0x439cb8();while(!![]){try{const _0x2de247=-parseInt(_0x5eb7ab(0x143))/0x1*(-parseInt(_0x5eb7ab(0x15d))/0x2)+-parseInt(_0x5eb7ab(0x14c))/0x3*(-parseInt(_0x5eb7ab(0x161))/0x4)+-parseInt(_0x5eb7ab(0x140))/0x5+parseInt(_0x5eb7ab(0x15a))/0x6*(parseInt(_0x5eb7ab(0x15b))/0x7)+parseInt(_0x5eb7ab(0x146))/0x8+-parseInt(_0x5eb7ab(0x144))/0x9*(-parseInt(_0x5eb7ab(0x158))/0xa)+parseInt(_0x5eb7ab(0x13b))/0xb*(-parseInt(_0x5eb7ab(0x13d))/0xc);if(_0x2de247===_0x2d16b1)break;else _0x544881['push'](_0x544881['shift']());}catch(_0x1904b5){_0x544881['push'](_0x544881['shift']());}}}(a153_0x37dc,0x4eba5));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a153_0x5a39(_0x108761,_0x29f318){_0x108761=_0x108761-0x135;const _0x37dc01=a153_0x37dc();let _0x5a39c2=_0x37dc01[_0x108761];return _0x5a39c2;}import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';function readCreateInput(_0x4e20a8){const _0x597b0c=a153_0x5a39,_0x325f95=_0x4e20a8[_0x597b0c(0x136)](_0x597b0c(0x152))['trim']();if(!_0x325f95)throw kbError(_0x597b0c(0x145),_0x597b0c(0x13c));const _0x3dc56f=_0x4e20a8[_0x597b0c(0x136)]('file')['trim']();if(!_0x3dc56f)throw kbError(_0x597b0c(0x157),'--file\x20is\x20required.',_0x597b0c(0x15c));return{'title':_0x325f95,'file':_0x3dc56f};}async function prepareCreate(_0x31e7b2){const _0x4be2e3=a153_0x5a39,_0x1c4706=readCreateInput(_0x31e7b2),_0x55f6d3=await readKbFile(_0x1c4706['file']),_0x5f1e36=await fetchAllCompanyKnowledgeBases(_0x31e7b2,{'title':_0x1c4706['title']}),_0x16ee43=findExactCompanyKnowledgeBases(_0x5f1e36,_0x31e7b2[_0x4be2e3(0x148)],_0x1c4706[_0x4be2e3(0x152)]);if(_0x16ee43['length']>0x0)throw kbError('kb_already_exists','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'+_0x31e7b2[_0x4be2e3(0x148)]+_0x4be2e3(0x149)+_0x1c4706['title']+'.','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x16ee43[0x0]['id']+'\x20--format\x20compress`\x20before\x20choosing\x20update.');return{..._0x1c4706,'content':_0x55f6d3};}function plannedAfter(_0x364289,_0xc26de7){const _0x1f7b85=a153_0x5a39;return{'scope':_0x1f7b85(0x153),'appCode':_0x364289[_0x1f7b85(0x148)],'title':_0xc26de7[_0x1f7b85(0x152)],'contentByteSize':_0xc26de7[_0x1f7b85(0x150)][_0x1f7b85(0x15e)],'contentHash':_0xc26de7[_0x1f7b85(0x150)][_0x1f7b85(0x13a)]};}function verifyCreatedState(_0x5cfbfa,_0xac1a7a,_0x5b23b8){const _0x45d90f=a153_0x5a39;assertCompanyKnowledgeBase(_0x5b23b8,_0x5cfbfa[_0x45d90f(0x148)],_0x5b23b8['id']);const _0x4f3a90=inspectKbContent(_0x5b23b8[_0x45d90f(0x150)]);if(_0x5b23b8[_0x45d90f(0x152)]!==_0xac1a7a[_0x45d90f(0x152)]||_0x4f3a90[_0x45d90f(0x13a)]!==_0xac1a7a[_0x45d90f(0x150)][_0x45d90f(0x13a)])throw kbError(_0x45d90f(0x13f),_0x45d90f(0x155)+_0x5b23b8['id']+_0x45d90f(0x137),_0x45d90f(0x151)+_0x5b23b8['id']+_0x45d90f(0x139));return projectKb(_0x5b23b8);}export const kbCreate={'service':'kb','command':a153_0x1b0f49(0x159),'description':a153_0x1b0f49(0x14f),'risk':a153_0x1b0f49(0x14a),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a153_0x1b0f49(0x152),'type':a153_0x1b0f49(0x162),'required':!![],'description':'Knowledge-base\x20title'},{'name':'file','type':a153_0x1b0f49(0x162),'required':!![],'description':'UTF-8\x20text\x20or\x20Markdown\x20content\x20file'}],async 'validate'(_0x531053){readCreateInput(_0x531053);},async 'dryRun'(_0x2d8f07){const _0x1bc986=a153_0x1b0f49,_0x21955d=await prepareCreate(_0x2d8f07);return asDryRunResult({'operation':_0x1bc986(0x159),'selector':{'scope':'company','appCode':_0x2d8f07[_0x1bc986(0x148)],'title':_0x21955d[_0x1bc986(0x152)]},'before':null,'after':plannedAfter(_0x2d8f07,_0x21955d),'dryRun':!![],'backend':{'method':_0x1bc986(0x160),'path':knowledgeDocumentsPath('company','create'),'body':{'appCode':_0x2d8f07[_0x1bc986(0x148)],'title':_0x21955d[_0x1bc986(0x152)],'contentHash':_0x21955d[_0x1bc986(0x150)][_0x1bc986(0x13a)],'contentByteSize':_0x21955d['content'][_0x1bc986(0x15e)]}},'warnings':[],'verification':{'lookupCommand':_0x1bc986(0x14d)+JSON['stringify'](_0x21955d['title'])+'\x20--format\x20compress'}},{'method':_0x1bc986(0x160),'url':knowledgeDocumentsPath('company',_0x1bc986(0x159))});},async 'execute'(_0x357946){const _0x50a315=a153_0x1b0f49,_0x1f7559=await prepareCreate(_0x357946);let _0x248443,_0x13f005,_0x4a779f=![];try{const _0x5f3d3a=await createEnterpriseKnowledgeBase(_0x357946[_0x50a315(0x142)],{'appCode':_0x357946['appCode'],'title':_0x1f7559['title'],'content':_0x1f7559['content'][_0x50a315(0x150)]});assertCompanyKnowledgeBase(_0x5f3d3a,_0x357946[_0x50a315(0x148)],_0x5f3d3a['id']),_0x248443=_0x5f3d3a['id'],_0x13f005=_0x5f3d3a[_0x50a315(0x135)];}catch(_0x5984fe){if(!isPlatformTransportFailure(_0x5984fe))throw _0x5984fe;_0x4a779f=!![];}if(_0x248443===undefined){const _0xeb35b1=await verifyKbMutationReadback(_0x50a315(0x159),!![],()=>fetchAllCompanyKnowledgeBases(_0x357946,{'title':_0x1f7559[_0x50a315(0x152)]})),_0x56b1f4=findExactCompanyKnowledgeBases(_0xeb35b1,_0x357946[_0x50a315(0x148)],_0x1f7559[_0x50a315(0x152)]);if(_0x56b1f4[_0x50a315(0x13e)]!==0x1)throw kbError('kb_create_outcome_unknown',_0x50a315(0x15f)+_0x56b1f4['length']+'.',_0x50a315(0x154));_0x248443=_0x56b1f4[0x0]['id'];}const _0x36aa68=await verifyKbMutationReadback(_0x50a315(0x159),_0x4a779f,()=>requireKb(_0x357946,_0x248443));if(_0x13f005!==undefined&&_0x36aa68[_0x50a315(0x135)]!==_0x13f005)throw kbError(_0x50a315(0x13f),_0x50a315(0x14b));const _0x469af9=verifyCreatedState(_0x357946,_0x1f7559,_0x36aa68),_0x277ab7=_0x4a779f?[_0x50a315(0x14e)]:[];return{'ok':!![],'data':{'operation':'create','selector':{'id':_0x469af9['id'],'scope':_0x50a315(0x153),'appCode':_0x469af9[_0x50a315(0x148)]},'before':null,'after':_0x469af9,'dryRun':![],'backend':{'method':_0x50a315(0x160),'path':knowledgeDocumentsPath(_0x50a315(0x153),_0x50a315(0x159))},'warnings':_0x277ab7,'verification':{'status':_0x50a315(0x138),'recoveredAfterUnknownResponse':_0x4a779f,'lookupCommand':_0x50a315(0x147)+_0x469af9['id']+_0x50a315(0x156)}},'message':'Created\x20company\x20knowledge\x20base\x20'+_0x469af9['id']+_0x50a315(0x141)+_0x469af9[_0x50a315(0x148)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a154_0x4fe305=a154_0x2c02;(function(_0x36b963,_0xc0318d){const _0x57c159=a154_0x2c02,_0x13b895=_0x36b963();while(!![]){try{const _0x261199=-parseInt(_0x57c159(0x12b))/0x1+parseInt(_0x57c159(0x13c))/0x2*(parseInt(_0x57c159(0x141))/0x3)+parseInt(_0x57c159(0x12a))/0x4*(parseInt(_0x57c159(0x136))/0x5)+parseInt(_0x57c159(0x132))/0x6*(-parseInt(_0x57c159(0x138))/0x7)+-parseInt(_0x57c159(0x128))/0x8+parseInt(_0x57c159(0x12f))/0x9+parseInt(_0x57c159(0x13f))/0xa;if(_0x261199===_0xc0318d)break;else _0x13b895['push'](_0x13b895['shift']());}catch(_0x1b9141){_0x13b895['push'](_0x13b895['shift']());}}}(a154_0x4400,0xb97fb));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';function a154_0x4400(){const _0x4012e7=['\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','expected-version','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','high-risk-write','rabetbase\x20kb\x20detail\x20--id\x20','verified','4648184PrYpBL','kb_expected_version_invalid','1635864TmDuYo','287487ADvRJA','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','already_absent','\x20remains\x20readable\x20after\x20delete.','6064191EaoQZD','snapshotHash','company','8979834hjeVoz','kb_verification_failed','Soft-deleted\x20company\x20knowledge\x20base\x20','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','15wdsfxb','POST','7wgiIDs','unshift','appCode','cookie','659606XJfqAV','\x20--format\x20compress','--expected-version\x20must\x20be\x20a\x20positive\x20safe\x20integer.','8944520hUXrAX','delete','3cWRPBS','version','no_op'];a154_0x4400=function(){return _0x4012e7;};return a154_0x4400();}function a154_0x2c02(_0x1cc723,_0x1e3f30){_0x1cc723=_0x1cc723-0x127;const _0x4400a9=a154_0x4400();let _0x2c02a0=_0x4400a9[_0x1cc723];return _0x2c02a0;}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 readExpectedVersion(_0x33f19a){const _0x37af48=a154_0x2c02,_0x12a69e=_0x33f19a['flag'](_0x37af48(0x145));if(_0x12a69e===undefined)return undefined;const _0x1223a2=Number(_0x12a69e);if(!Number['isSafeInteger'](_0x1223a2)||_0x1223a2<0x1)throw kbError(_0x37af48(0x129),_0x37af48(0x13e));return _0x1223a2;}function noOpData(_0x16bb59,_0x29b702,_0x4b1336){const _0x5e4032=a154_0x2c02;return{'operation':_0x5e4032(0x143),'selector':{'id':_0x29b702,'scope':_0x5e4032(0x131),'appCode':_0x16bb59[_0x5e4032(0x13a)]},'before':null,'after':null,'dryRun':_0x4b1336,'deleteCalled':![],'backend':{'method':_0x5e4032(0x137),'path':knowledgeDocumentsPath(_0x5e4032(0x131),_0x5e4032(0x140))},'warnings':[],'verification':{'status':_0x5e4032(0x12d),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a154_0x4fe305(0x140),'description':'Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','risk':a154_0x4fe305(0x147),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'string','required':!![],'description':'Company\x20knowledge-base\x20id'},{'name':a154_0x4fe305(0x145),'type':'number','required':![],'description':a154_0x4fe305(0x12c)}],async 'validate'(_0x27877d){readKbId(_0x27877d),readExpectedVersion(_0x27877d),requireKbExplicitYes(_0x27877d);},async 'dryRun'(_0x18df66){const _0x473104=a154_0x4fe305,_0x76be52=readKbId(_0x18df66),_0x547718=readExpectedVersion(_0x18df66),_0x5c4f24=await getKbOrNull(_0x18df66,_0x76be52);if(!_0x5c4f24)return asDryRunResult(noOpData(_0x18df66,_0x76be52,!![]),{'method':_0x473104(0x137),'url':knowledgeDocumentsPath(_0x473104(0x131),_0x473104(0x140))});assertExpectedKbVersion(_0x5c4f24,_0x547718);const _0x3c34bc=projectKb(_0x5c4f24),_0x2efd48=[RAG_WARNING];return asDryRunResult({'operation':_0x473104(0x140),'selector':{'id':_0x3c34bc['id'],'scope':_0x473104(0x131),'appCode':_0x3c34bc[_0x473104(0x13a)]},'before':_0x3c34bc,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x473104(0x131),_0x473104(0x140)),'body':{'appCode':_0x18df66[_0x473104(0x13a)],'id':_0x76be52,'expectedVersion':_0x5c4f24[_0x473104(0x142)]}},'warnings':_0x2efd48,'verification':{'expectedVersion':_0x5c4f24[_0x473104(0x142)],'atomicCompareAndSet':!![],'snapshotHash':_0x3c34bc[_0x473104(0x130)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x473104(0x148)+_0x3c34bc['id']+_0x473104(0x13d)}},{'method':_0x473104(0x137),'url':knowledgeDocumentsPath(_0x473104(0x131),_0x473104(0x140))});},async 'execute'(_0x1f23d9){const _0x4616c6=a154_0x4fe305;requireKbExplicitYes(_0x1f23d9);const _0x3c5a69=readKbId(_0x1f23d9),_0x23357a=readExpectedVersion(_0x1f23d9),_0x41a316=await getKbOrNull(_0x1f23d9,_0x3c5a69);if(!_0x41a316)return{'ok':!![],'data':noOpData(_0x1f23d9,_0x3c5a69,![]),'message':'Company\x20knowledge\x20base\x20'+_0x3c5a69+_0x4616c6(0x135)};assertExpectedKbVersion(_0x41a316,_0x23357a);const _0x5d69b2=projectKb(_0x41a316);let _0xe06bce=![];try{await deleteEnterpriseKnowledgeBase(_0x1f23d9[_0x4616c6(0x13b)],_0x3c5a69,_0x1f23d9[_0x4616c6(0x13a)],_0x41a316['version']);}catch(_0x3f7227){if(!isPlatformTransportFailure(_0x3f7227))throw _0x3f7227;_0xe06bce=!![];}const _0x35ca95=await verifyKbMutationReadback(_0x4616c6(0x140),_0xe06bce,()=>getKbOrNull(_0x1f23d9,_0x3c5a69));if(_0x35ca95)throw kbError(_0xe06bce?'kb_delete_outcome_unknown':_0x4616c6(0x133),'Company\x20knowledge\x20base\x20'+_0x3c5a69+_0x4616c6(0x12e),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x3c5a69+_0x4616c6(0x144));const _0x53df0b=[RAG_WARNING];return _0xe06bce&&_0x53df0b[_0x4616c6(0x139)](_0x4616c6(0x146)),{'ok':!![],'data':{'operation':'delete','selector':{'id':_0x5d69b2['id'],'scope':_0x4616c6(0x131),'appCode':_0x5d69b2[_0x4616c6(0x13a)]},'before':_0x5d69b2,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x4616c6(0x131),_0x4616c6(0x140))},'warnings':_0x53df0b,'verification':{'status':_0x4616c6(0x127),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0xe06bce,'lookupCommand':'rabetbase\x20kb\x20detail\x20--id\x20'+_0x5d69b2['id']+_0x4616c6(0x13d)}},'message':_0x4616c6(0x134)+_0x5d69b2['id']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a155_0x4dca6b=a155_0x3a89;function a155_0x32cc(){const _0x5bf5ed=['Company\x20knowledge-base\x20id','string','detail','3QUrWHy','17032ZVYYPV','125422eQdFHQ','8592846BvagzY','Loaded\x20company\x20knowledge\x20base\x20','143IDNaEm','13905090rmcvkj','138590YaxHFu','687388dUtJqK','4IqXrrE','3934tPtWVs','Show\x20one\x20company\x20knowledge\x20base\x20with\x20full\x20content\x20for\x20the\x20resolved\x20app','2104390bAXBlW','content'];a155_0x32cc=function(){return _0x5bf5ed;};return a155_0x32cc();}(function(_0x1fc515,_0x960a5c){const _0x1706ec=a155_0x3a89,_0x2824b3=_0x1fc515();while(!![]){try{const _0xe8c8c4=-parseInt(_0x1706ec(0x106))/0x1*(parseInt(_0x1706ec(0x10d))/0x2)+-parseInt(_0x1706ec(0x104))/0x3*(parseInt(_0x1706ec(0x10c))/0x4)+-parseInt(_0x1706ec(0x10b))/0x5+parseInt(_0x1706ec(0x107))/0x6+-parseInt(_0x1706ec(0x10e))/0x7*(-parseInt(_0x1706ec(0x105))/0x8)+parseInt(_0x1706ec(0x10a))/0x9+-parseInt(_0x1706ec(0x110))/0xa*(parseInt(_0x1706ec(0x109))/0xb);if(_0xe8c8c4===_0x960a5c)break;else _0x2824b3['push'](_0x2824b3['shift']());}catch(_0x2fe6b5){_0x2824b3['push'](_0x2824b3['shift']());}}}(a155_0x32cc,0xf118d));function a155_0x3a89(_0x146319,_0x35d54b){_0x146319=_0x146319-0x104;const _0x32cc46=a155_0x32cc();let _0x3a89f0=_0x32cc46[_0x146319];return _0x3a89f0;}import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':a155_0x4dca6b(0x114),'description':a155_0x4dca6b(0x10f),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a155_0x4dca6b(0x113),'required':!![],'description':a155_0x4dca6b(0x112)}],async 'validate'(_0x446e62){readKbId(_0x446e62);},async 'execute'(_0x443ae3){const _0x4c4ccc=a155_0x4dca6b,_0x24d6f7=readKbId(_0x443ae3),_0x48cfe4=await requireKb(_0x443ae3,_0x24d6f7);return{'ok':!![],'data':{'knowledgeBase':{...projectKb(_0x48cfe4),'content':_0x48cfe4[_0x4c4ccc(0x111)]}},'message':_0x4c4ccc(0x108)+_0x24d6f7};}};
|
package/lib/commands/kb/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a156_0x410b80=a156_0x117f;(function(_0x48759c,_0x1f18a4){const _0x1563b8=a156_0x117f,_0x5cbe1e=_0x48759c();while(!![]){try{const _0x25135e=parseInt(_0x1563b8(0x102))/0x1+parseInt(_0x1563b8(0x106))/0x2*(parseInt(_0x1563b8(0x104))/0x3)+-parseInt(_0x1563b8(0xfd))/0x4+-parseInt(_0x1563b8(0xff))/0x5*(parseInt(_0x1563b8(0x103))/0x6)+-parseInt(_0x1563b8(0xf8))/0x7+parseInt(_0x1563b8(0xfb))/0x8*(-parseInt(_0x1563b8(0x100))/0x9)+parseInt(_0x1563b8(0x101))/0xa;if(_0x25135e===_0x1f18a4)break;else _0x5cbe1e['push'](_0x5cbe1e['shift']());}catch(_0x5a9445){_0x5cbe1e['push'](_0x5cbe1e['shift']());}}}(a156_0x4797,0xb6488));import{withKbManagementSession}from'../../core/kb-management-client.js';import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';function a156_0x4797(){const _0x155521=['signal','1958508oIvIkM','dryRun','2245665YENAiI','9SpOgBq','2319320fiYyoQ','1313196lzyNHl','12yjFHMV','5079zJpJiI','search','1678nPgkZK','3923829gERYej','map','execute','2163864GJTtJV'];a156_0x4797=function(){return _0x155521;};return a156_0x4797();}import{kbSearch}from'../../commands/kb/search.js';import{kbCreate}from'../../commands/kb/create.js';function a156_0x117f(_0x5d639f,_0x4c000f){_0x5d639f=_0x5d639f-0xf8;const _0x4797e6=a156_0x4797();let _0x117fa1=_0x4797e6[_0x5d639f];return _0x117fa1;}import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete][a156_0x410b80(0xf9)](_0x83eef2=>_0x83eef2['command']===a156_0x410b80(0x105)?_0x83eef2:{..._0x83eef2,'execute':_0x58e830=>withKbManagementSession(_0x58e830[a156_0x410b80(0xfc)],()=>_0x83eef2[a156_0x410b80(0xfa)](_0x58e830)),..._0x83eef2[a156_0x410b80(0xfe)]?{'dryRun':_0x589722=>withKbManagementSession(_0x589722['signal'],()=>_0x83eef2[a156_0x410b80(0xfe)](_0x589722))}:{}});
|
package/lib/commands/kb/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a157_0x1066(){const _0x463223=['675891UMjDBY','34620JDXiFo','\x20company\x20knowledge\x20base(s)\x20for\x20','116543RjZOnT','8CvWtRE','24obhJPj','read','1364mjEClT','appCode','trim','length','Filter\x20by\x20knowledge-base\x20title','635900IcPNvT','174SzXnFy','9sBxMAV','900393nAWsCH','4693440DdVjbl','11307768uFiQZk','title','Found\x20'];a157_0x1066=function(){return _0x463223;};return a157_0x1066();}const a157_0x2f56ba=a157_0x5eeb;function a157_0x5eeb(_0x4a1d2c,_0x184c26){_0x4a1d2c=_0x4a1d2c-0x119;const _0x1066c9=a157_0x1066();let _0x5eeb2e=_0x1066c9[_0x4a1d2c];return _0x5eeb2e;}(function(_0x147b80,_0x502a2f){const _0x29e14f=a157_0x5eeb,_0x4022cf=_0x147b80();while(!![]){try{const _0x35f8e6=-parseInt(_0x29e14f(0x119))/0x1+-parseInt(_0x29e14f(0x122))/0x2*(-parseInt(_0x29e14f(0x11e))/0x3)+-parseInt(_0x29e14f(0x123))/0x4*(parseInt(_0x29e14f(0x12a))/0x5)+parseInt(_0x29e14f(0x12b))/0x6*(parseInt(_0x29e14f(0x121))/0x7)+parseInt(_0x29e14f(0x11a))/0x8*(-parseInt(_0x29e14f(0x12c))/0x9)+-parseInt(_0x29e14f(0x11f))/0xa*(-parseInt(_0x29e14f(0x125))/0xb)+parseInt(_0x29e14f(0x11b))/0xc;if(_0x35f8e6===_0x502a2f)break;else _0x4022cf['push'](_0x4022cf['shift']());}catch(_0x58d255){_0x4022cf['push'](_0x4022cf['shift']());}}}(a157_0x1066,0x7b672));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':'list','description':'List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','risk':a157_0x2f56ba(0x124),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a157_0x2f56ba(0x11c),'type':'string','required':![],'description':a157_0x2f56ba(0x129)}],async 'execute'(_0x12871f){const _0x155074=a157_0x2f56ba,_0x1c8ed3=_0x12871f['str'](_0x155074(0x11c))[_0x155074(0x127)](),_0x5db5c7=await fetchAllCompanyKnowledgeBases(_0x12871f,{..._0x1c8ed3?{'title':_0x1c8ed3}:{}}),_0x27cb30=_0x5db5c7['map'](projectKb);return{'ok':!![],'data':{'total':_0x27cb30[_0x155074(0x128)],'knowledgeBases':_0x27cb30},'message':_0x155074(0x11d)+_0x27cb30[_0x155074(0x128)]+_0x155074(0x120)+_0x12871f[_0x155074(0x126)]};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a158_0x523c41=a158_0x2556;(function(_0x2c7cbd,_0xae773a){const _0x2406f4=a158_0x2556,_0x1fc46d=_0x2c7cbd();while(!![]){try{const _0x4ef265=-parseInt(_0x2406f4(0xb5))/0x1*(parseInt(_0x2406f4(0xa9))/0x2)+-parseInt(_0x2406f4(0xa5))/0x3+parseInt(_0x2406f4(0x97))/0x4*(parseInt(_0x2406f4(0xad))/0x5)+-parseInt(_0x2406f4(0xa8))/0x6*(parseInt(_0x2406f4(0xaa))/0x7)+-parseInt(_0x2406f4(0xa3))/0x8*(-parseInt(_0x2406f4(0xa2))/0x9)+parseInt(_0x2406f4(0xa0))/0xa+-parseInt(_0x2406f4(0x9a))/0xb*(-parseInt(_0x2406f4(0x98))/0xc);if(_0x4ef265===_0xae773a)break;else _0x1fc46d['push'](_0x1fc46d['shift']());}catch(_0x32d86e){_0x1fc46d['push'](_0x1fc46d['shift']());}}}(a158_0x5d87,0x49b95));function a158_0x2556(_0x50fe99,_0x37a4ce){_0x50fe99=_0x50fe99-0x96;const _0x5d8764=a158_0x5d87();let _0x25563b=_0x5d8764[_0x50fe99];return _0x25563b;}import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';function a158_0x5d87(){const _0x56fa0a=['KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','184691EMHebp','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20--kb-service-url\x20<https-origin>\x20for\x20this\x20request.','total','212PWjMnr','12RdraDd','str','6337881NykePZ','kb-service-url','appCode','string','flag','trim','3379450JtomZI','\x20company/public\x20knowledge\x20hit(s)\x20for\x20','3465RJQxAF','1432ulahim','topk','1603068KFkFaa','validation','number','29604eKWkNl','6EECFXQ','56GtbXXq','cookie','query','42155MlTdjc','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','num','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','Found\x20','search','isSafeInteger'];a158_0x5d87=function(){return _0x56fa0a;};return a158_0x5d87();}import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';function readSearchQuery(_0x18e847){const _0x57144c=a158_0x2556,_0x17d83c=_0x18e847[_0x57144c(0x99)]('query')[_0x57144c(0x9f)]();if(!_0x17d83c)throw CliErrors[_0x57144c(0xa6)]('Search\x20query\x20is\x20required.');return _0x17d83c;}function readSearchTopK(_0x53efc1){const _0x5c5d84=a158_0x2556,_0x2605e2=_0x53efc1[_0x5c5d84(0x9e)](_0x5c5d84(0xa4));if(_0x2605e2===undefined||_0x2605e2===null||_0x2605e2==='')return undefined;const _0x32e5f5=_0x53efc1[_0x5c5d84(0xaf)](_0x5c5d84(0xa4));if(!Number[_0x5c5d84(0xb3)](_0x32e5f5)||_0x32e5f5<0x1||_0x32e5f5>0x32)throw CliErrors[_0x5c5d84(0xa6)](_0x5c5d84(0xb6));return _0x32e5f5;}function readSearchServiceUrl(_0x289e1d){const _0xfe11f2=a158_0x2556;if(_0x289e1d['flag'](_0xfe11f2(0x9b))!==undefined)return normalizeKbServiceOrigin(_0x289e1d[_0xfe11f2(0x99)](_0xfe11f2(0x9b)));const _0x33a24c=getKbServiceDomain();if(!_0x33a24c)throw CliErrors[_0xfe11f2(0xa6)](_0xfe11f2(0xb4),_0xfe11f2(0xb7));return normalizeKbServiceOrigin(_0x33a24c);}export const kbSearch={'service':'kb','command':a158_0x523c41(0xb2),'description':a158_0x523c41(0xb0),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'strictFlags':!![],'flags':[{'name':a158_0x523c41(0xac),'type':a158_0x523c41(0x9d),'required':!![],'description':'Company\x20and\x20public\x20knowledge\x20search\x20query'},{'name':a158_0x523c41(0xa4),'type':a158_0x523c41(0xa7),'required':![],'description':'Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return'},{'name':'kb-service-url','type':'string','required':![],'description':a158_0x523c41(0xae)}],async 'validate'(_0x59b7b4){readSearchQuery(_0x59b7b4),readSearchTopK(_0x59b7b4),readSearchServiceUrl(_0x59b7b4);},async 'execute'(_0x102d8c){const _0x18f31d=a158_0x523c41,_0x2ce6a6=readSearchQuery(_0x102d8c),_0x5dfa8f=readSearchTopK(_0x102d8c),_0x3a202c=readSearchServiceUrl(_0x102d8c),_0x5e68a2={'cookie':_0x102d8c[_0x18f31d(0xab)],'query':_0x2ce6a6,'appCode':_0x102d8c[_0x18f31d(0x9c)],..._0x5dfa8f!==undefined?{'topK':_0x5dfa8f}:{},'signal':_0x102d8c['signal']},_0x216fdc=await searchDirectKnowledge({..._0x5e68a2,'serviceUrl':_0x3a202c});return{'ok':!![],'data':_0x216fdc,'message':_0x18f31d(0xb1)+_0x216fdc[_0x18f31d(0x96)]+_0x18f31d(0xa1)+_0x102d8c['appCode']};}};
|
|
@@ -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_0x226360=a159_0xd0d0;(function(_0xfbcbdb,_0x375210){const _0x37ce55=a159_0xd0d0,_0x788dd6=_0xfbcbdb();while(!![]){try{const _0x25edf1=parseInt(_0x37ce55(0x185))/0x1+-parseInt(_0x37ce55(0x16a))/0x2+parseInt(_0x37ce55(0x1b8))/0x3+-parseInt(_0x37ce55(0x1a2))/0x4+parseInt(_0x37ce55(0x1ba))/0x5*(parseInt(_0x37ce55(0x1a7))/0x6)+parseInt(_0x37ce55(0x168))/0x7*(parseInt(_0x37ce55(0x166))/0x8)+parseInt(_0x37ce55(0x161))/0x9*(-parseInt(_0x37ce55(0x1b3))/0xa);if(_0x25edf1===_0x375210)break;else _0x788dd6['push'](_0x788dd6['shift']());}catch(_0x1bf5eb){_0x788dd6['push'](_0x788dd6['shift']());}}}(a159_0x4025,0x6d929));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';function a159_0xd0d0(_0x17d766,_0x43e810){_0x17d766=_0x17d766-0x157;const _0x402598=a159_0x4025();let _0xd0d0c6=_0x402598[_0x17d766];return _0xd0d0c6;}import{TextDecoder}from'node:util';import{getEnterpriseKnowledgeBase,getPlatformErrorCode,getPlatformHttpStatus,listEnterpriseKnowledgeBases}from'../../core/api-client.js';import{KbManagementError}from'../../core/kb-management-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a159_0x226360(0x184);export function kbError(_0x5f0cb1,_0x499d4d,_0x234b03){return new CliError(_0x5f0cb1,0x1,_0x499d4d,_0x234b03);}export function readKbId(_0x15cb63){const _0x58126c=a159_0x226360,_0x35fa44=_0x15cb63[_0x58126c(0x15d)]('id');if(!/^0*[1-9][0-9]*$/['test'](_0x35fa44))throw kbError(_0x58126c(0x18c),_0x58126c(0x194));return _0x35fa44;}export function requireKbExplicitYes(_0x5efb3a){const _0x5ad8c9=a159_0x226360;if(_0x5efb3a[_0x5ad8c9(0x160)](_0x5ad8c9(0x1aa))||_0x5efb3a[_0x5ad8c9(0x160)](_0x5ad8c9(0x179)))return;throw kbError('kb_confirmation_required',_0x5ad8c9(0x198),_0x5ad8c9(0x15c));}function sha256(_0x1ae8d7){const _0x14f351=a159_0x226360;return'sha256:'+createHash(_0x14f351(0x19d))[_0x14f351(0x173)](_0x1ae8d7)['digest'](_0x14f351(0x175));}export function inspectKbContent(_0xaa8b9c){const _0x3c32d0=a159_0x226360,_0x5b4397=Buffer[_0x3c32d0(0x18a)](_0xaa8b9c,_0x3c32d0(0x186));return{'content':_0xaa8b9c,'byteSize':_0x5b4397[_0x3c32d0(0x174)],'contentHash':sha256(_0x5b4397)};}export async function readKbFile(_0x51364e){const _0x148760=a159_0x226360,_0x567f43=_0x51364e[_0x148760(0x16d)]();if(!_0x567f43)throw kbError(_0x148760(0x163),_0x148760(0x1b6),_0x148760(0x1bb));const _0x3488c6=resolve(_0x567f43);let _0x163057;try{_0x163057=await stat(_0x3488c6);}catch(_0x3e63eb){throw kbError('kb_file_unreadable',_0x148760(0x1a8)+_0x567f43,_0x3e63eb instanceof Error?_0x3e63eb[_0x148760(0x17e)]:String(_0x3e63eb));}if(!_0x163057[_0x148760(0x1b5)]())throw kbError(_0x148760(0x15a),_0x148760(0x1a1)+_0x567f43);let _0x5b5532;try{_0x5b5532=await readFile(_0x3488c6);}catch(_0x21f2bd){throw kbError('kb_file_unreadable',_0x148760(0x172)+_0x567f43,_0x21f2bd instanceof Error?_0x21f2bd[_0x148760(0x17e)]:String(_0x21f2bd));}let _0x67a62f;try{_0x67a62f=new TextDecoder(_0x148760(0x158),{'fatal':!![],'ignoreBOM':!![]})[_0x148760(0x1a4)](_0x5b5532);}catch{throw kbError(_0x148760(0x19f),_0x148760(0x170)+_0x567f43);}if(!_0x67a62f['trim']())throw kbError(_0x148760(0x19f),_0x148760(0x19e)+_0x567f43);return inspectKbContent(_0x67a62f);}export async function verifyKbMutationReadback(_0x1d655c,_0x474293,_0x5b5730){const _0x52d990=a159_0x226360;try{return await _0x5b5730();}catch(_0x45c79a){const _0x34cc07=kbError(_0x52d990(0x15f)+_0x1d655c+'_'+(_0x474293?_0x52d990(0x187):_0x52d990(0x177)),_0x52d990(0x159)+_0x1d655c+_0x52d990(0x19b),'Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.');Object[_0x52d990(0x1b7)](_0x34cc07,_0x52d990(0x18d),{'value':_0x45c79a,'enumerable':![]});throw _0x34cc07;}}function requireRecordText(_0x24ba0b,_0x1fd8e7,_0x5018b0,_0x2ec0db={}){const _0x2e394f=a159_0x226360;if(typeof _0x24ba0b==='string'&&(_0x2ec0db[_0x2e394f(0x1a5)]||_0x24ba0b[_0x2e394f(0x16d)]()))return _0x24ba0b;throw kbError(_0x2e394f(0x180),'Knowledge\x20base\x20'+String(_0x5018b0)+_0x2e394f(0x178)+_0x1fd8e7+'.');}export function projectKb(_0x5e885a){const _0x2b146b=a159_0x226360;if(typeof _0x5e885a['id']!==_0x2b146b(0x162)||!/^0*[1-9][0-9]*$/[_0x2b146b(0x17c)](_0x5e885a['id']))throw kbError('kb_response_invalid',_0x2b146b(0x17d));if(!Number['isSafeInteger'](_0x5e885a[_0x2b146b(0x16b)])||_0x5e885a[_0x2b146b(0x16b)]<0x1)throw kbError(_0x2b146b(0x180),_0x2b146b(0x17f)+_0x5e885a['id']+'\x20response\x20contains\x20an\x20invalid\x20version.');if(_0x5e885a[_0x2b146b(0x1a3)]!==_0x2b146b(0x192))throw kbError(_0x2b146b(0x18f),_0x2b146b(0x17f)+_0x5e885a['id']+'\x20is\x20not\x20company-scoped.');const _0x39f1a1=requireRecordText(_0x5e885a[_0x2b146b(0x16c)],_0x2b146b(0x16c),_0x5e885a['id']),_0x1bb242=requireRecordText(_0x5e885a[_0x2b146b(0x1ac)],_0x2b146b(0x1ac),_0x5e885a['id']),_0xe7cb8d=inspectKbContent(requireRecordText(_0x5e885a[_0x2b146b(0x181)],'content',_0x5e885a['id'],{'allowEmpty':!![]})),_0x468b7d=typeof _0x5e885a[_0x2b146b(0x1ad)]===_0x2b146b(0x162)||typeof _0x5e885a[_0x2b146b(0x1ad)]==='number'?_0x5e885a[_0x2b146b(0x1ad)]:undefined,_0x4a3028=typeof _0x5e885a['updateTime']==='string'||typeof _0x5e885a[_0x2b146b(0x18b)]===_0x2b146b(0x1b4)?_0x5e885a[_0x2b146b(0x18b)]:undefined,_0x6c4f74=sha256(JSON[_0x2b146b(0x164)]({'id':_0x5e885a['id'],'scope':_0x5e885a[_0x2b146b(0x1a3)],'appCode':_0x39f1a1,'title':_0x1bb242,'version':_0x5e885a[_0x2b146b(0x16b)],'contentHash':_0xe7cb8d[_0x2b146b(0x19a)],'createTime':_0x468b7d,'updateTime':_0x4a3028}));return{'id':_0x5e885a['id'],'scope':_0x2b146b(0x192),'appCode':_0x39f1a1,'title':_0x1bb242,'version':_0x5e885a[_0x2b146b(0x16b)],..._0x5e885a[_0x2b146b(0x188)]!==undefined?{'sourceVersion':_0x5e885a[_0x2b146b(0x188)]}:{},..._0x5e885a[_0x2b146b(0x18e)]!==undefined?{'indexStatus':_0x5e885a['indexStatus'],'indexedVersion':_0x5e885a[_0x2b146b(0x182)]}:{},'contentByteSize':_0xe7cb8d[_0x2b146b(0x1b1)],'contentHash':_0xe7cb8d[_0x2b146b(0x19a)],'snapshotHash':_0x6c4f74,..._0x468b7d!==undefined?{'createTime':_0x468b7d}:{},..._0x4a3028!==undefined?{'updateTime':_0x4a3028}:{}};}export function assertCompanyKnowledgeBase(_0x4f9cc0,_0x37a224,_0x49093a){const _0x5824c6=a159_0x226360;if(_0x49093a!==undefined&&_0x4f9cc0['id']!==_0x49093a)throw kbError(_0x5824c6(0x180),_0x5824c6(0x167)+_0x4f9cc0['id']+'\x20while\x20id\x20'+_0x49093a+'\x20was\x20requested.');if(_0x4f9cc0[_0x5824c6(0x1a3)]!==_0x5824c6(0x192)||_0x4f9cc0[_0x5824c6(0x16c)]!==_0x37a224)throw kbError(_0x5824c6(0x18f),_0x5824c6(0x17f)+_0x4f9cc0['id']+'\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20'+_0x37a224+'.');}export async function fetchAllCompanyKnowledgeBases(_0x29f3f3,_0x26e130){const _0x1e6507=a159_0x226360;let _0x1ce7b1=LIST_PAGE_SIZE;const _0x1fd0d1=[],_0x195a10=new Set();let _0x38372e=0x1,_0x2f06e5=0x0,_0x4d947e;while(!![]){let _0xdf51c0;try{_0xdf51c0=await listEnterpriseKnowledgeBases(_0x29f3f3['cookie'],{'currentPage':_0x38372e,'pageSize':_0x1ce7b1,'appCode':_0x29f3f3[_0x1e6507(0x16c)],..._0x26e130});}catch(_0xd38613){if(!(_0xd38613 instanceof KbManagementError)||!_0xd38613[_0x1e6507(0x17a)]||_0x1ce7b1===0x1)throw _0xd38613;_0x1ce7b1=Math[_0x1e6507(0x195)](0x1,Math['floor'](_0x1ce7b1/0x2)),_0x38372e=0x1,_0x2f06e5=0x0,_0x1fd0d1[_0x1e6507(0x157)]=0x0,_0x195a10[_0x1e6507(0x1ae)]();continue;}const _0x18cf73=_0xdf51c0['paging']?.['totalCount'];if(!_0xdf51c0[_0x1e6507(0x199)]||_0xdf51c0[_0x1e6507(0x199)][_0x1e6507(0x197)]!==_0x1ce7b1||!Number[_0x1e6507(0x196)](_0x18cf73)||_0x18cf73<0x0||_0xdf51c0['items'][_0x1e6507(0x157)]!==Math[_0x1e6507(0x1b9)](_0x1ce7b1,Math['max'](0x0,_0x18cf73-(_0x38372e-0x1)*_0x1ce7b1)))throw kbError(_0x1e6507(0x189),_0x1e6507(0x183));if(_0xdf51c0[_0x1e6507(0x199)][_0x1e6507(0x1a0)]!==_0x38372e)throw kbError(_0x1e6507(0x189),_0x1e6507(0x191)+_0xdf51c0[_0x1e6507(0x199)][_0x1e6507(0x1a0)]+_0x1e6507(0x169)+_0x38372e+_0x1e6507(0x193));if(_0x18cf73!==undefined){if(_0x4d947e!==undefined&&_0x18cf73!==_0x4d947e)throw kbError(_0x1e6507(0x189),_0x1e6507(0x165)+_0x4d947e+_0x1e6507(0x1af)+_0x18cf73+'\x20during\x20paging.',_0x1e6507(0x171));_0x4d947e=_0x18cf73;}for(const _0x42720b of _0xdf51c0['items']){if(typeof _0x42720b['id']!==_0x1e6507(0x162)||!/^0*[1-9][0-9]*$/[_0x1e6507(0x17c)](_0x42720b['id'])||_0x195a10[_0x1e6507(0x19c)](_0x42720b['id']))throw kbError(_0x1e6507(0x189),'Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20'+String(_0x42720b['id'])+'.');_0x195a10[_0x1e6507(0x16e)](_0x42720b['id']),_0x42720b[_0x1e6507(0x1a3)]===_0x1e6507(0x192)&&_0x42720b[_0x1e6507(0x16c)]===_0x29f3f3[_0x1e6507(0x16c)]&&_0x1fd0d1[_0x1e6507(0x1b2)](_0x42720b);}_0x2f06e5+=_0xdf51c0[_0x1e6507(0x1b0)][_0x1e6507(0x157)];if(_0x18cf73!==undefined&&_0x2f06e5>=_0x18cf73)break;if(_0xdf51c0[_0x1e6507(0x1b0)][_0x1e6507(0x157)]<_0x1ce7b1){if(_0x18cf73!==undefined&&_0x2f06e5<_0x18cf73)throw kbError(_0x1e6507(0x189),_0x1e6507(0x16f)+_0x2f06e5+'\x20of\x20'+_0x18cf73+_0x1e6507(0x1bc));break;}_0x38372e+=0x1;}return _0x1fd0d1;}function a159_0x4025(){const _0x1ab9cb=['Knowledge-base\x20list\x20returned\x20page\x20','company','\x20was\x20requested.','--id\x20must\x20be\x20a\x20positive\x20decimal\x20integer\x20string.','max','isSafeInteger','pageSize','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','paging','contentHash','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','has','sha256','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','kb_content_invalid','currentPage','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','1186360iAdGMq','scope','decode','allowEmpty',',\x20current\x20','71388fjwqcE','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','dry-run','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','title','createTime','clear','\x20to\x20','items','byteSize','push','6352670nCNpxy','number','isFile','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','defineProperty','866754mGiAqE','min','165KazyYZ','Pass\x20--file\x20<knowledge.md>.','\x20records.','length','utf-8','The\x20','kb_file_invalid','\x20version\x20changed:\x20expected\x20','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','str','filter','kb_','bool','9AwUuKC','string','kb_file_required','stringify','Knowledge-base\x20list\x20total\x20changed\x20from\x20','3152ffbOre','Knowledge-base\x20get-one\x20returned\x20id\x20','12278jCvbaX','\x20while\x20page\x20','920366VjuSBn','version','appCode','trim','add','Knowledge-base\x20list\x20stopped\x20at\x20','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','update','byteLength','hex','kb_state_drift','verification_unavailable','\x20response\x20is\x20missing\x20','yes','pageTooLarge','Company\x20knowledge\x20base\x20not\x20found:\x20','test','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','message','Knowledge\x20base\x20','kb_response_invalid','content','indexedVersion','Knowledge-base\x20list\x20returned\x20an\x20inconsistent\x20page\x20size\x20or\x20record\x20count.','306','468221fRbPSz','utf8','outcome_unknown','sourceVersion','kb_list_contract_invalid','from','updateTime','kb_id_invalid','cause','indexStatus','kb_scope_mismatch','cookie'];a159_0x4025=function(){return _0x1ab9cb;};return a159_0x4025();}export function findExactCompanyKnowledgeBases(_0x548377,_0x333bb4,_0x1927ee){const _0x15e046=a159_0x226360;return _0x548377[_0x15e046(0x15e)](_0x436490=>_0x436490[_0x15e046(0x1a3)]===_0x15e046(0x192)&&_0x436490[_0x15e046(0x16c)]===_0x333bb4&&_0x436490[_0x15e046(0x1ac)]===_0x1927ee);}export async function getKbOrNull(_0x562dbd,_0x1d4733){const _0x539902=a159_0x226360;try{const _0x385c33=await getEnterpriseKnowledgeBase(_0x562dbd[_0x539902(0x190)],_0x1d4733,_0x562dbd[_0x539902(0x16c)]);return assertCompanyKnowledgeBase(_0x385c33,_0x562dbd[_0x539902(0x16c)],_0x1d4733),_0x385c33;}catch(_0x32a344){if(getPlatformErrorCode(_0x32a344)===DATA_NOT_EXIST_ERROR_CODE&&getPlatformHttpStatus(_0x32a344)===0x194)return null;throw _0x32a344;}}export async function requireKb(_0x3f456d,_0x37379c){const _0x589145=a159_0x226360,_0x7d4053=await getKbOrNull(_0x3f456d,_0x37379c);if(!_0x7d4053)throw kbError('kb_not_found',_0x589145(0x17b)+_0x37379c,_0x589145(0x1ab));return _0x7d4053;}export function assertExpectedKbVersion(_0x4d532c,_0x50fc4c){const _0x53555d=a159_0x226360;if(_0x50fc4c===undefined||_0x4d532c['version']===_0x50fc4c)return;throw kbError(_0x53555d(0x176),_0x53555d(0x17f)+_0x4d532c['id']+_0x53555d(0x15b)+_0x50fc4c+_0x53555d(0x1a6)+_0x4d532c[_0x53555d(0x16b)]+'.',_0x53555d(0x1a9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a160_0x59b9(_0x4f9c50,_0x1cfc1d){_0x4f9c50=_0x4f9c50-0x1f2;const _0x45c409=a160_0x45c4();let _0x59b9e4=_0x45c409[_0x4f9c50];return _0x59b9e4;}const a160_0x11b2e5=a160_0x59b9;(function(_0x59d19f,_0x4a989a){const _0x4552cc=a160_0x59b9,_0x3515c7=_0x59d19f();while(!![]){try{const _0x2dda0e=-parseInt(_0x4552cc(0x205))/0x1*(-parseInt(_0x4552cc(0x20f))/0x2)+-parseInt(_0x4552cc(0x1f5))/0x3*(parseInt(_0x4552cc(0x223))/0x4)+parseInt(_0x4552cc(0x215))/0x5+-parseInt(_0x4552cc(0x1fc))/0x6*(-parseInt(_0x4552cc(0x216))/0x7)+-parseInt(_0x4552cc(0x20c))/0x8+parseInt(_0x4552cc(0x204))/0x9*(-parseInt(_0x4552cc(0x209))/0xa)+parseInt(_0x4552cc(0x220))/0xb*(parseInt(_0x4552cc(0x227))/0xc);if(_0x2dda0e===_0x4a989a)break;else _0x3515c7['push'](_0x3515c7['shift']());}catch(_0x1fd13b){_0x3515c7['push'](_0x3515c7['shift']());}}}(a160_0x45c4,0xf1263));import{knowledgeDocumentsPath}from'../../core/api-client.js';function a160_0x45c4(){const _0x2ca331=['Pass\x20at\x20least\x20one\x20of\x20--title\x20or\x20--file.','423iRXsqn','Company\x20knowledge\x20base\x20','contentHash','expectedVersion','trim','beforeRecord','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','6OcrCPT','title','rabetbase\x20kb\x20detail\x20--id\x20','kb_title_invalid','expected-version','number','version','flag','1356489JoHMsj','1GzVvSN','company','patch','New\x20knowledge-base\x20title','100nqUiKJ','Use\x20read-only\x20detail\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','replacement','5310048ZdCTFt','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','--expected-version\x20must\x20be\x20a\x20positive\x20safe\x20integer.','730868ouLgiB','Update\x20a\x20company\x20knowledge\x20base\x20with\x20preflight\x20drift\x20protection','file','\x20--format\x20compress','push','byteSize','4762395pvjybn','12189611vfQePt','POST','verified','kb_file_required','appCode','kb_verification_failed','Company\x20knowledge-base\x20id','kb_expected_version_invalid','Nothing\x20to\x20update.','snapshotHash','1012qnVYCk','kb_update_outcome_unknown','content','18372KZLomA','update','Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set','before','97440lKQEtp','string','cookie'];a160_0x45c4=function(){return _0x2ca331;};return a160_0x45c4();}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(_0x5276d2){const _0x468fa9=a160_0x59b9,_0x40d43d=readKbId(_0x5276d2),_0xb9323c=_0x5276d2[_0x468fa9(0x203)](_0x468fa9(0x1fd)),_0x2e8cfe=_0x5276d2[_0x468fa9(0x203)](_0x468fa9(0x211)),_0x116cb0=_0x5276d2[_0x468fa9(0x203)](_0x468fa9(0x200)),_0x28b82c=_0xb9323c===undefined?undefined:String(_0xb9323c)['trim']();if(_0xb9323c!==undefined&&!_0x28b82c)throw kbError(_0x468fa9(0x1ff),'--title\x20cannot\x20be\x20empty.');const _0x3eb313=_0x2e8cfe===undefined?undefined:String(_0x2e8cfe)[_0x468fa9(0x1f9)]();if(_0x2e8cfe!==undefined&&!_0x3eb313)throw kbError(_0x468fa9(0x219),'--file\x20cannot\x20be\x20empty.');if(_0x28b82c===undefined&&_0x3eb313===undefined)throw kbError('kb_update_empty',_0x468fa9(0x21e),_0x468fa9(0x1f4));let _0x1df9e7;if(_0x116cb0!==undefined){_0x1df9e7=Number(_0x116cb0);if(!Number['isSafeInteger'](_0x1df9e7)||_0x1df9e7<0x1)throw kbError(_0x468fa9(0x21d),_0x468fa9(0x20e));}return{'id':_0x40d43d,'title':_0x28b82c,'file':_0x3eb313,'expectedVersion':_0x1df9e7};}async function prepareUpdate(_0x238f1e){const _0x319fe7=a160_0x59b9,_0x5c067d=readUpdatePatch(_0x238f1e),_0x400117=await requireKb(_0x238f1e,_0x5c067d['id']);assertExpectedKbVersion(_0x400117,_0x5c067d[_0x319fe7(0x1f8)]);const _0x28a351=_0x5c067d[_0x319fe7(0x211)]?await readKbFile(_0x5c067d[_0x319fe7(0x211)]):undefined,_0x2da4ea=projectKb(_0x400117),_0x22d2f1=projectKb({..._0x400117,..._0x5c067d[_0x319fe7(0x1fd)]!==undefined?{'title':_0x5c067d[_0x319fe7(0x1fd)]}:{},..._0x28a351?{'content':_0x28a351[_0x319fe7(0x222)]}:{}});return{'patch':_0x5c067d,'beforeRecord':_0x400117,'before':_0x2da4ea,'planned':_0x22d2f1,'replacement':_0x28a351};}export const kbUpdate={'service':'kb','command':a160_0x11b2e5(0x224),'description':a160_0x11b2e5(0x210),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a160_0x11b2e5(0x1f2),'required':!![],'description':a160_0x11b2e5(0x21c)},{'name':'title','type':a160_0x11b2e5(0x1f2),'required':![],'description':a160_0x11b2e5(0x208)},{'name':a160_0x11b2e5(0x211),'type':a160_0x11b2e5(0x1f2),'required':![],'description':'Replacement\x20UTF-8\x20text\x20or\x20Markdown\x20content\x20file'},{'name':a160_0x11b2e5(0x200),'type':a160_0x11b2e5(0x201),'required':![],'description':a160_0x11b2e5(0x225)}],async 'validate'(_0x11a7eb){readUpdatePatch(_0x11a7eb);},async 'dryRun'(_0x1aeabe){const _0x3c87ee=a160_0x11b2e5,_0x44f00b=await prepareUpdate(_0x1aeabe),_0x436def=[];return asDryRunResult({'operation':_0x3c87ee(0x224),'selector':{'id':_0x44f00b['before']['id'],'scope':'company','appCode':_0x44f00b[_0x3c87ee(0x226)][_0x3c87ee(0x21a)]},'before':_0x44f00b['before'],'after':_0x44f00b['planned'],'dryRun':!![],'backend':{'method':_0x3c87ee(0x217),'path':knowledgeDocumentsPath(_0x3c87ee(0x206),_0x3c87ee(0x224)),'body':{'appCode':_0x1aeabe[_0x3c87ee(0x21a)],'id':_0x44f00b[_0x3c87ee(0x207)]['id'],'expectedVersion':_0x44f00b[_0x3c87ee(0x1fa)][_0x3c87ee(0x202)],..._0x44f00b[_0x3c87ee(0x207)][_0x3c87ee(0x1fd)]!==undefined?{'title':_0x44f00b['patch'][_0x3c87ee(0x1fd)]}:{},..._0x44f00b[_0x3c87ee(0x20b)]?{'contentHash':_0x44f00b[_0x3c87ee(0x20b)][_0x3c87ee(0x1f7)],'contentByteSize':_0x44f00b[_0x3c87ee(0x20b)][_0x3c87ee(0x214)]}:{}}},'warnings':_0x436def,'verification':{'expectedVersion':_0x44f00b[_0x3c87ee(0x1fa)][_0x3c87ee(0x202)],'atomicCompareAndSet':!![],'plannedSnapshotHash':_0x44f00b[_0x3c87ee(0x226)][_0x3c87ee(0x21f)],'lookupCommand':_0x3c87ee(0x1fe)+_0x44f00b['before']['id']+_0x3c87ee(0x212)}},{'method':_0x3c87ee(0x217),'url':knowledgeDocumentsPath(_0x3c87ee(0x206),_0x3c87ee(0x224))});},async 'execute'(_0x4b3ac7){const _0x3d22ae=a160_0x11b2e5,_0x14c00a=await prepareUpdate(_0x4b3ac7),_0x2ace56={'id':_0x14c00a[_0x3d22ae(0x207)]['id'],'appCode':_0x4b3ac7[_0x3d22ae(0x21a)],'expectedVersion':_0x14c00a['beforeRecord'][_0x3d22ae(0x202)],..._0x14c00a[_0x3d22ae(0x207)][_0x3d22ae(0x1fd)]!==undefined?{'title':_0x14c00a[_0x3d22ae(0x207)][_0x3d22ae(0x1fd)]}:{},..._0x14c00a['replacement']?{'content':_0x14c00a[_0x3d22ae(0x20b)][_0x3d22ae(0x222)]}:{}},_0x531736=_0x14c00a['patch']['title']??_0x14c00a[_0x3d22ae(0x1fa)][_0x3d22ae(0x1fd)],_0x5587c7=_0x14c00a['replacement']?.[_0x3d22ae(0x222)]??_0x14c00a[_0x3d22ae(0x1fa)][_0x3d22ae(0x222)],_0x3fdc99=_0x531736!==_0x14c00a[_0x3d22ae(0x1fa)][_0x3d22ae(0x1fd)]||_0x5587c7!==_0x14c00a['beforeRecord'][_0x3d22ae(0x222)],_0x52b8e6=_0x14c00a[_0x3d22ae(0x1fa)][_0x3d22ae(0x202)]+(_0x3fdc99?0x1:0x0);let _0x4db1ec,_0x3a0b9c=![];try{_0x4db1ec=await updateEnterpriseKnowledgeBase(_0x4b3ac7[_0x3d22ae(0x1f3)],_0x2ace56),assertCompanyKnowledgeBase(_0x4db1ec,_0x4b3ac7[_0x3d22ae(0x21a)],_0x14c00a['patch']['id']);if(_0x4db1ec[_0x3d22ae(0x1fd)]!==_0x531736||_0x4db1ec[_0x3d22ae(0x222)]!==_0x5587c7||_0x4db1ec[_0x3d22ae(0x202)]!==_0x52b8e6)throw kbError(_0x3d22ae(0x21b),'The\x20received\x20update\x20state\x20contradicts\x20the\x20requested\x20changes.',_0x3d22ae(0x20a));}catch(_0x5a640f){if(!isPlatformTransportFailure(_0x5a640f))throw _0x5a640f;_0x3a0b9c=!![];}const _0x116a14=await verifyKbMutationReadback('update',_0x3a0b9c,()=>requireKb(_0x4b3ac7,_0x14c00a[_0x3d22ae(0x207)]['id'])),_0x4a215a=projectKb(_0x116a14),_0x382f23=_0x116a14[_0x3d22ae(0x1fd)]===_0x531736,_0x5aba93=_0x116a14[_0x3d22ae(0x222)]===_0x5587c7,_0x5a28cd=_0x116a14['version']===_0x52b8e6&&(!_0x4db1ec||_0x116a14['id']===_0x4db1ec['id']&&_0x116a14[_0x3d22ae(0x202)]===_0x4db1ec['version']),_0x24be5f=!_0x3a0b9c||_0x14c00a['replacement']!==undefined||_0x14c00a[_0x3d22ae(0x207)]['title']===undefined||_0x14c00a[_0x3d22ae(0x1fa)][_0x3d22ae(0x1fd)]!==_0x14c00a[_0x3d22ae(0x207)][_0x3d22ae(0x1fd)];if(!_0x382f23||!_0x5aba93||!_0x5a28cd||!_0x24be5f)throw kbError(_0x3a0b9c?_0x3d22ae(0x221):_0x3d22ae(0x21b),_0x3d22ae(0x1f6)+_0x14c00a[_0x3d22ae(0x207)]['id']+'\x20does\x20not\x20prove\x20the\x20requested\x20update\x20state.',_0x3d22ae(0x1fb)+_0x14c00a[_0x3d22ae(0x207)]['id']+_0x3d22ae(0x20d));const _0x573a4c=[];return _0x3a0b9c&&_0x573a4c[_0x3d22ae(0x213)]('Update\x20response\x20was\x20unavailable;\x20verified\x20applicable\x20postconditions\x20by\x20exact\x20ID\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':'update','selector':{'id':_0x4a215a['id'],'scope':_0x3d22ae(0x206),'appCode':_0x4a215a[_0x3d22ae(0x21a)]},'before':_0x14c00a[_0x3d22ae(0x226)],'after':_0x4a215a,'dryRun':![],'backend':{'method':_0x3d22ae(0x217),'path':knowledgeDocumentsPath(_0x3d22ae(0x206),_0x3d22ae(0x224))},'warnings':_0x573a4c,'verification':{'status':_0x3d22ae(0x218),'recoveredAfterUnknownResponse':_0x3a0b9c,'expectedVersion':_0x14c00a['beforeRecord'][_0x3d22ae(0x202)],'atomicCompareAndSet':!![],'lookupCommand':_0x3d22ae(0x1fe)+_0x4a215a['id']+_0x3d22ae(0x212)}},'message':'Updated\x20company\x20knowledge\x20base\x20'+_0x4a215a['id']};}};
|