cowork-os 0.3.21 → 0.3.23
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 +293 -6
- package/connectors/README.md +20 -0
- package/connectors/asana-mcp/README.md +24 -0
- package/connectors/asana-mcp/dist/index.js +427 -0
- package/connectors/asana-mcp/package.json +15 -0
- package/connectors/asana-mcp/src/index.ts +553 -0
- package/connectors/asana-mcp/tsconfig.json +13 -0
- package/connectors/hubspot-mcp/README.md +35 -0
- package/connectors/hubspot-mcp/dist/index.js +454 -0
- package/connectors/hubspot-mcp/package.json +15 -0
- package/connectors/hubspot-mcp/src/index.ts +562 -0
- package/connectors/hubspot-mcp/tsconfig.json +13 -0
- package/connectors/jira-mcp/README.md +49 -0
- package/connectors/jira-mcp/dist/index.js +588 -0
- package/connectors/jira-mcp/package.json +15 -0
- package/connectors/jira-mcp/src/index.ts +711 -0
- package/connectors/jira-mcp/tsconfig.json +13 -0
- package/connectors/linear-mcp/README.md +22 -0
- package/connectors/linear-mcp/dist/index.js +402 -0
- package/connectors/linear-mcp/package.json +15 -0
- package/connectors/linear-mcp/src/index.ts +522 -0
- package/connectors/linear-mcp/tsconfig.json +13 -0
- package/connectors/okta-mcp/README.md +24 -0
- package/connectors/okta-mcp/dist/index.js +411 -0
- package/connectors/okta-mcp/package.json +15 -0
- package/connectors/okta-mcp/src/index.ts +520 -0
- package/connectors/okta-mcp/tsconfig.json +13 -0
- package/connectors/salesforce-mcp/README.md +47 -0
- package/connectors/salesforce-mcp/dist/index.js +584 -0
- package/connectors/salesforce-mcp/package.json +15 -0
- package/connectors/salesforce-mcp/src/index.ts +722 -0
- package/connectors/salesforce-mcp/tsconfig.json +13 -0
- package/connectors/servicenow-mcp/README.md +26 -0
- package/connectors/servicenow-mcp/dist/index.js +400 -0
- package/connectors/servicenow-mcp/package.json +15 -0
- package/connectors/servicenow-mcp/src/index.ts +500 -0
- package/connectors/servicenow-mcp/tsconfig.json +13 -0
- package/connectors/templates/mcp-connector/README.md +31 -0
- package/connectors/templates/mcp-connector/package.json +15 -0
- package/connectors/templates/mcp-connector/src/index.ts +330 -0
- package/connectors/templates/mcp-connector/tsconfig.json +13 -0
- package/connectors/zendesk-mcp/README.md +40 -0
- package/connectors/zendesk-mcp/dist/index.js +431 -0
- package/connectors/zendesk-mcp/package.json +15 -0
- package/connectors/zendesk-mcp/src/index.ts +543 -0
- package/connectors/zendesk-mcp/tsconfig.json +13 -0
- package/dist/electron/electron/agent/daemon.js +25 -0
- package/dist/electron/electron/agent/executor.js +181 -26
- package/dist/electron/electron/agent/llm/anthropic-compatible-provider.js +177 -0
- package/dist/electron/electron/agent/llm/github-copilot-provider.js +97 -0
- package/dist/electron/electron/agent/llm/groq-provider.js +33 -0
- package/dist/electron/electron/agent/llm/index.js +11 -1
- package/dist/electron/electron/agent/llm/kimi-provider.js +33 -0
- package/dist/electron/electron/agent/llm/openai-compatible-provider.js +116 -0
- package/dist/electron/electron/agent/llm/openai-compatible.js +111 -0
- package/dist/electron/electron/agent/llm/openai-oauth.js +2 -1
- package/dist/electron/electron/agent/llm/openrouter-provider.js +1 -1
- package/dist/electron/electron/agent/llm/provider-factory.js +318 -4
- package/dist/electron/electron/agent/llm/types.js +66 -1
- package/dist/electron/electron/agent/llm/xai-provider.js +33 -0
- package/dist/electron/electron/agent/tools/box-tools.js +231 -0
- package/dist/electron/electron/agent/tools/builtin-settings.js +28 -0
- package/dist/electron/electron/agent/tools/dropbox-tools.js +237 -0
- package/dist/electron/electron/agent/tools/google-drive-tools.js +227 -0
- package/dist/electron/electron/agent/tools/notion-tools.js +312 -0
- package/dist/electron/electron/agent/tools/onedrive-tools.js +217 -0
- package/dist/electron/electron/agent/tools/registry.js +541 -0
- package/dist/electron/electron/agent/tools/sharepoint-tools.js +243 -0
- package/dist/electron/electron/agent/tools/shell-tools.js +12 -3
- package/dist/electron/electron/agent/tools/x-tools.js +1 -1
- package/dist/electron/electron/gateway/index.js +1 -0
- package/dist/electron/electron/gateway/router.js +123 -143
- package/dist/electron/electron/ipc/canvas-handlers.js +5 -0
- package/dist/electron/electron/ipc/handlers.js +627 -158
- package/dist/electron/electron/main.js +63 -0
- package/dist/electron/electron/mcp/oauth/connector-oauth.js +333 -0
- package/dist/electron/electron/mcp/registry/MCPRegistryManager.js +503 -154
- package/dist/electron/electron/memory/MemoryService.js +1 -1
- package/dist/electron/electron/preload.js +74 -1
- package/dist/electron/electron/settings/box-manager.js +54 -0
- package/dist/electron/electron/settings/dropbox-manager.js +54 -0
- package/dist/electron/electron/settings/google-drive-manager.js +54 -0
- package/dist/electron/electron/settings/notion-manager.js +56 -0
- package/dist/electron/electron/settings/onedrive-manager.js +54 -0
- package/dist/electron/electron/settings/sharepoint-manager.js +54 -0
- package/dist/electron/electron/utils/box-api.js +153 -0
- package/dist/electron/electron/utils/dropbox-api.js +144 -0
- package/dist/electron/electron/utils/env-migration.js +19 -0
- package/dist/electron/electron/utils/google-drive-api.js +152 -0
- package/dist/electron/electron/utils/notion-api.js +103 -0
- package/dist/electron/electron/utils/onedrive-api.js +113 -0
- package/dist/electron/electron/utils/sharepoint-api.js +109 -0
- package/dist/electron/electron/utils/validation.js +82 -3
- package/dist/electron/electron/utils/x-cli.js +1 -1
- package/dist/electron/shared/channelMessages.js +284 -3
- package/dist/electron/shared/llm-provider-catalog.js +198 -0
- package/dist/electron/shared/types.js +88 -1
- package/package.json +12 -2
- package/src/electron/agent/executor.ts +205 -28
- package/src/electron/agent/llm/anthropic-compatible-provider.ts +214 -0
- package/src/electron/agent/llm/github-copilot-provider.ts +117 -0
- package/src/electron/agent/llm/groq-provider.ts +39 -0
- package/src/electron/agent/llm/index.ts +5 -0
- package/src/electron/agent/llm/kimi-provider.ts +39 -0
- package/src/electron/agent/llm/openai-compatible-provider.ts +153 -0
- package/src/electron/agent/llm/openai-compatible.ts +133 -0
- package/src/electron/agent/llm/openai-oauth.ts +2 -1
- package/src/electron/agent/llm/openrouter-provider.ts +2 -1
- package/src/electron/agent/llm/provider-factory.ts +414 -6
- package/src/electron/agent/llm/types.ts +90 -1
- package/src/electron/agent/llm/xai-provider.ts +39 -0
- package/src/electron/agent/tools/box-tools.ts +239 -0
- package/src/electron/agent/tools/builtin-settings.ts +34 -0
- package/src/electron/agent/tools/dropbox-tools.ts +237 -0
- package/src/electron/agent/tools/google-drive-tools.ts +228 -0
- package/src/electron/agent/tools/notion-tools.ts +330 -0
- package/src/electron/agent/tools/onedrive-tools.ts +217 -0
- package/src/electron/agent/tools/registry.ts +565 -0
- package/src/electron/agent/tools/sharepoint-tools.ts +247 -0
- package/src/electron/agent/tools/shell-tools.ts +11 -3
- package/src/electron/agent/tools/x-tools.ts +1 -1
- package/src/electron/database/SecureSettingsRepository.ts +7 -1
- package/src/electron/gateway/index.ts +1 -0
- package/src/electron/gateway/router.ts +134 -149
- package/src/electron/ipc/canvas-handlers.ts +10 -0
- package/src/electron/ipc/handlers.ts +673 -153
- package/src/electron/main.ts +35 -0
- package/src/electron/mcp/oauth/connector-oauth.ts +448 -0
- package/src/electron/mcp/registry/MCPRegistryManager.ts +343 -12
- package/src/electron/memory/MemoryService.ts +5 -1
- package/src/electron/preload.ts +167 -4
- package/src/electron/settings/box-manager.ts +58 -0
- package/src/electron/settings/dropbox-manager.ts +58 -0
- package/src/electron/settings/google-drive-manager.ts +58 -0
- package/src/electron/settings/notion-manager.ts +60 -0
- package/src/electron/settings/onedrive-manager.ts +58 -0
- package/src/electron/settings/sharepoint-manager.ts +58 -0
- package/src/electron/utils/box-api.ts +184 -0
- package/src/electron/utils/dropbox-api.ts +171 -0
- package/src/electron/utils/env-migration.ts +22 -0
- package/src/electron/utils/google-drive-api.ts +183 -0
- package/src/electron/utils/notion-api.ts +126 -0
- package/src/electron/utils/onedrive-api.ts +137 -0
- package/src/electron/utils/sharepoint-api.ts +132 -0
- package/src/electron/utils/validation.ts +102 -1
- package/src/electron/utils/x-cli.ts +1 -1
- package/src/renderer/App.tsx +20 -2
- package/src/renderer/components/BoxSettings.tsx +203 -0
- package/src/renderer/components/BrowserView.tsx +101 -0
- package/src/renderer/components/BuiltinToolsSettings.tsx +105 -0
- package/src/renderer/components/CanvasPreview.tsx +68 -1
- package/src/renderer/components/ConnectorEnvModal.tsx +116 -0
- package/src/renderer/components/ConnectorSetupModal.tsx +566 -0
- package/src/renderer/components/ConnectorsSettings.tsx +397 -0
- package/src/renderer/components/DropboxSettings.tsx +202 -0
- package/src/renderer/components/GoogleDriveSettings.tsx +201 -0
- package/src/renderer/components/MCPSettings.tsx +56 -0
- package/src/renderer/components/MainContent.tsx +270 -34
- package/src/renderer/components/NotionSettings.tsx +231 -0
- package/src/renderer/components/Onboarding/Onboarding.tsx +13 -1
- package/src/renderer/components/OnboardingModal.tsx +70 -1
- package/src/renderer/components/OneDriveSettings.tsx +212 -0
- package/src/renderer/components/Settings.tsx +611 -8
- package/src/renderer/components/SharePointSettings.tsx +224 -0
- package/src/renderer/components/Sidebar.tsx +25 -9
- package/src/renderer/hooks/useOnboardingFlow.ts +21 -0
- package/src/renderer/styles/index.css +438 -25
- package/src/shared/channelMessages.ts +367 -4
- package/src/shared/llm-provider-catalog.ts +217 -0
- package/src/shared/types.ts +226 -1
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Provides type-safe validation to prevent malformed input attacks
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
exports.HookMappingSchema = exports.HookMappingChannelSchema = void 0;
|
|
7
|
+
exports.UpdateChannelSchema = exports.ChannelConfigSchema = exports.AddChannelSchema = exports.AddEmailChannelSchema = exports.AddBlueBubblesChannelSchema = exports.AddLineChannelSchema = exports.AddTwitchChannelSchema = exports.AddMatrixChannelSchema = exports.AddMattermostChannelSchema = exports.AddSignalChannelSchema = exports.AddImessageChannelSchema = exports.SignalTrustModeSchema = exports.SignalModeSchema = exports.GroupPolicySchema = exports.DmPolicySchema = exports.AddWhatsAppChannelSchema = exports.AddSlackChannelSchema = exports.AddDiscordChannelSchema = exports.AddTelegramChannelSchema = exports.SecurityModeSchema = exports.GuardrailSettingsSchema = exports.SharePointSettingsSchema = exports.DropboxSettingsSchema = exports.GoogleDriveSettingsSchema = exports.OneDriveSettingsSchema = exports.BoxSettingsSchema = exports.NotionSettingsSchema = exports.XSettingsSchema = exports.SearchSettingsSchema = exports.SearchProviderTypeSchema = exports.LLMSettingsSchema = exports.CustomProvidersSchema = exports.CustomProviderConfigSchema = exports.KimiSettingsSchema = exports.XAISettingsSchema = exports.GroqSettingsSchema = exports.OpenAISettingsSchema = exports.OpenRouterSettingsSchema = exports.GeminiSettingsSchema = exports.OllamaSettingsSchema = exports.BedrockSettingsSchema = exports.AnthropicSettingsSchema = exports.LLMProviderTypeSchema = exports.ApprovalResponseSchema = exports.FileImportSchema = exports.TaskMessageSchema = exports.TaskRenameSchema = exports.TaskCreateSchema = exports.SuccessCriteriaSchema = exports.WorkspaceCreateSchema = void 0;
|
|
8
|
+
exports.HookMappingSchema = exports.HookMappingChannelSchema = exports.MCPConnectorOAuthSchema = exports.MCPRegistrySearchSchema = exports.MCPSettingsSchema = exports.MCPServerUpdateSchema = exports.MCPServerConfigSchema = exports.MCPAuthConfigSchema = exports.MCPTransportTypeSchema = exports.StringIdSchema = exports.UUIDSchema = exports.FilePathSchema = exports.GeneratePairingSchema = exports.RevokeAccessSchema = exports.GrantAccessSchema = void 0;
|
|
9
9
|
exports.validateInput = validateInput;
|
|
10
10
|
const zod_1 = require("zod");
|
|
11
|
+
const types_1 = require("../../shared/types");
|
|
11
12
|
// Common validation patterns
|
|
12
13
|
const MAX_STRING_LENGTH = 10000;
|
|
13
14
|
const MAX_PATH_LENGTH = 4096;
|
|
@@ -54,13 +55,17 @@ exports.TaskMessageSchema = zod_1.z.object({
|
|
|
54
55
|
taskId: zod_1.z.string().uuid(),
|
|
55
56
|
message: zod_1.z.string().min(1).max(MAX_PROMPT_LENGTH),
|
|
56
57
|
});
|
|
58
|
+
exports.FileImportSchema = zod_1.z.object({
|
|
59
|
+
workspaceId: zod_1.z.string().refine((val) => val === TEMP_WORKSPACE_ID || zod_1.z.string().uuid().safeParse(val).success, { message: 'Must be a valid UUID or temp workspace ID' }),
|
|
60
|
+
files: zod_1.z.array(zod_1.z.string().min(1).max(MAX_PATH_LENGTH)).min(1).max(20),
|
|
61
|
+
});
|
|
57
62
|
// ============ Approval Schemas ============
|
|
58
63
|
exports.ApprovalResponseSchema = zod_1.z.object({
|
|
59
64
|
approvalId: zod_1.z.string().uuid(),
|
|
60
65
|
approved: zod_1.z.boolean(),
|
|
61
66
|
});
|
|
62
67
|
// ============ LLM Settings Schemas ============
|
|
63
|
-
exports.LLMProviderTypeSchema = zod_1.z.enum(
|
|
68
|
+
exports.LLMProviderTypeSchema = zod_1.z.enum(types_1.LLM_PROVIDER_TYPES);
|
|
64
69
|
exports.AnthropicSettingsSchema = zod_1.z.object({
|
|
65
70
|
apiKey: zod_1.z.string().max(500).optional(),
|
|
66
71
|
}).optional();
|
|
@@ -85,6 +90,7 @@ exports.GeminiSettingsSchema = zod_1.z.object({
|
|
|
85
90
|
exports.OpenRouterSettingsSchema = zod_1.z.object({
|
|
86
91
|
apiKey: zod_1.z.string().max(500).optional(),
|
|
87
92
|
model: zod_1.z.string().max(200).optional(),
|
|
93
|
+
baseUrl: zod_1.z.string().max(500).optional(),
|
|
88
94
|
}).optional();
|
|
89
95
|
exports.OpenAISettingsSchema = zod_1.z.object({
|
|
90
96
|
apiKey: zod_1.z.string().max(500).optional(),
|
|
@@ -95,6 +101,27 @@ exports.OpenAISettingsSchema = zod_1.z.object({
|
|
|
95
101
|
tokenExpiresAt: zod_1.z.number().optional(),
|
|
96
102
|
authMethod: zod_1.z.enum(['api_key', 'oauth']).optional(),
|
|
97
103
|
}).optional();
|
|
104
|
+
exports.GroqSettingsSchema = zod_1.z.object({
|
|
105
|
+
apiKey: zod_1.z.string().max(500).optional(),
|
|
106
|
+
model: zod_1.z.string().max(200).optional(),
|
|
107
|
+
baseUrl: zod_1.z.string().max(500).optional(),
|
|
108
|
+
}).optional();
|
|
109
|
+
exports.XAISettingsSchema = zod_1.z.object({
|
|
110
|
+
apiKey: zod_1.z.string().max(500).optional(),
|
|
111
|
+
model: zod_1.z.string().max(200).optional(),
|
|
112
|
+
baseUrl: zod_1.z.string().max(500).optional(),
|
|
113
|
+
}).optional();
|
|
114
|
+
exports.KimiSettingsSchema = zod_1.z.object({
|
|
115
|
+
apiKey: zod_1.z.string().max(500).optional(),
|
|
116
|
+
model: zod_1.z.string().max(200).optional(),
|
|
117
|
+
baseUrl: zod_1.z.string().max(500).optional(),
|
|
118
|
+
}).optional();
|
|
119
|
+
exports.CustomProviderConfigSchema = zod_1.z.object({
|
|
120
|
+
apiKey: zod_1.z.string().max(500).optional(),
|
|
121
|
+
model: zod_1.z.string().max(200).optional(),
|
|
122
|
+
baseUrl: zod_1.z.string().max(500).optional(),
|
|
123
|
+
});
|
|
124
|
+
exports.CustomProvidersSchema = zod_1.z.record(zod_1.z.string(), exports.CustomProviderConfigSchema).optional();
|
|
98
125
|
exports.LLMSettingsSchema = zod_1.z.object({
|
|
99
126
|
providerType: exports.LLMProviderTypeSchema,
|
|
100
127
|
modelKey: zod_1.z.string().max(200),
|
|
@@ -104,6 +131,10 @@ exports.LLMSettingsSchema = zod_1.z.object({
|
|
|
104
131
|
gemini: exports.GeminiSettingsSchema,
|
|
105
132
|
openrouter: exports.OpenRouterSettingsSchema,
|
|
106
133
|
openai: exports.OpenAISettingsSchema,
|
|
134
|
+
groq: exports.GroqSettingsSchema,
|
|
135
|
+
xai: exports.XAISettingsSchema,
|
|
136
|
+
kimi: exports.KimiSettingsSchema,
|
|
137
|
+
customProviders: exports.CustomProvidersSchema,
|
|
107
138
|
});
|
|
108
139
|
// ============ Search Settings Schemas ============
|
|
109
140
|
exports.SearchProviderTypeSchema = zod_1.z.enum(['tavily', 'brave', 'serpapi', 'google']).nullable();
|
|
@@ -138,6 +169,46 @@ exports.XSettingsSchema = zod_1.z.object({
|
|
|
138
169
|
cookieTimeoutMs: zod_1.z.number().int().min(1000).max(120000).optional(),
|
|
139
170
|
quoteDepth: zod_1.z.number().int().min(0).max(5).optional(),
|
|
140
171
|
});
|
|
172
|
+
// ============ Notion Settings Schema ============
|
|
173
|
+
exports.NotionSettingsSchema = zod_1.z.object({
|
|
174
|
+
enabled: zod_1.z.boolean().default(false),
|
|
175
|
+
apiKey: zod_1.z.string().max(2000).optional(),
|
|
176
|
+
notionVersion: zod_1.z.string().max(50).optional(),
|
|
177
|
+
timeoutMs: zod_1.z.number().int().min(1000).max(120000).optional(),
|
|
178
|
+
});
|
|
179
|
+
// ============ Box Settings Schema ============
|
|
180
|
+
exports.BoxSettingsSchema = zod_1.z.object({
|
|
181
|
+
enabled: zod_1.z.boolean().default(false),
|
|
182
|
+
accessToken: zod_1.z.string().max(4000).optional(),
|
|
183
|
+
timeoutMs: zod_1.z.number().int().min(1000).max(120000).optional(),
|
|
184
|
+
});
|
|
185
|
+
// ============ OneDrive Settings Schema ============
|
|
186
|
+
exports.OneDriveSettingsSchema = zod_1.z.object({
|
|
187
|
+
enabled: zod_1.z.boolean().default(false),
|
|
188
|
+
accessToken: zod_1.z.string().max(4000).optional(),
|
|
189
|
+
driveId: zod_1.z.string().max(200).optional(),
|
|
190
|
+
timeoutMs: zod_1.z.number().int().min(1000).max(120000).optional(),
|
|
191
|
+
});
|
|
192
|
+
// ============ Google Drive Settings Schema ============
|
|
193
|
+
exports.GoogleDriveSettingsSchema = zod_1.z.object({
|
|
194
|
+
enabled: zod_1.z.boolean().default(false),
|
|
195
|
+
accessToken: zod_1.z.string().max(4000).optional(),
|
|
196
|
+
timeoutMs: zod_1.z.number().int().min(1000).max(120000).optional(),
|
|
197
|
+
});
|
|
198
|
+
// ============ Dropbox Settings Schema ============
|
|
199
|
+
exports.DropboxSettingsSchema = zod_1.z.object({
|
|
200
|
+
enabled: zod_1.z.boolean().default(false),
|
|
201
|
+
accessToken: zod_1.z.string().max(4000).optional(),
|
|
202
|
+
timeoutMs: zod_1.z.number().int().min(1000).max(120000).optional(),
|
|
203
|
+
});
|
|
204
|
+
// ============ SharePoint Settings Schema ============
|
|
205
|
+
exports.SharePointSettingsSchema = zod_1.z.object({
|
|
206
|
+
enabled: zod_1.z.boolean().default(false),
|
|
207
|
+
accessToken: zod_1.z.string().max(4000).optional(),
|
|
208
|
+
siteId: zod_1.z.string().max(500).optional(),
|
|
209
|
+
driveId: zod_1.z.string().max(500).optional(),
|
|
210
|
+
timeoutMs: zod_1.z.number().int().min(1000).max(120000).optional(),
|
|
211
|
+
});
|
|
141
212
|
// ============ Guardrail Settings Schema ============
|
|
142
213
|
exports.GuardrailSettingsSchema = zod_1.z.object({
|
|
143
214
|
// Token budget
|
|
@@ -381,6 +452,14 @@ exports.MCPRegistrySearchSchema = zod_1.z.object({
|
|
|
381
452
|
limit: zod_1.z.number().int().min(1).max(100).default(50),
|
|
382
453
|
offset: zod_1.z.number().int().min(0).default(0),
|
|
383
454
|
});
|
|
455
|
+
exports.MCPConnectorOAuthSchema = zod_1.z.object({
|
|
456
|
+
provider: zod_1.z.enum(['salesforce', 'jira', 'hubspot', 'zendesk']),
|
|
457
|
+
clientId: zod_1.z.string().min(1).max(500),
|
|
458
|
+
clientSecret: zod_1.z.string().max(500).optional(),
|
|
459
|
+
scopes: zod_1.z.array(zod_1.z.string().max(200)).max(50).optional(),
|
|
460
|
+
loginUrl: zod_1.z.string().url().max(500).optional(),
|
|
461
|
+
subdomain: zod_1.z.string().max(200).optional(),
|
|
462
|
+
});
|
|
384
463
|
// ============ Hooks (Webhooks) Schemas ============
|
|
385
464
|
exports.HookMappingChannelSchema = zod_1.z.enum(['telegram', 'discord', 'slack', 'whatsapp', 'imessage', 'signal', 'mattermost', 'matrix', 'twitch', 'line', 'bluebubbles', 'email', 'last']);
|
|
386
465
|
exports.HookMappingSchema = zod_1.z.object({
|
|
@@ -47,7 +47,7 @@ function buildGlobalArgs(settings, json) {
|
|
|
47
47
|
const args = [];
|
|
48
48
|
if (settings.authMethod === 'manual') {
|
|
49
49
|
if (!settings.authToken || !settings.ct0) {
|
|
50
|
-
throw new Error('Missing auth_token or ct0. Add them in Settings >
|
|
50
|
+
throw new Error('Missing auth_token or ct0. Add them in Settings > X (Twitter).');
|
|
51
51
|
}
|
|
52
52
|
args.push('--auth-token', settings.authToken, '--ct0', settings.ct0);
|
|
53
53
|
}
|
|
@@ -10,7 +10,256 @@
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.DEFAULT_CHANNEL_CONTEXT = void 0;
|
|
12
12
|
exports.getChannelMessage = getChannelMessage;
|
|
13
|
+
exports.getChannelUiCopy = getChannelUiCopy;
|
|
13
14
|
exports.getCompletionMessage = getCompletionMessage;
|
|
15
|
+
const CHANNEL_UI_COPY = {
|
|
16
|
+
welcomeStandard: '👋 Welcome to CoWork! Send me a task whenever you are ready.',
|
|
17
|
+
welcomeBack: '👋 Welcome back!\n\nWorkspace: *{workspaceName}*\n\nSend me what you want to do.\n\nType /help for commands.',
|
|
18
|
+
welcomeNoWorkspace: '👋 Welcome to CoWork!\n\nFirst, add a workspace:\n`/addworkspace /path/to/project`\n\nOr add one from the desktop app.',
|
|
19
|
+
welcomeSingleWorkspace: '👋 Welcome to CoWork!\n\n✅ Workspace: *{workspaceName}*\n\nTell me what you want to do.\n\nExamples:\n• "Add dark mode support"\n• "Fix the login bug"\n• "Create a new API endpoint"',
|
|
20
|
+
welcomeSelectWorkspace: '👋 Welcome to CoWork!\n\nSelect a workspace to start:\n\n{workspaceList}\nReply with a number (e.g., `1`)',
|
|
21
|
+
workspaceSelected: '✅ *{workspaceName}* selected!',
|
|
22
|
+
workspaceSelectedExample: 'You can now send tasks.\n\nExample: "Create a new React component called Button"',
|
|
23
|
+
unauthorized: '⚠️ You are not authorized to use this bot. Please contact the administrator.',
|
|
24
|
+
pairingRequired: '🔐 Please enter your pairing code to get started.',
|
|
25
|
+
pairingPrompt: '🔐 Please provide a pairing code.\n\nUsage: `/pair <code>`',
|
|
26
|
+
pairingSuccess: '✅ Pairing successful! You can now use the bot.',
|
|
27
|
+
pairingFailed: '❌ {error}',
|
|
28
|
+
unknownCommand: 'Unknown command: {command}\n\nUse /help to see available commands.',
|
|
29
|
+
statusHeader: 'Online and ready.',
|
|
30
|
+
statusNoWorkspace: '⚠️ No workspace selected. Use /workspaces to see available workspaces.',
|
|
31
|
+
statusActiveTask: '🔄 Active task: {taskTitle} ({status})',
|
|
32
|
+
workspacesNone: '📁 No workspaces configured yet.\n\nAdd a workspace in the CoWork desktop app first, or use:\n`/addworkspace /path/to/your/project`',
|
|
33
|
+
workspacesHeader: '📁 *Available Workspaces*',
|
|
34
|
+
workspacesFooter: 'Reply with the number or name to select.\nExample: `1` or `myproject`',
|
|
35
|
+
workspacesSelectPrompt: 'Tap a workspace to select it:',
|
|
36
|
+
workspaceCurrent: '📁 Current workspace: *{workspaceName}*\n`{workspacePath}`\n\nUse `/workspaces` to see available workspaces.',
|
|
37
|
+
workspaceNoneSelected: 'No workspace selected. Use `/workspaces` to see available workspaces.',
|
|
38
|
+
workspaceNotFound: '❌ Workspace not found: "{selector}"\n\nUse /workspaces to see available workspaces.',
|
|
39
|
+
workspaceNotFoundShort: '❌ Workspace not found.',
|
|
40
|
+
workspaceSet: '✅ Workspace set to: *{workspaceName}*\n`{workspacePath}`\n\nYou can now send messages to create tasks in this workspace.',
|
|
41
|
+
workspaceAddUsage: '📁 *Add Workspace*\n\nUsage: `/addworkspace <path>`\n\nExample:\n`/addworkspace /Users/john/projects/myapp`\n`/addworkspace ~/Documents`',
|
|
42
|
+
workspacePathNotDir: '❌ Path is not a directory: `{workspacePath}`',
|
|
43
|
+
workspacePathNotFound: '❌ Directory not found: `{workspacePath}`',
|
|
44
|
+
workspaceAlreadyExists: '📁 Workspace already exists!\n\n✅ Selected: *{workspaceName}*\n`{workspacePath}`',
|
|
45
|
+
workspaceAdded: '✅ Workspace added and selected!\n\n📁 *{workspaceName}*\n`{workspacePath}`\n\nYou can now send messages to create tasks in this workspace.',
|
|
46
|
+
workspaceRemoveUsage: '❌ Please specify a workspace name to remove.\n\nUsage: `/removeworkspace <name>`',
|
|
47
|
+
workspaceRemoved: '✅ Workspace "{workspaceName}" removed successfully.',
|
|
48
|
+
taskStartAck: '🚀 Task started: "{taskTitle}"\n\nI\'ll update you when it\'s ready or if I need your input.',
|
|
49
|
+
taskStartAckSimple: 'I\'m on it — I\'ll check back soon.',
|
|
50
|
+
taskStartFailed: '❌ Failed to start task: {error}',
|
|
51
|
+
taskContinueFailed: '❌ Failed to send message. Use /newtask to start a new task.',
|
|
52
|
+
agentUnavailable: '❌ Agent not available. Please try again later.',
|
|
53
|
+
workspaceMissingForTask: '❌ Workspace not found. Please select a workspace with /workspace.',
|
|
54
|
+
approvalNone: '❌ No pending approval request.',
|
|
55
|
+
approvalApproved: '✅ Approved. Working on it.',
|
|
56
|
+
approvalDenied: '🛑 Denied. Action cancelled.',
|
|
57
|
+
approvalFailed: '❌ Failed to process approval.',
|
|
58
|
+
approvalButtonApprove: '✅ Approve',
|
|
59
|
+
approvalButtonDeny: '❌ Deny',
|
|
60
|
+
approvalRequiredTitle: 'Approval Required',
|
|
61
|
+
queueCleared: '✅ Queue cleared.\n\n• Running tasks cancelled: {running}\n• Queued tasks removed: {queued}\n\nBrowser sessions and other resources have been cleaned up.',
|
|
62
|
+
queueStatus: '{statusText}',
|
|
63
|
+
cancelled: '🛑 Task cancelled.',
|
|
64
|
+
cancelNoActive: 'No active task to cancel.',
|
|
65
|
+
newTaskReady: '🆕 Ready for a new task.\n\nSend me a message describing what you want to do.',
|
|
66
|
+
retryNone: '❌ No failed task found to retry.\n\nStart a new task by sending a message.',
|
|
67
|
+
retrying: '🔄 Retrying task...\n\nOriginal prompt: "{taskTitle}"',
|
|
68
|
+
historyNone: '📋 No task history found.\n\nStart a new task by sending a message.',
|
|
69
|
+
historyHeader: '📋 *Recent Tasks*\n\n{history}',
|
|
70
|
+
skillsNone: '📚 No skills available.\n\nSkills are stored in:\n`~/Library/Application Support/cowork-os/skills/`',
|
|
71
|
+
skillsLoadFailed: '❌ Failed to load skills.',
|
|
72
|
+
skillSpecify: '❌ Please specify a skill ID.\n\nUsage: `/skill <id>`\n\nUse /skills to see available skills.',
|
|
73
|
+
skillNotFound: '❌ Skill "{skillId}" not found.\n\nUse /skills to see available skills.',
|
|
74
|
+
skillToggle: '{emoji} *{skillName}* is now {statusText}',
|
|
75
|
+
debugStatus: '🐛 Debug mode is now {statusText}',
|
|
76
|
+
shellInvalidOption: '❌ Invalid option. Use `/shell on` or `/shell off`',
|
|
77
|
+
workspaceNotFoundForShell: '❌ Workspace not found.',
|
|
78
|
+
responseFailed: '❌ Failed to process response.',
|
|
79
|
+
helpCompact: `📚 *Commands*
|
|
80
|
+
|
|
81
|
+
*Basics*
|
|
82
|
+
/workspaces - Select workspace
|
|
83
|
+
/status - Current status
|
|
84
|
+
/newtask - Fresh start
|
|
85
|
+
|
|
86
|
+
*Tasks*
|
|
87
|
+
/cancel - Stop task
|
|
88
|
+
/approve or /yes - Approve action
|
|
89
|
+
/deny or /no - Reject action
|
|
90
|
+
|
|
91
|
+
*Settings*
|
|
92
|
+
/shell on|off - Shell access
|
|
93
|
+
/models - Change AI model
|
|
94
|
+
|
|
95
|
+
━━━━━━━━━━━━━━━
|
|
96
|
+
💡 Just send your task directly!
|
|
97
|
+
Example: "Add a login form"`,
|
|
98
|
+
helpFull: `📚 *Available Commands*
|
|
99
|
+
|
|
100
|
+
*Core*
|
|
101
|
+
/start - Start the bot
|
|
102
|
+
/help - Show this help message
|
|
103
|
+
/status - Check bot status and workspace
|
|
104
|
+
/version - Show version information
|
|
105
|
+
|
|
106
|
+
*Workspaces*
|
|
107
|
+
/workspaces - List available workspaces
|
|
108
|
+
/workspace <name> - Select a workspace
|
|
109
|
+
/addworkspace <path> - Add a new workspace
|
|
110
|
+
/removeworkspace <name> - Remove a workspace
|
|
111
|
+
|
|
112
|
+
*Tasks*
|
|
113
|
+
/newtask - Start a fresh task/conversation
|
|
114
|
+
/cancel - Cancel current task
|
|
115
|
+
/retry - Retry the last failed task
|
|
116
|
+
/history - Show recent task history
|
|
117
|
+
/approve - Approve pending action (or /yes, /y)
|
|
118
|
+
/deny - Reject pending action (or /no, /n)
|
|
119
|
+
/queue - View/clear task queue
|
|
120
|
+
|
|
121
|
+
*Models*
|
|
122
|
+
/providers - List available AI providers
|
|
123
|
+
/provider <name> - Show or change provider
|
|
124
|
+
/models - List available AI models
|
|
125
|
+
/model <name> - Show or change model
|
|
126
|
+
|
|
127
|
+
*Skills*
|
|
128
|
+
/skills - List available skills
|
|
129
|
+
/skill <name> - Toggle a skill on/off
|
|
130
|
+
|
|
131
|
+
*Settings*
|
|
132
|
+
/settings - View current settings
|
|
133
|
+
/shell - Enable/disable shell commands
|
|
134
|
+
/debug - Toggle debug mode
|
|
135
|
+
|
|
136
|
+
💬 *Quick Start*
|
|
137
|
+
1. \`/workspaces\` → \`/workspace <name>\`
|
|
138
|
+
2. \`/shell on\` (if needed)
|
|
139
|
+
3. Send your task message
|
|
140
|
+
4. \`/newtask\` to start fresh`,
|
|
141
|
+
};
|
|
142
|
+
const PERSONA_CHANNEL_UI_OVERRIDES = {
|
|
143
|
+
companion: {
|
|
144
|
+
welcomeStandard: '👋 I\'m here. Send me a task whenever you\'re ready.',
|
|
145
|
+
welcomeBack: '👋 Welcome back.\n\nWorkspace: *{workspaceName}*\n\nTell me what you want to do.\n\nType /help for commands.',
|
|
146
|
+
welcomeNoWorkspace: '👋 I\'m here.\n\nAdd a workspace to begin:\n`/addworkspace /path/to/project`\n\nOr add one from the desktop app.',
|
|
147
|
+
welcomeSingleWorkspace: '👋 We\'re set.\n\n✅ Workspace: *{workspaceName}*\n\nTell me what you want to do.\n\nExamples:\n• "Add dark mode support"\n• "Fix the login bug"\n• "Create a new API endpoint"',
|
|
148
|
+
welcomeSelectWorkspace: '👋 Let\'s pick a workspace:\n\n{workspaceList}\nReply with a number (e.g., `1`)',
|
|
149
|
+
workspaceSelected: '✅ *{workspaceName}* selected.',
|
|
150
|
+
workspaceSelectedExample: 'You can send tasks now.\n\nExample: "Create a new React component called Button"',
|
|
151
|
+
pairingPrompt: '🔐 Share your pairing code so I can connect.\n\nUsage: `/pair <code>`',
|
|
152
|
+
pairingSuccess: '✅ Paired. I\'m ready.',
|
|
153
|
+
pairingFailed: '❌ {error}',
|
|
154
|
+
unknownCommand: 'I didn\'t recognize that command: {command}\n\nUse /help to see options.',
|
|
155
|
+
statusHeader: 'Here and ready.',
|
|
156
|
+
statusNoWorkspace: '⚠️ No workspace selected. Use /workspaces to choose one.',
|
|
157
|
+
workspacesNone: '📁 No workspaces yet.\n\nAdd one in the desktop app, or use:\n`/addworkspace /path/to/your/project`',
|
|
158
|
+
workspacesHeader: '📁 *Workspaces*',
|
|
159
|
+
workspacesFooter: 'Reply with a number or name.\nExample: `1` or `myproject`',
|
|
160
|
+
workspaceCurrent: '📁 Current workspace: *{workspaceName}*\n`{workspacePath}`\n\nUse `/workspaces` to switch.',
|
|
161
|
+
workspaceNoneSelected: 'No workspace selected yet. Use `/workspaces` to pick one.',
|
|
162
|
+
workspaceNotFound: '❌ I couldn\'t find "{selector}".\n\nUse /workspaces to see available workspaces.',
|
|
163
|
+
workspaceNotFoundShort: 'I couldn\'t find that workspace.',
|
|
164
|
+
workspaceSet: '✅ Workspace set: *{workspaceName}*\n`{workspacePath}`\n\nSend a message to start a task.',
|
|
165
|
+
workspaceAddUsage: '📁 *Add Workspace*\n\nUsage: `/addworkspace <path>`\n\nExample:\n`/addworkspace /Users/john/projects/myapp`\n`/addworkspace ~/Documents`',
|
|
166
|
+
workspaceAlreadyExists: '📁 Workspace already exists.\n\n✅ Selected: *{workspaceName}*\n`{workspacePath}`',
|
|
167
|
+
workspaceAdded: '✅ Workspace added and selected.\n\n📁 *{workspaceName}*\n`{workspacePath}`\n\nSend a message to start a task.',
|
|
168
|
+
workspaceRemoveUsage: 'Please specify a workspace name to remove.\n\nUsage: `/removeworkspace <name>`',
|
|
169
|
+
workspaceRemoved: 'Workspace "{workspaceName}" removed.',
|
|
170
|
+
taskStartAck: 'I\'m on it — "{taskTitle}".\n\nI\'ll check back soon or ask if I need input.',
|
|
171
|
+
taskStartAckSimple: 'I\'m on it. I\'ll check back soon.',
|
|
172
|
+
taskContinueFailed: 'I couldn\'t send that. Use /newtask to start fresh.',
|
|
173
|
+
agentUnavailable: 'I\'m not available right now. Try again in a moment.',
|
|
174
|
+
workspaceMissingForTask: 'I can\'t find a workspace. Use /workspace to select one.',
|
|
175
|
+
approvalNone: 'No pending approval right now.',
|
|
176
|
+
approvalApproved: 'Approved. I\'m working on it.',
|
|
177
|
+
approvalDenied: 'Okay. I cancelled that.',
|
|
178
|
+
approvalFailed: 'I couldn\'t process that approval.',
|
|
179
|
+
approvalButtonApprove: 'Approve',
|
|
180
|
+
approvalButtonDeny: 'Deny',
|
|
181
|
+
approvalRequiredTitle: 'Approval required',
|
|
182
|
+
queueCleared: 'Queue cleared.\n\n• Running tasks cancelled: {running}\n• Queued tasks removed: {queued}\n\nYou can start new tasks now.',
|
|
183
|
+
cancelled: 'Task cancelled.',
|
|
184
|
+
cancelNoActive: 'No active task to cancel.',
|
|
185
|
+
newTaskReady: 'Ready for a fresh task.\n\nSend me what you want to do.',
|
|
186
|
+
retryNone: 'No failed task to retry.\n\nSend a new task when you\'re ready.',
|
|
187
|
+
retrying: 'Retrying...\n\nOriginal prompt: "{taskTitle}"',
|
|
188
|
+
historyNone: 'No recent task history yet.',
|
|
189
|
+
historyHeader: 'Recent tasks:\n\n{history}',
|
|
190
|
+
skillsNone: 'No skills available yet.',
|
|
191
|
+
skillsLoadFailed: 'Couldn\'t load skills.',
|
|
192
|
+
skillSpecify: 'Please specify a skill ID.\n\nUsage: `/skill <id>`\n\nUse /skills to see available skills.',
|
|
193
|
+
skillNotFound: 'Skill "{skillId}" not found.\n\nUse /skills to see available skills.',
|
|
194
|
+
skillToggle: '{emoji} *{skillName}* is now {statusText}',
|
|
195
|
+
debugStatus: 'Debug mode is now {statusText}',
|
|
196
|
+
shellInvalidOption: 'Invalid option. Use `/shell on` or `/shell off`',
|
|
197
|
+
workspaceNotFoundForShell: 'I couldn\'t find that workspace.',
|
|
198
|
+
responseFailed: 'I couldn\'t process that response.',
|
|
199
|
+
helpCompact: `📚 *Commands*
|
|
200
|
+
|
|
201
|
+
*Basics*
|
|
202
|
+
/workspaces - Select workspace
|
|
203
|
+
/status - Current status
|
|
204
|
+
/newtask - Fresh start
|
|
205
|
+
|
|
206
|
+
*Tasks*
|
|
207
|
+
/cancel - Stop task
|
|
208
|
+
/approve or /yes - Approve action
|
|
209
|
+
/deny or /no - Reject action
|
|
210
|
+
|
|
211
|
+
*Settings*
|
|
212
|
+
/shell on|off - Shell access
|
|
213
|
+
/models - Change AI model
|
|
214
|
+
|
|
215
|
+
━━━━━━━━━━━━━━━
|
|
216
|
+
💡 Just send your task directly.
|
|
217
|
+
Example: "Add a login form"`,
|
|
218
|
+
helpFull: `📚 *Commands*
|
|
219
|
+
|
|
220
|
+
*Core*
|
|
221
|
+
/start - Start
|
|
222
|
+
/help - Help
|
|
223
|
+
/status - Status
|
|
224
|
+
/version - Version
|
|
225
|
+
|
|
226
|
+
*Workspaces*
|
|
227
|
+
/workspaces - List workspaces
|
|
228
|
+
/workspace <name> - Select workspace
|
|
229
|
+
/addworkspace <path> - Add workspace
|
|
230
|
+
/removeworkspace <name> - Remove workspace
|
|
231
|
+
|
|
232
|
+
*Tasks*
|
|
233
|
+
/newtask - New task
|
|
234
|
+
/cancel - Cancel current task
|
|
235
|
+
/retry - Retry last failed task
|
|
236
|
+
/history - Recent tasks
|
|
237
|
+
/approve - Approve (or /yes, /y)
|
|
238
|
+
/deny - Deny (or /no, /n)
|
|
239
|
+
/queue - View/clear queue
|
|
240
|
+
|
|
241
|
+
*Models*
|
|
242
|
+
/providers - List providers
|
|
243
|
+
/provider <name> - Change provider
|
|
244
|
+
/models - List models
|
|
245
|
+
/model <name> - Change model
|
|
246
|
+
|
|
247
|
+
*Skills*
|
|
248
|
+
/skills - List skills
|
|
249
|
+
/skill <name> - Toggle skill
|
|
250
|
+
|
|
251
|
+
*Settings*
|
|
252
|
+
/settings - Current settings
|
|
253
|
+
/shell - Toggle shell access
|
|
254
|
+
/debug - Toggle debug mode
|
|
255
|
+
|
|
256
|
+
💬 *Quick Start*
|
|
257
|
+
1. \`/workspaces\` → \`/workspace <name>\`
|
|
258
|
+
2. \`/shell on\` if needed
|
|
259
|
+
3. Send your task
|
|
260
|
+
4. \`/newtask\` to reset`,
|
|
261
|
+
},
|
|
262
|
+
};
|
|
14
263
|
/**
|
|
15
264
|
* Message templates organized by personality type
|
|
16
265
|
*/
|
|
@@ -79,6 +328,17 @@ const CHANNEL_MESSAGES = {
|
|
|
79
328
|
approvalNeeded: 'Approval needed.',
|
|
80
329
|
},
|
|
81
330
|
};
|
|
331
|
+
const PERSONA_CHANNEL_MESSAGE_OVERRIDES = {
|
|
332
|
+
companion: {
|
|
333
|
+
taskComplete: 'All set.',
|
|
334
|
+
taskCompleteWithResult: 'All set.\n\n{result}',
|
|
335
|
+
taskFailed: 'I hit a snag: {error}',
|
|
336
|
+
toolError: 'I ran into an issue with {tool}: {error}',
|
|
337
|
+
followUpProcessed: 'Got it. I\'m on it.',
|
|
338
|
+
followUpFailed: 'I couldn\'t complete that: {error}',
|
|
339
|
+
approvalNeeded: 'I need your OK on this.',
|
|
340
|
+
},
|
|
341
|
+
};
|
|
82
342
|
/**
|
|
83
343
|
* Emoji mappings for message types
|
|
84
344
|
*/
|
|
@@ -110,10 +370,13 @@ function addEmoji(message, key, emojiUsage) {
|
|
|
110
370
|
* Get a personalized channel message
|
|
111
371
|
*/
|
|
112
372
|
function getChannelMessage(key, ctx, replacements) {
|
|
113
|
-
const { personality, emojiUsage, quirks } = ctx;
|
|
373
|
+
const { personality, emojiUsage, quirks, persona } = ctx;
|
|
114
374
|
// Get base message for personality
|
|
115
375
|
const messages = CHANNEL_MESSAGES[personality] || CHANNEL_MESSAGES.professional;
|
|
116
|
-
|
|
376
|
+
const personaOverride = persona
|
|
377
|
+
? PERSONA_CHANNEL_MESSAGE_OVERRIDES[persona]?.[key]
|
|
378
|
+
: undefined;
|
|
379
|
+
let message = personaOverride || messages[key] || CHANNEL_MESSAGES.professional[key] || key;
|
|
117
380
|
// Replace placeholders
|
|
118
381
|
if (replacements) {
|
|
119
382
|
for (const [placeholder, value] of Object.entries(replacements)) {
|
|
@@ -128,6 +391,22 @@ function getChannelMessage(key, ctx, replacements) {
|
|
|
128
391
|
}
|
|
129
392
|
return message;
|
|
130
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* Get channel UI copy with optional persona overrides
|
|
396
|
+
*/
|
|
397
|
+
function getChannelUiCopy(key, ctx, replacements) {
|
|
398
|
+
const base = CHANNEL_UI_COPY[key] || key;
|
|
399
|
+
const override = ctx.persona
|
|
400
|
+
? PERSONA_CHANNEL_UI_OVERRIDES[ctx.persona]?.[key]
|
|
401
|
+
: undefined;
|
|
402
|
+
let message = override || base;
|
|
403
|
+
if (replacements) {
|
|
404
|
+
for (const [placeholder, value] of Object.entries(replacements)) {
|
|
405
|
+
message = message.replace(new RegExp(`\\{${placeholder}\\}`, 'g'), String(value));
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return message;
|
|
409
|
+
}
|
|
131
410
|
/**
|
|
132
411
|
* Get completion message with optional result and follow-up hint
|
|
133
412
|
* This is specific to channel messages which may include additional hints
|
|
@@ -137,6 +416,7 @@ function getCompletionMessage(ctx, result, includeFollowUpHint = true) {
|
|
|
137
416
|
let message = getChannelMessage(key, ctx, result ? { result } : undefined);
|
|
138
417
|
// Add follow-up hint for channels that support it
|
|
139
418
|
if (includeFollowUpHint && ctx.personality !== 'concise') {
|
|
419
|
+
const companionHint = 'Send another message to continue, or use /newtask for a clean start.';
|
|
140
420
|
const hints = {
|
|
141
421
|
professional: 'Send a follow-up message to continue, or use /newtask to start fresh.',
|
|
142
422
|
friendly: 'Got more to do? Just send another message!',
|
|
@@ -146,7 +426,7 @@ function getCompletionMessage(ctx, result, includeFollowUpHint = true) {
|
|
|
146
426
|
casual: 'What\'s next? Just hit me up.',
|
|
147
427
|
custom: 'Send a follow-up message to continue.',
|
|
148
428
|
};
|
|
149
|
-
const hint = hints[ctx.personality];
|
|
429
|
+
const hint = ctx.persona === 'companion' ? companionHint : hints[ctx.personality];
|
|
150
430
|
if (hint) {
|
|
151
431
|
message = `${message}\n\n${hint}`;
|
|
152
432
|
}
|
|
@@ -160,6 +440,7 @@ exports.DEFAULT_CHANNEL_CONTEXT = {
|
|
|
160
440
|
agentName: 'CoWork',
|
|
161
441
|
userName: undefined,
|
|
162
442
|
personality: 'professional',
|
|
443
|
+
persona: undefined,
|
|
163
444
|
emojiUsage: 'minimal',
|
|
164
445
|
quirks: {
|
|
165
446
|
catchphrase: undefined,
|