@aria-cli/types 1.0.14 → 1.0.17
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 +17 -0
- package/dist/index.js +1 -1
- package/dist-cjs/index.js +1 -1
- package/package.json +8 -5
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @aria-cli/types
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Part of [ARIA](https://www.npmjs.com/package/@aria-cli/cli) — Adaptive Reasoning Intelligence Agent.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i @aria-cli/types
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
See the main [`@aria-cli/cli`](https://www.npmjs.com/package/@aria-cli/cli) package for full documentation.
|
|
14
|
+
|
|
15
|
+
## License
|
|
16
|
+
|
|
17
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function P(_){return _.kind==="function"}function N(_){return _.kind==="native"}function w(_){if(_ instanceof Error)return _.message;if(typeof _==="string")return _;return String(_)}function C(_){if(typeof _==="object"&&_!==null&&"statusCode"in _&&typeof _.statusCode==="number")return _.statusCode;return}function D(_){return _ instanceof Error&&"code"in _&&typeof _.code==="string"}function R(_){return!b(_)}function b(_){return["brave_search","computer","code_interpreter","text_editor","bash","dalle","file_search"].some((G)=>_.name.startsWith(G))}import{existsSync as Y,mkdirSync as x,readFileSync as I,unlinkSync as O,writeFileSync as T}from"node:fs";import{homedir as B}from"node:os";import{dirname as F,join as J}from"node:path";var m=199,v="ARIA_NO_RELAUNCH",l="ARIA_RESUME_SESSION_ID",k="ARIA_RESUME_ARION",o="ARIA_RESTART_KIND";function H(){let _=process.env.ARIA_HOME?.trim();if(_)return _;return J(B(),".aria")}function U(){return J(H(),"relaunch-pending")}function K(_=process.pid){return J(U(),`${_}.json`)}function t(_){try{let p=K(_.pid);x(F(p),{recursive:!0}),T(p,JSON.stringify(_),"utf-8")}catch{}}function d(_=process.pid){try{let p=K(_);if(!Y(p))return null;let G=I(p,"utf-8");return JSON.parse(G)}catch{return null}}function g(_=process.pid){try{let p=K(_);if(Y(p))O(p)}catch{}}function Z(){return globalThis}function i(_){let p=Z();p.__aria_stall_phase=_,p.__aria_stall_phase_ts=performance.now()}function a(){let _=Z();_.__aria_stall_phase=void 0,_.__aria_stall_phase_ts=void 0}var Q={debug:0,info:1,warn:2,error:3,silent:4};function j(){let _=typeof process<"u"?process.env.ARIA_LOG_LEVEL:void 0;if(_&&_ in Q)return _;return"info"}var X=j();function z(_){return Q[_]>=Q[X]}function M(_){if(!_||typeof _!=="object")return!1;let p=_;return p.code==="EPIPE"||p.code==="ERR_STREAM_DESTROYED"}function V(_,p){try{_(...p)}catch(G){if(M(G))return;throw G}}function A(_){if(_.length===0)return _;let[p,...G]=_;if(typeof p!=="string")return _;if(!p.startsWith("["))return _;return[`\x1B[2m\x1B[90m${p}\x1B[0m`,...G]}function f(_){if(_.length===0)return _;let[p,...G]=_;if(typeof p!=="string")return _;if(!p.startsWith("["))return _;return[`\x1B[36m${p}\x1B[0m`,...G]}var $={write(_,p){let G,q;switch(_){case"debug":G=A(p),q=console.debug;break;case"info":G=f(p),q=console.info;break;case"warn":G=p,q=console.warn;break;default:G=p,q=console.error;break}V(q,G)}},W=[$],u={debug(..._){if(z("debug"))for(let p of W)p.write("debug",_)},info(..._){if(z("info"))for(let p of W)p.write("info",_)},warn(..._){if(z("warn"))for(let p of W)p.write("warn",_)},error(..._){if(z("error"))for(let p of W)p.write("error",_)},setLevel(_){X=_},getLevel(){return X},addSink(_){W.push(_)},removeSink(_){let p=W.indexOf(_);if(p>=0)W.splice(p,1)},removeConsoleSink(){let _=W.indexOf($);if(_>=0)W.splice(_,1)}};export{t as writeRelaunchMarker,i as setGlobalStallPhase,d as readRelaunchMarker,u as log,D as isNodeError,N as isNativeToolSchema,b as isNativeTool,P as isFunctionToolSchema,R as isFunctionTool,K as getRelaunchMarkerPath,U as getRelaunchMarkerDir,C as getErrorStatusCode,w as getErrorMessage,g as clearRelaunchMarker,a as clearGlobalStallPhase,l as RESUME_SESSION_ENV,k as RESUME_ARION_ENV,o as RESTART_KIND_ENV,m as RELAUNCH_EXIT_CODE,v as NO_RELAUNCH_ENV};
|
package/dist-cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var{defineProperty:X,getOwnPropertyNames:F,getOwnPropertyDescriptor:H}=Object,U=Object.prototype.hasOwnProperty;function j(_){return this[_]}var M=(_)=>{var p=($??=new WeakMap).get(_),G;if(p)return p;if(p=X({},"__esModule",{value:!0}),_&&typeof _==="object"||typeof _==="function"){for(var q of F(_))if(!U.call(p,q))X(p,q,{get:j.bind(_,q),enumerable:!(G=H(_,q))||G.enumerable})}return $.set(_,p),p},$;var V=(_)=>_;function A(_,p){this[_]=V.bind(null,p)}var f=(_,p)=>{for(var G in p)X(_,G,{get:p[G],enumerable:!0,configurable:!0,set:A.bind(p,G)})};var i={};f(i,{writeRelaunchMarker:()=>c,setGlobalStallPhase:()=>l,readRelaunchMarker:()=>m,log:()=>B,isNodeError:()=>w,isNativeToolSchema:()=>P,isNativeTool:()=>b,isFunctionToolSchema:()=>u,isFunctionTool:()=>C,getRelaunchMarkerPath:()=>K,getRelaunchMarkerDir:()=>I,getErrorStatusCode:()=>S,getErrorMessage:()=>N,clearRelaunchMarker:()=>v,clearGlobalStallPhase:()=>k,RESUME_SESSION_ENV:()=>R,RESUME_ARION_ENV:()=>E,RESTART_KIND_ENV:()=>y,RELAUNCH_EXIT_CODE:()=>D,NO_RELAUNCH_ENV:()=>L});module.exports=M(i);function u(_){return _.kind==="function"}function P(_){return _.kind==="native"}function N(_){if(_ instanceof Error)return _.message;if(typeof _==="string")return _;return String(_)}function S(_){if(typeof _==="object"&&_!==null&&"statusCode"in _&&typeof _.statusCode==="number")return _.statusCode;return}function w(_){return _ instanceof Error&&"code"in _&&typeof _.code==="string"}function C(_){return!b(_)}function b(_){return["brave_search","computer","code_interpreter","text_editor","bash","dalle","file_search"].some((G)=>_.name.startsWith(G))}var W=require("node:fs"),x=require("node:os"),J=require("node:path"),D=199,L="ARIA_NO_RELAUNCH",R="ARIA_RESUME_SESSION_ID",E="ARIA_RESUME_ARION",y="ARIA_RESTART_KIND";function h(){let _=process.env.ARIA_HOME?.trim();if(_)return _;return J.join(x.homedir(),".aria")}function I(){return J.join(h(),"relaunch-pending")}function K(_=process.pid){return J.join(I(),`${_}.json`)}function c(_){try{let p=K(_.pid);W.mkdirSync(J.dirname(p),{recursive:!0}),W.writeFileSync(p,JSON.stringify(_),"utf-8")}catch{}}function m(_=process.pid){try{let p=K(_);if(!W.existsSync(p))return null;let G=W.readFileSync(p,"utf-8");return JSON.parse(G)}catch{return null}}function v(_=process.pid){try{let p=K(_);if(W.existsSync(p))W.unlinkSync(p)}catch{}}function O(){return globalThis}function l(_){let p=O();p.__aria_stall_phase=_,p.__aria_stall_phase_ts=performance.now()}function k(){let _=O();_.__aria_stall_phase=void 0,_.__aria_stall_phase_ts=void 0}var Y={debug:0,info:1,warn:2,error:3,silent:4};function o(){let _=typeof process<"u"?process.env.ARIA_LOG_LEVEL:void 0;if(_&&_ in Y)return _;return"info"}var Z=o();function Q(_){return Y[_]>=Y[Z]}function t(_){if(!_||typeof _!=="object")return!1;let p=_;return p.code==="EPIPE"||p.code==="ERR_STREAM_DESTROYED"}function d(_,p){try{_(...p)}catch(G){if(t(G))return;throw G}}function g(_){if(_.length===0)return _;let[p,...G]=_;if(typeof p!=="string")return _;if(!p.startsWith("["))return _;return[`\x1B[2m\x1B[90m${p}\x1B[0m`,...G]}function n(_){if(_.length===0)return _;let[p,...G]=_;if(typeof p!=="string")return _;if(!p.startsWith("["))return _;return[`\x1B[36m${p}\x1B[0m`,...G]}var T={write(_,p){let G,q;switch(_){case"debug":G=g(p),q=console.debug;break;case"info":G=n(p),q=console.info;break;case"warn":G=p,q=console.warn;break;default:G=p,q=console.error;break}d(q,G)}},z=[T],B={debug(..._){if(Q("debug"))for(let p of z)p.write("debug",_)},info(..._){if(Q("info"))for(let p of z)p.write("info",_)},warn(..._){if(Q("warn"))for(let p of z)p.write("warn",_)},error(..._){if(Q("error"))for(let p of z)p.write("error",_)},setLevel(_){Z=_},getLevel(){return Z},addSink(_){z.push(_)},removeSink(_){let p=z.indexOf(_);if(p>=0)z.splice(p,1)},removeConsoleSink(){let _=z.indexOf(T);if(_>=0)z.splice(_,1)}};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aria-cli/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"require": "./dist-cjs/index.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "vitest run --config vitest.config.ts",
|
|
16
|
+
"dev": "tsc --watch"
|
|
17
|
+
},
|
|
14
18
|
"devDependencies": {
|
|
15
19
|
"typescript": "^5.9.3",
|
|
16
20
|
"vitest": "^4.0.18"
|
|
@@ -21,8 +25,7 @@
|
|
|
21
25
|
"!**/*.map",
|
|
22
26
|
"!**/*.tsbuildinfo"
|
|
23
27
|
],
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"dev": "tsc --watch"
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=20.0.0"
|
|
27
30
|
}
|
|
28
|
-
}
|
|
31
|
+
}
|