@hcmai/sdk 0.27.1 → 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 +53 -1
- package/dist/index.js +55 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -207,11 +207,31 @@ interface QueryWarning {
|
|
|
207
207
|
message?: string;
|
|
208
208
|
suggestion?: string;
|
|
209
209
|
}
|
|
210
|
+
/** match 纳入的一个取值;字面纳入(include)没算过相似度,score 为 null。 */
|
|
211
|
+
interface MatchIncludedValue {
|
|
212
|
+
value: string;
|
|
213
|
+
score?: number | null;
|
|
214
|
+
reason?: string;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* 一条 `match` 叶子的改写事实(服务端 `extra.match[]`,core#5841 刀 O)。
|
|
218
|
+
* MATCH_APPLIED 提示正文最多列 `listedInWarning` 个取值,`included` 才是全集。
|
|
219
|
+
*/
|
|
220
|
+
interface MatchResolution {
|
|
221
|
+
field: string;
|
|
222
|
+
mode?: string;
|
|
223
|
+
reason?: string;
|
|
224
|
+
included: MatchIncludedValue[];
|
|
225
|
+
includedTotal?: number;
|
|
226
|
+
listedInWarning?: number;
|
|
227
|
+
}
|
|
210
228
|
interface QueryResult<T = Record<string, unknown>> {
|
|
211
229
|
rows: T[];
|
|
212
230
|
total?: number;
|
|
213
231
|
/** 只在服务端真给了提示时出现。 */
|
|
214
232
|
warnings?: QueryWarning[];
|
|
233
|
+
/** 只在查询里有 match 且服务端给了改写事实时出现。 */
|
|
234
|
+
match?: MatchResolution[];
|
|
215
235
|
}
|
|
216
236
|
interface ActionInput {
|
|
217
237
|
id?: string;
|
|
@@ -335,6 +355,18 @@ interface RelationMeta {
|
|
|
335
355
|
key: string;
|
|
336
356
|
via: string;
|
|
337
357
|
label?: string;
|
|
358
|
+
/** 目标模型;服务端 ADR-474 起随 relations 下发。 */
|
|
359
|
+
target?: string;
|
|
360
|
+
/** one | many;many 的关系只能写进 filter.exists(ADR-474)。缺失 = 服务端没给,不猜。 */
|
|
361
|
+
cardinality?: string;
|
|
362
|
+
/** 外键反向自动登记的关系(仅供 exists)。 */
|
|
363
|
+
auto?: boolean;
|
|
364
|
+
/** INVERSE | FILTER | DERIVED;服务端 core#5841 刀 O 起给。 */
|
|
365
|
+
kind?: string;
|
|
366
|
+
/** 声明它的模型:别处 yml 经 inverseOf 声明给本模型的 FILTER(如 Assignment.yml 的 primaryAssignment)不等于本模型。 */
|
|
367
|
+
declaredIn?: string;
|
|
368
|
+
/** FILTER 关系的过滤条件(`assignmentType:eq:PRIMARY`),主任职与并发任职靠它区分。 */
|
|
369
|
+
filter?: string;
|
|
338
370
|
}
|
|
339
371
|
interface ModelDescription {
|
|
340
372
|
model: string;
|
|
@@ -2802,6 +2834,13 @@ declare function validateWorkspaceFiles(http: AxiosInstance, workspaceKey: strin
|
|
|
2802
2834
|
declare function deleteWorkspaceFile(http: AxiosInstance, fileId: string): Promise<void>;
|
|
2803
2835
|
declare function isWorkspaceRelativePath(value: unknown): value is string;
|
|
2804
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;
|
|
2805
2844
|
interface MiniInitArgs {
|
|
2806
2845
|
appCode: string;
|
|
2807
2846
|
workspaceKey: string;
|
|
@@ -2873,6 +2912,19 @@ declare function buildMiniVerifyAgentReport(report: MiniVerifyReport): MiniVerif
|
|
|
2873
2912
|
declare function formatMiniVerifyReport(report: MiniVerifyReport): string;
|
|
2874
2913
|
declare function readMiniContext(rootDir: string): Promise<MiniProjectContext>;
|
|
2875
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[][];
|
|
2876
2928
|
|
|
2877
2929
|
interface MiniTemplateArgs {
|
|
2878
2930
|
appCode: string;
|
|
@@ -7136,4 +7188,4 @@ type ParsedRef = {
|
|
|
7136
7188
|
declare function parseRef(raw: string, project: string, casesSlug?: string): ParsedRef | null;
|
|
7137
7189
|
declare const firstLine: (s: string) => string;
|
|
7138
7190
|
|
|
7139
|
-
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
|
@@ -1597,12 +1597,36 @@ async function query(http, model, dsl) {
|
|
|
1597
1597
|
const url = `/api/models/${model}/list/dsl`;
|
|
1598
1598
|
const resp = dsl.plugin ? await http.post(url, body, { params: { plugin: dsl.plugin } }) : await http.post(url, body);
|
|
1599
1599
|
const warnings = readWarnings(resp.data.extra?.warnings);
|
|
1600
|
+
const match = readMatch(resp.data.extra?.match);
|
|
1600
1601
|
return {
|
|
1601
1602
|
rows: resp.data.content ?? [],
|
|
1602
1603
|
total: resp.data.totalElements,
|
|
1603
|
-
...warnings.length ? { warnings } : {}
|
|
1604
|
+
...warnings.length ? { warnings } : {},
|
|
1605
|
+
...match.length ? { match } : {}
|
|
1604
1606
|
};
|
|
1605
1607
|
}
|
|
1608
|
+
function readMatch(raw) {
|
|
1609
|
+
if (!Array.isArray(raw)) return [];
|
|
1610
|
+
return raw.flatMap((m) => {
|
|
1611
|
+
if (!isPlainObject(m) || typeof m.field !== "string" || !m.field || !Array.isArray(m.included)) return [];
|
|
1612
|
+
const included = m.included.flatMap((hit) => {
|
|
1613
|
+
if (!isPlainObject(hit) || typeof hit.value !== "string") return [];
|
|
1614
|
+
return [{
|
|
1615
|
+
value: hit.value,
|
|
1616
|
+
...typeof hit.score === "number" || hit.score === null ? { score: hit.score } : {},
|
|
1617
|
+
...typeof hit.reason === "string" ? { reason: hit.reason } : {}
|
|
1618
|
+
}];
|
|
1619
|
+
});
|
|
1620
|
+
return [{
|
|
1621
|
+
field: m.field,
|
|
1622
|
+
...typeof m.mode === "string" ? { mode: m.mode } : {},
|
|
1623
|
+
...typeof m.reason === "string" ? { reason: m.reason } : {},
|
|
1624
|
+
included,
|
|
1625
|
+
...typeof m.includedTotal === "number" ? { includedTotal: m.includedTotal } : {},
|
|
1626
|
+
...typeof m.listedInWarning === "number" ? { listedInWarning: m.listedInWarning } : {}
|
|
1627
|
+
}];
|
|
1628
|
+
});
|
|
1629
|
+
}
|
|
1606
1630
|
function readWarnings(raw) {
|
|
1607
1631
|
if (!Array.isArray(raw)) return [];
|
|
1608
1632
|
return raw.flatMap((w) => {
|
|
@@ -1667,7 +1691,7 @@ function normalizeFilter(filter) {
|
|
|
1667
1691
|
return leaves.length === 1 ? leaves[0] : { and: leaves };
|
|
1668
1692
|
}
|
|
1669
1693
|
function isAstFilter(filter) {
|
|
1670
|
-
return "and" in filter || "or" in filter || "not" in filter || typeof filter.field === "string" && typeof filter.op === "string";
|
|
1694
|
+
return "and" in filter || "or" in filter || "not" in filter || "exists" in filter || typeof filter.field === "string" && typeof filter.op === "string";
|
|
1671
1695
|
}
|
|
1672
1696
|
function filterLeaves(field, value) {
|
|
1673
1697
|
if (isPlainObject(value)) {
|
|
@@ -6205,7 +6229,8 @@ export function unmount(container) {
|
|
|
6205
6229
|
}
|
|
6206
6230
|
|
|
6207
6231
|
// src/mini/project.ts
|
|
6208
|
-
var MINI_APP_CODE_PATTERN = /^[
|
|
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";
|
|
6209
6234
|
var SCOPE_PATTERN = /^[A-Z][A-Za-z0-9_]*\.[a-z][A-Za-z0-9]*$/;
|
|
6210
6235
|
var SEMVER_PATTERN = MINI_SEMVER_PATTERN;
|
|
6211
6236
|
var TOP_LEVEL_MANIFEST_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -6362,7 +6387,7 @@ async function validateMiniProject(rootDir) {
|
|
|
6362
6387
|
}
|
|
6363
6388
|
if (context) {
|
|
6364
6389
|
if (!MINI_APP_CODE_PATTERN.test(context.appCode)) {
|
|
6365
|
-
errors.push(
|
|
6390
|
+
errors.push(`appCode '${context.appCode}' \u4E0D\u5408\u6CD5\uFF1A${MINI_APP_CODE_RULE}`);
|
|
6366
6391
|
}
|
|
6367
6392
|
if (context.remotePrefix !== miniRemotePrefix(context.appCode)) {
|
|
6368
6393
|
errors.push(`context remotePrefix must be ${miniRemotePrefix(context.appCode)}`);
|
|
@@ -6828,7 +6853,7 @@ async function validateManifestObject(manifest2, context, root, errors, warnings
|
|
|
6828
6853
|
if (!TOP_LEVEL_MANIFEST_KEYS.has(key)) errors.push(`manifest has unsupported key: ${key}`);
|
|
6829
6854
|
}
|
|
6830
6855
|
requireString(manifest2, "schemaVersion", errors, (value) => value === "1.0");
|
|
6831
|
-
requireString(manifest2, "code", errors, (value) =>
|
|
6856
|
+
requireString(manifest2, "code", errors, (value) => MINI_APP_CODE_PATTERN.test(value));
|
|
6832
6857
|
requireString(manifest2, "name", errors, (value) => value.trim().length > 0);
|
|
6833
6858
|
requireString(manifest2, "version", errors, (value) => SEMVER_PATTERN.test(value));
|
|
6834
6859
|
requireString(manifest2, "sdkVersion", errors, (value) => SEMVER_PATTERN.test(value));
|
|
@@ -7169,11 +7194,32 @@ function normalizeAppCode(value) {
|
|
|
7169
7194
|
if (!MINI_APP_CODE_PATTERN.test(normalized)) {
|
|
7170
7195
|
throw new CliError({
|
|
7171
7196
|
code: "INVALID_ARGUMENT" /* INVALID_ARGUMENT */,
|
|
7172
|
-
message:
|
|
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
|
+
}
|
|
7173
7205
|
});
|
|
7174
7206
|
}
|
|
7175
7207
|
return normalized;
|
|
7176
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
|
+
}
|
|
7177
7223
|
function normalizeWorkspaceKey(value) {
|
|
7178
7224
|
const normalized = validateRequiredPath(value, "workspaceKey");
|
|
7179
7225
|
if (!/^[A-Za-z0-9._-]+$/.test(normalized)) {
|
|
@@ -26944,6 +26990,7 @@ export {
|
|
|
26944
26990
|
METHOD_REPO_DISPLAY,
|
|
26945
26991
|
METHOD_REPO_SLUG,
|
|
26946
26992
|
METHOD_REPO_URL,
|
|
26993
|
+
MINI_APP_CODE_PATTERN,
|
|
26947
26994
|
MINI_RUNTIME_SDK_VERSION as MINI_APP_RUNTIME_SDK_VERSION,
|
|
26948
26995
|
MINI_CONTEXT_FILE,
|
|
26949
26996
|
MINI_CONTEXT_KIND,
|
|
@@ -27147,7 +27194,9 @@ export {
|
|
|
27147
27194
|
findEnvByEndpoint,
|
|
27148
27195
|
findLastAssistantSeq,
|
|
27149
27196
|
findLastAssistantTarget,
|
|
27197
|
+
findMiniAppCodeCaseCollisions,
|
|
27150
27198
|
findNonBmpChars,
|
|
27199
|
+
findPullMiniAppCodeCaseCollisions,
|
|
27151
27200
|
firstLine,
|
|
27152
27201
|
flattenSkills,
|
|
27153
27202
|
formatMetaIssues,
|