dominds 0.1.1 → 0.2.0
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/dist/access-control.js +37 -4
- package/dist/docs/OEC-philosophy.md +200 -0
- package/dist/docs/auth.md +145 -0
- package/dist/docs/cli-usage.md +552 -0
- package/dist/docs/context-health.md +208 -0
- package/dist/docs/design.md +653 -0
- package/dist/docs/dialog-persistence.md +728 -0
- package/dist/docs/dialog-system.md +1309 -0
- package/dist/docs/dominds-terminology.md +231 -0
- package/dist/docs/encapsulated-taskdoc.md +313 -0
- package/dist/docs/i18n.md +42 -0
- package/dist/docs/interruption-resumption.md +203 -0
- package/dist/docs/keep-going.md +176 -0
- package/dist/docs/mcp-support.md +576 -0
- package/dist/docs/memory-system.md +212 -0
- package/dist/docs/mottos.md +373 -0
- package/dist/docs/team-mgmt-toolset.md +474 -0
- package/dist/docs/txt-editing-tools.md +279 -0
- package/dist/evt-registry.js +26 -3
- package/dist/llm/driver.js +29 -19
- package/dist/llm/gen/anthropic.js +93 -47
- package/dist/llm/gen/codex.js +99 -7
- package/dist/llm/gen/openai.js +93 -2
- package/dist/server/api-routes.js +56 -12
- package/dist/server/prompts-routes.js +8 -6
- package/dist/server/snippets-routes.js +627 -0
- package/dist/server/websocket-handler.js +10 -0
- package/dist/shared/i18n/driver-messages.js +10 -0
- package/dist/shared/types/index.js +1 -1
- package/dist/shared/types/snippets.js +2 -0
- package/dist/snippets/README.md +4 -0
- package/dist/snippets/catalog.yaml +6 -0
- package/dist/snippets/starting.zh.md +31 -0
- package/dist/static/assets/{_baseUniq-Crfl3d5Y.js → _baseUniq-BVLvlru2.js} +2 -2
- package/dist/static/assets/{_baseUniq-Crfl3d5Y.js.map → _baseUniq-BVLvlru2.js.map} +1 -1
- package/dist/static/assets/{arc-CbA_x9GD.js → arc-CSNVwmxG.js} +2 -2
- package/dist/static/assets/{arc-CbA_x9GD.js.map → arc-CSNVwmxG.js.map} +1 -1
- package/dist/static/assets/{architectureDiagram-VXUJARFQ-lcFS8ZQJ.js → architectureDiagram-VXUJARFQ-C0cvFeK6.js} +6 -6
- package/dist/static/assets/{architectureDiagram-VXUJARFQ-lcFS8ZQJ.js.map → architectureDiagram-VXUJARFQ-C0cvFeK6.js.map} +1 -1
- package/dist/static/assets/{blockDiagram-VD42YOAC-B3Q36qRc.js → blockDiagram-VD42YOAC-bFf8ntyT.js} +7 -7
- package/dist/static/assets/{blockDiagram-VD42YOAC-B3Q36qRc.js.map → blockDiagram-VD42YOAC-bFf8ntyT.js.map} +1 -1
- package/dist/static/assets/{c4Diagram-YG6GDRKO-Mt-aq3VH.js → c4Diagram-YG6GDRKO-CSpWTnF2.js} +3 -3
- package/dist/static/assets/{c4Diagram-YG6GDRKO-Mt-aq3VH.js.map → c4Diagram-YG6GDRKO-CSpWTnF2.js.map} +1 -1
- package/dist/static/assets/{channel-BVr1Yke-.js → channel-DxmJjbSS.js} +2 -2
- package/dist/static/assets/{channel-BVr1Yke-.js.map → channel-DxmJjbSS.js.map} +1 -1
- package/dist/static/assets/{chunk-4BX2VUAB-qCIn5Iic.js → chunk-4BX2VUAB-I9mpBpeR.js} +2 -2
- package/dist/static/assets/{chunk-4BX2VUAB-qCIn5Iic.js.map → chunk-4BX2VUAB-I9mpBpeR.js.map} +1 -1
- package/dist/static/assets/{chunk-55IACEB6-q172NeCV.js → chunk-55IACEB6-BV02_RTu.js} +2 -2
- package/dist/static/assets/{chunk-55IACEB6-q172NeCV.js.map → chunk-55IACEB6-BV02_RTu.js.map} +1 -1
- package/dist/static/assets/{chunk-B4BG7PRW-CMJmtYzq.js → chunk-B4BG7PRW-CSvTpl3V.js} +5 -5
- package/dist/static/assets/{chunk-B4BG7PRW-CMJmtYzq.js.map → chunk-B4BG7PRW-CSvTpl3V.js.map} +1 -1
- package/dist/static/assets/{chunk-DI55MBZ5-DiuwwZPL.js → chunk-DI55MBZ5-ZYPsXzZN.js} +4 -4
- package/dist/static/assets/{chunk-DI55MBZ5-DiuwwZPL.js.map → chunk-DI55MBZ5-ZYPsXzZN.js.map} +1 -1
- package/dist/static/assets/{chunk-FMBD7UC4-06sqZTTn.js → chunk-FMBD7UC4-yA-7sL3G.js} +2 -2
- package/dist/static/assets/{chunk-FMBD7UC4-06sqZTTn.js.map → chunk-FMBD7UC4-yA-7sL3G.js.map} +1 -1
- package/dist/static/assets/{chunk-QN33PNHL-CnpBNkpP.js → chunk-QN33PNHL-B3QRKBkq.js} +2 -2
- package/dist/static/assets/{chunk-QN33PNHL-CnpBNkpP.js.map → chunk-QN33PNHL-B3QRKBkq.js.map} +1 -1
- package/dist/static/assets/{chunk-QZHKN3VN-CNgjMR-e.js → chunk-QZHKN3VN-BTqcSMVx.js} +2 -2
- package/dist/static/assets/{chunk-QZHKN3VN-CNgjMR-e.js.map → chunk-QZHKN3VN-BTqcSMVx.js.map} +1 -1
- package/dist/static/assets/{chunk-TZMSLE5B-BxtzW6--.js → chunk-TZMSLE5B-Bv6ZGq-C.js} +2 -2
- package/dist/static/assets/{chunk-TZMSLE5B-BxtzW6--.js.map → chunk-TZMSLE5B-Bv6ZGq-C.js.map} +1 -1
- package/dist/static/assets/{classDiagram-2ON5EDUG-29huvmn-.js → classDiagram-2ON5EDUG-CwDHjPtY.js} +6 -6
- package/dist/static/assets/{classDiagram-2ON5EDUG-29huvmn-.js.map → classDiagram-2ON5EDUG-CwDHjPtY.js.map} +1 -1
- package/dist/static/assets/{classDiagram-v2-WZHVMYZB-29huvmn-.js → classDiagram-v2-WZHVMYZB-CwDHjPtY.js} +6 -6
- package/dist/static/assets/{classDiagram-v2-WZHVMYZB-29huvmn-.js.map → classDiagram-v2-WZHVMYZB-CwDHjPtY.js.map} +1 -1
- package/dist/static/assets/{clone-D2OgLSSn.js → clone-BQxpwfNz.js} +2 -2
- package/dist/static/assets/{clone-D2OgLSSn.js.map → clone-BQxpwfNz.js.map} +1 -1
- package/dist/static/assets/{cose-bilkent-S5V4N54A-BNegDCxl.js → cose-bilkent-S5V4N54A-JUy6Bc8t.js} +2 -2
- package/dist/static/assets/{cose-bilkent-S5V4N54A-BNegDCxl.js.map → cose-bilkent-S5V4N54A-JUy6Bc8t.js.map} +1 -1
- package/dist/static/assets/{dagre-6UL2VRFP-f1XrTRSn.js → dagre-6UL2VRFP-cOmWEses.js} +7 -7
- package/dist/static/assets/{dagre-6UL2VRFP-f1XrTRSn.js.map → dagre-6UL2VRFP-cOmWEses.js.map} +1 -1
- package/dist/static/assets/{diagram-PSM6KHXK-8w1WbeDi.js → diagram-PSM6KHXK-DCVylxvK.js} +7 -7
- package/dist/static/assets/{diagram-PSM6KHXK-8w1WbeDi.js.map → diagram-PSM6KHXK-DCVylxvK.js.map} +1 -1
- package/dist/static/assets/{diagram-QEK2KX5R-CF4wtMmR.js → diagram-QEK2KX5R-Dih9C0Sk.js} +6 -6
- package/dist/static/assets/{diagram-QEK2KX5R-CF4wtMmR.js.map → diagram-QEK2KX5R-Dih9C0Sk.js.map} +1 -1
- package/dist/static/assets/{diagram-S2PKOQOG-8p3Avgn2.js → diagram-S2PKOQOG-BaV0uPXc.js} +6 -6
- package/dist/static/assets/{diagram-S2PKOQOG-8p3Avgn2.js.map → diagram-S2PKOQOG-BaV0uPXc.js.map} +1 -1
- package/dist/static/assets/{erDiagram-Q2GNP2WA-BMKLxlM9.js → erDiagram-Q2GNP2WA-CA4HGYEg.js} +5 -5
- package/dist/static/assets/{erDiagram-Q2GNP2WA-BMKLxlM9.js.map → erDiagram-Q2GNP2WA-CA4HGYEg.js.map} +1 -1
- package/dist/static/assets/{flowDiagram-NV44I4VS-CgEuPNK2.js → flowDiagram-NV44I4VS-DL1ViH-0.js} +6 -6
- package/dist/static/assets/{flowDiagram-NV44I4VS-CgEuPNK2.js.map → flowDiagram-NV44I4VS-DL1ViH-0.js.map} +1 -1
- package/dist/static/assets/{ganttDiagram-JELNMOA3-bJkDCf-9.js → ganttDiagram-JELNMOA3-DYhDtMYh.js} +3 -3
- package/dist/static/assets/{ganttDiagram-JELNMOA3-bJkDCf-9.js.map → ganttDiagram-JELNMOA3-DYhDtMYh.js.map} +1 -1
- package/dist/static/assets/{gitGraphDiagram-NY62KEGX-4QE9kesp.js → gitGraphDiagram-NY62KEGX-DGw_78U3.js} +7 -7
- package/dist/static/assets/{gitGraphDiagram-NY62KEGX-4QE9kesp.js.map → gitGraphDiagram-NY62KEGX-DGw_78U3.js.map} +1 -1
- package/dist/static/assets/{graph-CS0Pmm7c.js → graph-DN8xnZZK.js} +3 -3
- package/dist/static/assets/{graph-CS0Pmm7c.js.map → graph-DN8xnZZK.js.map} +1 -1
- package/dist/static/assets/{index-BS6HnGzC.js → index-BUPScuLK.js} +689 -496
- package/dist/static/assets/index-BUPScuLK.js.map +1 -0
- package/dist/static/assets/{infoDiagram-WHAUD3N6-ypBcKfUs.js → infoDiagram-WHAUD3N6-1jTrOqkY.js} +5 -5
- package/dist/static/assets/{infoDiagram-WHAUD3N6-ypBcKfUs.js.map → infoDiagram-WHAUD3N6-1jTrOqkY.js.map} +1 -1
- package/dist/static/assets/{journeyDiagram-XKPGCS4Q-QnrxDowJ.js → journeyDiagram-XKPGCS4Q-DAZlmwd0.js} +5 -5
- package/dist/static/assets/{journeyDiagram-XKPGCS4Q-QnrxDowJ.js.map → journeyDiagram-XKPGCS4Q-DAZlmwd0.js.map} +1 -1
- package/dist/static/assets/{kanban-definition-3W4ZIXB7-CfvEc4z5.js → kanban-definition-3W4ZIXB7-DTvx6aaC.js} +3 -3
- package/dist/static/assets/{kanban-definition-3W4ZIXB7-CfvEc4z5.js.map → kanban-definition-3W4ZIXB7-DTvx6aaC.js.map} +1 -1
- package/dist/static/assets/{layout-8TGxpm23.js → layout-BkCbzDei.js} +5 -5
- package/dist/static/assets/{layout-8TGxpm23.js.map → layout-BkCbzDei.js.map} +1 -1
- package/dist/static/assets/{linear-BATBPQQv.js → linear-xSJLSHNG.js} +2 -2
- package/dist/static/assets/{linear-BATBPQQv.js.map → linear-xSJLSHNG.js.map} +1 -1
- package/dist/static/assets/{min-B3oVH3AC.js → min-Bwd7VGiQ.js} +3 -3
- package/dist/static/assets/{min-B3oVH3AC.js.map → min-Bwd7VGiQ.js.map} +1 -1
- package/dist/static/assets/{mindmap-definition-VGOIOE7T-L7VLwwF8.js → mindmap-definition-VGOIOE7T-YA5wkXw1.js} +4 -4
- package/dist/static/assets/{mindmap-definition-VGOIOE7T-L7VLwwF8.js.map → mindmap-definition-VGOIOE7T-YA5wkXw1.js.map} +1 -1
- package/dist/static/assets/{pieDiagram-ADFJNKIX-CFW3zIhM.js → pieDiagram-ADFJNKIX-Dx8jESKH.js} +7 -7
- package/dist/static/assets/{pieDiagram-ADFJNKIX-CFW3zIhM.js.map → pieDiagram-ADFJNKIX-Dx8jESKH.js.map} +1 -1
- package/dist/static/assets/{quadrantDiagram-AYHSOK5B-B7ssen3E.js → quadrantDiagram-AYHSOK5B-ICd4fiMo.js} +3 -3
- package/dist/static/assets/{quadrantDiagram-AYHSOK5B-B7ssen3E.js.map → quadrantDiagram-AYHSOK5B-ICd4fiMo.js.map} +1 -1
- package/dist/static/assets/{requirementDiagram-UZGBJVZJ-D0v5BArv.js → requirementDiagram-UZGBJVZJ-CDceOWIE.js} +4 -4
- package/dist/static/assets/{requirementDiagram-UZGBJVZJ-D0v5BArv.js.map → requirementDiagram-UZGBJVZJ-CDceOWIE.js.map} +1 -1
- package/dist/static/assets/{sankeyDiagram-TZEHDZUN-B7slncJe.js → sankeyDiagram-TZEHDZUN-IbMLAGL-.js} +2 -2
- package/dist/static/assets/{sankeyDiagram-TZEHDZUN-B7slncJe.js.map → sankeyDiagram-TZEHDZUN-IbMLAGL-.js.map} +1 -1
- package/dist/static/assets/{sequenceDiagram-WL72ISMW-oXU2lRh_.js → sequenceDiagram-WL72ISMW-FUFAR4Je.js} +4 -4
- package/dist/static/assets/{sequenceDiagram-WL72ISMW-oXU2lRh_.js.map → sequenceDiagram-WL72ISMW-FUFAR4Je.js.map} +1 -1
- package/dist/static/assets/{stateDiagram-FKZM4ZOC-CFYsEd0x.js → stateDiagram-FKZM4ZOC-C2qQHGZS.js} +9 -9
- package/dist/static/assets/{stateDiagram-FKZM4ZOC-CFYsEd0x.js.map → stateDiagram-FKZM4ZOC-C2qQHGZS.js.map} +1 -1
- package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-C0UWaNA7.js → stateDiagram-v2-4FDKWEC3-ZVog4mBP.js} +5 -5
- package/dist/static/assets/{stateDiagram-v2-4FDKWEC3-C0UWaNA7.js.map → stateDiagram-v2-4FDKWEC3-ZVog4mBP.js.map} +1 -1
- package/dist/static/assets/{timeline-definition-IT6M3QCI-C3KODUrh.js → timeline-definition-IT6M3QCI-CuTL8BLX.js} +3 -3
- package/dist/static/assets/{timeline-definition-IT6M3QCI-C3KODUrh.js.map → timeline-definition-IT6M3QCI-CuTL8BLX.js.map} +1 -1
- package/dist/static/assets/{treemap-KMMF4GRG-DAGDLhj2.js → treemap-KMMF4GRG-D2I92cRY.js} +4 -4
- package/dist/static/assets/{treemap-KMMF4GRG-DAGDLhj2.js.map → treemap-KMMF4GRG-D2I92cRY.js.map} +1 -1
- package/dist/static/assets/{xychartDiagram-PRI3JC2R-C0J9iwTO.js → xychartDiagram-PRI3JC2R-DQlXHZNa.js} +3 -3
- package/dist/static/assets/{xychartDiagram-PRI3JC2R-C0J9iwTO.js.map → xychartDiagram-PRI3JC2R-DQlXHZNa.js.map} +1 -1
- package/dist/static/index.html +1 -1
- package/dist/team.js +34 -0
- package/dist/tools/builtins.js +2 -2
- package/dist/tools/os.js +136 -7
- package/dist/tools/prompts/ws_mod.en.md +2 -2
- package/dist/tools/ripgrep.js +4 -0
- package/dist/tools/team-mgmt.js +96 -6
- package/package.json +3 -2
- package/dist/static/assets/index-BS6HnGzC.js.map +0 -1
package/dist/access-control.js
CHANGED
|
@@ -22,6 +22,10 @@ function isEncapsulatedTaskPath(targetPath) {
|
|
|
22
22
|
// Matches: "foo.tsk", "foo.tsk/", "a/b/foo.tsk/x", etc.
|
|
23
23
|
return /(^|\/)[^/]+\.tsk(\/|$)/.test(normalized);
|
|
24
24
|
}
|
|
25
|
+
function isMindsPath(targetPath) {
|
|
26
|
+
const normalized = targetPath.replace(/\\/g, '/').replace(/^\/+/, '');
|
|
27
|
+
return normalized === '.minds' || normalized.startsWith('.minds/');
|
|
28
|
+
}
|
|
25
29
|
/**
|
|
26
30
|
* Directory-specific pattern matching for access control.
|
|
27
31
|
* This function determines if a target path (file or directory) should be controlled
|
|
@@ -146,10 +150,18 @@ function hasReadAccess(member, targetPath) {
|
|
|
146
150
|
}
|
|
147
151
|
// Get relative path from workspace root
|
|
148
152
|
const relativePath = path_1.default.relative(cwd, resolvedPath);
|
|
149
|
-
// Task Docs (`*.tsk/`) are encapsulated and
|
|
153
|
+
// Task Docs (`*.tsk/`) are encapsulated and hard-denied for all general file tools.
|
|
150
154
|
if (isEncapsulatedTaskPath(relativePath)) {
|
|
151
155
|
return false;
|
|
152
156
|
}
|
|
157
|
+
// Minds (`.minds/**`) is reserved workspace state.
|
|
158
|
+
// It is hard-denied for general file tools; only dedicated `.minds/`-scoped tools (team-mgmt)
|
|
159
|
+
// may bypass this via an internal-only flag.
|
|
160
|
+
const isMinds = isMindsPath(relativePath);
|
|
161
|
+
const allowMindsBypass = member.internal_allow_minds === true;
|
|
162
|
+
if (isMinds && !allowMindsBypass) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
153
165
|
// Check blacklist first (no_read_dirs)
|
|
154
166
|
const blacklist = member.no_read_dirs || [];
|
|
155
167
|
for (const pattern of blacklist) {
|
|
@@ -159,6 +171,7 @@ function hasReadAccess(member, targetPath) {
|
|
|
159
171
|
}
|
|
160
172
|
// Check whitelist (read_dirs)
|
|
161
173
|
const whitelist = member.read_dirs || [];
|
|
174
|
+
// Note: `.minds/**` is handled above as a hard deny (unless internal bypass is enabled).
|
|
162
175
|
// If no whitelist is defined, allow access (after blacklist check)
|
|
163
176
|
if (whitelist.length === 0) {
|
|
164
177
|
return true;
|
|
@@ -191,10 +204,18 @@ function hasWriteAccess(member, targetPath) {
|
|
|
191
204
|
}
|
|
192
205
|
// Get relative path from workspace root
|
|
193
206
|
const relativePath = path_1.default.relative(cwd, resolvedPath);
|
|
194
|
-
// Task Docs (`*.tsk/`) are encapsulated and
|
|
207
|
+
// Task Docs (`*.tsk/`) are encapsulated and hard-denied for all general file tools.
|
|
195
208
|
if (isEncapsulatedTaskPath(relativePath)) {
|
|
196
209
|
return false;
|
|
197
210
|
}
|
|
211
|
+
// Minds (`.minds/**`) is reserved workspace state.
|
|
212
|
+
// It is hard-denied for general file tools; only dedicated `.minds/`-scoped tools (team-mgmt)
|
|
213
|
+
// may bypass this via an internal-only flag.
|
|
214
|
+
const isMinds = isMindsPath(relativePath);
|
|
215
|
+
const allowMindsBypass = member.internal_allow_minds === true;
|
|
216
|
+
if (isMinds && !allowMindsBypass) {
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
198
219
|
// Check blacklist first (no_write_dirs)
|
|
199
220
|
const blacklist = member.no_write_dirs || [];
|
|
200
221
|
for (const pattern of blacklist) {
|
|
@@ -204,6 +225,7 @@ function hasWriteAccess(member, targetPath) {
|
|
|
204
225
|
}
|
|
205
226
|
// Check whitelist (write_dirs)
|
|
206
227
|
const whitelist = member.write_dirs || [];
|
|
228
|
+
// Note: `.minds/**` is handled above as a hard deny (unless internal bypass is enabled).
|
|
207
229
|
// If no whitelist is defined, allow access (after blacklist check)
|
|
208
230
|
if (whitelist.length === 0) {
|
|
209
231
|
return true;
|
|
@@ -239,15 +261,26 @@ function getAccessDeniedMessage(operation, targetPath, language = 'en') {
|
|
|
239
261
|
if (isEncapsulatedTaskPath(targetPath)) {
|
|
240
262
|
lines.push('');
|
|
241
263
|
if (language === 'zh') {
|
|
242
|
-
lines.push(`- 说明:\`*.tsk/\`
|
|
264
|
+
lines.push(`- 说明:\`*.tsk/\` 是封装差遣牒。通用文件工具无法读/写/列目录/删除其中内容(硬编码无条件拒绝)。`);
|
|
243
265
|
lines.push(`- 提示:写入/更新请使用函数工具 \`change_mind\`(顶层:\`change_mind({\"selector\":\"goals|constraints|progress\",\"content\":\"...\"})\`;额外章节:\`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\"})\`)。`);
|
|
244
266
|
lines.push(`- 提示:读取额外章节请使用函数工具 \`recall_taskdoc\`:\`recall_taskdoc({\"category\":\"<category>\",\"selector\":\"<selector>\"})\`。`);
|
|
245
267
|
}
|
|
246
268
|
else {
|
|
247
|
-
lines.push(`- Note: \`*.tsk/\` is an encapsulated Taskdoc.
|
|
269
|
+
lines.push(`- Note: \`*.tsk/\` is an encapsulated Taskdoc. It is hard-denied for all general file tools.`);
|
|
248
270
|
lines.push(`- Hint: For updates, use the function tool \`change_mind\` (top-level: \`change_mind({\"selector\":\"goals|constraints|progress\",\"content\":\"...\"})\`; extra sections: \`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\"})\`).`);
|
|
249
271
|
lines.push(`- Hint: To read extra sections, use \`recall_taskdoc({\"category\":\"<category>\",\"selector\":\"<selector>\"})\`.`);
|
|
250
272
|
}
|
|
251
273
|
}
|
|
274
|
+
if (isMindsPath(targetPath)) {
|
|
275
|
+
lines.push('');
|
|
276
|
+
if (language === 'zh') {
|
|
277
|
+
lines.push(`- 说明:\`.minds/\` 是工作区的“团队配置/记忆/资产”目录,通用文件工具无法读写(硬编码无条件拒绝)。`);
|
|
278
|
+
lines.push(`- 提示:如需修改 \`.minds/**\`,建议使用 \`team-mgmt\` 工具集(或由团队管理员成员代管)。`);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
lines.push(`- Note: \`.minds/\` stores workspace team config/memory/assets and is hard-denied for general file tools.`);
|
|
282
|
+
lines.push(`- Hint: To modify \`.minds/**\`, use the \`team-mgmt\` toolset (or delegate to a team-manager member).`);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
252
285
|
return lines.join('\n');
|
|
253
286
|
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Overall Every Control and Clear (OEC)
|
|
2
|
+
|
|
3
|
+
> Haier: Overall Every(thing/one/day) Control/Clear
|
|
4
|
+
|
|
5
|
+
The OEC Management Method is a comprehensive enterprise management framework created by Haier Group in 1989, also known as "全方位优化管理法" (Comprehensive Optimization Management Method). This philosophy has generated tremendous economic and social benefits for Haier, earning them the National Enterprise Management Innovation "Golden Horse Award" and the Enterprise Reform "Sail Cup", with Premier Zhu Rongji批示 recommending nationwide promotion of this management experience.
|
|
6
|
+
|
|
7
|
+
## Core Philosophy
|
|
8
|
+
|
|
9
|
+
OEC represents a systematic approach to daily management that emphasizes **"Daily work completion, daily clearance, daily improvement"** (日事日毕、日清日高). The fundamental principle is that every employee must accomplish targeted work every day, with the overall goal being to achieve a 1% improvement over the previous day's performance.
|
|
10
|
+
|
|
11
|
+
## The OEC Components
|
|
12
|
+
|
|
13
|
+
### **O - Overall (全方位)**
|
|
14
|
+
|
|
15
|
+
- **Global Integration**: All activities, processes, and systems are interconnected
|
|
16
|
+
- **Holistic Thinking**: Every element contributes to the overall organizational success
|
|
17
|
+
- **Strategic Alignment**: Daily activities support long-term strategic objectives
|
|
18
|
+
|
|
19
|
+
### **E - Everyone, Everything, Everyday (每人、每事、每日)**
|
|
20
|
+
|
|
21
|
+
- **Everyone**: Every employee has clear responsibilities and accountability
|
|
22
|
+
- **Everything**: Every task, process, and outcome is managed and controlled
|
|
23
|
+
- **Everyday**: Daily operations, reviews, and improvements are non-negotiable
|
|
24
|
+
|
|
25
|
+
### **C - Control and Clear (控制和清晰)**
|
|
26
|
+
|
|
27
|
+
- **Clear Standards**: Defined expectations, processes, and quality benchmarks
|
|
28
|
+
- **Controlled Processes**: Systematic monitoring and adjustment mechanisms
|
|
29
|
+
- **Transparent Accountability**: Clear visibility into performance and outcomes
|
|
30
|
+
|
|
31
|
+
## Three Fundamental Principles
|
|
32
|
+
|
|
33
|
+
### 1. **Closed-Loop Management (闭环原则)**
|
|
34
|
+
|
|
35
|
+
- **PDCA Cycle**: Plan-Do-Check-Act continuous improvement
|
|
36
|
+
- **Complete Accountability**: Every task has clear ownership and follow-through
|
|
37
|
+
- **Systematic Follow-up**: No loose ends or unaddressed issues
|
|
38
|
+
|
|
39
|
+
### 2. **Comparative Analysis (比较分析原则)**
|
|
40
|
+
|
|
41
|
+
- **Internal Benchmarking**: Compare current performance with past achievements
|
|
42
|
+
- **External Benchmarking**: Measure against industry best practices and international standards
|
|
43
|
+
- **Competitive Intelligence**: Use comparison as a driver for improvement
|
|
44
|
+
|
|
45
|
+
### 3. **Continuous Optimization (不断优化原则)**
|
|
46
|
+
|
|
47
|
+
- **Weakest Link Theory**: Identify and strengthen薄弱环节 (weak areas)
|
|
48
|
+
- **Incremental Progress**: 1% daily improvement compounds significantly over time
|
|
49
|
+
- **Systematic Enhancement**: Continuous refinement of all processes
|
|
50
|
+
|
|
51
|
+
## Implementation Framework
|
|
52
|
+
|
|
53
|
+
### Daily Work Completion (日事日毕)
|
|
54
|
+
|
|
55
|
+
**Core Mechanisms:**
|
|
56
|
+
|
|
57
|
+
- **3E Card System**: Everyone, Everything, Everyday tracking
|
|
58
|
+
- **Daily Planning**: Clear daily targets and responsibilities
|
|
59
|
+
- **Real-time Monitoring**: Continuous oversight throughout the workday
|
|
60
|
+
|
|
61
|
+
**Practical Implementation:**
|
|
62
|
+
|
|
63
|
+
- Morning briefings establish daily objectives
|
|
64
|
+
- Mid-day check-ins ensure progress tracking
|
|
65
|
+
- Evening reviews confirm completion and identify issues
|
|
66
|
+
|
|
67
|
+
### Daily Clearance (日清日高)
|
|
68
|
+
|
|
69
|
+
**The "Three Management Principles":**
|
|
70
|
+
|
|
71
|
+
1. **Daily Affairs Daily Completion**
|
|
72
|
+
- Address all problems and anomalies on the same day
|
|
73
|
+
- Clarify responsibilities and implement corrective measures
|
|
74
|
+
- Prevent problem accumulation through immediate action
|
|
75
|
+
|
|
76
|
+
2. **Daily Clearance with Management Support**
|
|
77
|
+
- Self-clearance by employees, complemented by organizational oversight
|
|
78
|
+
- Structured follow-up and verification processes
|
|
79
|
+
|
|
80
|
+
3. **Daily Improvement Focus**
|
|
81
|
+
- Identify and address weak links in processes
|
|
82
|
+
- Implement continuous enhancements
|
|
83
|
+
- Target 1% daily improvement for exponential growth
|
|
84
|
+
|
|
85
|
+
### Quality Control System
|
|
86
|
+
|
|
87
|
+
**Management Process:**
|
|
88
|
+
|
|
89
|
+
- **Problem Identification**: 5W3H1S Analysis
|
|
90
|
+
- **What**: What problem occurred
|
|
91
|
+
- **Where**: Where did it happen
|
|
92
|
+
- **When**: When did it occur
|
|
93
|
+
- **Who**: Who is responsible
|
|
94
|
+
- **Why**: Root cause analysis
|
|
95
|
+
- **How Many**: Scope of impact
|
|
96
|
+
- **How Much**: Cost implications
|
|
97
|
+
- **How**: Solution approach
|
|
98
|
+
- **Safety**: Safety implications
|
|
99
|
+
|
|
100
|
+
**Quality Accountability Tools:**
|
|
101
|
+
|
|
102
|
+
- **Quality Value Vouchers**: Red (reward) and Yellow (penalty) system
|
|
103
|
+
- **Three-tier Inspection**: Self-inspection, mutual inspection, professional inspection
|
|
104
|
+
- **Real-time Feedback**: Immediate correction and recognition
|
|
105
|
+
|
|
106
|
+
## Real-World Case Study: Haier's Transformation
|
|
107
|
+
|
|
108
|
+
### The 76 Refrigerators Moment (1985)
|
|
109
|
+
|
|
110
|
+
In early 1985, CEO Zhang Ruimin gathered all employees at the Qingdao Refrigerator General Factory and publicly destroyed 76 defective refrigerators with sledgehammers. These refrigerators, worth RMB 1,100 each (equivalent to four times annual employee salary), were smashed despite having minor defects like paint chips.
|
|
111
|
+
|
|
112
|
+
**Psychological Impact:**
|
|
113
|
+
|
|
114
|
+
- Employees swung hammers with tears in their eyes
|
|
115
|
+
- The message was crystal clear: substandard products would not be tolerated
|
|
116
|
+
- This became the symbolic turning point for quality transformation
|
|
117
|
+
|
|
118
|
+
### Before OEC Implementation (1984)
|
|
119
|
+
|
|
120
|
+
**Company State:**
|
|
121
|
+
|
|
122
|
+
- Revenue: Only 3.48 million RMB
|
|
123
|
+
- 13 initial management rules included basic requirements like "don't urinate or defecate in work areas"
|
|
124
|
+
- Shanghai Department Store reported all 22 purchased washing machines were defective
|
|
125
|
+
- Inventory included 6,322 surplus defective washing machines
|
|
126
|
+
- Defective products were sold as a separate product category
|
|
127
|
+
|
|
128
|
+
### After OEC Implementation (1990s-Present)
|
|
129
|
+
|
|
130
|
+
**Transformation Results:**
|
|
131
|
+
|
|
132
|
+
- Global expansion to over 180 countries
|
|
133
|
+
- Revenue growth to tens of billions of dollars
|
|
134
|
+
- Market leadership in home appliances
|
|
135
|
+
- Recognized as a model for socialist enterprise transformation
|
|
136
|
+
|
|
137
|
+
**Key Success Factors:**
|
|
138
|
+
|
|
139
|
+
- Cultural transformation from top management commitment
|
|
140
|
+
- Systematic implementation of daily management practices
|
|
141
|
+
- Employee engagement through clear accountability
|
|
142
|
+
- Continuous improvement culture
|
|
143
|
+
|
|
144
|
+
## Modern Applications and Adaptations
|
|
145
|
+
|
|
146
|
+
### Manufacturing Excellence
|
|
147
|
+
|
|
148
|
+
- **Lean Manufacturing Integration**: OEC complements and enhances lean methodologies
|
|
149
|
+
- **Six Sigma Implementation**: Quality control through systematic daily management
|
|
150
|
+
- **Just-in-Time Production**: Reduced waste through precise daily coordination
|
|
151
|
+
|
|
152
|
+
### Service Industry Applications
|
|
153
|
+
|
|
154
|
+
- **Customer Service Management**: Daily customer satisfaction tracking and improvement
|
|
155
|
+
- **Quality Assurance**: Systematic review and enhancement of service delivery
|
|
156
|
+
- **Employee Development**: Individual performance tracking and skill improvement
|
|
157
|
+
|
|
158
|
+
### Technology and Innovation
|
|
159
|
+
|
|
160
|
+
- **Agile Development**: Daily standups and sprint reviews mirror OEC principles
|
|
161
|
+
- **DevOps Practices**: Continuous integration and deployment reflect daily improvement
|
|
162
|
+
- **Knowledge Management**: Systematic capture and utilization of organizational learning
|
|
163
|
+
|
|
164
|
+
## OEC in Agentic DevOps Context
|
|
165
|
+
|
|
166
|
+
Fast-paced clearance is crucial in agentic DevOps working. OEC principles translate directly to automated system management:
|
|
167
|
+
|
|
168
|
+
### **Dialog Round Management**
|
|
169
|
+
|
|
170
|
+
- **Daily Reset**: Start new dialog rounds with updated task documentation and fresh chat logs
|
|
171
|
+
- **Clear Context**: Ensure all agents work with optimal clarity and updated information
|
|
172
|
+
- **Immediate Resolution**: Address issues and anomalies within the same operational cycle
|
|
173
|
+
|
|
174
|
+
### **Agent Accountability**
|
|
175
|
+
|
|
176
|
+
- **Everyone**: Each agent has clear operational parameters and success metrics
|
|
177
|
+
- **Everything**: Every process, decision, and outcome is logged and traceable
|
|
178
|
+
- **Everyday**: Continuous monitoring and improvement of agent performance
|
|
179
|
+
|
|
180
|
+
### **System Optimization**
|
|
181
|
+
|
|
182
|
+
- **1% Daily Improvement**: Automated systems can implement small but consistent enhancements
|
|
183
|
+
- **Closed-Loop Feedback**: Real-time monitoring and automatic corrective actions
|
|
184
|
+
- **Comparative Analysis**: Benchmark current performance against historical and industry standards
|
|
185
|
+
|
|
186
|
+
### **Quality Assurance**
|
|
187
|
+
|
|
188
|
+
- **Defect Prevention**: Automated quality checks prevent issues before they impact users
|
|
189
|
+
- **Rapid Response**: Immediate identification and resolution of system anomalies
|
|
190
|
+
- **Continuous Learning**: Machine learning algorithms improve through daily data analysis
|
|
191
|
+
|
|
192
|
+
## Key Takeaways for Modern Implementation
|
|
193
|
+
|
|
194
|
+
1. **Start Small, Scale Systematically**: Implement OEC principles gradually, beginning with high-impact areas
|
|
195
|
+
2. **Technology Enablement**: Use digital tools to automate tracking, monitoring, and improvement processes
|
|
196
|
+
3. **Cultural Integration**: Ensure leadership commitment and employee buy-in for sustainable transformation
|
|
197
|
+
4. **Continuous Adaptation**: Modify OEC principles to fit specific industry and organizational needs
|
|
198
|
+
5. **Measure Everything**: Establish clear metrics and accountability at all levels
|
|
199
|
+
|
|
200
|
+
The OEC philosophy demonstrates that systematic daily management, coupled with continuous improvement and clear accountability, can transform any organization from chaos to excellence. Its principles remain highly relevant for modern automated and AI-driven systems, where rapid response, continuous learning, and clear accountability are essential for success.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Dominds Auth (Design)
|
|
2
|
+
|
|
3
|
+
This document specifies the **authentication behavior** for Dominds WebUI + API access.
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
7
|
+
- **Production safety**: prevent accidental exposure of a Dominds instance (especially when bound to non-localhost).
|
|
8
|
+
- **Low operational overhead**: a single shared secret, set once, used everywhere.
|
|
9
|
+
- **Good UX**: the WebUI can prompt for the key when needed and remember it for future visits.
|
|
10
|
+
- **Convenient “auto-auth”**: allow a one-click / copy-paste URL that pre-fills auth for the current session.
|
|
11
|
+
|
|
12
|
+
## Non-goals
|
|
13
|
+
|
|
14
|
+
- Multi-user accounts, roles/permissions, OAuth, SSO
|
|
15
|
+
- Key rotation workflows, audit logs, or fine-grained access control
|
|
16
|
+
- Authentication for development mode (explicitly disabled)
|
|
17
|
+
|
|
18
|
+
## Terminology
|
|
19
|
+
|
|
20
|
+
- **Auth key**: the shared secret used to authenticate requests.
|
|
21
|
+
- **Dev mode**: development runtime where auth is disabled.
|
|
22
|
+
- **Prod mode**: production runtime where auth behavior is enabled/controlled by environment.
|
|
23
|
+
- **Auto-auth URL**: a WebUI page URL that includes the auth key as a query parameter for automatic authentication.
|
|
24
|
+
|
|
25
|
+
## Mode Rules
|
|
26
|
+
|
|
27
|
+
### Dev mode
|
|
28
|
+
|
|
29
|
+
- **Auth is always disabled.**
|
|
30
|
+
- `DOMINDS_AUTH_KEY` (if present) has **no effect** in dev mode.
|
|
31
|
+
|
|
32
|
+
### Prod mode
|
|
33
|
+
|
|
34
|
+
Auth behavior is controlled by the `DOMINDS_AUTH_KEY` environment variable:
|
|
35
|
+
|
|
36
|
+
| `DOMINDS_AUTH_KEY` value | Effective behavior |
|
|
37
|
+
| ------------------------ | ------------------------------------------------------ |
|
|
38
|
+
| **unset** | **Enable auth** with a **randomly generated** auth key |
|
|
39
|
+
| **empty string** | **Disable auth** |
|
|
40
|
+
| **non-empty string** | **Enable auth** using the provided string verbatim |
|
|
41
|
+
|
|
42
|
+
Notes:
|
|
43
|
+
|
|
44
|
+
- The auth key is treated as an **opaque string** (no trimming, normalization, or case folding).
|
|
45
|
+
- A generated auth key MUST be **cryptographically strong** and **URL-safe to embed** (after URL encoding).
|
|
46
|
+
|
|
47
|
+
## Authentication Mechanism (Prod mode, when enabled)
|
|
48
|
+
|
|
49
|
+
- Every API request MUST authenticate using an HTTP `Authorization` header:
|
|
50
|
+
- `Authorization: Bearer <auth-key>`
|
|
51
|
+
|
|
52
|
+
- “API request” includes:
|
|
53
|
+
- HTTP endpoints that mutate or reveal workspace/dialog state
|
|
54
|
+
- WebSocket connections used by the WebUI for real-time updates
|
|
55
|
+
|
|
56
|
+
Implementation note (WebUI): browsers cannot attach custom `Authorization` headers during the WebSocket handshake.
|
|
57
|
+
Dominds WebUI therefore transmits the auth key via `Sec-WebSocket-Protocol` as a subprotocol of the form
|
|
58
|
+
`dominds-auth.<auth-key>` (plain text), and the server accepts either mechanism.
|
|
59
|
+
|
|
60
|
+
To make this work without encoding, the auth key MUST be an HTTP token-safe string (RFC 7230 `tchar` set).
|
|
61
|
+
|
|
62
|
+
If auth is **disabled**, the server MUST accept requests and WebSocket connections without any auth header.
|
|
63
|
+
If an auth header is present while auth is disabled, the server MUST ignore it.
|
|
64
|
+
|
|
65
|
+
## Server-Side Auth Outcomes (Prod mode, when enabled)
|
|
66
|
+
|
|
67
|
+
The server enforces the following outcomes:
|
|
68
|
+
|
|
69
|
+
- If the auth header is **missing**, the request/connection MUST be rejected as unauthorized.
|
|
70
|
+
- If the auth header is **present but incorrect**, the request/connection MUST be rejected as unauthorized.
|
|
71
|
+
- If the auth header is **correct**, the request/connection proceeds normally.
|
|
72
|
+
|
|
73
|
+
The server SHOULD use a consistent “unauthorized” response so that clients can reliably detect auth failures.
|
|
74
|
+
|
|
75
|
+
## WebUI Behavior
|
|
76
|
+
|
|
77
|
+
### Sources of an auth key
|
|
78
|
+
|
|
79
|
+
The WebUI uses exactly one effective auth key at a time, chosen by this precedence order:
|
|
80
|
+
|
|
81
|
+
1. **URL query parameter** `auth` (auto-auth mode)
|
|
82
|
+
2. **Browser localStorage** (remembered key)
|
|
83
|
+
3. **User prompt input** (interactive entry)
|
|
84
|
+
|
|
85
|
+
### localStorage rules
|
|
86
|
+
|
|
87
|
+
- If the WebUI uses a key sourced from **localStorage**, it MUST attach that key to all API requests as a Bearer token.
|
|
88
|
+
- If the user **manually enters** a key (not sourced from the URL), the WebUI MUST:
|
|
89
|
+
- Use it immediately for API requests
|
|
90
|
+
- Persist it to **localStorage** for later use
|
|
91
|
+
- If the key in **localStorage** is rejected by the server, the WebUI MUST:
|
|
92
|
+
- Prompt the user to enter a new key
|
|
93
|
+
- Replace the stored key in localStorage after confirmed success of auth
|
|
94
|
+
|
|
95
|
+
### Auto-auth URL rules (`?auth=...`)
|
|
96
|
+
|
|
97
|
+
When an `auth` query parameter is present in the WebUI page URL:
|
|
98
|
+
|
|
99
|
+
- The WebUI MUST use the `auth` parameter value as the auth key for API requests.
|
|
100
|
+
- The WebUI MUST NOT read from localStorage.
|
|
101
|
+
- The WebUI MUST NOT write to localStorage.
|
|
102
|
+
|
|
103
|
+
If authentication fails while `auth` is present in the URL:
|
|
104
|
+
|
|
105
|
+
- The WebUI MUST remove the `auth` parameter from `window.location` (so it no longer appears in the address bar).
|
|
106
|
+
- After removal, the WebUI MUST transition into the normal interactive flow:
|
|
107
|
+
- Prompt the user for an auth key (and then persist it to localStorage after success, as usual).
|
|
108
|
+
|
|
109
|
+
## CLI Requirements (WebUI subcommand)
|
|
110
|
+
|
|
111
|
+
### “Auto auth url” console output
|
|
112
|
+
|
|
113
|
+
When starting the WebUI server in **prod mode**:
|
|
114
|
+
|
|
115
|
+
- If auth is **enabled** (either generated or explicitly set), the WebUI subcommand MUST log an **“auto auth url”**
|
|
116
|
+
string to the console that includes the auth key as a query parameter.
|
|
117
|
+
|
|
118
|
+
Example (illustrative):
|
|
119
|
+
|
|
120
|
+
```txt
|
|
121
|
+
auto auth url: http://<host>:<port>/?auth=<urlencoded-auth-key>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- If auth is **disabled**, the subcommand SHOULD log that auth is disabled and MUST NOT print an auth key.
|
|
125
|
+
|
|
126
|
+
### `--nobrowser`
|
|
127
|
+
|
|
128
|
+
By default, the WebUI subcommand opens a browser automatically.
|
|
129
|
+
To opt out, use `--nobrowser`:
|
|
130
|
+
|
|
131
|
+
- If auth is **enabled**, it MUST open the **auto-auth URL** in the default browser.
|
|
132
|
+
- If auth is **disabled**, it MUST open the normal WebUI URL (no `auth` parameter).
|
|
133
|
+
|
|
134
|
+
`--nobrowser` does not change authentication behavior; it only changes ergonomics.
|
|
135
|
+
|
|
136
|
+
## Security & Privacy Notes
|
|
137
|
+
|
|
138
|
+
- The auth key is a **shared secret**; anyone with the key has full access as permitted by the API surface.
|
|
139
|
+
- An auto-auth URL contains the auth key in the query string; this can leak via:
|
|
140
|
+
- Copy/paste and screenshots
|
|
141
|
+
- Browser history
|
|
142
|
+
- Referrer headers (depending on navigation)
|
|
143
|
+
- Logs or monitoring that capture URLs
|
|
144
|
+
|
|
145
|
+
Operators SHOULD treat the auto-auth URL as sensitive and avoid sharing it broadly.
|