@exaudeus/workrail 3.24.3 → 3.25.0
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/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +3 -1
- package/dist/cli/commands/version.d.ts +6 -0
- package/dist/cli/commands/version.js +14 -0
- package/dist/cli.js +90 -0
- package/dist/console/assets/index-8dh0Psu-.css +1 -0
- package/dist/console/assets/{index-TMfptYpQ.js → index-HhtarvD5.js} +10 -10
- package/dist/console/index.html +2 -2
- package/dist/daemon/pi-mono-loader.d.ts +5 -0
- package/dist/daemon/pi-mono-loader.js +65 -0
- package/dist/daemon/workflow-runner.d.ts +41 -0
- package/dist/daemon/workflow-runner.js +573 -0
- package/dist/infrastructure/session/HttpServer.js +2 -2
- package/dist/manifest.json +112 -32
- package/dist/mcp/handlers/v2-execution/start.d.ts +2 -1
- package/dist/mcp/handlers/v2-execution/start.js +4 -3
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/transports/http-entry.js +1 -1
- package/dist/trigger/index.d.ts +5 -0
- package/dist/trigger/index.js +8 -0
- package/dist/trigger/trigger-listener.d.ts +30 -0
- package/dist/trigger/trigger-listener.js +166 -0
- package/dist/trigger/trigger-router.d.ts +32 -0
- package/dist/trigger/trigger-router.js +185 -0
- package/dist/trigger/trigger-store.d.ts +31 -0
- package/dist/trigger/trigger-store.js +457 -0
- package/dist/trigger/types.d.ts +46 -0
- package/dist/trigger/types.js +6 -0
- package/dist/v2/infra/in-memory/daemon-registry/index.d.ts +14 -0
- package/dist/v2/infra/in-memory/daemon-registry/index.js +32 -0
- package/dist/v2/infra/in-memory/keyed-async-queue/index.d.ts +5 -0
- package/dist/v2/infra/in-memory/keyed-async-queue/index.js +32 -0
- package/dist/v2/usecases/console-routes.d.ts +3 -1
- package/dist/v2/usecases/console-routes.js +102 -1
- package/dist/v2/usecases/console-service.d.ts +2 -0
- package/dist/v2/usecases/console-service.js +18 -2
- package/dist/v2/usecases/console-types.d.ts +2 -0
- package/package.json +5 -3
- package/workflows/coding-task-workflow-agentic.lean.v2.json +1 -1
- package/workflows/workflow-for-workflows.json +4 -2
- package/workflows/workflow-for-workflows.v2.json +4 -2
- package/dist/console/assets/index-BXRk3te_.css +0 -1
- package/workflows/rich-object-contribution.json +0 -258
package/dist/console/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>WorkRail Console</title>
|
|
7
|
-
<script type="module" crossorigin src="/console/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/console/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/console/assets/index-HhtarvD5.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/console/assets/index-8dh0Psu-.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { Agent, AgentTool, AgentToolResult, AgentEvent, AgentLoopConfig } from '@mariozechner/pi-agent-core';
|
|
2
|
+
export type { Model, TSchema } from '@mariozechner/pi-ai';
|
|
3
|
+
type AnyModule = Record<string, any>;
|
|
4
|
+
export declare function loadPiAi(): Promise<AnyModule>;
|
|
5
|
+
export declare function loadPiAgentCore(): Promise<AnyModule>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.loadPiAi = loadPiAi;
|
|
37
|
+
exports.loadPiAgentCore = loadPiAgentCore;
|
|
38
|
+
const esmImport = new Function('specifier', 'return import(specifier)');
|
|
39
|
+
let _piAi = null;
|
|
40
|
+
let _piAgentCore = null;
|
|
41
|
+
let _bedrockRegistered = false;
|
|
42
|
+
async function loadPiAi() {
|
|
43
|
+
if (!_piAi) {
|
|
44
|
+
_piAi = await esmImport('@mariozechner/pi-ai');
|
|
45
|
+
if (!_bedrockRegistered) {
|
|
46
|
+
try {
|
|
47
|
+
const path = await Promise.resolve().then(() => __importStar(require('node:path')));
|
|
48
|
+
const bedrockPath = path.resolve(__dirname, '..', '..', 'node_modules', '@mariozechner', 'pi-ai', 'dist', 'bedrock-provider.js');
|
|
49
|
+
const bedrockMod = await esmImport(`file://${bedrockPath}`).catch(() => null);
|
|
50
|
+
if (bedrockMod?.bedrockProviderModule && _piAi.setBedrockProviderModule) {
|
|
51
|
+
_piAi.setBedrockProviderModule(bedrockMod.bedrockProviderModule);
|
|
52
|
+
_bedrockRegistered = true;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return _piAi;
|
|
60
|
+
}
|
|
61
|
+
async function loadPiAgentCore() {
|
|
62
|
+
if (!_piAgentCore)
|
|
63
|
+
_piAgentCore = await esmImport('@mariozechner/pi-agent-core');
|
|
64
|
+
return _piAgentCore;
|
|
65
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import type { V2ToolContext } from '../mcp/types.js';
|
|
3
|
+
import type { DaemonRegistry } from '../v2/infra/in-memory/daemon-registry/index.js';
|
|
4
|
+
export declare const DAEMON_SESSIONS_DIR: string;
|
|
5
|
+
export declare const DAEMON_SOUL_DEFAULT = "- Write code that follows the patterns already established in the codebase\n- Never skip tests. Run existing tests before and after changes\n- Prefer small, focused changes over large rewrites\n- If a step asks you to write code, write actual code -- do not write pseudocode or placeholders\n- Commit your work when you complete a logical unit";
|
|
6
|
+
export interface WorkflowTrigger {
|
|
7
|
+
readonly workflowId: string;
|
|
8
|
+
readonly goal: string;
|
|
9
|
+
readonly workspacePath: string;
|
|
10
|
+
readonly context?: Readonly<Record<string, unknown>>;
|
|
11
|
+
readonly referenceUrls?: readonly string[];
|
|
12
|
+
readonly agentConfig?: {
|
|
13
|
+
readonly model?: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface WorkflowRunSuccess {
|
|
17
|
+
readonly _tag: 'success';
|
|
18
|
+
readonly workflowId: string;
|
|
19
|
+
readonly stopReason: string;
|
|
20
|
+
}
|
|
21
|
+
export interface WorkflowRunError {
|
|
22
|
+
readonly _tag: 'error';
|
|
23
|
+
readonly workflowId: string;
|
|
24
|
+
readonly message: string;
|
|
25
|
+
readonly stopReason: string;
|
|
26
|
+
}
|
|
27
|
+
export type WorkflowRunResult = WorkflowRunSuccess | WorkflowRunError;
|
|
28
|
+
export interface OrphanedSession {
|
|
29
|
+
readonly sessionId: string;
|
|
30
|
+
readonly continueToken: string;
|
|
31
|
+
readonly checkpointToken: string | null;
|
|
32
|
+
readonly ts: number;
|
|
33
|
+
}
|
|
34
|
+
export declare function readDaemonSessionState(sessionId: string): Promise<{
|
|
35
|
+
continueToken: string;
|
|
36
|
+
checkpointToken: string | null;
|
|
37
|
+
} | null>;
|
|
38
|
+
export declare function readAllDaemonSessions(sessionsDir?: string): Promise<OrphanedSession[]>;
|
|
39
|
+
export declare function runStartupRecovery(sessionsDir?: string): Promise<void>;
|
|
40
|
+
export declare function buildSystemPrompt(trigger: WorkflowTrigger, sessionState: string, soulContent: string, workspaceContext: string | null): string;
|
|
41
|
+
export declare function runWorkflow(trigger: WorkflowTrigger, ctx: V2ToolContext, apiKey: string, daemonRegistry?: DaemonRegistry): Promise<WorkflowRunResult>;
|