fuli-context 0.7.2 → 0.7.4-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 +173 -21
- package/README.zh-CN.md +146 -12
- package/compose.graphiti.yml +2 -0
- package/dist/web/assets/{AboutPage-DfnZo7Lo.js → AboutPage-CftRexSY.js} +1 -1
- package/dist/web/assets/{ConnectionsPage-BloaSKmt.js → ConnectionsPage-D5J91x6d.js} +1 -1
- package/dist/web/assets/{useMinimumLoadingDisplay-BpCyBeko.css → KnowledgeEditDialog-DWUV_NPp.css} +1 -1
- package/dist/web/assets/KnowledgeEditDialog-wotVahvr.js +1 -0
- package/dist/web/assets/{KnowledgeInspector-Bjhdu2mf.css → KnowledgeInspector--1NujtXW.css} +1 -1
- package/dist/web/assets/KnowledgeInspector-BzkW0mVs.js +1 -0
- package/dist/web/assets/KnowledgeOrganizerPage-BebUDiHt.js +1 -0
- package/dist/web/assets/KnowledgePage-OUT07aKH.js +1 -0
- package/dist/web/assets/KnowledgeWorkspace-1pHJ0MNZ.js +4 -0
- package/dist/web/assets/OverviewPage-CHE6XhdS.js +1 -0
- package/dist/web/assets/PersonalProfilePage-B7T09bow.css +1 -0
- package/dist/web/assets/PersonalProfilePage-CXXiabUy.js +1 -0
- package/dist/web/assets/PersonalProjectsPage-d2wYGW8n.js +1 -0
- package/dist/web/assets/PublicProjectsPage-hxLShtnZ.js +1 -0
- package/dist/web/assets/{ReviewPage-B7EN817i.js → ReviewPage-DUeyu7E8.js} +1 -1
- package/dist/web/assets/{SearchableSelect-ClLN0rIb.js → SearchableSelect-C5RiB5F8.js} +1 -1
- package/dist/web/assets/SettingsPage-BMuASSzQ.js +1 -0
- package/dist/web/assets/SettingsPage-CAfz4qiV.css +1 -0
- package/dist/web/assets/WritingTastePage-B9BCYIwQ.js +1 -0
- package/dist/web/assets/WritingTastePage-DSgvTH6x.css +1 -0
- package/dist/web/assets/{console-CbDsKrsO.js → console-DMvHxKf9.js} +1 -1
- package/dist/web/assets/conversation-launcher-settings-Dnlcw7Rj.js +1 -0
- package/dist/web/assets/{i18n-BQcns1PH.js → i18n-CWfd8Dtt.js} +1 -1
- package/dist/web/assets/{identity-B8K4VYg6.js → identity-C9mLdR8L.js} +1 -1
- package/dist/web/assets/index-F5e2sQ7p.js +2 -0
- package/dist/web/assets/index-X2j29j8i.css +1 -0
- package/dist/web/assets/{model-eF52GgPF.js → model-CsYAR8O3.js} +1 -1
- package/dist/web/assets/paths-CDREouhi.js +1 -0
- package/dist/web/assets/useApi-CROJJdhE-BLQiPVw0.js +1 -0
- package/dist/web/assets/vue-router-DN8x6iY1.js +1 -0
- package/dist/web/index.html +7 -6
- package/graph-provider/fuli_graph/app.py +238 -2
- package/graph-provider/fuli_graph/auth.py +18 -0
- package/graph-provider/fuli_graph/collaboration_context.py +253 -17
- package/graph-provider/fuli_graph/common_knowledge.py +6 -2
- package/graph-provider/fuli_graph/config.py +5 -0
- package/graph-provider/fuli_graph/graph_models.py +6 -0
- package/graph-provider/fuli_graph/graph_projection.py +14 -0
- package/graph-provider/fuli_graph/graph_query.py +27 -3
- package/graph-provider/fuli_graph/knowledge_management.py +19 -1
- package/graph-provider/fuli_graph/knowledge_review.py +49 -4
- package/graph-provider/fuli_graph/knowledge_review_models.py +11 -5
- package/graph-provider/fuli_graph/knowledge_search.py +11 -0
- package/graph-provider/fuli_graph/models.py +15 -2
- package/graph-provider/fuli_graph/personal_global_preference_models.py +234 -0
- package/graph-provider/fuli_graph/personal_global_preferences.py +1247 -0
- package/graph-provider/fuli_graph/project_action_models.py +22 -0
- package/graph-provider/fuli_graph/project_knowledge.py +121 -2
- package/graph-provider/fuli_graph/provider_values.py +24 -0
- package/graph-provider/fuli_graph/runtime.py +78 -0
- package/graph-provider/fuli_graph/search_projection.py +14 -1
- package/graph-provider/fuli_graph/store_knowledge.py +116 -2
- package/graph-provider/fuli_graph/workflow_candidate_models.py +168 -0
- package/graph-provider/fuli_graph/workflow_candidates.py +996 -0
- package/graph-provider/fuli_graph/workflow_observation_models.py +30 -0
- package/graph-provider/fuli_graph/workflow_observations.py +84 -0
- package/graph-provider/pyproject.toml +1 -1
- package/npm-shrinkwrap.json +18 -18
- package/package.json +4 -4
- package/skills/capturing-session-knowledge/SKILL.md +32 -5
- package/skills/flreview/SKILL.md +68 -40
- package/skills/flreview/agents/openai.yaml +2 -2
- package/src/agent-tools/graph-definitions.js +140 -24
- package/src/agent-tools/graph-handlers.js +10 -4
- package/src/cli/command-registry.js +1 -1
- package/src/cli/local-runtime-command.js +69 -2
- package/src/graphiti/agent-knowledge-workflows.js +497 -16
- package/src/graphiti/collaboration-preference-projection.js +162 -0
- package/src/graphiti/federated-application.js +157 -162
- package/src/graphiti/federated-search-support.js +102 -0
- package/src/graphiti/knowledge-provider-mapping.js +15 -0
- package/src/graphiti/provider-client.js +162 -10
- package/src/graphiti/related-project-suggestions.js +109 -0
- package/src/graphiti/runtime-config.js +14 -0
- package/src/graphiti/source-marker.js +2 -2
- package/src/graphiti/user-taste-skill.js +241 -0
- package/src/graphiti/workflow-candidate-mapping.js +87 -0
- package/src/graphiti/workflow-observation.js +82 -0
- package/src/graphiti/writing-taste-profile-workflow.js +25 -0
- package/src/graphiti/writing-taste-profile.js +490 -0
- package/src/http/graph-api-router.js +15 -2
- package/src/mcp/context-resources.js +158 -0
- package/src/mcp/create-mcp-server.js +41 -5
- package/src/mcp/instructions.js +5 -7
- package/src/mcp/session-id.js +60 -0
- package/src/mcp/task-context-registry.js +15 -3
- package/src/mcp/tool-annotations.js +8 -1
- package/src/mcp/tool-result.js +28 -4
- package/src/server.js +0 -1
- package/src/setup/claude-code-config.js +17 -6
- package/src/setup/graph-runtime.js +20 -2
- package/src/system/runtime-settings.js +121 -2
- package/src/system/system-service.js +5 -1
- package/README.en.md +0 -5
- package/dist/web/assets/KnowledgeInspector-QvNpv0_k.js +0 -1
- package/dist/web/assets/KnowledgeOrganizerPage-DKq1jVD5.js +0 -1
- package/dist/web/assets/KnowledgePage-BWL0jT01.js +0 -1
- package/dist/web/assets/KnowledgeWorkspace-Czq6aZ7b.js +0 -4
- package/dist/web/assets/OverviewPage-5sJoO1Gh.js +0 -1
- package/dist/web/assets/PersonalProfilePage-CdmEzyvZ.css +0 -1
- package/dist/web/assets/PersonalProfilePage-tVChM9ik.js +0 -1
- package/dist/web/assets/PersonalProjectsPage-BPFrup4V.js +0 -1
- package/dist/web/assets/PublicProjectsPage-BPJSeREN.js +0 -1
- package/dist/web/assets/SettingsPage-C6ouU0sR.css +0 -1
- package/dist/web/assets/SettingsPage-Chd_B3eH.js +0 -1
- package/dist/web/assets/index-CB8Xmsc2.js +0 -2
- package/dist/web/assets/index-CZeuPh-U.css +0 -1
- package/dist/web/assets/paths-hwz-Ac1g.js +0 -1
- package/dist/web/assets/useMinimumLoadingDisplay-wCgGDmHg.js +0 -1
- package/dist/web/assets/vue-router-BsEp_XwI.js +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import Literal
|
|
3
|
+
|
|
4
|
+
from pydantic import Field
|
|
5
|
+
|
|
6
|
+
from .models import StrictModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class WorkflowObservedStep(StrictModel):
|
|
10
|
+
action_id: str = Field(min_length=1, max_length=256)
|
|
11
|
+
name: str = Field(min_length=1, max_length=512)
|
|
12
|
+
summary: str | None = Field(default=None, min_length=1, max_length=4096)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class WorkflowTransitionObservation(StrictModel):
|
|
16
|
+
personal_space_id: str = Field(min_length=1, max_length=128)
|
|
17
|
+
personal_project_id: str | None = Field(default=None, min_length=1, max_length=128)
|
|
18
|
+
host_session_id: str = Field(min_length=1, max_length=256)
|
|
19
|
+
observation_id: str = Field(min_length=8, max_length=256)
|
|
20
|
+
from_step: WorkflowObservedStep
|
|
21
|
+
to_step: WorkflowObservedStep
|
|
22
|
+
workflow_key: str = Field(min_length=1, max_length=256)
|
|
23
|
+
condition: dict[str, object] = Field(default_factory=dict)
|
|
24
|
+
observed_at: datetime
|
|
25
|
+
evidence_summary: str = Field(min_length=1, max_length=2048)
|
|
26
|
+
source_application: Literal[
|
|
27
|
+
'codex', 'claude_code', 'cursor', 'kiro', 'other'
|
|
28
|
+
] | None = None
|
|
29
|
+
source_turn_id: str | None = Field(default=None, min_length=1, max_length=256)
|
|
30
|
+
sensitivity: Literal['normal', 'private', 'restricted'] = 'normal'
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
from .models import KnowledgeCommit
|
|
2
|
+
from .workflow_observation_models import WorkflowTransitionObservation
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
async def record_workflow_transition_observation(
|
|
6
|
+
store,
|
|
7
|
+
actor: dict,
|
|
8
|
+
request: WorkflowTransitionObservation,
|
|
9
|
+
):
|
|
10
|
+
basis = {
|
|
11
|
+
'existence_reason': (
|
|
12
|
+
'An Agent reported one completed-action transition through the MCP seam.'
|
|
13
|
+
),
|
|
14
|
+
'quadrant_reason': (
|
|
15
|
+
'Behavioral sequence evidence is not user consent or authorization.'
|
|
16
|
+
),
|
|
17
|
+
'proposed_by': {
|
|
18
|
+
'kind': 'agent',
|
|
19
|
+
'label': 'mcp-host-workflow-observer',
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
commit = KnowledgeCommit.model_validate({
|
|
23
|
+
'space_id': request.personal_space_id,
|
|
24
|
+
'personal_project_id': request.personal_project_id,
|
|
25
|
+
'episode': {
|
|
26
|
+
'idempotency_key': request.observation_id,
|
|
27
|
+
'session_id': request.host_session_id,
|
|
28
|
+
'name': (
|
|
29
|
+
f'Observed {request.from_step.name} then {request.to_step.name}'
|
|
30
|
+
)[:512],
|
|
31
|
+
'source_kind': 'workflow_action_observation',
|
|
32
|
+
'source_description': (
|
|
33
|
+
'One Agent-reported action transition submitted through the Fuli MCP host.'
|
|
34
|
+
),
|
|
35
|
+
'source_application': request.source_application or 'other',
|
|
36
|
+
'source_turn_id': request.source_turn_id,
|
|
37
|
+
'reference_time': request.observed_at,
|
|
38
|
+
'summary': request.evidence_summary,
|
|
39
|
+
'sensitivity': request.sensitivity,
|
|
40
|
+
'entities': [
|
|
41
|
+
_workflow_step(request.from_step, basis),
|
|
42
|
+
_workflow_step(request.to_step, basis),
|
|
43
|
+
],
|
|
44
|
+
'relationships': [{
|
|
45
|
+
'key': request.workflow_key,
|
|
46
|
+
'source': request.from_step.action_id,
|
|
47
|
+
'target': request.to_step.action_id,
|
|
48
|
+
'type': 'RECOMMENDS_NEXT',
|
|
49
|
+
'fact': request.evidence_summary,
|
|
50
|
+
'valid_at': request.observed_at,
|
|
51
|
+
'origin_quadrant': 'unknown_known',
|
|
52
|
+
'current_quadrant': 'unknown_known',
|
|
53
|
+
'epistemic_status': 'observed',
|
|
54
|
+
'confirmation_status': 'pending',
|
|
55
|
+
'confirmation_basis': basis,
|
|
56
|
+
'reasoning_summary': (
|
|
57
|
+
'Agent-reported transition; the MCP host attests only '
|
|
58
|
+
'session, time, and observation identity; no authority.'
|
|
59
|
+
),
|
|
60
|
+
'attributes': {
|
|
61
|
+
'workflowCondition': request.condition,
|
|
62
|
+
'observationKind': 'completed_action_transition',
|
|
63
|
+
},
|
|
64
|
+
}],
|
|
65
|
+
},
|
|
66
|
+
})
|
|
67
|
+
return await store.commit_workflow_observation(actor, commit)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _workflow_step(step, basis: dict) -> dict:
|
|
71
|
+
return {
|
|
72
|
+
'key': step.action_id,
|
|
73
|
+
'name': step.name,
|
|
74
|
+
'type': 'WorkflowStep',
|
|
75
|
+
'summary': step.summary or f'Reported completed action: {step.name}',
|
|
76
|
+
'origin_quadrant': 'unknown_known',
|
|
77
|
+
'current_quadrant': 'unknown_known',
|
|
78
|
+
'epistemic_status': 'observed',
|
|
79
|
+
'confirmation_status': 'pending',
|
|
80
|
+
'confirmation_basis': basis,
|
|
81
|
+
'reasoning_summary': (
|
|
82
|
+
'The Agent reported the action completion; reuse remains unconfirmed.'
|
|
83
|
+
),
|
|
84
|
+
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fuli-context",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4-beta.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "fuli-context",
|
|
9
|
-
"version": "0.7.
|
|
9
|
+
"version": "0.7.4-beta.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@hono/node-server": "2.0.12",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@types/node": "^24.13.3",
|
|
23
23
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
24
24
|
"@vue/test-utils": "^2.4.11",
|
|
25
|
-
"brace-expansion": "5.0.
|
|
25
|
+
"brace-expansion": "5.0.9",
|
|
26
26
|
"d3": "^7.9.0",
|
|
27
27
|
"gsap": "^3.15.0",
|
|
28
28
|
"jsdom": "^29.1.1",
|
|
@@ -1868,9 +1868,9 @@
|
|
|
1868
1868
|
"license": "ISC"
|
|
1869
1869
|
},
|
|
1870
1870
|
"node_modules/brace-expansion": {
|
|
1871
|
-
"version": "5.0.
|
|
1872
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.
|
|
1873
|
-
"integrity": "sha512-
|
|
1871
|
+
"version": "5.0.9",
|
|
1872
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
|
|
1873
|
+
"integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
|
|
1874
1874
|
"dev": true,
|
|
1875
1875
|
"license": "MIT",
|
|
1876
1876
|
"dependencies": {
|
|
@@ -2950,9 +2950,9 @@
|
|
|
2950
2950
|
"license": "MIT"
|
|
2951
2951
|
},
|
|
2952
2952
|
"node_modules/fast-uri": {
|
|
2953
|
-
"version": "3.1.
|
|
2954
|
-
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.
|
|
2955
|
-
"integrity": "sha512-
|
|
2953
|
+
"version": "3.1.5",
|
|
2954
|
+
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz",
|
|
2955
|
+
"integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==",
|
|
2956
2956
|
"funding": [
|
|
2957
2957
|
{
|
|
2958
2958
|
"type": "github",
|
|
@@ -3165,9 +3165,9 @@
|
|
|
3165
3165
|
}
|
|
3166
3166
|
},
|
|
3167
3167
|
"node_modules/hono": {
|
|
3168
|
-
"version": "4.
|
|
3169
|
-
"resolved": "https://registry.npmjs.org/hono/-/hono-4.
|
|
3170
|
-
"integrity": "sha512-
|
|
3168
|
+
"version": "4.13.0",
|
|
3169
|
+
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.0.tgz",
|
|
3170
|
+
"integrity": "sha512-jhunvfHWxd7J5EFfSgH4xsYJzSe/lfqbUCxiyyeaQasUsXeEHXtzVid+7EOGByc5JnFa23SSFL3Y2RV/z1T+eQ==",
|
|
3171
3171
|
"license": "MIT",
|
|
3172
3172
|
"engines": {
|
|
3173
3173
|
"node": ">=16.9.0"
|
|
@@ -4338,9 +4338,9 @@
|
|
|
4338
4338
|
}
|
|
4339
4339
|
},
|
|
4340
4340
|
"node_modules/postcss": {
|
|
4341
|
-
"version": "8.5.
|
|
4342
|
-
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.
|
|
4343
|
-
"integrity": "sha512-
|
|
4341
|
+
"version": "8.5.25",
|
|
4342
|
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.25.tgz",
|
|
4343
|
+
"integrity": "sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==",
|
|
4344
4344
|
"dev": true,
|
|
4345
4345
|
"funding": [
|
|
4346
4346
|
{
|
|
@@ -5085,9 +5085,9 @@
|
|
|
5085
5085
|
"license": "ISC"
|
|
5086
5086
|
},
|
|
5087
5087
|
"node_modules/undici": {
|
|
5088
|
-
"version": "7.
|
|
5089
|
-
"resolved": "https://registry.npmjs.org/undici/-/undici-7.
|
|
5090
|
-
"integrity": "sha512-
|
|
5088
|
+
"version": "7.29.0",
|
|
5089
|
+
"resolved": "https://registry.npmjs.org/undici/-/undici-7.29.0.tgz",
|
|
5090
|
+
"integrity": "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==",
|
|
5091
5091
|
"dev": true,
|
|
5092
5092
|
"license": "MIT",
|
|
5093
5093
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fuli-context",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "Local-first
|
|
3
|
+
"version": "0.7.4-beta.1",
|
|
4
|
+
"description": "Local-first collaboration relationship graph for AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"README.zh-CN.md",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@types/node": "^24.13.3",
|
|
79
79
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
80
80
|
"@vue/test-utils": "^2.4.11",
|
|
81
|
-
"brace-expansion": "5.0.
|
|
81
|
+
"brace-expansion": "5.0.9",
|
|
82
82
|
"d3": "^7.9.0",
|
|
83
83
|
"gsap": "^3.15.0",
|
|
84
84
|
"jsdom": "^29.1.1",
|
|
@@ -98,6 +98,6 @@
|
|
|
98
98
|
"@hono/node-server": "2.0.12"
|
|
99
99
|
},
|
|
100
100
|
"brace-expansion": "$brace-expansion",
|
|
101
|
-
"fast-uri": "3.1.
|
|
101
|
+
"fast-uri": "3.1.5"
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -103,13 +103,23 @@ IDs; never search every personal project, every subscription, or the whole graph
|
|
|
103
103
|
Use the current repository, the user's wording, and `list_knowledge_spaces` to resolve scope.
|
|
104
104
|
Ask if the active project remains ambiguous.
|
|
105
105
|
|
|
106
|
+
FULI exposes read-only MCP resources for this selection flow. When the Agent host offers a FULI
|
|
107
|
+
project or the global taste resource in its `@` mention picker and the user selects it, treat the
|
|
108
|
+
resource's exact identifiers as explicit scope for the current task. Use the selected
|
|
109
|
+
`personal_project_id` for project retrieval, or apply the global taste resource as a
|
|
110
|
+
personal-global profile. A selected resource never authorizes searching another project,
|
|
111
|
+
following `RELATED_TO`, or performing a write.
|
|
112
|
+
|
|
106
113
|
The active child project may also retrieve only knowledge explicitly marked inheritable from
|
|
107
114
|
projects reached through its outgoing `PART_OF` or `USES_KNOWLEDGE_FROM` relations. This means
|
|
108
115
|
project-specific PRDs, configuration IDs, and debugging notes remain in the child, while a parent
|
|
109
116
|
may own shared run, validation, and test runbooks. Search the child first, then authorized parents.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
Project-scoped personal preferences may enter the child context only when the preference is
|
|
118
|
+
explicitly marked `descendants`, or `selected_projects` includes that exact active child, and the
|
|
119
|
+
parent is reached through `PART_OF` or `USES_KNOWLEDGE_FROM`. Never inherit `local_only`, never
|
|
120
|
+
traverse `RELATED_TO`, stop after two hops, and retain the returned scope path. Confirmation
|
|
121
|
+
authority is a hard gate before scope distance; within the same authority layer the nearest scope
|
|
122
|
+
wins, while equal-layer conflicting instructions remain deferred and weight cannot choose a winner.
|
|
113
123
|
|
|
114
124
|
After a retrieved personal item materially affects the final answer or a completed action, call
|
|
115
125
|
`record_knowledge_usage` once for that task and item with `cited` or `applied`. Do not record
|
|
@@ -118,6 +128,20 @@ promote only to `agent_confirmed`; it never substitutes for human confirmation o
|
|
|
118
128
|
eligible for public publication. Use the current user task's caller-stable identifier as
|
|
119
129
|
`taskId` and reuse it on retries; never generate another ID to recount the same task.
|
|
120
130
|
|
|
131
|
+
## Use the Generated Taste Skill
|
|
132
|
+
|
|
133
|
+
When a UI, writing, product, architecture, code, or other judgment call would benefit from the
|
|
134
|
+
person's established taste, call `get_user_taste_skill` with the current working directory and
|
|
135
|
+
current task prompt. It returns a bounded, read-only `user-taste` Skill projection built from
|
|
136
|
+
effective personal preferences and task-matched recommendations. Apply the current request and
|
|
137
|
+
authoritative constraints first; treat `Confirmed` and `Observed` evidence differently; preserve
|
|
138
|
+
project scope; and explain the matching preference and material tradeoff when recommending.
|
|
139
|
+
|
|
140
|
+
The projection is regenerated from the durable graph as preferences are added or revised, so it
|
|
141
|
+
can grow over time without copying or overwriting a user-authored `user-taste/SKILL.md`. Never
|
|
142
|
+
promote a pending inference in the generated Skill and never treat the projection itself as new
|
|
143
|
+
knowledge to capture.
|
|
144
|
+
|
|
121
145
|
The current `agent-usage-v1` policy requires at least five idempotent material-use events across
|
|
122
146
|
at least three distinct tasks in the current content generation, with no open knowledge or
|
|
123
147
|
preference conflict. It maintains utility and confidence as separate scores and caps
|
|
@@ -248,8 +272,11 @@ the personal-global graph without `personalProjectId`:
|
|
|
248
272
|
|
|
249
273
|
When the user explicitly limits one preference to a project, keep `profileAspect` and capture
|
|
250
274
|
it with that exact `personalProjectId`; this makes the preference project-scoped without
|
|
251
|
-
turning it into public project knowledge.
|
|
252
|
-
|
|
275
|
+
turning it into public project knowledge. The Agent has no direct scope-write tool. Safe
|
|
276
|
+
narrowing from global to one exact project belongs to a trusted local UI; any broader parent or
|
|
277
|
+
personal global scope must use preference convergence, with an explicit target and a Provider
|
|
278
|
+
`HumanReviewer` channel behind trusted local user-presence. Never put any personal-profile item
|
|
279
|
+
into a public proposal.
|
|
253
280
|
For a preference that may have both global and project-specific forms, store a stable
|
|
254
281
|
`attributes.preferenceKey` on each form so the project value can explicitly override the same
|
|
255
282
|
global decision without hiding unrelated preferences.
|
package/skills/flreview/SKILL.md
CHANGED
|
@@ -5,69 +5,97 @@ description: Use when the user explicitly enters /flreview or explicitly asks to
|
|
|
5
5
|
|
|
6
6
|
# Fuli Knowledge Review
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The invoking Agent owns each review session. FULI supplies durable knowledge, deterministic candidate ranking, and write tools; the Agent generates a fresh interactive review page for this invocation. There is no permanent **知识回顾** tab to open.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Start The Session
|
|
11
11
|
|
|
12
|
-
For every `/flreview
|
|
12
|
+
For every exact `/flreview` invocation or explicit request to run the Fuli knowledge review:
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
2.
|
|
16
|
-
3.
|
|
14
|
+
1. Use `list_knowledge_spaces` to identify the active personal space, then call `list_personal_projects` so every project choice uses a real local personal project.
|
|
15
|
+
2. Use the `visualize` Skill to render an inline setup page in the current task. Collect scope and review depth in that page, not as serial chat questions. Ask patience first. If the user selects **完全没耐心**, hide mood, available-time, and token-budget fields and use a small highest-priority batch. Otherwise collect mood, available time, and token comfort together on the same setup page. These answers control only batch size and explanation depth, never Provider ranking. If the user's request already gives an exact scope and depth, skip setup.
|
|
16
|
+
3. On the setup page's explicit start action, call `start_knowledge_review` with the selected scope. Then call `list_knowledge_review_candidates` with a bounded page size matching the selected depth.
|
|
17
|
+
4. Generate all candidates from that batch on the same interactive page. Show all candidates at once; do not reveal them one at a time.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
The setup scope tree is:
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
- **全部** — global preferences plus every local personal project's knowledge and project-scoped preferences.
|
|
22
|
+
- **个人偏好** — global preferences or one selected local personal project's preferences.
|
|
23
|
+
- **个人项目** — one selected local personal project or all local personal projects. A project includes its knowledge and project-scoped preferences.
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
Never infer the current directory as the selected project. Never include subscribed or public projects.
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
A bounded page limit is a batch size, not a fixed total-question cap.
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
- Otherwise ask, concisely, about current mood, available time, and whether token budget is comfortable. Use the answers plus explicit requests such as “少问一点”, “多问一点”, or “直接开始” to choose page size and explanation depth.
|
|
28
|
-
- Do not impose a fixed total-question cap. A tool page limit controls only one retrieval batch, not the length of the review.
|
|
29
|
+
## Generated Review Page
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
Follow the `visualize` Skill's inline-artifact rules. The artifact must not use `fetch`, XHR, WebSocket, or a direct FULI API. Every submitted action must call:
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
```js
|
|
34
|
+
await window.openai.sendFollowUpMessage({ prompt, title })
|
|
35
|
+
```
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
The setup action envelope contains only `action`, `personal_space_id`, scope, optional project, and depth inputs. It must not invent a `review_id`, `candidate_key`, `item_id`, or `item_kind`. Every candidate action envelope contains `personal_space_id`, `review_id`, `candidate_key`, `item_id`, and `item_kind`, plus only the fields needed for that action. Treat a valid envelope as a continuation of the active review, not as a new `/flreview` invocation.
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
Each candidate card shows its content, current scope and source projects, confirmation state, `current_quadrant`, selection reasons, relevant evidence counts, utility, and confidence. Provider order is authoritative; do not invent a second score. Render these actions:
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
- **确认保留**
|
|
42
|
+
- **修改**
|
|
43
|
+
- **调整范围**
|
|
44
|
+
- **失效**
|
|
45
|
+
- **稍后处理**
|
|
46
|
+
- **交给 AI 判断**
|
|
42
47
|
|
|
43
|
-
|
|
48
|
+
Do not present the review as one candidate at a time in chat. Chat may contain only a concise status and the generated interactive artifact.
|
|
44
49
|
|
|
45
|
-
##
|
|
50
|
+
## Action Semantics
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
Do not mutate knowledge until the user submits an explicit visualization action. After any mutation, call `record_knowledge_review_progress` only after the write succeeds. If progress recording fails after a successful write, retry only progress; never repeat the mutation.
|
|
48
53
|
|
|
49
|
-
|
|
50
|
-
- **修改** — obtain the exact replacement text, apply `revise_personal_knowledge`, then record progress.
|
|
51
|
-
- **失效** — reconfirm the exact target, apply `revise_personal_knowledge` with `invalidate`, then record progress.
|
|
52
|
-
- **跳过** — do not ask again in this run; it may return in a later review.
|
|
53
|
-
- **稍后处理** — do not ask again in this run; intentionally return it in the next review.
|
|
54
|
+
### 确认保留
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
If the candidate is already confirmed, record `confirmed`. If it is pending, first call `revise_personal_knowledge` with `action: confirm`, an auditable user confirmation basis, and no content or taxonomy changes; then record `confirmed`.
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
### 修改
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
Collect the exact replacement content and a reason in the card. Call `revise_personal_knowledge` with `action: update`, then record `updated`.
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
### 调整范围
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
- The Agent must not perform a direct scope write. Scope mutation is not an Agent or MCP capability.
|
|
65
|
+
- For a global preference, the only direct operation is safe narrowing to one exact project. With one source project, offer that exact project; with multiple source projects, require an explicit selection. Hand the exact item and project to a trusted local FULI human-review UI with a real user-presence gate.
|
|
66
|
+
- For a project-scoped preference, never offer direct promotion. A broader parent-project or personal global scope must use the independently reviewed preference-convergence flow: discover the candidate, preserve every source and qualifier, require an explicit `target_scope` and `target_project_id`, and let only the Provider `HumanReviewer` channel apply the decision through the trusted local human-review UI.
|
|
67
|
+
- Ordinary project knowledge is not a personal preference. Never offer to turn ordinary project knowledge into a global preference.
|
|
64
68
|
|
|
65
|
-
|
|
69
|
+
If the trusted local human-review UI is unavailable, report that exact missing capability and leave the candidate unchanged. After that trusted flow reports a successful scope write, record `updated`. Never change scope automatically.
|
|
70
|
+
|
|
71
|
+
### 失效
|
|
72
|
+
|
|
73
|
+
Offer these preset reasons and a custom reason field:
|
|
74
|
+
|
|
75
|
+
- 不应该沉淀为一条复利知识
|
|
76
|
+
- 不知所云
|
|
77
|
+
- 过期了
|
|
78
|
+
- 只在当时生效
|
|
79
|
+
|
|
80
|
+
Selecting a preset or entering a non-empty custom reason is sufficient authorization. There is no second confirmation and no confirmation checkbox. Call `revise_personal_knowledge` with `action: invalidate`, then record `invalidated` with the exact reason.
|
|
81
|
+
|
|
82
|
+
### 稍后处理
|
|
83
|
+
|
|
84
|
+
Do not mutate the knowledge. Record `deferred` and remove it from the current page. FULI carries it into the next review as `deferred_from_previous` even if no other ranking threshold still matches.
|
|
85
|
+
|
|
86
|
+
### 交给 AI 判断
|
|
87
|
+
|
|
88
|
+
This action means the user cannot responsibly classify the item now. Call `revise_personal_knowledge` with `action: update`, `currentQuadrant: unknown_unknown`, and a short `reasoningSummary` stating that the user delegated judgment during knowledge review. Never send `originQuadrant`: discovery classification is immutable evidence. The required order is `revise_personal_knowledge` before `record_knowledge_review_progress`. After that write succeeds, record `delegated_to_ai` and remove the item from the current page.
|
|
89
|
+
|
|
90
|
+
## Continue, Pause, Or Complete
|
|
91
|
+
|
|
92
|
+
After each successful action, refresh the current review's remaining candidates and regenerate the interactive page. Load the next bounded batch when the current batch is exhausted.
|
|
93
|
+
|
|
94
|
+
Call `finish_knowledge_review` with `paused` when the user explicitly pauses. Call it with `completed` only when no candidates remain or the user explicitly finishes the selected scope. Only completion advances the last-completed watermark.
|
|
66
95
|
|
|
67
96
|
## Guardrails
|
|
68
97
|
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
- Never
|
|
72
|
-
-
|
|
73
|
-
- If a required Fuli review tool is unavailable, state that the installed integration needs updating; do not simulate persistence in prose.
|
|
98
|
+
- FULI-saved knowledge is the only candidate source. Never fabricate, mock, or supplement candidates from ordinary search.
|
|
99
|
+
- Keep original evidence and revision history intact.
|
|
100
|
+
- Never silently resolve conflicts, invalidate knowledge, or change scope.
|
|
101
|
+
- If a required FULI or visualization capability is unavailable, report the exact missing capability and stop safely.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Fuli Knowledge Review"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "Use $flreview to
|
|
3
|
+
short_description: "Generate an interactive FULI knowledge review"
|
|
4
|
+
default_prompt: "Use $flreview to generate my interactive FULI knowledge review."
|
|
5
5
|
policy:
|
|
6
6
|
allow_implicit_invocation: true
|