@iaforged/context-code 2.3.9 → 2.4.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/context-bootstrap.js
CHANGED
|
@@ -9,10 +9,10 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
9
9
|
const __filename = fileURLToPath(import.meta.url)
|
|
10
10
|
const cliArgs = process.argv.slice(2)
|
|
11
11
|
|
|
12
|
-
// Context Code usa `~/.
|
|
12
|
+
// Context Code usa `~/.contextcli` como home dir. Setear ambas vars: la nueva
|
|
13
13
|
// (CONTEXT_CONFIG_DIR) es la preferida; CLAUDE_CONFIG_DIR se mantiene como
|
|
14
14
|
// alias por compatibilidad con codigo heredado de upstream.
|
|
15
|
-
const ctxHome = join(homedir(), '.
|
|
15
|
+
const ctxHome = join(homedir(), '.contextcli')
|
|
16
16
|
if (!process.env.CONTEXT_CONFIG_DIR) {
|
|
17
17
|
process.env.CONTEXT_CONFIG_DIR = ctxHome
|
|
18
18
|
}
|
package/contextcode-bootstrap.js
CHANGED
|
@@ -16,7 +16,7 @@ const cliArgs = process.argv.slice(2)
|
|
|
16
16
|
|
|
17
17
|
// Setear ambas vars: CONTEXT_CONFIG_DIR es la preferida; CLAUDE_CONFIG_DIR
|
|
18
18
|
// se mantiene como alias por compatibilidad con codigo heredado.
|
|
19
|
-
const ctxHome = join(homedir(), '.
|
|
19
|
+
const ctxHome = join(homedir(), '.contextcli')
|
|
20
20
|
if (!process.env.CONTEXT_CONFIG_DIR) {
|
|
21
21
|
process.env.CONTEXT_CONFIG_DIR = ctxHome
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,Aa as r,Ba as i,C as a,Ca as o,Da as l,Ea as u,J as h,P as p,Q as b,a as g,aa as w,c as d,d as v,f,h as
|
|
1
|
+
import{A as e,Aa as r,Ba as i,C as a,Ca as o,Da as l,Ea as u,J as h,P as p,Q as b,a as g,aa as w,c as d,d as v,f as E,h as f,i as m,j as y,k as O,l as k,m as T,o as C,pa as A,q as I,r as P,s as S,t as M,wa as N,xa as D,ya as W,za as L}from"./chunk-VAB2VXFI.js";var _="Service workers are disabled or not supported by this browser",x=class{serviceWorker;worker;registration;events;constructor(e,r){if(this.serviceWorker=e,e){let i=null,a=new v;this.worker=new d(e=>(null!==i&&e.next(i),a.subscribe(r=>e.next(r))));let s=()=>{let{controller:r}=e;null!==r&&(i=r,a.next(i))};e.addEventListener("controllerchange",s),s(),this.registration=this.worker.pipe(O(()=>e.getRegistration()));let o=new v;this.events=o.asObservable();let c=e=>{let{data:r}=e;r?.type&&o.next(r)};e.addEventListener("message",c),r?.get(b,null,{optional:!0})?.onDestroy(()=>{e.removeEventListener("controllerchange",s),e.removeEventListener("message",c)})}else this.worker=this.events=this.registration=new d(e=>e.error(new k(5601,!1)))}postMessage(e,r){return new Promise(i=>{this.worker.pipe(y(1)).subscribe(a=>{a.postMessage(g({action:e},r)),i()})})}postMessageWithOperation(e,r,i){let a=this.waitForOperationCompleted(i),o=this.postMessage(e,r);return Promise.all([o,a]).then(([,e])=>e)}generateNonce(){return Math.round(1e7*Math.random())}eventsOfType(e){let r;return r="string"==typeof e?r=>r.type===e:r=>e.includes(r.type),this.events.pipe(m(r))}nextEventOfType(e){return this.eventsOfType(e).pipe(y(1))}waitForOperationCompleted(e){return new Promise((r,i)=>{this.eventsOfType("OPERATION_COMPLETED").pipe(m(r=>r.nonce===e),y(1),E(e=>{if(void 0!==e.result)return e.result;throw new Error(e.error)})).subscribe({next:r,error:i})})}get isEnabled(){return!!this.serviceWorker}},V=(()=>{class n{sw;messages;notificationClicks;subscription;get isEnabled(){return this.sw.isEnabled}pushManager=null;subscriptionChanges=new v;constructor(e){if(this.sw=e,!e.isEnabled)return this.messages=f,this.notificationClicks=f,void(this.subscription=f);this.messages=this.sw.eventsOfType("PUSH").pipe(E(e=>e.data)),this.notificationClicks=this.sw.eventsOfType("NOTIFICATION_CLICK").pipe(E(e=>e.data)),this.pushManager=this.sw.registration.pipe(E(e=>e.pushManager));let r=this.pushManager.pipe(O(e=>e.getSubscription()));this.subscription=new d(e=>{let i=r.subscribe(e),a=this.subscriptionChanges.subscribe(e);return()=>{i.unsubscribe(),a.unsubscribe()}})}requestSubscription(e){if(!this.sw.isEnabled||null===this.pushManager)return Promise.reject(new Error(_));let r={userVisibleOnly:!0},i=this.decodeBase64(e.serverPublicKey.replace(/_/g,"/").replace(/-/g,"+")),a=new Uint8Array(new ArrayBuffer(i.length));for(let e=0;e<i.length;e++)a[e]=i.charCodeAt(e);return r.applicationServerKey=a,new Promise((e,i)=>{this.pushManager.pipe(O(e=>e.subscribe(r)),y(1)).subscribe({next:r=>{this.subscriptionChanges.next(r),e(r)},error:i})})}unsubscribe(){if(!this.sw.isEnabled)return Promise.reject(new Error(_));let t=e=>{if(null===e)throw new k(5602,!1);return e.unsubscribe().then(e=>{if(!e)throw new k(5603,!1);this.subscriptionChanges.next(null)})};return new Promise((e,r)=>{this.subscription.pipe(y(1),O(t)).subscribe({next:e,error:r})})}decodeBase64(e){return atob(e)}static ɵfac=function(e){return new(e||n)(P(x))};static ɵprov=C({token:n,factory:n.ɵfac})}return n})(),F=(()=>{class n{sw;versionUpdates;unrecoverable;get isEnabled(){return this.sw.isEnabled}constructor(e){if(this.sw=e,!e.isEnabled)return this.versionUpdates=f,void(this.unrecoverable=f);this.versionUpdates=this.sw.eventsOfType(["VERSION_DETECTED","VERSION_INSTALLATION_FAILED","VERSION_READY","NO_NEW_VERSION_DETECTED"]),this.unrecoverable=this.sw.eventsOfType("UNRECOVERABLE_STATE")}checkForUpdate(){if(!this.sw.isEnabled)return Promise.reject(new Error(_));let e=this.sw.generateNonce();return this.sw.postMessageWithOperation("CHECK_FOR_UPDATES",{nonce:e},e)}activateUpdate(){if(!this.sw.isEnabled)return Promise.reject(new k(5601,!1));let e=this.sw.generateNonce();return this.sw.postMessageWithOperation("ACTIVATE_UPDATE",{nonce:e},e)}static ɵfac=function(e){return new(e||n)(P(x))};static ɵprov=C({token:n,factory:n.ɵfac})}return n})(),R=new I("");function X(){let e=S(U);if(!("serviceWorker"in navigator)||!1===e.enabled)return;let r=S(R),i=S(a),o=S(b);i.runOutsideAngular(()=>{let e=navigator.serviceWorker,s=()=>e.controller?.postMessage({action:"INITIALIZE"});e.addEventListener("controllerchange",s),o.onDestroy(()=>{e.removeEventListener("controllerchange",s)})}),i.runOutsideAngular(()=>{let i,{registrationStrategy:a}=e;if("function"==typeof a)i=new Promise(e=>a().subscribe(()=>e()));else{let[e,...r]=(a||"registerWhenStable:30000").split(":");switch(e){case"registerImmediately":i=Promise.resolve();break;case"registerWithDelay":i=q(+r[0]||0);break;case"registerWhenStable":i=Promise.race([o.whenStable(),q(+r[0])]);break;default:throw new k(5600,!1)}}i.then(()=>{o.destroyed||navigator.serviceWorker.register(r,{scope:e.scope}).catch(e=>console.error(T(5604,!1)))})})}function q(e){return new Promise(r=>setTimeout(r,e))}function ee(e,r){return new x(!1!==e.enabled?navigator.serviceWorker:void 0,r)}var U=class{enabled;scope;registrationStrategy};N(class n{constructor(){this.auth=S(l),this.socket=S(u)}ngOnInit(){this.auth.hasToken()&&this.socket.connect()}static{this.ɵfac=function(e){return new(e||n)}}static{this.ɵcmp=h({type:n,selectors:[["cx-root"]],decls:1,vars:0,template:function(e,r){1&e&&w(0,"router-outlet")},dependencies:[L],encapsulation:2,changeDetection:0})}},{providers:[i([{path:"",redirectTo:"chat",pathMatch:"full"},{path:"login",loadComponent:()=>import("./chunk-NFYBHCXF.js").then(e=>e.LoginComponent)},{path:"chat",canActivate:[()=>{let e=S(l),i=S(r);return!!e.hasToken()||(i.navigate(["/login"]),!1)}],loadComponent:()=>import("./chunk-AMCDNAIG.js").then(e=>e.ChatComponent)},{path:"**",redirectTo:"chat"}],o()),D(W()),function(r,i={}){return M([V,F,{provide:R,useValue:r},{provide:U,useValue:i},{provide:x,useFactory:ee,deps:[U,e]},p(X)])}("ngsw-worker.js",{enabled:!A(),registrationStrategy:"registerWhenStable:30000"})]}).catch(e=>console.error("[webapp] bootstrap error",e));
|
package/package.json
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iaforged/context-code",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Context Code es un asistente de desarrollo para la terminal. Puede revisar tu proyecto, editar archivos, ejecutar comandos y apoyarte en tareas reales de programacion.",
|
|
5
5
|
"author": "Context AI",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": "./dist/context-bootstrap.js",
|
|
10
|
-
"./core": {
|
|
11
|
-
"types": "./src/core/index.ts",
|
|
12
|
-
"default": "./dist/src/core/index.js"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
8
|
"bin": {
|
|
16
9
|
"context": "context-bootstrap.js",
|
|
17
10
|
"context-recovery": "context-bootstrap.js",
|
|
@@ -20,7 +13,6 @@
|
|
|
20
13
|
"engines": {
|
|
21
14
|
"node": ">=18.0.0"
|
|
22
15
|
},
|
|
23
|
-
"packageManager": "pnpm@11.1.2",
|
|
24
16
|
"files": [
|
|
25
17
|
"context-bootstrap.js",
|
|
26
18
|
"contextcode-bootstrap.js",
|
|
@@ -151,34 +143,6 @@
|
|
|
151
143
|
"@whiskeysockets/baileys": "7.0.0-rc.9"
|
|
152
144
|
},
|
|
153
145
|
"scripts": {
|
|
154
|
-
"
|
|
155
|
-
"dev:code": "pnpm --dir ../webapp run build && pnpm build:fast && node ./contextcode-bootstrap.js",
|
|
156
|
-
"build": "tsc -p tsconfig.json && node ./scripts/postprocess-build.mjs && node ./scripts/minify-dist.mjs",
|
|
157
|
-
"build:fast": "tsc -p tsconfig.json && node ./scripts/postprocess-build.mjs",
|
|
158
|
-
"smoke:provider-parity": "pnpm build:fast && node ./dist/src/core/providers/providerParitySmoke.js",
|
|
159
|
-
"smoke:core-query-wiring": "pnpm build:fast && node ./dist/src/core/query/wiring.smoke.js",
|
|
160
|
-
"smoke:core-all": "pnpm build:fast && node ./dist/src/core/query/wiring.smoke.js && node ./dist/src/core/tools/fileResolution.smoke.js && node ./dist/src/core/tools/filesCore.smoke.js && node ./dist/src/core/tools/notebookParity.smoke.js && node ./dist/src/core/tools/imageParity.smoke.js && node ./dist/src/core/tools/pdfParity.smoke.js && node ./dist/src/core/providers/providerParitySmoke.js && node ./dist/src/core/skills/runtime.smoke.js && node ./dist/src/core/syncFlags.smoke.js && node ./dist/src/core/tasks/persistence.smoke.js",
|
|
161
|
-
"pubpackages": "bash ./scripts/pubpackages.sh",
|
|
162
|
-
"prepublishOnly": "node ./scripts/preflight-check.mjs",
|
|
163
|
-
"docs:dev": "pnpm --dir ../../docs docs:dev",
|
|
164
|
-
"docs:build": "pnpm --dir ../../docs docs:build",
|
|
165
|
-
"docs:preview": "pnpm --dir ../../docs docs:preview",
|
|
166
|
-
"docs:open": "pnpm --dir ../../docs docs:open"
|
|
167
|
-
},
|
|
168
|
-
"pnpm": {
|
|
169
|
-
"onlyBuiltDependencies": [
|
|
170
|
-
"cpu-features",
|
|
171
|
-
"ssh2"
|
|
172
|
-
]
|
|
173
|
-
},
|
|
174
|
-
"devDependencies": {
|
|
175
|
-
"@types/bun": "^1.3.14",
|
|
176
|
-
"@types/node": "^25.8.0",
|
|
177
|
-
"@types/node-notifier": "^8.0.5",
|
|
178
|
-
"@types/react": "^19.2.14",
|
|
179
|
-
"@types/react-reconciler": "^0.33.0",
|
|
180
|
-
"@types/ssh2": "^1.15.5",
|
|
181
|
-
"terser": "^5.47.1",
|
|
182
|
-
"typescript": "^5.9.3"
|
|
146
|
+
"prepublishOnly": "node ./scripts/preflight-check.mjs"
|
|
183
147
|
}
|
|
184
148
|
}
|