@tonyclaw/agent-inspector 4.0.1 → 4.0.2
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/.output/backend/nitro.json +1 -1
- package/.output/cli.js +192 -109
- package/.output/server/_ssr/index.mjs +1 -1
- package/.output/server/_ssr/{router-CTHqmroT.mjs → router-BBY_zWRK.mjs} +91 -3
- package/.output/server/index.mjs +1 -1
- package/.output/ui/assets/{CompareDrawer-L3n4J-Or.js → CompareDrawer-rtNElN-B.js} +1 -1
- package/.output/ui/assets/{InspectorPet-D5o_3OZS.js → InspectorPet-QaAiuF3d.js} +1 -1
- package/.output/ui/assets/{ProxyViewerContainer-Ocagx75S.js → ProxyViewerContainer-6twNZHwl.js} +4 -4
- package/.output/ui/assets/{ReplayDialog-Bk7x1h-y.js → ReplayDialog-B7KlziO2.js} +1 -1
- package/.output/ui/assets/{RequestAnatomy-U4lzL7Sc.js → RequestAnatomy-2XVFBrW4.js} +1 -1
- package/.output/ui/assets/{ResponseView-LOWfvBLK.js → ResponseView-BULgzLVB.js} +1 -1
- package/.output/ui/assets/{StreamingChunkSequence-DPfsrrXQ.js → StreamingChunkSequence-DSkvkbns.js} +1 -1
- package/.output/ui/assets/{_sessionId-OdX2Jvt1.js → _sessionId-D2dmJi3G.js} +1 -1
- package/.output/ui/assets/{_sessionId-0MlWS-CO.js → _sessionId-DcS0s1Mr.js} +1 -1
- package/.output/ui/assets/{index-Du4qNOOt.js → index-B0TN1KKO.js} +2 -2
- package/.output/ui/assets/{index-gvFj_9K6.js → index-Bva1zHEs.js} +1 -1
- package/.output/ui/assets/{index-Ea-c8hPg.js → index-BzBExOxu.js} +1 -1
- package/.output/ui/assets/{index-zVVS53Hd.js → index-k6sRQz55.js} +1 -1
- package/.output/ui/assets/{json-viewer-C1WAMzg3.js → json-viewer-CWM4tY-j.js} +1 -1
- package/.output/ui/assets/{jszip.min-B8AKu2zm.js → jszip.min-BkWvRFlo.js} +1 -1
- package/.output/ui/index.html +1 -1
- package/package.json +5 -10
- package/src/assets/IDE/claudecode-color.svg +0 -1
- package/src/assets/IDE/codex-color.svg +0 -1
- package/src/assets/IDE/opencode.svg +0 -1
- package/src/assets/IDE/xiaomimimo.svg +0 -1
- package/src/assets/favicon.svg +0 -21
- package/src/assets/logos/alibaba.svg +0 -1
- package/src/assets/logos/anthropic.svg +0 -1
- package/src/assets/logos/claude-code.svg +0 -4
- package/src/assets/logos/deepseek.svg +0 -1
- package/src/assets/logos/minimax.jpeg +0 -0
- package/src/assets/logos/openai.svg +0 -1
- package/src/assets/logos/opencode.svg +0 -4
- package/src/assets/logos/qwen.webp +0 -0
- package/src/assets/logos/zhipuai.svg +0 -219
- package/src/backend/router.tsx +0 -36
- package/src/backend/routes/$.ts +0 -26
- package/src/backend/routes/__root.ts +0 -4
- package/src/backend/routes/api/-instances.ts +0 -7
- package/src/backend/routes/api/alerts.summary.ts +0 -28
- package/src/backend/routes/api/alerts.ts +0 -70
- package/src/backend/routes/api/config.paths.ts +0 -14
- package/src/backend/routes/api/config.ts +0 -73
- package/src/backend/routes/api/ecosystem.packages.$packageId.help.ts +0 -11
- package/src/backend/routes/api/ecosystem.packages.$packageId.install.ts +0 -11
- package/src/backend/routes/api/ecosystem.packages.$packageId.runner-presets.ts +0 -11
- package/src/backend/routes/api/ecosystem.packages.$packageId.upgrade.ts +0 -11
- package/src/backend/routes/api/ecosystem.packages.ts +0 -21
- package/src/backend/routes/api/ecosystem.recipes.$recipeId.run.ts +0 -11
- package/src/backend/routes/api/ecosystem.tasks.$taskId.ts +0 -16
- package/src/backend/routes/api/ecosystem.tasks.ts +0 -12
- package/src/backend/routes/api/groups.$groupId.evidence.ts +0 -55
- package/src/backend/routes/api/groups.$groupId.sessions.ts +0 -50
- package/src/backend/routes/api/groups.$groupId.ts +0 -93
- package/src/backend/routes/api/groups.ts +0 -79
- package/src/backend/routes/api/health.ts +0 -22
- package/src/backend/routes/api/instances.$name.connection.ts +0 -12
- package/src/backend/routes/api/instances.$name.restart.ts +0 -23
- package/src/backend/routes/api/instances.$name.start.ts +0 -18
- package/src/backend/routes/api/instances.$name.stop.ts +0 -23
- package/src/backend/routes/api/instances.$name.ts +0 -12
- package/src/backend/routes/api/instances.ts +0 -16
- package/src/backend/routes/api/knowledge.candidates.$candidateId.promote.ts +0 -32
- package/src/backend/routes/api/knowledge.candidates.$candidateId.ts +0 -50
- package/src/backend/routes/api/knowledge.candidates.ts +0 -10
- package/src/backend/routes/api/knowledge.project-context.ts +0 -29
- package/src/backend/routes/api/knowledge.search.ts +0 -62
- package/src/backend/routes/api/knowledge.sessions.$sessionId.candidates.ts +0 -26
- package/src/backend/routes/api/logs.$id.body.ts +0 -58
- package/src/backend/routes/api/logs.$id.chunks.ts +0 -37
- package/src/backend/routes/api/logs.$id.replay.ts +0 -297
- package/src/backend/routes/api/logs.$id.ts +0 -23
- package/src/backend/routes/api/logs.import.ts +0 -39
- package/src/backend/routes/api/logs.stream.ts +0 -174
- package/src/backend/routes/api/logs.ts +0 -214
- package/src/backend/routes/api/mcp.ts +0 -25
- package/src/backend/routes/api/models.ts +0 -10
- package/src/backend/routes/api/pi-agent.ts +0 -29
- package/src/backend/routes/api/providers.$providerId.model-metadata.ts +0 -173
- package/src/backend/routes/api/providers.$providerId.test.log.ts +0 -342
- package/src/backend/routes/api/providers.$providerId.ts +0 -111
- package/src/backend/routes/api/providers.export.ts +0 -44
- package/src/backend/routes/api/providers.import.ts +0 -81
- package/src/backend/routes/api/providers.scan.ts +0 -28
- package/src/backend/routes/api/providers.ts +0 -102
- package/src/backend/routes/api/runs.$runId.evidence.ts +0 -55
- package/src/backend/routes/api/runs.$runId.ts +0 -50
- package/src/backend/routes/api/runs.ts +0 -62
- package/src/backend/routes/api/runtime.ts +0 -46
- package/src/backend/routes/api/sessions.ts +0 -51
- package/src/backend/routes/api/storage.ts +0 -56
- package/src/backend/routes/livez.ts +0 -13
- package/src/backend/routes/metrics.ts +0 -14
- package/src/backend/routes/proxy/$.ts +0 -15
- package/src/backend/routes/readyz.ts +0 -18
- package/src/backend/start.ts +0 -10
- package/src/cli/alias.ts +0 -431
- package/src/cli/detect-tools.ts +0 -123
- package/src/cli/doctor.ts +0 -836
- package/src/cli/instance.ts +0 -1071
- package/src/cli/instanceApi.ts +0 -213
- package/src/cli/instanceArgs.ts +0 -301
- package/src/cli/instanceControl.ts +0 -191
- package/src/cli/instanceModel.ts +0 -276
- package/src/cli/instanceRegistry.ts +0 -731
- package/src/cli/networkHints.ts +0 -170
- package/src/cli/onboard.ts +0 -1668
- package/src/cli/onboardTarget.ts +0 -228
- package/src/cli/rustBackendPackage.ts +0 -458
- package/src/cli/startupOutput.ts +0 -16
- package/src/cli/templates/codex-skill-onboard.ts +0 -320
- package/src/cli/templates/command-onboard.ts +0 -25
- package/src/cli/templates/skill-onboard.ts +0 -625
- package/src/cli.ts +0 -1433
- package/src/components/OnboardingBanner.tsx +0 -115
- package/src/components/ProxyViewer.tsx +0 -2259
- package/src/components/ProxyViewerContainer.tsx +0 -1076
- package/src/components/alerts/AlertsDialog.tsx +0 -615
- package/src/components/clients/ClientLogo.tsx +0 -175
- package/src/components/ecosystem/AgentLabDialog.tsx +0 -947
- package/src/components/errors/SafeErrorBoundary.tsx +0 -201
- package/src/components/groups/GroupsDialog.tsx +0 -1304
- package/src/components/inspector-pet/InspectorPet.tsx +0 -398
- package/src/components/inspector-pet/InspectorPetCrab3D.tsx +0 -455
- package/src/components/inspector-pet/inspectorPetLogic.ts +0 -272
- package/src/components/pi-agent/PiAgentPanel.tsx +0 -446
- package/src/components/pi-agent/piAgentChatLogic.ts +0 -273
- package/src/components/providers/ImportWizardDialog.tsx +0 -281
- package/src/components/providers/ProviderCard.tsx +0 -347
- package/src/components/providers/ProviderForm.tsx +0 -1183
- package/src/components/providers/ProviderLogo.tsx +0 -122
- package/src/components/providers/ProviderTestResultsView.tsx +0 -734
- package/src/components/providers/ProvidersPanel.tsx +0 -714
- package/src/components/providers/SettingsDialog.tsx +0 -1042
- package/src/components/providers/providerFormCapabilities.ts +0 -36
- package/src/components/proxy-viewer/AgentTraceSummary.tsx +0 -902
- package/src/components/proxy-viewer/AnswerMarkdown.tsx +0 -51
- package/src/components/proxy-viewer/ApplicationBar.tsx +0 -123
- package/src/components/proxy-viewer/CompareDrawer.tsx +0 -984
- package/src/components/proxy-viewer/ConversationGroup.tsx +0 -208
- package/src/components/proxy-viewer/ConversationGroupList.tsx +0 -652
- package/src/components/proxy-viewer/ConversationHeader.tsx +0 -429
- package/src/components/proxy-viewer/LiveConnectionStatus.tsx +0 -186
- package/src/components/proxy-viewer/LogEntry.tsx +0 -1419
- package/src/components/proxy-viewer/LogEntryHeader.tsx +0 -596
- package/src/components/proxy-viewer/ProviderLogoStack.tsx +0 -57
- package/src/components/proxy-viewer/RawExportWarning.tsx +0 -77
- package/src/components/proxy-viewer/ReplayDialog.tsx +0 -636
- package/src/components/proxy-viewer/RequestToolsPanel.tsx +0 -299
- package/src/components/proxy-viewer/ResponseView.tsx +0 -202
- package/src/components/proxy-viewer/SessionLoadProgressBar.tsx +0 -61
- package/src/components/proxy-viewer/StreamingChunkSequence.tsx +0 -265
- package/src/components/proxy-viewer/ThreadConnector.tsx +0 -165
- package/src/components/proxy-viewer/ToolTraceEvents.tsx +0 -64
- package/src/components/proxy-viewer/TurnGroup.tsx +0 -383
- package/src/components/proxy-viewer/TurnGroupList.tsx +0 -156
- package/src/components/proxy-viewer/accessibility.ts +0 -8
- package/src/components/proxy-viewer/anatomy/RequestAnatomy.tsx +0 -887
- package/src/components/proxy-viewer/anatomy/SegmentBar.tsx +0 -222
- package/src/components/proxy-viewer/anatomy/contextIntelligence.ts +0 -737
- package/src/components/proxy-viewer/anatomy/sessionContextSummary.ts +0 -268
- package/src/components/proxy-viewer/anatomy/tokenEstimate.ts +0 -53
- package/src/components/proxy-viewer/anatomy/types.ts +0 -41
- package/src/components/proxy-viewer/anatomy/useAnatomyJump.ts +0 -114
- package/src/components/proxy-viewer/bodyHydration.ts +0 -123
- package/src/components/proxy-viewer/cacheTrend.ts +0 -50
- package/src/components/proxy-viewer/diff/DiffView.tsx +0 -321
- package/src/components/proxy-viewer/diff/computeDiff.ts +0 -178
- package/src/components/proxy-viewer/diff/index.ts +0 -3
- package/src/components/proxy-viewer/formats/anthropic/ContentBlocks.tsx +0 -194
- package/src/components/proxy-viewer/formats/anthropic/ResponseView.tsx +0 -81
- package/src/components/proxy-viewer/formats/anthropic/thinkingExtract.ts +0 -21
- package/src/components/proxy-viewer/formats/index.tsx +0 -47
- package/src/components/proxy-viewer/formats/openai/ResponseView.tsx +0 -442
- package/src/components/proxy-viewer/index.ts +0 -9
- package/src/components/proxy-viewer/lazy.ts +0 -41
- package/src/components/proxy-viewer/liveConnectionState.ts +0 -158
- package/src/components/proxy-viewer/log-formats/anthropic.ts +0 -191
- package/src/components/proxy-viewer/log-formats/index.ts +0 -23
- package/src/components/proxy-viewer/log-formats/openai.ts +0 -256
- package/src/components/proxy-viewer/log-formats/types.ts +0 -40
- package/src/components/proxy-viewer/log-formats/unknown.ts +0 -18
- package/src/components/proxy-viewer/logEntryVisibility.ts +0 -73
- package/src/components/proxy-viewer/logFocus.ts +0 -54
- package/src/components/proxy-viewer/proxyViewerContainerLogic.ts +0 -124
- package/src/components/proxy-viewer/proxyViewerLogic.ts +0 -488
- package/src/components/proxy-viewer/replayComparison.ts +0 -131
- package/src/components/proxy-viewer/requestDiff.ts +0 -277
- package/src/components/proxy-viewer/requestTools.ts +0 -220
- package/src/components/proxy-viewer/useCopyFeedback.ts +0 -38
- package/src/components/proxy-viewer/useKeyboardNavigation.ts +0 -232
- package/src/components/proxy-viewer/viewerState.ts +0 -176
- package/src/components/ui/badge.tsx +0 -47
- package/src/components/ui/button.tsx +0 -47
- package/src/components/ui/collapsible.tsx +0 -21
- package/src/components/ui/confirm-dialog.tsx +0 -51
- package/src/components/ui/crab-logo.tsx +0 -45
- package/src/components/ui/crab-variants.tsx +0 -467
- package/src/components/ui/dialog.tsx +0 -130
- package/src/components/ui/icon-trigger.ts +0 -2
- package/src/components/ui/json-viewer-bulk.ts +0 -132
- package/src/components/ui/json-viewer.tsx +0 -508
- package/src/components/ui/scroll-area.tsx +0 -54
- package/src/components/ui/select.tsx +0 -178
- package/src/components/ui/separator.tsx +0 -28
- package/src/components/ui/tabs.tsx +0 -88
- package/src/components/ui/tooltip.tsx +0 -51
- package/src/components/ui/transient-toast.tsx +0 -105
- package/src/contracts/anthropic.ts +0 -230
- package/src/contracts/index.ts +0 -59
- package/src/contracts/json.ts +0 -37
- package/src/contracts/log.ts +0 -139
- package/src/contracts/openai.ts +0 -267
- package/src/index.css +0 -11
- package/src/knowledge/candidateStore.ts +0 -94
- package/src/knowledge/distiller.ts +0 -98
- package/src/knowledge/openclawClient.ts +0 -161
- package/src/knowledge/openclawGatewayClient.ts +0 -249
- package/src/knowledge/openclawMarkdown.ts +0 -146
- package/src/knowledge/redactor.ts +0 -80
- package/src/knowledge/types.ts +0 -83
- package/src/lib/alertContract.ts +0 -76
- package/src/lib/apiClient.ts +0 -166
- package/src/lib/apiFormat.ts +0 -29
- package/src/lib/backendImplementation.ts +0 -16
- package/src/lib/basePath.ts +0 -107
- package/src/lib/browserRuntimeContract.ts +0 -124
- package/src/lib/browserRuntimeResolver.ts +0 -333
- package/src/lib/chunkLoadRecovery.ts +0 -83
- package/src/lib/claudeCodeStrip.ts +0 -98
- package/src/lib/clipboard.ts +0 -67
- package/src/lib/codingAgentEndpoints.ts +0 -54
- package/src/lib/ecosystemContract.ts +0 -130
- package/src/lib/export-logs.ts +0 -287
- package/src/lib/groupContract.ts +0 -166
- package/src/lib/instanceContract.ts +0 -239
- package/src/lib/jsonFile.ts +0 -46
- package/src/lib/logImportContract.ts +0 -12
- package/src/lib/managedInstance.ts +0 -112
- package/src/lib/mask.ts +0 -4
- package/src/lib/objectUtils.ts +0 -22
- package/src/lib/piAgentContract.ts +0 -102
- package/src/lib/providerContract.ts +0 -125
- package/src/lib/providerImportContract.ts +0 -27
- package/src/lib/providerModelMetadata.ts +0 -458
- package/src/lib/providerTestContract.ts +0 -170
- package/src/lib/providerTestPrompt.ts +0 -100
- package/src/lib/publicBasePathContext.ts +0 -137
- package/src/lib/resourceLimits.ts +0 -345
- package/src/lib/runContract.ts +0 -164
- package/src/lib/runtimeConfig.ts +0 -43
- package/src/lib/safeDiagnostic.ts +0 -38
- package/src/lib/safeFetch.ts +0 -508
- package/src/lib/serverPort.ts +0 -47
- package/src/lib/sessionInfoContract.ts +0 -78
- package/src/lib/sessionUrl.ts +0 -46
- package/src/lib/ssrfGuard.ts +0 -133
- package/src/lib/stopReason.ts +0 -130
- package/src/lib/themeMode.ts +0 -41
- package/src/lib/timeDisplay.ts +0 -22
- package/src/lib/toolTrace.ts +0 -290
- package/src/lib/uiScale.ts +0 -117
- package/src/lib/unknown.ts +0 -27
- package/src/lib/upstreamUrl.ts +0 -150
- package/src/lib/useAlerts.ts +0 -82
- package/src/lib/useGroupEvidence.ts +0 -37
- package/src/lib/useGroups.ts +0 -32
- package/src/lib/useOnboarding.ts +0 -93
- package/src/lib/useProviders.ts +0 -30
- package/src/lib/useStripConfig.ts +0 -154
- package/src/lib/useThemeMode.ts +0 -40
- package/src/lib/useUiScale.ts +0 -52
- package/src/lib/utils.ts +0 -78
- package/src/mcp/currentContext.ts +0 -65
- package/src/mcp/instanceHandlers.ts +0 -151
- package/src/mcp/loopback.ts +0 -88
- package/src/mcp/mode.ts +0 -75
- package/src/mcp/previewExtractor.ts +0 -233
- package/src/mcp/server.ts +0 -2274
- package/src/mcp/toolHandlers.ts +0 -1533
- package/src/proxy/alerts.ts +0 -664
- package/src/proxy/chunkStorage.ts +0 -123
- package/src/proxy/config.ts +0 -218
- package/src/proxy/constants.ts +0 -66
- package/src/proxy/dataDir.ts +0 -147
- package/src/proxy/ecosystemExecutionConfirmation.ts +0 -114
- package/src/proxy/ecosystemExecutionRoute.ts +0 -116
- package/src/proxy/ecosystemRegistry.ts +0 -296
- package/src/proxy/ecosystemTasks.ts +0 -415
- package/src/proxy/evidenceAnalysis.ts +0 -526
- package/src/proxy/evidenceExporter.ts +0 -235
- package/src/proxy/formats/anthropic/anthropicProvider.ts +0 -75
- package/src/proxy/formats/anthropic/handler.ts +0 -75
- package/src/proxy/formats/anthropic/index.ts +0 -13
- package/src/proxy/formats/anthropic/register.ts +0 -4
- package/src/proxy/formats/anthropic/schemas.ts +0 -6
- package/src/proxy/formats/anthropic/stream.ts +0 -205
- package/src/proxy/formats/handler.ts +0 -46
- package/src/proxy/formats/index.ts +0 -13
- package/src/proxy/formats/jsonSchema.ts +0 -2
- package/src/proxy/formats/openai/alibabaProvider.ts +0 -34
- package/src/proxy/formats/openai/codexMetadata.ts +0 -61
- package/src/proxy/formats/openai/handler.ts +0 -133
- package/src/proxy/formats/openai/index.ts +0 -33
- package/src/proxy/formats/openai/provider.ts +0 -50
- package/src/proxy/formats/openai/register.ts +0 -4
- package/src/proxy/formats/openai/schemas.ts +0 -25
- package/src/proxy/formats/openai/stream.ts +0 -600
- package/src/proxy/formats/openai/zhipuProvider.ts +0 -31
- package/src/proxy/formats/providerAdapter.ts +0 -50
- package/src/proxy/formats/providerRegistry.ts +0 -51
- package/src/proxy/formats/providers/index.ts +0 -3
- package/src/proxy/formats/registry.ts +0 -65
- package/src/proxy/groupEvidenceExporter.ts +0 -371
- package/src/proxy/groupStore.ts +0 -336
- package/src/proxy/handler.ts +0 -729
- package/src/proxy/identityProxy.ts +0 -1842
- package/src/proxy/jsonlRecovery.ts +0 -554
- package/src/proxy/logBodyChunks.ts +0 -91
- package/src/proxy/logFinalizer.ts +0 -777
- package/src/proxy/logFinalizer.worker.ts +0 -24
- package/src/proxy/logImportUpload.ts +0 -128
- package/src/proxy/logImporter.ts +0 -813
- package/src/proxy/logIndex.ts +0 -663
- package/src/proxy/logSearch.ts +0 -122
- package/src/proxy/logger.ts +0 -537
- package/src/proxy/openaiOrphanToolStrip.ts +0 -142
- package/src/proxy/platformCommands.ts +0 -258
- package/src/proxy/privateDataPath.ts +0 -419
- package/src/proxy/providerImporters.ts +0 -578
- package/src/proxy/providerScanStore.ts +0 -87
- package/src/proxy/providerSecretStore.ts +0 -216
- package/src/proxy/providers.ts +0 -998
- package/src/proxy/rawStreamCapture.ts +0 -342
- package/src/proxy/runFailures.ts +0 -94
- package/src/proxy/runStore.ts +0 -214
- package/src/proxy/runtimeAdmission.ts +0 -55
- package/src/proxy/runtimeHealth.ts +0 -221
- package/src/proxy/runtimeMetrics.ts +0 -149
- package/src/proxy/runtimeShutdown.ts +0 -157
- package/src/proxy/schemas.ts +0 -112
- package/src/proxy/sessionArchive.ts +0 -479
- package/src/proxy/sessionInfo.ts +0 -266
- package/src/proxy/sessionProcess.ts +0 -194
- package/src/proxy/sessionRuntime.ts +0 -121
- package/src/proxy/sessionSupervisor.ts +0 -305
- package/src/proxy/sessionWorkerEntry.ts +0 -26
- package/src/proxy/shutdownCoordinator.ts +0 -90
- package/src/proxy/socketTracker.ts +0 -639
- package/src/proxy/sqliteLogIndex.ts +0 -733
- package/src/proxy/storageLifecycle.ts +0 -432
- package/src/proxy/store.ts +0 -1773
- package/src/proxy/streamTiming.ts +0 -31
- package/src/proxy/toolSchemaWarnings.ts +0 -529
- package/src/proxy/uiAssetServer.ts +0 -106
- package/src/proxy/upstream.ts +0 -127
- package/src/services/alerts.ts +0 -12
- package/src/services/groups.ts +0 -119
- package/src/services/piAgent.ts +0 -421
- package/src/services/piAgentRetrieval.ts +0 -1180
- package/src/services/result.ts +0 -17
- package/src/services/runs.ts +0 -76
- package/src/ui/bootstrap.ts +0 -167
- package/src/ui/index.html +0 -38
- package/src/ui/logsStreamClient.ts +0 -20
- package/src/ui/main.tsx +0 -13
- package/src/ui/public/runtime-config.js +0 -2
- package/src/ui/router.tsx +0 -13
- package/src/ui/routes/__root.tsx +0 -69
- package/src/ui/routes/index.tsx +0 -35
- package/src/ui/routes/session/$sessionId.tsx +0 -50
- package/src/ui/runtimeDiscovery.ts +0 -50
package/.output/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ var init_package = __esm({
|
|
|
20
20
|
"package.json"() {
|
|
21
21
|
package_default = {
|
|
22
22
|
name: "@tonyclaw/agent-inspector",
|
|
23
|
-
version: "4.0.
|
|
23
|
+
version: "4.0.2",
|
|
24
24
|
type: "module",
|
|
25
25
|
description: "Agent observability and knowledge capture layer for AI coding tools.",
|
|
26
26
|
license: "MIT",
|
|
@@ -60,12 +60,7 @@ var init_package = __esm({
|
|
|
60
60
|
},
|
|
61
61
|
files: [
|
|
62
62
|
"bin",
|
|
63
|
-
"src",
|
|
64
|
-
"!src/**/*.test.ts",
|
|
65
|
-
"!src/**/*.stories.tsx",
|
|
66
|
-
"!src/**/__fixtures__",
|
|
67
|
-
"!src/ui/routeTree.gen.ts",
|
|
68
|
-
"!src/backend/routeTree.gen.ts",
|
|
63
|
+
"src/assets/agent-inspector.ico",
|
|
69
64
|
"scripts/setup-windows-runtime.mjs",
|
|
70
65
|
"scripts/setup-agent-skills.mjs",
|
|
71
66
|
"scripts/generate-theme-scales.mjs",
|
|
@@ -174,9 +169,9 @@ var init_package = __esm({
|
|
|
174
169
|
zod: "^4.4.3"
|
|
175
170
|
},
|
|
176
171
|
optionalDependencies: {
|
|
177
|
-
"@tonyclaw/agent-inspector-backend-darwin-arm64": "4.0.
|
|
178
|
-
"@tonyclaw/agent-inspector-backend-linux-x64-gnu": "4.0.
|
|
179
|
-
"@tonyclaw/agent-inspector-backend-win32-x64-msvc": "4.0.
|
|
172
|
+
"@tonyclaw/agent-inspector-backend-darwin-arm64": "4.0.2",
|
|
173
|
+
"@tonyclaw/agent-inspector-backend-linux-x64-gnu": "4.0.2",
|
|
174
|
+
"@tonyclaw/agent-inspector-backend-win32-x64-msvc": "4.0.2",
|
|
180
175
|
"better-sqlite3": "^12.11.1",
|
|
181
176
|
rcedit: "4.0.1"
|
|
182
177
|
},
|
|
@@ -15590,9 +15585,9 @@ var init_networkHints = __esm({
|
|
|
15590
15585
|
// src/cli/rustBackendPackage.ts
|
|
15591
15586
|
import { spawnSync } from "node:child_process";
|
|
15592
15587
|
import { createHash } from "node:crypto";
|
|
15593
|
-
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
15588
|
+
import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "node:fs";
|
|
15594
15589
|
import { createRequire } from "node:module";
|
|
15595
|
-
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
15590
|
+
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
15596
15591
|
import { fileURLToPath } from "node:url";
|
|
15597
15592
|
function packageFailure(code, message) {
|
|
15598
15593
|
return { kind: "error", error: { code, message } };
|
|
@@ -15704,6 +15699,80 @@ function probeBinaryIdentity(binaryPath, identityFlag) {
|
|
|
15704
15699
|
const parsed = RustBackendIdentitySchema.safeParse(raw);
|
|
15705
15700
|
return parsed.success ? { kind: "success", value: parsed.data } : { kind: "error", message: "identity command returned an unsupported contract" };
|
|
15706
15701
|
}
|
|
15702
|
+
function defaultRuntimeCacheRoot() {
|
|
15703
|
+
const localAppData = process.env["LOCALAPPDATA"];
|
|
15704
|
+
if (localAppData !== void 0 && localAppData.trim().length > 0) {
|
|
15705
|
+
return join(localAppData, "agent-inspector", "runtime", "backend");
|
|
15706
|
+
}
|
|
15707
|
+
return resolve(dirname(fileURLToPath(import.meta.url)), "../.agent-inspector-runtime/backend");
|
|
15708
|
+
}
|
|
15709
|
+
function fileSha256(path2) {
|
|
15710
|
+
return createHash("sha256").update(readFileSync(path2)).digest("hex");
|
|
15711
|
+
}
|
|
15712
|
+
function materializeRuntimeBinary(options) {
|
|
15713
|
+
if (options.os !== "win32") return { kind: "success", command: options.sourceBinaryPath };
|
|
15714
|
+
const runtimeRoot = options.runtimeCacheRoot ?? defaultRuntimeCacheRoot();
|
|
15715
|
+
const targetDirectory = resolve(
|
|
15716
|
+
runtimeRoot,
|
|
15717
|
+
options.packageVersion,
|
|
15718
|
+
options.target,
|
|
15719
|
+
options.sha256
|
|
15720
|
+
);
|
|
15721
|
+
const runtimeBinaryPath = resolve(targetDirectory, basename(options.sourceBinaryPath));
|
|
15722
|
+
if (!isConfinedPath(resolve(runtimeRoot), runtimeBinaryPath)) {
|
|
15723
|
+
return {
|
|
15724
|
+
kind: "error",
|
|
15725
|
+
error: {
|
|
15726
|
+
code: "package_invalid",
|
|
15727
|
+
message: "Rust backend runtime cache path escaped the user runtime directory."
|
|
15728
|
+
}
|
|
15729
|
+
};
|
|
15730
|
+
}
|
|
15731
|
+
try {
|
|
15732
|
+
mkdirSync(targetDirectory, { recursive: true });
|
|
15733
|
+
const needsCopy = !existsSync(runtimeBinaryPath) || fileSha256(runtimeBinaryPath) !== options.sha256;
|
|
15734
|
+
if (needsCopy) copyFileSync(options.sourceBinaryPath, runtimeBinaryPath);
|
|
15735
|
+
chmodSync(runtimeBinaryPath, 493);
|
|
15736
|
+
} catch (error51) {
|
|
15737
|
+
const message = error51 instanceof Error ? error51.message : String(error51);
|
|
15738
|
+
return {
|
|
15739
|
+
kind: "error",
|
|
15740
|
+
error: {
|
|
15741
|
+
code: "binary_invalid",
|
|
15742
|
+
message: `Cannot stage Rust backend into the user runtime cache: ${message}`
|
|
15743
|
+
}
|
|
15744
|
+
};
|
|
15745
|
+
}
|
|
15746
|
+
if (fileSha256(runtimeBinaryPath) !== options.sha256) {
|
|
15747
|
+
return {
|
|
15748
|
+
kind: "error",
|
|
15749
|
+
error: {
|
|
15750
|
+
code: "hash_mismatch",
|
|
15751
|
+
message: "Rust backend runtime cache integrity check failed; no binary was started."
|
|
15752
|
+
}
|
|
15753
|
+
};
|
|
15754
|
+
}
|
|
15755
|
+
const probed = options.identityProbe(runtimeBinaryPath, options.identityFlag);
|
|
15756
|
+
if (probed.kind === "error") {
|
|
15757
|
+
return {
|
|
15758
|
+
kind: "error",
|
|
15759
|
+
error: {
|
|
15760
|
+
code: "identity_failed",
|
|
15761
|
+
message: `Cached Rust backend binary did not pass the production identity gate: ${probed.message}.`
|
|
15762
|
+
}
|
|
15763
|
+
};
|
|
15764
|
+
}
|
|
15765
|
+
if (!identitiesMatch(probed.value, options.manifestIdentity)) {
|
|
15766
|
+
return {
|
|
15767
|
+
kind: "error",
|
|
15768
|
+
error: {
|
|
15769
|
+
code: "identity_mismatch",
|
|
15770
|
+
message: "Cached Rust backend binary identity differs from its package manifest."
|
|
15771
|
+
}
|
|
15772
|
+
};
|
|
15773
|
+
}
|
|
15774
|
+
return { kind: "success", command: runtimeBinaryPath };
|
|
15775
|
+
}
|
|
15707
15776
|
function defaultResolvePackageJson(specifier) {
|
|
15708
15777
|
try {
|
|
15709
15778
|
return packageRequire.resolve(specifier);
|
|
@@ -15834,10 +15903,24 @@ function resolveRustBackendPackage(options) {
|
|
|
15834
15903
|
`Rust backend binary identity differs from its signed package manifest; no binary was started.`
|
|
15835
15904
|
);
|
|
15836
15905
|
}
|
|
15906
|
+
const runtimeBinary = materializeRuntimeBinary({
|
|
15907
|
+
sourceBinaryPath: binaryPath,
|
|
15908
|
+
packageVersion: options.rootVersion,
|
|
15909
|
+
target: target.value.target,
|
|
15910
|
+
sha256,
|
|
15911
|
+
os: target.value.os,
|
|
15912
|
+
runtimeCacheRoot: options.runtimeCacheRoot,
|
|
15913
|
+
identityFlag: metadata.identityFlag,
|
|
15914
|
+
identityProbe: options.identityProbe ?? probeBinaryIdentity,
|
|
15915
|
+
manifestIdentity: manifest.data.identity
|
|
15916
|
+
});
|
|
15917
|
+
if (runtimeBinary.kind === "error") {
|
|
15918
|
+
return { kind: "error", error: runtimeBinary.error };
|
|
15919
|
+
}
|
|
15837
15920
|
return {
|
|
15838
15921
|
kind: "success",
|
|
15839
15922
|
value: {
|
|
15840
|
-
command:
|
|
15923
|
+
command: runtimeBinary.command,
|
|
15841
15924
|
args: [],
|
|
15842
15925
|
packageName: target.value.packageName,
|
|
15843
15926
|
packageVersion: options.rootVersion,
|
|
@@ -16086,12 +16169,12 @@ import {
|
|
|
16086
16169
|
fchmodSync,
|
|
16087
16170
|
fstatSync,
|
|
16088
16171
|
lstatSync,
|
|
16089
|
-
mkdirSync,
|
|
16172
|
+
mkdirSync as mkdirSync2,
|
|
16090
16173
|
openSync,
|
|
16091
16174
|
readdirSync,
|
|
16092
16175
|
realpathSync
|
|
16093
16176
|
} from "node:fs";
|
|
16094
|
-
import { join, parse as parse3, resolve as resolve2, sep } from "node:path";
|
|
16177
|
+
import { join as join2, parse as parse3, resolve as resolve2, sep } from "node:path";
|
|
16095
16178
|
function windowsSystemPath(executable) {
|
|
16096
16179
|
const systemRoot = process.env["SystemRoot"] ?? "C:\\Windows";
|
|
16097
16180
|
return `${systemRoot}\\System32\\${executable}`;
|
|
@@ -16193,7 +16276,7 @@ function snapshotPathChain(path2) {
|
|
|
16193
16276
|
for (let index = 0; index < parts.length; index += 1) {
|
|
16194
16277
|
const part = parts[index];
|
|
16195
16278
|
if (part === void 0) return null;
|
|
16196
|
-
current =
|
|
16279
|
+
current = join2(current, part);
|
|
16197
16280
|
const read = readPathEntry(current);
|
|
16198
16281
|
if (read.status === "unsafe") return null;
|
|
16199
16282
|
if (read.status === "missing") {
|
|
@@ -16277,9 +16360,9 @@ function ensurePrivateDirectorySync(path2) {
|
|
|
16277
16360
|
let current = before.entries.at(-1)?.path;
|
|
16278
16361
|
if (current === void 0) return false;
|
|
16279
16362
|
for (const part of before.missingParts) {
|
|
16280
|
-
const next =
|
|
16363
|
+
const next = join2(current, part);
|
|
16281
16364
|
try {
|
|
16282
|
-
|
|
16365
|
+
mkdirSync2(next, { mode: PRIVATE_DIRECTORY_MODE });
|
|
16283
16366
|
} catch {
|
|
16284
16367
|
const raced = readPathEntry(next);
|
|
16285
16368
|
if (raced.status !== "ok" || raced.entry.kind !== "directory") return false;
|
|
@@ -16313,7 +16396,7 @@ function collectSafeTree(root) {
|
|
|
16313
16396
|
const afterRead = completeSnapshotForKind(path2, "directory");
|
|
16314
16397
|
if (afterRead === null || chainFingerprint(afterRead) !== fingerprint) return false;
|
|
16315
16398
|
for (const entry of entries) {
|
|
16316
|
-
if (!visit(
|
|
16399
|
+
if (!visit(join2(path2, entry))) return false;
|
|
16317
16400
|
}
|
|
16318
16401
|
return true;
|
|
16319
16402
|
};
|
|
@@ -16366,13 +16449,13 @@ var init_privateDataPath = __esm({
|
|
|
16366
16449
|
|
|
16367
16450
|
// src/proxy/dataDir.ts
|
|
16368
16451
|
import { cpSync, existsSync as existsSync2, readdirSync as readdirSync2, renameSync, rmSync } from "node:fs";
|
|
16369
|
-
import { isAbsolute as isAbsolute2, join as
|
|
16452
|
+
import { isAbsolute as isAbsolute2, join as join3 } from "node:path";
|
|
16370
16453
|
function getDataDir() {
|
|
16371
16454
|
migrateLegacyDataDirs();
|
|
16372
16455
|
return resolveDataDir(existsSync2);
|
|
16373
16456
|
}
|
|
16374
16457
|
function hasDataDirState(pathExists, dir) {
|
|
16375
|
-
return pathExists(
|
|
16458
|
+
return pathExists(join3(dir, "providers.json")) || pathExists(join3(dir, "config.json")) || pathExists(join3(dir, "logs")) || pathExists(join3(dir, "chunks"));
|
|
16376
16459
|
}
|
|
16377
16460
|
function defaultBaseDir(env = process.env, platform = process.platform) {
|
|
16378
16461
|
return platform === "win32" ? env["USERPROFILE"] ?? env["APPDATA"] ?? "C:\\" : env["HOME"] ?? "/tmp";
|
|
@@ -16381,13 +16464,13 @@ function resolveDataDir(_pathExists, env = process.env, platform = process.platf
|
|
|
16381
16464
|
const base = defaultBaseDir(env, platform);
|
|
16382
16465
|
const dirEnv = env["AGENT_INSPECTOR_DATA_DIR"];
|
|
16383
16466
|
if (dirEnv !== void 0 && dirEnv !== "") {
|
|
16384
|
-
return isAbsolute2(dirEnv) ? dirEnv :
|
|
16467
|
+
return isAbsolute2(dirEnv) ? dirEnv : join3(base, dirEnv);
|
|
16385
16468
|
}
|
|
16386
16469
|
const legacyDirEnv = env["AGENT_INSPECTOR_CONFIG_DIR"];
|
|
16387
16470
|
if (legacyDirEnv !== void 0 && legacyDirEnv !== "") {
|
|
16388
|
-
return isAbsolute2(legacyDirEnv) ? legacyDirEnv :
|
|
16471
|
+
return isAbsolute2(legacyDirEnv) ? legacyDirEnv : join3(base, legacyDirEnv);
|
|
16389
16472
|
}
|
|
16390
|
-
return
|
|
16473
|
+
return join3(base, CURRENT_DATA_DIR_NAME);
|
|
16391
16474
|
}
|
|
16392
16475
|
function hasExplicitDataDir() {
|
|
16393
16476
|
return process.env["AGENT_INSPECTOR_DATA_DIR"] !== void 0 && process.env["AGENT_INSPECTOR_DATA_DIR"] !== "" || process.env["AGENT_INSPECTOR_CONFIG_DIR"] !== void 0 && process.env["AGENT_INSPECTOR_CONFIG_DIR"] !== "";
|
|
@@ -16395,12 +16478,12 @@ function hasExplicitDataDir() {
|
|
|
16395
16478
|
function migrateLegacyDataDirs() {
|
|
16396
16479
|
if (hasExplicitDataDir()) return;
|
|
16397
16480
|
const base = defaultBaseDir();
|
|
16398
|
-
const currentDir =
|
|
16481
|
+
const currentDir = join3(base, CURRENT_DATA_DIR_NAME);
|
|
16399
16482
|
if (hasDataDirState(existsSync2, currentDir)) return;
|
|
16400
16483
|
for (const legacyName of LEGACY_DATA_DIR_NAMES) {
|
|
16401
|
-
const legacyDir =
|
|
16484
|
+
const legacyDir = join3(base, legacyName);
|
|
16402
16485
|
if (!existsSync2(legacyDir)) continue;
|
|
16403
|
-
const stagingDir =
|
|
16486
|
+
const stagingDir = join3(
|
|
16404
16487
|
base,
|
|
16405
16488
|
`${CURRENT_DATA_DIR_NAME}.migration-${String(process.pid)}-${String(Date.now())}`
|
|
16406
16489
|
);
|
|
@@ -16412,7 +16495,7 @@ function migrateLegacyDataDirs() {
|
|
|
16412
16495
|
}
|
|
16413
16496
|
if (!ensurePrivateDirectorySync(stagingDir)) return;
|
|
16414
16497
|
for (const entry of readdirSync2(legacyDir)) {
|
|
16415
|
-
cpSync(
|
|
16498
|
+
cpSync(join3(legacyDir, entry), join3(stagingDir, entry), {
|
|
16416
16499
|
recursive: true,
|
|
16417
16500
|
force: false,
|
|
16418
16501
|
errorOnExist: true
|
|
@@ -16448,7 +16531,7 @@ var init_dataDir = __esm({
|
|
|
16448
16531
|
// src/proxy/platformCommands.ts
|
|
16449
16532
|
import { statSync as statSync2 } from "node:fs";
|
|
16450
16533
|
import { execFileSync } from "node:child_process";
|
|
16451
|
-
import { delimiter, isAbsolute as isAbsolute3, join as
|
|
16534
|
+
import { delimiter, isAbsolute as isAbsolute3, join as join4 } from "node:path";
|
|
16452
16535
|
function pathEntries(envPath) {
|
|
16453
16536
|
if (envPath === void 0 || envPath.length === 0) return [];
|
|
16454
16537
|
return envPath.split(delimiter).filter((entry) => entry.length > 0);
|
|
@@ -16472,14 +16555,14 @@ function isExecutableCandidate(path2, platform) {
|
|
|
16472
16555
|
function executableCandidates(bin, platform, env) {
|
|
16473
16556
|
if (isAbsolute3(bin)) return [bin];
|
|
16474
16557
|
const entries = pathEntries(env["PATH"] ?? env["Path"] ?? env["path"]);
|
|
16475
|
-
if (platform !== "win32") return entries.map((entry) =>
|
|
16558
|
+
if (platform !== "win32") return entries.map((entry) => join4(entry, bin));
|
|
16476
16559
|
const hasExtension = /\.[^\\/]+$/.test(bin);
|
|
16477
16560
|
const extensions = hasExtension ? [""] : windowsExecutableExtensions(env["PATHEXT"]);
|
|
16478
16561
|
const candidates = [];
|
|
16479
16562
|
for (const entry of entries) {
|
|
16480
16563
|
for (const extension of extensions) {
|
|
16481
|
-
candidates.push(
|
|
16482
|
-
candidates.push(
|
|
16564
|
+
candidates.push(join4(entry, `${bin}${extension.toLowerCase()}`));
|
|
16565
|
+
candidates.push(join4(entry, `${bin}${extension.toUpperCase()}`));
|
|
16483
16566
|
}
|
|
16484
16567
|
}
|
|
16485
16568
|
return candidates;
|
|
@@ -17117,7 +17200,7 @@ import { randomUUID as randomUUID2 } from "node:crypto";
|
|
|
17117
17200
|
import {
|
|
17118
17201
|
closeSync as closeSync2,
|
|
17119
17202
|
existsSync as existsSync3,
|
|
17120
|
-
mkdirSync as
|
|
17203
|
+
mkdirSync as mkdirSync3,
|
|
17121
17204
|
openSync as openSync2,
|
|
17122
17205
|
readFileSync as readFileSync2,
|
|
17123
17206
|
readdirSync as readdirSync3,
|
|
@@ -17129,7 +17212,7 @@ import {
|
|
|
17129
17212
|
} from "node:fs";
|
|
17130
17213
|
import { createServer } from "node:net";
|
|
17131
17214
|
import { homedir } from "node:os";
|
|
17132
|
-
import { join as
|
|
17215
|
+
import { join as join5, posix, win32 } from "node:path";
|
|
17133
17216
|
function getInstancesRoot(env = process.env, platform = process.platform) {
|
|
17134
17217
|
const pathApi = platform === "win32" ? win32 : posix;
|
|
17135
17218
|
const explicitRoot = env[AGENT_INSPECTOR_INSTANCES_DIR_ENV];
|
|
@@ -17152,13 +17235,13 @@ function getInstancesRoot(env = process.env, platform = process.platform) {
|
|
|
17152
17235
|
function getInstancePaths(root, rawName) {
|
|
17153
17236
|
const name = validateInstanceName(rawName);
|
|
17154
17237
|
if (name.kind === "error") return name;
|
|
17155
|
-
const instanceDir =
|
|
17238
|
+
const instanceDir = join5(root, name.value);
|
|
17156
17239
|
return instanceRegistrySuccess({
|
|
17157
17240
|
root,
|
|
17158
17241
|
instanceDir,
|
|
17159
|
-
dataDir:
|
|
17160
|
-
recordPath:
|
|
17161
|
-
lockPath:
|
|
17242
|
+
dataDir: join5(instanceDir, "data"),
|
|
17243
|
+
recordPath: join5(instanceDir, INSTANCE_RECORD_FILE_NAME),
|
|
17244
|
+
lockPath: join5(instanceDir, INSTANCE_LOCK_DIRECTORY_NAME)
|
|
17162
17245
|
});
|
|
17163
17246
|
}
|
|
17164
17247
|
function ensureInstancesRoot(root = getInstancesRoot()) {
|
|
@@ -17206,7 +17289,7 @@ function listInstanceRecords(root) {
|
|
|
17206
17289
|
const names = /* @__PURE__ */ new Set();
|
|
17207
17290
|
for (const entry of entries) {
|
|
17208
17291
|
if (!entry.isDirectory()) continue;
|
|
17209
|
-
const recordPath =
|
|
17292
|
+
const recordPath = join5(root, entry.name, INSTANCE_RECORD_FILE_NAME);
|
|
17210
17293
|
if (!existsSync3(recordPath)) continue;
|
|
17211
17294
|
const record2 = readRecordFile(recordPath);
|
|
17212
17295
|
if (record2.kind === "error") return record2;
|
|
@@ -17253,7 +17336,7 @@ function writeInstanceRecord(root, record2) {
|
|
|
17253
17336
|
`Cannot create or secure the data directory for instance ${validated.data.name}.`
|
|
17254
17337
|
);
|
|
17255
17338
|
}
|
|
17256
|
-
const temporaryPath =
|
|
17339
|
+
const temporaryPath = join5(
|
|
17257
17340
|
paths.value.instanceDir,
|
|
17258
17341
|
`.${INSTANCE_RECORD_FILE_NAME}.${String(process.pid)}.${randomUUID2()}.tmp`
|
|
17259
17342
|
);
|
|
@@ -17303,7 +17386,7 @@ function defaultIsProcessAlive(pid) {
|
|
|
17303
17386
|
}
|
|
17304
17387
|
function readLockOwner(lockPath) {
|
|
17305
17388
|
try {
|
|
17306
|
-
const raw = JSON.parse(readFileSync2(
|
|
17389
|
+
const raw = JSON.parse(readFileSync2(join5(lockPath, LOCK_OWNER_FILE_NAME), "utf8"));
|
|
17307
17390
|
const parsed = InstanceLockOwnerSchema.safeParse(raw);
|
|
17308
17391
|
return parsed.success ? parsed.data : null;
|
|
17309
17392
|
} catch {
|
|
@@ -17361,7 +17444,7 @@ async function acquireDirectoryLock(lockPath, options) {
|
|
|
17361
17444
|
while (now() - startedAt <= timeoutMs) {
|
|
17362
17445
|
const token = createToken();
|
|
17363
17446
|
try {
|
|
17364
|
-
|
|
17447
|
+
mkdirSync3(lockPath, { mode: 448 });
|
|
17365
17448
|
} catch (error51) {
|
|
17366
17449
|
if (nodeErrorCode(error51) !== "EEXIST") {
|
|
17367
17450
|
return instanceRegistryError("registry_io", `Cannot acquire lifecycle lock ${lockPath}.`);
|
|
@@ -17382,7 +17465,7 @@ async function acquireDirectoryLock(lockPath, options) {
|
|
|
17382
17465
|
token,
|
|
17383
17466
|
createdAt: new Date(now()).toISOString()
|
|
17384
17467
|
};
|
|
17385
|
-
const ownerPath =
|
|
17468
|
+
const ownerPath = join5(lockPath, LOCK_OWNER_FILE_NAME);
|
|
17386
17469
|
writeFileSync(ownerPath, `${JSON.stringify(owner)}
|
|
17387
17470
|
`, {
|
|
17388
17471
|
encoding: "utf8",
|
|
@@ -17412,7 +17495,7 @@ async function acquireDirectoryLock(lockPath, options) {
|
|
|
17412
17495
|
}
|
|
17413
17496
|
async function acquireRegistryLock(root, options = {}) {
|
|
17414
17497
|
const ensured = ensureInstancesRoot(root);
|
|
17415
|
-
return ensured.kind === "error" ? ensured : acquireDirectoryLock(
|
|
17498
|
+
return ensured.kind === "error" ? ensured : acquireDirectoryLock(join5(root, ROOT_LOCK_DIRECTORY_NAME), options);
|
|
17416
17499
|
}
|
|
17417
17500
|
async function acquireInstanceLock(root, rawName, options = {}) {
|
|
17418
17501
|
const paths = getInstancePaths(root, rawName);
|
|
@@ -18469,7 +18552,7 @@ var init_browserRuntimeContract = __esm({
|
|
|
18469
18552
|
|
|
18470
18553
|
// src/cli/detect-tools.ts
|
|
18471
18554
|
import { existsSync as existsSync5 } from "node:fs";
|
|
18472
|
-
import { join as
|
|
18555
|
+
import { join as join7 } from "node:path";
|
|
18473
18556
|
import { homedir as homedir2 } from "node:os";
|
|
18474
18557
|
function which(bin) {
|
|
18475
18558
|
return resolveExecutableOnPath(bin);
|
|
@@ -18478,31 +18561,31 @@ function tryDir(path2) {
|
|
|
18478
18561
|
return existsSync5(path2) ? path2 : null;
|
|
18479
18562
|
}
|
|
18480
18563
|
function detectClaudeCode() {
|
|
18481
|
-
const configDir = tryDir(
|
|
18564
|
+
const configDir = tryDir(join7(homedir2(), ".claude"));
|
|
18482
18565
|
const bin = which("claude");
|
|
18483
18566
|
if (configDir === null && bin === null) return { found: false };
|
|
18484
18567
|
return { found: true, path: configDir ?? bin ?? "" };
|
|
18485
18568
|
}
|
|
18486
18569
|
function detectOpenCode() {
|
|
18487
|
-
const configDir = tryDir(
|
|
18570
|
+
const configDir = tryDir(join7(homedir2(), ".config", "opencode"));
|
|
18488
18571
|
const bin = which("opencode");
|
|
18489
18572
|
if (configDir === null && bin === null) return { found: false };
|
|
18490
18573
|
return { found: true, path: configDir ?? bin ?? "" };
|
|
18491
18574
|
}
|
|
18492
18575
|
function detectMiMo() {
|
|
18493
|
-
const configDir = tryDir(
|
|
18576
|
+
const configDir = tryDir(join7(homedir2(), ".config", "mimocode")) ?? tryDir(join7(homedir2(), ".mimocode"));
|
|
18494
18577
|
const bin = which("mimo");
|
|
18495
18578
|
if (configDir === null && bin === null) return { found: false };
|
|
18496
18579
|
return { found: true, path: configDir ?? bin ?? "" };
|
|
18497
18580
|
}
|
|
18498
18581
|
function detectCursor() {
|
|
18499
|
-
const configDir = tryDir(
|
|
18582
|
+
const configDir = tryDir(join7(homedir2(), ".cursor"));
|
|
18500
18583
|
const bin = which("cursor");
|
|
18501
18584
|
if (configDir === null && bin === null) return { found: false };
|
|
18502
18585
|
return { found: true, path: configDir ?? bin ?? "" };
|
|
18503
18586
|
}
|
|
18504
18587
|
function detectCody() {
|
|
18505
|
-
const configDir = tryDir(
|
|
18588
|
+
const configDir = tryDir(join7(homedir2(), ".config", "cody"));
|
|
18506
18589
|
const bin = which("cody");
|
|
18507
18590
|
if (configDir === null && bin === null) return { found: false };
|
|
18508
18591
|
return { found: true, path: configDir ?? bin ?? "" };
|
|
@@ -19558,7 +19641,7 @@ __export(onboard_exports, {
|
|
|
19558
19641
|
runOnboard: () => runOnboard
|
|
19559
19642
|
});
|
|
19560
19643
|
import {
|
|
19561
|
-
mkdirSync as
|
|
19644
|
+
mkdirSync as mkdirSync4,
|
|
19562
19645
|
writeFileSync as writeFileSync2,
|
|
19563
19646
|
existsSync as existsSync6,
|
|
19564
19647
|
readFileSync as readFileSync3,
|
|
@@ -19567,7 +19650,7 @@ import {
|
|
|
19567
19650
|
rmdirSync
|
|
19568
19651
|
} from "node:fs";
|
|
19569
19652
|
import { homedir as homedir3 } from "node:os";
|
|
19570
|
-
import { dirname as dirname2, join as
|
|
19653
|
+
import { dirname as dirname2, join as join8 } from "node:path";
|
|
19571
19654
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
19572
19655
|
function actionForStatus(label, state) {
|
|
19573
19656
|
switch (state) {
|
|
@@ -19899,15 +19982,15 @@ Exit codes:
|
|
|
19899
19982
|
`);
|
|
19900
19983
|
}
|
|
19901
19984
|
function resolveTargets(flags) {
|
|
19902
|
-
const claudeRoot = flags.skillDir ??
|
|
19903
|
-
const claudeSkillDir =
|
|
19904
|
-
const claudeCommandsDir =
|
|
19905
|
-
const codexRoot = process.env["CODEX_HOME"] ??
|
|
19906
|
-
const codexSkillsDir = flags.codexSkillDir ??
|
|
19985
|
+
const claudeRoot = flags.skillDir ?? join8(homedir3(), ".claude");
|
|
19986
|
+
const claudeSkillDir = join8(claudeRoot, "skills", SKILL_DIR_NAME);
|
|
19987
|
+
const claudeCommandsDir = join8(claudeRoot, "commands");
|
|
19988
|
+
const codexRoot = process.env["CODEX_HOME"] ?? join8(homedir3(), ".codex");
|
|
19989
|
+
const codexSkillsDir = flags.codexSkillDir ?? join8(codexRoot, "skills");
|
|
19907
19990
|
return {
|
|
19908
|
-
claudeSkillFile:
|
|
19909
|
-
claudeCommandFile:
|
|
19910
|
-
codexSkillFile:
|
|
19991
|
+
claudeSkillFile: join8(claudeSkillDir, SKILL_FILE_NAME),
|
|
19992
|
+
claudeCommandFile: join8(claudeCommandsDir, COMMAND_FILE_NAME),
|
|
19993
|
+
codexSkillFile: join8(codexSkillsDir, SKILL_DIR_NAME, SKILL_FILE_NAME)
|
|
19911
19994
|
};
|
|
19912
19995
|
}
|
|
19913
19996
|
function isObject2(value) {
|
|
@@ -19926,32 +20009,32 @@ function resolveOpenCodeConfigPath(flags) {
|
|
|
19926
20009
|
if (flags.opencodeConfig !== null) {
|
|
19927
20010
|
return flags.opencodeConfig;
|
|
19928
20011
|
}
|
|
19929
|
-
const configDir =
|
|
19930
|
-
const jsoncPath =
|
|
20012
|
+
const configDir = join8(homedir3(), ".config", "opencode");
|
|
20013
|
+
const jsoncPath = join8(configDir, "opencode.jsonc");
|
|
19931
20014
|
if (existsSync6(jsoncPath)) {
|
|
19932
20015
|
return jsoncPath;
|
|
19933
20016
|
}
|
|
19934
|
-
return
|
|
20017
|
+
return join8(configDir, "opencode.json");
|
|
19935
20018
|
}
|
|
19936
20019
|
function resolveMiMoConfigPath(flags) {
|
|
19937
20020
|
if (flags.mimoConfig !== null) {
|
|
19938
20021
|
return flags.mimoConfig;
|
|
19939
20022
|
}
|
|
19940
|
-
const configDir =
|
|
19941
|
-
const jsoncPath =
|
|
20023
|
+
const configDir = join8(homedir3(), ".config", "mimocode");
|
|
20024
|
+
const jsoncPath = join8(configDir, "mimocode.jsonc");
|
|
19942
20025
|
if (existsSync6(jsoncPath)) {
|
|
19943
20026
|
return jsoncPath;
|
|
19944
20027
|
}
|
|
19945
|
-
const jsonPath =
|
|
20028
|
+
const jsonPath = join8(configDir, "mimocode.json");
|
|
19946
20029
|
if (existsSync6(jsonPath)) {
|
|
19947
20030
|
return jsonPath;
|
|
19948
20031
|
}
|
|
19949
|
-
const legacyDir =
|
|
19950
|
-
const legacyJsoncPath =
|
|
20032
|
+
const legacyDir = join8(homedir3(), ".mimocode");
|
|
20033
|
+
const legacyJsoncPath = join8(legacyDir, "config.jsonc");
|
|
19951
20034
|
if (existsSync6(legacyJsoncPath)) {
|
|
19952
20035
|
return legacyJsoncPath;
|
|
19953
20036
|
}
|
|
19954
|
-
const legacyJsonPath =
|
|
20037
|
+
const legacyJsonPath = join8(legacyDir, "config.json");
|
|
19955
20038
|
if (existsSync6(legacyJsonPath)) {
|
|
19956
20039
|
return legacyJsonPath;
|
|
19957
20040
|
}
|
|
@@ -20356,8 +20439,8 @@ function buildDetectedSummary() {
|
|
|
20356
20439
|
}
|
|
20357
20440
|
function readPackageVersion() {
|
|
20358
20441
|
const packageJsonPaths = [
|
|
20359
|
-
|
|
20360
|
-
|
|
20442
|
+
join8(__dirname, "..", "package.json"),
|
|
20443
|
+
join8(__dirname, "..", "..", "package.json")
|
|
20361
20444
|
];
|
|
20362
20445
|
try {
|
|
20363
20446
|
for (const packageJsonPath of packageJsonPaths) {
|
|
@@ -20647,7 +20730,7 @@ No files were removed.
|
|
|
20647
20730
|
}
|
|
20648
20731
|
for (const plan of agentPlans) {
|
|
20649
20732
|
if (plan.shouldRemove && plan.body !== null) {
|
|
20650
|
-
|
|
20733
|
+
mkdirSync4(dirname2(plan.status.path), { recursive: true });
|
|
20651
20734
|
writeFileSync2(plan.status.path, plan.body, "utf8");
|
|
20652
20735
|
process.stdout.write(`Removed ${plan.status.label} entry from: ${plan.status.path}
|
|
20653
20736
|
`);
|
|
@@ -20887,12 +20970,12 @@ No files were written.
|
|
|
20887
20970
|
}
|
|
20888
20971
|
try {
|
|
20889
20972
|
for (const file2 of filesToWrite) {
|
|
20890
|
-
|
|
20973
|
+
mkdirSync4(dirname2(file2.path), { recursive: true });
|
|
20891
20974
|
writeFileSync2(file2.path, file2.body, "utf8");
|
|
20892
20975
|
}
|
|
20893
20976
|
for (const plan of agentPlansToWrite) {
|
|
20894
20977
|
if (plan.body !== null) {
|
|
20895
|
-
|
|
20978
|
+
mkdirSync4(dirname2(plan.status.path), { recursive: true });
|
|
20896
20979
|
writeFileSync2(plan.status.path, plan.body, "utf8");
|
|
20897
20980
|
}
|
|
20898
20981
|
}
|
|
@@ -20984,7 +21067,7 @@ __export(doctor_exports, {
|
|
|
20984
21067
|
runDoctor: () => runDoctor
|
|
20985
21068
|
});
|
|
20986
21069
|
import { existsSync as existsSync7, readFileSync as readFileSync4, readdirSync as readdirSync5, statSync as statSync4 } from "node:fs";
|
|
20987
|
-
import { isAbsolute as isAbsolute5, join as
|
|
21070
|
+
import { isAbsolute as isAbsolute5, join as join9, resolve as resolve5 } from "node:path";
|
|
20988
21071
|
import { createConnection } from "node:net";
|
|
20989
21072
|
function check2(name, severity, message, hint = "") {
|
|
20990
21073
|
return {
|
|
@@ -21104,10 +21187,10 @@ function providerConfigCandidates(options, deps) {
|
|
|
21104
21187
|
}
|
|
21105
21188
|
if (options.configDir !== null) {
|
|
21106
21189
|
const dir = resolveMaybeRelative(deps.cwd, options.configDir);
|
|
21107
|
-
return [
|
|
21190
|
+
return [join9(dir, "providers.json"), join9(dir, "config.json")];
|
|
21108
21191
|
}
|
|
21109
21192
|
const dataDir = resolveDefaultDataDir(deps.env, deps.platform, deps.exists);
|
|
21110
|
-
return [
|
|
21193
|
+
return [join9(dataDir, "providers.json"), join9(dataDir, "config.json")];
|
|
21111
21194
|
}
|
|
21112
21195
|
function checkProviderConfig(options, deps) {
|
|
21113
21196
|
const providersJson = options.providersJson ?? deps.env["AGENT_INSPECTOR_PROVIDERS_JSON"] ?? null;
|
|
@@ -21242,7 +21325,7 @@ function readinessChecks(readiness) {
|
|
|
21242
21325
|
function findProjectRoot(startDir, deps) {
|
|
21243
21326
|
let current = resolve5(startDir);
|
|
21244
21327
|
for (let i = 0; i < 6; i++) {
|
|
21245
|
-
if (deps.exists(
|
|
21328
|
+
if (deps.exists(join9(current, "package.json"))) return current;
|
|
21246
21329
|
const next = resolve5(current, "..");
|
|
21247
21330
|
if (next === current) return startDir;
|
|
21248
21331
|
current = next;
|
|
@@ -21250,7 +21333,7 @@ function findProjectRoot(startDir, deps) {
|
|
|
21250
21333
|
return startDir;
|
|
21251
21334
|
}
|
|
21252
21335
|
function checkPackage(rootDir, deps) {
|
|
21253
|
-
const packagePath =
|
|
21336
|
+
const packagePath = join9(rootDir, "package.json");
|
|
21254
21337
|
const text = deps.readText(packagePath);
|
|
21255
21338
|
if (text === null) {
|
|
21256
21339
|
return check2("Package metadata", "warn", "package.json was not found near the CLI bundle.");
|
|
@@ -21275,7 +21358,7 @@ function countFilesInDir(dir, deps) {
|
|
|
21275
21358
|
if (files === null) return null;
|
|
21276
21359
|
let count = 0;
|
|
21277
21360
|
for (const file2 of files) {
|
|
21278
|
-
const fileStat = deps.stat(
|
|
21361
|
+
const fileStat = deps.stat(join9(dir, file2));
|
|
21279
21362
|
if (fileStat !== null && !fileStat.isDirectory) count += 1;
|
|
21280
21363
|
}
|
|
21281
21364
|
return count;
|
|
@@ -21295,24 +21378,24 @@ function dirSize(dir, deps, depth = 0) {
|
|
|
21295
21378
|
if (files === null) return null;
|
|
21296
21379
|
let total = 0;
|
|
21297
21380
|
for (const file2 of files) {
|
|
21298
|
-
const childSize = dirSize(
|
|
21381
|
+
const childSize = dirSize(join9(dir, file2), deps, depth + 1);
|
|
21299
21382
|
if (childSize !== null) total += childSize;
|
|
21300
21383
|
}
|
|
21301
21384
|
return total;
|
|
21302
21385
|
}
|
|
21303
21386
|
function verboseChecks(options, deps) {
|
|
21304
21387
|
const dataDir = resolveDefaultDataDir(deps.env, deps.platform, deps.exists);
|
|
21305
|
-
const logsDir =
|
|
21306
|
-
const chunksDir =
|
|
21388
|
+
const logsDir = join9(dataDir, "logs");
|
|
21389
|
+
const chunksDir = join9(dataDir, "chunks");
|
|
21307
21390
|
const providerCandidates = providerConfigCandidates(options, deps);
|
|
21308
21391
|
const captureMode = deps.env["AGENT_INSPECTOR_MODE"] ?? deps.env["AGENT_INSPECTOR_CAPTURE_MODE"] ?? "simple";
|
|
21309
21392
|
const logCount = countFilesInDir(logsDir, deps);
|
|
21310
21393
|
const logSize = dirSize(logsDir, deps);
|
|
21311
21394
|
const chunkSize = dirSize(chunksDir, deps);
|
|
21312
21395
|
const homeDir = deps.platform === "win32" ? deps.env["USERPROFILE"] ?? deps.env["APPDATA"] ?? null : deps.env["HOME"] ?? null;
|
|
21313
|
-
const claudeSkill = homeDir === null ? null :
|
|
21314
|
-
const claudeCommand = homeDir === null ? null :
|
|
21315
|
-
const codexSkill = homeDir === null ? null :
|
|
21396
|
+
const claudeSkill = homeDir === null ? null : join9(homeDir, ".claude", "skills", "agent-inspector-onboard", "SKILL.md");
|
|
21397
|
+
const claudeCommand = homeDir === null ? null : join9(homeDir, ".claude", "commands", "agent-inspector-onboard.md");
|
|
21398
|
+
const codexSkill = homeDir === null ? null : join9(homeDir, ".codex", "skills", "agent-inspector-onboard", "SKILL.md");
|
|
21316
21399
|
const hasClaudeOnboarding = claudeSkill !== null && claudeCommand !== null && deps.exists(claudeSkill) && deps.exists(claudeCommand);
|
|
21317
21400
|
const hasCodexOnboarding = codexSkill !== null && deps.exists(codexSkill);
|
|
21318
21401
|
return [
|
|
@@ -21344,8 +21427,8 @@ function verboseChecks(options, deps) {
|
|
|
21344
21427
|
];
|
|
21345
21428
|
}
|
|
21346
21429
|
function checkExtensionSource(rootDir, deps) {
|
|
21347
|
-
const extensionDir =
|
|
21348
|
-
const missing = EXTENSION_REQUIRED_FILES.filter((file2) => !deps.exists(
|
|
21430
|
+
const extensionDir = join9(rootDir, "extensions", "chrome");
|
|
21431
|
+
const missing = EXTENSION_REQUIRED_FILES.filter((file2) => !deps.exists(join9(extensionDir, file2)));
|
|
21349
21432
|
if (missing.length === 0) {
|
|
21350
21433
|
return check2(
|
|
21351
21434
|
"Chrome extension source",
|
|
@@ -21361,7 +21444,7 @@ function checkExtensionSource(rootDir, deps) {
|
|
|
21361
21444
|
);
|
|
21362
21445
|
}
|
|
21363
21446
|
function extensionManifestVersion(rootDir, deps) {
|
|
21364
|
-
const manifestText = deps.readText(
|
|
21447
|
+
const manifestText = deps.readText(join9(rootDir, "extensions", "chrome", "manifest.json"));
|
|
21365
21448
|
if (manifestText === null) return null;
|
|
21366
21449
|
try {
|
|
21367
21450
|
const manifest = JSON.parse(manifestText);
|
|
@@ -21373,7 +21456,7 @@ function extensionManifestVersion(rootDir, deps) {
|
|
|
21373
21456
|
}
|
|
21374
21457
|
}
|
|
21375
21458
|
function checkExtensionPackage(rootDir, deps) {
|
|
21376
|
-
const distDir =
|
|
21459
|
+
const distDir = join9(rootDir, "dist", "chrome-extension");
|
|
21377
21460
|
const files = deps.listDir(distDir);
|
|
21378
21461
|
if (files === null) {
|
|
21379
21462
|
return check2(
|
|
@@ -21995,8 +22078,8 @@ import { Buffer as Buffer5 } from "node:buffer";
|
|
|
21995
22078
|
import { spawn as spawn2 } from "node:child_process";
|
|
21996
22079
|
import { createConnection as createConnection2 } from "node:net";
|
|
21997
22080
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
21998
|
-
import { dirname as dirname3, join as
|
|
21999
|
-
import { appendFileSync, existsSync as existsSync8, mkdirSync as
|
|
22081
|
+
import { dirname as dirname3, join as join10, resolve as resolvePath2 } from "node:path";
|
|
22082
|
+
import { appendFileSync, existsSync as existsSync8, mkdirSync as mkdirSync5 } from "node:fs";
|
|
22000
22083
|
|
|
22001
22084
|
// src/cli/startupOutput.ts
|
|
22002
22085
|
function shouldSuppressServerOutputLine(line, context) {
|
|
@@ -22197,7 +22280,7 @@ import { createHash as createHash2, randomUUID as randomUUID3 } from "node:crypt
|
|
|
22197
22280
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
22198
22281
|
import { constants as constants2, existsSync as existsSync4, lstatSync as lstatSync2 } from "node:fs";
|
|
22199
22282
|
import { link, lstat, open, readFile, readdir, stat, unlink } from "node:fs/promises";
|
|
22200
|
-
import { basename, join as
|
|
22283
|
+
import { basename as basename2, join as join6, resolve as resolve3 } from "node:path";
|
|
22201
22284
|
|
|
22202
22285
|
// src/proxy/schemas.ts
|
|
22203
22286
|
init_zod();
|
|
@@ -22814,12 +22897,12 @@ async function inspectExistingQuarantine(filePath, expected) {
|
|
|
22814
22897
|
}
|
|
22815
22898
|
}
|
|
22816
22899
|
async function quarantineTail(context, sourceFile, tail, tailOffset) {
|
|
22817
|
-
const quarantineDirectory =
|
|
22900
|
+
const quarantineDirectory = join6(context.root, QUARANTINE_DIRECTORY);
|
|
22818
22901
|
if (!ensurePrivateDirectorySync(quarantineDirectory)) return null;
|
|
22819
22902
|
const tailSha256 = hashBytes(tail);
|
|
22820
|
-
const sourceFileName =
|
|
22821
|
-
const destination =
|
|
22822
|
-
const temporary =
|
|
22903
|
+
const sourceFileName = basename2(sourceFile);
|
|
22904
|
+
const destination = join6(quarantineDirectory, `${sourceFileName}.tail-${tailSha256}.json`);
|
|
22905
|
+
const temporary = join6(
|
|
22823
22906
|
quarantineDirectory,
|
|
22824
22907
|
`.${sourceFileName}.${String(process.pid)}.${randomUUID3()}.tmp`
|
|
22825
22908
|
);
|
|
@@ -22960,7 +23043,7 @@ async function recoverFile(context, filePath) {
|
|
|
22960
23043
|
}
|
|
22961
23044
|
}
|
|
22962
23045
|
function applyFileResult(context, filePath, result) {
|
|
22963
|
-
const file2 =
|
|
23046
|
+
const file2 = basename2(filePath);
|
|
22964
23047
|
switch (result.status) {
|
|
22965
23048
|
case "clean":
|
|
22966
23049
|
context.safeFiles.set(filePath, result.signature);
|
|
@@ -23006,7 +23089,7 @@ async function runStartupRecovery(context) {
|
|
|
23006
23089
|
}
|
|
23007
23090
|
const files = entries.filter((entry) => entry.endsWith(".jsonl")).sort();
|
|
23008
23091
|
for (const file2 of files) {
|
|
23009
|
-
const filePath =
|
|
23092
|
+
const filePath = join6(context.root, file2);
|
|
23010
23093
|
const result = await recoverFile(context, filePath);
|
|
23011
23094
|
applyFileResult(context, filePath, result);
|
|
23012
23095
|
if (context.health.level === "unavailable") break;
|
|
@@ -25170,10 +25253,10 @@ function pipeServerOutput(child, context) {
|
|
|
25170
25253
|
}
|
|
25171
25254
|
function createBackgroundSupervisorLogs(env) {
|
|
25172
25255
|
try {
|
|
25173
|
-
const logsDir =
|
|
25174
|
-
|
|
25175
|
-
const stdoutPath =
|
|
25176
|
-
const stderrPath =
|
|
25256
|
+
const logsDir = join10(resolveDataDir(existsSync8, env), "logs");
|
|
25257
|
+
mkdirSync5(logsDir, { recursive: true });
|
|
25258
|
+
const stdoutPath = join10(logsDir, "backend.stdout.log");
|
|
25259
|
+
const stderrPath = join10(logsDir, "backend.stderr.log");
|
|
25177
25260
|
const header = `
|
|
25178
25261
|
[${(/* @__PURE__ */ new Date()).toISOString()}] Agent Inspector backend process started
|
|
25179
25262
|
`;
|
|
@@ -25248,7 +25331,7 @@ function resolveServerCommand(outputDir, serverPath, backend) {
|
|
|
25248
25331
|
command: { command: resolved.value.command, args: [...resolved.value.args] }
|
|
25249
25332
|
};
|
|
25250
25333
|
}
|
|
25251
|
-
const brandedRuntime =
|
|
25334
|
+
const brandedRuntime = join10(outputDir, BRANDED_WINDOWS_RUNTIME_EXE);
|
|
25252
25335
|
return {
|
|
25253
25336
|
kind: "success",
|
|
25254
25337
|
command: process.platform === "win32" && existsSync8(brandedRuntime) ? { command: brandedRuntime, args: [serverPath] } : { command: process.execPath, args: [serverPath] }
|
|
@@ -25646,8 +25729,8 @@ async function runStart(args) {
|
|
|
25646
25729
|
process.exitCode = 1;
|
|
25647
25730
|
return;
|
|
25648
25731
|
}
|
|
25649
|
-
const uiDirectoryCandidate =
|
|
25650
|
-
const uiIndexPath =
|
|
25732
|
+
const uiDirectoryCandidate = join10(__dirname2, "../.output/ui");
|
|
25733
|
+
const uiIndexPath = join10(uiDirectoryCandidate, "index.html");
|
|
25651
25734
|
const uiDirectory = serveUi && existsSync8(uiIndexPath) ? uiDirectoryCandidate : void 0;
|
|
25652
25735
|
if (serveUi && uiDirectory === void 0) {
|
|
25653
25736
|
console.error(
|
|
@@ -25657,7 +25740,7 @@ async function runStart(args) {
|
|
|
25657
25740
|
return;
|
|
25658
25741
|
}
|
|
25659
25742
|
const outputDir = __dirname2;
|
|
25660
|
-
const serverPath =
|
|
25743
|
+
const serverPath = join10(outputDir, "../.output/server/index.mjs");
|
|
25661
25744
|
const serverCommandResolution = resolveServerCommand(outputDir, serverPath, backend);
|
|
25662
25745
|
if (serverCommandResolution.kind === "error") {
|
|
25663
25746
|
console.error(serverCommandResolution.message);
|
|
@@ -25811,7 +25894,7 @@ async function runStart(args) {
|
|
|
25811
25894
|
serverEnv[AGENT_INSPECTOR_CLI_ENTRY_ENV] = currentCliEntry;
|
|
25812
25895
|
}
|
|
25813
25896
|
if (configDir !== void 0) {
|
|
25814
|
-
let resolvedPath =
|
|
25897
|
+
let resolvedPath = join10(configDir);
|
|
25815
25898
|
const msysMatch = /^\\([a-z])\\(.*)$/i.exec(resolvedPath);
|
|
25816
25899
|
if (msysMatch !== null) {
|
|
25817
25900
|
const drive = (msysMatch[1] ?? "").toUpperCase();
|
|
@@ -25837,7 +25920,7 @@ async function runStart(args) {
|
|
|
25837
25920
|
serverEnv["AGENT_INSPECTOR_CAPTURE_MODE"] = captureMode;
|
|
25838
25921
|
serverEnv[AGENT_INSPECTOR_BACKEND_ENV] = backend;
|
|
25839
25922
|
serverEnv["AGENT_INSPECTOR_BACKEND_ONLY"] = serveUi ? "0" : "1";
|
|
25840
|
-
const workerDir =
|
|
25923
|
+
const workerDir = join10(__dirname2, "workers");
|
|
25841
25924
|
if (existsSync8(workerDir)) {
|
|
25842
25925
|
serverEnv["AGENT_INSPECTOR_WORKER_DIR"] = workerDir;
|
|
25843
25926
|
}
|