forge-openclaw-plugin 0.2.25 → 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.
- package/README.md +59 -3
- package/dist/assets/{board-VmF4FAfr.js → board-C6jCchjI.js} +3 -3
- package/dist/assets/{board-VmF4FAfr.js.map → board-C6jCchjI.js.map} +1 -1
- package/dist/assets/index-DVvS8iiU.css +1 -0
- package/dist/assets/index-zYB-9Dfo.js +85 -0
- package/dist/assets/index-zYB-9Dfo.js.map +1 -0
- package/dist/assets/knowledge-graph-layout.worker-DRvzPxhP.js +2 -0
- package/dist/assets/knowledge-graph-layout.worker-DRvzPxhP.js.map +1 -0
- package/dist/assets/{motion-DvkU14p-.js → motion-DFHrH2rd.js} +2 -2
- package/dist/assets/{motion-DvkU14p-.js.map → motion-DFHrH2rd.js.map} +1 -1
- package/dist/assets/{table-DgiPof9E.js → table-ZL7Di_u3.js} +2 -2
- package/dist/assets/{table-DgiPof9E.js.map → table-ZL7Di_u3.js.map} +1 -1
- package/dist/assets/{ui-nYfoC0Gq.js → ui-CKNPpz7q.js} +2 -2
- package/dist/assets/{ui-nYfoC0Gq.js.map → ui-CKNPpz7q.js.map} +1 -1
- package/dist/assets/vendor-DoNZuFhn.js +1247 -0
- package/dist/assets/vendor-DoNZuFhn.js.map +1 -0
- package/dist/index.html +7 -8
- package/dist/openclaw/local-runtime.d.ts +3 -1
- package/dist/openclaw/local-runtime.js +67 -15
- package/dist/openclaw/plugin-entry-shared.js +24 -2
- package/dist/openclaw/plugin-sdk-types.d.ts +17 -0
- package/dist/openclaw/routes.d.ts +27 -0
- package/dist/openclaw/routes.js +16 -12
- package/dist/openclaw/tools.js +0 -3
- package/dist/server/server/migrations/001_core.sql +411 -0
- package/dist/server/server/migrations/002_psyche.sql +392 -0
- package/dist/server/server/migrations/003_habits.sql +30 -0
- package/dist/server/server/migrations/004_habit_links.sql +8 -0
- package/dist/server/server/migrations/005_habit_psyche_links.sql +24 -0
- package/dist/server/server/migrations/006_work_adjustments.sql +14 -0
- package/dist/server/server/migrations/007_weekly_review_closures.sql +17 -0
- package/dist/server/server/migrations/008_calendar_execution.sql +147 -0
- package/dist/server/server/migrations/009_true_calendar_events.sql +195 -0
- package/dist/server/server/migrations/010_calendar_selection_state.sql +6 -0
- package/dist/server/server/migrations/011_calendar_timezone_backfill.sql +11 -0
- package/dist/server/server/migrations/012_work_block_ranges.sql +7 -0
- package/dist/server/server/migrations/013_microsoft_local_auth_settings.sql +8 -0
- package/dist/server/server/migrations/014_note_tags_and_ephemeral.sql +8 -0
- package/dist/server/server/migrations/015_multi_user_and_strategies.sql +244 -0
- package/dist/server/server/migrations/016_health_companion.sql +158 -0
- package/dist/server/server/migrations/016_strategy_contracts_and_user_graph.sql +22 -0
- package/dist/server/server/migrations/017_preferences.sql +131 -0
- package/dist/server/server/migrations/018_preference_catalogs.sql +31 -0
- package/dist/server/server/migrations/019_wiki_memory.sql +255 -0
- package/dist/server/server/migrations/020_wiki_page_hierarchy.sql +11 -0
- package/dist/server/server/migrations/021_hide_evidence_from_wiki_index.sql +3 -0
- package/dist/server/server/migrations/022_wiki_ingest_background.sql +85 -0
- package/dist/server/server/migrations/023_diagnostic_logs.sql +28 -0
- package/dist/server/server/migrations/024_questionnaires.sql +96 -0
- package/dist/server/server/migrations/025_ai_model_connections.sql +26 -0
- package/dist/server/server/migrations/026_custom_theme_settings.sql +2 -0
- package/dist/server/server/migrations/027_ai_processors.sql +31 -0
- package/dist/server/server/migrations/028_movement_domain.sql +136 -0
- package/dist/server/server/migrations/029_watch_micro_capture.sql +23 -0
- package/dist/server/server/migrations/030_surface_layouts.sql +5 -0
- package/dist/server/server/migrations/031_ai_processor_runtime_upgrades.sql +10 -0
- package/dist/server/server/migrations/032_ai_connectors.sql +44 -0
- package/dist/server/server/migrations/033_movement_trip_point_sync.sql +36 -0
- package/dist/server/server/migrations/034_movement_segment_sync.sql +49 -0
- package/dist/server/server/migrations/035_google_local_auth_settings.sql +2 -0
- package/dist/server/server/migrations/036_google_local_auth_client_secret.sql +2 -0
- package/dist/server/server/migrations/037_workbench_public_inputs_and_run_inputs.sql +5 -0
- package/dist/server/server/migrations/038_data_management_settings.sql +11 -0
- package/dist/server/server/migrations/039_life_force_and_action_points.sql +114 -0
- package/dist/server/server/migrations/040_screen_time_domain.sql +89 -0
- package/dist/server/server/migrations/041_companion_source_states.sql +21 -0
- package/dist/server/server/migrations/042_movement_boxes.sql +47 -0
- package/dist/server/server/migrations/043_movement_box_overlap_overrides.sql +26 -0
- package/dist/server/{app.js → server/src/app.js} +2112 -414
- package/dist/server/server/src/connectors/box-registry.js +223 -0
- package/dist/server/server/src/data-management-types.js +107 -0
- package/dist/server/{db.js → server/src/db.js} +72 -4
- package/dist/server/server/src/debug.js +19 -0
- package/dist/server/{demo-data.js → server/src/demo-data.js} +2 -2
- package/dist/server/{health.js → server/src/health.js} +702 -18
- package/dist/server/{managers → server/src/managers}/platform/llm-manager.js +7 -4
- package/dist/server/server/src/managers/platform/mock-workbench-provider.js +149 -0
- package/dist/server/{managers → server/src/managers}/platform/secrets-manager.js +18 -1
- package/dist/server/{managers → server/src/managers}/runtime.js +9 -0
- package/dist/server/{movement.js → server/src/movement.js} +1971 -112
- package/dist/server/{openapi.js → server/src/openapi.js} +491 -3
- package/dist/server/{psyche-types.js → server/src/psyche-types.js} +9 -1
- package/dist/server/{repositories → server/src/repositories}/activity-events.js +8 -0
- package/dist/server/{repositories → server/src/repositories}/ai-connectors.js +758 -47
- package/dist/server/{repositories → server/src/repositories}/calendar.js +1 -1
- package/dist/server/{repositories → server/src/repositories}/habits.js +37 -1
- package/dist/server/{repositories → server/src/repositories}/model-settings.js +13 -3
- package/dist/server/{repositories → server/src/repositories}/notes.js +3 -0
- package/dist/server/{repositories → server/src/repositories}/settings.js +431 -21
- package/dist/server/{repositories → server/src/repositories}/tasks.js +170 -10
- package/dist/server/server/src/runtime-data-root.js +82 -0
- package/dist/server/server/src/screen-time.js +802 -0
- package/dist/server/{services → server/src/services}/calendar-runtime.js +775 -58
- package/dist/server/server/src/services/data-management.js +788 -0
- package/dist/server/{services → server/src/services}/entity-crud.js +205 -2
- package/dist/server/server/src/services/google-calendar-oauth-config.js +176 -0
- package/dist/server/server/src/services/knowledge-graph.js +1455 -0
- package/dist/server/server/src/services/life-force-model.js +197 -0
- package/dist/server/server/src/services/life-force.js +1270 -0
- package/dist/server/server/src/services/psyche-observation-calendar.js +413 -0
- package/dist/server/{types.js → server/src/types.js} +420 -29
- package/dist/server/server/src/web.js +332 -0
- package/dist/server/src/components/customization/utility-widgets.js +439 -0
- package/dist/server/src/components/ui/info-tooltip.js +25 -0
- package/dist/server/src/components/workbench-boxes/calendar/calendar-boxes.js +78 -0
- package/dist/server/src/components/workbench-boxes/goals/goals-boxes.js +62 -0
- package/dist/server/src/components/workbench-boxes/habits/habits-boxes.js +62 -0
- package/dist/server/src/components/workbench-boxes/health/health-boxes.js +147 -0
- package/dist/server/src/components/workbench-boxes/insights/insights-boxes.js +50 -0
- package/dist/server/src/components/workbench-boxes/kanban/kanban-boxes.js +136 -0
- package/dist/server/src/components/workbench-boxes/movement/movement-boxes.js +47 -0
- package/dist/server/src/components/workbench-boxes/notes/notes-boxes.js +132 -0
- package/dist/server/src/components/workbench-boxes/overview/overview-boxes.js +65 -0
- package/dist/server/src/components/workbench-boxes/preferences/preferences-boxes.js +78 -0
- package/dist/server/src/components/workbench-boxes/projects/projects-boxes.js +62 -0
- package/dist/server/src/components/workbench-boxes/psyche/psyche-boxes.js +88 -0
- package/dist/server/src/components/workbench-boxes/questionnaires/questionnaires-boxes.js +61 -0
- package/dist/server/src/components/workbench-boxes/review/review-boxes.js +53 -0
- package/dist/server/src/components/workbench-boxes/shared/define-workbench-box.js +6 -0
- package/dist/server/src/components/workbench-boxes/shared/generic-node-view.js +49 -0
- package/dist/server/src/components/workbench-boxes/strategies/strategies-boxes.js +62 -0
- package/dist/server/src/components/workbench-boxes/tasks/tasks-boxes.js +76 -0
- package/dist/server/src/components/workbench-boxes/today/today-boxes.js +78 -0
- package/dist/server/src/components/workbench-boxes/wiki/wiki-boxes.js +60 -0
- package/dist/server/src/lib/api-error.js +37 -0
- package/dist/server/src/lib/api.js +2118 -0
- package/dist/server/src/lib/calendar-name-deduper.js +144 -0
- package/dist/server/src/lib/data-management-types.js +1 -0
- package/dist/server/src/lib/diagnostics.js +67 -0
- package/dist/server/src/lib/entity-visuals.js +279 -0
- package/dist/server/src/lib/knowledge-graph-types.js +276 -0
- package/dist/server/src/lib/knowledge-graph.js +470 -0
- package/dist/server/src/lib/psyche-types.js +1 -0
- package/dist/server/src/lib/questionnaire-types.js +1 -0
- package/dist/server/src/lib/runtime-paths.js +24 -0
- package/dist/server/src/lib/schemas.js +238 -0
- package/dist/server/src/lib/snapshot-normalizer.js +416 -0
- package/dist/server/src/lib/theme-system.js +319 -0
- package/dist/server/src/lib/types.js +1 -0
- package/dist/server/src/lib/utils.js +22 -0
- package/dist/server/src/lib/workbench/boxes.js +16 -0
- package/dist/server/src/lib/workbench/contracts.js +229 -0
- package/dist/server/src/lib/workbench/nodes.js +215 -0
- package/dist/server/src/lib/workbench/registry.js +120 -0
- package/dist/server/src/lib/workbench/runtime.js +397 -0
- package/dist/server/src/lib/workbench/tool-catalog.js +68 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/server/index.js +68 -0
- package/server/migrations/035_google_local_auth_settings.sql +2 -0
- package/server/migrations/036_google_local_auth_client_secret.sql +2 -0
- package/server/migrations/037_workbench_public_inputs_and_run_inputs.sql +5 -0
- package/server/migrations/038_data_management_settings.sql +11 -0
- package/server/migrations/039_life_force_and_action_points.sql +114 -0
- package/server/migrations/040_screen_time_domain.sql +89 -0
- package/server/migrations/041_companion_source_states.sql +21 -0
- package/server/migrations/042_movement_boxes.sql +47 -0
- package/server/migrations/043_movement_box_overlap_overrides.sql +26 -0
- package/skills/forge-openclaw/SKILL.md +27 -11
- package/skills/forge-openclaw/entity_conversation_playbooks.md +411 -46
- package/skills/forge-openclaw/psyche_entity_playbooks.md +195 -20
- package/dist/assets/index-CFCKDIMH.js +0 -67
- package/dist/assets/index-CFCKDIMH.js.map +0 -1
- package/dist/assets/index-ZPY6U1TU.css +0 -1
- package/dist/assets/vendor-D9PTEPSB.js +0 -824
- package/dist/assets/vendor-D9PTEPSB.js.map +0 -1
- package/dist/assets/viz-Cqb6s--o.js +0 -34
- package/dist/assets/viz-Cqb6s--o.js.map +0 -1
- package/dist/server/connectors/box-registry.js +0 -257
- package/dist/server/services/psyche-observation-calendar.js +0 -46
- package/dist/server/web.js +0 -98
- /package/dist/server/{discovery-advertiser.js → server/src/discovery-advertiser.js} +0 -0
- /package/dist/server/{e2e-server.js → server/src/e2e-server.js} +0 -0
- /package/dist/server/{errors.js → server/src/errors.js} +0 -0
- /package/dist/server/{index.js → server/src/index.js} +0 -0
- /package/dist/server/{managers → server/src/managers}/base.js +0 -0
- /package/dist/server/{managers → server/src/managers}/contracts.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/api-gateway-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/audit-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/authentication-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/authorization-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/background-job-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/configuration-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/database-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/event-bus-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/external-service-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/health-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/migration-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/openai-responses-provider.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/search-index-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/session-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/storage-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/token-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/transaction-manager.js +0 -0
- /package/dist/server/{managers → server/src/managers}/platform/trusted-network.js +0 -0
- /package/dist/server/{managers → server/src/managers}/type-guards.js +0 -0
- /package/dist/server/{preferences-seeds.js → server/src/preferences-seeds.js} +0 -0
- /package/dist/server/{preferences-types.js → server/src/preferences-types.js} +0 -0
- /package/dist/server/{questionnaire-flow.js → server/src/questionnaire-flow.js} +0 -0
- /package/dist/server/{questionnaire-seeds.js → server/src/questionnaire-seeds.js} +0 -0
- /package/dist/server/{questionnaire-types.js → server/src/questionnaire-types.js} +0 -0
- /package/dist/server/{repositories → server/src/repositories}/ai-processors.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/collaboration.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/deleted-entities.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/diagnostic-logs.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/domains.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/entity-ownership.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/event-log.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/goals.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/preferences.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/projects.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/psyche.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/questionnaires.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/rewards.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/strategies.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/surface-layouts.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/tags.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/task-runs.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/users.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/weekly-reviews.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/wiki-memory.js +0 -0
- /package/dist/server/{repositories → server/src/repositories}/work-adjustments.js +0 -0
- /package/dist/server/{seed-demo.js → server/src/seed-demo.js} +0 -0
- /package/dist/server/{services → server/src/services}/context.js +0 -0
- /package/dist/server/{services → server/src/services}/dashboard.js +0 -0
- /package/dist/server/{services → server/src/services}/gamification.js +0 -0
- /package/dist/server/{services → server/src/services}/insights.js +0 -0
- /package/dist/server/{services → server/src/services}/openai-codex-oauth.js +0 -0
- /package/dist/server/{services → server/src/services}/projects.js +0 -0
- /package/dist/server/{services → server/src/services}/psyche.js +0 -0
- /package/dist/server/{services → server/src/services}/relations.js +0 -0
- /package/dist/server/{services → server/src/services}/reviews.js +0 -0
- /package/dist/server/{services → server/src/services}/run-recovery.js +0 -0
- /package/dist/server/{services → server/src/services}/tagging.js +0 -0
- /package/dist/server/{services → server/src/services}/task-run-watchdog.js +0 -0
- /package/dist/server/{services → server/src/services}/work-time.js +0 -0
- /package/dist/server/{watch-mobile.js → server/src/watch-mobile.js} +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { buildSearchWorkbenchExecution, buildStaticWorkbenchExecution } from "../../../lib/workbench/runtime.js";
|
|
3
|
+
import { createSearchEntitiesTool, createSearchInputs, createSearchOutputs, createSearchParams, 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 defineProjectBox(id, title, description, tags, execute, output, tools = [], options) {
|
|
10
|
+
const inputs = options?.inputs ?? [];
|
|
11
|
+
const params = options?.params ?? [];
|
|
12
|
+
return defineWorkbenchBox(Slot, {
|
|
13
|
+
id,
|
|
14
|
+
surfaceId: "projects",
|
|
15
|
+
routePath: "/projects",
|
|
16
|
+
title,
|
|
17
|
+
icon: "projects",
|
|
18
|
+
description,
|
|
19
|
+
category: "Projects",
|
|
20
|
+
tags,
|
|
21
|
+
inputs,
|
|
22
|
+
params,
|
|
23
|
+
output,
|
|
24
|
+
tools,
|
|
25
|
+
NodeView: createGenericWorkbenchNodeView({
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
inputs,
|
|
29
|
+
params,
|
|
30
|
+
output,
|
|
31
|
+
tools
|
|
32
|
+
}),
|
|
33
|
+
execute
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export const ProjectsHeroBox = defineProjectBox("surface:projects:hero", "Projects hero", "Projects page header.", ["projects", "hero"], (input) => buildStaticWorkbenchExecution(input, null, "Projects page header."), [createSummaryOutput({ label: "Projects summary", description: "High-level projects page framing." })]);
|
|
37
|
+
export const ProjectsSearchResultsBox = defineProjectBox("surface:projects:search-results", "Search and results", "Project browser, filters, and search context.", ["projects", "search"], (input) => buildSearchWorkbenchExecution(input, {
|
|
38
|
+
query: "",
|
|
39
|
+
entityTypes: ["project"],
|
|
40
|
+
limit: 20
|
|
41
|
+
}), createSearchOutputs({
|
|
42
|
+
itemKind: "project",
|
|
43
|
+
itemLabel: "Project"
|
|
44
|
+
}), [createSearchEntitiesTool("Search project entities by query and entity types.")], {
|
|
45
|
+
inputs: createSearchInputs({
|
|
46
|
+
itemKind: "project",
|
|
47
|
+
itemLabel: "Project",
|
|
48
|
+
defaultEntityTypes: ["project"],
|
|
49
|
+
defaultLimit: 20
|
|
50
|
+
}),
|
|
51
|
+
params: createSearchParams({
|
|
52
|
+
itemKind: "project",
|
|
53
|
+
defaultEntityTypes: ["project"],
|
|
54
|
+
defaultLimit: 20
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
export const ProjectsSummaryBox = defineProjectBox("surface:projects:summary", "Collection summary", "Collection summary and project state metrics.", ["projects", "summary"], (input) => buildStaticWorkbenchExecution(input, null, "Project collection summary."), [
|
|
58
|
+
createSummaryOutput({
|
|
59
|
+
label: "Project summary",
|
|
60
|
+
description: "Summary of the project collection and current state."
|
|
61
|
+
})
|
|
62
|
+
]);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { buildSearchWorkbenchExecution, buildStaticWorkbenchExecution } from "../../../lib/workbench/runtime.js";
|
|
3
|
+
import { createSearchEntitiesTool, createSearchInputs, createSearchOutputs, createSearchParams, 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 definePsycheBox(id, title, description, tags, execute, output, tools = [], options) {
|
|
10
|
+
const inputs = options?.inputs ?? [];
|
|
11
|
+
const params = options?.params ?? [];
|
|
12
|
+
return defineWorkbenchBox(Slot, {
|
|
13
|
+
id,
|
|
14
|
+
surfaceId: "psyche",
|
|
15
|
+
routePath: "/psyche",
|
|
16
|
+
title,
|
|
17
|
+
icon: "psyche",
|
|
18
|
+
description,
|
|
19
|
+
category: "Psyche",
|
|
20
|
+
tags,
|
|
21
|
+
inputs,
|
|
22
|
+
params,
|
|
23
|
+
output,
|
|
24
|
+
tools,
|
|
25
|
+
NodeView: createGenericWorkbenchNodeView({
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
inputs,
|
|
29
|
+
params,
|
|
30
|
+
output,
|
|
31
|
+
tools
|
|
32
|
+
}),
|
|
33
|
+
execute
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export const PsycheOverviewBox = definePsycheBox("surface:psyche:overview", "Psyche overview", "High-level overview of values, patterns, beliefs, modes, and reports.", ["psyche", "overview"], (input) => buildStaticWorkbenchExecution(input, {
|
|
37
|
+
surfaces: ["values", "patterns", "beliefs", "modes", "reports"]
|
|
38
|
+
}, "Psyche overview spanning values, patterns, beliefs, modes, and reports."), [createSummaryOutput({ label: "Psyche summary", description: "Summary of values, patterns, beliefs, modes, and reports." })]);
|
|
39
|
+
export const PsycheValuesBox = definePsycheBox("surface:psyche:values", "Psyche values", "Values and long-lived internal directions tracked inside Forge.", ["psyche", "values"], (input) => buildSearchWorkbenchExecution(input, {
|
|
40
|
+
query: "",
|
|
41
|
+
entityTypes: ["psyche_value"],
|
|
42
|
+
limit: 20
|
|
43
|
+
}), createSearchOutputs({
|
|
44
|
+
itemKind: "psyche_value",
|
|
45
|
+
itemLabel: "Psyche value"
|
|
46
|
+
}), [createSearchEntitiesTool("Search psyche entities and reflective records.")], {
|
|
47
|
+
inputs: createSearchInputs({
|
|
48
|
+
itemKind: "psyche_value",
|
|
49
|
+
itemLabel: "Psyche value",
|
|
50
|
+
defaultEntityTypes: ["psyche_value"],
|
|
51
|
+
defaultLimit: 20
|
|
52
|
+
}),
|
|
53
|
+
params: createSearchParams({
|
|
54
|
+
itemKind: "psyche_value",
|
|
55
|
+
defaultEntityTypes: ["psyche_value"],
|
|
56
|
+
defaultLimit: 20
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
export const PsycheReportsBox = definePsycheBox("surface:psyche:reports", "Trigger reports", "Trigger reports and behavior-pattern signals linked to reflective work.", ["psyche", "reports", "patterns"], (input) => buildSearchWorkbenchExecution(input, {
|
|
60
|
+
query: "",
|
|
61
|
+
entityTypes: ["trigger_report", "behavior_pattern", "belief_entry", "mode_profile"],
|
|
62
|
+
limit: 20
|
|
63
|
+
}), createSearchOutputs({
|
|
64
|
+
itemKind: "psyche_record",
|
|
65
|
+
itemLabel: "Psyche record"
|
|
66
|
+
}), [createSearchEntitiesTool("Search psyche entities and reflective records.")], {
|
|
67
|
+
inputs: createSearchInputs({
|
|
68
|
+
itemKind: "psyche_record",
|
|
69
|
+
itemLabel: "Psyche record",
|
|
70
|
+
defaultEntityTypes: [
|
|
71
|
+
"trigger_report",
|
|
72
|
+
"behavior_pattern",
|
|
73
|
+
"belief_entry",
|
|
74
|
+
"mode_profile"
|
|
75
|
+
],
|
|
76
|
+
defaultLimit: 20
|
|
77
|
+
}),
|
|
78
|
+
params: createSearchParams({
|
|
79
|
+
itemKind: "psyche_record",
|
|
80
|
+
defaultEntityTypes: [
|
|
81
|
+
"trigger_report",
|
|
82
|
+
"behavior_pattern",
|
|
83
|
+
"belief_entry",
|
|
84
|
+
"mode_profile"
|
|
85
|
+
],
|
|
86
|
+
defaultLimit: 20
|
|
87
|
+
})
|
|
88
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { buildSearchWorkbenchExecution, buildStaticWorkbenchExecution } from "../../../lib/workbench/runtime.js";
|
|
3
|
+
import { createSearchEntitiesTool, createSearchInputs, createSearchOutputs, createSearchParams, 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 defineQuestionnaireBox(id, title, description, tags, execute, output, tools = [], options) {
|
|
10
|
+
const inputs = options?.inputs ?? [];
|
|
11
|
+
const params = options?.params ?? [];
|
|
12
|
+
return defineWorkbenchBox(Slot, {
|
|
13
|
+
id,
|
|
14
|
+
surfaceId: "questionnaires",
|
|
15
|
+
routePath: "/psyche/questionnaires",
|
|
16
|
+
title,
|
|
17
|
+
icon: "questionnaire",
|
|
18
|
+
description,
|
|
19
|
+
category: "Questionnaires",
|
|
20
|
+
tags,
|
|
21
|
+
inputs,
|
|
22
|
+
params,
|
|
23
|
+
output,
|
|
24
|
+
tools,
|
|
25
|
+
NodeView: createGenericWorkbenchNodeView({
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
inputs,
|
|
29
|
+
params,
|
|
30
|
+
output,
|
|
31
|
+
tools
|
|
32
|
+
}),
|
|
33
|
+
execute
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export const QuestionnairesLibraryBox = defineQuestionnaireBox("surface:questionnaires:library", "Questionnaire library", "Library of questionnaire instruments available in Forge.", ["questionnaires", "library"], (input) => buildSearchWorkbenchExecution(input, {
|
|
37
|
+
query: "",
|
|
38
|
+
entityTypes: ["questionnaire_instrument"],
|
|
39
|
+
limit: 20
|
|
40
|
+
}), createSearchOutputs({
|
|
41
|
+
itemKind: "questionnaire_instrument",
|
|
42
|
+
itemLabel: "Questionnaire"
|
|
43
|
+
}), [createSearchEntitiesTool("Search questionnaire instruments and related records.")], {
|
|
44
|
+
inputs: createSearchInputs({
|
|
45
|
+
itemKind: "questionnaire_instrument",
|
|
46
|
+
itemLabel: "Questionnaire",
|
|
47
|
+
defaultEntityTypes: ["questionnaire_instrument"],
|
|
48
|
+
defaultLimit: 20
|
|
49
|
+
}),
|
|
50
|
+
params: createSearchParams({
|
|
51
|
+
itemKind: "questionnaire_instrument",
|
|
52
|
+
defaultEntityTypes: ["questionnaire_instrument"],
|
|
53
|
+
defaultLimit: 20
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
export const QuestionnairesDraftingBox = defineQuestionnaireBox("surface:questionnaires:drafting", "Questionnaire drafting", "Drafting and publishing context for questionnaire instruments.", ["questionnaires", "drafting", "authoring"], (input) => buildStaticWorkbenchExecution(input, {
|
|
57
|
+
states: ["draft", "published", "run"]
|
|
58
|
+
}, "Questionnaire drafting surface with draft, publish, and run lifecycle context."), [createSummaryOutput({ label: "Drafting summary", description: "Summary of questionnaire drafting and lifecycle context." })]);
|
|
59
|
+
export const QuestionnairesObservationBox = defineQuestionnaireBox("surface:questionnaires:self-observation", "Self-observation calendar", "Calendar of self-observation notes and linked psyche context.", ["questionnaires", "self-observation", "psyche"], (input) => buildStaticWorkbenchExecution(input, {
|
|
60
|
+
linkedDomains: ["patterns", "reports", "notes"]
|
|
61
|
+
}, "Self-observation calendar surface with linked psyche context."), [createSummaryOutput({ label: "Observation summary", description: "Summary of the self-observation calendar and linked psyche context." })]);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { buildStaticWorkbenchExecution, buildWeeklyReviewWorkbenchExecution } from "../../../lib/workbench/runtime.js";
|
|
3
|
+
import { createContextOutput, 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 defineReviewBox(id, title, description, tags, execute, output) {
|
|
10
|
+
return defineWorkbenchBox(Slot, {
|
|
11
|
+
id,
|
|
12
|
+
surfaceId: "review",
|
|
13
|
+
routePath: "/review/weekly",
|
|
14
|
+
title,
|
|
15
|
+
icon: "review",
|
|
16
|
+
description,
|
|
17
|
+
category: "Review",
|
|
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 WeeklyReviewSummaryBox = defineReviewBox("surface:review:weekly-summary", "Weekly review summary", "Weekly review payload with momentum, wins, calibration, and completion state.", ["review", "weekly"], (input) => buildWeeklyReviewWorkbenchExecution(input), [
|
|
35
|
+
createSummaryOutput({
|
|
36
|
+
label: "Weekly review summary",
|
|
37
|
+
description: "Summary of momentum, wins, calibration, and review completion state."
|
|
38
|
+
}),
|
|
39
|
+
createContextOutput({
|
|
40
|
+
key: "weeklyReview",
|
|
41
|
+
label: "Weekly review payload",
|
|
42
|
+
description: "Structured weekly review payload returned by Forge.",
|
|
43
|
+
modelName: "ForgeWeeklyReview"
|
|
44
|
+
})
|
|
45
|
+
]);
|
|
46
|
+
export const WeeklyReviewRewardBox = defineReviewBox("surface:review:reward", "Review reward", "Reward framing and completion incentive for closing the current review cycle.", ["review", "reward"], (input) => buildStaticWorkbenchExecution(input, {
|
|
47
|
+
reward: "weekly_review_completion"
|
|
48
|
+
}, "Weekly review reward surface for locking the current cycle into evidence."), [
|
|
49
|
+
createSummaryOutput({
|
|
50
|
+
label: "Review reward summary",
|
|
51
|
+
description: "Summary of the reward framing for closing the current review cycle."
|
|
52
|
+
})
|
|
53
|
+
]);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { defineWorkbenchComponent } from "../../../lib/workbench/nodes.js";
|
|
2
|
+
export function defineWorkbenchBox(component, definition) {
|
|
3
|
+
const WorkbenchBoxComponent = (props) => component(props);
|
|
4
|
+
WorkbenchBoxComponent.displayName = definition.title.replace(/\s+/g, "");
|
|
5
|
+
return defineWorkbenchComponent(WorkbenchBoxComponent, definition);
|
|
6
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Handle, Position } from "@xyflow/react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { InfoTooltip } from "../../../components/ui/info-tooltip.js";
|
|
5
|
+
import { cn } from "../../../lib/utils.js";
|
|
6
|
+
function describePort(port) {
|
|
7
|
+
return [port.kind, port.modelName, port.itemKind ? `item:${port.itemKind}` : null]
|
|
8
|
+
.filter(Boolean)
|
|
9
|
+
.join(" · ");
|
|
10
|
+
}
|
|
11
|
+
function PortList({ title, ports, align }) {
|
|
12
|
+
return (_jsxs("div", { className: "grid gap-1.5", children: [_jsxs("div", { className: cn("flex items-center gap-1 text-[10px] uppercase tracking-[0.18em] text-white/34", align === "left" ? "text-left" : "text-right"), children: [_jsx("span", { children: title }), _jsx(InfoTooltip, { content: align === "left"
|
|
13
|
+
? "Inputs are values this box expects from upstream nodes."
|
|
14
|
+
: "Outputs are values this box publishes for downstream nodes.", label: align === "left" ? "Explain box inputs" : "Explain box outputs" })] }), ports.length === 0 ? (_jsx("div", { className: "rounded-full border border-dashed border-white/10 px-3 py-1.5 text-[11px] text-white/28", children: "None" })) : null, ports.map((port) => (_jsxs("div", { className: cn("relative rounded-[16px] bg-white/[0.05] px-3 py-2 text-[11px] text-white/62", align === "left" ? "pl-5 text-left" : "pr-5 text-right"), children: [_jsx(Handle, { type: align === "left" ? "target" : "source", position: align === "left" ? Position.Left : Position.Right, id: port.key, className: "!size-2.5 !border !border-white/80 !bg-[#b8c5ff]", style: {
|
|
15
|
+
[align]: 6
|
|
16
|
+
} }), _jsx("div", { children: port.label }), _jsx("div", { className: "mt-1 text-[10px] text-white/38", children: describePort(port) })] }, port.key)))] }));
|
|
17
|
+
}
|
|
18
|
+
export function createGenericWorkbenchNodeView(definition) {
|
|
19
|
+
return function GenericWorkbenchNodeView(_props) {
|
|
20
|
+
const [schemaOpen, setSchemaOpen] = useState(false);
|
|
21
|
+
return (_jsxs("div", { className: "min-w-[280px] rounded-[24px] border border-white/10 bg-[linear-gradient(180deg,rgba(20,28,45,0.98),rgba(11,16,29,0.98))] p-3 shadow-[0_26px_80px_rgba(0,0,0,0.4)]", children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "truncate text-sm font-semibold text-white", children: definition.title }), _jsx("div", { className: "mt-1 line-clamp-2 text-[12px] leading-5 text-white/48", children: definition.description })] }), _jsx("div", { className: "rounded-full bg-white/[0.06] px-2.5 py-1 text-[10px] uppercase tracking-[0.16em] text-white/56", children: "box" })] }), definition.params.length > 0 ? (_jsxs("div", { className: "mt-3 rounded-[18px] bg-white/[0.04] px-3 py-2 text-[11px] text-white/52", children: [definition.params.length, " param", definition.params.length === 1 ? "" : "s", " configurable in the flow editor"] })) : null, definition.tools.length > 0 ? (_jsxs("div", { className: "mt-2 rounded-[18px] bg-white/[0.04] px-3 py-2 text-[11px] text-white/52", children: [definition.tools.length, " tool", definition.tools.length === 1 ? "" : "s", " available"] })) : null, _jsx("div", { className: "mt-2", children: _jsx("button", { type: "button", className: "rounded-full bg-white/[0.05] px-3 py-1.5 text-[11px] text-white/56 transition hover:bg-white/[0.08] hover:text-white", onClick: () => setSchemaOpen((current) => !current), children: schemaOpen ? "Hide schema" : "Preview schema" }) }), _jsxs("div", { className: "mt-3 grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-3", children: [_jsx(PortList, { title: "Inputs", ports: definition.inputs, align: "left" }), _jsx(PortList, { title: "Outputs", ports: definition.output, align: "right" })] }), schemaOpen ? (_jsxs("div", { className: "mt-3 rounded-[18px] border border-white/8 bg-black/20 p-3", children: [_jsxs("div", { className: "flex items-center gap-2 text-[10px] uppercase tracking-[0.18em] text-white/38", children: [_jsx("span", { children: "Box contract" }), _jsx(InfoTooltip, { content: "This preview summarizes what the box consumes, publishes, and what tools it can expose to AI nodes.", label: "Explain box contract preview" })] }), _jsx("pre", { className: "mt-2 overflow-auto whitespace-pre-wrap text-[11px] leading-5 text-white/64", children: JSON.stringify({
|
|
22
|
+
inputs: definition.inputs.map(({ key, kind, required, description, modelName, itemKind, shape, exampleValue }) => ({
|
|
23
|
+
key,
|
|
24
|
+
kind,
|
|
25
|
+
required: Boolean(required),
|
|
26
|
+
description,
|
|
27
|
+
modelName,
|
|
28
|
+
itemKind,
|
|
29
|
+
shape,
|
|
30
|
+
exampleValue
|
|
31
|
+
})),
|
|
32
|
+
outputs: definition.output.map(({ key, kind, required, description, modelName, itemKind, shape, exampleValue }) => ({
|
|
33
|
+
key,
|
|
34
|
+
kind,
|
|
35
|
+
required: Boolean(required),
|
|
36
|
+
description,
|
|
37
|
+
modelName,
|
|
38
|
+
itemKind,
|
|
39
|
+
shape,
|
|
40
|
+
exampleValue
|
|
41
|
+
})),
|
|
42
|
+
tools: definition.tools.map(({ key, accessMode, argsSchema }) => ({
|
|
43
|
+
key,
|
|
44
|
+
accessMode,
|
|
45
|
+
argsSchema
|
|
46
|
+
}))
|
|
47
|
+
}, null, 2) })] })) : null] }));
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { buildSearchWorkbenchExecution, buildStaticWorkbenchExecution } from "../../../lib/workbench/runtime.js";
|
|
3
|
+
import { createSearchEntitiesTool, createSearchInputs, createSearchOutputs, createSearchParams, 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 defineStrategyBox(id, title, description, tags, execute, output, tools = [], options) {
|
|
10
|
+
const inputs = options?.inputs ?? [];
|
|
11
|
+
const params = options?.params ?? [];
|
|
12
|
+
return defineWorkbenchBox(Slot, {
|
|
13
|
+
id,
|
|
14
|
+
surfaceId: "strategies",
|
|
15
|
+
routePath: "/strategies",
|
|
16
|
+
title,
|
|
17
|
+
icon: "strategy",
|
|
18
|
+
description,
|
|
19
|
+
category: "Strategies",
|
|
20
|
+
tags,
|
|
21
|
+
inputs,
|
|
22
|
+
params,
|
|
23
|
+
output,
|
|
24
|
+
tools,
|
|
25
|
+
NodeView: createGenericWorkbenchNodeView({
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
inputs,
|
|
29
|
+
params,
|
|
30
|
+
output,
|
|
31
|
+
tools
|
|
32
|
+
}),
|
|
33
|
+
execute
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export const StrategiesHeroBox = defineStrategyBox("surface:strategies:hero", "Strategies hero", "Strategies page header and sequencing context.", ["strategies", "hero"], (input) => buildStaticWorkbenchExecution(input, null, "Strategies page header."), [createSummaryOutput({ label: "Strategies summary", description: "High-level strategies page framing." })]);
|
|
37
|
+
export const StrategiesSearchResultsBox = defineStrategyBox("surface:strategies:search-results", "Strategies list and results", "Strategy browser and structured operating context.", ["strategies", "search"], (input) => buildSearchWorkbenchExecution(input, {
|
|
38
|
+
query: "",
|
|
39
|
+
entityTypes: ["strategy"],
|
|
40
|
+
limit: 20
|
|
41
|
+
}), createSearchOutputs({
|
|
42
|
+
itemKind: "strategy",
|
|
43
|
+
itemLabel: "Strategy"
|
|
44
|
+
}), [createSearchEntitiesTool("Search strategy entities by query and entity types.")], {
|
|
45
|
+
inputs: createSearchInputs({
|
|
46
|
+
itemKind: "strategy",
|
|
47
|
+
itemLabel: "Strategy",
|
|
48
|
+
defaultEntityTypes: ["strategy"],
|
|
49
|
+
defaultLimit: 20
|
|
50
|
+
}),
|
|
51
|
+
params: createSearchParams({
|
|
52
|
+
itemKind: "strategy",
|
|
53
|
+
defaultEntityTypes: ["strategy"],
|
|
54
|
+
defaultLimit: 20
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
export const StrategiesSummaryBox = defineStrategyBox("surface:strategies:summary", "Strategies summary", "Strategy collection summary and state context.", ["strategies", "summary"], (input) => buildStaticWorkbenchExecution(input, null, "Strategy collection summary."), [
|
|
58
|
+
createSummaryOutput({
|
|
59
|
+
label: "Strategy summary",
|
|
60
|
+
description: "Summary of strategy state and collection context."
|
|
61
|
+
})
|
|
62
|
+
]);
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { buildSearchWorkbenchExecution, buildStaticWorkbenchExecution } from "../../../lib/workbench/runtime.js";
|
|
3
|
+
import { createSearchEntitiesTool, createSearchInputs, createSearchOutputs, createSearchParams, createSummaryOutput, createTaskStatusTool } 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 defineTasksBox(id, title, description, tags, execute, output, tools = [], options) {
|
|
10
|
+
const inputs = options?.inputs ?? [];
|
|
11
|
+
const params = options?.params ?? [];
|
|
12
|
+
return defineWorkbenchBox(Slot, {
|
|
13
|
+
id,
|
|
14
|
+
surfaceId: "tasks",
|
|
15
|
+
routePath: "/today",
|
|
16
|
+
title,
|
|
17
|
+
icon: "task",
|
|
18
|
+
description,
|
|
19
|
+
category: "Tasks",
|
|
20
|
+
tags,
|
|
21
|
+
inputs,
|
|
22
|
+
params,
|
|
23
|
+
output,
|
|
24
|
+
tools,
|
|
25
|
+
NodeView: createGenericWorkbenchNodeView({
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
inputs,
|
|
29
|
+
params,
|
|
30
|
+
output,
|
|
31
|
+
tools
|
|
32
|
+
}),
|
|
33
|
+
execute
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export const TasksInboxBox = defineTasksBox("surface:tasks:inbox", "Task queue", "Searchable task queue spanning backlog, focus, and in-progress work.", ["tasks", "queue", "search"], (input) => buildSearchWorkbenchExecution(input, {
|
|
37
|
+
query: "",
|
|
38
|
+
entityTypes: ["task"],
|
|
39
|
+
limit: 20
|
|
40
|
+
}), createSearchOutputs({
|
|
41
|
+
itemKind: "task",
|
|
42
|
+
itemLabel: "Task"
|
|
43
|
+
}), [
|
|
44
|
+
createSearchEntitiesTool("Search task entities by title, status, or linked context."),
|
|
45
|
+
createTaskStatusTool("Move a task between backlog, focus, in progress, blocked, and done.")
|
|
46
|
+
], {
|
|
47
|
+
inputs: createSearchInputs({
|
|
48
|
+
itemKind: "task",
|
|
49
|
+
itemLabel: "Task",
|
|
50
|
+
defaultEntityTypes: ["task"],
|
|
51
|
+
defaultLimit: 20
|
|
52
|
+
}),
|
|
53
|
+
params: createSearchParams({
|
|
54
|
+
itemKind: "task",
|
|
55
|
+
defaultEntityTypes: ["task"],
|
|
56
|
+
defaultLimit: 20
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
export const TasksFocusBox = defineTasksBox("surface:tasks:focus-lane", "Focus lane", "Focused task lane for what should happen next right now.", ["tasks", "focus", "execution"], (input) => buildStaticWorkbenchExecution(input, {
|
|
60
|
+
hint: "Use this surface to represent active or next-up work."
|
|
61
|
+
}, "Focus lane context for the current execution board."), [
|
|
62
|
+
createSummaryOutput({
|
|
63
|
+
label: "Focus summary",
|
|
64
|
+
description: "Human-readable explanation of what the focus lane represents."
|
|
65
|
+
})
|
|
66
|
+
], [
|
|
67
|
+
createTaskStatusTool("Change task state as the flow decides what should happen next.")
|
|
68
|
+
]);
|
|
69
|
+
export const TasksSummaryBox = defineTasksBox("surface:tasks:summary", "Task summary", "High-level summary of the current task system and work state.", ["tasks", "summary"], (input) => buildStaticWorkbenchExecution(input, {
|
|
70
|
+
states: ["backlog", "focus", "in_progress", "blocked", "done"]
|
|
71
|
+
}, "Task system summary with the key task states Forge tracks."), [
|
|
72
|
+
createSummaryOutput({
|
|
73
|
+
label: "Task summary",
|
|
74
|
+
description: "High-level summary of the current task system and work state."
|
|
75
|
+
})
|
|
76
|
+
]);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { buildSearchWorkbenchExecution, buildStaticWorkbenchExecution } from "../../../lib/workbench/runtime.js";
|
|
3
|
+
import { createSearchEntitiesTool, createSearchInputs, createSearchOutputs, createSearchParams, 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 defineTodayBox(id, title, description, tags, execute, output, tools = [], options) {
|
|
10
|
+
const inputs = options?.inputs ?? [];
|
|
11
|
+
const params = options?.params ?? [];
|
|
12
|
+
return defineWorkbenchBox(Slot, {
|
|
13
|
+
id,
|
|
14
|
+
surfaceId: "today",
|
|
15
|
+
routePath: "/today",
|
|
16
|
+
title,
|
|
17
|
+
icon: "today",
|
|
18
|
+
description,
|
|
19
|
+
category: "Today",
|
|
20
|
+
tags,
|
|
21
|
+
inputs,
|
|
22
|
+
params,
|
|
23
|
+
output,
|
|
24
|
+
tools,
|
|
25
|
+
NodeView: createGenericWorkbenchNodeView({
|
|
26
|
+
title,
|
|
27
|
+
description,
|
|
28
|
+
inputs,
|
|
29
|
+
params,
|
|
30
|
+
output,
|
|
31
|
+
tools
|
|
32
|
+
}),
|
|
33
|
+
execute
|
|
34
|
+
});
|
|
35
|
+
}
|
|
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." })]);
|
|
38
|
+
export const TodayRunwayBox = defineTodayBox("surface:today:runway", "Runway", "Execution lane and current work.", ["today", "execution"], (input) => buildSearchWorkbenchExecution(input, {
|
|
39
|
+
query: "",
|
|
40
|
+
entityTypes: ["task", "habit"],
|
|
41
|
+
limit: 16
|
|
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
|
+
export const TodayFocusBox = defineTodayBox("surface:today:focus", "Current focus", "Today priorities and focus context.", ["today", "focus"], (input) => buildSearchWorkbenchExecution(input, {
|
|
60
|
+
query: "",
|
|
61
|
+
entityTypes: ["task", "habit"],
|
|
62
|
+
limit: 16
|
|
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
|
+
]);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export class ForgeApiError extends Error {
|
|
2
|
+
status;
|
|
3
|
+
code;
|
|
4
|
+
details;
|
|
5
|
+
requestPath;
|
|
6
|
+
constructor(input) {
|
|
7
|
+
super(input.message);
|
|
8
|
+
this.name = "ForgeApiError";
|
|
9
|
+
this.status = input.status;
|
|
10
|
+
this.code = input.code;
|
|
11
|
+
this.details = input.details ?? [];
|
|
12
|
+
this.requestPath = input.requestPath;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export function describeApiError(error) {
|
|
16
|
+
if (error instanceof ForgeApiError) {
|
|
17
|
+
return {
|
|
18
|
+
title: `Request failed (${error.status})`,
|
|
19
|
+
description: error.details.length > 0
|
|
20
|
+
? `${error.message} ${error.details.map((detail) => `${detail.path}: ${detail.message}`).join(" · ")}`
|
|
21
|
+
: error.message,
|
|
22
|
+
code: error.code
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (error instanceof Error) {
|
|
26
|
+
return {
|
|
27
|
+
title: "Something went wrong",
|
|
28
|
+
description: error.message,
|
|
29
|
+
code: "unknown_error"
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
title: "Something went wrong",
|
|
34
|
+
description: "Unexpected API failure.",
|
|
35
|
+
code: "unknown_error"
|
|
36
|
+
};
|
|
37
|
+
}
|