← All procedures

lib.scan

Scan for packages in the git directory

MCPCLI
Package
@procedures/lib · README
Path
["lib","scan"]
CLI
mark lib scan
MCP tool
lib.scan on the dev-tools server
As data
{"$proc":["lib","scan"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/lib"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["lib","scan"], {});
console.log(JSON.stringify(result));

From the command line

$ mark lib scan

As data, in a program

{ "$proc": ["lib", "scan"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
rootPathstringnoWorkspace root (defaults to the pnpm workspace that contains client-lib)

Output

FieldTypeRequiredDefaultDescription
packagesobjectyesThe workspace packages, by name
warningsobject[]yesThe problems that the scan found
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "rootPath": {
        "description": "Workspace root (defaults to the pnpm workspace that contains client-lib)",
        "type": "string"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "packages": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The package name"
            },
            "repoPath": {
              "type": "string",
              "description": "The absolute path of the package folder"
            },
            "gitRemote": {
              "description": "The git remote URL of the workspace repository",
              "type": "string"
            },
            "currentBranch": {
              "description": "The current branch of the workspace repository",
              "type": "string"
            },
            "mark1russell7Deps": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The ecosystem dependencies of the package (@procedures/* and @mark1russell7/*)"
            }
          },
          "required": [
            "name",
            "repoPath",
            "mark1russell7Deps"
          ],
          "additionalProperties": {}
        },
        "description": "The workspace packages, by name"
      },
      "warnings": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "path": {
              "type": "string",
              "description": "The folder"
            },
            "issue": {
              "type": "string",
              "description": "The problem"
            }
          },
          "required": [
            "path",
            "issue"
          ],
          "additionalProperties": {}
        },
        "description": "The problems that the scan found"
      }
    },
    "required": [
      "packages",
      "warnings"
    ],
    "additionalProperties": {}
  }
}