@hcmai/sdk 0.15.2 → 0.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +19 -4
- package/dist/index.js +79 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -771,6 +771,12 @@ declare function downloadDocument(http: AxiosInstance, ref: {
|
|
|
771
771
|
downloadUrl?: string;
|
|
772
772
|
fileName?: string;
|
|
773
773
|
}, destPath?: string): Promise<string>;
|
|
774
|
+
/**
|
|
775
|
+
* 删除文档及其存储对象。
|
|
776
|
+
*
|
|
777
|
+
* <p>Document 禁止走通用 Model 删除;只有文档专用端点同时维护元数据与底层对象。
|
|
778
|
+
*/
|
|
779
|
+
declare function deleteDocument(http: AxiosInstance, documentId: string): Promise<void>;
|
|
774
780
|
|
|
775
781
|
declare function toJson(value: unknown): string;
|
|
776
782
|
|
|
@@ -1530,6 +1536,12 @@ declare const HANDSHAKE_TOKEN_QUERY_PARAM = "token";
|
|
|
1530
1536
|
declare const HANDSHAKE_AUTH_ERROR_HEADER = "x-websocket-auth-error";
|
|
1531
1537
|
/** 把 token 放进握手 URL 的 query;endpoint 自带的 query(如 locale)原样保留。 */
|
|
1532
1538
|
declare function buildHandshakeUrl(endpoint: string, token: string): string;
|
|
1539
|
+
/** 对话入口由交互 chat、单次 chat 与 doctor 共用,保留部署的路径前缀。 */
|
|
1540
|
+
declare function conversationWebSocketEndpoint(endpoint: string): string;
|
|
1541
|
+
/** 只核 HTTP Upgrade;收到 101 就关闭,不发送 auth 消息、不创建会话。 */
|
|
1542
|
+
declare function probeConversationHandshake(opts: Pick<WsClientOpts, 'endpoint' | 'getAccessToken'> & {
|
|
1543
|
+
timeoutMs?: number;
|
|
1544
|
+
}): Promise<void>;
|
|
1533
1545
|
/**
|
|
1534
1546
|
* 非 101 的握手响应 → 可判断下一步的错误。ws 库默认只给一句 `Unexpected server response: 401`,
|
|
1535
1547
|
* 状态码、拒绝原因头、traceId、响应体全在 res 上却一个都不露(HCMNX-25 顾问两次现场只能写 NETWORK_ERROR)。
|
|
@@ -2937,13 +2949,16 @@ declare class LayoutContainmentError extends Error {
|
|
|
2937
2949
|
constructor(message: string);
|
|
2938
2950
|
}
|
|
2939
2951
|
|
|
2940
|
-
type DoctorAnchor = 'connectivity' | 'identity' | 'config-admin' | 'layer';
|
|
2941
|
-
/**
|
|
2952
|
+
type DoctorAnchor = 'connectivity' | 'identity' | 'config-admin' | 'layer' | 'websocket-handshake';
|
|
2953
|
+
/** 五条锚点的顺序固定,REST 连通不能替对话握手背书。 */
|
|
2942
2954
|
declare const DOCTOR_ANCHORS: readonly DoctorAnchor[];
|
|
2943
2955
|
interface DoctorCheck {
|
|
2944
2956
|
anchor: DoctorAnchor;
|
|
2945
2957
|
ok: boolean;
|
|
2946
2958
|
detail: string;
|
|
2959
|
+
nextStep?: string;
|
|
2960
|
+
httpStatus?: number;
|
|
2961
|
+
handshakeAuthError?: string;
|
|
2947
2962
|
}
|
|
2948
2963
|
interface DoctorReport {
|
|
2949
2964
|
ok: boolean;
|
|
@@ -2961,7 +2976,7 @@ interface ReconIdentity {
|
|
|
2961
2976
|
username?: string;
|
|
2962
2977
|
roles?: string[];
|
|
2963
2978
|
}
|
|
2964
|
-
declare function runDoctor(probe: ReconProbe, identity: ReconIdentity | null): Promise<DoctorReport>;
|
|
2979
|
+
declare function runDoctor(probe: ReconProbe, identity: ReconIdentity | null, handshake?: () => Promise<void>): Promise<DoctorReport>;
|
|
2965
2980
|
/** `GET /api/auth/info` —— 服务端认定的 token 归属从这里来。 */
|
|
2966
2981
|
declare const AUTH_INFO_PATH = "/api/auth/info";
|
|
2967
2982
|
/**
|
|
@@ -6162,4 +6177,4 @@ type ParsedRef = {
|
|
|
6162
6177
|
declare function parseRef(raw: string, project: string, casesSlug?: string): ParsedRef | null;
|
|
6163
6178
|
declare const firstLine: (s: string) => string;
|
|
6164
6179
|
|
|
6165
|
-
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, 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_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, 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 CliAuthorizationSession, CliError, CliErrorCode, type CliErrorInit, type ClientAuthContext, type ClientCredentialsInput, type ConnectionMessage, type ControlChannelEnvelope, type ConversationListItem, type ConversationListResult, type ConversationState, type CreateResult, type CreatedConversation, type CredentialStoreMode, 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, DOCTOR_ANCHORS, DRY_RUN_NOTE, DRY_RUN_TAIL, type DataPackageInstallRunView, type DataPackageInstallView, type Premise$1 as DeliveryPremise, type DeliveryRun, type DescribeOpts, type DeviceAuthorization, type DoctorAnchor, type DoctorCheck, type DoctorReport, DriftDetected, EFFECT_READ_ONLY, EFFECT_UNKNOWN, EFFECT_WRITES, ENUM_SHOW, ENV_FILE, EXEMPTIBLE_CODES, EXEMPTION_CODES, EXEMPTION_REQUIRED_KEYS, EXTENSION_SOURCE_HEADER, type EnvConfig, type EnvSource, type EnvironmentSafety, ExitCode, FIND_LIMIT, MAX_BYTES as FIND_MAX_BYTES, FORCE_STALE_FLAG, FORCE_STALE_FLAG_TEXT, type FieldMeta, type Finding, type Fingerprint, type Fixture, type FormatOptions, GATE_COMPONENTS, type GlobalConfig, HANDSHAKE_AUTH_ERROR_HEADER, HANDSHAKE_TOKEN_QUERY_PARAM, 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 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 JiraIssue, type JiraIssueTypeMeta, type JiraNamed, type JiraProject, type JiraRemoteLink, type JiraStatusFlow, type JiraTokenSource, type JiraTransition, type JiraUser, Journal, JournalError, KIT_CARRY_OVER_KEY, KIT_CRAWLED_AT_FILE, KIT_MATCHED_ON, 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, MINI_CONTEXT_FILE, MINI_CONTEXT_KIND, MINI_CONTEXT_VERSION, MINI_PULL_MANIFEST_FILE, MINI_REMOTE_ROOT, 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 MiniVerifyPreviewUrl, type MiniVerifyReport, type MiniVerifySummary, type MiniWritableTemplateConfig, type ModelDescription, type ModelEntry, type ModelQueryDsl, NETWORK_GATES, NEXT_STEP, NOT_COVERED_LAYER1, NOT_COVERED_LAYER2, NOT_COVERED_SELF, OFFLINE_COMMANDS, ON_EXISTING, 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 PlanProblem, PlanReadError, type PlannedRow, type Principal, type ProfileConfig, type ProjectEnv, type ProjectEnvFile, type QueryResult, RC_DECIDING_FIELDS, RC_DECIDING_REPORT_FIELDS, REASON_BASELINE_ROUND_NOT_COMPLETE, VERDICTS$1 as RECONCILE_VERDICTS, RECOVERY_WORDS, REQUIRED_SECTIONS, 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, 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 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 TimelineItemLite, type TokenRecord, TokenStore, type ToolCallFailedPayload, type ToolCallResultPayload, type ToolCallStartedPayload, type TriageEntry, type TriageProblem, type TriageProblemRow, type TriageRoundResult, type TriageVerdict, 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, WORK_DIRNAME, WRITE_RECOVERY_WORDS, type WaitResult, WorkLayout, type WorkspaceFileContent, type WorkspaceFileItem, type WorkspaceFileListResult, WsClient, type WsClientOpts, absoluteDownloadUrl, acquireLease, adminResetPassword, applyPlan, applyRc, applyReportText, applyReportToJson, archiveDir, askedTheDatabase, assertDangerWrite, assertExpectedTenant, assertNotReservedEnvName, assertSafeReferencePath, assertSafeSkillFilePath, assertSafeSkillId, baselineRoundPremise, bootstrapTenant, buildAnswer, buildCarrierResult, buildConfirm, buildDeliveryRun, buildHandshakeUrl, buildInterrupt, buildMiniAppTemplateFiles, buildMiniPreviewTargets, buildMiniVerifyAgentReport, buildReconciliation, buildReject, buildResumeSummary, buildSteer, camelizeKeys, changePassword, checkCoherence, classifyEffect, classifyMessage, classifyStatus, clearMetaCache, clearModelCache, cliAuthorizationExpired, commandsFor, compareFingerprint, computeFingerprint, computeReconSourceKey, contentHash, conversationStateFile, create, createConversation, createHttpClient, createJiraClient, createV4Reducer, createWorkspaceFile, credentialsFile, defaultDownloadDir, defaultMiniRequiredScopes, deleteEnv, deleteIdentity, deleteTenantMeta, deleteWorkspaceFile, deliveryRunFields, deriveNamelessToolLabel, describePrincipal, describeWaiver, detectDelegationPause, detectDirectInteractionPending, detectPasswordChangeChallenge, 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, firstLine, flattenSkills, formatMetaIssues, formatMiniVerifyReport, formatObject, formatRows, fromAxiosError, getCacheStats, getMiniStatus, getScriptTask, getSettingDomain, getTenantMeta, globalConfigFile, guessMimeType, handshakeRejectedError, hasPendingImpersonationSessions, hcmConfigDir, hitRank, httpProbe, identitiesDir, identityDir, identityKnown, identityMetaFile, inferMiniWritableTemplateOptionsFromModel, initMiniAppProject, inspectRound, installDataPackageArtifact, installDataPackageArtifactAsync, isDelegationToolName, isLocalName, isReadOnly, isServerSlidingSession, isSupersededItem, isTempEnv, isTerminalRunStatus, isZeroNetwork, jiraTokenHelp, jiraTokenSource, journalNote, judgeDrift, ledgerOnlySignpost, linkedRepoRefs, listEnvs, listIdentities, listModels, 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, normalizeOrigin, normalizeReferences, notAsked, oneShot, packDataPackage, parseConfirmToolName, parseEnvYaml, parseFixture, parseInteractionRequest, parseInteractionResolved, parsePlaceholder, parseRef, parseSettingAssignment, parseSkillFrontmatter, parseSkillRequirements, patchSettingDomain, planFromArtifacts, planProblemLines, planRc, planSummaryLine, planVsBaselinePremise, pollDeviceAuthorization, printResolvedEnvironment, probeAll, probeExtensionSource, profileDir, profileFile, pullMiniAppProject, pushMiniAppProject, queryScriptLogs, readImportPlan, readMiniContext, readPullManifest, readSessionPrincipal, rebind, rebindPayload, refreshToken, releasePendingImpersonationSessions, remove, renameIdentity, renderEnvYaml, renderFind, renderRound, renderTriage, renderValues, replHistoryFile, repoIssueUrl, requestCliAuthorization, resetSettingItem, resolveActiveEnv, resolveActiveIdentity, resolveActiveProfile, resolveAllSkillsInstallOrder, resolveBaselineDir, resolveChironBase, resolveCredentialStoreMode, resolveEnvContext, resolveProjectEnvironment, resolveRefs, resolveSkillInstallOrder, riskFromArtifacts, roundAge, roundWarning, runActiveVerify, runDoctor, runImport, runMetaChange, runMiniSmokeChecks, runRecon, runTriageRound, safeCliAuthorizationError, safeSegment, saveConversationState, saveEnv, saveGlobalConfig, saveIdentity, saveProfile, saveTenantMeta, saveWorkspaceFileContent, scriptDryRun, seedBaselines, seedMappingPath, seedWorkDir, sendMessageAndStream, shelfPartition, snakeToCamel, startImpersonation, tenantSegment, toAcceptLanguage, toJson, toOrigin, toPrincipal, toTable, toYaml, truncateDisplay, unbindPayload, update, uploadDocument, validateCliAuthorizationUrl, validateMetaContent, validateMiniProject, validateScriptManifest, valueState, valuesRoundCaveat, verifyAttention, verifyRc, verifyText, waitForInstallRun, workspaceLayer, writeChangeState, writeImportPlan, writeRisk };
|
|
6180
|
+
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, 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_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, 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 CliAuthorizationSession, CliError, CliErrorCode, type CliErrorInit, type ClientAuthContext, type ClientCredentialsInput, type ConnectionMessage, type ControlChannelEnvelope, type ConversationListItem, type ConversationListResult, type ConversationState, type CreateResult, type CreatedConversation, type CredentialStoreMode, 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, DOCTOR_ANCHORS, DRY_RUN_NOTE, DRY_RUN_TAIL, type DataPackageInstallRunView, type DataPackageInstallView, type Premise$1 as DeliveryPremise, type DeliveryRun, type DescribeOpts, type DeviceAuthorization, type DoctorAnchor, type DoctorCheck, type DoctorReport, DriftDetected, EFFECT_READ_ONLY, EFFECT_UNKNOWN, EFFECT_WRITES, ENUM_SHOW, ENV_FILE, EXEMPTIBLE_CODES, EXEMPTION_CODES, EXEMPTION_REQUIRED_KEYS, EXTENSION_SOURCE_HEADER, type EnvConfig, type EnvSource, type EnvironmentSafety, ExitCode, FIND_LIMIT, MAX_BYTES as FIND_MAX_BYTES, FORCE_STALE_FLAG, FORCE_STALE_FLAG_TEXT, type FieldMeta, type Finding, type Fingerprint, type Fixture, type FormatOptions, GATE_COMPONENTS, type GlobalConfig, HANDSHAKE_AUTH_ERROR_HEADER, HANDSHAKE_TOKEN_QUERY_PARAM, 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 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 JiraIssue, type JiraIssueTypeMeta, type JiraNamed, type JiraProject, type JiraRemoteLink, type JiraStatusFlow, type JiraTokenSource, type JiraTransition, type JiraUser, Journal, JournalError, KIT_CARRY_OVER_KEY, KIT_CRAWLED_AT_FILE, KIT_MATCHED_ON, 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, MINI_CONTEXT_FILE, MINI_CONTEXT_KIND, MINI_CONTEXT_VERSION, MINI_PULL_MANIFEST_FILE, MINI_REMOTE_ROOT, 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 MiniVerifyPreviewUrl, type MiniVerifyReport, type MiniVerifySummary, type MiniWritableTemplateConfig, type ModelDescription, type ModelEntry, type ModelQueryDsl, NETWORK_GATES, NEXT_STEP, NOT_COVERED_LAYER1, NOT_COVERED_LAYER2, NOT_COVERED_SELF, OFFLINE_COMMANDS, ON_EXISTING, 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 PlanProblem, PlanReadError, type PlannedRow, type Principal, type ProfileConfig, type ProjectEnv, type ProjectEnvFile, type QueryResult, RC_DECIDING_FIELDS, RC_DECIDING_REPORT_FIELDS, REASON_BASELINE_ROUND_NOT_COMPLETE, VERDICTS$1 as RECONCILE_VERDICTS, RECOVERY_WORDS, REQUIRED_SECTIONS, 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, 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 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 TimelineItemLite, type TokenRecord, TokenStore, type ToolCallFailedPayload, type ToolCallResultPayload, type ToolCallStartedPayload, type TriageEntry, type TriageProblem, type TriageProblemRow, type TriageRoundResult, type TriageVerdict, 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, WORK_DIRNAME, WRITE_RECOVERY_WORDS, type WaitResult, WorkLayout, type WorkspaceFileContent, type WorkspaceFileItem, type WorkspaceFileListResult, WsClient, type WsClientOpts, absoluteDownloadUrl, acquireLease, adminResetPassword, applyPlan, applyRc, applyReportText, applyReportToJson, archiveDir, askedTheDatabase, assertDangerWrite, assertExpectedTenant, assertNotReservedEnvName, assertSafeReferencePath, assertSafeSkillFilePath, assertSafeSkillId, baselineRoundPremise, bootstrapTenant, buildAnswer, buildCarrierResult, buildConfirm, buildDeliveryRun, buildHandshakeUrl, buildInterrupt, buildMiniAppTemplateFiles, buildMiniPreviewTargets, buildMiniVerifyAgentReport, buildReconciliation, buildReject, buildResumeSummary, buildSteer, camelizeKeys, changePassword, checkCoherence, classifyEffect, classifyMessage, classifyStatus, clearMetaCache, clearModelCache, cliAuthorizationExpired, commandsFor, compareFingerprint, computeFingerprint, computeReconSourceKey, contentHash, conversationStateFile, conversationWebSocketEndpoint, create, createConversation, createHttpClient, createJiraClient, createV4Reducer, createWorkspaceFile, credentialsFile, defaultDownloadDir, defaultMiniRequiredScopes, deleteDocument, deleteEnv, deleteIdentity, deleteTenantMeta, deleteWorkspaceFile, deliveryRunFields, deriveNamelessToolLabel, describePrincipal, describeWaiver, detectDelegationPause, detectDirectInteractionPending, detectPasswordChangeChallenge, 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, firstLine, flattenSkills, formatMetaIssues, formatMiniVerifyReport, formatObject, formatRows, fromAxiosError, getCacheStats, getMiniStatus, getScriptTask, getSettingDomain, getTenantMeta, globalConfigFile, guessMimeType, handshakeRejectedError, hasPendingImpersonationSessions, hcmConfigDir, hitRank, httpProbe, identitiesDir, identityDir, identityKnown, identityMetaFile, inferMiniWritableTemplateOptionsFromModel, initMiniAppProject, inspectRound, installDataPackageArtifact, installDataPackageArtifactAsync, isDelegationToolName, isLocalName, isReadOnly, isServerSlidingSession, isSupersededItem, isTempEnv, isTerminalRunStatus, isZeroNetwork, jiraTokenHelp, jiraTokenSource, journalNote, judgeDrift, ledgerOnlySignpost, linkedRepoRefs, listEnvs, listIdentities, listModels, 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, 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, probeExtensionSource, profileDir, profileFile, pullMiniAppProject, pushMiniAppProject, queryScriptLogs, readImportPlan, readMiniContext, readPullManifest, readSessionPrincipal, rebind, rebindPayload, refreshToken, releasePendingImpersonationSessions, remove, renameIdentity, renderEnvYaml, renderFind, renderRound, renderTriage, renderValues, replHistoryFile, repoIssueUrl, requestCliAuthorization, resetSettingItem, resolveActiveEnv, resolveActiveIdentity, resolveActiveProfile, resolveAllSkillsInstallOrder, resolveBaselineDir, resolveChironBase, resolveCredentialStoreMode, resolveEnvContext, resolveProjectEnvironment, resolveRefs, resolveSkillInstallOrder, riskFromArtifacts, roundAge, roundWarning, runActiveVerify, runDoctor, runImport, runMetaChange, runMiniSmokeChecks, runRecon, runTriageRound, safeCliAuthorizationError, safeSegment, saveConversationState, saveEnv, saveGlobalConfig, saveIdentity, saveProfile, saveTenantMeta, saveWorkspaceFileContent, scriptDryRun, seedBaselines, seedMappingPath, seedWorkDir, sendMessageAndStream, shelfPartition, snakeToCamel, startImpersonation, tenantSegment, toAcceptLanguage, toJson, toOrigin, toPrincipal, toTable, toYaml, truncateDisplay, unbindPayload, update, uploadDocument, validateCliAuthorizationUrl, validateMetaContent, validateMiniProject, validateScriptManifest, valueState, valuesRoundCaveat, verifyAttention, verifyRc, verifyText, waitForInstallRun, workspaceLayer, writeChangeState, writeImportPlan, writeRisk };
|
package/dist/index.js
CHANGED
|
@@ -2097,6 +2097,9 @@ async function downloadDocument(http, ref, destPath) {
|
|
|
2097
2097
|
await fsp.writeFile(target, Buffer.from(resp.data));
|
|
2098
2098
|
return target;
|
|
2099
2099
|
}
|
|
2100
|
+
async function deleteDocument(http, documentId) {
|
|
2101
|
+
await http.delete(`/api/documents/${encodeURIComponent(documentId)}`);
|
|
2102
|
+
}
|
|
2100
2103
|
function expandHome(p) {
|
|
2101
2104
|
return p.startsWith("~") ? path5.join(os2.homedir(), p.slice(1)) : path5.resolve(p);
|
|
2102
2105
|
}
|
|
@@ -2826,6 +2829,54 @@ function buildHandshakeUrl(endpoint, token) {
|
|
|
2826
2829
|
url.searchParams.set(HANDSHAKE_TOKEN_QUERY_PARAM, token);
|
|
2827
2830
|
return url.toString();
|
|
2828
2831
|
}
|
|
2832
|
+
function conversationWebSocketEndpoint(endpoint) {
|
|
2833
|
+
const url = new URL(endpoint);
|
|
2834
|
+
url.protocol = url.protocol === "https:" ? "wss:" : url.protocol === "http:" ? "ws:" : url.protocol;
|
|
2835
|
+
url.pathname = url.pathname.replace(/\/$/, "") + "/ws/conversation";
|
|
2836
|
+
return url.toString();
|
|
2837
|
+
}
|
|
2838
|
+
function createHandshakeSocket(endpoint, token, handshakeTimeout) {
|
|
2839
|
+
return new WebSocket(buildHandshakeUrl(endpoint, token), {
|
|
2840
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
2841
|
+
...handshakeTimeout === void 0 ? {} : { handshakeTimeout }
|
|
2842
|
+
});
|
|
2843
|
+
}
|
|
2844
|
+
async function probeConversationHandshake(opts) {
|
|
2845
|
+
const token = await opts.getAccessToken();
|
|
2846
|
+
if (!token) throw new CliError({ code: "AUTH_FAILED" /* AUTH_FAILED */, message: "\u6CA1\u6709\u53EF\u7528 token\uFF0C\u672A\u53D1\u9001 WebSocket \u63E1\u624B\uFF1B\u8BF7\u8FD0\u884C hcm login" });
|
|
2847
|
+
const ws = createHandshakeSocket(opts.endpoint, token, opts.timeoutMs ?? 1e4);
|
|
2848
|
+
await new Promise((resolve6, reject2) => {
|
|
2849
|
+
let settled = false;
|
|
2850
|
+
let upgraded = false;
|
|
2851
|
+
const finish = (error) => {
|
|
2852
|
+
if (settled) return;
|
|
2853
|
+
settled = true;
|
|
2854
|
+
if (error) reject2(error);
|
|
2855
|
+
else resolve6();
|
|
2856
|
+
};
|
|
2857
|
+
ws.once("open", () => {
|
|
2858
|
+
upgraded = true;
|
|
2859
|
+
ws.close(1e3);
|
|
2860
|
+
const closeTimer = setTimeout(() => ws.terminate(), 1e3);
|
|
2861
|
+
closeTimer.unref();
|
|
2862
|
+
ws.once("close", () => clearTimeout(closeTimer));
|
|
2863
|
+
});
|
|
2864
|
+
ws.once("unexpected-response", (req, res) => {
|
|
2865
|
+
const socket = res.socket ?? req.socket;
|
|
2866
|
+
finish(handshakeRejectedError(res, ""));
|
|
2867
|
+
req.destroy();
|
|
2868
|
+
res.destroy();
|
|
2869
|
+
socket?.destroy();
|
|
2870
|
+
});
|
|
2871
|
+
ws.on("error", (error) => {
|
|
2872
|
+
if (!upgraded) finish(new CliError({
|
|
2873
|
+
code: "NETWORK_ERROR" /* NETWORK_ERROR */,
|
|
2874
|
+
message: error.message.replaceAll(token, "[redacted]").replaceAll(encodeURIComponent(token), "[redacted]")
|
|
2875
|
+
}));
|
|
2876
|
+
});
|
|
2877
|
+
ws.once("close", () => finish(upgraded ? void 0 : new CliError({ code: "NETWORK_ERROR" /* NETWORK_ERROR */, message: "WebSocket \u5728 HTTP 101 \u524D\u5173\u95ED" })));
|
|
2878
|
+
});
|
|
2879
|
+
}
|
|
2829
2880
|
var HANDSHAKE_REJECT_NEXT_STEP = {
|
|
2830
2881
|
missing_token: '\u672C\u7248 CLI \u63E1\u624B\u5DF2\u540C\u65F6\u5E26 ?token= \u4E0E Authorization \u5934\uFF0C\u4ECD\u62A5 missing_token \u8BF4\u660E\u4E2D\u95F4\u7F51\u5173\u628A\u4E24\u5904\u90FD\u5265\u6389\u4E86\uFF1B\u7528 curl --http1.1 -H "Upgrade: websocket" \u76F4\u63A5\u6253\u540E\u7AEF\u4E0E\u6253\u7F51\u5173\u5404\u4E00\u6B21\uFF0C\u5BF9\u7167 X-WebSocket-Auth-Error \u5B9A\u4F4D',
|
|
2831
2882
|
invalid_token: "token \u65E0\u6548\u6216\u5DF2\u8FC7\u671F\uFF1Ahcm identity list \u770B\u8EAB\u4EFD\u72B6\u6001\uFF0Chcm login --env <\u73AF\u5883> \u91CD\u65B0\u767B\u5F55",
|
|
@@ -2903,9 +2954,7 @@ var WsClient = class {
|
|
|
2903
2954
|
message: "no access token; run `hcm login`"
|
|
2904
2955
|
});
|
|
2905
2956
|
}
|
|
2906
|
-
this.ws =
|
|
2907
|
-
headers: { Authorization: `Bearer ${tok}` }
|
|
2908
|
-
});
|
|
2957
|
+
this.ws = createHandshakeSocket(this.opts.endpoint, tok);
|
|
2909
2958
|
return new Promise((resolve6, reject2) => {
|
|
2910
2959
|
const settle = (fn) => {
|
|
2911
2960
|
off();
|
|
@@ -10590,9 +10639,10 @@ var DOCTOR_ANCHORS = [
|
|
|
10590
10639
|
"connectivity",
|
|
10591
10640
|
"identity",
|
|
10592
10641
|
"config-admin",
|
|
10593
|
-
"layer"
|
|
10642
|
+
"layer",
|
|
10643
|
+
"websocket-handshake"
|
|
10594
10644
|
];
|
|
10595
|
-
async function runDoctor(probe, identity) {
|
|
10645
|
+
async function runDoctor(probe, identity, handshake) {
|
|
10596
10646
|
const checks = [];
|
|
10597
10647
|
const modelsOut = await probe.get(MODELS_PATH);
|
|
10598
10648
|
const connected = modelsOut.error === "ok";
|
|
@@ -10623,6 +10673,27 @@ async function runDoctor(probe, identity) {
|
|
|
10623
10673
|
ok: Boolean(p.sourceKey),
|
|
10624
10674
|
detail: layerDetail(p, connected)
|
|
10625
10675
|
});
|
|
10676
|
+
try {
|
|
10677
|
+
if (!handshake) throw new Error("\u672A\u63D0\u4F9B WebSocket \u63E1\u624B\u63A2\u9488\uFF0C\u65E0\u6CD5\u5224\u65AD hcm chat \u7684\u63E1\u624B\u5165\u53E3\u662F\u5426\u53EF\u7528\uFF08\u672A\u6267\u884C\uFF09");
|
|
10678
|
+
await handshake();
|
|
10679
|
+
checks.push({
|
|
10680
|
+
anchor: "websocket-handshake",
|
|
10681
|
+
ok: true,
|
|
10682
|
+
httpStatus: 101,
|
|
10683
|
+
detail: "WebSocket HTTP 101\uFF1A\u5F53\u524D\u8EAB\u4EFD\u7684\u5BF9\u8BDD\u63E1\u624B\u901A\u8FC7\uFF0C\u8FDE\u63A5\u5DF2\u5173\u95ED\uFF08\u53EA\u9A8C\u8BC1\u63E1\u624B\uFF09",
|
|
10684
|
+
nextStep: "hcm chat \u7684\u63E1\u624B\u5165\u53E3\u53EF\u7528\uFF1B\u4F1A\u8BDD\u8BA4\u8BC1\u3001\u6743\u9650\u4E0E\u6A21\u578B\u54CD\u5E94\u4ECD\u9700\u5B9E\u9645\u8FD0\u884C hcm chat \u9A8C\u8BC1"
|
|
10685
|
+
});
|
|
10686
|
+
} catch (error) {
|
|
10687
|
+
const context = error instanceof CliError ? error.context : void 0;
|
|
10688
|
+
checks.push({
|
|
10689
|
+
anchor: "websocket-handshake",
|
|
10690
|
+
ok: false,
|
|
10691
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
10692
|
+
...typeof context?.httpStatus === "number" ? { httpStatus: context.httpStatus } : {},
|
|
10693
|
+
...typeof context?.handshakeAuthError === "string" ? { handshakeAuthError: context.handshakeAuthError } : {},
|
|
10694
|
+
nextStep: "hcm chat \u7684\u63E1\u624B\u5165\u53E3\u4E0D\u53EF\u7528\uFF1B" + (typeof context?.nextStep === "string" ? context.nextStep : "\u5148\u68C0\u67E5\u7F51\u7EDC\u4E0E\u5F53\u524D\u767B\u5F55\u8EAB\u4EFD\uFF0C\u518D\u8FD0\u884C hcm chiron doctor\uFF1B\u672C\u9879\u53EA\u9A8C\u8BC1\u63E1\u624B")
|
|
10695
|
+
});
|
|
10696
|
+
}
|
|
10626
10697
|
return { ok: checks.every((c) => c.ok), checks };
|
|
10627
10698
|
}
|
|
10628
10699
|
function judgeIdentity(ident) {
|
|
@@ -22203,6 +22274,7 @@ export {
|
|
|
22203
22274
|
computeReconSourceKey,
|
|
22204
22275
|
contentHash,
|
|
22205
22276
|
conversationStateFile,
|
|
22277
|
+
conversationWebSocketEndpoint,
|
|
22206
22278
|
create,
|
|
22207
22279
|
createConversation,
|
|
22208
22280
|
createHttpClient,
|
|
@@ -22212,6 +22284,7 @@ export {
|
|
|
22212
22284
|
credentialsFile,
|
|
22213
22285
|
defaultDownloadDir,
|
|
22214
22286
|
defaultMiniRequiredScopes,
|
|
22287
|
+
deleteDocument,
|
|
22215
22288
|
deleteEnv,
|
|
22216
22289
|
deleteIdentity,
|
|
22217
22290
|
deleteTenantMeta,
|
|
@@ -22349,6 +22422,7 @@ export {
|
|
|
22349
22422
|
pollDeviceAuthorization,
|
|
22350
22423
|
printResolvedEnvironment,
|
|
22351
22424
|
probeAll,
|
|
22425
|
+
probeConversationHandshake,
|
|
22352
22426
|
probeExtensionSource,
|
|
22353
22427
|
profileDir,
|
|
22354
22428
|
profileFile,
|