@kosdev-code/kos-ddk-cli 0.0.0-stage → 0.1.0-dev.55

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.
Files changed (115) hide show
  1. package/README.md +165 -2
  2. package/agent-plugin/.claude-plugin/marketplace.json +13 -0
  3. package/agent-plugin/kos-ddk-tools/.claude-plugin/plugin.json +8 -0
  4. package/agent-plugin/kos-ddk-tools/.mcp.json +11 -0
  5. package/agent-plugin/kos-ddk-tools/agents/kos-ddk-plugin-planner.md +40 -0
  6. package/agent-plugin/kos-ddk-tools/agents/kos-ddk-plugin-reviewer.md +33 -0
  7. package/agent-plugin/kos-ddk-tools/catalog/contributions.json +877 -0
  8. package/agent-plugin/kos-ddk-tools/mcp.json +12 -0
  9. package/agent-plugin/kos-ddk-tools/plugin.json +7 -0
  10. package/agent-plugin/kos-ddk-tools/reference/reference.json +19339 -0
  11. package/agent-plugin/kos-ddk-tools/servers/kos-ddk.mjs +48633 -0
  12. package/agent-plugin/kos-ddk-tools/skills/build-ddk-plugin/SKILL.md +74 -0
  13. package/agent-plugin/kos-ddk-tools/skills/ddk-content-component/SKILL.md +49 -0
  14. package/agent-plugin/kos-ddk-tools/skills/ddk-storybook/SKILL.md +39 -0
  15. package/agent-plugin/kos-ddk-tools/templates/cui/__nameDashCase__.stories.tsx__template__ +32 -0
  16. package/agent-plugin/kos-ddk-tools/templates/cui/__nameDashCase__.tsx__template__ +35 -0
  17. package/agent-plugin/kos-ddk-tools/templates/cui/index.ts__template__ +1 -0
  18. package/agent-plugin/kos-ddk-tools/templates/dashboard-detail/detail/__nameDashCase__.stories.tsx__template__ +34 -0
  19. package/agent-plugin/kos-ddk-tools/templates/dashboard-detail/detail/__nameDashCase__.tsx__template__ +52 -0
  20. package/agent-plugin/kos-ddk-tools/templates/dashboard-detail/detail/index.ts__template__ +1 -0
  21. package/agent-plugin/kos-ddk-tools/templates/dashboard-summary/summary/__nameDashCase__.stories.tsx__template__ +34 -0
  22. package/agent-plugin/kos-ddk-tools/templates/dashboard-summary/summary/__nameDashCase__.tsx__template__ +41 -0
  23. package/agent-plugin/kos-ddk-tools/templates/dashboard-summary/summary/index.ts__template__ +1 -0
  24. package/agent-plugin/kos-ddk-tools/templates/macro-summary/__nameDashCase__.stories.tsx__template__ +34 -0
  25. package/agent-plugin/kos-ddk-tools/templates/macro-summary/__nameDashCase__.tsx__template__ +24 -0
  26. package/agent-plugin/kos-ddk-tools/templates/macro-summary/index.ts__template__ +1 -0
  27. package/agent-plugin/kos-ddk-tools/templates/nav/__nameDashCase__.stories.tsx__template__ +32 -0
  28. package/agent-plugin/kos-ddk-tools/templates/nav/__nameDashCase__.tsx__template__ +27 -0
  29. package/agent-plugin/kos-ddk-tools/templates/nav/index.ts__template__ +1 -0
  30. package/agent-plugin/kos-ddk-tools/templates/plugin-project/.storybook/preview.tsx.template +113 -0
  31. package/agent-plugin/kos-ddk-tools/templates/plugin-project/.storybook/registration.ts.template +6 -0
  32. package/agent-plugin/kos-ddk-tools/templates/pump-detail/__nameDashCase__.stories.tsx__template__ +34 -0
  33. package/agent-plugin/kos-ddk-tools/templates/pump-detail/__nameDashCase__.tsx__template__ +38 -0
  34. package/agent-plugin/kos-ddk-tools/templates/pump-detail/index.ts__template__ +1 -0
  35. package/agent-plugin/kos-ddk-tools/templates/pump-summary/__nameDashCase__.stories.tsx__template__ +34 -0
  36. package/agent-plugin/kos-ddk-tools/templates/pump-summary/__nameDashCase__.tsx__template__ +25 -0
  37. package/agent-plugin/kos-ddk-tools/templates/pump-summary/index.ts__template__ +1 -0
  38. package/agent-plugin/kos-ddk-tools/templates/setup/__nameDashCase__.stories.tsx__template__ +32 -0
  39. package/agent-plugin/kos-ddk-tools/templates/setup/__nameDashCase__.tsx__template__ +33 -0
  40. package/agent-plugin/kos-ddk-tools/templates/setup/index.ts__template__ +1 -0
  41. package/agent-plugin/kos-ddk-tools/templates/theme-project/theme/assets/component.css.template +2 -0
  42. package/agent-plugin/kos-ddk-tools/templates/theme-project/theme/assets/generic.css.template +2 -0
  43. package/agent-plugin/kos-ddk-tools/templates/theme-project/theme/assets/semantic.css.template +2 -0
  44. package/agent-plugin/kos-ddk-tools/templates/theme-project/theme/assets/theme-overlay.css.template +7 -0
  45. package/agent-plugin/kos-ddk-tools/templates/trouble-action/__nameDashCase__.stories.tsx__template__ +31 -0
  46. package/agent-plugin/kos-ddk-tools/templates/trouble-action/__nameDashCase__.tsx__template__ +57 -0
  47. package/agent-plugin/kos-ddk-tools/templates/trouble-action/index.ts__template__ +1 -0
  48. package/agent-plugin/kos-ddk-tools/templates/utility/__nameDashCase__.stories.tsx__template__ +32 -0
  49. package/agent-plugin/kos-ddk-tools/templates/utility/__nameDashCase__.tsx__template__ +37 -0
  50. package/agent-plugin/kos-ddk-tools/templates/utility/index.ts__template__ +1 -0
  51. package/catalog/contributions.json +877 -0
  52. package/guides/ddk-dev.md +47 -0
  53. package/guides/getting-started.md +117 -0
  54. package/guides/storybook.md +104 -0
  55. package/package.json +33 -3
  56. package/reference/reference.json +19339 -0
  57. package/src/build-paths.mjs +20 -0
  58. package/src/codegen/contribution.mjs +425 -0
  59. package/src/codegen/descriptor.mjs +210 -0
  60. package/src/codegen/ncui-descriptor.mjs +134 -0
  61. package/src/codegen/overrides.mjs +263 -0
  62. package/src/codegen/project.mjs +242 -0
  63. package/src/extension.mjs +32 -0
  64. package/src/generators/agent-install.mjs +80 -0
  65. package/src/generators/catalog.mjs +81 -0
  66. package/src/generators/contributions.mjs +151 -0
  67. package/src/generators/dashboard.mjs +241 -0
  68. package/src/generators/descriptor-entries.mjs +53 -0
  69. package/src/generators/descriptor-project.mjs +79 -0
  70. package/src/generators/dev.mjs +231 -0
  71. package/src/generators/override-prompts.mjs +27 -0
  72. package/src/generators/plugin-project.mjs +66 -0
  73. package/src/generators/theme-project.mjs +45 -0
  74. package/src/handlers.mjs +315 -0
  75. package/src/mcp/pkg-info.mjs +7 -0
  76. package/src/mcp/plugin-inspect.mjs +292 -0
  77. package/src/mcp/reference.mjs +264 -0
  78. package/src/mcp/server.mjs +12 -0
  79. package/src/mcp/tools.mjs +575 -0
  80. package/templates/cui/__nameDashCase__.stories.tsx__template__ +32 -0
  81. package/templates/cui/__nameDashCase__.tsx__template__ +35 -0
  82. package/templates/cui/index.ts__template__ +1 -0
  83. package/templates/dashboard-detail/detail/__nameDashCase__.stories.tsx__template__ +34 -0
  84. package/templates/dashboard-detail/detail/__nameDashCase__.tsx__template__ +52 -0
  85. package/templates/dashboard-detail/detail/index.ts__template__ +1 -0
  86. package/templates/dashboard-summary/summary/__nameDashCase__.stories.tsx__template__ +34 -0
  87. package/templates/dashboard-summary/summary/__nameDashCase__.tsx__template__ +41 -0
  88. package/templates/dashboard-summary/summary/index.ts__template__ +1 -0
  89. package/templates/macro-summary/__nameDashCase__.stories.tsx__template__ +34 -0
  90. package/templates/macro-summary/__nameDashCase__.tsx__template__ +24 -0
  91. package/templates/macro-summary/index.ts__template__ +1 -0
  92. package/templates/nav/__nameDashCase__.stories.tsx__template__ +32 -0
  93. package/templates/nav/__nameDashCase__.tsx__template__ +27 -0
  94. package/templates/nav/index.ts__template__ +1 -0
  95. package/templates/plugin-project/.storybook/preview.tsx.template +113 -0
  96. package/templates/plugin-project/.storybook/registration.ts.template +6 -0
  97. package/templates/pump-detail/__nameDashCase__.stories.tsx__template__ +34 -0
  98. package/templates/pump-detail/__nameDashCase__.tsx__template__ +38 -0
  99. package/templates/pump-detail/index.ts__template__ +1 -0
  100. package/templates/pump-summary/__nameDashCase__.stories.tsx__template__ +34 -0
  101. package/templates/pump-summary/__nameDashCase__.tsx__template__ +25 -0
  102. package/templates/pump-summary/index.ts__template__ +1 -0
  103. package/templates/setup/__nameDashCase__.stories.tsx__template__ +32 -0
  104. package/templates/setup/__nameDashCase__.tsx__template__ +33 -0
  105. package/templates/setup/index.ts__template__ +1 -0
  106. package/templates/theme-project/theme/assets/component.css.template +2 -0
  107. package/templates/theme-project/theme/assets/generic.css.template +2 -0
  108. package/templates/theme-project/theme/assets/semantic.css.template +2 -0
  109. package/templates/theme-project/theme/assets/theme-overlay.css.template +7 -0
  110. package/templates/trouble-action/__nameDashCase__.stories.tsx__template__ +31 -0
  111. package/templates/trouble-action/__nameDashCase__.tsx__template__ +57 -0
  112. package/templates/trouble-action/index.ts__template__ +1 -0
  113. package/templates/utility/__nameDashCase__.stories.tsx__template__ +32 -0
  114. package/templates/utility/__nameDashCase__.tsx__template__ +37 -0
  115. package/templates/utility/index.ts__template__ +1 -0
@@ -0,0 +1,57 @@
1
+ import styled from '@emotion/styled';
2
+ import {
3
+ Button,
4
+ Content,
5
+ Footer,
6
+ LabelSmall,
7
+ } from '@kosdev-code/kos-ddk-components';
8
+ import {
9
+ KosLog,
10
+ kosComponent,
11
+ useKosTranslation,
12
+ type TroubleModel,
13
+ } from '@kosdev-code/kos-ui-sdk';
14
+ import { useCallback } from 'react';
15
+
16
+ const log = KosLog.createLogger({ name: "<%= nameDashCase %>" });
17
+ log.debug("<%= nameDashCase %> component loaded");
18
+
19
+ const <%= namePascalCase %>Container = styled.div`
20
+ display: flex;
21
+ flex-direction: column;
22
+ height: 100%;
23
+ `;
24
+
25
+ interface <%= namePascalCase %>Props {
26
+ /** The active "<%= troubleType %>" trouble. */
27
+ trouble: TroubleModel;
28
+ }
29
+
30
+ /**
31
+ * Shown while the device has an active "<%= troubleType %>" trouble. Resolving
32
+ * the trouble clears it on the device, which removes this experience.
33
+ */
34
+ export const <%= namePascalCase %>: React.FunctionComponent<<%= namePascalCase %>Props> =
35
+ kosComponent(({ trouble }) => {
36
+ const { t } = useKosTranslation('<%= appProject %>');
37
+ const resolve = useCallback(() => {
38
+ trouble.resolve().catch((error) => log.error(`resolve failed: ${error}`));
39
+ }, [trouble]);
40
+
41
+ return (
42
+ <<%= namePascalCase %>Container>
43
+ <Content>
44
+ <LabelSmall>{trouble.reason ?? trouble.type}</LabelSmall>
45
+ </Content>
46
+ <Footer>
47
+ <Button disabled={!trouble.resolvable} onClick={resolve}>
48
+ {t('resolve')}
49
+ </Button>
50
+ </Footer>
51
+ </<%= namePascalCase %>Container>
52
+ );
53
+ });
54
+
55
+ <%= namePascalCase %>.displayName = "<%= namePascalCase %>";
56
+
57
+ export default <%= namePascalCase %>;
@@ -0,0 +1 @@
1
+ export * from "./<%= nameDashCase %>";
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Note: The plugin project Storybook configuration requires that the Studio
3
+ * Simulator is running in order to retrieve model data, unless the story mocks
4
+ * it with parameters.kosMock (ddk://guide/storybook).
5
+ */
6
+ import { UtilityStoryContainer } from "@kosdev-code/kos-ddk-story-containers";
7
+ import type { Meta, StoryObj } from "@storybook/react";
8
+ import { <%= namePascalCase %> } from "./<%= nameDashCase %>";
9
+
10
+ const meta: Meta<typeof <%= namePascalCase %>> = {
11
+ args: {},
12
+ component: <%= namePascalCase %>,
13
+ decorators: [
14
+ (Story, context) => (
15
+ <UtilityStoryContainer>
16
+ <Story args={{ ...context.args }} />
17
+ </UtilityStoryContainer>
18
+ ),
19
+ ],
20
+ tags: ["!autodocs"],
21
+ title: "utility/<%= namePascalCase %>",
22
+ };
23
+
24
+ export default meta;
25
+
26
+ type Story = StoryObj<typeof <%= namePascalCase %>>;
27
+
28
+ export const Default: Story = {
29
+ // parameters: { kosMock: { setups: ["<setup module>"] } },
30
+ render: (props) => <<%= namePascalCase %> {...props} />,
31
+ };
32
+
@@ -0,0 +1,37 @@
1
+ import styled from '@emotion/styled';
2
+ import {
3
+ Button,
4
+ Footer,
5
+ type Experience,
6
+ } from '@kosdev-code/kos-ddk-components';
7
+ import {
8
+ KosLog,
9
+ kosComponent,
10
+ useKosTranslation,
11
+ } from '@kosdev-code/kos-ui-sdk';
12
+
13
+ const log = KosLog.createLogger({name: "<%= nameDashCase %>"})
14
+ log.debug("<%= nameDashCase %> component loaded");
15
+
16
+ const <%= namePascalCase %>Container = styled.div`
17
+ align-items: center;
18
+ display: flex;
19
+ flex-direction: column;
20
+ width: 100%;
21
+ `;
22
+
23
+ export const <%= namePascalCase %>: Experience = kosComponent(({ onComplete }) => {
24
+ const { t } = useKosTranslation('<%= appProject %>');
25
+ return (
26
+ <<%= namePascalCase %>Container>
27
+ Hello from <%= namePascalCase %> Utility
28
+ <Footer>
29
+ <Button onClick={onComplete}>{t('proceed')}</Button>
30
+ </Footer>
31
+ </<%= namePascalCase %>Container>
32
+ );
33
+ });
34
+
35
+ <%= namePascalCase %>.displayName = "<%= namePascalCase %>"
36
+
37
+ export default <%= namePascalCase %>
@@ -0,0 +1 @@
1
+ export * from "./<%= nameDashCase %>";