fifony 0.1.14-next.bc6cdbf → 0.1.14-next.d3eed09
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.
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
const CACHE_VERSION = "
|
|
1
|
+
const CACHE_VERSION = "1773771126039";
|
|
2
2
|
const CORE_CACHE = `fifony-core-${CACHE_VERSION}`;
|
|
3
3
|
const ASSET_CACHE = `fifony-assets-${CACHE_VERSION}`;
|
|
4
|
-
const APP_SHELL_ROUTES = ["/kanban", "/issues", "/agents", "/
|
|
4
|
+
const APP_SHELL_ROUTES = ["/kanban", "/issues", "/agents", "/settings", "/onboarding"];
|
|
5
5
|
const APP_SHELL_FILES = ["/offline.html", "/manifest.webmanifest", "/icon.svg", "/icon-maskable.svg"];
|
|
6
6
|
const API_PREFIXES = ["/api/", "/docs", "/ws"];
|
|
7
7
|
|
|
8
8
|
self.addEventListener("install", (event) => {
|
|
9
9
|
event.waitUntil((async () => {
|
|
10
10
|
const cache = await caches.open(CORE_CACHE);
|
|
11
|
-
|
|
11
|
+
// Cache each route individually so one failure doesn't block the rest
|
|
12
|
+
await Promise.allSettled(
|
|
13
|
+
[...APP_SHELL_ROUTES, ...APP_SHELL_FILES].map(async (url) => {
|
|
14
|
+
try {
|
|
15
|
+
const response = await fetch(url);
|
|
16
|
+
if (response.ok) await cache.put(url, response);
|
|
17
|
+
} catch {}
|
|
18
|
+
}),
|
|
19
|
+
);
|
|
12
20
|
await self.skipWaiting();
|
|
13
21
|
})());
|
|
14
22
|
});
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
const CACHE_VERSION = "__BUILD_TIMESTAMP__";
|
|
2
2
|
const CORE_CACHE = `fifony-core-${CACHE_VERSION}`;
|
|
3
3
|
const ASSET_CACHE = `fifony-assets-${CACHE_VERSION}`;
|
|
4
|
-
const APP_SHELL_ROUTES = ["/kanban", "/issues", "/agents", "/
|
|
4
|
+
const APP_SHELL_ROUTES = ["/kanban", "/issues", "/agents", "/settings", "/onboarding"];
|
|
5
5
|
const APP_SHELL_FILES = ["/offline.html", "/manifest.webmanifest", "/icon.svg", "/icon-maskable.svg"];
|
|
6
6
|
const API_PREFIXES = ["/api/", "/docs", "/ws"];
|
|
7
7
|
|
|
8
8
|
self.addEventListener("install", (event) => {
|
|
9
9
|
event.waitUntil((async () => {
|
|
10
10
|
const cache = await caches.open(CORE_CACHE);
|
|
11
|
-
|
|
11
|
+
// Cache each route individually so one failure doesn't block the rest
|
|
12
|
+
await Promise.allSettled(
|
|
13
|
+
[...APP_SHELL_ROUTES, ...APP_SHELL_FILES].map(async (url) => {
|
|
14
|
+
try {
|
|
15
|
+
const response = await fetch(url);
|
|
16
|
+
if (response.ok) await cache.put(url, response);
|
|
17
|
+
} catch {}
|
|
18
|
+
}),
|
|
19
|
+
);
|
|
12
20
|
await self.skipWaiting();
|
|
13
21
|
})());
|
|
14
22
|
});
|
package/dist/agent/run-local.js
CHANGED
|
@@ -5212,23 +5212,22 @@ async function generatePlan(title, description, config, workflowDefinition, opti
|
|
|
5212
5212
|
const prompt = await buildPlanPrompt(title, description, fast);
|
|
5213
5213
|
const tempDir = mkdtempSync2(join11(tmpdir2(), "fifony-plan-"));
|
|
5214
5214
|
const promptFile = join11(tempDir, "fifony-plan-prompt.md");
|
|
5215
|
-
const envFile = join11(tempDir, "fifony-plan-env.sh");
|
|
5216
5215
|
writeFileSync5(promptFile, `${prompt}
|
|
5217
5216
|
`, "utf8");
|
|
5218
|
-
writeFileSync5(envFile, [
|
|
5219
|
-
`export FIFONY_PROMPT_FILE=${JSON.stringify(promptFile)}`,
|
|
5220
|
-
`export FIFONY_AGENT_PROVIDER=${JSON.stringify(preferred)}`
|
|
5221
|
-
].join("\n"), "utf8");
|
|
5222
|
-
const wrappedCommand = `. "${envFile}" && ${command}`;
|
|
5223
5217
|
let lastProgressPersist = 0;
|
|
5224
5218
|
const PROGRESS_INTERVAL_MS = 2e3;
|
|
5225
5219
|
const output = await new Promise((resolve4, reject) => {
|
|
5226
5220
|
let stdout2 = "";
|
|
5227
|
-
const child = spawn4(
|
|
5221
|
+
const child = spawn4(command, {
|
|
5228
5222
|
shell: true,
|
|
5229
5223
|
cwd: tempDir,
|
|
5230
5224
|
detached: true,
|
|
5231
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
5225
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
5226
|
+
env: {
|
|
5227
|
+
...process.env,
|
|
5228
|
+
FIFONY_PROMPT_FILE: promptFile,
|
|
5229
|
+
FIFONY_AGENT_PROVIDER: preferred
|
|
5230
|
+
}
|
|
5232
5231
|
});
|
|
5233
5232
|
child.unref();
|
|
5234
5233
|
child.stdin?.end();
|
|
@@ -5353,21 +5352,20 @@ async function refinePlan(issue, feedback, config, workflowDefinition) {
|
|
|
5353
5352
|
const prompt = await buildRefinePrompt(issue.title, issue.description, issue.plan, feedback);
|
|
5354
5353
|
const tempDir = mkdtempSync2(join11(tmpdir2(), "fifony-refine-"));
|
|
5355
5354
|
const promptFile = join11(tempDir, "fifony-refine-prompt.md");
|
|
5356
|
-
const envFile = join11(tempDir, "fifony-refine-env.sh");
|
|
5357
5355
|
writeFileSync5(promptFile, `${prompt}
|
|
5358
5356
|
`, "utf8");
|
|
5359
|
-
writeFileSync5(envFile, [
|
|
5360
|
-
`export FIFONY_PROMPT_FILE=${JSON.stringify(promptFile)}`,
|
|
5361
|
-
`export FIFONY_AGENT_PROVIDER=${JSON.stringify(preferred)}`
|
|
5362
|
-
].join("\n"), "utf8");
|
|
5363
|
-
const wrappedCommand = `. "${envFile}" && ${command}`;
|
|
5364
5357
|
const output = await new Promise((resolve4, reject) => {
|
|
5365
5358
|
let stdout2 = "";
|
|
5366
|
-
const child = spawn4(
|
|
5359
|
+
const child = spawn4(command, {
|
|
5367
5360
|
shell: true,
|
|
5368
5361
|
cwd: tempDir,
|
|
5369
5362
|
detached: true,
|
|
5370
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
5363
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
5364
|
+
env: {
|
|
5365
|
+
...process.env,
|
|
5366
|
+
FIFONY_PROMPT_FILE: promptFile,
|
|
5367
|
+
FIFONY_AGENT_PROVIDER: preferred
|
|
5368
|
+
}
|
|
5371
5369
|
});
|
|
5372
5370
|
child.unref();
|
|
5373
5371
|
child.stdin?.end();
|
|
@@ -6311,10 +6309,15 @@ async function startApiServer(state, port, workflowDefinition) {
|
|
|
6311
6309
|
if (!issue) {
|
|
6312
6310
|
return c.json({ ok: false, error: "Issue not found" }, 404);
|
|
6313
6311
|
}
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6312
|
+
try {
|
|
6313
|
+
await updater(issue);
|
|
6314
|
+
await persistState(state);
|
|
6315
|
+
wakeScheduler();
|
|
6316
|
+
return c.json({ ok: true, issue });
|
|
6317
|
+
} catch (error) {
|
|
6318
|
+
logger.error({ err: error, issueId }, "[API] mutateIssueState failed");
|
|
6319
|
+
return c.json({ ok: false, error: error instanceof Error ? error.message : String(error) }, 500);
|
|
6320
|
+
}
|
|
6318
6321
|
};
|
|
6319
6322
|
const resourceConfigs = Object.fromEntries(
|
|
6320
6323
|
NATIVE_RESOURCE_CONFIGS.map((resourceConfig) => [
|