@hcmai/sdk 0.27.2 → 0.27.3

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/dist/index.d.ts CHANGED
@@ -2834,6 +2834,13 @@ declare function validateWorkspaceFiles(http: AxiosInstance, workspaceKey: strin
2834
2834
  declare function deleteWorkspaceFile(http: AxiosInstance, fileId: string): Promise<void>;
2835
2835
  declare function isWorkspaceRelativePath(value: unknown): value is string;
2836
2836
 
2837
+ /**
2838
+ * 轻应用编码规则,与服务端 core `TenantMiniAppCatalog.APP_CODE_PATTERN`(`[A-Za-z0-9-]+`)逐字一致:
2839
+ * 字母、数字、中横线;**保留并区分大小写**,不做归一化——远端路径 `mini_apps/<编码>/` 与菜单
2840
+ * `routePath=/custom/<编码>` 都按原样引用编码,改写大小写就会指向另一个应用。
2841
+ * 此前 CLI 限成 `^[a-z][a-z0-9-]*$`,比服务端严:大写编码(如 CPT-COCKPIT)的应用拉不下来也推不上去(cli#419)。
2842
+ */
2843
+ declare const MINI_APP_CODE_PATTERN: RegExp;
2837
2844
  interface MiniInitArgs {
2838
2845
  appCode: string;
2839
2846
  workspaceKey: string;
@@ -2905,6 +2912,19 @@ declare function buildMiniVerifyAgentReport(report: MiniVerifyReport): MiniVerif
2905
2912
  declare function formatMiniVerifyReport(report: MiniVerifyReport): string;
2906
2913
  declare function readMiniContext(rootDir: string): Promise<MiniProjectContext>;
2907
2914
  declare function readPullManifest(rootDir: string): Promise<MiniPullManifest>;
2915
+ /**
2916
+ * 找出只差大小写的轻应用编码组(每组按原样列出全部写法,组内与组间都排好序)。
2917
+ *
2918
+ * 服务端区分大小写,同一空间里允许 `CPT-COCKPIT` 与 `cpt-cockpit` 并存;而 macOS / Windows
2919
+ * 默认的本地文件系统不区分大小写,两者会写进同一个目录、互相覆盖,push 时再把混出来的结果写回其中一个。
2920
+ * 调用方拿到非空结果就必须在写任何文件之前停下。
2921
+ */
2922
+ declare function findMiniAppCodeCaseCollisions(codes: Iterable<string>): string[][];
2923
+ /**
2924
+ * pull 前要拦的撞名组:远端编码之间、远端编码与本地已有目录之间只差大小写的组。
2925
+ * 只在本地目录之间的撞名(区分大小写的文件系统上可以并存)与这次 pull 无关,不拦。
2926
+ */
2927
+ declare function findPullMiniAppCodeCaseCollisions(remoteCodes: Iterable<string>, localCodes: Iterable<string>): string[][];
2908
2928
 
2909
2929
  interface MiniTemplateArgs {
2910
2930
  appCode: string;
@@ -7168,4 +7188,4 @@ type ParsedRef = {
7168
7188
  declare function parseRef(raw: string, project: string, casesSlug?: string): ParsedRef | null;
7169
7189
  declare const firstLine: (s: string) => string;
7170
7190
 
7171
- export { ADVISORY_CODES, AGREEING_VERDICTS, APPLY_CAVEAT, APPLY_PROBLEM_CODES, PROBLEM_CODES as ARTIFACT_PROBLEM_CODES, AUTH_INFO_PATH, AUTH_SESSION_INFO_PATH, type ActionEffectClass, type ActionHttpMethod, type ActionInput, type ActionMeta, type ActionResult, type ActionScope, type AdminResetPasswordRequest, type AdminResetPasswordResult, type AnyStreamEvent, ApplyInvariantError, ApplyPremiseError, type ApplyReport, type ApprovalConfirmPayload, type ApprovalRejectPayload, type ArtifactInstallClient, type AttachmentMeta, type AuthScheme, BINDING_RESTORED, BINDING_STATES, BINDING_STILL_UNBOUND, BINDING_UNKNOWN, BINDING_UNTOUCHED, BINDING_WORDS, BLIND_SPOTS, BLOCKING_CODES, BUCKETS, type BaselineCandidate, type BindingState, type BootstrapReconcileResult, type BootstrapTenantRequest, type BootstrapTenantResult, type BrowserAuthorization, type BrowserAuthorizationWatch, type BrowserStatusProbe, CARRIER_BLIND, CARRIER_HIT, CARRIER_KEYS, CARRIER_LABELS, CARRIER_MISS, CARRIER_UNAVAILABLE, CARRIER_VERDICTS, CASES_REPO_SLUG, CASES_REPO_URL, CAUSE_INCOMPLETE_CURRENT, CHANGE_NOT_WRITTEN, CHANGE_STATES, CHANGE_UNKNOWN, CHANGE_WRITTEN, CHECK_GROUPS, CLI_AUTHORIZE_PATH, CLI_EXCHANGE_PATH, CLI_STATUS_PATH, CLI_VERIFICATION_PATH, CNB_FAVICON_URL, CNB_ORIGIN, CODE_BINDING_ELSEWHERE, CODE_BINDING_OFF, CODE_BINDING_UNREADABLE, CODE_COMMANDS, CODE_FIELDS_MISSING, CODE_FIELDS_UNREADABLE, CODE_NOT_ON_ACTIVE, CODE_NO_FIELDS_NAMED, CODE_PROBE_UNAUTHENTICATED, CODE_PROBE_UNREADABLE, CODE_RESTORE_NOT_EFFECTIVE, CODE_RESTORE_READBACK_UNREADABLE, CODE_RESTORE_REFUSED, CODE_STEP, CODE_UNBIND_NOT_EFFECTIVE, CODE_UNBIND_READBACK_UNREADABLE, CODE_UNBIND_REFUSED, CODE_WORDS, COLUMN_SLOT_REBIND_SQL_KEYS, COLUMN_SLOT_SQL_KEYS, CONTROL_BUFFER_LIMIT, CREDENTIAL_STORE_MODES, type CacheClearResult, type CacheStats, type CarrierKey, type CarrierResult, type CarrierVerdict, type CarryOver, type Catalog, type ChangePasswordInput, type ChangeState, type ChironCategory, type ChironManifest, type ChironSkill, type ChironSkillFile, type ChironStage, type ClearMetaCacheOpts, type CliAuthorizationRejection, type CliAuthorizationSession, CliError, CliErrorCode, type CliErrorInit, type ClientAuthContext, type ClientCredentialsInput, type ColumnSlotAvailability, type ColumnSlotRef, type ColumnSlotRequestOpts, type ColumnSlotSqlKey, type ColumnSlotSqlParams, type ColumnSlotSqlView, type ColumnSlotsView, type ConnectionMessage, type ControlChannelEnvelope, type ConversationListItem, type ConversationListResult, type ConversationState, type CreateResult, type CreatedConversation, type CredentialStoreMode, DATA_PACKAGE_FIXTURE_SCHEMA_V1, DATA_PACKAGE_MODELS, DEBT_PREFIX, DEBT_UNKNOWN, DEFAULT_AGENT_ID, DEFAULT_ARTIFACT_CATEGORY, DEFAULT_SESSION_TTL_SECONDS, PREMISE_CODES as DELIVERY_PREMISE_CODES, DEV_MODE_PATH, DIMENSION_LABELS, DRY_RUN_NOTE, DRY_RUN_TAIL, type DataPackageInstallRunView, type DataPackageInstallView, type Premise$1 as DeliveryPremise, type DeliveryRun, type DescribeOpts, type DeviceAuthorization, DriftDetected, EFFECT_ACCOUNTING_ONLY, EFFECT_READ_ONLY, EFFECT_UNKNOWN, EFFECT_WRITES, ENUM_SHOW, ENV_FILE, EXEMPTIBLE_CODES, EXEMPTION_CODES, EXEMPTION_REQUIRED_KEYS, EXTENSION_SOURCE_HEADER, type EndpointNormalization, type EnvConfig, type EnvSource, type EnvironmentSafety, ExitCode, FIND_LIMIT, MAX_BYTES as FIND_MAX_BYTES, FORCE_STALE_FLAG, FORCE_STALE_FLAG_TEXT, type FieldEnumValue, type FieldMeta, type Finding, type Fingerprint, type Fixture, type FormatOptions, GATE_COMPONENTS, type GlobalConfig, HANDSHAKE_AUTH_ERROR_HEADER, HANDSHAKE_CONVERSATION_QUERY_PARAM, HANDSHAKE_TOKEN_QUERY_PARAM, HCM_FIELD_RAW_KEYS, HCM_LANG_ENV, HcmClient, type HcmClientOpts, type HttpClientOptions, IMPERSONATION_ACTIVE_PATH, IMPERSONATION_START_PATH, IMPORT_PLAN_FILE, INIT_EXIT_CODES, type IdentityMeta, type ImportClient, type ImportOptions, type ImportPlan, type ImportResult, type InitExitName, type InstallAcceptedResult, type InstallArtifactResult, type InteractionAnswerPayload, type InteractionDecision, type InteractionOutcome, type InteractionRequest, type InteractionResolved, JIRA_BASE, JIRA_KEYCHAIN, JIRA_PROJECT, JIRA_TOKEN_FILE, JOURNAL_FILE, JOURNAL_STOP_KINDS, JOURNAL_STOP_UNKNOWN, type JiraAllowedValue, JiraClient, type JiraClientOptions, type JiraComment, type JiraFieldMeta, type JiraFields, type JiraHistory, JiraHttpError, type JiraIssue, type JiraIssueTypeMeta, type JiraNamed, JiraNonBmpContentError, type JiraProject, type JiraRemoteLink, type JiraStatusFlow, type JiraTokenLookup, type JiraTokenSource, type JiraTransition, type JiraTransitionField, type JiraUser, Journal, JournalError, KIT_CARRY_OVER_KEY, KIT_CRAWLED_AT_FILE, KIT_MATCHED_ON, type KeyResolution, LAYER_ACTIVE, LEASE_FILE, LEDGER_MISSING_WORD, LEDGER_ONLY_FLAG, type LastAssistantTarget, LayoutContainmentError, Lease, LeaseViolation, type LifecycleResult, type ListTenantMetaOpts, type LoginOutcome, MANIFEST_PATH, MAPPING_FILE, MAX_MANIFEST_PAGES, MAX_SOURCE_PROBES, META_CACHE_PATH, META_JOURNAL_FILE, META_PATH, META_SCHEMA_SOURCE_COMMIT, STEPS as META_VERIFY_STEPS, STEP_DIFF as META_VERIFY_STEP_DIFF, STEPS$1 as META_WRITE_STEPS, METHOD_REPO_DISPLAY, METHOD_REPO_SLUG, METHOD_REPO_URL, MINI_RUNTIME_SDK_VERSION as MINI_APP_RUNTIME_SDK_VERSION, MINI_CONTEXT_FILE, MINI_CONTEXT_KIND, MINI_CONTEXT_VERSION, MINI_PULL_MANIFEST_FILE, MINI_REMOTE_ROOT, MINI_RUNTIME_SDK_VERSION, MINI_STATE_DIR, MODELS_PATH, MODEL_META_PATH, MappingError, type MessageClass, type MessageCreatePayload, type MessageStreamHandle, type MetaClient, type MetaIssue, type MetaIssueSeverity, type StepResult as MetaStepResult, type MetaValidationResult, type MigrationSummary, type MiniFileSnapshot, type MiniInitArgs, type MiniLocalFile, type MiniLocalStatus, type MiniPreviewTarget, type MiniProjectContext, type MiniPullArgs, type MiniPullManifest, type MiniPullResult, type MiniPushArgs, type MiniPushConflict, type MiniPushOperation, type MiniPushPlanItem, type MiniPushResult, type MiniSmokeCheckArgs, type MiniSmokeFetch, type MiniSmokeFetchResponse, type MiniSmokeResult, type MiniSmokeTargetKind, type MiniSmokeTargetResult, type MiniStatusEntry, type MiniSurface, type MiniTemplateArgs, type MiniTemplateKind, type MiniValidationResult, type MiniVerifyAgentReport, type MiniVerifyBrowserAcceptance, type MiniVerifyChangedFile, type MiniVerifyNextAction, type MiniVerifyPlan, type MiniVerifyPreflight, type MiniVerifyPreviewUrl, type MiniVerifyReport, type MiniVerifySummary, type MiniWritableTemplateConfig, type ModelDescription, type ModelEntry, type ModelQueryDsl, NETWORK_GATES, NEXT_STEP, NON_BMP_RULE_NOTE, NOT_COVERED_LAYER1, NOT_COVERED_LAYER2, NOT_COVERED_SELF, type NonBmpHit, OFFLINE_COMMANDS, ON_EXISTING, type OccupiedColumnSlot, type OneShotOpts, type OneShotResult, type OneShotToolCall, type Outcome, type OutputFormat, PASSWORD_CHANGE_REQUIRED, PLAN_JSON_KEYS, PLAN_PROBLEM_CODES, PREMISES, PREMISE_CLIENT, PREMISE_IDENTITY, PREMISE_JOURNAL_HAS_ENTRIES, PREMISE_JOURNAL_ON_DISK, PREMISE_KEY_FIELDS, PREMISE_PLAN_READABLE, PREMISE_ROWS_TO_CHECK, PREMISE_UNMET, PREMISE_WORDS, PROACTIVE_REFRESH_MARGIN_SECONDS, PRODUCT_STATE_WORDS, type PackOptions, type PackResult, type PairingLoginInput, type ParsedPlaceholder, type ParsedRef, type PasswordChangeChallenge, type PasswordLoginInput, type PatLoginInput, type PendingInteraction, type PlanProblem, PlanReadError, type PlannedRow, type Principal, type ProfileConfig, type ProjectEnv, type ProjectEnvFile, type QueryResult, type QueryWarning, RC_DECIDING_FIELDS, RC_DECIDING_REPORT_FIELDS, REASON_BASELINE_ROUND_NOT_COMPLETE, VERDICTS$1 as RECONCILE_VERDICTS, RECOVERY_WORDS, REJECTED_BEFORE_ROUTING_CODE, REQUIRED_SECTIONS, RESPOND_TIMEOUT_MS, RESTORE_CODES, RISK_CODES, RISK_FILE, ROUND_ANCHORS, ROUND_EXIT_CODES, ROUND_STAMPED_PRODUCTS, ROUND_STATES, ROUND_SUBCOMMAND, ROUND_WARNINGS, ROUND_WARNING_FALLBACK, type ReconIdentity, ReconLayout, type ReconProbe, type ReconSummary, type Reconciliation, RefStore, type RefreshInput, type RelationMeta, type RemoveResult, type RepoRef, type ResolvedEnvContext, type ResolvedProjectEnvironment, type ResponseCompletedPayload, type ResponseFailedPayload, type ResponsePartDeltaPayload, type ResponseStartedPayload, RestoreFailed, type ResumeSummary, type ResumeTurn, type Risk, type RiskProblem, type RoundPremise, type RoundResult, type RoundState, type RowResult, type RowStatus, type RunMetaChangeArgs, SDK_VERSION, SERVER_ERROR_GRACE_MS, STATUSES, STEP_NOTHING, STEP_PROBE, STEP_REBIND, STEP_RECORD, STEP_STOP, STEP_UNBIND, SUPERSEDED_STATUS, SYNTH_FOOTNOTE, SYNTH_MARK, type SaveMetaResult, type ScriptDryRunRequest, type ScriptDryRunResult, type ScriptLogPage, type ScriptLogQuery, type ScriptManifestValidationResult, type ScriptTaskView, type SeedPathArgs, type SendMessageOpts, type ServerErrorFrame, type SessionPrincipal, type SettingItem, type SettingWrite, type StreamCancelPayload, type StreamCommand, type StreamCommandEnvelope, type StreamCommandType, type StreamEventEnvelope, type StreamEventType, TEMP_ENV_NAME, TENANT_META_FILE_PATH, CONFIG as TRIAGE_CONFIG, GAP as TRIAGE_GAP, VERDICTS as TRIAGE_VERDICTS, TargetModelNotFound, type TaskProgressPayload, type TenantMetaEntry, type TenantReconcileReceipt, type TenantResetReceipt, type TimelineItemLite, type TokenRecord, TokenStore, type ToolCallFailedPayload, type ToolCallResultPayload, type ToolCallStartedPayload, type TriageEntry, type TriageProblem, type TriageProblemRow, type TriageRoundResult, type TriageVerdict, USER_LOOKUP_PATH, type UndeterminedReason, type V4RenderSink, type V4StreamEventType, VALUE_CELL_MISSING, VALUE_FOOTNOTE, VALUE_STATE_DISABLED, VALUE_STATE_FOOTNOTE, VALUE_STATE_UNKNOWN, VERDICTS$2 as VERDICTS, VERDICT_DIVERGED, VERDICT_INCOMPARABLE, VERDICT_SAME, VERDICT_WORDS, CODES as VERIFY_ACTIVE_CODES, VERIFY_CODES, VERIFY_CRASHED, VERIFY_OK, VERIFY_WORDS, VERSION_PATH, ValueHints, type ValuesResult, type VerifyResult, WAIVER_REPLAY, WARNED_ROUND_STATES, WORKSPACES_PATH, WORKSPACE_DELIVERY_PROTOCOL, WORKSPACE_KEY_HEADER, WORK_DIRNAME, WRITE_RECOVERY_WORDS, type WaitResult, WorkLayout, type WorkspaceFileContent, type WorkspaceFileItem, type WorkspaceFileListResult, type WorkspaceInspection, type WorkspacePreflightIssue, type WorkspacePreflightResult, WsClient, type WsClientOpts, absoluteDownloadUrl, acquireLease, adminResetPassword, applyPlan, applyRc, applyReportText, applyReportToJson, archiveDir, askedTheDatabase, assertDangerWrite, assertExpectedTenant, assertNotReservedEnvName, assertSafeReferencePath, assertSafeSkillFilePath, assertSafeSkillId, assertUsableEndpoint, baselineRoundPremise, bootstrapTenant, buildAnswer, buildCarrierResult, buildConfirm, buildDeliveryRun, buildHandshakeUrl, buildInterrupt, buildMiniAppTemplateFiles, buildMiniPreviewTargets, buildMiniVerifyAgentReport, buildReconciliation, buildReject, buildResumeSummary, buildSteer, camelizeKeys, changePassword, checkCoherence, classifyEffect, classifyMessage, classifyStatus, clearMetaCache, clearModelCache, cliAuthorizationExpired, collectMiniPushWrites, commandsFor, compareFingerprint, computeFingerprint, computeReconSourceKey, contentHash, conversationStateFile, conversationWebSocketEndpoint, create, createConversation, createHttpClient, createJiraClient, createV4Reducer, createWorkspaceFile, credentialsFile, defaultDownloadDir, defaultMiniRequiredScopes, deleteDocument, deleteEnv, deleteIdentity, deleteTenantMeta, deleteWorkspaceFile, deleteWorkspaceFileChecked, deliveryRunFields, deriveNamelessToolLabel, describeNonBmpHits, describePrincipal, describeWaiver, detectDelegationPause, detectDirectInteractionPending, detectPasswordChangeChallenge, diagnoseRejectedBeforeRouting, discardedColumnLines, discoverProjectEnv, displayWidth, downloadDocument, enforceDriftGate, ensureSessionFresh, envDir, envFile, envsDir, exchangeBrowserAuthorization, existingJournalStop, exitCodeFor, explainJacksonError, extractNextSteps, fetchConversationTimeline, fetchConversationTimelineStrict, fetchInstallRun, fetchRecentConversations, fetchReconIdentity, fetchSkillCatalog, fetchSkillFile, fetchSkillMarkdown, fetchSkillReference, fieldByName, filterByStage, find, findEnvByEndpoint, findLastAssistantSeq, findLastAssistantTarget, findNonBmpChars, firstLine, flattenSkills, formatMetaIssues, formatMiniVerifyReport, formatObject, formatRows, fromAxiosError, getCacheStats, getColumnSlotSql, getColumnSlots, getMiniStatus, getScriptTask, getSettingDomain, getTenantMeta, globalConfigFile, guessMimeType, handshakeRejectedError, hasPendingImpersonationSessions, hcmConfigDir, hitRank, httpProbe, identitiesDir, identityDir, identityKnown, identityMetaFile, inferMiniWritableTemplateOptionsFromModel, initMiniAppProject, inspectRound, inspectWorkspaceFiles, installDataPackageArtifact, installDataPackageArtifactAsync, isDelegationToolName, isLocalName, isReadOnly, isServerSlidingSession, isSha256, isSupersededItem, isTempEnv, isTerminalRunStatus, isWorkspaceRelativePath, isZeroNetwork, jiraTokenHelp, jiraTokenSource, jiraTokenUnreadable, journalNote, judgeDrift, layerDetail, ledgerOnlySignpost, linkedRepoRefs, listEnvs, listIdentities, listModels, listPendingInteractions, listProfiles, listTenantMeta, listWorkspaceFiles, loadCatalog, loadConversationState, loadEnv, loadExemptions, loadGlobalConfig, loadIdentity, loadMapping, loadProfile, loadRecordedFingerprint, loadRows, loadWorkspaceFileContent, loginClientCredentials, loginPairing, loginPassword, loginPat, matchNote, matchSkills, matchedDimensions, metaFileUrl, metaKindFromPath, migrateLegacyProfiles, modelEntries, modelKeys, needsRefresh, newRoundId, nonBmpHitLines, nonnegativeInteger, normalizeAndAssertEndpoint, normalizeEndpoint, normalizeOrigin, normalizeReferences, notAsked, oneShot, packDataPackage, parseConfirmToolName, parseEnvYaml, parseFixture, parseInteractionRequest, parseInteractionResolved, parsePlaceholder, parseRef, parseSettingAssignment, parseSkillFrontmatter, parseSkillRequirements, patchSettingDomain, planFromArtifacts, planProblemLines, planRc, planSummaryLine, planVsBaselinePremise, pollDeviceAuthorization, printResolvedEnvironment, probeAll, probeConversationHandshake, probeDoctorEndpoint, probeDoctorLayer, probeExtensionSource, profileDir, profileFile, pullMiniAppProject, pushMiniAppProject, queryScriptLogs, readImportPlan, readMiniContext, readPullManifest, readSessionPrincipal, readWorkspaceInspection, rebind, rebindPayload, reconcileTenant, refreshToken, releasePendingImpersonationSessions, remove, renameIdentity, renderEnvYaml, renderFind, renderRound, renderTriage, renderValues, replHistoryFile, repoIssueUrl, requestCliAuthorization, resetSettingItem, resetTenant, resolveActiveEnv, resolveActiveIdentity, resolveActiveProfile, resolveAllSkillsInstallOrder, resolveBaselineDir, resolveChironBase, resolveCredentialStoreMode, resolveEnvContext, resolveItemKeys, resolveProjectEnvironment, resolveRefs, resolveSkillInstallOrder, respondToInteraction, riskFromArtifacts, roundAge, roundWarning, runActiveVerify, runImport, runMetaChange, runMiniSmokeChecks, runRecon, runTriageRound, safeCliAuthorizationError, safeSegment, saveConversationState, saveEnv, saveGlobalConfig, saveIdentity, saveProfile, saveTenantMeta, saveWorkspaceFileContent, saveWorkspaceFileContentChecked, scriptDryRun, seedBaselines, seedMappingPath, seedWorkDir, sendMessageAndStream, shelfPartition, snakeToCamel, startImpersonation, tenantSegment, toAcceptLanguage, toJson, toOrigin, toPrincipal, toTable, toYaml, truncateDisplay, unbindPayload, update, uploadDocument, validateCliAuthorizationUrl, validateMetaContent, validateMiniProject, validateScriptManifest, validateWorkspaceFiles, valueState, valuesRoundCaveat, verifyAttention, verifyRc, verifyText, waitForInstallRun, watchBrowserAuthorization, workspaceActionPayload, workspaceDeliveryError, workspaceLayer, workspaceObjectActionBase, writeChangeState, writeImportPlan, writeRisk };
7191
+ export { ADVISORY_CODES, AGREEING_VERDICTS, APPLY_CAVEAT, APPLY_PROBLEM_CODES, PROBLEM_CODES as ARTIFACT_PROBLEM_CODES, AUTH_INFO_PATH, AUTH_SESSION_INFO_PATH, type ActionEffectClass, type ActionHttpMethod, type ActionInput, type ActionMeta, type ActionResult, type ActionScope, type AdminResetPasswordRequest, type AdminResetPasswordResult, type AnyStreamEvent, ApplyInvariantError, ApplyPremiseError, type ApplyReport, type ApprovalConfirmPayload, type ApprovalRejectPayload, type ArtifactInstallClient, type AttachmentMeta, type AuthScheme, BINDING_RESTORED, BINDING_STATES, BINDING_STILL_UNBOUND, BINDING_UNKNOWN, BINDING_UNTOUCHED, BINDING_WORDS, BLIND_SPOTS, BLOCKING_CODES, BUCKETS, type BaselineCandidate, type BindingState, type BootstrapReconcileResult, type BootstrapTenantRequest, type BootstrapTenantResult, type BrowserAuthorization, type BrowserAuthorizationWatch, type BrowserStatusProbe, CARRIER_BLIND, CARRIER_HIT, CARRIER_KEYS, CARRIER_LABELS, CARRIER_MISS, CARRIER_UNAVAILABLE, CARRIER_VERDICTS, CASES_REPO_SLUG, CASES_REPO_URL, CAUSE_INCOMPLETE_CURRENT, CHANGE_NOT_WRITTEN, CHANGE_STATES, CHANGE_UNKNOWN, CHANGE_WRITTEN, CHECK_GROUPS, CLI_AUTHORIZE_PATH, CLI_EXCHANGE_PATH, CLI_STATUS_PATH, CLI_VERIFICATION_PATH, CNB_FAVICON_URL, CNB_ORIGIN, CODE_BINDING_ELSEWHERE, CODE_BINDING_OFF, CODE_BINDING_UNREADABLE, CODE_COMMANDS, CODE_FIELDS_MISSING, CODE_FIELDS_UNREADABLE, CODE_NOT_ON_ACTIVE, CODE_NO_FIELDS_NAMED, CODE_PROBE_UNAUTHENTICATED, CODE_PROBE_UNREADABLE, CODE_RESTORE_NOT_EFFECTIVE, CODE_RESTORE_READBACK_UNREADABLE, CODE_RESTORE_REFUSED, CODE_STEP, CODE_UNBIND_NOT_EFFECTIVE, CODE_UNBIND_READBACK_UNREADABLE, CODE_UNBIND_REFUSED, CODE_WORDS, COLUMN_SLOT_REBIND_SQL_KEYS, COLUMN_SLOT_SQL_KEYS, CONTROL_BUFFER_LIMIT, CREDENTIAL_STORE_MODES, type CacheClearResult, type CacheStats, type CarrierKey, type CarrierResult, type CarrierVerdict, type CarryOver, type Catalog, type ChangePasswordInput, type ChangeState, type ChironCategory, type ChironManifest, type ChironSkill, type ChironSkillFile, type ChironStage, type ClearMetaCacheOpts, type CliAuthorizationRejection, type CliAuthorizationSession, CliError, CliErrorCode, type CliErrorInit, type ClientAuthContext, type ClientCredentialsInput, type ColumnSlotAvailability, type ColumnSlotRef, type ColumnSlotRequestOpts, type ColumnSlotSqlKey, type ColumnSlotSqlParams, type ColumnSlotSqlView, type ColumnSlotsView, type ConnectionMessage, type ControlChannelEnvelope, type ConversationListItem, type ConversationListResult, type ConversationState, type CreateResult, type CreatedConversation, type CredentialStoreMode, DATA_PACKAGE_FIXTURE_SCHEMA_V1, DATA_PACKAGE_MODELS, DEBT_PREFIX, DEBT_UNKNOWN, DEFAULT_AGENT_ID, DEFAULT_ARTIFACT_CATEGORY, DEFAULT_SESSION_TTL_SECONDS, PREMISE_CODES as DELIVERY_PREMISE_CODES, DEV_MODE_PATH, DIMENSION_LABELS, DRY_RUN_NOTE, DRY_RUN_TAIL, type DataPackageInstallRunView, type DataPackageInstallView, type Premise$1 as DeliveryPremise, type DeliveryRun, type DescribeOpts, type DeviceAuthorization, DriftDetected, EFFECT_ACCOUNTING_ONLY, EFFECT_READ_ONLY, EFFECT_UNKNOWN, EFFECT_WRITES, ENUM_SHOW, ENV_FILE, EXEMPTIBLE_CODES, EXEMPTION_CODES, EXEMPTION_REQUIRED_KEYS, EXTENSION_SOURCE_HEADER, type EndpointNormalization, type EnvConfig, type EnvSource, type EnvironmentSafety, ExitCode, FIND_LIMIT, MAX_BYTES as FIND_MAX_BYTES, FORCE_STALE_FLAG, FORCE_STALE_FLAG_TEXT, type FieldEnumValue, type FieldMeta, type Finding, type Fingerprint, type Fixture, type FormatOptions, GATE_COMPONENTS, type GlobalConfig, HANDSHAKE_AUTH_ERROR_HEADER, HANDSHAKE_CONVERSATION_QUERY_PARAM, HANDSHAKE_TOKEN_QUERY_PARAM, HCM_FIELD_RAW_KEYS, HCM_LANG_ENV, HcmClient, type HcmClientOpts, type HttpClientOptions, IMPERSONATION_ACTIVE_PATH, IMPERSONATION_START_PATH, IMPORT_PLAN_FILE, INIT_EXIT_CODES, type IdentityMeta, type ImportClient, type ImportOptions, type ImportPlan, type ImportResult, type InitExitName, type InstallAcceptedResult, type InstallArtifactResult, type InteractionAnswerPayload, type InteractionDecision, type InteractionOutcome, type InteractionRequest, type InteractionResolved, JIRA_BASE, JIRA_KEYCHAIN, JIRA_PROJECT, JIRA_TOKEN_FILE, JOURNAL_FILE, JOURNAL_STOP_KINDS, JOURNAL_STOP_UNKNOWN, type JiraAllowedValue, JiraClient, type JiraClientOptions, type JiraComment, type JiraFieldMeta, type JiraFields, type JiraHistory, JiraHttpError, type JiraIssue, type JiraIssueTypeMeta, type JiraNamed, JiraNonBmpContentError, type JiraProject, type JiraRemoteLink, type JiraStatusFlow, type JiraTokenLookup, type JiraTokenSource, type JiraTransition, type JiraTransitionField, type JiraUser, Journal, JournalError, KIT_CARRY_OVER_KEY, KIT_CRAWLED_AT_FILE, KIT_MATCHED_ON, type KeyResolution, LAYER_ACTIVE, LEASE_FILE, LEDGER_MISSING_WORD, LEDGER_ONLY_FLAG, type LastAssistantTarget, LayoutContainmentError, Lease, LeaseViolation, type LifecycleResult, type ListTenantMetaOpts, type LoginOutcome, MANIFEST_PATH, MAPPING_FILE, MAX_MANIFEST_PAGES, MAX_SOURCE_PROBES, META_CACHE_PATH, META_JOURNAL_FILE, META_PATH, META_SCHEMA_SOURCE_COMMIT, STEPS as META_VERIFY_STEPS, STEP_DIFF as META_VERIFY_STEP_DIFF, STEPS$1 as META_WRITE_STEPS, METHOD_REPO_DISPLAY, METHOD_REPO_SLUG, METHOD_REPO_URL, MINI_APP_CODE_PATTERN, MINI_RUNTIME_SDK_VERSION as MINI_APP_RUNTIME_SDK_VERSION, MINI_CONTEXT_FILE, MINI_CONTEXT_KIND, MINI_CONTEXT_VERSION, MINI_PULL_MANIFEST_FILE, MINI_REMOTE_ROOT, MINI_RUNTIME_SDK_VERSION, MINI_STATE_DIR, MODELS_PATH, MODEL_META_PATH, MappingError, type MessageClass, type MessageCreatePayload, type MessageStreamHandle, type MetaClient, type MetaIssue, type MetaIssueSeverity, type StepResult as MetaStepResult, type MetaValidationResult, type MigrationSummary, type MiniFileSnapshot, type MiniInitArgs, type MiniLocalFile, type MiniLocalStatus, type MiniPreviewTarget, type MiniProjectContext, type MiniPullArgs, type MiniPullManifest, type MiniPullResult, type MiniPushArgs, type MiniPushConflict, type MiniPushOperation, type MiniPushPlanItem, type MiniPushResult, type MiniSmokeCheckArgs, type MiniSmokeFetch, type MiniSmokeFetchResponse, type MiniSmokeResult, type MiniSmokeTargetKind, type MiniSmokeTargetResult, type MiniStatusEntry, type MiniSurface, type MiniTemplateArgs, type MiniTemplateKind, type MiniValidationResult, type MiniVerifyAgentReport, type MiniVerifyBrowserAcceptance, type MiniVerifyChangedFile, type MiniVerifyNextAction, type MiniVerifyPlan, type MiniVerifyPreflight, type MiniVerifyPreviewUrl, type MiniVerifyReport, type MiniVerifySummary, type MiniWritableTemplateConfig, type ModelDescription, type ModelEntry, type ModelQueryDsl, NETWORK_GATES, NEXT_STEP, NON_BMP_RULE_NOTE, NOT_COVERED_LAYER1, NOT_COVERED_LAYER2, NOT_COVERED_SELF, type NonBmpHit, OFFLINE_COMMANDS, ON_EXISTING, type OccupiedColumnSlot, type OneShotOpts, type OneShotResult, type OneShotToolCall, type Outcome, type OutputFormat, PASSWORD_CHANGE_REQUIRED, PLAN_JSON_KEYS, PLAN_PROBLEM_CODES, PREMISES, PREMISE_CLIENT, PREMISE_IDENTITY, PREMISE_JOURNAL_HAS_ENTRIES, PREMISE_JOURNAL_ON_DISK, PREMISE_KEY_FIELDS, PREMISE_PLAN_READABLE, PREMISE_ROWS_TO_CHECK, PREMISE_UNMET, PREMISE_WORDS, PROACTIVE_REFRESH_MARGIN_SECONDS, PRODUCT_STATE_WORDS, type PackOptions, type PackResult, type PairingLoginInput, type ParsedPlaceholder, type ParsedRef, type PasswordChangeChallenge, type PasswordLoginInput, type PatLoginInput, type PendingInteraction, type PlanProblem, PlanReadError, type PlannedRow, type Principal, type ProfileConfig, type ProjectEnv, type ProjectEnvFile, type QueryResult, type QueryWarning, RC_DECIDING_FIELDS, RC_DECIDING_REPORT_FIELDS, REASON_BASELINE_ROUND_NOT_COMPLETE, VERDICTS$1 as RECONCILE_VERDICTS, RECOVERY_WORDS, REJECTED_BEFORE_ROUTING_CODE, REQUIRED_SECTIONS, RESPOND_TIMEOUT_MS, RESTORE_CODES, RISK_CODES, RISK_FILE, ROUND_ANCHORS, ROUND_EXIT_CODES, ROUND_STAMPED_PRODUCTS, ROUND_STATES, ROUND_SUBCOMMAND, ROUND_WARNINGS, ROUND_WARNING_FALLBACK, type ReconIdentity, ReconLayout, type ReconProbe, type ReconSummary, type Reconciliation, RefStore, type RefreshInput, type RelationMeta, type RemoveResult, type RepoRef, type ResolvedEnvContext, type ResolvedProjectEnvironment, type ResponseCompletedPayload, type ResponseFailedPayload, type ResponsePartDeltaPayload, type ResponseStartedPayload, RestoreFailed, type ResumeSummary, type ResumeTurn, type Risk, type RiskProblem, type RoundPremise, type RoundResult, type RoundState, type RowResult, type RowStatus, type RunMetaChangeArgs, SDK_VERSION, SERVER_ERROR_GRACE_MS, STATUSES, STEP_NOTHING, STEP_PROBE, STEP_REBIND, STEP_RECORD, STEP_STOP, STEP_UNBIND, SUPERSEDED_STATUS, SYNTH_FOOTNOTE, SYNTH_MARK, type SaveMetaResult, type ScriptDryRunRequest, type ScriptDryRunResult, type ScriptLogPage, type ScriptLogQuery, type ScriptManifestValidationResult, type ScriptTaskView, type SeedPathArgs, type SendMessageOpts, type ServerErrorFrame, type SessionPrincipal, type SettingItem, type SettingWrite, type StreamCancelPayload, type StreamCommand, type StreamCommandEnvelope, type StreamCommandType, type StreamEventEnvelope, type StreamEventType, TEMP_ENV_NAME, TENANT_META_FILE_PATH, CONFIG as TRIAGE_CONFIG, GAP as TRIAGE_GAP, VERDICTS as TRIAGE_VERDICTS, TargetModelNotFound, type TaskProgressPayload, type TenantMetaEntry, type TenantReconcileReceipt, type TenantResetReceipt, type TimelineItemLite, type TokenRecord, TokenStore, type ToolCallFailedPayload, type ToolCallResultPayload, type ToolCallStartedPayload, type TriageEntry, type TriageProblem, type TriageProblemRow, type TriageRoundResult, type TriageVerdict, USER_LOOKUP_PATH, type UndeterminedReason, type V4RenderSink, type V4StreamEventType, VALUE_CELL_MISSING, VALUE_FOOTNOTE, VALUE_STATE_DISABLED, VALUE_STATE_FOOTNOTE, VALUE_STATE_UNKNOWN, VERDICTS$2 as VERDICTS, VERDICT_DIVERGED, VERDICT_INCOMPARABLE, VERDICT_SAME, VERDICT_WORDS, CODES as VERIFY_ACTIVE_CODES, VERIFY_CODES, VERIFY_CRASHED, VERIFY_OK, VERIFY_WORDS, VERSION_PATH, ValueHints, type ValuesResult, type VerifyResult, WAIVER_REPLAY, WARNED_ROUND_STATES, WORKSPACES_PATH, WORKSPACE_DELIVERY_PROTOCOL, WORKSPACE_KEY_HEADER, WORK_DIRNAME, WRITE_RECOVERY_WORDS, type WaitResult, WorkLayout, type WorkspaceFileContent, type WorkspaceFileItem, type WorkspaceFileListResult, type WorkspaceInspection, type WorkspacePreflightIssue, type WorkspacePreflightResult, WsClient, type WsClientOpts, absoluteDownloadUrl, acquireLease, adminResetPassword, applyPlan, applyRc, applyReportText, applyReportToJson, archiveDir, askedTheDatabase, assertDangerWrite, assertExpectedTenant, assertNotReservedEnvName, assertSafeReferencePath, assertSafeSkillFilePath, assertSafeSkillId, assertUsableEndpoint, baselineRoundPremise, bootstrapTenant, buildAnswer, buildCarrierResult, buildConfirm, buildDeliveryRun, buildHandshakeUrl, buildInterrupt, buildMiniAppTemplateFiles, buildMiniPreviewTargets, buildMiniVerifyAgentReport, buildReconciliation, buildReject, buildResumeSummary, buildSteer, camelizeKeys, changePassword, checkCoherence, classifyEffect, classifyMessage, classifyStatus, clearMetaCache, clearModelCache, cliAuthorizationExpired, collectMiniPushWrites, commandsFor, compareFingerprint, computeFingerprint, computeReconSourceKey, contentHash, conversationStateFile, conversationWebSocketEndpoint, create, createConversation, createHttpClient, createJiraClient, createV4Reducer, createWorkspaceFile, credentialsFile, defaultDownloadDir, defaultMiniRequiredScopes, deleteDocument, deleteEnv, deleteIdentity, deleteTenantMeta, deleteWorkspaceFile, deleteWorkspaceFileChecked, deliveryRunFields, deriveNamelessToolLabel, describeNonBmpHits, describePrincipal, describeWaiver, detectDelegationPause, detectDirectInteractionPending, detectPasswordChangeChallenge, diagnoseRejectedBeforeRouting, discardedColumnLines, discoverProjectEnv, displayWidth, downloadDocument, enforceDriftGate, ensureSessionFresh, envDir, envFile, envsDir, exchangeBrowserAuthorization, existingJournalStop, exitCodeFor, explainJacksonError, extractNextSteps, fetchConversationTimeline, fetchConversationTimelineStrict, fetchInstallRun, fetchRecentConversations, fetchReconIdentity, fetchSkillCatalog, fetchSkillFile, fetchSkillMarkdown, fetchSkillReference, fieldByName, filterByStage, find, findEnvByEndpoint, findLastAssistantSeq, findLastAssistantTarget, findMiniAppCodeCaseCollisions, findNonBmpChars, findPullMiniAppCodeCaseCollisions, firstLine, flattenSkills, formatMetaIssues, formatMiniVerifyReport, formatObject, formatRows, fromAxiosError, getCacheStats, getColumnSlotSql, getColumnSlots, getMiniStatus, getScriptTask, getSettingDomain, getTenantMeta, globalConfigFile, guessMimeType, handshakeRejectedError, hasPendingImpersonationSessions, hcmConfigDir, hitRank, httpProbe, identitiesDir, identityDir, identityKnown, identityMetaFile, inferMiniWritableTemplateOptionsFromModel, initMiniAppProject, inspectRound, inspectWorkspaceFiles, installDataPackageArtifact, installDataPackageArtifactAsync, isDelegationToolName, isLocalName, isReadOnly, isServerSlidingSession, isSha256, isSupersededItem, isTempEnv, isTerminalRunStatus, isWorkspaceRelativePath, isZeroNetwork, jiraTokenHelp, jiraTokenSource, jiraTokenUnreadable, journalNote, judgeDrift, layerDetail, ledgerOnlySignpost, linkedRepoRefs, listEnvs, listIdentities, listModels, listPendingInteractions, listProfiles, listTenantMeta, listWorkspaceFiles, loadCatalog, loadConversationState, loadEnv, loadExemptions, loadGlobalConfig, loadIdentity, loadMapping, loadProfile, loadRecordedFingerprint, loadRows, loadWorkspaceFileContent, loginClientCredentials, loginPairing, loginPassword, loginPat, matchNote, matchSkills, matchedDimensions, metaFileUrl, metaKindFromPath, migrateLegacyProfiles, modelEntries, modelKeys, needsRefresh, newRoundId, nonBmpHitLines, nonnegativeInteger, normalizeAndAssertEndpoint, normalizeEndpoint, normalizeOrigin, normalizeReferences, notAsked, oneShot, packDataPackage, parseConfirmToolName, parseEnvYaml, parseFixture, parseInteractionRequest, parseInteractionResolved, parsePlaceholder, parseRef, parseSettingAssignment, parseSkillFrontmatter, parseSkillRequirements, patchSettingDomain, planFromArtifacts, planProblemLines, planRc, planSummaryLine, planVsBaselinePremise, pollDeviceAuthorization, printResolvedEnvironment, probeAll, probeConversationHandshake, probeDoctorEndpoint, probeDoctorLayer, probeExtensionSource, profileDir, profileFile, pullMiniAppProject, pushMiniAppProject, queryScriptLogs, readImportPlan, readMiniContext, readPullManifest, readSessionPrincipal, readWorkspaceInspection, rebind, rebindPayload, reconcileTenant, refreshToken, releasePendingImpersonationSessions, remove, renameIdentity, renderEnvYaml, renderFind, renderRound, renderTriage, renderValues, replHistoryFile, repoIssueUrl, requestCliAuthorization, resetSettingItem, resetTenant, resolveActiveEnv, resolveActiveIdentity, resolveActiveProfile, resolveAllSkillsInstallOrder, resolveBaselineDir, resolveChironBase, resolveCredentialStoreMode, resolveEnvContext, resolveItemKeys, resolveProjectEnvironment, resolveRefs, resolveSkillInstallOrder, respondToInteraction, riskFromArtifacts, roundAge, roundWarning, runActiveVerify, runImport, runMetaChange, runMiniSmokeChecks, runRecon, runTriageRound, safeCliAuthorizationError, safeSegment, saveConversationState, saveEnv, saveGlobalConfig, saveIdentity, saveProfile, saveTenantMeta, saveWorkspaceFileContent, saveWorkspaceFileContentChecked, scriptDryRun, seedBaselines, seedMappingPath, seedWorkDir, sendMessageAndStream, shelfPartition, snakeToCamel, startImpersonation, tenantSegment, toAcceptLanguage, toJson, toOrigin, toPrincipal, toTable, toYaml, truncateDisplay, unbindPayload, update, uploadDocument, validateCliAuthorizationUrl, validateMetaContent, validateMiniProject, validateScriptManifest, validateWorkspaceFiles, valueState, valuesRoundCaveat, verifyAttention, verifyRc, verifyText, waitForInstallRun, watchBrowserAuthorization, workspaceActionPayload, workspaceDeliveryError, workspaceLayer, workspaceObjectActionBase, writeChangeState, writeImportPlan, writeRisk };
package/dist/index.js CHANGED
@@ -6229,7 +6229,8 @@ export function unmount(container) {
6229
6229
  }
6230
6230
 
6231
6231
  // src/mini/project.ts
6232
- var MINI_APP_CODE_PATTERN = /^[a-z][a-z0-9-]*$/;
6232
+ var MINI_APP_CODE_PATTERN = /^[A-Za-z0-9-]+$/;
6233
+ var MINI_APP_CODE_RULE = "\u8F7B\u5E94\u7528\u7F16\u7801\u53EA\u80FD\u7531\u5B57\u6BCD\uFF08\u533A\u5206\u5927\u5C0F\u5199\uFF09\u3001\u6570\u5B57\u548C\u4E2D\u6A2A\u7EBF\u7EC4\u6210\uFF0C\u4E0E\u670D\u52A1\u7AEF\u89C4\u5219 ^[A-Za-z0-9-]+$ \u4E00\u81F4";
6233
6234
  var SCOPE_PATTERN = /^[A-Z][A-Za-z0-9_]*\.[a-z][A-Za-z0-9]*$/;
6234
6235
  var SEMVER_PATTERN = MINI_SEMVER_PATTERN;
6235
6236
  var TOP_LEVEL_MANIFEST_KEYS = /* @__PURE__ */ new Set([
@@ -6386,7 +6387,7 @@ async function validateMiniProject(rootDir) {
6386
6387
  }
6387
6388
  if (context) {
6388
6389
  if (!MINI_APP_CODE_PATTERN.test(context.appCode)) {
6389
- errors.push("appCode must match ^[a-z][a-z0-9-]*$");
6390
+ errors.push(`appCode '${context.appCode}' \u4E0D\u5408\u6CD5\uFF1A${MINI_APP_CODE_RULE}`);
6390
6391
  }
6391
6392
  if (context.remotePrefix !== miniRemotePrefix(context.appCode)) {
6392
6393
  errors.push(`context remotePrefix must be ${miniRemotePrefix(context.appCode)}`);
@@ -6852,7 +6853,7 @@ async function validateManifestObject(manifest2, context, root, errors, warnings
6852
6853
  if (!TOP_LEVEL_MANIFEST_KEYS.has(key)) errors.push(`manifest has unsupported key: ${key}`);
6853
6854
  }
6854
6855
  requireString(manifest2, "schemaVersion", errors, (value) => value === "1.0");
6855
- requireString(manifest2, "code", errors, (value) => /^[a-zA-Z0-9-]+$/.test(value));
6856
+ requireString(manifest2, "code", errors, (value) => MINI_APP_CODE_PATTERN.test(value));
6856
6857
  requireString(manifest2, "name", errors, (value) => value.trim().length > 0);
6857
6858
  requireString(manifest2, "version", errors, (value) => SEMVER_PATTERN.test(value));
6858
6859
  requireString(manifest2, "sdkVersion", errors, (value) => SEMVER_PATTERN.test(value));
@@ -7193,11 +7194,32 @@ function normalizeAppCode(value) {
7193
7194
  if (!MINI_APP_CODE_PATTERN.test(normalized)) {
7194
7195
  throw new CliError({
7195
7196
  code: "INVALID_ARGUMENT" /* INVALID_ARGUMENT */,
7196
- message: "appCode must match ^[a-z][a-z0-9-]*$"
7197
+ message: `appCode '${normalized}' \u4E0D\u5408\u6CD5\uFF1A${MINI_APP_CODE_RULE}`,
7198
+ context: {
7199
+ field: "appCode",
7200
+ reasonCode: "MINI_APP_CODE_INVALID",
7201
+ appCode: normalized,
7202
+ pattern: MINI_APP_CODE_PATTERN.source,
7203
+ nextStep: "\u628A\u7F16\u7801\u6539\u6210\u53EA\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u548C\u4E2D\u6A2A\u7EBF\uFF08\u4E0D\u63A5\u53D7\u4E0B\u5212\u7EBF\u3001\u7A7A\u683C\u3001\u659C\u6760\uFF09\uFF1B\u5DF2\u53D1\u5E03\u7684\u5E94\u7528\u4E0D\u8981\u6539\u7F16\u7801\uFF0C\u83DC\u5355\u4E0E\u5386\u53F2\u53D1\u5E03\u6309\u539F\u7F16\u7801\u5F15\u7528\u5B83\u3002"
7204
+ }
7197
7205
  });
7198
7206
  }
7199
7207
  return normalized;
7200
7208
  }
7209
+ function findMiniAppCodeCaseCollisions(codes) {
7210
+ const groups = /* @__PURE__ */ new Map();
7211
+ for (const code of codes) {
7212
+ const key = code.toLowerCase();
7213
+ const group = groups.get(key) ?? /* @__PURE__ */ new Set();
7214
+ group.add(code);
7215
+ groups.set(key, group);
7216
+ }
7217
+ return Array.from(groups.entries()).filter(([, group]) => group.size > 1).sort(([a], [b]) => a.localeCompare(b)).map(([, group]) => Array.from(group).sort());
7218
+ }
7219
+ function findPullMiniAppCodeCaseCollisions(remoteCodes, localCodes) {
7220
+ const remote = new Set(remoteCodes);
7221
+ return findMiniAppCodeCaseCollisions([...remote, ...localCodes]).filter((group) => group.some((code) => remote.has(code)));
7222
+ }
7201
7223
  function normalizeWorkspaceKey(value) {
7202
7224
  const normalized = validateRequiredPath(value, "workspaceKey");
7203
7225
  if (!/^[A-Za-z0-9._-]+$/.test(normalized)) {
@@ -26968,6 +26990,7 @@ export {
26968
26990
  METHOD_REPO_DISPLAY,
26969
26991
  METHOD_REPO_SLUG,
26970
26992
  METHOD_REPO_URL,
26993
+ MINI_APP_CODE_PATTERN,
26971
26994
  MINI_RUNTIME_SDK_VERSION as MINI_APP_RUNTIME_SDK_VERSION,
26972
26995
  MINI_CONTEXT_FILE,
26973
26996
  MINI_CONTEXT_KIND,
@@ -27171,7 +27194,9 @@ export {
27171
27194
  findEnvByEndpoint,
27172
27195
  findLastAssistantSeq,
27173
27196
  findLastAssistantTarget,
27197
+ findMiniAppCodeCaseCollisions,
27174
27198
  findNonBmpChars,
27199
+ findPullMiniAppCodeCaseCollisions,
27175
27200
  firstLine,
27176
27201
  flattenSkills,
27177
27202
  formatMetaIssues,