qlogicagent 2.18.7 → 2.18.9
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/README.md +382 -382
- package/dist/cli.js +1 -1
- package/dist/default-project-knowledge/INSTRUCTIONS.md +7 -7
- package/dist/default-project-knowledge/rules/project-workflow.md +6 -6
- package/dist/index.js +469 -489
- package/dist/pet-host.js +19 -0
- package/dist/runtime/infra/mcp-bridge-server.js +275 -275
- package/dist/skills/builtin/desktop-screenshot/SKILL.md +62 -62
- package/dist/skills/builtin/office-doc-reading/SKILL.md +19 -19
- package/dist/skills/mcp/astraclaw-native-mcp-server.js +7 -7
- package/dist/types/cli/core-tools/registry.d.ts +1 -2
- package/dist/types/cli/handlers/turn-handler.d.ts +1 -1
- package/dist/types/cli/handlers/workflow-compute-handler.d.ts +8 -0
- package/dist/types/cli/rpc-registry.d.ts +0 -13
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +2 -5
- package/dist/types/cli/stdio-server.d.ts +0 -3
- package/dist/types/contracts/structured-planner.d.ts +2 -0
- package/dist/types/orchestration/solo-evaluator.d.ts +7 -2
- package/dist/types/pet-host.d.ts +9 -0
- package/dist/types/protocol/wire/acp-protocol.d.ts +7 -0
- package/dist/types/runtime/pet/pet-reaction-engine.d.ts +1 -1
- package/dist/types/skills/mcp/mcp-manager.d.ts +4 -0
- package/dist/types/workflow-host.d.ts +33 -0
- package/dist/vendor/hatch-pet/LICENSE.txt +201 -201
- package/dist/vendor/hatch-pet/NOTICE.md +25 -25
- package/dist/vendor/hatch-pet/references/animation-rows.md +29 -29
- package/dist/vendor/hatch-pet/references/codex-pet-contract.md +35 -35
- package/dist/vendor/hatch-pet/references/qa-rubric.md +66 -66
- package/dist/vendor/hatch-pet/scripts/compose_atlas.py +169 -169
- package/dist/vendor/hatch-pet/scripts/derive_running_left_from_running_right.py +150 -150
- package/dist/vendor/hatch-pet/scripts/extract_strip_frames.py +408 -408
- package/dist/vendor/hatch-pet/scripts/inspect_frames.py +256 -256
- package/dist/vendor/hatch-pet/scripts/make_contact_sheet.py +96 -96
- package/dist/vendor/hatch-pet/scripts/prepare_pet_run.py +834 -834
- package/dist/vendor/hatch-pet/scripts/render_animation_previews.py +78 -78
- package/dist/vendor/hatch-pet/scripts/validate_atlas.py +157 -157
- package/dist/workflow-host.js +13 -0
- package/package.json +16 -2
- package/dist/types/cli/core-tools/cron-tool-bootstrap.d.ts +0 -8
- package/dist/types/cli/core-tools/cron-workflow-service.d.ts +0 -7
- package/dist/types/cli/handlers/pet-handler.d.ts +0 -49
- package/dist/types/cli/handlers/workflow-handler.d.ts +0 -182
- package/dist/types/cli/tool-bootstrap-workflow-registration.d.ts +0 -7
- package/dist/types/cli/workflow-host-adapter.d.ts +0 -31
- package/dist/types/orchestration/workflow/workflow-service.d.ts +0 -14
- package/dist/types/skills/tools/cron-tool.d.ts +0 -96
- package/dist/types/skills/tools/petdex-create-tool.d.ts +0 -47
- package/dist/types/skills/tools/workflow-tool.d.ts +0 -45
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { AgentRpcError } from "../protocol/wire/index.js";
|
|
2
|
-
import type { MultiAgentHandlerHost } from "./multi-agent-handler-host.js";
|
|
3
|
-
import type { WorkflowHandlerHost } from "./handlers/workflow-handler.js";
|
|
4
|
-
/**
|
|
5
|
-
* WorkflowHostAdapter — the host the legacy `workflow.*` JSON-RPC domain binds to.
|
|
6
|
-
*
|
|
7
|
-
* The workflow handlers (workflow.create/run/list/onImMessage/onWebhook/…) need MORE than the
|
|
8
|
-
* agents/solo/product sub-host provides: `toolCatalog` (workflow `tool` nodes look up real
|
|
9
|
-
* qlogicagent tools via `findTool`) plus the lazy engine slots that `ensureWorkflowController`
|
|
10
|
-
* fills (controller/store/scheduler/processManager). The multi-agent sub-host has neither, so
|
|
11
|
-
* binding workflow there left `this.toolCatalog` undefined — a workflow `tool` node would throw
|
|
12
|
-
* "Cannot read properties of undefined (reading 'findTool')" at run time. This adapter supplies
|
|
13
|
-
* the missing pieces explicitly, mirroring createDreamHostAdapter / createAcpExtendedHostAdapter.
|
|
14
|
-
*
|
|
15
|
-
* `acpDetector` is sourced from the multi-agent sub-host so workflow `agent` nodes resolve the same
|
|
16
|
-
* canonical external descriptors that the `agents.*` domain configures. The engine slots are plain
|
|
17
|
-
* own-properties this (per-agent singleton) adapter owns and `ensureWorkflowController` mutates once;
|
|
18
|
-
* keeping them here means the controller it publishes via setWorkflowController stays a singleton and
|
|
19
|
-
* the multi-agent sub-host is no longer polluted with workflow state.
|
|
20
|
-
*/
|
|
21
|
-
export interface WorkflowHostAdapterDeps {
|
|
22
|
-
multiAgentHost: MultiAgentHandlerHost;
|
|
23
|
-
getActiveProjectRoot(): string;
|
|
24
|
-
getToolCatalog(): WorkflowHandlerHost["toolCatalog"];
|
|
25
|
-
handleMcpToolCall: WorkflowHandlerHost["handleMcpToolCall"];
|
|
26
|
-
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
27
|
-
sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
|
|
28
|
-
/** 激活层(S3c §1.6):gateway-routed delegate 桥(懒读;gateway 未声明 delegate 能力位时 undefined)。 */
|
|
29
|
-
getDelegateBridge?: WorkflowHandlerHost["getDelegateBridge"];
|
|
30
|
-
}
|
|
31
|
-
export declare function createWorkflowHostAdapter(deps: WorkflowHostAdapterDeps): WorkflowHandlerHost;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Process-level WorkflowController singleton (single-track, D17 "one store / one engine").
|
|
3
|
-
*
|
|
4
|
-
* The ACP workflow-handler builds the fully-wired controller (real ExecutorHost: agent/tool/mcp)
|
|
5
|
-
* and publishes it here. The agent-facing `workflow` tool resolves the same instance so authoring
|
|
6
|
-
* (create/patch) and running share one engine + one store. When the engine has not been
|
|
7
|
-
* initialized (e.g. a bare CLI tool turn before any ACP workflow call), callers that only need
|
|
8
|
-
* authoring can fall back to a store-only controller; `run` fail-louds (no silent no-op).
|
|
9
|
-
*/
|
|
10
|
-
import type { WorkflowController } from "./workflow-controller.js";
|
|
11
|
-
/** Publish the fully-wired controller (called by ensureWorkflowController). */
|
|
12
|
-
export declare function setWorkflowController(ctrl: WorkflowController): void;
|
|
13
|
-
/** The live, run-capable controller, or null if the engine has not been initialized yet. */
|
|
14
|
-
export declare function getWorkflowController(): WorkflowController | null;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const CRON_TOOL_NAME: "cron";
|
|
3
|
-
export type CronAction = "create" | "list" | "get" | "update" | "delete" | "pause" | "resume" | "trigger";
|
|
4
|
-
export interface CronToolParams {
|
|
5
|
-
action: CronAction;
|
|
6
|
-
/** Job ID (required for get/update/delete/pause/resume/trigger) */
|
|
7
|
-
jobId?: string;
|
|
8
|
-
/** Task prompt to execute on schedule */
|
|
9
|
-
prompt?: string;
|
|
10
|
-
/** Cron expression or shorthand ('5m', '1h', '0 9 * * *') */
|
|
11
|
-
schedule?: string;
|
|
12
|
-
/** Human-readable job name */
|
|
13
|
-
name?: string;
|
|
14
|
-
/** Whether the job is enabled */
|
|
15
|
-
enabled?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const CRON_TOOL_SCHEMA: {
|
|
18
|
-
readonly type: "object";
|
|
19
|
-
readonly properties: {
|
|
20
|
-
readonly action: {
|
|
21
|
-
readonly type: "string";
|
|
22
|
-
readonly enum: readonly ["create", "list", "get", "update", "delete", "pause", "resume", "trigger"];
|
|
23
|
-
readonly description: "Workflow-backed action: create/list/get/update/delete/pause/resume/trigger.";
|
|
24
|
-
};
|
|
25
|
-
readonly jobId: {
|
|
26
|
-
readonly type: "string";
|
|
27
|
-
readonly description: "Job ID. Required for get/update/delete/pause/resume/trigger.";
|
|
28
|
-
};
|
|
29
|
-
readonly prompt: {
|
|
30
|
-
readonly type: "string";
|
|
31
|
-
readonly description: "Task prompt to execute on schedule. Required for create.";
|
|
32
|
-
};
|
|
33
|
-
readonly schedule: {
|
|
34
|
-
readonly type: "string";
|
|
35
|
-
readonly description: string;
|
|
36
|
-
};
|
|
37
|
-
readonly name: {
|
|
38
|
-
readonly type: "string";
|
|
39
|
-
readonly description: "Human-readable job name.";
|
|
40
|
-
};
|
|
41
|
-
readonly enabled: {
|
|
42
|
-
readonly type: "boolean";
|
|
43
|
-
readonly description: "Whether the job is enabled (for update).";
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
readonly required: readonly ["action"];
|
|
47
|
-
};
|
|
48
|
-
export interface CronJob {
|
|
49
|
-
id: string;
|
|
50
|
-
name: string;
|
|
51
|
-
prompt: string;
|
|
52
|
-
schedule: string;
|
|
53
|
-
scheduleDisplay: string;
|
|
54
|
-
state: "scheduled" | "paused";
|
|
55
|
-
enabled: boolean;
|
|
56
|
-
nextRunAt?: string;
|
|
57
|
-
lastRunAt?: string;
|
|
58
|
-
lastStatus?: "success" | "error" | null;
|
|
59
|
-
}
|
|
60
|
-
export interface CronResult {
|
|
61
|
-
success: boolean;
|
|
62
|
-
job?: CronJob;
|
|
63
|
-
jobs?: CronJob[];
|
|
64
|
-
error?: string;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Host-provided cron scheduler backend.
|
|
68
|
-
* Jobs are persisted locally and survive restarts.
|
|
69
|
-
*/
|
|
70
|
-
export interface CronToolDeps {
|
|
71
|
-
createJob(params: {
|
|
72
|
-
prompt: string;
|
|
73
|
-
schedule: string;
|
|
74
|
-
name?: string;
|
|
75
|
-
repeat?: number | null;
|
|
76
|
-
allowedTools?: string[];
|
|
77
|
-
}): Promise<CronResult>;
|
|
78
|
-
listJobs(): Promise<CronResult>;
|
|
79
|
-
getJob(jobId: string): Promise<CronResult>;
|
|
80
|
-
updateJob(jobId: string, updates: Partial<{
|
|
81
|
-
prompt: string;
|
|
82
|
-
schedule: string;
|
|
83
|
-
name: string;
|
|
84
|
-
enabled: boolean;
|
|
85
|
-
repeat: number | null;
|
|
86
|
-
allowedTools: string[];
|
|
87
|
-
}>): Promise<CronResult>;
|
|
88
|
-
deleteJob(jobId: string): Promise<CronResult>;
|
|
89
|
-
pauseJob(jobId: string): Promise<CronResult>;
|
|
90
|
-
resumeJob(jobId: string): Promise<CronResult>;
|
|
91
|
-
triggerJob(jobId: string): Promise<CronResult>;
|
|
92
|
-
/** Validate cron schedule expression. Returns error or null. */
|
|
93
|
-
validateSchedule?(schedule: string): string | null;
|
|
94
|
-
}
|
|
95
|
-
export declare const MAX_CRON_JOBS = 50;
|
|
96
|
-
export declare function createCronTool(deps: CronToolDeps): PortableTool<CronToolParams>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
import type { GeneratePetdexImage, UploadPetdexReferenceImage } from "@xiaozhiclaw/pet-core";
|
|
3
|
-
export declare const PETDEX_CREATE_TOOL_NAME: "petdex_create";
|
|
4
|
-
export interface PetdexCreateToolParams {
|
|
5
|
-
name?: string;
|
|
6
|
-
description: string;
|
|
7
|
-
prompt?: string;
|
|
8
|
-
reference_image_url?: string;
|
|
9
|
-
base_spritesheet_path?: string;
|
|
10
|
-
output_dir?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface PetdexCreateToolDeps {
|
|
13
|
-
generateImage: GeneratePetdexImage;
|
|
14
|
-
uploadReferenceImage?: UploadPetdexReferenceImage;
|
|
15
|
-
resolveOutputDir(outputDir?: string): string;
|
|
16
|
-
}
|
|
17
|
-
export declare const PETDEX_CREATE_TOOL_SCHEMA: {
|
|
18
|
-
readonly type: "object";
|
|
19
|
-
readonly properties: {
|
|
20
|
-
readonly name: {
|
|
21
|
-
readonly type: "string";
|
|
22
|
-
readonly description: "Short display name for the generated desktop pet. Defaults to a short name derived from description.";
|
|
23
|
-
};
|
|
24
|
-
readonly description: {
|
|
25
|
-
readonly type: "string";
|
|
26
|
-
readonly description: "Canonical character description for the Petdex desktop pet.";
|
|
27
|
-
};
|
|
28
|
-
readonly prompt: {
|
|
29
|
-
readonly type: "string";
|
|
30
|
-
readonly description: "Optional extra visual direction. The tool will embed it into a strict Petdex 8x9 atlas prompt.";
|
|
31
|
-
};
|
|
32
|
-
readonly reference_image_url: {
|
|
33
|
-
readonly type: "string";
|
|
34
|
-
readonly description: "Optional publicly accessible HTTP/HTTPS reference image URL for image-to-image generation.";
|
|
35
|
-
};
|
|
36
|
-
readonly base_spritesheet_path: {
|
|
37
|
-
readonly type: "string";
|
|
38
|
-
readonly description: "Optional existing spritesheet.webp path; used as the identity reference to regenerate the whole atlas while keeping the same character.";
|
|
39
|
-
};
|
|
40
|
-
readonly output_dir: {
|
|
41
|
-
readonly type: "string";
|
|
42
|
-
readonly description: "Optional output directory. Defaults to the workspace Petdex asset output directory.";
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
readonly required: readonly ["description"];
|
|
46
|
-
};
|
|
47
|
-
export declare function createPetdexCreateTool(deps: PetdexCreateToolDeps): PortableTool<PetdexCreateToolParams>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export type WorkflowAction = "list" | "get" | "describe" | "create" | "patch" | "setActive" | "run" | "delete";
|
|
3
|
-
export interface WorkflowToolParams {
|
|
4
|
-
action: WorkflowAction;
|
|
5
|
-
workflowId?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
def?: Record<string, unknown>;
|
|
8
|
-
patch?: unknown[];
|
|
9
|
-
baseRev?: number;
|
|
10
|
-
scope?: string[];
|
|
11
|
-
active?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface WorkflowToolRecord {
|
|
14
|
-
id: string;
|
|
15
|
-
name?: string;
|
|
16
|
-
rev?: number;
|
|
17
|
-
active?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface WorkflowRunOutcome {
|
|
20
|
-
status?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface WorkflowToolService {
|
|
23
|
-
list(): Promise<WorkflowToolRecord[]>;
|
|
24
|
-
get(id: string): Promise<unknown>;
|
|
25
|
-
describe(id: string): Promise<string>;
|
|
26
|
-
create(input: {
|
|
27
|
-
id: string;
|
|
28
|
-
name: string;
|
|
29
|
-
def: Record<string, unknown>;
|
|
30
|
-
active: boolean;
|
|
31
|
-
}): Promise<WorkflowToolRecord>;
|
|
32
|
-
patch(id: string, envelope: {
|
|
33
|
-
patch: unknown[];
|
|
34
|
-
baseRev?: number;
|
|
35
|
-
scope?: string[];
|
|
36
|
-
}): Promise<unknown>;
|
|
37
|
-
setActive(id: string, active: boolean): Promise<WorkflowToolRecord>;
|
|
38
|
-
run(id: string): Promise<WorkflowRunOutcome>;
|
|
39
|
-
delete(id: string): Promise<void>;
|
|
40
|
-
}
|
|
41
|
-
export interface WorkflowToolDeps {
|
|
42
|
-
/** Resolve the host-owned workflow service port. Keeps skills independent from orchestration internals. */
|
|
43
|
-
getService(): WorkflowToolService;
|
|
44
|
-
}
|
|
45
|
-
export declare function createWorkflowTool(deps: WorkflowToolDeps): PortableTool<WorkflowToolParams>;
|