@useorgx/openclaw-plugin 0.4.8 → 0.7.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/README.md +35 -0
- package/dashboard/dist/assets/BJgZIVUQ.js +53 -0
- package/dashboard/dist/assets/BJgZIVUQ.js.br +0 -0
- package/dashboard/dist/assets/BJgZIVUQ.js.gz +0 -0
- package/dashboard/dist/assets/BXWDRGm-.js +1 -0
- package/dashboard/dist/assets/BXWDRGm-.js.br +0 -0
- package/dashboard/dist/assets/BXWDRGm-.js.gz +0 -0
- package/dashboard/dist/assets/BgOYB78t.js +4 -0
- package/dashboard/dist/assets/BgOYB78t.js.br +0 -0
- package/dashboard/dist/assets/BgOYB78t.js.gz +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js.br +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js.gz +0 -0
- package/dashboard/dist/assets/CE38zU4U.js +1 -0
- package/dashboard/dist/assets/CE38zU4U.js.br +0 -0
- package/dashboard/dist/assets/CE38zU4U.js.gz +0 -0
- package/dashboard/dist/assets/CFGKRAzG.js +1 -0
- package/dashboard/dist/assets/CFGKRAzG.js.br +0 -0
- package/dashboard/dist/assets/CFGKRAzG.js.gz +0 -0
- package/dashboard/dist/assets/CGGR2GZh.js +1 -0
- package/dashboard/dist/assets/CGGR2GZh.js.br +0 -0
- package/dashboard/dist/assets/CGGR2GZh.js.gz +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js +1 -0
- package/dashboard/dist/assets/CL_wXqR7.js.br +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js.gz +0 -0
- package/dashboard/dist/assets/CPFiTmlw.js +8 -0
- package/dashboard/dist/assets/CPFiTmlw.js.br +0 -0
- package/dashboard/dist/assets/CPFiTmlw.js.gz +0 -0
- package/dashboard/dist/assets/CZZTvkQZ.js +1 -0
- package/dashboard/dist/assets/CZZTvkQZ.js.br +0 -0
- package/dashboard/dist/assets/CZZTvkQZ.js.gz +0 -0
- package/dashboard/dist/assets/{CpJsfbXo.js → CxQ08qFN.js} +2 -2
- package/dashboard/dist/assets/CxQ08qFN.js.br +0 -0
- package/dashboard/dist/assets/CxQ08qFN.js.gz +0 -0
- package/dashboard/dist/assets/D-bf6hEI.js +213 -0
- package/dashboard/dist/assets/D-bf6hEI.js.br +0 -0
- package/dashboard/dist/assets/D-bf6hEI.js.gz +0 -0
- package/dashboard/dist/assets/DG6y9wJI.js +2 -0
- package/dashboard/dist/assets/DG6y9wJI.js.br +0 -0
- package/dashboard/dist/assets/DG6y9wJI.js.gz +0 -0
- package/dashboard/dist/assets/DNxKz-GV.js +1 -0
- package/dashboard/dist/assets/DNxKz-GV.js.br +0 -0
- package/dashboard/dist/assets/DNxKz-GV.js.gz +0 -0
- package/dashboard/dist/assets/DW_rKUic.js +11 -0
- package/dashboard/dist/assets/DW_rKUic.js.br +0 -0
- package/dashboard/dist/assets/DW_rKUic.js.gz +0 -0
- package/dashboard/dist/assets/DbNoijHm.js +1 -0
- package/dashboard/dist/assets/DbNoijHm.js.br +0 -0
- package/dashboard/dist/assets/DbNoijHm.js.gz +0 -0
- package/dashboard/dist/assets/DjcdE6jC.js +2 -0
- package/dashboard/dist/assets/DjcdE6jC.js.br +0 -0
- package/dashboard/dist/assets/DjcdE6jC.js.gz +0 -0
- package/dashboard/dist/assets/FZYuCDnt.js +1 -0
- package/dashboard/dist/assets/FZYuCDnt.js.br +0 -0
- package/dashboard/dist/assets/FZYuCDnt.js.gz +0 -0
- package/dashboard/dist/assets/PAUiij_z.js +1 -0
- package/dashboard/dist/assets/PAUiij_z.js.br +0 -0
- package/dashboard/dist/assets/PAUiij_z.js.gz +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js +8 -0
- package/dashboard/dist/assets/cNrhgGc1.js.br +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js.gz +0 -0
- package/dashboard/dist/assets/h5biQs2I.css +1 -0
- package/dashboard/dist/assets/h5biQs2I.css.br +0 -0
- package/dashboard/dist/assets/h5biQs2I.css.gz +0 -0
- package/dashboard/dist/assets/ic2FaMnh.js +1 -0
- package/dashboard/dist/assets/ic2FaMnh.js.br +0 -0
- package/dashboard/dist/assets/ic2FaMnh.js.gz +0 -0
- package/dashboard/dist/assets/nByHNHoW.js +1 -0
- package/dashboard/dist/assets/nByHNHoW.js.br +0 -0
- package/dashboard/dist/assets/nByHNHoW.js.gz +0 -0
- package/dashboard/dist/assets/qm8xLgv-.css +1 -0
- package/dashboard/dist/assets/qm8xLgv-.css.br +0 -0
- package/dashboard/dist/assets/qm8xLgv-.css.gz +0 -0
- package/dashboard/dist/assets/tS9mbYZi.js +1 -0
- package/dashboard/dist/assets/tS9mbYZi.js.br +0 -0
- package/dashboard/dist/assets/tS9mbYZi.js.gz +0 -0
- package/dashboard/dist/brand/anthropic-mark.svg.br +0 -0
- package/dashboard/dist/brand/anthropic-mark.svg.gz +0 -0
- package/dashboard/dist/brand/openai-mark.svg.br +0 -0
- package/dashboard/dist/brand/openai-mark.svg.gz +0 -0
- package/dashboard/dist/brand/openclaw-mark.svg.br +0 -0
- package/dashboard/dist/brand/openclaw-mark.svg.gz +0 -0
- package/dashboard/dist/brand/xandy-orchestrator.png +0 -0
- package/dashboard/dist/index.html +7 -5
- package/dashboard/dist/index.html.br +0 -0
- package/dashboard/dist/index.html.gz +0 -0
- package/dist/activity-actor-fields.js +26 -4
- package/dist/activity-store.js +38 -26
- package/dist/agent-context-store.js +84 -42
- package/dist/agent-run-store.js +49 -28
- package/dist/agent-suite.d.ts +9 -0
- package/dist/agent-suite.js +150 -17
- package/dist/artifacts/artifact-domain-schemas.d.ts +66 -0
- package/dist/artifacts/artifact-domain-schemas.js +357 -0
- package/dist/artifacts/register-artifact.d.ts +4 -3
- package/dist/artifacts/register-artifact.js +170 -57
- package/dist/auth/flows.d.ts +47 -0
- package/dist/auth/flows.js +169 -0
- package/dist/auth-store.js +6 -26
- package/dist/byok-store.js +5 -19
- package/dist/chat-store.d.ts +157 -0
- package/dist/chat-store.js +586 -0
- package/dist/cli/orgx.d.ts +66 -0
- package/dist/cli/orgx.js +102 -0
- package/dist/config/refresh.d.ts +32 -0
- package/dist/config/refresh.js +55 -0
- package/dist/config/resolution.d.ts +37 -0
- package/dist/config/resolution.js +178 -0
- package/dist/contracts/client.d.ts +43 -3
- package/dist/contracts/client.js +159 -30
- package/dist/contracts/retro-schema.d.ts +81 -0
- package/dist/contracts/retro-schema.js +80 -0
- package/dist/contracts/shared-types.d.ts +306 -0
- package/dist/contracts/shared-types.js +179 -0
- package/dist/contracts/skill-pack-schema.d.ts +192 -0
- package/dist/contracts/skill-pack-schema.js +180 -0
- package/dist/contracts/types.d.ts +224 -132
- package/dist/contracts/types.js +5 -0
- package/dist/entities/auto-assignment.d.ts +36 -0
- package/dist/entities/auto-assignment.js +141 -0
- package/dist/entity-comment-store.js +5 -25
- package/dist/event-sanitization.d.ts +11 -0
- package/dist/event-sanitization.js +113 -0
- package/dist/fs-utils.js +13 -1
- package/dist/gateway-watchdog.d.ts +5 -0
- package/dist/gateway-watchdog.js +50 -0
- package/dist/hash-utils.d.ts +2 -0
- package/dist/hash-utils.js +12 -0
- package/dist/hooks/post-reporting-event.mjs +1 -5
- package/dist/http/helpers/activity-headline.d.ts +10 -0
- package/dist/http/helpers/activity-headline.js +73 -0
- package/dist/http/helpers/artifact-fallback.d.ts +13 -0
- package/dist/http/helpers/artifact-fallback.js +148 -0
- package/dist/http/helpers/auto-continue-engine.d.ts +486 -0
- package/dist/http/helpers/auto-continue-engine.js +3563 -0
- package/dist/http/helpers/autopilot-operations.d.ts +176 -0
- package/dist/http/helpers/autopilot-operations.js +554 -0
- package/dist/http/helpers/autopilot-runtime.d.ts +43 -0
- package/dist/http/helpers/autopilot-runtime.js +607 -0
- package/dist/http/helpers/autopilot-slice-utils.d.ts +56 -0
- package/dist/http/helpers/autopilot-slice-utils.js +899 -0
- package/dist/http/helpers/decision-mapper.d.ts +52 -0
- package/dist/http/helpers/decision-mapper.js +260 -0
- package/dist/http/helpers/dispatch-lifecycle.d.ts +119 -0
- package/dist/http/helpers/dispatch-lifecycle.js +809 -0
- package/dist/http/helpers/hash-utils.d.ts +1 -0
- package/dist/http/helpers/hash-utils.js +1 -0
- package/dist/http/helpers/kickoff-context.d.ts +12 -0
- package/dist/http/helpers/kickoff-context.js +228 -0
- package/dist/http/helpers/llm-client.d.ts +47 -0
- package/dist/http/helpers/llm-client.js +256 -0
- package/dist/http/helpers/mission-control.d.ts +193 -0
- package/dist/http/helpers/mission-control.js +1383 -0
- package/dist/http/helpers/openclaw-cli.d.ts +37 -0
- package/dist/http/helpers/openclaw-cli.js +283 -0
- package/dist/http/helpers/runtime-sse.d.ts +20 -0
- package/dist/http/helpers/runtime-sse.js +110 -0
- package/dist/http/helpers/sentinel-catalog.d.ts +23 -0
- package/dist/http/helpers/sentinel-catalog.js +193 -0
- package/dist/http/helpers/session-classification.d.ts +9 -0
- package/dist/http/helpers/session-classification.js +564 -0
- package/dist/http/helpers/slice-experience-v2.d.ts +137 -0
- package/dist/http/helpers/slice-experience-v2.js +677 -0
- package/dist/http/helpers/slice-run-projections.d.ts +72 -0
- package/dist/http/helpers/slice-run-projections.js +860 -0
- package/dist/http/helpers/triage-mapper.d.ts +43 -0
- package/dist/http/helpers/triage-mapper.js +549 -0
- package/dist/http/helpers/value-utils.d.ts +6 -0
- package/dist/http/helpers/value-utils.js +72 -0
- package/dist/http/helpers/workspace-scope.d.ts +15 -0
- package/dist/http/helpers/workspace-scope.js +170 -0
- package/dist/http/index.d.ts +88 -0
- package/dist/http/index.js +3610 -0
- package/dist/http/router.d.ts +23 -0
- package/dist/http/router.js +23 -0
- package/dist/http/routes/agent-control.d.ts +79 -0
- package/dist/http/routes/agent-control.js +684 -0
- package/dist/http/routes/agent-suite.d.ts +38 -0
- package/dist/http/routes/agent-suite.js +397 -0
- package/dist/http/routes/agents-catalog.d.ts +40 -0
- package/dist/http/routes/agents-catalog.js +128 -0
- package/dist/http/routes/billing.d.ts +23 -0
- package/dist/http/routes/billing.js +55 -0
- package/dist/http/routes/chat.d.ts +19 -0
- package/dist/http/routes/chat.js +522 -0
- package/dist/http/routes/debug.d.ts +14 -0
- package/dist/http/routes/debug.js +21 -0
- package/dist/http/routes/decision-actions.d.ts +20 -0
- package/dist/http/routes/decision-actions.js +103 -0
- package/dist/http/routes/delegation.d.ts +19 -0
- package/dist/http/routes/delegation.js +32 -0
- package/dist/http/routes/dispatch-gateway-envelope.d.ts +25 -0
- package/dist/http/routes/dispatch-gateway-envelope.js +26 -0
- package/dist/http/routes/entities.d.ts +63 -0
- package/dist/http/routes/entities.js +440 -0
- package/dist/http/routes/entity-dynamic.d.ts +25 -0
- package/dist/http/routes/entity-dynamic.js +191 -0
- package/dist/http/routes/health.d.ts +22 -0
- package/dist/http/routes/health.js +49 -0
- package/dist/http/routes/live-legacy.d.ts +115 -0
- package/dist/http/routes/live-legacy.js +112 -0
- package/dist/http/routes/live-misc.d.ts +81 -0
- package/dist/http/routes/live-misc.js +426 -0
- package/dist/http/routes/live-snapshot.d.ts +136 -0
- package/dist/http/routes/live-snapshot.js +916 -0
- package/dist/http/routes/live-terminal.d.ts +11 -0
- package/dist/http/routes/live-terminal.js +261 -0
- package/dist/http/routes/live-triage.d.ts +61 -0
- package/dist/http/routes/live-triage.js +248 -0
- package/dist/http/routes/mission-control-actions.d.ts +131 -0
- package/dist/http/routes/mission-control-actions.js +1791 -0
- package/dist/http/routes/mission-control-read.d.ts +73 -0
- package/dist/http/routes/mission-control-read.js +1640 -0
- package/dist/http/routes/onboarding.d.ts +34 -0
- package/dist/http/routes/onboarding.js +101 -0
- package/dist/http/routes/realtime-orchestrator.d.ts +10 -0
- package/dist/http/routes/realtime-orchestrator.js +74 -0
- package/dist/http/routes/run-control.d.ts +27 -0
- package/dist/http/routes/run-control.js +96 -0
- package/dist/http/routes/runtime-hooks.d.ts +69 -0
- package/dist/http/routes/runtime-hooks.js +437 -0
- package/dist/http/routes/sentinels-catalog.d.ts +7 -0
- package/dist/http/routes/sentinels-catalog.js +24 -0
- package/dist/http/routes/settings-byok.d.ts +23 -0
- package/dist/http/routes/settings-byok.js +163 -0
- package/dist/http/routes/summary.d.ts +18 -0
- package/dist/http/routes/summary.js +49 -0
- package/dist/http/routes/usage.d.ts +24 -0
- package/dist/http/routes/usage.js +362 -0
- package/dist/http/routes/work-artifacts.d.ts +9 -0
- package/dist/http/routes/work-artifacts.js +55 -0
- package/dist/http/shared-state.d.ts +16 -0
- package/dist/http/shared-state.js +1 -0
- package/dist/http-handler.d.ts +1 -88
- package/dist/http-handler.js +1 -10605
- package/dist/index.js +287 -2284
- package/dist/json-utils.d.ts +1 -0
- package/dist/json-utils.js +8 -0
- package/dist/local-openclaw.js +29 -6
- package/dist/mcp-client-setup.js +3 -3
- package/dist/mcp-http-handler.js +33 -59
- package/dist/next-up-queue-store.d.ts +16 -1
- package/dist/next-up-queue-store.js +93 -25
- package/dist/outbox.d.ts +5 -0
- package/dist/outbox.js +113 -9
- package/dist/paths.js +24 -5
- package/dist/reporting/rollups.d.ts +53 -0
- package/dist/reporting/rollups.js +148 -0
- package/dist/retro/domain-templates.d.ts +45 -0
- package/dist/retro/domain-templates.js +297 -0
- package/dist/retro/quality-rubric.d.ts +33 -0
- package/dist/retro/quality-rubric.js +213 -0
- package/dist/runtime-cleanup.d.ts +18 -0
- package/dist/runtime-cleanup.js +87 -0
- package/dist/runtime-instance-store.js +5 -31
- package/dist/services/background.d.ts +34 -0
- package/dist/services/background.js +45 -0
- package/dist/services/experiment-randomization.d.ts +21 -0
- package/dist/services/experiment-randomization.js +63 -0
- package/dist/services/instrumentation.d.ts +29 -0
- package/dist/services/instrumentation.js +136 -0
- package/dist/skill-pack-state.d.ts +36 -5
- package/dist/skill-pack-state.js +273 -29
- package/dist/snapshot-store.js +5 -25
- package/dist/stores/json-store.d.ts +11 -0
- package/dist/stores/json-store.js +42 -0
- package/dist/sync/local-agent-telemetry.d.ts +13 -0
- package/dist/sync/local-agent-telemetry.js +128 -0
- package/dist/sync/outbox-replay.d.ts +55 -0
- package/dist/sync/outbox-replay.js +621 -0
- package/dist/team-context-store.d.ts +23 -0
- package/dist/team-context-store.js +116 -0
- package/dist/telemetry/posthog.js +4 -2
- package/dist/tools/core-tools.d.ts +72 -0
- package/dist/tools/core-tools.js +2270 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -0
- package/dist/worker-supervisor.js +23 -0
- package/package.json +14 -4
- package/dashboard/dist/assets/B3ziCA02.js +0 -8
- package/dashboard/dist/assets/BNeJ0kpF.js +0 -1
- package/dashboard/dist/assets/BzkiMPmM.js +0 -215
- package/dashboard/dist/assets/CUV9IHHi.js +0 -1
- package/dashboard/dist/assets/Ie7d9Iq2.css +0 -1
- package/dashboard/dist/assets/sAhvFnpk.js +0 -4
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { callLlmJson } from "../http/helpers/llm-client.js";
|
|
2
|
+
function toFiniteNumber(value) {
|
|
3
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
4
|
+
}
|
|
5
|
+
function toNonNegativeCount(value) {
|
|
6
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0
|
|
7
|
+
? Math.floor(value)
|
|
8
|
+
: 0;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Compute domain-specific quality modifier based on artifact metadata.
|
|
12
|
+
* Returns delta (positive = bonus, negative = penalty) and reasons.
|
|
13
|
+
*/
|
|
14
|
+
export function computeDomainQualityModifier(domain, artifactMetadata) {
|
|
15
|
+
if (!domain || !artifactMetadata)
|
|
16
|
+
return { delta: 0, reasons: [] };
|
|
17
|
+
let delta = 0;
|
|
18
|
+
const reasons = [];
|
|
19
|
+
const meta = artifactMetadata;
|
|
20
|
+
// Helper to check nested dotted paths or flat keys
|
|
21
|
+
const has = (key) => {
|
|
22
|
+
if (key in meta && meta[key] != null) {
|
|
23
|
+
const v = meta[key];
|
|
24
|
+
if (typeof v === "string")
|
|
25
|
+
return v.trim().length > 0;
|
|
26
|
+
if (Array.isArray(v))
|
|
27
|
+
return v.length > 0;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
const parts = key.split(".");
|
|
31
|
+
let cur = meta;
|
|
32
|
+
for (const p of parts) {
|
|
33
|
+
if (cur == null || typeof cur !== "object")
|
|
34
|
+
return false;
|
|
35
|
+
cur = cur[p];
|
|
36
|
+
}
|
|
37
|
+
if (cur == null)
|
|
38
|
+
return false;
|
|
39
|
+
if (typeof cur === "string")
|
|
40
|
+
return cur.trim().length > 0;
|
|
41
|
+
if (Array.isArray(cur))
|
|
42
|
+
return cur.length > 0;
|
|
43
|
+
return true;
|
|
44
|
+
};
|
|
45
|
+
switch (domain) {
|
|
46
|
+
case "engineering":
|
|
47
|
+
if (has("verification.tests_passed") || has("verification")) {
|
|
48
|
+
delta += 1;
|
|
49
|
+
reasons.push("Engineering artifact includes test verification.");
|
|
50
|
+
}
|
|
51
|
+
if (!has("commit_sha")) {
|
|
52
|
+
delta -= 1;
|
|
53
|
+
reasons.push("Engineering artifact missing commit_sha.");
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
case "product":
|
|
57
|
+
if (has("acceptance_criteria")) {
|
|
58
|
+
delta += 1;
|
|
59
|
+
reasons.push("Product artifact includes acceptance criteria.");
|
|
60
|
+
}
|
|
61
|
+
if (!has("success_metric")) {
|
|
62
|
+
delta -= 1;
|
|
63
|
+
reasons.push("Product artifact missing success metric.");
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
case "design":
|
|
67
|
+
if (has("evidence_url")) {
|
|
68
|
+
delta += 1;
|
|
69
|
+
reasons.push("Design artifact includes evidence URL.");
|
|
70
|
+
}
|
|
71
|
+
if (!has("tokens_referenced")) {
|
|
72
|
+
delta -= 1;
|
|
73
|
+
reasons.push("Design artifact missing token references.");
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
case "marketing":
|
|
77
|
+
if (has("measurement_hook")) {
|
|
78
|
+
delta += 1;
|
|
79
|
+
reasons.push("Marketing artifact includes measurement hook.");
|
|
80
|
+
}
|
|
81
|
+
if (!has("audience")) {
|
|
82
|
+
delta -= 1;
|
|
83
|
+
reasons.push("Marketing artifact missing target audience.");
|
|
84
|
+
}
|
|
85
|
+
break;
|
|
86
|
+
case "sales":
|
|
87
|
+
if (has("next_action")) {
|
|
88
|
+
delta += 1;
|
|
89
|
+
reasons.push("Sales artifact includes next action.");
|
|
90
|
+
}
|
|
91
|
+
if (!has("buyer_stage")) {
|
|
92
|
+
delta -= 1;
|
|
93
|
+
reasons.push("Sales artifact missing buyer stage.");
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case "operations":
|
|
97
|
+
if (has("rollback_path")) {
|
|
98
|
+
delta += 1;
|
|
99
|
+
reasons.push("Operations artifact includes rollback path.");
|
|
100
|
+
}
|
|
101
|
+
if (!has("affected_systems")) {
|
|
102
|
+
delta -= 1;
|
|
103
|
+
reasons.push("Operations artifact missing affected systems.");
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "orchestration":
|
|
107
|
+
if (has("unblocked_work")) {
|
|
108
|
+
delta += 1;
|
|
109
|
+
reasons.push("Orchestration artifact includes unblocked work.");
|
|
110
|
+
}
|
|
111
|
+
if (!has("rationale")) {
|
|
112
|
+
delta -= 1;
|
|
113
|
+
reasons.push("Orchestration artifact missing rationale.");
|
|
114
|
+
}
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
return { delta, reasons };
|
|
118
|
+
}
|
|
119
|
+
export function computeRetroQualityRubricScore(input) {
|
|
120
|
+
let score = input.success ? 5 : 2;
|
|
121
|
+
const reasons = [];
|
|
122
|
+
if (input.hadError || (input.errorMessage?.trim() ?? "").length > 0) {
|
|
123
|
+
score -= 1;
|
|
124
|
+
reasons.push("Run ended with error signal.");
|
|
125
|
+
}
|
|
126
|
+
const followUpsCount = toNonNegativeCount(input.followUpsCount);
|
|
127
|
+
if (!input.success && followUpsCount < 1) {
|
|
128
|
+
score -= 1;
|
|
129
|
+
reasons.push("Failure run missing actionable follow-up.");
|
|
130
|
+
}
|
|
131
|
+
const decisionsCount = toNonNegativeCount(input.decisionsCount);
|
|
132
|
+
if (!input.success && decisionsCount < 1) {
|
|
133
|
+
score -= 1;
|
|
134
|
+
reasons.push("Failure run missing decision signal.");
|
|
135
|
+
}
|
|
136
|
+
const wrongCount = toNonNegativeCount(input.whatWentWrongCount);
|
|
137
|
+
if (input.success && wrongCount > 0) {
|
|
138
|
+
score -= 1;
|
|
139
|
+
reasons.push("Success run still reported retrospective issues.");
|
|
140
|
+
}
|
|
141
|
+
const tokens = toFiniteNumber(input.tokens);
|
|
142
|
+
if (tokens === null || tokens <= 0) {
|
|
143
|
+
score -= 1;
|
|
144
|
+
reasons.push("Missing or invalid token telemetry.");
|
|
145
|
+
}
|
|
146
|
+
const costUsd = toFiniteNumber(input.costUsd);
|
|
147
|
+
if (costUsd !== null && costUsd > 10) {
|
|
148
|
+
score -= 1;
|
|
149
|
+
reasons.push("Run cost exceeded preferred threshold ($10).");
|
|
150
|
+
}
|
|
151
|
+
// Domain-specific modifiers (stacks with generic signals)
|
|
152
|
+
const domainMod = computeDomainQualityModifier(input.domain, input.artifactMetadata);
|
|
153
|
+
score += domainMod.delta;
|
|
154
|
+
reasons.push(...domainMod.reasons);
|
|
155
|
+
const normalized = Math.max(1, Math.min(5, Math.round(score)));
|
|
156
|
+
if (reasons.length === 0) {
|
|
157
|
+
reasons.push("Outcome met baseline quality rubric expectations.");
|
|
158
|
+
}
|
|
159
|
+
return { score: normalized, reasons };
|
|
160
|
+
}
|
|
161
|
+
export async function computeRetroQualityWithLlm(input) {
|
|
162
|
+
const lines = [
|
|
163
|
+
`Outcome: ${input.success ? "success" : "failure"}`,
|
|
164
|
+
`Error present: ${input.hadError || (input.errorMessage?.trim() ?? "").length > 0 ? "yes" : "no"}`,
|
|
165
|
+
];
|
|
166
|
+
if (input.errorMessage?.trim()) {
|
|
167
|
+
lines.push(`Error message: ${input.errorMessage.trim()}`);
|
|
168
|
+
}
|
|
169
|
+
const tokens = toFiniteNumber(input.tokens);
|
|
170
|
+
if (tokens !== null)
|
|
171
|
+
lines.push(`Tokens used: ${tokens}`);
|
|
172
|
+
const costUsd = toFiniteNumber(input.costUsd);
|
|
173
|
+
if (costUsd !== null)
|
|
174
|
+
lines.push(`Cost (USD): ${costUsd.toFixed(4)}`);
|
|
175
|
+
const decisionsCount = toNonNegativeCount(input.decisionsCount);
|
|
176
|
+
lines.push(`Decisions recorded: ${decisionsCount}`);
|
|
177
|
+
const followUpsCount = toNonNegativeCount(input.followUpsCount);
|
|
178
|
+
lines.push(`Follow-ups recorded: ${followUpsCount}`);
|
|
179
|
+
const issuesCount = toNonNegativeCount(input.whatWentWrongCount);
|
|
180
|
+
lines.push(`Issues reported: ${issuesCount}`);
|
|
181
|
+
if (input.executionContext?.trim()) {
|
|
182
|
+
lines.push(`Execution context: ${input.executionContext.trim()}`);
|
|
183
|
+
}
|
|
184
|
+
const userPrompt = lines.join("\n");
|
|
185
|
+
const systemPrompt = "Score this autonomous agent run on a 1-5 quality scale. Consider: task completion, error handling, resource efficiency, follow-up quality, and decision signals. Return JSON: {\"score\": <1-5>, \"reasons\": [\"...\", ...]}. Each reason should be specific and actionable, not generic.";
|
|
186
|
+
const { result, source } = await callLlmJson({
|
|
187
|
+
taskId: "quality_rubric",
|
|
188
|
+
systemPrompt,
|
|
189
|
+
userPrompt,
|
|
190
|
+
model: "openai/gpt-4.1-nano",
|
|
191
|
+
maxTokens: 256,
|
|
192
|
+
cacheTtlMs: 12 * 60 * 60_000,
|
|
193
|
+
}, (raw) => {
|
|
194
|
+
try {
|
|
195
|
+
const parsed = JSON.parse(raw);
|
|
196
|
+
const score = parsed.score;
|
|
197
|
+
if (typeof score !== "number" || !Number.isInteger(score) || score < 1 || score > 5) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
const reasons = parsed.reasons;
|
|
201
|
+
if (!Array.isArray(reasons) ||
|
|
202
|
+
reasons.length === 0 ||
|
|
203
|
+
!reasons.every((r) => typeof r === "string" && r.length > 0)) {
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
return { score, reasons };
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
}, () => computeRetroQualityRubricScore(input));
|
|
212
|
+
return { ...result, source };
|
|
213
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type CleanupLogger = {
|
|
2
|
+
info?: (message: string, meta?: Record<string, unknown>) => void;
|
|
3
|
+
warn?: (message: string, meta?: Record<string, unknown>) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function cleanupOrgxRuntime(logger?: CleanupLogger): Promise<{
|
|
6
|
+
watchdog: {
|
|
7
|
+
pid: number | null;
|
|
8
|
+
wasRunning: boolean;
|
|
9
|
+
stopped: boolean;
|
|
10
|
+
};
|
|
11
|
+
runs: {
|
|
12
|
+
attempted: number;
|
|
13
|
+
stopped: number;
|
|
14
|
+
failed: number;
|
|
15
|
+
markedStopped: number;
|
|
16
|
+
};
|
|
17
|
+
}>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { pathToFileURL } from "node:url";
|
|
2
|
+
import { markAgentRunStopped, readAgentRuns } from "./agent-run-store.js";
|
|
3
|
+
import { stopGatewayWatchdog } from "./gateway-watchdog.js";
|
|
4
|
+
function isPidAlive(pid) {
|
|
5
|
+
if (!Number.isFinite(pid) || pid <= 0)
|
|
6
|
+
return false;
|
|
7
|
+
try {
|
|
8
|
+
process.kill(pid, 0);
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function sendSignal(pid, signal) {
|
|
16
|
+
try {
|
|
17
|
+
process.kill(-pid, signal);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
// Fall back to direct process kill.
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
process.kill(pid, signal);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// best effort
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async function stopDetachedPid(pid) {
|
|
31
|
+
if (!isPidAlive(pid))
|
|
32
|
+
return true;
|
|
33
|
+
sendSignal(pid, "SIGTERM");
|
|
34
|
+
await new Promise((resolve) => setTimeout(resolve, 450));
|
|
35
|
+
if (isPidAlive(pid)) {
|
|
36
|
+
sendSignal(pid, "SIGKILL");
|
|
37
|
+
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
38
|
+
}
|
|
39
|
+
return !isPidAlive(pid);
|
|
40
|
+
}
|
|
41
|
+
export async function cleanupOrgxRuntime(logger = console) {
|
|
42
|
+
const watchdog = await stopGatewayWatchdog(logger);
|
|
43
|
+
const runningRuns = Object.values(readAgentRuns().runs ?? {}).filter((run) => run?.status === "running");
|
|
44
|
+
let attempted = 0;
|
|
45
|
+
let stopped = 0;
|
|
46
|
+
let failed = 0;
|
|
47
|
+
let markedStopped = 0;
|
|
48
|
+
for (const run of runningRuns) {
|
|
49
|
+
if (!run || typeof run !== "object")
|
|
50
|
+
continue;
|
|
51
|
+
attempted += 1;
|
|
52
|
+
let runStopped = false;
|
|
53
|
+
if (typeof run.pid === "number" && Number.isFinite(run.pid) && run.pid > 0) {
|
|
54
|
+
runStopped = await stopDetachedPid(run.pid);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
runStopped = true;
|
|
58
|
+
}
|
|
59
|
+
if (runStopped)
|
|
60
|
+
stopped += 1;
|
|
61
|
+
else
|
|
62
|
+
failed += 1;
|
|
63
|
+
if (markAgentRunStopped(run.runId)) {
|
|
64
|
+
markedStopped += 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const summary = {
|
|
68
|
+
watchdog,
|
|
69
|
+
runs: { attempted, stopped, failed, markedStopped },
|
|
70
|
+
};
|
|
71
|
+
logger.info?.("[orgx] Runtime cleanup summary", summary);
|
|
72
|
+
return summary;
|
|
73
|
+
}
|
|
74
|
+
function isDirectRun() {
|
|
75
|
+
const entry = process.argv[1];
|
|
76
|
+
if (!entry)
|
|
77
|
+
return false;
|
|
78
|
+
return import.meta.url === pathToFileURL(entry).href;
|
|
79
|
+
}
|
|
80
|
+
if (isDirectRun()) {
|
|
81
|
+
cleanupOrgxRuntime().catch((err) => {
|
|
82
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
83
|
+
console.error(`[orgx] runtime cleanup failed: ${message}`);
|
|
84
|
+
// Never block uninstall/update for best-effort cleanup.
|
|
85
|
+
process.exitCode = 0;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync, } from "node:fs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { getOrgxPluginConfigDir, getOrgxPluginConfigPath } from "./paths.js";
|
|
4
4
|
import { backupCorruptFileSync, writeJsonFileAtomicSync } from "./fs-utils.js";
|
|
5
|
+
import { clearStoreFileSync, ensureStoreDirSync, parseJsonSafe, } from "./stores/json-store.js";
|
|
5
6
|
const MAX_INSTANCES = 600;
|
|
6
7
|
export const DEFAULT_RUNTIME_HEARTBEAT_TIMEOUT_MS = 90_000;
|
|
7
8
|
function runtimeDir() {
|
|
@@ -14,33 +15,12 @@ function hookTokenFile() {
|
|
|
14
15
|
return getOrgxPluginConfigPath("runtime-hook-token.txt");
|
|
15
16
|
}
|
|
16
17
|
function ensureRuntimeDir() {
|
|
17
|
-
|
|
18
|
-
mkdirSync(dir, { recursive: true, mode: 0o700 });
|
|
19
|
-
try {
|
|
20
|
-
chmodSync(dir, 0o700);
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
// best effort
|
|
24
|
-
}
|
|
18
|
+
ensureStoreDirSync(runtimeDir());
|
|
25
19
|
}
|
|
26
20
|
function writeHookTokenFile(token) {
|
|
27
21
|
ensureRuntimeDir();
|
|
28
22
|
const file = hookTokenFile();
|
|
29
23
|
writeFileSync(file, `${token}\n`, { encoding: "utf8", mode: 0o600 });
|
|
30
|
-
try {
|
|
31
|
-
chmodSync(file, 0o600);
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
// best effort
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
function parseJson(value) {
|
|
38
|
-
try {
|
|
39
|
-
return JSON.parse(value);
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
24
|
}
|
|
45
25
|
function normalizeNullableString(value) {
|
|
46
26
|
if (typeof value !== "string")
|
|
@@ -201,7 +181,7 @@ export function readRuntimeInstances() {
|
|
|
201
181
|
return { updatedAt: new Date().toISOString(), instances: {} };
|
|
202
182
|
}
|
|
203
183
|
const raw = readFileSync(file, "utf8");
|
|
204
|
-
const parsed =
|
|
184
|
+
const parsed = parseJsonSafe(raw);
|
|
205
185
|
if (!parsed || typeof parsed !== "object") {
|
|
206
186
|
backupCorruptFileSync(file);
|
|
207
187
|
return { updatedAt: new Date().toISOString(), instances: {} };
|
|
@@ -349,13 +329,7 @@ export function listRuntimeInstances(options) {
|
|
|
349
329
|
.slice(0, limit);
|
|
350
330
|
}
|
|
351
331
|
export function clearRuntimeInstances() {
|
|
352
|
-
|
|
353
|
-
try {
|
|
354
|
-
rmSync(file, { force: true });
|
|
355
|
-
}
|
|
356
|
-
catch {
|
|
357
|
-
// best effort
|
|
358
|
-
}
|
|
332
|
+
clearStoreFileSync(runtimeFile());
|
|
359
333
|
}
|
|
360
334
|
export function resolveRuntimeHookToken() {
|
|
361
335
|
const envToken = normalizeNullableString(process.env.ORGX_HOOK_TOKEN);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface RegisterServiceApi {
|
|
2
|
+
registerService: (service: {
|
|
3
|
+
id: string;
|
|
4
|
+
start: () => Promise<void>;
|
|
5
|
+
stop: () => Promise<void>;
|
|
6
|
+
}) => void;
|
|
7
|
+
log?: {
|
|
8
|
+
info?: (msg: string, meta?: Record<string, unknown>) => void;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface RegisterSyncServiceDeps {
|
|
12
|
+
api: RegisterServiceApi;
|
|
13
|
+
syncIntervalMs: number;
|
|
14
|
+
ensureGatewayWatchdog: (logger: Record<string, unknown>) => {
|
|
15
|
+
started: boolean;
|
|
16
|
+
pid?: number | null;
|
|
17
|
+
};
|
|
18
|
+
stopGatewayWatchdog?: () => Promise<{
|
|
19
|
+
pid: number | null;
|
|
20
|
+
wasRunning: boolean;
|
|
21
|
+
stopped: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
stopTrackedAgentRuns?: () => Promise<{
|
|
24
|
+
attempted: number;
|
|
25
|
+
stopped: number;
|
|
26
|
+
failed: number;
|
|
27
|
+
markedStopped: number;
|
|
28
|
+
}>;
|
|
29
|
+
doSync: () => Promise<void>;
|
|
30
|
+
scheduleNextSync: () => void;
|
|
31
|
+
setSyncServiceRunning: (running: boolean) => void;
|
|
32
|
+
clearSyncTimer: () => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function registerSyncService(deps: RegisterSyncServiceDeps): void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function registerSyncService(deps) {
|
|
2
|
+
deps.api.registerService({
|
|
3
|
+
id: "orgx-sync",
|
|
4
|
+
start: async () => {
|
|
5
|
+
deps.setSyncServiceRunning(true);
|
|
6
|
+
const watchdog = deps.ensureGatewayWatchdog((deps.api.log ?? {}));
|
|
7
|
+
if (watchdog.started) {
|
|
8
|
+
deps.api.log?.info?.("[orgx] Gateway watchdog started", {
|
|
9
|
+
pid: watchdog.pid,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
deps.api.log?.info?.("[orgx] Starting sync service", {
|
|
13
|
+
interval: deps.syncIntervalMs,
|
|
14
|
+
});
|
|
15
|
+
await deps.doSync();
|
|
16
|
+
deps.scheduleNextSync();
|
|
17
|
+
},
|
|
18
|
+
stop: async () => {
|
|
19
|
+
deps.setSyncServiceRunning(false);
|
|
20
|
+
deps.clearSyncTimer();
|
|
21
|
+
if (deps.stopTrackedAgentRuns) {
|
|
22
|
+
try {
|
|
23
|
+
const result = await deps.stopTrackedAgentRuns();
|
|
24
|
+
deps.api.log?.info?.("[orgx] Stopped tracked agent runs on plugin stop", result);
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
deps.api.log?.info?.("[orgx] Failed stopping tracked agent runs on plugin stop", {
|
|
28
|
+
error: err instanceof Error ? err.message : String(err),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (deps.stopGatewayWatchdog) {
|
|
33
|
+
try {
|
|
34
|
+
const result = await deps.stopGatewayWatchdog();
|
|
35
|
+
deps.api.log?.info?.("[orgx] Gateway watchdog teardown on plugin stop", result);
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
deps.api.log?.info?.("[orgx] Failed stopping watchdog on plugin stop", {
|
|
39
|
+
error: err instanceof Error ? err.message : String(err),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface RandomizationArm {
|
|
2
|
+
id: string;
|
|
3
|
+
weight: number;
|
|
4
|
+
}
|
|
5
|
+
export interface RandomizationRequest {
|
|
6
|
+
experimentId: string;
|
|
7
|
+
subjectKey: string;
|
|
8
|
+
channel: string;
|
|
9
|
+
arms: RandomizationArm[];
|
|
10
|
+
seed?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface RandomizationResult {
|
|
13
|
+
experimentId: string;
|
|
14
|
+
subjectKey: string;
|
|
15
|
+
channel: string;
|
|
16
|
+
assignmentKey: string;
|
|
17
|
+
exposureKey: string;
|
|
18
|
+
bucket: number;
|
|
19
|
+
armId: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function randomizeExperimentAssignment(request: RandomizationRequest): RandomizationResult;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { stableHash } from "../hash-utils.js";
|
|
2
|
+
const MAX_UINT53 = 0x1fffffffffffff;
|
|
3
|
+
export function randomizeExperimentAssignment(request) {
|
|
4
|
+
const experimentId = sanitizeIdentifier(request.experimentId, "experimentId");
|
|
5
|
+
const subjectKey = sanitizeIdentifier(request.subjectKey, "subjectKey");
|
|
6
|
+
const channel = sanitizeIdentifier(request.channel, "channel");
|
|
7
|
+
const normalizedArms = normalizeArms(request.arms);
|
|
8
|
+
const seed = typeof request.seed === "string" && request.seed.trim().length > 0 ? request.seed.trim() : "v1";
|
|
9
|
+
const assignmentKey = stableHash(`exp:${experimentId}:subject:${subjectKey}:seed:${seed}`);
|
|
10
|
+
const bucket = bucketFromHash(assignmentKey);
|
|
11
|
+
const armId = pickWeightedArm(bucket, normalizedArms);
|
|
12
|
+
return {
|
|
13
|
+
experimentId,
|
|
14
|
+
subjectKey,
|
|
15
|
+
channel,
|
|
16
|
+
assignmentKey,
|
|
17
|
+
exposureKey: stableHash(`exp:${experimentId}:subject:${subjectKey}:arm:${armId}:seed:${seed}`),
|
|
18
|
+
bucket,
|
|
19
|
+
armId,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function normalizeArms(arms) {
|
|
23
|
+
if (!Array.isArray(arms) || arms.length === 0) {
|
|
24
|
+
throw new Error("arms must include at least one entry");
|
|
25
|
+
}
|
|
26
|
+
const sanitized = arms.map((arm, index) => {
|
|
27
|
+
const id = sanitizeIdentifier(arm?.id, `arms[${index}].id`);
|
|
28
|
+
const weight = Number.isFinite(arm?.weight) ? Number(arm.weight) : Number.NaN;
|
|
29
|
+
if (!Number.isFinite(weight) || weight <= 0) {
|
|
30
|
+
throw new Error(`arms[${index}].weight must be > 0`);
|
|
31
|
+
}
|
|
32
|
+
return { id, weight };
|
|
33
|
+
});
|
|
34
|
+
const totalWeight = sanitized.reduce((sum, arm) => sum + arm.weight, 0);
|
|
35
|
+
if (totalWeight <= 0) {
|
|
36
|
+
throw new Error("arms total weight must be > 0");
|
|
37
|
+
}
|
|
38
|
+
return sanitized.map((arm) => ({ id: arm.id, weight: arm.weight / totalWeight }));
|
|
39
|
+
}
|
|
40
|
+
function pickWeightedArm(bucket, arms) {
|
|
41
|
+
let cursor = 0;
|
|
42
|
+
for (const arm of arms) {
|
|
43
|
+
cursor += arm.weight;
|
|
44
|
+
if (bucket < cursor) {
|
|
45
|
+
return arm.id;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return arms[arms.length - 1].id;
|
|
49
|
+
}
|
|
50
|
+
function sanitizeIdentifier(value, field) {
|
|
51
|
+
if (typeof value !== "string") {
|
|
52
|
+
throw new Error(`${field} must be a string`);
|
|
53
|
+
}
|
|
54
|
+
const trimmed = value.trim();
|
|
55
|
+
if (trimmed.length === 0) {
|
|
56
|
+
throw new Error(`${field} cannot be empty`);
|
|
57
|
+
}
|
|
58
|
+
return trimmed;
|
|
59
|
+
}
|
|
60
|
+
function bucketFromHash(hash) {
|
|
61
|
+
const first53Bits = hash.slice(0, 14);
|
|
62
|
+
return parseInt(first53Bits, 16) / MAX_UINT53;
|
|
63
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type ToolLike = {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
parameters: Record<string, unknown>;
|
|
5
|
+
execute: (callId: string, params?: unknown) => Promise<{
|
|
6
|
+
content: Array<{
|
|
7
|
+
type: "text";
|
|
8
|
+
text: string;
|
|
9
|
+
}>;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
type ServiceLike = {
|
|
13
|
+
id: string;
|
|
14
|
+
start: () => Promise<void>;
|
|
15
|
+
stop: () => Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
type ApiLike = {
|
|
18
|
+
registerTool: (tool: ToolLike, options?: {
|
|
19
|
+
optional?: boolean;
|
|
20
|
+
}) => void;
|
|
21
|
+
registerService: (service: ServiceLike) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare function instrumentPluginApi(input: {
|
|
24
|
+
api: ApiLike;
|
|
25
|
+
installationId: string;
|
|
26
|
+
pluginVersion: string;
|
|
27
|
+
toErrorMessage: (err: unknown) => string;
|
|
28
|
+
}): void;
|
|
29
|
+
export {};
|