forge-openclaw-plugin 0.2.23 → 0.2.25
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 +13 -0
- package/dist/assets/{board-_C6oMy5w.js → board-VmF4FAfr.js} +3 -3
- package/dist/assets/{board-_C6oMy5w.js.map → board-VmF4FAfr.js.map} +1 -1
- package/dist/assets/index-CFCKDIMH.js +67 -0
- package/dist/assets/index-CFCKDIMH.js.map +1 -0
- package/dist/assets/index-ZPY6U1TU.css +1 -0
- package/dist/assets/{motion-D4sZgCHd.js → motion-DvkU14p-.js} +3 -3
- package/dist/assets/motion-DvkU14p-.js.map +1 -0
- package/dist/assets/{table-BWzTaky1.js → table-DgiPof9E.js} +2 -2
- package/dist/assets/{table-BWzTaky1.js.map → table-DgiPof9E.js.map} +1 -1
- package/dist/assets/{ui-BzK4azQb.js → ui-nYfoC0Gq.js} +2 -2
- package/dist/assets/{ui-BzK4azQb.js.map → ui-nYfoC0Gq.js.map} +1 -1
- package/dist/assets/vendor-D9PTEPSB.js +824 -0
- package/dist/assets/vendor-D9PTEPSB.js.map +1 -0
- package/dist/assets/viz-Cqb6s--o.js +34 -0
- package/dist/assets/viz-Cqb6s--o.js.map +1 -0
- package/dist/index.html +8 -8
- package/dist/openclaw/parity.d.ts +1 -1
- package/dist/openclaw/parity.js +29 -0
- package/dist/openclaw/plugin-entry-shared.d.ts +1 -0
- package/dist/openclaw/plugin-entry-shared.js +7 -4
- package/dist/openclaw/plugin-sdk-types.d.ts +12 -0
- package/dist/openclaw/routes.js +236 -0
- package/dist/openclaw/session-bootstrap.d.ts +78 -0
- package/dist/openclaw/session-bootstrap.js +240 -0
- package/dist/openclaw/tools.js +279 -3
- package/dist/server/app.js +855 -19
- package/dist/server/connectors/box-registry.js +257 -0
- package/dist/server/db.js +2 -0
- package/dist/server/discovery-advertiser.js +114 -0
- package/dist/server/health.js +39 -11
- package/dist/server/index.js +4 -0
- package/dist/server/managers/platform/llm-manager.js +40 -4
- package/dist/server/managers/platform/openai-responses-provider.js +129 -19
- package/dist/server/movement.js +2935 -0
- package/dist/server/openapi.js +628 -5
- package/dist/server/psyche-types.js +15 -1
- package/dist/server/questionnaire-flow.js +552 -0
- package/dist/server/questionnaire-seeds.js +853 -0
- package/dist/server/questionnaire-types.js +340 -0
- package/dist/server/repositories/ai-connectors.js +944 -0
- package/dist/server/repositories/ai-processors.js +547 -0
- package/dist/server/repositories/diagnostic-logs.js +57 -4
- package/dist/server/repositories/entity-ownership.js +9 -1
- package/dist/server/repositories/habits.js +77 -9
- package/dist/server/repositories/model-settings.js +216 -0
- package/dist/server/repositories/notes.js +57 -15
- package/dist/server/repositories/preferences.js +124 -0
- package/dist/server/repositories/questionnaires.js +1338 -0
- package/dist/server/repositories/rewards.js +2 -2
- package/dist/server/repositories/settings.js +108 -12
- package/dist/server/repositories/surface-layouts.js +76 -0
- package/dist/server/repositories/wiki-memory.js +5 -1
- package/dist/server/services/entity-crud.js +81 -2
- package/dist/server/services/openai-codex-oauth.js +153 -0
- package/dist/server/services/psyche-observation-calendar.js +46 -0
- package/dist/server/types.js +492 -3
- package/dist/server/watch-mobile.js +562 -0
- package/dist/server/web.js +9 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +6 -1
- package/server/migrations/024_questionnaires.sql +96 -0
- package/server/migrations/025_ai_model_connections.sql +26 -0
- package/server/migrations/026_custom_theme_settings.sql +2 -0
- package/server/migrations/027_ai_processors.sql +31 -0
- package/server/migrations/028_movement_domain.sql +136 -0
- package/server/migrations/029_watch_micro_capture.sql +23 -0
- package/server/migrations/030_surface_layouts.sql +5 -0
- package/server/migrations/031_ai_processor_runtime_upgrades.sql +10 -0
- package/server/migrations/032_ai_connectors.sql +44 -0
- package/server/migrations/033_movement_trip_point_sync.sql +36 -0
- package/server/migrations/034_movement_segment_sync.sql +49 -0
- package/skills/forge-openclaw/SKILL.md +12 -1
- package/skills/forge-openclaw/entity_conversation_playbooks.md +331 -84
- package/skills/forge-openclaw/psyche_entity_playbooks.md +252 -221
- package/dist/assets/index-Ch_xeZ2u.js +0 -63
- package/dist/assets/index-Ch_xeZ2u.js.map +0 -1
- package/dist/assets/index-DvVM7K6j.css +0 -1
- package/dist/assets/motion-D4sZgCHd.js.map +0 -1
- package/dist/assets/vendor-De38P6YR.js +0 -729
- package/dist/assets/vendor-De38P6YR.js.map +0 -1
- package/dist/assets/viz-C6hfyqzu.js +0 -34
- package/dist/assets/viz-C6hfyqzu.js.map +0 -1
- package/skills/forge-openclaw/cron_jobs.md +0 -395
package/dist/index.html
CHANGED
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
/>
|
|
14
14
|
<link rel="icon" type="image/png" href="/forge/assets/favicon-BCHm9dUV.ico" />
|
|
15
15
|
<link rel="alternate icon" href="/forge/assets/favicon-BCHm9dUV.ico" />
|
|
16
|
-
<script type="module" crossorigin src="/forge/assets/index-
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/forge/assets/viz-
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/forge/assets/vendor-
|
|
19
|
-
<link rel="modulepreload" crossorigin href="/forge/assets/ui-
|
|
20
|
-
<link rel="modulepreload" crossorigin href="/forge/assets/motion-
|
|
21
|
-
<link rel="modulepreload" crossorigin href="/forge/assets/table-
|
|
22
|
-
<link rel="modulepreload" crossorigin href="/forge/assets/board-
|
|
16
|
+
<script type="module" crossorigin src="/forge/assets/index-CFCKDIMH.js"></script>
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/forge/assets/viz-Cqb6s--o.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/forge/assets/vendor-D9PTEPSB.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/forge/assets/ui-nYfoC0Gq.js">
|
|
20
|
+
<link rel="modulepreload" crossorigin href="/forge/assets/motion-DvkU14p-.js">
|
|
21
|
+
<link rel="modulepreload" crossorigin href="/forge/assets/table-DgiPof9E.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="/forge/assets/board-VmF4FAfr.js">
|
|
23
23
|
<link rel="stylesheet" crossorigin href="/forge/assets/vendor-DT3pnAKJ.css">
|
|
24
|
-
<link rel="stylesheet" crossorigin href="/forge/assets/index-
|
|
24
|
+
<link rel="stylesheet" crossorigin href="/forge/assets/index-ZPY6U1TU.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body class="bg-canvas text-ink antialiased">
|
|
27
27
|
<div id="root"></div>
|
|
@@ -2,7 +2,7 @@ export type ApiRouteKey = `${Uppercase<string>} ${string}`;
|
|
|
2
2
|
export type ForgeSupportedPluginApiRoute = {
|
|
3
3
|
method: Uppercase<string>;
|
|
4
4
|
path: string;
|
|
5
|
-
purpose: "diagnostics" | "overview" | "operator_context" | "onboarding" | "psyche" | "xp" | "weekly_review" | "entities" | "work" | "insights" | "wiki" | "health";
|
|
5
|
+
purpose: "diagnostics" | "overview" | "operator_context" | "onboarding" | "psyche" | "xp" | "weekly_review" | "entities" | "work" | "insights" | "wiki" | "health" | "preferences" | "questionnaires";
|
|
6
6
|
};
|
|
7
7
|
export declare const FORGE_SUPPORTED_PLUGIN_API_ROUTES: ForgeSupportedPluginApiRoute[];
|
|
8
8
|
export declare function makeApiRouteKey(method: string, path: string): ApiRouteKey;
|
package/dist/openclaw/parity.js
CHANGED
|
@@ -29,6 +29,35 @@ export const FORGE_SUPPORTED_PLUGIN_API_ROUTES = [
|
|
|
29
29
|
{ method: "PATCH", path: "/api/v1/health/sleep/:id", purpose: "health" },
|
|
30
30
|
{ method: "GET", path: "/api/v1/health/fitness", purpose: "health" },
|
|
31
31
|
{ method: "PATCH", path: "/api/v1/health/workouts/:id", purpose: "health" },
|
|
32
|
+
{ method: "GET", path: "/api/v1/preferences/workspace", purpose: "preferences" },
|
|
33
|
+
{ method: "POST", path: "/api/v1/preferences/game/start", purpose: "preferences" },
|
|
34
|
+
{ method: "POST", path: "/api/v1/preferences/catalogs", purpose: "preferences" },
|
|
35
|
+
{ method: "PATCH", path: "/api/v1/preferences/catalogs/:id", purpose: "preferences" },
|
|
36
|
+
{ method: "DELETE", path: "/api/v1/preferences/catalogs/:id", purpose: "preferences" },
|
|
37
|
+
{ method: "POST", path: "/api/v1/preferences/catalog-items", purpose: "preferences" },
|
|
38
|
+
{ method: "PATCH", path: "/api/v1/preferences/catalog-items/:id", purpose: "preferences" },
|
|
39
|
+
{ method: "DELETE", path: "/api/v1/preferences/catalog-items/:id", purpose: "preferences" },
|
|
40
|
+
{ method: "POST", path: "/api/v1/preferences/contexts", purpose: "preferences" },
|
|
41
|
+
{ method: "PATCH", path: "/api/v1/preferences/contexts/:id", purpose: "preferences" },
|
|
42
|
+
{ method: "POST", path: "/api/v1/preferences/contexts/merge", purpose: "preferences" },
|
|
43
|
+
{ method: "POST", path: "/api/v1/preferences/items", purpose: "preferences" },
|
|
44
|
+
{ method: "PATCH", path: "/api/v1/preferences/items/:id", purpose: "preferences" },
|
|
45
|
+
{ method: "POST", path: "/api/v1/preferences/items/from-entity", purpose: "preferences" },
|
|
46
|
+
{ method: "POST", path: "/api/v1/preferences/judgments", purpose: "preferences" },
|
|
47
|
+
{ method: "POST", path: "/api/v1/preferences/signals", purpose: "preferences" },
|
|
48
|
+
{ method: "PATCH", path: "/api/v1/preferences/items/:id/score", purpose: "preferences" },
|
|
49
|
+
{ method: "GET", path: "/api/v1/psyche/questionnaires", purpose: "questionnaires" },
|
|
50
|
+
{ method: "POST", path: "/api/v1/psyche/questionnaires", purpose: "questionnaires" },
|
|
51
|
+
{ method: "GET", path: "/api/v1/psyche/questionnaires/:id", purpose: "questionnaires" },
|
|
52
|
+
{ method: "POST", path: "/api/v1/psyche/questionnaires/:id/clone", purpose: "questionnaires" },
|
|
53
|
+
{ method: "POST", path: "/api/v1/psyche/questionnaires/:id/draft", purpose: "questionnaires" },
|
|
54
|
+
{ method: "PATCH", path: "/api/v1/psyche/questionnaires/:id/draft", purpose: "questionnaires" },
|
|
55
|
+
{ method: "POST", path: "/api/v1/psyche/questionnaires/:id/publish", purpose: "questionnaires" },
|
|
56
|
+
{ method: "POST", path: "/api/v1/psyche/questionnaires/:id/runs", purpose: "questionnaires" },
|
|
57
|
+
{ method: "GET", path: "/api/v1/psyche/questionnaire-runs/:id", purpose: "questionnaires" },
|
|
58
|
+
{ method: "PATCH", path: "/api/v1/psyche/questionnaire-runs/:id", purpose: "questionnaires" },
|
|
59
|
+
{ method: "POST", path: "/api/v1/psyche/questionnaire-runs/:id/complete", purpose: "questionnaires" },
|
|
60
|
+
{ method: "GET", path: "/api/v1/psyche/self-observation/calendar", purpose: "questionnaires" },
|
|
32
61
|
{ method: "POST", path: "/api/v1/entities/search", purpose: "entities" },
|
|
33
62
|
{ method: "POST", path: "/api/v1/entities/create", purpose: "entities" },
|
|
34
63
|
{ method: "POST", path: "/api/v1/entities/update", purpose: "entities" },
|
|
@@ -5,6 +5,7 @@ export declare const FORGE_PLUGIN_NAME = "Forge";
|
|
|
5
5
|
export declare const FORGE_PLUGIN_DESCRIPTION = "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.";
|
|
6
6
|
export declare const DEFAULT_FORGE_ORIGIN = "http://127.0.0.1";
|
|
7
7
|
export declare const DEFAULT_FORGE_PORT = 4317;
|
|
8
|
+
export declare const DEFAULT_OPENCLAW_ACTOR_LABEL = "aurel (claw)";
|
|
8
9
|
export declare function resolveForgePluginConfig(pluginConfig: unknown): ForgePluginConfig;
|
|
9
10
|
export declare const forgePluginConfigSchema: ForgePluginConfigSchema;
|
|
10
11
|
export declare function registerForgePlugin(api: ForgePluginRegistrationApi): void;
|
|
@@ -4,12 +4,14 @@ import path from "node:path";
|
|
|
4
4
|
import { buildForgeBaseUrl, buildForgeWebAppUrl } from "./api-client.js";
|
|
5
5
|
import { primeForgeRuntime } from "./local-runtime.js";
|
|
6
6
|
import { registerForgePluginCli, registerForgePluginRoutes } from "./routes.js";
|
|
7
|
+
import { registerForgeSessionBootstrapHook } from "./session-bootstrap.js";
|
|
7
8
|
import { registerForgePluginTools } from "./tools.js";
|
|
8
9
|
export const FORGE_PLUGIN_ID = "forge-openclaw-plugin";
|
|
9
10
|
export const FORGE_PLUGIN_NAME = "Forge";
|
|
10
11
|
export const FORGE_PLUGIN_DESCRIPTION = "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.";
|
|
11
12
|
export const DEFAULT_FORGE_ORIGIN = "http://127.0.0.1";
|
|
12
13
|
export const DEFAULT_FORGE_PORT = 4317;
|
|
14
|
+
export const DEFAULT_OPENCLAW_ACTOR_LABEL = "aurel (claw)";
|
|
13
15
|
const LOCAL_HOSTNAMES = new Set(["127.0.0.1", "localhost", "::1"]);
|
|
14
16
|
function normalizeString(value, fallback) {
|
|
15
17
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : fallback;
|
|
@@ -88,7 +90,7 @@ export function resolveForgePluginConfig(pluginConfig) {
|
|
|
88
90
|
portSource: hasConfiguredPort ? "configured" : preferredPort !== null ? "preferred" : "default",
|
|
89
91
|
dataRoot: normalizeDataRoot(raw.dataRoot),
|
|
90
92
|
apiToken: typeof raw.apiToken === "string" ? raw.apiToken.trim() : "",
|
|
91
|
-
actorLabel: normalizeString(raw.actorLabel,
|
|
93
|
+
actorLabel: normalizeString(raw.actorLabel, DEFAULT_OPENCLAW_ACTOR_LABEL),
|
|
92
94
|
timeoutMs: normalizeTimeout(raw.timeoutMs, 15_000)
|
|
93
95
|
};
|
|
94
96
|
}
|
|
@@ -124,7 +126,7 @@ export const forgePluginConfigSchema = {
|
|
|
124
126
|
},
|
|
125
127
|
actorLabel: {
|
|
126
128
|
type: "string",
|
|
127
|
-
default:
|
|
129
|
+
default: DEFAULT_OPENCLAW_ACTOR_LABEL,
|
|
128
130
|
description: "Actor label recorded in Forge provenance headers."
|
|
129
131
|
},
|
|
130
132
|
timeoutMs: {
|
|
@@ -161,8 +163,8 @@ export const forgePluginConfigSchema = {
|
|
|
161
163
|
},
|
|
162
164
|
actorLabel: {
|
|
163
165
|
label: "Actor Label",
|
|
164
|
-
help: "Recorded in Forge provenance headers for plugin-originated writes.",
|
|
165
|
-
placeholder:
|
|
166
|
+
help: "Recorded in Forge provenance headers for plugin-originated writes. Use a distinct OpenClaw label such as <name> (claw).",
|
|
167
|
+
placeholder: DEFAULT_OPENCLAW_ACTOR_LABEL
|
|
166
168
|
},
|
|
167
169
|
timeoutMs: {
|
|
168
170
|
label: "Request Timeout (ms)",
|
|
@@ -174,6 +176,7 @@ export const forgePluginConfigSchema = {
|
|
|
174
176
|
export function registerForgePlugin(api) {
|
|
175
177
|
const config = resolveForgePluginConfig(api.pluginConfig);
|
|
176
178
|
primeForgeRuntime(config);
|
|
179
|
+
registerForgeSessionBootstrapHook(api, config);
|
|
177
180
|
registerForgePluginRoutes(api, config);
|
|
178
181
|
registerForgePluginCli(api, config);
|
|
179
182
|
registerForgePluginTools(api, config);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
2
|
import type { TSchema } from "@sinclair/typebox";
|
|
3
3
|
import type { AgentToolResult } from "@mariozechner/pi-agent-core";
|
|
4
|
+
import type { InternalHookEvent } from "openclaw/plugin-sdk/hook-runtime";
|
|
4
5
|
export type ForgePluginConfigSchema = {
|
|
5
6
|
parse(value: unknown): unknown;
|
|
6
7
|
jsonSchema: Record<string, unknown>;
|
|
@@ -43,10 +44,21 @@ export type ForgeCliRegistrarContext = {
|
|
|
43
44
|
};
|
|
44
45
|
export type ForgePluginRegistrationApi = {
|
|
45
46
|
pluginConfig?: unknown;
|
|
47
|
+
logger?: {
|
|
48
|
+
info?(message: string): void;
|
|
49
|
+
warn?(message: string): void;
|
|
50
|
+
error?(message: string): void;
|
|
51
|
+
debug?(message: string): void;
|
|
52
|
+
};
|
|
46
53
|
registerHttpRoute(route: ForgeRegisteredHttpRoute): void;
|
|
47
54
|
registerTool(tool: ForgeRegisteredTool, options?: {
|
|
48
55
|
optional?: boolean;
|
|
49
56
|
}): void;
|
|
57
|
+
registerHook?(events: string | string[], handler: (event: InternalHookEvent) => Promise<void> | void, options?: {
|
|
58
|
+
name?: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
register?: boolean;
|
|
61
|
+
}): void;
|
|
50
62
|
registerCli?(registrar: (context: ForgeCliRegistrarContext) => void, options?: {
|
|
51
63
|
commands?: string[];
|
|
52
64
|
}): void;
|
package/dist/openclaw/routes.js
CHANGED
|
@@ -164,6 +164,16 @@ export const FORGE_PLUGIN_ROUTE_GROUPS = [
|
|
|
164
164
|
upstreamPath: "/api/v1/health/fitness",
|
|
165
165
|
target: (_match, url) => passthroughSearch("/api/v1/health/fitness", url)
|
|
166
166
|
}),
|
|
167
|
+
exact("/forge/v1/preferences/workspace", {
|
|
168
|
+
method: "GET",
|
|
169
|
+
upstreamPath: "/api/v1/preferences/workspace",
|
|
170
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/workspace", url)
|
|
171
|
+
}),
|
|
172
|
+
exact("/forge/v1/psyche/self-observation/calendar", {
|
|
173
|
+
method: "GET",
|
|
174
|
+
upstreamPath: "/api/v1/psyche/self-observation/calendar",
|
|
175
|
+
target: (_match, url) => passthroughSearch("/api/v1/psyche/self-observation/calendar", url)
|
|
176
|
+
}),
|
|
167
177
|
exact("/forge/v1/operator/log-work", {
|
|
168
178
|
method: "POST",
|
|
169
179
|
upstreamPath: "/api/v1/operator/log-work",
|
|
@@ -185,6 +195,232 @@ export const FORGE_PLUGIN_ROUTE_GROUPS = [
|
|
|
185
195
|
requiresToken: true,
|
|
186
196
|
target: (_match, url) => passthroughSearch("/api/v1/insights", url)
|
|
187
197
|
}),
|
|
198
|
+
{
|
|
199
|
+
path: "/forge/v1/preferences",
|
|
200
|
+
match: "prefix",
|
|
201
|
+
operations: [
|
|
202
|
+
{
|
|
203
|
+
method: "POST",
|
|
204
|
+
pattern: /^\/forge\/v1\/preferences\/game\/start$/,
|
|
205
|
+
upstreamPath: "/api/v1/preferences/game/start",
|
|
206
|
+
requestBody: "json",
|
|
207
|
+
requiresToken: true,
|
|
208
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/game/start", url)
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
method: "POST",
|
|
212
|
+
pattern: /^\/forge\/v1\/preferences\/catalogs$/,
|
|
213
|
+
upstreamPath: "/api/v1/preferences/catalogs",
|
|
214
|
+
requestBody: "json",
|
|
215
|
+
requiresToken: true,
|
|
216
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/catalogs", url)
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
method: "PATCH",
|
|
220
|
+
pattern: /^\/forge\/v1\/preferences\/catalogs\/([^/]+)$/,
|
|
221
|
+
upstreamPath: "/api/v1/preferences/catalogs/:id",
|
|
222
|
+
requestBody: "json",
|
|
223
|
+
requiresToken: true,
|
|
224
|
+
target: (match, url) => passthroughSearch(`/api/v1/preferences/catalogs/${match[1]}`, url)
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
method: "DELETE",
|
|
228
|
+
pattern: /^\/forge\/v1\/preferences\/catalogs\/([^/]+)$/,
|
|
229
|
+
upstreamPath: "/api/v1/preferences/catalogs/:id",
|
|
230
|
+
requiresToken: true,
|
|
231
|
+
target: (match, url) => passthroughSearch(`/api/v1/preferences/catalogs/${match[1]}`, url)
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
method: "POST",
|
|
235
|
+
pattern: /^\/forge\/v1\/preferences\/catalog-items$/,
|
|
236
|
+
upstreamPath: "/api/v1/preferences/catalog-items",
|
|
237
|
+
requestBody: "json",
|
|
238
|
+
requiresToken: true,
|
|
239
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/catalog-items", url)
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
method: "PATCH",
|
|
243
|
+
pattern: /^\/forge\/v1\/preferences\/catalog-items\/([^/]+)$/,
|
|
244
|
+
upstreamPath: "/api/v1/preferences/catalog-items/:id",
|
|
245
|
+
requestBody: "json",
|
|
246
|
+
requiresToken: true,
|
|
247
|
+
target: (match, url) => passthroughSearch(`/api/v1/preferences/catalog-items/${match[1]}`, url)
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
method: "DELETE",
|
|
251
|
+
pattern: /^\/forge\/v1\/preferences\/catalog-items\/([^/]+)$/,
|
|
252
|
+
upstreamPath: "/api/v1/preferences/catalog-items/:id",
|
|
253
|
+
requiresToken: true,
|
|
254
|
+
target: (match, url) => passthroughSearch(`/api/v1/preferences/catalog-items/${match[1]}`, url)
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
method: "POST",
|
|
258
|
+
pattern: /^\/forge\/v1\/preferences\/contexts$/,
|
|
259
|
+
upstreamPath: "/api/v1/preferences/contexts",
|
|
260
|
+
requestBody: "json",
|
|
261
|
+
requiresToken: true,
|
|
262
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/contexts", url)
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
method: "PATCH",
|
|
266
|
+
pattern: /^\/forge\/v1\/preferences\/contexts\/([^/]+)$/,
|
|
267
|
+
upstreamPath: "/api/v1/preferences/contexts/:id",
|
|
268
|
+
requestBody: "json",
|
|
269
|
+
requiresToken: true,
|
|
270
|
+
target: (match, url) => passthroughSearch(`/api/v1/preferences/contexts/${match[1]}`, url)
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
method: "POST",
|
|
274
|
+
pattern: /^\/forge\/v1\/preferences\/contexts\/merge$/,
|
|
275
|
+
upstreamPath: "/api/v1/preferences/contexts/merge",
|
|
276
|
+
requestBody: "json",
|
|
277
|
+
requiresToken: true,
|
|
278
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/contexts/merge", url)
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
method: "POST",
|
|
282
|
+
pattern: /^\/forge\/v1\/preferences\/items$/,
|
|
283
|
+
upstreamPath: "/api/v1/preferences/items",
|
|
284
|
+
requestBody: "json",
|
|
285
|
+
requiresToken: true,
|
|
286
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/items", url)
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
method: "PATCH",
|
|
290
|
+
pattern: /^\/forge\/v1\/preferences\/items\/([^/]+)$/,
|
|
291
|
+
upstreamPath: "/api/v1/preferences/items/:id",
|
|
292
|
+
requestBody: "json",
|
|
293
|
+
requiresToken: true,
|
|
294
|
+
target: (match, url) => passthroughSearch(`/api/v1/preferences/items/${match[1]}`, url)
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
method: "POST",
|
|
298
|
+
pattern: /^\/forge\/v1\/preferences\/items\/from-entity$/,
|
|
299
|
+
upstreamPath: "/api/v1/preferences/items/from-entity",
|
|
300
|
+
requestBody: "json",
|
|
301
|
+
requiresToken: true,
|
|
302
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/items/from-entity", url)
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
method: "POST",
|
|
306
|
+
pattern: /^\/forge\/v1\/preferences\/judgments$/,
|
|
307
|
+
upstreamPath: "/api/v1/preferences/judgments",
|
|
308
|
+
requestBody: "json",
|
|
309
|
+
requiresToken: true,
|
|
310
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/judgments", url)
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
method: "POST",
|
|
314
|
+
pattern: /^\/forge\/v1\/preferences\/signals$/,
|
|
315
|
+
upstreamPath: "/api/v1/preferences/signals",
|
|
316
|
+
requestBody: "json",
|
|
317
|
+
requiresToken: true,
|
|
318
|
+
target: (_match, url) => passthroughSearch("/api/v1/preferences/signals", url)
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
method: "PATCH",
|
|
322
|
+
pattern: /^\/forge\/v1\/preferences\/items\/([^/]+)\/score$/,
|
|
323
|
+
upstreamPath: "/api/v1/preferences/items/:id/score",
|
|
324
|
+
requestBody: "json",
|
|
325
|
+
requiresToken: true,
|
|
326
|
+
target: (match, url) => passthroughSearch(`/api/v1/preferences/items/${match[1]}/score`, url)
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
path: "/forge/v1/psyche/questionnaires",
|
|
332
|
+
match: "prefix",
|
|
333
|
+
operations: [
|
|
334
|
+
{
|
|
335
|
+
method: "GET",
|
|
336
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaires$/,
|
|
337
|
+
upstreamPath: "/api/v1/psyche/questionnaires",
|
|
338
|
+
target: (_match, url) => passthroughSearch("/api/v1/psyche/questionnaires", url)
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
method: "POST",
|
|
342
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaires$/,
|
|
343
|
+
upstreamPath: "/api/v1/psyche/questionnaires",
|
|
344
|
+
requestBody: "json",
|
|
345
|
+
requiresToken: true,
|
|
346
|
+
target: (_match, url) => passthroughSearch("/api/v1/psyche/questionnaires", url)
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
method: "GET",
|
|
350
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaires\/([^/]+)$/,
|
|
351
|
+
upstreamPath: "/api/v1/psyche/questionnaires/:id",
|
|
352
|
+
target: (match, url) => passthroughSearch(`/api/v1/psyche/questionnaires/${match[1]}`, url)
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
method: "POST",
|
|
356
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaires\/([^/]+)\/clone$/,
|
|
357
|
+
upstreamPath: "/api/v1/psyche/questionnaires/:id/clone",
|
|
358
|
+
requestBody: "json",
|
|
359
|
+
requiresToken: true,
|
|
360
|
+
target: (match, url) => passthroughSearch(`/api/v1/psyche/questionnaires/${match[1]}/clone`, url)
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
method: "POST",
|
|
364
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaires\/([^/]+)\/draft$/,
|
|
365
|
+
upstreamPath: "/api/v1/psyche/questionnaires/:id/draft",
|
|
366
|
+
requestBody: "json",
|
|
367
|
+
requiresToken: true,
|
|
368
|
+
target: (match, url) => passthroughSearch(`/api/v1/psyche/questionnaires/${match[1]}/draft`, url)
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
method: "PATCH",
|
|
372
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaires\/([^/]+)\/draft$/,
|
|
373
|
+
upstreamPath: "/api/v1/psyche/questionnaires/:id/draft",
|
|
374
|
+
requestBody: "json",
|
|
375
|
+
requiresToken: true,
|
|
376
|
+
target: (match, url) => passthroughSearch(`/api/v1/psyche/questionnaires/${match[1]}/draft`, url)
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
method: "POST",
|
|
380
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaires\/([^/]+)\/publish$/,
|
|
381
|
+
upstreamPath: "/api/v1/psyche/questionnaires/:id/publish",
|
|
382
|
+
requestBody: "json",
|
|
383
|
+
requiresToken: true,
|
|
384
|
+
target: (match, url) => passthroughSearch(`/api/v1/psyche/questionnaires/${match[1]}/publish`, url)
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
method: "POST",
|
|
388
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaires\/([^/]+)\/runs$/,
|
|
389
|
+
upstreamPath: "/api/v1/psyche/questionnaires/:id/runs",
|
|
390
|
+
requestBody: "json",
|
|
391
|
+
requiresToken: true,
|
|
392
|
+
target: (match, url) => passthroughSearch(`/api/v1/psyche/questionnaires/${match[1]}/runs`, url)
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
path: "/forge/v1/psyche/questionnaire-runs",
|
|
398
|
+
match: "prefix",
|
|
399
|
+
operations: [
|
|
400
|
+
{
|
|
401
|
+
method: "GET",
|
|
402
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaire-runs\/([^/]+)$/,
|
|
403
|
+
upstreamPath: "/api/v1/psyche/questionnaire-runs/:id",
|
|
404
|
+
target: (match, url) => passthroughSearch(`/api/v1/psyche/questionnaire-runs/${match[1]}`, url)
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
method: "PATCH",
|
|
408
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaire-runs\/([^/]+)$/,
|
|
409
|
+
upstreamPath: "/api/v1/psyche/questionnaire-runs/:id",
|
|
410
|
+
requestBody: "json",
|
|
411
|
+
requiresToken: true,
|
|
412
|
+
target: (match, url) => passthroughSearch(`/api/v1/psyche/questionnaire-runs/${match[1]}`, url)
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
method: "POST",
|
|
416
|
+
pattern: /^\/forge\/v1\/psyche\/questionnaire-runs\/([^/]+)\/complete$/,
|
|
417
|
+
upstreamPath: "/api/v1/psyche/questionnaire-runs/:id/complete",
|
|
418
|
+
requestBody: "json",
|
|
419
|
+
requiresToken: true,
|
|
420
|
+
target: (match, url) => passthroughSearch(`/api/v1/psyche/questionnaire-runs/${match[1]}/complete`, url)
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
},
|
|
188
424
|
{
|
|
189
425
|
path: "/forge/v1/wiki/pages",
|
|
190
426
|
match: "prefix",
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ForgePluginConfig } from "./api-client.js";
|
|
2
|
+
import type { ForgePluginRegistrationApi } from "./plugin-sdk-types.js";
|
|
3
|
+
type ForgeGoalRecord = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string | null;
|
|
7
|
+
status?: string;
|
|
8
|
+
horizon?: string | null;
|
|
9
|
+
};
|
|
10
|
+
type ForgeProjectRecord = {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string | null;
|
|
14
|
+
status?: string;
|
|
15
|
+
goalId?: string | null;
|
|
16
|
+
goalTitle?: string | null;
|
|
17
|
+
};
|
|
18
|
+
type ForgeTaskRecord = {
|
|
19
|
+
id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
description?: string | null;
|
|
22
|
+
status?: string;
|
|
23
|
+
priority?: string;
|
|
24
|
+
dueDate?: string | null;
|
|
25
|
+
projectId?: string | null;
|
|
26
|
+
projectTitle?: string | null;
|
|
27
|
+
goalId?: string | null;
|
|
28
|
+
goalTitle?: string | null;
|
|
29
|
+
};
|
|
30
|
+
type ForgeHabitRecord = {
|
|
31
|
+
id: string;
|
|
32
|
+
title: string;
|
|
33
|
+
description?: string | null;
|
|
34
|
+
polarity?: string;
|
|
35
|
+
frequency?: string | null;
|
|
36
|
+
};
|
|
37
|
+
type ForgeStrategyRecord = {
|
|
38
|
+
id: string;
|
|
39
|
+
title: string;
|
|
40
|
+
overview?: string | null;
|
|
41
|
+
status?: string | null;
|
|
42
|
+
isLocked?: boolean;
|
|
43
|
+
};
|
|
44
|
+
type ForgeWikiPageRecord = {
|
|
45
|
+
id: string;
|
|
46
|
+
slug: string;
|
|
47
|
+
title: string;
|
|
48
|
+
kind?: string;
|
|
49
|
+
parentSlug?: string | null;
|
|
50
|
+
summary?: string | null;
|
|
51
|
+
contentPlain?: string | null;
|
|
52
|
+
};
|
|
53
|
+
type ForgeOperatorContext = {
|
|
54
|
+
generatedAt?: string;
|
|
55
|
+
activeProjects?: ForgeProjectRecord[];
|
|
56
|
+
focusTasks?: ForgeTaskRecord[];
|
|
57
|
+
dueHabits?: ForgeHabitRecord[];
|
|
58
|
+
recommendedNextTask?: ForgeTaskRecord | null;
|
|
59
|
+
};
|
|
60
|
+
type ForgeOperatorOverview = {
|
|
61
|
+
generatedAt?: string;
|
|
62
|
+
warnings?: string[];
|
|
63
|
+
operator?: ForgeOperatorContext | null;
|
|
64
|
+
};
|
|
65
|
+
type ForgeSessionBootstrapPayload = {
|
|
66
|
+
overview: ForgeOperatorOverview | null;
|
|
67
|
+
goals: ForgeGoalRecord[];
|
|
68
|
+
projects: ForgeProjectRecord[];
|
|
69
|
+
tasks: ForgeTaskRecord[];
|
|
70
|
+
habits: ForgeHabitRecord[];
|
|
71
|
+
strategies: ForgeStrategyRecord[];
|
|
72
|
+
peoplePages: ForgeWikiPageRecord[];
|
|
73
|
+
};
|
|
74
|
+
export declare function listPeopleBranchPages(pages: ForgeWikiPageRecord[]): ForgeWikiPageRecord[];
|
|
75
|
+
export declare function buildForgeSessionBootstrapContext(payload: ForgeSessionBootstrapPayload): string;
|
|
76
|
+
export declare function buildLiveForgeSessionBootstrapContext(config: ForgePluginConfig): Promise<string>;
|
|
77
|
+
export declare function registerForgeSessionBootstrapHook(api: ForgePluginRegistrationApi, config: ForgePluginConfig): void;
|
|
78
|
+
export {};
|