@pikku/cli 0.12.151 → 0.12.152
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/dist/.pikku/addon/index.d.ts +1 -1
- package/dist/.pikku/addon/index.js +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
- package/dist/.pikku/agent/index.d.ts +1 -1
- package/dist/.pikku/agent/index.js +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
- package/dist/.pikku/analytics/index.d.ts +1 -1
- package/dist/.pikku/analytics/index.js +1 -1
- package/dist/.pikku/analytics/pikku-analytics-types.gen.d.ts +1 -1
- package/dist/.pikku/analytics/pikku-analytics-types.gen.js +1 -1
- package/dist/.pikku/auth/index.d.ts +1 -1
- package/dist/.pikku/auth/index.js +1 -1
- package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +1 -1
- package/dist/.pikku/auth/pikku-auth-types.gen.js +1 -1
- package/dist/.pikku/channel/index.d.ts +1 -1
- package/dist/.pikku/channel/index.js +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/index.d.ts +1 -1
- package/dist/.pikku/cli/index.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +6 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.json +38 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +38 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/error/index.d.ts +1 -1
- package/dist/.pikku/error/index.js +1 -1
- package/dist/.pikku/error/pikku-error-types.gen.d.ts +1 -1
- package/dist/.pikku/error/pikku-error-types.gen.js +1 -1
- package/dist/.pikku/function/index.d.ts +1 -1
- package/dist/.pikku/function/index.js +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +19 -0
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/gateway/index.d.ts +1 -1
- package/dist/.pikku/gateway/index.js +1 -1
- package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +1 -1
- package/dist/.pikku/gateway/pikku-gateway-types.gen.js +1 -1
- package/dist/.pikku/http/index.d.ts +1 -1
- package/dist/.pikku/http/index.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/mcp/index.d.ts +1 -1
- package/dist/.pikku/mcp/index.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/middleware/index.d.ts +1 -1
- package/dist/.pikku/middleware/index.js +1 -1
- package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +1 -1
- package/dist/.pikku/middleware/pikku-middleware-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +1 -1
- package/dist/.pikku/queue/index.d.ts +1 -1
- package/dist/.pikku/queue/index.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +1 -0
- package/dist/.pikku/scenarios/index.d.ts +1 -1
- package/dist/.pikku/scenarios/index.js +1 -1
- package/dist/.pikku/scenarios/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
- package/dist/.pikku/scheduler/index.d.ts +1 -1
- package/dist/.pikku/scheduler/index.js +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +5 -1
- package/dist/.pikku/schemas/schemas/FabricChangesFileInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricChangesFileOutput.schema.json +1 -0
- package/dist/.pikku/scopes/index.d.ts +1 -1
- package/dist/.pikku/scopes/index.js +1 -1
- package/dist/.pikku/scopes/pikku-flags.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/secrets/index.d.ts +1 -1
- package/dist/.pikku/secrets/index.js +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/services/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/services/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/setup/index.d.ts +1 -1
- package/dist/.pikku/setup/index.js +1 -1
- package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +1 -1
- package/dist/.pikku/setup/pikku-setup-types.gen.js +1 -1
- package/dist/.pikku/trigger/index.d.ts +1 -1
- package/dist/.pikku/trigger/index.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/index.d.ts +1 -1
- package/dist/.pikku/variables/index.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/index.d.ts +1 -1
- package/dist/.pikku/workflow/index.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/src/fabric/fabric-commands.d.ts +37 -0
- package/dist/src/fabric/fabric-commands.js +32 -1
- package/dist/src/fabric/functions/changes-file.function.d.ts +64 -0
- package/dist/src/fabric/functions/changes-file.function.js +56 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/surface.json +1 -1
|
@@ -45,6 +45,7 @@ import { FabricDomainsRemove } from './functions/domains-remove.function.js';
|
|
|
45
45
|
import { FabricLLMKey, renderLLMKey } from './functions/llm-key.function.js';
|
|
46
46
|
import { FabricChangesList, renderChangesList, } from './functions/changes-list.function.js';
|
|
47
47
|
import { FabricChangesShow, renderChangesShow, } from './functions/changes-show.function.js';
|
|
48
|
+
import { FabricChangesFile, renderChangesFile, } from './functions/changes-file.function.js';
|
|
48
49
|
import { FabricChangesClaim, renderChangesClaim, } from './functions/changes-claim.function.js';
|
|
49
50
|
import { FabricChangesAsk, renderChangesAsk, } from './functions/changes-ask.function.js';
|
|
50
51
|
import { FabricChangesShot, renderChangesShot, } from './functions/changes-shot.function.js';
|
|
@@ -482,7 +483,7 @@ export const fabricCommands = defineCLICommands({
|
|
|
482
483
|
},
|
|
483
484
|
},
|
|
484
485
|
changes: {
|
|
485
|
-
description: 'The todo list filed from inside a deployed stage: read what is open, claim a batch, ask what you need to know, and tick items off',
|
|
486
|
+
description: 'The todo list filed from inside a deployed stage: read what is open, file what was decided elsewhere, claim a batch, ask what you need to know, and tick items off',
|
|
486
487
|
subcommands: {
|
|
487
488
|
list: pikkuCLICommand({
|
|
488
489
|
func: FabricChangesList,
|
|
@@ -524,6 +525,36 @@ export const fabricCommands = defineCLICommands({
|
|
|
524
525
|
apiUrl: { description: 'Override the fabric-api URL for this call' },
|
|
525
526
|
},
|
|
526
527
|
}),
|
|
528
|
+
file: pikkuCLICommand({
|
|
529
|
+
func: FabricChangesFile,
|
|
530
|
+
render: renderChangesFile,
|
|
531
|
+
description: 'File an item from outside the panel — the words, without the screenshot the panel would have attached',
|
|
532
|
+
options: {
|
|
533
|
+
projectId: {
|
|
534
|
+
description: 'Project to file against (defaults to the linked checkout)',
|
|
535
|
+
short: 'p',
|
|
536
|
+
},
|
|
537
|
+
stageId: {
|
|
538
|
+
description: 'Stage to file against (defaults to the only stage)',
|
|
539
|
+
},
|
|
540
|
+
branch: {
|
|
541
|
+
description: 'Resolve the stage from this branch instead',
|
|
542
|
+
},
|
|
543
|
+
title: {
|
|
544
|
+
description: 'The requirement, in one line',
|
|
545
|
+
short: 't',
|
|
546
|
+
},
|
|
547
|
+
body: { description: 'The detail, if a line is not enough' },
|
|
548
|
+
bodyFile: {
|
|
549
|
+
description: 'Read the body from a file — use this when it has newlines',
|
|
550
|
+
},
|
|
551
|
+
route: {
|
|
552
|
+
description: 'The route it is about, e.g. /admin/rota',
|
|
553
|
+
},
|
|
554
|
+
locale: { description: 'Locale it was seen in, e.g. de' },
|
|
555
|
+
apiUrl: { description: 'Override the fabric-api URL for this call' },
|
|
556
|
+
},
|
|
557
|
+
}),
|
|
527
558
|
claim: pikkuCLICommand({
|
|
528
559
|
func: FabricChangesClaim,
|
|
529
560
|
render: renderChangesClaim,
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { CreateChangeOutput } from '../sdk/rpc-map.gen.d.js';
|
|
3
|
+
export declare const FabricChangesFileInput: z.ZodObject<{
|
|
4
|
+
apiUrl: z.ZodOptional<z.ZodString>;
|
|
5
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
6
|
+
stageId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
body: z.ZodOptional<z.ZodString>;
|
|
10
|
+
bodyFile: z.ZodOptional<z.ZodString>;
|
|
11
|
+
route: z.ZodOptional<z.ZodString>;
|
|
12
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const FabricChangesFileOutput: z.ZodObject<{
|
|
15
|
+
change: z.ZodAny;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
/**
|
|
18
|
+
* An item filed from a terminal carries no screenshot, no circled elements and
|
|
19
|
+
* no build — the panel supplies those and nothing here can invent them. What it
|
|
20
|
+
* does carry is the words, which the skill already treats as the requirement
|
|
21
|
+
* and every other address as evidence, so a written item is a thinner but not a
|
|
22
|
+
* malformed one.
|
|
23
|
+
*
|
|
24
|
+
* `--body-file` because a real item's body is a paragraph with newlines in it,
|
|
25
|
+
* and putting that through shell quoting is where it gets mangled.
|
|
26
|
+
*/
|
|
27
|
+
export declare const FabricChangesFile: import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
28
|
+
apiUrl?: string | undefined;
|
|
29
|
+
projectId?: string | undefined;
|
|
30
|
+
stageId?: string | undefined;
|
|
31
|
+
branch?: string | undefined;
|
|
32
|
+
title: string;
|
|
33
|
+
body?: string | undefined;
|
|
34
|
+
bodyFile?: string | undefined;
|
|
35
|
+
route?: string | undefined;
|
|
36
|
+
locale?: string | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
change: any;
|
|
39
|
+
}, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
|
|
40
|
+
apiUrl?: string | undefined;
|
|
41
|
+
projectId?: string | undefined;
|
|
42
|
+
stageId?: string | undefined;
|
|
43
|
+
branch?: string | undefined;
|
|
44
|
+
title: string;
|
|
45
|
+
body?: string | undefined;
|
|
46
|
+
bodyFile?: string | undefined;
|
|
47
|
+
route?: string | undefined;
|
|
48
|
+
locale?: string | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
change: any;
|
|
51
|
+
}, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices> | import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
52
|
+
apiUrl?: string | undefined;
|
|
53
|
+
projectId?: string | undefined;
|
|
54
|
+
stageId?: string | undefined;
|
|
55
|
+
branch?: string | undefined;
|
|
56
|
+
title: string;
|
|
57
|
+
body?: string | undefined;
|
|
58
|
+
bodyFile?: string | undefined;
|
|
59
|
+
route?: string | undefined;
|
|
60
|
+
locale?: string | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
change: any;
|
|
63
|
+
}, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown>, undefined, undefined>;
|
|
64
|
+
export declare const renderChangesFile: (_s: unknown, { change }: CreateChangeOutput) => void;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
4
|
+
import { changesContext, requireProjectId } from '../lib/changes.js';
|
|
5
|
+
import { resolveStageId } from '../lib/stage.js';
|
|
6
|
+
import { dim, safe } from '../lib/output.js';
|
|
7
|
+
export const FabricChangesFileInput = z.object({
|
|
8
|
+
apiUrl: z.string().optional(),
|
|
9
|
+
projectId: z.string().optional(),
|
|
10
|
+
stageId: z.string().optional(),
|
|
11
|
+
branch: z.string().optional(),
|
|
12
|
+
title: z.string().trim().min(1, 'Give the item a title.'),
|
|
13
|
+
body: z.string().optional(),
|
|
14
|
+
bodyFile: z.string().optional(),
|
|
15
|
+
route: z.string().optional(),
|
|
16
|
+
locale: z.string().optional(),
|
|
17
|
+
});
|
|
18
|
+
export const FabricChangesFileOutput = z.object({
|
|
19
|
+
change: z.any(),
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* An item filed from a terminal carries no screenshot, no circled elements and
|
|
23
|
+
* no build — the panel supplies those and nothing here can invent them. What it
|
|
24
|
+
* does carry is the words, which the skill already treats as the requirement
|
|
25
|
+
* and every other address as evidence, so a written item is a thinner but not a
|
|
26
|
+
* malformed one.
|
|
27
|
+
*
|
|
28
|
+
* `--body-file` because a real item's body is a paragraph with newlines in it,
|
|
29
|
+
* and putting that through shell quoting is where it gets mangled.
|
|
30
|
+
*/
|
|
31
|
+
export const FabricChangesFile = pikkuSessionlessFunc({
|
|
32
|
+
description: 'File a change against a stage from outside the panel.',
|
|
33
|
+
input: FabricChangesFileInput,
|
|
34
|
+
output: FabricChangesFileOutput,
|
|
35
|
+
func: async (_services, input) => {
|
|
36
|
+
if (input.body && input.bodyFile)
|
|
37
|
+
throw new Error('Pass --body or --body-file, not both.');
|
|
38
|
+
const { rpc, projectId } = await changesContext(input.apiUrl, input.projectId);
|
|
39
|
+
const stageId = input.stageId ??
|
|
40
|
+
(await resolveStageId(rpc, requireProjectId(projectId), input.branch));
|
|
41
|
+
const body = input.bodyFile
|
|
42
|
+
? await readFile(input.bodyFile, 'utf8')
|
|
43
|
+
: input.body;
|
|
44
|
+
return await rpc.invoke('createChange', {
|
|
45
|
+
stageId,
|
|
46
|
+
title: input.title,
|
|
47
|
+
body: body?.trim() || undefined,
|
|
48
|
+
route: input.route,
|
|
49
|
+
locale: input.locale,
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
export const renderChangesFile = (_s, { change }) => {
|
|
54
|
+
console.log(`Filed #${safe(change.shortId)} ${safe(change.title)}`);
|
|
55
|
+
console.log(dim(` ${safe(change.changeId)}`));
|
|
56
|
+
};
|