Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1712-project-assistant.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A Project now carries its own assistant: one hidden Bot and Session, memory private to that Project (decisions, open questions, the last digest), and a 09:00 Asia/Shanghai digest that answers what merged, what closed, what is still in progress and on whom, and the next slice, from the Project State files and the board rows only. It posts as the install's own GitHub account and never as the shared app: with no connector signed in, or on a host with more than one member, it refuses and escalates, and every write names the assistant and the login it posts for. Deleting a Project removes its assistant, its schedule and its memory ([#1712](https://github.com/ThinkFlowLab/FlyBot/issues/1712)).
3 changes: 2 additions & 1 deletion core/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -6753,7 +6753,8 @@ var SILENT_REGISTRATION_TOOLS = /* @__PURE__ */ new Set([
"attach_capability",
"detach_capability",
"track_links",
"project_state"
"project_state",
"project_digest"
]);
var isSilentRegistration = (name) => typeof name === "string" && SILENT_REGISTRATION_TOOLS.has(name);
var isHiddenNotice = (block) => block?.type === "tool-removal" && (HIDDEN_REMOVED_TOOLS.has(block.toolName) || isConnectorTool(block.toolName) || isPluginTool(block.toolName) || isSilentRegistration(block.toolName)) || block?.type === "tool-addition" && (isConnectorTool(block.toolName) || isPluginTool(block.toolName) || isSilentRegistration(block.toolName));
Expand Down
3 changes: 2 additions & 1 deletion core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import * as connectors from './src/host/connectors.js'
import * as connectorAccess from './src/host/connector-access.js'
import * as capabilities from './src/host/capabilities.js'
import * as schedules from './src/host/schedules.js'
import * as projectAssistant from './src/host/project-assistant.js'
import * as automationDefault from './src/host/automation-default.js'
import * as usage from './src/host/usage.js'
import * as update from './src/host/update.js'
Expand All @@ -57,7 +58,7 @@ export const inject = ['llm', 'tools', 'systemPrompt', 'sessionController', 'ses
// the functions other modules call; they call them through `rt` at run time, never during
// install. Listeners run and tools are listed in registration order, so this order holds:
// usage meters model requests after every listener that rewrites them.
const MODULES = [diagnostics, store, harness, memberAuth, authz, models, permissions, turns, busyAck, steeringInterrupt, delivery, roster, folders, agents, prompt, timeContext, tools, decisions, projectState, chatIndex, groups, roomMembership, reach, tasks, projectBoard, taskDrive, approvals, resume, memory, parts, images, secrets, connectors, connectorAccess, capabilities, schedules, automationDefault, browser, usage, update, dshUpdate, hooks, remoteChat, workflowStore, channel]
const MODULES = [diagnostics, store, harness, memberAuth, authz, models, permissions, turns, busyAck, steeringInterrupt, delivery, roster, folders, agents, prompt, timeContext, tools, decisions, projectState, chatIndex, groups, roomMembership, reach, tasks, projectBoard, taskDrive, approvals, resume, memory, parts, images, secrets, connectors, connectorAccess, capabilities, schedules, projectAssistant, automationDefault, browser, usage, update, dshUpdate, hooks, remoteChat, workflowStore, channel]

export function apply(ctx, config = {}) {
const rt = createRuntime(ctx, config)
Expand Down
2 changes: 1 addition & 1 deletion core/src/client/cells.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ const SILENT_REGISTRATION_TOOLS = new Set([
'read_group_chat', 'remember', 'forget', 'recall', 'read_browser',
'list_capabilities', 'save_capability', 'delete_capability',
'attach_capability', 'detach_capability',
'track_links', 'project_state',
'track_links', 'project_state', 'project_digest',
])
const isSilentRegistration = name => typeof name === 'string' && SILENT_REGISTRATION_TOOLS.has(name)
const isHiddenNotice = block => (block?.type === 'tool-removal' && (HIDDEN_REMOVED_TOOLS.has(block.toolName) || isConnectorTool(block.toolName) || isPluginTool(block.toolName) || isSilentRegistration(block.toolName)))
Expand Down
2 changes: 2 additions & 0 deletions core/src/host/authz.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ const TASK_ENDPOINTS = new Set([
// other wiring point was present, and a signed-in host answered `bot/not-found: Unknown
// endpoint project-board` while `project-read` and `project-of` answered ALLOW.
'projects', 'project-create', 'project-read', 'project-bind', 'project-of', 'project-board',
// The assistant (#1712): its memory is per Project, and deleting a Project takes it along.
'project-memory', 'project-memory-write', 'project-delete',
])

const deny = (code, message) => ({ ok: false, code, message })
Expand Down
3 changes: 3 additions & 0 deletions core/src/host/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ export function install(rt) {
case 'project-bind':
case 'project-of':
case 'project-board':
case 'project-delete':
case 'project-memory':
case 'project-memory-write':
await rt.load()
return ok(await rt.projectEndpoint(endpoint, body, actor))
case 'share-brief':
Expand Down
2 changes: 1 addition & 1 deletion core/src/host/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const AGENT_SESSION_TITLE_MAX = 80
// Desktop profile, so a restriction filters this list down to registered names.
export const TEAM_TOOLS = [
'list_bots', 'message_bot', 'stop_bot', 'create_bot', 'update_bot', 'archive_bot', 'list_models',
'bot_schedules', 'project_state',
'bot_schedules', 'project_state', 'project_digest',
'create_group', 'update_group', 'delete_group', 'post_to_group', 'ask_user', 'track_tasks',
'request_secret', 'list_secrets', 'group_relay', 'read_own_chat',
'read_group_chat', 'remember', 'forget', 'recall', 'read_browser',
Expand Down
Loading
Loading