@skhema/cli 0.3.2 → 0.4.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.
- package/dist/cli.js +1 -1
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +6 -2
- package/dist/commands/element.d.ts.map +1 -1
- package/dist/commands/element.js +34 -0
- package/dist/lib/api/client.d.ts +20 -5
- package/dist/lib/api/client.d.ts.map +1 -1
- package/dist/lib/api/client.js +16 -2
- package/dist/lib/contribute/embed-generator.js +1 -1
- package/package.json +3 -2
- package/skills/.manifest.json +1 -1
- package/dist/lib/contribute/method-schema.d.ts +0 -239
- package/dist/lib/contribute/method-schema.d.ts.map +0 -1
- package/dist/lib/contribute/method-schema.js +0 -172
package/dist/cli.js
CHANGED
|
@@ -24,7 +24,7 @@ const pkg = require('../package.json');
|
|
|
24
24
|
const program = new Command();
|
|
25
25
|
program
|
|
26
26
|
.name('skhema')
|
|
27
|
-
.description('Skhema CLI —
|
|
27
|
+
.description('Skhema CLI — drive the Skhema Public API from your terminal, CI, or agent')
|
|
28
28
|
.version(pkg.version)
|
|
29
29
|
.option('--json', 'Output structured JSON')
|
|
30
30
|
.option('--verbose', 'Verbose output')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/commands/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAuBnC,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AACD,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAA;CACzD;AASD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,WAAW,GAChB,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAkB1D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/commands/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAuBnC,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AACD,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAA;CACzD;AASD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,WAAW,GAChB,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAkB1D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsF1D"}
|
package/dist/commands/api.js
CHANGED
|
@@ -63,7 +63,9 @@ export function registerApiCommands(program) {
|
|
|
63
63
|
readFile: (p) => readFile(p, 'utf-8'),
|
|
64
64
|
readStdin,
|
|
65
65
|
});
|
|
66
|
-
|
|
66
|
+
// Meta endpoints (health, openapi) work with no credential; the SDK
|
|
67
|
+
// still throws (exit 3) for any authed path resolved anonymously.
|
|
68
|
+
const { client } = await resolveClient({ allowAnonymous: true });
|
|
67
69
|
const data = await client.request(httpMethod, path, {
|
|
68
70
|
body,
|
|
69
71
|
query,
|
|
@@ -81,7 +83,9 @@ export function registerApiCommands(program) {
|
|
|
81
83
|
.description('List every live gateway route from /v1/openapi.json')
|
|
82
84
|
.action(async () => {
|
|
83
85
|
await runCommand('api routes', async () => {
|
|
84
|
-
|
|
86
|
+
// Route discovery hits only GET /v1/openapi.json (unauthenticated), so
|
|
87
|
+
// it works anonymously — part of the first-touch agent experience.
|
|
88
|
+
const { client } = await resolveClient({ allowAnonymous: true });
|
|
85
89
|
const spec = await client.meta.openapi();
|
|
86
90
|
if (getGlobalOptions().json) {
|
|
87
91
|
// Under --json the raw spec is the payload (the envelope wraps it).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/commands/element.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAkBnC;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../src/commands/element.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAkBnC;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwS9D"}
|
package/dist/commands/element.js
CHANGED
|
@@ -39,6 +39,40 @@ export function registerElementCommands(program) {
|
|
|
39
39
|
return data;
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
|
+
withWorkspace(element
|
|
43
|
+
.command('search <query>')
|
|
44
|
+
.description('Full-text search over the workspace elements')
|
|
45
|
+
.option('--limit <n>', 'Maximum results')).action(async (query, options) => {
|
|
46
|
+
await runCommand('element search', async () => {
|
|
47
|
+
const workspaceId = resolveWorkspaceId(options.workspace);
|
|
48
|
+
if (options.limit !== undefined && !/^\d+$/.test(options.limit)) {
|
|
49
|
+
throw new UsageError('--limit must be a positive integer');
|
|
50
|
+
}
|
|
51
|
+
const { client } = await resolveClient();
|
|
52
|
+
const data = await client.elements.search(workspaceId, query, {
|
|
53
|
+
...(options.limit !== undefined && {
|
|
54
|
+
limit: Number(options.limit),
|
|
55
|
+
}),
|
|
56
|
+
});
|
|
57
|
+
const rows = coerceList(data, 'elements');
|
|
58
|
+
if (!getGlobalOptions().json) {
|
|
59
|
+
logHeader(`Search results (${rows.length})`);
|
|
60
|
+
if (rows.length === 0)
|
|
61
|
+
log(chalk.dim(' No matching elements.'));
|
|
62
|
+
else
|
|
63
|
+
logTable(['Id', 'Component', 'Type', 'Content'], rows.map((r) => {
|
|
64
|
+
const e = asRecord(r);
|
|
65
|
+
return [
|
|
66
|
+
String(e.id ?? '—'),
|
|
67
|
+
String(e.componentType ?? '—'),
|
|
68
|
+
String(e.elementType ?? '—'),
|
|
69
|
+
summarize(e.content),
|
|
70
|
+
];
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
return data;
|
|
74
|
+
});
|
|
75
|
+
});
|
|
42
76
|
// No `GET /v1/.../elements/:id` route exists on the gateway, so `element get`
|
|
43
77
|
// fetches the workspace's element list and filters it client-side by id.
|
|
44
78
|
withWorkspace(element.command('get <element-id>').description('Get an element by id')).action(async (elementId, options) => {
|
package/dist/lib/api/client.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { SkhemaClient } from '@skhema/sdk';
|
|
2
2
|
/** Which credential source, in precedence order, is backing the client. */
|
|
3
|
-
export type CredentialLane = 'flag' | 'env' | 'stored-key' | 'oauth';
|
|
3
|
+
export type CredentialLane = 'flag' | 'env' | 'stored-key' | 'oauth' | 'anonymous';
|
|
4
4
|
export interface CredentialDescriptor {
|
|
5
5
|
lane: CredentialLane;
|
|
6
|
-
/**
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* `api-key` for the three key lanes; `oauth` for the stored session;
|
|
8
|
+
* `anonymous` for a credential-less client (meta endpoints only).
|
|
9
|
+
*/
|
|
10
|
+
kind: 'api-key' | 'oauth' | 'anonymous';
|
|
8
11
|
/** Masked key (`sk_live_...last4`), present for api-key lanes only. */
|
|
9
12
|
maskedKey?: string;
|
|
10
13
|
/** Organization id, when known without a network round-trip (OAuth lane). */
|
|
@@ -18,10 +21,22 @@ export interface ResolvedClient {
|
|
|
18
21
|
}
|
|
19
22
|
/** Mask a raw key to `sk_live_...abcd` — the only safe form to ever print. */
|
|
20
23
|
export declare function maskApiKey(rawKey: string): string;
|
|
24
|
+
/** Options controlling {@link resolveClient}'s behaviour when no credential exists. */
|
|
25
|
+
export interface ResolveClientOptions {
|
|
26
|
+
/**
|
|
27
|
+
* When no credential is found, return an anonymous client (meta endpoints
|
|
28
|
+
* only) instead of throwing {@link AuthRequiredError}. For commands that touch
|
|
29
|
+
* only the unauthenticated meta endpoints (`api routes`, `api GET /health`).
|
|
30
|
+
* The SDK still enforces the per-route gate: an anonymous non-meta call throws
|
|
31
|
+
* {@link AuthError} (exit 3), so authed routes remain protected.
|
|
32
|
+
*/
|
|
33
|
+
allowAnonymous?: boolean;
|
|
34
|
+
}
|
|
21
35
|
/**
|
|
22
36
|
* Resolve the active credential using the fixed precedence (spec §3.1):
|
|
23
37
|
* `--api-key` flag → `SKHEMA_API_KEY` env → stored key → stored OAuth session.
|
|
24
|
-
* Throws {@link AuthRequiredError} (exit 3) when none is available
|
|
38
|
+
* Throws {@link AuthRequiredError} (exit 3) when none is available, unless
|
|
39
|
+
* `allowAnonymous` is set — then it falls back to a credential-less client.
|
|
25
40
|
*/
|
|
26
|
-
export declare function resolveClient(): Promise<ResolvedClient>;
|
|
41
|
+
export declare function resolveClient(options?: ResolveClientOptions): Promise<ResolvedClient>;
|
|
27
42
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAE,MAAM,aAAa,CAAA;AAO9D,2EAA2E;AAC3E,MAAM,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAE,MAAM,aAAa,CAAA;AAO9D,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,KAAK,GACL,YAAY,GACZ,OAAO,GACP,WAAW,CAAA;AAEf,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAA;IACpB;;;OAGG;IACH,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,WAAW,CAAA;IACvC,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,EAAE,oBAAoB,CAAA;CACjC;AAED,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGjD;AASD,uFAAuF;AACvF,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,cAAc,CAAC,CA0EzB"}
|
package/dist/lib/api/client.js
CHANGED
|
@@ -15,9 +15,10 @@ function apiKeyClient(rawKey) {
|
|
|
15
15
|
/**
|
|
16
16
|
* Resolve the active credential using the fixed precedence (spec §3.1):
|
|
17
17
|
* `--api-key` flag → `SKHEMA_API_KEY` env → stored key → stored OAuth session.
|
|
18
|
-
* Throws {@link AuthRequiredError} (exit 3) when none is available
|
|
18
|
+
* Throws {@link AuthRequiredError} (exit 3) when none is available, unless
|
|
19
|
+
* `allowAnonymous` is set — then it falls back to a credential-less client.
|
|
19
20
|
*/
|
|
20
|
-
export async function resolveClient() {
|
|
21
|
+
export async function resolveClient(options = {}) {
|
|
21
22
|
const flagKey = getApiKeyFlag();
|
|
22
23
|
if (flagKey) {
|
|
23
24
|
return {
|
|
@@ -66,6 +67,19 @@ export async function resolveClient() {
|
|
|
66
67
|
},
|
|
67
68
|
};
|
|
68
69
|
}
|
|
70
|
+
if (options.allowAnonymous) {
|
|
71
|
+
return {
|
|
72
|
+
client: createSkhemaClient(undefined, {
|
|
73
|
+
baseUrl: API_BASE_URL,
|
|
74
|
+
authBaseUrl: AUTH_BASE_URL,
|
|
75
|
+
}),
|
|
76
|
+
credential: {
|
|
77
|
+
lane: 'anonymous',
|
|
78
|
+
kind: 'anonymous',
|
|
79
|
+
source: 'anonymous (meta endpoints only)',
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
69
83
|
throw new AuthRequiredError('No credentials found. Run `skhema auth login` for interactive use, or set ' +
|
|
70
84
|
`${API_KEY_ENV_VAR}=sk_live_… (or run \`skhema auth key use <key>\`) for headless/CI use.`);
|
|
71
85
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, ELEMENT_TYPES, SKHEMA_MAPPING, } from '
|
|
1
|
+
import { COMPONENT_TYPES, ELEMENT_TYPES, SKHEMA_MAPPING, } from '@skhema/method/vocabulary';
|
|
2
2
|
const CDN_URL = 'https://unpkg.com/@skhema/embed';
|
|
3
3
|
export function generateEmbed(options) {
|
|
4
4
|
const { elementType, contributorId, authorName, authorSlug, content, theme, trackAnalytics, sourceUrl, } = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skhema/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Skhema CLI - Authentication and AI skills management for agent platforms",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"commander": "^12.0.0",
|
|
45
45
|
"ora": "^8.0.0",
|
|
46
46
|
"@skhema/agent-sdk": "0.1.4",
|
|
47
|
-
"@skhema/
|
|
47
|
+
"@skhema/method": "0.3.0",
|
|
48
|
+
"@skhema/sdk": "0.2.0"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
51
|
"@skhema/linter": "2.2.0",
|
package/skills/.manifest.json
CHANGED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vendored from @skhema/types (src/schema/{elements,components,mapping}.ts).
|
|
3
|
-
*
|
|
4
|
-
* @skhema/types is a restricted npm package; @skhema/cli is public, so it must
|
|
5
|
-
* not depend on it at install time. This is the public method vocabulary (it
|
|
6
|
-
* renders verbatim in public embeds) — keep it in sync with @skhema/types when
|
|
7
|
-
* the method schema changes.
|
|
8
|
-
*/
|
|
9
|
-
export declare const ELEMENT_TYPES: {
|
|
10
|
-
readonly KEY_CHALLENGE: {
|
|
11
|
-
readonly value: "key_challenge";
|
|
12
|
-
readonly label: "Key Challenge";
|
|
13
|
-
readonly acronym: "CHL";
|
|
14
|
-
};
|
|
15
|
-
readonly SUPPORTING_FACT: {
|
|
16
|
-
readonly value: "supporting_fact";
|
|
17
|
-
readonly label: "Supporting Fact";
|
|
18
|
-
readonly acronym: "FCT";
|
|
19
|
-
};
|
|
20
|
-
readonly IMPACT: {
|
|
21
|
-
readonly value: "impact";
|
|
22
|
-
readonly label: "Impact";
|
|
23
|
-
readonly acronym: "IMP";
|
|
24
|
-
};
|
|
25
|
-
readonly GUIDING_POLICY: {
|
|
26
|
-
readonly value: "guiding_policy";
|
|
27
|
-
readonly label: "Guiding Policy";
|
|
28
|
-
readonly acronym: "POL";
|
|
29
|
-
};
|
|
30
|
-
readonly COMPETITOR_MOVE: {
|
|
31
|
-
readonly value: "competitor_move";
|
|
32
|
-
readonly label: "Competitor Move";
|
|
33
|
-
readonly acronym: "CMV";
|
|
34
|
-
};
|
|
35
|
-
readonly SCOPE: {
|
|
36
|
-
readonly value: "scope";
|
|
37
|
-
readonly label: "Scope";
|
|
38
|
-
readonly acronym: "SCP";
|
|
39
|
-
};
|
|
40
|
-
readonly CONSTRAINT: {
|
|
41
|
-
readonly value: "constraint";
|
|
42
|
-
readonly label: "Constraint";
|
|
43
|
-
readonly acronym: "CST";
|
|
44
|
-
};
|
|
45
|
-
readonly SOLUTION: {
|
|
46
|
-
readonly value: "solution";
|
|
47
|
-
readonly label: "Solution";
|
|
48
|
-
readonly acronym: "SOL";
|
|
49
|
-
};
|
|
50
|
-
readonly ASSUMPTION_HYPOTHESIS: {
|
|
51
|
-
readonly value: "assumption_hypothesis";
|
|
52
|
-
readonly label: "Assumption Hypothesis";
|
|
53
|
-
readonly acronym: "HYP";
|
|
54
|
-
};
|
|
55
|
-
readonly EXPERIMENT: {
|
|
56
|
-
readonly value: "experiment";
|
|
57
|
-
readonly label: "Experiment";
|
|
58
|
-
readonly acronym: "EXP";
|
|
59
|
-
};
|
|
60
|
-
readonly ACTION: {
|
|
61
|
-
readonly value: "action";
|
|
62
|
-
readonly label: "Action";
|
|
63
|
-
readonly acronym: "ACT";
|
|
64
|
-
};
|
|
65
|
-
readonly INVESTMENT: {
|
|
66
|
-
readonly value: "investment";
|
|
67
|
-
readonly label: "Investment";
|
|
68
|
-
readonly acronym: "INV";
|
|
69
|
-
};
|
|
70
|
-
readonly ESTIMATE: {
|
|
71
|
-
readonly value: "estimate";
|
|
72
|
-
readonly label: "Estimate";
|
|
73
|
-
readonly acronym: "EST";
|
|
74
|
-
};
|
|
75
|
-
readonly BASELINE: {
|
|
76
|
-
readonly value: "baseline";
|
|
77
|
-
readonly label: "Baseline";
|
|
78
|
-
readonly acronym: "BSL";
|
|
79
|
-
};
|
|
80
|
-
readonly OUTCOME: {
|
|
81
|
-
readonly value: "outcome";
|
|
82
|
-
readonly label: "Outcome";
|
|
83
|
-
readonly acronym: "OCM";
|
|
84
|
-
};
|
|
85
|
-
readonly PERFORMANCE_VARIABLE: {
|
|
86
|
-
readonly value: "performance_variable";
|
|
87
|
-
readonly label: "Performance Variable";
|
|
88
|
-
readonly acronym: "VAR";
|
|
89
|
-
};
|
|
90
|
-
readonly CAPABILITY: {
|
|
91
|
-
readonly value: "capability";
|
|
92
|
-
readonly label: "Capability";
|
|
93
|
-
readonly acronym: "CAP";
|
|
94
|
-
};
|
|
95
|
-
readonly SYSTEM: {
|
|
96
|
-
readonly value: "system";
|
|
97
|
-
readonly label: "System";
|
|
98
|
-
readonly acronym: "SYS";
|
|
99
|
-
};
|
|
100
|
-
readonly PRINCIPLE: {
|
|
101
|
-
readonly value: "principle";
|
|
102
|
-
readonly label: "Principle";
|
|
103
|
-
readonly acronym: "PRN";
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
export declare const COMPONENT_TYPES: {
|
|
107
|
-
readonly DIAGNOSIS: {
|
|
108
|
-
readonly value: "diagnosis";
|
|
109
|
-
readonly label: "Diagnosis";
|
|
110
|
-
readonly acronym: "BD";
|
|
111
|
-
};
|
|
112
|
-
readonly METHOD: {
|
|
113
|
-
readonly value: "method";
|
|
114
|
-
readonly label: "Method & Positioning";
|
|
115
|
-
readonly acronym: "MP";
|
|
116
|
-
};
|
|
117
|
-
readonly INITIATIVES: {
|
|
118
|
-
readonly value: "initiatives";
|
|
119
|
-
readonly label: "Portfolio of Initiatives";
|
|
120
|
-
readonly acronym: "PI";
|
|
121
|
-
};
|
|
122
|
-
readonly MEASURES: {
|
|
123
|
-
readonly value: "measures";
|
|
124
|
-
readonly label: "Measures";
|
|
125
|
-
readonly acronym: "M";
|
|
126
|
-
};
|
|
127
|
-
readonly SUPPORT: {
|
|
128
|
-
readonly value: "support";
|
|
129
|
-
readonly label: "Support Structures";
|
|
130
|
-
readonly acronym: "SS";
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
export declare const SKHEMA_MAPPING: {
|
|
134
|
-
readonly componentFlow: readonly [{
|
|
135
|
-
readonly value: "diagnosis";
|
|
136
|
-
readonly label: "Diagnosis";
|
|
137
|
-
readonly acronym: "BD";
|
|
138
|
-
}, {
|
|
139
|
-
readonly value: "method";
|
|
140
|
-
readonly label: "Method & Positioning";
|
|
141
|
-
readonly acronym: "MP";
|
|
142
|
-
}, {
|
|
143
|
-
readonly value: "initiatives";
|
|
144
|
-
readonly label: "Portfolio of Initiatives";
|
|
145
|
-
readonly acronym: "PI";
|
|
146
|
-
}, {
|
|
147
|
-
readonly value: "measures";
|
|
148
|
-
readonly label: "Measures";
|
|
149
|
-
readonly acronym: "M";
|
|
150
|
-
}, {
|
|
151
|
-
readonly value: "support";
|
|
152
|
-
readonly label: "Support Structures";
|
|
153
|
-
readonly acronym: "SS";
|
|
154
|
-
}];
|
|
155
|
-
readonly elementFlow: {
|
|
156
|
-
readonly diagnosis: readonly [{
|
|
157
|
-
readonly value: "key_challenge";
|
|
158
|
-
readonly label: "Key Challenge";
|
|
159
|
-
readonly acronym: "CHL";
|
|
160
|
-
}, {
|
|
161
|
-
readonly value: "supporting_fact";
|
|
162
|
-
readonly label: "Supporting Fact";
|
|
163
|
-
readonly acronym: "FCT";
|
|
164
|
-
}, {
|
|
165
|
-
readonly value: "impact";
|
|
166
|
-
readonly label: "Impact";
|
|
167
|
-
readonly acronym: "IMP";
|
|
168
|
-
}];
|
|
169
|
-
readonly method: readonly [{
|
|
170
|
-
readonly value: "guiding_policy";
|
|
171
|
-
readonly label: "Guiding Policy";
|
|
172
|
-
readonly acronym: "POL";
|
|
173
|
-
}, {
|
|
174
|
-
readonly value: "competitor_move";
|
|
175
|
-
readonly label: "Competitor Move";
|
|
176
|
-
readonly acronym: "CMV";
|
|
177
|
-
}, {
|
|
178
|
-
readonly value: "scope";
|
|
179
|
-
readonly label: "Scope";
|
|
180
|
-
readonly acronym: "SCP";
|
|
181
|
-
}, {
|
|
182
|
-
readonly value: "constraint";
|
|
183
|
-
readonly label: "Constraint";
|
|
184
|
-
readonly acronym: "CST";
|
|
185
|
-
}];
|
|
186
|
-
readonly initiatives: readonly [{
|
|
187
|
-
readonly value: "solution";
|
|
188
|
-
readonly label: "Solution";
|
|
189
|
-
readonly acronym: "SOL";
|
|
190
|
-
}, {
|
|
191
|
-
readonly value: "assumption_hypothesis";
|
|
192
|
-
readonly label: "Assumption Hypothesis";
|
|
193
|
-
readonly acronym: "HYP";
|
|
194
|
-
}, {
|
|
195
|
-
readonly value: "experiment";
|
|
196
|
-
readonly label: "Experiment";
|
|
197
|
-
readonly acronym: "EXP";
|
|
198
|
-
}, {
|
|
199
|
-
readonly value: "action";
|
|
200
|
-
readonly label: "Action";
|
|
201
|
-
readonly acronym: "ACT";
|
|
202
|
-
}, {
|
|
203
|
-
readonly value: "estimate";
|
|
204
|
-
readonly label: "Estimate";
|
|
205
|
-
readonly acronym: "EST";
|
|
206
|
-
}, {
|
|
207
|
-
readonly value: "investment";
|
|
208
|
-
readonly label: "Investment";
|
|
209
|
-
readonly acronym: "INV";
|
|
210
|
-
}];
|
|
211
|
-
readonly measures: readonly [{
|
|
212
|
-
readonly value: "baseline";
|
|
213
|
-
readonly label: "Baseline";
|
|
214
|
-
readonly acronym: "BSL";
|
|
215
|
-
}, {
|
|
216
|
-
readonly value: "outcome";
|
|
217
|
-
readonly label: "Outcome";
|
|
218
|
-
readonly acronym: "OCM";
|
|
219
|
-
}, {
|
|
220
|
-
readonly value: "performance_variable";
|
|
221
|
-
readonly label: "Performance Variable";
|
|
222
|
-
readonly acronym: "VAR";
|
|
223
|
-
}];
|
|
224
|
-
readonly support: readonly [{
|
|
225
|
-
readonly value: "capability";
|
|
226
|
-
readonly label: "Capability";
|
|
227
|
-
readonly acronym: "CAP";
|
|
228
|
-
}, {
|
|
229
|
-
readonly value: "system";
|
|
230
|
-
readonly label: "System";
|
|
231
|
-
readonly acronym: "SYS";
|
|
232
|
-
}, {
|
|
233
|
-
readonly value: "principle";
|
|
234
|
-
readonly label: "Principle";
|
|
235
|
-
readonly acronym: "PRN";
|
|
236
|
-
}];
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
//# sourceMappingURL=method-schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"method-schema.d.ts","sourceRoot":"","sources":["../../../src/lib/contribute/method-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgGhB,CAAA;AAEV,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BlB,CAAA;AAEV,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCjB,CAAA"}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vendored from @skhema/types (src/schema/{elements,components,mapping}.ts).
|
|
3
|
-
*
|
|
4
|
-
* @skhema/types is a restricted npm package; @skhema/cli is public, so it must
|
|
5
|
-
* not depend on it at install time. This is the public method vocabulary (it
|
|
6
|
-
* renders verbatim in public embeds) — keep it in sync with @skhema/types when
|
|
7
|
-
* the method schema changes.
|
|
8
|
-
*/
|
|
9
|
-
export const ELEMENT_TYPES = {
|
|
10
|
-
KEY_CHALLENGE: {
|
|
11
|
-
value: 'key_challenge',
|
|
12
|
-
label: 'Key Challenge',
|
|
13
|
-
acronym: 'CHL',
|
|
14
|
-
},
|
|
15
|
-
SUPPORTING_FACT: {
|
|
16
|
-
value: 'supporting_fact',
|
|
17
|
-
label: 'Supporting Fact',
|
|
18
|
-
acronym: 'FCT',
|
|
19
|
-
},
|
|
20
|
-
IMPACT: {
|
|
21
|
-
value: 'impact',
|
|
22
|
-
label: 'Impact',
|
|
23
|
-
acronym: 'IMP',
|
|
24
|
-
},
|
|
25
|
-
GUIDING_POLICY: {
|
|
26
|
-
value: 'guiding_policy',
|
|
27
|
-
label: 'Guiding Policy',
|
|
28
|
-
acronym: 'POL',
|
|
29
|
-
},
|
|
30
|
-
COMPETITOR_MOVE: {
|
|
31
|
-
value: 'competitor_move',
|
|
32
|
-
label: 'Competitor Move',
|
|
33
|
-
acronym: 'CMV',
|
|
34
|
-
},
|
|
35
|
-
SCOPE: {
|
|
36
|
-
value: 'scope',
|
|
37
|
-
label: 'Scope',
|
|
38
|
-
acronym: 'SCP',
|
|
39
|
-
},
|
|
40
|
-
CONSTRAINT: {
|
|
41
|
-
value: 'constraint',
|
|
42
|
-
label: 'Constraint',
|
|
43
|
-
acronym: 'CST',
|
|
44
|
-
},
|
|
45
|
-
SOLUTION: {
|
|
46
|
-
value: 'solution',
|
|
47
|
-
label: 'Solution',
|
|
48
|
-
acronym: 'SOL',
|
|
49
|
-
},
|
|
50
|
-
ASSUMPTION_HYPOTHESIS: {
|
|
51
|
-
value: 'assumption_hypothesis',
|
|
52
|
-
label: 'Assumption Hypothesis',
|
|
53
|
-
acronym: 'HYP',
|
|
54
|
-
},
|
|
55
|
-
EXPERIMENT: {
|
|
56
|
-
value: 'experiment',
|
|
57
|
-
label: 'Experiment',
|
|
58
|
-
acronym: 'EXP',
|
|
59
|
-
},
|
|
60
|
-
ACTION: {
|
|
61
|
-
value: 'action',
|
|
62
|
-
label: 'Action',
|
|
63
|
-
acronym: 'ACT',
|
|
64
|
-
},
|
|
65
|
-
INVESTMENT: {
|
|
66
|
-
value: 'investment',
|
|
67
|
-
label: 'Investment',
|
|
68
|
-
acronym: 'INV',
|
|
69
|
-
},
|
|
70
|
-
ESTIMATE: {
|
|
71
|
-
value: 'estimate',
|
|
72
|
-
label: 'Estimate',
|
|
73
|
-
acronym: 'EST',
|
|
74
|
-
},
|
|
75
|
-
BASELINE: {
|
|
76
|
-
value: 'baseline',
|
|
77
|
-
label: 'Baseline',
|
|
78
|
-
acronym: 'BSL',
|
|
79
|
-
},
|
|
80
|
-
OUTCOME: {
|
|
81
|
-
value: 'outcome',
|
|
82
|
-
label: 'Outcome',
|
|
83
|
-
acronym: 'OCM',
|
|
84
|
-
},
|
|
85
|
-
PERFORMANCE_VARIABLE: {
|
|
86
|
-
value: 'performance_variable',
|
|
87
|
-
label: 'Performance Variable',
|
|
88
|
-
acronym: 'VAR',
|
|
89
|
-
},
|
|
90
|
-
CAPABILITY: {
|
|
91
|
-
value: 'capability',
|
|
92
|
-
label: 'Capability',
|
|
93
|
-
acronym: 'CAP',
|
|
94
|
-
},
|
|
95
|
-
SYSTEM: {
|
|
96
|
-
value: 'system',
|
|
97
|
-
label: 'System',
|
|
98
|
-
acronym: 'SYS',
|
|
99
|
-
},
|
|
100
|
-
PRINCIPLE: {
|
|
101
|
-
value: 'principle',
|
|
102
|
-
label: 'Principle',
|
|
103
|
-
acronym: 'PRN',
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
export const COMPONENT_TYPES = {
|
|
107
|
-
DIAGNOSIS: {
|
|
108
|
-
value: 'diagnosis',
|
|
109
|
-
label: 'Diagnosis',
|
|
110
|
-
acronym: 'BD',
|
|
111
|
-
},
|
|
112
|
-
METHOD: {
|
|
113
|
-
value: 'method',
|
|
114
|
-
label: 'Method & Positioning',
|
|
115
|
-
acronym: 'MP',
|
|
116
|
-
},
|
|
117
|
-
INITIATIVES: {
|
|
118
|
-
value: 'initiatives',
|
|
119
|
-
label: 'Portfolio of Initiatives',
|
|
120
|
-
acronym: 'PI',
|
|
121
|
-
},
|
|
122
|
-
MEASURES: {
|
|
123
|
-
value: 'measures',
|
|
124
|
-
label: 'Measures',
|
|
125
|
-
acronym: 'M',
|
|
126
|
-
},
|
|
127
|
-
SUPPORT: {
|
|
128
|
-
value: 'support',
|
|
129
|
-
label: 'Support Structures',
|
|
130
|
-
acronym: 'SS',
|
|
131
|
-
},
|
|
132
|
-
};
|
|
133
|
-
export const SKHEMA_MAPPING = {
|
|
134
|
-
componentFlow: [
|
|
135
|
-
COMPONENT_TYPES.DIAGNOSIS,
|
|
136
|
-
COMPONENT_TYPES.METHOD,
|
|
137
|
-
COMPONENT_TYPES.INITIATIVES,
|
|
138
|
-
COMPONENT_TYPES.MEASURES,
|
|
139
|
-
COMPONENT_TYPES.SUPPORT,
|
|
140
|
-
],
|
|
141
|
-
elementFlow: {
|
|
142
|
-
[COMPONENT_TYPES.DIAGNOSIS.value]: [
|
|
143
|
-
ELEMENT_TYPES.KEY_CHALLENGE,
|
|
144
|
-
ELEMENT_TYPES.SUPPORTING_FACT,
|
|
145
|
-
ELEMENT_TYPES.IMPACT,
|
|
146
|
-
],
|
|
147
|
-
[COMPONENT_TYPES.METHOD.value]: [
|
|
148
|
-
ELEMENT_TYPES.GUIDING_POLICY,
|
|
149
|
-
ELEMENT_TYPES.COMPETITOR_MOVE,
|
|
150
|
-
ELEMENT_TYPES.SCOPE,
|
|
151
|
-
ELEMENT_TYPES.CONSTRAINT,
|
|
152
|
-
],
|
|
153
|
-
[COMPONENT_TYPES.INITIATIVES.value]: [
|
|
154
|
-
ELEMENT_TYPES.SOLUTION,
|
|
155
|
-
ELEMENT_TYPES.ASSUMPTION_HYPOTHESIS,
|
|
156
|
-
ELEMENT_TYPES.EXPERIMENT,
|
|
157
|
-
ELEMENT_TYPES.ACTION,
|
|
158
|
-
ELEMENT_TYPES.ESTIMATE,
|
|
159
|
-
ELEMENT_TYPES.INVESTMENT,
|
|
160
|
-
],
|
|
161
|
-
[COMPONENT_TYPES.MEASURES.value]: [
|
|
162
|
-
ELEMENT_TYPES.BASELINE,
|
|
163
|
-
ELEMENT_TYPES.OUTCOME,
|
|
164
|
-
ELEMENT_TYPES.PERFORMANCE_VARIABLE,
|
|
165
|
-
],
|
|
166
|
-
[COMPONENT_TYPES.SUPPORT.value]: [
|
|
167
|
-
ELEMENT_TYPES.CAPABILITY,
|
|
168
|
-
ELEMENT_TYPES.SYSTEM,
|
|
169
|
-
ELEMENT_TYPES.PRINCIPLE,
|
|
170
|
-
],
|
|
171
|
-
},
|
|
172
|
-
};
|