@pikku/cli 0.12.93 → 0.12.96
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/console-app/assets/{index-CmAplHjZ.js → index-CeQodYfg.js} +149 -149
- package/console-app/assets/{index-BYj7ZbUU.css → index-CyYHTGWZ.css} +1 -1
- package/console-app/index.html +2 -2
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +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/pikku-cli-channel.d.ts +13 -15
- package/dist/.pikku/cli/pikku-cli-channel.js +62 -3
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +14 -4
- package/dist/.pikku/cli/pikku-cli-client.gen.js +20 -10
- 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-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 +129 -2
- 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/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +55 -20
- package/dist/.pikku/function/pikku-function-types.gen.js +27 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +138 -13
- package/dist/.pikku/function/pikku-functions.gen.js +11 -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/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-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-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.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 +7 -0
- 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-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/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 +13 -3
- package/dist/.pikku/schemas/schemas/PersonaRunInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PersonaSyncInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuPersonasInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuRolesInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/RolesAuditInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/RolesPruneInput.schema.json +1 -0
- package/dist/.pikku/scopes/pikku-personas-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-personas.gen.d.ts +36 -0
- package/dist/.pikku/scopes/pikku-personas.gen.js +17 -0
- package/dist/.pikku/scopes/pikku-roles-meta.gen.json +1 -0
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +30 -0
- package/dist/.pikku/scopes/pikku-roles.gen.js +18 -0
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +4 -2
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +3 -2
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +2 -2
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +2 -2
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.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/pikku-variable-types.gen.d.ts +2 -2
- package/dist/.pikku/variables/pikku-variable-types.gen.js +2 -2
- 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/meta/allWorkflow.gen.json +27 -3
- package/dist/.pikku/workflow/pikku-personas.gen.d.ts +15 -0
- package/dist/.pikku/workflow/pikku-personas.gen.js +17 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +96 -19
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +22 -2
- 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/bin/pikku.js +0 -0
- package/dist/src/cli.wiring.js +101 -2
- package/dist/src/deploy/analyzer/analyzer.js +14 -0
- package/dist/src/deploy/analyzer/manifest.d.ts +11 -0
- package/dist/src/fabric/functions/validate.function.js +4 -4
- package/dist/src/functions/commands/bootstrap.js +3 -0
- package/dist/src/functions/commands/dev-ai-runner.d.ts +16 -4
- package/dist/src/functions/commands/dev-ai-runner.js +63 -29
- package/dist/src/functions/commands/dev.js +9 -4
- package/dist/src/functions/commands/enable.js +15 -19
- package/dist/src/functions/commands/{scenario-environment.d.ts → environment.d.ts} +9 -6
- package/dist/src/functions/commands/{scenario-environment.js → environment.js} +5 -4
- package/dist/src/functions/commands/new-addon.js +12 -12
- package/dist/src/functions/commands/persona-sync.d.ts +33 -0
- package/dist/src/functions/commands/persona-sync.js +151 -0
- package/dist/src/functions/commands/persona.d.ts +58 -0
- package/dist/src/functions/commands/persona.js +217 -0
- package/dist/src/functions/commands/roles-audit.d.ts +1 -0
- package/dist/src/functions/commands/roles-audit.js +37 -0
- package/dist/src/functions/commands/roles-prune.d.ts +16 -0
- package/dist/src/functions/commands/roles-prune.js +52 -0
- package/dist/src/functions/commands/roles-shared.d.ts +40 -0
- package/dist/src/functions/commands/roles-shared.js +77 -0
- package/dist/src/functions/commands/scenario-browser.d.ts +3 -3
- package/dist/src/functions/commands/scenario-browser.js +1 -1
- package/dist/src/functions/commands/scenario-ladder.d.ts +44 -2
- package/dist/src/functions/commands/scenario-ladder.js +51 -2
- package/dist/src/functions/commands/scenario.d.ts +7 -0
- package/dist/src/functions/commands/scenario.js +79 -17
- package/dist/src/functions/commands/scopes-shared.d.ts +8 -0
- package/dist/src/functions/commands/scopes-shared.js +1 -1
- package/dist/src/functions/commands/serve.js +7 -3
- package/dist/src/functions/commands/virtual-user-formatter.d.ts +30 -0
- package/dist/src/functions/commands/virtual-user-formatter.js +65 -0
- package/dist/src/functions/db/local-db.js +38 -1
- package/dist/src/functions/validate/workspace-validate.js +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.js +2 -1
- package/dist/src/functions/wirings/ai-agent/serialize-public-agent.js +1 -0
- package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +2 -2
- package/dist/src/functions/wirings/auth/serialize-auth-gen.js +8 -8
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.d.ts +7 -3
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +32 -18
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +63 -6
- package/dist/src/functions/wirings/console/serialize-console-functions.js +4 -7
- package/dist/src/functions/wirings/functions/serialize-function-types.js +88 -28
- package/dist/src/functions/wirings/middleware/serialize-middleware-imports.js +25 -9
- package/dist/src/functions/wirings/package/serialize-package-types.js +5 -3
- package/dist/src/functions/wirings/personas/pikku-command-personas.d.ts +7 -0
- package/dist/src/functions/wirings/personas/pikku-command-personas.js +43 -0
- package/dist/src/functions/wirings/personas/serialize-personas-types.d.ts +18 -0
- package/dist/src/functions/wirings/personas/serialize-personas-types.js +76 -0
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.js +2 -1
- package/dist/src/functions/wirings/roles/pikku-command-roles.d.ts +7 -0
- package/dist/src/functions/wirings/roles/pikku-command-roles.js +33 -0
- package/dist/src/functions/wirings/roles/serialize-roles-types.d.ts +14 -0
- package/dist/src/functions/wirings/roles/serialize-roles-types.js +55 -0
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +2 -1
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.d.ts +3 -3
- package/dist/src/functions/wirings/scenarios/register-scenario-instrumentation.js +3 -3
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.d.ts +1 -1
- package/dist/src/functions/wirings/scopes/serialize-scopes-types.js +1 -1
- package/dist/src/functions/wirings/user-admin/pikku-command-user-admin-functions.js +2 -1
- package/dist/src/functions/wirings/user-admin/serialize-user-admin-functions.js +2 -2
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +2 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +13 -13
- package/dist/src/functions/wirings/workflow/serialize-personas.d.ts +10 -0
- package/dist/src/functions/wirings/workflow/serialize-personas.js +46 -0
- package/dist/src/functions/wirings/workflow/serialize-scenario-step-map.js +11 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +165 -29
- package/dist/src/functions/workflows/all.workflow.js +7 -1
- package/dist/src/server/content-signing-jwt.d.ts +13 -0
- package/dist/src/server/content-signing-jwt.js +51 -0
- package/dist/src/server/dev-server-runner.interface.d.ts +10 -2
- package/dist/src/server/node-server-runner.d.ts +2 -2
- package/dist/src/server/node-server-runner.js +2 -1
- package/dist/src/services.d.ts +3 -1
- package/dist/src/services.js +2 -1
- package/dist/src/utils/pikku-cli-config.js +45 -2
- package/dist/src/utils/resolve-personas.d.ts +32 -0
- package/dist/src/utils/resolve-personas.js +46 -0
- package/dist/src/utils/resolve-scaffold-feature.d.ts +19 -0
- package/dist/src/utils/resolve-scaffold-feature.js +49 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -14
- package/dist/.pikku/schemas/schemas/ScenarioRunInput.schema.json +0 -1
- package/dist/.pikku/workflow/pikku-scenario-actors.gen.d.ts +0 -19
- package/dist/.pikku/workflow/pikku-scenario-actors.gen.js +0 -17
- package/dist/src/functions/wirings/workflow/serialize-scenario-actors.d.ts +0 -2
- package/dist/src/functions/wirings/workflow/serialize-scenario-actors.js +0 -40
- package/dist/src/utils/resolve-scenario-actors.d.ts +0 -23
- package/dist/src/utils/resolve-scenario-actors.js +0 -74
package/console-app/index.html
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
}
|
|
22
22
|
} catch (e) {}
|
|
23
23
|
</script>
|
|
24
|
-
<script type="module" crossorigin src="/console/assets/index-
|
|
25
|
-
<link rel="stylesheet" crossorigin href="/console/assets/index-
|
|
24
|
+
<script type="module" crossorigin src="/console/assets/index-CeQodYfg.js"></script>
|
|
25
|
+
<link rel="stylesheet" crossorigin href="/console/assets/index-CyYHTGWZ.css">
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
28
28
|
<div id="root"></div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
3
|
*/
|
|
4
4
|
import { CoreAIAgent, PikkuAIMiddlewareHooks } from '@pikku/core/ai-agent';
|
|
5
5
|
import type { PikkuPermission, PikkuMiddleware, Services, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RawCLIFrame } from '@pikku/core/cli/channel';
|
|
1
2
|
export declare const cliHelp: import("../function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
2
3
|
args?: string[];
|
|
3
4
|
}, {
|
|
@@ -11,22 +12,19 @@ export declare const cliHelp: import("../function/pikku-function-types.gen.js").
|
|
|
11
12
|
}, {
|
|
12
13
|
help: string;
|
|
13
14
|
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Raw entry point: the client forwards argv untouched and this side owns
|
|
17
|
+
* parsing, so a client binary never carries the command tree and its version
|
|
18
|
+
* is free to drift from the server's.
|
|
19
|
+
*
|
|
20
|
+
* Progressive output is streamed on the same channel rather than returned,
|
|
21
|
+
* and the terminating control frame carries the exit code so the client
|
|
22
|
+
* process can exit non-zero.
|
|
23
|
+
*/
|
|
14
24
|
export declare const cliRaw: import("../function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
15
25
|
args: string[];
|
|
16
|
-
}, {
|
|
17
|
-
help?: string;
|
|
18
|
-
result?: unknown;
|
|
19
|
-
error?: string;
|
|
20
|
-
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
26
|
+
}, RawCLIFrame, "rpc" | "session", import("../function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
21
27
|
args: string[];
|
|
22
|
-
}, {
|
|
23
|
-
help?: string;
|
|
24
|
-
result?: unknown;
|
|
25
|
-
error?: string;
|
|
26
|
-
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").WiredServices> | import("../function/pikku-function-types.gen.js").PikkuFunction<{
|
|
28
|
+
}, RawCLIFrame, "rpc" | "session", import("../function/pikku-function-types.gen.js").WiredServices> | import("../function/pikku-function-types.gen.js").PikkuFunction<{
|
|
27
29
|
args: string[];
|
|
28
|
-
},
|
|
29
|
-
help?: string;
|
|
30
|
-
result?: unknown;
|
|
31
|
-
error?: string;
|
|
32
|
-
}, "rpc" | "session", import("../function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>;
|
|
30
|
+
}, RawCLIFrame, "rpc" | "session", import("../function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* WebSocket channel backend for 'pikku' CLI commands
|
|
@@ -32,11 +32,16 @@ import { dbReset } from '../../src/functions/commands/db-reset.js';
|
|
|
32
32
|
import { dbAudit } from '../../src/functions/commands/db-audit.js';
|
|
33
33
|
import { scopesAudit } from '../../src/functions/commands/scopes-audit.js';
|
|
34
34
|
import { scopesPrune } from '../../src/functions/commands/scopes-prune.js';
|
|
35
|
+
import { rolesAudit } from '../../src/functions/commands/roles-audit.js';
|
|
36
|
+
import { rolesPrune } from '../../src/functions/commands/roles-prune.js';
|
|
35
37
|
import { knowledgeValidate } from '../../src/functions/commands/knowledge-validate.js';
|
|
36
38
|
import { knowledgeIndex } from '../../src/functions/commands/knowledge-index.js';
|
|
37
39
|
import { workspaceValidate } from '../../src/functions/commands/workspace-validate.js';
|
|
38
40
|
import { scenarioRun } from '../../src/functions/commands/scenario.js';
|
|
39
41
|
import { scenarioList } from '../../src/functions/commands/scenario.js';
|
|
42
|
+
import { personaRun } from '../../src/functions/commands/persona.js';
|
|
43
|
+
import { personaSync } from '../../src/functions/commands/persona-sync.js';
|
|
44
|
+
import { personaList } from '../../src/functions/commands/persona.js';
|
|
40
45
|
import { FabricValidate } from '../../src/fabric/functions/validate.function.js';
|
|
41
46
|
import { FabricSmoke } from '../../src/fabric/functions/smoke.function.js';
|
|
42
47
|
import { FabricLogin } from '../../src/fabric/functions/login.function.js';
|
|
@@ -150,14 +155,48 @@ export const cliHelp = pikkuSessionlessFunc({
|
|
|
150
155
|
return { help: helpText };
|
|
151
156
|
},
|
|
152
157
|
});
|
|
158
|
+
/**
|
|
159
|
+
* Raw entry point: the client forwards argv untouched and this side owns
|
|
160
|
+
* parsing, so a client binary never carries the command tree and its version
|
|
161
|
+
* is free to drift from the server's.
|
|
162
|
+
*
|
|
163
|
+
* Progressive output is streamed on the same channel rather than returned,
|
|
164
|
+
* and the terminating control frame carries the exit code so the client
|
|
165
|
+
* process can exit non-zero.
|
|
166
|
+
*/
|
|
153
167
|
export const cliRaw = pikkuSessionlessFunc({
|
|
154
168
|
auth: false,
|
|
155
|
-
func: async (services, data) => {
|
|
156
|
-
|
|
169
|
+
func: async (services, data, { channel, session }) => {
|
|
170
|
+
const { help, result, error, exitCode, commandId } = await handleRawCLI({
|
|
157
171
|
programName: 'pikku',
|
|
158
172
|
args: data.args,
|
|
159
173
|
singletonServices: services,
|
|
174
|
+
createWireServices: pikkuState(null, 'package', 'factories')?.createWireServices,
|
|
175
|
+
// The connection authenticated during its upgrade — commands run as it.
|
|
176
|
+
session,
|
|
177
|
+
// The socket the command arrived on, so `channel.remote(...)` inside a
|
|
178
|
+
// command reaches the client that invoked it.
|
|
179
|
+
transport: channel,
|
|
180
|
+
onOutput: (output, commandId) => channel?.send({ action: 'cli-output', commandId, data: output }),
|
|
160
181
|
});
|
|
182
|
+
// A failed parse carries both: the error says what was wrong, the help
|
|
183
|
+
// says what was available. The error goes last so it is the line still on
|
|
184
|
+
// screen after the help text has scrolled past.
|
|
185
|
+
if (help !== undefined) {
|
|
186
|
+
await channel?.send({ action: 'cli-help', help });
|
|
187
|
+
if (error !== undefined) {
|
|
188
|
+
await channel?.send({ action: 'cli-error', error });
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
else if (error !== undefined) {
|
|
192
|
+
await channel?.send({ action: 'cli-error', error });
|
|
193
|
+
}
|
|
194
|
+
else if (result !== undefined) {
|
|
195
|
+
await channel?.send({ action: 'cli-result', commandId, result });
|
|
196
|
+
}
|
|
197
|
+
// Returned rather than sent so the runtime tags it with the routing key,
|
|
198
|
+
// and so the terminal frame cannot be emitted before the ones above it.
|
|
199
|
+
return { action: 'cli-control', event: 'complete', exitCode };
|
|
161
200
|
},
|
|
162
201
|
});
|
|
163
202
|
wireChannel({
|
|
@@ -266,6 +305,14 @@ wireChannel({
|
|
|
266
305
|
func: scopesPrune,
|
|
267
306
|
middleware: [cliCloseOnComplete],
|
|
268
307
|
},
|
|
308
|
+
'roles.audit': {
|
|
309
|
+
func: rolesAudit,
|
|
310
|
+
middleware: [cliCloseOnComplete],
|
|
311
|
+
},
|
|
312
|
+
'roles.prune': {
|
|
313
|
+
func: rolesPrune,
|
|
314
|
+
middleware: [cliCloseOnComplete],
|
|
315
|
+
},
|
|
269
316
|
'knowledge.validate': {
|
|
270
317
|
func: knowledgeValidate,
|
|
271
318
|
middleware: [cliCloseOnComplete],
|
|
@@ -286,6 +333,18 @@ wireChannel({
|
|
|
286
333
|
func: scenarioList,
|
|
287
334
|
middleware: [cliCloseOnComplete],
|
|
288
335
|
},
|
|
336
|
+
'persona.run': {
|
|
337
|
+
func: personaRun,
|
|
338
|
+
middleware: [cliCloseOnComplete],
|
|
339
|
+
},
|
|
340
|
+
'persona.sync': {
|
|
341
|
+
func: personaSync,
|
|
342
|
+
middleware: [cliCloseOnComplete],
|
|
343
|
+
},
|
|
344
|
+
'persona.list': {
|
|
345
|
+
func: personaList,
|
|
346
|
+
middleware: [cliCloseOnComplete],
|
|
347
|
+
},
|
|
289
348
|
'fabric.validate': {
|
|
290
349
|
func: FabricValidate,
|
|
291
350
|
middleware: [cliCloseOnComplete],
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
3
|
*/
|
|
4
|
-
import '
|
|
4
|
+
import type { Capabilities } from '@pikku/core/channel';
|
|
5
5
|
/**
|
|
6
6
|
* Pikku CLI Client (via WebSocket Channel)
|
|
7
|
-
*
|
|
7
|
+
*
|
|
8
|
+
* Forwards argv to the server untouched — the command tree is never parsed
|
|
9
|
+
* here, so this client stays valid as the server's commands change. Renderers
|
|
10
|
+
* are matched by the command id the server reports; anything it doesn't
|
|
11
|
+
* recognise falls back to JSON.
|
|
12
|
+
*
|
|
13
|
+
* `capabilities` are the functions this client agrees to run on the server's
|
|
14
|
+
* behalf (a git sha, a local path). It is an allowlist, not a convenience —
|
|
15
|
+
* nothing outside it is reachable from the server. A bare function is
|
|
16
|
+
* unclassified and so needs approval before every call; write
|
|
17
|
+
* `{ execute, needsApproval: false }` for one that may run unattended.
|
|
8
18
|
*/
|
|
9
|
-
export declare function PikkuCLIClient(ws: WebSocket, args?: string[]): Promise<
|
|
19
|
+
export declare function PikkuCLIClient(ws: WebSocket, args?: string[], capabilities?: Capabilities): Promise<number>;
|
|
10
20
|
export default PikkuCLIClient;
|
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.96
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { executeRawCLIViaChannel } from '@pikku/core/cli/channel';
|
|
5
5
|
import { CorePikkuWebsocket } from '@pikku/websocket';
|
|
6
|
-
import '../pikku-bootstrap.gen.js';
|
|
7
6
|
import { defaultCLIRenderer } from '../../src/services.js';
|
|
8
7
|
/**
|
|
9
8
|
* Pikku CLI Client (via WebSocket Channel)
|
|
10
|
-
*
|
|
9
|
+
*
|
|
10
|
+
* Forwards argv to the server untouched — the command tree is never parsed
|
|
11
|
+
* here, so this client stays valid as the server's commands change. Renderers
|
|
12
|
+
* are matched by the command id the server reports; anything it doesn't
|
|
13
|
+
* recognise falls back to JSON.
|
|
14
|
+
*
|
|
15
|
+
* `capabilities` are the functions this client agrees to run on the server's
|
|
16
|
+
* behalf (a git sha, a local path). It is an allowlist, not a convenience —
|
|
17
|
+
* nothing outside it is reachable from the server. A bare function is
|
|
18
|
+
* unclassified and so needs approval before every call; write
|
|
19
|
+
* `{ execute, needsApproval: false }` for one that may run unattended.
|
|
11
20
|
*/
|
|
12
|
-
export async function PikkuCLIClient(ws, args) {
|
|
21
|
+
export async function PikkuCLIClient(ws, args, capabilities = {}) {
|
|
13
22
|
// Create Pikku WebSocket wrapper
|
|
14
23
|
const pikkuWS = new CorePikkuWebsocket(ws);
|
|
15
24
|
// Register renderers for CLI commands
|
|
16
25
|
const renderers = {};
|
|
17
|
-
|
|
18
|
-
programName: 'pikku',
|
|
26
|
+
return executeRawCLIViaChannel({
|
|
19
27
|
pikkuWS,
|
|
20
28
|
args,
|
|
21
29
|
renderers,
|
|
30
|
+
capabilities,
|
|
22
31
|
defaultRenderer: defaultCLIRenderer,
|
|
23
32
|
});
|
|
24
33
|
}
|
|
@@ -65,9 +74,10 @@ if (import.meta.url === `file://${process.argv[1]}`) {
|
|
|
65
74
|
else {
|
|
66
75
|
ws = new WebSocket(url);
|
|
67
76
|
}
|
|
68
|
-
PikkuCLIClient(ws, process.argv.slice(2))
|
|
77
|
+
PikkuCLIClient(ws, process.argv.slice(2))
|
|
78
|
+
.then((exitCode) => process.exit(exitCode))
|
|
79
|
+
.catch(error => {
|
|
69
80
|
console.error('Fatal channel CLI error:', error);
|
|
70
|
-
|
|
71
|
-
// process.exit(1)
|
|
81
|
+
process.exit(1);
|
|
72
82
|
});
|
|
73
83
|
}
|
|
@@ -304,6 +304,32 @@
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
},
|
|
307
|
+
"roles": {
|
|
308
|
+
"pikkuFuncId": "",
|
|
309
|
+
"positionals": [],
|
|
310
|
+
"options": {},
|
|
311
|
+
"description": "Inspect and maintain the roles declared with defineSystemRole",
|
|
312
|
+
"subcommands": {
|
|
313
|
+
"audit": {
|
|
314
|
+
"pikkuFuncId": "rolesAudit",
|
|
315
|
+
"positionals": [],
|
|
316
|
+
"options": {},
|
|
317
|
+
"description": "Report system roles in the database that are no longer declared in code, and how many people hold them"
|
|
318
|
+
},
|
|
319
|
+
"prune": {
|
|
320
|
+
"pikkuFuncId": "rolesPrune",
|
|
321
|
+
"positionals": [],
|
|
322
|
+
"options": {
|
|
323
|
+
"yes": {
|
|
324
|
+
"description": "Actually delete. Without it, prune only reports the blast radius",
|
|
325
|
+
"short": "y",
|
|
326
|
+
"default": false
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"description": "Remove system roles that are no longer declared in code, cascading them out of every user grant"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
307
333
|
"knowledge": {
|
|
308
334
|
"pikkuFuncId": "",
|
|
309
335
|
"positionals": [],
|
|
@@ -380,9 +406,22 @@
|
|
|
380
406
|
"default": false
|
|
381
407
|
},
|
|
382
408
|
"browser": {
|
|
383
|
-
"description": "
|
|
409
|
+
"description": "Shorthand for --run default when false: takes the server-side path instead of driving a browser",
|
|
384
410
|
"default": true
|
|
385
411
|
},
|
|
412
|
+
"run": {
|
|
413
|
+
"description": "Which surface every actor drives the system through: 'browser' (as a human), 'cli' (over the websocket), or 'default' (server-side, the fast path)",
|
|
414
|
+
"default": "default",
|
|
415
|
+
"choices": [
|
|
416
|
+
"cli",
|
|
417
|
+
"browser",
|
|
418
|
+
"default"
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
"strict": {
|
|
422
|
+
"description": "Fail rather than pass a `then` that has no witness for --run, i.e. an assertion nobody checked on the surface its prose claims",
|
|
423
|
+
"default": false
|
|
424
|
+
},
|
|
386
425
|
"spawn": {
|
|
387
426
|
"description": "Start `pikku dev` on the environment's apiUrl for the run and stop it afterwards. Without it, the environment must already be serving",
|
|
388
427
|
"default": false
|
|
@@ -402,7 +441,7 @@
|
|
|
402
441
|
"description": "Override the environment's appUrl for this run (the frontend browser steps navigate against)"
|
|
403
442
|
}
|
|
404
443
|
},
|
|
405
|
-
"description": "Run scenarios against a configured environment (
|
|
444
|
+
"description": "Run scenarios against a configured environment (environments in pikku.config.json). Actor secret comes from SCENARIO_ACTOR_SECRET.",
|
|
406
445
|
"parameters": "<environment>"
|
|
407
446
|
},
|
|
408
447
|
"list": {
|
|
@@ -413,6 +452,90 @@
|
|
|
413
452
|
}
|
|
414
453
|
}
|
|
415
454
|
},
|
|
455
|
+
"persona": {
|
|
456
|
+
"pikkuFuncId": "",
|
|
457
|
+
"positionals": [],
|
|
458
|
+
"options": {},
|
|
459
|
+
"description": "The people this app is for, and running one against a real stage",
|
|
460
|
+
"subcommands": {
|
|
461
|
+
"run": {
|
|
462
|
+
"pikkuFuncId": "personaRun",
|
|
463
|
+
"positionals": [
|
|
464
|
+
{
|
|
465
|
+
"name": "environment",
|
|
466
|
+
"required": true
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"name": "persona",
|
|
470
|
+
"required": true
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"options": {
|
|
474
|
+
"disposition": {
|
|
475
|
+
"description": "How they behave: realistic (default), careless, newcomer, stale, auditor, adversarial",
|
|
476
|
+
"short": "d"
|
|
477
|
+
},
|
|
478
|
+
"goals": {
|
|
479
|
+
"description": "Comma-separated goals in your own words, run alongside the persona's own and the ones derived from scenarios"
|
|
480
|
+
},
|
|
481
|
+
"steps": {
|
|
482
|
+
"description": "Model turns before it stops (default 40)"
|
|
483
|
+
},
|
|
484
|
+
"mutations": {
|
|
485
|
+
"description": "Non-read calls before it stops"
|
|
486
|
+
},
|
|
487
|
+
"duration": {
|
|
488
|
+
"description": "Wall clock before it stops, e.g. '30m'"
|
|
489
|
+
},
|
|
490
|
+
"seed": {
|
|
491
|
+
"description": "Replay a previous run — the same seed schedules the same run"
|
|
492
|
+
},
|
|
493
|
+
"model": {
|
|
494
|
+
"description": "Model they think with. Defaults to scenarios.model in pikku.config.json"
|
|
495
|
+
},
|
|
496
|
+
"allowApproval": {
|
|
497
|
+
"description": "Offer the endpoints the app marked as needing a human’s approval. Off by default: those are the ones that spend money"
|
|
498
|
+
},
|
|
499
|
+
"skipRoleCheck": {
|
|
500
|
+
"description": "Start without verifying the declared roles against the stage. For a target whose auth reports roles somewhere pikku cannot read — findings from an unverified run may be seed drift rather than product bugs"
|
|
501
|
+
},
|
|
502
|
+
"apiUrl": {
|
|
503
|
+
"description": "Override the environment's apiUrl for this run — for a target that only exists at run time, such as a freshly deployed sandbox"
|
|
504
|
+
},
|
|
505
|
+
"out": {
|
|
506
|
+
"description": "Write the whole run — every step, response and finding — as JSON to this path"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"description": "Sign in as a declared persona and work the API in character against a configured environment. Not a test runner: it asserts nothing and reports what came back that should not have. The sign-in secret comes from SCENARIO_ACTOR_SECRET.",
|
|
510
|
+
"parameters": "<environment> <persona>"
|
|
511
|
+
},
|
|
512
|
+
"sync": {
|
|
513
|
+
"pikkuFuncId": "personaSync",
|
|
514
|
+
"positionals": [
|
|
515
|
+
{
|
|
516
|
+
"name": "environment",
|
|
517
|
+
"required": true
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"options": {
|
|
521
|
+
"dryRun": {
|
|
522
|
+
"description": "Report who would be provisioned, with which roles, and why anyone was skipped — without touching anything"
|
|
523
|
+
},
|
|
524
|
+
"apiUrl": {
|
|
525
|
+
"description": "Override the environment's apiUrl — for a target that only exists at run time, such as a freshly deployed sandbox"
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"description": "Provision the declared personas into an environment: create each account and apply the roles it declares. Additive — it never revokes. Needs both the environment's API (to sign in) and its database (to write the grants), and the sign-in secret from SCENARIO_ACTOR_SECRET.",
|
|
529
|
+
"parameters": "<environment>"
|
|
530
|
+
},
|
|
531
|
+
"list": {
|
|
532
|
+
"pikkuFuncId": "personaList",
|
|
533
|
+
"positionals": [],
|
|
534
|
+
"options": {},
|
|
535
|
+
"description": "List the declared personas — who each one is, what they may do, and what they are trying to get done"
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
},
|
|
416
539
|
"fabric": {
|
|
417
540
|
"pikkuFuncId": "",
|
|
418
541
|
"positionals": [],
|
|
@@ -1706,6 +1829,10 @@
|
|
|
1706
1829
|
"description": "Fail the build on critical diagnostics. Always on; accepted for symmetry with --fail-on-error/--fail-on-warn.",
|
|
1707
1830
|
"default": true
|
|
1708
1831
|
},
|
|
1832
|
+
"strictMeta": {
|
|
1833
|
+
"description": "Fail the build when an AI agent's tool has no description. Without one the model is offered the tool under its own name, so this is a quality gate rather than a correctness one — hence off by default. A 'title' does not satisfy it.",
|
|
1834
|
+
"default": false
|
|
1835
|
+
},
|
|
1709
1836
|
"tsc": {
|
|
1710
1837
|
"description": "After codegen, run a real tsc --noEmit over the project's tsconfig and fail on type errors. Prints full diagnostics with code frames. Off by default.",
|
|
1711
1838
|
"default": false
|