@markjaquith/agency 3.9.0 → 3.9.2
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 +14 -15
- package/package.json +1 -1
- package/src/commands/act-actions.ts +3 -6
- package/src/commands/act.ts +2 -4
- package/src/utils/interactive.js +16 -4
package/README.md
CHANGED
|
@@ -616,21 +616,20 @@ handoffs restore the terminal before starting the interactive worker, then reope
|
|
|
616
616
|
the TUI when the worker returns. A configured
|
|
617
617
|
external chooser continues to offer goals and **Browse items** through that chooser.
|
|
618
618
|
|
|
619
|
-
| Goal | Choose in `act`
|
|
620
|
-
| ------------------------------------ |
|
|
621
|
-
| Manage repositories | Add, link, set up, materialize, fetch, verify, rename, update, unlink, or remove aliases
|
|
622
|
-
| Create work | Create a standard task, multi-phase task, investigation, epic, or a task inside an epic
|
|
623
|
-
| Split work | Add a phase / split this task; name the existing work's first phase
|
|
624
|
-
| Work on a task or phase | Work on this item
|
|
625
|
-
| Move from investigation to execution | Create implementation follow-up
|
|
626
|
-
| Review someone else's work | Review a PR, or a remote branch/commit
|
|
627
|
-
|
|
|
628
|
-
|
|
|
629
|
-
|
|
|
630
|
-
|
|
|
631
|
-
|
|
|
632
|
-
|
|
|
633
|
-
| Check or refresh the workbase | Validate, diagnose, reconcile all state, or inspect/update managed integration files | `validate`, `doctor`, `sync-all`, `integration-status`, `integration-sync` |
|
|
619
|
+
| Goal | Choose in `act` | Discovery/action ID |
|
|
620
|
+
| ------------------------------------ | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
621
|
+
| Manage repositories | Add, link, set up, materialize, fetch, verify, rename, update, unlink, or remove aliases | `repo-add`, `repo-link`, `repo-setup`, `repo-materialize`, `repo-fetch`, `repo-verify`, `repo-rename`, `repo-remote`, `repo-unlink`, `repo-remove` |
|
|
622
|
+
| Create work | Create a standard task, multi-phase task, investigation, epic, or a task inside an epic | `task-create`, `multi-phase-create`, `investigation-create`, `epic-create`, `task-create-in-epic` |
|
|
623
|
+
| Split work | Add a phase / split this task; name the existing work's first phase | `split` |
|
|
624
|
+
| Work on a task or phase | Work on this item | `work` |
|
|
625
|
+
| Move from investigation to execution | Create implementation follow-up | `handoff` |
|
|
626
|
+
| Review someone else's work | Review a PR, or a remote branch/commit | `review`, `review-ref` |
|
|
627
|
+
| Publish or update PR status | Push without a PR, refresh provider state, create a PR, mark a GitHub PR ready, or close it | `push`, `sync`, `pr`, `pr-ready`, `pr-close` |
|
|
628
|
+
| Maintain review work | Fetch and repin a review task to its current source | `review-refresh` |
|
|
629
|
+
| Organize work | Rename an item, move a task into/out of an epic, or add/remove a sibling dependency | `rename`, `move-to-epic`, `remove-from-epic`, `dependency-add`, `dependency-remove` |
|
|
630
|
+
| Archive terminal work | Archive | `archive` |
|
|
631
|
+
| See work status | See current or ready work | `current-work`, `ready-work` |
|
|
632
|
+
| Check or refresh the workbase | Validate, diagnose, reconcile all state, or inspect/update managed integration files | `validate`, `doctor`, `sync-all`, `integration-status`, `integration-sync` |
|
|
634
633
|
|
|
635
634
|
After creating a task, phase, review, or implementation follow-up, choose **Work
|
|
636
635
|
on the new item now** or **Finish**. Only choosing Work prepares checkouts and
|
package/package.json
CHANGED
|
@@ -292,6 +292,9 @@ const actionPresentation: Record<
|
|
|
292
292
|
},
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
+
export const isActActionId = (id: string): boolean =>
|
|
296
|
+
Object.hasOwn(actionPresentation, id)
|
|
297
|
+
|
|
295
298
|
const present = (details: Details) => {
|
|
296
299
|
const presentation = actionPresentation[details.id]
|
|
297
300
|
if (!presentation)
|
|
@@ -386,12 +389,6 @@ export const actionGroups = [
|
|
|
386
389
|
icon: "",
|
|
387
390
|
actions: ["push", "sync", "pr", "pr-ready", "pr-close"],
|
|
388
391
|
},
|
|
389
|
-
{
|
|
390
|
-
id: "close",
|
|
391
|
-
label: "Close or reopen work",
|
|
392
|
-
icon: "",
|
|
393
|
-
actions: ["complete", "drop", "sync", "reopen"],
|
|
394
|
-
},
|
|
395
392
|
{
|
|
396
393
|
id: "archive",
|
|
397
394
|
label: "Archive finished work",
|
package/src/commands/act.ts
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
actionGroups,
|
|
15
15
|
actActions,
|
|
16
16
|
actionOutput,
|
|
17
|
+
isActActionId,
|
|
17
18
|
type ActAction,
|
|
18
19
|
type ActEntity,
|
|
19
20
|
} from "./act-actions"
|
|
@@ -360,10 +361,7 @@ const actStep = (
|
|
|
360
361
|
if (session && options.directory && isPath && !selectedKey && !actionId)
|
|
361
362
|
session.activateTab("workbase")
|
|
362
363
|
state.view = !selectedKey && !actionId ? "home" : "flow"
|
|
363
|
-
if (
|
|
364
|
-
actionId &&
|
|
365
|
-
!actionGroups.some((group) => group.actions.some((id) => id === actionId))
|
|
366
|
-
)
|
|
364
|
+
if (actionId && !isActActionId(actionId))
|
|
367
365
|
return yield* Effect.fail(
|
|
368
366
|
new Error(
|
|
369
367
|
`Unknown action '${actionId}'; use agency act --json to discover actions`,
|
package/src/utils/interactive.js
CHANGED
|
@@ -260,7 +260,8 @@ var InteractiveSelectPrompt = (props) => {
|
|
|
260
260
|
const dimensions = useTerminalDimensions();
|
|
261
261
|
const [query, setQuery] = createSignal("");
|
|
262
262
|
const editing = createReadlineEditing(() => input, setQuery);
|
|
263
|
-
const
|
|
263
|
+
const initialIndex = props.initialKey ? props.choices.findIndex((choice) => choice.key === props.initialKey) : 0;
|
|
264
|
+
const [selected, setSelected] = createSignal(Math.max(initialIndex, 0));
|
|
264
265
|
const choices = createMemo(() => fuzzyChoices(props.choices, query()));
|
|
265
266
|
const displaySegments = (choice) => choice.segments ?? [{
|
|
266
267
|
text: choice.label
|
|
@@ -684,6 +685,9 @@ var InteractiveTabbedPrompt = (props) => {
|
|
|
684
685
|
get emptyLabel() {
|
|
685
686
|
return tab.emptyLabel;
|
|
686
687
|
},
|
|
688
|
+
get initialKey() {
|
|
689
|
+
return tab.initialKey;
|
|
690
|
+
},
|
|
687
691
|
onTab: cycle,
|
|
688
692
|
get onDone() {
|
|
689
693
|
return props.onDone;
|
|
@@ -727,6 +731,7 @@ var createInteractiveSession = async (onCancel = () => {}, initialTabs = []) =>
|
|
|
727
731
|
let quitRequested = false;
|
|
728
732
|
let activeTab = 0;
|
|
729
733
|
let frameTabs = initialTabs;
|
|
734
|
+
const tabSelections = new Map;
|
|
730
735
|
let navigationRequested = false;
|
|
731
736
|
const navigate = (index) => {
|
|
732
737
|
activeTab = index;
|
|
@@ -901,9 +906,16 @@ var createInteractiveSession = async (onCancel = () => {}, initialTabs = []) =>
|
|
|
901
906
|
cancelled = false;
|
|
902
907
|
setNotice(message);
|
|
903
908
|
},
|
|
904
|
-
tabs: (tabs) => {
|
|
905
|
-
frameTabs = tabs
|
|
906
|
-
|
|
909
|
+
tabs: async (tabs) => {
|
|
910
|
+
frameTabs = tabs.map((tab) => ({
|
|
911
|
+
...tab,
|
|
912
|
+
initialKey: tabSelections.get(tab.id)
|
|
913
|
+
}));
|
|
914
|
+
const selected = await ask("", undefined, frameTabs);
|
|
915
|
+
const tab = frameTabs[activeTab];
|
|
916
|
+
if (selected !== null && tab?.choices.some((choice) => choice.key === selected))
|
|
917
|
+
tabSelections.set(tab.id, selected);
|
|
918
|
+
return selected;
|
|
907
919
|
},
|
|
908
920
|
text: (prompt) => ask(prompt),
|
|
909
921
|
select: (prompt, choices) => ask(prompt, choices),
|