@psnext/slingcli 2.5.20260723-1 → 2.5.20260725-1
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/bin/sling.js +3 -1
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +66 -28
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +133 -15
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +7 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +28 -14
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.js +8 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.browser.js +9 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +5 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +12 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +10 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +10 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +18 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.js +13 -15
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/ByteJsonShapeSerializer.js +27 -17
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +22 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +41 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +33 -13
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/writeKey.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.d.ts +6 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/index.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +22 -6
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/index.browser.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/index.d.ts +7 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getDateHeader.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +22 -6
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/index.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +0 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/needsReviver.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +7 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/api-extractor-type-index.d.ts +7 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +21 -61
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +27 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +16 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +14 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +5 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/emitWarningIfUnsupportedVersion.d.ts +11 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +47 -107
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +39 -112
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +48 -107
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/longPollMiddleware.d.ts +14 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-host-header/hostHeaderMiddleware.d.ts +35 -25
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-logger/loggerMiddleware.d.ts +4 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/configuration.d.ts +6 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.browser.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.browser.d.ts +6 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.d.ts +10 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.native.d.ts +6 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/check-features.d.ts +20 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/configurations.d.ts +44 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/constants.d.ts +7 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/encode-features.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/user-agent-middleware.d.ts +18 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/awsRegionConfig.d.ts +11 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/extensions.d.ts +16 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.browser.d.ts +4 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.d.ts +14 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.native.d.ts +4 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setCredentialFeature.d.ts +7 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setFeature.d.ts +12 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setTokenFeature.d.ts +7 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/aws.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.d.ts +5 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/parseArn.d.ts +7 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partition.d.ts +38 -28
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partitions.d.ts +638 -647
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/isIpAddress.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/resolveDefaultAwsRegionalEndpointsConfig.d.ts +56 -29
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/resolveEndpoint.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointError.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointRuleObject.d.ts +1 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/ErrorRuleObject.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/RuleSetObject.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/TreeRuleObject.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/shared.d.ts +1 -12
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/configurations.d.ts +7 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.d.ts +14 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +2 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +27 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +18 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/crt-availability.d.ts +8 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +28 -17
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.d.ts +6 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/is-crt-available.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.d.ts +13 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +10 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +44 -37
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.d.ts +6 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +7 -23
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +38 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +133 -56
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.browser.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.d.ts +9 -24
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.d.ts +8 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.d.ts +6 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getDateHeader.d.ts +8 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +8 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +26 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/index.d.ts +4 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/isClockSkewed.d.ts +9 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +74 -40
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +25 -36
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/coercing-serializers.d.ts +18 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +22 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +22 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +22 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +29 -49
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +36 -49
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +19 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +13 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +28 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/awsExpectUnion.d.ts +7 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +29 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +57 -30
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +22 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +27 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +49 -57
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QuerySerializerSettings.d.ts +13 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +16 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +31 -47
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlCodec.d.ts +14 -17
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeDeserializer.d.ts +20 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeSerializer.d.ts +21 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/parseXmlBody.d.ts +13 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/simpleFormatXml.d.ts +6 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +3 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/util-arn-parser/arn.d.ts +32 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/util-format-url/format-url.d.ts +2 -4
- package/node_modules/@aws-sdk/core/package.json +10 -6
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-websocket/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +14 -4
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +14 -4
- package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +17 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +8 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +118 -11
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +132 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit-diff.js +386 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +95 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +46 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/image.js +106 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.js +5 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +26 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +110 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +31 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +90 -35
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +10 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +1 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +26 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +21 -8
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +17 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +100 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +7 -11
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +17 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +7 -11
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +13 -9
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +68 -27
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +131 -34
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +173 -66
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +29 -7
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +8 -3
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +222 -0
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +9 -3
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/model-catalog.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +5 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +30 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/ant-ling.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/groq.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.js +10 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js +10 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +94 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +3 -0
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +7 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +11 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js +3 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js +5 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +34 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/tool-definition-wrapper.js +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js +1 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +16 -46
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/external-editor.js +37 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +29 -47
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js +19 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/version-check.js +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +16 -15
- package/node_modules/@earendil-works/pi-coding-agent/package.json +6 -6
- package/node_modules/@earendil-works/pi-server/package.json +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +15 -12
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +6 -3
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +1 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/constants.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/constants.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/brace-expansion/README.md +12 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts +2 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/commonjs/index.js +138 -86
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.d.ts +2 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +137 -85
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +2 -2
- package/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -1
- package/node_modules/gaxios/package.json +1 -1
- package/node_modules/google-auth-library/build/src/auth/googleauth.js +24 -19
- package/node_modules/google-auth-library/package.json +1 -1
- package/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
- package/node_modules/undici/lib/core/request.js +12 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +11 -2
- package/node_modules/undici/lib/handler/cache-handler.js +246 -64
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +3 -3
- package/node_modules/undici/lib/handler/retry-handler.js +24 -0
- package/node_modules/undici/lib/interceptor/cache.js +159 -52
- package/node_modules/undici/lib/util/cache.js +324 -62
- package/node_modules/undici/lib/util/date.js +23 -6
- package/node_modules/undici/lib/web/cookies/util.js +79 -9
- package/node_modules/undici/package.json +1 -1
- package/package.json +7 -7
- package/sling-default-packages.json +2 -1
- package/slingshot/index.js +337 -339
|
@@ -83,6 +83,7 @@ const OpenAICompletionsCompatSchema = Type.Object({
|
|
|
83
83
|
cacheControlFormat: Type.Optional(Type.Literal("anthropic")),
|
|
84
84
|
openRouterRouting: Type.Optional(OpenRouterRoutingSchema),
|
|
85
85
|
vercelGatewayRouting: Type.Optional(VercelGatewayRoutingSchema),
|
|
86
|
+
supportsOpenAIGrammarTools: Type.Optional(Type.Boolean()),
|
|
86
87
|
supportsStrictMode: Type.Optional(Type.Boolean()),
|
|
87
88
|
sendSessionAffinityHeaders: Type.Optional(Type.Boolean()),
|
|
88
89
|
deferredToolsMode: Type.Optional(Type.Literal("kimi")),
|
|
@@ -93,6 +94,8 @@ const OpenAIResponsesCompatSchema = Type.Object({
|
|
|
93
94
|
supportsDeveloperRole: Type.Optional(Type.Boolean()),
|
|
94
95
|
sessionAffinityFormat: Type.Optional(Type.Union([Type.Literal("openai"), Type.Literal("openai-nosession"), Type.Literal("openrouter")])),
|
|
95
96
|
supportsLongCacheRetention: Type.Optional(Type.Boolean()),
|
|
97
|
+
supportsStrictMode: Type.Optional(Type.Boolean()),
|
|
98
|
+
supportsOpenAIGrammarTools: Type.Optional(Type.Boolean()),
|
|
96
99
|
supportsToolSearch: Type.Optional(Type.Boolean()),
|
|
97
100
|
});
|
|
98
101
|
const AnthropicMessagesCompatSchema = Type.Object({
|
|
@@ -100,7 +103,10 @@ const AnthropicMessagesCompatSchema = Type.Object({
|
|
|
100
103
|
supportsLongCacheRetention: Type.Optional(Type.Boolean()),
|
|
101
104
|
sendSessionAffinityHeaders: Type.Optional(Type.Boolean()),
|
|
102
105
|
supportsCacheControlOnTools: Type.Optional(Type.Boolean()),
|
|
106
|
+
supportsTemperature: Type.Optional(Type.Boolean()),
|
|
103
107
|
forceAdaptiveThinking: Type.Optional(Type.Boolean()),
|
|
108
|
+
allowEmptySignature: Type.Optional(Type.Boolean()),
|
|
109
|
+
supportsStrictTools: Type.Optional(Type.Boolean()),
|
|
104
110
|
supportsToolReferences: Type.Optional(Type.Boolean()),
|
|
105
111
|
});
|
|
106
112
|
const ProviderCompatSchema = Type.Union([
|
|
@@ -9,8 +9,8 @@ export class ModelRegistry {
|
|
|
9
9
|
this.runtime = runtime;
|
|
10
10
|
}
|
|
11
11
|
/** Reload models.json asynchronously. Await before making synchronous registry reads. */
|
|
12
|
-
refresh() {
|
|
13
|
-
|
|
12
|
+
async refresh() {
|
|
13
|
+
await this.runtime.refresh();
|
|
14
14
|
}
|
|
15
15
|
getError() {
|
|
16
16
|
return this.runtime.getError();
|
|
@@ -216,6 +216,13 @@ export async function resolveModelScopeWithDiagnostics(patterns, modelRuntime) {
|
|
|
216
216
|
globPattern = pattern.substring(0, colonIdx);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
+
const exactMatch = findExactModelReferenceMatch(globPattern, availableModels);
|
|
220
|
+
if (exactMatch) {
|
|
221
|
+
if (!scopedModels.find((sm) => modelsAreEqual(sm.model, exactMatch))) {
|
|
222
|
+
scopedModels.push({ model: exactMatch, thinkingLevel });
|
|
223
|
+
}
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
219
226
|
// Match against "provider/modelId" format OR just model ID
|
|
220
227
|
// This allows "*sonnet*" to match without requiring "anthropic/*sonnet*"
|
|
221
228
|
const matchingModels = availableModels.filter((m) => {
|
|
@@ -62,11 +62,12 @@ export class ModelRuntime {
|
|
|
62
62
|
(modelsPath
|
|
63
63
|
? new FileModelsStore(options.modelsStorePath ?? join(dirname(modelsPath), "models-store.json"))
|
|
64
64
|
: new InMemoryCodingAgentModelsStore());
|
|
65
|
+
const builtinModelDataGeneratedAt = builtinProviderCatalog.getBuiltinModelDataGeneratedAt();
|
|
65
66
|
const providers = builtinProviderCatalog
|
|
66
67
|
.builtinProviders()
|
|
67
68
|
.map((provider) => provider.id === "radius"
|
|
68
69
|
? provider
|
|
69
|
-
: withRemoteCatalog(provider, options.catalogBaseUrl,
|
|
70
|
+
: withRemoteCatalog(provider, options.catalogBaseUrl, builtinModelDataGeneratedAt));
|
|
70
71
|
const runtime = new ModelRuntime(credentials, config, modelsPath, modelsStore, providers, process.env.PI_OFFLINE === undefined);
|
|
71
72
|
runtime.configureRadiusProviders();
|
|
72
73
|
runtime.rebuildProviders();
|
|
@@ -359,13 +360,10 @@ export class ModelRuntime {
|
|
|
359
360
|
this.recomposeProvider(providerId);
|
|
360
361
|
await this.refresh({ allowNetwork: this.modelNetworkEnabled });
|
|
361
362
|
}
|
|
362
|
-
async
|
|
363
|
+
async refresh(options = {}) {
|
|
363
364
|
this.config = await ModelConfig.load(this.modelsPath);
|
|
364
365
|
this.configureRadiusProviders();
|
|
365
366
|
this.rebuildProviders();
|
|
366
|
-
await this.refresh({ allowNetwork: this.modelNetworkEnabled });
|
|
367
|
-
}
|
|
368
|
-
async refresh(options = {}) {
|
|
369
367
|
const refreshOptions = {
|
|
370
368
|
...options,
|
|
371
369
|
allowNetwork: options.allowNetwork ?? this.modelNetworkEnabled,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { stat } from "node:fs/promises";
|
|
2
1
|
import { VERSION } from "../config.js";
|
|
3
2
|
import { getPiUserAgent } from "../utils/pi-user-agent.js";
|
|
4
3
|
const DEFAULT_CATALOG_BASE_URL = "https://pi.dev";
|
|
@@ -28,17 +27,16 @@ function parseCatalog(providerId, value) {
|
|
|
28
27
|
.filter((entry) => typeof entry === "object" && entry !== null && "id" in entry)
|
|
29
28
|
.map((model) => ({ ...model, provider: providerId }));
|
|
30
29
|
}
|
|
31
|
-
function remoteModels(entry,
|
|
30
|
+
function remoteModels(entry, localGeneratedAt) {
|
|
32
31
|
if (!entry)
|
|
33
32
|
return [];
|
|
34
|
-
if (
|
|
35
|
-
(entry.lastModified === undefined || entry.lastModified <= localLastModified)) {
|
|
33
|
+
if (localGeneratedAt !== undefined && (entry.lastModified === undefined || entry.lastModified <= localGeneratedAt)) {
|
|
36
34
|
return [];
|
|
37
35
|
}
|
|
38
36
|
return entry.models;
|
|
39
37
|
}
|
|
40
38
|
/** Add a persisted pi.dev catalog overlay to a static built-in provider. */
|
|
41
|
-
export function withRemoteCatalog(provider, catalogBaseUrl = DEFAULT_CATALOG_BASE_URL,
|
|
39
|
+
export function withRemoteCatalog(provider, catalogBaseUrl = DEFAULT_CATALOG_BASE_URL, localGeneratedAt) {
|
|
42
40
|
let dynamicModels = [];
|
|
43
41
|
let inflightRefresh;
|
|
44
42
|
return {
|
|
@@ -47,11 +45,8 @@ export function withRemoteCatalog(provider, catalogBaseUrl = DEFAULT_CATALOG_BAS
|
|
|
47
45
|
refreshModels: (context) => {
|
|
48
46
|
inflightRefresh ??= (async () => {
|
|
49
47
|
try {
|
|
50
|
-
const localLastModified = localCatalogUrl
|
|
51
|
-
? await stat(localCatalogUrl).then((value) => value.mtimeMs, () => undefined)
|
|
52
|
-
: undefined;
|
|
53
48
|
const stored = await context.store.read();
|
|
54
|
-
dynamicModels = remoteModels(stored,
|
|
49
|
+
dynamicModels = remoteModels(stored, localGeneratedAt).filter((model) => model.provider === provider.id);
|
|
55
50
|
if (!context.allowNetwork || context.signal?.aborted)
|
|
56
51
|
return;
|
|
57
52
|
if (!context.force &&
|
|
@@ -88,7 +83,7 @@ export function withRemoteCatalog(provider, catalogBaseUrl = DEFAULT_CATALOG_BAS
|
|
|
88
83
|
checkedAt,
|
|
89
84
|
lastModified: Number.isNaN(lastModified) ? 0 : lastModified,
|
|
90
85
|
};
|
|
91
|
-
dynamicModels = remoteModels(entry,
|
|
86
|
+
dynamicModels = remoteModels(entry, localGeneratedAt);
|
|
92
87
|
await context.store.write(entry);
|
|
93
88
|
}
|
|
94
89
|
finally {
|
|
@@ -84,10 +84,10 @@ Sling documentation (read only when the user asks about sling itself, its SDK, e
|
|
|
84
84
|
- Main documentation: ${readmePath}
|
|
85
85
|
- Additional docs: ${docsPath}
|
|
86
86
|
- Examples: ${examplesPath} (extensions, custom tools, SDK)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
-- When reading sling docs or examples, resolve docs/... under Additional docs and examples/... under Examples, not the current working directory
|
|
88
|
+
-- When asked about: extensions (docs/extensions.md, examples/extensions/), themes (docs/themes.md), skills (docs/skills.md), prompt templates (docs/prompt-templates.md), TUI components (docs/tui.md), keybindings (docs/keybindings.md), SDK integrations (docs/sdk.md), custom providers (docs/custom-provider.md), adding models (docs/models.md), sling packages (docs/packages.md), environment variables (docs/environment-variables.md)
|
|
89
|
+
-- When working on sling topics, read the docs and examples, and follow .md cross-references before implementing
|
|
90
|
+
-- Always read sling .md files completely and follow links to related docs (e.g., tui.md for TUI API details)`;
|
|
91
91
|
if (appendSection) {
|
|
92
92
|
prompt += appendSection;
|
|
93
93
|
}
|
|
@@ -111,8 +111,27 @@ export function createLocalBashOperations(options) {
|
|
|
111
111
|
},
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function resolveSpawnContext(command, cwd, spawnHook) {
|
|
115
|
-
const
|
|
114
|
+
function resolveSpawnContext(command, cwd, spawnHook, exposeSessionEnvironment, ctx) {
|
|
115
|
+
const env = { ...getShellEnv() };
|
|
116
|
+
delete env.PI_SESSION_ID;
|
|
117
|
+
delete env.PI_SESSION_FILE;
|
|
118
|
+
delete env.PI_PROVIDER;
|
|
119
|
+
delete env.PI_MODEL;
|
|
120
|
+
delete env.PI_REASONING_LEVEL;
|
|
121
|
+
if (exposeSessionEnvironment && ctx) {
|
|
122
|
+
const model = ctx.model;
|
|
123
|
+
env.PI_SESSION_ID = ctx.sessionManager.getSessionId();
|
|
124
|
+
const sessionFile = ctx.sessionManager.getSessionFile();
|
|
125
|
+
if (sessionFile)
|
|
126
|
+
env.PI_SESSION_FILE = sessionFile;
|
|
127
|
+
if (model) {
|
|
128
|
+
env.PI_PROVIDER = model.provider;
|
|
129
|
+
env.PI_MODEL = model.id;
|
|
130
|
+
}
|
|
131
|
+
if (ctx.thinkingLevel)
|
|
132
|
+
env.PI_REASONING_LEVEL = ctx.thinkingLevel;
|
|
133
|
+
}
|
|
134
|
+
const baseContext = { command, cwd, env };
|
|
116
135
|
return spawnHook ? spawnHook(baseContext) : baseContext;
|
|
117
136
|
}
|
|
118
137
|
const BASH_PREVIEW_LINES = 5;
|
|
@@ -202,16 +221,20 @@ function rebuildBashResultRenderComponent(component, result, options, showImages
|
|
|
202
221
|
export function createBashToolDefinition(cwd, options) {
|
|
203
222
|
const ops = options?.operations ?? createLocalBashOperations({ shellPath: options?.shellPath });
|
|
204
223
|
const commandPrefix = options?.commandPrefix;
|
|
224
|
+
const exposeSessionEnvironment = options?.exposeSessionEnvironment ?? true;
|
|
205
225
|
const spawnHook = options?.spawnHook;
|
|
206
226
|
return {
|
|
207
227
|
name: "bash",
|
|
208
228
|
label: "bash",
|
|
209
229
|
description: `Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last ${DEFAULT_MAX_LINES} lines or ${DEFAULT_MAX_BYTES / 1024}KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.`,
|
|
210
230
|
promptSnippet: "Execute bash commands (ls, grep, find, etc.)",
|
|
231
|
+
promptGuidelines: exposeSessionEnvironment
|
|
232
|
+
? ["Inspect PI_* environment variables for current model and session details."]
|
|
233
|
+
: undefined,
|
|
211
234
|
parameters: bashSchema,
|
|
212
|
-
async execute(_toolCallId, { command, timeout }, signal, onUpdate,
|
|
235
|
+
async execute(_toolCallId, { command, timeout }, signal, onUpdate, ctx) {
|
|
213
236
|
const resolvedCommand = commandPrefix ? `${commandPrefix}\n${command}` : command;
|
|
214
|
-
const spawnContext = resolveSpawnContext(resolvedCommand, cwd, spawnHook);
|
|
237
|
+
const spawnContext = resolveSpawnContext(resolvedCommand, cwd, spawnHook, exposeSessionEnvironment, ctx);
|
|
215
238
|
const output = new OutputAccumulator({ tempFilePrefix: "pi-bash" });
|
|
216
239
|
let acceptingOutput = true;
|
|
217
240
|
let updateTimer;
|
|
@@ -356,6 +379,12 @@ export function createBashToolDefinition(cwd, options) {
|
|
|
356
379
|
};
|
|
357
380
|
}
|
|
358
381
|
export function createBashTool(cwd, options) {
|
|
359
|
-
|
|
382
|
+
const definition = createBashToolDefinition(cwd, options);
|
|
383
|
+
const tool = wrapToolDefinition(definition);
|
|
384
|
+
Object.assign(tool, {
|
|
385
|
+
promptSnippet: definition.promptSnippet,
|
|
386
|
+
promptGuidelines: definition.promptGuidelines,
|
|
387
|
+
});
|
|
388
|
+
return tool;
|
|
360
389
|
}
|
|
361
390
|
//# sourceMappingURL=bash.js.map
|
package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/tool-definition-wrapper.js
CHANGED
|
@@ -5,9 +5,10 @@ export function wrapToolDefinition(definition, ctxFactory) {
|
|
|
5
5
|
label: definition.label,
|
|
6
6
|
description: definition.description,
|
|
7
7
|
parameters: definition.parameters,
|
|
8
|
+
constrainedSampling: definition.constrainedSampling,
|
|
8
9
|
prepareArguments: definition.prepareArguments,
|
|
9
10
|
executionMode: definition.executionMode,
|
|
10
|
-
execute: (toolCallId, params, signal, onUpdate) => definition.execute(toolCallId, params, signal, onUpdate, ctxFactory?.()),
|
|
11
|
+
execute: (toolCallId, params, signal, onUpdate, ctx) => definition.execute(toolCallId, params, signal, onUpdate, ctx ?? ctxFactory?.()),
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
14
|
/** Wrap multiple ToolDefinitions into AgentTools for the core runtime. */
|
|
@@ -26,6 +27,7 @@ export function createToolDefinitionFromAgentTool(tool) {
|
|
|
26
27
|
label: tool.label,
|
|
27
28
|
description: tool.description,
|
|
28
29
|
parameters: tool.parameters,
|
|
30
|
+
constrainedSampling: tool.constrainedSampling,
|
|
29
31
|
prepareArguments: tool.prepareArguments,
|
|
30
32
|
executionMode: tool.executionMode,
|
|
31
33
|
execute: async (toolCallId, params, signal, onUpdate) => tool.execute(toolCallId, params, signal, onUpdate),
|
|
@@ -2,7 +2,6 @@ import { stream, streamSimple } from "@earendil-works/pi-ai/compat";
|
|
|
2
2
|
import { LlamaClient, llamaInferenceUrl, normalizeLlamaServerUrl } from "./client.js";
|
|
3
3
|
export const LLAMA_PROVIDER_ID = "llama.cpp";
|
|
4
4
|
export const DEFAULT_LLAMA_SERVER_URL = "http://127.0.0.1:8080";
|
|
5
|
-
const DEFAULT_MAX_TOKENS = 16384;
|
|
6
5
|
function credentialServerUrl(credential) {
|
|
7
6
|
const value = credential?.env?.LLAMA_BASE_URL;
|
|
8
7
|
return typeof value === "string" && value.trim() ? normalizeLlamaServerUrl(value) : undefined;
|
|
@@ -24,7 +23,7 @@ function toPiModel(model, serverUrl) {
|
|
|
24
23
|
input: model.architecture?.input_modalities?.includes("image") ? ["text", "image"] : ["text"],
|
|
25
24
|
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
26
25
|
contextWindow,
|
|
27
|
-
maxTokens:
|
|
26
|
+
maxTokens: contextWindow,
|
|
28
27
|
compat: {
|
|
29
28
|
supportsStore: false,
|
|
30
29
|
supportsDeveloperRole: false,
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
* Multi-line editor component for extensions.
|
|
3
3
|
* Supports Ctrl+G for external editor.
|
|
4
4
|
*/
|
|
5
|
-
import { spawn } from "node:child_process";
|
|
6
|
-
import * as fs from "node:fs";
|
|
7
|
-
import * as os from "node:os";
|
|
8
|
-
import * as path from "node:path";
|
|
9
5
|
import { Container, Editor, getKeybindings, Spacer, Text, } from "@earendil-works/pi-tui";
|
|
6
|
+
import { editInExternalEditor } from "../external-editor.js";
|
|
10
7
|
import { getEditorTheme, theme } from "../theme/theme.js";
|
|
11
8
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
12
9
|
import { keyHint } from "./keybinding-hints.js";
|
|
@@ -29,7 +26,11 @@ export class ExtensionEditorComponent extends Container {
|
|
|
29
26
|
super();
|
|
30
27
|
this.tui = tui;
|
|
31
28
|
this.keybindings = keybindings;
|
|
32
|
-
this.externalEditorCommand =
|
|
29
|
+
this.externalEditorCommand =
|
|
30
|
+
externalEditorCommand ||
|
|
31
|
+
process.env.VISUAL ||
|
|
32
|
+
process.env.EDITOR ||
|
|
33
|
+
(process.platform === "win32" ? "notepad" : "nano");
|
|
33
34
|
this.onSubmitCallback = onSubmit;
|
|
34
35
|
this.onCancelCallback = onCancel;
|
|
35
36
|
// Add top border
|
|
@@ -50,13 +51,12 @@ export class ExtensionEditorComponent extends Container {
|
|
|
50
51
|
this.addChild(this.editor);
|
|
51
52
|
this.addChild(new Spacer(1));
|
|
52
53
|
// Add hint
|
|
53
|
-
const hasExternalEditor = !!this.getExternalEditorCommand();
|
|
54
54
|
const hint = keyHint("tui.select.confirm", "submit") +
|
|
55
55
|
" " +
|
|
56
56
|
keyHint("tui.input.newLine", "newline") +
|
|
57
57
|
" " +
|
|
58
58
|
keyHint("tui.select.cancel", "cancel") +
|
|
59
|
-
|
|
59
|
+
` ${keyHint("app.editor.external", "external editor")}`;
|
|
60
60
|
this.addChild(new Text(hint, 1, 0));
|
|
61
61
|
this.addChild(new Spacer(1));
|
|
62
62
|
// Add bottom border
|
|
@@ -71,56 +71,26 @@ export class ExtensionEditorComponent extends Container {
|
|
|
71
71
|
}
|
|
72
72
|
// External editor (app keybinding)
|
|
73
73
|
if (this.keybindings.matches(keyData, "app.editor.external")) {
|
|
74
|
-
this.
|
|
74
|
+
void this.handleOpenExternalEditor();
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
// Forward to editor
|
|
78
78
|
this.editor.handleInput(keyData);
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
return editorCmd;
|
|
84
|
-
}
|
|
85
|
-
return process.platform === "win32" ? "notepad" : "nano";
|
|
86
|
-
}
|
|
87
|
-
async openExternalEditor() {
|
|
88
|
-
const editorCmd = this.getExternalEditorCommand();
|
|
89
|
-
if (!editorCmd) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
const currentText = this.editor.getText();
|
|
93
|
-
const tmpFile = path.join(os.tmpdir(), `pi-extension-editor-${Date.now()}.md`);
|
|
80
|
+
async handleOpenExternalEditor() {
|
|
81
|
+
const content = this.editor.getText();
|
|
82
|
+
this.tui.stop();
|
|
94
83
|
try {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
process.stdout.write(`Launching external editor: ${editorCmd}\nPi will resume when the editor exits.\n`);
|
|
99
|
-
// Do not use spawnSync here. On Windows, synchronous child_process calls can keep
|
|
100
|
-
// Node/libuv's console input read active after tui.stop() pauses stdin, racing
|
|
101
|
-
// vim/nvim for the console input buffer until Ctrl+C cancels the pending read.
|
|
102
|
-
const status = await new Promise((resolve) => {
|
|
103
|
-
const child = spawn(editor, [...editorArgs, tmpFile], {
|
|
104
|
-
stdio: "inherit",
|
|
105
|
-
shell: process.platform === "win32",
|
|
106
|
-
});
|
|
107
|
-
child.on("error", () => resolve(null));
|
|
108
|
-
child.on("close", (code) => resolve(code));
|
|
84
|
+
const result = await editInExternalEditor({
|
|
85
|
+
command: this.externalEditorCommand,
|
|
86
|
+
content,
|
|
109
87
|
});
|
|
110
|
-
if (status ===
|
|
111
|
-
|
|
112
|
-
this.editor.setText(newContent);
|
|
88
|
+
if (result.status === "complete") {
|
|
89
|
+
this.editor.setText(result.content);
|
|
113
90
|
}
|
|
114
91
|
}
|
|
115
92
|
finally {
|
|
116
|
-
try {
|
|
117
|
-
fs.unlinkSync(tmpFile);
|
|
118
|
-
}
|
|
119
|
-
catch {
|
|
120
|
-
// Ignore cleanup errors
|
|
121
|
-
}
|
|
122
93
|
this.tui.start();
|
|
123
|
-
// Force full re-render since external editor uses alternate screen
|
|
124
94
|
this.tui.requestRender(true);
|
|
125
95
|
}
|
|
126
96
|
}
|
package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/external-editor.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
export async function editInExternalEditor(options) {
|
|
6
|
+
const directory = mkdtempSync(join(tmpdir(), "sling-editor-"));
|
|
7
|
+
const filePath = join(directory, "prompt.md");
|
|
8
|
+
try {
|
|
9
|
+
writeFileSync(filePath, options.content, "utf-8");
|
|
10
|
+
const [editor, ...editorArgs] = options.command.split(" ");
|
|
11
|
+
process.stdout.write(`Launching external editor: ${options.command}\nPi will resume when the editor exits.\n`);
|
|
12
|
+
// Do not use spawnSync here. On Windows, synchronous child_process calls can keep
|
|
13
|
+
// Node/libuv's console input read active after the parent pauses stdin, racing
|
|
14
|
+
// vim/nvim for the console input buffer until Ctrl+C cancels the pending read.
|
|
15
|
+
const exitCode = await new Promise((resolve) => {
|
|
16
|
+
const child = spawn(editor, [...editorArgs, filePath], {
|
|
17
|
+
stdio: "inherit",
|
|
18
|
+
shell: process.platform === "win32",
|
|
19
|
+
});
|
|
20
|
+
child.on("error", () => resolve(null));
|
|
21
|
+
child.on("close", (code) => resolve(code));
|
|
22
|
+
});
|
|
23
|
+
if (exitCode !== 0) {
|
|
24
|
+
return { status: "failed" };
|
|
25
|
+
}
|
|
26
|
+
return { status: "complete", content: readFileSync(filePath, "utf-8").replace(/\n$/, "") };
|
|
27
|
+
}
|
|
28
|
+
finally {
|
|
29
|
+
try {
|
|
30
|
+
rmSync(directory, { recursive: true, force: true });
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
// Cleanup is best effort.
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=external-editor.js.map
|
package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js
CHANGED
|
@@ -64,6 +64,7 @@ import { TreeSelectorComponent } from "./components/tree-selector.js";
|
|
|
64
64
|
import { TrustSelectorComponent } from "./components/trust-selector.js";
|
|
65
65
|
import { UserMessageComponent } from "./components/user-message.js";
|
|
66
66
|
import { UserMessageSelectorComponent } from "./components/user-message-selector.js";
|
|
67
|
+
import { editInExternalEditor } from "./external-editor.js";
|
|
67
68
|
import { getModelSearchText } from "./model-search.js";
|
|
68
69
|
import { getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, onThemeChange, setRegisteredThemes, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
|
|
69
70
|
import { InteractiveThemeController } from "./theme/theme-controller.js";
|
|
@@ -272,7 +273,7 @@ export class InteractiveMode {
|
|
|
272
273
|
await this.rebindCurrentSession({ renderBeforeBind: true });
|
|
273
274
|
});
|
|
274
275
|
this.version = VERSION;
|
|
275
|
-
this.ui = new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
|
|
276
|
+
this.ui = new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor(), getAgentDir());
|
|
276
277
|
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
|
277
278
|
this.headerContainer = new Container();
|
|
278
279
|
this.loadedResourcesContainer = new Container();
|
|
@@ -798,8 +799,15 @@ export class InteractiveMode {
|
|
|
798
799
|
* Get a short path relative to the package root for display.
|
|
799
800
|
*/
|
|
800
801
|
getShortPath(fullPath, sourceInfo) {
|
|
802
|
+
const normalizedFullPath = fullPath.replace(/\\/g, "/");
|
|
801
803
|
const baseDir = sourceInfo?.baseDir;
|
|
802
804
|
if (baseDir && this.isPackageSource(sourceInfo)) {
|
|
805
|
+
const normalizedBaseDir = baseDir.replace(/\\/g, "/");
|
|
806
|
+
const npmRootMatch = normalizedBaseDir.match(/^(.*\/node_modules)\/(@?[^/]+(?:\/[^/]+)?)$/);
|
|
807
|
+
// If fullPath is under the same node_modules root as baseDir, preserve that relative topology.
|
|
808
|
+
if (npmRootMatch?.[1] && normalizedFullPath.startsWith(`${npmRootMatch[1]}/`)) {
|
|
809
|
+
return path.posix.relative(normalizedBaseDir, normalizedFullPath);
|
|
810
|
+
}
|
|
803
811
|
const relativePath = path.relative(path.resolve(baseDir), path.resolve(fullPath));
|
|
804
812
|
if (relativePath &&
|
|
805
813
|
relativePath !== "." &&
|
|
@@ -810,11 +818,11 @@ export class InteractiveMode {
|
|
|
810
818
|
}
|
|
811
819
|
}
|
|
812
820
|
const source = sourceInfo?.source ?? "";
|
|
813
|
-
const npmMatch =
|
|
821
|
+
const npmMatch = normalizedFullPath.match(/node_modules\/(@?[^/]+(?:\/[^/]+)?)\/(.*)/);
|
|
814
822
|
if (npmMatch && source.startsWith("npm:")) {
|
|
815
823
|
return npmMatch[2];
|
|
816
824
|
}
|
|
817
|
-
const gitMatch =
|
|
825
|
+
const gitMatch = normalizedFullPath.match(/git\/[^/]+\/[^/]+\/(.*)/);
|
|
818
826
|
if (gitMatch && source.startsWith("git:")) {
|
|
819
827
|
return gitMatch[1];
|
|
820
828
|
}
|
|
@@ -1354,6 +1362,7 @@ export class InteractiveMode {
|
|
|
1354
1362
|
sessionManager: this.sessionManager,
|
|
1355
1363
|
modelRegistry: extensionRunner.getModelRegistry(),
|
|
1356
1364
|
model: this.session.model,
|
|
1365
|
+
thinkingLevel: this.session.thinkingLevel,
|
|
1357
1366
|
isIdle: () => this.session.isIdle,
|
|
1358
1367
|
isProjectTrusted: () => this.settingsManager.isProjectTrusted(),
|
|
1359
1368
|
signal: this.session.agent.signal,
|
|
@@ -2039,7 +2048,7 @@ export class InteractiveMode {
|
|
|
2039
2048
|
this.defaultEditor.onAction("app.model.select", () => this.showModelSelector());
|
|
2040
2049
|
this.defaultEditor.onAction("app.tools.expand", () => this.toggleToolOutputExpansion());
|
|
2041
2050
|
this.defaultEditor.onAction("app.thinking.toggle", () => this.toggleThinkingBlockVisibility());
|
|
2042
|
-
this.defaultEditor.onAction("app.editor.external", () => this.
|
|
2051
|
+
this.defaultEditor.onAction("app.editor.external", () => void this.handleOpenExternalEditor());
|
|
2043
2052
|
this.defaultEditor.onAction("app.message.copy", () => void this.handleCopyCommand());
|
|
2044
2053
|
this.defaultEditor.onAction("app.message.followUp", () => this.handleFollowUp());
|
|
2045
2054
|
this.defaultEditor.onAction("app.message.dequeue", () => this.handleDequeue());
|
|
@@ -2401,6 +2410,9 @@ export class InteractiveMode {
|
|
|
2401
2410
|
}
|
|
2402
2411
|
this.ui.requestRender();
|
|
2403
2412
|
break;
|
|
2413
|
+
case "bash_execution_update":
|
|
2414
|
+
// The bash execution callback handles TUI output rendering.
|
|
2415
|
+
break;
|
|
2404
2416
|
case "tool_execution_start": {
|
|
2405
2417
|
let component = this.pendingTools.get(event.toolCallId);
|
|
2406
2418
|
if (!component) {
|
|
@@ -3123,51 +3135,21 @@ export class InteractiveMode {
|
|
|
3123
3135
|
}
|
|
3124
3136
|
this.showStatus(`Thinking blocks: ${this.hideThinkingBlock ? "hidden" : "visible"}`);
|
|
3125
3137
|
}
|
|
3126
|
-
async
|
|
3138
|
+
async handleOpenExternalEditor() {
|
|
3127
3139
|
const editorCmd = this.settingsManager.getExternalEditorCommand();
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
return;
|
|
3131
|
-
}
|
|
3132
|
-
const currentText = this.editor.getExpandedText?.() ?? this.editor.getText();
|
|
3133
|
-
const tmpFile = path.join(os.tmpdir(), `sling-editor-${Date.now()}.sling.md`);
|
|
3140
|
+
const content = this.editor.getExpandedText?.() ?? this.editor.getText();
|
|
3141
|
+
this.ui.stop();
|
|
3134
3142
|
try {
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
this.ui.stop();
|
|
3139
|
-
// Split by space to support editor arguments (e.g., "code --wait")
|
|
3140
|
-
const [editor, ...editorArgs] = editorCmd.split(" ");
|
|
3141
|
-
process.stdout.write(`Launching external editor: ${editorCmd}\nPi will resume when the editor exits.\n`);
|
|
3142
|
-
// Do not use spawnSync here. On Windows, synchronous child_process calls can keep
|
|
3143
|
-
// Node/libuv's console input read active after ui.stop() pauses stdin, racing
|
|
3144
|
-
// vim/nvim for the console input buffer until Ctrl+C cancels the pending read.
|
|
3145
|
-
const status = await new Promise((resolve) => {
|
|
3146
|
-
const child = spawn(editor, [...editorArgs, tmpFile], {
|
|
3147
|
-
stdio: "inherit",
|
|
3148
|
-
shell: process.platform === "win32",
|
|
3149
|
-
});
|
|
3150
|
-
child.on("error", () => resolve(null));
|
|
3151
|
-
child.on("close", (code) => resolve(code));
|
|
3143
|
+
const result = await editInExternalEditor({
|
|
3144
|
+
command: editorCmd,
|
|
3145
|
+
content,
|
|
3152
3146
|
});
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
const newContent = fs.readFileSync(tmpFile, "utf-8").replace(/\n$/, "");
|
|
3156
|
-
this.editor.setText(newContent);
|
|
3147
|
+
if (result.status === "complete") {
|
|
3148
|
+
this.editor.setText(result.content);
|
|
3157
3149
|
}
|
|
3158
|
-
// On non-zero exit, keep original text (no action needed)
|
|
3159
3150
|
}
|
|
3160
3151
|
finally {
|
|
3161
|
-
// Clean up temp file
|
|
3162
|
-
try {
|
|
3163
|
-
fs.unlinkSync(tmpFile);
|
|
3164
|
-
}
|
|
3165
|
-
catch {
|
|
3166
|
-
// Ignore cleanup errors
|
|
3167
|
-
}
|
|
3168
|
-
// Restart TUI
|
|
3169
3152
|
this.ui.start();
|
|
3170
|
-
// Force full re-render since external editor uses alternate screen
|
|
3171
3153
|
this.ui.requestRender(true);
|
|
3172
3154
|
}
|
|
3173
3155
|
}
|
|
@@ -3634,15 +3616,15 @@ export class InteractiveMode {
|
|
|
3634
3616
|
if (this.settingsManager.getWarnings().anthropicExtraUsage === false) {
|
|
3635
3617
|
return;
|
|
3636
3618
|
}
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3619
|
+
if (this.anthropicSubscriptionWarningShown) {
|
|
3620
|
+
return;
|
|
3621
|
+
}
|
|
3640
3622
|
if (!model || model.provider !== "anthropic") {
|
|
3641
3623
|
return;
|
|
3642
3624
|
}
|
|
3643
3625
|
try {
|
|
3644
3626
|
if ((await this.session.modelRuntime.checkAuth("anthropic"))?.type === "oauth") {
|
|
3645
|
-
|
|
3627
|
+
this.anthropicSubscriptionWarningShown = true;
|
|
3646
3628
|
this.showWarning(ANTHROPIC_SUBSCRIPTION_AUTH_WARNING);
|
|
3647
3629
|
return;
|
|
3648
3630
|
}
|
|
@@ -3650,7 +3632,7 @@ export class InteractiveMode {
|
|
|
3650
3632
|
if (!isAnthropicSubscriptionAuthKey(apiKey)) {
|
|
3651
3633
|
return;
|
|
3652
3634
|
}
|
|
3653
|
-
|
|
3635
|
+
this.anthropicSubscriptionWarningShown = true;
|
|
3654
3636
|
this.showWarning(ANTHROPIC_SUBSCRIPTION_AUTH_WARNING);
|
|
3655
3637
|
}
|
|
3656
3638
|
catch {
|
|
@@ -437,6 +437,7 @@ export async function runRpcMode(runtimeHost) {
|
|
|
437
437
|
case "bash": {
|
|
438
438
|
const result = await session.executeBash(command.command, undefined, {
|
|
439
439
|
excludeFromContext: command.excludeFromContext,
|
|
440
|
+
id,
|
|
440
441
|
});
|
|
441
442
|
return success(id, "bash", result);
|
|
442
443
|
}
|
|
@@ -91,15 +91,26 @@ export async function copyToClipboard(text) {
|
|
|
91
91
|
try {
|
|
92
92
|
// Verify wl-copy exists (spawn errors are async and won't be caught)
|
|
93
93
|
execSync("which wl-copy", { stdio: "ignore" });
|
|
94
|
-
// wl-copy with execSync hangs due to fork behavior; use spawn instead
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
// wl-copy with execSync hangs due to fork behavior; use spawn instead.
|
|
95
|
+
// Await the exit code and only claim success on a clean exit, so a
|
|
96
|
+
// failed wl-copy falls through to the xclip/OSC 52 fallbacks.
|
|
97
|
+
const wlCopyExit = await new Promise((resolve) => {
|
|
98
|
+
const proc = spawn("wl-copy", [], { stdio: ["pipe", "ignore", "ignore"] });
|
|
99
|
+
proc.on("error", () => resolve(1));
|
|
100
|
+
proc.on("close", (code) => resolve(code ?? 1));
|
|
101
|
+
proc.stdin.on("error", () => {
|
|
102
|
+
// Ignore EPIPE errors if wl-copy exits early
|
|
103
|
+
});
|
|
104
|
+
proc.stdin.write(text);
|
|
105
|
+
proc.stdin.end();
|
|
98
106
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
if (wlCopyExit === 0) {
|
|
108
|
+
copied = true;
|
|
109
|
+
}
|
|
110
|
+
else if (hasX11Display) {
|
|
111
|
+
copyToX11Clipboard(options);
|
|
112
|
+
copied = true;
|
|
113
|
+
}
|
|
103
114
|
}
|
|
104
115
|
catch {
|
|
105
116
|
if (hasX11Display) {
|
|
@@ -18,7 +18,7 @@ export function isNewerPackageVersion(candidateVersion, currentVersion) {
|
|
|
18
18
|
return candidateVersion.trim() !== currentVersion.trim();
|
|
19
19
|
}
|
|
20
20
|
export async function getLatestPiRelease(currentVersion, options = {}) {
|
|
21
|
-
if (process.env.
|
|
21
|
+
if (process.env.PI_OFFLINE)
|
|
22
22
|
return undefined;
|
|
23
23
|
const response = await fetch(LATEST_VERSION_URL, {
|
|
24
24
|
headers: {
|
|
@@ -45,6 +45,8 @@ export async function getLatestPiVersion(currentVersion, options = {}) {
|
|
|
45
45
|
return (await getLatestPiRelease(currentVersion, options))?.version;
|
|
46
46
|
}
|
|
47
47
|
export async function checkForNewPiVersion(currentVersion) {
|
|
48
|
+
if (process.env.PI_SKIP_VERSION_CHECK)
|
|
49
|
+
return undefined;
|
|
48
50
|
try {
|
|
49
51
|
const latestRelease = await getLatestPiRelease(currentVersion);
|
|
50
52
|
if (latestRelease && isNewerPackageVersion(latestRelease.version, currentVersion)) {
|