@taskforcehq/taskforce 0.3.323 → 0.3.326
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/dist/Taskforce.module.css +56 -0
- package/dist/components/features/TaskSettings.js +26 -9
- package/dist/components/task/TaskKanban.d.ts +2 -2
- package/dist/components/views/AppShellHeader.js +47 -2
- package/dist/components/views/StandaloneLayout.js +22 -22
- package/dist/components/views/panels/PlanningDrawer.d.ts +2 -2
- package/dist/components/views/panels/PlanningDrawer.js +26 -12
- package/dist/components/views/planningScope.d.ts +4 -0
- package/dist/components/views/planningScope.js +5 -0
- package/dist/core/AiProfileService.js +6 -1
- package/dist/core/Taskforce.d.ts +3 -0
- package/dist/core/Taskforce.js +21 -0
- package/dist/hooks/useTaskforce.js +74 -17
- package/dist/hooks/workspace/workspaceLocalState.d.ts +25 -0
- package/dist/hooks/workspace/workspaceLocalState.js +38 -0
- package/dist/mcp/adminWorkspaceRegistrar.js +0 -10
- package/dist/mcp/clientIntegrations.d.ts +1 -1
- package/dist/mcp/clientIntegrations.js +50 -0
- package/dist/mcp/clientProfileDefaults.js +4 -0
- package/dist/mcp/collaborationRegistrar.js +3 -3
- package/dist/mcp/documentAssetRegistrar.js +24 -72
- package/dist/mcp/documentHelpers.d.ts +11 -4
- package/dist/mcp/documentHelpers.js +21 -17
- package/dist/mcp/runtime.d.ts +4 -0
- package/dist/mcp/runtime.js +466 -534
- package/dist/mcp/taskPlanningRegistrar.js +45 -81
- package/dist/mcp/toolProfiles.d.ts +7 -0
- package/dist/mcp/toolProfiles.js +36 -0
- package/dist/mcp/toolRegistry.d.ts +87 -609
- package/dist/mcp/toolRegistry.js +93 -88
- package/dist/resources/templates/workflow-sources/workflowDocs.mjs +10 -10
- package/dist/resources/templates/workflows/collaborate.yaml +2 -3
- package/dist/resources/templates/workflows/do.yaml +2 -3
- package/dist/resources/templates/workflows/evaluate.yaml +2 -3
- package/dist/resources/templates/workflows/execute.yaml +12 -15
- package/dist/resources/templates/workflows/plan.yaml +3 -4
- package/dist/resources/templates/workflows/review.yaml +2 -3
- package/dist/server/routes/admin.d.ts +1 -0
- package/dist/server/routes/admin.js +29 -1
- package/dist/shared/taxonomyLibrary.js +1 -1
- package/dist/sync/cloudSyncApi.js +22 -3
- package/dist/types.js +1 -1
- package/dist/ui/.well-known/openai-apps-challenge +1 -1
- package/dist/ui/assets/{AgentsModule-7jpDeuVR.js → AgentsModule-C4LcqhcZ.js} +1 -1
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-BJLe8DFj.js → AnnotatedAttachmentWorkspace-B-Dq22d2.js} +1 -1
- package/dist/ui/assets/{ContextAttachmentManager-AmEny3eI.js → ContextAttachmentManager-DsXPTvi-.js} +1 -1
- package/dist/ui/assets/{DocumentWorkspace-Cqdq31Ha.js → DocumentWorkspace-CxA1wO3U.js} +1 -1
- package/dist/ui/assets/{EntityActivityTimeline-BlS7DhA4.js → EntityActivityTimeline-B8nSe8l3.js} +1 -1
- package/dist/ui/assets/{InitiativesModule-C1qfO1uZ.js → InitiativesModule-VY95v38E.js} +1 -1
- package/dist/ui/assets/{PlansPage-DFt5w-0Y.js → PlansPage-CQbKDv1a.js} +1 -1
- package/dist/ui/assets/{TaskContextUpload-zuro5gDT.js → TaskContextUpload-DvDlNpHC.js} +1 -1
- package/dist/ui/assets/TaskSettings-CUWbYYtP.js +12 -0
- package/dist/ui/assets/{WorkflowsModule-CEEGuxsf.js → WorkflowsModule-CgM3Jako.js} +1 -1
- package/dist/ui/assets/documentReferences-Do9YjrS3.js +1 -0
- package/dist/ui/assets/index--mh3pktj.js +5 -0
- package/dist/ui/assets/index-BawaaEXS.css +1 -0
- package/dist/ui/index.html +2 -2
- package/dist/utils/theme.js +1 -1
- package/package.json +1 -1
- package/src/resources/templates/workflow-sources/workflowDocs.mjs +10 -10
- package/src/resources/templates/workflows/collaborate.yaml +2 -3
- package/src/resources/templates/workflows/do.yaml +2 -3
- package/src/resources/templates/workflows/evaluate.yaml +2 -3
- package/src/resources/templates/workflows/execute.yaml +12 -15
- package/src/resources/templates/workflows/plan.yaml +3 -4
- package/src/resources/templates/workflows/review.yaml +2 -3
- package/dist/ui/assets/TaskSettings-CJPC2Bft.js +0 -9
- package/dist/ui/assets/documentReferences-Ca2P--i5.js +0 -1
- package/dist/ui/assets/index-CGDQY0nN.js +0 -5
- package/dist/ui/assets/index-DcK_8tuE.css +0 -1
package/dist/mcp/toolRegistry.js
CHANGED
|
@@ -1,94 +1,99 @@
|
|
|
1
|
+
export const MCP_TOOL_PROFILES = ['default', 'extended', 'full'];
|
|
2
|
+
const defaultTool = (permission, mutating, suggestedTool) => ({
|
|
3
|
+
permission,
|
|
4
|
+
mutating,
|
|
5
|
+
minProfile: 'default',
|
|
6
|
+
...(suggestedTool ? { suggestedTool } : {}),
|
|
7
|
+
});
|
|
8
|
+
const extendedTool = (permission, mutating, suggestedTool) => ({
|
|
9
|
+
permission,
|
|
10
|
+
mutating,
|
|
11
|
+
minProfile: 'extended',
|
|
12
|
+
...(suggestedTool ? { suggestedTool } : {}),
|
|
13
|
+
});
|
|
14
|
+
const fullTool = (permission, mutating, suggestedTool) => ({
|
|
15
|
+
permission,
|
|
16
|
+
mutating,
|
|
17
|
+
minProfile: 'full',
|
|
18
|
+
...(suggestedTool ? { suggestedTool } : {}),
|
|
19
|
+
});
|
|
1
20
|
// Single source of truth for MCP tool permissions. Add new tools here so the
|
|
2
21
|
// runtime and cloud transport stay in sync automatically.
|
|
3
22
|
export const MCP_TOOL_REGISTRY = Object.freeze({
|
|
4
|
-
list_assignees: {
|
|
5
|
-
get_current_profile: {
|
|
6
|
-
list_tasks: {
|
|
7
|
-
search_tasks: {
|
|
8
|
-
get_task: {
|
|
9
|
-
list_initiatives: {
|
|
10
|
-
get_initiative: {
|
|
11
|
-
create_initiative: {
|
|
12
|
-
update_initiative: {
|
|
13
|
-
archive_initiative: {
|
|
14
|
-
unarchive_initiative: {
|
|
15
|
-
list_workstreams: {
|
|
16
|
-
get_workstream: {
|
|
17
|
-
create_workstream: {
|
|
18
|
-
update_workstream: {
|
|
19
|
-
archive_workstream: {
|
|
20
|
-
unarchive_workstream: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
delete_task_attachment: { permission: { kind: 'scope', scope: 'tasks:write' }, mutating: true },
|
|
79
|
-
list_archive: { permission: { kind: 'scope', scope: 'tasks:read' }, mutating: false },
|
|
80
|
-
unarchive_task: { permission: { kind: 'scope', scope: 'tasks:write' }, mutating: true },
|
|
81
|
-
bulk_archive: { permission: { kind: 'scope', scope: 'tasks:write' }, mutating: true },
|
|
82
|
-
get_config: { permission: { kind: 'scope', scope: 'workspace:read' }, mutating: false },
|
|
83
|
-
update_categories: { permission: { kind: 'session-only' }, mutating: true },
|
|
84
|
-
update_types: { permission: { kind: 'session-only' }, mutating: true },
|
|
85
|
-
bulk_update_type: { permission: { kind: 'scope', scope: 'tasks:write' }, mutating: true },
|
|
86
|
-
bulk_update_fields: { permission: { kind: 'scope', scope: 'tasks:write' }, mutating: true },
|
|
87
|
-
export_resources: { permission: { kind: 'local-only' }, mutating: true },
|
|
88
|
-
get_paths: { permission: { kind: 'local-only' }, mutating: false },
|
|
89
|
-
update_priorities: { permission: { kind: 'session-only' }, mutating: true },
|
|
90
|
-
update_approaches: { permission: { kind: 'session-only' }, mutating: true },
|
|
91
|
-
get_stats: { permission: { kind: 'scope', scope: 'tasks:read' }, mutating: false },
|
|
23
|
+
list_assignees: defaultTool({ kind: 'scope', scope: 'workspace:read' }, false),
|
|
24
|
+
get_current_profile: defaultTool({ kind: 'scope', scope: 'workspace:read' }, false),
|
|
25
|
+
list_tasks: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
26
|
+
search_tasks: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
27
|
+
get_task: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
28
|
+
list_initiatives: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
29
|
+
get_initiative: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
30
|
+
create_initiative: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
31
|
+
update_initiative: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
32
|
+
archive_initiative: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
33
|
+
unarchive_initiative: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
34
|
+
list_workstreams: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
35
|
+
get_workstream: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
36
|
+
create_workstream: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
37
|
+
update_workstream: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
38
|
+
archive_workstream: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
39
|
+
unarchive_workstream: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
40
|
+
update_task_workstream: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
41
|
+
update_workstream_initiative: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
42
|
+
get_task_checklist: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
43
|
+
replace_task_checklist: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
44
|
+
get_task_attachments: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
45
|
+
get_workstream_attachments: extendedTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
46
|
+
save_workstream_attachment: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
47
|
+
delete_workstream_attachment: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
48
|
+
get_initiative_attachments: extendedTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
49
|
+
save_initiative_attachment: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
50
|
+
delete_initiative_attachment: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
51
|
+
search_images: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
52
|
+
get_image: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
53
|
+
search_documents: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
54
|
+
get_document: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
55
|
+
get_image_annotations: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
56
|
+
create_annotated_attachment_session: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_image' }),
|
|
57
|
+
update_annotated_attachment_session: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_image' }),
|
|
58
|
+
delete_annotated_attachment_session: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
59
|
+
review_image: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
60
|
+
add_annotated_attachment_marker: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_image' }),
|
|
61
|
+
bulk_add_annotated_attachment_markers: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_image' }),
|
|
62
|
+
update_annotated_attachment_marker: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_image' }),
|
|
63
|
+
reorder_annotated_attachment_marker: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_image' }),
|
|
64
|
+
delete_annotated_attachment_marker: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
65
|
+
get_document_reviews: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
66
|
+
create_document_review_session: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_document' }),
|
|
67
|
+
update_document_review_session: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_document' }),
|
|
68
|
+
review_document: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
69
|
+
add_document_review_comment: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_document' }),
|
|
70
|
+
update_document_review_comment: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true, { name: 'review_document' }),
|
|
71
|
+
delete_document_review_comment: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
72
|
+
get_schedule_board: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
73
|
+
update_schedule: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
74
|
+
bulk_carryover: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
75
|
+
set_schedule_preferences: fullTool({ kind: 'session-only' }, true),
|
|
76
|
+
resolve_profile: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
77
|
+
create_task: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
78
|
+
start_task: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
79
|
+
update_task: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
80
|
+
finish_task: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
81
|
+
archive_task: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
82
|
+
add_comment: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
83
|
+
link_task_context: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
84
|
+
save_task_attachment: defaultTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
85
|
+
delete_task_attachment: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
86
|
+
unarchive_task: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
87
|
+
bulk_archive: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
88
|
+
get_config: defaultTool({ kind: 'scope', scope: 'workspace:read' }, false),
|
|
89
|
+
update_categories: fullTool({ kind: 'session-only' }, true),
|
|
90
|
+
update_types: fullTool({ kind: 'session-only' }, true),
|
|
91
|
+
bulk_update_fields: extendedTool({ kind: 'scope', scope: 'tasks:write' }, true),
|
|
92
|
+
export_resources: fullTool({ kind: 'local-only' }, true),
|
|
93
|
+
get_paths: fullTool({ kind: 'local-only' }, false),
|
|
94
|
+
update_priorities: fullTool({ kind: 'session-only' }, true),
|
|
95
|
+
update_approaches: fullTool({ kind: 'session-only' }, true),
|
|
96
|
+
get_stats: defaultTool({ kind: 'scope', scope: 'tasks:read' }, false),
|
|
92
97
|
});
|
|
93
98
|
export const MCP_TOOL_PERMISSIONS = Object.freeze(Object.fromEntries(Object.entries(MCP_TOOL_REGISTRY).map(([name, entry]) => [name, entry.permission])));
|
|
94
99
|
export const MCP_WRITE_TOOL_NAMES = new Set(Object.entries(MCP_TOOL_REGISTRY)
|
|
@@ -20,7 +20,7 @@ const baseContextPolicy = {
|
|
|
20
20
|
mcp: {
|
|
21
21
|
knownTaskIdTool: '{{MCP_PREFIX}}get_task',
|
|
22
22
|
taskAttachmentListTool: '{{MCP_PREFIX}}get_task_attachments',
|
|
23
|
-
taskAttachmentReadTool: '{{MCP_PREFIX}}
|
|
23
|
+
taskAttachmentReadTool: '{{MCP_PREFIX}}get_task_attachments',
|
|
24
24
|
unknownTaskIdTools: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks']
|
|
25
25
|
},
|
|
26
26
|
mcpUnavailableAction: 'stop-and-request-user-action'
|
|
@@ -31,7 +31,7 @@ const protocolBlock = (label) => [
|
|
|
31
31
|
'> 1. **MCP-first load**:',
|
|
32
32
|
'> - If task ID is known, call `{{MCP_PREFIX}}get_task`.',
|
|
33
33
|
'> - If task ID is unknown, use `{{MCP_PREFIX}}list_tasks` / `{{MCP_PREFIX}}search_tasks` to identify it.',
|
|
34
|
-
'> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments
|
|
34
|
+
'> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments`; pass `attachmentId` to that same tool when you need one attachment body or download reference.',
|
|
35
35
|
'> - Do not try to open task attachment HTTP paths directly when MCP attachment-read tools are available.',
|
|
36
36
|
'> - If MCP is unavailable, stop and request user action.',
|
|
37
37
|
'> 2. Print `prompts.startupChecklist`.'
|
|
@@ -57,7 +57,7 @@ export const workflowDocs = [
|
|
|
57
57
|
compat: {
|
|
58
58
|
minTaskforceVersion: MIN_VERSION,
|
|
59
59
|
requiredToolsCritical: ['{{MCP_PREFIX}}get_task'],
|
|
60
|
-
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}
|
|
60
|
+
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}link_task_context', '{{MCP_PREFIX}}save_task_attachment']
|
|
61
61
|
},
|
|
62
62
|
toolPolicy: baseToolPolicy(['{{MCP_PREFIX}}get_task']),
|
|
63
63
|
contextPolicy: baseContextPolicy,
|
|
@@ -105,7 +105,7 @@ export const workflowDocs = [
|
|
|
105
105
|
compat: {
|
|
106
106
|
minTaskforceVersion: MIN_VERSION,
|
|
107
107
|
requiredToolsCritical: ['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}update_task', '{{MCP_PREFIX}}add_comment', '{{MCP_PREFIX}}finish_task'],
|
|
108
|
-
requiredToolsOptional: ['{{MCP_PREFIX}}resolve_profile', '{{MCP_PREFIX}}list_assignees', '{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}
|
|
108
|
+
requiredToolsOptional: ['{{MCP_PREFIX}}resolve_profile', '{{MCP_PREFIX}}list_assignees', '{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}get_config', '{{MCP_PREFIX}}create_task', '{{MCP_PREFIX}}link_task_context', '{{MCP_PREFIX}}save_task_attachment']
|
|
109
109
|
},
|
|
110
110
|
toolPolicy: baseToolPolicy(
|
|
111
111
|
['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}update_task', '{{MCP_PREFIX}}add_comment', '{{MCP_PREFIX}}finish_task'],
|
|
@@ -188,8 +188,8 @@ export const workflowDocs = [
|
|
|
188
188
|
'1. Implement code changes.',
|
|
189
189
|
'2. Run validation steps (automated tests + manual checks as needed).',
|
|
190
190
|
'3. If user requests planning relationship work:',
|
|
191
|
-
' - Link/unlink a task to a workstream using `{{MCP_PREFIX}}
|
|
192
|
-
' - Link/unlink a workstream to an initiative using `{{MCP_PREFIX}}
|
|
191
|
+
' - Link/unlink a task to a workstream using `{{MCP_PREFIX}}update_task_workstream`.',
|
|
192
|
+
' - Link/unlink a workstream to an initiative using `{{MCP_PREFIX}}update_workstream_initiative`.',
|
|
193
193
|
' - Create new tasks/workstreams/initiatives only when they materially improve execution clarity.',
|
|
194
194
|
'4. If blocked, switch to Collaborate mode and capture blocker context.',
|
|
195
195
|
'',
|
|
@@ -220,7 +220,7 @@ export const workflowDocs = [
|
|
|
220
220
|
compat: {
|
|
221
221
|
minTaskforceVersion: MIN_VERSION,
|
|
222
222
|
requiredToolsCritical: ['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}update_task', '{{MCP_PREFIX}}add_comment'],
|
|
223
|
-
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}
|
|
223
|
+
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}get_config', '{{MCP_PREFIX}}link_task_context', '{{MCP_PREFIX}}save_task_attachment']
|
|
224
224
|
},
|
|
225
225
|
toolPolicy: baseToolPolicy(
|
|
226
226
|
['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}update_task', '{{MCP_PREFIX}}add_comment'],
|
|
@@ -302,7 +302,7 @@ export const workflowDocs = [
|
|
|
302
302
|
compat: {
|
|
303
303
|
minTaskforceVersion: MIN_VERSION,
|
|
304
304
|
requiredToolsCritical: ['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}add_comment'],
|
|
305
|
-
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}
|
|
305
|
+
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}link_task_context', '{{MCP_PREFIX}}save_task_attachment']
|
|
306
306
|
},
|
|
307
307
|
toolPolicy: baseToolPolicy(
|
|
308
308
|
['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}add_comment'],
|
|
@@ -378,7 +378,7 @@ export const workflowDocs = [
|
|
|
378
378
|
compat: {
|
|
379
379
|
minTaskforceVersion: MIN_VERSION,
|
|
380
380
|
requiredToolsCritical: ['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}update_task', '{{MCP_PREFIX}}add_comment'],
|
|
381
|
-
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}
|
|
381
|
+
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}get_config', '{{MCP_PREFIX}}link_task_context', '{{MCP_PREFIX}}save_task_attachment']
|
|
382
382
|
},
|
|
383
383
|
toolPolicy: baseToolPolicy(
|
|
384
384
|
['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}update_task', '{{MCP_PREFIX}}add_comment'],
|
|
@@ -458,7 +458,7 @@ export const workflowDocs = [
|
|
|
458
458
|
compat: {
|
|
459
459
|
minTaskforceVersion: MIN_VERSION,
|
|
460
460
|
requiredToolsCritical: ['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}add_comment'],
|
|
461
|
-
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}
|
|
461
|
+
requiredToolsOptional: ['{{MCP_PREFIX}}list_tasks', '{{MCP_PREFIX}}search_tasks', '{{MCP_PREFIX}}get_task_attachments', '{{MCP_PREFIX}}update_task', '{{MCP_PREFIX}}link_task_context', '{{MCP_PREFIX}}save_task_attachment']
|
|
462
462
|
},
|
|
463
463
|
toolPolicy: baseToolPolicy(
|
|
464
464
|
['{{MCP_PREFIX}}get_task', '{{MCP_PREFIX}}add_comment'],
|
|
@@ -18,7 +18,6 @@ compat:
|
|
|
18
18
|
- "{{MCP_PREFIX}}list_tasks"
|
|
19
19
|
- "{{MCP_PREFIX}}search_tasks"
|
|
20
20
|
- "{{MCP_PREFIX}}get_task_attachments"
|
|
21
|
-
- "{{MCP_PREFIX}}read_task_attachment"
|
|
22
21
|
- "{{MCP_PREFIX}}link_task_context"
|
|
23
22
|
- "{{MCP_PREFIX}}save_task_attachment"
|
|
24
23
|
toolPolicy:
|
|
@@ -50,7 +49,7 @@ contextPolicy:
|
|
|
50
49
|
mcp:
|
|
51
50
|
knownTaskIdTool: "{{MCP_PREFIX}}get_task"
|
|
52
51
|
taskAttachmentListTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
53
|
-
taskAttachmentReadTool: "{{MCP_PREFIX}}
|
|
52
|
+
taskAttachmentReadTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
54
53
|
unknownTaskIdTools:
|
|
55
54
|
- "{{MCP_PREFIX}}list_tasks"
|
|
56
55
|
- "{{MCP_PREFIX}}search_tasks"
|
|
@@ -69,7 +68,7 @@ content:
|
|
|
69
68
|
> 1. **MCP-first load**:
|
|
70
69
|
> - If task ID is known, call `{{MCP_PREFIX}}get_task`.
|
|
71
70
|
> - If task ID is unknown, use `{{MCP_PREFIX}}list_tasks` / `{{MCP_PREFIX}}search_tasks` to identify it.
|
|
72
|
-
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments
|
|
71
|
+
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments`; pass `attachmentId` to that same tool when you need one attachment body or download reference.
|
|
73
72
|
> - Do not try to open task attachment HTTP paths directly when MCP attachment-read tools are available.
|
|
74
73
|
> - If MCP is unavailable, stop and request user action.
|
|
75
74
|
> 2. Print `prompts.startupChecklist`.
|
|
@@ -24,7 +24,6 @@ compat:
|
|
|
24
24
|
- "{{MCP_PREFIX}}list_tasks"
|
|
25
25
|
- "{{MCP_PREFIX}}search_tasks"
|
|
26
26
|
- "{{MCP_PREFIX}}get_task_attachments"
|
|
27
|
-
- "{{MCP_PREFIX}}read_task_attachment"
|
|
28
27
|
- "{{MCP_PREFIX}}link_task_context"
|
|
29
28
|
- "{{MCP_PREFIX}}save_task_attachment"
|
|
30
29
|
toolPolicy:
|
|
@@ -48,7 +47,7 @@ contextPolicy:
|
|
|
48
47
|
mcp:
|
|
49
48
|
knownTaskIdTool: "{{MCP_PREFIX}}get_task"
|
|
50
49
|
taskAttachmentListTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
51
|
-
taskAttachmentReadTool: "{{MCP_PREFIX}}
|
|
50
|
+
taskAttachmentReadTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
52
51
|
unknownTaskIdTools:
|
|
53
52
|
- "{{MCP_PREFIX}}list_tasks"
|
|
54
53
|
- "{{MCP_PREFIX}}search_tasks"
|
|
@@ -68,7 +67,7 @@ content:
|
|
|
68
67
|
> 1. **MCP-first load**:
|
|
69
68
|
> - If task ID is known, call `{{MCP_PREFIX}}get_task`.
|
|
70
69
|
> - If task ID is unknown, use `{{MCP_PREFIX}}list_tasks` / `{{MCP_PREFIX}}search_tasks` to identify it.
|
|
71
|
-
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments
|
|
70
|
+
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments`; pass `attachmentId` to that same tool when you need one attachment body or download reference.
|
|
72
71
|
> - Do not try to open task attachment HTTP paths directly when MCP attachment-read tools are available.
|
|
73
72
|
> - If MCP is unavailable, stop and request user action.
|
|
74
73
|
> 2. Print `prompts.startupChecklist`.
|
|
@@ -19,7 +19,6 @@ compat:
|
|
|
19
19
|
- "{{MCP_PREFIX}}list_tasks"
|
|
20
20
|
- "{{MCP_PREFIX}}search_tasks"
|
|
21
21
|
- "{{MCP_PREFIX}}get_task_attachments"
|
|
22
|
-
- "{{MCP_PREFIX}}read_task_attachment"
|
|
23
22
|
- "{{MCP_PREFIX}}get_config"
|
|
24
23
|
- "{{MCP_PREFIX}}link_task_context"
|
|
25
24
|
- "{{MCP_PREFIX}}save_task_attachment"
|
|
@@ -53,7 +52,7 @@ contextPolicy:
|
|
|
53
52
|
mcp:
|
|
54
53
|
knownTaskIdTool: "{{MCP_PREFIX}}get_task"
|
|
55
54
|
taskAttachmentListTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
56
|
-
taskAttachmentReadTool: "{{MCP_PREFIX}}
|
|
55
|
+
taskAttachmentReadTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
57
56
|
unknownTaskIdTools:
|
|
58
57
|
- "{{MCP_PREFIX}}list_tasks"
|
|
59
58
|
- "{{MCP_PREFIX}}search_tasks"
|
|
@@ -72,7 +71,7 @@ content:
|
|
|
72
71
|
> 1. **MCP-first load**:
|
|
73
72
|
> - If task ID is known, call `{{MCP_PREFIX}}get_task`.
|
|
74
73
|
> - If task ID is unknown, use `{{MCP_PREFIX}}list_tasks` / `{{MCP_PREFIX}}search_tasks` to identify it.
|
|
75
|
-
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments
|
|
74
|
+
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments`; pass `attachmentId` to that same tool when you need one attachment body or download reference.
|
|
76
75
|
> - Do not try to open task attachment HTTP paths directly when MCP attachment-read tools are available.
|
|
77
76
|
> - If MCP is unavailable, stop and request user action.
|
|
78
77
|
> 2. Print `prompts.startupChecklist`.
|
|
@@ -23,7 +23,6 @@ compat:
|
|
|
23
23
|
- "{{MCP_PREFIX}}list_tasks"
|
|
24
24
|
- "{{MCP_PREFIX}}search_tasks"
|
|
25
25
|
- "{{MCP_PREFIX}}get_task_attachments"
|
|
26
|
-
- "{{MCP_PREFIX}}read_task_attachment"
|
|
27
26
|
- "{{MCP_PREFIX}}get_config"
|
|
28
27
|
- "{{MCP_PREFIX}}create_task"
|
|
29
28
|
- "{{MCP_PREFIX}}link_task_context"
|
|
@@ -58,7 +57,7 @@ contextPolicy:
|
|
|
58
57
|
mcp:
|
|
59
58
|
knownTaskIdTool: "{{MCP_PREFIX}}get_task"
|
|
60
59
|
taskAttachmentListTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
61
|
-
taskAttachmentReadTool: "{{MCP_PREFIX}}
|
|
60
|
+
taskAttachmentReadTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
62
61
|
unknownTaskIdTools:
|
|
63
62
|
- "{{MCP_PREFIX}}list_tasks"
|
|
64
63
|
- "{{MCP_PREFIX}}search_tasks"
|
|
@@ -73,7 +72,7 @@ prompts:
|
|
|
73
72
|
- [ ] Used `done` when no explicit human validation was requested, or `review` when human validation/approval was needed
|
|
74
73
|
- [ ] Summary comment added with `{{MCP_PREFIX}}add_comment`
|
|
75
74
|
- [ ] `walkthrough.md` updated
|
|
76
|
-
- [ ]
|
|
75
|
+
- [ ] Planning relationships changed only when explicitly requested
|
|
77
76
|
- [ ] Did NOT call `{{MCP_PREFIX}}archive_task`
|
|
78
77
|
- [ ] Did NOT set `cancelled` unless explicitly instructed
|
|
79
78
|
content:
|
|
@@ -84,7 +83,7 @@ content:
|
|
|
84
83
|
> 1. **MCP-first load**:
|
|
85
84
|
> - If task ID is known, call `{{MCP_PREFIX}}get_task`.
|
|
86
85
|
> - If task ID is unknown, use `{{MCP_PREFIX}}list_tasks` / `{{MCP_PREFIX}}search_tasks` to identify it.
|
|
87
|
-
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments
|
|
86
|
+
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments`; pass `attachmentId` to that same tool when you need one attachment body or download reference.
|
|
88
87
|
> - Do not try to open task attachment HTTP paths directly when MCP attachment-read tools are available.
|
|
89
88
|
> - If MCP is unavailable, stop and request user action.
|
|
90
89
|
> 2. Print `prompts.startupChecklist`.
|
|
@@ -108,14 +107,14 @@ content:
|
|
|
108
107
|
- If task complexity is `3` to `5`, create or refresh `implementation_plan.md` before major code edits.
|
|
109
108
|
- If complexity is below `3`, planning is optional.
|
|
110
109
|
2. **Task management mode gate (required before task mutations)**:
|
|
111
|
-
- Choose
|
|
112
|
-
- Default to
|
|
113
|
-
- Use
|
|
110
|
+
- Choose exactly one mode and state it explicitly: `checklist_mode` or `planning_mode`.
|
|
111
|
+
- Default to `checklist_mode` for linear/short execution.
|
|
112
|
+
- Use `planning_mode` only when at least one is true:
|
|
114
113
|
- multi-system or multi-owner work
|
|
115
114
|
- meaningful parallelization
|
|
116
115
|
- expected duration > 1 day
|
|
117
116
|
- explicit dependency/risk tracking is needed
|
|
118
|
-
- user explicitly asks for
|
|
117
|
+
- user explicitly asks for more structural planning context
|
|
119
118
|
3. **Identity + owner strategy gate (required before task creation/update)**:
|
|
120
119
|
- Call `{{MCP_PREFIX}}resolve_profile` before creating tasks, assigning tasks, or adding agent-authored comments.
|
|
121
120
|
- Stateless client pattern: call `{{MCP_PREFIX}}resolve_profile`, save the returned `profileToken`, and include `profileToken` on later mutating calls if the client does not preserve session state.
|
|
@@ -124,7 +123,7 @@ content:
|
|
|
124
123
|
- Never use generic owner values like `agent` or `user`.
|
|
125
124
|
- If unclear who should own the work, set `owner=unassigned` and add a clarification note.
|
|
126
125
|
4. **Preflight confirmation gate (required before creating multiple tasks)**:
|
|
127
|
-
- Confirm
|
|
126
|
+
- Confirm mode: `checklist_mode` vs `planning_mode`.
|
|
128
127
|
- Confirm owner default: a concrete assignee ID, `unassigned`, or a mixed plan with explicit IDs.
|
|
129
128
|
- Confirm whether assignment should be set immediately.
|
|
130
129
|
5. **Config gate**:
|
|
@@ -136,12 +135,10 @@ content:
|
|
|
136
135
|
### Phase B: Execution
|
|
137
136
|
1. Implement code changes.
|
|
138
137
|
2. Run validation steps (automated tests + manual checks as needed).
|
|
139
|
-
3. If user requests relationship work:
|
|
140
|
-
- Link/unlink
|
|
141
|
-
- Link/unlink
|
|
142
|
-
-
|
|
143
|
-
- Every newly created task must include explicit `owner`/`assignee` using a concrete assignee ID or `unassigned`.
|
|
144
|
-
- Change planning relationships only after explicit user confirmation.
|
|
138
|
+
3. If user requests planning relationship work:
|
|
139
|
+
- Link/unlink a task to a workstream using `{{MCP_PREFIX}}update_task_workstream`.
|
|
140
|
+
- Link/unlink a workstream to an initiative using `{{MCP_PREFIX}}update_workstream_initiative`.
|
|
141
|
+
- Create new tasks/workstreams/initiatives only when they materially improve execution clarity.
|
|
145
142
|
4. If blocked, switch to Collaborate mode and capture blocker context.
|
|
146
143
|
|
|
147
144
|
### Phase C: Handover
|
|
@@ -19,7 +19,6 @@ compat:
|
|
|
19
19
|
- "{{MCP_PREFIX}}list_tasks"
|
|
20
20
|
- "{{MCP_PREFIX}}search_tasks"
|
|
21
21
|
- "{{MCP_PREFIX}}get_task_attachments"
|
|
22
|
-
- "{{MCP_PREFIX}}read_task_attachment"
|
|
23
22
|
- "{{MCP_PREFIX}}get_config"
|
|
24
23
|
- "{{MCP_PREFIX}}link_task_context"
|
|
25
24
|
- "{{MCP_PREFIX}}save_task_attachment"
|
|
@@ -53,7 +52,7 @@ contextPolicy:
|
|
|
53
52
|
mcp:
|
|
54
53
|
knownTaskIdTool: "{{MCP_PREFIX}}get_task"
|
|
55
54
|
taskAttachmentListTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
56
|
-
taskAttachmentReadTool: "{{MCP_PREFIX}}
|
|
55
|
+
taskAttachmentReadTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
57
56
|
unknownTaskIdTools:
|
|
58
57
|
- "{{MCP_PREFIX}}list_tasks"
|
|
59
58
|
- "{{MCP_PREFIX}}search_tasks"
|
|
@@ -73,7 +72,7 @@ content:
|
|
|
73
72
|
> 1. **MCP-first load**:
|
|
74
73
|
> - If task ID is known, call `{{MCP_PREFIX}}get_task`.
|
|
75
74
|
> - If task ID is unknown, use `{{MCP_PREFIX}}list_tasks` / `{{MCP_PREFIX}}search_tasks` to identify it.
|
|
76
|
-
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments
|
|
75
|
+
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments`; pass `attachmentId` to that same tool when you need one attachment body or download reference.
|
|
77
76
|
> - Do not try to open task attachment HTTP paths directly when MCP attachment-read tools are available.
|
|
78
77
|
> - If MCP is unavailable, stop and request user action.
|
|
79
78
|
> 2. Print `prompts.startupChecklist`.
|
|
@@ -94,7 +93,7 @@ content:
|
|
|
94
93
|
|
|
95
94
|
0. Choose and record task management mode for follow-on execution:
|
|
96
95
|
- `checklist_mode` (single task + in-task checklist) for linear short work.
|
|
97
|
-
- `planning_mode` (
|
|
96
|
+
- `planning_mode` (tasks grouped into workstreams/initiatives) only when structure improves clarity, dependencies, or ownership.
|
|
98
97
|
- Record owner strategy as explicit assignee IDs, `unassigned`, or a mixed plan with explicit IDs.
|
|
99
98
|
|
|
100
99
|
1. Define file-level change plan (exact files and intended changes).
|
|
@@ -18,7 +18,6 @@ compat:
|
|
|
18
18
|
- "{{MCP_PREFIX}}list_tasks"
|
|
19
19
|
- "{{MCP_PREFIX}}search_tasks"
|
|
20
20
|
- "{{MCP_PREFIX}}get_task_attachments"
|
|
21
|
-
- "{{MCP_PREFIX}}read_task_attachment"
|
|
22
21
|
- "{{MCP_PREFIX}}update_task"
|
|
23
22
|
- "{{MCP_PREFIX}}link_task_context"
|
|
24
23
|
- "{{MCP_PREFIX}}save_task_attachment"
|
|
@@ -51,7 +50,7 @@ contextPolicy:
|
|
|
51
50
|
mcp:
|
|
52
51
|
knownTaskIdTool: "{{MCP_PREFIX}}get_task"
|
|
53
52
|
taskAttachmentListTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
54
|
-
taskAttachmentReadTool: "{{MCP_PREFIX}}
|
|
53
|
+
taskAttachmentReadTool: "{{MCP_PREFIX}}get_task_attachments"
|
|
55
54
|
unknownTaskIdTools:
|
|
56
55
|
- "{{MCP_PREFIX}}list_tasks"
|
|
57
56
|
- "{{MCP_PREFIX}}search_tasks"
|
|
@@ -70,7 +69,7 @@ content:
|
|
|
70
69
|
> 1. **MCP-first load**:
|
|
71
70
|
> - If task ID is known, call `{{MCP_PREFIX}}get_task`.
|
|
72
71
|
> - If task ID is unknown, use `{{MCP_PREFIX}}list_tasks` / `{{MCP_PREFIX}}search_tasks` to identify it.
|
|
73
|
-
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments
|
|
72
|
+
> - If task attachments may matter, call `{{MCP_PREFIX}}get_task_attachments`; pass `attachmentId` to that same tool when you need one attachment body or download reference.
|
|
74
73
|
> - Do not try to open task attachment HTTP paths directly when MCP attachment-read tools are available.
|
|
75
74
|
> - If MCP is unavailable, stop and request user action.
|
|
76
75
|
> 2. Print `prompts.startupChecklist`.
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* GET /api/taskforce/admin/collaboration-telemetry
|
|
22
22
|
* PATCH /api/taskforce/admin/system-users/:id/disable
|
|
23
23
|
* PATCH /api/taskforce/admin/system-users/:id/beta-access
|
|
24
|
+
* PATCH /api/taskforce/admin/system-users/:id/verify-email
|
|
24
25
|
* GET/POST /api/taskforce/admin/email-settings
|
|
25
26
|
* GET /api/taskforce/admin/email-settings/health
|
|
26
27
|
* POST /api/taskforce/admin/email-settings/test
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* GET /api/taskforce/admin/collaboration-telemetry
|
|
22
22
|
* PATCH /api/taskforce/admin/system-users/:id/disable
|
|
23
23
|
* PATCH /api/taskforce/admin/system-users/:id/beta-access
|
|
24
|
+
* PATCH /api/taskforce/admin/system-users/:id/verify-email
|
|
24
25
|
* GET/POST /api/taskforce/admin/email-settings
|
|
25
26
|
* GET /api/taskforce/admin/email-settings/health
|
|
26
27
|
* POST /api/taskforce/admin/email-settings/test
|
|
@@ -74,7 +75,7 @@ import { buildAuthBehavior, buildSiteBehavior, getRouteEmailConfig, resolvePubli
|
|
|
74
75
|
import { applyWorkspaceRepair, scanWorkspaceRepair } from '../../sync/workspaceRepair.js';
|
|
75
76
|
import { testMintAppleClientSecret } from '../auth/providers/appleClientSecret.js';
|
|
76
77
|
const PRICING_PAGE_DESCRIPTION_MAX_LENGTH = 2000;
|
|
77
|
-
const OPENAI_APPS_CHALLENGE_TOKEN = 'o9iBeJDuKPMtnKm5-
|
|
78
|
+
const OPENAI_APPS_CHALLENGE_TOKEN = 'o9iBeJDuKPMtnKm5-B8OROga3bWDkJS6PBIg6JT9Izs';
|
|
78
79
|
// === SECTION: Registration ===
|
|
79
80
|
export function registerAdminRoutes(deps) {
|
|
80
81
|
const { addRoute, core, context, requestWorkspaceId, requestUserId, requestRole, requestHeader, requestRuntimeMode, ensureAppAccess, ensureAdminRole, ensureCloudPlanData, requireCloudRuntime, resolveAuthenticatedUserId, resolveAdminRequestActor, auditAdminAction, resolveEffectiveObjectStorageConfig, getObjectStorageClient, taskAssetStore, normalizeDocumentPathInput, ensureWithinDir, getAssetMetadata, markAssetDeleted, clearAssetDeleted, removeAssetMetadata, getStorageTelemetry, appendStorageTelemetry, getStorageIntegrityHistory, appendStorageIntegrityHistory, getDocumentPurgeHistory, appendDocumentPurgeHistory, getCollaborationTelemetry, isCollaborationPolicyEnabled, normalizeMcpOauthScopeString, MCP_TOKEN_SCOPE_VALUES, MCP_CLOUD_TOOL_SCOPE_REQUIREMENTS, MCP_WRITE_RATE_LIMIT_ENABLED, MCP_WRITE_RATE_LIMIT_ACTOR_MAX_REQUESTS, MCP_WRITE_RATE_LIMIT_WORKSPACE_MAX_REQUESTS, MCP_WRITE_RATE_LIMIT_WINDOW_MS, } = deps;
|
|
@@ -1324,6 +1325,33 @@ export function registerAdminRoutes(deps) {
|
|
|
1324
1325
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
1325
1326
|
res.end(JSON.stringify({ success: true }));
|
|
1326
1327
|
});
|
|
1328
|
+
// PATCH /api/taskforce/admin/system-users/:id/verify-email - Mark a user's email as verified
|
|
1329
|
+
addRoute('PATCH', '/api/taskforce/admin/system-users/:id/verify-email', async (req, res, params) => {
|
|
1330
|
+
if (!ensureAdminRole(req)) {
|
|
1331
|
+
res.writeHead(403, { 'Content-Type': 'application/json' });
|
|
1332
|
+
res.end(JSON.stringify({ error: 'Forbidden: system admin role required.' }));
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
try {
|
|
1336
|
+
const result = core.markUserEmailVerified(params.id);
|
|
1337
|
+
if (!result) {
|
|
1338
|
+
res.writeHead(404, { 'Content-Type': 'application/json' });
|
|
1339
|
+
res.end(JSON.stringify({ error: 'User not found' }));
|
|
1340
|
+
return;
|
|
1341
|
+
}
|
|
1342
|
+
auditAdminAction(req, 'mark-user-email-verified', {
|
|
1343
|
+
targetUserId: params.id,
|
|
1344
|
+
emailVerifiedAt: result.emailVerifiedAt
|
|
1345
|
+
});
|
|
1346
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
1347
|
+
res.end(JSON.stringify({ success: true, emailVerifiedAt: result.emailVerifiedAt }));
|
|
1348
|
+
}
|
|
1349
|
+
catch (error) {
|
|
1350
|
+
const statusCode = resolveErrorStatusCode(error, 400);
|
|
1351
|
+
res.writeHead(statusCode, { 'Content-Type': 'application/json' });
|
|
1352
|
+
res.end(JSON.stringify({ error: String(error?.message || 'Unable to verify user email'), code: error?.code }));
|
|
1353
|
+
}
|
|
1354
|
+
});
|
|
1327
1355
|
// DELETE /api/taskforce/admin/system-users/:id - Purge a test user in non-production cloud environments
|
|
1328
1356
|
addRoute('DELETE', '/api/taskforce/admin/system-users/:id', async (req, res, params) => {
|
|
1329
1357
|
if (!requireCloudRuntime(res, 'System user purge'))
|
|
@@ -12,6 +12,7 @@ const SOFTWARE_DEVELOPMENT_PACK = {
|
|
|
12
12
|
id: 'software-development',
|
|
13
13
|
label: 'Software Development',
|
|
14
14
|
description: 'A software-oriented starter pack with developer-focused work types and a 4-level priority scale.',
|
|
15
|
+
isDefaultStarter: true,
|
|
15
16
|
categories: [
|
|
16
17
|
{ value: 'default', label: 'General', icon: 'Inbox' },
|
|
17
18
|
{ value: 'product', label: 'Product', icon: 'Layers', color: 'blue-500' },
|
|
@@ -37,7 +38,6 @@ const BUILT_IN_LIBRARY_PACKS = [
|
|
|
37
38
|
id: 'general',
|
|
38
39
|
label: 'General',
|
|
39
40
|
description: 'A neutral starter pack for broad project and AI collaboration workflows.',
|
|
40
|
-
isDefaultStarter: true,
|
|
41
41
|
categories: [
|
|
42
42
|
{ value: DEFAULT_CATEGORY_VALUE, label: DEFAULT_CATEGORY_LABEL, icon: 'Inbox' }
|
|
43
43
|
],
|