Commit 1ccbcfa
authored
fix(v0.6.2): repo view takes positional OWNER/NAME, repo file handles dirs (#8)
Two real failures we just saw the corvidagent hit on a corvid-verify
PR #5 lookup:
1. `github repo view CorvidLabs/corvid-verify` failed with
`unknown argument 'CorvidLabs/corvid-verify'`. `gh repo view`
takes the repo as a positional natively, and the agent reasonably
tried the same shape. Accept it when the token looks like
`owner/name` (contains a `/`); -R still works for explicit form.
2. `github repo file Sources -R CorvidLabs/corvid-verify` died with
`jq: expected an object but got: array`. The contents API returns
an array for directories; we were piping that into a jq filter
that assumed an object with a .content field. Probe the response
type once, then render: file -> decoded contents (unchanged),
directory -> name<TAB>type<TAB>size listing. Same command for
both, agent can now browse a remote repo with one tool instead
of getting stuck.1 parent 7c22867 commit 1ccbcfa
3 files changed
Lines changed: 55 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
3 | 10 | | |
4 | 11 | | |
5 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
| |||
42 | 51 | | |
43 | 52 | | |
44 | 53 | | |
45 | | - | |
46 | | - | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
48 | 57 | | |
49 | | - | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
53 | 67 | | |
54 | 68 | | |
55 | | - | |
| 69 | + | |
| 70 | + | |
56 | 71 | | |
| 72 | + | |
57 | 73 | | |
58 | 74 | | |
59 | 75 | | |
| |||
114 | 130 | | |
115 | 131 | | |
116 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
117 | 140 | | |
118 | 141 | | |
119 | 142 | | |
120 | 143 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 144 | + | |
126 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
127 | 165 | | |
128 | 166 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments