@zhiman_innies/innies-codex 0.122.15 → 0.122.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.
@@ -0,0 +1,38 @@
1
+ {
2
+ "models": [
3
+ {
4
+ "slug": "qwen3.6-plus",
5
+ "display_name": "qwen3.6-plus",
6
+ "description": "DashScope Qwen 3.6 Plus model.",
7
+ "supported_reasoning_levels": [],
8
+ "shell_type": "shell_command",
9
+ "visibility": "list",
10
+ "supported_in_api": true,
11
+ "priority": 1,
12
+ "upgrade": null,
13
+ "base_instructions": "You are Codex, a coding agent based on GPT-5. You and the user share the same workspace and collaborate to achieve the user's goals.\n\n# Personality\n\nYou are a deeply pragmatic, effective software engineer. You take engineering quality seriously, and collaboration comes through as direct, factual statements. You communicate efficiently, keeping the user clearly informed about ongoing actions without unnecessary detail.\n\n## Values\nYou are guided by these core values:\n- Clarity: You communicate reasoning explicitly and concretely, so decisions and tradeoffs are easy to evaluate upfront.\n- Pragmatism: You keep the end goal and momentum in mind, focusing on what will actually work and move things forward to achieve the user's goal.\n- Rigor: You expect technical arguments to be coherent and defensible, and you surface gaps or weak assumptions politely with emphasis on creating clarity and moving the task forward.\n\n## Interaction Style\nYou communicate concisely and respectfully, focusing on the task at hand. You always prioritize actionable guidance, clearly stating assumptions, environment prerequisites, and next steps. Unless explicitly asked, you avoid excessively verbose explanations about your work.\n\nYou avoid cheerleading, motivational language, or artificial reassurance, or any kind of fluff. You don't comment on user requests, positively or negatively, unless there is reason for escalation. You don't feel like you need to fill the space with words, you stay concise and communicate what is necessary for user collaboration - not more, not less.\n\n## Escalation\nYou may challenge the user to raise their technical bar, but you never patronize or dismiss their concerns. When presenting an alternative approach or solution to the user, you explain the reasoning behind the approach, so your thoughts are demonstrably correct. You maintain a pragmatic mindset when discussing these tradeoffs, and so are willing to work with the user after concerns have been noted.\n\n# General\n\n- When searching for text or files, prefer using `rg` or `rg --files` respectively because `rg` is much faster than alternatives like `grep`. (If the `rg` command is not found, then use alternatives.)\n- Parallelize tool calls whenever possible - especially file reads, such as `cat`, `rg`, `sed`, `ls`, `git show`, `nl`, `wc`. Use `multi_tool_use.parallel` to parallelize tool calls and only this.\n\n## Editing constraints\n\n- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.\n- Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like \"Assigns the value to the variable\", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.\n- Try to use apply_patch for single file edits, but it is fine to explore other options to make the edit if it does not work well. Do not use apply_patch for changes that are auto-generated (i.e. generating package.json or running a lint or format command like gofmt) or when scripting is more efficient (such as search and replacing a string across a codebase).\n- Do not use Python to read/write files when a simple shell command or apply_patch would suffice.\n- You may be in a dirty git worktree.\n * NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.\n * If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.\n * If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.\n * If the changes are in unrelated files, just ignore them and don't revert them.\n- Never amend a commit unless explicitly requested to do so.\n- If asked to work with unstaged changes in files that you are editing, treat those changes as user-owned unless the user explicitly says they are yours.\n- **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless explicitly requested.\n\n## Special user requests\n\n- If the user asks for a \"review\", default to a code review mindset: prioritize identifying bugs, risks, behavioral regressions, and missing tests. Findings first, then questions/assumptions, then change summary.\n\n## Presenting your work and final message\n\nYou are producing plain text that will later be styled by the CLI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value.\n\n- Default: be very concise; friendly coding teammate tone.\n- Ask only when needed; suggest ideas; mirror the user's style.\n- For substantial work, summarize clearly.\n- Skip heavy formatting for simple confirmations.\n- Don't dump large files you've written; reference paths only.\n- No \"save/copy this file\".\n",
14
+ "model_messages": null,
15
+ "supports_reasoning_summaries": false,
16
+ "default_reasoning_summary": "auto",
17
+ "support_verbosity": false,
18
+ "default_verbosity": null,
19
+ "apply_patch_tool_type": null,
20
+ "web_search_tool_type": "text",
21
+ "truncation_policy": {
22
+ "mode": "tokens",
23
+ "limit": 10000
24
+ },
25
+ "supports_parallel_tool_calls": false,
26
+ "supports_image_detail_original": false,
27
+ "context_window": 131072,
28
+ "max_context_window": 131072,
29
+ "auto_compact_token_limit": 117964,
30
+ "effective_context_window_percent": 95,
31
+ "experimental_supported_tools": [],
32
+ "input_modalities": [
33
+ "text"
34
+ ],
35
+ "supports_search_tool": false
36
+ }
37
+ ]
38
+ }
package/bin/innies.js CHANGED
@@ -3,11 +3,166 @@
3
3
  import os from "node:os";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
6
+ import { fileURLToPath } from "node:url";
6
7
 
7
- if (!process.env.CODEX_HOME) {
8
- process.env.CODEX_HOME = path.join(os.homedir(), ".inniescoder");
9
- }
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+ const DEFAULT_MODEL = "qwen3.6-plus";
11
+ const LEGACY_MODELS = new Set(["qwen-plus", "qwen-plus-latest"]);
12
+ const DEFAULT_HOME_DIR = ".inniescoder";
13
+ const INNIES_HOME_ENV_VAR = "INNIES_HOME";
14
+ const DEFAULT_CATALOG_FILENAME = "catalog.json";
15
+ const DEFAULT_CONFIG_FILENAME = "config.toml";
16
+ const DASHSCOPE_PROVIDER_HEADER = "[model_providers.dashscope]";
17
+ const ROOT_MANAGED_SETTINGS = Object.freeze([
18
+ ['model_provider', 'model_provider = "dashscope"'],
19
+ ["model", `model = "${DEFAULT_MODEL}"`],
20
+ ["model_catalog_json", null],
21
+ ['model_reasoning_effort', 'model_reasoning_effort = "none"'],
22
+ ]);
23
+
24
+ const codexHome = resolveInniesHome();
25
+ process.env[INNIES_HOME_ENV_VAR] = codexHome;
26
+ process.env.CODEX_HOME = codexHome;
27
+ fs.mkdirSync(codexHome, { recursive: true });
10
28
 
11
- fs.mkdirSync(process.env.CODEX_HOME, { recursive: true });
29
+ ensureInniesHomeDefaults(codexHome);
12
30
 
13
31
  await import("./codex.js");
32
+
33
+ function ensureInniesHomeDefaults(homeDir) {
34
+ const catalogPath = path.join(homeDir, DEFAULT_CATALOG_FILENAME);
35
+ ensureInniesCatalog(catalogPath);
36
+ ensureInniesConfig(path.join(homeDir, DEFAULT_CONFIG_FILENAME), catalogPath);
37
+ }
38
+
39
+ function defaultCatalogAssetPath() {
40
+ return path.join(__dirname, "..", "assets", "innies-catalog.json");
41
+ }
42
+
43
+ function loadDefaultCatalog() {
44
+ return JSON.parse(fs.readFileSync(defaultCatalogAssetPath(), "utf8"));
45
+ }
46
+
47
+ function writeJsonFile(filePath, value) {
48
+ fs.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`);
49
+ }
50
+
51
+ function ensureInniesCatalog(catalogPath) {
52
+ const defaultCatalog = loadDefaultCatalog();
53
+ if (!fs.existsSync(catalogPath)) {
54
+ writeJsonFile(catalogPath, defaultCatalog);
55
+ return;
56
+ }
57
+
58
+ let existingCatalog;
59
+ try {
60
+ existingCatalog = JSON.parse(fs.readFileSync(catalogPath, "utf8"));
61
+ } catch {
62
+ return;
63
+ }
64
+
65
+ if (shouldReplaceLegacyCatalog(existingCatalog)) {
66
+ writeJsonFile(catalogPath, defaultCatalog);
67
+ }
68
+ }
69
+
70
+ function shouldReplaceLegacyCatalog(catalog) {
71
+ if (!catalog || !Array.isArray(catalog.models)) {
72
+ return false;
73
+ }
74
+
75
+ const slugs = catalog.models
76
+ .map((model) => model?.slug)
77
+ .filter((slug) => typeof slug === "string");
78
+
79
+ if (slugs.length === 0) {
80
+ return true;
81
+ }
82
+
83
+ if (slugs.length === 1 && slugs[0] === DEFAULT_MODEL) {
84
+ return false;
85
+ }
86
+
87
+ return slugs.some((slug) => LEGACY_MODELS.has(slug));
88
+ }
89
+
90
+ function ensureInniesConfig(configPath, catalogPath) {
91
+ if (!fs.existsSync(configPath)) {
92
+ fs.writeFileSync(configPath, defaultInniesConfig(catalogPath));
93
+ return;
94
+ }
95
+
96
+ const existing = fs.readFileSync(configPath, "utf8");
97
+ const updated = normalizeInniesConfig(existing, catalogPath);
98
+ if (updated !== existing) {
99
+ fs.writeFileSync(configPath, updated);
100
+ }
101
+ }
102
+
103
+ function defaultInniesConfig(catalogPath) {
104
+ return [
105
+ 'model_provider = "dashscope"',
106
+ `model = "${DEFAULT_MODEL}"`,
107
+ `model_catalog_json = ${JSON.stringify(catalogPath)}`,
108
+ 'model_reasoning_effort = "none"',
109
+ "",
110
+ DASHSCOPE_PROVIDER_HEADER,
111
+ 'name = "DashScope"',
112
+ 'base_url = "https://dashscope.aliyuncs.com/compatible-mode/v1"',
113
+ 'wire_api = "responses"',
114
+ 'env_key = "DASHSCOPE_API_KEY"',
115
+ "",
116
+ ].join("\n");
117
+ }
118
+
119
+ function resolveInniesHome() {
120
+ return process.env[INNIES_HOME_ENV_VAR] || path.join(os.homedir(), DEFAULT_HOME_DIR);
121
+ }
122
+
123
+ function normalizeInniesConfig(contents, catalogPath) {
124
+ if (contents.trim() === "") {
125
+ return defaultInniesConfig(catalogPath);
126
+ }
127
+
128
+ const managedSettings = ROOT_MANAGED_SETTINGS.map(([key, line]) => [
129
+ key,
130
+ key === "model_catalog_json"
131
+ ? `model_catalog_json = ${JSON.stringify(catalogPath)}`
132
+ : line,
133
+ ]);
134
+ const unmanagedContents = stripManagedRootSettings(contents).trim();
135
+ let updated = `${managedSettings.map(([, line]) => line).join("\n")}\n`;
136
+
137
+ if (unmanagedContents !== "") {
138
+ updated = `${updated}\n${unmanagedContents}\n`;
139
+ } else {
140
+ updated = `${updated}\n`;
141
+ }
142
+
143
+ if (!updated.includes(DASHSCOPE_PROVIDER_HEADER)) {
144
+ updated = `${updated.trimEnd()}\n\n${defaultDashscopeProviderBlock()}\n`;
145
+ }
146
+
147
+ return updated;
148
+ }
149
+
150
+ function stripManagedRootSettings(contents) {
151
+ let stripped = contents;
152
+ for (const [key] of ROOT_MANAGED_SETTINGS) {
153
+ const settingPattern = new RegExp(`^\\s*${key}\\s*=.*(?:\\r?\\n)?`, "gm");
154
+ stripped = stripped.replace(settingPattern, "");
155
+ }
156
+
157
+ return stripped.replace(/\n{3,}/g, "\n\n");
158
+ }
159
+
160
+ function defaultDashscopeProviderBlock() {
161
+ return [
162
+ DASHSCOPE_PROVIDER_HEADER,
163
+ 'name = "DashScope"',
164
+ 'base_url = "https://dashscope.aliyuncs.com/compatible-mode/v1"',
165
+ 'wire_api = "responses"',
166
+ 'env_key = "DASHSCOPE_API_KEY"',
167
+ ].join("\n");
168
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhiman_innies/innies-codex",
3
- "version": "0.122.15",
3
+ "version": "0.122.17",
4
4
  "license": "Apache-2.0",
5
5
  "bin": {
6
6
  "innies": "bin/innies.js"
@@ -10,7 +10,8 @@
10
10
  "node": ">=16"
11
11
  },
12
12
  "files": [
13
- "bin"
13
+ "bin",
14
+ "assets"
14
15
  ],
15
16
  "repository": {
16
17
  "type": "git",
@@ -19,7 +20,7 @@
19
20
  },
20
21
  "packageManager": "pnpm@10.29.3+sha512.498e1fb4cca5aa06c1dcf2611e6fafc50972ffe7189998c409e90de74566444298ffe43e6cd2acdc775ba1aa7cc5e092a8b7054c811ba8c5770f84693d33d2dc",
21
22
  "optionalDependencies": {
22
- "@zhiman_innies/innies-codex-darwin-x64": "0.122.15-darwin-x64",
23
- "@zhiman_innies/innies-codex-darwin-arm64": "0.122.15-darwin-arm64"
23
+ "@zhiman_innies/innies-codex-darwin-x64": "0.122.17-darwin-x64",
24
+ "@zhiman_innies/innies-codex-darwin-arm64": "0.122.17-darwin-arm64"
24
25
  }
25
26
  }