@pikku/cli 0.12.42 → 0.12.44
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/cli.schema.json +1 -1
- package/console-app/assets/index-CRLT8CXr.js +254 -0
- package/console-app/assets/index-DwyRdRuZ.css +1 -0
- 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.js +11 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +10 -0
- package/dist/.pikku/cli/pikku-cli-client.gen.js +73 -0
- 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 +56 -26
- 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 +2 -2
- package/dist/.pikku/function/pikku-function-types.gen.js +3 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +134 -96
- package/dist/.pikku/function/pikku-functions.gen.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/http/pikku-http-wirings-meta.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.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.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 +2 -2
- 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 +4 -2
- 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 -5
- package/dist/.pikku/schemas/schemas/DeployApplyInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/DeployPlanInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/FabricAddInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricAddOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricPublishInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricPublishOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +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/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 +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/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/cli.wiring.js +12 -0
- package/dist/src/deploy/build-pipeline.d.ts +2 -0
- package/dist/src/deploy/build-pipeline.js +7 -1
- package/dist/src/deploy/bundler/bundler.d.ts +2 -0
- package/dist/src/deploy/bundler/bundler.js +8 -5
- package/dist/src/fabric/fabric-commands.d.ts +61 -3
- package/dist/src/fabric/fabric-commands.js +27 -1
- package/dist/src/fabric/functions/add.function.d.ts +50 -0
- package/dist/src/fabric/functions/add.function.js +144 -0
- package/dist/src/fabric/functions/publish.function.d.ts +45 -0
- package/dist/src/fabric/functions/publish.function.js +85 -0
- package/dist/src/fabric/functions/validate-core.d.ts +1 -1
- package/dist/src/fabric/functions/validate.function.d.ts +4 -4
- package/dist/src/fabric/functions/validate.function.js +119 -0
- package/dist/src/functions/commands/deploy-apply.d.ts +3 -0
- package/dist/src/functions/commands/deploy-apply.js +1 -0
- package/dist/src/functions/commands/deploy-plan.d.ts +3 -0
- package/dist/src/functions/commands/deploy-plan.js +1 -0
- package/dist/src/functions/commands/pikku-command-summary.js +3 -2
- package/dist/src/functions/commands/versions-update.js +10 -4
- package/dist/src/functions/commands/workspace-validate.d.ts +3 -3
- package/dist/src/functions/db/better-auth-schema.js +15 -2
- package/dist/src/functions/db/sqlite/sqlite-kysely.js +11 -3
- package/dist/src/functions/validate/workspace-validate.d.ts +2 -2
- package/dist/src/functions/validate/workspace-validate.js +4 -0
- package/dist/src/functions/wirings/auth/pikku-command-auth.js +6 -1
- package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +4 -1
- package/dist/src/functions/wirings/auth/serialize-auth-gen.js +36 -12
- package/dist/src/functions/wirings/emails/pikku-command-emails.js +48 -19
- package/dist/src/functions/wirings/functions/pikku-command-services.js +5 -4
- package/dist/src/functions/wirings/functions/serialize-function-types.js +3 -2
- package/dist/src/scaffold/rpc-remote.gen.js +1 -1
- package/dist/src/services/cli-logger-forwarder.service.d.ts +4 -1
- package/dist/src/services/cli-logger-forwarder.service.js +20 -2
- package/dist/src/services/cli-logger.service.d.ts +16 -2
- package/dist/src/services/cli-logger.service.js +33 -5
- package/dist/src/services.d.ts +6 -1
- package/dist/src/services.js +13 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/skills/pikku-emails/SKILL.md +157 -0
- package/console-app/assets/index-D9Z9rySK.js +0 -233
- package/console-app/assets/index-DwUzVI5k.css +0 -1
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="/assets/index-
|
|
25
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
24
|
+
<script type="module" crossorigin src="/assets/index-CRLT8CXr.js"></script>
|
|
25
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DwyRdRuZ.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.44
|
|
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,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.44
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* WebSocket channel backend for 'pikku' CLI commands
|
|
@@ -31,6 +31,8 @@ import { FabricSmoke } from '../../src/fabric/functions/smoke.function.js';
|
|
|
31
31
|
import { FabricLogin } from '../../src/fabric/functions/login.function.js';
|
|
32
32
|
import { FabricInit } from '../../src/fabric/functions/init.function.js';
|
|
33
33
|
import { FabricLink } from '../../src/fabric/functions/link.function.js';
|
|
34
|
+
import { FabricPublish } from '../../src/fabric/functions/publish.function.js';
|
|
35
|
+
import { FabricAdd } from '../../src/fabric/functions/add.function.js';
|
|
34
36
|
import { FabricDeployPlan } from '../../src/fabric/functions/deploy.function.js';
|
|
35
37
|
import { FabricDeployApply } from '../../src/fabric/functions/deploy.function.js';
|
|
36
38
|
import { FabricDeployList } from '../../src/fabric/functions/deploy-list.function.js';
|
|
@@ -245,6 +247,14 @@ wireChannel({
|
|
|
245
247
|
func: FabricLink,
|
|
246
248
|
middleware: [cliCloseOnComplete],
|
|
247
249
|
},
|
|
250
|
+
'fabric.addon.publish': {
|
|
251
|
+
func: FabricPublish,
|
|
252
|
+
middleware: [cliCloseOnComplete],
|
|
253
|
+
},
|
|
254
|
+
'fabric.addon.add': {
|
|
255
|
+
func: FabricAdd,
|
|
256
|
+
middleware: [cliCloseOnComplete],
|
|
257
|
+
},
|
|
248
258
|
'fabric.deploy.plan': {
|
|
249
259
|
func: FabricDeployPlan,
|
|
250
260
|
middleware: [cliCloseOnComplete],
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.44
|
|
3
|
+
*/
|
|
4
|
+
import '../pikku-bootstrap.gen.js';
|
|
5
|
+
/**
|
|
6
|
+
* Pikku CLI Client (via WebSocket Channel)
|
|
7
|
+
* Executes CLI commands over a WebSocket connection
|
|
8
|
+
*/
|
|
9
|
+
export declare function PikkuCLIClient(ws: WebSocket, args?: string[]): Promise<void>;
|
|
10
|
+
export default PikkuCLIClient;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.44
|
|
3
|
+
*/
|
|
4
|
+
import { executeCLIViaChannel } from '@pikku/core/cli/channel';
|
|
5
|
+
import { CorePikkuWebsocket } from '@pikku/websocket';
|
|
6
|
+
import '../pikku-bootstrap.gen.js';
|
|
7
|
+
import { defaultCLIRenderer } from '../../src/services.js';
|
|
8
|
+
/**
|
|
9
|
+
* Pikku CLI Client (via WebSocket Channel)
|
|
10
|
+
* Executes CLI commands over a WebSocket connection
|
|
11
|
+
*/
|
|
12
|
+
export async function PikkuCLIClient(ws, args) {
|
|
13
|
+
// Create Pikku WebSocket wrapper
|
|
14
|
+
const pikkuWS = new CorePikkuWebsocket(ws);
|
|
15
|
+
// Register renderers for CLI commands
|
|
16
|
+
const renderers = {};
|
|
17
|
+
await executeCLIViaChannel({
|
|
18
|
+
programName: 'pikku',
|
|
19
|
+
pikkuWS,
|
|
20
|
+
args,
|
|
21
|
+
renderers,
|
|
22
|
+
defaultRenderer: defaultCLIRenderer,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
// Export as default for easy importing
|
|
26
|
+
export default PikkuCLIClient;
|
|
27
|
+
// For direct execution (if this file is run directly)
|
|
28
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
29
|
+
const url = process.env.PIKKU_WS_URL || 'ws://localhost:4002/cli/pikku';
|
|
30
|
+
// Attach credentials so the channel authenticates like any other pikku client.
|
|
31
|
+
// A machine API key (PIKKU_API_KEY -> x-api-key) takes precedence; otherwise
|
|
32
|
+
// the human session token saved by `pikku login` (~/.pikku/session.json ->
|
|
33
|
+
// Authorization: Bearer) is used. This block only runs under Node (direct
|
|
34
|
+
// execution), so reading the session file and using the 'ws' headers option
|
|
35
|
+
// is safe — the browser WebSocket cannot set custom headers anyway.
|
|
36
|
+
const headers = {};
|
|
37
|
+
if (process.env.PIKKU_API_KEY) {
|
|
38
|
+
headers['x-api-key'] = process.env.PIKKU_API_KEY;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
try {
|
|
42
|
+
const { homedir } = await import('os');
|
|
43
|
+
const { readFileSync } = await import('fs');
|
|
44
|
+
const { join } = await import('path');
|
|
45
|
+
const store = JSON.parse(readFileSync(join(homedir(), '.pikku', 'session.json'), 'utf8'));
|
|
46
|
+
const token = store.current
|
|
47
|
+
? store.sessions?.[store.current]?.accessToken
|
|
48
|
+
: undefined;
|
|
49
|
+
if (token) {
|
|
50
|
+
headers['authorization'] = `Bearer ${token}`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
// No saved session — connect unauthenticated (the server may reject).
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const hasAuth = Object.keys(headers).length > 0;
|
|
58
|
+
// Custom headers require the Node 'ws' module — the global/browser WebSocket
|
|
59
|
+
// cannot set them — so prefer 'ws' whenever we have credentials to send.
|
|
60
|
+
let ws;
|
|
61
|
+
if (hasAuth || typeof WebSocket === 'undefined') {
|
|
62
|
+
const wsModule = await import('ws');
|
|
63
|
+
ws = new wsModule.default(url, { headers });
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
ws = new WebSocket(url);
|
|
67
|
+
}
|
|
68
|
+
PikkuCLIClient(ws, process.argv.slice(2)).catch(error => {
|
|
69
|
+
console.error('Fatal channel CLI error:', error);
|
|
70
|
+
// TODO: We get an error code even when it exists cleanly, investigate
|
|
71
|
+
// process.exit(1)
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -336,6 +336,49 @@
|
|
|
336
336
|
},
|
|
337
337
|
"description": "Register the current git repo as a fabric project and queue an initial deploy"
|
|
338
338
|
},
|
|
339
|
+
"addon": {
|
|
340
|
+
"pikkuFuncId": "",
|
|
341
|
+
"positionals": [],
|
|
342
|
+
"options": {},
|
|
343
|
+
"description": "Publish and install Fabric community-registry addons",
|
|
344
|
+
"subcommands": {
|
|
345
|
+
"publish": {
|
|
346
|
+
"pikkuFuncId": "FabricPublish",
|
|
347
|
+
"positionals": [
|
|
348
|
+
{
|
|
349
|
+
"name": "dir",
|
|
350
|
+
"required": false
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
"options": {
|
|
354
|
+
"apiUrl": {
|
|
355
|
+
"description": "Override the fabric-api URL for this call"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"parameters": "[dir]",
|
|
359
|
+
"description": "Publish the addon in this directory to the community registry (pack + upload)"
|
|
360
|
+
},
|
|
361
|
+
"add": {
|
|
362
|
+
"pikkuFuncId": "FabricAdd",
|
|
363
|
+
"positionals": [
|
|
364
|
+
{
|
|
365
|
+
"name": "id",
|
|
366
|
+
"required": true
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"options": {
|
|
370
|
+
"dir": {
|
|
371
|
+
"description": "Addon dir (overrides pikku.config.json addons.addonDir, default addons/)"
|
|
372
|
+
},
|
|
373
|
+
"apiUrl": {
|
|
374
|
+
"description": "Override the fabric-api URL for this call"
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"parameters": "<id>",
|
|
378
|
+
"description": "Install an addon from the community registry into addons/ (shadcn-style)"
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
},
|
|
339
382
|
"deploy": {
|
|
340
383
|
"pikkuFuncId": "",
|
|
341
384
|
"positionals": [],
|
|
@@ -1410,6 +1453,18 @@
|
|
|
1410
1453
|
"default": false,
|
|
1411
1454
|
"short": "j"
|
|
1412
1455
|
},
|
|
1456
|
+
"failOnError": {
|
|
1457
|
+
"description": "Fail the build on error-severity diagnostics (e.g. data-classification leaks). Default: only critical diagnostics fail.",
|
|
1458
|
+
"default": false
|
|
1459
|
+
},
|
|
1460
|
+
"failOnWarn": {
|
|
1461
|
+
"description": "Fail the build on warn-severity diagnostics (implies --fail-on-error).",
|
|
1462
|
+
"default": false
|
|
1463
|
+
},
|
|
1464
|
+
"failOnCritical": {
|
|
1465
|
+
"description": "Fail the build on critical diagnostics. Always on; accepted for symmetry with --fail-on-error/--fail-on-warn.",
|
|
1466
|
+
"default": true
|
|
1467
|
+
},
|
|
1413
1468
|
"userSessionType": {
|
|
1414
1469
|
"description": "Specify which UserSession type to use (when multiple exist)"
|
|
1415
1470
|
},
|
|
@@ -1439,32 +1494,7 @@
|
|
|
1439
1494
|
"exportedName": "defaultCLIRenderer",
|
|
1440
1495
|
"services": {
|
|
1441
1496
|
"optimized": true,
|
|
1442
|
-
"services": [
|
|
1443
|
-
"workflowService",
|
|
1444
|
-
"logger",
|
|
1445
|
-
"getInspectorState",
|
|
1446
|
-
"schema",
|
|
1447
|
-
"jwt",
|
|
1448
|
-
"config",
|
|
1449
|
-
"variables",
|
|
1450
|
-
"secrets",
|
|
1451
|
-
"queueService",
|
|
1452
|
-
"eventHub",
|
|
1453
|
-
"schedulerService",
|
|
1454
|
-
"deploymentService",
|
|
1455
|
-
"aiStorage",
|
|
1456
|
-
"content",
|
|
1457
|
-
"aiAgentRunner",
|
|
1458
|
-
"aiRunState",
|
|
1459
|
-
"agentRunService",
|
|
1460
|
-
"workflowRunService",
|
|
1461
|
-
"credentialService",
|
|
1462
|
-
"emailService",
|
|
1463
|
-
"metaService",
|
|
1464
|
-
"audit",
|
|
1465
|
-
"auditLog",
|
|
1466
|
-
"sessionStore"
|
|
1467
|
-
]
|
|
1497
|
+
"services": []
|
|
1468
1498
|
},
|
|
1469
1499
|
"filePath": "/home/runner/work/pikku/pikku/packages/cli/src/services.ts"
|
|
1470
1500
|
}
|
|
@@ -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.44
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Core function, middleware, and permission types for all wirings
|
|
@@ -419,7 +419,7 @@ export declare const pikkuConfig: (func: (variables?: any, ...args: any[]) => Pr
|
|
|
419
419
|
* })
|
|
420
420
|
* ```
|
|
421
421
|
*/
|
|
422
|
-
export declare const pikkuServices: (func: (config: Config, existingServices: Partial<SingletonServices>) => Promise<Omit<RequiredSingletonServices, "auth"
|
|
422
|
+
export declare const pikkuServices: (func: (config: Config, existingServices: Partial<SingletonServices>) => Promise<Partial<Omit<RequiredSingletonServices, "auth">>>) => (config: Config, existingServices?: Partial<SingletonServices>) => Promise<RequiredSingletonServices>;
|
|
423
423
|
/**
|
|
424
424
|
* Creates a Pikku wire services factory.
|
|
425
425
|
* Use this to define services that are created per-request/session.
|
|
@@ -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.44
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Core function, middleware, and permission types for all wirings
|
|
@@ -230,7 +230,8 @@ export const pikkuConfig = (func) => func;
|
|
|
230
230
|
*/
|
|
231
231
|
export const pikkuServices = (func) => {
|
|
232
232
|
return async (config, existingServices = {}) => {
|
|
233
|
-
const
|
|
233
|
+
const createdServices = await func(config, existingServices);
|
|
234
|
+
const services = { ...existingServices, ...createdServices };
|
|
234
235
|
const authFactory = __pikkuState(null, 'package', 'authFactory');
|
|
235
236
|
if (authFactory) {
|
|
236
237
|
let authInstance;
|