memorix 1.1.13 → 1.2.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.
Files changed (97) hide show
  1. package/CHANGELOG.md +33 -1
  2. package/README.md +6 -3
  3. package/README.zh-CN.md +6 -3
  4. package/dist/cli/index.js +36639 -31279
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/dashboard/static/app.js +50 -30
  7. package/dist/index.js +6636 -1778
  8. package/dist/index.js.map +1 -1
  9. package/dist/maintenance-runner.d.ts +1 -1
  10. package/dist/maintenance-runner.js +3775 -302
  11. package/dist/maintenance-runner.js.map +1 -1
  12. package/dist/memcode-runtime/CHANGELOG.md +33 -1
  13. package/dist/sdk.d.ts +1 -1
  14. package/dist/sdk.js +6634 -1776
  15. package/dist/sdk.js.map +1 -1
  16. package/docs/1.2.0-CLAIM-LEDGER.md +72 -0
  17. package/docs/1.2.0-CODE-STATE.md +61 -0
  18. package/docs/1.2.0-DEVELOPMENT-CHARTER.md +255 -0
  19. package/docs/1.2.0-DYNAMIC-LIFECYCLE.md +71 -0
  20. package/docs/1.2.0-EVALUATION-HARNESS.md +51 -0
  21. package/docs/1.2.0-IMPLEMENTATION-PLAN.md +554 -0
  22. package/docs/1.2.0-KNOWLEDGE-WORKFLOW-RESEARCH.md +205 -0
  23. package/docs/1.2.0-KNOWLEDGE-WORKSPACE.md +68 -0
  24. package/docs/1.2.0-PRODUCT-STORY.md +234 -0
  25. package/docs/1.2.0-PROVIDER-QUALITY.md +189 -0
  26. package/docs/1.2.0-WORKFLOW-INHERITANCE.md +101 -0
  27. package/docs/1.2.0-WORKSET-RETRIEVAL.md +80 -0
  28. package/docs/AGENT_OPERATOR_PLAYBOOK.md +6 -3
  29. package/docs/API_REFERENCE.md +27 -6
  30. package/docs/CONFIGURATION.md +21 -3
  31. package/docs/DEVELOPMENT.md +4 -0
  32. package/docs/README.md +17 -2
  33. package/docs/SETUP.md +7 -1
  34. package/docs/dev-log/progress.txt +120 -40
  35. package/docs/knowledge/workflows/memorix-release.md +57 -0
  36. package/llms-full.txt +16 -2
  37. package/llms.txt +9 -4
  38. package/package.json +3 -2
  39. package/plugins/codex/memorix/.codex-plugin/plugin.json +1 -1
  40. package/src/cli/capability-map.ts +1 -0
  41. package/src/cli/commands/codegraph.ts +111 -9
  42. package/src/cli/commands/context.ts +2 -0
  43. package/src/cli/commands/doctor.ts +73 -4
  44. package/src/cli/commands/knowledge.ts +322 -0
  45. package/src/cli/commands/serve-http.ts +26 -42
  46. package/src/cli/commands/setup.ts +9 -3
  47. package/src/cli/index.ts +3 -1
  48. package/src/cli/tui/App.tsx +1 -1
  49. package/src/cli/tui/Panels.tsx +8 -8
  50. package/src/cli/tui/theme.ts +1 -1
  51. package/src/cli/tui/views/GraphView.tsx +8 -7
  52. package/src/cli/tui/views/KnowledgeView.tsx +9 -9
  53. package/src/codegraph/auto-context.ts +169 -19
  54. package/src/codegraph/code-state.ts +95 -0
  55. package/src/codegraph/context-pack.ts +82 -1
  56. package/src/codegraph/current-facts.ts +19 -1
  57. package/src/codegraph/external-provider.ts +581 -0
  58. package/src/codegraph/lite-provider.ts +64 -19
  59. package/src/codegraph/project-context.ts +9 -1
  60. package/src/codegraph/store.ts +154 -6
  61. package/src/codegraph/task-lens.ts +49 -5
  62. package/src/codegraph/types.ts +117 -0
  63. package/src/config/resolved-config.ts +28 -0
  64. package/src/config/toml-loader.ts +3 -0
  65. package/src/config/yaml-loader.ts +6 -0
  66. package/src/dashboard/server.ts +30 -47
  67. package/src/evaluation/workset-evaluation.ts +120 -0
  68. package/src/hooks/handler.ts +48 -6
  69. package/src/knowledge/claim-store.ts +267 -0
  70. package/src/knowledge/claims.ts +587 -0
  71. package/src/knowledge/markdown.ts +129 -0
  72. package/src/knowledge/types.ts +158 -0
  73. package/src/knowledge/wiki.ts +524 -0
  74. package/src/knowledge/workflow-store.ts +168 -0
  75. package/src/knowledge/workflow-types.ts +95 -0
  76. package/src/knowledge/workflows.ts +774 -0
  77. package/src/knowledge/workset.ts +515 -0
  78. package/src/knowledge/workspace-store.ts +220 -0
  79. package/src/knowledge/workspace-types.ts +106 -0
  80. package/src/knowledge/workspace.ts +220 -0
  81. package/src/memory/auto-relations.ts +21 -0
  82. package/src/memory/graph-scope.ts +46 -0
  83. package/src/memory/observations.ts +19 -0
  84. package/src/orchestrate/verify-gate.ts +33 -10
  85. package/src/runtime/control-plane-maintenance.ts +5 -0
  86. package/src/runtime/isolated-maintenance.ts +5 -0
  87. package/src/runtime/lifecycle-status.ts +102 -0
  88. package/src/runtime/lifecycle.ts +107 -0
  89. package/src/runtime/maintenance-jobs.ts +5 -0
  90. package/src/runtime/project-maintenance.ts +190 -0
  91. package/src/server/tool-profile.ts +3 -2
  92. package/src/server.ts +424 -22
  93. package/src/store/file-lock.ts +24 -4
  94. package/src/store/sqlite-db.ts +307 -0
  95. package/src/wiki/generator.ts +4 -2
  96. package/src/wiki/knowledge-graph.ts +7 -4
  97. package/src/wiki/types.ts +16 -4
@@ -0,0 +1,95 @@
1
+ import type { AgentTarget } from '../types.js';
2
+
3
+ export type WorkflowStatus = 'draft' | 'active' | 'archived';
4
+ export type WorkflowRunOutcome = 'passed' | 'failed' | 'cancelled' | 'in-progress';
5
+ export type WorkflowVerificationVerdict = 'passed' | 'failed' | 'not-run';
6
+
7
+ export interface WorkflowPhase {
8
+ id: string;
9
+ title: string;
10
+ instructions: string;
11
+ branches: string[];
12
+ expectedOutputs: string[];
13
+ verificationGates: string[];
14
+ }
15
+
16
+ /**
17
+ * A canonical project workflow. The Markdown file is the readable source; the
18
+ * SQLite copy exists only to make selection, run history, and diagnostics fast.
19
+ */
20
+ export interface WorkflowSpec {
21
+ id: string;
22
+ workspaceId: string;
23
+ title: string;
24
+ description: string;
25
+ status: WorkflowStatus;
26
+ version: number;
27
+ taskLenses: string[];
28
+ triggers: string[];
29
+ assumptions: string[];
30
+ requiredContext: string[];
31
+ guardrails: string[];
32
+ allowedTools: string[];
33
+ phases: WorkflowPhase[];
34
+ verificationGates: string[];
35
+ claimIds: string[];
36
+ evidenceRefs: string[];
37
+ codeRefs: string[];
38
+ compatibleAgents: AgentTarget[];
39
+ body: string;
40
+ sourcePath: string;
41
+ sourceHash: string;
42
+ contentHash: string;
43
+ createdAt: string;
44
+ updatedAt: string;
45
+ importedFrom?: string;
46
+ }
47
+
48
+ export interface WorkflowRun {
49
+ id: string;
50
+ workflowId: string;
51
+ projectId: string;
52
+ task: string;
53
+ startingSnapshotId?: string;
54
+ selectedEvidence: string[];
55
+ phaseState: Record<string, 'pending' | 'active' | 'passed' | 'failed' | 'skipped'>;
56
+ outcome: WorkflowRunOutcome;
57
+ verificationVerdict: WorkflowVerificationVerdict;
58
+ failureReason?: string;
59
+ startedAt: string;
60
+ completedAt?: string;
61
+ }
62
+
63
+ export interface WorkflowRunInput {
64
+ workflowId: string;
65
+ projectId: string;
66
+ task: string;
67
+ startingSnapshotId?: string;
68
+ selectedEvidence?: string[];
69
+ phaseState?: WorkflowRun['phaseState'];
70
+ outcome: WorkflowRunOutcome;
71
+ verificationVerdict?: WorkflowVerificationVerdict;
72
+ failureReason?: string;
73
+ startedAt?: string;
74
+ completedAt?: string;
75
+ }
76
+
77
+ export interface WorkflowSelection {
78
+ workflow: WorkflowSpec;
79
+ score: number;
80
+ reasons: string[];
81
+ firstPhase: WorkflowPhase;
82
+ cautions: string[];
83
+ }
84
+
85
+ export type WorkflowAdapterTarget = Extract<AgentTarget, 'codex' | 'claude-code' | 'cursor' | 'windsurf'>;
86
+ export type WorkflowAdapterStatus = 'create' | 'update' | 'unchanged' | 'conflict' | 'unsupported';
87
+
88
+ export interface WorkflowAdapterPreview {
89
+ agent: AgentTarget;
90
+ workflowId: string;
91
+ targetPath?: string;
92
+ content?: string;
93
+ status: WorkflowAdapterStatus;
94
+ reason: string;
95
+ }