@rudderhq/agent-runtime-utils 0.1.0-canary.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/LICENSE +14 -0
- package/dist/billing.d.ts +2 -0
- package/dist/billing.d.ts.map +1 -0
- package/dist/billing.js +16 -0
- package/dist/billing.js.map +1 -0
- package/dist/billing.test.d.ts +2 -0
- package/dist/billing.test.d.ts.map +1 -0
- package/dist/billing.test.js +14 -0
- package/dist/billing.test.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/log-redaction.d.ts +9 -0
- package/dist/log-redaction.d.ts.map +1 -0
- package/dist/log-redaction.js +87 -0
- package/dist/log-redaction.js.map +1 -0
- package/dist/server-utils.d.ts +146 -0
- package/dist/server-utils.d.ts.map +1 -0
- package/dist/server-utils.js +1012 -0
- package/dist/server-utils.js.map +1 -0
- package/dist/server-utils.test.d.ts +2 -0
- package/dist/server-utils.test.d.ts.map +1 -0
- package/dist/server-utils.test.js +219 -0
- package/dist/server-utils.test.js.map +1 -0
- package/dist/session-compaction.d.ts +25 -0
- package/dist/session-compaction.d.ts.map +1 -0
- package/dist/session-compaction.js +142 -0
- package/dist/session-compaction.js.map +1 -0
- package/dist/types.d.ts +333 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
This package is part of the Rudder project.
|
|
2
|
+
|
|
3
|
+
Rudder began as a fork of an early version of Paperclip.
|
|
4
|
+
|
|
5
|
+
Licensing for this package follows the repository-level transition:
|
|
6
|
+
- new Rudder contributions are made under the Apache License, Version 2.0
|
|
7
|
+
- upstream-derived Paperclip portions preserve the original MIT notice where applicable
|
|
8
|
+
|
|
9
|
+
Canonical project-level license and attribution texts live in the source repository:
|
|
10
|
+
- `LICENSE`
|
|
11
|
+
- `NOTICE`
|
|
12
|
+
- `LICENSES/MIT-PAPERCLIP`
|
|
13
|
+
|
|
14
|
+
Source repository: https://github.com/Undertone0809/rudder
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AAKA,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,QAAQ,GAAE,MAAM,GAAG,IAAe,GACjC,MAAM,GAAG,IAAI,CAWf"}
|
package/dist/billing.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function readEnv(env, key) {
|
|
2
|
+
const value = env[key];
|
|
3
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
4
|
+
}
|
|
5
|
+
export function inferOpenAiCompatibleBiller(env, fallback = "openai") {
|
|
6
|
+
const explicitOpenRouterKey = readEnv(env, "OPENROUTER_API_KEY");
|
|
7
|
+
if (explicitOpenRouterKey)
|
|
8
|
+
return "openrouter";
|
|
9
|
+
const baseUrl = readEnv(env, "OPENAI_BASE_URL") ??
|
|
10
|
+
readEnv(env, "OPENAI_API_BASE") ??
|
|
11
|
+
readEnv(env, "OPENAI_API_BASE_URL");
|
|
12
|
+
if (baseUrl && /openrouter\.ai/i.test(baseUrl))
|
|
13
|
+
return "openrouter";
|
|
14
|
+
return fallback;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=billing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AAAA,SAAS,OAAO,CAAC,GAAsB,EAAE,GAAW;IAClD,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,GAAsB,EACtB,WAA0B,QAAQ;IAElC,MAAM,qBAAqB,GAAG,OAAO,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;IACjE,IAAI,qBAAqB;QAAE,OAAO,YAAY,CAAC;IAE/C,MAAM,OAAO,GACX,OAAO,CAAC,GAAG,EAAE,iBAAiB,CAAC;QAC/B,OAAO,CAAC,GAAG,EAAE,iBAAiB,CAAC;QAC/B,OAAO,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;IACtC,IAAI,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,YAAY,CAAC;IAEpE,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.test.d.ts","sourceRoot":"","sources":["../src/billing.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { inferOpenAiCompatibleBiller } from "./billing.js";
|
|
3
|
+
describe("inferOpenAiCompatibleBiller", () => {
|
|
4
|
+
it("returns openrouter when OPENROUTER_API_KEY is present", () => {
|
|
5
|
+
expect(inferOpenAiCompatibleBiller({ OPENROUTER_API_KEY: "sk-or-123" }, "openai")).toBe("openrouter");
|
|
6
|
+
});
|
|
7
|
+
it("returns openrouter when OPENAI_BASE_URL points at OpenRouter", () => {
|
|
8
|
+
expect(inferOpenAiCompatibleBiller({ OPENAI_BASE_URL: "https://openrouter.ai/api/v1" }, "openai")).toBe("openrouter");
|
|
9
|
+
});
|
|
10
|
+
it("returns fallback when no OpenRouter markers are present", () => {
|
|
11
|
+
expect(inferOpenAiCompatibleBiller({ OPENAI_BASE_URL: "https://api.openai.com/v1" }, "openai")).toBe("openai");
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=billing.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.test.js","sourceRoot":"","sources":["../src/billing.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC/D,MAAM,CACJ,2BAA2B,CAAC,EAAE,kBAAkB,EAAE,WAAW,EAAuB,EAAE,QAAQ,CAAC,CAChG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,CACJ,2BAA2B,CACzB,EAAE,eAAe,EAAE,8BAA8B,EAAuB,EACxE,QAAQ,CACT,CACF,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,CACJ,2BAA2B,CACzB,EAAE,eAAe,EAAE,2BAA2B,EAAuB,EACrE,QAAQ,CACT,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { AgentRuntimeAgent, AgentRuntimeState, UsageSummary, AgentRuntimeBillingType, AgentRuntimeServiceReport, AgentRuntimeExecutionResult, AgentRuntimeLoadedSkillMeta, AgentRuntimeInvocationMeta, AgentRuntimeExecutionContext, AgentRuntimeEnvironmentCheckLevel, AgentRuntimeEnvironmentCheck, AgentRuntimeEnvironmentTestStatus, AgentRuntimeEnvironmentTestResult, AgentRuntimeEnvironmentTestContext, AgentRuntimeSkillSyncMode, AgentRuntimeSkillState, AgentRuntimeSkillOrigin, AgentRuntimeSkillEntry, AgentRuntimeSkillSnapshot, AgentRuntimeSkillContext, AgentRuntimeSessionCodec, AgentRuntimeModel, HireApprovedPayload, HireApprovedHookResult, ServerAgentRuntimeModule, QuotaWindow, ProviderQuotaResult, TranscriptEntry, StdoutLineParser, CLIAgentRuntimeModule, CreateConfigValues, } from "./types.js";
|
|
2
|
+
export type { SessionCompactionPolicy, NativeContextManagement, AgentRuntimeSessionManagement, ResolvedSessionCompactionPolicy, } from "./session-compaction.js";
|
|
3
|
+
export { AGENT_RUNTIME_SESSION_MANAGEMENT, LEGACY_SESSIONED_AGENT_RUNTIME_TYPES, getAgentRuntimeSessionManagement, readSessionCompactionOverride, resolveSessionCompactionPolicy, hasSessionCompactionThresholds, } from "./session-compaction.js";
|
|
4
|
+
export { REDACTED_HOME_PATH_USER, redactHomePathUserSegments, redactHomePathUserSegmentsInValue, redactTranscriptEntryPaths, } from "./log-redaction.js";
|
|
5
|
+
export { inferOpenAiCompatibleBiller } from "./billing.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,iCAAiC,EACjC,4BAA4B,EAC5B,iCAAiC,EACjC,iCAAiC,EACjC,kCAAkC,EAClC,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,uBAAuB,EACvB,uBAAuB,EACvB,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,gCAAgC,EAChC,oCAAoC,EACpC,gCAAgC,EAChC,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,iCAAiC,EACjC,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AGENT_RUNTIME_SESSION_MANAGEMENT, LEGACY_SESSIONED_AGENT_RUNTIME_TYPES, getAgentRuntimeSessionManagement, readSessionCompactionOverride, resolveSessionCompactionPolicy, hasSessionCompactionThresholds, } from "./session-compaction.js";
|
|
2
|
+
export { REDACTED_HOME_PATH_USER, redactHomePathUserSegments, redactHomePathUserSegmentsInValue, redactTranscriptEntryPaths, } from "./log-redaction.js";
|
|
3
|
+
export { inferOpenAiCompatibleBiller } from "./billing.js";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAuCA,OAAO,EACL,gCAAgC,EAChC,oCAAoC,EACpC,gCAAgC,EAChC,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,iCAAiC,EACjC,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TranscriptEntry } from "./types.js";
|
|
2
|
+
export declare const REDACTED_HOME_PATH_USER = "*";
|
|
3
|
+
export interface HomePathRedactionOptions {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function redactHomePathUserSegments(text: string, opts?: HomePathRedactionOptions): string;
|
|
7
|
+
export declare function redactHomePathUserSegmentsInValue<T>(value: T, opts?: HomePathRedactionOptions): T;
|
|
8
|
+
export declare function redactTranscriptEntryPaths(entry: TranscriptEntry, opts?: HomePathRedactionOptions): TranscriptEntry;
|
|
9
|
+
//# sourceMappingURL=log-redaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-redaction.d.ts","sourceRoot":"","sources":["../src/log-redaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AA6BD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,wBAAwB,GAAG,MAAM,CAOhG;AAED,wBAAgB,iCAAiC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,wBAAwB,GAAG,CAAC,CAgBjG;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,wBAAwB,GAAG,eAAe,CAiCnH"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export const REDACTED_HOME_PATH_USER = "*";
|
|
2
|
+
function maskHomePathUserSegment(value) {
|
|
3
|
+
const trimmed = value.trim();
|
|
4
|
+
if (!trimmed)
|
|
5
|
+
return REDACTED_HOME_PATH_USER;
|
|
6
|
+
return `${trimmed[0]}${"*".repeat(Math.max(1, Array.from(trimmed).length - 1))}`;
|
|
7
|
+
}
|
|
8
|
+
const HOME_PATH_PATTERNS = [
|
|
9
|
+
{
|
|
10
|
+
regex: /\/Users\/([^/\\\s]+)/g,
|
|
11
|
+
replace: (_match, user) => `/Users/${maskHomePathUserSegment(user)}`,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
regex: /\/home\/([^/\\\s]+)/g,
|
|
15
|
+
replace: (_match, user) => `/home/${maskHomePathUserSegment(user)}`,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
regex: /([A-Za-z]:\\Users\\)([^\\/\s]+)/g,
|
|
19
|
+
replace: (_match, prefix, user) => `${prefix}${maskHomePathUserSegment(user)}`,
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
function isPlainObject(value) {
|
|
23
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
24
|
+
return false;
|
|
25
|
+
const proto = Object.getPrototypeOf(value);
|
|
26
|
+
return proto === Object.prototype || proto === null;
|
|
27
|
+
}
|
|
28
|
+
export function redactHomePathUserSegments(text, opts) {
|
|
29
|
+
if (opts?.enabled === false)
|
|
30
|
+
return text;
|
|
31
|
+
let result = text;
|
|
32
|
+
for (const pattern of HOME_PATH_PATTERNS) {
|
|
33
|
+
result = result.replace(pattern.regex, pattern.replace);
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
export function redactHomePathUserSegmentsInValue(value, opts) {
|
|
38
|
+
if (typeof value === "string") {
|
|
39
|
+
return redactHomePathUserSegments(value, opts);
|
|
40
|
+
}
|
|
41
|
+
if (Array.isArray(value)) {
|
|
42
|
+
return value.map((entry) => redactHomePathUserSegmentsInValue(entry, opts));
|
|
43
|
+
}
|
|
44
|
+
if (!isPlainObject(value)) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
const redacted = {};
|
|
48
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
49
|
+
redacted[key] = redactHomePathUserSegmentsInValue(entry, opts);
|
|
50
|
+
}
|
|
51
|
+
return redacted;
|
|
52
|
+
}
|
|
53
|
+
export function redactTranscriptEntryPaths(entry, opts) {
|
|
54
|
+
switch (entry.kind) {
|
|
55
|
+
case "assistant":
|
|
56
|
+
case "thinking":
|
|
57
|
+
case "user":
|
|
58
|
+
case "stderr":
|
|
59
|
+
case "system":
|
|
60
|
+
case "stdout":
|
|
61
|
+
return { ...entry, text: redactHomePathUserSegments(entry.text, opts) };
|
|
62
|
+
case "tool_call":
|
|
63
|
+
return {
|
|
64
|
+
...entry,
|
|
65
|
+
name: redactHomePathUserSegments(entry.name, opts),
|
|
66
|
+
input: redactHomePathUserSegmentsInValue(entry.input, opts),
|
|
67
|
+
};
|
|
68
|
+
case "tool_result":
|
|
69
|
+
return { ...entry, content: redactHomePathUserSegments(entry.content, opts) };
|
|
70
|
+
case "init":
|
|
71
|
+
return {
|
|
72
|
+
...entry,
|
|
73
|
+
model: redactHomePathUserSegments(entry.model, opts),
|
|
74
|
+
sessionId: redactHomePathUserSegments(entry.sessionId, opts),
|
|
75
|
+
};
|
|
76
|
+
case "result":
|
|
77
|
+
return {
|
|
78
|
+
...entry,
|
|
79
|
+
text: redactHomePathUserSegments(entry.text, opts),
|
|
80
|
+
subtype: redactHomePathUserSegments(entry.subtype, opts),
|
|
81
|
+
errors: entry.errors.map((error) => redactHomePathUserSegments(error, opts)),
|
|
82
|
+
};
|
|
83
|
+
default:
|
|
84
|
+
return entry;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=log-redaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-redaction.js","sourceRoot":"","sources":["../src/log-redaction.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAM3C,SAAS,uBAAuB,CAAC,KAAa;IAC5C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO,uB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,EAAE,0BAA0B,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;gBAClD,KAAK,EAAE,iCAAiC,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC;aAC5D,CAAC;QACJ,KAAK,aAAa;YAChB,OAAO,EAAE,GAAG,KAAK,EAAE,OAAO,EAAE,0BAA0B,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;QAChF,KAAK,MAAM;YACT,OAAO;gBACL,GAAG,KAAK;gBACR,KAAK,EAAE,0BAA0B,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC;gBACpD,SAAS,EAAE,0BAA0B,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC;aAC7D,CAAC;QACJ,KAAK,QAAQ;YACX,OAAO;gBACL,GAAG,KAAK;gBACR,IAAI,EAAE,0BAA0B,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;gBAClD,OAAO,EAAE,0BAA0B,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;gBACxD,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,0BAA0B,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;aAC7E,CAAC;QACJ;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { type ChildProcess } from "node:child_process";
|
|
2
|
+
import type { AgentRuntimeSkillSnapshot } from "./types.js";
|
|
3
|
+
export interface RunProcessResult {
|
|
4
|
+
exitCode: number | null;
|
|
5
|
+
signal: string | null;
|
|
6
|
+
timedOut: boolean;
|
|
7
|
+
stdout: string;
|
|
8
|
+
stderr: string;
|
|
9
|
+
pid: number | null;
|
|
10
|
+
startedAt: string | null;
|
|
11
|
+
}
|
|
12
|
+
interface RunningProcess {
|
|
13
|
+
child: ChildProcess;
|
|
14
|
+
graceSec: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const runningProcesses: Map<string, RunningProcess>;
|
|
17
|
+
export declare const MAX_CAPTURE_BYTES: number;
|
|
18
|
+
export declare const MAX_EXCERPT_BYTES: number;
|
|
19
|
+
export interface RudderSkillEntry {
|
|
20
|
+
key: string;
|
|
21
|
+
runtimeName: string;
|
|
22
|
+
source: string;
|
|
23
|
+
name: string | null;
|
|
24
|
+
description: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface InstalledSkillTarget {
|
|
27
|
+
targetPath: string | null;
|
|
28
|
+
kind: "symlink" | "directory" | "file";
|
|
29
|
+
}
|
|
30
|
+
interface PersistentSkillSnapshotOptions {
|
|
31
|
+
agentRuntimeType: string;
|
|
32
|
+
availableEntries: RudderSkillEntry[];
|
|
33
|
+
desiredSkills: string[];
|
|
34
|
+
installed: Map<string, InstalledSkillTarget>;
|
|
35
|
+
skillsHome: string;
|
|
36
|
+
locationLabel?: string | null;
|
|
37
|
+
installedDetail?: string | null;
|
|
38
|
+
missingDetail: string;
|
|
39
|
+
externalConflictDetail: string;
|
|
40
|
+
externalDetail: string;
|
|
41
|
+
warnings?: string[];
|
|
42
|
+
}
|
|
43
|
+
export declare function readSkillMetadataFromPath(candidatePath: string | null | undefined): Promise<{
|
|
44
|
+
name: string | null;
|
|
45
|
+
description: string | null;
|
|
46
|
+
}>;
|
|
47
|
+
export declare function parseObject(value: unknown): Record<string, unknown>;
|
|
48
|
+
export declare function asString(value: unknown, fallback: string): string;
|
|
49
|
+
export declare function asNumber(value: unknown, fallback: number): number;
|
|
50
|
+
export declare function asBoolean(value: unknown, fallback: boolean): boolean;
|
|
51
|
+
export declare function asStringArray(value: unknown): string[];
|
|
52
|
+
export declare function parseJson(value: string): Record<string, unknown> | null;
|
|
53
|
+
export declare function appendWithCap(prev: string, chunk: string, cap?: number): string;
|
|
54
|
+
export declare function resolvePathValue(obj: Record<string, unknown>, dottedPath: string): string;
|
|
55
|
+
export declare function renderTemplate(template: string, data: Record<string, unknown>): string;
|
|
56
|
+
export declare const DEFAULT_AGENT_PROMPT_TEMPLATE = "You are agent {{agent.id}} ({{agent.name}}). Continue your Rudder work.\n\n{{context.rudderWorkspace.orgResourcesPrompt}}";
|
|
57
|
+
export declare const ISSUE_ASSIGN_PROMPT_TEMPLATE = "You are agent {{agent.id}} ({{agent.name}}). You have been assigned to work on an issue.\n\n{{context.rudderWorkspace.orgResourcesPrompt}}\n\n## Task Context\n\n**Issue:** {{issue.title}}\n**ID:** {{issue.id}}\n**Status:** {{issue.status}}\n**Priority:** {{issue.priority}}\n\n**Description:**\n{{issue.description}}\n\nYour task is to review this issue and begin working on it. Use the available tools to explore the codebase, understand the requirements, and implement a solution.";
|
|
58
|
+
export declare const COMMENT_MENTION_PROMPT_TEMPLATE = "You are agent {{agent.id}} ({{agent.name}}). You were mentioned in a comment and your attention is needed.\n\n{{context.rudderWorkspace.orgResourcesPrompt}}\n\n## Context\n\n**Issue:** {{issue.title}}\n**ID:** {{issue.id}}\n\n**Issue Description:**\n{{issue.description}}\n\n**Comment:**\n{{comment.body}}\n\nPlease review the comment above and respond or take action as appropriate.";
|
|
59
|
+
export declare const ISSUE_COMMENTED_PROMPT_TEMPLATE = "You are agent {{agent.id}} ({{agent.name}}). There is a new comment on an issue you own.\n\n{{context.rudderWorkspace.orgResourcesPrompt}}\n\n## Context\n\n**Issue:** {{issue.title}}\n**ID:** {{issue.id}}\n**Status:** {{issue.status}}\n\n**Issue Description:**\n{{issue.description}}\n\n**Latest Comment:**\n{{comment.body}}\n\nReview the new comment and continue the issue from the current state. Respond or take action as needed.";
|
|
60
|
+
export declare const ISSUE_RECOVERY_PROMPT_TEMPLATE = "You are agent {{agent.id}} ({{agent.name}}). This is a recovery run, not a fresh task.\n\n{{context.rudderWorkspace.orgResourcesPrompt}}\n\n## Recovery Context\n\n**Original Run ID:** {{context.recovery.originalRunId}}\n**Failure Kind:** {{context.recovery.failureKind}}\n**Failure Summary:** {{context.recovery.failureSummary}}\n**Recovery Trigger:** {{context.recovery.recoveryTrigger}}\n**Recovery Mode:** {{context.recovery.recoveryMode}}\n\n## Current Issue Context\n\n**Issue:** {{issue.title}}\n**ID:** {{issue.id}}\n**Status:** {{issue.status}}\n**Priority:** {{issue.priority}}\n\n**Description:**\n{{issue.description}}\n\nBefore doing anything else, inspect what the previous run already completed and any side effects it may have caused. Continue the remaining work from the current state. Avoid blindly re-running the whole task.";
|
|
61
|
+
export declare const RECOVERY_PROMPT_TEMPLATE = "You are agent {{agent.id}} ({{agent.name}}). This is a recovery run, not a fresh task.\n\n{{context.rudderWorkspace.orgResourcesPrompt}}\n\n## Recovery Context\n\n**Original Run ID:** {{context.recovery.originalRunId}}\n**Failure Kind:** {{context.recovery.failureKind}}\n**Failure Summary:** {{context.recovery.failureSummary}}\n**Recovery Trigger:** {{context.recovery.recoveryTrigger}}\n**Recovery Mode:** {{context.recovery.recoveryMode}}\n\nBefore doing anything else, inspect what the previous run already completed and any side effects it may have caused. Continue the remaining work from the current state. Avoid blindly re-running the whole task.";
|
|
62
|
+
export declare const ISSUE_PASSIVE_FOLLOWUP_PROMPT_TEMPLATE = "You are agent {{agent.id}} ({{agent.name}}). This is a passive issue follow-up, not a fresh assignment and not a failure recovery.\n\n{{context.rudderWorkspace.orgResourcesPrompt}}\n\n## Why You Were Woken\n\nThe previous run ended without sufficient issue close-out.\n\n**Origin Run ID:** {{context.passiveFollowup.originRunId}}\n**Previous Run ID:** {{context.passiveFollowup.previousRunId}}\n**Attempt:** {{context.passiveFollowup.attempt}} / {{context.passiveFollowup.maxAttempts}}\n**Reason:** {{context.passiveFollowup.reason}}\n\n## Current Issue Context\n\n**Issue:** {{issue.title}}\n**ID:** {{issue.id}}\n**Status:** {{issue.status}}\n**Priority:** {{issue.priority}}\n\n**Description:**\n{{issue.description}}\n\nBefore changing the issue, inspect the current issue state and any side effects from the previous run. Then do exactly one close-out action: add a progress comment, mark the issue done, block it with a reason, or hand it off explicitly with explanation.";
|
|
63
|
+
/**
|
|
64
|
+
* Selects the base heartbeat prompt template used by runtimes before final prompt assembly.
|
|
65
|
+
*
|
|
66
|
+
* Prompt shape by wake trigger:
|
|
67
|
+
* - assignment:
|
|
68
|
+
* "You are agent ... You have been assigned ..."
|
|
69
|
+
* Includes issue title/id/status/priority/description so the agent can start immediately.
|
|
70
|
+
* - comment.mention:
|
|
71
|
+
* "You were mentioned in a comment ..."
|
|
72
|
+
* Includes issue summary plus mention comment body so the agent can respond without extra fetches.
|
|
73
|
+
* - issue_commented:
|
|
74
|
+
* "There is a new comment on an issue you own ..."
|
|
75
|
+
* Includes issue summary plus the newest comment body so the assignee can continue immediately.
|
|
76
|
+
* - recovery:
|
|
77
|
+
* "This is a recovery run, not a fresh task ..."
|
|
78
|
+
* Includes original run id, failure metadata, and a continue-preferred instruction to
|
|
79
|
+
* inspect prior progress/side effects before resuming.
|
|
80
|
+
* - passive issue follow-up:
|
|
81
|
+
* "This is a passive issue follow-up, not a fresh assignment ..."
|
|
82
|
+
* Includes close-out lineage and tells the agent to comment, finish, block, or hand off.
|
|
83
|
+
* - fallback:
|
|
84
|
+
* Generic "Continue your Rudder work."
|
|
85
|
+
*
|
|
86
|
+
* Concrete rendered example (comment mention):
|
|
87
|
+
* "You are agent agent-456 (Backend Worker). You were mentioned in a comment and your attention is needed.
|
|
88
|
+
* Issue: Stabilize queue worker
|
|
89
|
+
* Comment: @agent please check timeout handling in retry path."
|
|
90
|
+
*
|
|
91
|
+
* Reasoning:
|
|
92
|
+
* - Keep backward compatibility: custom configured templates always win.
|
|
93
|
+
* - Keep first-turn latency low: include the minimum task context directly in prompt text.
|
|
94
|
+
* - Keep behavior deterministic across runtimes: template selection is centralized here.
|
|
95
|
+
*
|
|
96
|
+
* See also:
|
|
97
|
+
* - doc/plans/2026-04-07-agent-prompt-context-injection.md
|
|
98
|
+
* - doc/DEVELOPING.md
|
|
99
|
+
*/
|
|
100
|
+
export declare function selectPromptTemplate(configuredTemplate: string | undefined, context: Record<string, unknown>): string;
|
|
101
|
+
export declare function joinPromptSections(sections: Array<string | null | undefined>, separator?: string): string;
|
|
102
|
+
export declare function redactEnvForLogs(env: Record<string, string>): Record<string, string>;
|
|
103
|
+
export declare function buildRudderEnv(agent: {
|
|
104
|
+
id: string;
|
|
105
|
+
orgId: string;
|
|
106
|
+
}): Record<string, string>;
|
|
107
|
+
export declare function defaultPathForPlatform(): "C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\Wbem" | "/usr/local/bin:/opt/homebrew/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin";
|
|
108
|
+
export declare function ensurePathInEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
109
|
+
export declare function ensureRudderCliInPath(moduleDir: string, env: NodeJS.ProcessEnv): Promise<NodeJS.ProcessEnv>;
|
|
110
|
+
export declare function ensureAbsoluteDirectory(cwd: string, opts?: {
|
|
111
|
+
createIfMissing?: boolean;
|
|
112
|
+
}): Promise<void>;
|
|
113
|
+
export declare function resolveRudderSkillsDir(moduleDir: string, additionalCandidates?: string[]): Promise<string | null>;
|
|
114
|
+
export declare function listRudderSkillEntries(moduleDir: string, additionalCandidates?: string[]): Promise<RudderSkillEntry[]>;
|
|
115
|
+
export declare function readInstalledSkillTargets(skillsHome: string): Promise<Map<string, InstalledSkillTarget>>;
|
|
116
|
+
export declare function buildPersistentSkillSnapshot(options: PersistentSkillSnapshotOptions): AgentRuntimeSkillSnapshot;
|
|
117
|
+
export declare function readRudderRuntimeSkillEntries(config: Record<string, unknown>, moduleDir: string, additionalCandidates?: string[]): Promise<RudderSkillEntry[]>;
|
|
118
|
+
export declare function readRudderSkillMarkdown(moduleDir: string, skillKey: string): Promise<string | null>;
|
|
119
|
+
export declare function readRudderSkillSyncPreference(config: Record<string, unknown>): {
|
|
120
|
+
explicit: boolean;
|
|
121
|
+
desiredSkills: string[];
|
|
122
|
+
};
|
|
123
|
+
export declare function resolveRudderDesiredSkillNames(config: Record<string, unknown>, availableEntries: Array<{
|
|
124
|
+
key: string;
|
|
125
|
+
runtimeName?: string | null;
|
|
126
|
+
}>): string[];
|
|
127
|
+
export declare function writeRudderSkillSyncPreference(config: Record<string, unknown>, desiredSkills: string[]): Record<string, unknown>;
|
|
128
|
+
export declare function ensureRudderSkillSymlink(source: string, target: string, linkSkill?: (source: string, target: string) => Promise<void>): Promise<"created" | "repaired" | "skipped">;
|
|
129
|
+
export declare function removeMaintainerOnlySkillSymlinks(skillsHome: string, allowedSkillNames: Iterable<string>): Promise<string[]>;
|
|
130
|
+
export declare function ensureCommandResolvable(command: string, cwd: string, env: NodeJS.ProcessEnv): Promise<void>;
|
|
131
|
+
export declare function runChildProcess(runId: string, command: string, args: string[], opts: {
|
|
132
|
+
cwd: string;
|
|
133
|
+
env: Record<string, string>;
|
|
134
|
+
timeoutSec: number;
|
|
135
|
+
graceSec: number;
|
|
136
|
+
onLog: (stream: "stdout" | "stderr", chunk: string) => Promise<void>;
|
|
137
|
+
onLogError?: (err: unknown, runId: string, message: string) => void;
|
|
138
|
+
onSpawn?: (meta: {
|
|
139
|
+
pid: number;
|
|
140
|
+
startedAt: string;
|
|
141
|
+
}) => Promise<void>;
|
|
142
|
+
stdin?: string;
|
|
143
|
+
abortSignal?: AbortSignal;
|
|
144
|
+
}): Promise<RunProcessResult>;
|
|
145
|
+
export {};
|
|
146
|
+
//# sourceMappingURL=server-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-utils.d.ts","sourceRoot":"","sources":["../src/server-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAEV,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,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