@ycodium-ai/agent-pi 0.2.3608 → 0.2.3614
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/assets/ui.js +1 -1
- package/dist/index.js +1 -2
- package/locales/en.json +2 -3
- package/locales/zh-CN.json +6 -4
- package/package.json +4 -4
package/assets/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var C=window.__ycodiumPluginHost.modules?.["@ycodium-ai/plugin-api/provider-settings"];if(!C)throw new Error("This plugin needs a newer Ycodium app. Update the app.");var{PROVIDER_SETTINGS_VIEW_CAPABILITY:_,accountDirectoryCandidates:G,accountDirectorySlug:W,accountProbeHasSignedInAccount:q,allocateAccountDirectory:J,providerInstanceAccountPaths:Q}=C;var j=window.__ycodiumPluginHost.react;var{Activity:Z,Children:ee,Component:te,Fragment:oe,Profiler:ne,PureComponent:re,StrictMode:ie,Suspense:ae,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:se,__COMPILER_RUNTIME:ce,act:
|
|
1
|
+
var C=window.__ycodiumPluginHost.modules?.["@ycodium-ai/plugin-api/provider-settings"];if(!C)throw new Error("This plugin needs a newer Ycodium app. Update the app.");var{PROVIDER_SETTINGS_VIEW_CAPABILITY:_,accountDirectoryCandidates:G,accountDirectorySlug:W,accountProbeHasSignedInAccount:q,allocateAccountDirectory:J,providerInstanceAccountPaths:Q}=C;var j=window.__ycodiumPluginHost.react;var{Activity:Z,Children:ee,Component:te,Fragment:oe,Profiler:ne,PureComponent:re,StrictMode:ie,Suspense:ae,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:se,__COMPILER_RUNTIME:ce,act:le,cache:pe,cacheSignal:ue,captureOwnerStack:de,cloneElement:me,createContext:b,createElement:w,createRef:ge,forwardRef:fe,isValidElement:Pe,lazy:ye,memo:we,startTransition:ve,unstable_useCacheRefresh:he,use:Se,useActionState:Ie,useCallback:xe,useContext:E,useDebugValue:Te,useDeferredValue:Ce,useEffect:A,useEffectEvent:_e,useId:R,useImperativeHandle:be,useInsertionEffect:Ee,useLayoutEffect:Ae,useMemo:Re,useOptimistic:Ne,useReducer:Ue,useRef:ke,useState:Oe,useSyncExternalStore:Le,useTransition:Be,version:De}=j;var N=b(null),U=N.Provider;function p(){let t=E(N);if(t===null)throw new Error("Pi UI has not been registered.");return t}var v=["openai-completions","openai-responses","anthropic-messages"],k="openai-completions";function u(t){return v.some(e=>e===t)}var h="connection",f="YCODIUM_PI_API_KEY";function S(t){try{let e=new URL(t.trim());return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password&&!e.search&&!e.hash}catch{return!1}}function O(t){let{apiProtocol:e,apiBaseUrl:i,model:l}=t.config,n=t.environment.find(a=>a.name===f);return(e===void 0||u(e))&&typeof i=="string"&&S(i)&&typeof l=="string"&&l.trim().length>0&&n!==void 0&&(n.valueRedacted===!0||n.value.trim().length>0)}function L(t,e){let i=t.trim();return!i&&e?{}:{environment:[{name:f,value:i,sensitive:!0}]}}function I(t){return w(p().ui.DraftInput,t)}function d(t){return(e=>w(p().ui[t],{...e,className:`ycodium-pi-ui ${typeof e.className=="string"?e.className:""}`}))}var B=d("Select"),D=d("SelectTrigger"),H=d("SelectPopup"),K=d("SelectItem"),V=d("SelectValue");function $(){let t=p().i18n.usePluginTranslation();return{t:(e,i)=>t(e,i)}}var{jsx:r,jsxs:c,Fragment:qe}=window.__ycodiumPluginHost.jsxRuntime;function M({instance:t,readOnly:e,onReport:i,onChange:l}){let{t:n}=$(),a=R(),P=O(t),x=P?n("connectionNotVerified"):void 0;A(()=>i({complete:P,hidesSignIn:!0,signInAfterAdd:!1,notice:x}),[P,x,i]);let T=t.environment.find(o=>o.name===f),m=T?.valueRedacted===!0,y=t.config.apiProtocol,s=y===void 0?k:u(y)?y:null;return c("div",{className:"ycodium-pi-ui grid min-w-0 gap-4",children:[c("div",{className:"grid min-w-0 gap-1",children:[r("span",{id:`${a}-protocol-label`,className:"text-control-4 font-medium",children:n("form.apiProtocol.title")}),c(B,{value:s,disabled:e,onValueChange:o=>{!e&&u(o)&&l({config:{apiProtocol:o}})},children:[r(D,{"aria-labelledby":`${a}-protocol-label`,"aria-describedby":s===null?`${a}-protocol-description`:void 0,"aria-invalid":s===null,children:r(V,{children:n(s===null?"connection.protocolUnknown":`connection.protocols.${s}`)})}),r(H,{children:v.map(o=>r(K,{value:o,children:n(`connection.protocols.${o}`)},o))})]}),s===null?r("span",{id:`${a}-protocol-description`,className:"text-ui-sm text-destructive-foreground",children:n("connection.invalidProtocol")}):null]}),["apiBaseUrl","model"].map(o=>c("label",{className:"grid min-w-0 gap-1",children:[r("span",{className:"text-control-4 font-medium",children:n(`form.${o}.title`)}),r(I,{value:typeof t.config[o]=="string"?t.config[o]:"",onCommit:g=>{e||l({config:{[o]:g.trim()}})},validate:g=>(o==="apiBaseUrl"?S(g):g.trim().length>0)?null:n(o==="apiBaseUrl"?"connection.invalidUrl":"connection.modelRequired"),disabled:e,autoComplete:"off",spellCheck:!1,"aria-label":n(`form.${o}.title`),"aria-describedby":`${a}-${o}-description`}),r("span",{id:`${a}-${o}-description`,className:"text-ui-sm text-muted-foreground",children:n(o==="apiBaseUrl"&&s!==null?`connection.baseUrlGuidance.${s}`:`form.${o}.description`)})]},o)),c("label",{className:"grid min-w-0 gap-1",children:[r("span",{className:"text-control-4 font-medium",children:n("connection.key")}),r(I,{type:"password",autoComplete:"off",spellCheck:!1,disabled:e,"aria-label":n("connection.key"),value:m?"":T?.value??"",placeholder:m?n("connection.stored"):void 0,validate:o=>m||o.trim()?null:n("connection.keyRequired"),onCommit:o=>{e||l(L(o,m))}})]})]})}var Y=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties, theme, base, components, utilities;
|
|
3
3
|
@layer properties;
|
|
4
4
|
@layer utilities {
|
package/dist/index.js
CHANGED
|
@@ -132,8 +132,7 @@ var PI_CARD = {
|
|
|
132
132
|
enum: PI_API_PROTOCOLS,
|
|
133
133
|
default: DEFAULT_PI_API_PROTOCOL,
|
|
134
134
|
"x-ycodium-form": {
|
|
135
|
-
titleKey: "form.apiProtocol.title"
|
|
136
|
-
descriptionKey: "form.apiProtocol.description"
|
|
135
|
+
titleKey: "form.apiProtocol.title"
|
|
137
136
|
}
|
|
138
137
|
},
|
|
139
138
|
...Object.fromEntries(
|
package/locales/en.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"setupNote": "
|
|
2
|
+
"setupNote": "Pi runs tools with the permissions of its process; it does not provide a sandbox or per-tool approvals.",
|
|
3
3
|
"connectionNotVerified": "API credentials and model access will be checked on the first request.",
|
|
4
4
|
"connection": {
|
|
5
5
|
"protocolUnknown": "Choose a supported protocol",
|
|
@@ -22,8 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"form": {
|
|
24
24
|
"apiProtocol": {
|
|
25
|
-
"title": "API protocol"
|
|
26
|
-
"description": "Choose the request format supported by your API service."
|
|
25
|
+
"title": "API protocol"
|
|
27
26
|
},
|
|
28
27
|
"apiBaseUrl": {
|
|
29
28
|
"title": "API base URL",
|
package/locales/zh-CN.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"setupNote": "
|
|
2
|
+
"setupNote": "Pi 按进程权限执行工具,不提供沙箱或逐工具审批。",
|
|
3
3
|
"connectionNotVerified": "首次请求时将验证 API 凭据和模型访问权限。",
|
|
4
4
|
"connection": {
|
|
5
5
|
"protocolUnknown": "请选择支持的协议",
|
|
@@ -22,14 +22,16 @@
|
|
|
22
22
|
},
|
|
23
23
|
"form": {
|
|
24
24
|
"apiProtocol": {
|
|
25
|
-
"title": "API 协议"
|
|
26
|
-
"description": "选择 API 服务支持的请求格式。"
|
|
25
|
+
"title": "API 协议"
|
|
27
26
|
},
|
|
28
27
|
"apiBaseUrl": {
|
|
29
28
|
"title": "API 地址",
|
|
30
29
|
"description": "所选 API 协议的基础地址,不包含最终请求端点。"
|
|
31
30
|
},
|
|
32
|
-
"model": {
|
|
31
|
+
"model": {
|
|
32
|
+
"title": "模型名称",
|
|
33
|
+
"description": "API 服务接受的准确模型 ID。"
|
|
34
|
+
},
|
|
33
35
|
"binaryPath": {
|
|
34
36
|
"title": "Pi 程序",
|
|
35
37
|
"description": "可选的 Pi 1.4.0 或更高版本程序路径。留空则从 PATH 查找 pi。"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-pi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3614",
|
|
4
4
|
"description": "Pi executor over the native RPC protocol.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"tailwindcss": "^4.0.0",
|
|
31
31
|
"typescript": "~6.0.3",
|
|
32
32
|
"vite-plus": "0.2.2",
|
|
33
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
34
|
-
"
|
|
35
|
-
"ycodium
|
|
33
|
+
"@ycodium-ai/plugin-api": "0.2.3614",
|
|
34
|
+
"ycodium-executor-testing": "0.0.0",
|
|
35
|
+
"@ycodium/contracts": "0.0.33"
|
|
36
36
|
},
|
|
37
37
|
"ycodium": {
|
|
38
38
|
"plugin": "./dist/index.js",
|