@10xagents/connector-multica 0.1.1 → 0.2.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 +10 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +10 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -81,9 +81,17 @@ Multica gives each workspace one Default workflow, so the connector merges a tar
|
|
|
81
81
|
|
|
82
82
|
- **Built-in columns are shared.** Backlog, Todo, In Progress, In Review, Blocked, Done and Cancelled keep Multica's names, and every workflow that has one uses the same column. Two workflows have to agree on its handoff, step and moves.
|
|
83
83
|
- **The first workflow keeps its column names.** A custom column takes its `name`, or its key in title case, so `plan_review` becomes Plan Review.
|
|
84
|
-
- **Every later workflow's columns are prefixed** with its id in title case, so `part`'s `planning` becomes Part Planning.
|
|
84
|
+
- **Every later workflow's columns are prefixed** with the workflow's `prefix`, or with its id in title case when it has none, so `part`'s `planning` becomes Part Planning, and with `prefix: In Parts /`, In Parts / Planning. The first workflow ignores its `prefix`, so the same workflow can come first in one target and later in another.
|
|
85
85
|
|
|
86
|
-
Multica makes a custom status's key from its first name and keeps it when you rename the status, so Part Planning gets the key `part_planning
|
|
86
|
+
Multica makes a custom status's key from its first name and keeps it when you rename the status, so with no `prefix`, Part Planning gets the key `part_planning`, and a workflow with a `prefix` gets keys made from its prefixed names. A workspace whose statuses were renamed keeps their old keys, and `multica issue-status list` shows each status's key. `{{workflows.<id>.columns.<key>}}` renders the names, so the texts name the columns as the workspace shows them.
|
|
87
|
+
|
|
88
|
+
To rename a live workspace's columns, for example when you add a `prefix`, rename each status first, then run `sync`:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
multica issue-status update part_planning --name "In Parts / Planning"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`sync` never renames a status. It matches the workspace's custom statuses to the columns by their place, but when it writes the workflow, it finds each custom column's status by its name. So without the rename, a sync where nothing else differs keeps the old names, and one that changes the workflow, like a step whose text names the column, creates a status with the new name and drops the old one from the workflow. Multica doesn't move issues, so those on the old status stay on it, under a hidden column.
|
|
87
95
|
|
|
88
96
|
`build`, `plan` and `sync` stop on what Multica would refuse or put back another way:
|
|
89
97
|
|
package/dist/index.d.mts
CHANGED
|
@@ -28,7 +28,8 @@ export declare const MAX_DESCRIPTION = 255;
|
|
|
28
28
|
/**
|
|
29
29
|
* The Multica name of each column: a built-in column's own, the first workflow's custom columns
|
|
30
30
|
* by their `name` (or their key, in title case), and every later workflow's prefixed with the
|
|
31
|
-
* workflow's id
|
|
31
|
+
* workflow's `prefix`, or its id in title case. The first workflow's `prefix` is ignored, so a
|
|
32
|
+
* workflow can come first in one target and later in another.
|
|
32
33
|
*/
|
|
33
34
|
export declare const columnNames: (workflows: readonly Workflow[]) => ColumnNames;
|
|
34
35
|
/** One column of the merged workflow. */
|
package/dist/index.mjs
CHANGED
|
@@ -95,9 +95,10 @@ const listProfiles = (home) => {
|
|
|
95
95
|
};
|
|
96
96
|
/**
|
|
97
97
|
* The profile to use: the one given, the only one there is, or the one the person picks. Throws
|
|
98
|
-
* when there are several and no terminal to ask in.
|
|
98
|
+
* when there are several and no terminal to ask in. The question holds the numbered list, so the
|
|
99
|
+
* list reaches the person wherever the question does, and never the command's output.
|
|
99
100
|
*/
|
|
100
|
-
const pickProfile = async (home, given, ask
|
|
101
|
+
const pickProfile = async (home, given, ask) => {
|
|
101
102
|
if (given !== void 0) return given;
|
|
102
103
|
const found = listProfiles(home);
|
|
103
104
|
if (found.length === 0) throw new Error("no logged-in Multica CLI profile under ~/.multica: log in with the Desktop app or `multica login`");
|
|
@@ -106,8 +107,7 @@ const pickProfile = async (home, given, ask, log) => {
|
|
|
106
107
|
const names = found.map((name) => name || "\"\" for the default").join(", ");
|
|
107
108
|
throw new Error(`several Multica profiles: pass --profile <name> (${names})`);
|
|
108
109
|
}
|
|
109
|
-
found.
|
|
110
|
-
const answer = await ask("Profile (number): ");
|
|
110
|
+
const answer = await ask(`${found.map((name, index) => ` ${index + 1}. ${name || "(default)"}\n`).join("")}Profile (number): `);
|
|
111
111
|
const picked = found[Number(answer) - 1];
|
|
112
112
|
if (picked === void 0) throw new Error(`no profile ${answer}`);
|
|
113
113
|
return picked;
|
|
@@ -128,7 +128,7 @@ const text = (value) => typeof value === "string" ? value : typeof value === "nu
|
|
|
128
128
|
const pull = async (target, options, context) => {
|
|
129
129
|
const log = options.log ?? (() => {});
|
|
130
130
|
const bin = findMultica(context.env, context.desktop);
|
|
131
|
-
const profile = await pickProfile(homeOf(context.env), options.profile, options.ask
|
|
131
|
+
const profile = await pickProfile(homeOf(context.env), options.profile, options.ask);
|
|
132
132
|
const cli = {
|
|
133
133
|
bin,
|
|
134
134
|
profileArgs: profile ? ["--profile", profile] : [],
|
|
@@ -462,13 +462,15 @@ const titleCase = (key) => key.split(/[_-]+/).filter(Boolean).map((word) => `${w
|
|
|
462
462
|
/**
|
|
463
463
|
* The Multica name of each column: a built-in column's own, the first workflow's custom columns
|
|
464
464
|
* by their `name` (or their key, in title case), and every later workflow's prefixed with the
|
|
465
|
-
* workflow's id
|
|
465
|
+
* workflow's `prefix`, or its id in title case. The first workflow's `prefix` is ignored, so a
|
|
466
|
+
* workflow can come first in one target and later in another.
|
|
466
467
|
*/
|
|
467
468
|
const columnNames = (workflows) => Object.fromEntries(workflows.map((workflow, index) => [workflow.id, Object.fromEntries(workflow.columns.map((column) => {
|
|
468
469
|
const builtIn = BUILT_IN[column.key];
|
|
469
470
|
if (builtIn !== void 0) return [column.key, builtIn];
|
|
470
471
|
const own = column.name ?? titleCase(column.key);
|
|
471
|
-
|
|
472
|
+
if (index === 0) return [column.key, own];
|
|
473
|
+
return [column.key, `${workflow.prefix ?? titleCase(workflow.id)} ${own}`];
|
|
472
474
|
}))]));
|
|
473
475
|
const ref = (workflow, key) => `${workflow}\0${key}`;
|
|
474
476
|
const toColumn = (workflow, column) => ({
|
|
@@ -863,7 +865,7 @@ const spawnJson = (cli, args, workspace) => {
|
|
|
863
865
|
const openSource = async (query, context) => {
|
|
864
866
|
const log = query.log ?? (() => {});
|
|
865
867
|
const bin = findMultica(context.env, context.desktop);
|
|
866
|
-
const profile = await pickProfile(homeOf(context.env), query.profile, query.ask
|
|
868
|
+
const profile = await pickProfile(homeOf(context.env), query.profile, query.ask);
|
|
867
869
|
const cli = {
|
|
868
870
|
bin,
|
|
869
871
|
profileArgs: profile ? ["--profile", profile] : [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@10xagents/connector-multica",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "The Multica connector for 10xagents: sync a setup's agents, squad and workflow to a Multica workspace, and benchmark it.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"10xagents",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"diff": "^8.0.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"10xagents": "0.
|
|
37
|
+
"10xagents": "0.3.0",
|
|
38
38
|
"@types/node": "^24.0.0",
|
|
39
39
|
"@uxfront/typescript-config": "^0.1.0",
|
|
40
40
|
"tsdown": "^0.23.0",
|
|
41
41
|
"vitest": "^5.1.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"10xagents": "^0.
|
|
44
|
+
"10xagents": "^0.3.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24"
|