cordn8 1.14.5 → 1.15.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.
- package/README.md +112 -128
- package/dist/agents/adapters/claude.d.ts +3 -0
- package/dist/agents/adapters/claude.d.ts.map +1 -0
- package/dist/agents/adapters/claude.js +124 -0
- package/dist/agents/adapters/claude.js.map +1 -0
- package/dist/agents/adapters/ollama.d.ts.map +1 -1
- package/dist/agents/adapters/ollama.js +28 -7
- package/dist/agents/adapters/ollama.js.map +1 -1
- package/dist/agents/build/file-blocks.d.ts +32 -0
- package/dist/agents/build/file-blocks.d.ts.map +1 -0
- package/dist/agents/build/file-blocks.js +95 -0
- package/dist/agents/build/file-blocks.js.map +1 -0
- package/dist/agents/build/llm.d.ts +38 -0
- package/dist/agents/build/llm.d.ts.map +1 -0
- package/dist/agents/build/llm.js +92 -0
- package/dist/agents/build/llm.js.map +1 -0
- package/dist/agents/build/ollama-build.d.ts +43 -0
- package/dist/agents/build/ollama-build.d.ts.map +1 -0
- package/dist/agents/build/ollama-build.js +166 -0
- package/dist/agents/build/ollama-build.js.map +1 -0
- package/dist/agents/build/orchestrate.d.ts +33 -0
- package/dist/agents/build/orchestrate.d.ts.map +1 -0
- package/dist/agents/build/orchestrate.js +145 -0
- package/dist/agents/build/orchestrate.js.map +1 -0
- package/dist/agents/build/plan.d.ts +50 -0
- package/dist/agents/build/plan.d.ts.map +1 -0
- package/dist/agents/build/plan.js +135 -0
- package/dist/agents/build/plan.js.map +1 -0
- package/dist/agents/build/run-builder.d.ts +31 -0
- package/dist/agents/build/run-builder.d.ts.map +1 -0
- package/dist/agents/build/run-builder.js +155 -0
- package/dist/agents/build/run-builder.js.map +1 -0
- package/dist/agents/build/verify.d.ts +48 -0
- package/dist/agents/build/verify.d.ts.map +1 -0
- package/dist/agents/build/verify.js +765 -0
- package/dist/agents/build/verify.js.map +1 -0
- package/dist/agents/build/workspace-write.d.ts +17 -0
- package/dist/agents/build/workspace-write.d.ts.map +1 -0
- package/dist/agents/build/workspace-write.js +73 -0
- package/dist/agents/build/workspace-write.js.map +1 -0
- package/dist/agents/registry.js +16 -0
- package/dist/agents/registry.js.map +1 -1
- package/dist/channel/watcher.d.ts.map +1 -1
- package/dist/channel/watcher.js +6 -0
- package/dist/channel/watcher.js.map +1 -1
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/channel-awaiting.d.ts.map +1 -1
- package/dist/commands/channel-awaiting.js +3 -2
- package/dist/commands/channel-awaiting.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +21 -15
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/maya.d.ts.map +1 -1
- package/dist/commands/maya.js +6 -0
- package/dist/commands/maya.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +37 -7
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/start.d.ts +17 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +47 -4
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/workspace-heal-channels.js +4 -4
- package/dist/commands/workspace-heal-channels.js.map +1 -1
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +54 -8
- package/dist/commands/workspace.js.map +1 -1
- package/dist/maya/v3/build-capability.d.ts +57 -0
- package/dist/maya/v3/build-capability.d.ts.map +1 -0
- package/dist/maya/v3/build-capability.js +173 -0
- package/dist/maya/v3/build-capability.js.map +1 -0
- package/dist/phase0/db.d.ts +26 -0
- package/dist/phase0/db.d.ts.map +1 -0
- package/dist/phase0/db.js +104 -0
- package/dist/phase0/db.js.map +1 -0
- package/dist/phase0/index.d.ts +10 -0
- package/dist/phase0/index.d.ts.map +1 -0
- package/dist/phase0/index.js +34 -0
- package/dist/phase0/index.js.map +1 -0
- package/dist/phase0/schema.d.ts +30 -0
- package/dist/phase0/schema.d.ts.map +1 -0
- package/dist/phase0/schema.js +79 -0
- package/dist/phase0/schema.js.map +1 -0
- package/dist/phase0/types.d.ts +184 -0
- package/dist/phase0/types.d.ts.map +1 -0
- package/dist/phase0/types.js +27 -0
- package/dist/phase0/types.js.map +1 -0
- package/dist/schemas/config.js +3 -3
- package/dist/schemas/config.js.map +1 -1
- package/dist/storage/config.js +1 -1
- package/dist/storage/config.js.map +1 -1
- package/dist/web/apps/web/.next/BUILD_ID +1 -1
- package/dist/web/apps/web/.next/app-build-manifest.json +134 -134
- package/dist/web/apps/web/.next/app-path-routes-manifest.json +34 -34
- package/dist/web/apps/web/.next/build-manifest.json +2 -2
- package/dist/web/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/_not-found.html +1 -1
- package/dist/web/apps/web/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/apps/web/.next/server/app/api/activity/commits/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/activity/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/activity/timeline/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/adapters/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/agent/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/agents/capabilities/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/audit/list/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/audit/proof/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/audit/verify/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/backlog/import/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/backlog/list/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/brain/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/budget/status/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/channel/decision/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/channel/digest/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/channel/grep/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/channel/send/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/channel/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/channel/tail/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/cost/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/diagnostic/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/events/tail/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/federation/connect/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/federation/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/healthz/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/inbox/post/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/insights/recent/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/insights/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/intent/ask/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/lane/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/learning/drift/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/learning/proposals/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/learning/self-learning/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/maya/launch/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/maya/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/mcp/audit/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/memory/entry/[id]/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/memory/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/mode/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/ops/adapters/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/ops/cost/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/ops/dispatch/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/ops/live/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/ops/maya/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/ops/status/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/optimizations/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/ownership/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/parallel/declared-scopes/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/parallel/plan/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/parallel/review/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/self-learning/apply/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/self-learning/rollback/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/state/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/state/sse/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/steward/recommend/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/steward/report/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/steward/status/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/task-templates/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/tasks/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/telemetry/latency/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/telemetry/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/trust/history/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/trust/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/version/route.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/api/version.body +1 -1
- package/dist/web/apps/web/.next/server/app/api/workspaces/route_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/mcp-audit/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/mcp-audit.html +1 -1
- package/dist/web/apps/web/.next/server/app/mcp-audit.rsc +1 -1
- package/dist/web/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/agents/[agentName]/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/agents/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/audit/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/backlog/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/channel-tail/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/cost/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/data/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/federation/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/flat/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/hub/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/inbox/[msgId]/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/inbox/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/insights/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/learning/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/memory/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/ops/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/optimization/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/parallel/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/security/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/settings/adapters/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/settings/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/tasks/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/timeline/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/trust/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app/project/[id]/workspaces/page_client-reference-manifest.js +1 -1
- package/dist/web/apps/web/.next/server/app-paths-manifest.json +34 -34
- package/dist/web/apps/web/.next/server/chunks/5535.js +1 -1
- package/dist/web/apps/web/.next/server/pages/404.html +1 -1
- package/dist/web/apps/web/.next/server/pages/500.html +1 -1
- package/dist/web/apps/web/package.json +1 -1
- package/dist/web/package.json +1 -1
- package/package.json +1 -1
- /package/dist/web/apps/web/.next/static/{Kc_EGjJWZrdeEKuJ5Tkkx → oVaQey5oEAmsNUsk5hxx1}/_buildManifest.js +0 -0
- /package/dist/web/apps/web/.next/static/{Kc_EGjJWZrdeEKuJ5Tkkx → oVaQey5oEAmsNUsk5hxx1}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -1,184 +1,168 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="apps/web/public/cordn8-logo.png" alt="Cordn8 logo" width="160" height="160" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">Cordn8</h1>
|
|
6
|
+
|
|
7
|
+
**The local-first coordination protocol for AI agents.** One auditable, append-only channel for every Claude, GPT, Hermes, NVIDIA NIM, Ollama, or custom assistant working in your repository. Git-visible, grep-able, and entirely secure — your data never leaves your disk.
|
|
4
8
|
|
|
5
9
|
[](https://github.com/MorvaniLabs/cordn8/actions/workflows/ci.yml) [](https://github.com/MorvaniLabs/cordn8/actions/workflows/release.yml) [](https://www.npmjs.com/package/cordn8) [](https://nodejs.org) [](https://www.typescriptlang.org/) [](LICENSE) [](CHANGELOG.md)
|
|
6
10
|
|
|
7
11
|

|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What Cordn8 Does for Your Multi-Agent Workflows
|
|
10
16
|
|
|
11
|
-
| Outcome | How |
|
|
17
|
+
| Outcome | How It Works | Verification Command |
|
|
12
18
|
| --- | --- | --- |
|
|
13
|
-
| **
|
|
14
|
-
| **
|
|
15
|
-
| **
|
|
16
|
-
| **
|
|
17
|
-
| **
|
|
18
|
-
| **
|
|
19
|
-
| **
|
|
20
|
-
| **
|
|
21
|
-
| **You can walk away with everything** | Plain markdown + JSON + ndjson export with SHA-256 manifest | `cordn8 export-all` |
|
|
19
|
+
| **Complete local auditability** | One append-only Markdown channel (`docs/agent-channel.md`) tracks all dispatches, handoffs, and approvals inline. | `cat docs/agent-channel.md` |
|
|
20
|
+
| **Resilient Loop-Free Onboarding** | Auto-detects local runtimes (like Ollama and Homebrew) and uses an inquirer-hardened picker with zero-key preset fallbacks. | `cordn8 start` |
|
|
21
|
+
| **Zero-friction autonomy controls** | Three explicit modes (MANUAL / COPILOT / AUTOPILOT) let you dial agent autonomy up or down without rewriting code. | `cordn8 mode get` |
|
|
22
|
+
| **Continuous Maya validation** | The built-in decision engine executes 22 validation journeys and 10 structural gates to inspect your project dynamically. | `cordn8 maya` |
|
|
23
|
+
| **Context Spine grounding** | Grounds agent dispatches in locked Briefs, evolutionary Source Vaults, and locked Decision Ledgers. | `cordn8 sources list` |
|
|
24
|
+
| **The Cordn8 Mantle Dashboard** | A gorgeous local Next.js GUI providing cost, latency, and trust scoring with real-time route triaging. | `cordn8 dashboard` |
|
|
25
|
+
| **Universal Adapter Edge** | A unified contract allowing dispatches to Anthropic Messages, OpenAI, Groq, Ollama, Hermes, or custom tools. | `cordn8 install --list` |
|
|
26
|
+
| **Multi-Agent CI/CD Collaboration** | Concurrency-safe lock writers and secure ship gates allow authorized AI assistants to commit and push safely. | `cordn8 ship` |
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
---
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
- You need an **audit trail of every agent decision** that a compliance reviewer can actually read
|
|
27
|
-
- You want to **swap model providers** without rewriting your coordination glue
|
|
28
|
-
- You're **shipping AI code to production** and need a release gate
|
|
29
|
-
- Your security review **won't approve a hosted vendor** — local-first is non-negotiable
|
|
30
|
+
## When to Use Cordn8
|
|
30
31
|
|
|
31
|
-
**
|
|
32
|
+
- **Multi-Agent Repositories**: You have 2+ AI assistants working in the same codebase and need to prevent overlapping edits, state drift, and merge conflicts.
|
|
33
|
+
- **Strict Compliance & Audits**: You need a persistent, human-readable audit trail of every AI decision checked directly into git.
|
|
34
|
+
- **Provider Portability**: You want to swap models (e.g., Anthropic Claude for local Llama via Ollama) without modifying your orchestration code.
|
|
35
|
+
- **Continuous Integration Gates**: You want to block builds on agent regressions, uninitialized configurations, or missing source grounding before staging.
|
|
36
|
+
- **Air-Gapped & Secure Environments**: Your security policy prohibits hosted SaaS wrappers. Cordn8 is local-first, storing telemetry on SQLite and channels on markdown.
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
**When NOT to use Cordn8:** You are running a single agent inside an IDE (e.g., Cursor or standard Claude Code), you prefer a hosted SaaS control plane with zero local setup, or your team does not work with command-line tools.
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
> **Read [PRICING.md](PRICING.md)** for what's free forever vs. what's coming in Cordn8 Pro.
|
|
40
|
+
---
|
|
37
41
|
|
|
38
|
-
## Install
|
|
42
|
+
## Install & Setup
|
|
39
43
|
|
|
40
44
|
```bash
|
|
41
45
|
# Global install from npm (recommended)
|
|
42
46
|
npm install -g cordn8
|
|
43
47
|
|
|
44
|
-
# Or try without installing
|
|
48
|
+
# Or try immediately without installing
|
|
45
49
|
npx cordn8 start
|
|
46
50
|
```
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
### Build from Source
|
|
50
53
|
```bash
|
|
51
|
-
git clone
|
|
54
|
+
git clone git@github.com:MorvaniLabs/cordn8.git
|
|
52
55
|
cd cordn8
|
|
53
56
|
npm install
|
|
54
|
-
npm run build
|
|
55
|
-
node
|
|
57
|
+
npm run build:all
|
|
58
|
+
node dist/cli.js --version
|
|
56
59
|
```
|
|
60
|
+
*Requires Node.js 18+ and npm.*
|
|
57
61
|
|
|
58
|
-
|
|
62
|
+
---
|
|
59
63
|
|
|
60
|
-
## Quick Start
|
|
64
|
+
## Quick Start CLI Journey
|
|
65
|
+
|
|
66
|
+
Scaffold your workspace, configure your first agent, and tail the append-only log in six commands:
|
|
61
67
|
|
|
62
68
|
```bash
|
|
63
|
-
# 1. Initialize Cordn8 in your
|
|
69
|
+
# 1. Initialize Cordn8 in your workspace
|
|
64
70
|
cordn8 init
|
|
65
71
|
|
|
66
|
-
# 2.
|
|
72
|
+
# 2. Add your first local or cloud model provider
|
|
73
|
+
cordn8 install nvidia-nim
|
|
74
|
+
|
|
75
|
+
# 3. Start the local dispatch and watcher daemon
|
|
67
76
|
cordn8 watch
|
|
68
77
|
|
|
69
|
-
#
|
|
70
|
-
cordn8
|
|
71
|
-
```
|
|
78
|
+
# 4. Dispatch a task with automatic agent selection
|
|
79
|
+
cordn8 do "build user login endpoint"
|
|
72
80
|
|
|
73
|
-
|
|
81
|
+
# 5. Tail the live append-only coordination channel
|
|
82
|
+
cordn8 channel tail --follow
|
|
74
83
|
|
|
75
|
-
|
|
76
|
-
cordn8
|
|
77
|
-
cordn8 do "build login" # dispatch a task with auto agent selection
|
|
78
|
-
cordn8 show # lanes + open tasks + recent activity + Maya gate
|
|
79
|
-
cordn8 fix # doctor + Maya gate + one-line next action
|
|
80
|
-
cordn8 ship # deploy walkthrough
|
|
84
|
+
# 6. Audit project health and validation scorecard
|
|
85
|
+
cordn8 maya
|
|
81
86
|
```
|
|
82
87
|
|
|
83
|
-
|
|
88
|
+
---
|
|
84
89
|
|
|
85
|
-
## Web Dashboard
|
|
90
|
+
## The Cordn8 Mantle Web Dashboard
|
|
86
91
|
|
|
87
|
-
Cordn8 ships a local Next.js
|
|
92
|
+
Cordn8 ships with a built-in local Next.js GUI — the **Cordn8 Mantle** — for operators who prefer visual management.
|
|
88
93
|
|
|
89
94
|
```bash
|
|
90
|
-
cordn8 dashboard
|
|
95
|
+
cordn8 dashboard
|
|
91
96
|
```
|
|
97
|
+
*This starts a local dashboard server and automatically opens it in your web browser. No hosted cloud endpoints required.*
|
|
92
98
|
|
|
93
|
-
The dashboard
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- **Channel view** with grep, tail, and digest collapse
|
|
99
|
-
- **Audit panel** for approvals, denials, and handoffs
|
|
99
|
+
The Mantle dashboard provides:
|
|
100
|
+
* **One-Click Dispatch**: Drag and drop tasks and assign them instantly.
|
|
101
|
+
* **Interactive Maya Scorecard**: Deep-dive into validation failures with one-click remediation.
|
|
102
|
+
* **Telemetry Insights**: Real-time graphs showing cumulative cost, token latency, and agent trust bands.
|
|
103
|
+
* **Channel Reader**: A gorgeous, collapsed grid of the markdown log featuring inline grep and tail filters.
|
|
100
104
|
|
|
101
|
-
|
|
105
|
+
---
|
|
102
106
|
|
|
103
|
-
##
|
|
107
|
+
## CLI Command Registry
|
|
104
108
|
|
|
105
|
-
The CLI
|
|
109
|
+
The Cordn8 CLI exposes ~240 commands categorized into logical groups. Run `cordn8 --help` for usage details on any command:
|
|
106
110
|
|
|
107
|
-
| Group |
|
|
111
|
+
| Command Group | Focus Area | Essential Commands |
|
|
108
112
|
| --- | --- | --- |
|
|
109
|
-
| **Lifecycle** |
|
|
110
|
-
| **Dispatch** |
|
|
111
|
-
| **Channel** |
|
|
112
|
-
| **
|
|
113
|
-
| **Agents** |
|
|
114
|
-
| **
|
|
115
|
-
| **
|
|
116
|
-
| **
|
|
117
|
-
| **
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
##
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
- **Custom adapters** — adapter contract, plugin guidance, and conformance testing
|
|
149
|
-
|
|
150
|
-
See [Adapter Docs](docs/adapters/README.md) and [Write Your Own Adapter](docs/adapters/write-your-own.md).
|
|
151
|
-
|
|
152
|
-
## How Cordn8 Differs
|
|
153
|
-
|
|
154
|
-
**Cordn8 is repo-and-channel-centered, not platform-centered.** It does not require teams to move work into a hosted orchestration platform or rewrite workflows around a single model provider. The coordination state lives in your project, the audit trail is visible in normal developer tools, and cloud services are optional adapter choices.
|
|
155
|
-
|
|
156
|
-
LangGraph and AutoGen are code-first orchestration frameworks. CrewAI focuses on persona-style crews. Hosted dashboards centralize workflow state outside the repository. Cordn8 is designed for operators who want multiple AI agents in the loop while keeping the coordination record local, reviewable, and portable.
|
|
157
|
-
|
|
158
|
-
See [Competitive Positioning](docs/strategy/competitive-positioning.md) for the longer comparison.
|
|
159
|
-
|
|
160
|
-
## Architecture
|
|
113
|
+
| **Lifecycle** | Scaffolding, watch daemons, health audits, deploys | `init`, `watch`, `doctor`, `ship`, `preview` |
|
|
114
|
+
| **Dispatch** | Goal wizardry, approvals, task lifecycles | `do`, `do --ai`, `ask`, `send`, `approve`, `deny`, `task show` |
|
|
115
|
+
| **Channel** | Tail log, grep filters, snapshots, recovery | `channel tail`, `channel grep`, `channel digest`, `channel restore` |
|
|
116
|
+
| **Spine** | Source vaults, decision ledgers, brief locks | `sources add`, `sources list`, `decisions lock`, `brief mission` |
|
|
117
|
+
| **Agents** | Capabilities, role management, lanes, ownerships | `install`, `agent show`, `agent capabilities`, `lane`, `ownership` |
|
|
118
|
+
| **Modes** | Autonomy control & optimizations | `mode get`, `mode set MANUAL\|COPILOT\|AUTOPILOT` |
|
|
119
|
+
| **MCP** | Model Context Protocol servers | `mcp enable`, `mcp disable`, `mcp status` |
|
|
120
|
+
| **Cost & Budget** | Financial guardrails & spending caps | `cost`, `budget set`, `budget status` |
|
|
121
|
+
| **Diagnostics** | Message tracing, error definitions, friction logs | `why <msg_id>`, `error <code>`, `export <bundle>`, `friction` |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Autonomy Modes
|
|
126
|
+
|
|
127
|
+
Coordinate the balance of human supervision versus agent velocity with three simple modes:
|
|
128
|
+
|
|
129
|
+
1. **`MANUAL`**: High-security, high-supervision. Every agent action requires explicit human approval before execution.
|
|
130
|
+
2. **`COPILOT`**: High-velocity collaboration. Agents execute routine, low-risk steps automatically, while high-risk changes (like filesystem writes) queue for approval.
|
|
131
|
+
3. **`AUTOPILOT`**: Maximum velocity. Agents execute end-to-end within their sandbox boundaries and token budgets, appending details to the channel for post-hoc audits.
|
|
132
|
+
|
|
133
|
+
Modes can be set dynamically via `cordn8 mode set <MODE>`. Changes are committed directly to the channel, ensuring the audit history records the exact level of autonomy active at the moment of every AI decision.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Architecture Blueprint
|
|
138
|
+
|
|
139
|
+
```mermaid
|
|
140
|
+
graph TD
|
|
141
|
+
User([Operator CLI / GUI]) --> |Dispatches Goal| Engine[Intent Engine]
|
|
142
|
+
Engine --> |Builds Brief| Spine[Context Spine]
|
|
143
|
+
Spine --> |Grounds Sources| Vault[(Source Vault & Decision Ledger)]
|
|
144
|
+
Spine --> |Appends inline| Channel[safe-write docs/agent-channel.md]
|
|
145
|
+
Channel --> |Triggers Watcher| Daemon[Watch Daemon]
|
|
146
|
+
Daemon --> |Dispatches to| Edge[Universal Edge Adapters]
|
|
147
|
+
Edge --> |Claude / GPT / NIM / Ollama| AI[AI Agent Sandbox]
|
|
148
|
+
AI --> |Commits proposal| Channel
|
|
149
|
+
Daemon --> |Runs validation| Maya[Maya Decision Engine]
|
|
150
|
+
Maya --> |Scorecard PASS/FAIL| User
|
|
151
|
+
```
|
|
161
152
|
|
|
162
|
-
|
|
163
|
-
- **Channel** — append-only markdown with a safe writer, validation, snapshots, and restore
|
|
164
|
-
- **Telemetry** — local SQLite-backed event and read-model storage
|
|
165
|
-
- **Adapters** — provider, CLI, IDE, and custom integration boundary
|
|
166
|
-
- **Dashboard** — local Next.js interface launched with `cordn8 dashboard`
|
|
167
|
-
- **Optional desktop shell** — Tauri wrapper for native app packaging; the CLI does not require Rust
|
|
153
|
+
---
|
|
168
154
|
|
|
169
|
-
## Documentation
|
|
155
|
+
## Documentation Index
|
|
170
156
|
|
|
171
|
-
|
|
157
|
+
Detailed guides are located in the [`docs/`](docs/) directory:
|
|
158
|
+
* [Quickstart Guide](docs/quickstart.md) — Walkthrough of your first 15 minutes.
|
|
159
|
+
* [Operator Guide](docs/operator-guide.md) — Comprehensive guide on modes, budgets, and the Context Spine.
|
|
160
|
+
* [CLI Cheatsheet](docs/CHEATSHEET.md) — One-page quick reference.
|
|
161
|
+
* [Adapter Integration](docs/adapters/README.md) — How to wire up Ollama, Anthropic, OpenAI, or write your own.
|
|
162
|
+
* [FAQ & Troubleshooting](docs/FAQ.md) — Common questions and operational support.
|
|
172
163
|
|
|
173
|
-
|
|
174
|
-
- [Operator Guide](docs/operator-guide.md)
|
|
175
|
-
- [CLI Cheatsheet](docs/CHEATSHEET.md)
|
|
176
|
-
- [Architecture Overview](docs/architecture/overview.md)
|
|
177
|
-
- [Adapter Docs](docs/adapters/README.md)
|
|
178
|
-
- [FAQ](docs/FAQ.md) · [Glossary](docs/GLOSSARY.md) · [Troubleshooting](docs/troubleshooting.md)
|
|
179
|
-
- [Manifesto](MANIFESTO.md) · [Security Policy](SECURITY.md) · [Contributing](docs/CONTRIBUTING.md)
|
|
180
|
-
- [Changelog](CHANGELOG.md)
|
|
164
|
+
---
|
|
181
165
|
|
|
182
166
|
## License
|
|
183
167
|
|
|
184
|
-
Cordn8 is released under the [MIT License](LICENSE).
|
|
168
|
+
Cordn8 is open source software released under the [MIT License](LICENSE).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/claude.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAyB1C,eAAO,MAAM,aAAa,EAAE,YAyE3B,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ClaudeAdapter = void 0;
|
|
37
|
+
const llm_1 = require("../build/llm");
|
|
38
|
+
const run_builder_1 = require("../build/run-builder");
|
|
39
|
+
const credentials_1 = require("../../storage/credentials");
|
|
40
|
+
const ANTHROPIC_KEY_ENV = 'ANTHROPIC_API_KEY';
|
|
41
|
+
const DEFAULT_MODEL = 'claude-sonnet-4-6';
|
|
42
|
+
/**
|
|
43
|
+
* Resolve the Anthropic API key without ever logging it. Prefer the OS
|
|
44
|
+
* keychain (cordn8 credential store, keyed by 'claude') so the key is never in
|
|
45
|
+
* plaintext on disk; fall back to the ANTHROPIC_API_KEY env var for CI / quick
|
|
46
|
+
* runs. Returns null when neither is present.
|
|
47
|
+
*/
|
|
48
|
+
async function resolveApiKey() {
|
|
49
|
+
try {
|
|
50
|
+
const stored = await (0, credentials_1.getSecret)('claude');
|
|
51
|
+
if (stored)
|
|
52
|
+
return stored;
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
/* keychain unavailable → fall back to env */
|
|
56
|
+
}
|
|
57
|
+
return process.env[ANTHROPIC_KEY_ENV] || null;
|
|
58
|
+
}
|
|
59
|
+
exports.ClaudeAdapter = {
|
|
60
|
+
id: 'claude',
|
|
61
|
+
type: 'API',
|
|
62
|
+
displayName: 'Claude (Anthropic API)',
|
|
63
|
+
async detect() {
|
|
64
|
+
return Boolean(await resolveApiKey());
|
|
65
|
+
},
|
|
66
|
+
async register(projectRoot, options) {
|
|
67
|
+
const model = options?.model || process.env.CORDN8_CLAUDE_MODEL || DEFAULT_MODEL;
|
|
68
|
+
return {
|
|
69
|
+
id: `claude-${model}`,
|
|
70
|
+
name: `Claude-${model}`,
|
|
71
|
+
adapter_id: 'claude',
|
|
72
|
+
role: 'BUILDER',
|
|
73
|
+
is_active: true,
|
|
74
|
+
added_at: new Date().toISOString(),
|
|
75
|
+
config: {
|
|
76
|
+
endpoint: 'https://api.anthropic.com/v1/messages',
|
|
77
|
+
default_model: model,
|
|
78
|
+
auth_env_var: ANTHROPIC_KEY_ENV,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
async generateIntegrationArtifacts() {
|
|
83
|
+
return { files: [] };
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Real build via the Anthropic API, through the shared build → verify → retry
|
|
87
|
+
* → write pipeline (run-builder.ts). The API key is read from the environment
|
|
88
|
+
* (ANTHROPIC_API_KEY) and never logged or persisted. Decomposition + the
|
|
89
|
+
* post-build verifier apply exactly as they do for the local builder, so a
|
|
90
|
+
* stronger model raises per-file quality without changing the contract.
|
|
91
|
+
*/
|
|
92
|
+
async onMessageHook(msg, recipient) {
|
|
93
|
+
// Skip only our own TERMINAL replies (RESOLVED/BLOCKED). A single-agent
|
|
94
|
+
// setup self-dispatches (FROM==TO) with STATUS: PENDING — that's real work
|
|
95
|
+
// and must be built, so a blanket `from === recipient` skip is wrong here.
|
|
96
|
+
const task = (msg.content || '').trim();
|
|
97
|
+
const status = String(msg.status || '').toUpperCase();
|
|
98
|
+
const isOwnReply = msg.from === recipient && (status === 'RESOLVED' || status === 'BLOCKED');
|
|
99
|
+
if (!task || isOwnReply)
|
|
100
|
+
return;
|
|
101
|
+
const apiKey = await resolveApiKey();
|
|
102
|
+
if (!apiKey) {
|
|
103
|
+
// No key → fail honestly rather than silently doing nothing.
|
|
104
|
+
const { writeMessage } = await Promise.resolve().then(() => __importStar(require('../../channel/writer')));
|
|
105
|
+
const channelPath = process.env.CORDN8_CHANNEL_PATH;
|
|
106
|
+
if (channelPath) {
|
|
107
|
+
await writeMessage(channelPath, {
|
|
108
|
+
from: recipient || 'Claude',
|
|
109
|
+
to: msg.from,
|
|
110
|
+
task_ref: msg.task_ref,
|
|
111
|
+
content: `Cannot build: no Anthropic API key found. Set ${ANTHROPIC_KEY_ENV} in the watcher's environment (export ${ANTHROPIC_KEY_ENV}=sk-ant-... before "cordn8 watch") and re-dispatch.`,
|
|
112
|
+
}, { mode: 'MANUAL', projectRoot: process.env.CORDN8_PROJECT_ROOT, status_override: 'BLOCKED' });
|
|
113
|
+
}
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const model = process.env.CORDN8_CLAUDE_MODEL || DEFAULT_MODEL;
|
|
117
|
+
await (0, run_builder_1.runBuilderHook)(msg, recipient, {
|
|
118
|
+
agentName: 'Claude',
|
|
119
|
+
complete: (0, llm_1.anthropicCompletion)({ apiKey, model }),
|
|
120
|
+
model,
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=claude.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../src/agents/adapters/claude.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ollama.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/ollama.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ollama.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/ollama.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAK1C,eAAO,MAAM,aAAa,EAAE,YAoD3B,CAAC"}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OllamaAdapter = void 0;
|
|
4
|
+
const llm_1 = require("../build/llm");
|
|
5
|
+
const run_builder_1 = require("../build/run-builder");
|
|
4
6
|
exports.OllamaAdapter = {
|
|
5
7
|
id: 'ollama',
|
|
6
8
|
type: 'OLLAMA',
|
|
7
9
|
displayName: 'Ollama Local',
|
|
8
|
-
async detect(
|
|
9
|
-
|
|
10
|
+
async detect() {
|
|
11
|
+
// Reachable iff the local Ollama server answers.
|
|
12
|
+
try {
|
|
13
|
+
const res = await fetch('http://localhost:11434/api/tags', {
|
|
14
|
+
signal: AbortSignal.timeout(3000),
|
|
15
|
+
});
|
|
16
|
+
return res.ok;
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
10
21
|
},
|
|
11
22
|
async register(projectRoot, options) {
|
|
12
|
-
const model = options?.model || '
|
|
23
|
+
const model = options?.model || 'qwen2.5-coder:7b';
|
|
13
24
|
return {
|
|
14
25
|
id: `ollama-${model}`,
|
|
15
26
|
name: `Ollama-${model}`,
|
|
@@ -24,12 +35,22 @@ exports.OllamaAdapter = {
|
|
|
24
35
|
},
|
|
25
36
|
};
|
|
26
37
|
},
|
|
27
|
-
async generateIntegrationArtifacts(
|
|
38
|
+
async generateIntegrationArtifacts() {
|
|
28
39
|
return { files: [] };
|
|
29
40
|
},
|
|
41
|
+
/**
|
|
42
|
+
* Real build: turn the dispatched task into files via the local model, using
|
|
43
|
+
* the shared build → verify → retry → write pipeline (run-builder.ts). The
|
|
44
|
+
* only Ollama-specific part is the completion backend.
|
|
45
|
+
*/
|
|
30
46
|
async onMessageHook(msg, recipient) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
47
|
+
const model = process.env.CORDN8_OLLAMA_MODEL || 'qwen2.5-coder:7b';
|
|
48
|
+
const endpoint = process.env.CORDN8_OLLAMA_ENDPOINT || 'http://localhost:11434/api/generate';
|
|
49
|
+
await (0, run_builder_1.runBuilderHook)(msg, recipient, {
|
|
50
|
+
agentName: 'Ollama',
|
|
51
|
+
complete: (0, llm_1.ollamaCompletion)({ endpoint, model }),
|
|
52
|
+
model,
|
|
53
|
+
});
|
|
54
|
+
},
|
|
34
55
|
};
|
|
35
56
|
//# sourceMappingURL=ollama.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ollama.js","sourceRoot":"","sources":["../../../src/agents/adapters/ollama.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ollama.js","sourceRoot":"","sources":["../../../src/agents/adapters/ollama.ts"],"names":[],"mappings":";;;AAEA,sCAAgD;AAChD,sDAAsD;AAEzC,QAAA,aAAa,GAAiB;IACzC,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,cAAc;IAE3B,KAAK,CAAC,MAAM;QACV,iDAAiD;QACjD,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,iCAAiC,EAAE;gBACzD,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;aAClC,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,WAAmB,EAAE,OAA4B;QAC9D,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,kBAAkB,CAAC;QACnD,OAAO;YACL,EAAE,EAAE,UAAU,KAAK,EAAE;YACrB,IAAI,EAAE,UAAU,KAAK,EAAE;YACvB,UAAU,EAAE,QAAQ;YACpB,IAAI,EAAE,SAAS;YACf,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YAClC,MAAM,EAAE;gBACN,QAAQ,EAAE,qCAAqC;gBAC/C,aAAa,EAAE,KAAK;gBACpB,YAAY,EAAE,IAAI;aACnB;SACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,4BAA4B;QAChC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,GAAY,EAAE,SAAkB;QAClD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,kBAAkB,CAAC;QACpE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,qCAAqC,CAAC;QAC7F,MAAM,IAAA,4BAAc,EAAC,GAAG,EAAE,SAAS,EAAE;YACnC,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE,IAAA,sBAAgB,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC/C,KAAK;SACN,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse LLM build output into a set of files to write.
|
|
3
|
+
*
|
|
4
|
+
* The build contract with the model is a fenced code block whose info-string
|
|
5
|
+
* names the target path, e.g.:
|
|
6
|
+
*
|
|
7
|
+
* ```file:src/index.html
|
|
8
|
+
* <!doctype html>...
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* We also accept a few formats that local models commonly drift into:
|
|
12
|
+
* ```file: index.html (space after colon)
|
|
13
|
+
* ```path=index.html
|
|
14
|
+
* ```html index.html (lang then path)
|
|
15
|
+
*
|
|
16
|
+
* This module is deliberately pure (string in, structured out) so it can be
|
|
17
|
+
* unit-tested without any model, filesystem, or network.
|
|
18
|
+
*/
|
|
19
|
+
export interface ParsedFile {
|
|
20
|
+
path: string;
|
|
21
|
+
content: string;
|
|
22
|
+
}
|
|
23
|
+
/** A path is acceptable if it's a relative, non-escaping POSIX-ish path. */
|
|
24
|
+
export declare function isSafeRelativePath(p: string): boolean;
|
|
25
|
+
/** Extract a target path from a fence info-string, or null if none. */
|
|
26
|
+
export declare function pathFromInfoString(info: string): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Parse all fenced code blocks that declare a file path.
|
|
29
|
+
* Returns one ParsedFile per safe, path-bearing block.
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseFileBlocks(text: string): ParsedFile[];
|
|
32
|
+
//# sourceMappingURL=file-blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-blocks.d.ts","sourceRoot":"","sources":["../../../src/agents/build/file-blocks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CASrD;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoB9D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CAiB1D"}
|