@flowdular/sandbox 0.2.0
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/LICENSE +21 -0
- package/README.md +696 -0
- package/bin/flowdular-sandbox.mjs +394 -0
- package/bin/register-types.mjs +53 -0
- package/dist/client/assets/App-ClMOrpyg.js +11 -0
- package/dist/client/assets/PreviewHost-BHiHrfbQ.js +1 -0
- package/dist/client/assets/auto-buGEq6de.js +3 -0
- package/dist/client/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/dist/client/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/dist/client/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/dist/client/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/dist/client/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/dist/client/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/dist/client/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/dist/client/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/dist/client/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/dist/client/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/dist/client/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
- package/dist/client/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
- package/dist/client/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
- package/dist/client/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
- package/dist/client/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
- package/dist/client/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
- package/dist/client/assets/index-CvwhlQ87.js +4 -0
- package/dist/client/assets/styles-BPWaGf55.js +3 -0
- package/dist/client/assets/styles-Dx1_KOag.css +1 -0
- package/dist/client/favicon.svg +1 -0
- package/dist/server/assets/auto-CVGNYyb3.js +12785 -0
- package/dist/server/assets/chunk-DDJLRBDX-3OUNo51g.js +4125 -0
- package/dist/server/assets/nodefs-DVSI7kG0.js +24 -0
- package/dist/server/assets/opfs-ahp-D56iokt1.js +388 -0
- package/dist/server/assets/token-Bvaq7Anz.js +55 -0
- package/dist/server/assets/token-util-BqSvdIPQ.js +3 -0
- package/dist/server/assets/token-util-CktFFT4z.js +494 -0
- package/dist/server/entry.js +91671 -0
- package/dist/server/favicon.svg +1 -0
- package/dist/server/index.html +161 -0
- package/index.html +159 -0
- package/internal/coding-agent/package.json +44 -0
- package/internal/coding-agent/src/drivers/byok.ts +322 -0
- package/internal/coding-agent/src/drivers/claude-code.ts +290 -0
- package/internal/coding-agent/src/drivers/codex.ts +281 -0
- package/internal/coding-agent/src/index.ts +56 -0
- package/internal/coding-agent/src/registry.ts +119 -0
- package/internal/coding-agent/src/roles/contract.ts +60 -0
- package/internal/coding-agent/src/roles/defaults.ts +134 -0
- package/internal/coding-agent/src/roles/handoff.ts +41 -0
- package/internal/coding-agent/src/roles/registry.ts +156 -0
- package/internal/coding-agent/src/roles/skills.ts +72 -0
- package/internal/coding-agent/src/roles/sync.ts +88 -0
- package/internal/coding-agent/src/types.ts +102 -0
- package/internal/coding-agent/src/workspace.ts +275 -0
- package/octane.config.ts +36 -0
- package/package.json +68 -0
- package/public/favicon.svg +1 -0
- package/public/og.png +0 -0
- package/src/App.tsrx +924 -0
- package/src/client/ApprovalHandoff.tsrx +39 -0
- package/src/client/ChatPane.tsrx +694 -0
- package/src/client/ConnectView.tsrx +86 -0
- package/src/client/DiffPane.tsrx +150 -0
- package/src/client/EjectModal.tsrx +571 -0
- package/src/client/GateResults.tsrx +60 -0
- package/src/client/GitHubSettingsModal.tsrx +219 -0
- package/src/client/NewSessionForm.tsrx +214 -0
- package/src/client/SessionBar.tsrx +151 -0
- package/src/client/SessionPicker.tsrx +472 -0
- package/src/client/SpecEditor.tsrx +109 -0
- package/src/client/SpecReviewCard.tsrx +321 -0
- package/src/client/WorkCard.tsrx +128 -0
- package/src/client/WorkbenchModal.tsrx +161 -0
- package/src/client/WorkspaceMenu.tsrx +100 -0
- package/src/client/api.ts +797 -0
- package/src/client/attachments.ts +73 -0
- package/src/client/dashboard.ts +46 -0
- package/src/client/github-settings.ts +48 -0
- package/src/client/highlight.ts +105 -0
- package/src/client/i18n.ts +32 -0
- package/src/client/locales/en.json +466 -0
- package/src/client/locales/pl.json +466 -0
- package/src/client/session-labels.ts +77 -0
- package/src/client/state.ts +108 -0
- package/src/index.ts +10 -0
- package/src/preview/PreviewHost.tsrx +373 -0
- package/src/preview/load-module.ts +16 -0
- package/src/server/attachments.ts +308 -0
- package/src/server/auto-review.ts +181 -0
- package/src/server/checkpoints.ts +90 -0
- package/src/server/config.ts +460 -0
- package/src/server/dashboard.ts +245 -0
- package/src/server/delivery/configuration.ts +193 -0
- package/src/server/delivery/git-pr.ts +1473 -0
- package/src/server/delivery/index.ts +83 -0
- package/src/server/delivery/local.ts +151 -0
- package/src/server/delivery/official-modules.ts +516 -0
- package/src/server/delivery/plan.ts +218 -0
- package/src/server/delivery/policies.ts +239 -0
- package/src/server/delivery/record.ts +41 -0
- package/src/server/delivery/steps.ts +464 -0
- package/src/server/delivery/types.ts +158 -0
- package/src/server/dependencies.ts +88 -0
- package/src/server/diff.ts +230 -0
- package/src/server/gates.ts +388 -0
- package/src/server/index.ts +139 -0
- package/src/server/path-guard.ts +282 -0
- package/src/server/planning.ts +749 -0
- package/src/server/platform-client.ts +189 -0
- package/src/server/preview-database-host.ts +340 -0
- package/src/server/preview-database-protocol.ts +163 -0
- package/src/server/preview-database-proxy.ts +356 -0
- package/src/server/preview-database.ts +109 -0
- package/src/server/preview-ipc.ts +15 -0
- package/src/server/preview-modules.ts +83 -0
- package/src/server/preview-revision.ts +44 -0
- package/src/server/preview-runtime.ts +467 -0
- package/src/server/preview-worker-manager.ts +477 -0
- package/src/server/preview-worker.ts +168 -0
- package/src/server/reference.ts +251 -0
- package/src/server/routes.ts +2258 -0
- package/src/server/runtime.ts +188 -0
- package/src/server/session-owner.ts +23 -0
- package/src/server/sessions.ts +849 -0
- package/src/server/spec.ts +471 -0
- package/src/server/turn-lifecycle.ts +56 -0
- package/src/server/turns.ts +993 -0
- package/src/server/workspace-install.ts +266 -0
- package/src/server/workspace-root.ts +73 -0
- package/src/styles.css +1573 -0
- package/vite.config.ts +134 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Avatar, Icon, Tag } from '@flowdular/sdk/ui';
|
|
2
|
+
import type { SandboxState } from './api.ts';
|
|
3
|
+
import { setActiveLocale, SUPPORTED_LOCALES, useTranslation } from './i18n.ts';
|
|
4
|
+
|
|
5
|
+
export interface WorkspaceMenuProps {
|
|
6
|
+
readonly state: SandboxState;
|
|
7
|
+
readonly open: boolean;
|
|
8
|
+
readonly onToggle: () => void;
|
|
9
|
+
readonly onChangeConnection: () => void;
|
|
10
|
+
readonly onDisconnect: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* The workspace this sandbox works against. A token is bound to one membership,
|
|
14
|
+
so this is not a tenant switcher: changing workspace means changing the
|
|
15
|
+
connection, and the menu says so. */
|
|
16
|
+
export function WorkspaceMenu(props: WorkspaceMenuProps) @{
|
|
17
|
+
const { locale, t } = useTranslation();
|
|
18
|
+
const principal = props.state.connection.authority?.principal;
|
|
19
|
+
const workspace =
|
|
20
|
+
principal?.tenantName ?? t('sandbox.workspace.notConnected');
|
|
21
|
+
|
|
22
|
+
<div class="workspace-menu">
|
|
23
|
+
<button
|
|
24
|
+
class="workspace-menu__button"
|
|
25
|
+
type="button"
|
|
26
|
+
aria-expanded={props.open}
|
|
27
|
+
onClick={props.onToggle}
|
|
28
|
+
>
|
|
29
|
+
<Avatar name={workspace} square />
|
|
30
|
+
<span class="workspace-menu__label">
|
|
31
|
+
<b>{workspace}</b>
|
|
32
|
+
<small>
|
|
33
|
+
{principal?.email ?? props.state.configuration.platformUrl}
|
|
34
|
+
</small>
|
|
35
|
+
</span>
|
|
36
|
+
<Icon name="chevrons-up-down" size={14} />
|
|
37
|
+
</button>
|
|
38
|
+
@if (props.open) {
|
|
39
|
+
<div class="ui-menu workspace-menu__panel" role="menu">
|
|
40
|
+
<div class="ui-menu__label">{t('sandbox.workspace.connection')}</div>
|
|
41
|
+
<div class="ui-menu__section">
|
|
42
|
+
<span class="ui-cell">
|
|
43
|
+
<b class="ui-mono">{props.state.configuration.platformUrl}</b>
|
|
44
|
+
<small>
|
|
45
|
+
{principal
|
|
46
|
+
? t('sandbox.workspace.signedIn', {
|
|
47
|
+
name: principal.displayName,
|
|
48
|
+
role: principal.role,
|
|
49
|
+
})
|
|
50
|
+
: t('sandbox.workspace.noConnection')}
|
|
51
|
+
</small>
|
|
52
|
+
</span>
|
|
53
|
+
<Tag
|
|
54
|
+
tone={props.state.connection.connected ? 'success' : 'warning'}
|
|
55
|
+
dot
|
|
56
|
+
>
|
|
57
|
+
{props.state.connection.connected
|
|
58
|
+
? t('sandbox.workspace.connected')
|
|
59
|
+
: t('sandbox.workspace.offline')}
|
|
60
|
+
</Tag>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="ui-menu__sep"></div>
|
|
63
|
+
<label class="ui-menu__item workspace-menu__language">
|
|
64
|
+
<Icon name="globe" size={16} />
|
|
65
|
+
<span>{t('sandbox.workspace.language')}</span>
|
|
66
|
+
<select
|
|
67
|
+
class="ui-select"
|
|
68
|
+
value={locale}
|
|
69
|
+
aria-label={t('sandbox.workspace.language')}
|
|
70
|
+
onChange={(event) => setActiveLocale(event.currentTarget.value)}
|
|
71
|
+
>
|
|
72
|
+
@for (const option of SUPPORTED_LOCALES; key option) {
|
|
73
|
+
<option value={option}>{t(
|
|
74
|
+
'sandbox.workspace.language.' + option,
|
|
75
|
+
)}</option>
|
|
76
|
+
}
|
|
77
|
+
</select>
|
|
78
|
+
</label>
|
|
79
|
+
<button
|
|
80
|
+
class="ui-menu__item"
|
|
81
|
+
type="button"
|
|
82
|
+
role="menuitem"
|
|
83
|
+
onClick={props.onChangeConnection}
|
|
84
|
+
>
|
|
85
|
+
<Icon name="plug" size={16} />
|
|
86
|
+
{t('sandbox.workspace.change')}
|
|
87
|
+
</button>
|
|
88
|
+
<button
|
|
89
|
+
class="ui-menu__item ui-menu__item--danger"
|
|
90
|
+
type="button"
|
|
91
|
+
role="menuitem"
|
|
92
|
+
onClick={props.onDisconnect}
|
|
93
|
+
>
|
|
94
|
+
<Icon name="sign-out" size={16} />
|
|
95
|
+
{t('sandbox.workspace.disconnect')}
|
|
96
|
+
</button>
|
|
97
|
+
</div>
|
|
98
|
+
}
|
|
99
|
+
</div>
|
|
100
|
+
}
|