code60-transmission-server 0.0.0-stage → 0.1.0-staging.3

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 (88) hide show
  1. package/LICENSE +180 -0
  2. package/README.engine.md +401 -0
  3. package/README.md +294 -2
  4. package/dist/src/broker/filesystem.js +385 -0
  5. package/dist/src/broker/index.js +734 -0
  6. package/dist/src/broker/native/README.md +192 -0
  7. package/dist/src/broker/native/build.js +43 -0
  8. package/dist/src/broker/native/fs-helper.c +529 -0
  9. package/dist/src/broker/native/git-helper.c +205 -0
  10. package/dist/src/broker/policy.js +149 -0
  11. package/dist/src/broker/startup-lock.js +14 -0
  12. package/dist/src/broker/types.js +11 -0
  13. package/dist/src/cli/daemon.js +365 -0
  14. package/dist/src/cli/helpers.js +104 -0
  15. package/dist/src/cli/main.js +180 -0
  16. package/dist/src/config/deployment.js +166 -0
  17. package/dist/src/config/documents.js +29 -0
  18. package/dist/src/config/profile-validation.js +123 -0
  19. package/dist/src/config/schema-graph.js +237 -0
  20. package/dist/src/config/schema-loader.js +185 -0
  21. package/dist/src/config/validation-pool.js +105 -0
  22. package/dist/src/config/validation-protocol.js +1 -0
  23. package/dist/src/config/validation-worker.js +106 -0
  24. package/dist/src/config/workflow-language.js +9 -0
  25. package/dist/src/config/workflow-schema.json +534 -0
  26. package/dist/src/config/workflow-types.js +1 -0
  27. package/dist/src/config/workflow-validation.js +95 -0
  28. package/dist/src/engine/budgets.js +50 -0
  29. package/dist/src/engine/clocks.js +27 -0
  30. package/dist/src/engine/commands.js +441 -0
  31. package/dist/src/engine/contracts.js +11 -0
  32. package/dist/src/engine/drain-state.js +31 -0
  33. package/dist/src/engine/effective-permissions.js +120 -0
  34. package/dist/src/engine/instruction-pins.js +205 -0
  35. package/dist/src/engine/retries.js +50 -0
  36. package/dist/src/engine/state.js +1 -0
  37. package/dist/src/engine/timing.js +23 -0
  38. package/dist/src/engine/tool-observations.js +87 -0
  39. package/dist/src/engine/workflow-engine.js +1807 -0
  40. package/dist/src/main.js +25 -0
  41. package/dist/src/mcp/catalog.js +71 -0
  42. package/dist/src/mcp/main.js +24 -0
  43. package/dist/src/mcp/server.js +116 -0
  44. package/dist/src/runtime/codex-app-server.js +91 -0
  45. package/dist/src/runtime/containment.js +82 -0
  46. package/dist/src/runtime/engine-driver.js +212 -0
  47. package/dist/src/runtime/json-line-writer.js +192 -0
  48. package/dist/src/runtime/pinned-instruction-sources.js +24 -0
  49. package/dist/src/runtime/protocol-client.js +264 -0
  50. package/dist/src/runtime/protocol-pool.js +183 -0
  51. package/dist/src/runtime/protocol-projection.js +393 -0
  52. package/dist/src/runtime/protocol-types.js +1 -0
  53. package/dist/src/runtime/protocol-worker.js +18 -0
  54. package/dist/src/runtime/provider-bridge.js +288 -0
  55. package/dist/src/runtime/provider-credentials.js +41 -0
  56. package/dist/src/runtime/provider-transport.js +404 -0
  57. package/dist/src/runtime/runtime-broker.js +213 -0
  58. package/dist/src/runtime/workspace-instructions.js +120 -0
  59. package/dist/src/runtime/workspace-view.js +74 -0
  60. package/dist/src/server/api-contract.json +11086 -0
  61. package/dist/src/server/api-types.js +1 -0
  62. package/dist/src/server/application.js +38 -0
  63. package/dist/src/server/auth.js +67 -0
  64. package/dist/src/server/broker-handlers.js +242 -0
  65. package/dist/src/server/control-plane.js +50 -0
  66. package/dist/src/server/deployment.js +237 -0
  67. package/dist/src/server/errors.js +22 -0
  68. package/dist/src/server/history-handlers.js +113 -0
  69. package/dist/src/server/http.js +124 -0
  70. package/dist/src/server/paging.js +56 -0
  71. package/dist/src/server/publication.js +119 -0
  72. package/dist/src/server/tool-event-handler.js +77 -0
  73. package/dist/src/server/workspace-handlers.js +34 -0
  74. package/dist/src/storage/coordinator.js +224 -0
  75. package/dist/src/storage/startup-lock.js +71 -0
  76. package/dist/src/storage/store.js +167 -0
  77. package/dist/src/tools/check-worker.js +81 -0
  78. package/dist/src/tools/checks.js +106 -0
  79. package/dist/src/tools/dns.js +248 -0
  80. package/dist/src/tools/http-contract.js +38 -0
  81. package/dist/src/tools/http.js +358 -0
  82. package/dist/src/tools/index.js +177 -0
  83. package/dist/src/tools/worker-check.js +73 -0
  84. package/dist/src/workspaces/git.js +227 -0
  85. package/dist/src/workspaces/index.js +715 -0
  86. package/examples/deployment.local.json +22 -0
  87. package/package.json +68 -4
  88. package/scripts/postinstall.mjs +25 -0
@@ -0,0 +1,22 @@
1
+ {
2
+ "listenPort": 31260,
3
+ "operator": {
4
+ "id": "local-operator",
5
+ "workspaceIds": ["*"]
6
+ },
7
+ "runtime": {
8
+ "enabled": false,
9
+ "executable": "/REPLACE_WITH_ABSOLUTE_PATH_TO_CODEX",
10
+ "modelPort": 31261,
11
+ "models": [
12
+ { "id": "REPLACE_WITH_LOCAL_MODEL_ID", "effortLevels": ["low"] }
13
+ ]
14
+ },
15
+ "deploymentPolicy": { "defaultEffect": "deny", "rules": [] },
16
+ "agentHttp": {},
17
+ "schemaHttp": {
18
+ "networkPolicy": { "defaultEffect": "deny", "rules": [] }
19
+ },
20
+ "checks": [],
21
+ "deploymentRoots": []
22
+ }
package/package.json CHANGED
@@ -1,6 +1,70 @@
1
1
  {
2
2
  "name": "code60-transmission-server",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-staging.3",
4
+ "description": "Local workflow server and stdio MCP launcher for bounded coding-agent steps against Git workspaces.",
5
+ "license": "Apache-2.0",
6
+ "keywords": [
7
+ "mcp",
8
+ "model-context-protocol",
9
+ "workflow",
10
+ "coding-agent",
11
+ "codex",
12
+ "code60"
13
+ ],
14
+ "type": "module",
15
+ "os": [
16
+ "darwin"
17
+ ],
18
+ "engines": {
19
+ "node": ">=24.22.0 <25"
20
+ },
21
+ "bin": {
22
+ "code60-transmission-server": "dist/src/cli/main.js",
23
+ "code60": "dist/src/cli/main.js"
24
+ },
25
+ "files": [
26
+ "dist/src/**/*.js",
27
+ "dist/src/**/*.json",
28
+ "dist/src/broker/native/fs-helper.c",
29
+ "dist/src/broker/native/git-helper.c",
30
+ "dist/src/broker/native/README.md",
31
+ "!dist/src/broker/native/.build",
32
+ "!dist/src/broker/native/.build/**",
33
+ "examples/deployment.local.json",
34
+ "scripts/postinstall.mjs",
35
+ "LICENSE",
36
+ "README.md",
37
+ "README.engine.md"
38
+ ],
39
+ "scripts": {
40
+ "start": "node dist/src/main.js",
41
+ "build": "tsc -p tsconfig.build.json && node scripts/build-native.mjs",
42
+ "prepack": "npm run build",
43
+ "postinstall": "node scripts/postinstall.mjs",
44
+ "package:macos": "bash scripts/package-macos.sh",
45
+ "docs:api": "docker run --rm -p 127.0.0.1:8080:8080 -e SWAGGER_JSON=/spec/openapi.yaml -v \"$PWD/reference/workflow-engine/api:/spec:ro\" docker.swagger.io/swaggerapi/swagger-ui",
46
+ "example:hello-world": "node examples/hello-world/run.mjs",
47
+ "example:pull-request": "node examples/pull-request/run.mjs",
48
+ "smoke:native": "node scripts/smoke-native.mjs",
49
+ "typecheck": "tsc --noEmit",
50
+ "test": "npm run build && vitest run",
51
+ "test:pilot": "npm run build && vitest run tests/pilot"
52
+ },
53
+ "dependencies": {
54
+ "@agentclientprotocol/sdk": "2.7.0",
55
+ "@modelcontextprotocol/sdk": "1.32.2",
56
+ "ajv": "8.20.0",
57
+ "ajv-formats": "3.0.1",
58
+ "better-sqlite3": "13.2.0",
59
+ "fastify": "5.12.8",
60
+ "yaml": "2.9.1"
61
+ },
62
+ "devDependencies": {
63
+ "@types/better-sqlite3": "9.6.0",
64
+ "@types/node": "26.6.6",
65
+ "eslint": "10.15.0",
66
+ "typescript": "6.0.3",
67
+ "typescript-eslint": "8.73.0",
68
+ "vitest": "5.1.0"
69
+ }
70
+ }
@@ -0,0 +1,25 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { fileURLToPath } from 'node:url';
3
+
4
+ // Compile native macOS C helpers on npm/npx install without writing to stdout.
5
+ // In a source checkout before `npm run build`, `dist/` does not exist yet: exit quietly.
6
+ if (process.platform !== 'darwin') process.exit(0);
7
+
8
+ const nativeDir = new URL('../dist/src/broker/native/', import.meta.url);
9
+ const buildModule = new URL('build.js', nativeDir);
10
+ const fsSource = fileURLToPath(new URL('fs-helper.c', nativeDir));
11
+ const gitSource = fileURLToPath(new URL('git-helper.c', nativeDir));
12
+
13
+ if (!existsSync(fileURLToPath(buildModule)) || !existsSync(fsSource) || !existsSync(gitSource)) {
14
+ process.exit(0);
15
+ }
16
+
17
+ process.umask(0o077);
18
+ try {
19
+ const { buildFilesystemHelper, buildGitHelper } = await import(buildModule.href);
20
+ buildFilesystemHelper();
21
+ buildGitHelper();
22
+ } catch (error) {
23
+ const message = error instanceof Error ? error.message : String(error);
24
+ process.stderr.write(`code60-transmission-server: native helper build skipped during install (${message}).\n`);
25
+ }