@xiaozhiclaw/qlogicagent-core 0.6.7 → 0.6.8
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 +18 -0
- package/dist/automation.js +1 -0
- package/dist/index.js +10 -10
- package/dist/types/contracts/tool-execution-evidence.d.ts +0 -7
- package/dist/types/embedded/automation.d.ts +27 -0
- package/dist/types/embedded/index.d.ts +4 -0
- package/dist/types/embedded/task-recovery.d.ts +17 -0
- package/package.json +10 -1
|
@@ -16,10 +16,3 @@ export declare function classifyToolFailureKind(result: {
|
|
|
16
16
|
error?: string;
|
|
17
17
|
details?: Record<string, unknown>;
|
|
18
18
|
}): ToolCallExecutionEvidence["failureKind"];
|
|
19
|
-
export declare function summarizeToolExecutionOutcomes(toolCalls: readonly Pick<ToolCallExecutionEvidence, "name" | "status">[], blockedToolCalls: readonly {
|
|
20
|
-
name: string;
|
|
21
|
-
reason: string;
|
|
22
|
-
}[]): {
|
|
23
|
-
failedTools: string[];
|
|
24
|
-
blockedTools: string[];
|
|
25
|
-
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Local wall-clock trigger contract; the host supplies its UTC offset explicitly. */
|
|
2
|
+
export type AutomationCalendarSchedule = {
|
|
3
|
+
frequency: "daily" | "weekly" | "monthly" | "yearly";
|
|
4
|
+
time: string;
|
|
5
|
+
weekday?: number;
|
|
6
|
+
monthDay?: number;
|
|
7
|
+
month?: number;
|
|
8
|
+
};
|
|
9
|
+
export type AutomationSchedule = AutomationCalendarSchedule | {
|
|
10
|
+
frequency: "once";
|
|
11
|
+
at: string;
|
|
12
|
+
} | {
|
|
13
|
+
frequency: "interval";
|
|
14
|
+
every: number;
|
|
15
|
+
unit: "minutes" | "hours";
|
|
16
|
+
startAt: string;
|
|
17
|
+
};
|
|
18
|
+
export interface AutomationOccurrence {
|
|
19
|
+
scheduledAt: string;
|
|
20
|
+
scheduledDay: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function validAutomationSchedule(value: unknown): value is AutomationSchedule;
|
|
23
|
+
/** Latest due occurrence, including the preceding calendar occurrence before today's trigger.
|
|
24
|
+
* No timers, persistence, catch-up jobs, business reporting windows or external effects.
|
|
25
|
+
* Hosts atomically deduplicate scheduledAt in their own authenticated occurrence store.
|
|
26
|
+
* Offsets are fixed: a host using daylight-saving rules must resolve the relevant offset. */
|
|
27
|
+
export declare function automationOccurrence(schedule: AutomationSchedule, now: Date, utcOffsetMinutes: number): AutomationOccurrence | null;
|
|
@@ -16,5 +16,9 @@ export type { BusinessToolAdapter, BusinessToolPort, BusinessToolObservation } f
|
|
|
16
16
|
export { createCloudAgent, completeCloudToolCheckpoint, canonicalCloudValue } from "./cloud-agent.js";
|
|
17
17
|
export type { CloudAgent, CloudAgentOptions, CloudCheckpoint, CloudExecutionContext, CloudToolInvocation, CloudToolReceipt, CloudToolWait, CloudTurnEvent, CloudTurnRequest, } from "./cloud-agent.js";
|
|
18
18
|
export { createCloudTaskRuntime } from "./cloud-task.js";
|
|
19
|
+
export { executeWithModelReconnects, rejectedModelRecoveryAvailable, rejectedModelReconnectAvailable } from "./task-recovery.js";
|
|
20
|
+
export type { ModelReconnectOptions } from "./task-recovery.js";
|
|
21
|
+
export { automationOccurrence, validAutomationSchedule } from "./automation.js";
|
|
22
|
+
export type { AutomationSchedule, AutomationCalendarSchedule, AutomationOccurrence } from "./automation.js";
|
|
19
23
|
export type { CloudTaskStore, CloudTaskSnapshot, CloudTaskStatus, CloudTaskClaim, CloudTaskEvent, CloudTaskEventPayload, CloudTaskRuntime, CloudTaskRuntimeOptions, } from "./cloud-task.js";
|
|
20
24
|
export type { AgentContentBlock } from "./content-blocks.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CloudExecutionContext } from "./cloud-agent.js";
|
|
2
|
+
import type { CloudTaskRuntime, CloudTaskSnapshot } from "./cloud-task.js";
|
|
3
|
+
/** Eligibility is not retry authorization. recover() still requires the original owner's proof. */
|
|
4
|
+
export declare function rejectedModelRecoveryAvailable(task: CloudTaskSnapshot): boolean;
|
|
5
|
+
export declare function rejectedModelReconnectAvailable(task: CloudTaskSnapshot, reconnects?: number): boolean;
|
|
6
|
+
export interface ModelReconnectOptions {
|
|
7
|
+
/** Reconnects after the first attempt, counted from durable operations across worker restarts. */
|
|
8
|
+
reconnects?: number;
|
|
9
|
+
initialDelayMs?: number;
|
|
10
|
+
maxDelayMs?: number;
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
/** One explicit host-authorized recovery beyond the automatic allowance, bound to the original request. */
|
|
13
|
+
operatorRetryRequestId?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Optional product-worker driver over the canonical runtime. It never starts a scheduler,
|
|
16
|
+
* creates a replacement task or grants authority to replay unknown model/tool effects. */
|
|
17
|
+
export declare function executeWithModelReconnects(runtime: CloudTaskRuntime, context: CloudExecutionContext, id: string, options?: ModelReconnectOptions): Promise<CloudTaskSnapshot>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiaozhiclaw/qlogicagent-core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "Shared SaaS Agent inference and durable task runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,6 +9,15 @@
|
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/types/embedded/index.d.ts",
|
|
11
11
|
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./automation": {
|
|
14
|
+
"types": "./dist/types/embedded/automation.d.ts",
|
|
15
|
+
"default": "./dist/automation.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"typesVersions": {
|
|
19
|
+
"*": {
|
|
20
|
+
"automation": ["dist/types/embedded/automation.d.ts"]
|
|
12
21
|
}
|
|
13
22
|
},
|
|
14
23
|
"files": [
|