@flue/client 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/proxies/index.d.mts +1 -0
- package/dist/proxies/index.mjs +22 -7
- package/package.json +1 -1
package/dist/proxies/index.d.mts
CHANGED
package/dist/proxies/index.mjs
CHANGED
|
@@ -26,7 +26,7 @@ function anthropic(opts) {
|
|
|
26
26
|
filtered["x-api-key"] = apiKey;
|
|
27
27
|
return { headers: filtered };
|
|
28
28
|
},
|
|
29
|
-
policy: "allow-all",
|
|
29
|
+
policy: opts?.policy ?? "allow-all",
|
|
30
30
|
isModelProvider: true,
|
|
31
31
|
providerConfig: {
|
|
32
32
|
providerKey: "anthropic",
|
|
@@ -95,17 +95,32 @@ function github(opts) {
|
|
|
95
95
|
function resolveGitHubPolicy(policy) {
|
|
96
96
|
if (typeof policy !== "string") return policy;
|
|
97
97
|
switch (policy) {
|
|
98
|
-
case "read-only": return {
|
|
99
|
-
case "read-only+clone": return {
|
|
98
|
+
case "read-only": return {
|
|
100
99
|
default: "deny-non-safe",
|
|
101
100
|
allow: [{
|
|
102
101
|
method: "POST",
|
|
103
|
-
path: "
|
|
104
|
-
|
|
105
|
-
method: "GET",
|
|
106
|
-
path: "/*/info/refs"
|
|
102
|
+
path: "/graphql",
|
|
103
|
+
body: githubBody.graphql()
|
|
107
104
|
}]
|
|
108
105
|
};
|
|
106
|
+
case "read-only+clone": return {
|
|
107
|
+
default: "deny-non-safe",
|
|
108
|
+
allow: [
|
|
109
|
+
{
|
|
110
|
+
method: "POST",
|
|
111
|
+
path: "/graphql",
|
|
112
|
+
body: githubBody.graphql()
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
method: "POST",
|
|
116
|
+
path: "/*/git-upload-pack"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
method: "GET",
|
|
120
|
+
path: "/*/info/refs"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
};
|
|
109
124
|
case "allow-all": return { default: "allow-all" };
|
|
110
125
|
default: throw new Error(`Unknown github() policy level: '${policy}'`);
|
|
111
126
|
}
|