fuli-context 0.8.2 → 0.9.0-beta.1
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 +115 -12
- package/README.zh-CN.md +99 -12
- package/dist/web/assets/{AboutPage-fBq5VFoQ.js → AboutPage-u2Bv6cO-.js} +1 -1
- package/dist/web/assets/{AgentHand-CMZk5GjY.js → AgentHand-CsMcNXUm.js} +1 -1
- package/dist/web/assets/{AgentName-DRZHAIB2.js → AgentName-BboCA-Fd.js} +1 -1
- package/dist/web/assets/{AgentProfilePage-BPQEfMhB.js → AgentProfilePage-Dyux6qE3.js} +1 -1
- package/dist/web/assets/AgentsDirectoryPage-BEJdvmX7.js +1 -0
- package/dist/web/assets/{ConnectionsPage-COb56qnk.js → ConnectionsPage-Dw_hK_EM.js} +1 -1
- package/dist/web/assets/{EmployeeRecruitDialog-BLTpjCcK.js → EmployeeRecruitDialog-DP_ktv3w.js} +1 -1
- package/dist/web/assets/{EmployeeWorkbenchPage-HUd-gne2.js → EmployeeWorkbenchPage-CAt8lVnr.js} +1 -1
- package/dist/web/assets/{GrowthLoading-Bu_kH-I8.js → GrowthLoading-DIwqGFSc.js} +1 -1
- package/dist/web/assets/{KnowledgeEditDialog-BTwXXRCD.js → KnowledgeEditDialog-Degd9AGD.js} +1 -1
- package/dist/web/assets/{KnowledgeInspector-Ct5hl2--.js → KnowledgeInspector-yms1ysZ4.js} +1 -1
- package/dist/web/assets/{KnowledgeOrganizerPage-DMC8Hh43.js → KnowledgeOrganizerPage-C64wNn8a.js} +1 -1
- package/dist/web/assets/KnowledgePage-BTFEXzgi.js +1 -0
- package/dist/web/assets/{KnowledgeWorkspace-DmHIc0jb.js → KnowledgeWorkspace-BsF1X4Aq.js} +1 -1
- package/dist/web/assets/{NotFoundPage-C0yOR9T9.js → NotFoundPage-DfaNTiD1.js} +1 -1
- package/dist/web/assets/{OverviewPage-BreX_kb4.js → OverviewPage-VXMfcWFI.js} +1 -1
- package/dist/web/assets/{PersonalProfilePage-CX1a6_E3.js → PersonalProfilePage-C1LBhcYu.js} +1 -1
- package/dist/web/assets/PersonalProjectsPage-B5lV4ZJW.js +1 -0
- package/dist/web/assets/ProjectAgentFirstTask-6afJ8HUe.css +1 -0
- package/dist/web/assets/ProjectAgentFirstTask-DF-IvEqp.js +1 -0
- package/dist/web/assets/ProjectAgentsPage-CgL92gng.js +13 -0
- package/dist/web/assets/ProjectAgentsPage-CoJ4qQlA.css +1 -0
- package/dist/web/assets/{ProjectScopePicker-DVHfXX1f.js → ProjectScopePicker-CZUMdyYz.js} +1 -1
- package/dist/web/assets/{PublicProjectsPage-CtctKml1.js → PublicProjectsPage-e4CpxHk9.js} +1 -1
- package/dist/web/assets/{ReviewPage-DUqaK-do.js → ReviewPage-DugEaFvI.js} +1 -1
- package/dist/web/assets/RoundtablesPage-642YtZBC.js +2 -0
- package/dist/web/assets/RoundtablesPage-DCbIBnBq.css +1 -0
- package/dist/web/assets/{SearchableSelect-BZtyYmZN.js → SearchableSelect-Do6X3fXi.js} +1 -1
- package/dist/web/assets/{SettingsPage-CB4ymLr8.js → SettingsPage-wqYxDPyu.js} +1 -1
- package/dist/web/assets/{SharedJefaReportPage-CbFtrDCY.js → SharedJefaReportPage-CNQDezJr.js} +1 -1
- package/dist/web/assets/{WritingTastePage-B7lSzs2z.js → WritingTastePage-CAUvbDlL.js} +1 -1
- package/dist/web/assets/{agent-profile.css_vue_type_style_index_0_src_true_lang-C22UdfU0.js → agent-profile.css_vue_type_style_index_0_src_true_lang-DHOcWSe_.js} +1 -1
- package/dist/web/assets/{catalog-DU4Kfd-N.js → catalog-JmKyJnKL.js} +1 -1
- package/dist/web/assets/{client-CEHkJJ-5.js → client-DTQ_tUr2.js} +1 -1
- package/dist/web/assets/{console--CZxc3PW.js → console-CrhIK67Y.js} +1 -1
- package/dist/web/assets/{conversation-launcher-settings-Co1RlTFH.js → conversation-launcher-settings-fUWCt3XG.js} +1 -1
- package/dist/web/assets/copy-CX6pyzAG.js +1 -0
- package/dist/web/assets/i18n-CIIxzhPZ.js +10 -0
- package/dist/web/assets/{identity-CsowvtIm.js → identity-CdFITIOu.js} +1 -1
- package/dist/web/assets/{index-CWMqDq8g.css → index-CYZi7E1e.css} +1 -1
- package/dist/web/assets/index-DMoxVzDU.js +2 -0
- package/dist/web/assets/{model-CGpllrds.js → model-CJsrDUNb.js} +1 -1
- package/dist/web/assets/{personal-profile-graph-BNTG4PSY.js → personal-profile-graph-CQLOait6.js} +1 -1
- package/dist/web/assets/{shared-report-BFUJqqQe.js → shared-report-Cll2Yj8W.js} +1 -1
- package/dist/web/assets/{task-evidence-BUu7yYIn.js → task-evidence-DTiPCs7r.js} +1 -1
- package/dist/web/assets/{useApi-CROJJdhE-raNlHRDl.js → useApi-CROJJdhE-fcdVGInY.js} +1 -1
- package/dist/web/assets/{useModalDialog-CroGk2Cs.js → useModalDialog-B-45idX9.js} +1 -1
- package/dist/web/assets/{vue-router-JFYBLXB1.js → vue-router-BUX6njIv.js} +1 -1
- package/dist/web/index.html +12 -11
- package/docs/agent-conversations-and-collaboration.md +18 -1
- package/docs/employee-agents.md +20 -1
- package/docs/roundtable-beta-testing.md +102 -0
- package/docs/roundtable-beta-validation.md +125 -0
- package/docs/roundtable-research.md +142 -0
- package/graph-provider/fuli_graph/app.py +5 -0
- package/graph-provider/fuli_graph/models.py +1 -0
- package/graph-provider/fuli_graph/project_agent_task_models.py +1 -0
- package/graph-provider/fuli_graph/store_project_agent_context.py +22 -1
- package/graph-provider/fuli_graph/store_project_agent_task_reads.py +23 -8
- package/graph-provider/fuli_graph/store_project_agent_task_staffing.py +86 -11
- package/graph-provider/fuli_graph/store_project_agent_tasks.py +1 -0
- package/graph-provider/fuli_graph/store_records.py +1 -0
- package/graph-provider/fuli_graph/store_task_contexts.py +2 -1
- package/graph-provider/fuli_graph/task_context_adoption.py +9 -4
- package/graph-provider/fuli_graph/task_context_temporary_owner.py +25 -0
- package/graph-provider/fuli_graph/temporary_project_scope.py +88 -0
- package/graph-provider/pyproject.toml +1 -1
- package/npm-shrinkwrap.json +131 -79
- package/package.json +8 -4
- package/skills/capturing-session-knowledge/SKILL.md +20 -5
- package/skills/operating-fuli/SKILL.md +8 -0
- package/src/agent-tools/graph-definitions.js +1 -1
- package/src/agent-tools/interface-catalog.js +5 -0
- package/src/agent-tools/project-agent-definitions.js +2 -2
- package/src/agent-tools.js +9 -2
- package/src/agents/a2a/roundtable-participant.js +374 -0
- package/src/agents/claude-code/roundtable-participant.js +24 -0
- package/src/agents/codex/roundtable-config.js +29 -0
- package/src/agents/codex/roundtable-participant.js +34 -0
- package/src/agents/grok/roundtable-participant.js +185 -0
- package/src/agents/identity-receipt.js +29 -0
- package/src/agents/pi/roundtable-participant.js +193 -0
- package/src/agents/pi/roundtable-result-format.js +183 -0
- package/src/cli/command-registry.js +2 -0
- package/src/cli/roundtable-command.js +59 -0
- package/src/cli.js +5 -0
- package/src/conversations/task-context-view.js +3 -1
- package/src/employees/service.js +9 -2
- package/src/employees/task-entry.js +5 -1
- package/src/graphiti/agent-conversations.js +15 -1
- package/src/graphiti/agent-knowledge-workflows.js +14 -5
- package/src/graphiti/federated-application.js +9 -41
- package/src/graphiti/project-agent-mapping.js +1 -0
- package/src/graphiti/project-agent-mention.js +35 -0
- package/src/graphiti/project-agent-task-entry.js +22 -3
- package/src/graphiti/project-agent-workflows.js +31 -12
- package/src/graphiti/project-path-context.js +1 -0
- package/src/graphiti/provider-client.js +3 -0
- package/src/graphiti/task-entry-preferences.js +50 -0
- package/src/graphiti/temporary-project-scope.js +46 -0
- package/src/http/api-router.js +2 -0
- package/src/http/error-mapping.js +2 -0
- package/src/mcp/provider-task-context-registry.js +10 -0
- package/src/mcp/session-id.js +1 -0
- package/src/mcp/tool-annotations.js +2 -0
- package/src/roundtables/application.js +69 -0
- package/src/roundtables/domain.js +181 -0
- package/src/roundtables/http-router.js +56 -0
- package/src/roundtables/mcp-server.js +48 -0
- package/src/roundtables/participant-registry.js +12 -0
- package/src/roundtables/process.js +70 -0
- package/src/roundtables/result-contract.js +47 -0
- package/src/roundtables/server.js +52 -0
- package/src/roundtables/service.js +396 -0
- package/src/roundtables/store.js +59 -0
- package/src/roundtables/tool-contract.js +41 -0
- package/src/roundtables/turn-prompt.js +21 -0
- package/src/roundtables/worker.js +85 -0
- package/dist/web/assets/AgentsDirectoryPage-CKZfrcuD.js +0 -1
- package/dist/web/assets/KnowledgePage-uXW1Eovz.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-Br1S8ETM.js +0 -1
- package/dist/web/assets/ProjectAgentsPage-CA04h1Uf.js +0 -13
- package/dist/web/assets/ProjectAgentsPage-CZWWV4Kw.css +0 -1
- package/dist/web/assets/i18n-BtOOoyJd.js +0 -9
- package/dist/web/assets/index-7X3LGByg.js +0 -2
package/README.md
CHANGED
|
@@ -14,15 +14,116 @@
|
|
|
14
14
|
<a href="LICENSE"><img src="https://img.shields.io/npm/l/fuli-context?style=flat" alt="license" /></a>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
dialogue gradually connects projects, people, decisions, preferences, workflow steps, and evidence.
|
|
19
|
-
Those nodes may point to Fuli-local content, an external knowledge base, or another data source.
|
|
20
|
-
Codex, Claude Code, and Cursor can then reuse the taste, personality, judgment preferences, and
|
|
21
|
-
working methods formed through that collaboration.
|
|
17
|
+
**Switch AI tools. Keep your agent.**
|
|
22
18
|
|
|
23
|
-
Fuli is
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
Fuli is a local-first collaboration layer for long-lived agents across AI tools. Connect Codex,
|
|
20
|
+
Claude Code, and Cursor to the same accessible Fuli data, select the same agent, and continue with
|
|
21
|
+
its identity, project responsibilities, and relevant working context.
|
|
22
|
+
|
|
23
|
+
- **A lasting teammate:** keep an agent's role, collaboration history, and working memory between tasks.
|
|
24
|
+
- **Context with boundaries:** retrieve relevant project knowledge, decisions, and preferences with
|
|
25
|
+
their sources, scope, and confirmation status.
|
|
26
|
+
- **A team when needed:** coordinate specialist agents and record actual worker execution through
|
|
27
|
+
an available, authorized host client or executor.
|
|
28
|
+
|
|
29
|
+
“Long-lived” means persistent identity and context. Fuli assembles that context and coordinates
|
|
30
|
+
work; the connected AI tools run it. Client adapters determine which conversations can be captured
|
|
31
|
+
and resumed. Connecting another tool does not grant access to another project's private memory.
|
|
32
|
+
|
|
33
|
+
Fuli separates private conversation journals, agent working memory, and confirmed knowledge so
|
|
34
|
+
ongoing collaboration produces reusable understanding. AI retrieves, summarizes, warns, and
|
|
35
|
+
executes; humans retain final authority.
|
|
36
|
+
|
|
37
|
+
Explore the [product website](https://有点.意思.com/fuli/).
|
|
38
|
+
|
|
39
|
+
## Start here
|
|
40
|
+
|
|
41
|
+
With Node.js 24.12+ and Docker Compose v2 available, run:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install --global fuli-context
|
|
45
|
+
fuli setup
|
|
46
|
+
fuli open
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The setup wizard shows its plan before changing your environment. See [Installation](#installation)
|
|
50
|
+
for requirements and the macOS/Linux native runtime option.
|
|
51
|
+
|
|
52
|
+
To try a cross-tool handoff, register a local project and assign an agent, complete a task through
|
|
53
|
+
one connected client, then use the agent's continuation instruction in another client connected
|
|
54
|
+
to the same data. Check whether it recovers the correct project and prior work, and asks for
|
|
55
|
+
missing context rather than inventing it. See [Agent conversations and collaboration](docs/agent-conversations-and-collaboration.md)
|
|
56
|
+
for supported adapters and boundaries.
|
|
57
|
+
|
|
58
|
+
For a one-off task, this source version also supports an isolated **temporary project**: ask the
|
|
59
|
+
connected client to coordinate the task with Fuli even when no registered project matches. Fuli
|
|
60
|
+
retains its task history and follows the existing Agent recruitment and executor permissions.
|
|
61
|
+
Reading preferences alone creates nothing. An ambiguous project still needs a choice.
|
|
62
|
+
This behavior is included in the `0.9.0-beta.1` prerelease.
|
|
63
|
+
|
|
64
|
+
The Agent directory now explains the first-task entry, and task details distinguish assignment
|
|
65
|
+
from actual worker reports. A completion table appears only after real execution is reported;
|
|
66
|
+
an assigned Agent or an ordinary local conversation alone is not worker evidence.
|
|
67
|
+
|
|
68
|
+
[How it works](#philosophy) · [Installation](#installation) ·
|
|
69
|
+
[Agent roles and teams](docs/employee-agents.md) ·
|
|
70
|
+
[Cross-client acceptance](acceptance/cross-client-handoff.md) · [Contribute](CONTRIBUTING.md) ·
|
|
71
|
+
[Report an issue](https://github.com/JevonsCode/fuli/issues/new/choose)
|
|
72
|
+
|
|
73
|
+
## Agent Roundtable (Beta)
|
|
74
|
+
|
|
75
|
+
The [validation record](docs/roundtable-beta-validation.md) includes a genuine seven-turn Codex run, an independently verified file and an explicit review result. Physical multi-computer and external service checks remain separate.
|
|
76
|
+
|
|
77
|
+
Give independent agents one shared goal, discuss proposals, hand work to implementers, and review
|
|
78
|
+
the result before accepting delivery. Fuli keeps lasting identity and scoped knowledge; the
|
|
79
|
+
roundtable keeps this collaboration's messages, turns, task dependencies, dissent and receipts.
|
|
80
|
+
Workers run on the participants' own computers and pull only their authorized turns.
|
|
81
|
+
|
|
82
|
+
| Product layer | Availability | Responsibility |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| Identity and knowledge | Available | Persistent agent roles, relevant context, project scope, provenance and temporal history |
|
|
85
|
+
| Roundtable coordination | Beta | Discussion, planning, implementation, review, synthesis and explicit human acceptance |
|
|
86
|
+
| Runtime adapters | Beta | Codex CLI, Claude Code CLI, Pi with local Ollama, active MCP participation and xAI API; A2A is experimental within supported protocol paths |
|
|
87
|
+
| Delivery across computers | Beta | One coordinator, revocable seat invitations, participant workers and actual execution receipts |
|
|
88
|
+
| Closed platforms and always-on cloud hosting | Planned | Require separate callable integrations and operational verification |
|
|
89
|
+
|
|
90
|
+
Start a standalone coordinator, then open `http://127.0.0.1:3738/roundtables`:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npm install -g fuli-context@beta
|
|
94
|
+
fl roundtable serve --data-dir ./roundtable-data --port 3738
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Create a discussion or collaborative task, assign 2–6 seats with one moderator, and create a seat
|
|
98
|
+
invitation. Every participant completes preflight and joins before the owner starts the room.
|
|
99
|
+
Selecting an adapter alone does not launch an agent. A collaborative task needs implementer and
|
|
100
|
+
reviewer roles; writing requires both the owner's explicit workspace permission and the worker
|
|
101
|
+
user's `--allow-write`. Reviews and workers default to read only.
|
|
102
|
+
|
|
103
|
+
On a participant's computer, keep the invitation in `FULI_ROUNDTABLE_TOKEN`, then run:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
fl roundtable worker --url https://COORDINATOR --room ROOM_ID --runtime codex --workspace /local/project
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Use `claude-code`, `pi`, `grok`, or `a2a` for the corresponding adapter. Pi requires an installed local Ollama model selected with `--model`; see the [beta testing guide](docs/roundtable-beta-testing.md). Grok requires `XAI_API_KEY` and `XAI_MODEL` on the
|
|
110
|
+
worker; A2A requires `--a2a-url`. The coordinator must expose a reachable HTTPS peer endpoint and
|
|
111
|
+
set `--public-url https://COORDINATOR`; keep owner control on local loopback. The invitation UI
|
|
112
|
+
generates participant commands and exposes credentials once without storing them in browser storage.
|
|
113
|
+
|
|
114
|
+
Pi / Ollama is experimental: real tool actions and file references are checked, but tested local models can still produce inaccurate reports. Use an independent reviewer before accepting delivery.
|
|
115
|
+
|
|
116
|
+
An MCP participant uses `https://COORDINATOR/roundtable-peer/v1/rooms/ROOM_ID/mcp` with the seat
|
|
117
|
+
credential as Bearer authentication, then actively calls `join_roundtable`, `read_roundtable`,
|
|
118
|
+
`claim_roundtable_turn`, and `submit_roundtable_turn`. A [Grok Team Bot can configure a custom remote
|
|
119
|
+
HTTPS MCP server](https://docs.x.ai/grok-bot/team-bots) through its official settings. This is
|
|
120
|
+
separate from a Grok API seat and does not use an API to wake an existing Bot chat.
|
|
121
|
+
|
|
122
|
+
Only actual source receipts produce execution rows. Missing model or usage data stays unknown;
|
|
123
|
+
joining, preflight and assignment do not count as execution. Runtime sources are participant
|
|
124
|
+
reports, and the server does not independently verify native process identity. Beta adapters still need live
|
|
125
|
+
verification with the intended credentials, clients and computers. Full A2A conformance,
|
|
126
|
+
cloud availability and arbitrary closed-platform support are not established by protocol tests.
|
|
26
127
|
|
|
27
128
|
## npm packages
|
|
28
129
|
|
|
@@ -113,8 +214,10 @@ can apply.
|
|
|
113
214
|
|
|
114
215
|
### 7. Local first; no personal model in the shared layer
|
|
115
216
|
|
|
116
|
-
The personal graph stays local by default.
|
|
117
|
-
|
|
217
|
+
The personal graph stays local by default. Supported client adapters can journal visible
|
|
218
|
+
conversations for private agent continuity, separately from structured confirmed knowledge.
|
|
219
|
+
Conversation recall is bounded, with a default seven-day inactivity window. Credentials, temporary
|
|
220
|
+
logs, and raw command output must not enter the knowledge graph. The team-shared layer contains only
|
|
118
221
|
confirmed project or domain knowledge with context and provenance—not personal taste, personality,
|
|
119
222
|
or judgment preferences.
|
|
120
223
|
|
|
@@ -136,7 +239,7 @@ not appear on the Personal preferences page.
|
|
|
136
239
|
Four questions provide a quick classifier: “What outcome do I want?” is taste; “How do I work over
|
|
137
240
|
the long term?” is personality; “How do I decide under a trade-off?” is judgment preference; and
|
|
138
241
|
“How does this system objectively work?” is project knowledge. One-off commands, temporary output,
|
|
139
|
-
unverified guesses, raw chat, and credentials are not
|
|
242
|
+
unverified guesses, raw chat, and credentials are not promoted into confirmed knowledge.
|
|
140
243
|
|
|
141
244
|
Personality is not a catch-all category for everything learned about a person. Only an explicit,
|
|
142
245
|
stable self-description can be confirmed with a human basis. A personality inferred by an Agent
|
|
@@ -715,7 +818,7 @@ the durable graph remains the source of truth.
|
|
|
715
818
|
## Privacy and safety boundaries
|
|
716
819
|
|
|
717
820
|
- Personal knowledge is written to the local Provider.
|
|
718
|
-
- Agents distill structured knowledge
|
|
821
|
+
- Agents distill structured knowledge separately from private, adapter-visible conversation journals.
|
|
719
822
|
- Tokens, cookies, private keys, credentials, private contact details, temporary logs, and raw command
|
|
720
823
|
output must not enter the graph.
|
|
721
824
|
- Graphiti's remote-LLM path is disabled; embeddings are currently computed locally.
|
package/README.zh-CN.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<h1 align="center">复利(Fuli)</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<a href="README.md">English</a> · 简体中文
|
|
8
|
+
<a href="README.md">English</a> · 简体中文 · <a href="https://有点.意思.com/fuli/">产品网站</a>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
@@ -14,13 +14,99 @@
|
|
|
14
14
|
<a href="LICENSE"><img src="https://img.shields.io/npm/l/fuli-context?style=flat" alt="许可证" /></a>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
人物、决定、偏好、行为步骤和证据之间的关系;关系节点可以指向 Fuli 本地内容,也可以连接
|
|
19
|
-
外部知识库或其他数据源。Codex、Claude Code 和 Cursor 因而能在后续任务中复用已经形成的
|
|
20
|
-
品味、个性、判断偏好与协作方法。
|
|
17
|
+
**换 AI 工具,不用换搭档。**
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
复利是一个本地优先、跨 AI 工具的长期 Agent 协作层。让 Codex、Claude Code 和 Cursor
|
|
20
|
+
接入同一份可访问的 Fuli 数据,选中同一位 Agent,就能延续它的身份、项目职责和相关工作脉络。
|
|
21
|
+
|
|
22
|
+
- **搭档留得住:**任务结束后,Agent 的职责、合作记录与工作记忆继续保留。
|
|
23
|
+
- **上下文有边界:**按需取回项目知识、决定与偏好,保留来源、作用域和确认状态。
|
|
24
|
+
- **需要时一起做:**协调不同专长的 Agent,通过可用且获授权的客户端或执行器开展任务,记录真实执行。
|
|
25
|
+
|
|
26
|
+
这里的“长期”指身份和上下文持续存在。Fuli 负责组织上下文与协调任务,接入的 AI 工具负责执行。
|
|
27
|
+
能采集、接续哪些对话取决于客户端适配器;换工具不会自动获得其他项目的私有记忆。
|
|
28
|
+
|
|
29
|
+
复利将私有对话记录、Agent 工作记忆和经过确认的知识分开管理,让持续协作形成可复用的理解。
|
|
30
|
+
AI 负责检索、提醒、归纳和执行;人始终保留最终判断权。
|
|
31
|
+
|
|
32
|
+
## 先用起来
|
|
33
|
+
|
|
34
|
+
准备好 Node.js 24.12+ 和 Docker Compose v2 后,运行:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install --global fuli-context
|
|
38
|
+
fuli setup
|
|
39
|
+
fuli open
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
设置向导会先展示计划,再修改环境。完整要求与 macOS / Linux 原生运行方式见[安装](#安装)。
|
|
43
|
+
|
|
44
|
+
第一次可以试一次跨工具接续:登记一个本地项目、分配一位 Agent,在一个已接入客户端完成任务,
|
|
45
|
+
再把这位 Agent 的接续指令带到连接同一份数据的另一客户端。检查它是否找对项目、恢复上次的工作,
|
|
46
|
+
并在缺少信息时如实说明。支持范围见[Agent 对话与协作说明](docs/agent-conversations-and-collaboration.md)。
|
|
47
|
+
|
|
48
|
+
临时任务也能交给 Agent:本次源码支持在没有匹配到已登记项目时,建立隔离的**临时项目**,
|
|
49
|
+
继续用 Fuli 协调任务。任务历史会保留,Agent 招募与执行器授权沿用现有规则;
|
|
50
|
+
单纯读取偏好不会创建项目,多个候选项目仍需明确选择。此能力包含在 `0.9.0-beta.1` 预发布中。
|
|
51
|
+
|
|
52
|
+
Agent 目录提供首次任务入口,任务详情会区分“已分配”和“收到工作进程报告”。
|
|
53
|
+
只有上报真实执行后才有完成汇总;分配了 Agent、或仅完成普通本机对话,都不等于已运行工作进程。
|
|
54
|
+
|
|
55
|
+
[工作原理](#项目理念) · [安装](#安装) · [Agent 角色与团队](docs/employee-agents.md) ·
|
|
56
|
+
[跨客户端验收](acceptance/cross-client-handoff.md) · [参与贡献](CONTRIBUTING.md) ·
|
|
57
|
+
[反馈问题](https://github.com/JevonsCode/fuli/issues/new/choose)
|
|
58
|
+
|
|
59
|
+
## Agent 圆桌(Beta)
|
|
60
|
+
|
|
61
|
+
[验证记录](docs/roundtable-beta-validation.md)包含真实的 Codex 七轮协作、独立核对的文件和明确的审查结果。多台物理电脑与外部服务分别验收。
|
|
62
|
+
|
|
63
|
+
让独立 Agent 围绕同一个目标,先讨论方案,再交接实施和审查,由你验收交付。
|
|
64
|
+
Fuli 管理长期身份与有边界的知识;圆桌保存本次公开消息、回合、任务依赖、分歧与实际回执。
|
|
65
|
+
各参与者在自己的电脑上运行工作端,主动领取获授权的回合。
|
|
66
|
+
|
|
67
|
+
| 产品层 | 状态 | 职责 |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| 身份与知识 | 已提供 | Agent 职责、相关脉络、项目范围、来源与时间历史 |
|
|
70
|
+
| 圆桌协作 | Beta | 讨论、分工、实施、审查、汇总与明确的人工验收 |
|
|
71
|
+
| 运行时接入 | Beta | Codex CLI、Claude Code CLI、Pi + 本地 Ollama、主动 MCP 参与和 xAI API;A2A 按已支持的协议能力试验接入 |
|
|
72
|
+
| 跨电脑交付 | Beta | 一个协调端、可撤销席位邀请、参与端工作进程与真实执行回执 |
|
|
73
|
+
| 封闭平台与云端常驻 | 待支持 | 需要独立的可调用接口与运行验收 |
|
|
74
|
+
|
|
75
|
+
启动独立协调端,再打开 `http://127.0.0.1:3738/roundtables`:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install -g fuli-context@beta
|
|
79
|
+
fl roundtable serve --data-dir ./roundtable-data --port 3738
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
创建讨论或协作任务,设置 2–6 个席位和一位主持人,生成席位邀请。
|
|
83
|
+
各参与端完成真实预检并加入后,由本地用户开始圆桌。选择平台本身不会启动 Agent。
|
|
84
|
+
协作任务需要实施者和审查者;写入需要创建者明确授权工作区,以及工作端用户的
|
|
85
|
+
`--allow-write`。审查和工作端默认只读。
|
|
86
|
+
|
|
87
|
+
在参与者的电脑上,将邀请凭据设置为环境变量 `FULI_ROUNDTABLE_TOKEN`,然后运行:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
fl roundtable worker --url https://COORDINATOR --room ROOM_ID --runtime codex --workspace /local/project
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
将 runtime 换成 `claude-code`、`pi`、`grok` 或 `a2a` 使用对应适配器。Pi 使用本机 Ollama,通过 `--model` 选择已安装模型,配置见 [Beta 测试指南](docs/roundtable-beta-testing.md)。Grok 需要在工作端配置
|
|
94
|
+
`XAI_API_KEY` 和 `XAI_MODEL`,A2A 需要 `--a2a-url`。跨电脑时,协调端提供可访问的 HTTPS 参与端入口,
|
|
95
|
+
并设置 `--public-url https://COORDINATOR`;所有者控制面保留在本机回环地址。
|
|
96
|
+
邀请界面提供可复制指令,凭据只在当前页面显示一次,不写入浏览器存储。
|
|
97
|
+
|
|
98
|
+
Pi / Ollama 当前为试验能力:真实工具动作和文件引用受到检查,但已测试的本地模型仍可能输出不准确的报告,交付必须经过独立审查。
|
|
99
|
+
|
|
100
|
+
MCP 参与者配置 `https://COORDINATOR/roundtable-peer/v1/rooms/ROOM_ID/mcp`,将席位凭据作为
|
|
101
|
+
Bearer 认证秘密保存,再主动调用 `join_roundtable`、`read_roundtable`、
|
|
102
|
+
`claim_roundtable_turn`、`submit_roundtable_turn`。
|
|
103
|
+
[Grok Team Bot 官方支持自定义远程 HTTPS MCP](https://docs.x.ai/grok-bot/team-bots),可在其设置中
|
|
104
|
+
配置圆桌入口。这个接入与调用 xAI 的 Grok API 席位分别展示,不通过 API 唤醒现有 Bot 聊天。
|
|
105
|
+
|
|
106
|
+
只有实际来源回执会产生执行行;缺少模型或用量时标为未知。运行来源由参与端报告,服务端不独立证明
|
|
107
|
+
原生进程身份。加入、预检和任务分配都不是执行证据。
|
|
108
|
+
Beta 适配器仍需在目标凭据、客户端和电脑上完成真实验收;协议测试不能证明完整 A2A 兼容、
|
|
109
|
+
云端常驻或任意封闭平台接入。参与同一圆桌不会共享他人的私有记忆,也不会扩大执行权限。
|
|
24
110
|
|
|
25
111
|
## npm 包
|
|
26
112
|
|
|
@@ -99,8 +185,9 @@ Agent 在酒店项目工作时先搜索酒店本地知识,再沿显式的 `PAR
|
|
|
99
185
|
|
|
100
186
|
### 7. 本地优先,公开层不包含个人模型
|
|
101
187
|
|
|
102
|
-
|
|
103
|
-
|
|
188
|
+
个人图谱默认留在本机。支持的客户端适配器可保存可见对话,用于私有 Agent 接续;对话记录与
|
|
189
|
+
结构化、可复用的确认知识分开存储,默认使用 7 天不活跃窗口和有界上下文召回。凭据、临时日志
|
|
190
|
+
与原始命令输出不应写入知识图谱。团队共享层只承载经过确认、具有上下文和来源的项目或领域知识,不包含个人的
|
|
104
191
|
品味、个性和判断偏好。
|
|
105
192
|
|
|
106
193
|
## 实际怎么用:分类、作用域、项目识别与取回
|
|
@@ -119,7 +206,7 @@ Agent 在酒店项目工作时先搜索酒店本地知识,再沿显式的 `PAR
|
|
|
119
206
|
|
|
120
207
|
可以用四个问题快速分类:它描述的是“想要什么结果”时存品味;描述“我是怎样长期协作的”时
|
|
121
208
|
存个性;描述“遇到取舍时怎么决定”时存判断偏好;描述“这个系统客观上如何工作”时存项目
|
|
122
|
-
|
|
209
|
+
知识。一次性命令、临时输出、未经验证的猜测、原始聊天和凭据都不直接沉淀为确认知识。
|
|
123
210
|
|
|
124
211
|
“个性”不是所有个人信息的兜底分类。只有用户明确给出的稳定自我描述可以直接带着人工依据
|
|
125
212
|
确认;Agent 仅从一次行为推断出的个性必须先保持 `pending`,不能伪装成人工确认。因此
|
|
@@ -349,7 +436,7 @@ Agent 上下文。
|
|
|
349
436
|
- 本地个人空间、精确项目作用域和选择性上级继承;
|
|
350
437
|
- 偏好确认、延迟冲突处理、修订历史和来源标记;
|
|
351
438
|
- 有界的任务提示自动召回、聚焦的按需检索和实际使用审计;
|
|
352
|
-
- 任务入口、任务末尾知识检查,以及 Claude Code
|
|
439
|
+
- 任务入口、任务末尾知识检查,以及 Claude Code、Codex、Cursor 的客户端适配(Hook 覆盖范围见下文);
|
|
353
440
|
- 决策选项、决策理由和首次记录时附带的验证结果;
|
|
354
441
|
- 知识使用事件、负面反馈和内容代际隔离;
|
|
355
442
|
- 支持暂停、恢复和水位线的持久化分范围知识复核;
|
|
@@ -643,7 +730,7 @@ checkpoint,但只有真实连接后的 Claude 会话才能证明该行为。
|
|
|
643
730
|
## 隐私与安全边界
|
|
644
731
|
|
|
645
732
|
- 个人知识写入本机 Provider;
|
|
646
|
-
- Agent
|
|
733
|
+
- Agent 归纳结构化知识,与私有、由适配器可见的对话日志分开管理;
|
|
647
734
|
- Token、Cookie、私钥、凭据、私人联系信息、临时日志和原始命令输出不得进入图谱;
|
|
648
735
|
- Graphiti 远程 LLM 路径被禁用,当前嵌入在本机计算;
|
|
649
736
|
- 搜索按个人空间和项目范围限定,不默认混入所有项目;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,N as t,T as n,_ as r,a as i,at as a,h as o,nt as s,v as c,w as l,x as u}from"./i18n-BtOOoyJd.js";import{t as d}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as f}from"./fuli-logo-Bu9WBuQe.js";var p=[`aria-label`],m={class:`label-dimension-strip`},h=[`data-dimension`],g={class:`label-guide-sheet`},_={class:`label-guide-section profile-guide`},v={class:`label-definition-list`},y=[`data-kind`],b={class:`label-guide-section quadrant-guide`},x={class:`quadrant-explainer`},S={class:`quadrant-y-axis`,"aria-hidden":`true`},C={class:`quadrant-grid`},w=[`data-quadrant`],T={class:`quadrant-x-axis`,"aria-hidden":`true`},E={class:`quadrant-notes`},D={class:`label-guide-section confirmation-guide`},O={class:`status-definition-list`},k=[`data-status`],A={class:`status-boundaries`},j={class:`label-example`},M={class:`label-example-tags`,"aria-hidden":`true`},N={class:`label-token profile-token`,"data-kind":`taste`},P={class:`label-token origin-token`},ee={class:`label-token status-token`,"data-status":`confirmed`},F={class:`label-all-note`},I=d(n({__name:`LabelGuide`,setup(n){let l=r(()=>[{key:`profile`,title:i(`about.dimensions.profile.title`),question:i(`about.dimensions.profile.question`),timing:i(`about.dimensions.profile.timing`)},{key:`origin`,title:i(`about.dimensions.origin.title`),question:i(`about.dimensions.origin.question`),timing:i(`about.dimensions.origin.timing`)},{key:`confirmation`,title:i(`about.dimensions.confirmation.title`),question:i(`about.dimensions.confirmation.question`),timing:i(`about.dimensions.confirmation.timing`)}]),d=r(()=>[{key:`taste`,label:i(`about.profiles.taste.label`),short:i(`about.profiles.taste.short`),description:i(`about.profiles.taste.description`)},{key:`personality`,label:i(`about.profiles.personality.label`),short:i(`about.profiles.personality.short`),description:i(`about.profiles.personality.description`)},{key:`judgment`,label:i(`about.profiles.judgment.label`),short:i(`about.profiles.judgment.short`),description:i(`about.profiles.judgment.description`)}]),f=r(()=>[{key:`known-unknown`,label:i(`about.quadrants.knownUnknown.label`),coordinate:i(`about.quadrants.knownUnknown.coordinate`),description:i(`about.quadrants.knownUnknown.description`)},{key:`known-known`,label:i(`about.quadrants.knownKnown.label`),coordinate:i(`about.quadrants.knownKnown.coordinate`),description:i(`about.quadrants.knownKnown.description`)},{key:`unknown-unknown`,label:i(`about.quadrants.unknownUnknown.label`),coordinate:i(`about.quadrants.unknownUnknown.coordinate`),description:i(`about.quadrants.unknownUnknown.description`)},{key:`unknown-known`,label:i(`about.quadrants.unknownKnown.label`),coordinate:i(`about.quadrants.unknownKnown.coordinate`),description:i(`about.quadrants.unknownKnown.description`)}]),I=r(()=>[{key:`pending`,label:i(`about.statuses.pending.label`),description:i(`about.statuses.pending.description`),rule:i(`about.statuses.pending.rule`)},{key:`agent-confirmed`,label:i(`about.statuses.agentConfirmed.label`),description:i(`about.statuses.agentConfirmed.description`),rule:i(`about.statuses.agentConfirmed.rule`)},{key:`confirmed`,label:i(`about.statuses.confirmed.label`),description:i(`about.statuses.confirmed.description`),rule:i(`about.statuses.confirmed.rule`)}]);return(n,r)=>(t(),u(`section`,{class:`label-guide`,"aria-label":s(i)(`about.labelsAria`)},[c(`div`,m,[(t(!0),u(o,null,e(l.value,e=>(t(),u(`article`,{key:e.key,"data-dimension":e.key},[r[0]||=c(`i`,{"aria-hidden":`true`},null,-1),c(`div`,null,[c(`strong`,null,a(e.title),1),c(`p`,null,a(e.question),1),c(`small`,null,a(e.timing),1)])],8,h))),128))]),c(`div`,g,[c(`section`,_,[c(`header`,null,[c(`span`,null,a(s(i)(`about.sections.profile.index`)),1),c(`div`,null,[c(`h3`,null,a(s(i)(`about.sections.profile.title`)),1),c(`p`,null,a(s(i)(`about.sections.profile.meta`)),1)])]),c(`div`,v,[(t(!0),u(o,null,e(d.value,e=>(t(),u(`article`,{key:e.key,class:`label-definition-row`},[c(`span`,{class:`label-token profile-token`,"data-kind":e.key},a(e.label),9,y),c(`div`,null,[c(`strong`,null,a(e.short),1),c(`p`,null,a(e.description),1)])]))),128))])]),c(`section`,b,[c(`header`,null,[c(`span`,null,a(s(i)(`about.sections.origin.index`)),1),c(`div`,null,[c(`h3`,null,a(s(i)(`about.sections.origin.title`)),1),c(`p`,null,a(s(i)(`about.sections.origin.meta`)),1)])]),c(`div`,x,[c(`div`,S,[c(`span`,null,a(s(i)(`about.quadrants.aware`)),1),c(`strong`,null,a(s(i)(`about.quadrants.awareness`)),1),c(`span`,null,a(s(i)(`about.quadrants.unaware`)),1)]),c(`div`,C,[(t(!0),u(o,null,e(f.value,e=>(t(),u(`article`,{key:e.key,"data-quadrant":e.key},[c(`span`,null,a(e.coordinate),1),c(`strong`,null,a(e.label),1),c(`p`,null,a(e.description),1)],8,w))),128))]),c(`div`,T,[c(`span`,null,a(s(i)(`about.quadrants.unmastered`)),1),c(`strong`,null,a(s(i)(`about.quadrants.mastery`)),1),c(`span`,null,a(s(i)(`about.quadrants.mastered`)),1)]),c(`div`,E,[c(`p`,null,a(s(i)(`about.quadrants.immutable`)),1),c(`p`,null,a(s(i)(`about.quadrants.unclassified`)),1)])])]),c(`section`,D,[c(`header`,null,[c(`span`,null,a(s(i)(`about.sections.confirmation.index`)),1),c(`div`,null,[c(`h3`,null,a(s(i)(`about.sections.confirmation.title`)),1),c(`p`,null,a(s(i)(`about.sections.confirmation.meta`)),1)])]),c(`div`,null,[c(`div`,O,[(t(!0),u(o,null,e(I.value,e=>(t(),u(`article`,{key:e.key,class:`status-definition-row`},[c(`span`,{class:`label-token status-token`,"data-status":e.key},a(e.label),9,k),c(`p`,null,a(e.description),1),c(`div`,null,[c(`span`,null,a(s(i)(`about.statuses.entryCondition`)),1),c(`strong`,null,a(e.rule),1)])]))),128))]),c(`div`,A,[c(`p`,null,a(s(i)(`about.statuses.usageBoundary`)),1),c(`p`,null,a(s(i)(`about.statuses.resetBoundary`)),1)])])]),c(`section`,j,[c(`div`,null,[c(`span`,null,a(s(i)(`about.example.title`)),1),c(`strong`,null,a(s(i)(`about.example.item`)),1)]),c(`div`,M,[c(`span`,N,a(s(i)(`about.example.profile`)),1),c(`span`,P,a(s(i)(`about.example.origin`)),1),c(`span`,ee,a(s(i)(`about.example.status`)),1)]),c(`p`,null,a(s(i)(`about.example.description`)),1)]),c(`p`,F,a(s(i)(`about.allFilter`)),1)])],8,p))}}),[[`__scopeId`,`data-v-5ae50c9c`]]),L={class:`open-source-credits`},R={class:`credits-roll`},z={class:`credit-grid`},B=[`href`],V={class:`credit-mark`},H=[`src`,`alt`],U={class:`credit-copy`},W={class:`credit-source-note`},G={class:`fuli-finale`},K={class:`finale-brand`},q=[`src`],J=d(n({__name:`OpenSourceCredits`,setup(n){let l=r(()=>[{name:`Vue.js`,role:i(`about.credits.roles.vue`),logo:`https://raw.githubusercontent.com/vuejs/docs/main/src/public/logo.svg`,url:`https://vuejs.org/`},{name:`Vite`,role:i(`about.credits.roles.vite`),logo:`https://raw.githubusercontent.com/vitejs/vite/main/docs/public/logo-without-border.svg`,url:`https://vite.dev/`},{name:`Pinia`,role:i(`about.credits.roles.pinia`),logo:`https://raw.githubusercontent.com/vuejs/pinia/v4/packages/docs/public/logo.svg`,url:`https://pinia.vuejs.org/`},{name:`D3.js`,role:i(`about.credits.roles.d3`),logo:`https://raw.githubusercontent.com/d3/d3-logo/master/d3.svg`,url:`https://d3js.org/`},{name:`Vitest`,role:i(`about.credits.roles.vitest`),logo:`https://raw.githubusercontent.com/vitest-dev/vitest/main/docs/public/logo-without-border.svg`,url:`https://vitest.dev/`},{name:`Hono`,role:i(`about.credits.roles.hono`),logo:`https://raw.githubusercontent.com/honojs/website/main/public/images/logo.svg`,url:`https://hono.dev/`},{name:`Neo4j`,role:i(`about.credits.roles.neo4j`),logo:`https://avatars.githubusercontent.com/u/201120?v=4`,url:`https://neo4j.com/`},{name:`Zod`,role:i(`about.credits.roles.zod`),logo:`https://raw.githubusercontent.com/colinhacks/zod/main/packages/docs/public/logo/logo_square.png`,url:`https://zod.dev/`},{name:`FastAPI`,role:i(`about.credits.roles.fastapi`),logo:`https://raw.githubusercontent.com/fastapi/fastapi/master/docs/en/docs/img/favicon.png`,url:`https://fastapi.tiangolo.com/`},{name:`Graphiti`,role:i(`about.credits.roles.graphiti`),logo:`https://avatars.githubusercontent.com/u/132832125?s=128&v=4`,url:`https://github.com/getzep/graphiti`},{name:`Model Context Protocol`,role:i(`about.credits.roles.mcp`),logo:`https://raw.githubusercontent.com/modelcontextprotocol/docs/main/favicon.svg`,url:`https://modelcontextprotocol.io/`}]);return(n,r)=>(t(),u(`section`,L,[c(`div`,R,[c(`header`,null,[c(`h3`,null,a(s(i)(`about.credits.title`)),1),c(`p`,null,a(s(i)(`about.credits.description`)),1)]),c(`div`,z,[(t(!0),u(o,null,e(l.value,e=>(t(),u(`a`,{key:e.name,href:e.url,target:`_blank`,rel:`noreferrer`},[c(`span`,V,[c(`img`,{src:e.logo,alt:e.name},null,8,H)]),c(`span`,U,[c(`strong`,null,a(e.name),1),c(`small`,null,a(e.role),1)])],8,B))),128))]),c(`p`,W,a(s(i)(`about.credits.sourceNote`)),1)]),c(`footer`,G,[c(`div`,K,[c(`img`,{src:s(f),alt:``,"aria-hidden":`true`},null,8,q),c(`div`,null,[c(`strong`,null,a(s(i)(`common.brand`)),1),r[0]||=c(`span`,null,`Context Graph`,-1)])]),c(`p`,null,a(s(i)(`about.credits.finale`)),1)])]))}}),[[`__scopeId`,`data-v-8676884b`]]),Y={class:`product-principles`},X={class:`principles-lede`},Z={class:`principle-sequence`},Q={class:`principle-boundaries`},$=[`data-boundary`],te=d(n({__name:`ProductPrinciples`,setup(n){let l=r(()=>[{key:`capture`,index:i(`about.philosophy.capture.index`),title:i(`about.philosophy.capture.title`),description:i(`about.philosophy.capture.description`)},{key:`project`,index:i(`about.philosophy.project.index`),title:i(`about.philosophy.project.title`),description:i(`about.philosophy.project.description`)},{key:`review`,index:i(`about.philosophy.review.index`),title:i(`about.philosophy.review.title`),description:i(`about.philosophy.review.description`)},{key:`reuse`,index:i(`about.philosophy.reuse.index`),title:i(`about.philosophy.reuse.title`),description:i(`about.philosophy.reuse.description`)}]),d=r(()=>[{key:`local`,title:i(`about.philosophy.local.title`),description:i(`about.philosophy.local.description`)},{key:`authority`,title:i(`about.philosophy.authority.title`),description:i(`about.philosophy.authority.description`)},{key:`scope`,title:i(`about.philosophy.scope.title`),description:i(`about.philosophy.scope.description`)}]);return(n,r)=>(t(),u(`section`,Y,[c(`header`,X,[c(`h3`,null,a(s(i)(`about.philosophy.title`)),1),c(`p`,null,a(s(i)(`about.philosophy.intro`)),1),c(`p`,null,a(s(i)(`about.philosophy.support`)),1)]),c(`div`,Z,[(t(!0),u(o,null,e(l.value,e=>(t(),u(`article`,{key:e.key},[c(`span`,null,a(e.index),1),c(`div`,null,[c(`h4`,null,a(e.title),1),c(`p`,null,a(e.description),1)])]))),128))]),c(`div`,Q,[c(`strong`,null,a(s(i)(`about.philosophy.boundariesTitle`)),1),c(`div`,null,[(t(!0),u(o,null,e(d.value,e=>(t(),u(`article`,{key:e.key},[c(`i`,{"data-boundary":e.key,"aria-hidden":`true`},null,8,$),c(`h4`,null,a(e.title),1),c(`p`,null,a(e.description),1)]))),128))])])]))}}),[[`__scopeId`,`data-v-d823b02d`]]),ne=[`aria-label`],re={class:`about-content`},ie={class:`about-labels-section`},ae=d(n({__name:`AboutPage`,setup(e){return(e,n)=>(t(),u(`section`,{class:`view about-view`,"aria-label":s(i)(`about.aria`)},[c(`div`,re,[l(te),c(`section`,ie,[c(`header`,null,[c(`h3`,null,a(s(i)(`about.labelsIntro.title`)),1),c(`p`,null,a(s(i)(`about.labelsIntro.description`)),1)]),l(I)]),l(J)])],8,ne))}}),[[`__scopeId`,`data-v-6bd30c79`]]);export{ae as default};
|
|
1
|
+
import{F as e,N as t,T as n,_ as r,a as i,at as a,h as o,nt as s,v as c,w as l,x as u}from"./i18n-CIIxzhPZ.js";import{t as d}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as f}from"./fuli-logo-Bu9WBuQe.js";var p=[`aria-label`],m={class:`label-dimension-strip`},h=[`data-dimension`],g={class:`label-guide-sheet`},_={class:`label-guide-section profile-guide`},v={class:`label-definition-list`},y=[`data-kind`],b={class:`label-guide-section quadrant-guide`},x={class:`quadrant-explainer`},S={class:`quadrant-y-axis`,"aria-hidden":`true`},C={class:`quadrant-grid`},w=[`data-quadrant`],T={class:`quadrant-x-axis`,"aria-hidden":`true`},E={class:`quadrant-notes`},D={class:`label-guide-section confirmation-guide`},O={class:`status-definition-list`},k=[`data-status`],A={class:`status-boundaries`},j={class:`label-example`},M={class:`label-example-tags`,"aria-hidden":`true`},N={class:`label-token profile-token`,"data-kind":`taste`},P={class:`label-token origin-token`},ee={class:`label-token status-token`,"data-status":`confirmed`},F={class:`label-all-note`},I=d(n({__name:`LabelGuide`,setup(n){let l=r(()=>[{key:`profile`,title:i(`about.dimensions.profile.title`),question:i(`about.dimensions.profile.question`),timing:i(`about.dimensions.profile.timing`)},{key:`origin`,title:i(`about.dimensions.origin.title`),question:i(`about.dimensions.origin.question`),timing:i(`about.dimensions.origin.timing`)},{key:`confirmation`,title:i(`about.dimensions.confirmation.title`),question:i(`about.dimensions.confirmation.question`),timing:i(`about.dimensions.confirmation.timing`)}]),d=r(()=>[{key:`taste`,label:i(`about.profiles.taste.label`),short:i(`about.profiles.taste.short`),description:i(`about.profiles.taste.description`)},{key:`personality`,label:i(`about.profiles.personality.label`),short:i(`about.profiles.personality.short`),description:i(`about.profiles.personality.description`)},{key:`judgment`,label:i(`about.profiles.judgment.label`),short:i(`about.profiles.judgment.short`),description:i(`about.profiles.judgment.description`)}]),f=r(()=>[{key:`known-unknown`,label:i(`about.quadrants.knownUnknown.label`),coordinate:i(`about.quadrants.knownUnknown.coordinate`),description:i(`about.quadrants.knownUnknown.description`)},{key:`known-known`,label:i(`about.quadrants.knownKnown.label`),coordinate:i(`about.quadrants.knownKnown.coordinate`),description:i(`about.quadrants.knownKnown.description`)},{key:`unknown-unknown`,label:i(`about.quadrants.unknownUnknown.label`),coordinate:i(`about.quadrants.unknownUnknown.coordinate`),description:i(`about.quadrants.unknownUnknown.description`)},{key:`unknown-known`,label:i(`about.quadrants.unknownKnown.label`),coordinate:i(`about.quadrants.unknownKnown.coordinate`),description:i(`about.quadrants.unknownKnown.description`)}]),I=r(()=>[{key:`pending`,label:i(`about.statuses.pending.label`),description:i(`about.statuses.pending.description`),rule:i(`about.statuses.pending.rule`)},{key:`agent-confirmed`,label:i(`about.statuses.agentConfirmed.label`),description:i(`about.statuses.agentConfirmed.description`),rule:i(`about.statuses.agentConfirmed.rule`)},{key:`confirmed`,label:i(`about.statuses.confirmed.label`),description:i(`about.statuses.confirmed.description`),rule:i(`about.statuses.confirmed.rule`)}]);return(n,r)=>(t(),u(`section`,{class:`label-guide`,"aria-label":s(i)(`about.labelsAria`)},[c(`div`,m,[(t(!0),u(o,null,e(l.value,e=>(t(),u(`article`,{key:e.key,"data-dimension":e.key},[r[0]||=c(`i`,{"aria-hidden":`true`},null,-1),c(`div`,null,[c(`strong`,null,a(e.title),1),c(`p`,null,a(e.question),1),c(`small`,null,a(e.timing),1)])],8,h))),128))]),c(`div`,g,[c(`section`,_,[c(`header`,null,[c(`span`,null,a(s(i)(`about.sections.profile.index`)),1),c(`div`,null,[c(`h3`,null,a(s(i)(`about.sections.profile.title`)),1),c(`p`,null,a(s(i)(`about.sections.profile.meta`)),1)])]),c(`div`,v,[(t(!0),u(o,null,e(d.value,e=>(t(),u(`article`,{key:e.key,class:`label-definition-row`},[c(`span`,{class:`label-token profile-token`,"data-kind":e.key},a(e.label),9,y),c(`div`,null,[c(`strong`,null,a(e.short),1),c(`p`,null,a(e.description),1)])]))),128))])]),c(`section`,b,[c(`header`,null,[c(`span`,null,a(s(i)(`about.sections.origin.index`)),1),c(`div`,null,[c(`h3`,null,a(s(i)(`about.sections.origin.title`)),1),c(`p`,null,a(s(i)(`about.sections.origin.meta`)),1)])]),c(`div`,x,[c(`div`,S,[c(`span`,null,a(s(i)(`about.quadrants.aware`)),1),c(`strong`,null,a(s(i)(`about.quadrants.awareness`)),1),c(`span`,null,a(s(i)(`about.quadrants.unaware`)),1)]),c(`div`,C,[(t(!0),u(o,null,e(f.value,e=>(t(),u(`article`,{key:e.key,"data-quadrant":e.key},[c(`span`,null,a(e.coordinate),1),c(`strong`,null,a(e.label),1),c(`p`,null,a(e.description),1)],8,w))),128))]),c(`div`,T,[c(`span`,null,a(s(i)(`about.quadrants.unmastered`)),1),c(`strong`,null,a(s(i)(`about.quadrants.mastery`)),1),c(`span`,null,a(s(i)(`about.quadrants.mastered`)),1)]),c(`div`,E,[c(`p`,null,a(s(i)(`about.quadrants.immutable`)),1),c(`p`,null,a(s(i)(`about.quadrants.unclassified`)),1)])])]),c(`section`,D,[c(`header`,null,[c(`span`,null,a(s(i)(`about.sections.confirmation.index`)),1),c(`div`,null,[c(`h3`,null,a(s(i)(`about.sections.confirmation.title`)),1),c(`p`,null,a(s(i)(`about.sections.confirmation.meta`)),1)])]),c(`div`,null,[c(`div`,O,[(t(!0),u(o,null,e(I.value,e=>(t(),u(`article`,{key:e.key,class:`status-definition-row`},[c(`span`,{class:`label-token status-token`,"data-status":e.key},a(e.label),9,k),c(`p`,null,a(e.description),1),c(`div`,null,[c(`span`,null,a(s(i)(`about.statuses.entryCondition`)),1),c(`strong`,null,a(e.rule),1)])]))),128))]),c(`div`,A,[c(`p`,null,a(s(i)(`about.statuses.usageBoundary`)),1),c(`p`,null,a(s(i)(`about.statuses.resetBoundary`)),1)])])]),c(`section`,j,[c(`div`,null,[c(`span`,null,a(s(i)(`about.example.title`)),1),c(`strong`,null,a(s(i)(`about.example.item`)),1)]),c(`div`,M,[c(`span`,N,a(s(i)(`about.example.profile`)),1),c(`span`,P,a(s(i)(`about.example.origin`)),1),c(`span`,ee,a(s(i)(`about.example.status`)),1)]),c(`p`,null,a(s(i)(`about.example.description`)),1)]),c(`p`,F,a(s(i)(`about.allFilter`)),1)])],8,p))}}),[[`__scopeId`,`data-v-5ae50c9c`]]),L={class:`open-source-credits`},R={class:`credits-roll`},z={class:`credit-grid`},B=[`href`],V={class:`credit-mark`},H=[`src`,`alt`],U={class:`credit-copy`},W={class:`credit-source-note`},G={class:`fuli-finale`},K={class:`finale-brand`},q=[`src`],J=d(n({__name:`OpenSourceCredits`,setup(n){let l=r(()=>[{name:`Vue.js`,role:i(`about.credits.roles.vue`),logo:`https://raw.githubusercontent.com/vuejs/docs/main/src/public/logo.svg`,url:`https://vuejs.org/`},{name:`Vite`,role:i(`about.credits.roles.vite`),logo:`https://raw.githubusercontent.com/vitejs/vite/main/docs/public/logo-without-border.svg`,url:`https://vite.dev/`},{name:`Pinia`,role:i(`about.credits.roles.pinia`),logo:`https://raw.githubusercontent.com/vuejs/pinia/v4/packages/docs/public/logo.svg`,url:`https://pinia.vuejs.org/`},{name:`D3.js`,role:i(`about.credits.roles.d3`),logo:`https://raw.githubusercontent.com/d3/d3-logo/master/d3.svg`,url:`https://d3js.org/`},{name:`Vitest`,role:i(`about.credits.roles.vitest`),logo:`https://raw.githubusercontent.com/vitest-dev/vitest/main/docs/public/logo-without-border.svg`,url:`https://vitest.dev/`},{name:`Hono`,role:i(`about.credits.roles.hono`),logo:`https://raw.githubusercontent.com/honojs/website/main/public/images/logo.svg`,url:`https://hono.dev/`},{name:`Neo4j`,role:i(`about.credits.roles.neo4j`),logo:`https://avatars.githubusercontent.com/u/201120?v=4`,url:`https://neo4j.com/`},{name:`Zod`,role:i(`about.credits.roles.zod`),logo:`https://raw.githubusercontent.com/colinhacks/zod/main/packages/docs/public/logo/logo_square.png`,url:`https://zod.dev/`},{name:`FastAPI`,role:i(`about.credits.roles.fastapi`),logo:`https://raw.githubusercontent.com/fastapi/fastapi/master/docs/en/docs/img/favicon.png`,url:`https://fastapi.tiangolo.com/`},{name:`Graphiti`,role:i(`about.credits.roles.graphiti`),logo:`https://avatars.githubusercontent.com/u/132832125?s=128&v=4`,url:`https://github.com/getzep/graphiti`},{name:`Model Context Protocol`,role:i(`about.credits.roles.mcp`),logo:`https://raw.githubusercontent.com/modelcontextprotocol/docs/main/favicon.svg`,url:`https://modelcontextprotocol.io/`}]);return(n,r)=>(t(),u(`section`,L,[c(`div`,R,[c(`header`,null,[c(`h3`,null,a(s(i)(`about.credits.title`)),1),c(`p`,null,a(s(i)(`about.credits.description`)),1)]),c(`div`,z,[(t(!0),u(o,null,e(l.value,e=>(t(),u(`a`,{key:e.name,href:e.url,target:`_blank`,rel:`noreferrer`},[c(`span`,V,[c(`img`,{src:e.logo,alt:e.name},null,8,H)]),c(`span`,U,[c(`strong`,null,a(e.name),1),c(`small`,null,a(e.role),1)])],8,B))),128))]),c(`p`,W,a(s(i)(`about.credits.sourceNote`)),1)]),c(`footer`,G,[c(`div`,K,[c(`img`,{src:s(f),alt:``,"aria-hidden":`true`},null,8,q),c(`div`,null,[c(`strong`,null,a(s(i)(`common.brand`)),1),r[0]||=c(`span`,null,`Context Graph`,-1)])]),c(`p`,null,a(s(i)(`about.credits.finale`)),1)])]))}}),[[`__scopeId`,`data-v-8676884b`]]),Y={class:`product-principles`},X={class:`principles-lede`},Z={class:`principle-sequence`},Q={class:`principle-boundaries`},$=[`data-boundary`],te=d(n({__name:`ProductPrinciples`,setup(n){let l=r(()=>[{key:`capture`,index:i(`about.philosophy.capture.index`),title:i(`about.philosophy.capture.title`),description:i(`about.philosophy.capture.description`)},{key:`project`,index:i(`about.philosophy.project.index`),title:i(`about.philosophy.project.title`),description:i(`about.philosophy.project.description`)},{key:`review`,index:i(`about.philosophy.review.index`),title:i(`about.philosophy.review.title`),description:i(`about.philosophy.review.description`)},{key:`reuse`,index:i(`about.philosophy.reuse.index`),title:i(`about.philosophy.reuse.title`),description:i(`about.philosophy.reuse.description`)}]),d=r(()=>[{key:`local`,title:i(`about.philosophy.local.title`),description:i(`about.philosophy.local.description`)},{key:`authority`,title:i(`about.philosophy.authority.title`),description:i(`about.philosophy.authority.description`)},{key:`scope`,title:i(`about.philosophy.scope.title`),description:i(`about.philosophy.scope.description`)}]);return(n,r)=>(t(),u(`section`,Y,[c(`header`,X,[c(`h3`,null,a(s(i)(`about.philosophy.title`)),1),c(`p`,null,a(s(i)(`about.philosophy.intro`)),1),c(`p`,null,a(s(i)(`about.philosophy.support`)),1)]),c(`div`,Z,[(t(!0),u(o,null,e(l.value,e=>(t(),u(`article`,{key:e.key},[c(`span`,null,a(e.index),1),c(`div`,null,[c(`h4`,null,a(e.title),1),c(`p`,null,a(e.description),1)])]))),128))]),c(`div`,Q,[c(`strong`,null,a(s(i)(`about.philosophy.boundariesTitle`)),1),c(`div`,null,[(t(!0),u(o,null,e(d.value,e=>(t(),u(`article`,{key:e.key},[c(`i`,{"data-boundary":e.key,"aria-hidden":`true`},null,8,$),c(`h4`,null,a(e.title),1),c(`p`,null,a(e.description),1)]))),128))])])]))}}),[[`__scopeId`,`data-v-d823b02d`]]),ne=[`aria-label`],re={class:`about-content`},ie={class:`about-labels-section`},ae=d(n({__name:`AboutPage`,setup(e){return(e,n)=>(t(),u(`section`,{class:`view about-view`,"aria-label":s(i)(`about.aria`)},[c(`div`,re,[l(te),c(`section`,ie,[c(`header`,null,[c(`h3`,null,a(s(i)(`about.labelsIntro.title`)),1),c(`p`,null,a(s(i)(`about.labelsIntro.description`)),1)]),l(I)]),l(J)])],8,ne))}}),[[`__scopeId`,`data-v-6bd30c79`]]);export{ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as e,N as t,T as n,V as r,Z as i,_ as a,a as o,at as s,b as c,nt as l,v as u,y as d}from"./i18n-
|
|
1
|
+
import{L as e,N as t,T as n,V as r,Z as i,_ as a,a as o,at as s,b as c,nt as l,v as u,y as d}from"./i18n-CIIxzhPZ.js";import{r as f}from"./console-CrhIK67Y.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{i as m,n as h}from"./client-DTQ_tUr2.js";var g={jefa:`/assets/jefa-avatar-Dew42td5.webp`,bole:`/assets/bole-avatar-CVIr-bU_.webp`};function _(e){return g[e]}var v=f(`agent-attention`,()=>{let e=i(``),t=i({}),n=i(0),r=i([]),a=i(0),o=i(``),s=i(!1),c=i(!1),l=i(``),u=0;async function d(){let i=++u;if(e.value){c.value=!0;try{let c=new URLSearchParams({personalSpaceId:e.value,status:`open`}),d=await h(`/api/agent-attention?${c}&limit=1`);if(i!==u)return;if(t.value=d.counts,n.value=d.total,s.value){o.value&&c.set(`agentId`,o.value);let e=await h(`/api/agent-attention?${c}&limit=100`);if(i!==u)return;r.value=e.items,a.value=e.total}l.value=``}catch(e){i===u&&(l.value=e instanceof Error?e.message:String(e))}finally{i===u&&(c.value=!1)}}}function f(i){e.value!==i&&(u++,e.value=i,t.value={},r.value=[],n.value=0,a.value=0,l.value=``,s.value=!1,c.value=!1,o.value=``,i&&d())}function p(e=``){o.value=e,r.value=[],a.value=0,s.value=!0,d()}async function g(){if(c.value)return;let t=++u;c.value=!0;try{let n=new URLSearchParams({personalSpaceId:e.value,status:`open`,limit:`100`,offset:String(r.value.length)});o.value&&n.set(`agentId`,o.value);let i=await h(`/api/agent-attention?${n}`);if(t!==u)return;let s=new Set(r.value.map(e=>e.requestId));r.value.push(...i.items.filter(e=>!s.has(e.requestId))),a.value=i.total}catch(e){t===u&&(l.value=String(e))}finally{t===u&&(c.value=!1)}}async function _(t,n){let r=e.value;if(!r||t.personalSpaceId!==r)throw Error(`This request belongs to a different space. Reopen it before replying.`);await m(`/api/agent-attention/respond`,{personalSpaceId:r,personalProjectId:t.personalProjectId,requestId:t.requestId,expectedRevision:t.revision,response:n}),e.value===r&&await d()}return{spaceId:e,counts:t,total:n,items:r,filteredTotal:a,agentId:o,open:s,loading:c,error:l,setSpace:f,show:p,refresh:d,more:g,respond:_}});function y(e){let t=new URLSearchParams({agent:e.agentId,project:e.personalProjectId});return e.taskId&&t.set(`task`,e.taskId),`/project-agents?${t}${e.taskId?`#task-${encodeURIComponent(e.taskId)}`:``}`}var b={"aria-hidden":`true`},x=p(n({__name:`AgentHand`,props:{agentId:{},passive:{type:Boolean}},setup(n){let i=n,f=v(),p=a(()=>i.agentId?f.counts[i.agentId]??0:f.total);function m(e){i.passive||(e.preventDefault(),e.stopPropagation(),f.show(i.agentId))}return(i,a)=>p.value?(t(),d(e(n.passive?`span`:`button`),{key:0,type:n.passive?void 0:`button`,class:`agent-hand`,"aria-label":l(o)(`attention.count`,{count:p.value}),title:l(o)(`attention.count`,{count:p.value}),onClick:m},{default:r(()=>[a[0]||=u(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.7`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[u(`path`,{d:`M8 13V5a1.5 1.5 0 0 1 3 0v6-8a1.5 1.5 0 0 1 3 0v8-6a1.5 1.5 0 0 1 3 0v7-3a1.5 1.5 0 0 1 3 0v6c0 4-2 7-6 7h-1c-3 0-4-1-6-4l-3-4a1.6 1.6 0 0 1 2.5-2z`})],-1),u(`span`,b,s(p.value),1)]),_:1},8,[`type`,`aria-label`,`title`])):c(``,!0)}}),[[`__scopeId`,`data-v-0ed1321f`]]);export{_ as i,y as n,v as r,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,N as t,T as n,V as r,at as i,nt as a,y as o}from"./i18n-
|
|
1
|
+
import{C as e,N as t,T as n,V as r,at as i,nt as a,y as o}from"./i18n-CIIxzhPZ.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as c}from"./vue-router-BUX6njIv.js";import{n as l}from"./profile-model-BQO4zNs9.js";var u=s(n({__name:`AgentName`,props:{spaceId:{},agentId:{},name:{}},setup(n){return(s,u)=>(t(),o(a(c),{class:`agent-name-link`,to:a(l)(n.spaceId,n.agentId)},{default:r(()=>[e(i(n.name),1)]),_:1},8,[`to`]))}}),[[`__scopeId`,`data-v-88d4231c`]]);export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,F as t,H as n,M as r,N as i,T as a,V as o,Z as s,_ as c,a as l,at as u,b as d,d as f,h as p,m,nt as h,rt as g,u as _,v,w as y,x as b,y as x,z as S}from"./i18n-BtOOoyJd.js";import{t as C}from"./console--CZxc3PW.js";import{t as w}from"./GrowthLoading-Bu_kH-I8.js";import{m as T}from"./useApi-CROJJdhE-raNlHRDl.js";import{t as E}from"./vue-router-JFYBLXB1.js";import{a as D,n as O}from"./client-CEHkJJ-5.js";import{a as k}from"./catalog-DU4Kfd-N.js";import{a as A,r as j,t as M}from"./profile-model-BQO4zNs9.js";import{t as N}from"./AgentName-DRZHAIB2.js";import{a as P,h as F,l as I,n as L}from"./task-evidence-BUu7yYIn.js";import{t as R}from"./agent-profile.css_vue_type_style_index_0_src_true_lang-C22UdfU0.js";var z={key:1,class:`agent-locked-platforms`},B={key:2},V=[`disabled`],H={value:``},U=[`value`],W=[`value`],G=[`disabled`,`placeholder`],K=[`onUpdate:modelValue`,`disabled`],q={key:3,role:`alert`},J={key:4,role:`status`},Y=[`disabled`],ee=a({__name:`AgentProfileSettings`,props:{agent:{}},emits:[`saved`],setup(r,{emit:a}){let o=r,g=a,y=s([]),C=s(!1),T=s(!1),E=s(``),k=s(!1),A=``,j=s(``),M=s(``),N=s({judgment:``,taste:``,personality:``}),P=c(()=>o.agent.profile.executorPolicy?.mode===`locked`),F=c(()=>{let e=o.agent.profile.executorPolicy;return(e?.lockedExecutorIds?.length?e.lockedExecutorIds:(e?.allowList??[]).map(e=>e.executorId)).map(e=>y.value.find(t=>t.executorId===e)?.displayName||e)}),I=c(()=>y.value.filter(e=>e.registrationStatus===`registered`&&e.permissionStatus===`authorized`&&e.preflightStatus===`passed`&&e.workspacePermission&&e.healthStatus!==`unhealthy`&&(!e.healthRequired||e.healthStatus===`healthy`))),L=0;S(()=>`${o.agent.personalSpaceId}/${o.agent.agentId}`,async()=>{let e=o.agent,t=++L;M.value=e.profile.expectations??``,N.value={judgment:``,taste:``,personality:``,...e.profile.character},j.value=e.profile.executorPolicy?.preferredExecutorIds?.[0]??``,A=j.value,E.value=``,k.value=!1,T.value=!1,C.value=!0,y.value=[];try{let n=await O(`/api/executors?${new URLSearchParams({personalSpaceId:e.personalSpaceId})}`);t===L&&(y.value=Array.isArray(n)?n:n.executors)}catch{t===L&&(E.value=l(`agentProfiles.platformUnavailable`))}finally{t===L&&(C.value=!1)}},{immediate:!0});async function R(){if(T.value)return;let e=L,t=o.agent;T.value=!0,E.value=``,k.value=!1;let n=t.profile.executorPolicy;try{let r=await D(`/api/project-agents`,{personalSpaceId:t.personalSpaceId,personalProjectId:t.personalProjectId??null,agentId:t.agentId,profile:{...t.profile,character:{...N.value},expectations:M.value,executorPolicy:P.value||j.value===A?n:{...n,mode:`flexible`,preferredExecutorIds:j.value?[j.value]:[]}}});e===L&&(A=j.value,g(`saved`,r),k.value=!0)}catch(t){e===L&&(E.value=t instanceof Error?t.message:l(`agentProfiles.saveError`))}finally{e===L&&(T.value=!1)}}return(r,a)=>(i(),b(`form`,{class:`agent-simple-settings`,onSubmit:m(R,[`prevent`])},[v(`h3`,null,u(h(l)(`agentProfiles.settings`)),1),C.value?(i(),x(w,{key:0,variant:`compact`,label:h(l)(`agentProfiles.settingsLoading`)},null,8,[`label`])):P.value?(i(),b(`div`,z,[v(`h4`,null,u(h(l)(`agentProfiles.platform`)),1),v(`p`,null,u(F.value.join(` · `)||h(l)(`agentProfiles.platformUnavailable`)),1),v(`small`,null,u(h(l)(`agentProfiles.locked`)),1)])):(i(),b(`label`,B,[e(u(h(l)(`agentProfiles.platform`)),1),n(v(`select`,{"onUpdate:modelValue":a[0]||=e=>j.value=e,disabled:P.value||T.value},[v(`option`,H,u(h(l)(`agentProfiles.automatic`)),1),j.value&&!I.value.some(e=>e.executorId===j.value)?(i(),b(`option`,{key:0,value:j.value,disabled:``},u(h(l)(`agentProfiles.platformUnavailable`)),9,U)):d(``,!0),(i(!0),b(p,null,t(I.value,e=>(i(),b(`option`,{key:e.executorId,value:e.executorId},u(e.displayName||e.executorId),9,W))),128))],8,V),[[_,j.value]]),v(`small`,null,u(h(l)(P.value?`agentProfiles.locked`:`agentProfiles.platformHint`)),1)])),v(`label`,null,[e(u(h(l)(`agentProfiles.expectations`)),1),n(v(`textarea`,{"onUpdate:modelValue":a[1]||=e=>M.value=e,rows:`3`,maxlength:`4096`,disabled:T.value,placeholder:h(l)(`agentProfiles.expectationsPlaceholder`)},null,8,G),[[f,M.value]])]),v(`details`,null,[v(`summary`,null,u(h(l)(`agentProfiles.editCharacter`)),1),(i(),b(p,null,t([`judgment`,`taste`,`personality`],t=>v(`label`,{key:t},[e(u(h(l)(`agentProfiles.${t}`)),1),n(v(`textarea`,{"onUpdate:modelValue":e=>N.value[t]=e,rows:`2`,maxlength:`2048`,disabled:T.value},null,8,K),[[f,N.value[t]]])])),64))]),E.value?(i(),b(`p`,q,u(E.value),1)):d(``,!0),k.value?(i(),b(`p`,J,u(h(l)(`agentProfiles.saved`)),1)):d(``,!0),v(`button`,{class:`primary-button`,disabled:T.value||C.value,type:`submit`},[T.value?(i(),x(w,{key:0,variant:`inline`,label:h(l)(`agentProfiles.saving`)},null,8,[`label`])):(i(),b(p,{key:1},[e(u(h(l)(`agentProfiles.save`)),1)],64))],8,Y)],32))}}),te={class:`view agent-profile-page`},ne={key:1,class:`agent-profile-empty`,role:`alert`},re={key:2,class:`agent-profile-empty`},ie={class:`agent-resume-header`},ae={class:`agent-portrait`,"aria-hidden":`true`},oe={class:`agent-resume-intro`},se={class:`agent-resume-meta`},ce={class:`agent-profile-actions`},le=[`aria-expanded`],ue={class:`agent-resume-section`},de={class:`agent-character`},fe={key:0,class:`agent-expectation`},pe={class:`agent-strengths`},me={class:`agent-inline-skills`},he={key:0},ge={key:2,role:`status`},_e={class:`agent-resume-section`},ve={class:`agent-resume-list`},ye={key:0,class:`agent-muted`},be={key:1},xe={class:`agent-resume-list`},Se={class:`agent-resume-section`},Ce={class:`agent-section-heading`},we={key:0,role:`status`},Te={key:0,class:`agent-org-lead`},Ee={key:1,class:`agent-org-members`},De={key:2,class:`agent-muted`},Oe={key:0,class:`agent-muted`},ke={class:`agent-resume-section`},Ae={class:`agent-muted`},je={class:`agent-work-timeline`},Me={class:`agent-section-heading`},Ne={key:0},Pe={key:0},Fe={key:0},Ie={key:0,class:`agent-muted`},Le={class:`agent-resume-section`},Re={class:`agent-collaborators`},ze={key:0,class:`agent-muted`},Be={class:`agent-profile-footer`},X=a({__name:`AgentProfilePage`,setup(n){let a=T(),f=C(),m=c(()=>f.activePersonalSpace?.id??``),{agents:_,loading:D,error:z,load:B}=R(m),V=c(()=>a.params.spaceId===m.value?_.value.find(e=>e.personalSpaceId===m.value&&(e.agentId===a.params.agentId||e.legacyAgentIds?.includes(String(a.params.agentId)))):void 0),H=c(()=>(f.state?.personalProjects??[]).filter(e=>e.personal_space_id===m.value)),U=e=>H.value.find(t=>t.project_id===e)?.profile.name||e,W=e=>{let t=_.value.find(t=>t.agentId===e);return t?M(t):e},G=s([]),K=s(void 0),q=s([]),J=s(!1),Y=s(!1),X=s(!1),Z=c(()=>V.value?j(V.value.agentId,G.value):[]),Ve=c(()=>V.value?A({...V.value,assignments:K.value??V.value.assignments}):[]),He=c(()=>(K.value??[]).filter(e=>e.status!==`active`)),Ue=c(()=>k.value.find(e=>e.agentId===V.value?.agentId)),Q=e=>e&&!Number.isNaN(Date.parse(e))?new Date(e).toLocaleDateString():l(`agentProfiles.timeUnknown`),$=0;S(()=>V.value?`${V.value.personalSpaceId}/${V.value.agentId}`:``,async()=>{let e=V.value,t=++$;if(G.value=[],K.value=void 0,q.value=[],Y.value=!1,J.value=!1,X.value=!1,!e)return;J.value=!0,K.value=e.assignments;let n=new URLSearchParams({personalSpaceId:e.personalSpaceId,agentId:e.agentId}),r=await Promise.allSettled([O(`/api/project-agent-tasks?${n}&limit=200`),O(`/api/project-agent-assignments?${n}`)]);if(t!==$)return;let[i,a]=r;if(i.status===`fulfilled`){let t=i.value,n=F(t);G.value=L(Array.isArray(t)?t:n.tasks??n.items).map(I).filter(t=>!!(t&&(!t.personalSpaceId||t.personalSpaceId===e.personalSpaceId)&&t.participants.some(t=>t.agentId===e.agentId))).sort((e,t)=>(t.updatedAt??t.createdAt??``).localeCompare(e.updatedAt??e.createdAt??``))}else Y.value=!0;if(a.status===`fulfilled`){let t=a.value,n=F(t);K.value=L(Array.isArray(t)?t:n.assignments??n.items).map(t=>P(t,e)).filter(t=>!!(t&&t.agentId===e.agentId&&t.personalSpaceId===e.personalSpaceId))}else Y.value=!0;let o=A({...e,assignments:K.value??e.assignments}),s=await Promise.all(o.map(async t=>{try{return{projectId:t,policy:await O(`/api/project-agent-coordination-policy?${new URLSearchParams({personalSpaceId:e.personalSpaceId,personalProjectId:t})}`),error:!1}}catch{return{projectId:t,policy:null,error:!0}}}));t===$&&(q.value=s,J.value=!1)},{immediate:!0});function We(e){let t=_.value.findIndex(t=>t.agentId===e.agentId);t>=0&&(_.value[t]={..._.value[t],...e})}return r(()=>{f.runtimeStatus===`idle`&&f.refresh()}),(n,r)=>(i(),b(`section`,te,[y(h(E),{class:`agent-profile-back`,to:`/project-agents`},{default:o(()=>[e(`← `+u(h(l)(`agentProfiles.back`)),1)]),_:1}),h(D)||h(f).runtimeStatus===`loading`?(i(),x(w,{key:0,label:h(l)(`agentProfiles.loading`)},null,8,[`label`])):h(z)||h(f).runtimeStatus===`error`?(i(),b(`div`,ne,[v(`p`,null,u(h(z)||h(l)(`agentProfiles.loadError`)),1),v(`button`,{onClick:r[0]||=e=>h(f).state?h(B)():h(f).refresh()},u(h(l)(`agentProfiles.retry`)),1)])):V.value?(i(),b(p,{key:3},[v(`header`,ie,[v(`span`,ae,u(V.value.profile.occupationEmoji||h(M)(V.value).slice(0,1)),1),v(`div`,oe,[v(`h1`,null,u(h(M)(V.value)),1),v(`p`,null,u(V.value.profile.responsibility),1),v(`div`,se,[v(`span`,null,u(h(l)(`projectAgents.status.${V.value.profile.status}`)),1),v(`span`,null,u(h(l)(V.value.recruitedAt?`agentProfiles.joined`:`agentProfiles.created`))+` · `+u(Q(V.value.recruitedAt||V.value.createdAt)),1)])]),v(`div`,ce,[v(`button`,{class:`quiet-button`,"aria-expanded":X.value,onClick:r[1]||=e=>X.value=!X.value},u(h(l)(`agentProfiles.settings`)),9,le),y(h(E),{to:{path:`/employees/bole`,query:{q:h(M)(V.value)}}},{default:o(()=>[e(u(h(l)(`agentProfiles.askHR`)),1)]),_:1},8,[`to`])])]),X.value?(i(),x(ee,{key:V.value.agentId,agent:V.value,onSaved:We},null,8,[`agent`])):d(``,!0),v(`section`,ue,[v(`h2`,null,u(h(l)(`agentProfiles.about`)),1),v(`div`,de,[(i(),b(p,null,t([`judgment`,`taste`,`personality`],e=>v(`div`,{key:e},[v(`h3`,null,u(h(l)(`agentProfiles.${e}`)),1),v(`p`,{class:g({"agent-muted":!V.value.profile.character?.[e]})},u(V.value.profile.character?.[e]||h(l)(`agentProfiles.characterEmpty`)),3)])),64))]),V.value.profile.expectations?(i(),b(`p`,fe,[v(`strong`,null,u(h(l)(`agentProfiles.expectations`)),1),e(u(V.value.profile.expectations),1)])):d(``,!0),v(`div`,pe,[v(`h3`,null,u(h(l)(`agentProfiles.strengths`)),1),v(`div`,me,[(i(!0),b(p,null,t(V.value.profile.capabilities,e=>(i(),b(`span`,{key:e},u(e),1))),128)),V.value.profile.capabilities.length?d(``,!0):(i(),b(`span`,he,u(h(l)(`agentProfiles.noSkills`)),1))])])]),J.value?(i(),x(w,{key:1,variant:`compact`,label:h(l)(`agentProfiles.detailLoading`)},null,8,[`label`])):d(``,!0),Y.value?(i(),b(`p`,ge,u(h(l)(`agentProfiles.partial`)),1)):d(``,!0),v(`section`,_e,[v(`h2`,null,u(h(l)(`agentProfiles.projects`)),1),v(`ul`,ve,[(i(!0),b(p,null,t(Ve.value,e=>(i(),b(`li`,{key:e},[v(`h3`,null,u(U(e)),1),v(`p`,null,u(K.value?.find(t=>t.personalProjectId===e&&t.status===`active`)?.responsibility||V.value.profile.responsibility),1)]))),128))]),!J.value&&!Ve.value.length?(i(),b(`p`,ye,u(h(l)(`agentProfiles.noProject`)),1)):d(``,!0),He.value.length?(i(),b(`details`,be,[v(`summary`,null,u(h(l)(`agentProfiles.projectHistory`)),1),v(`ul`,xe,[(i(!0),b(p,null,t(He.value,e=>(i(),b(`li`,{key:e.assignmentId},[v(`h3`,null,u(U(e.personalProjectId)),1),v(`p`,null,u(e.responsibility),1),v(`small`,null,u(Q(e.assignedAt))+` – `+u(Q(e.endedAt)),1)]))),128))])])):d(``,!0)]),v(`section`,Se,[v(`div`,Ce,[v(`h2`,null,u(h(l)(`agentProfiles.organization`)),1),y(h(E),{to:{path:`/employees/bole`,query:{q:h(M)(V.value)}}},{default:o(()=>[e(u(h(l)(`agentProfiles.hr`)),1)]),_:1},8,[`to`])]),(i(!0),b(p,null,t(q.value,e=>(i(),b(`div`,{key:e.projectId,class:`agent-organization`},[v(`h3`,null,u(U(e.projectId)),1),e.error?(i(),b(`p`,we,u(h(l)(`agentProfiles.teamUnavailable`)),1)):e.policy?.teamLeadAgentId||e.policy?.teamMemberAgentIds?.length?(i(),b(p,{key:1},[e.policy.teamLeadAgentId?(i(),b(`div`,Te,[v(`span`,null,u(h(l)(`agentProfiles.lead`)),1),y(N,{"space-id":m.value,"agent-id":e.policy.teamLeadAgentId,name:W(e.policy.teamLeadAgentId)},null,8,[`space-id`,`agent-id`,`name`])])):d(``,!0),e.policy.teamMemberAgentIds?.length?(i(),b(`div`,Ee,[v(`span`,null,u(h(l)(`agentProfiles.teammates`)),1),v(`ul`,null,[(i(!0),b(p,null,t([...new Set(e.policy.teamMemberAgentIds)].filter(t=>t!==e.policy?.teamLeadAgentId),e=>(i(),b(`li`,{key:e},[y(N,{"space-id":m.value,"agent-id":e,name:W(e)},null,8,[`space-id`,`agent-id`,`name`])]))),128))])])):d(``,!0)],64)):(i(),b(`p`,De,u(h(l)(`agentProfiles.teamUnset`)),1))]))),128)),!J.value&&!q.value.length?(i(),b(`p`,Oe,u(h(l)(`agentProfiles.noProject`)),1)):d(``,!0)]),v(`section`,ke,[v(`h2`,null,u(h(l)(`agentProfiles.experience`)),1),v(`p`,Ae,u(h(l)(`agentProfiles.recent`)),1),v(`ol`,je,[(i(!0),b(p,null,t(G.value.slice(0,12),t=>(i(),b(`li`,{key:t.taskId},[v(`div`,Me,[y(h(E),{to:{path:`/project-agents/manage`,query:{agent:V.value.agentId,task:t.taskId}}},{default:o(()=>[e(u(t.title),1)]),_:2},1032,[`to`]),v(`span`,null,u(h(l)(`projectAgents.taskStatus.${t.status}`)),1)]),t.resultSummary?(i(),b(`p`,Ne,u(t.resultSummary),1)):d(``,!0),v(`small`,null,u(Q(t.completedAt||t.updatedAt||t.createdAt)),1)]))),128)),V.value.recruitedAt||V.value.recruitmentReason?(i(),b(`li`,Pe,[v(`h3`,null,u(h(l)(`agentProfiles.recruitment`)),1),V.value.recruitmentReason?(i(),b(`p`,Fe,u(V.value.recruitmentReason),1)):d(``,!0),v(`small`,null,u(Q(V.value.recruitedAt)),1)])):d(``,!0)]),!J.value&&!G.value.length&&!V.value.recruitmentReason&&!V.value.recruitedAt?(i(),b(`p`,Ie,u(h(l)(`agentProfiles.noExperience`)),1)):d(``,!0)]),v(`section`,Le,[v(`h2`,null,u(h(l)(`agentProfiles.collaborators`)),1),v(`ul`,Re,[(i(!0),b(p,null,t(Z.value,e=>(i(),b(`li`,{key:e.agentId},[y(N,{"space-id":m.value,"agent-id":e.agentId,name:W(e.agentId)},null,8,[`space-id`,`agent-id`,`name`]),v(`span`,null,u(h(l)(`agentProfiles.sharedTasks`,{count:e.count})),1)]))),128))]),!J.value&&!Z.value.length?(i(),b(`p`,ze,u(h(l)(`agentProfiles.noCollaborators`)),1)):d(``,!0)]),v(`footer`,Be,[Ue.value?(i(),x(h(E),{key:0,to:`/employees/${encodeURIComponent(Ue.value.id)}`},{default:o(()=>[e(u(h(l)(`agentProfiles.workbench`)),1)]),_:1},8,[`to`])):d(``,!0),y(h(E),{to:{path:`/project-agents/manage`,query:{agent:V.value.agentId}}},{default:o(()=>[e(u(h(l)(`agentProfiles.advanced`)),1)]),_:1},8,[`to`])])],64)):(i(),b(`p`,re,u(h(l)(`agentProfiles.unavailable`)),1))]))}});export{X as default};
|
|
1
|
+
import{C as e,F as t,H as n,M as r,N as i,T as a,V as o,Z as s,_ as c,a as l,at as u,b as d,d as f,h as p,m,nt as h,rt as g,u as _,v,w as y,x as b,y as x,z as S}from"./i18n-CIIxzhPZ.js";import{t as C}from"./console-CrhIK67Y.js";import{t as w}from"./GrowthLoading-DIwqGFSc.js";import{m as T}from"./useApi-CROJJdhE-fcdVGInY.js";import{t as E}from"./vue-router-BUX6njIv.js";import{a as D,n as O}from"./client-DTQ_tUr2.js";import{a as k}from"./catalog-JmKyJnKL.js";import{a as A,r as j,t as M}from"./profile-model-BQO4zNs9.js";import{t as N}from"./AgentName-BboCA-Fd.js";import{a as P,h as F,l as I,n as L}from"./task-evidence-DTiPCs7r.js";import{t as R}from"./agent-profile.css_vue_type_style_index_0_src_true_lang-DHOcWSe_.js";var z={key:1,class:`agent-locked-platforms`},B={key:2},V=[`disabled`],H={value:``},U=[`value`],W=[`value`],G=[`disabled`,`placeholder`],K=[`onUpdate:modelValue`,`disabled`],q={key:3,role:`alert`},J={key:4,role:`status`},Y=[`disabled`],ee=a({__name:`AgentProfileSettings`,props:{agent:{}},emits:[`saved`],setup(r,{emit:a}){let o=r,g=a,y=s([]),C=s(!1),T=s(!1),E=s(``),k=s(!1),A=``,j=s(``),M=s(``),N=s({judgment:``,taste:``,personality:``}),P=c(()=>o.agent.profile.executorPolicy?.mode===`locked`),F=c(()=>{let e=o.agent.profile.executorPolicy;return(e?.lockedExecutorIds?.length?e.lockedExecutorIds:(e?.allowList??[]).map(e=>e.executorId)).map(e=>y.value.find(t=>t.executorId===e)?.displayName||e)}),I=c(()=>y.value.filter(e=>e.registrationStatus===`registered`&&e.permissionStatus===`authorized`&&e.preflightStatus===`passed`&&e.workspacePermission&&e.healthStatus!==`unhealthy`&&(!e.healthRequired||e.healthStatus===`healthy`))),L=0;S(()=>`${o.agent.personalSpaceId}/${o.agent.agentId}`,async()=>{let e=o.agent,t=++L;M.value=e.profile.expectations??``,N.value={judgment:``,taste:``,personality:``,...e.profile.character},j.value=e.profile.executorPolicy?.preferredExecutorIds?.[0]??``,A=j.value,E.value=``,k.value=!1,T.value=!1,C.value=!0,y.value=[];try{let n=await O(`/api/executors?${new URLSearchParams({personalSpaceId:e.personalSpaceId})}`);t===L&&(y.value=Array.isArray(n)?n:n.executors)}catch{t===L&&(E.value=l(`agentProfiles.platformUnavailable`))}finally{t===L&&(C.value=!1)}},{immediate:!0});async function R(){if(T.value)return;let e=L,t=o.agent;T.value=!0,E.value=``,k.value=!1;let n=t.profile.executorPolicy;try{let r=await D(`/api/project-agents`,{personalSpaceId:t.personalSpaceId,personalProjectId:t.personalProjectId??null,agentId:t.agentId,profile:{...t.profile,character:{...N.value},expectations:M.value,executorPolicy:P.value||j.value===A?n:{...n,mode:`flexible`,preferredExecutorIds:j.value?[j.value]:[]}}});e===L&&(A=j.value,g(`saved`,r),k.value=!0)}catch(t){e===L&&(E.value=t instanceof Error?t.message:l(`agentProfiles.saveError`))}finally{e===L&&(T.value=!1)}}return(r,a)=>(i(),b(`form`,{class:`agent-simple-settings`,onSubmit:m(R,[`prevent`])},[v(`h3`,null,u(h(l)(`agentProfiles.settings`)),1),C.value?(i(),x(w,{key:0,variant:`compact`,label:h(l)(`agentProfiles.settingsLoading`)},null,8,[`label`])):P.value?(i(),b(`div`,z,[v(`h4`,null,u(h(l)(`agentProfiles.platform`)),1),v(`p`,null,u(F.value.join(` · `)||h(l)(`agentProfiles.platformUnavailable`)),1),v(`small`,null,u(h(l)(`agentProfiles.locked`)),1)])):(i(),b(`label`,B,[e(u(h(l)(`agentProfiles.platform`)),1),n(v(`select`,{"onUpdate:modelValue":a[0]||=e=>j.value=e,disabled:P.value||T.value},[v(`option`,H,u(h(l)(`agentProfiles.automatic`)),1),j.value&&!I.value.some(e=>e.executorId===j.value)?(i(),b(`option`,{key:0,value:j.value,disabled:``},u(h(l)(`agentProfiles.platformUnavailable`)),9,U)):d(``,!0),(i(!0),b(p,null,t(I.value,e=>(i(),b(`option`,{key:e.executorId,value:e.executorId},u(e.displayName||e.executorId),9,W))),128))],8,V),[[_,j.value]]),v(`small`,null,u(h(l)(P.value?`agentProfiles.locked`:`agentProfiles.platformHint`)),1)])),v(`label`,null,[e(u(h(l)(`agentProfiles.expectations`)),1),n(v(`textarea`,{"onUpdate:modelValue":a[1]||=e=>M.value=e,rows:`3`,maxlength:`4096`,disabled:T.value,placeholder:h(l)(`agentProfiles.expectationsPlaceholder`)},null,8,G),[[f,M.value]])]),v(`details`,null,[v(`summary`,null,u(h(l)(`agentProfiles.editCharacter`)),1),(i(),b(p,null,t([`judgment`,`taste`,`personality`],t=>v(`label`,{key:t},[e(u(h(l)(`agentProfiles.${t}`)),1),n(v(`textarea`,{"onUpdate:modelValue":e=>N.value[t]=e,rows:`2`,maxlength:`2048`,disabled:T.value},null,8,K),[[f,N.value[t]]])])),64))]),E.value?(i(),b(`p`,q,u(E.value),1)):d(``,!0),k.value?(i(),b(`p`,J,u(h(l)(`agentProfiles.saved`)),1)):d(``,!0),v(`button`,{class:`primary-button`,disabled:T.value||C.value,type:`submit`},[T.value?(i(),x(w,{key:0,variant:`inline`,label:h(l)(`agentProfiles.saving`)},null,8,[`label`])):(i(),b(p,{key:1},[e(u(h(l)(`agentProfiles.save`)),1)],64))],8,Y)],32))}}),te={class:`view agent-profile-page`},ne={key:1,class:`agent-profile-empty`,role:`alert`},re={key:2,class:`agent-profile-empty`},ie={class:`agent-resume-header`},ae={class:`agent-portrait`,"aria-hidden":`true`},oe={class:`agent-resume-intro`},se={class:`agent-resume-meta`},ce={class:`agent-profile-actions`},le=[`aria-expanded`],ue={class:`agent-resume-section`},de={class:`agent-character`},fe={key:0,class:`agent-expectation`},pe={class:`agent-strengths`},me={class:`agent-inline-skills`},he={key:0},ge={key:2,role:`status`},_e={class:`agent-resume-section`},ve={class:`agent-resume-list`},ye={key:0,class:`agent-muted`},be={key:1},xe={class:`agent-resume-list`},Se={class:`agent-resume-section`},Ce={class:`agent-section-heading`},we={key:0,role:`status`},Te={key:0,class:`agent-org-lead`},Ee={key:1,class:`agent-org-members`},De={key:2,class:`agent-muted`},Oe={key:0,class:`agent-muted`},ke={class:`agent-resume-section`},Ae={class:`agent-muted`},je={class:`agent-work-timeline`},Me={class:`agent-section-heading`},Ne={key:0},Pe={key:0},Fe={key:0},Ie={key:0,class:`agent-muted`},Le={class:`agent-resume-section`},Re={class:`agent-collaborators`},ze={key:0,class:`agent-muted`},Be={class:`agent-profile-footer`},X=a({__name:`AgentProfilePage`,setup(n){let a=T(),f=C(),m=c(()=>f.activePersonalSpace?.id??``),{agents:_,loading:D,error:z,load:B}=R(m),V=c(()=>a.params.spaceId===m.value?_.value.find(e=>e.personalSpaceId===m.value&&(e.agentId===a.params.agentId||e.legacyAgentIds?.includes(String(a.params.agentId)))):void 0),H=c(()=>(f.state?.personalProjects??[]).filter(e=>e.personal_space_id===m.value)),U=e=>H.value.find(t=>t.project_id===e)?.profile.name||e,W=e=>{let t=_.value.find(t=>t.agentId===e);return t?M(t):e},G=s([]),K=s(void 0),q=s([]),J=s(!1),Y=s(!1),X=s(!1),Z=c(()=>V.value?j(V.value.agentId,G.value):[]),Ve=c(()=>V.value?A({...V.value,assignments:K.value??V.value.assignments}):[]),He=c(()=>(K.value??[]).filter(e=>e.status!==`active`)),Ue=c(()=>k.value.find(e=>e.agentId===V.value?.agentId)),Q=e=>e&&!Number.isNaN(Date.parse(e))?new Date(e).toLocaleDateString():l(`agentProfiles.timeUnknown`),$=0;S(()=>V.value?`${V.value.personalSpaceId}/${V.value.agentId}`:``,async()=>{let e=V.value,t=++$;if(G.value=[],K.value=void 0,q.value=[],Y.value=!1,J.value=!1,X.value=!1,!e)return;J.value=!0,K.value=e.assignments;let n=new URLSearchParams({personalSpaceId:e.personalSpaceId,agentId:e.agentId}),r=await Promise.allSettled([O(`/api/project-agent-tasks?${n}&limit=200`),O(`/api/project-agent-assignments?${n}`)]);if(t!==$)return;let[i,a]=r;if(i.status===`fulfilled`){let t=i.value,n=F(t);G.value=L(Array.isArray(t)?t:n.tasks??n.items).map(I).filter(t=>!!(t&&(!t.personalSpaceId||t.personalSpaceId===e.personalSpaceId)&&t.participants.some(t=>t.agentId===e.agentId))).sort((e,t)=>(t.updatedAt??t.createdAt??``).localeCompare(e.updatedAt??e.createdAt??``))}else Y.value=!0;if(a.status===`fulfilled`){let t=a.value,n=F(t);K.value=L(Array.isArray(t)?t:n.assignments??n.items).map(t=>P(t,e)).filter(t=>!!(t&&t.agentId===e.agentId&&t.personalSpaceId===e.personalSpaceId))}else Y.value=!0;let o=A({...e,assignments:K.value??e.assignments}),s=await Promise.all(o.map(async t=>{try{return{projectId:t,policy:await O(`/api/project-agent-coordination-policy?${new URLSearchParams({personalSpaceId:e.personalSpaceId,personalProjectId:t})}`),error:!1}}catch{return{projectId:t,policy:null,error:!0}}}));t===$&&(q.value=s,J.value=!1)},{immediate:!0});function We(e){let t=_.value.findIndex(t=>t.agentId===e.agentId);t>=0&&(_.value[t]={..._.value[t],...e})}return r(()=>{f.runtimeStatus===`idle`&&f.refresh()}),(n,r)=>(i(),b(`section`,te,[y(h(E),{class:`agent-profile-back`,to:`/project-agents`},{default:o(()=>[e(`← `+u(h(l)(`agentProfiles.back`)),1)]),_:1}),h(D)||h(f).runtimeStatus===`loading`?(i(),x(w,{key:0,label:h(l)(`agentProfiles.loading`)},null,8,[`label`])):h(z)||h(f).runtimeStatus===`error`?(i(),b(`div`,ne,[v(`p`,null,u(h(z)||h(l)(`agentProfiles.loadError`)),1),v(`button`,{onClick:r[0]||=e=>h(f).state?h(B)():h(f).refresh()},u(h(l)(`agentProfiles.retry`)),1)])):V.value?(i(),b(p,{key:3},[v(`header`,ie,[v(`span`,ae,u(V.value.profile.occupationEmoji||h(M)(V.value).slice(0,1)),1),v(`div`,oe,[v(`h1`,null,u(h(M)(V.value)),1),v(`p`,null,u(V.value.profile.responsibility),1),v(`div`,se,[v(`span`,null,u(h(l)(`projectAgents.status.${V.value.profile.status}`)),1),v(`span`,null,u(h(l)(V.value.recruitedAt?`agentProfiles.joined`:`agentProfiles.created`))+` · `+u(Q(V.value.recruitedAt||V.value.createdAt)),1)])]),v(`div`,ce,[v(`button`,{class:`quiet-button`,"aria-expanded":X.value,onClick:r[1]||=e=>X.value=!X.value},u(h(l)(`agentProfiles.settings`)),9,le),y(h(E),{to:{path:`/employees/bole`,query:{q:h(M)(V.value)}}},{default:o(()=>[e(u(h(l)(`agentProfiles.askHR`)),1)]),_:1},8,[`to`])])]),X.value?(i(),x(ee,{key:V.value.agentId,agent:V.value,onSaved:We},null,8,[`agent`])):d(``,!0),v(`section`,ue,[v(`h2`,null,u(h(l)(`agentProfiles.about`)),1),v(`div`,de,[(i(),b(p,null,t([`judgment`,`taste`,`personality`],e=>v(`div`,{key:e},[v(`h3`,null,u(h(l)(`agentProfiles.${e}`)),1),v(`p`,{class:g({"agent-muted":!V.value.profile.character?.[e]})},u(V.value.profile.character?.[e]||h(l)(`agentProfiles.characterEmpty`)),3)])),64))]),V.value.profile.expectations?(i(),b(`p`,fe,[v(`strong`,null,u(h(l)(`agentProfiles.expectations`)),1),e(u(V.value.profile.expectations),1)])):d(``,!0),v(`div`,pe,[v(`h3`,null,u(h(l)(`agentProfiles.strengths`)),1),v(`div`,me,[(i(!0),b(p,null,t(V.value.profile.capabilities,e=>(i(),b(`span`,{key:e},u(e),1))),128)),V.value.profile.capabilities.length?d(``,!0):(i(),b(`span`,he,u(h(l)(`agentProfiles.noSkills`)),1))])])]),J.value?(i(),x(w,{key:1,variant:`compact`,label:h(l)(`agentProfiles.detailLoading`)},null,8,[`label`])):d(``,!0),Y.value?(i(),b(`p`,ge,u(h(l)(`agentProfiles.partial`)),1)):d(``,!0),v(`section`,_e,[v(`h2`,null,u(h(l)(`agentProfiles.projects`)),1),v(`ul`,ve,[(i(!0),b(p,null,t(Ve.value,e=>(i(),b(`li`,{key:e},[v(`h3`,null,u(U(e)),1),v(`p`,null,u(K.value?.find(t=>t.personalProjectId===e&&t.status===`active`)?.responsibility||V.value.profile.responsibility),1)]))),128))]),!J.value&&!Ve.value.length?(i(),b(`p`,ye,u(h(l)(`agentProfiles.noProject`)),1)):d(``,!0),He.value.length?(i(),b(`details`,be,[v(`summary`,null,u(h(l)(`agentProfiles.projectHistory`)),1),v(`ul`,xe,[(i(!0),b(p,null,t(He.value,e=>(i(),b(`li`,{key:e.assignmentId},[v(`h3`,null,u(U(e.personalProjectId)),1),v(`p`,null,u(e.responsibility),1),v(`small`,null,u(Q(e.assignedAt))+` – `+u(Q(e.endedAt)),1)]))),128))])])):d(``,!0)]),v(`section`,Se,[v(`div`,Ce,[v(`h2`,null,u(h(l)(`agentProfiles.organization`)),1),y(h(E),{to:{path:`/employees/bole`,query:{q:h(M)(V.value)}}},{default:o(()=>[e(u(h(l)(`agentProfiles.hr`)),1)]),_:1},8,[`to`])]),(i(!0),b(p,null,t(q.value,e=>(i(),b(`div`,{key:e.projectId,class:`agent-organization`},[v(`h3`,null,u(U(e.projectId)),1),e.error?(i(),b(`p`,we,u(h(l)(`agentProfiles.teamUnavailable`)),1)):e.policy?.teamLeadAgentId||e.policy?.teamMemberAgentIds?.length?(i(),b(p,{key:1},[e.policy.teamLeadAgentId?(i(),b(`div`,Te,[v(`span`,null,u(h(l)(`agentProfiles.lead`)),1),y(N,{"space-id":m.value,"agent-id":e.policy.teamLeadAgentId,name:W(e.policy.teamLeadAgentId)},null,8,[`space-id`,`agent-id`,`name`])])):d(``,!0),e.policy.teamMemberAgentIds?.length?(i(),b(`div`,Ee,[v(`span`,null,u(h(l)(`agentProfiles.teammates`)),1),v(`ul`,null,[(i(!0),b(p,null,t([...new Set(e.policy.teamMemberAgentIds)].filter(t=>t!==e.policy?.teamLeadAgentId),e=>(i(),b(`li`,{key:e},[y(N,{"space-id":m.value,"agent-id":e,name:W(e)},null,8,[`space-id`,`agent-id`,`name`])]))),128))])])):d(``,!0)],64)):(i(),b(`p`,De,u(h(l)(`agentProfiles.teamUnset`)),1))]))),128)),!J.value&&!q.value.length?(i(),b(`p`,Oe,u(h(l)(`agentProfiles.noProject`)),1)):d(``,!0)]),v(`section`,ke,[v(`h2`,null,u(h(l)(`agentProfiles.experience`)),1),v(`p`,Ae,u(h(l)(`agentProfiles.recent`)),1),v(`ol`,je,[(i(!0),b(p,null,t(G.value.slice(0,12),t=>(i(),b(`li`,{key:t.taskId},[v(`div`,Me,[y(h(E),{to:{path:`/project-agents/manage`,query:{agent:V.value.agentId,task:t.taskId}}},{default:o(()=>[e(u(t.title),1)]),_:2},1032,[`to`]),v(`span`,null,u(h(l)(`projectAgents.taskStatus.${t.status}`)),1)]),t.resultSummary?(i(),b(`p`,Ne,u(t.resultSummary),1)):d(``,!0),v(`small`,null,u(Q(t.completedAt||t.updatedAt||t.createdAt)),1)]))),128)),V.value.recruitedAt||V.value.recruitmentReason?(i(),b(`li`,Pe,[v(`h3`,null,u(h(l)(`agentProfiles.recruitment`)),1),V.value.recruitmentReason?(i(),b(`p`,Fe,u(V.value.recruitmentReason),1)):d(``,!0),v(`small`,null,u(Q(V.value.recruitedAt)),1)])):d(``,!0)]),!J.value&&!G.value.length&&!V.value.recruitmentReason&&!V.value.recruitedAt?(i(),b(`p`,Ie,u(h(l)(`agentProfiles.noExperience`)),1)):d(``,!0)]),v(`section`,Le,[v(`h2`,null,u(h(l)(`agentProfiles.collaborators`)),1),v(`ul`,Re,[(i(!0),b(p,null,t(Z.value,e=>(i(),b(`li`,{key:e.agentId},[y(N,{"space-id":m.value,"agent-id":e.agentId,name:W(e.agentId)},null,8,[`space-id`,`agent-id`,`name`]),v(`span`,null,u(h(l)(`agentProfiles.sharedTasks`,{count:e.count})),1)]))),128))]),!J.value&&!Z.value.length?(i(),b(`p`,ze,u(h(l)(`agentProfiles.noCollaborators`)),1)):d(``,!0)]),v(`footer`,Be,[Ue.value?(i(),x(h(E),{key:0,to:`/employees/${encodeURIComponent(Ue.value.id)}`},{default:o(()=>[e(u(h(l)(`agentProfiles.workbench`)),1)]),_:1},8,[`to`])):d(``,!0),y(h(E),{to:{path:`/project-agents/manage`,query:{agent:V.value.agentId}}},{default:o(()=>[e(u(h(l)(`agentProfiles.advanced`)),1)]),_:1},8,[`to`])])],64)):(i(),b(`p`,re,u(h(l)(`agentProfiles.unavailable`)),1))]))}});export{X as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,F as t,H as n,M as r,N as i,T as a,V as o,Z as s,_ as c,a as l,at as u,b as d,d as ee,h as f,nt as p,u as te,v as m,w as h,x as g,y as _,z as v}from"./i18n-CIIxzhPZ.js";import{t as ne}from"./console-CrhIK67Y.js";import{t as re}from"./GrowthLoading-DIwqGFSc.js";import{h as ie,m as y}from"./useApi-CROJJdhE-fcdVGInY.js";import{t as b}from"./vue-router-BUX6njIv.js";import{t as ae}from"./AgentHand-CsMcNXUm.js";import{a as x,i as oe,n as S,t as C}from"./profile-model-BQO4zNs9.js";import{t as se}from"./AgentName-BboCA-Fd.js";import{t as ce}from"./agent-profile.css_vue_type_style_index_0_src_true_lang-DHOcWSe_.js";import{t as le}from"./ProjectAgentFirstTask-DF-IvEqp.js";import{t as ue}from"./ProjectScopePicker-CZUMdyYz.js";import{t as de}from"./EmployeeRecruitDialog-DP_ktv3w.js";var fe={class:`view agents-directory`},pe={class:`agents-directory-heading`},me={key:0},he={class:`agent-profile-actions`},ge=[`disabled`],w={class:`agents-directory-filters`},T={class:`agents-directory-search`},E={class:`sr-only`},D=[`placeholder`],O=[`aria-label`],k={value:`all`},A=[`value`],j={key:2,role:`alert`,class:`agent-profile-empty`},M={key:3,class:`agent-profile-empty`},N={key:4,class:`agents-directory-list`},P={class:`agent-portrait small`,"aria-hidden":`true`},F={class:`agent-directory-person`},I={class:`agent-directory-name`},L={class:`agent-inline-skills`},_e={class:`agent-directory-projects`},ve={key:0},ye={class:`agent-directory-status`},R=a({__name:`AgentsDirectoryPage`,setup(a){let R=ne(),z=y(),B=ie(),V=c(()=>R.activePersonalSpace?.id??``),{agents:H,loading:be,error:U,load:xe}=ce(V),W=s(typeof z.query.q==`string`?z.query.q:``),G=s(`all`),K=s(typeof z.query.project==`string`?[z.query.project]:null),q=s(!1),J=c(()=>(R.state?.personalProjects??[]).filter(e=>e.personal_space_id===V.value)),Y=c(()=>J.value.map(e=>({id:e.project_id,name:e.profile.name}))),X=c({get:()=>K.value??Y.value.map(e=>e.id),set:e=>{K.value=e.length===Y.value.length?null:e}}),Z=c(()=>new Map(Y.value.map(e=>[e.id,e.name]))),Q=c(()=>H.value.filter(e=>(G.value===`all`||e.profile.status===G.value)&&(K.value===null||x(e).some(e=>K.value.includes(e)))&&oe([C(e),e.profile.responsibility,...e.profile.capabilities,...x(e).map(e=>Z.value.get(e)||e)].join(` `),W.value)).sort((e,t)=>C(e).localeCompare(C(t)))),$=c(()=>be.value||R.runtimeStatus===`loading`);r(()=>{R.runtimeStatus===`idle`&&R.refresh()}),v([V,()=>z.query.agent],([e,t])=>{if(e&&typeof t==`string`){let{agent:n,...r}=z.query;B.replace({path:typeof z.query.task==`string`?`/project-agents/manage`:S(e,t),query:typeof z.query.task==`string`?z.query:r})}},{immediate:!0}),v(V,(e,t)=>{t&&(W.value=``,K.value=null,G.value=`all`)});async function Se(e){q.value=!1,await B.push(S(V.value,e.agent.agentId))}return(r,a)=>(i(),g(`section`,fe,[m(`header`,pe,[m(`div`,null,[m(`h2`,null,u(p(l)(`agentProfiles.title`)),1),$.value?d(``,!0):(i(),g(`p`,me,u(p(l)(`agentProfiles.members`,{count:p(H).length})),1))]),m(`div`,he,[h(p(b),{class:`quiet-button`,to:`/employees/bole`},{default:o(()=>[e(u(p(l)(`agentProfiles.hr`)),1)]),_:1}),m(`button`,{type:`button`,class:`primary-button`,disabled:!V.value,onClick:a[0]||=e=>q.value=!0},u(p(l)(`employees.recruit`)),9,ge)])]),!$.value&&!p(U)&&p(R).runtimeStatus===`ready`&&!J.value.length?(i(),_(le,{key:0,"personal-space-id":V.value},null,8,[`personal-space-id`])):d(``,!0),m(`div`,w,[m(`label`,T,[m(`span`,E,u(p(l)(`agentProfiles.search`)),1),n(m(`input`,{"onUpdate:modelValue":a[1]||=e=>W.value=e,type:`search`,maxlength:`160`,placeholder:p(l)(`agentProfiles.search`)},null,8,D),[[ee,W.value]])]),h(ue,{modelValue:X.value,"onUpdate:modelValue":a[2]||=e=>X.value=e,projects:Y.value,label:p(l)(`employees.filterLabel`),"empty-label":p(l)(`employees.filterEmpty`),compact:``,hint:``},null,8,[`modelValue`,`projects`,`label`,`empty-label`]),n(m(`select`,{"onUpdate:modelValue":a[3]||=e=>G.value=e,"aria-label":p(l)(`projectAgents.fields.status`)},[m(`option`,k,u(p(l)(`agentProfiles.allStatus`)),1),(i(),g(f,null,t([`active`,`inactive`,`archived`],e=>m(`option`,{key:e,value:e},u(p(l)(`projectAgents.status.${e}`)),9,A)),64))],8,O),[[te,G.value]])]),$.value?(i(),_(re,{key:1,label:p(l)(`agentProfiles.loading`)},null,8,[`label`])):p(U)||p(R).runtimeStatus===`error`?(i(),g(`div`,j,[m(`p`,null,u(p(U)||p(l)(`agentProfiles.loadError`)),1),m(`button`,{class:`quiet-button`,onClick:a[4]||=e=>p(R).state?p(xe)():p(R).refresh()},u(p(l)(`agentProfiles.retry`)),1)])):Q.value.length?(i(),g(`ul`,N,[(i(!0),g(f,null,t(Q.value,e=>(i(),g(`li`,{key:e.agentId},[m(`span`,P,u(e.profile.occupationEmoji||p(C)(e).slice(0,1)),1),m(`div`,F,[m(`div`,I,[h(se,{"space-id":V.value,"agent-id":e.agentId,name:p(C)(e)},null,8,[`space-id`,`agent-id`,`name`]),h(ae,{"agent-id":e.agentId},null,8,[`agent-id`])]),m(`p`,null,u(e.profile.responsibility),1),m(`div`,L,[(i(!0),g(f,null,t(e.profile.capabilities.slice(0,3),e=>(i(),g(`span`,{key:e},u(e),1))),128))])]),m(`div`,_e,[(i(!0),g(f,null,t(p(x)(e).slice(0,2),e=>(i(),g(`span`,{key:e},u(Z.value.get(e)||e),1))),128)),p(x)(e).length?d(``,!0):(i(),g(`span`,ve,u(p(l)(`agentProfiles.noProject`)),1))]),m(`span`,ye,u(p(l)(`projectAgents.status.${e.profile.status}`)),1),h(p(b),{class:`agent-directory-open`,to:p(S)(V.value,e.agentId),"aria-label":`${p(C)(e)} · ${p(l)(`agentProfiles.profile`)}`},{default:o(()=>[...a[6]||=[m(`svg`,{viewBox:`0 0 20 20`,width:`20`,height:`20`,"aria-hidden":`true`},[m(`path`,{d:`m7 4 6 6-6 6`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`})],-1)]]),_:1},8,[`to`,`aria-label`])]))),128))])):(i(),g(`p`,M,u(p(l)(p(H).length?`agentProfiles.noMatch`:`agentProfiles.noAgents`)),1)),h(de,{open:q.value,"personal-space-id":V.value,projects:J.value,"default-project-ids":K.value??[],onClose:a[5]||=e=>q.value=!1,onRecruited:Se},null,8,[`open`,`personal-space-id`,`projects`,`default-project-ids`])]))}});export{R as default};
|