fuli-context 0.7.5 → 0.7.7
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 +69 -13
- package/README.zh-CN.md +60 -14
- package/dist/web/assets/{AboutPage-ByCUor-j.js → AboutPage-BcZeFcHe.js} +1 -1
- package/dist/web/assets/{ConnectionsPage-DkdkZ40Q.js → ConnectionsPage-xAQYl1SQ.js} +1 -1
- package/dist/web/assets/EmployeeRecruitDialog-CbPAmhy7.js +1 -0
- package/dist/web/assets/EmployeeRecruitDialog-CfFlyKSh.css +1 -0
- package/dist/web/assets/EmployeeWorkbenchPage-BQvTLoc8.css +1 -0
- package/dist/web/assets/EmployeeWorkbenchPage-DF3EL0Ui.js +1 -0
- package/dist/web/assets/KnowledgeEditDialog-UnnBDt0I.js +1 -0
- package/dist/web/assets/{KnowledgeEditDialog-DWUV_NPp.css → KnowledgeEditDialog-iv-dgUeD.css} +1 -1
- package/dist/web/assets/{KnowledgeInspector-CYAjAb9J.js → KnowledgeInspector-BqPJH5Rr.js} +1 -1
- package/dist/web/assets/{KnowledgeOrganizerPage-CV4F54R_.js → KnowledgeOrganizerPage-CyvRflXM.js} +1 -1
- package/dist/web/assets/KnowledgePage-59eczTqe.js +1 -0
- package/dist/web/assets/{KnowledgeWorkspace-z4u5mXOG.js → KnowledgeWorkspace-CfIjhOog.js} +1 -1
- package/dist/web/assets/{OverviewPage-BWOfeS6k.js → OverviewPage-Xyfm5xkZ.js} +1 -1
- package/dist/web/assets/{PersonalProfilePage-c3w4-h7a.js → PersonalProfilePage-DB9mByB3.js} +1 -1
- package/dist/web/assets/PersonalProjectsPage-_-YXVi5O.js +1 -0
- package/dist/web/assets/ProjectAgentsPage-C3vW6wmk.css +1 -0
- package/dist/web/assets/ProjectAgentsPage-DeeQByPX.js +11 -0
- package/dist/web/assets/{PublicProjectsPage-DdH0oGB3.js → PublicProjectsPage-BEZ1YPs3.js} +1 -1
- package/dist/web/assets/{ReviewPage-BYIpcIHG.js → ReviewPage-CQYGwFBH.js} +1 -1
- package/dist/web/assets/SearchableSelect-D27H0MoP.js +1 -0
- package/dist/web/assets/{SettingsPage-2VkbXgZi.js → SettingsPage-BlEZ03Yi.js} +1 -1
- package/dist/web/assets/{WritingTastePage-BOPQZuva.js → WritingTastePage-DvRt_nmP.js} +1 -1
- package/dist/web/assets/catalog-DFvIaHVS.js +1 -0
- package/dist/web/assets/{console-BlAhujsH.js → console-tOxOl8Vq.js} +1 -1
- package/dist/web/assets/conversation-launcher-settings-DuFSpPAo.js +1 -0
- package/dist/web/assets/{i18n-Ci3heuiL.js → i18n-CgBHZthI.js} +3 -3
- package/dist/web/assets/{identity-4_-v6cB7.js → identity-CFo_Uw1H.js} +1 -1
- package/dist/web/assets/index-CJc5ppXH.css +1 -0
- package/dist/web/assets/index-yCi3cz2l.js +2 -0
- package/dist/web/assets/{model-yG0YqUyZ.js → model-BtnVr7fX.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-twhdZArA.js → useApi-CROJJdhE-B6MHm_Av.js} +1 -1
- package/dist/web/assets/{vue-router-C-wot_Di.js → vue-router-CzHm-y-x.js} +1 -1
- package/dist/web/index.html +7 -6
- package/docs/employee-agents.md +99 -0
- package/docs/project-agent-memory.md +479 -0
- package/graph-provider/fuli_graph/knowledge_audit_models.py +171 -0
- package/graph-provider/fuli_graph/model_base.py +5 -0
- package/graph-provider/fuli_graph/model_validation.py +32 -0
- package/graph-provider/fuli_graph/models.py +26 -170
- package/graph-provider/fuli_graph/project_agent_context_models.py +29 -0
- package/graph-provider/fuli_graph/project_agent_coordination_models.py +22 -0
- package/graph-provider/fuli_graph/project_agent_executor_models.py +35 -7
- package/graph-provider/fuli_graph/project_agent_memory_models.py +79 -0
- package/graph-provider/fuli_graph/project_agent_memory_routes.py +46 -0
- package/graph-provider/fuli_graph/project_agent_models.py +9 -0
- package/graph-provider/fuli_graph/project_agent_recruitment_values.py +48 -0
- package/graph-provider/fuli_graph/project_agent_routes.py +50 -1
- package/graph-provider/fuli_graph/project_agent_task_models.py +220 -29
- package/graph-provider/fuli_graph/runtime.py +37 -1
- package/graph-provider/fuli_graph/store.py +6 -0
- package/graph-provider/fuli_graph/store_project_agent_context.py +65 -0
- package/graph-provider/fuli_graph/store_project_agent_coordination_policy.py +122 -0
- package/graph-provider/fuli_graph/store_project_agent_executor_learning.py +175 -11
- package/graph-provider/fuli_graph/store_project_agent_executor_routing.py +33 -10
- package/graph-provider/fuli_graph/store_project_agent_executors.py +181 -14
- package/graph-provider/fuli_graph/store_project_agent_memory.py +174 -0
- package/graph-provider/fuli_graph/store_project_agent_task_activity.py +423 -0
- package/graph-provider/fuli_graph/store_project_agent_task_persistence.py +152 -0
- package/graph-provider/fuli_graph/store_project_agent_task_reads.py +187 -21
- package/graph-provider/fuli_graph/store_project_agent_task_recruitment.py +756 -164
- package/graph-provider/fuli_graph/store_project_agent_task_staffing.py +396 -7
- package/graph-provider/fuli_graph/store_project_agent_tasks.py +265 -465
- package/graph-provider/fuli_graph/store_project_agents.py +214 -46
- package/graph-provider/fuli_graph/store_task_contexts.py +217 -0
- package/graph-provider/fuli_graph/store_transactions.py +40 -0
- package/graph-provider/fuli_graph/task_context_models.py +50 -0
- package/graph-provider/fuli_graph/task_context_routes.py +31 -0
- package/graph-provider/fuli_graph/workflow_observation_models.py +1 -1
- package/graph-provider/pyproject.toml +1 -1
- package/npm-shrinkwrap.json +8 -8
- package/package.json +5 -2
- package/skills/capturing-session-knowledge/SKILL.md +18 -6
- package/src/adaptive-runtime/executor-pool.js +46 -5
- package/src/adaptive-runtime/graph-services.js +10 -3
- package/src/adaptive-runtime/lease-client.js +66 -14
- package/src/adaptive-runtime/runtime-broker.js +24 -9
- package/src/agent-tools/employee-definitions.js +43 -0
- package/src/agent-tools/graph-definitions.js +48 -6
- package/src/agent-tools/graph-handlers.js +15 -0
- package/src/agent-tools/project-agent-definitions.js +35 -4
- package/src/agent-tools/project-agent-memory-definitions.js +36 -0
- package/src/agent-tools.js +6 -2
- package/src/agents/codex/lifecycle-hook.js +107 -0
- package/src/agents/codex/lifecycle-hooks.js +231 -0
- package/src/agents/cursor/lifecycle-hook.js +133 -0
- package/src/agents/cursor/lifecycle-hooks.js +50 -0
- package/src/agents/lifecycle-message.js +19 -0
- package/src/app/agent-request-context.js +23 -0
- package/src/cli/command-registry.js +2 -0
- package/src/cli/employee-command.js +17 -0
- package/src/cli/remote-mcp-command.js +282 -0
- package/src/cli/setup-command.js +5 -0
- package/src/cli.js +10 -0
- package/src/employees/catalog/jefa.json +21 -0
- package/src/employees/install-package.js +77 -0
- package/src/employees/management-policy.js +88 -0
- package/src/employees/manifest.js +53 -0
- package/src/employees/package-registry.js +107 -0
- package/src/employees/project-selection.js +50 -0
- package/src/employees/recruitment.js +199 -0
- package/src/employees/service.js +83 -0
- package/src/employees/task-entry.js +39 -0
- package/src/graphiti/agent-knowledge-workflows.js +135 -25
- package/src/graphiti/federated-application.js +78 -35
- package/src/graphiti/project-agent-control-plane.js +32 -3
- package/src/graphiti/project-agent-mapping.js +175 -4
- package/src/graphiti/project-agent-memory.js +115 -0
- package/src/graphiti/project-agent-task-entry.js +126 -0
- package/src/graphiti/project-agent-workflows.js +49 -14
- package/src/graphiti/provider-client.js +78 -4
- package/src/http/api-router.js +25 -5
- package/src/http/employee-api-router.js +64 -0
- package/src/http/error-mapping.js +4 -0
- package/src/http/graph-api-router.js +14 -0
- package/src/http/request-policy.js +6 -3
- package/src/http/static-handler.js +4 -3
- package/src/mcp/create-mcp-server.js +98 -37
- package/src/mcp/direct-call.js +38 -0
- package/src/mcp/instructions.js +8 -7
- package/src/mcp/provider-task-context-registry.js +74 -0
- package/src/mcp/remote-http-server.js +761 -0
- package/src/mcp/session-id.js +29 -3
- package/src/mcp/task-context-registry.js +88 -29
- package/src/mcp/tool-annotations.js +12 -2
- package/src/mcp/tool-result.js +8 -3
- package/src/mcp-server.js +20 -8
- package/src/native-runtime/runtime.js +58 -8
- package/src/server.js +76 -28
- package/src/setup/agent-installation-status.js +38 -6
- package/src/setup/agents.js +20 -8
- package/src/setup/claude-code-config.js +55 -13
- package/src/setup/codex-bootstrap.js +11 -10
- package/src/setup/codex-config.js +74 -7
- package/src/setup/config-backup.js +18 -2
- package/src/setup/cursor-config.js +22 -5
- package/src/setup/setup.js +30 -22
- package/src/storage/json-file.js +11 -3
- package/dist/web/assets/KnowledgeEditDialog-DSe3Gwep.js +0 -1
- package/dist/web/assets/KnowledgePage-vYYXipOi.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-B7AlLEwf.js +0 -1
- package/dist/web/assets/ProjectAgentsPage-CgftpIPB.css +0 -1
- package/dist/web/assets/ProjectAgentsPage-DTHcL_ox.js +0 -11
- package/dist/web/assets/SearchableSelect-Dz13ClQb.js +0 -1
- package/dist/web/assets/conversation-launcher-settings-DTYxiLJt.js +0 -1
- package/dist/web/assets/index-BnH5mcZx.css +0 -1
- package/dist/web/assets/index-C67Q0JY2.js +0 -2
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"""Provider-neutral contracts for private Agent working context.
|
|
2
|
+
|
|
3
|
+
Working notes are not confirmed project knowledge or user preferences. Their
|
|
4
|
+
scope and revision travel with every response, regardless of the calling host.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from datetime import datetime
|
|
8
|
+
import json
|
|
9
|
+
from typing import Annotated, Literal
|
|
10
|
+
|
|
11
|
+
from pydantic import Field, StringConstraints, model_validator
|
|
12
|
+
|
|
13
|
+
from .model_validation import reject_credentials
|
|
14
|
+
from .models import SourceApplication, StrictModel
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
MemoryNote = Annotated[
|
|
18
|
+
str, StringConstraints(strip_whitespace=True, min_length=1, max_length=1024)
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ProjectAgentWorkingMemory(StrictModel):
|
|
23
|
+
summary: Annotated[
|
|
24
|
+
str, StringConstraints(strip_whitespace=True, min_length=1, max_length=4000)
|
|
25
|
+
]
|
|
26
|
+
decisions: list[MemoryNote] = Field(default_factory=list, max_length=12)
|
|
27
|
+
open_threads: list[MemoryNote] = Field(default_factory=list, max_length=12)
|
|
28
|
+
next_actions: list[MemoryNote] = Field(default_factory=list, max_length=12)
|
|
29
|
+
|
|
30
|
+
@model_validator(mode='after')
|
|
31
|
+
def reject_sensitive_values(self):
|
|
32
|
+
reject_credentials(self, 'Agent working memory')
|
|
33
|
+
if len(json.dumps(self.model_dump(), ensure_ascii=False).encode()) > 32 * 1024:
|
|
34
|
+
raise ValueError('Agent working memory must fit within 32 KiB; distill the notes')
|
|
35
|
+
return self
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ProjectAgentMemoryWrite(StrictModel):
|
|
39
|
+
personal_space_id: str = Field(min_length=1, max_length=128)
|
|
40
|
+
personal_project_id: str = Field(min_length=1, max_length=128)
|
|
41
|
+
agent_id: str = Field(min_length=1, max_length=128)
|
|
42
|
+
expected_revision: int = Field(ge=0)
|
|
43
|
+
idempotency_key: str = Field(min_length=8, max_length=256)
|
|
44
|
+
memory: ProjectAgentWorkingMemory
|
|
45
|
+
source_application: SourceApplication
|
|
46
|
+
source_session_id: str | None = Field(default=None, min_length=1, max_length=256)
|
|
47
|
+
task_id: str | None = Field(default=None, min_length=1, max_length=128)
|
|
48
|
+
|
|
49
|
+
@model_validator(mode='after')
|
|
50
|
+
def reject_sensitive_values(self):
|
|
51
|
+
reject_credentials(self, 'Agent memory checkpoint')
|
|
52
|
+
return self
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class ProjectAgentMemoryRecord(StrictModel):
|
|
56
|
+
checkpoint_id: str
|
|
57
|
+
personal_space_id: str
|
|
58
|
+
personal_project_id: str
|
|
59
|
+
agent_id: str
|
|
60
|
+
revision: int = Field(ge=1)
|
|
61
|
+
memory: ProjectAgentWorkingMemory
|
|
62
|
+
source_application: SourceApplication
|
|
63
|
+
source_session_id: str | None = None
|
|
64
|
+
task_id: str | None = None
|
|
65
|
+
created_at: datetime
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class ProjectAgentMemoryView(StrictModel):
|
|
69
|
+
personal_space_id: str
|
|
70
|
+
personal_project_id: str
|
|
71
|
+
agent_id: str
|
|
72
|
+
scope: Literal['private_agent_project'] = 'private_agent_project'
|
|
73
|
+
storage: Literal['neo4j'] = 'neo4j'
|
|
74
|
+
authority: Literal['working_context_not_confirmed_knowledge'] = (
|
|
75
|
+
'working_context_not_confirmed_knowledge'
|
|
76
|
+
)
|
|
77
|
+
revision: int = Field(default=0, ge=0)
|
|
78
|
+
current: ProjectAgentMemoryRecord | None = None
|
|
79
|
+
history: list[ProjectAgentMemoryRecord] = Field(default_factory=list)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Transport boundary for host-independent Agent working memory."""
|
|
2
|
+
|
|
3
|
+
from typing import Annotated
|
|
4
|
+
|
|
5
|
+
from fastapi import HTTPException, Query
|
|
6
|
+
|
|
7
|
+
from .project_agent_memory_models import (
|
|
8
|
+
ProjectAgentMemoryRecord,
|
|
9
|
+
ProjectAgentMemoryView,
|
|
10
|
+
ProjectAgentMemoryWrite,
|
|
11
|
+
)
|
|
12
|
+
from .project_agent_context_models import (
|
|
13
|
+
ProjectAgentContextRequest, ProjectAgentContextResolution,
|
|
14
|
+
)
|
|
15
|
+
from .task_context_routes import register_task_context_routes
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def register_project_agent_memory_routes(application, store, Actor):
|
|
19
|
+
register_task_context_routes(application, store, Actor)
|
|
20
|
+
@application.post(
|
|
21
|
+
'/v1/project-agent-context/resolve', response_model=ProjectAgentContextResolution,
|
|
22
|
+
)
|
|
23
|
+
async def resolve_context(request: ProjectAgentContextRequest, actor: Actor):
|
|
24
|
+
return await store.resolve_project_agent_context(actor, request)
|
|
25
|
+
|
|
26
|
+
@application.get(
|
|
27
|
+
'/v1/project-agents/{agent_id}/memory', response_model=ProjectAgentMemoryView,
|
|
28
|
+
)
|
|
29
|
+
async def get_memory(
|
|
30
|
+
agent_id: str,
|
|
31
|
+
actor: Actor,
|
|
32
|
+
personal_space_id: Annotated[str, Query(min_length=1, max_length=128)],
|
|
33
|
+
personal_project_id: Annotated[str, Query(min_length=1, max_length=128)],
|
|
34
|
+
limit: Annotated[int, Query(ge=1, le=10)] = 1,
|
|
35
|
+
):
|
|
36
|
+
return await store.get_project_agent_memory(
|
|
37
|
+
actor, personal_space_id, personal_project_id, agent_id, limit=limit,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
@application.put(
|
|
41
|
+
'/v1/project-agents/{agent_id}/memory', response_model=ProjectAgentMemoryRecord,
|
|
42
|
+
)
|
|
43
|
+
async def write_memory(agent_id: str, request: ProjectAgentMemoryWrite, actor: Actor):
|
|
44
|
+
if request.agent_id != agent_id:
|
|
45
|
+
raise HTTPException(status_code=422, detail='Agent memory target does not match path')
|
|
46
|
+
return await store.write_project_agent_memory(actor, request)
|
|
@@ -27,6 +27,7 @@ ProjectAgentReasoningEffort = Literal['default', 'low', 'medium', 'high']
|
|
|
27
27
|
ProjectAgentExecutorPolicyMode = Literal['flexible', 'locked']
|
|
28
28
|
PROJECT_AGENT_CLIENTS: tuple[SourceApplication, ...] = (
|
|
29
29
|
'codex',
|
|
30
|
+
'claude',
|
|
30
31
|
'claude_code',
|
|
31
32
|
'cursor',
|
|
32
33
|
'kiro',
|
|
@@ -162,6 +163,14 @@ class ProjectAgentUpsert(StrictModel):
|
|
|
162
163
|
agent_id: str = Field(min_length=1, max_length=128)
|
|
163
164
|
profile: ProjectAgentProfile
|
|
164
165
|
|
|
166
|
+
@model_validator(mode='after')
|
|
167
|
+
def require_dedicated_archive_operation(self):
|
|
168
|
+
if self.profile.status == 'archived':
|
|
169
|
+
raise ValueError(
|
|
170
|
+
'archive Project Agents through the dedicated archive operation'
|
|
171
|
+
)
|
|
172
|
+
return self
|
|
173
|
+
|
|
165
174
|
|
|
166
175
|
class ProjectAgentAssignmentCreate(StrictModel):
|
|
167
176
|
personal_space_id: str = Field(min_length=1, max_length=128)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Value conversion helpers for durable project Agent recruitment records."""
|
|
2
|
+
|
|
3
|
+
from .project_agent_models import ProjectAgentProfile
|
|
4
|
+
from .project_agent_task_models import ProjectAgentRecruitmentRecord
|
|
5
|
+
from .provider_values import native_datetime
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def project_agent_recruitment_record(raw):
|
|
9
|
+
proposed_profile = ProjectAgentProfile.model_validate_json(
|
|
10
|
+
raw['proposed_profile_json']
|
|
11
|
+
)
|
|
12
|
+
occupation_emoji = raw.get('occupation_emoji') or raw.get(
|
|
13
|
+
'occupationEmoji'
|
|
14
|
+
)
|
|
15
|
+
if not proposed_profile.occupation_emoji and occupation_emoji:
|
|
16
|
+
proposed_profile = proposed_profile.model_copy(
|
|
17
|
+
update={'occupation_emoji': occupation_emoji}
|
|
18
|
+
)
|
|
19
|
+
fields = {
|
|
20
|
+
'recruitment_id': raw.get('recruitment_id') or raw['id'],
|
|
21
|
+
'personal_space_id': raw['personal_space_id'],
|
|
22
|
+
'personal_project_id': raw['personal_project_id'],
|
|
23
|
+
'task_id': raw['task_id'],
|
|
24
|
+
'coordinator_agent_id': raw['coordinator_agent_id'],
|
|
25
|
+
'hr_agent_id': raw.get('hr_agent_id'),
|
|
26
|
+
'position_kind': raw['position_kind'],
|
|
27
|
+
'work_kind': raw['work_kind'],
|
|
28
|
+
'required_capabilities': list(raw.get('required_capabilities') or []),
|
|
29
|
+
'reason_code': raw['reason_code'],
|
|
30
|
+
'reason': raw['reason'],
|
|
31
|
+
'status': raw['status'],
|
|
32
|
+
'confirmation_mode': raw['confirmation_mode'],
|
|
33
|
+
'proposed_agent_id': raw['proposed_agent_id'],
|
|
34
|
+
'proposed_profile': proposed_profile,
|
|
35
|
+
'participant_role': raw.get('participant_role') or 'lead',
|
|
36
|
+
'recruitment_slot': raw.get('recruitment_slot') or 'lead',
|
|
37
|
+
'trigger_source_application': raw.get('trigger_source_application'),
|
|
38
|
+
'trigger_source_session_id': raw.get('trigger_source_session_id'),
|
|
39
|
+
'revision': int(raw.get('revision') or 0),
|
|
40
|
+
'recruited_agent_id': raw.get('recruited_agent_id'),
|
|
41
|
+
'created_at': native_datetime(raw['created_at']),
|
|
42
|
+
'updated_at': native_datetime(raw['updated_at']),
|
|
43
|
+
'fulfilled_at': native_datetime(raw.get('fulfilled_at')),
|
|
44
|
+
}
|
|
45
|
+
for name in ('test_source', 'cleanup_eligible'):
|
|
46
|
+
if name in ProjectAgentRecruitmentRecord.model_fields:
|
|
47
|
+
fields[name] = raw.get(name)
|
|
48
|
+
return ProjectAgentRecruitmentRecord(**fields)
|
|
@@ -5,6 +5,8 @@ from typing import Annotated, Any
|
|
|
5
5
|
|
|
6
6
|
from fastapi import FastAPI, HTTPException, Query
|
|
7
7
|
|
|
8
|
+
from .project_agent_memory_routes import register_project_agent_memory_routes
|
|
9
|
+
|
|
8
10
|
from .project_agent_models import (
|
|
9
11
|
ProjectAgentAssignmentCreate,
|
|
10
12
|
ProjectAgentAssignmentEnd,
|
|
@@ -33,6 +35,10 @@ from .project_agent_executor_models import (
|
|
|
33
35
|
ProjectAgentExecutorRoutingRuleUpdate,
|
|
34
36
|
ProjectAgentExecutorScope,
|
|
35
37
|
)
|
|
38
|
+
from .project_agent_coordination_models import (
|
|
39
|
+
ProjectAgentCoordinationPolicyRecord,
|
|
40
|
+
ProjectAgentCoordinationPolicyUpdate,
|
|
41
|
+
)
|
|
36
42
|
from .project_agent_task_models import (
|
|
37
43
|
ProjectAgentActivityResult,
|
|
38
44
|
ProjectAgentRecruitmentDecision,
|
|
@@ -53,6 +59,8 @@ def register_project_agent_routes(
|
|
|
53
59
|
) -> None:
|
|
54
60
|
"""Attach Project Agent routes while keeping ``create_app`` orchestration small."""
|
|
55
61
|
|
|
62
|
+
register_project_agent_memory_routes(application, store, Actor)
|
|
63
|
+
|
|
56
64
|
@application.put('/v1/project-agents', response_model=ProjectAgentRecord)
|
|
57
65
|
async def upsert_project_agent(
|
|
58
66
|
request: ProjectAgentUpsert,
|
|
@@ -229,8 +237,17 @@ def register_project_agent_routes(
|
|
|
229
237
|
task_id: str,
|
|
230
238
|
actor: Actor,
|
|
231
239
|
personal_space_id: Annotated[str, Query(min_length=1, max_length=128)],
|
|
240
|
+
personal_project_id: Annotated[
|
|
241
|
+
str | None,
|
|
242
|
+
Query(min_length=1, max_length=128),
|
|
243
|
+
] = None,
|
|
232
244
|
) -> ProjectAgentTaskRecord:
|
|
233
|
-
return await store.get_project_agent_task(
|
|
245
|
+
return await store.get_project_agent_task(
|
|
246
|
+
actor,
|
|
247
|
+
personal_space_id,
|
|
248
|
+
task_id,
|
|
249
|
+
personal_project_id=personal_project_id,
|
|
250
|
+
)
|
|
234
251
|
|
|
235
252
|
@application.post(
|
|
236
253
|
'/v1/project-agent-tasks/{task_id}/events',
|
|
@@ -255,6 +272,10 @@ def register_project_agent_routes(
|
|
|
255
272
|
personal_space_id: Annotated[str, Query(min_length=1, max_length=128)],
|
|
256
273
|
from_date: Annotated[date, Query(alias='from')],
|
|
257
274
|
to_date: Annotated[date, Query(alias='to')],
|
|
275
|
+
personal_project_id: Annotated[
|
|
276
|
+
str | None,
|
|
277
|
+
Query(min_length=1, max_length=128),
|
|
278
|
+
] = None,
|
|
258
279
|
) -> ProjectAgentActivityResult:
|
|
259
280
|
return await store.get_project_agent_activity(
|
|
260
281
|
actor,
|
|
@@ -262,11 +283,38 @@ def register_project_agent_routes(
|
|
|
262
283
|
agent_id,
|
|
263
284
|
from_date,
|
|
264
285
|
to_date,
|
|
286
|
+
personal_project_id=personal_project_id,
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
@application.get(
|
|
290
|
+
'/v1/project-agent-coordination-policy',
|
|
291
|
+
response_model=ProjectAgentCoordinationPolicyRecord,
|
|
292
|
+
)
|
|
293
|
+
async def get_project_agent_coordination_policy(
|
|
294
|
+
actor: Actor,
|
|
295
|
+
personal_space_id: Annotated[str, Query(min_length=1, max_length=128)],
|
|
296
|
+
personal_project_id: Annotated[str, Query(min_length=1, max_length=128)],
|
|
297
|
+
) -> ProjectAgentCoordinationPolicyRecord:
|
|
298
|
+
return await store.get_project_agent_coordination_policy(
|
|
299
|
+
actor,
|
|
300
|
+
personal_space_id,
|
|
301
|
+
personal_project_id,
|
|
265
302
|
)
|
|
266
303
|
|
|
304
|
+
@application.put(
|
|
305
|
+
'/v1/project-agent-coordination-policy',
|
|
306
|
+
response_model=ProjectAgentCoordinationPolicyRecord,
|
|
307
|
+
)
|
|
308
|
+
async def update_project_agent_coordination_policy(
|
|
309
|
+
request: ProjectAgentCoordinationPolicyUpdate,
|
|
310
|
+
actor: Actor,
|
|
311
|
+
) -> ProjectAgentCoordinationPolicyRecord:
|
|
312
|
+
return await store.update_project_agent_coordination_policy(actor, request)
|
|
313
|
+
|
|
267
314
|
@application.get(
|
|
268
315
|
'/v1/project-agent-recruitment-policy',
|
|
269
316
|
response_model=ProjectAgentRecruitmentPolicyRecord,
|
|
317
|
+
deprecated=True,
|
|
270
318
|
)
|
|
271
319
|
async def get_project_agent_recruitment_policy(
|
|
272
320
|
actor: Actor,
|
|
@@ -280,6 +328,7 @@ def register_project_agent_routes(
|
|
|
280
328
|
@application.put(
|
|
281
329
|
'/v1/project-agent-recruitment-policy',
|
|
282
330
|
response_model=ProjectAgentRecruitmentPolicyRecord,
|
|
331
|
+
deprecated=True,
|
|
283
332
|
)
|
|
284
333
|
async def update_project_agent_recruitment_policy(
|
|
285
334
|
request: ProjectAgentRecruitmentPolicyUpdate,
|