forge-openclaw-plugin 0.2.26 → 0.2.27

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.
Files changed (108) hide show
  1. package/README.md +59 -3
  2. package/dist/assets/{board-ta0rUHOf.js → board-C6jCchjI.js} +2 -2
  3. package/dist/assets/{board-ta0rUHOf.js.map → board-C6jCchjI.js.map} +1 -1
  4. package/dist/assets/index-DVvS8iiU.css +1 -0
  5. package/dist/assets/index-zYB-9Dfo.js +85 -0
  6. package/dist/assets/index-zYB-9Dfo.js.map +1 -0
  7. package/dist/assets/knowledge-graph-layout.worker-DRvzPxhP.js +2 -0
  8. package/dist/assets/knowledge-graph-layout.worker-DRvzPxhP.js.map +1 -0
  9. package/dist/assets/{motion-fBKPB6yw.js → motion-DFHrH2rd.js} +2 -2
  10. package/dist/assets/{motion-fBKPB6yw.js.map → motion-DFHrH2rd.js.map} +1 -1
  11. package/dist/assets/{table-C-IGTQni.js → table-ZL7Di_u3.js} +2 -2
  12. package/dist/assets/{table-C-IGTQni.js.map → table-ZL7Di_u3.js.map} +1 -1
  13. package/dist/assets/{ui-DInOpaYF.js → ui-CKNPpz7q.js} +2 -2
  14. package/dist/assets/{ui-DInOpaYF.js.map → ui-CKNPpz7q.js.map} +1 -1
  15. package/dist/assets/vendor-DoNZuFhn.js +1247 -0
  16. package/dist/assets/vendor-DoNZuFhn.js.map +1 -0
  17. package/dist/index.html +7 -7
  18. package/dist/openclaw/local-runtime.js +16 -0
  19. package/dist/openclaw/routes.d.ts +27 -0
  20. package/dist/openclaw/routes.js +16 -12
  21. package/dist/server/server/migrations/037_workbench_public_inputs_and_run_inputs.sql +5 -0
  22. package/dist/server/server/migrations/038_data_management_settings.sql +11 -0
  23. package/dist/server/server/migrations/039_life_force_and_action_points.sql +114 -0
  24. package/dist/server/server/migrations/040_screen_time_domain.sql +89 -0
  25. package/dist/server/server/migrations/041_companion_source_states.sql +21 -0
  26. package/dist/server/server/migrations/042_movement_boxes.sql +47 -0
  27. package/dist/server/server/migrations/043_movement_box_overlap_overrides.sql +26 -0
  28. package/dist/server/server/src/app.js +1684 -117
  29. package/dist/server/server/src/connectors/box-registry.js +44 -9
  30. package/dist/server/server/src/data-management-types.js +107 -0
  31. package/dist/server/server/src/db.js +68 -4
  32. package/dist/server/server/src/demo-data.js +2 -2
  33. package/dist/server/server/src/health.js +702 -18
  34. package/dist/server/server/src/managers/platform/llm-manager.js +7 -4
  35. package/dist/server/server/src/managers/platform/mock-workbench-provider.js +149 -0
  36. package/dist/server/server/src/managers/platform/secrets-manager.js +18 -1
  37. package/dist/server/server/src/managers/runtime.js +9 -0
  38. package/dist/server/server/src/movement.js +1971 -112
  39. package/dist/server/server/src/openapi.js +489 -1
  40. package/dist/server/server/src/psyche-types.js +9 -1
  41. package/dist/server/server/src/repositories/activity-events.js +8 -0
  42. package/dist/server/server/src/repositories/ai-connectors.js +522 -74
  43. package/dist/server/server/src/repositories/habits.js +37 -1
  44. package/dist/server/server/src/repositories/model-settings.js +13 -3
  45. package/dist/server/server/src/repositories/notes.js +3 -0
  46. package/dist/server/server/src/repositories/settings.js +380 -18
  47. package/dist/server/server/src/repositories/tasks.js +170 -10
  48. package/dist/server/server/src/runtime-data-root.js +82 -0
  49. package/dist/server/server/src/screen-time.js +802 -0
  50. package/dist/server/server/src/services/data-management.js +788 -0
  51. package/dist/server/server/src/services/entity-crud.js +205 -2
  52. package/dist/server/server/src/services/knowledge-graph.js +1455 -0
  53. package/dist/server/server/src/services/life-force-model.js +197 -0
  54. package/dist/server/server/src/services/life-force.js +1270 -0
  55. package/dist/server/server/src/services/psyche-observation-calendar.js +383 -16
  56. package/dist/server/server/src/types.js +286 -13
  57. package/dist/server/server/src/web.js +228 -13
  58. package/dist/server/src/components/customization/utility-widgets.js +136 -27
  59. package/dist/server/src/components/ui/info-tooltip.js +25 -0
  60. package/dist/server/src/components/workbench-boxes/calendar/calendar-boxes.js +78 -0
  61. package/dist/server/src/components/workbench-boxes/goals/goals-boxes.js +62 -0
  62. package/dist/server/src/components/workbench-boxes/habits/habits-boxes.js +62 -0
  63. package/dist/server/src/components/workbench-boxes/health/health-boxes.js +63 -8
  64. package/dist/server/src/components/workbench-boxes/insights/insights-boxes.js +50 -0
  65. package/dist/server/src/components/workbench-boxes/kanban/kanban-boxes.js +62 -54
  66. package/dist/server/src/components/workbench-boxes/movement/movement-boxes.js +18 -8
  67. package/dist/server/src/components/workbench-boxes/notes/notes-boxes.js +56 -38
  68. package/dist/server/src/components/workbench-boxes/overview/overview-boxes.js +65 -0
  69. package/dist/server/src/components/workbench-boxes/preferences/preferences-boxes.js +78 -0
  70. package/dist/server/src/components/workbench-boxes/projects/projects-boxes.js +35 -30
  71. package/dist/server/src/components/workbench-boxes/psyche/psyche-boxes.js +88 -0
  72. package/dist/server/src/components/workbench-boxes/questionnaires/questionnaires-boxes.js +61 -0
  73. package/dist/server/src/components/workbench-boxes/review/review-boxes.js +53 -0
  74. package/dist/server/src/components/workbench-boxes/shared/define-workbench-box.js +3 -1
  75. package/dist/server/src/components/workbench-boxes/shared/generic-node-view.js +39 -3
  76. package/dist/server/src/components/workbench-boxes/strategies/strategies-boxes.js +62 -0
  77. package/dist/server/src/components/workbench-boxes/tasks/tasks-boxes.js +76 -0
  78. package/dist/server/src/components/workbench-boxes/today/today-boxes.js +47 -32
  79. package/dist/server/src/components/workbench-boxes/wiki/wiki-boxes.js +60 -0
  80. package/dist/server/src/lib/api.js +280 -21
  81. package/dist/server/src/lib/data-management-types.js +1 -0
  82. package/dist/server/src/lib/entity-visuals.js +279 -0
  83. package/dist/server/src/lib/knowledge-graph-types.js +276 -0
  84. package/dist/server/src/lib/knowledge-graph.js +470 -0
  85. package/dist/server/src/lib/schemas.js +4 -0
  86. package/dist/server/src/lib/snapshot-normalizer.js +43 -1
  87. package/dist/server/src/lib/workbench/contracts.js +229 -0
  88. package/dist/server/src/lib/workbench/nodes.js +200 -0
  89. package/dist/server/src/lib/workbench/registry.js +52 -5
  90. package/dist/server/src/lib/workbench/runtime.js +254 -38
  91. package/dist/server/src/lib/workbench/tool-catalog.js +68 -0
  92. package/openclaw.plugin.json +1 -1
  93. package/package.json +1 -1
  94. package/server/migrations/037_workbench_public_inputs_and_run_inputs.sql +5 -0
  95. package/server/migrations/038_data_management_settings.sql +11 -0
  96. package/server/migrations/039_life_force_and_action_points.sql +114 -0
  97. package/server/migrations/040_screen_time_domain.sql +89 -0
  98. package/server/migrations/041_companion_source_states.sql +21 -0
  99. package/server/migrations/042_movement_boxes.sql +47 -0
  100. package/server/migrations/043_movement_box_overlap_overrides.sql +26 -0
  101. package/skills/forge-openclaw/SKILL.md +24 -11
  102. package/skills/forge-openclaw/entity_conversation_playbooks.md +210 -34
  103. package/skills/forge-openclaw/psyche_entity_playbooks.md +113 -17
  104. package/dist/assets/index-Ro0ZF_az.css +0 -1
  105. package/dist/assets/index-ytlpSj23.js +0 -79
  106. package/dist/assets/index-ytlpSj23.js.map +0 -1
  107. package/dist/assets/vendor-lE3tZJcC.js +0 -876
  108. package/dist/assets/vendor-lE3tZJcC.js.map +0 -1
@@ -1,11 +1,14 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { buildSearchWorkbenchExecution, buildStaticWorkbenchExecution } from "../../../lib/workbench/runtime.js";
3
+ import { createSearchEntitiesTool, createSearchInputs, createSearchOutputs, createSearchParams, createSummaryOutput } from "../../../lib/workbench/contracts.js";
3
4
  import { createGenericWorkbenchNodeView } from "../shared/generic-node-view.js";
4
5
  import { defineWorkbenchBox } from "../shared/define-workbench-box.js";
5
6
  function Slot({ children }) {
6
7
  return _jsx(_Fragment, { children: children });
7
8
  }
8
- function defineTodayBox(id, title, description, tags, execute, withSearchTool = false) {
9
+ function defineTodayBox(id, title, description, tags, execute, output, tools = [], options) {
10
+ const inputs = options?.inputs ?? [];
11
+ const params = options?.params ?? [];
9
12
  return defineWorkbenchBox(Slot, {
10
13
  id,
11
14
  surfaceId: "today",
@@ -15,49 +18,61 @@ function defineTodayBox(id, title, description, tags, execute, withSearchTool =
15
18
  description,
16
19
  category: "Today",
17
20
  tags,
18
- inputs: [],
19
- params: [],
20
- output: [{ key: "primary", label: title, kind: "content" }],
21
- tools: withSearchTool
22
- ? [
23
- {
24
- key: "forge.search_entities",
25
- label: "Search Forge entities",
26
- description: "Search Forge entities by query and entity types.",
27
- accessMode: "read"
28
- }
29
- ]
30
- : [],
21
+ inputs,
22
+ params,
23
+ output,
24
+ tools,
31
25
  NodeView: createGenericWorkbenchNodeView({
32
26
  title,
33
27
  description,
34
- inputs: [],
35
- params: [],
36
- output: [{ key: "primary", label: title, kind: "content" }],
37
- tools: withSearchTool
38
- ? [
39
- {
40
- key: "forge.search_entities",
41
- label: "Search Forge entities",
42
- description: "Search Forge entities by query and entity types.",
43
- accessMode: "read"
44
- }
45
- ]
46
- : []
28
+ inputs,
29
+ params,
30
+ output,
31
+ tools
47
32
  }),
48
33
  execute
49
34
  });
50
35
  }
51
- export const TodayHeroBox = defineTodayBox("surface:today:hero", "Today hero", "Daily execution header and directive.", ["today", "hero"], (input) => buildStaticWorkbenchExecution(input, null, "Daily execution header."));
52
- export const TodayMetricsBox = defineTodayBox("surface:today:metrics", "Live metrics", "Daily XP, level, and momentum metrics.", ["today", "metrics"], (input) => buildStaticWorkbenchExecution(input, null, "Daily metrics."));
36
+ export const TodayHeroBox = defineTodayBox("surface:today:hero", "Today hero", "Daily execution header and directive.", ["today", "hero"], (input) => buildStaticWorkbenchExecution(input, null, "Daily execution header."), [createSummaryOutput({ label: "Today summary", description: "High-level framing for today's execution." })]);
37
+ export const TodayMetricsBox = defineTodayBox("surface:today:metrics", "Live metrics", "Daily XP, level, and momentum metrics.", ["today", "metrics"], (input) => buildStaticWorkbenchExecution(input, null, "Daily metrics."), [createSummaryOutput({ label: "Metrics summary", description: "Summary of today's XP, level, and momentum metrics." })]);
53
38
  export const TodayRunwayBox = defineTodayBox("surface:today:runway", "Runway", "Execution lane and current work.", ["today", "execution"], (input) => buildSearchWorkbenchExecution(input, {
54
39
  query: "",
55
40
  entityTypes: ["task", "habit"],
56
41
  limit: 16
57
- }), true);
58
- export const TodayCalendarBox = defineTodayBox("surface:today:calendar", "Calendar", "Calendar context for today.", ["today", "calendar"], (input) => buildStaticWorkbenchExecution(input, null, "Today's calendar context."));
42
+ }), createSearchOutputs({
43
+ itemKind: "execution_item",
44
+ itemLabel: "Execution item"
45
+ }), [createSearchEntitiesTool("Search today's active tasks and habits by query and entity types.")], {
46
+ inputs: createSearchInputs({
47
+ itemKind: "execution_item",
48
+ itemLabel: "Execution item",
49
+ defaultEntityTypes: ["task", "habit"],
50
+ defaultLimit: 16
51
+ }),
52
+ params: createSearchParams({
53
+ itemKind: "execution_item",
54
+ defaultEntityTypes: ["task", "habit"],
55
+ defaultLimit: 16
56
+ })
57
+ });
58
+ export const TodayCalendarBox = defineTodayBox("surface:today:calendar", "Calendar", "Calendar context for today.", ["today", "calendar"], (input) => buildStaticWorkbenchExecution(input, null, "Today's calendar context."), [createSummaryOutput({ label: "Calendar summary", description: "Summary of today's calendar context." })]);
59
59
  export const TodayFocusBox = defineTodayBox("surface:today:focus", "Current focus", "Today priorities and focus context.", ["today", "focus"], (input) => buildSearchWorkbenchExecution(input, {
60
60
  query: "",
61
61
  entityTypes: ["task", "habit"],
62
62
  limit: 16
63
- }), true);
63
+ }), createSearchOutputs({
64
+ itemKind: "focus_item",
65
+ itemLabel: "Focus item"
66
+ }), [createSearchEntitiesTool("Search today's priority tasks and habits by query and entity types.")], {
67
+ inputs: createSearchInputs({
68
+ itemKind: "focus_item",
69
+ itemLabel: "Focus item",
70
+ defaultEntityTypes: ["task", "habit"],
71
+ defaultLimit: 16
72
+ }),
73
+ params: createSearchParams({
74
+ itemKind: "focus_item",
75
+ defaultEntityTypes: ["task", "habit"],
76
+ defaultLimit: 16
77
+ })
78
+ });
@@ -0,0 +1,60 @@
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ import { buildStaticWorkbenchExecution, buildWikiHealthWorkbenchExecution, buildWikiPagesWorkbenchExecution } from "../../../lib/workbench/runtime.js";
3
+ import { createContextOutput, createRecordListOutput, createSummaryOutput } from "../../../lib/workbench/contracts.js";
4
+ import { createGenericWorkbenchNodeView } from "../shared/generic-node-view.js";
5
+ import { defineWorkbenchBox } from "../shared/define-workbench-box.js";
6
+ function Slot({ children }) {
7
+ return _jsx(_Fragment, { children: children });
8
+ }
9
+ function defineWikiBox(id, title, description, tags, execute, output) {
10
+ return defineWorkbenchBox(Slot, {
11
+ id,
12
+ surfaceId: "wiki",
13
+ routePath: "/wiki",
14
+ title,
15
+ icon: "wiki",
16
+ description,
17
+ category: "Wiki",
18
+ tags,
19
+ inputs: [],
20
+ params: [],
21
+ output,
22
+ tools: [],
23
+ NodeView: createGenericWorkbenchNodeView({
24
+ title,
25
+ description,
26
+ inputs: [],
27
+ params: [],
28
+ output,
29
+ tools: []
30
+ }),
31
+ execute
32
+ });
33
+ }
34
+ export const WikiPagesBox = defineWikiBox("surface:wiki:pages", "Wiki pages", "Live list of wiki pages that can be used as memory or authored knowledge.", ["wiki", "pages"], (input) => buildWikiPagesWorkbenchExecution(input), [
35
+ createSummaryOutput({ label: "Wiki page summary", description: "Summary of the currently available wiki pages." }),
36
+ createRecordListOutput({
37
+ key: "pages",
38
+ label: "Wiki pages",
39
+ description: "Structured wiki page records available in Forge memory.",
40
+ modelName: "ForgeWikiPages",
41
+ itemKind: "wiki_page"
42
+ })
43
+ ]);
44
+ export const WikiHealthBox = defineWikiBox("surface:wiki:health", "Wiki health", "Index health, unresolved links, and orphaned-page signals for the wiki.", ["wiki", "health"], (input) => buildWikiHealthWorkbenchExecution(input), [
45
+ createSummaryOutput({ label: "Wiki health summary", description: "Summary of unresolved links and orphaned-page signals." }),
46
+ createContextOutput({
47
+ key: "health",
48
+ label: "Wiki health",
49
+ description: "Structured wiki health payload returned by Forge.",
50
+ modelName: "ForgeWikiHealth"
51
+ })
52
+ ]);
53
+ export const WikiAuthoringBox = defineWikiBox("surface:wiki:authoring", "Wiki authoring", "Authoring and ingest surface for creating or refining Forge memory.", ["wiki", "authoring", "ingest"], (input) => buildStaticWorkbenchExecution(input, {
54
+ actions: ["upsert", "ingest", "reindex"]
55
+ }, "Wiki authoring surface for ingesting sources and maintaining memory pages."), [
56
+ createSummaryOutput({
57
+ label: "Wiki authoring summary",
58
+ description: "Summary of wiki authoring and ingest actions available on this surface."
59
+ })
60
+ ]);
@@ -135,6 +135,43 @@ async function request(path, init) {
135
135
  }
136
136
  return body;
137
137
  }
138
+ async function requestBlob(path, init) {
139
+ const headers = new Headers(init?.headers);
140
+ headers.set("x-forge-source", "ui");
141
+ const response = await fetch(resolveForgePath(path), {
142
+ credentials: "same-origin",
143
+ headers,
144
+ ...init
145
+ });
146
+ if (!response.ok) {
147
+ const body = await parseResponseBody(response);
148
+ const maybeBody = typeof body === "object" && body !== null
149
+ ? body
150
+ : null;
151
+ throw new ForgeApiError({
152
+ status: response.status,
153
+ code: typeof maybeBody?.code === "string"
154
+ ? maybeBody.code
155
+ : typeof maybeBody?.error === "string"
156
+ ? maybeBody.error
157
+ : "request_failed",
158
+ message: typeof maybeBody?.error === "string"
159
+ ? maybeBody.error
160
+ : typeof maybeBody?.message === "string"
161
+ ? maybeBody.message
162
+ : `Request failed: ${response.status}`,
163
+ requestPath: path,
164
+ details: []
165
+ });
166
+ }
167
+ const disposition = response.headers.get("content-disposition");
168
+ const fileNameMatch = disposition?.match(/filename=\"([^\"]+)\"/i);
169
+ return {
170
+ blob: await response.blob(),
171
+ fileName: fileNameMatch?.[1] ?? null,
172
+ mimeType: response.headers.get("content-type") || "application/octet-stream"
173
+ };
174
+ }
138
175
  function normalizeNestedNotes(notes) {
139
176
  return notes
140
177
  .map((note) => ({
@@ -195,6 +232,79 @@ export function getForgeSnapshot(userIds) {
195
232
  const suffix = search.size > 0 ? `?${search.toString()}` : "";
196
233
  return request(`/api/v1/context${suffix}`).then(normalizeForgeSnapshot);
197
234
  }
235
+ export function getLifeForce(userIds) {
236
+ const search = new URLSearchParams();
237
+ appendUserIds(search, coerceUserIds(userIds));
238
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
239
+ return request(`/api/v1/life-force${suffix}`);
240
+ }
241
+ export function patchLifeForceProfile(patch, userIds) {
242
+ const search = new URLSearchParams();
243
+ appendUserIds(search, coerceUserIds(userIds));
244
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
245
+ return request(`/api/v1/life-force/profile${suffix}`, {
246
+ method: "PATCH",
247
+ body: JSON.stringify(patch)
248
+ });
249
+ }
250
+ export function updateLifeForceTemplate(weekday, input, userIds) {
251
+ const search = new URLSearchParams();
252
+ appendUserIds(search, coerceUserIds(userIds));
253
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
254
+ return request(`/api/v1/life-force/templates/${weekday}${suffix}`, {
255
+ method: "PUT",
256
+ body: JSON.stringify(input)
257
+ });
258
+ }
259
+ export function createFatigueSignal(input, userIds) {
260
+ const search = new URLSearchParams();
261
+ appendUserIds(search, coerceUserIds(userIds));
262
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
263
+ return request(`/api/v1/life-force/fatigue-signals${suffix}`, {
264
+ method: "POST",
265
+ body: JSON.stringify(input)
266
+ });
267
+ }
268
+ export function getKnowledgeGraph(userIds, query) {
269
+ const search = new URLSearchParams();
270
+ appendUserIds(search, coerceUserIds(userIds));
271
+ if (query?.q?.trim()) {
272
+ search.set("q", query.q.trim());
273
+ }
274
+ for (const kind of query?.entityKinds ?? []) {
275
+ search.append("entityKind", kind);
276
+ }
277
+ for (const relationKind of query?.relationKinds ?? []) {
278
+ search.append("relationKind", relationKind);
279
+ }
280
+ for (const tag of query?.tags ?? []) {
281
+ search.append("tag", tag);
282
+ }
283
+ for (const owner of query?.owners ?? []) {
284
+ search.append("owner", owner);
285
+ }
286
+ if (query?.updatedFrom) {
287
+ search.set("updatedFrom", query.updatedFrom);
288
+ }
289
+ if (query?.updatedTo) {
290
+ search.set("updatedTo", query.updatedTo);
291
+ }
292
+ if (typeof query?.limit === "number" && Number.isFinite(query.limit)) {
293
+ search.set("limit", String(query.limit));
294
+ }
295
+ if (query?.focusNodeId) {
296
+ search.set("focusNodeId", query.focusNodeId);
297
+ }
298
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
299
+ return request(`/api/v1/knowledge-graph${suffix}`).then((response) => response.graph);
300
+ }
301
+ export function getKnowledgeGraphFocus(entityType, entityId, userIds) {
302
+ const search = new URLSearchParams();
303
+ search.set("entityType", entityType);
304
+ search.set("entityId", entityId);
305
+ appendUserIds(search, coerceUserIds(userIds));
306
+ return request(`/api/v1/knowledge-graph/focus?${search.toString()}`).then((response) => response.focus);
307
+ }
198
308
  export function getPreferenceWorkspace(query) {
199
309
  const search = new URLSearchParams();
200
310
  if (query.userId) {
@@ -957,6 +1067,36 @@ export function getPsycheObservationCalendar(input = {}) {
957
1067
  const suffix = search.size > 0 ? `?${search.toString()}` : "";
958
1068
  return request(`/api/v1/psyche/self-observation/calendar${suffix}`);
959
1069
  }
1070
+ export function exportPsycheObservationCalendar(input) {
1071
+ const search = new URLSearchParams();
1072
+ if (input.from) {
1073
+ search.set("from", input.from);
1074
+ }
1075
+ if (input.to) {
1076
+ search.set("to", input.to);
1077
+ }
1078
+ if (input.search?.trim()) {
1079
+ search.set("search", input.search.trim());
1080
+ }
1081
+ if (input.includeObservations !== undefined) {
1082
+ search.set("includeObservations", String(input.includeObservations));
1083
+ }
1084
+ if (input.includeActivity !== undefined) {
1085
+ search.set("includeActivity", String(input.includeActivity));
1086
+ }
1087
+ if (input.onlyHumanOwned !== undefined) {
1088
+ search.set("onlyHumanOwned", String(input.onlyHumanOwned));
1089
+ }
1090
+ for (const tag of input.tags ?? []) {
1091
+ const trimmed = tag.trim();
1092
+ if (trimmed) {
1093
+ search.append("tags", trimmed);
1094
+ }
1095
+ }
1096
+ search.set("format", input.format);
1097
+ appendUserIds(search, coerceUserIds(input.userIds));
1098
+ return requestBlob(`/api/v1/psyche/self-observation/calendar/export?${search.toString()}`);
1099
+ }
960
1100
  export function listCalendarConnections() {
961
1101
  return request("/api/v1/calendar/connections");
962
1102
  }
@@ -1136,6 +1276,9 @@ export function listHabits(input = {}) {
1136
1276
  if (input.dueToday) {
1137
1277
  search.set("dueToday", "true");
1138
1278
  }
1279
+ if (input.orderBy) {
1280
+ search.set("orderBy", input.orderBy);
1281
+ }
1139
1282
  if (input.limit) {
1140
1283
  search.set("limit", String(input.limit));
1141
1284
  }
@@ -1348,6 +1491,18 @@ export function getWorkbenchFlowOutput(connectorId) {
1348
1491
  export function getWorkbenchFlowRuns(connectorId) {
1349
1492
  return request(`/api/v1/workbench/flows/${connectorId}/runs`);
1350
1493
  }
1494
+ export function getWorkbenchFlowRun(connectorId, runId) {
1495
+ return request(`/api/v1/workbench/flows/${connectorId}/runs/${runId}`);
1496
+ }
1497
+ export function getWorkbenchFlowRunNodes(connectorId, runId) {
1498
+ return request(`/api/v1/workbench/flows/${connectorId}/runs/${runId}/nodes`);
1499
+ }
1500
+ export function getWorkbenchFlowRunNode(connectorId, runId, nodeId) {
1501
+ return request(`/api/v1/workbench/flows/${connectorId}/runs/${runId}/nodes/${nodeId}`);
1502
+ }
1503
+ export function getWorkbenchFlowNodeOutput(connectorId, nodeId) {
1504
+ return request(`/api/v1/workbench/flows/${connectorId}/nodes/${nodeId}/output`);
1505
+ }
1351
1506
  export function getCompanionOverview(userIds) {
1352
1507
  const search = new URLSearchParams();
1353
1508
  appendUserIds(search, coerceUserIds(userIds));
@@ -1390,6 +1545,45 @@ export function getMovementAllTime(userIds) {
1390
1545
  const suffix = search.size > 0 ? `?${search.toString()}` : "";
1391
1546
  return request(`/api/v1/movement/all-time${suffix}`);
1392
1547
  }
1548
+ export function getScreenTimeDay(input) {
1549
+ const search = new URLSearchParams();
1550
+ if (input?.date) {
1551
+ search.set("date", input.date);
1552
+ }
1553
+ appendUserIds(search, coerceUserIds(input?.userIds));
1554
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1555
+ return request(`/api/v1/screen-time/day${suffix}`);
1556
+ }
1557
+ export function getScreenTimeMonth(input) {
1558
+ const search = new URLSearchParams();
1559
+ if (input?.month) {
1560
+ search.set("month", input.month);
1561
+ }
1562
+ appendUserIds(search, coerceUserIds(input?.userIds));
1563
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1564
+ return request(`/api/v1/screen-time/month${suffix}`);
1565
+ }
1566
+ export function getScreenTimeAllTime(userIds) {
1567
+ const search = new URLSearchParams();
1568
+ appendUserIds(search, coerceUserIds(userIds));
1569
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1570
+ return request(`/api/v1/screen-time/all-time${suffix}`);
1571
+ }
1572
+ export function getScreenTimeSettings(userIds) {
1573
+ const search = new URLSearchParams();
1574
+ appendUserIds(search, coerceUserIds(userIds));
1575
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1576
+ return request(`/api/v1/screen-time/settings${suffix}`);
1577
+ }
1578
+ export function patchScreenTimeSettings(patch, userIds) {
1579
+ const search = new URLSearchParams();
1580
+ appendUserIds(search, coerceUserIds(userIds));
1581
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1582
+ return request(`/api/v1/screen-time/settings${suffix}`, {
1583
+ method: "PATCH",
1584
+ body: JSON.stringify(patch)
1585
+ });
1586
+ }
1393
1587
  export function getMovementSettings(userIds) {
1394
1588
  const search = new URLSearchParams();
1395
1589
  appendUserIds(search, coerceUserIds(userIds));
@@ -1444,37 +1638,48 @@ export function getMovementTimeline(input) {
1444
1638
  const suffix = search.size > 0 ? `?${search.toString()}` : "";
1445
1639
  return request(`/api/v1/movement/timeline${suffix}`);
1446
1640
  }
1447
- export function patchMovementStay(stayId, patch) {
1448
- return request(`/api/v1/movement/stays/${stayId}`, {
1449
- method: "PATCH",
1450
- body: JSON.stringify(patch)
1641
+ export function createMovementUserBox(input, userIds) {
1642
+ const search = new URLSearchParams();
1643
+ appendUserIds(search, coerceUserIds(userIds));
1644
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1645
+ return request(`/api/v1/movement/user-boxes${suffix}`, {
1646
+ method: "POST",
1647
+ body: JSON.stringify(input)
1451
1648
  });
1452
1649
  }
1453
- export function deleteMovementStay(stayId) {
1454
- return request(`/api/v1/movement/stays/${stayId}`, {
1455
- method: "DELETE"
1650
+ export function preflightMovementUserBox(input, userIds) {
1651
+ const search = new URLSearchParams();
1652
+ appendUserIds(search, coerceUserIds(userIds));
1653
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1654
+ return request(`/api/v1/movement/user-boxes/preflight${suffix}`, {
1655
+ method: "POST",
1656
+ body: JSON.stringify(input)
1456
1657
  });
1457
1658
  }
1458
- export function patchMovementTrip(tripId, patch) {
1459
- return request(`/api/v1/movement/trips/${tripId}`, {
1659
+ export function patchMovementUserBox(boxId, patch, userIds) {
1660
+ const search = new URLSearchParams();
1661
+ appendUserIds(search, coerceUserIds(userIds));
1662
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1663
+ return request(`/api/v1/movement/user-boxes/${boxId}${suffix}`, {
1460
1664
  method: "PATCH",
1461
1665
  body: JSON.stringify(patch)
1462
1666
  });
1463
1667
  }
1464
- export function deleteMovementTrip(tripId) {
1465
- return request(`/api/v1/movement/trips/${tripId}`, {
1668
+ export function deleteMovementUserBox(boxId, userIds) {
1669
+ const search = new URLSearchParams();
1670
+ appendUserIds(search, coerceUserIds(userIds));
1671
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1672
+ return request(`/api/v1/movement/user-boxes/${boxId}${suffix}`, {
1466
1673
  method: "DELETE"
1467
1674
  });
1468
1675
  }
1469
- export function patchMovementTripPoint(tripId, pointId, patch) {
1470
- return request(`/api/v1/movement/trips/${tripId}/points/${pointId}`, {
1471
- method: "PATCH",
1472
- body: JSON.stringify(patch)
1473
- });
1474
- }
1475
- export function deleteMovementTripPoint(tripId, pointId) {
1476
- return request(`/api/v1/movement/trips/${tripId}/points/${pointId}`, {
1477
- method: "DELETE"
1676
+ export function invalidateAutomaticMovementBox(boxId, input, userIds) {
1677
+ const search = new URLSearchParams();
1678
+ appendUserIds(search, coerceUserIds(userIds));
1679
+ const suffix = search.size > 0 ? `?${search.toString()}` : "";
1680
+ return request(`/api/v1/movement/automatic-boxes/${boxId}/invalidate${suffix}`, {
1681
+ method: "POST",
1682
+ body: JSON.stringify(input)
1478
1683
  });
1479
1684
  }
1480
1685
  export function getMovementSelectionAggregate(input) {
@@ -1494,6 +1699,12 @@ export function revokeCompanionPairingSession(pairingSessionId) {
1494
1699
  method: "DELETE"
1495
1700
  });
1496
1701
  }
1702
+ export function patchCompanionPairingSourceState(pairingSessionId, source, desiredEnabled) {
1703
+ return request(`/api/v1/health/pairing-sessions/${pairingSessionId}/sources/${source}`, {
1704
+ method: "PATCH",
1705
+ body: JSON.stringify({ desiredEnabled })
1706
+ });
1707
+ }
1497
1708
  export function revokeAllCompanionPairingSessions(input) {
1498
1709
  return request("/api/v1/health/pairing-sessions/revoke-all", {
1499
1710
  method: "POST",
@@ -1565,6 +1776,42 @@ export function deleteStrategy(strategyId) {
1565
1776
  export function getSettingsBin() {
1566
1777
  return request("/api/v1/settings/bin");
1567
1778
  }
1779
+ export function getDataManagementState() {
1780
+ return request("/api/v1/settings/data");
1781
+ }
1782
+ export function patchDataManagementSettings(input) {
1783
+ return request("/api/v1/settings/data", {
1784
+ method: "PATCH",
1785
+ body: JSON.stringify(input)
1786
+ });
1787
+ }
1788
+ export function scanDataRecoveryCandidates() {
1789
+ return request("/api/v1/settings/data/scan", {
1790
+ method: "POST",
1791
+ body: JSON.stringify({})
1792
+ });
1793
+ }
1794
+ export function createRuntimeDataBackup(note = "") {
1795
+ return request("/api/v1/settings/data/backups", {
1796
+ method: "POST",
1797
+ body: JSON.stringify({ note })
1798
+ });
1799
+ }
1800
+ export function restoreRuntimeDataBackup(backupId, createSafetyBackup = true) {
1801
+ return request(`/api/v1/settings/data/backups/${backupId}/restore`, {
1802
+ method: "POST",
1803
+ body: JSON.stringify({ createSafetyBackup })
1804
+ });
1805
+ }
1806
+ export function switchRuntimeDataRoot(input) {
1807
+ return request("/api/v1/settings/data/switch-root", {
1808
+ method: "POST",
1809
+ body: JSON.stringify(input)
1810
+ });
1811
+ }
1812
+ export function downloadDataExport(format) {
1813
+ return requestBlob(`/api/v1/settings/data/export?format=${format}`);
1814
+ }
1568
1815
  export function listAgents() {
1569
1816
  return request("/api/v1/agents");
1570
1817
  }
@@ -1771,6 +2018,9 @@ export function createTask(input) {
1771
2018
  goalId: input.goalId || null,
1772
2019
  projectId: input.projectId || null,
1773
2020
  dueDate: input.dueDate || null,
2021
+ plannedDurationSeconds: input.plannedDurationSeconds === undefined
2022
+ ? null
2023
+ : input.plannedDurationSeconds,
1774
2024
  notes: normalizeNestedNotes(input.notes)
1775
2025
  };
1776
2026
  return request("/api/v1/tasks", {
@@ -1785,10 +2035,19 @@ export function patchTask(taskId, patch) {
1785
2035
  ...patch,
1786
2036
  goalId: patch.goalId === "" ? null : patch.goalId,
1787
2037
  projectId: patch.projectId === "" ? null : patch.projectId,
1788
- dueDate: patch.dueDate === "" ? null : patch.dueDate
2038
+ dueDate: patch.dueDate === "" ? null : patch.dueDate,
2039
+ plannedDurationSeconds: patch.plannedDurationSeconds === undefined
2040
+ ? undefined
2041
+ : patch.plannedDurationSeconds
1789
2042
  })
1790
2043
  });
1791
2044
  }
2045
+ export function splitTask(taskId, input) {
2046
+ return request(`/api/v1/tasks/${taskId}/split`, {
2047
+ method: "POST",
2048
+ body: JSON.stringify(input)
2049
+ });
2050
+ }
1792
2051
  export function deleteTask(taskId) {
1793
2052
  return request(`/api/v1/tasks/${taskId}`, {
1794
2053
  method: "DELETE"
@@ -0,0 +1 @@
1
+ export {};