indusagi 0.13.11 → 0.13.12
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/agent.js +82 -3
- package/dist/ai.js +82 -3
- package/dist/cli.js +58 -7
- package/dist/index.js +152 -19
- package/dist/llmgateway.js +47 -2
- package/dist/mcp.js +94 -12
- package/dist/react-host/jsx-dev-runtime.js +93 -0
- package/dist/react-ink.js +11 -5
- package/dist/runtime.js +47 -2
- package/dist/shell-app.js +58 -7
- package/dist/smithy.js +47 -2
- package/dist/swarm.js +47 -2
- package/dist/types/facade/ml/auth-store.d.ts +7 -0
- package/dist/types/facade/ml/auth-store.test.d.ts +1 -0
- package/dist/types/facade/ml/models.generated.d.ts +108 -0
- package/dist/types/react-host/jsx-dev-runtime.d.ts +3 -0
- package/dist/types/react-host/loader.d.ts +1 -0
- package/dist/types/security/private-state.d.ts +3 -0
- package/dist/zoho.js +94 -12
- package/package.json +7 -2
|
@@ -4664,6 +4664,60 @@ export declare const MODELS: {
|
|
|
4664
4664
|
contextWindow: number;
|
|
4665
4665
|
maxTokens: number;
|
|
4666
4666
|
};
|
|
4667
|
+
readonly "gpt-6-sol": {
|
|
4668
|
+
id: string;
|
|
4669
|
+
name: string;
|
|
4670
|
+
api: "openai-responses";
|
|
4671
|
+
provider: string;
|
|
4672
|
+
baseUrl: string;
|
|
4673
|
+
reasoning: true;
|
|
4674
|
+
reasoningEfforts: "high"[];
|
|
4675
|
+
input: ("text" | "image")[];
|
|
4676
|
+
cost: {
|
|
4677
|
+
input: number;
|
|
4678
|
+
output: number;
|
|
4679
|
+
cacheRead: number;
|
|
4680
|
+
cacheWrite: number;
|
|
4681
|
+
};
|
|
4682
|
+
longContextPricing: {
|
|
4683
|
+
threshold: number;
|
|
4684
|
+
multipliers: {
|
|
4685
|
+
input: number;
|
|
4686
|
+
output: number;
|
|
4687
|
+
cacheRead: number;
|
|
4688
|
+
cacheWrite: number;
|
|
4689
|
+
};
|
|
4690
|
+
};
|
|
4691
|
+
contextWindow: number;
|
|
4692
|
+
maxTokens: number;
|
|
4693
|
+
};
|
|
4694
|
+
readonly "gpt-6-luna": {
|
|
4695
|
+
id: string;
|
|
4696
|
+
name: string;
|
|
4697
|
+
api: "openai-responses";
|
|
4698
|
+
provider: string;
|
|
4699
|
+
baseUrl: string;
|
|
4700
|
+
reasoning: true;
|
|
4701
|
+
reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max")[];
|
|
4702
|
+
input: ("text" | "image")[];
|
|
4703
|
+
cost: {
|
|
4704
|
+
input: number;
|
|
4705
|
+
output: number;
|
|
4706
|
+
cacheRead: number;
|
|
4707
|
+
cacheWrite: number;
|
|
4708
|
+
};
|
|
4709
|
+
longContextPricing: {
|
|
4710
|
+
threshold: number;
|
|
4711
|
+
multipliers: {
|
|
4712
|
+
input: number;
|
|
4713
|
+
output: number;
|
|
4714
|
+
cacheRead: number;
|
|
4715
|
+
cacheWrite: number;
|
|
4716
|
+
};
|
|
4717
|
+
};
|
|
4718
|
+
contextWindow: number;
|
|
4719
|
+
maxTokens: number;
|
|
4720
|
+
};
|
|
4667
4721
|
readonly "gpt-5.6-sol": {
|
|
4668
4722
|
id: string;
|
|
4669
4723
|
name: string;
|
|
@@ -5152,6 +5206,60 @@ export declare const MODELS: {
|
|
|
5152
5206
|
contextWindow: number;
|
|
5153
5207
|
maxTokens: number;
|
|
5154
5208
|
};
|
|
5209
|
+
readonly "gpt-6-sol": {
|
|
5210
|
+
id: string;
|
|
5211
|
+
name: string;
|
|
5212
|
+
api: "openai-codex-responses";
|
|
5213
|
+
provider: string;
|
|
5214
|
+
baseUrl: string;
|
|
5215
|
+
reasoning: true;
|
|
5216
|
+
reasoningEfforts: "high"[];
|
|
5217
|
+
input: ("text" | "image")[];
|
|
5218
|
+
cost: {
|
|
5219
|
+
input: number;
|
|
5220
|
+
output: number;
|
|
5221
|
+
cacheRead: number;
|
|
5222
|
+
cacheWrite: number;
|
|
5223
|
+
};
|
|
5224
|
+
longContextPricing: {
|
|
5225
|
+
threshold: number;
|
|
5226
|
+
multipliers: {
|
|
5227
|
+
input: number;
|
|
5228
|
+
output: number;
|
|
5229
|
+
cacheRead: number;
|
|
5230
|
+
cacheWrite: number;
|
|
5231
|
+
};
|
|
5232
|
+
};
|
|
5233
|
+
contextWindow: number;
|
|
5234
|
+
maxTokens: number;
|
|
5235
|
+
};
|
|
5236
|
+
readonly "gpt-6-luna": {
|
|
5237
|
+
id: string;
|
|
5238
|
+
name: string;
|
|
5239
|
+
api: "openai-codex-responses";
|
|
5240
|
+
provider: string;
|
|
5241
|
+
baseUrl: string;
|
|
5242
|
+
reasoning: true;
|
|
5243
|
+
reasoningEfforts: ("low" | "medium" | "high" | "xhigh" | "max")[];
|
|
5244
|
+
input: ("text" | "image")[];
|
|
5245
|
+
cost: {
|
|
5246
|
+
input: number;
|
|
5247
|
+
output: number;
|
|
5248
|
+
cacheRead: number;
|
|
5249
|
+
cacheWrite: number;
|
|
5250
|
+
};
|
|
5251
|
+
longContextPricing: {
|
|
5252
|
+
threshold: number;
|
|
5253
|
+
multipliers: {
|
|
5254
|
+
input: number;
|
|
5255
|
+
output: number;
|
|
5256
|
+
cacheRead: number;
|
|
5257
|
+
cacheWrite: number;
|
|
5258
|
+
};
|
|
5259
|
+
};
|
|
5260
|
+
contextWindow: number;
|
|
5261
|
+
maxTokens: number;
|
|
5262
|
+
};
|
|
5155
5263
|
};
|
|
5156
5264
|
readonly opencode: {
|
|
5157
5265
|
readonly "big-pickle": {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function loadHostReact(): Promise<typeof import("react")>;
|
|
2
2
|
export declare function loadHostJsxRuntime(): Promise<typeof import("react/jsx-runtime")>;
|
|
3
|
+
export declare function loadHostJsxDevRuntime(): Promise<typeof import("react/jsx-dev-runtime")>;
|
|
3
4
|
export declare function loadHostInk(): Promise<typeof import("ink")>;
|
package/dist/zoho.js
CHANGED
|
@@ -840,8 +840,96 @@ function platformOpenCommand(url) {
|
|
|
840
840
|
}
|
|
841
841
|
|
|
842
842
|
// src/facade/mcp-core/oauth/token-store.ts
|
|
843
|
-
import {
|
|
844
|
-
|
|
843
|
+
import { join } from "node:path";
|
|
844
|
+
|
|
845
|
+
// src/security/private-state.ts
|
|
846
|
+
import {
|
|
847
|
+
chmodSync,
|
|
848
|
+
closeSync,
|
|
849
|
+
constants,
|
|
850
|
+
fchmodSync,
|
|
851
|
+
fstatSync,
|
|
852
|
+
lstatSync,
|
|
853
|
+
mkdirSync,
|
|
854
|
+
openSync,
|
|
855
|
+
readFileSync,
|
|
856
|
+
renameSync,
|
|
857
|
+
rmSync,
|
|
858
|
+
writeFileSync
|
|
859
|
+
} from "node:fs";
|
|
860
|
+
import { randomUUID } from "node:crypto";
|
|
861
|
+
import { dirname } from "node:path";
|
|
862
|
+
var NO_FOLLOW = constants.O_NOFOLLOW ?? 0;
|
|
863
|
+
var isPosix = () => process.platform !== "win32";
|
|
864
|
+
function assertOwned(uid, path) {
|
|
865
|
+
if (!isPosix() || process.getuid === void 0) return;
|
|
866
|
+
if (uid !== process.getuid()) throw new Error(`Refusing sensitive path not owned by the current user: ${path}`);
|
|
867
|
+
}
|
|
868
|
+
function ensurePrivateDirectorySync(path) {
|
|
869
|
+
try {
|
|
870
|
+
const current = lstatSync(path);
|
|
871
|
+
if (current.isSymbolicLink() || !current.isDirectory()) throw new Error(`Refusing non-directory sensitive state path: ${path}`);
|
|
872
|
+
assertOwned(current.uid, path);
|
|
873
|
+
} catch (error) {
|
|
874
|
+
if (error.code !== "ENOENT") throw error;
|
|
875
|
+
mkdirSync(path, { recursive: true, mode: 448 });
|
|
876
|
+
}
|
|
877
|
+
if (isPosix()) chmodSync(path, 448);
|
|
878
|
+
}
|
|
879
|
+
function validateExistingFile(path) {
|
|
880
|
+
try {
|
|
881
|
+
const current = lstatSync(path);
|
|
882
|
+
if (current.isSymbolicLink() || !current.isFile()) throw new Error(`Refusing non-regular sensitive file: ${path}`);
|
|
883
|
+
assertOwned(current.uid, path);
|
|
884
|
+
} catch (error) {
|
|
885
|
+
if (error.code === "ENOENT") return;
|
|
886
|
+
throw error;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
function readPrivateFileSync(path) {
|
|
890
|
+
ensurePrivateDirectorySync(dirname(path));
|
|
891
|
+
validateExistingFile(path);
|
|
892
|
+
let fd;
|
|
893
|
+
try {
|
|
894
|
+
fd = openSync(path, constants.O_RDONLY | NO_FOLLOW);
|
|
895
|
+
} catch (error) {
|
|
896
|
+
if (error.code === "ENOENT") return null;
|
|
897
|
+
throw error;
|
|
898
|
+
}
|
|
899
|
+
try {
|
|
900
|
+
const current = fstatSync(fd);
|
|
901
|
+
if (!current.isFile()) throw new Error(`Refusing non-regular sensitive file: ${path}`);
|
|
902
|
+
assertOwned(current.uid, path);
|
|
903
|
+
if (isPosix()) fchmodSync(fd, 384);
|
|
904
|
+
return readFileSync(fd, "utf8");
|
|
905
|
+
} finally {
|
|
906
|
+
closeSync(fd);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
function atomicWritePrivateFileSync(path, content) {
|
|
910
|
+
ensurePrivateDirectorySync(dirname(path));
|
|
911
|
+
validateExistingFile(path);
|
|
912
|
+
const temporary = `${path}.tmp-${process.pid}-${randomUUID()}`;
|
|
913
|
+
let fd;
|
|
914
|
+
try {
|
|
915
|
+
fd = openSync(temporary, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | NO_FOLLOW, 384);
|
|
916
|
+
writeFileSync(fd, content, "utf8");
|
|
917
|
+
if (isPosix()) fchmodSync(fd, 384);
|
|
918
|
+
closeSync(fd);
|
|
919
|
+
fd = void 0;
|
|
920
|
+
renameSync(temporary, path);
|
|
921
|
+
if (isPosix()) chmodSync(path, 384);
|
|
922
|
+
} catch (error) {
|
|
923
|
+
if (fd !== void 0) closeSync(fd);
|
|
924
|
+
try {
|
|
925
|
+
rmSync(temporary, { force: true });
|
|
926
|
+
} catch {
|
|
927
|
+
}
|
|
928
|
+
throw error;
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
// src/facade/mcp-core/oauth/token-store.ts
|
|
845
933
|
function defaultCredentialsDir() {
|
|
846
934
|
const xdg = process.env.XDG_CONFIG_HOME;
|
|
847
935
|
const home = process.env.HOME ?? process.env.USERPROFILE ?? "";
|
|
@@ -858,10 +946,11 @@ function credentialsPath(credentialsDir, id) {
|
|
|
858
946
|
}
|
|
859
947
|
function readMcpOAuthState(credentialsDir, id) {
|
|
860
948
|
const path = credentialsPath(credentialsDir, id);
|
|
861
|
-
if (!existsSync(path)) return void 0;
|
|
862
949
|
let raw;
|
|
863
950
|
try {
|
|
864
|
-
|
|
951
|
+
const stored = readPrivateFileSync(path);
|
|
952
|
+
if (stored === null) return void 0;
|
|
953
|
+
raw = stored;
|
|
865
954
|
} catch (e) {
|
|
866
955
|
return void 0;
|
|
867
956
|
}
|
|
@@ -876,15 +965,8 @@ function readMcpOAuthState(credentialsDir, id) {
|
|
|
876
965
|
}
|
|
877
966
|
function writeMcpOAuthState(credentialsDir, state) {
|
|
878
967
|
const path = credentialsPath(credentialsDir, state.id);
|
|
879
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
880
|
-
const tmp = `${path}.tmp-${process.pid}-${Date.now()}`;
|
|
881
968
|
const json = JSON.stringify({ ...state, updatedAt: Date.now() }, null, 2);
|
|
882
|
-
|
|
883
|
-
renameSync(tmp, path);
|
|
884
|
-
try {
|
|
885
|
-
chmodSync(path, 384);
|
|
886
|
-
} catch {
|
|
887
|
-
}
|
|
969
|
+
atomicWritePrivateFileSync(path, json);
|
|
888
970
|
}
|
|
889
971
|
function clearMcpOAuthState(credentialsDir, id) {
|
|
890
972
|
const path = credentialsPath(credentialsDir, id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "indusagi",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.12",
|
|
4
4
|
"description": "Indusagi — a terminal-first AI coding agent framework. Clean-room implementation.",
|
|
5
5
|
"author": "Varun Israni",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"@types/react": "^18.3.30",
|
|
139
139
|
"esbuild": "^0.28.0",
|
|
140
140
|
"typescript": "^5.7.2",
|
|
141
|
-
"vitest": "^
|
|
141
|
+
"vitest": "^4.1.11"
|
|
142
142
|
},
|
|
143
143
|
"dependencies": {
|
|
144
144
|
"@anthropic-ai/sdk": "^0.100.1",
|
|
@@ -162,5 +162,10 @@
|
|
|
162
162
|
"strip-ansi": "^7.2.0",
|
|
163
163
|
"ulid": "^3.0.2",
|
|
164
164
|
"zod": "^4.4.3"
|
|
165
|
+
},
|
|
166
|
+
"overrides": {
|
|
167
|
+
"fast-uri": "3.1.6",
|
|
168
|
+
"hono": "4.13.5",
|
|
169
|
+
"qs": "6.16.0"
|
|
165
170
|
}
|
|
166
171
|
}
|