@64mb/freelens-power 1.6.1 → 1.7.0
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 +56 -33
- package/THIRD_PARTY_LICENSES +74 -0
- package/out/main/_virtual/_rolldown/runtime.js +25 -0
- package/out/main/ai-answer-stream.js +96 -0
- package/out/main/ai-answer-stream.js.map +1 -0
- package/out/main/ai-api-key.js +95 -0
- package/out/main/ai-api-key.js.map +1 -0
- package/out/main/ai-codex-api.js +611 -0
- package/out/main/ai-codex-api.js.map +1 -0
- package/out/main/ai-ipc.js +42 -11
- package/out/main/ai-ipc.js.map +1 -1
- package/out/main/ai-logs.js +4 -3
- package/out/main/ai-logs.js.map +1 -1
- package/out/main/ai-models.js +23 -11
- package/out/main/ai-models.js.map +1 -1
- package/out/main/ai-pi-models.js +73 -0
- package/out/main/ai-pi-models.js.map +1 -0
- package/out/main/ai-pi.js +411 -0
- package/out/main/ai-pi.js.map +1 -0
- package/out/main/ai-references.js +1 -1
- package/out/main/ai-resources.js +166 -220
- package/out/main/ai-resources.js.map +1 -1
- package/out/main/ai.js +303 -142
- package/out/main/ai.js.map +1 -1
- package/out/main/cluster-icons-catalog.js +1 -1
- package/out/main/cluster-icons.js +4 -4
- package/out/main/dashboard-ai.js +29 -0
- package/out/main/dashboard-ai.js.map +1 -0
- package/out/main/dashboard-catalog.js +1 -1
- package/out/main/dashboard-picker.js +3 -3
- package/out/main/dashboard-views.js +102 -10
- package/out/main/dashboard-views.js.map +1 -1
- package/out/main/diagnostics-menu-order.js +1 -1
- package/out/main/dock-icon.js +1 -1
- package/out/main/extension-updates.js +151 -0
- package/out/main/extension-updates.js.map +1 -0
- package/out/main/helm-installed-chart.js +141 -0
- package/out/main/helm-installed-chart.js.map +1 -0
- package/out/main/helm-ipc.js +748 -0
- package/out/main/helm-ipc.js.map +1 -0
- package/out/main/helm-values.js +45 -0
- package/out/main/helm-values.js.map +1 -0
- package/out/main/helm.js +283 -0
- package/out/main/helm.js.map +1 -0
- package/out/main/index.js +20 -12
- package/out/main/index.js.map +1 -1
- package/out/main/monitoring-history.js +2 -2
- package/out/main/node-bulk.js +260 -0
- package/out/main/node-bulk.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js +99 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js +32 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js +242 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js +154 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js +60 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js +346 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js +479 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js +508 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js +127 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js +50 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js +201 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js +401 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js +1007 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/wrapper.js +23 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/wrapper.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js +69 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-doc.js +56 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-doc.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-node.js +105 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-node.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js +73 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/composer.js +214 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/composer.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-map.js +100 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-map.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-scalar.js +187 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-seq.js +55 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-seq.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-end.js +47 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-end.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-collection.js +173 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-collection.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js +218 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-props.js +116 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-props.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-contains-newline.js +38 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-contains-newline.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-empty-scalar-position.js +36 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-empty-scalar-position.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-flow-indent-check.js +23 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-flow-indent-check.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-map-includes.js +23 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-map-includes.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/Document.js +302 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/Document.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/anchors.js +79 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/anchors.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/applyReviver.js +49 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/applyReviver.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/createNode.js +76 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/createNode.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/directives.js +177 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/directives.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/errors.js +62 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/errors.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/index.js +74 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/index.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/log.js +23 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/log.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Alias.js +111 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Alias.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Collection.js +134 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Collection.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Node.js +47 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Node.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Pair.js +47 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Pair.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Scalar.js +40 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLMap.js +125 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLMap.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLSeq.js +122 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLSeq.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/addPairToJSMap.js +66 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/addPairToJSMap.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js +59 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/toJS.js +48 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/toJS.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-scalar.js +281 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-stringify.js +60 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-stringify.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-visit.js +100 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-visit.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst.js +92 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/lexer.js +542 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/lexer.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/line-counter.js +56 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/line-counter.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/parser.js +875 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/parser.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/public-api.js +104 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/public-api.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/Schema.js +43 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/Schema.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/map.js +29 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/map.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/null.js +26 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/null.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/seq.js +29 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/seq.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/string.js +26 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/string.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/bool.js +30 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/bool.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/float.js +53 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/float.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/int.js +52 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/int.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/schema.js +41 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/schema.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/json/schema.js +75 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/json/schema.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/tags.js +110 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/tags.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js +68 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js +38 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/float.js +56 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/float.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/int.js +86 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/int.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/merge.js +55 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/merge.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js +78 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +74 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/schema.js +63 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/schema.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/set.js +81 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/set.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +94 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/foldFlowLines.js +125 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/foldFlowLines.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringify.js +122 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringify.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyCollection.js +131 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyCollection.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyComment.js +29 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyComment.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyDocument.js +74 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyDocument.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyNumber.js +30 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyNumber.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js +111 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyString.js +236 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyString.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/visit.js +201 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/visit.js.map +1 -0
- package/out/main/package.js +6 -0
- package/out/main/package.js.map +1 -0
- package/out/main/power-logs-budget.js +1 -1
- package/out/main/power-logs-child.js +5 -4
- package/out/main/power-logs-child.js.map +1 -1
- package/out/main/power-logs-database.js +214 -8
- package/out/main/power-logs-database.js.map +1 -1
- package/out/main/power-logs-ipc.js +56 -7
- package/out/main/power-logs-ipc.js.map +1 -1
- package/out/main/power-logs-query-child.js +1 -1
- package/out/main/power-logs-query.js +6 -4
- package/out/main/power-logs-query.js.map +1 -1
- package/out/main/power-logs-worker.js +31 -9
- package/out/main/power-logs-worker.js.map +1 -1
- package/out/main/resource-search-database.js +9 -3
- package/out/main/resource-search-database.js.map +1 -1
- package/out/main/resource-search-worker.js +6 -2
- package/out/main/resource-search-worker.js.map +1 -1
- package/out/main/resource-search.js +4 -3
- package/out/main/resource-search.js.map +1 -1
- package/out/main/settings-export.js +3 -3
- package/out/main/settings-import.js +3 -3
- package/out/main/splash-accent.js +1 -1
- package/out/main/src/common/ai-attachments.js +36 -0
- package/out/main/src/common/ai-attachments.js.map +1 -0
- package/out/main/src/common/ai-extras.js.map +1 -0
- package/out/main/src/common/ai-models.js +81 -0
- package/out/main/src/common/ai-models.js.map +1 -0
- package/out/main/src/common/ai-prompts.js +46 -0
- package/out/main/src/common/ai-prompts.js.map +1 -0
- package/out/main/src/common/ai-resource-payload.js +308 -0
- package/out/main/src/common/ai-resource-payload.js.map +1 -0
- package/out/main/src/common/ai-shortcuts.js.map +1 -0
- package/out/main/src/common/ai-terminal-context.js +72 -0
- package/out/main/src/common/ai-terminal-context.js.map +1 -0
- package/out/main/{common → src/common}/ai.js +6 -0
- package/out/main/src/common/ai.js.map +1 -0
- package/out/main/src/common/cluster-icon-ipc.js.map +1 -0
- package/out/main/src/common/cluster-icons.js.map +1 -0
- package/out/main/src/common/dashboard-ai.js +64 -0
- package/out/main/src/common/dashboard-ai.js.map +1 -0
- package/out/main/src/common/dashboard-picker.js.map +1 -0
- package/out/main/src/common/dashboard-readiness.js.map +1 -0
- package/out/main/src/common/dashboard-selector.js.map +1 -0
- package/out/main/src/common/dashboard-views.js.map +1 -0
- package/out/main/src/common/dashboard.js.map +1 -0
- package/out/main/src/common/extension-info.js.map +1 -0
- package/out/main/src/common/extension-updates.js +13 -0
- package/out/main/src/common/extension-updates.js.map +1 -0
- package/out/main/src/common/helm-values-validation.js +56 -0
- package/out/main/src/common/helm-values-validation.js.map +1 -0
- package/out/main/src/common/helm.js +8 -0
- package/out/main/src/common/helm.js.map +1 -0
- package/out/main/src/common/monitoring-history.js.map +1 -0
- package/out/main/src/common/node-bulk.js +6 -0
- package/out/main/src/common/node-bulk.js.map +1 -0
- package/out/main/src/common/power-logs-limits.js.map +1 -0
- package/out/main/{common → src/common}/power-logs.js +6 -0
- package/out/main/src/common/power-logs.js.map +1 -0
- package/out/main/src/common/resource-search-kind-priority.js +23 -0
- package/out/main/src/common/resource-search-kind-priority.js.map +1 -0
- package/out/main/src/common/resource-search.js.map +1 -0
- package/out/main/src/common/settings-export.js.map +1 -0
- package/out/main/{common → src/common}/store/ai-preferences-store.js +50 -8
- package/out/main/src/common/store/ai-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/ai-shortcuts-store.js +2 -2
- package/out/main/src/common/store/ai-shortcuts-store.js.map +1 -0
- package/out/main/{common → src/common}/store/appearance-preferences-store.js +10 -5
- package/out/main/src/common/store/appearance-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/cluster-icons-store.js +2 -2
- package/out/main/src/common/store/cluster-icons-store.js.map +1 -0
- package/out/main/{common → src/common}/store/dashboard-preferences-store.js +2 -2
- package/out/main/src/common/store/dashboard-preferences-store.js.map +1 -0
- package/out/main/src/common/store/helm-preferences-store.js +26 -0
- package/out/main/src/common/store/helm-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/logs-preferences-store.js +7 -2
- package/out/main/src/common/store/logs-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/monitoring-preferences-store.js +2 -2
- package/out/main/src/common/store/monitoring-preferences-store.js.map +1 -0
- package/out/main/src/common/store/node-shell-preferences-store.js +44 -0
- package/out/main/src/common/store/node-shell-preferences-store.js.map +1 -0
- package/out/main/src/common/store/power-preferences-store.js +39 -0
- package/out/main/src/common/store/power-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/read-only-preferences-store.js +2 -2
- package/out/main/src/common/store/read-only-preferences-store.js.map +1 -0
- package/out/renderer/_virtual/_global-external_mobx.js +4 -2
- package/out/renderer/_virtual/_global-external_react-dom.js +4 -2
- package/out/renderer/_virtual/_global-external_react.js +4 -2
- package/out/renderer/ai-attachment-card.js +92 -0
- package/out/renderer/ai-attachment-card.js.map +1 -0
- package/out/renderer/ai-context-mutations.js +14 -0
- package/out/renderer/ai-context-mutations.js.map +1 -0
- package/out/renderer/ai-copy-answer.js +18 -15
- package/out/renderer/ai-copy-answer.js.map +1 -1
- package/out/renderer/ai-diagnostic-handoff.js +5 -2
- package/out/renderer/ai-diagnostic-handoff.js.map +1 -1
- package/out/renderer/ai-extras.js +95 -85
- package/out/renderer/ai-extras.js.map +1 -1
- package/out/renderer/ai-icon.js +26 -0
- package/out/renderer/ai-icon.js.map +1 -1
- package/out/renderer/ai-logs-sql.js +1 -0
- package/out/renderer/ai-logs-sql.js.map +1 -1
- package/out/renderer/ai-message.js +58 -41
- package/out/renderer/ai-message.js.map +1 -1
- package/out/renderer/ai-provider-icon.js +77 -32
- package/out/renderer/ai-provider-icon.js.map +1 -1
- package/out/renderer/ai-resize.js +40 -37
- package/out/renderer/ai-resize.js.map +1 -1
- package/out/renderer/ai-shortcuts.js +21 -17
- package/out/renderer/ai-shortcuts.js.map +1 -1
- package/out/renderer/ai-terminal-context.js +54 -81
- package/out/renderer/ai-terminal-context.js.map +1 -1
- package/out/renderer/ai.js +530 -172
- package/out/renderer/ai.js.map +1 -1
- package/out/renderer/appearance.js +59 -5
- package/out/renderer/appearance.js.map +1 -1
- package/out/renderer/assets/openai.js +6 -0
- package/out/renderer/assets/openai.js.map +1 -0
- package/out/renderer/assets/pi.js +6 -0
- package/out/renderer/assets/pi.js.map +1 -0
- package/out/renderer/button-styles.js +31 -2
- package/out/renderer/button-styles.js.map +1 -1
- package/out/renderer/cluster-icon-colors.js +10 -7
- package/out/renderer/cluster-icon-colors.js.map +1 -1
- package/out/renderer/cluster-icons.js +47 -40
- package/out/renderer/cluster-icons.js.map +1 -1
- package/out/renderer/dashboard.js +75 -14
- package/out/renderer/dashboard.js.map +1 -1
- package/out/renderer/details/resource-health-details.js +2 -2
- package/out/renderer/details/resource-health-details.js.map +1 -1
- package/out/renderer/details/service-diagnostics-details.js +25 -23
- package/out/renderer/details/service-diagnostics-details.js.map +1 -1
- package/out/renderer/diagnostic-explain-button.js +7 -4
- package/out/renderer/diagnostic-explain-button.js.map +1 -1
- package/out/renderer/diagnostics-screen-finding.js +52 -0
- package/out/renderer/diagnostics-screen-finding.js.map +1 -0
- package/out/renderer/diagnostics-state.js +37 -0
- package/out/renderer/diagnostics-state.js.map +1 -1
- package/out/renderer/diagnostics.css.js +17 -4
- package/out/renderer/diagnostics.css.js.map +1 -1
- package/out/renderer/diagnostics.js +457 -189
- package/out/renderer/diagnostics.js.map +1 -1
- package/out/renderer/extension-update-notifications.js +221 -0
- package/out/renderer/extension-update-notifications.js.map +1 -0
- package/out/renderer/extension-update.js +189 -0
- package/out/renderer/extension-update.js.map +1 -0
- package/out/renderer/floating-action-transitions.js +139 -0
- package/out/renderer/floating-action-transitions.js.map +1 -0
- package/out/renderer/helm-app-version.js +141 -0
- package/out/renderer/helm-app-version.js.map +1 -0
- package/out/renderer/helm-code-view.js +727 -0
- package/out/renderer/helm-code-view.js.map +1 -0
- package/out/renderer/helm-entrypoints.js +79 -0
- package/out/renderer/helm-entrypoints.js.map +1 -0
- package/out/renderer/helm-full-comparison.js +233 -0
- package/out/renderer/helm-full-comparison.js.map +1 -0
- package/out/renderer/helm-operations.js +541 -0
- package/out/renderer/helm-operations.js.map +1 -0
- package/out/renderer/helm-release-actions.js +296 -0
- package/out/renderer/helm-release-actions.js.map +1 -0
- package/out/renderer/helm-revision-delete.js +128 -0
- package/out/renderer/helm-revision-delete.js.map +1 -0
- package/out/renderer/helm-version-index.js +283 -0
- package/out/renderer/helm-version-index.js.map +1 -0
- package/out/renderer/helm.js +2383 -0
- package/out/renderer/helm.js.map +1 -0
- package/out/renderer/host-extensions.js +102 -0
- package/out/renderer/host-extensions.js.map +1 -0
- package/out/renderer/host-layout.js +59 -0
- package/out/renderer/host-layout.js.map +1 -0
- package/out/renderer/host-preferences.js +192 -0
- package/out/renderer/host-preferences.js.map +1 -0
- package/out/renderer/incident-copy-button.js +24 -21
- package/out/renderer/incident-copy-button.js.map +1 -1
- package/out/renderer/index.js +47 -5
- package/out/renderer/index.js.map +1 -1
- package/out/renderer/menus/secure-node-shell-menu.js +2 -1
- package/out/renderer/menus/secure-node-shell-menu.js.map +1 -1
- package/out/renderer/monitoring-collector.js +13 -8
- package/out/renderer/monitoring-collector.js.map +1 -1
- package/out/renderer/monitoring-history-view.js +1 -1
- package/out/renderer/monitoring-history-view.js.map +1 -1
- package/out/renderer/monitoring.js +130 -49
- package/out/renderer/monitoring.js.map +1 -1
- package/out/renderer/native-resource-removals.js +202 -0
- package/out/renderer/native-resource-removals.js.map +1 -0
- package/out/renderer/native-tooltip.js +22 -0
- package/out/renderer/native-tooltip.js.map +1 -0
- package/out/renderer/node-bulk-actions.js +527 -0
- package/out/renderer/node-bulk-actions.js.map +1 -0
- package/out/renderer/node-bulk-selection.js +203 -0
- package/out/renderer/node-bulk-selection.js.map +1 -0
- package/out/renderer/node-shell-entrypoints.js +65 -0
- package/out/renderer/node-shell-entrypoints.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-collection.js +52 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-collection.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-doc.js +41 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-doc.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-node.js +88 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-node.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-scalar.js +59 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-scalar.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/composer.js +195 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/composer.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-map.js +84 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-map.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +176 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +42 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-seq.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-end.js +38 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-end.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +155 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +206 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-props.js +107 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-props.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-contains-newline.js +29 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-contains-newline.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +27 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +12 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-map-includes.js +12 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-map-includes.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/Document.js +279 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/Document.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/anchors.js +67 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/anchors.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/applyReviver.js +40 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/applyReviver.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/createNode.js +63 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/createNode.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/directives.js +165 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/directives.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/errors.js +53 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/errors.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/index.js +24 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/log.js +8 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/log.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Alias.js +96 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Alias.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Collection.js +121 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Collection.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Node.js +34 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Node.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Pair.js +32 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Pair.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Scalar.js +27 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Scalar.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/YAMLMap.js +109 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/YAMLMap.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +106 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/YAMLSeq.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +51 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/identity.js +50 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/identity.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/toJS.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst-scalar.js +3 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst-visit.js +91 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst-visit.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst.js +42 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/lexer.js +531 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/lexer.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/line-counter.js +47 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/line-counter.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/parser.js +861 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/parser.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/public-api.js +56 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/public-api.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/Schema.js +29 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/Schema.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/map.js +18 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/map.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/null.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/seq.js +18 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/seq.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/string.js +16 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/string.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/bool.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/float.js +42 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/float.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/int.js +41 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/int.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/schema.js +25 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/schema.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/json/schema.js +63 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/json/schema.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/tags.js +84 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/tags.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +54 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +27 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +45 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +75 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +43 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +63 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +60 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +41 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +68 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +83 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +116 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/foldFlowLines.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringify.js +108 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringify.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +118 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyCollection.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyComment.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +61 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyDocument.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +21 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyNumber.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyPair.js +97 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyPair.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyString.js +224 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyString.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/visit.js +190 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/visit.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/index.js +24 -0
- package/out/renderer/package.js +6 -0
- package/out/renderer/package.js.map +1 -0
- package/out/renderer/pod-bulk-customization.js +51 -0
- package/out/renderer/pod-bulk-customization.js.map +1 -0
- package/out/renderer/pod-details-enhancements.js +107 -0
- package/out/renderer/pod-details-enhancements.js.map +1 -0
- package/out/renderer/pod-removal-confirmation.js +172 -0
- package/out/renderer/pod-removal-confirmation.js.map +1 -0
- package/out/renderer/power-log-column-widths.js +54 -0
- package/out/renderer/power-log-column-widths.js.map +1 -0
- package/out/renderer/power-log-columns.js +114 -0
- package/out/renderer/power-log-columns.js.map +1 -0
- package/out/renderer/power-log-json-cell.js +88 -0
- package/out/renderer/power-log-json-cell.js.map +1 -0
- package/out/renderer/power-log-json-fields.js +144 -0
- package/out/renderer/power-log-json-fields.js.map +1 -0
- package/out/renderer/power-log-json.js +252 -20
- package/out/renderer/power-log-json.js.map +1 -1
- package/out/renderer/power-log-message-tokens.js +60 -0
- package/out/renderer/power-log-message-tokens.js.map +1 -0
- package/out/renderer/power-log-message.js +26 -0
- package/out/renderer/power-log-message.js.map +1 -0
- package/out/renderer/power-log-sql-editor.js +120 -0
- package/out/renderer/power-log-sql-editor.js.map +1 -0
- package/out/renderer/power-logs-client.js +9 -0
- package/out/renderer/power-logs-client.js.map +1 -1
- package/out/renderer/power-logs-context.js +45 -0
- package/out/renderer/power-logs-context.js.map +1 -0
- package/out/renderer/power-logs-entrypoints.js +13 -36
- package/out/renderer/power-logs-entrypoints.js.map +1 -1
- package/out/renderer/power-logs-resource-stores.js +71 -0
- package/out/renderer/power-logs-resource-stores.js.map +1 -0
- package/out/renderer/power-logs-session.js +35 -0
- package/out/renderer/power-logs-session.js.map +1 -0
- package/out/renderer/power-logs-sql-drafts.js +76 -0
- package/out/renderer/power-logs-sql-drafts.js.map +1 -0
- package/out/renderer/power-logs-sql-row.js +5 -13
- package/out/renderer/power-logs-sql-row.js.map +1 -1
- package/out/renderer/power-logs-storage.js +11 -0
- package/out/renderer/power-logs-storage.js.map +1 -0
- package/out/renderer/power-logs.css.js +112 -13
- package/out/renderer/power-logs.css.js.map +1 -1
- package/out/renderer/power-logs.js +1120 -362
- package/out/renderer/power-logs.js.map +1 -1
- package/out/renderer/preferences/ai-preferences.js +264 -55
- package/out/renderer/preferences/ai-preferences.js.map +1 -1
- package/out/renderer/preferences/dashboard-preferences.js +42 -35
- package/out/renderer/preferences/dashboard-preferences.js.map +1 -1
- package/out/renderer/preferences/helm-preferences.js +22 -0
- package/out/renderer/preferences/helm-preferences.js.map +1 -0
- package/out/renderer/preferences/logs-preferences.js +287 -52
- package/out/renderer/preferences/logs-preferences.js.map +1 -1
- package/out/renderer/preferences/monitoring-preferences.js +21 -20
- package/out/renderer/preferences/monitoring-preferences.js.map +1 -1
- package/out/renderer/preferences/node-shell-preferences.js +10 -0
- package/out/renderer/preferences/node-shell-preferences.js.map +1 -1
- package/out/renderer/preferences/other-preferences.js +55 -0
- package/out/renderer/preferences/other-preferences.js.map +1 -0
- package/out/renderer/preferences/power-preferences.js +27 -10
- package/out/renderer/preferences/power-preferences.js.map +1 -1
- package/out/renderer/preferences/preferences.js +44 -13
- package/out/renderer/preferences/preferences.js.map +1 -1
- package/out/renderer/preferences/section-navigation.js +44 -0
- package/out/renderer/preferences/section-navigation.js.map +1 -0
- package/out/renderer/preferences/settings-icon-action.js +12 -11
- package/out/renderer/preferences/settings-icon-action.js.map +1 -1
- package/out/renderer/preferences/settings-modal.js +1 -1
- package/out/renderer/preferences/settings-modal.js.map +1 -1
- package/out/renderer/relationship-map-finding.js +54 -0
- package/out/renderer/relationship-map-finding.js.map +1 -0
- package/out/renderer/resource-relationships.css.js +11 -1
- package/out/renderer/resource-relationships.css.js.map +1 -1
- package/out/renderer/resource-relationships.js +104 -50
- package/out/renderer/resource-relationships.js.map +1 -1
- package/out/renderer/resource-search-client.js.map +1 -1
- package/out/renderer/resource-search-fields.js +2 -2
- package/out/renderer/resource-search-fields.js.map +1 -1
- package/out/renderer/resource-search-model.js +2 -1
- package/out/renderer/resource-search-model.js.map +1 -1
- package/out/renderer/resource-search-sync.js +1 -1
- package/out/renderer/resource-search-sync.js.map +1 -1
- package/out/renderer/resource-search.js +164 -108
- package/out/renderer/resource-search.js.map +1 -1
- package/out/renderer/secret-dialog-customization.js +142 -0
- package/out/renderer/secret-dialog-customization.js.map +1 -0
- package/out/renderer/src/common/ai-attachments.js +160 -0
- package/out/renderer/src/common/ai-attachments.js.map +1 -0
- package/out/renderer/src/common/ai-models.js +58 -0
- package/out/renderer/src/common/ai-models.js.map +1 -1
- package/out/renderer/src/common/ai-prompts.js +32 -2
- package/out/renderer/src/common/ai-prompts.js.map +1 -1
- package/out/renderer/src/common/ai-resource-payload.js +262 -0
- package/out/renderer/src/common/ai-resource-payload.js.map +1 -0
- package/out/renderer/src/common/ai-terminal-context.js +39 -18
- package/out/renderer/src/common/ai-terminal-context.js.map +1 -1
- package/out/renderer/src/common/ai.js +6 -0
- package/out/renderer/src/common/ai.js.map +1 -1
- package/out/renderer/src/common/dashboard-ai.js +22 -0
- package/out/renderer/src/common/dashboard-ai.js.map +1 -0
- package/out/renderer/src/common/extension-updates.js +33 -0
- package/out/renderer/src/common/extension-updates.js.map +1 -0
- package/out/renderer/src/common/gateway-relationships.js +8 -7
- package/out/renderer/src/common/gateway-relationships.js.map +1 -1
- package/out/renderer/src/common/helm-diff.js +312 -0
- package/out/renderer/src/common/helm-diff.js.map +1 -0
- package/out/renderer/src/common/helm-values-validation.js +59 -0
- package/out/renderer/src/common/helm-values-validation.js.map +1 -0
- package/out/renderer/src/common/helm.js +10 -0
- package/out/renderer/src/common/helm.js.map +1 -0
- package/out/renderer/src/common/node-bulk.js +6 -0
- package/out/renderer/src/common/node-bulk.js.map +1 -0
- package/out/renderer/src/common/power-log-field-filters.js +92 -0
- package/out/renderer/src/common/power-log-field-filters.js.map +1 -0
- package/out/renderer/src/common/power-log-json-filter-sql.js +118 -0
- package/out/renderer/src/common/power-log-json-filter-sql.js.map +1 -0
- package/out/renderer/src/common/power-log-json-preset.js +34 -0
- package/out/renderer/src/common/power-log-json-preset.js.map +1 -0
- package/out/renderer/src/common/power-log-level.js +172 -0
- package/out/renderer/src/common/power-log-level.js.map +1 -0
- package/out/renderer/src/common/power-log-parser.js +7 -29
- package/out/renderer/src/common/power-log-parser.js.map +1 -1
- package/out/renderer/src/common/power-log-sql-level.js +25 -0
- package/out/renderer/src/common/power-log-sql-level.js.map +1 -0
- package/out/renderer/src/common/power-logs-ai.js +11 -7
- package/out/renderer/src/common/power-logs-ai.js.map +1 -1
- package/out/renderer/src/common/power-logs.js +6 -0
- package/out/renderer/src/common/power-logs.js.map +1 -1
- package/out/renderer/src/common/resource-relationships.js +10 -8
- package/out/renderer/src/common/resource-relationships.js.map +1 -1
- package/out/renderer/src/common/resource-search-kind-priority.js +28 -0
- package/out/renderer/src/common/resource-search-kind-priority.js.map +1 -0
- package/out/renderer/src/common/resource-search.js.map +1 -1
- package/out/{main/common/ai-terminal-context.js → renderer/src/common/search-index-redaction.js} +4 -29
- package/out/renderer/src/common/search-index-redaction.js.map +1 -0
- package/out/renderer/src/common/store/ai-preferences-store.js +48 -6
- package/out/renderer/src/common/store/ai-preferences-store.js.map +1 -1
- package/out/renderer/src/common/store/appearance-preferences-store.js +8 -3
- package/out/renderer/src/common/store/appearance-preferences-store.js.map +1 -1
- package/out/renderer/src/common/store/helm-preferences-store.js +26 -0
- package/out/renderer/src/common/store/helm-preferences-store.js.map +1 -0
- package/out/renderer/src/common/store/logs-preferences-store.js +5 -0
- package/out/renderer/src/common/store/logs-preferences-store.js.map +1 -1
- package/out/renderer/src/common/store/node-shell-preferences-store.js +10 -6
- package/out/renderer/src/common/store/node-shell-preferences-store.js.map +1 -1
- package/out/renderer/src/common/store/power-preferences-store.js +19 -3
- package/out/renderer/src/common/store/power-preferences-store.js.map +1 -1
- package/out/renderer/welcome.js +29 -2
- package/out/renderer/welcome.js.map +1 -1
- package/package.json +5 -2
- package/out/main/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js +0 -9
- package/out/main/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorateMetadata.js +0 -6
- package/out/main/common/ai-extras.js.map +0 -1
- package/out/main/common/ai-models.js +0 -6
- package/out/main/common/ai-models.js.map +0 -1
- package/out/main/common/ai-prompts.js +0 -16
- package/out/main/common/ai-prompts.js.map +0 -1
- package/out/main/common/ai-shortcuts.js.map +0 -1
- package/out/main/common/ai-terminal-context.js.map +0 -1
- package/out/main/common/ai.js.map +0 -1
- package/out/main/common/cluster-icon-ipc.js.map +0 -1
- package/out/main/common/cluster-icons.js.map +0 -1
- package/out/main/common/dashboard-picker.js.map +0 -1
- package/out/main/common/dashboard-readiness.js.map +0 -1
- package/out/main/common/dashboard-selector.js.map +0 -1
- package/out/main/common/dashboard-views.js.map +0 -1
- package/out/main/common/dashboard.js.map +0 -1
- package/out/main/common/extension-info.js.map +0 -1
- package/out/main/common/monitoring-history.js.map +0 -1
- package/out/main/common/power-logs-limits.js.map +0 -1
- package/out/main/common/power-logs.js.map +0 -1
- package/out/main/common/resource-search.js.map +0 -1
- package/out/main/common/settings-export.js.map +0 -1
- package/out/main/common/store/ai-preferences-store.js.map +0 -1
- package/out/main/common/store/ai-shortcuts-store.js.map +0 -1
- package/out/main/common/store/appearance-preferences-store.js.map +0 -1
- package/out/main/common/store/cluster-icons-store.js.map +0 -1
- package/out/main/common/store/dashboard-preferences-store.js.map +0 -1
- package/out/main/common/store/logs-preferences-store.js.map +0 -1
- package/out/main/common/store/monitoring-preferences-store.js.map +0 -1
- package/out/main/common/store/node-shell-preferences-store.js +0 -40
- package/out/main/common/store/node-shell-preferences-store.js.map +0 -1
- package/out/main/common/store/power-preferences-store.js +0 -23
- package/out/main/common/store/power-preferences-store.js.map +0 -1
- package/out/main/common/store/read-only-preferences-store.js.map +0 -1
- package/out/renderer/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js +0 -9
- package/out/renderer/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorateMetadata.js +0 -6
- /package/out/main/{common → src/common}/ai-extras.js +0 -0
- /package/out/main/{common → src/common}/ai-shortcuts.js +0 -0
- /package/out/main/{common → src/common}/cluster-icon-ipc.js +0 -0
- /package/out/main/{common → src/common}/cluster-icons.js +0 -0
- /package/out/main/{common → src/common}/dashboard-picker.js +0 -0
- /package/out/main/{common → src/common}/dashboard-readiness.js +0 -0
- /package/out/main/{common → src/common}/dashboard-selector.js +0 -0
- /package/out/main/{common → src/common}/dashboard-views.js +0 -0
- /package/out/main/{common → src/common}/dashboard.js +0 -0
- /package/out/main/{common → src/common}/extension-info.js +0 -0
- /package/out/main/{common → src/common}/monitoring-history.js +0 -0
- /package/out/main/{common → src/common}/power-logs-limits.js +0 -0
- /package/out/main/{common → src/common}/resource-search.js +0 -0
- /package/out/main/{common → src/common}/settings-export.js +0 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
const require_identity = require("../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/identity.js");
|
|
2
|
+
const require_public_api = require("../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/public-api.js");
|
|
3
|
+
require("../../node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/index.js");
|
|
4
|
+
//#region src/common/ai-resource-payload.ts
|
|
5
|
+
var REDACTED = "[REDACTED]";
|
|
6
|
+
var annotation = "kubectl.kubernetes.io/last-applied-configuration";
|
|
7
|
+
var payloadFields = /* @__PURE__ */ new Set([
|
|
8
|
+
"data",
|
|
9
|
+
"stringData",
|
|
10
|
+
"binaryData"
|
|
11
|
+
]);
|
|
12
|
+
function isKubernetesPayloadResource(value) {
|
|
13
|
+
return !!value && typeof value === "object" && ["Secret", "ConfigMap"].includes(value.kind);
|
|
14
|
+
}
|
|
15
|
+
function redactKubernetesJsonText(text, encodedDepth = 0) {
|
|
16
|
+
if (encodedDepth > 8) return JSON.stringify(REDACTED);
|
|
17
|
+
JSON.parse(text);
|
|
18
|
+
const tokens = text.match(/"(?:[^"\\]|\\.)*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|true|false|null|[{}\[\],:]/g) ?? [];
|
|
19
|
+
let position = 0;
|
|
20
|
+
let remainingNodes = 1e4;
|
|
21
|
+
const parse = (depth = 0) => {
|
|
22
|
+
if (--remainingNodes < 0 || depth > 64) throw new RangeError("resource payload complexity limit");
|
|
23
|
+
const start = position++;
|
|
24
|
+
const node = {
|
|
25
|
+
start,
|
|
26
|
+
end: position
|
|
27
|
+
};
|
|
28
|
+
if (tokens[start] === "{") {
|
|
29
|
+
node.fields = [];
|
|
30
|
+
while (tokens[position] !== "}") {
|
|
31
|
+
const key = JSON.parse(tokens[position++]);
|
|
32
|
+
position++;
|
|
33
|
+
node.fields.push([key, parse(depth + 1)]);
|
|
34
|
+
if (tokens[position] !== ",") break;
|
|
35
|
+
position++;
|
|
36
|
+
}
|
|
37
|
+
position++;
|
|
38
|
+
} else if (tokens[start] === "[") {
|
|
39
|
+
node.children = [];
|
|
40
|
+
while (tokens[position] !== "]") {
|
|
41
|
+
node.children.push(parse(depth + 1));
|
|
42
|
+
if (tokens[position] !== ",") break;
|
|
43
|
+
position++;
|
|
44
|
+
}
|
|
45
|
+
position++;
|
|
46
|
+
}
|
|
47
|
+
node.end = position;
|
|
48
|
+
return node;
|
|
49
|
+
};
|
|
50
|
+
const replacements = /* @__PURE__ */ new Map();
|
|
51
|
+
const replace = (node, value) => replacements.set(node.start, {
|
|
52
|
+
end: node.end,
|
|
53
|
+
text: JSON.stringify(value)
|
|
54
|
+
});
|
|
55
|
+
const visit = (node, key, resourceHint = false) => {
|
|
56
|
+
const resource = resourceHint || node.fields?.some(([name, child]) => name === "kind" && tokens[child.start].startsWith("\"") && ["Secret", "ConfigMap"].includes(JSON.parse(tokens[child.start])));
|
|
57
|
+
const typedList = node.fields?.some(([name, child]) => name === "kind" && tokens[child.start].startsWith("\"") && ["SecretList", "ConfigMapList"].includes(JSON.parse(tokens[child.start])));
|
|
58
|
+
for (const [name, child] of node.fields ?? []) if (resource && payloadFields.has(name)) if (child.fields) for (const [, value] of child.fields) replace(value, REDACTED);
|
|
59
|
+
else replace(child, REDACTED);
|
|
60
|
+
else visit(child, name, !!typedList && name === "items");
|
|
61
|
+
for (const child of node.children ?? []) visit(child, void 0, resourceHint);
|
|
62
|
+
if (tokens[node.start]?.startsWith("\"")) {
|
|
63
|
+
const value = JSON.parse(tokens[node.start]);
|
|
64
|
+
try {
|
|
65
|
+
JSON.parse(value);
|
|
66
|
+
const safe = redactKubernetesJsonText(value, encodedDepth + 1);
|
|
67
|
+
if (safe !== value) replace(node, safe);
|
|
68
|
+
} catch {
|
|
69
|
+
if (key === annotation) replace(node, REDACTED);
|
|
70
|
+
else {
|
|
71
|
+
const safe = redactKubernetesYamlText(value, encodedDepth + 1);
|
|
72
|
+
if (safe !== value) replace(node, safe);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
try {
|
|
78
|
+
visit(parse());
|
|
79
|
+
} catch {
|
|
80
|
+
return JSON.stringify(REDACTED);
|
|
81
|
+
}
|
|
82
|
+
if (!replacements.size) return text;
|
|
83
|
+
const result = [];
|
|
84
|
+
for (let index = 0; index < tokens.length;) {
|
|
85
|
+
const replacement = replacements.get(index);
|
|
86
|
+
result.push(replacement?.text ?? tokens[index]);
|
|
87
|
+
index = replacement?.end ?? index + 1;
|
|
88
|
+
}
|
|
89
|
+
return result.join("");
|
|
90
|
+
}
|
|
91
|
+
function redactKubernetesYamlText(text, encodedDepth = 0) {
|
|
92
|
+
if (encodedDepth > 8) return JSON.stringify(REDACTED);
|
|
93
|
+
const edits = [];
|
|
94
|
+
const recognizable = (source) => /["']?kind["']?\s*:\s*["']?(Secret|ConfigMap)(?:List)?\b/.test(source) && (/^\s*(?:-\s*)?["']?(data|stringData|binaryData)["']?\s*:/m.test(source) || /^\s*[\[{].*["']?(data|stringData|binaryData)["']?\s*:/m.test(source));
|
|
95
|
+
try {
|
|
96
|
+
for (const doc of require_public_api.parseAllDocuments(text, {
|
|
97
|
+
schema: "failsafe",
|
|
98
|
+
resolveKnownTags: false,
|
|
99
|
+
uniqueKeys: false
|
|
100
|
+
})) {
|
|
101
|
+
let remaining = 3e4;
|
|
102
|
+
let recognized = false;
|
|
103
|
+
const source = text.slice(doc.range?.[0], doc.range?.[2]);
|
|
104
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
105
|
+
const anchors = /* @__PURE__ */ new Map();
|
|
106
|
+
const index = [{
|
|
107
|
+
node: doc.contents,
|
|
108
|
+
depth: 0
|
|
109
|
+
}];
|
|
110
|
+
try {
|
|
111
|
+
while (index.length) {
|
|
112
|
+
const current = index.pop();
|
|
113
|
+
if (--remaining < 0 || current.depth > 64) throw new RangeError("resource payload complexity limit");
|
|
114
|
+
const node = current.node;
|
|
115
|
+
if (!require_identity.isNode(node)) continue;
|
|
116
|
+
const anchor = node.anchor;
|
|
117
|
+
if (anchor && node.range) {
|
|
118
|
+
const definitions = anchors.get(anchor) ?? [];
|
|
119
|
+
definitions.push({
|
|
120
|
+
node,
|
|
121
|
+
offset: node.range[0]
|
|
122
|
+
});
|
|
123
|
+
anchors.set(anchor, definitions);
|
|
124
|
+
}
|
|
125
|
+
if (require_identity.isMap(node)) for (const pair of node.items) index.push({
|
|
126
|
+
node: pair.key,
|
|
127
|
+
depth: current.depth + 1
|
|
128
|
+
}, {
|
|
129
|
+
node: pair.value,
|
|
130
|
+
depth: current.depth + 1
|
|
131
|
+
});
|
|
132
|
+
else if (require_identity.isSeq(node)) for (const child of node.items) index.push({
|
|
133
|
+
node: child,
|
|
134
|
+
depth: current.depth + 1
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
for (const definitions of anchors.values()) definitions.sort((a, b) => a.offset - b.offset);
|
|
138
|
+
const resolved = (node) => {
|
|
139
|
+
if (!require_identity.isAlias(node)) return node;
|
|
140
|
+
const definitions = anchors.get(node.source);
|
|
141
|
+
if (!definitions) return;
|
|
142
|
+
let low = 0;
|
|
143
|
+
let high = definitions.length;
|
|
144
|
+
const offset = node.range?.[0] ?? 0;
|
|
145
|
+
while (low < high) {
|
|
146
|
+
const middle = low + high >>> 1;
|
|
147
|
+
if (definitions[middle].offset < offset) low = middle + 1;
|
|
148
|
+
else high = middle;
|
|
149
|
+
}
|
|
150
|
+
return definitions[low - 1]?.node;
|
|
151
|
+
};
|
|
152
|
+
const replace = (node, value = "\"[REDACTED]\"", followAlias = true) => {
|
|
153
|
+
if (!require_identity.isNode(node) || !node.range) return;
|
|
154
|
+
const [start, end] = node.range;
|
|
155
|
+
edits.push({
|
|
156
|
+
start,
|
|
157
|
+
end,
|
|
158
|
+
text: value + (text.slice(start, end).endsWith("\n") ? "\n" : "")
|
|
159
|
+
});
|
|
160
|
+
if (followAlias && require_identity.isAlias(node)) replace(resolved(node), value, false);
|
|
161
|
+
};
|
|
162
|
+
const scalar = (node) => {
|
|
163
|
+
const target = resolved(node);
|
|
164
|
+
return require_identity.isScalar(target) ? String(target.value) : void 0;
|
|
165
|
+
};
|
|
166
|
+
const pairs = (node, depth, path = /* @__PURE__ */ new Set()) => {
|
|
167
|
+
if (--remaining < 0 || depth > 64) throw new RangeError("resource payload complexity limit");
|
|
168
|
+
const target = resolved(node);
|
|
169
|
+
if (path.has(target)) throw new RangeError("cyclic YAML merge");
|
|
170
|
+
path.add(target);
|
|
171
|
+
const result = [];
|
|
172
|
+
const append = (entries) => {
|
|
173
|
+
if (entries.length > remaining) throw new RangeError("resource payload complexity limit");
|
|
174
|
+
remaining -= entries.length;
|
|
175
|
+
result.push(...entries);
|
|
176
|
+
};
|
|
177
|
+
if (require_identity.isSeq(target)) for (const child of target.items) append(pairs(child, depth + 1, path));
|
|
178
|
+
else if (require_identity.isMap(target)) for (const pair of target.items) if (scalar(pair.key) === "<<") append(pairs(pair.value, depth + 1, path));
|
|
179
|
+
else append([pair]);
|
|
180
|
+
path.delete(target);
|
|
181
|
+
return result;
|
|
182
|
+
};
|
|
183
|
+
const maskPayload = (node, depth) => {
|
|
184
|
+
const target = resolved(node);
|
|
185
|
+
if (!require_identity.isMap(target)) {
|
|
186
|
+
replace(node);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const entries = pairs(target, depth + 1);
|
|
190
|
+
if (entries.length > remaining) throw new RangeError("resource payload complexity limit");
|
|
191
|
+
if (require_identity.isAlias(node)) {
|
|
192
|
+
const keys = entries.map((pair) => scalar(pair.key));
|
|
193
|
+
if (keys.some((key) => key === void 0)) replace(node);
|
|
194
|
+
else replace(node, `{${keys.map((key) => `${JSON.stringify(key)}: "[REDACTED]"`).join(", ")}}`, false);
|
|
195
|
+
}
|
|
196
|
+
for (const pair of entries) {
|
|
197
|
+
remaining--;
|
|
198
|
+
replace(pair.value);
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
const visit = (input, depth, resourceHint = false) => {
|
|
202
|
+
if (--remaining < 0 || depth > 64) throw new RangeError("resource payload complexity limit");
|
|
203
|
+
const node = resolved(input);
|
|
204
|
+
if (ancestors.has(node)) throw new RangeError("cyclic YAML alias");
|
|
205
|
+
ancestors.add(node);
|
|
206
|
+
if (require_identity.isMap(node)) {
|
|
207
|
+
const entries = pairs(node, depth);
|
|
208
|
+
const resource = resourceHint || entries.some((pair) => scalar(pair.key) === "kind" && ["Secret", "ConfigMap"].includes(scalar(pair.value) ?? ""));
|
|
209
|
+
const typedList = entries.some((pair) => scalar(pair.key) === "kind" && ["SecretList", "ConfigMapList"].includes(scalar(pair.value) ?? ""));
|
|
210
|
+
recognized ||= resource || typedList;
|
|
211
|
+
for (const pair of entries) {
|
|
212
|
+
const key = scalar(pair.key);
|
|
213
|
+
if (resource && payloadFields.has(key ?? "")) maskPayload(pair.value, depth);
|
|
214
|
+
else if (key === annotation) {
|
|
215
|
+
const value = scalar(pair.value);
|
|
216
|
+
try {
|
|
217
|
+
if (value === void 0) throw new Error("invalid resource annotation");
|
|
218
|
+
const safe = redactKubernetesJsonText(value);
|
|
219
|
+
if (safe !== value) replace(pair.value, JSON.stringify(safe));
|
|
220
|
+
} catch {
|
|
221
|
+
replace(pair.value);
|
|
222
|
+
}
|
|
223
|
+
} else visit(pair.value, depth + 1, typedList && key === "items");
|
|
224
|
+
}
|
|
225
|
+
} else if (require_identity.isSeq(node)) for (const child of node.items) visit(child, depth + 1, resourceHint);
|
|
226
|
+
else if (require_identity.isScalar(node) && typeof node.value === "string" && (node !== doc.contents || node.value.trim() !== source.trim())) try {
|
|
227
|
+
const safe = redactKubernetesJsonText(node.value, encodedDepth + 1);
|
|
228
|
+
if (safe !== node.value) replace(node, JSON.stringify(safe));
|
|
229
|
+
} catch {
|
|
230
|
+
const safe = redactKubernetesYamlText(node.value, encodedDepth + 1);
|
|
231
|
+
if (safe !== node.value) replace(node, JSON.stringify(safe));
|
|
232
|
+
}
|
|
233
|
+
ancestors.delete(node);
|
|
234
|
+
};
|
|
235
|
+
visit(doc.contents, 0);
|
|
236
|
+
if (doc.errors.length && (recognized || recognizable(source))) throw new Error("malformed resource document");
|
|
237
|
+
} catch (error) {
|
|
238
|
+
if (doc.range && (error instanceof RangeError || recognized || recognizable(source))) edits.push({
|
|
239
|
+
start: doc.range[0],
|
|
240
|
+
end: doc.range[2],
|
|
241
|
+
text: "\"[REDACTED]\"\n"
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
} catch {
|
|
246
|
+
return recognizable(text) ? JSON.stringify(REDACTED) : text;
|
|
247
|
+
}
|
|
248
|
+
let result = "";
|
|
249
|
+
let position = 0;
|
|
250
|
+
for (const edit of edits.sort((a, b) => a.start - b.start || b.end - a.end)) {
|
|
251
|
+
if (edit.start < position) continue;
|
|
252
|
+
result += text.slice(position, edit.start) + edit.text;
|
|
253
|
+
position = edit.end;
|
|
254
|
+
}
|
|
255
|
+
return result + text.slice(position);
|
|
256
|
+
}
|
|
257
|
+
//#endregion
|
|
258
|
+
exports.isKubernetesPayloadResource = isKubernetesPayloadResource;
|
|
259
|
+
exports.redactKubernetesJsonText = redactKubernetesJsonText;
|
|
260
|
+
exports.redactKubernetesYamlText = redactKubernetesYamlText;
|
|
261
|
+
|
|
262
|
+
//# sourceMappingURL=ai-resource-payload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-resource-payload.js","names":[],"sources":["../../../../src/common/ai-resource-payload.ts"],"sourcesContent":["import { isAlias, isMap, isNode, isScalar, isSeq, parseAllDocuments } from \"yaml\";\n\nconst REDACTED = \"[REDACTED]\";\nconst annotation = \"kubectl.kubernetes.io/last-applied-configuration\";\nconst payloadFields = new Set([\"data\", \"stringData\", \"binaryData\"]);\n\nexport function isKubernetesPayloadResource(value: unknown): boolean {\n return (\n !!value &&\n typeof value === \"object\" &&\n [\"Secret\", \"ConfigMap\"].includes((value as Record<string, unknown>).kind as string)\n );\n}\n\nexport function redactKubernetesPayload(value: unknown, approvedKind?: string): unknown {\n const ancestors = new WeakSet<object>();\n let remaining = 10000;\n const visit = (item: unknown, depth: number, resourceHint = false, listHint = false): unknown => {\n if (--remaining < 0 || depth > 64) return REDACTED;\n if (typeof item === \"string\") {\n try {\n JSON.parse(item);\n return redactKubernetesJsonText(item);\n } catch {\n /* ordinary text remains intact */\n }\n return redactKubernetesYamlText(item);\n }\n if (!item || typeof item !== \"object\") return item;\n if (ancestors.has(item)) return REDACTED;\n ancestors.add(item);\n let result: unknown;\n if (Array.isArray(item))\n result = item.length > remaining ? REDACTED : item.map((child) => visit(child, depth + 1, resourceHint));\n else {\n const clone: Record<string, unknown> = Object.create(null);\n const resource = resourceHint || isKubernetesPayloadResource(item);\n const typedList =\n listHint ||\n [\"SecretList\", \"ConfigMapList\"].includes((item as Record<string, unknown>).kind as string) ||\n (resourceHint && Array.isArray((item as Record<string, unknown>).items));\n const keys = Object.keys(item);\n if (keys.length > remaining) {\n ancestors.delete(item);\n return REDACTED;\n }\n for (const key of keys) {\n if (remaining <= 0) {\n clone[key] = REDACTED;\n continue;\n }\n const child = (item as Record<string, unknown>)[key];\n if (resource && payloadFields.has(key))\n clone[key] =\n child && typeof child === \"object\" && !Array.isArray(child)\n ? Object.keys(child).length > remaining\n ? REDACTED\n : Object.fromEntries(Object.keys(child).map((name) => [name, REDACTED]))\n : REDACTED;\n else if (key === annotation && typeof child === \"string\") {\n try {\n clone[key] = redactKubernetesJsonText(child);\n } catch {\n clone[key] = REDACTED;\n }\n } else clone[key] = visit(child, depth + 1, typedList && key === \"items\");\n }\n result = clone;\n }\n ancestors.delete(item);\n return result;\n };\n return visit(\n value,\n 0,\n [\"Secret\", \"ConfigMap\"].includes(approvedKind ?? \"\"),\n [\"SecretList\", \"ConfigMapList\"].includes(approvedKind ?? \"\"),\n );\n}\n\n// retain original scalar tokens so unrelated numeric values never pass through floating point conversion\nexport function redactKubernetesJsonText(text: string, encodedDepth = 0): string {\n if (encodedDepth > 8) return JSON.stringify(REDACTED);\n JSON.parse(text);\n const tokens = text.match(/\"(?:[^\"\\\\]|\\\\.)*\"|-?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?|true|false|null|[{}\\[\\],:]/g) ?? [];\n let position = 0;\n type Node = { start: number; end: number; fields?: [string, Node][]; children?: Node[] };\n let remainingNodes = 10000;\n const parse = (depth = 0): Node => {\n if (--remainingNodes < 0 || depth > 64) throw new RangeError(\"resource payload complexity limit\");\n const start = position++;\n const node: Node = { start, end: position };\n if (tokens[start] === \"{\") {\n node.fields = [];\n while (tokens[position] !== \"}\") {\n const key = JSON.parse(tokens[position++]) as string;\n position++;\n node.fields.push([key, parse(depth + 1)]);\n if (tokens[position] !== \",\") break;\n position++;\n }\n position++;\n } else if (tokens[start] === \"[\") {\n node.children = [];\n while (tokens[position] !== \"]\") {\n node.children.push(parse(depth + 1));\n if (tokens[position] !== \",\") break;\n position++;\n }\n position++;\n }\n node.end = position;\n return node;\n };\n const replacements = new Map<number, { end: number; text: string }>();\n const replace = (node: Node, value: string) =>\n replacements.set(node.start, { end: node.end, text: JSON.stringify(value) });\n const visit = (node: Node, key?: string, resourceHint = false) => {\n const resource =\n resourceHint ||\n node.fields?.some(\n ([name, child]) =>\n name === \"kind\" &&\n tokens[child.start].startsWith('\"') &&\n [\"Secret\", \"ConfigMap\"].includes(JSON.parse(tokens[child.start])),\n );\n const typedList = node.fields?.some(\n ([name, child]) =>\n name === \"kind\" &&\n tokens[child.start].startsWith('\"') &&\n [\"SecretList\", \"ConfigMapList\"].includes(JSON.parse(tokens[child.start])),\n );\n for (const [name, child] of node.fields ?? []) {\n if (resource && payloadFields.has(name)) {\n if (child.fields) for (const [, value] of child.fields) replace(value, REDACTED);\n else replace(child, REDACTED);\n } else visit(child, name, !!typedList && name === \"items\");\n }\n for (const child of node.children ?? []) visit(child, undefined, resourceHint);\n if (tokens[node.start]?.startsWith('\"')) {\n const value = JSON.parse(tokens[node.start]) as string;\n try {\n JSON.parse(value);\n const safe = redactKubernetesJsonText(value, encodedDepth + 1);\n if (safe !== value) replace(node, safe);\n } catch {\n if (key === annotation) replace(node, REDACTED);\n else {\n const safe = redactKubernetesYamlText(value, encodedDepth + 1);\n if (safe !== value) replace(node, safe);\n }\n }\n }\n };\n try {\n visit(parse());\n } catch {\n return JSON.stringify(REDACTED);\n }\n if (!replacements.size) return text;\n const result: string[] = [];\n for (let index = 0; index < tokens.length; ) {\n const replacement = replacements.get(index);\n result.push(replacement?.text ?? tokens[index]);\n index = replacement?.end ?? index + 1;\n }\n return result.join(\"\");\n}\n\nexport function redactKubernetesYamlText(text: string, encodedDepth = 0): string {\n if (encodedDepth > 8) return JSON.stringify(REDACTED);\n const edits: { start: number; end: number; text: string }[] = [];\n const recognizable = (source: string) =>\n /[\"']?kind[\"']?\\s*:\\s*[\"']?(Secret|ConfigMap)(?:List)?\\b/.test(source) &&\n (/^\\s*(?:-\\s*)?[\"']?(data|stringData|binaryData)[\"']?\\s*:/m.test(source) ||\n /^\\s*[\\[{].*[\"']?(data|stringData|binaryData)[\"']?\\s*:/m.test(source));\n try {\n for (const doc of parseAllDocuments(text, { schema: \"failsafe\", resolveKnownTags: false, uniqueKeys: false })) {\n let remaining = 30000;\n let recognized = false;\n const source = text.slice(doc.range?.[0], doc.range?.[2]);\n const ancestors = new Set<unknown>();\n const anchors = new Map<string, { node: unknown; offset: number }[]>();\n const index = [{ node: doc.contents as unknown, depth: 0 }];\n try {\n while (index.length) {\n const current = index.pop()!;\n if (--remaining < 0 || current.depth > 64) throw new RangeError(\"resource payload complexity limit\");\n const node = current.node;\n if (!isNode(node)) continue;\n const anchor = (node as { anchor?: string }).anchor;\n if (anchor && node.range) {\n const definitions = anchors.get(anchor) ?? [];\n definitions.push({ node, offset: node.range[0] });\n anchors.set(anchor, definitions);\n }\n if (isMap(node))\n for (const pair of node.items)\n index.push({ node: pair.key, depth: current.depth + 1 }, { node: pair.value, depth: current.depth + 1 });\n else if (isSeq(node)) for (const child of node.items) index.push({ node: child, depth: current.depth + 1 });\n }\n for (const definitions of anchors.values()) definitions.sort((a, b) => a.offset - b.offset);\n const resolved = (node: unknown): unknown => {\n if (!isAlias(node)) return node;\n const definitions = anchors.get(node.source);\n if (!definitions) return;\n let low = 0;\n let high = definitions.length;\n const offset = node.range?.[0] ?? 0;\n while (low < high) {\n const middle = (low + high) >>> 1;\n if (definitions[middle].offset < offset) low = middle + 1;\n else high = middle;\n }\n return definitions[low - 1]?.node;\n };\n const replace = (node: unknown, value = '\"[REDACTED]\"', followAlias = true) => {\n if (!isNode(node) || !node.range) return;\n const [start, end] = node.range;\n edits.push({ start, end, text: value + (text.slice(start, end).endsWith(\"\\n\") ? \"\\n\" : \"\") });\n if (followAlias && isAlias(node)) replace(resolved(node), value, false);\n };\n const scalar = (node: unknown) => {\n const target = resolved(node);\n return isScalar(target) ? String(target.value) : undefined;\n };\n const pairs = (node: unknown, depth: number, path = new Set<unknown>()): { key: unknown; value: unknown }[] => {\n if (--remaining < 0 || depth > 64) throw new RangeError(\"resource payload complexity limit\");\n const target = resolved(node);\n if (path.has(target)) throw new RangeError(\"cyclic YAML merge\");\n path.add(target);\n const result: { key: unknown; value: unknown }[] = [];\n const append = (entries: { key: unknown; value: unknown }[]) => {\n if (entries.length > remaining) throw new RangeError(\"resource payload complexity limit\");\n remaining -= entries.length;\n result.push(...entries);\n };\n if (isSeq(target)) for (const child of target.items) append(pairs(child, depth + 1, path));\n else if (isMap(target))\n for (const pair of target.items) {\n if (scalar(pair.key) === \"<<\") append(pairs(pair.value, depth + 1, path));\n else append([pair]);\n }\n path.delete(target);\n return result;\n };\n const maskPayload = (node: unknown, depth: number) => {\n const target = resolved(node);\n if (!isMap(target)) {\n replace(node);\n return;\n }\n const entries = pairs(target, depth + 1);\n if (entries.length > remaining) throw new RangeError(\"resource payload complexity limit\");\n if (isAlias(node)) {\n const keys = entries.map((pair) => scalar(pair.key));\n if (keys.some((key) => key === undefined)) replace(node);\n else replace(node, `{${keys.map((key) => `${JSON.stringify(key)}: \"[REDACTED]\"`).join(\", \")}}`, false);\n }\n for (const pair of entries) {\n remaining--;\n replace(pair.value);\n }\n };\n const visit = (input: unknown, depth: number, resourceHint = false) => {\n if (--remaining < 0 || depth > 64) throw new RangeError(\"resource payload complexity limit\");\n const node = resolved(input);\n if (ancestors.has(node)) throw new RangeError(\"cyclic YAML alias\");\n ancestors.add(node);\n if (isMap(node)) {\n const entries = pairs(node, depth);\n const resource =\n resourceHint ||\n entries.some(\n (pair) => scalar(pair.key) === \"kind\" && [\"Secret\", \"ConfigMap\"].includes(scalar(pair.value) ?? \"\"),\n );\n const typedList = entries.some(\n (pair) =>\n scalar(pair.key) === \"kind\" && [\"SecretList\", \"ConfigMapList\"].includes(scalar(pair.value) ?? \"\"),\n );\n recognized ||= resource || typedList;\n for (const pair of entries) {\n const key = scalar(pair.key);\n if (resource && payloadFields.has(key ?? \"\")) maskPayload(pair.value, depth);\n else if (key === annotation) {\n const value = scalar(pair.value);\n try {\n if (value === undefined) throw new Error(\"invalid resource annotation\");\n const safe = redactKubernetesJsonText(value);\n if (safe !== value) replace(pair.value, JSON.stringify(safe));\n } catch {\n replace(pair.value);\n }\n } else visit(pair.value, depth + 1, typedList && key === \"items\");\n }\n } else if (isSeq(node)) for (const child of node.items) visit(child, depth + 1, resourceHint);\n else if (\n isScalar(node) &&\n typeof node.value === \"string\" &&\n (node !== doc.contents || node.value.trim() !== source.trim())\n ) {\n try {\n const safe = redactKubernetesJsonText(node.value, encodedDepth + 1);\n if (safe !== node.value) replace(node, JSON.stringify(safe));\n } catch {\n const safe = redactKubernetesYamlText(node.value, encodedDepth + 1);\n if (safe !== node.value) replace(node, JSON.stringify(safe));\n }\n }\n ancestors.delete(node);\n };\n visit(doc.contents, 0);\n if (doc.errors.length && (recognized || recognizable(source))) throw new Error(\"malformed resource document\");\n } catch (error) {\n if (doc.range && (error instanceof RangeError || recognized || recognizable(source)))\n edits.push({ start: doc.range[0], end: doc.range[2], text: '\"[REDACTED]\"\\n' });\n }\n }\n } catch {\n return recognizable(text) ? JSON.stringify(REDACTED) : text;\n }\n let result = \"\";\n let position = 0;\n for (const edit of edits.sort((a, b) => a.start - b.start || b.end - a.end)) {\n if (edit.start < position) continue;\n result += text.slice(position, edit.start) + edit.text;\n position = edit.end;\n }\n return result + text.slice(position);\n}\n"],"mappings":";;;;AAEA,IAAM,WAAW;AACjB,IAAM,aAAa;AACnB,IAAM,gCAAgB,IAAI,IAAI;CAAC;CAAQ;CAAc;AAAY,CAAC;AAElE,SAAgB,4BAA4B,OAAyB;CACnE,OACE,CAAC,CAAC,SACF,OAAO,UAAU,YACjB,CAAC,UAAU,WAAW,CAAC,CAAC,SAAU,MAAkC,IAAc;AAEtF;AAqEA,SAAgB,yBAAyB,MAAc,eAAe,GAAW;CAC/E,IAAI,eAAe,GAAG,OAAO,KAAK,UAAU,QAAQ;CACpD,KAAK,MAAM,IAAI;CACf,MAAM,SAAS,KAAK,MAAM,gFAAgF,KAAK,CAAC;CAChH,IAAI,WAAW;CAEf,IAAI,iBAAiB;CACrB,MAAM,SAAS,QAAQ,MAAY;EACjC,IAAI,EAAE,iBAAiB,KAAK,QAAQ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AO,QAAQ,MAAM,KAAK,UAAU,IAAI,CAAC;KAC7D;KAEF,UAAU,OAAO,IAAI;IACvB;IACA,MAAM,IAAI,UAAU,CAAC;IACrB,IAAI,IAAI,OAAO,WAAW,cAAc,aAAa,MAAM,IAAI,MAAM,IAAI,MAAM,6BAA6B;GAC9G,SAAS,OAAO;IACd,IAAI,IAAI,UAAU,iBAAiB,cAAc,cAAc,aAAa,MAAM,IAChF,MAAM,KAAK;KAAE,OAAO,IAAI,MAAM;KAAI,KAAK,IAAI,MAAM;KAAI,MAAM;IAAiB,CAAC;GACjF;EACF;CACF,QAAQ;EACN,OAAO,aAAa,IAAI,IAAI,KAAK,UAAU,QAAQ,IAAI;CACzD;CACA,IAAI,SAAS;CACb,IAAI,WAAW;CACf,KAAK,MAAM,QAAQ,MAAM,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,GAAG;EAC3E,IAAI,KAAK,QAAQ,UAAU;EAC3B,UAAU,KAAK,MAAM,UAAU,KAAK,KAAK,IAAI,KAAK;EAClD,WAAW,KAAK;CAClB;CACA,OAAO,SAAS,KAAK,MAAM,QAAQ;AACrC"}
|
|
@@ -1,25 +1,46 @@
|
|
|
1
|
+
const require_ai_resource_payload = require("./ai-resource-payload.js");
|
|
1
2
|
var AI_TERMINAL_MAX_BYTES = 32 * 1024;
|
|
2
3
|
var MAX_SOURCE_CHARACTERS = 1e6;
|
|
3
4
|
function redactAiTerminalText(text) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
const clean = text.replace(/\u001b\][^\u0007]*(?:\u0007|\u001b\\)/g, "").replace(/\u001b\[[0-?]*[ -/]*[@-~]/g, "").replace(/[\u0000-\u0008\u000b-\u001f\u007f-\u009f]/g, "");
|
|
6
|
+
try {
|
|
7
|
+
return require_ai_resource_payload.redactKubernetesJsonText(clean);
|
|
8
|
+
} catch {}
|
|
9
|
+
let allJsonLines = true;
|
|
10
|
+
const independent = clean.split("\n").map((line) => {
|
|
11
|
+
if (!line.trim()) return line;
|
|
12
|
+
try {
|
|
13
|
+
return require_ai_resource_payload.redactKubernetesJsonText(line);
|
|
14
|
+
} catch {
|
|
15
|
+
allJsonLines = false;
|
|
16
|
+
return line;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
});
|
|
19
|
+
if (allJsonLines) return independent.join("\n");
|
|
20
|
+
const yamlSafe = require_ai_resource_payload.redactKubernetesYamlText(clean);
|
|
21
|
+
if (yamlSafe !== clean) return yamlSafe;
|
|
22
|
+
let marker;
|
|
23
|
+
const getMarker = () => {
|
|
24
|
+
if (marker !== void 0) return marker;
|
|
25
|
+
const used = new Set(Array.from(clean.matchAll(/# __ai_json_line_(\d+)_/g), (match) => match[1]));
|
|
26
|
+
let index = 0;
|
|
27
|
+
while (used.has(String(index))) index++;
|
|
28
|
+
marker = `# __ai_json_line_${index}_`;
|
|
29
|
+
return marker;
|
|
30
|
+
};
|
|
31
|
+
const jsonLines = [];
|
|
32
|
+
const yaml = clean.split("\n").map((line) => {
|
|
33
|
+
if (!/^[\[{]/.test(line)) return line;
|
|
34
|
+
try {
|
|
35
|
+
const safe = require_ai_resource_payload.redactKubernetesJsonText(line);
|
|
36
|
+
const index = jsonLines.push(safe) - 1;
|
|
37
|
+
return getMarker() + index;
|
|
38
|
+
} catch {
|
|
39
|
+
return line;
|
|
40
|
+
}
|
|
41
|
+
}).join("\n");
|
|
42
|
+
if (jsonLines.length) return require_ai_resource_payload.redactKubernetesYamlText(yaml).split("\n").map((line) => marker !== void 0 && line.startsWith(marker) ? jsonLines[Number(line.slice(marker.length))] ?? line : line).join("\n");
|
|
43
|
+
return require_ai_resource_payload.redactKubernetesYamlText(clean);
|
|
23
44
|
}
|
|
24
45
|
function sanitizeAiTerminalSnapshot(value) {
|
|
25
46
|
if (!value || typeof value !== "object") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-terminal-context.js","names":[],"sources":["../../../../src/common/ai-terminal-context.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"ai-terminal-context.js","names":[],"sources":["../../../../src/common/ai-terminal-context.ts"],"sourcesContent":["import { redactKubernetesJsonText, redactKubernetesYamlText } from \"./ai-resource-payload\";\n\nexport const AI_TERMINAL_MAX_ROWS = 300;\nexport const AI_TERMINAL_MAX_BYTES = 32 * 1024;\nconst MAX_SOURCE_CHARACTERS = 1_000_000;\n\nexport interface AiTerminalSnapshot {\n text: string;\n capturedAt: string;\n truncated: boolean;\n}\n\nexport function redactAiTerminalText(text: string): string {\n const clean = text\n .replace(/\\u001b\\][^\\u0007]*(?:\\u0007|\\u001b\\\\)/g, \"\")\n .replace(/\\u001b\\[[0-?]*[ -/]*[@-~]/g, \"\")\n .replace(/[\\u0000-\\u0008\\u000b-\\u001f\\u007f-\\u009f]/g, \"\");\n try {\n return redactKubernetesJsonText(clean);\n } catch {\n /* terminal prose may contain YAML documents */\n }\n let allJsonLines = true;\n const independent = clean.split(\"\\n\").map((line) => {\n if (!line.trim()) return line;\n try {\n return redactKubernetesJsonText(line);\n } catch {\n allJsonLines = false;\n return line;\n }\n });\n if (allJsonLines) return independent.join(\"\\n\");\n const yamlSafe = redactKubernetesYamlText(clean);\n if (yamlSafe !== clean) return yamlSafe;\n let marker: string | undefined;\n const getMarker = () => {\n if (marker !== undefined) return marker;\n const used = new Set(Array.from(clean.matchAll(/# __ai_json_line_(\\d+)_/g), (match) => match[1]));\n let index = 0;\n while (used.has(String(index))) index++;\n marker = `# __ai_json_line_${index}_`;\n return marker;\n };\n const jsonLines: string[] = [];\n const yaml = clean\n .split(\"\\n\")\n .map((line) => {\n if (!/^[\\[{]/.test(line)) return line;\n try {\n const safe = redactKubernetesJsonText(line);\n const index = jsonLines.push(safe) - 1;\n return getMarker() + index;\n } catch {\n return line;\n }\n })\n .join(\"\\n\");\n if (jsonLines.length)\n return redactKubernetesYamlText(yaml)\n .split(\"\\n\")\n .map((line) =>\n marker !== undefined && line.startsWith(marker) ? (jsonLines[Number(line.slice(marker.length))] ?? line) : line,\n )\n .join(\"\\n\");\n return redactKubernetesYamlText(clean);\n}\n\nexport function sanitizeAiTerminalSnapshot(value: unknown): AiTerminalSnapshot | undefined {\n if (!value || typeof value !== \"object\") return;\n const input = value as Record<string, unknown>;\n if (\n typeof input.text !== \"string\" ||\n input.text.length > MAX_SOURCE_CHARACTERS ||\n typeof input.capturedAt !== \"string\" ||\n input.capturedAt.length > 40 ||\n !Number.isFinite(Date.parse(input.capturedAt))\n )\n return;\n // redact resource payloads before selecting the terminal tail\n const safe = redactAiTerminalText(input.text.replace(/\\r\\n?/g, \"\\n\"));\n const lines = safe.split(\"\\n\");\n while (lines.length && !lines[lines.length - 1].trim()) lines.pop();\n const tail: string[] = [];\n let bytes = 0;\n for (let index = lines.length - 1; index >= 0 && tail.length < AI_TERMINAL_MAX_ROWS; index--) {\n const line = lines[index];\n const size = new TextEncoder().encode(line).length + (tail.length ? 1 : 0);\n if (bytes + size > AI_TERMINAL_MAX_BYTES) break;\n bytes += size;\n tail.unshift(line);\n }\n if (!tail.length || !tail.some((line) => line.trim())) return;\n return {\n text: tail.join(\"\\n\"),\n capturedAt: new Date(input.capturedAt).toISOString(),\n truncated: input.truncated === true || tail.length < lines.length,\n };\n}\n"],"mappings":";AAGA,IAAa,wBAAwB,KAAK;AAC1C,IAAM,wBAAwB;AAQ9B,SAAgB,qBAAqB,MAAsB;CACzD,MAAM,QAAQ,KACX,QAAQ,0CAA0C,EAAE,CAAC,CACrD,QAAQ,8BAA8B,EAAE,CAAC,CACzC,QAAQ,8CAA8C,EAAE;CAC3D,IAAI;EACF,OAAO,4BAAA,yBAAyB,KAAK;CACvC,QAAQ,CAER;CACA,IA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U,UAAU;CACzC,MAAM,QAAQ;CACd,IACE,OAAO,MAAM,SAAS,YACtB,MAAM,KAAK,SAAS,yBACpB,OAAO,MAAM,eAAe,YAC5B,MAAM,WAAW,SAAS,MAC1B,CAAC,OAAO,SAAS,KAAK,MAAM,MAAM,UAAU,CAAC,GAE7C;CAGF,MAAM,QADO,qBAAqB,MAAM,KAAK,QAAQ,UAAU,IAAI,CACrD,CAAA,CAAK,MAAM,IAAI;CAC7B,OAAO,MAAM,UAAU,CAAC,MAAM,MAAM,SAAS,EAAE,CAAC,KAAK,GAAG,MAAM,IAAI;CAClE,MAAM,OAAiB,CAAC;CACxB,IAAI,QAAQ;CACZ,KAAK,IAAI,QAAQ,MAAM,SAAS,GAAG,SAAS,KAAK,KAAK,SAAA,KAA+B,SAAS;EAC5F,MAAM,OAAO,MAAM;EACnB,MAAM,OAAO,IAAI,YAAY,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,UAAU,KAAK,SAAS,IAAI;EACxE,IAAI,QAAQ,OAAA,OAA8B;EAC1C,SAAS;EACT,KAAK,QAAQ,IAAI;CACnB;CACA,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,MAAM,SAAS,KAAK,KAAK,CAAC,GAAG;CACvD,OAAO;EACL,MAAM,KAAK,KAAK,IAAI;EACpB,YAAY,IAAI,KAAK,MAAM,UAAU,CAAC,CAAC,YAAY;EACnD,WAAW,MAAM,cAAc,QAAQ,KAAK,SAAS,MAAM;CAC7D;AACF"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
//#region src/common/ai.ts
|
|
2
2
|
var AI_CHAT_CHANNEL = "freelens-power:ai-chat";
|
|
3
3
|
var AI_READ_ACTIVITY_CHANNEL = "freelens-power:ai-read-activity";
|
|
4
|
+
var AI_PROGRESS_CHANNEL = "freelens-power:ai-progress";
|
|
5
|
+
var AI_API_KEY_STATUS_CHANNEL = "freelens-power:ai-api-key-status";
|
|
6
|
+
var AI_API_KEY_SET_CHANNEL = "freelens-power:ai-api-key-set";
|
|
4
7
|
//#endregion
|
|
8
|
+
exports.AI_API_KEY_SET_CHANNEL = AI_API_KEY_SET_CHANNEL;
|
|
9
|
+
exports.AI_API_KEY_STATUS_CHANNEL = AI_API_KEY_STATUS_CHANNEL;
|
|
5
10
|
exports.AI_CHAT_CHANNEL = AI_CHAT_CHANNEL;
|
|
11
|
+
exports.AI_PROGRESS_CHANNEL = AI_PROGRESS_CHANNEL;
|
|
6
12
|
exports.AI_READ_ACTIVITY_CHANNEL = AI_READ_ACTIVITY_CHANNEL;
|
|
7
13
|
|
|
8
14
|
//# sourceMappingURL=ai.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","names":[],"sources":["../../../../src/common/ai.ts"],"sourcesContent":["import type { AiResourceReference } from \"./ai-extras\";\n\nexport type AiProvider = \"codex\" | \"claude\";\n\nexport interface AiReadActivity {\n method: \"pods\" | \"nodes\" | \"resources\" | \"logs\";\n status: \"ok\" | \"unavailable\";\n}\n\nexport interface AiChatMessage {\n role: \"user\" | \"assistant\";\n text: string;\n}\n\nexport interface AiChatRequest {\n provider?: AiProvider;\n terminalSnapshot?: import(\"./ai-terminal-context\").AiTerminalSnapshot;\n requestId?: string;\n messages: AiChatMessage[];\n context: {\n clusterId?: string;\n screen?: string;\n resource?: { kind?: string; namespace?: string; name?: string };\n };\n systemPrompt?: string;\n reasoningEffort?: string;\n model: string;\n speed: \"default\" | \"fast\";\n}\n\nexport interface AiChatResponse {\n references?: AiResourceReference[];\n provider?: AiProvider;\n text: string;\n reads?: AiReadActivity[];\n}\n\nexport const AI_CHAT_CHANNEL = \"freelens-power:ai-chat\";\n\nexport type AiFailureCode =\n | \"CLI_FAILURE\"\n | \"INVALID_REPLY\"\n | \"READ_LIMIT\"\n | \"TIMEOUT\"\n | \"CANCELLED\"\n | \"INPUT_LIMIT\"\n | \"UNAVAILABLE\"\n | \"UNSAFE_POLICY\";\n\nexport interface AiReadActivityEvent {\n requestId: string;\n method: AiReadActivity[\"method\"];\n status: \"reading\" | \"ok\" | \"unavailable\";\n}\n\nexport const AI_READ_ACTIVITY_CHANNEL = \"freelens-power:ai-read-activity\";\n\nexport function validAiRequestId(value: unknown): value is string {\n return typeof value === \"string\" && /^[a-zA-Z0-9_-]{1,100}$/.test(value);\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"ai.js","names":[],"sources":["../../../../src/common/ai.ts"],"sourcesContent":["import type { AiResourceReference } from \"./ai-extras\";\n\nexport type AiProvider = \"codex\" | \"codex-api\" | \"claude\" | \"pi\";\nexport type AiApiServiceTier = \"default\" | \"fast\" | \"ultrafast\";\n\nexport interface AiReadActivity {\n method: \"pods\" | \"nodes\" | \"resources\" | \"logs\" | \"dashboard\";\n status: \"ok\" | \"unavailable\";\n}\n\nexport interface AiChatMessage {\n role: \"user\" | \"assistant\";\n text: string;\n}\n\nexport interface AiChatRequest {\n provider?: AiProvider;\n apiWebSocket?: boolean;\n apiServiceTier?: AiApiServiceTier;\n terminalSnapshot?: import(\"./ai-terminal-context\").AiTerminalSnapshot;\n requestId?: string;\n messages: AiChatMessage[];\n context: {\n clusterId?: string;\n screen?: string;\n resource?: { kind?: string; namespace?: string; name?: string };\n };\n systemPrompt?: string;\n reasoningEffort?: string;\n model: string;\n speed: \"default\" | \"fast\";\n}\n\nexport interface AiChatResponse {\n references?: AiResourceReference[];\n provider?: AiProvider;\n text: string;\n reads?: AiReadActivity[];\n}\n\nexport const AI_CHAT_CHANNEL = \"freelens-power:ai-chat\";\n\nexport type AiFailureCode =\n | \"API_AUTHENTICATION\"\n | \"API_RATE_LIMIT\"\n | \"API_FAILURE\"\n | \"API_MODEL_UNAVAILABLE\"\n | \"API_OPTION_UNSUPPORTED\"\n | \"API_REASONING_MODE_UNSUPPORTED\"\n | \"API_REASONING_EFFORT_UNSUPPORTED\"\n | \"API_VERBOSITY_UNSUPPORTED\"\n | \"API_TOOLS_UNSUPPORTED\"\n | \"API_SERVICE_TIER\"\n | \"API_QUOTA\"\n | \"API_NETWORK\"\n | \"API_STREAM_INTERRUPTED\"\n | \"API_TLS\"\n | \"API_PERMISSION\"\n | \"API_REGION_UNSUPPORTED\"\n | \"API_REQUEST_REJECTED\"\n | \"API_SERVER_UNAVAILABLE\"\n | \"API_SESSION_EXPIRED\"\n | \"CLI_FAILURE\"\n | \"INVALID_REPLY\"\n | \"READ_LIMIT\"\n | \"TIMEOUT\"\n | \"CANCELLED\"\n | \"INPUT_LIMIT\"\n | \"UNAVAILABLE\"\n | \"UNSAFE_POLICY\";\n\nexport interface AiReadActivityEvent {\n requestId: string;\n method: AiReadActivity[\"method\"];\n status: \"reading\" | \"ok\" | \"unavailable\";\n}\n\nexport const AI_READ_ACTIVITY_CHANNEL = \"freelens-power:ai-read-activity\";\n\nexport interface AiProgressEvent {\n requestId: string;\n phase: \"model\" | \"reading\" | \"answer\";\n elapsedMs: number;\n round: number;\n text?: string;\n}\n\nexport const AI_PROGRESS_CHANNEL = \"freelens-power:ai-progress\";\n\nexport function validAiRequestId(value: unknown): value is string {\n return typeof value === \"string\" && /^[a-zA-Z0-9_-]{1,100}$/.test(value);\n}\n\nexport interface AiApiKeyStatus {\n configured: boolean;\n available: boolean;\n}\n\nexport const AI_API_KEY_STATUS_CHANNEL = \"freelens-power:ai-api-key-status\";\nexport const AI_API_KEY_SET_CHANNEL = \"freelens-power:ai-api-key-set\";\n"],"mappings":";AAwCA,IAAa,kBAAkB;AAqC/B,IAAa,2BAA2B;AAUxC,IAAa,sBAAsB;AAWnC,IAAa,4BAA4B;AACzC,IAAa,yBAAyB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const require_ai_terminal_context = require("./ai-terminal-context.js");
|
|
2
|
+
//#region src/common/dashboard-ai.ts
|
|
3
|
+
function dashboardAiUrl(value) {
|
|
4
|
+
const url = new URL(value);
|
|
5
|
+
url.username = "";
|
|
6
|
+
url.password = "";
|
|
7
|
+
for (const key of [...url.searchParams.keys()]) if (/token|password|secret|credential|authorization|api.?key|signature|^auth$|^sig$/i.test(key)) url.searchParams.set(key, "[REDACTED]");
|
|
8
|
+
if (/token|password|secret|credential|authorization|api.?key|signature|(?:^|[&#])auth=/i.test(url.hash)) url.hash = "[REDACTED]";
|
|
9
|
+
return require_ai_terminal_context.redactAiTerminalText(url.href).slice(0, 4096);
|
|
10
|
+
}
|
|
11
|
+
function dashboardAiWidgets(cards) {
|
|
12
|
+
return cards.slice(0, 100).map(({ title, url }, index) => ({
|
|
13
|
+
id: `widget-${index + 1}`,
|
|
14
|
+
title: require_ai_terminal_context.redactAiTerminalText(title).slice(0, 512),
|
|
15
|
+
url: dashboardAiUrl(url)
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.dashboardAiUrl = dashboardAiUrl;
|
|
20
|
+
exports.dashboardAiWidgets = dashboardAiWidgets;
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=dashboard-ai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-ai.js","names":[],"sources":["../../../../src/common/dashboard-ai.ts"],"sourcesContent":["import { redactAiTerminalText } from \"./ai-terminal-context\";\n\nimport type { DashboardCard } from \"./dashboard\";\n\nexport interface DashboardAiWidget {\n id: string;\n title: string;\n url: string;\n}\n\nexport interface DashboardAiAccess {\n widgets: DashboardAiWidget[];\n read: (id: string, signal?: AbortSignal) => Promise<unknown>;\n}\n\nexport function dashboardAiUrl(value: string): string {\n const url = new URL(value);\n url.username = \"\";\n url.password = \"\";\n for (const key of [...url.searchParams.keys()]) {\n if (/token|password|secret|credential|authorization|api.?key|signature|^auth$|^sig$/i.test(key))\n url.searchParams.set(key, \"[REDACTED]\");\n }\n if (/token|password|secret|credential|authorization|api.?key|signature|(?:^|[&#])auth=/i.test(url.hash))\n url.hash = \"[REDACTED]\";\n return redactAiTerminalText(url.href).slice(0, 4096);\n}\n\nexport function dashboardAiWidgets(cards: DashboardCard[]): DashboardAiWidget[] {\n return cards.slice(0, 100).map(({ title, url }, index) => ({\n id: `widget-${index + 1}`,\n title: redactAiTerminalText(title).slice(0, 512),\n url: dashboardAiUrl(url),\n }));\n}\n\n// this function runs inside the isolated website document and only reads rendered text\nexport function readDashboardDocument(selector?: string): { text: string; truncated: boolean } {\n const root = selector ? document.querySelector(selector) : document.body;\n if (!root) throw new Error(\"Configured widget selector is unavailable\");\n const chunks: string[] = [];\n let length = 0;\n let visited = 0;\n let truncated = false;\n const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT);\n while (walker.nextNode()) {\n if (++visited > 20000 || length >= 24000) {\n truncated = true;\n break;\n }\n const node = walker.currentNode;\n const element = node.parentElement;\n if (\n !element ||\n element.closest(\n 'script,style,noscript,input,textarea,select,option,[contenteditable],[role=\"textbox\"],[hidden],[aria-hidden=\"true\"],freelens-power-loading',\n )\n )\n continue;\n let visible = true;\n for (let ancestor: Element | null = element; ancestor; ancestor = ancestor.parentElement) {\n const style = getComputedStyle(ancestor);\n if (\n style.display === \"none\" ||\n style.visibility === \"hidden\" ||\n style.visibility === \"collapse\" ||\n style.opacity === \"0\"\n ) {\n visible = false;\n break;\n }\n }\n if (!visible || !element.getClientRects().length) continue;\n const text = node.textContent?.replace(/\\s+/g, \" \").trim();\n if (!text) continue;\n const bounded = text.slice(0, 24000 - length);\n chunks.push(bounded);\n length += bounded.length + 1;\n if (bounded.length < text.length) truncated = true;\n }\n return { text: chunks.join(\"\\n\").slice(0, 24000), truncated };\n}\n\nexport function dashboardDocumentReadScript(selector?: string): string {\n return `(${readDashboardDocument.toString()})(${JSON.stringify(selector ?? null)})`;\n}\n"],"mappings":";;AAeA,SAAgB,eAAe,OAAuB;CACpD,MAAM,MAAM,IAAI,IAAI,KAAK;CACzB,IAAI,WAAW;CACf,IAAI,WAAW;CACf,KAAK,MAAM,OAAO,CAAC,GAAG,IAAI,aAAa,KAAK,CAAC,GAC3C,IAAI,kFAAkF,KAAK,GAAG,GAC5F,IAAI,aAAa,IAAI,KAAK,YAAY;CAE1C,IAAI,qFAAqF,KAAK,IAAI,IAAI,GACpG,IAAI,OAAO;CACb,OAAO,4BAAA,qBAAqB,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,IAAI;AACrD;AAEA,SAAgB,mBAAmB,OAA6C;CAC9E,OAAO,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE,OAAO,OAAO,WAAW;EACzD,IAAI,UAAU,QAAQ;EACtB,OAAO,4BAAA,qBAAqB,KAAK,CAAC,CAAC,MAAM,GAAG,GAAG;EAC/C,KAAK,eAAe,GAAG;CACzB,EAAE;AACJ"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/common/extension-updates.ts
|
|
2
|
+
var EXTENSION_UPDATES_CHANNEL = "freelens-power:extension-updates";
|
|
3
|
+
var semver = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
|
|
4
|
+
function isValidVersion(value, stable = false) {
|
|
5
|
+
if (typeof value !== "string" || value.length > 256) return false;
|
|
6
|
+
const match = semver.exec(value);
|
|
7
|
+
return !!match && (!stable || !match[4]);
|
|
8
|
+
}
|
|
9
|
+
function isNewerVersion(candidate, current) {
|
|
10
|
+
if (!isValidVersion(candidate) || !isValidVersion(current)) return false;
|
|
11
|
+
const left = semver.exec(candidate);
|
|
12
|
+
const right = semver.exec(current);
|
|
13
|
+
for (let index = 1; index <= 3; index++) if (BigInt(left[index]) !== BigInt(right[index])) return BigInt(left[index]) > BigInt(right[index]);
|
|
14
|
+
if (!left[4] || !right[4]) return !!right[4] && !left[4];
|
|
15
|
+
const a = left[4].split(".");
|
|
16
|
+
const b = right[4].split(".");
|
|
17
|
+
for (let index = 0; index < Math.max(a.length, b.length); index++) {
|
|
18
|
+
if (a[index] === b[index]) continue;
|
|
19
|
+
if (a[index] === void 0 || b[index] === void 0) return a[index] !== void 0;
|
|
20
|
+
const numericA = /^\d+$/.test(a[index]);
|
|
21
|
+
const numericB = /^\d+$/.test(b[index]);
|
|
22
|
+
if (numericA && numericB) return BigInt(a[index]) > BigInt(b[index]);
|
|
23
|
+
if (numericA !== numericB) return !numericA;
|
|
24
|
+
return a[index] > b[index];
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.EXTENSION_UPDATES_CHANNEL = EXTENSION_UPDATES_CHANNEL;
|
|
30
|
+
exports.isNewerVersion = isNewerVersion;
|
|
31
|
+
exports.isValidVersion = isValidVersion;
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=extension-updates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-updates.js","names":[],"sources":["../../../../src/common/extension-updates.ts"],"sourcesContent":["export const EXTENSION_UPDATES_CHANNEL = \"freelens-power:extension-updates\";\n\nexport type ExtensionUpdatesRequest = { operation: \"check\" | \"status\" } | { operation: \"restart\"; version: string };\n\nexport interface ExtensionUpdatesStatus {\n runtimeVersion: string;\n installedVersion: string;\n latestVersion?: string;\n}\n\nconst semver =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*)?$/;\n\nexport function isValidVersion(value: unknown, stable = false): value is string {\n if (typeof value !== \"string\" || value.length > 256) return false;\n const match = semver.exec(value);\n return !!match && (!stable || !match[4]);\n}\n\nexport function isNewerVersion(candidate: string, current: string): boolean {\n if (!isValidVersion(candidate) || !isValidVersion(current)) return false;\n const left = semver.exec(candidate)!;\n const right = semver.exec(current)!;\n for (let index = 1; index <= 3; index++) {\n if (BigInt(left[index]) !== BigInt(right[index])) return BigInt(left[index]) > BigInt(right[index]);\n }\n if (!left[4] || !right[4]) return !!right[4] && !left[4];\n const a = left[4].split(\".\");\n const b = right[4].split(\".\");\n for (let index = 0; index < Math.max(a.length, b.length); index++) {\n if (a[index] === b[index]) continue;\n if (a[index] === undefined || b[index] === undefined) return a[index] !== undefined;\n const numericA = /^\\d+$/.test(a[index]);\n const numericB = /^\\d+$/.test(b[index]);\n if (numericA && numericB) return BigInt(a[index]) > BigInt(b[index]);\n if (numericA !== numericB) return !numericA;\n return a[index] > b[index];\n }\n return false;\n}\n"],"mappings":";AAAA,IAAa,4BAA4B;AAUzC,IAAM,SACJ;AAEF,SAAgB,eAAe,OAAgB,SAAS,OAAwB;CAC9E,IAAI,OAAO,UAAU,YAAY,MAAM,SAAS,KAAK,OAAO;CAC5D,MAAM,QAAQ,OAAO,KAAK,KAAK;CAC/B,OAAO,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM;AACvC;AAEA,SAAgB,eAAe,WAAmB,SAA0B;CAC1E,IAAI,CAAC,eAAe,SAAS,KAAK,CAAC,eAAe,OAAO,GAAG,OAAO;CACnE,MAAM,OAAO,OAAO,KAAK,SAAS;CAClC,MAAM,QAAQ,OAAO,KAAK,OAAO;CACjC,KAAK,IAAI,QAAQ,GAAG,SAAS,GAAG,SAC9B,IAAI,OAAO,KAAK,MAAM,MAAM,OAAO,MAAM,MAAM,GAAG,OAAO,OAAO,KAAK,MAAM,IAAI,OAAO,MAAM,MAAM;CAEpG,IAAI,CAAC,KAAK,MAAM,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,MAAM,MAAM,CAAC,KAAK;CACtD,MAAM,IAAI,KAAK,EAAE,CAAC,MAAM,GAAG;CAC3B,MAAM,IAAI,MAAM,EAAE,CAAC,MAAM,GAAG;CAC5B,KAAK,IAAI,QAAQ,GAAG,QAAQ,KAAK,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS;EACjE,IAAI,EAAE,WAAW,EAAE,QAAQ;EAC3B,IAAI,EAAE,WAAW,KAAA,KAAa,EAAE,WAAW,KAAA,GAAW,OAAO,EAAE,WAAW,KAAA;EAC1E,MAAM,WAAW,QAAQ,KAAK,EAAE,MAAM;EACtC,MAAM,WAAW,QAAQ,KAAK,EAAE,MAAM;EACtC,IAAI,YAAY,UAAU,OAAO,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM;EACnE,IAAI,aAAa,UAAU,OAAO,CAAC;EACnC,OAAO,EAAE,SAAS,EAAE;CACtB;CACA,OAAO;AACT"}
|
|
@@ -40,10 +40,11 @@ function attachment(route, gateway, listener, inventory) {
|
|
|
40
40
|
return false;
|
|
41
41
|
}) ? "allowedRoutes namespace selector matches" : "allowedRoutes namespace selector rejects";
|
|
42
42
|
}
|
|
43
|
-
function gatewayRelationships(service, inventory) {
|
|
43
|
+
function gatewayRelationships(service, inventory, showAll = false) {
|
|
44
44
|
const nodes = [];
|
|
45
45
|
const edges = [];
|
|
46
46
|
let omitted = 0;
|
|
47
|
+
const limit = showAll ? Infinity : 5;
|
|
47
48
|
const add = (object, suffix = "", detail = "", evidence) => {
|
|
48
49
|
const id = `gateway-api/${object.kind}/${object.metadata.namespace ?? ""}/${object.metadata.name}${suffix}`;
|
|
49
50
|
if (!nodes.some((node) => node.id === id)) nodes.push({
|
|
@@ -65,7 +66,7 @@ function gatewayRelationships(service, inventory) {
|
|
|
65
66
|
"TLSRoute",
|
|
66
67
|
"UDPRoute"
|
|
67
68
|
].includes(object.kind) && object.spec?.rules?.some((rule) => rule.backendRefs?.some((backend) => (backend.group ?? "") === "" && (backend.kind ?? "Service") === "Service" && backend.name === service.metadata.name && (backend.namespace ?? object.metadata.namespace) === service.metadata.namespace)));
|
|
68
|
-
for (const route of routes.slice(0,
|
|
69
|
+
for (const route of routes.slice(0, limit)) {
|
|
69
70
|
const backends = route.spec?.rules?.flatMap((rule) => rule.backendRefs ?? []).filter((backend) => (backend.group ?? "") === "" && (backend.kind ?? "Service") === "Service" && backend.name === service.metadata.name && (backend.namespace ?? route.metadata.namespace) === service.metadata.namespace) ?? [];
|
|
70
71
|
const summaries = route.spec?.rules?.flatMap((rule) => rule.matches?.map((match) => match.path?.value ?? [match.method?.service, match.method?.method].filter(Boolean).join("/")) ?? []) ?? [];
|
|
71
72
|
const routeId = add(route, "", [
|
|
@@ -79,14 +80,14 @@ function gatewayRelationships(service, inventory) {
|
|
|
79
80
|
label: "backend reference (not reachability)"
|
|
80
81
|
});
|
|
81
82
|
const parents = (route.spec?.parentRefs ?? []).filter((parent) => (parent.group ?? GROUP) === GROUP && (parent.kind ?? "Gateway") === "Gateway");
|
|
82
|
-
omitted += Math.max(0, parents.length -
|
|
83
|
-
for (const parent of parents.slice(0,
|
|
83
|
+
omitted += Math.max(0, parents.length - limit);
|
|
84
|
+
for (const parent of parents.slice(0, limit)) {
|
|
84
85
|
const gateway = inventory.objects.find((object) => object.kind === "Gateway" && object.metadata.name === parent.name && object.metadata.namespace === (parent.namespace ?? route.metadata.namespace));
|
|
85
86
|
if (!gateway) continue;
|
|
86
87
|
const status = route.status?.parents?.filter((item) => (item.parentRef.group ?? GROUP) === GROUP && (item.parentRef.kind ?? "Gateway") === "Gateway" && item.parentRef.name === parent.name && (item.parentRef.namespace ?? route.metadata.namespace) === (parent.namespace ?? route.metadata.namespace) && item.parentRef.sectionName === parent.sectionName && item.parentRef.port === parent.port);
|
|
87
88
|
const listeners = (gateway.spec?.listeners ?? []).filter((item) => (!parent.sectionName || parent.sectionName === item.name) && (!parent.port || parent.port === item.port));
|
|
88
|
-
omitted += Math.max(0, listeners.length -
|
|
89
|
-
for (const listener of listeners.slice(0,
|
|
89
|
+
omitted += Math.max(0, listeners.length - limit);
|
|
90
|
+
for (const listener of listeners.slice(0, limit)) {
|
|
90
91
|
const listenerStatus = gateway.status?.listeners?.find((item) => item.name === listener.name);
|
|
91
92
|
const id = add(gateway, `/${listener.name}`, `${listener.protocol}:${listener.port}`, [`Listener ${conditions(listenerStatus?.conditions, gateway.metadata.generation, [
|
|
92
93
|
"Accepted",
|
|
@@ -113,7 +114,7 @@ function gatewayRelationships(service, inventory) {
|
|
|
113
114
|
return {
|
|
114
115
|
nodes,
|
|
115
116
|
edges,
|
|
116
|
-
omitted: omitted + Math.max(0, routes.length -
|
|
117
|
+
omitted: omitted + Math.max(0, routes.length - limit)
|
|
117
118
|
};
|
|
118
119
|
}
|
|
119
120
|
//#endregion
|