neoctl 0.2.13 → 0.2.14
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/agents/agent-activity.js +11 -1
- package/dist/agents/agent-activity.js.map +1 -1
- package/dist/agents/local-agent-task.d.ts +1 -1
- package/dist/core/image-registry.js +4 -1
- package/dist/core/image-registry.js.map +1 -1
- package/dist/core/message-pipeline.js +16 -2
- package/dist/core/message-pipeline.js.map +1 -1
- package/dist/core/query-engine.d.ts +2 -0
- package/dist/core/query-engine.js +8 -4
- package/dist/core/query-engine.js.map +1 -1
- package/dist/core/query.js +6 -2
- package/dist/core/query.js.map +1 -1
- package/dist/repl/index.js +34 -86
- package/dist/repl/index.js.map +1 -1
- package/dist/tools/builtins/exec-tool.d.ts +1 -0
- package/dist/tools/builtins/exec-tool.js.map +1 -1
- package/dist/tools/builtins/image-generation-tool.d.ts +4 -0
- package/dist/tools/builtins/image-generation-tool.js +179 -52
- package/dist/tools/builtins/image-generation-tool.js.map +1 -1
- package/dist/web/index.d.ts +17 -1
- package/dist/web/index.js +33 -12
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/release-local.mjs +42 -0
|
@@ -56,6 +56,10 @@ try {
|
|
|
56
56
|
console.log("[release-local] --no-publish: skipping npm publish");
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
if (!skipPublish) {
|
|
60
|
+
await waitForPublishedVersion(packageName, targetVersion, registry, root);
|
|
61
|
+
}
|
|
62
|
+
|
|
59
63
|
if (!skipInstall) {
|
|
60
64
|
await run("npm", ["install", "-g", `${packageName}@${targetVersion}`, "--registry", registry], { cwd: root });
|
|
61
65
|
} else {
|
|
@@ -122,6 +126,26 @@ async function writeTempNpmrc(registry, token) {
|
|
|
122
126
|
return file;
|
|
123
127
|
}
|
|
124
128
|
|
|
129
|
+
async function waitForPublishedVersion(packageName, targetVersion, registry, cwd) {
|
|
130
|
+
const deadline = Date.now() + 180_000;
|
|
131
|
+
console.log(`[release-local] waiting for ${packageName}@${targetVersion} to be visible on ${registry}`);
|
|
132
|
+
while (Date.now() < deadline) {
|
|
133
|
+
const result = await runCapture("npm", ["view", packageName, "version", "--registry", registry], { cwd });
|
|
134
|
+
const version = result.stdout.trim();
|
|
135
|
+
if (result.code === 0 && version === targetVersion) {
|
|
136
|
+
console.log(`[release-local] registry version visible: ${version}`);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
console.log(`[release-local] registry version is ${version || "unavailable"}; retrying...`);
|
|
140
|
+
await delay(5_000);
|
|
141
|
+
}
|
|
142
|
+
throw new Error(`Timed out waiting for ${packageName}@${targetVersion} to be visible on ${registry}`);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function delay(ms) {
|
|
146
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
147
|
+
}
|
|
148
|
+
|
|
125
149
|
function run(command, commandArgs, options = {}) {
|
|
126
150
|
console.log(`[release-local] $ ${command} ${commandArgs.map(quoteArg).join(" ")}`);
|
|
127
151
|
return new Promise((resolve, reject) => {
|
|
@@ -139,6 +163,24 @@ function run(command, commandArgs, options = {}) {
|
|
|
139
163
|
});
|
|
140
164
|
}
|
|
141
165
|
|
|
166
|
+
function runCapture(command, commandArgs, options = {}) {
|
|
167
|
+
console.log(`[release-local] $ ${command} ${commandArgs.map(quoteArg).join(" ")}`);
|
|
168
|
+
return new Promise((resolve, reject) => {
|
|
169
|
+
const child = spawn(command, commandArgs, {
|
|
170
|
+
cwd: options.cwd,
|
|
171
|
+
shell: process.platform === "win32",
|
|
172
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
173
|
+
env: process.env,
|
|
174
|
+
});
|
|
175
|
+
let stdout = "";
|
|
176
|
+
let stderr = "";
|
|
177
|
+
child.stdout.on("data", (chunk) => { stdout += String(chunk); });
|
|
178
|
+
child.stderr.on("data", (chunk) => { stderr += String(chunk); });
|
|
179
|
+
child.on("error", reject);
|
|
180
|
+
child.on("exit", (code, signal) => resolve({ code: code ?? 1, signal, stdout, stderr }));
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
142
184
|
function quoteArg(arg) {
|
|
143
185
|
return /\s/.test(arg) ? JSON.stringify(arg) : arg;
|
|
144
186
|
}
|