ummaya 0.2.4 → 0.2.5
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/README.md +15 -2
- package/bin/ummaya +10 -1
- package/npm-shrinkwrap.json +253 -2
- package/package.json +5 -1
- package/prompts/manifest.yaml +1 -1
- package/prompts/system_v1.md +1 -0
- package/pyproject.toml +26 -2
- package/specs/2803-document-production-hardening/contracts/document-tools.schema.json +1043 -0
- package/src/ummaya/_canonical/__init__.py +2 -0
- package/src/ummaya/engine/engine.py +29 -132
- package/src/ummaya/evidence/__init__.py +21 -2
- package/src/ummaya/evidence/dataset_contract.py +193 -0
- package/src/ummaya/evidence/document_authoring_cases.py +33 -0
- package/src/ummaya/evidence/document_harness.py +313 -0
- package/src/ummaya/evidence/document_viewer_ux.py +391 -0
- package/src/ummaya/evidence/gates.py +70 -0
- package/src/ummaya/evidence/json_types.py +20 -0
- package/src/ummaya/evidence/models.py +88 -1
- package/src/ummaya/evidence/output_payload.py +89 -0
- package/src/ummaya/evidence/payload_documents.py +233 -0
- package/src/ummaya/evidence/route_contracts.py +224 -0
- package/src/ummaya/evidence/route_helpers.py +150 -0
- package/src/ummaya/evidence/runner.py +81 -212
- package/src/ummaya/evidence/source_provenance.py +246 -0
- package/src/ummaya/evidence/source_provenance_redaction.py +176 -0
- package/src/ummaya/evidence/tool_layer.py +39 -0
- package/src/ummaya/evidence/tool_layer_models.py +151 -0
- package/src/ummaya/ipc/adapter_manifest_emitter.py +26 -10
- package/src/ummaya/ipc/document_intent_normalization.py +185 -0
- package/src/ummaya/ipc/frame_schema.py +5 -5
- package/src/ummaya/ipc/route_diagnostics.py +73 -0
- package/src/ummaya/ipc/stdio.py +1109 -477
- package/src/ummaya/llm/client.py +102 -3
- package/src/ummaya/llm/config.py +8 -3
- package/src/ummaya/primitives/__init__.py +6 -2
- package/src/ummaya/primitives/delegation.py +1 -1
- package/src/ummaya/primitives/document.py +28 -0
- package/src/ummaya/settings.py +0 -3
- package/src/ummaya/tools/discovery_bridge.py +17 -1
- package/src/ummaya/tools/documents/__init__.py +297 -0
- package/src/ummaya/tools/documents/adapter_registry.py +487 -0
- package/src/ummaya/tools/documents/archive_container_probe.py +167 -0
- package/src/ummaya/tools/documents/artifact_store.py +454 -0
- package/src/ummaya/tools/documents/authoring.py +283 -0
- package/src/ummaya/tools/documents/baselines.py +114 -0
- package/src/ummaya/tools/documents/capability.py +331 -0
- package/src/ummaya/tools/documents/contracts.py +112 -0
- package/src/ummaya/tools/documents/conversion.py +521 -0
- package/src/ummaya/tools/documents/diff.py +275 -0
- package/src/ummaya/tools/documents/engines.py +163 -0
- package/src/ummaya/tools/documents/evaluation.py +291 -0
- package/src/ummaya/tools/documents/explicit_values.py +108 -0
- package/src/ummaya/tools/documents/fixtures.py +174 -0
- package/src/ummaya/tools/documents/format_completion_audit.py +471 -0
- package/src/ummaya/tools/documents/formats/__init__.py +2 -0
- package/src/ummaya/tools/documents/formats/archive.py +528 -0
- package/src/ummaya/tools/documents/formats/base.py +41 -0
- package/src/ummaya/tools/documents/formats/code_file.py +211 -0
- package/src/ummaya/tools/documents/formats/data_file.py +272 -0
- package/src/ummaya/tools/documents/formats/hwp.py +284 -0
- package/src/ummaya/tools/documents/formats/hwpx.py +1837 -0
- package/src/ummaya/tools/documents/formats/odf.py +435 -0
- package/src/ummaya/tools/documents/formats/ooxml.py +1030 -0
- package/src/ummaya/tools/documents/formats/passive.py +766 -0
- package/src/ummaya/tools/documents/formats/pdf.py +702 -0
- package/src/ummaya/tools/documents/formats/text_web.py +268 -0
- package/src/ummaya/tools/documents/hwp_conversion_probe.py +178 -0
- package/src/ummaya/tools/documents/hwp_direct_candidate.py +141 -0
- package/src/ummaya/tools/documents/inspection.py +289 -0
- package/src/ummaya/tools/documents/intake.py +1079 -0
- package/src/ummaya/tools/documents/legacy_office_promotion_probe.py +366 -0
- package/src/ummaya/tools/documents/models.py +1598 -0
- package/src/ummaya/tools/documents/odf_promotion_probe.py +167 -0
- package/src/ummaya/tools/documents/orchestrator.py +96 -0
- package/src/ummaya/tools/documents/passive_capability_probe.py +251 -0
- package/src/ummaya/tools/documents/patch.py +170 -0
- package/src/ummaya/tools/documents/pdfa_conformance.py +284 -0
- package/src/ummaya/tools/documents/pdfa_promotion_probe.py +198 -0
- package/src/ummaya/tools/documents/permissions.py +110 -0
- package/src/ummaya/tools/documents/planner.py +616 -0
- package/src/ummaya/tools/documents/registry.py +2733 -0
- package/src/ummaya/tools/documents/render.py +978 -0
- package/src/ummaya/tools/documents/render_comparison.py +113 -0
- package/src/ummaya/tools/documents/render_comparison_models.py +74 -0
- package/src/ummaya/tools/documents/render_comparison_regions.py +73 -0
- package/src/ummaya/tools/documents/render_comparison_style.py +161 -0
- package/src/ummaya/tools/documents/reread.py +157 -0
- package/src/ummaya/tools/documents/runtime_authoring.py +244 -0
- package/src/ummaya/tools/documents/runtime_authoring_bundle.py +76 -0
- package/src/ummaya/tools/documents/scorecard.py +184 -0
- package/src/ummaya/tools/documents/socratic_planner.py +193 -0
- package/src/ummaya/tools/documents/style.py +48 -0
- package/src/ummaya/tools/documents/tool_defs.py +523 -0
- package/src/ummaya/tools/documents/validate.py +347 -0
- package/src/ummaya/tools/executor.py +29 -0
- package/src/ummaya/tools/live_proxy.py +0 -3
- package/src/ummaya/tools/models.py +5 -1
- package/src/ummaya/tools/register_all.py +8 -0
- package/src/ummaya/tools/registry.py +10 -1
- package/src/ummaya/tools/routing/__init__.py +59 -0
- package/src/ummaya/tools/routing/builder.py +105 -0
- package/src/ummaya/tools/routing/cards.py +29 -0
- package/src/ummaya/tools/routing/decision_service.py +534 -0
- package/src/ummaya/tools/routing/decision_types.py +74 -0
- package/src/ummaya/tools/routing/feasibility.py +122 -0
- package/src/ummaya/tools/routing/intent.py +17 -0
- package/src/ummaya/tools/routing/intent_extractor.py +207 -0
- package/src/ummaya/tools/routing/intent_patterns.py +160 -0
- package/src/ummaya/tools/routing/intent_public_data.py +150 -0
- package/src/ummaya/tools/routing/intent_types.py +48 -0
- package/src/ummaya/tools/routing/lint.py +78 -0
- package/src/ummaya/tools/routing/metadata.py +174 -0
- package/src/ummaya/tools/routing/projection.py +340 -0
- package/src/ummaya/tools/routing/retrieval_policy.py +629 -0
- package/src/ummaya/tools/routing/schema.py +81 -0
- package/src/ummaya/tools/routing/types.py +96 -0
- package/src/ummaya/tools/routing_index.py +2 -2
- package/src/ummaya/tools/search.py +34 -746
- package/tests/fixtures/documents/public_forms/baselines.yaml +113 -0
- package/tui/package.json +1 -1
- package/tui/src/.cc-byte-identical-whitelist.yaml +266 -0
- package/tui/src/QueryEngine.ts +12 -8
- package/tui/src/bridge/inboundAttachments.ts +3 -3
- package/tui/src/cli/handlers/auth.ts +3 -12
- package/tui/src/cli/print.ts +7 -7
- package/tui/src/commands/insights.ts +1 -1
- package/tui/src/commands/install-github-app/types.ts +8 -30
- package/tui/src/commands/plugin/types.ts +6 -28
- package/tui/src/commands/plugin/unifiedTypes.ts +4 -26
- package/tui/src/commands/rename/generateSessionName.ts +1 -1
- package/tui/src/components/Feedback.tsx +1 -1
- package/tui/src/components/LogoV2/EmergencyTip.tsx +11 -2
- package/tui/src/components/LogoV2/WelcomeV2.tsx +1 -3
- package/tui/src/components/ScrollKeybindingHandler.tsx +6 -6
- package/tui/src/components/Spinner/types.ts +6 -28
- package/tui/src/components/agents/generateAgent.ts +1 -1
- package/tui/src/components/agents/new-agent-creation/types.ts +4 -26
- package/tui/src/components/config/EnvSecretIsolatedEditor.tsx +1 -1
- package/tui/src/components/mcp/types.ts +16 -38
- package/tui/src/components/messages/AssistantToolUseMessage.tsx +3 -2
- package/tui/src/components/messages/UserCrossSessionMessage.ts +16 -4
- package/tui/src/components/messages/UserForkBoilerplateMessage.ts +16 -4
- package/tui/src/components/messages/UserGitHubWebhookMessage.ts +16 -4
- package/tui/src/components/messages/UserToolResultMessage/utils.tsx +3 -2
- package/tui/src/components/permissions/MonitorPermissionRequest/MonitorPermissionRequest.ts +9 -4
- package/tui/src/components/permissions/ReviewArtifactPermissionRequest/ReviewArtifactPermissionRequest.ts +9 -4
- package/tui/src/components/primitive/DocumentSocraticReviewBlock.tsx +129 -0
- package/tui/src/components/primitive/DocumentToolResultCard.tsx +224 -0
- package/tui/src/components/primitive/documentSocraticReview.ts +215 -0
- package/tui/src/components/primitive/index.tsx +43 -1
- package/tui/src/components/primitive/types.ts +137 -0
- package/tui/src/components/ui/option.ts +4 -26
- package/tui/src/constants/common.ts +0 -2
- package/tui/src/constants/prompts.ts +4 -3
- package/tui/src/constants/querySource.ts +4 -26
- package/tui/src/entrypoints/sdk/controlTypes.ts +26 -48
- package/tui/src/entrypoints/sdk/coreTypes.generated.ts +3 -25
- package/tui/src/entrypoints/sdk/runtimeTypes.ts +38 -60
- package/tui/src/entrypoints/sdk/sdkUtilityTypes.ts +4 -26
- package/tui/src/entrypoints/sdk/settingsTypes.generated.ts +3 -25
- package/tui/src/entrypoints/sdk/toolTypes.ts +3 -25
- package/tui/src/hooks/toolPermission/handlers/interactiveHandler.ts +10 -0
- package/tui/src/hooks/useApiKeyVerification.ts +1 -1
- package/tui/src/hooks/useVirtualScroll.ts +1 -1
- package/tui/src/ink/ink.tsx +33 -14
- package/tui/src/ink/reconciler.ts +2 -3
- package/tui/src/ink/render-to-screen.ts +30 -10
- package/tui/src/ipc/bridge.ts +62 -15
- package/tui/src/ipc/bridgeSingleton.ts +5 -1
- package/tui/src/ipc/codec.ts +3 -3
- package/tui/src/ipc/frames.generated.ts +12 -12
- package/tui/src/ipc/llmClient.ts +151 -27
- package/tui/src/ipc/schema/frame.schema.json +1 -1
- package/tui/src/keybindings/defaultBindings.ts +4 -0
- package/tui/src/main.tsx +29 -11
- package/tui/src/native-ts/file-index/index.ts +33 -3
- package/tui/src/observability/surface.ts +2 -2
- package/tui/src/probes/toolRegistryProbe.tsx +3 -1
- package/tui/src/projectOnboardingState.ts +7 -6
- package/tui/src/query/chatMessageTypes.ts +18 -0
- package/tui/src/query/chatMessagesBuilder.ts +1 -1
- package/tui/src/query/deps.ts +1 -1
- package/tui/src/query/messageGuards.ts +106 -0
- package/tui/src/query/publicDataTerminalRepair.ts +384 -0
- package/tui/src/query/run.ts +1075 -0
- package/tui/src/query/supportBoundary.ts +168 -0
- package/tui/src/query/toolResultErrors.ts +103 -0
- package/tui/src/query/toolRunner.ts +687 -0
- package/tui/src/query/unavailableToolRepair.ts +118 -0
- package/tui/src/query.ts +9 -2186
- package/tui/src/screens/REPL.tsx +40 -29
- package/tui/src/services/api/adapterManifest.ts +4 -0
- package/tui/src/services/api/backendChat/events.ts +117 -0
- package/tui/src/services/api/backendChat/finalMessage.ts +40 -0
- package/tui/src/services/api/backendChat/frame.ts +9 -0
- package/tui/src/services/api/backendChat/streaming.ts +430 -0
- package/tui/src/services/api/backendChat/types.ts +62 -0
- package/tui/src/services/api/backendChat.ts +1 -0
- package/tui/src/services/api/client.ts +65 -2
- package/tui/src/services/api/errorUtils.ts +5 -5
- package/tui/src/services/api/errors.ts +1 -1
- package/tui/src/services/api/logging.ts +1 -1
- package/tui/src/services/api/ummaya/evidence.ts +194 -0
- package/tui/src/services/api/ummaya/messages.ts +255 -0
- package/tui/src/services/api/ummaya/nonStreaming.ts +66 -0
- package/tui/src/services/api/ummaya/provider.ts +200 -0
- package/tui/src/services/api/ummaya/reasoning.ts +24 -0
- package/tui/src/services/api/ummaya/request.ts +200 -0
- package/tui/src/services/api/ummaya/selectionContext.ts +240 -0
- package/tui/src/services/api/ummaya/streaming.ts +365 -0
- package/tui/src/services/api/ummaya/streamingPayload.ts +129 -0
- package/tui/src/services/api/ummaya/streamingReader.ts +40 -0
- package/tui/src/services/api/ummaya/toolSelection.ts +217 -0
- package/tui/src/services/api/ummaya/types.ts +110 -0
- package/tui/src/services/api/ummaya/usage.ts +30 -0
- package/tui/src/services/api/ummaya.ts +26 -418
- package/tui/src/services/api/withRetry.ts +1 -1
- package/tui/src/services/awaySummary.ts +2 -2
- package/tui/src/services/claudeAiLimits.ts +1 -1
- package/tui/src/services/compact/autoCompact.ts +1 -1
- package/tui/src/services/compact/compact.ts +1 -1
- package/tui/src/services/lsp/types.ts +8 -30
- package/tui/src/services/tips/types.ts +6 -28
- package/tui/src/services/tokenEstimation.ts +1 -1
- package/tui/src/services/toolRegistry/bootGuard.ts +5 -5
- package/tui/src/services/toolUseSummary/toolUseSummaryGenerator.ts +1 -1
- package/tui/src/services/tools/toolExecution.ts +94 -1
- package/tui/src/store/pendingPermissionSlot.ts +1 -1
- package/tui/src/store/session-store.ts +10 -36
- package/tui/src/stubs/any-stub.ts +15 -10
- package/tui/src/stubs/color-diff-napi.ts +37 -23
- package/tui/src/stubs/globals.d.ts +3 -3
- package/tui/src/stubs/macro-preload.ts +23 -12
- package/tui/src/tools/AdapterTool/AdapterTool.ts +1207 -714
- package/tui/src/tools/AdapterTool/routeDiagnostics.ts +75 -0
- package/tui/src/tools/AgentTool/AgentTool.tsx +84 -1371
- package/tui/src/tools/AgentTool/agentToolHandoff.ts +114 -0
- package/tui/src/tools/AgentTool/agentToolPartialResult.ts +16 -0
- package/tui/src/tools/AgentTool/agentToolProgress.ts +32 -0
- package/tui/src/tools/AgentTool/agentToolResolver.ts +161 -0
- package/tui/src/tools/AgentTool/agentToolResult.ts +163 -0
- package/tui/src/tools/AgentTool/agentToolUtils.ts +14 -686
- package/tui/src/tools/AgentTool/asyncAgentLifecycle.ts +208 -0
- package/tui/src/tools/AgentTool/asyncLifecycle.ts +153 -0
- package/tui/src/tools/AgentTool/backgroundedCompletion.ts +126 -0
- package/tui/src/tools/AgentTool/backgroundedLifecycle.ts +174 -0
- package/tui/src/tools/AgentTool/foregroundBackground.ts +83 -0
- package/tui/src/tools/AgentTool/foregroundDrain.tsx +133 -0
- package/tui/src/tools/AgentTool/foregroundFinalize.ts +98 -0
- package/tui/src/tools/AgentTool/foregroundLifecycle.tsx +237 -0
- package/tui/src/tools/AgentTool/foregroundProgress.tsx +169 -0
- package/tui/src/tools/AgentTool/foregroundTask.ts +89 -0
- package/tui/src/tools/AgentTool/forkSubagent.ts +1 -12
- package/tui/src/tools/AgentTool/forkSubagentGate.ts +34 -0
- package/tui/src/tools/AgentTool/launchRouting.ts +203 -0
- package/tui/src/tools/AgentTool/lifecycle.ts +244 -0
- package/tui/src/tools/AgentTool/mcpRouting.ts +73 -0
- package/tui/src/tools/AgentTool/orchestrationSupport.ts +70 -0
- package/tui/src/tools/AgentTool/permissions.ts +39 -0
- package/tui/src/tools/AgentTool/promptSetup.ts +181 -0
- package/tui/src/tools/AgentTool/remoteRouting.ts +62 -0
- package/tui/src/tools/AgentTool/resultMapping.ts +116 -0
- package/tui/src/tools/AgentTool/resumeAgent.ts +39 -107
- package/tui/src/tools/AgentTool/resumeAgentHelpers.ts +140 -0
- package/tui/src/tools/AgentTool/runAgent.ts +1 -1
- package/tui/src/tools/AgentTool/runtimeConfig.ts +57 -0
- package/tui/src/tools/AgentTool/schemas.ts +196 -0
- package/tui/src/tools/AgentTool/sourceVerificationPropagation.ts +263 -0
- package/tui/src/tools/AgentTool/worktreeLifecycle.ts +105 -0
- package/tui/src/tools/AskUserQuestionTool/AskUserQuestionTool.tsx +174 -202
- package/tui/src/tools/BashTool/BashTool.tsx +71 -1072
- package/tui/src/tools/BashTool/bashCommandHelpers.ts +12 -12
- package/tui/src/tools/BashTool/bashPermissions/astPreflight.ts +173 -0
- package/tui/src/tools/BashTool/bashPermissions/classifierChecks.ts +199 -0
- package/tui/src/tools/BashTool/bashPermissions/compoundGuards.ts +53 -0
- package/tui/src/tools/BashTool/bashPermissions/constants.ts +99 -0
- package/tui/src/tools/BashTool/bashPermissions/index.ts +38 -0
- package/tui/src/tools/BashTool/bashPermissions/legacyMisparsing.ts +62 -0
- package/tui/src/tools/BashTool/bashPermissions/main.ts +135 -0
- package/tui/src/tools/BashTool/bashPermissions/normalizedCommands.ts +33 -0
- package/tui/src/tools/BashTool/bashPermissions/operatorFlow.ts +98 -0
- package/tui/src/tools/BashTool/bashPermissions/permissionChecks.ts +200 -0
- package/tui/src/tools/BashTool/bashPermissions/prefixSuggestions.ts +88 -0
- package/tui/src/tools/BashTool/bashPermissions/promptClassifierRules.ts +125 -0
- package/tui/src/tools/BashTool/bashPermissions/ruleDelegates.ts +19 -0
- package/tui/src/tools/BashTool/bashPermissions/ruleMatching.ts +145 -0
- package/tui/src/tools/BashTool/bashPermissions/sandboxAutoAllow.ts +75 -0
- package/tui/src/tools/BashTool/bashPermissions/subcommandFlow.ts +205 -0
- package/tui/src/tools/BashTool/bashPermissions/subcommandGuards.ts +73 -0
- package/tui/src/tools/BashTool/bashPermissions/subcommandResultHelpers.ts +116 -0
- package/tui/src/tools/BashTool/bashPermissions/types.ts +26 -0
- package/tui/src/tools/BashTool/bashPermissions/wrapperStripping.ts +139 -0
- package/tui/src/tools/BashTool/bashPermissions.ts +26 -2621
- package/tui/src/tools/BashTool/call.ts +202 -0
- package/tui/src/tools/BashTool/callLoader.ts +35 -0
- package/tui/src/tools/BashTool/commandClassification.ts +151 -0
- package/tui/src/tools/BashTool/commandClassificationLoader.ts +40 -0
- package/tui/src/tools/BashTool/cwdReset.ts +33 -0
- package/tui/src/tools/BashTool/lineTruncation.ts +11 -0
- package/tui/src/tools/BashTool/modeValidation.ts +13 -1
- package/tui/src/tools/BashTool/outputPersistence.ts +42 -0
- package/tui/src/tools/BashTool/permissionClassification.ts +66 -0
- package/tui/src/tools/BashTool/permissionLoader.ts +44 -0
- package/tui/src/tools/BashTool/resultLoader.ts +29 -0
- package/tui/src/tools/BashTool/resultMapping.ts +83 -0
- package/tui/src/tools/BashTool/sandboxPolicy.ts +79 -0
- package/tui/src/tools/BashTool/schemas.ts +65 -0
- package/tui/src/tools/BashTool/sedEditExecution.ts +59 -0
- package/tui/src/tools/BashTool/shellExecution.tsx +245 -0
- package/tui/src/tools/BashTool/shellOutputUtils.ts +85 -0
- package/tui/src/tools/BashTool/shellPermissionGauntlet.ts +97 -0
- package/tui/src/tools/BashTool/uiLoader.ts +37 -0
- package/tui/src/tools/BriefTool/upload.ts +1 -1
- package/tui/src/tools/CalculatorTool/parser.ts +2 -2
- package/tui/src/tools/DocumentPrimitive/DocumentPrimitive.ts +262 -0
- package/tui/src/tools/DocumentPrimitive/dispatchNormalization.ts +270 -0
- package/tui/src/tools/DocumentPrimitive/documentDestinationPath.ts +18 -0
- package/tui/src/tools/DocumentPrimitive/documentMutationGuard.ts +22 -0
- package/tui/src/tools/DocumentPrimitive/documentPatchNormalization.ts +248 -0
- package/tui/src/tools/DocumentPrimitive/documentSourceVerification.ts +245 -0
- package/tui/src/tools/DocumentPrimitive/documentSourceVerificationFields.ts +103 -0
- package/tui/src/tools/DocumentPrimitive/modelVisibleOutput.ts +40 -0
- package/tui/src/tools/DocumentPrimitive/prompt.ts +35 -0
- package/tui/src/tools/FileEditTool/FileEditTool.ts +9 -507
- package/tui/src/tools/FileEditTool/call.ts +228 -0
- package/tui/src/tools/FileEditTool/validateInput.ts +196 -0
- package/tui/src/tools/FileReadTool/imageProcessor.ts +13 -0
- package/tui/src/tools/FileWriteTool/FileWriteTool.ts +7 -300
- package/tui/src/tools/FileWriteTool/call.ts +223 -0
- package/tui/src/tools/FileWriteTool/validateInput.ts +80 -0
- package/tui/src/tools/ListMcpResourcesTool/ListMcpResourcesTool.ts +19 -3
- package/tui/src/tools/LookupPrimitive/LookupPrimitive.ts +25 -32
- package/tui/src/tools/LookupPrimitive/prompt.ts +0 -2
- package/tui/src/tools/MCPTool/trustPolicy.ts +118 -0
- package/tui/src/tools/McpAuthTool/McpAuthTool.ts +21 -3
- package/tui/src/tools/NotebookEditTool/NotebookEditTool.ts +7 -326
- package/tui/src/tools/NotebookEditTool/call.ts +254 -0
- package/tui/src/tools/NotebookEditTool/notebookModel.ts +51 -0
- package/tui/src/tools/NotebookEditTool/validateInput.ts +142 -0
- package/tui/src/tools/PowerShellTool/PowerShellTool.tsx +46 -937
- package/tui/src/tools/PowerShellTool/acceptEditsCommandValidation.ts +162 -0
- package/tui/src/tools/PowerShellTool/call.ts +179 -0
- package/tui/src/tools/PowerShellTool/callLoader.ts +37 -0
- package/tui/src/tools/PowerShellTool/commandClassification.ts +86 -0
- package/tui/src/tools/PowerShellTool/modeValidation.ts +25 -332
- package/tui/src/tools/PowerShellTool/outputPersistence.ts +42 -0
- package/tui/src/tools/PowerShellTool/permissionClassification.ts +28 -0
- package/tui/src/tools/PowerShellTool/resultLoader.ts +31 -0
- package/tui/src/tools/PowerShellTool/resultMapping.ts +75 -0
- package/tui/src/tools/PowerShellTool/schemas.ts +40 -0
- package/tui/src/tools/PowerShellTool/shellExecution.tsx +258 -0
- package/tui/src/tools/PowerShellTool/symlinkModeValidation.ts +44 -0
- package/tui/src/tools/PowerShellTool/uiLoader.ts +37 -0
- package/tui/src/tools/PowerShellTool/validation.ts +39 -0
- package/tui/src/tools/ReadMcpResourceTool/ReadMcpResourceTool.ts +19 -3
- package/tui/src/tools/ResolveLocationPrimitive/ResolveLocationPrimitive.ts +1 -11
- package/tui/src/tools/ResolveLocationPrimitive/prompt.ts +2 -6
- package/tui/src/tools/SkillTool/SkillTool.ts +2 -2
- package/tui/src/tools/SubmitPrimitive/SubmitPrimitive.ts +27 -10
- package/tui/src/tools/TaskCreateTool/TaskCreateTool.ts +16 -2
- package/tui/src/tools/TaskGetTool/TaskGetTool.ts +23 -3
- package/tui/src/tools/TaskListTool/TaskListTool.ts +22 -4
- package/tui/src/tools/TaskOutputTool/TaskOutputTool.tsx +46 -547
- package/tui/src/tools/TaskOutputTool/lookup.ts +216 -0
- package/tui/src/tools/TaskOutputTool/render.tsx +257 -0
- package/tui/src/tools/TaskOutputTool/schemas.ts +55 -0
- package/tui/src/tools/TaskOutputTool/serialization.ts +36 -0
- package/tui/src/tools/TaskStopTool/TaskStopTool.ts +10 -0
- package/tui/src/tools/TaskUpdateTool/TaskUpdateTool.ts +14 -364
- package/tui/src/tools/TaskUpdateTool/completion.ts +62 -0
- package/tui/src/tools/TaskUpdateTool/schemas.ts +62 -0
- package/tui/src/tools/TaskUpdateTool/serialization.ts +46 -0
- package/tui/src/tools/TaskUpdateTool/statusUpdate.ts +247 -0
- package/tui/src/tools/TodoWriteTool/TodoWriteTool.ts +21 -2
- package/tui/src/tools/ToolSearchTool/ToolSearchTool.ts +21 -302
- package/tui/src/tools/ToolSearchTool/ccSupportTools.ts +223 -0
- package/tui/src/tools/ToolSearchTool/descriptionCache.ts +50 -0
- package/tui/src/tools/ToolSearchTool/keywordSearch.ts +216 -0
- package/tui/src/tools/ToolSearchTool/prompt.ts +10 -4
- package/tui/src/tools/ToolSearchTool/resultMapping.ts +30 -0
- package/tui/src/tools/ToolSearchTool/schemas.ts +30 -0
- package/tui/src/tools/ToolSearchTool/searchPool.ts +47 -0
- package/tui/src/tools/ToolSearchTool/supportIntentHints.ts +140 -0
- package/tui/src/tools/TranslateTool/TranslateTool.ts +1 -1
- package/tui/src/tools/VerifyPrimitive/VerifyPrimitive.ts +2 -1
- package/tui/src/tools/WebFetchTool/WebFetchTool.ts +43 -138
- package/tui/src/tools/WebFetchTool/call.ts +227 -0
- package/tui/src/tools/WebFetchTool/resolvedAddressSafety.ts +78 -0
- package/tui/src/tools/WebFetchTool/sourceVerification.ts +204 -0
- package/tui/src/tools/WebFetchTool/types.ts +23 -0
- package/tui/src/tools/WebFetchTool/urlSafety.ts +181 -0
- package/tui/src/tools/WebFetchTool/utils.ts +1 -1
- package/tui/src/tools/WebSearchTool/UI.tsx +0 -1
- package/tui/src/tools/WebSearchTool/WebSearchTool.ts +9 -313
- package/tui/src/tools/WebSearchTool/call.ts +33 -0
- package/tui/src/tools/WebSearchTool/responseMapping.ts +190 -0
- package/tui/src/tools/WebSearchTool/resultBlock.ts +47 -0
- package/tui/src/tools/WebSearchTool/schemas.ts +47 -0
- package/tui/src/tools/WebSearchTool/toolSchema.ts +12 -0
- package/tui/src/tools/WorkspaceToolAdapter/WorkspaceToolAdapter.ts +79 -0
- package/tui/src/tools/WorkspaceToolAdapter/allowedRootPolicy.ts +85 -0
- package/tui/src/tools/WorkspaceToolAdapter/documentFormatGuards.ts +73 -0
- package/tui/src/tools/WorkspaceToolAdapter/inputNormalization.ts +105 -0
- package/tui/src/tools/WorkspaceToolAdapter/mcpExposurePolicy.ts +64 -0
- package/tui/src/tools/WorkspaceToolAdapter/toolDefFactory.ts +215 -0
- package/tui/src/tools/WorkspaceToolAdapter/toolNames.ts +6 -0
- package/tui/src/tools/WorkspaceToolAdapter/workspacePolicy.ts +15 -0
- package/tui/src/tools/_shared/dispatchPrimitive.ts +6 -6
- package/tui/src/tools/_shared/documentChangeToPatch.ts +125 -0
- package/tui/src/tools/_shared/documentDispatchArguments.ts +87 -0
- package/tui/src/tools/_shared/documentPrimitiveTimeout.ts +13 -0
- package/tui/src/tools/_shared/documentToolResultRender.ts +98 -0
- package/tui/src/tools/_shared/pendingCallRegistry.ts +1 -6
- package/tui/src/tools/_shared/rootPrimitiveInput.ts +1 -0
- package/tui/src/tools/_shared/toolChoiceRepair/documentCompletionPatterns.ts +58 -0
- package/tui/src/tools/_shared/toolChoiceRepair/documentCompletionPrompt.ts +271 -0
- package/tui/src/tools/_shared/toolChoiceRepair/documentRepair.ts +452 -0
- package/tui/src/tools/_shared/toolChoiceRepair/messageAccess.ts +80 -0
- package/tui/src/tools/_shared/toolChoiceRepair/publicDataRepair.ts +92 -0
- package/tui/src/tools/_shared/toolChoiceRepair/supportRepair.ts +135 -0
- package/tui/src/tools/_shared/toolChoiceRepair.ts +55 -860
- package/tui/src/tools/shared/mockDisclaimer.ts +1 -1
- package/tui/src/tools.ts +39 -190
- package/tui/src/types/fileSuggestion.ts +4 -26
- package/tui/src/types/generated/events_mono/claude_code/v1/claude_code_internal_event.ts +186 -148
- package/tui/src/types/generated/events_mono/common/v1/auth.ts +25 -11
- package/tui/src/types/generated/events_mono/growthbook/v1/growthbook_experiment_event.ts +47 -30
- package/tui/src/types/generated/google/protobuf/timestamp.ts +21 -7
- package/tui/src/types/message.ts +80 -102
- package/tui/src/types/messageQueueTypes.ts +6 -28
- package/tui/src/types/notebook.ts +16 -38
- package/tui/src/types/statusLine.ts +4 -26
- package/tui/src/types/tools.ts +24 -46
- package/tui/src/types/utils.ts +6 -28
- package/tui/src/upstreamproxy/relay.ts +7 -3
- package/tui/src/upstreamproxy/upstreamproxy.ts +1 -1
- package/tui/src/utils/assistantMessageFactories.ts +9 -3
- package/tui/src/utils/auth.ts +129 -139
- package/tui/src/utils/bash/ast.ts +23 -23
- package/tui/src/utils/bash/bashParser.ts +5 -5
- package/tui/src/utils/billing.ts +1 -1
- package/tui/src/utils/collapseReadSearch.ts +3 -3
- package/tui/src/utils/cronTasks.ts +1 -1
- package/tui/src/utils/execFileNoThrow.ts +1 -1
- package/tui/src/utils/filePersistence/types.ts +16 -38
- package/tui/src/utils/forkedAgent.ts +1 -1
- package/tui/src/utils/gracefulShutdown.ts +4 -4
- package/tui/src/utils/heapDumpService.ts +12 -8
- package/tui/src/utils/hooks/apiQueryHookHelper.ts +1 -1
- package/tui/src/utils/hooks/execPromptHook.ts +1 -1
- package/tui/src/utils/hooks/skillImprovement.ts +1 -1
- package/tui/src/utils/mcp/dateTimeParser.ts +1 -1
- package/tui/src/utils/messages.ts +18 -0
- package/tui/src/utils/migrateSessions.ts +3 -3
- package/tui/src/utils/model/model.ts +6 -6
- package/tui/src/utils/permissions/yoloClassifier.ts +1 -1
- package/tui/src/utils/plugins/headlessPluginInstall.ts +1 -1
- package/tui/src/utils/plugins/mcpPluginIntegration.ts +1 -1
- package/tui/src/utils/plugins/mcpbHandler.ts +1 -1
- package/tui/src/utils/plugins/pluginLoader.ts +8 -8
- package/tui/src/utils/protectedNamespace.ts +5 -3
- package/tui/src/utils/rawJsonToolCall.ts +242 -0
- package/tui/src/utils/ripgrep.ts +16 -7
- package/tui/src/utils/sessionTitle.ts +1 -1
- package/tui/src/utils/settings/permissionValidation.ts +14 -2
- package/tui/src/utils/shell/prefix.ts +1 -1
- package/tui/src/utils/sideQuery.ts +1 -1
- package/tui/src/utils/systemThemeWatcher.ts +13 -3
- package/tui/src/utils/teleport.tsx +1 -1
- package/uv.lock +400 -14
- package/tui/src/services/api/claude.ts +0 -3540
- package/tui/src/tools/_shared/directPublicDataGuard.ts +0 -362
- package/tui/src/tools/_shared/kmaAnalysisGuard.ts +0 -197
- package/tui/src/tools/_shared/kmaAviationGuard.ts +0 -70
- package/tui/src/tools/_shared/nmcAedGuard.ts +0 -234
- package/tui/src/tools/_shared/protectedCheckGuard.ts +0 -207
- package/tui/src/tools/_shared/textToolCallGuard.ts +0 -91
|
@@ -129,27 +129,45 @@ export interface ClaudeCodeInternalEvent {
|
|
|
129
129
|
marketplace_name?: string | undefined
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
type JsonObject = Record<string, unknown>
|
|
133
|
+
|
|
134
|
+
const emptyJsonObject: JsonObject = {}
|
|
135
|
+
const emptyGitHubActionsMetadataPartial: DeepPartial<GitHubActionsMetadata> = {}
|
|
136
|
+
const emptyEnvironmentMetadataPartial: DeepPartial<EnvironmentMetadata> = {}
|
|
137
|
+
const emptySlackContextPartial: DeepPartial<SlackContext> = {}
|
|
138
|
+
const emptyClaudeCodeInternalEventPartial: DeepPartial<ClaudeCodeInternalEvent> =
|
|
139
|
+
{}
|
|
140
|
+
|
|
141
|
+
function jsonObject(value: unknown): JsonObject {
|
|
142
|
+
return isJsonObject(value) ? value : emptyJsonObject
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function isJsonObject(value: unknown): value is JsonObject {
|
|
146
|
+
return typeof value === 'object' && value !== null
|
|
147
|
+
}
|
|
148
|
+
|
|
132
149
|
function createBaseGitHubActionsMetadata(): GitHubActionsMetadata {
|
|
133
150
|
return { actor_id: '', repository_id: '', repository_owner_id: '' }
|
|
134
151
|
}
|
|
135
152
|
|
|
136
153
|
export const GitHubActionsMetadata: MessageFns<GitHubActionsMetadata> = {
|
|
137
|
-
fromJSON(object:
|
|
154
|
+
fromJSON(object: unknown): GitHubActionsMetadata {
|
|
155
|
+
const value = jsonObject(object)
|
|
138
156
|
return {
|
|
139
|
-
actor_id: isSet(
|
|
140
|
-
? globalThis.String(
|
|
157
|
+
actor_id: isSet(value['actor_id'])
|
|
158
|
+
? globalThis.String(value['actor_id'])
|
|
141
159
|
: '',
|
|
142
|
-
repository_id: isSet(
|
|
143
|
-
? globalThis.String(
|
|
160
|
+
repository_id: isSet(value['repository_id'])
|
|
161
|
+
? globalThis.String(value['repository_id'])
|
|
144
162
|
: '',
|
|
145
|
-
repository_owner_id: isSet(
|
|
146
|
-
? globalThis.String(
|
|
163
|
+
repository_owner_id: isSet(value['repository_owner_id'])
|
|
164
|
+
? globalThis.String(value['repository_owner_id'])
|
|
147
165
|
: '',
|
|
148
166
|
}
|
|
149
167
|
},
|
|
150
168
|
|
|
151
169
|
toJSON(message: GitHubActionsMetadata): unknown {
|
|
152
|
-
const obj:
|
|
170
|
+
const obj: Record<string, unknown> = {}
|
|
153
171
|
if (message.actor_id !== undefined) {
|
|
154
172
|
obj.actor_id = message.actor_id
|
|
155
173
|
}
|
|
@@ -165,7 +183,9 @@ export const GitHubActionsMetadata: MessageFns<GitHubActionsMetadata> = {
|
|
|
165
183
|
create<I extends Exact<DeepPartial<GitHubActionsMetadata>, I>>(
|
|
166
184
|
base?: I,
|
|
167
185
|
): GitHubActionsMetadata {
|
|
168
|
-
return GitHubActionsMetadata.fromPartial(
|
|
186
|
+
return GitHubActionsMetadata.fromPartial(
|
|
187
|
+
base ?? emptyGitHubActionsMetadataPartial,
|
|
188
|
+
)
|
|
169
189
|
},
|
|
170
190
|
fromPartial<I extends Exact<DeepPartial<GitHubActionsMetadata>, I>>(
|
|
171
191
|
object: I,
|
|
@@ -219,112 +239,120 @@ function createBaseEnvironmentMetadata(): EnvironmentMetadata {
|
|
|
219
239
|
}
|
|
220
240
|
|
|
221
241
|
export const EnvironmentMetadata: MessageFns<EnvironmentMetadata> = {
|
|
222
|
-
fromJSON(object:
|
|
242
|
+
fromJSON(object: unknown): EnvironmentMetadata {
|
|
243
|
+
const value = jsonObject(object)
|
|
244
|
+
const tags = value['tags']
|
|
223
245
|
return {
|
|
224
|
-
platform: isSet(
|
|
225
|
-
? globalThis.String(
|
|
246
|
+
platform: isSet(value['platform'])
|
|
247
|
+
? globalThis.String(value['platform'])
|
|
226
248
|
: '',
|
|
227
|
-
node_version: isSet(
|
|
228
|
-
? globalThis.String(
|
|
249
|
+
node_version: isSet(value['node_version'])
|
|
250
|
+
? globalThis.String(value['node_version'])
|
|
229
251
|
: '',
|
|
230
|
-
terminal: isSet(
|
|
231
|
-
? globalThis.String(
|
|
252
|
+
terminal: isSet(value['terminal'])
|
|
253
|
+
? globalThis.String(value['terminal'])
|
|
232
254
|
: '',
|
|
233
|
-
package_managers: isSet(
|
|
234
|
-
? globalThis.String(
|
|
255
|
+
package_managers: isSet(value['package_managers'])
|
|
256
|
+
? globalThis.String(value['package_managers'])
|
|
235
257
|
: '',
|
|
236
|
-
runtimes: isSet(
|
|
237
|
-
? globalThis.String(
|
|
258
|
+
runtimes: isSet(value['runtimes'])
|
|
259
|
+
? globalThis.String(value['runtimes'])
|
|
238
260
|
: '',
|
|
239
|
-
is_running_with_bun: isSet(
|
|
240
|
-
? globalThis.Boolean(
|
|
261
|
+
is_running_with_bun: isSet(value['is_running_with_bun'])
|
|
262
|
+
? globalThis.Boolean(value['is_running_with_bun'])
|
|
241
263
|
: false,
|
|
242
|
-
is_ci: isSet(
|
|
243
|
-
|
|
244
|
-
? globalThis.Boolean(object.is_claubbit)
|
|
264
|
+
is_ci: isSet(value['is_ci'])
|
|
265
|
+
? globalThis.Boolean(value['is_ci'])
|
|
245
266
|
: false,
|
|
246
|
-
|
|
247
|
-
? globalThis.Boolean(
|
|
267
|
+
is_claubbit: isSet(value['is_claubbit'])
|
|
268
|
+
? globalThis.Boolean(value['is_claubbit'])
|
|
248
269
|
: false,
|
|
249
|
-
|
|
250
|
-
? globalThis.Boolean(
|
|
270
|
+
is_github_action: isSet(value['is_github_action'])
|
|
271
|
+
? globalThis.Boolean(value['is_github_action'])
|
|
251
272
|
: false,
|
|
252
|
-
|
|
253
|
-
? globalThis.Boolean(
|
|
273
|
+
is_claude_code_action: isSet(value['is_claude_code_action'])
|
|
274
|
+
? globalThis.Boolean(value['is_claude_code_action'])
|
|
254
275
|
: false,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
276
|
+
is_claude_ai_auth: isSet(value['is_claude_ai_auth'])
|
|
277
|
+
? globalThis.Boolean(value['is_claude_ai_auth'])
|
|
278
|
+
: false,
|
|
279
|
+
version: isSet(value['version'])
|
|
280
|
+
? globalThis.String(value['version'])
|
|
281
|
+
: '',
|
|
282
|
+
github_event_name: isSet(value['github_event_name'])
|
|
283
|
+
? globalThis.String(value['github_event_name'])
|
|
258
284
|
: '',
|
|
259
285
|
github_actions_runner_environment: isSet(
|
|
260
|
-
|
|
286
|
+
value['github_actions_runner_environment'],
|
|
261
287
|
)
|
|
262
|
-
? globalThis.String(
|
|
288
|
+
? globalThis.String(value['github_actions_runner_environment'])
|
|
263
289
|
: '',
|
|
264
|
-
github_actions_runner_os: isSet(
|
|
265
|
-
? globalThis.String(
|
|
290
|
+
github_actions_runner_os: isSet(value['github_actions_runner_os'])
|
|
291
|
+
? globalThis.String(value['github_actions_runner_os'])
|
|
266
292
|
: '',
|
|
267
|
-
github_action_ref: isSet(
|
|
268
|
-
? globalThis.String(
|
|
293
|
+
github_action_ref: isSet(value['github_action_ref'])
|
|
294
|
+
? globalThis.String(value['github_action_ref'])
|
|
269
295
|
: '',
|
|
270
|
-
wsl_version: isSet(
|
|
271
|
-
? globalThis.String(
|
|
296
|
+
wsl_version: isSet(value['wsl_version'])
|
|
297
|
+
? globalThis.String(value['wsl_version'])
|
|
272
298
|
: '',
|
|
273
|
-
github_actions_metadata: isSet(
|
|
274
|
-
? GitHubActionsMetadata.fromJSON(
|
|
299
|
+
github_actions_metadata: isSet(value['github_actions_metadata'])
|
|
300
|
+
? GitHubActionsMetadata.fromJSON(value['github_actions_metadata'])
|
|
275
301
|
: undefined,
|
|
276
|
-
arch: isSet(
|
|
277
|
-
is_claude_code_remote: isSet(
|
|
278
|
-
? globalThis.Boolean(
|
|
302
|
+
arch: isSet(value['arch']) ? globalThis.String(value['arch']) : '',
|
|
303
|
+
is_claude_code_remote: isSet(value['is_claude_code_remote'])
|
|
304
|
+
? globalThis.Boolean(value['is_claude_code_remote'])
|
|
279
305
|
: false,
|
|
280
|
-
remote_environment_type: isSet(
|
|
281
|
-
? globalThis.String(
|
|
306
|
+
remote_environment_type: isSet(value['remote_environment_type'])
|
|
307
|
+
? globalThis.String(value['remote_environment_type'])
|
|
282
308
|
: '',
|
|
283
|
-
claude_code_container_id: isSet(
|
|
284
|
-
? globalThis.String(
|
|
309
|
+
claude_code_container_id: isSet(value['claude_code_container_id'])
|
|
310
|
+
? globalThis.String(value['claude_code_container_id'])
|
|
285
311
|
: '',
|
|
286
|
-
claude_code_remote_session_id: isSet(
|
|
287
|
-
|
|
312
|
+
claude_code_remote_session_id: isSet(
|
|
313
|
+
value['claude_code_remote_session_id'],
|
|
314
|
+
)
|
|
315
|
+
? globalThis.String(value['claude_code_remote_session_id'])
|
|
288
316
|
: '',
|
|
289
|
-
tags: globalThis.Array.isArray(
|
|
290
|
-
?
|
|
317
|
+
tags: globalThis.Array.isArray(tags)
|
|
318
|
+
? tags.map((entry: unknown) => globalThis.String(entry))
|
|
291
319
|
: [],
|
|
292
|
-
deployment_environment: isSet(
|
|
293
|
-
? globalThis.String(
|
|
320
|
+
deployment_environment: isSet(value['deployment_environment'])
|
|
321
|
+
? globalThis.String(value['deployment_environment'])
|
|
294
322
|
: '',
|
|
295
|
-
is_conductor: isSet(
|
|
296
|
-
? globalThis.Boolean(
|
|
323
|
+
is_conductor: isSet(value['is_conductor'])
|
|
324
|
+
? globalThis.Boolean(value['is_conductor'])
|
|
297
325
|
: false,
|
|
298
|
-
version_base: isSet(
|
|
299
|
-
? globalThis.String(
|
|
326
|
+
version_base: isSet(value['version_base'])
|
|
327
|
+
? globalThis.String(value['version_base'])
|
|
300
328
|
: '',
|
|
301
|
-
coworker_type: isSet(
|
|
302
|
-
? globalThis.String(
|
|
329
|
+
coworker_type: isSet(value['coworker_type'])
|
|
330
|
+
? globalThis.String(value['coworker_type'])
|
|
303
331
|
: '',
|
|
304
|
-
build_time: isSet(
|
|
305
|
-
? globalThis.String(
|
|
332
|
+
build_time: isSet(value['build_time'])
|
|
333
|
+
? globalThis.String(value['build_time'])
|
|
306
334
|
: '',
|
|
307
|
-
is_local_agent_mode: isSet(
|
|
308
|
-
? globalThis.Boolean(
|
|
335
|
+
is_local_agent_mode: isSet(value['is_local_agent_mode'])
|
|
336
|
+
? globalThis.Boolean(value['is_local_agent_mode'])
|
|
309
337
|
: false,
|
|
310
|
-
linux_distro_id: isSet(
|
|
311
|
-
? globalThis.String(
|
|
338
|
+
linux_distro_id: isSet(value['linux_distro_id'])
|
|
339
|
+
? globalThis.String(value['linux_distro_id'])
|
|
312
340
|
: '',
|
|
313
|
-
linux_distro_version: isSet(
|
|
314
|
-
? globalThis.String(
|
|
341
|
+
linux_distro_version: isSet(value['linux_distro_version'])
|
|
342
|
+
? globalThis.String(value['linux_distro_version'])
|
|
315
343
|
: '',
|
|
316
|
-
linux_kernel: isSet(
|
|
317
|
-
? globalThis.String(
|
|
344
|
+
linux_kernel: isSet(value['linux_kernel'])
|
|
345
|
+
? globalThis.String(value['linux_kernel'])
|
|
318
346
|
: '',
|
|
319
|
-
vcs: isSet(
|
|
320
|
-
platform_raw: isSet(
|
|
321
|
-
? globalThis.String(
|
|
347
|
+
vcs: isSet(value['vcs']) ? globalThis.String(value['vcs']) : '',
|
|
348
|
+
platform_raw: isSet(value['platform_raw'])
|
|
349
|
+
? globalThis.String(value['platform_raw'])
|
|
322
350
|
: '',
|
|
323
351
|
}
|
|
324
352
|
},
|
|
325
353
|
|
|
326
354
|
toJSON(message: EnvironmentMetadata): unknown {
|
|
327
|
-
const obj:
|
|
355
|
+
const obj: Record<string, unknown> = {}
|
|
328
356
|
if (message.platform !== undefined) {
|
|
329
357
|
obj.platform = message.platform
|
|
330
358
|
}
|
|
@@ -439,7 +467,9 @@ export const EnvironmentMetadata: MessageFns<EnvironmentMetadata> = {
|
|
|
439
467
|
create<I extends Exact<DeepPartial<EnvironmentMetadata>, I>>(
|
|
440
468
|
base?: I,
|
|
441
469
|
): EnvironmentMetadata {
|
|
442
|
-
return EnvironmentMetadata.fromPartial(
|
|
470
|
+
return EnvironmentMetadata.fromPartial(
|
|
471
|
+
base ?? emptyEnvironmentMetadataPartial,
|
|
472
|
+
)
|
|
443
473
|
},
|
|
444
474
|
fromPartial<I extends Exact<DeepPartial<EnvironmentMetadata>, I>>(
|
|
445
475
|
object: I,
|
|
@@ -500,23 +530,26 @@ function createBaseSlackContext(): SlackContext {
|
|
|
500
530
|
}
|
|
501
531
|
|
|
502
532
|
export const SlackContext: MessageFns<SlackContext> = {
|
|
503
|
-
fromJSON(object:
|
|
533
|
+
fromJSON(object: unknown): SlackContext {
|
|
534
|
+
const value = jsonObject(object)
|
|
504
535
|
return {
|
|
505
|
-
slack_team_id: isSet(
|
|
506
|
-
? globalThis.String(
|
|
536
|
+
slack_team_id: isSet(value['slack_team_id'])
|
|
537
|
+
? globalThis.String(value['slack_team_id'])
|
|
507
538
|
: '',
|
|
508
|
-
is_enterprise_install: isSet(
|
|
509
|
-
? globalThis.Boolean(
|
|
539
|
+
is_enterprise_install: isSet(value['is_enterprise_install'])
|
|
540
|
+
? globalThis.Boolean(value['is_enterprise_install'])
|
|
510
541
|
: false,
|
|
511
|
-
trigger: isSet(
|
|
512
|
-
|
|
513
|
-
|
|
542
|
+
trigger: isSet(value['trigger'])
|
|
543
|
+
? globalThis.String(value['trigger'])
|
|
544
|
+
: '',
|
|
545
|
+
creation_method: isSet(value['creation_method'])
|
|
546
|
+
? globalThis.String(value['creation_method'])
|
|
514
547
|
: '',
|
|
515
548
|
}
|
|
516
549
|
},
|
|
517
550
|
|
|
518
551
|
toJSON(message: SlackContext): unknown {
|
|
519
|
-
const obj:
|
|
552
|
+
const obj: Record<string, unknown> = {}
|
|
520
553
|
if (message.slack_team_id !== undefined) {
|
|
521
554
|
obj.slack_team_id = message.slack_team_id
|
|
522
555
|
}
|
|
@@ -535,7 +568,7 @@ export const SlackContext: MessageFns<SlackContext> = {
|
|
|
535
568
|
create<I extends Exact<DeepPartial<SlackContext>, I>>(
|
|
536
569
|
base?: I,
|
|
537
570
|
): SlackContext {
|
|
538
|
-
return SlackContext.fromPartial(base ??
|
|
571
|
+
return SlackContext.fromPartial(base ?? emptySlackContextPartial)
|
|
539
572
|
},
|
|
540
573
|
fromPartial<I extends Exact<DeepPartial<SlackContext>, I>>(
|
|
541
574
|
object: I,
|
|
@@ -584,92 +617,95 @@ function createBaseClaudeCodeInternalEvent(): ClaudeCodeInternalEvent {
|
|
|
584
617
|
}
|
|
585
618
|
|
|
586
619
|
export const ClaudeCodeInternalEvent: MessageFns<ClaudeCodeInternalEvent> = {
|
|
587
|
-
fromJSON(object:
|
|
620
|
+
fromJSON(object: unknown): ClaudeCodeInternalEvent {
|
|
621
|
+
const value = jsonObject(object)
|
|
588
622
|
return {
|
|
589
|
-
event_name: isSet(
|
|
590
|
-
? globalThis.String(
|
|
623
|
+
event_name: isSet(value['event_name'])
|
|
624
|
+
? globalThis.String(value['event_name'])
|
|
591
625
|
: '',
|
|
592
|
-
client_timestamp: isSet(
|
|
593
|
-
? fromJsonTimestamp(
|
|
626
|
+
client_timestamp: isSet(value['client_timestamp'])
|
|
627
|
+
? fromJsonTimestamp(value['client_timestamp'])
|
|
594
628
|
: undefined,
|
|
595
|
-
model: isSet(
|
|
596
|
-
session_id: isSet(
|
|
597
|
-
? globalThis.String(
|
|
629
|
+
model: isSet(value['model']) ? globalThis.String(value['model']) : '',
|
|
630
|
+
session_id: isSet(value['session_id'])
|
|
631
|
+
? globalThis.String(value['session_id'])
|
|
598
632
|
: '',
|
|
599
|
-
user_type: isSet(
|
|
600
|
-
? globalThis.String(
|
|
633
|
+
user_type: isSet(value['user_type'])
|
|
634
|
+
? globalThis.String(value['user_type'])
|
|
601
635
|
: '',
|
|
602
|
-
betas: isSet(
|
|
603
|
-
env: isSet(
|
|
604
|
-
? EnvironmentMetadata.fromJSON(
|
|
636
|
+
betas: isSet(value['betas']) ? globalThis.String(value['betas']) : '',
|
|
637
|
+
env: isSet(value['env'])
|
|
638
|
+
? EnvironmentMetadata.fromJSON(value['env'])
|
|
605
639
|
: undefined,
|
|
606
|
-
entrypoint: isSet(
|
|
607
|
-
? globalThis.String(
|
|
640
|
+
entrypoint: isSet(value['entrypoint'])
|
|
641
|
+
? globalThis.String(value['entrypoint'])
|
|
608
642
|
: '',
|
|
609
|
-
agent_sdk_version: isSet(
|
|
610
|
-
? globalThis.String(
|
|
643
|
+
agent_sdk_version: isSet(value['agent_sdk_version'])
|
|
644
|
+
? globalThis.String(value['agent_sdk_version'])
|
|
611
645
|
: '',
|
|
612
|
-
is_interactive: isSet(
|
|
613
|
-
? globalThis.Boolean(
|
|
646
|
+
is_interactive: isSet(value['is_interactive'])
|
|
647
|
+
? globalThis.Boolean(value['is_interactive'])
|
|
614
648
|
: false,
|
|
615
|
-
client_type: isSet(
|
|
616
|
-
? globalThis.String(
|
|
649
|
+
client_type: isSet(value['client_type'])
|
|
650
|
+
? globalThis.String(value['client_type'])
|
|
651
|
+
: '',
|
|
652
|
+
process: isSet(value['process'])
|
|
653
|
+
? globalThis.String(value['process'])
|
|
617
654
|
: '',
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
? globalThis.String(object.additional_metadata)
|
|
655
|
+
additional_metadata: isSet(value['additional_metadata'])
|
|
656
|
+
? globalThis.String(value['additional_metadata'])
|
|
621
657
|
: '',
|
|
622
|
-
auth: isSet(
|
|
623
|
-
? PublicApiAuth.fromJSON(
|
|
658
|
+
auth: isSet(value['auth'])
|
|
659
|
+
? PublicApiAuth.fromJSON(value['auth'])
|
|
624
660
|
: undefined,
|
|
625
|
-
server_timestamp: isSet(
|
|
626
|
-
? fromJsonTimestamp(
|
|
661
|
+
server_timestamp: isSet(value['server_timestamp'])
|
|
662
|
+
? fromJsonTimestamp(value['server_timestamp'])
|
|
627
663
|
: undefined,
|
|
628
|
-
event_id: isSet(
|
|
629
|
-
? globalThis.String(
|
|
664
|
+
event_id: isSet(value['event_id'])
|
|
665
|
+
? globalThis.String(value['event_id'])
|
|
630
666
|
: '',
|
|
631
|
-
device_id: isSet(
|
|
632
|
-
? globalThis.String(
|
|
667
|
+
device_id: isSet(value['device_id'])
|
|
668
|
+
? globalThis.String(value['device_id'])
|
|
633
669
|
: '',
|
|
634
|
-
swe_bench_run_id: isSet(
|
|
635
|
-
? globalThis.String(
|
|
670
|
+
swe_bench_run_id: isSet(value['swe_bench_run_id'])
|
|
671
|
+
? globalThis.String(value['swe_bench_run_id'])
|
|
636
672
|
: '',
|
|
637
|
-
swe_bench_instance_id: isSet(
|
|
638
|
-
? globalThis.String(
|
|
673
|
+
swe_bench_instance_id: isSet(value['swe_bench_instance_id'])
|
|
674
|
+
? globalThis.String(value['swe_bench_instance_id'])
|
|
639
675
|
: '',
|
|
640
|
-
swe_bench_task_id: isSet(
|
|
641
|
-
? globalThis.String(
|
|
676
|
+
swe_bench_task_id: isSet(value['swe_bench_task_id'])
|
|
677
|
+
? globalThis.String(value['swe_bench_task_id'])
|
|
642
678
|
: '',
|
|
643
|
-
email: isSet(
|
|
644
|
-
agent_id: isSet(
|
|
645
|
-
? globalThis.String(
|
|
679
|
+
email: isSet(value['email']) ? globalThis.String(value['email']) : '',
|
|
680
|
+
agent_id: isSet(value['agent_id'])
|
|
681
|
+
? globalThis.String(value['agent_id'])
|
|
646
682
|
: '',
|
|
647
|
-
parent_session_id: isSet(
|
|
648
|
-
? globalThis.String(
|
|
683
|
+
parent_session_id: isSet(value['parent_session_id'])
|
|
684
|
+
? globalThis.String(value['parent_session_id'])
|
|
649
685
|
: '',
|
|
650
|
-
agent_type: isSet(
|
|
651
|
-
? globalThis.String(
|
|
686
|
+
agent_type: isSet(value['agent_type'])
|
|
687
|
+
? globalThis.String(value['agent_type'])
|
|
652
688
|
: '',
|
|
653
|
-
slack: isSet(
|
|
654
|
-
? SlackContext.fromJSON(
|
|
689
|
+
slack: isSet(value['slack'])
|
|
690
|
+
? SlackContext.fromJSON(value['slack'])
|
|
655
691
|
: undefined,
|
|
656
|
-
team_name: isSet(
|
|
657
|
-
? globalThis.String(
|
|
692
|
+
team_name: isSet(value['team_name'])
|
|
693
|
+
? globalThis.String(value['team_name'])
|
|
658
694
|
: '',
|
|
659
|
-
skill_name: isSet(
|
|
660
|
-
? globalThis.String(
|
|
695
|
+
skill_name: isSet(value['skill_name'])
|
|
696
|
+
? globalThis.String(value['skill_name'])
|
|
661
697
|
: '',
|
|
662
|
-
plugin_name: isSet(
|
|
663
|
-
? globalThis.String(
|
|
698
|
+
plugin_name: isSet(value['plugin_name'])
|
|
699
|
+
? globalThis.String(value['plugin_name'])
|
|
664
700
|
: '',
|
|
665
|
-
marketplace_name: isSet(
|
|
666
|
-
? globalThis.String(
|
|
701
|
+
marketplace_name: isSet(value['marketplace_name'])
|
|
702
|
+
? globalThis.String(value['marketplace_name'])
|
|
667
703
|
: '',
|
|
668
704
|
}
|
|
669
705
|
},
|
|
670
706
|
|
|
671
707
|
toJSON(message: ClaudeCodeInternalEvent): unknown {
|
|
672
|
-
const obj:
|
|
708
|
+
const obj: Record<string, unknown> = {}
|
|
673
709
|
if (message.event_name !== undefined) {
|
|
674
710
|
obj.event_name = message.event_name
|
|
675
711
|
}
|
|
@@ -763,7 +799,9 @@ export const ClaudeCodeInternalEvent: MessageFns<ClaudeCodeInternalEvent> = {
|
|
|
763
799
|
create<I extends Exact<DeepPartial<ClaudeCodeInternalEvent>, I>>(
|
|
764
800
|
base?: I,
|
|
765
801
|
): ClaudeCodeInternalEvent {
|
|
766
|
-
return ClaudeCodeInternalEvent.fromPartial(
|
|
802
|
+
return ClaudeCodeInternalEvent.fromPartial(
|
|
803
|
+
base ?? emptyClaudeCodeInternalEventPartial,
|
|
804
|
+
)
|
|
767
805
|
},
|
|
768
806
|
fromPartial<I extends Exact<DeepPartial<ClaudeCodeInternalEvent>, I>>(
|
|
769
807
|
object: I,
|
|
@@ -843,7 +881,7 @@ function fromTimestamp(t: Timestamp): Date {
|
|
|
843
881
|
return new globalThis.Date(millis)
|
|
844
882
|
}
|
|
845
883
|
|
|
846
|
-
function fromJsonTimestamp(o:
|
|
884
|
+
function fromJsonTimestamp(o: unknown): Date {
|
|
847
885
|
if (o instanceof globalThis.Date) {
|
|
848
886
|
return o
|
|
849
887
|
} else if (typeof o === 'string') {
|
|
@@ -853,12 +891,12 @@ function fromJsonTimestamp(o: any): Date {
|
|
|
853
891
|
}
|
|
854
892
|
}
|
|
855
893
|
|
|
856
|
-
function isSet(value:
|
|
894
|
+
function isSet(value: unknown): boolean {
|
|
857
895
|
return value !== null && value !== undefined
|
|
858
896
|
}
|
|
859
897
|
|
|
860
898
|
interface MessageFns<T> {
|
|
861
|
-
fromJSON(object:
|
|
899
|
+
fromJSON(object: unknown): T
|
|
862
900
|
toJSON(message: T): unknown
|
|
863
901
|
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T
|
|
864
902
|
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T
|
|
@@ -13,27 +13,41 @@ export interface PublicApiAuth {
|
|
|
13
13
|
account_uuid?: string | undefined
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
type JsonObject = Record<string, unknown>
|
|
17
|
+
|
|
18
|
+
const emptyJsonObject: JsonObject = {}
|
|
19
|
+
const emptyPublicApiAuthPartial: DeepPartial<PublicApiAuth> = {}
|
|
20
|
+
|
|
21
|
+
function jsonObject(value: unknown): JsonObject {
|
|
22
|
+
return isJsonObject(value) ? value : emptyJsonObject
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function isJsonObject(value: unknown): value is JsonObject {
|
|
26
|
+
return typeof value === 'object' && value !== null
|
|
27
|
+
}
|
|
28
|
+
|
|
16
29
|
function createBasePublicApiAuth(): PublicApiAuth {
|
|
17
30
|
return { account_id: 0, organization_uuid: '', account_uuid: '' }
|
|
18
31
|
}
|
|
19
32
|
|
|
20
33
|
export const PublicApiAuth: MessageFns<PublicApiAuth> = {
|
|
21
|
-
fromJSON(object:
|
|
34
|
+
fromJSON(object: unknown): PublicApiAuth {
|
|
35
|
+
const value = jsonObject(object)
|
|
22
36
|
return {
|
|
23
|
-
account_id: isSet(
|
|
24
|
-
? globalThis.Number(
|
|
37
|
+
account_id: isSet(value['account_id'])
|
|
38
|
+
? globalThis.Number(value['account_id'])
|
|
25
39
|
: 0,
|
|
26
|
-
organization_uuid: isSet(
|
|
27
|
-
? globalThis.String(
|
|
40
|
+
organization_uuid: isSet(value['organization_uuid'])
|
|
41
|
+
? globalThis.String(value['organization_uuid'])
|
|
28
42
|
: '',
|
|
29
|
-
account_uuid: isSet(
|
|
30
|
-
? globalThis.String(
|
|
43
|
+
account_uuid: isSet(value['account_uuid'])
|
|
44
|
+
? globalThis.String(value['account_uuid'])
|
|
31
45
|
: '',
|
|
32
46
|
}
|
|
33
47
|
},
|
|
34
48
|
|
|
35
49
|
toJSON(message: PublicApiAuth): unknown {
|
|
36
|
-
const obj:
|
|
50
|
+
const obj: Record<string, unknown> = {}
|
|
37
51
|
if (message.account_id !== undefined) {
|
|
38
52
|
obj.account_id = Math.round(message.account_id)
|
|
39
53
|
}
|
|
@@ -49,7 +63,7 @@ export const PublicApiAuth: MessageFns<PublicApiAuth> = {
|
|
|
49
63
|
create<I extends Exact<DeepPartial<PublicApiAuth>, I>>(
|
|
50
64
|
base?: I,
|
|
51
65
|
): PublicApiAuth {
|
|
52
|
-
return PublicApiAuth.fromPartial(base ??
|
|
66
|
+
return PublicApiAuth.fromPartial(base ?? emptyPublicApiAuthPartial)
|
|
53
67
|
},
|
|
54
68
|
fromPartial<I extends Exact<DeepPartial<PublicApiAuth>, I>>(
|
|
55
69
|
object: I,
|
|
@@ -88,12 +102,12 @@ type Exact<P, I extends P> = P extends Builtin
|
|
|
88
102
|
[K in Exclude<keyof I, KeysOfUnion<P>>]: never
|
|
89
103
|
}
|
|
90
104
|
|
|
91
|
-
function isSet(value:
|
|
105
|
+
function isSet(value: unknown): boolean {
|
|
92
106
|
return value !== null && value !== undefined
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
interface MessageFns<T> {
|
|
96
|
-
fromJSON(object:
|
|
110
|
+
fromJSON(object: unknown): T
|
|
97
111
|
toJSON(message: T): unknown
|
|
98
112
|
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T
|
|
99
113
|
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T
|