code60-transmission-server 0.1.0-staging.2 → 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.
package/README.md CHANGED
@@ -210,9 +210,12 @@ recovery. Workspace registration requires an unrestricted operator. To execute
210
210
  agent steps, enable and configure the deployment runtime.
211
211
 
212
212
  1. Discover runtimes and named checks, then register an authorized worktree with
213
- `create_workspace`. Publish a worker with `create_agent_profile`.
214
- 2. Read the MCP resources `code60://workflow/schema` and
215
- `code60://workflow/example`. Replace the example’s worker placeholder with
213
+ `create_workspace`. Use the selected provider's `credentialReferences`
214
+ from `get_runtime_configuration` as `credentialRefs.provider` when publishing
215
+ a worker with `create_agent_profile`.
216
+ 2. Call `get_workflow_schema` and `get_workflow_example`, or read the MCP
217
+ resources `code60://workflow/schema` and `code60://workflow/example`.
218
+ Replace the example’s worker placeholder with
216
219
  the profile’s `latestVersionId`. Pass the YAML or JSON source and any bundled
217
220
  resources to `validate_workflow`, then publish with `create_workflow`.
218
221
  3. Call `create_run` with a unique `idempotencyKey` and a `body` containing
@@ -152,7 +152,10 @@ export function runtimeAdvertisement(config, tools) {
152
152
  available: config.runtime.enabled, authenticationState: config.runtime.enabled ? 'ready' : 'requires_configuration' },
153
153
  configuration: { runtimeId: LOCAL_RUNTIME_ID,
154
154
  providers: [{ id: LOCAL_PROVIDER_ID, models: structuredClone(config.runtime.models) },
155
- ...(config.providers ?? []).map(provider => ({ id: provider.id, models: provider.models.map(({ id, effortLevels }) => ({ id, effortLevels: [...effortLevels] })) }))],
155
+ ...(config.providers ?? []).map(provider => ({ id: provider.id,
156
+ credentialReferences: (config.providerCredentials ?? []).filter(credential => credential.providerId === provider.id)
157
+ .map(credential => credential.referenceId),
158
+ models: provider.models.map(({ id, effortLevels }) => ({ id, effortLevels: [...effortLevels] })) }))],
156
159
  capabilities: { actionInterception: true, filesystemScopes: true, networkScopes: true, subprocessRestrictions: true,
157
160
  explicitInstructionSources: true, singleUseDispatch: true, toolHistory: true, quiesceWorker: true,
158
161
  projectReadOnlyEnforcement: true, scratchWrites: true },
@@ -21,7 +21,8 @@ const instructions = [
21
21
  'Discover runtimes and checks, register an authorized standalone Git repository, and publish profiles before workflows.',
22
22
  'Workspaces must be existing standalone Git repositories with a real .git directory, at least one commit, no linked worktrees, no stale lock files, and no hardlinked files in .git. Do not run git init or git commit inside a sandbox that blocks file deletion (which leaves hardlinked tmp_obj_* files in .git); have the user prepare the repository directly on disk or clone with --no-hardlinks.',
23
23
  'Use latestVersionId to pin profiles in workflow source and to select a workflow version in create_run.',
24
- 'Read the workflow schema and example through resources/list and resources/read.',
24
+ 'Call get_workflow_schema and get_workflow_example for authoring. The workflow version is the string "1".',
25
+ 'Call get_runtime_configuration and use the selected provider credentialReferences ID in credentialRefs.provider.',
25
26
  'POST tools take the engine request body under body and a caller-chosen idempotencyKey. Retry an uncertain outcome with the same arguments.',
26
27
  'For conditional writes, read the target and pass its exact etag as ifMatch. Reassess the target after a conflict.',
27
28
  'Results contain status, body and available receipt metadata. A 202 admits work. Inspect the run or poll get_operation for its outcome.',
@@ -85,9 +86,20 @@ async function callEngine(entry, args, port, token, signal) {
85
86
  }
86
87
  export function createWorkflowServer(port, token) {
87
88
  const catalog = operatorCatalog();
89
+ const discoveryTools = [
90
+ { name: 'get_workflow_schema', description: 'Get the workflow language JSON Schema, including required fields and supported values.',
91
+ inputSchema: { type: 'object', properties: {}, additionalProperties: false }, annotations: { readOnlyHint: true } },
92
+ { name: 'get_workflow_example', description: 'Get a minimal valid workflow. Replace the worker profile version placeholder before validation.',
93
+ inputSchema: { type: 'object', properties: {}, additionalProperties: false }, annotations: { readOnlyHint: true } },
94
+ ];
88
95
  const server = new Server({ name: 'code60-workflows', version: '0.1.0' }, { capabilities: { tools: {}, resources: {} }, instructions });
89
- server.setRequestHandler(ListToolsRequestSchema, () => ({ tools: Array.from(catalog.values(), entry => entry.tool) }));
96
+ server.setRequestHandler(ListToolsRequestSchema, () => ({ tools: [...discoveryTools, ...Array.from(catalog.values(), entry => entry.tool)] }));
90
97
  server.setRequestHandler(CallToolRequestSchema, ({ params }, { signal }) => {
98
+ if (params.name === 'get_workflow_schema' || params.name === 'get_workflow_example') {
99
+ if (Object.keys(params.arguments ?? {}).length)
100
+ return result({ code: 'invalid_arguments' }, true);
101
+ return result({ status: 200, body: params.name === 'get_workflow_schema' ? resources[0].value : example });
102
+ }
91
103
  const entry = catalog.get(params.name);
92
104
  if (!entry)
93
105
  throw new McpError(ErrorCode.InvalidParams, 'Unknown Code60 operator tool.');
@@ -6839,6 +6839,14 @@
6839
6839
  "type": "string",
6840
6840
  "minLength": 1
6841
6841
  },
6842
+ "credentialReferences": {
6843
+ "type": "array",
6844
+ "description": "Configured provider credential reference IDs for profile credentialRefs.provider. Contains no credential values.",
6845
+ "items": {
6846
+ "$ref": "#/components/schemas/Id"
6847
+ },
6848
+ "uniqueItems": true
6849
+ },
6842
6850
  "models": {
6843
6851
  "type": "array",
6844
6852
  "items": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code60-transmission-server",
3
- "version": "0.1.0-staging.2",
3
+ "version": "0.1.0-staging.3",
4
4
  "description": "Local workflow server and stdio MCP launcher for bounded coding-agent steps against Git workspaces.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [