feat(FN-5102): complete Step 4 and 5 — verify and document
Fusion-Task-Id: FN-5102 Fusion-Task-Lineage: 13be2941-176e-4a6e-b6fc-2bb644f7444a
This commit is contained in:
committed by
gsxdsm
parent
a43c0cfb18
commit
cc6bd1e724
5
.changeset/FN-5102-agent-tracking.md
Normal file
5
.changeset/FN-5102-agent-tracking.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@runfusion/fusion": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Agent-filed tasks now persist `githubTracking.enabled` when tracking defaults are enabled, so pi/engine-created tasks consistently appear as tracked and trigger GitHub tracking hooks like UI-created tasks.
|
||||||
@@ -7,8 +7,10 @@ import { TaskStore, setTaskCreatedHook } from "@fusion/core";
|
|||||||
import { HeartbeatMonitor } from "../agent-heartbeat.js";
|
import { HeartbeatMonitor } from "../agent-heartbeat.js";
|
||||||
import { createDelegateTaskTool, createTaskCreateTool } from "../agent-tools.js";
|
import { createDelegateTaskTool, createTaskCreateTool } from "../agent-tools.js";
|
||||||
|
|
||||||
const githubTrackingHookModulePromise: Promise<any> = import("../../../dashboard/src/github-tracking-hook.js");
|
const githubTrackingHookEntry = "../../../dashboard/src/github-tracking-hook.js";
|
||||||
const githubTrackingModulePromise: Promise<any> = import("../../../dashboard/src/github-tracking.js");
|
const githubTrackingEntry = "../../../dashboard/src/github-tracking.js";
|
||||||
|
const githubTrackingHookModulePromise: Promise<any> = import(/* @vite-ignore */ githubTrackingHookEntry);
|
||||||
|
const githubTrackingModulePromise: Promise<any> = import(/* @vite-ignore */ githubTrackingEntry);
|
||||||
|
|
||||||
function makeTmpDir(prefix: string): string {
|
function makeTmpDir(prefix: string): string {
|
||||||
return mkdtempSync(join(tmpdir(), prefix));
|
return mkdtempSync(join(tmpdir(), prefix));
|
||||||
|
|||||||
@@ -96,11 +96,11 @@ describe("createAgentTask githubTracking prefill", () => {
|
|||||||
await rm(globalDir, { recursive: true, force: true });
|
await rm(globalDir, { recursive: true, force: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
async function createViaAgentTask(params: Record<string, unknown> = {}): Promise<{ githubTracking?: { enabled?: boolean; repoOverride?: string } }> {
|
async function createViaAgentTask(params: Partial<{ githubTracking: { enabled?: boolean; repoOverride?: string } }> = {}): Promise<{ githubTracking?: { enabled?: boolean; repoOverride?: string } }> {
|
||||||
const created = await createAgentTask(store, {
|
const created = await createAgentTask(store, {
|
||||||
description: "tracking defaults task",
|
description: "tracking defaults task",
|
||||||
source: { sourceType: "api" },
|
source: { sourceType: "api" },
|
||||||
...(params as never),
|
...params,
|
||||||
});
|
});
|
||||||
const task = await store.getTask(created.task.id);
|
const task = await store.getTask(created.task.id);
|
||||||
return task;
|
return task;
|
||||||
|
|||||||
Reference in New Issue
Block a user