@pi-stef/catalog 0.2.2 → 0.3.1

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 (2) hide show
  1. package/package.json +10 -4
  2. package/src/register.ts +20 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-stef/catalog",
3
- "version": "0.2.2",
3
+ "version": "0.3.1",
4
4
  "description": "Pi extension for managing skill/package catalogs.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,10 +19,16 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@octokit/rest": "^21.0.0",
22
- "js-yaml": "^4.1.0",
22
+ "@pi-stef/agent-workflows": "^0.3.0",
23
+ "@pi-stef/atlassian": "^0.3.0",
24
+ "@pi-stef/catalog": "^0.3.0",
25
+ "@pi-stef/figma": "^0.3.0",
26
+ "@pi-stef/paths": "^0.3.0",
27
+ "@pi-stef/team": "^0.3.0",
28
+ "@pi-stef/web": "^0.3.0",
23
29
  "@sinclair/typebox": "*",
24
- "zod": "^3.25.62",
25
- "@pi-stef/paths": "0.2.2"
30
+ "js-yaml": "^4.1.0",
31
+ "zod": "^3.25.62"
26
32
  },
27
33
  "peerDependencies": {
28
34
  "@earendil-works/pi-coding-agent": "*"
package/src/register.ts CHANGED
@@ -12,7 +12,6 @@ import {
12
12
  SUBCOMMAND_DEFS,
13
13
  getAliasMap,
14
14
  } from "./commands/definitions.js";
15
- import { parseSubcommand } from "./commands/dispatch.js";
16
15
  import { addCommand, type AddCtx } from "./commands/add.js";
17
16
  import { initCommand, type InitContext } from "./commands/init.js";
18
17
  import { removeCommand, type RemoveCtx } from "./commands/remove.js";
@@ -66,9 +65,27 @@ async function handleSubcommand(
66
65
  return;
67
66
  }
68
67
 
69
- // Parse the raw argument string into structured { positional, flags }
68
+ // Parse the raw argument string into structured { positional, flags }.
69
+ // Note: the subcommand has already been extracted by the /ct handler,
70
+ // so we only parse flags from the remaining args — positional tokens
71
+ // are passed through directly.
70
72
  const rawParts = (args ?? "").trim().split(/\s+/).filter(Boolean);
71
- const parsed = parseSubcommand(rawParts);
73
+ const flags: Record<string, true | string> = {};
74
+ const positional: string[] = [];
75
+ for (const token of rawParts) {
76
+ if (token.startsWith("--")) {
77
+ const body = token.slice(2);
78
+ const eqIdx = body.indexOf("=");
79
+ if (eqIdx !== -1) {
80
+ flags[body.slice(0, eqIdx)] = body.slice(eqIdx + 1);
81
+ } else {
82
+ flags[body] = true;
83
+ }
84
+ } else {
85
+ positional.push(token);
86
+ }
87
+ }
88
+ const parsed = { subcommand: canonical, flags, positional };
72
89
 
73
90
  switch (canonical) {
74
91
  case "add":