@aigne/doc-smith 0.9.8-alpha.3 → 0.9.8-alpha.4
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/CLAUDE.md +43 -0
- package/README.md +94 -250
- package/aigne.yaml +2 -149
- package/doc-smith/SKILL.md +117 -0
- package/doc-smith/references/changeset_schema.md +118 -0
- package/doc-smith/references/document_structure_schema.md +139 -0
- package/doc-smith/references/document_update_guide.md +193 -0
- package/doc-smith/references/structure_confirmation_guide.md +133 -0
- package/doc-smith/references/structure_planning_guide.md +146 -0
- package/doc-smith/references/user_intent_guide.md +172 -0
- package/doc-smith.yaml +114 -0
- package/main-system-prompt.md +56 -0
- package/package.json +3 -69
- package/scripts/README.md +90 -0
- package/scripts/install.sh +86 -0
- package/scripts/uninstall.sh +52 -0
- package/CHANGELOG.md +0 -994
- package/LICENSE +0 -93
- package/agentic-agents/common/base-info.md +0 -53
- package/agentic-agents/common/completer.md +0 -54
- package/agentic-agents/common/planner.md +0 -168
- package/agentic-agents/common/worker.md +0 -93
- package/agentic-agents/create/index.yaml +0 -129
- package/agentic-agents/create/objective.md +0 -44
- package/agentic-agents/create/set-custom-prompt.mjs +0 -27
- package/agentic-agents/detail/index.yaml +0 -95
- package/agentic-agents/detail/objective.md +0 -9
- package/agentic-agents/detail/set-custom-prompt.mjs +0 -88
- package/agentic-agents/predict-resources/index.yaml +0 -44
- package/agentic-agents/predict-resources/instructions.md +0 -61
- package/agentic-agents/structure/design-rules.md +0 -39
- package/agentic-agents/structure/index.yaml +0 -86
- package/agentic-agents/structure/objective.md +0 -14
- package/agentic-agents/structure/review-criteria.md +0 -55
- package/agentic-agents/structure/set-custom-prompt.mjs +0 -78
- package/agentic-agents/utils/init-workspace-cache.mjs +0 -171
- package/agentic-agents/utils/load-base-sources.mjs +0 -20
- package/agentic-agents/workspace-cache-sharing-design.md +0 -671
- package/agents/chat/chat-system.md +0 -38
- package/agents/chat/index.mjs +0 -59
- package/agents/chat/skills/generate-document.yaml +0 -15
- package/agents/chat/skills/list-documents.mjs +0 -15
- package/agents/chat/skills/update-document.yaml +0 -24
- package/agents/clear/choose-contents.mjs +0 -192
- package/agents/clear/clear-auth-tokens.mjs +0 -88
- package/agents/clear/clear-deployment-config.mjs +0 -49
- package/agents/clear/clear-document-config.mjs +0 -36
- package/agents/clear/clear-document-structure.mjs +0 -102
- package/agents/clear/clear-generated-docs.mjs +0 -142
- package/agents/clear/clear-media-description.mjs +0 -129
- package/agents/clear/index.yaml +0 -26
- package/agents/create/analyze-diagram-type-llm.yaml +0 -160
- package/agents/create/analyze-diagram-type.mjs +0 -297
- package/agents/create/check-document-structure.yaml +0 -30
- package/agents/create/check-need-generate-structure.mjs +0 -105
- package/agents/create/document-structure-tools/add-document.mjs +0 -85
- package/agents/create/document-structure-tools/delete-document.mjs +0 -116
- package/agents/create/document-structure-tools/move-document.mjs +0 -109
- package/agents/create/document-structure-tools/update-document.mjs +0 -84
- package/agents/create/generate-diagram-image.yaml +0 -60
- package/agents/create/generate-structure.yaml +0 -117
- package/agents/create/index.yaml +0 -49
- package/agents/create/refine-document-structure.yaml +0 -12
- package/agents/create/replace-d2-with-image.mjs +0 -625
- package/agents/create/update-document-structure.yaml +0 -54
- package/agents/create/user-add-document/add-documents-to-structure.mjs +0 -90
- package/agents/create/user-add-document/find-documents-to-add-links.yaml +0 -47
- package/agents/create/user-add-document/index.yaml +0 -46
- package/agents/create/user-add-document/prepare-documents-to-translate.mjs +0 -22
- package/agents/create/user-add-document/print-add-document-summary.mjs +0 -63
- package/agents/create/user-add-document/review-documents-with-new-links.mjs +0 -110
- package/agents/create/user-remove-document/find-documents-with-invalid-links.mjs +0 -78
- package/agents/create/user-remove-document/index.yaml +0 -40
- package/agents/create/user-remove-document/prepare-documents-to-translate.mjs +0 -22
- package/agents/create/user-remove-document/print-remove-document-summary.mjs +0 -53
- package/agents/create/user-remove-document/remove-documents-from-structure.mjs +0 -99
- package/agents/create/user-remove-document/review-documents-with-invalid-links.mjs +0 -115
- package/agents/create/user-review-document-structure.mjs +0 -140
- package/agents/create/utils/init-current-content.mjs +0 -34
- package/agents/create/utils/merge-document-structures.mjs +0 -30
- package/agents/evaluate/code-snippet.mjs +0 -97
- package/agents/evaluate/document-structure.yaml +0 -67
- package/agents/evaluate/document.yaml +0 -82
- package/agents/evaluate/generate-report.mjs +0 -85
- package/agents/evaluate/index.yaml +0 -46
- package/agents/history/index.yaml +0 -6
- package/agents/history/view.mjs +0 -78
- package/agents/init/check.mjs +0 -16
- package/agents/init/index.mjs +0 -275
- package/agents/init/validate.mjs +0 -16
- package/agents/localize/choose-language.mjs +0 -107
- package/agents/localize/index.yaml +0 -58
- package/agents/localize/record-translation-history.mjs +0 -23
- package/agents/localize/translate-document.yaml +0 -24
- package/agents/localize/translate-multilingual.yaml +0 -51
- package/agents/media/batch-generate-media-description.yaml +0 -46
- package/agents/media/generate-media-description.yaml +0 -50
- package/agents/media/load-media-description.mjs +0 -256
- package/agents/prefs/index.mjs +0 -203
- package/agents/publish/index.yaml +0 -26
- package/agents/publish/publish-docs.mjs +0 -356
- package/agents/publish/translate-meta.mjs +0 -103
- package/agents/schema/document-structure-item.yaml +0 -26
- package/agents/schema/document-structure-refine-item.yaml +0 -23
- package/agents/schema/document-structure.yaml +0 -29
- package/agents/update/batch-generate-document.yaml +0 -27
- package/agents/update/batch-update-document.yaml +0 -7
- package/agents/update/check-diagram-flag.mjs +0 -116
- package/agents/update/check-document.mjs +0 -162
- package/agents/update/check-generate-diagram.mjs +0 -106
- package/agents/update/check-sync-image-flag.mjs +0 -55
- package/agents/update/check-update-is-single.mjs +0 -53
- package/agents/update/document-tools/update-document-content.mjs +0 -303
- package/agents/update/generate-diagram.yaml +0 -63
- package/agents/update/generate-document.yaml +0 -70
- package/agents/update/handle-document-update.yaml +0 -103
- package/agents/update/index.yaml +0 -79
- package/agents/update/pre-check-generate-diagram.yaml +0 -44
- package/agents/update/save-and-translate-document.mjs +0 -76
- package/agents/update/sync-images-and-exit.mjs +0 -148
- package/agents/update/update-document-detail.yaml +0 -71
- package/agents/update/update-single/update-single-document-detail.mjs +0 -280
- package/agents/update/update-single-document.yaml +0 -7
- package/agents/update/user-review-document.mjs +0 -272
- package/agents/utils/action-success.mjs +0 -16
- package/agents/utils/analyze-document-feedback-intent.yaml +0 -32
- package/agents/utils/analyze-feedback-intent.mjs +0 -136
- package/agents/utils/analyze-structure-feedback-intent.yaml +0 -29
- package/agents/utils/check-detail-result.mjs +0 -38
- package/agents/utils/check-feedback-refiner.mjs +0 -81
- package/agents/utils/choose-docs.mjs +0 -293
- package/agents/utils/document-icon-generate.yaml +0 -52
- package/agents/utils/document-title-streamline.yaml +0 -48
- package/agents/utils/ensure-document-icons.mjs +0 -129
- package/agents/utils/exit.mjs +0 -6
- package/agents/utils/feedback-refiner.yaml +0 -50
- package/agents/utils/find-item-by-path.mjs +0 -114
- package/agents/utils/find-user-preferences-by-path.mjs +0 -37
- package/agents/utils/format-document-structure.mjs +0 -35
- package/agents/utils/generate-document-or-skip.mjs +0 -41
- package/agents/utils/handle-diagram-operations.mjs +0 -263
- package/agents/utils/load-all-document-content.mjs +0 -30
- package/agents/utils/load-document-all-content.mjs +0 -84
- package/agents/utils/load-sources.mjs +0 -405
- package/agents/utils/map-reasoning-effort-level.mjs +0 -15
- package/agents/utils/post-generate.mjs +0 -144
- package/agents/utils/read-current-document-content.mjs +0 -46
- package/agents/utils/save-doc-translation.mjs +0 -61
- package/agents/utils/save-doc.mjs +0 -88
- package/agents/utils/save-output.mjs +0 -26
- package/agents/utils/save-sidebar.mjs +0 -51
- package/agents/utils/skip-if-content-exists.mjs +0 -27
- package/agents/utils/streamline-document-titles-if-needed.mjs +0 -88
- package/agents/utils/transform-detail-data-sources.mjs +0 -45
- package/agents/utils/update-branding.mjs +0 -84
- package/assets/report-template/report.html +0 -198
- package/docs-mcp/analyze-content-relevance.yaml +0 -50
- package/docs-mcp/analyze-docs-relevance.yaml +0 -59
- package/docs-mcp/docs-search.yaml +0 -42
- package/docs-mcp/get-docs-detail.mjs +0 -41
- package/docs-mcp/get-docs-structure.mjs +0 -16
- package/docs-mcp/read-doc-content.mjs +0 -119
- package/prompts/common/document/content-rules-core.md +0 -20
- package/prompts/common/document/markdown-syntax-rules.md +0 -65
- package/prompts/common/document/media-file-list-usage-rules.md +0 -18
- package/prompts/common/document/openapi-usage-rules.md +0 -189
- package/prompts/common/document/role-and-personality.md +0 -16
- package/prompts/common/document/user-preferences.md +0 -9
- package/prompts/common/document-structure/conflict-resolution-guidance.md +0 -16
- package/prompts/common/document-structure/document-icon-generate.md +0 -116
- package/prompts/common/document-structure/document-structure-rules.md +0 -43
- package/prompts/common/document-structure/document-title-streamline.md +0 -86
- package/prompts/common/document-structure/glossary.md +0 -7
- package/prompts/common/document-structure/intj-traits.md +0 -5
- package/prompts/common/document-structure/openapi-usage-rules.md +0 -28
- package/prompts/common/document-structure/output-constraints.md +0 -18
- package/prompts/common/document-structure/user-locale-rules.md +0 -10
- package/prompts/common/document-structure/user-preferences.md +0 -9
- package/prompts/detail/custom/admonition-usage-rules.md +0 -94
- package/prompts/detail/custom/code-block-usage-rules.md +0 -163
- package/prompts/detail/custom/custom-components/x-card-usage-rules.md +0 -63
- package/prompts/detail/custom/custom-components/x-cards-usage-rules.md +0 -83
- package/prompts/detail/custom/custom-components/x-field-desc-usage-rules.md +0 -120
- package/prompts/detail/custom/custom-components/x-field-group-usage-rules.md +0 -80
- package/prompts/detail/custom/custom-components/x-field-usage-rules.md +0 -189
- package/prompts/detail/custom/custom-components-usage-rules.md +0 -18
- package/prompts/detail/diagram/generate-image-system.md +0 -135
- package/prompts/detail/diagram/generate-image-user.md +0 -32
- package/prompts/detail/diagram/guide.md +0 -29
- package/prompts/detail/diagram/official-examples.md +0 -712
- package/prompts/detail/diagram/pre-check.md +0 -23
- package/prompts/detail/diagram/role-and-personality.md +0 -2
- package/prompts/detail/diagram/rules.md +0 -46
- package/prompts/detail/diagram/system-prompt.md +0 -1139
- package/prompts/detail/diagram/user-prompt.md +0 -43
- package/prompts/detail/generate/detail-example.md +0 -457
- package/prompts/detail/generate/document-rules.md +0 -45
- package/prompts/detail/generate/system-prompt.md +0 -61
- package/prompts/detail/generate/user-prompt.md +0 -99
- package/prompts/detail/jsx/rules.md +0 -6
- package/prompts/detail/update/system-prompt.md +0 -121
- package/prompts/detail/update/user-prompt.md +0 -41
- package/prompts/evaluate/document-structure.md +0 -93
- package/prompts/evaluate/document.md +0 -149
- package/prompts/media/media-description/system-prompt.md +0 -43
- package/prompts/media/media-description/user-prompt.md +0 -17
- package/prompts/structure/check-document-structure.md +0 -93
- package/prompts/structure/document-rules.md +0 -21
- package/prompts/structure/find-documents-to-add-links.md +0 -52
- package/prompts/structure/generate/system-prompt.md +0 -13
- package/prompts/structure/generate/user-prompt.md +0 -137
- package/prompts/structure/review/structure-review-system.md +0 -81
- package/prompts/structure/structure-example.md +0 -89
- package/prompts/structure/structure-getting-started.md +0 -10
- package/prompts/structure/update/system-prompt.md +0 -93
- package/prompts/structure/update/user-prompt.md +0 -43
- package/prompts/translate/admonition.md +0 -20
- package/prompts/translate/code-block.md +0 -33
- package/prompts/translate/glossary.md +0 -6
- package/prompts/translate/translate-document.md +0 -305
- package/prompts/utils/analyze-document-feedback-intent.md +0 -54
- package/prompts/utils/analyze-structure-feedback-intent.md +0 -43
- package/prompts/utils/feedback-refiner.md +0 -105
- package/types/document-schema.mjs +0 -55
- package/types/document-structure-schema.mjs +0 -261
- package/utils/auth-utils.mjs +0 -275
- package/utils/blocklet.mjs +0 -104
- package/utils/check-document-has-diagram.mjs +0 -95
- package/utils/conflict-detector.mjs +0 -149
- package/utils/constants/index.mjs +0 -620
- package/utils/constants/linter.mjs +0 -102
- package/utils/d2-utils.mjs +0 -198
- package/utils/debug.mjs +0 -3
- package/utils/delete-diagram-images.mjs +0 -99
- package/utils/deploy.mjs +0 -86
- package/utils/docs-finder-utils.mjs +0 -623
- package/utils/evaluate/report-utils.mjs +0 -132
- package/utils/extract-api.mjs +0 -32
- package/utils/file-utils.mjs +0 -960
- package/utils/history-utils.mjs +0 -203
- package/utils/icon-map.mjs +0 -26
- package/utils/image-compress.mjs +0 -75
- package/utils/kroki-utils.mjs +0 -173
- package/utils/linter/index.mjs +0 -50
- package/utils/load-config.mjs +0 -107
- package/utils/markdown/index.mjs +0 -26
- package/utils/markdown-checker.mjs +0 -694
- package/utils/mermaid-validator.mjs +0 -140
- package/utils/mermaid-worker-pool.mjs +0 -250
- package/utils/mermaid-worker.mjs +0 -233
- package/utils/openapi/index.mjs +0 -28
- package/utils/preferences-utils.mjs +0 -175
- package/utils/request.mjs +0 -10
- package/utils/store/index.mjs +0 -45
- package/utils/sync-diagram-to-translations.mjs +0 -262
- package/utils/upload-files.mjs +0 -231
- package/utils/utils.mjs +0 -1354
|
@@ -1,712 +0,0 @@
|
|
|
1
|
-
<d2_official_example>
|
|
2
|
-
Here are examples from the official D2 documentation with good visual effects.
|
|
3
|
-
When generating charts in practice, you can refer to these official examples to enhance the expressiveness of your charts.
|
|
4
|
-
|
|
5
|
-
- Bank Securities
|
|
6
|
-
```d2
|
|
7
|
-
bank: {
|
|
8
|
-
style.fill: white
|
|
9
|
-
Corporate: {
|
|
10
|
-
style.fill: white
|
|
11
|
-
app14506: Data Source\ntco: 100,000\nowner: Lakshmi {
|
|
12
|
-
style: {
|
|
13
|
-
fill: '#fce7c6'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
Equities: {
|
|
18
|
-
app14491: Risk Global\ntco: 600,000\nowner: Wendy {
|
|
19
|
-
style: {
|
|
20
|
-
fill: '#f6c889'
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
app14492: Credit guard\ntco: 100,000\nowner: Lakshmi {
|
|
24
|
-
style: {
|
|
25
|
-
fill: '#fce7c6'
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
app14520: Seven heaven\ntco: 100,000\nowner: Tomos {
|
|
29
|
-
style: {
|
|
30
|
-
fill: '#fce7c6'
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
app14522: Apac Ace\ntco: 400,000\nowner: Wendy {
|
|
34
|
-
style: {
|
|
35
|
-
fill: '#f9d8a7'
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
app14527: Risk Global\ntco: 900,000\nowner: Tomos {
|
|
39
|
-
style: {
|
|
40
|
-
fill: '#f4b76c'
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
Securities: {
|
|
45
|
-
style.fill: white
|
|
46
|
-
app14517: Zone out\ntco: 500,000\nowner: Wendy {
|
|
47
|
-
style: {
|
|
48
|
-
fill: '#f6c889'
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
Finance: {
|
|
53
|
-
style.fill: white
|
|
54
|
-
app14488: Credit guard\ntco: 700,000\nowner: India {
|
|
55
|
-
style: {
|
|
56
|
-
fill: '#f6c889'
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
app14502: Ark Crypto\ntco: 1,500,000\nowner: Wendy {
|
|
60
|
-
style: {
|
|
61
|
-
fill: '#ed800c'
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
app14510: Data Solar\ntco: 1,200,000\nowner: Deepak {
|
|
65
|
-
style: {
|
|
66
|
-
fill: '#f1a64f'
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
Risk: {
|
|
71
|
-
style.fill: white
|
|
72
|
-
app14490: Seven heaven\ntco: 0\nowner: Joesph {
|
|
73
|
-
style: {
|
|
74
|
-
fill: '#fce7c6'
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
app14507: Crypto Bot\ntco: 1,100,000\nowner: Wendy {
|
|
78
|
-
style: {
|
|
79
|
-
fill: '#f1a64f'
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
Funds: {
|
|
84
|
-
style.fill: white
|
|
85
|
-
app14497: Risk Global\ntco: 500,000\nowner: Joesph {
|
|
86
|
-
style: {
|
|
87
|
-
fill: '#f6c889'
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
Fixed Income: {
|
|
92
|
-
style.fill: white
|
|
93
|
-
app14523: ARC3\ntco: 600,000\nowner: Wendy {
|
|
94
|
-
style: {
|
|
95
|
-
fill: '#f6c889'
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
app14500: Acmaze\ntco: 100,000\nowner: Tomos {
|
|
99
|
-
style: {
|
|
100
|
-
fill: '#fce7c6'
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
bank.Risk.app14490 -> bank.Equities.app14527: client master
|
|
106
|
-
bank.Equities.app14491 -> bank.Equities.app14527: greeks {
|
|
107
|
-
style: {
|
|
108
|
-
stroke-dash: 5
|
|
109
|
-
animated: true
|
|
110
|
-
stroke: red
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
bank.Funds.app14497 -> bank.Equities.app14520: allocations {
|
|
114
|
-
style: {
|
|
115
|
-
stroke-dash: 5
|
|
116
|
-
animated: true
|
|
117
|
-
stroke: brown
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
bank.Equities.app14527 -> bank.Corporate.app14506: trades {
|
|
121
|
-
style: {
|
|
122
|
-
stroke-dash: 5
|
|
123
|
-
animated: false
|
|
124
|
-
stroke: blue
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
bank.Fixed Income.app14523 -> bank.Equities.app14491: orders {
|
|
128
|
-
style: {
|
|
129
|
-
stroke-dash: 10
|
|
130
|
-
animated: false
|
|
131
|
-
stroke: green
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
bank.Finance.app14488 -> bank.Equities.app14527: greeks {
|
|
135
|
-
style: {
|
|
136
|
-
stroke-dash: 5
|
|
137
|
-
animated: true
|
|
138
|
-
stroke: red
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
bank.Equities.app14527 -> bank.Equities.app14522: orders {
|
|
142
|
-
style: {
|
|
143
|
-
stroke-dash: 10
|
|
144
|
-
animated: false
|
|
145
|
-
stroke: green
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
bank.Equities.app14522 -> bank.Finance.app14510: orders {
|
|
149
|
-
style: {
|
|
150
|
-
stroke-dash: 10
|
|
151
|
-
animated: false
|
|
152
|
-
stroke: green
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
bank.Equities.app14527 -> bank.Finance.app14502: greeks {
|
|
156
|
-
style: {
|
|
157
|
-
stroke-dash: 5
|
|
158
|
-
animated: true
|
|
159
|
-
stroke: red
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
bank.Equities.app14527 -> bank.Risk.app14507: allocations {
|
|
163
|
-
style: {
|
|
164
|
-
stroke-dash: 5
|
|
165
|
-
animated: true
|
|
166
|
-
stroke: brown
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
bank.Securities.app14517 -> bank.Equities.app14492: trades {
|
|
170
|
-
style: {
|
|
171
|
-
stroke-dash: 5
|
|
172
|
-
animated: false
|
|
173
|
-
stroke: blue
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
bank.Equities.app14522 -> bank.Fixed Income.app14500: security reference
|
|
177
|
-
```
|
|
178
|
-
- Udp Tunnel
|
|
179
|
-
```d2
|
|
180
|
-
shape: sequence_diagram
|
|
181
|
-
|
|
182
|
-
backend_server
|
|
183
|
-
local_server
|
|
184
|
-
ssh_server
|
|
185
|
-
other_server
|
|
186
|
-
|
|
187
|
-
启动阶段: {
|
|
188
|
-
local_server->ssh_server:ssh_login
|
|
189
|
-
local_server<-ssh_server:ssh 登录成功
|
|
190
|
-
local_server->ssh_server:sftp_copy 辅助转发服务器
|
|
191
|
-
local_server->ssh_server:ssh 启动转发服务器
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
启动成功运行阶段:{
|
|
195
|
-
other_server->ssh_server.a:请求udp packet{
|
|
196
|
-
style.animated: true
|
|
197
|
-
style.stroke: red
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
ssh_server.a->local_server.a:udp forward 发送给 udp client {
|
|
201
|
-
style.animated: true
|
|
202
|
-
style.stroke: red
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
local_server.a->backend_server.a: "udp 转发给 udp server"{
|
|
206
|
-
style.animated: true
|
|
207
|
-
style.stroke: red
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
backend_server.b->local_server.b:发送ok字符串给 udp的请求端{
|
|
211
|
-
style.animated: true
|
|
212
|
-
style.stroke: green
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
ssh_server.b<-local_server.b: 发送给 ssh 所在的 udp forawrd {
|
|
216
|
-
style.animated: true
|
|
217
|
-
style.stroke: green
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
other_server<-ssh_server.b:返回udp 请求回复{
|
|
221
|
-
style.animated: true
|
|
222
|
-
style.stroke:green
|
|
223
|
-
}
|
|
224
|
-
other_server.一次交互完成
|
|
225
|
-
}
|
|
226
|
-
```
|
|
227
|
-
- Llm Framework Architecture
|
|
228
|
-
```d2
|
|
229
|
-
vars: {
|
|
230
|
-
d2-config: {
|
|
231
|
-
theme-id: 3 # terrastruct
|
|
232
|
-
sketch: true
|
|
233
|
-
layout-engine: elk
|
|
234
|
-
}
|
|
235
|
-
colors: {
|
|
236
|
-
c2: "#C7F1FF" # light turkuaz
|
|
237
|
-
c3: "#B5AFF6" # dark purple
|
|
238
|
-
c4: "#DEE1EB" # gray
|
|
239
|
-
c5: "#88DCF7" # turkuaz
|
|
240
|
-
c6: "#E4DBFE" # purple
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
LangUnits: {
|
|
245
|
-
style.fill: ${colors.c6}
|
|
246
|
-
RegexVal: {
|
|
247
|
-
ds
|
|
248
|
-
}
|
|
249
|
-
SQLSelect: {
|
|
250
|
-
ds
|
|
251
|
-
}
|
|
252
|
-
PythonTr: {
|
|
253
|
-
ds
|
|
254
|
-
}
|
|
255
|
-
langunit ₙ: {
|
|
256
|
-
style.multiple: true
|
|
257
|
-
style.stroke-dash: 10
|
|
258
|
-
style.stroke: black
|
|
259
|
-
style.animated: 1
|
|
260
|
-
"... ds"
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
LangUnits <- ExperimentHost.Dataset: "load dataset"
|
|
265
|
-
Dataset UI -> LangUnits: "manage datasets"
|
|
266
|
-
|
|
267
|
-
Dataset UI: {
|
|
268
|
-
style.fill: ${colors.c4}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
ExperimentHost: {
|
|
272
|
-
style.fill: ${colors.c4}
|
|
273
|
-
Experiment: {
|
|
274
|
-
style.multiple: true
|
|
275
|
-
}
|
|
276
|
-
Dataset
|
|
277
|
-
# Experiment <-> Dataset
|
|
278
|
-
}
|
|
279
|
-
ExperimentHost.Experiment -> Experiment
|
|
280
|
-
|
|
281
|
-
Experiment.ModelConfigurations: {
|
|
282
|
-
style.multiple: true
|
|
283
|
-
}
|
|
284
|
-
Experiment.LangUnit
|
|
285
|
-
|
|
286
|
-
Experiment.ModelConfigurations -> ModelConfiguration
|
|
287
|
-
|
|
288
|
-
ModelConfiguration.Prompting
|
|
289
|
-
ModelConfiguration.Model
|
|
290
|
-
ModelConfiguration.LangUnit
|
|
291
|
-
```
|
|
292
|
-
- 综合案例 - Terraform Resources:
|
|
293
|
-
```d2
|
|
294
|
-
vars: {
|
|
295
|
-
d2-config: {
|
|
296
|
-
layout-engine: elk
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
*.style.font-size: 22
|
|
301
|
-
*.*.style.font-size: 22
|
|
302
|
-
|
|
303
|
-
title: |md
|
|
304
|
-
# Terraform resources (v1.0.0)
|
|
305
|
-
| {near: top-center}
|
|
306
|
-
|
|
307
|
-
direction: right
|
|
308
|
-
|
|
309
|
-
project_connection: {
|
|
310
|
-
style: {
|
|
311
|
-
fill: "#C5C6C7"
|
|
312
|
-
stroke: grey
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
privatelink_endpoint: {tooltip: Datasource only}
|
|
317
|
-
group
|
|
318
|
-
group_partial_permissions
|
|
319
|
-
service_token
|
|
320
|
-
job: {
|
|
321
|
-
style: {
|
|
322
|
-
fill: "#ACE1AF"
|
|
323
|
-
stroke: green
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
conns: Connections (will be removed in the future,\nuse global_connection) {
|
|
328
|
-
bigquery_connection
|
|
329
|
-
fabric_connection
|
|
330
|
-
connection
|
|
331
|
-
|
|
332
|
-
bigquery_connection.style.fill: "#C5C6C7"
|
|
333
|
-
fabric_connection.style.fill: "#C5C6C7"
|
|
334
|
-
connection.style.fill: "#C5C6C7"
|
|
335
|
-
}
|
|
336
|
-
conns.style.fill: "#C5C6C7"
|
|
337
|
-
|
|
338
|
-
env_creds: Environment Credentials {
|
|
339
|
-
grid-columns: 2
|
|
340
|
-
athena_credential
|
|
341
|
-
databricks_credential
|
|
342
|
-
snowflake_credential
|
|
343
|
-
bigquery_credential
|
|
344
|
-
fabric_credential
|
|
345
|
-
postgres_credential: {tooltip: Is used for Redshift as well}
|
|
346
|
-
teradata_credential
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
service_token -- project: can scope to {
|
|
350
|
-
style: {
|
|
351
|
-
stroke-dash: 3
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
group -- project
|
|
355
|
-
group_partial_permissions -- project
|
|
356
|
-
user_groups -- group
|
|
357
|
-
user_groups -- group_partial_permissions
|
|
358
|
-
project -- environment
|
|
359
|
-
project -- snowflake_semantic_layer_credential
|
|
360
|
-
job -- environment
|
|
361
|
-
job -- environment_variable_job_override
|
|
362
|
-
notification -- job
|
|
363
|
-
partial_notification -- job
|
|
364
|
-
|
|
365
|
-
webhook -- job: triggered by {
|
|
366
|
-
style: {
|
|
367
|
-
stroke-dash: 3
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
environment -- global_connection
|
|
371
|
-
environment -- conns
|
|
372
|
-
global_connection -- privatelink_endpoint
|
|
373
|
-
global_connection -- oauth_configuration
|
|
374
|
-
|
|
375
|
-
environment -- env_creds
|
|
376
|
-
conns -- privatelink_endpoint
|
|
377
|
-
project -- project_repository
|
|
378
|
-
lineage_integration -- project
|
|
379
|
-
project_repository -- repository
|
|
380
|
-
environment -- environment_variable
|
|
381
|
-
environment -- partial_environment_variable
|
|
382
|
-
environment -- extended_attributes
|
|
383
|
-
environment -- semantic_layer_configuration
|
|
384
|
-
model_notifications -- environment
|
|
385
|
-
|
|
386
|
-
project -- project_connection {
|
|
387
|
-
style: {
|
|
388
|
-
stroke: "#C5C6C7"
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
project_connection -- conns {
|
|
392
|
-
style: {
|
|
393
|
-
stroke: "#C5C6C7"
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
(job -- *)[*].style.stroke: green
|
|
398
|
-
(* -- job)[*].style.stroke: green
|
|
399
|
-
|
|
400
|
-
account_level_settings: "Account level settings" {
|
|
401
|
-
account_features
|
|
402
|
-
ip_restrictions_rule
|
|
403
|
-
license_map
|
|
404
|
-
partial_license_map
|
|
405
|
-
}
|
|
406
|
-
account_level_settings.style.fill-pattern: dots
|
|
407
|
-
```
|
|
408
|
-
- Game State Sequence
|
|
409
|
-
```d2
|
|
410
|
-
shape: sequence_diagram
|
|
411
|
-
|
|
412
|
-
User
|
|
413
|
-
Session
|
|
414
|
-
Lua
|
|
415
|
-
|
|
416
|
-
User."Init"
|
|
417
|
-
|
|
418
|
-
User.t1 -> Session.t1: "SetupFight()"
|
|
419
|
-
Session.t1 -> Session.t1: "Create clean fight state"
|
|
420
|
-
Session.t1 -> Lua: "Trigger OnPlayerTurn"
|
|
421
|
-
User.t1 <- Session.t1
|
|
422
|
-
|
|
423
|
-
User."Repeat"
|
|
424
|
-
|
|
425
|
-
User.mid -> Session.mid: "PlayerCastHand() etc."
|
|
426
|
-
Session.mid -> Lua: "Trigger OnDamage etc."
|
|
427
|
-
User.mid <- Session.mid
|
|
428
|
-
|
|
429
|
-
User.t2 -> Session.t2: "FinishPlayerTurn()"
|
|
430
|
-
Session.t2 -> Lua: "Trigger OnTurn"
|
|
431
|
-
Session.t2 -> Session.t2: "Update and remove status effects"
|
|
432
|
-
Session.t2 -> Lua: "Trigger OnPlayerTurn"
|
|
433
|
-
User.t2 <- Session.t2
|
|
434
|
-
```
|
|
435
|
-
- Golang Queue
|
|
436
|
-
```d2
|
|
437
|
-
direction: right
|
|
438
|
-
|
|
439
|
-
classes: {
|
|
440
|
-
base: {
|
|
441
|
-
style: {
|
|
442
|
-
bold: true
|
|
443
|
-
font-size: 28
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
person: {
|
|
448
|
-
shape: person
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
animated: {
|
|
452
|
-
style: {
|
|
453
|
-
animated: true
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
multiple: {
|
|
458
|
-
style: {
|
|
459
|
-
multiple: true
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
enqueue: {
|
|
464
|
-
label: Enqueue Task
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
dispatch: {
|
|
468
|
-
label: Dispatch Task
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
library: {
|
|
472
|
-
style: {
|
|
473
|
-
bold: true
|
|
474
|
-
font-size: 32
|
|
475
|
-
fill: PapayaWhip
|
|
476
|
-
fill-pattern: grain
|
|
477
|
-
border-radius: 8
|
|
478
|
-
font: mono
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
task: {
|
|
483
|
-
style: {
|
|
484
|
-
bold: true
|
|
485
|
-
font-size: 32
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
user01: {
|
|
491
|
-
label: User01
|
|
492
|
-
class: [base; person; multiple]
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
user02: {
|
|
496
|
-
label: User02
|
|
497
|
-
class: [base; person; multiple]
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
user03: {
|
|
501
|
-
label: User03
|
|
502
|
-
class: [base; person; multiple]
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
user01 -> container.task01: {
|
|
506
|
-
label: Create Task
|
|
507
|
-
class: [base; animated]
|
|
508
|
-
}
|
|
509
|
-
user02 -> container.task02: {
|
|
510
|
-
label: Create Task
|
|
511
|
-
class: [base; animated]
|
|
512
|
-
}
|
|
513
|
-
user03 -> container.task03: {
|
|
514
|
-
label: Create Task
|
|
515
|
-
class: [base; animated]
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
container: Application {
|
|
519
|
-
direction: right
|
|
520
|
-
style: {
|
|
521
|
-
bold: true
|
|
522
|
-
font-size: 28
|
|
523
|
-
}
|
|
524
|
-
icon: https://icons.terrastruct.com/dev%2Fgo.svg
|
|
525
|
-
|
|
526
|
-
task01: {
|
|
527
|
-
icon: https://icons.terrastruct.com/essentials%2F092-graph%20bar.svg
|
|
528
|
-
class: [task; multiple]
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
task02: {
|
|
532
|
-
icon: https://icons.terrastruct.com/essentials%2F095-download.svg
|
|
533
|
-
class: [task; multiple]
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
task03: {
|
|
537
|
-
icon: https://icons.terrastruct.com/essentials%2F195-attachment.svg
|
|
538
|
-
class: [task; multiple]
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
queue: {
|
|
542
|
-
label: Queue Library
|
|
543
|
-
icon: https://icons.terrastruct.com/dev%2Fgo.svg
|
|
544
|
-
style: {
|
|
545
|
-
bold: true
|
|
546
|
-
font-size: 32
|
|
547
|
-
fill: honeydew
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
producer: {
|
|
551
|
-
label: Producer
|
|
552
|
-
class: library
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
consumer: {
|
|
556
|
-
label: Consumer
|
|
557
|
-
class: library
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
database: {
|
|
561
|
-
label: Ring\nBuffer
|
|
562
|
-
shape: cylinder
|
|
563
|
-
style: {
|
|
564
|
-
bold: true
|
|
565
|
-
font-size: 32
|
|
566
|
-
fill-pattern: lines
|
|
567
|
-
font: mono
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
producer -> database
|
|
572
|
-
database -> consumer
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
worker01: {
|
|
576
|
-
icon: https://icons.terrastruct.com/essentials%2F092-graph%20bar.svg
|
|
577
|
-
class: [task]
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
worker02: {
|
|
581
|
-
icon: https://icons.terrastruct.com/essentials%2F095-download.svg
|
|
582
|
-
class: [task]
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
worker03: {
|
|
586
|
-
icon: https://icons.terrastruct.com/essentials%2F092-graph%20bar.svg
|
|
587
|
-
class: [task]
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
worker04: {
|
|
591
|
-
icon: https://icons.terrastruct.com/essentials%2F195-attachment.svg
|
|
592
|
-
class: [task]
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
task01 -> queue.producer: {
|
|
596
|
-
class: [base; enqueue]
|
|
597
|
-
}
|
|
598
|
-
task02 -> queue.producer: {
|
|
599
|
-
class: [base; enqueue]
|
|
600
|
-
}
|
|
601
|
-
task03 -> queue.producer: {
|
|
602
|
-
class: [base; enqueue]
|
|
603
|
-
}
|
|
604
|
-
queue.consumer -> worker01: {
|
|
605
|
-
class: [base; dispatch]
|
|
606
|
-
}
|
|
607
|
-
queue.consumer -> worker02: {
|
|
608
|
-
class: [base; dispatch]
|
|
609
|
-
}
|
|
610
|
-
queue.consumer -> worker03: {
|
|
611
|
-
class: [base; dispatch]
|
|
612
|
-
}
|
|
613
|
-
queue.consumer -> worker04: {
|
|
614
|
-
class: [base; dispatch]
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
```
|
|
618
|
-
- Lambda Infra
|
|
619
|
-
```d2
|
|
620
|
-
direction: right
|
|
621
|
-
|
|
622
|
-
github: GitHub {
|
|
623
|
-
shape: image
|
|
624
|
-
icon: https://icons.terrastruct.com/dev%2Fgithub.svg
|
|
625
|
-
style: {
|
|
626
|
-
font-color: green
|
|
627
|
-
font-size: 30
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
github_actions: GitHub Actions {
|
|
632
|
-
lambda_action: Lambda Action {
|
|
633
|
-
icon: https://icons.terrastruct.com/dev%2Fgithub.svg
|
|
634
|
-
style.multiple: true
|
|
635
|
-
}
|
|
636
|
-
style: {
|
|
637
|
-
stroke: blue
|
|
638
|
-
font-color: purple
|
|
639
|
-
stroke-dash: 3
|
|
640
|
-
fill: white
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
aws: AWS Cloud VPC {
|
|
645
|
-
style: {
|
|
646
|
-
font-color: purple
|
|
647
|
-
fill: white
|
|
648
|
-
opacity: 0.5
|
|
649
|
-
}
|
|
650
|
-
lambda01: Lambda01 {
|
|
651
|
-
icon: https://icons.terrastruct.com/aws%2FCompute%2FAWS-Lambda.svg
|
|
652
|
-
shape: parallelogram
|
|
653
|
-
style.fill: "#B6DDF6"
|
|
654
|
-
}
|
|
655
|
-
lambda02: Lambda02 {
|
|
656
|
-
icon: https://icons.terrastruct.com/aws%2FCompute%2FAWS-Lambda.svg
|
|
657
|
-
shape: parallelogram
|
|
658
|
-
style.fill: "#B6DDF6"
|
|
659
|
-
}
|
|
660
|
-
lambda03: Lambda03 {
|
|
661
|
-
icon: https://icons.terrastruct.com/aws%2FCompute%2FAWS-Lambda.svg
|
|
662
|
-
shape: parallelogram
|
|
663
|
-
style.fill: "#B6DDF6"
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
github -> github_actions: GitHub Action Flow {
|
|
668
|
-
style: {
|
|
669
|
-
animated: true
|
|
670
|
-
font-size: 20
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
github_actions -> aws.lambda01: Update Lambda {
|
|
674
|
-
style: {
|
|
675
|
-
animated: true
|
|
676
|
-
font-size: 20
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
github_actions -> aws.lambda02: Update Lambda {
|
|
680
|
-
style: {
|
|
681
|
-
animated: true
|
|
682
|
-
font-size: 20
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
github_actions -> aws.lambda03: Update Lambda {
|
|
686
|
-
style: {
|
|
687
|
-
animated: true
|
|
688
|
-
font-size: 20
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
explanation: |md
|
|
693
|
-
```yaml
|
|
694
|
-
deploy_source:
|
|
695
|
-
name: deploy lambda from source
|
|
696
|
-
runs-on: ubuntu-latest
|
|
697
|
-
steps:
|
|
698
|
-
- name: checkout source code
|
|
699
|
-
uses: actions/checkout@v3
|
|
700
|
-
- name: default deploy
|
|
701
|
-
uses: appleboy/lambda-action@v0.1.7
|
|
702
|
-
with:
|
|
703
|
-
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
704
|
-
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
705
|
-
aws_region: ${{ secrets.AWS_REGION }}
|
|
706
|
-
function_name: gorush
|
|
707
|
-
source: example/index.js
|
|
708
|
-
```
|
|
709
|
-
| {near: bottom-center}
|
|
710
|
-
```
|
|
711
|
-
|
|
712
|
-
</d2_official_example>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<document_content>
|
|
2
|
-
{{documentContent}}
|
|
3
|
-
</document_content>
|
|
4
|
-
|
|
5
|
-
{% if feedback %}
|
|
6
|
-
<feedback>
|
|
7
|
-
{{feedback}}
|
|
8
|
-
</feedback>
|
|
9
|
-
{% endif %}
|
|
10
|
-
|
|
11
|
-
{% if detailFeedback %}
|
|
12
|
-
<content_review_feedback>
|
|
13
|
-
{{ detailFeedback }}
|
|
14
|
-
</content_review_feedback>
|
|
15
|
-
{% endif %}
|
|
16
|
-
|
|
17
|
-
{% if previousGenerationContent %}
|
|
18
|
-
<previous_generation_content>
|
|
19
|
-
{{ previousGenerationContent }}
|
|
20
|
-
</previous_generation_content>
|
|
21
|
-
{% endif %}
|
|
22
|
-
|
|
23
|
-
{% include "./rules.md" %}
|