@skrr-ai/cli 0.1.163 → 0.1.165
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 +13 -0
- package/dist/base-command.d.ts +14 -1
- package/dist/base-command.js +190 -58
- package/dist/commands/agent/message/send.d.ts +1 -0
- package/dist/commands/agent/message/send.js +3 -0
- package/dist/commands/agents/mini-computer/app/set.js +1 -1
- package/dist/commands/agents/mini-computer/show.js +7 -1
- package/dist/commands/agents/mini-computer/tasks-view.js +1 -1
- package/dist/commands/agents/supervision.d.ts +25 -0
- package/dist/commands/agents/supervision.js +129 -0
- package/dist/commands/apps/check.js +3 -8
- package/dist/commands/apps/data/batch.d.ts +1 -0
- package/dist/commands/apps/data/batch.js +19 -2
- package/dist/commands/apps/data/delete.d.ts +1 -0
- package/dist/commands/apps/data/delete.js +14 -2
- package/dist/commands/apps/data/patch.d.ts +1 -0
- package/dist/commands/apps/data/patch.js +11 -2
- package/dist/commands/apps/data/put.d.ts +1 -0
- package/dist/commands/apps/data/put.js +17 -3
- package/dist/commands/apps/install.js +7 -2
- package/dist/commands/apps/installations/compatibility.d.ts +13 -0
- package/dist/commands/apps/installations/compatibility.js +60 -0
- package/dist/commands/apps/installations/show.js +9 -3
- package/dist/commands/apps/installations/snapshot.js +5 -2
- package/dist/commands/apps/operations/check.d.ts +16 -0
- package/dist/commands/apps/operations/check.js +127 -0
- package/dist/commands/apps/publish/propose.js +33 -4
- package/dist/commands/apps/reconsent.js +7 -1
- package/dist/commands/apps/reference.d.ts +4 -2
- package/dist/commands/apps/reference.js +7 -4
- package/dist/commands/apps/rollback.d.ts +9 -0
- package/dist/commands/apps/rollback.js +81 -2
- package/dist/commands/apps/upgrade.d.ts +8 -0
- package/dist/commands/apps/upgrade.js +67 -2
- package/dist/commands/apps/version/cat.d.ts +22 -0
- package/dist/commands/apps/version/cat.js +220 -0
- package/dist/commands/apps/version/show.js +3 -1
- package/dist/commands/commerce/incidents/release.d.ts +24 -0
- package/dist/commands/commerce/incidents/release.js +46 -0
- package/dist/commands/duties/action-proposal.js +19 -11
- package/dist/commands/duties/cadence-decisions.js +7 -0
- package/dist/commands/duties/cases.js +12 -1
- package/dist/commands/duties/hypotheses.js +10 -3
- package/dist/commands/duties/observations.d.ts +4 -0
- package/dist/commands/duties/observations.js +14 -3
- package/dist/commands/duties/trigger-status.js +2 -2
- package/dist/commands/duties/wake-capabilities.js +12 -6
- package/dist/commands/outbox/list.d.ts +11 -4
- package/dist/commands/outbox/list.js +56 -9
- package/dist/commands/outbox/retry.d.ts +8 -2
- package/dist/commands/outbox/retry.js +76 -16
- package/dist/commands/outbox/show.d.ts +20 -0
- package/dist/commands/outbox/show.js +83 -0
- package/dist/commands/proposals/list.js +13 -9
- package/dist/commands/requests/show.d.ts +12 -0
- package/dist/commands/requests/show.js +42 -23
- package/dist/commands/spaces/deletion/cancel.d.ts +21 -0
- package/dist/commands/spaces/deletion/cancel.js +70 -0
- package/dist/commands/spaces/workflows/run.js +12 -0
- package/dist/commands/widgets/check.d.ts +9 -0
- package/dist/commands/widgets/check.js +16 -3
- package/dist/generated/agent-guides.json +17 -17
- package/dist/lib/api-fetch.d.ts +5 -0
- package/dist/lib/api-fetch.js +53 -21
- package/dist/lib/appCompatibility.d.ts +31 -0
- package/dist/lib/appCompatibility.js +66 -0
- package/dist/lib/appData.d.ts +46 -4
- package/dist/lib/appData.js +156 -31
- package/dist/lib/appInstallations.d.ts +32 -5
- package/dist/lib/appInstallations.js +218 -34
- package/dist/lib/appVersionFile.d.ts +82 -0
- package/dist/lib/appVersionFile.js +195 -0
- package/dist/lib/apps-command.d.ts +14 -3
- package/dist/lib/apps-command.js +68 -60
- package/dist/lib/appsCheck.js +31 -6
- package/dist/lib/chat-supervision.d.ts +21 -0
- package/dist/lib/chat-supervision.js +37 -0
- package/dist/lib/commerce.d.ts +6 -0
- package/dist/lib/commerce.js +9 -0
- package/dist/lib/duties.d.ts +19 -1
- package/dist/lib/duties.js +21 -3
- package/dist/lib/json-output.d.ts +2 -0
- package/dist/lib/json-output.js +8 -4
- package/dist/lib/miniComputer.d.ts +1 -0
- package/dist/lib/miniComputer.js +7 -2
- package/dist/lib/miniComputerCommand.js +4 -1
- package/dist/lib/node-adapter.d.ts +2 -0
- package/dist/lib/node-adapter.js +35 -8
- package/dist/lib/outbox.d.ts +110 -1
- package/dist/lib/outbox.js +261 -35
- package/dist/lib/roles.d.ts +1 -1
- package/dist/lib/space-deletion-cancel.d.ts +47 -0
- package/dist/lib/space-deletion-cancel.js +141 -0
- package/dist/lib/widgetCheck.js +30 -4
- package/dist/lib/widgetStaticScan.d.ts +24 -9
- package/dist/lib/widgetStaticScan.js +207 -192
- package/dist/lib/write-outcome.d.ts +74 -0
- package/dist/lib/write-outcome.js +176 -0
- package/dist/node_modules/@skrr-ai/data-provider/APP_HTML_PARSER_LICENSES.txt +36 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +20204 -15169
- package/oclif.manifest.json +2143 -25
- package/package.json +10 -3
|
@@ -21,8 +21,10 @@
|
|
|
21
21
|
* calls and names run over the code view only, so `"eval( is blocked"` in a label and
|
|
22
22
|
* a comment that says "do not call fetch()" are not findings, and the rules about
|
|
23
23
|
* what a string SAYS (a URL, markup that loads one) run over the literals only. No
|
|
24
|
-
* regular expression here can backtrack on the size the widget limits allow
|
|
25
|
-
*
|
|
24
|
+
* regular expression here can backtrack on the size the widget limits allow. HTML is
|
|
25
|
+
* not tokenized here at all: the elements come from the shared parser pass
|
|
26
|
+
* (`analyzeAppHtml`), the one a browser would make, so that this scan and the parser
|
|
27
|
+
* cannot disagree about where a comment ends or what a `<noscript>` holds.
|
|
26
28
|
*
|
|
27
29
|
* The eval's static checks (`api/.../eval/generativeUi/staticChecks.js`) ask most
|
|
28
30
|
* of the same questions with a lexer of their own (`sourceLexers.js`), because this
|
|
@@ -30,15 +32,20 @@
|
|
|
30
32
|
* both over one corpus and fails when they disagree about what the frame refuses.
|
|
31
33
|
*/
|
|
32
34
|
import { UI_WIDGET_FENCE } from '@skrr-ai/data-provider';
|
|
35
|
+
/** Parse as an actual ECMAScript module without executing author code. */
|
|
36
|
+
export declare function checkModuleSyntax(source: string): {
|
|
37
|
+
message: string;
|
|
38
|
+
line?: number;
|
|
39
|
+
} | null;
|
|
33
40
|
export type ScanSection = Exclude<(typeof UI_WIDGET_FENCE.sections)[number], 'fallback'>;
|
|
34
41
|
export type StaticSeverity = 'error' | 'warn';
|
|
35
|
-
export type StaticCode = 'external-resource' | 'external-url' | 'external-link' | 'relative-url' | 'network-api' | 'worker' | 'dynamic-code' | 'storage' | 'host-access' | 'popup' | 'navigation' | 'form-action' | 'base-element' | 'nested-frame' | 'plugin-element' | 'element-close' | 'webrtc';
|
|
42
|
+
export type StaticCode = 'external-resource' | 'external-url' | 'external-link' | 'relative-url' | 'network-api' | 'worker' | 'dynamic-code' | 'storage' | 'host-access' | 'popup' | 'navigation' | 'form-action' | 'base-element' | 'nested-frame' | 'plugin-element' | 'element-close' | 'webrtc' | 'source-line-unavailable';
|
|
36
43
|
export interface StaticFinding {
|
|
37
44
|
severity: StaticSeverity;
|
|
38
45
|
code: StaticCode;
|
|
39
46
|
section: ScanSection;
|
|
40
47
|
/** 1-based line within the section's own text. */
|
|
41
|
-
line
|
|
48
|
+
line?: number;
|
|
42
49
|
message: string;
|
|
43
50
|
fix?: string;
|
|
44
51
|
}
|
|
@@ -47,11 +54,22 @@ export interface InlineScript {
|
|
|
47
54
|
content: string;
|
|
48
55
|
/** 1-based line within the html section where the script's text starts. */
|
|
49
56
|
line: number;
|
|
57
|
+
sourceLines: number[] | null;
|
|
50
58
|
}
|
|
51
59
|
export interface StaticScanResult {
|
|
52
60
|
findings: StaticFinding[];
|
|
53
61
|
/** Classic inline scripts of the html section, for a syntax check by the caller. */
|
|
54
62
|
inlineScripts: InlineScript[];
|
|
63
|
+
/** Inline module bodies, separately so classic-only widget syntax checks remain unchanged. */
|
|
64
|
+
inlineModules: InlineScript[];
|
|
65
|
+
/**
|
|
66
|
+
* Inline event attributes (`onclick="..."`) and `javascript:` addresses: code the frame runs with no `<script>`
|
|
67
|
+
* (its policy allows inline script). Scanned with the same rules as a script and handed back for the caller's
|
|
68
|
+
* own readers (the capability scan), but never for a syntax check: a handler's body is not a script.
|
|
69
|
+
*/
|
|
70
|
+
inlineHandlers: InlineScript[];
|
|
71
|
+
/** False when template-contained script or a handler could be activated later by app code. */
|
|
72
|
+
inlineCoverageComplete: boolean;
|
|
55
73
|
}
|
|
56
74
|
export interface WidgetSource {
|
|
57
75
|
css: string;
|
|
@@ -97,15 +115,12 @@ export declare function lexJs(src: string): LexedJs;
|
|
|
97
115
|
export declare function maskJsComments(src: string): string;
|
|
98
116
|
/** Blank the block comments of CSS, stepping over quoted strings. */
|
|
99
117
|
export declare function maskCssComments(src: string): string;
|
|
100
|
-
/** Blank `<!-- … -->` comments of HTML. */
|
|
101
|
-
export declare function maskHtmlComments(src: string): string;
|
|
102
118
|
type UrlKind = 'external' | 'inline' | 'relative' | 'empty';
|
|
103
119
|
/** A URL the frame cannot fetch from, a self-contained one, or one with no base to resolve against. */
|
|
104
120
|
export declare function classifyUrl(raw: string): UrlKind;
|
|
105
121
|
/**
|
|
106
|
-
* Scan one widget's three sections
|
|
107
|
-
*
|
|
108
|
-
* caller has already bounded by the widget limits.
|
|
122
|
+
* Scan one widget's three sections without executing author code. The caller
|
|
123
|
+
* must bound inputs and treat parser failures as an incomplete scan.
|
|
109
124
|
*/
|
|
110
125
|
export declare function scanWidgetSource(source: WidgetSource, options?: {
|
|
111
126
|
allowAppLocalReferences?: boolean;
|