{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/resolvers/sweep.resolver.ts",
          "name": "withoutSpans",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-resolvers-sweep-resolver-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/resolvers/sweep.resolver.ts",
            "label": "tools/core/resolvers/sweep.resolver.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/resolvers/sweep.resolver.ts.md",
            "ref": "anatomy:file-coordination-tools-core-resolvers-sweep-resolver-ts"
          }
        },
        {
          "file": "tools/core/strings/sweep.strings.ts",
          "name": "swept",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-sweep-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/sweep.strings.ts",
            "label": "tools/core/strings/sweep.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/sweep.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-sweep-strings-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "tools/core/entrypoints/board.entrypoint.ts",
          "name": "main",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-entrypoints-board-entrypoint-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/entrypoints/board.entrypoint.ts",
            "label": "tools/core/entrypoints/board.entrypoint.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/entrypoints/board.entrypoint.ts.md",
            "ref": "anatomy:file-coordination-tools-core-entrypoints-board-entrypoint-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "runSweep",
      "signature": "export const runSweep = function runSweep(repoRoot: string, absolute: string, archive: string): SweepOutcome {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/runners/sweep.runner.ts",
          "name": "isBoundaryLine",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-sweep-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/sweep.runner.ts",
            "label": "tools/core/runners/sweep.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/sweep.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-sweep-runner-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "tools/core/runners/sweep.runner.ts",
          "name": "runDischarge",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-sweep-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/sweep.runner.ts",
            "label": "tools/core/runners/sweep.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/sweep.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-sweep-runner-ts"
          }
        }
      ],
      "exported": false,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 98,
      "name": "dischargeLine",
      "signature": "const dischargeLine = function dischargeLine(state: DischargeScan, line: string, clause: string): DischargeScan {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "tools/core/runners/sweep.runner.ts",
          "name": "dischargeLine",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-sweep-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/sweep.runner.ts",
            "label": "tools/core/runners/sweep.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/sweep.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-sweep-runner-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 94,
      "name": "isBoundaryLine",
      "signature": "const isBoundaryLine = function isBoundaryLine(trimmed: string): boolean {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/strings/board.strings.ts",
          "name": "dischargeNotVenue",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-board-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/board.strings.ts",
            "label": "tools/core/strings/board.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/board.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-board-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/board.strings.ts",
          "name": "dischargeRefUnresolved",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-board-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/board.strings.ts",
            "label": "tools/core/strings/board.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/board.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-board-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/board.strings.ts",
          "name": "dischargeRefUntyped",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-board-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/board.strings.ts",
            "label": "tools/core/strings/board.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/board.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-board-strings-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 113,
      "name": "dischargeRefusal",
      "signature": "const dischargeRefusal = function dischargeRefusal(request: DischargeRequest): string | null {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "tools/core/runners/sweep.runner.ts",
          "name": "dischargeLine",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-sweep-runner-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/sweep.runner.ts",
            "label": "tools/core/runners/sweep.runner.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/sweep.runner.ts.md",
            "ref": "anatomy:file-coordination-tools-core-runners-sweep-runner-ts"
          }
        },
        {
          "file": "tools/core/strings/board.strings.ts",
          "name": "dischargeContended",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-board-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/board.strings.ts",
            "label": "tools/core/strings/board.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/board.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-board-strings-ts"
          }
        },
        {
          "file": "tools/core/strings/board.strings.ts",
          "name": "dischargeSettled",
          "source": {
            "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-board-strings-ts",
            "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/board.strings.ts",
            "label": "tools/core/strings/board.strings.ts",
            "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/board.strings.ts.md",
            "ref": "anatomy:file-coordination-tools-core-strings-board-strings-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 134,
      "name": "runDischarge",
      "signature": "export const runDischarge = function runDischarge(request: DischargeRequest): { message: string; code: number } {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "HEADING",
      "signature": "const HEADING = \"\\n## board sweep: items every addressee has written past\\n\\n\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "DIRECTIVES_HEADING",
      "signature": "const DIRECTIVES_HEADING = \"DIRECTIVES\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 22,
      "name": "SweepOutcome",
      "signature": "interface SweepOutcome {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 27,
      "name": "DischargeRequest",
      "signature": "interface DischargeRequest {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 35,
      "name": "DischargeScan",
      "signature": "interface DischargeScan {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 42,
      "name": "DISCHARGE_START",
      "signature": "const DISCHARGE_START: DischargeScan = { dropping: false, inside: false, keep: true, removed: 0 };"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 51,
      "name": "written",
      "signature": "const written = seenItems(itemSpans(before));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 56,
      "name": "held",
      "signature": "const held: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 57,
      "name": "seen",
      "signature": "const seen: typeof written = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 60,
      "name": "unread",
      "signature": "const unread = span.to.filter((reader) => !wasDelivered(repoRoot, reader, span.key));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 68,
      "name": "holdNote",
      "signature": "const holdNote = held.length === 0 ? \"\" : sweepHeld(held);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 74,
      "name": "entries",
      "signature": "const entries = seen.map("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 84,
      "name": "target",
      "signature": "const target = resolve(repoRoot, archive);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 89,
      "name": "keys",
      "signature": "const keys = seen.map((span) => span.key);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 99,
      "name": "trimmed",
      "signature": "const trimmed = line.trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 104,
      "name": "inside",
      "signature": "const inside = state.inside && !isBoundaryLine(trimmed);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 109,
      "name": "continues",
      "signature": "const continues = state.dropping && line.startsWith(\" \") && trimmed.length > 0 && !trimmed.startsWith(\"- \");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 114,
      "name": "{ ref, target }",
      "signature": "const { ref, target } = request;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 123,
      "name": "separator",
      "signature": "const separator = ref.indexOf(\":\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 124,
      "name": "kind",
      "signature": "const kind = separator === -1 ? \"\" : ref.slice(0, separator).trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 125,
      "name": "member",
      "signature": "const member = separator === -1 ? \"\" : ref.slice(separator + 1).trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 130,
      "name": "filed",
      "signature": "const filed = existsSync(request.archive) && readFileSync(request.archive, \"utf8\").includes(member);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 135,
      "name": "refusal",
      "signature": "const refusal = dischargeRefusal(request);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 140,
      "name": "before",
      "signature": "const before = readFileSync(request.absolute, \"utf8\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 141,
      "name": "lines",
      "signature": "const lines = before.split(\"\\n\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 142,
      "name": "kept",
      "signature": "const kept: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 143,
      "name": "state",
      "signature": "let state = DISCHARGE_START;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 155,
      "name": "witness",
      "signature": "const witness = readFileSync(request.absolute, \"utf8\");"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-sweep-runner-ts",
  "language": "typescript",
  "layer": "product",
  "name": "sweep.runner.ts",
  "path": "tools/core/runners/sweep.runner.ts",
  "ref": "anatomy:file-coordination-tools-core-runners-sweep-runner-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-runners",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-runners",
          "label": "tools/core/runners",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-runners.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-runners"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-resolvers-sweep-resolver-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/resolvers/sweep.resolver.ts",
          "label": "tools/core/resolvers/sweep.resolver.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/resolvers/sweep.resolver.ts.md",
          "ref": "anatomy:file-coordination-tools-core-resolvers-sweep-resolver-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-board-strings-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/board.strings.ts",
          "label": "tools/core/strings/board.strings.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/board.strings.ts.md",
          "ref": "anatomy:file-coordination-tools-core-strings-board-strings-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-strings-sweep-strings-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/strings/sweep.strings.ts",
          "label": "tools/core/strings/sweep.strings.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/strings/sweep.strings.ts.md",
          "ref": "anatomy:file-coordination-tools-core-strings-sweep-strings-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-entrypoints-board-entrypoint-ts",
          "json": "https://banes-lab.com/json/source/coordination/tools/core/entrypoints/board.entrypoint.ts",
          "label": "tools/core/entrypoints/board.entrypoint.ts",
          "markdown": "https://banes-lab.com/source/coordination/tools/core/entrypoints/board.entrypoint.ts.md",
          "ref": "anatomy:file-coordination-tools-core-entrypoints-board-entrypoint-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-entrypoints",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-entrypoints",
          "label": "tools/core/entrypoints",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-entrypoints.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-entrypoints"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-resolvers",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-resolvers",
          "label": "tools/core/resolvers",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-resolvers.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-resolvers"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-runners",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-runners",
          "label": "tools/core/runners",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-runners.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-runners"
        },
        {
          "href": "https://banes-lab.com/anatomy/coordination#folder-coordination-tools-core-strings",
          "json": "https://banes-lab.com/json/anatomy/coordination/folder-coordination-tools-core-strings",
          "label": "tools/core/strings",
          "markdown": "https://banes-lab.com/anatomy/coordination/folder-coordination-tools-core-strings.md",
          "ref": "chapter:/anatomy/coordination#folder-coordination-tools-core-strings"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "runner",
    "subject": "sweep",
    "variant": null
  },
  "stats": {
    "bytes": 5593,
    "callable": 5,
    "definitions": 33,
    "edges": 9,
    "exported": 16,
    "files": 1,
    "findings": {},
    "flows": {
      "relay": 2,
      "leaf": 1,
      "entry": 2,
      "isolated": 28
    },
    "lines": {
      "blank": 32,
      "code": 130,
      "total": 162
    }
  },
  "summary": "130 lines of code and 33 definitions.",
  "text": "https://banes-lab.com/source/coordination/tools/core/runners/sweep.runner.ts.txt",
  "tree": "coordination",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-task-runner-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/task.runner.ts",
      "label": "tools/core/runners/task.runner.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/task.runner.ts.md",
      "ref": "anatomy:file-coordination-tools-core-runners-task-runner-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/coordination#file-coordination-tools-core-runners-surface-runner-ts",
      "json": "https://banes-lab.com/json/source/coordination/tools/core/runners/surface.runner.ts",
      "label": "tools/core/runners/surface.runner.ts",
      "markdown": "https://banes-lab.com/source/coordination/tools/core/runners/surface.runner.ts.md",
      "ref": "anatomy:file-coordination-tools-core-runners-surface-runner-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/coordination/tools/core/runners",
    "label": "tools/core/runners",
    "markdown": "https://banes-lab.com/api/source/coordination/tools/core/runners.md",
    "ref": "api:source/coordination/tools/core/runners"
  }
}
