@genoventures-labs/deckhand 0.1.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.
Files changed (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +152 -0
  3. package/agent/agent.ts +5 -0
  4. package/agent/instructions.md +23 -0
  5. package/agent/schedules/workspace_scan.md +5 -0
  6. package/agent/skills/conflict-triage.md +7 -0
  7. package/agent/skills/git-sync.md +11 -0
  8. package/agent/skills/github-entities.md +7 -0
  9. package/agent/tools/draft_commit_message.ts +12 -0
  10. package/agent/tools/gh_actions_list.ts +12 -0
  11. package/agent/tools/gh_actions_run.ts +17 -0
  12. package/agent/tools/gh_actions_watch.ts +14 -0
  13. package/agent/tools/gh_checks.ts +12 -0
  14. package/agent/tools/gh_issue_create.ts +16 -0
  15. package/agent/tools/gh_pr_create.ts +17 -0
  16. package/agent/tools/gh_project_create.ts +15 -0
  17. package/agent/tools/gh_repo_create.ts +18 -0
  18. package/agent/tools/git_add.ts +15 -0
  19. package/agent/tools/git_branch.ts +15 -0
  20. package/agent/tools/git_commit.ts +14 -0
  21. package/agent/tools/git_conflicts.ts +15 -0
  22. package/agent/tools/git_pull.ts +12 -0
  23. package/agent/tools/git_push.ts +16 -0
  24. package/agent/tools/git_status.ts +13 -0
  25. package/dist/cli.d.ts +2 -0
  26. package/dist/cli.js +262 -0
  27. package/dist/cli.js.map +1 -0
  28. package/dist/commands/runs.d.ts +2 -0
  29. package/dist/commands/runs.js +80 -0
  30. package/dist/commands/runs.js.map +1 -0
  31. package/dist/eve-dev.d.ts +1 -0
  32. package/dist/eve-dev.js +41 -0
  33. package/dist/eve-dev.js.map +1 -0
  34. package/dist/lib/config.d.ts +8 -0
  35. package/dist/lib/config.js +28 -0
  36. package/dist/lib/config.js.map +1 -0
  37. package/dist/lib/doctor.d.ts +6 -0
  38. package/dist/lib/doctor.js +42 -0
  39. package/dist/lib/doctor.js.map +1 -0
  40. package/dist/lib/env.d.ts +5 -0
  41. package/dist/lib/env.js +26 -0
  42. package/dist/lib/env.js.map +1 -0
  43. package/dist/lib/gh.d.ts +34 -0
  44. package/dist/lib/gh.js +52 -0
  45. package/dist/lib/gh.js.map +1 -0
  46. package/dist/lib/git.d.ts +26 -0
  47. package/dist/lib/git.js +131 -0
  48. package/dist/lib/git.js.map +1 -0
  49. package/dist/lib/model.d.ts +4 -0
  50. package/dist/lib/model.js +60 -0
  51. package/dist/lib/model.js.map +1 -0
  52. package/dist/lib/ollama.d.ts +4 -0
  53. package/dist/lib/ollama.js +65 -0
  54. package/dist/lib/ollama.js.map +1 -0
  55. package/dist/lib/paths.d.ts +2 -0
  56. package/dist/lib/paths.js +9 -0
  57. package/dist/lib/paths.js.map +1 -0
  58. package/dist/lib/run.d.ts +21 -0
  59. package/dist/lib/run.js +75 -0
  60. package/dist/lib/run.js.map +1 -0
  61. package/dist/lib/runs.d.ts +55 -0
  62. package/dist/lib/runs.js +168 -0
  63. package/dist/lib/runs.js.map +1 -0
  64. package/dist/lib/watch.d.ts +12 -0
  65. package/dist/lib/watch.js +38 -0
  66. package/dist/lib/watch.js.map +1 -0
  67. package/dist/lib/workspace.d.ts +1 -0
  68. package/dist/lib/workspace.js +5 -0
  69. package/dist/lib/workspace.js.map +1 -0
  70. package/dist/ui/format.d.ts +16 -0
  71. package/dist/ui/format.js +82 -0
  72. package/dist/ui/format.js.map +1 -0
  73. package/dist/ui/help.d.ts +7 -0
  74. package/dist/ui/help.js +197 -0
  75. package/dist/ui/help.js.map +1 -0
  76. package/dist/ui/table.d.ts +4 -0
  77. package/dist/ui/table.js +39 -0
  78. package/dist/ui/table.js.map +1 -0
  79. package/dist/ui/theme.d.ts +14 -0
  80. package/dist/ui/theme.js +22 -0
  81. package/dist/ui/theme.js.map +1 -0
  82. package/package.json +55 -0
  83. package/templates/github-actions/gated-sync.yml +35 -0
  84. package/templates/github-actions/morning-pull.yml +42 -0
  85. package/templates/github-actions/nightly-checks.yml +33 -0
  86. package/templates/github-actions/weekday-status.yml +17 -0
  87. package/templates/runs/gated-sync.yaml +19 -0
  88. package/templates/runs/morning-pull.yaml +17 -0
  89. package/templates/runs/nightly-checks.yaml +17 -0
  90. package/templates/runs/weekday-status.yaml +17 -0
  91. package/templates/schema/gated-run.v1.json +67 -0
@@ -0,0 +1,22 @@
1
+ import { styleText } from "node:util";
2
+ const colorEnabled = process.env.NO_COLOR === undefined &&
3
+ process.env.FORCE_COLOR !== "0" &&
4
+ Boolean(process.stdout.isTTY);
5
+ export function paint(style, text) {
6
+ if (!colorEnabled)
7
+ return text;
8
+ return styleText(style, text);
9
+ }
10
+ export const theme = {
11
+ brand: (text) => paint(["bold", "cyan"], text),
12
+ muted: (text) => paint("dim", text),
13
+ heading: (text) => paint(["bold", "white"], text),
14
+ ok: (text) => paint("green", text),
15
+ fail: (text) => paint("red", text),
16
+ warn: (text) => paint("yellow", text),
17
+ info: (text) => paint("cyan", text),
18
+ label: (text) => paint("bold", text),
19
+ path: (text) => paint("dim", text),
20
+ };
21
+ export const VERSION = "0.1.0";
22
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/ui/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,YAAY,GAChB,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS;IAClC,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG;IAC/B,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAEhC,MAAM,UAAU,KAAK,CAAC,KAAsC,EAAE,IAAY;IACxE,IAAI,CAAC,YAAY;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC;IACtD,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC;IAC3C,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC;IACzD,EAAE,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;IAC1C,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC;IAC1C,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7C,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC;IAC3C,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC;IAC5C,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC;CAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@genoventures-labs/deckhand",
3
+ "version": "0.1.0",
4
+ "description": "Deckhand: Eve CLI that routes Vercel AI Gateway to git and the GitHub CLI.",
5
+ "keywords": [
6
+ "cli",
7
+ "ai-gateway",
8
+ "eve",
9
+ "github",
10
+ "git",
11
+ "automation"
12
+ ],
13
+ "license": "MIT",
14
+ "author": "Bobby Backlogs",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/bobbybacklogs/LlamaPull.git"
18
+ },
19
+ "type": "module",
20
+ "bin": {
21
+ "deckhand": "dist/cli.js"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "agent",
26
+ "templates",
27
+ "README.md",
28
+ "LICENSE"
29
+ ],
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "engines": {
34
+ "node": ">=20"
35
+ },
36
+ "scripts": {
37
+ "build": "tsc -p tsconfig.json",
38
+ "dev": "tsx src/cli.ts",
39
+ "start": "node dist/cli.js",
40
+ "eve:dev": "eve dev",
41
+ "prepublishOnly": "npm run build"
42
+ },
43
+ "dependencies": {
44
+ "ai": "^7.0.93",
45
+ "commander": "^14.0.0",
46
+ "eve": "^0.54.3",
47
+ "yaml": "^2.9.1",
48
+ "zod": "^4.0.16"
49
+ },
50
+ "devDependencies": {
51
+ "@types/node": "^24.0.0",
52
+ "tsx": "^4.20.0",
53
+ "typescript": "^5.9.0"
54
+ }
55
+ }
@@ -0,0 +1,35 @@
1
+ # Gated local sync. Required reviewers on environment `deckhand-gate`
2
+ # must approve before commit. Push stays disabled in the matching YAML.
3
+
4
+ name: Deckhand gated sync
5
+
6
+ on:
7
+ schedule:
8
+ - cron: "0 2 * * 2-6" # 18:00 America/Los_Angeles (PST) weekdays
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ inspect:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: "24"
19
+ - run: npm install --global @genoventures-labs/deckhand
20
+ - run: deckhand status
21
+
22
+ execute:
23
+ needs: inspect
24
+ environment: deckhand-gate
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: actions/setup-node@v4
29
+ with:
30
+ node-version: "24"
31
+ - run: npm install --global @genoventures-labs/deckhand
32
+ - run: deckhand runs apply gated-sync --approve
33
+ env:
34
+ DECKHAND_RUN_APPROVED: "1"
35
+ AI_GATEWAY_API_KEY: ${{ secrets.AI_GATEWAY_API_KEY }}
@@ -0,0 +1,42 @@
1
+ # Deckhand gated run: fast-forward pull at 05:00 America/Los_Angeles.
2
+ # GitHub cron is UTC. 13:00 UTC = 05:00 PST (standard time).
3
+ # Adjust to 12:00 UTC during PDT, or run from a self-hosted runner with the YAML timezone.
4
+ #
5
+ # Gate: create a GitHub Environment named `deckhand-gate` and add required reviewers.
6
+ # The inspect job always runs. The execute job waits for that environment.
7
+
8
+ name: Deckhand morning pull
9
+
10
+ on:
11
+ schedule:
12
+ - cron: "0 13 * * *"
13
+ workflow_dispatch:
14
+
15
+ jobs:
16
+ inspect:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: actions/setup-node@v4
21
+ with:
22
+ node-version: "24"
23
+ - run: npm install --global @genoventures-labs/deckhand
24
+ - run: deckhand doctor
25
+ - run: deckhand status
26
+
27
+ execute:
28
+ needs: inspect
29
+ if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
30
+ environment: deckhand-gate
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ with:
35
+ fetch-depth: 0
36
+ - uses: actions/setup-node@v4
37
+ with:
38
+ node-version: "24"
39
+ - run: npm install --global @genoventures-labs/deckhand
40
+ - run: deckhand runs apply morning-pull --approve
41
+ env:
42
+ DECKHAND_RUN_APPROVED: "1"
@@ -0,0 +1,33 @@
1
+ name: Deckhand nightly checks
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 7 * * *" # 23:00 America/Los_Angeles (PST)
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ inspect:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-node@v4
14
+ with:
15
+ node-version: "24"
16
+ - run: npm install --global @genoventures-labs/deckhand
17
+ - run: deckhand checks
18
+ continue-on-error: true
19
+
20
+ execute:
21
+ needs: inspect
22
+ environment: deckhand-gate
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - uses: actions/setup-node@v4
27
+ with:
28
+ node-version: "24"
29
+ - run: npm install --global @genoventures-labs/deckhand
30
+ - run: deckhand runs apply nightly-checks --approve
31
+ env:
32
+ DECKHAND_RUN_APPROVED: "1"
33
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,17 @@
1
+ name: Deckhand weekday status
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 16 * * 1-5" # 08:00 America/Los_Angeles (PST)
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ inspect:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-node@v4
14
+ with:
15
+ node-version: "24"
16
+ - run: npm install --global @genoventures-labs/deckhand
17
+ - run: deckhand status
@@ -0,0 +1,19 @@
1
+ # yaml-language-server: $schema=../schema/gated-run.v1.json
2
+ apiVersion: deckhand/v1
3
+ kind: GatedRun
4
+ metadata:
5
+ name: gated-sync
6
+ description: Stage and commit local diffs at 6pm. Push stays off until the gate and sync.push are both enabled.
7
+ spec:
8
+ schedule:
9
+ cron: "0 18 * * 1-5"
10
+ timezone: America/Los_Angeles
11
+ action: sync
12
+ workspace: .
13
+ gate:
14
+ enabled: true
15
+ environment: deckhand-gate
16
+ requireCleanTree: false
17
+ requireChecks: false
18
+ sync:
19
+ push: false
@@ -0,0 +1,17 @@
1
+ # yaml-language-server: $schema=../schema/gated-run.v1.json
2
+ apiVersion: deckhand/v1
3
+ kind: GatedRun
4
+ metadata:
5
+ name: morning-pull
6
+ description: Fast-forward pull at 5am local time (Pacific).
7
+ spec:
8
+ schedule:
9
+ cron: "0 5 * * *"
10
+ timezone: America/Los_Angeles
11
+ action: pull
12
+ workspace: .
13
+ gate:
14
+ enabled: true
15
+ environment: deckhand-gate
16
+ requireCleanTree: true
17
+ requireChecks: false
@@ -0,0 +1,17 @@
1
+ # yaml-language-server: $schema=../schema/gated-run.v1.json
2
+ apiVersion: deckhand/v1
3
+ kind: GatedRun
4
+ metadata:
5
+ name: nightly-checks
6
+ description: Surface PR / Actions status at 11pm. Gated so noisy check failures wait for a reviewer.
7
+ spec:
8
+ schedule:
9
+ cron: "0 23 * * *"
10
+ timezone: America/Los_Angeles
11
+ action: checks
12
+ workspace: .
13
+ gate:
14
+ enabled: true
15
+ environment: deckhand-gate
16
+ requireCleanTree: true
17
+ requireChecks: false
@@ -0,0 +1,17 @@
1
+ # yaml-language-server: $schema=../schema/gated-run.v1.json
2
+ apiVersion: deckhand/v1
3
+ kind: GatedRun
4
+ metadata:
5
+ name: weekday-status
6
+ description: Print git status every weekday morning. Ungated — inspect only.
7
+ spec:
8
+ schedule:
9
+ cron: "0 8 * * 1-5"
10
+ timezone: America/Los_Angeles
11
+ action: status
12
+ workspace: .
13
+ gate:
14
+ enabled: false
15
+ environment: deckhand-gate
16
+ requireCleanTree: false
17
+ requireChecks: false
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/bobbybacklogs/LlamaPull/templates/schema/gated-run.v1.json",
4
+ "title": "Deckhand GatedRun",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["apiVersion", "kind", "metadata", "spec"],
8
+ "properties": {
9
+ "apiVersion": { "const": "deckhand/v1" },
10
+ "kind": { "const": "GatedRun" },
11
+ "metadata": {
12
+ "type": "object",
13
+ "required": ["name"],
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "name": { "type": "string", "minLength": 1 },
17
+ "description": { "type": "string" }
18
+ }
19
+ },
20
+ "spec": {
21
+ "type": "object",
22
+ "required": ["schedule", "action"],
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "schedule": {
26
+ "type": "object",
27
+ "required": ["cron"],
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "cron": {
31
+ "type": "string",
32
+ "description": "5-field cron. GitHub Actions schedules are UTC; timezone is for local/self-hosted runners and documentation."
33
+ },
34
+ "timezone": { "type": "string", "default": "UTC" }
35
+ }
36
+ },
37
+ "action": {
38
+ "type": "string",
39
+ "enum": ["status", "pull", "sync", "checks", "actions-list"]
40
+ },
41
+ "workspace": { "type": "string", "default": "." },
42
+ "gate": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "enabled": { "type": "boolean", "default": true },
47
+ "environment": {
48
+ "type": "string",
49
+ "default": "deckhand-gate",
50
+ "description": "GitHub Environment name. Add required reviewers on that environment to hold the execute job."
51
+ },
52
+ "requireCleanTree": { "type": "boolean", "default": true },
53
+ "requireChecks": { "type": "boolean", "default": false }
54
+ }
55
+ },
56
+ "sync": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "properties": {
60
+ "push": { "type": "boolean", "default": false },
61
+ "message": { "type": "string" }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }