engineering-memory 0.1.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.
Files changed (40) hide show
  1. package/bin/engineering-memory.mjs +120 -0
  2. package/dispatcher/managed-section.mjs +59 -0
  3. package/dispatcher/sections.mjs +14 -0
  4. package/install/api-url.mjs +39 -0
  5. package/install/cli.mjs +93 -0
  6. package/install/commands.mjs +140 -0
  7. package/install/files.mjs +416 -0
  8. package/install/git-hook.mjs +270 -0
  9. package/install/installer.mjs +279 -0
  10. package/install/mcp-registration.mjs +457 -0
  11. package/package.json +28 -0
  12. package/runtime/dist/src/auth/browser-auth.js +184 -0
  13. package/runtime/dist/src/auth/credential-store.js +181 -0
  14. package/runtime/dist/src/cache/etag-cache.js +123 -0
  15. package/runtime/dist/src/config.js +59 -0
  16. package/runtime/dist/src/git/git-inspector.js +375 -0
  17. package/runtime/dist/src/git/pre-commit.js +44 -0
  18. package/runtime/dist/src/git/verification-gate.js +221 -0
  19. package/runtime/dist/src/index.js +60 -0
  20. package/runtime/dist/src/journal/journal-store.js +1300 -0
  21. package/runtime/dist/src/mcp/server.js +11 -0
  22. package/runtime/dist/src/mcp/tool-definitions.js +405 -0
  23. package/runtime/dist/src/project/repository.js +79 -0
  24. package/runtime/dist/src/runtime/active-context-store.js +356 -0
  25. package/runtime/dist/src/runtime/api-client.js +229 -0
  26. package/runtime/dist/src/runtime/bridge-service.js +2226 -0
  27. package/runtime/dist/src/runtime/offline-outbox.js +274 -0
  28. package/runtime/dist/src/runtime/principal-state.js +97 -0
  29. package/runtime/dist/src/types.js +2 -0
  30. package/runtime/dist/src/utilities/files.js +189 -0
  31. package/runtime/dist/src/utilities/hash.js +19 -0
  32. package/runtime/dist/src/utilities/process.js +32 -0
  33. package/runtime/package-lock.json +137 -0
  34. package/runtime/package.json +32 -0
  35. package/skill/SKILL.md +29 -0
  36. package/skill/agents/openai.yaml +6 -0
  37. package/skill/references/lifecycle.md +102 -0
  38. package/skill/references/memory-updates.md +25 -0
  39. package/skill/references/questionnaires.md +98 -0
  40. package/skill/references/scaffolding.md +38 -0
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ import { serveStdio } from '@modelcontextprotocol/server/stdio';
3
+ import { BrowserAuthCoordinator } from './auth/browser-auth.js';
4
+ import { createCredentialStore } from './auth/credential-store.js';
5
+ import { EtagCache } from './cache/etag-cache.js';
6
+ import { apiNamespaceKey, apiStateRoot, endpoints, loadBridgeConfig } from './config.js';
7
+ import { GitInspector } from './git/git-inspector.js';
8
+ import { VerificationGate } from './git/verification-gate.js';
9
+ import { JournalStore } from './journal/journal-store.js';
10
+ import { createEngineeringMemoryServer } from './mcp/server.js';
11
+ import { RepositoryResolver } from './project/repository.js';
12
+ import { ApiClient } from './runtime/api-client.js';
13
+ import { BridgeService } from './runtime/bridge-service.js';
14
+ import { OfflineOutbox } from './runtime/offline-outbox.js';
15
+ import { ActiveContextStore } from './runtime/active-context-store.js';
16
+ import { PrincipalStateGuard } from './runtime/principal-state.js';
17
+ export function createBridgeService() {
18
+ const config = loadBridgeConfig();
19
+ const apiNamespace = apiNamespaceKey(config.apiBaseUrl);
20
+ const stateRoot = apiStateRoot(config);
21
+ const credentials = createCredentialStore({
22
+ service: config.credentialService,
23
+ account: `${config.credentialAccount}:${apiNamespace}`,
24
+ stateRoot,
25
+ });
26
+ const cache = new EtagCache({
27
+ stateRoot,
28
+ maxEntries: config.cacheMaxEntries,
29
+ maxBytes: config.cacheMaxBytes,
30
+ maxAgeMs: config.cacheMaxAgeMs,
31
+ });
32
+ const client = new ApiClient({
33
+ baseUrl: config.apiBaseUrl,
34
+ timeoutMs: config.requestTimeoutMs,
35
+ credentials,
36
+ cache,
37
+ refreshPath: endpoints.authRefresh,
38
+ });
39
+ const git = new GitInspector();
40
+ const outbox = new OfflineOutbox(stateRoot);
41
+ const activeContexts = new ActiveContextStore(stateRoot);
42
+ const gate = new VerificationGate(stateRoot, git, outbox);
43
+ const principalState = new PrincipalStateGuard(stateRoot, credentials, cache, outbox, activeContexts, gate);
44
+ return new BridgeService({
45
+ client,
46
+ credentials,
47
+ browserAuth: new BrowserAuthCoordinator(client, credentials),
48
+ repositories: new RepositoryResolver(git, config.markerSchemaVersion),
49
+ journal: new JournalStore(stateRoot),
50
+ outbox,
51
+ gate,
52
+ activeContexts,
53
+ principalState,
54
+ });
55
+ }
56
+ export function createServer() {
57
+ return createEngineeringMemoryServer(createBridgeService());
58
+ }
59
+ void serveStdio(createServer);
60
+ //# sourceMappingURL=index.js.map