@crowdedkingdoms/crowdyjs 15.12.1 → 16.0.0-dev.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/MIGRATION.md +55 -0
- package/README.md +67 -41
- package/dist/client.d.ts +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -0
- package/dist/crowdy-client.d.ts +2 -3
- package/dist/crowdy-client.d.ts.map +1 -1
- package/dist/crowdy-client.js +9 -11
- package/dist/crowdy-dsh/bridge.d.ts +156 -0
- package/dist/crowdy-dsh/bridge.d.ts.map +1 -0
- package/dist/crowdy-dsh/bridge.js +523 -0
- package/dist/crowdy-dsh/index.d.ts +11 -0
- package/dist/crowdy-dsh/index.d.ts.map +1 -0
- package/dist/crowdy-dsh/index.js +10 -0
- package/dist/crowdy-dsh/pane.d.ts +64 -0
- package/dist/crowdy-dsh/pane.d.ts.map +1 -0
- package/dist/crowdy-dsh/pane.js +247 -0
- package/dist/crowdy-dsh/protocol.d.ts +249 -0
- package/dist/crowdy-dsh/protocol.d.ts.map +1 -0
- package/dist/crowdy-dsh/protocol.js +39 -0
- package/dist/crowdy-dsh/transport.d.ts +66 -0
- package/dist/crowdy-dsh/transport.d.ts.map +1 -0
- package/dist/crowdy-dsh/transport.js +88 -0
- package/dist/crowdy-studio/controller.d.ts +8 -0
- package/dist/crowdy-studio/controller.d.ts.map +1 -1
- package/dist/crowdy-studio/controller.js +33 -1
- package/dist/crowdy-studio/dom-shell.d.ts +21 -4
- package/dist/crowdy-studio/dom-shell.d.ts.map +1 -1
- package/dist/crowdy-studio/dom-shell.js +32 -17
- package/dist/crowdy-studio/embed/index.d.ts +1 -1
- package/dist/crowdy-studio/embed/index.d.ts.map +1 -1
- package/dist/crowdy-studio/embed/panel.d.ts +18 -18
- package/dist/crowdy-studio/embed/panel.d.ts.map +1 -1
- package/dist/crowdy-studio/embed/panel.js +7 -21
- package/dist/crowdy-studio/index.d.ts +2 -3
- package/dist/crowdy-studio/index.d.ts.map +1 -1
- package/dist/crowdy-studio/index.js +1 -2
- package/dist/crowdy-studio/mount.d.ts +29 -14
- package/dist/crowdy-studio/mount.d.ts.map +1 -1
- package/dist/crowdy-studio/mount.js +39 -126
- package/dist/crowdy-studio/styles.d.ts +1 -1
- package/dist/crowdy-studio/styles.d.ts.map +1 -1
- package/dist/crowdy-studio/styles.js +5 -0
- package/dist/default-origin.d.ts +6 -6
- package/dist/default-origin.d.ts.map +1 -1
- package/dist/default-origin.js +6 -6
- package/dist/generated/graphql.d.ts +76 -2438
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +0 -50
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/kit/npcs.d.ts.map +1 -1
- package/dist/kit/social.d.ts.map +1 -1
- package/dist/{crowdy-agent/errors.d.ts → player-host/agent-errors.d.ts} +1 -1
- package/dist/player-host/agent-errors.d.ts.map +1 -0
- package/dist/player-host/agent-types.d.ts +18 -0
- package/dist/player-host/agent-types.d.ts.map +1 -0
- package/dist/player-host/agent-types.js +7 -0
- package/dist/player-host/index.d.ts +12 -4
- package/dist/player-host/index.d.ts.map +1 -1
- package/dist/player-host/index.js +11 -4
- package/dist/{crowdy-agent/schema.d.ts → player-host/json-schema.d.ts} +1 -1
- package/dist/player-host/json-schema.d.ts.map +1 -0
- package/dist/{crowdy-agent/schema.js → player-host/json-schema.js} +1 -1
- package/dist/player-host/schemas.d.ts +1 -1
- package/dist/player-host/schemas.d.ts.map +1 -1
- package/dist/player-host/schemas.js +2 -2
- package/dist/player-host/types.d.ts +2 -2
- package/dist/player-host/types.d.ts.map +1 -1
- package/package.json +5 -7
- package/dist/crowdy-agent/browser-dispatcher.d.ts +0 -41
- package/dist/crowdy-agent/browser-dispatcher.d.ts.map +0 -1
- package/dist/crowdy-agent/browser-dispatcher.js +0 -264
- package/dist/crowdy-agent/controller.d.ts +0 -152
- package/dist/crowdy-agent/controller.d.ts.map +0 -1
- package/dist/crowdy-agent/controller.js +0 -1289
- package/dist/crowdy-agent/errors.d.ts.map +0 -1
- package/dist/crowdy-agent/graphql-transport.d.ts +0 -154
- package/dist/crowdy-agent/graphql-transport.d.ts.map +0 -1
- package/dist/crowdy-agent/graphql-transport.js +0 -854
- package/dist/crowdy-agent/index.d.ts +0 -17
- package/dist/crowdy-agent/index.d.ts.map +0 -1
- package/dist/crowdy-agent/index.js +0 -16
- package/dist/crowdy-agent/registry.d.ts +0 -29
- package/dist/crowdy-agent/registry.d.ts.map +0 -1
- package/dist/crowdy-agent/registry.js +0 -281
- package/dist/crowdy-agent/schema.d.ts.map +0 -1
- package/dist/crowdy-agent/session-resume.d.ts +0 -24
- package/dist/crowdy-agent/session-resume.d.ts.map +0 -1
- package/dist/crowdy-agent/session-resume.js +0 -76
- package/dist/crowdy-agent/studio-tools.d.ts +0 -15
- package/dist/crowdy-agent/studio-tools.d.ts.map +0 -1
- package/dist/crowdy-agent/studio-tools.js +0 -280
- package/dist/crowdy-agent/tool-descriptors.d.ts +0 -4
- package/dist/crowdy-agent/tool-descriptors.d.ts.map +0 -1
- package/dist/crowdy-agent/tool-descriptors.js +0 -1049
- package/dist/crowdy-agent/transport.d.ts +0 -152
- package/dist/crowdy-agent/transport.d.ts.map +0 -1
- package/dist/crowdy-agent/transport.js +0 -27
- package/dist/crowdy-agent/types.d.ts +0 -328
- package/dist/crowdy-agent/types.d.ts.map +0 -1
- package/dist/crowdy-agent/types.js +0 -37
- package/dist/crowdy-studio/agent-dom-shell.d.ts +0 -68
- package/dist/crowdy-studio/agent-dom-shell.d.ts.map +0 -1
- package/dist/crowdy-studio/agent-dom-shell.js +0 -418
- package/dist/player-host/control-banner.d.ts +0 -40
- package/dist/player-host/control-banner.d.ts.map +0 -1
- package/dist/player-host/control-banner.js +0 -252
- package/dist/player-host/control-gate.d.ts +0 -77
- package/dist/player-host/control-gate.d.ts.map +0 -1
- package/dist/player-host/control-gate.js +0 -197
- package/dist/player-host/lease-manager.d.ts +0 -66
- package/dist/player-host/lease-manager.d.ts.map +0 -1
- package/dist/player-host/lease-manager.js +0 -428
- package/dist/player-host/tools.d.ts +0 -13
- package/dist/player-host/tools.d.ts.map +0 -1
- package/dist/player-host/tools.js +0 -79
- /package/dist/{crowdy-agent/errors.js → player-host/agent-errors.js} +0 -0
|
@@ -1,25 +1,40 @@
|
|
|
1
1
|
import { CrowdyStudioController, type CrowdyStudioControllerOptions } from './controller.js';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import type { GraphQLClient } from '../client.js';
|
|
3
|
+
import { CrowdyStudioDshPane } from '../crowdy-dsh/pane.js';
|
|
4
|
+
import type { CrowdyStudioDshHost } from '../crowdy-dsh/bridge.js';
|
|
4
5
|
import type { CrowdyStudioEditorAdapter, CrowdyStudioEditorMode } from './editor.js';
|
|
5
6
|
import { type MonacoCrowdyStudioEditorOptions } from './monaco-editor.js';
|
|
6
7
|
export interface MountCrowdyStudioOptions extends CrowdyStudioControllerOptions, MonacoCrowdyStudioEditorOptions {
|
|
7
|
-
/**
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Optional Studio agent pane: the DeepSeek Harness running in the player's
|
|
10
|
+
* browser, docked beside the editor. Omit for a Studio without an agent.
|
|
11
|
+
*/
|
|
12
|
+
dsh?: MountCrowdyStudioDshOptions;
|
|
9
13
|
}
|
|
10
|
-
export interface
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
export interface MountCrowdyStudioDshOptions {
|
|
15
|
+
/** GraphQL client the pane uses for consent/usage reads (the game's client). */
|
|
16
|
+
graphql: GraphQLClient;
|
|
17
|
+
/** Same-origin path the packed harness page is served from, e.g. `/dsh/`. */
|
|
18
|
+
webBase: string;
|
|
19
|
+
/** GraphQL endpoint the harness worker reads/writes project files through. */
|
|
20
|
+
graphqlUrl: string;
|
|
21
|
+
/** Origin of the game API for `/v1/model/*` (same origin as `graphqlUrl`). */
|
|
22
|
+
apiOrigin: string;
|
|
23
|
+
/** Current app token; re-read whenever the harness needs it. */
|
|
24
|
+
getToken(): string | null;
|
|
25
|
+
/** Stable per-player key for session persistence in the browser (never a token). */
|
|
26
|
+
persistScope: string;
|
|
27
|
+
/** What the game exposes to the model: captures, observation, client logs. */
|
|
28
|
+
host?: CrowdyStudioDshHost;
|
|
29
|
+
/** Studio origin for the wallet link in the pane. */
|
|
30
|
+
studioOrigin?: string;
|
|
31
|
+
/** Open the pane on mount (default true). */
|
|
32
|
+
openOnMount?: boolean;
|
|
18
33
|
}
|
|
19
34
|
export interface CrowdyStudioHandle {
|
|
20
35
|
controller: CrowdyStudioController;
|
|
21
|
-
agent
|
|
22
|
-
|
|
36
|
+
/** The agent pane when `dsh` was configured. */
|
|
37
|
+
dsh: CrowdyStudioDshPane | null;
|
|
23
38
|
editorMode: CrowdyStudioEditorMode;
|
|
24
39
|
destroy(): void;
|
|
25
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/mount.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,EACnC,MAAM,iBAAiB,CAAC;AACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"mount.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/mount.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,EACnC,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAA4B,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,EACV,yBAAyB,EAEzB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,oBAAoB,CAAC;AAG5B,MAAM,WAAW,wBACf,SAAQ,6BAA6B,EACnC,+BAA+B;IACjC;;;OAGG;IACH,GAAG,CAAC,EAAE,2BAA2B,CAAC;CACnC;AAED,MAAM,WAAW,2BAA2B;IAC1C,gFAAgF;IAChF,OAAO,EAAE,aAAa,CAAC;IACvB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,QAAQ,IAAI,MAAM,GAAG,IAAI,CAAC;IAC1B,oFAAoF;IACpF,YAAY,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,sBAAsB,CAAC;IACnC,gDAAgD;IAChD,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,sBAAsB,CAAC;IACnC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,WAAW,EACjB,aAAa,EAAE,MAAM,yBAAyB,GAAG,IAAI,GACpD,MAAM,IAAI,CAmBZ;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAkJ7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CrowdyStudioController, } from './controller.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { CrowdyStudioDshPane, CROWDY_STUDIO_DSH_STYLES } from '../crowdy-dsh/pane.js';
|
|
3
|
+
import { CrowdyStudioDshTransport } from '../crowdy-dsh/transport.js';
|
|
4
4
|
import { CrowdyStudioDomShell } from './dom-shell.js';
|
|
5
5
|
import { createMonacoCrowdyStudioEditor, } from './monaco-editor.js';
|
|
6
6
|
import { createTextareaCrowdyStudioEditor } from './textarea-editor.js';
|
|
@@ -43,98 +43,40 @@ export async function mountCrowdyStudio(host, options) {
|
|
|
43
43
|
throw new Error('mountCrowdyStudio requires a DOM document');
|
|
44
44
|
}
|
|
45
45
|
const controller = new CrowdyStudioController(options);
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
getSessionId: () => agent?.getState().session?.sessionId ?? null,
|
|
77
|
-
getClientEpoch: () => agent?.getState().clientEpoch ?? null,
|
|
78
|
-
getContextVersion: () => agent?.getState().session?.contextVersion ??
|
|
79
|
-
controller.getAgentContext().contextVersion,
|
|
80
|
-
getMode: () => agent?.getState().session?.mode ?? 'ASK',
|
|
81
|
-
});
|
|
82
|
-
const agentOptions = options.agent;
|
|
83
|
-
agent = new CrowdyStudioAgentController({
|
|
84
|
-
...agentOptions,
|
|
85
|
-
browserDispatcher: dispatcher,
|
|
86
|
-
resolveProjectBinding: async () => {
|
|
87
|
-
const project = controller.getState().project;
|
|
88
|
-
if (project && !(await controller.saveNow())) {
|
|
89
|
-
throw new Error('Resolve the selected project save before starting the agent');
|
|
90
|
-
}
|
|
91
|
-
return {
|
|
92
|
-
...(project ? { projectId: project.projectId } : {}),
|
|
93
|
-
gridId: project?.gridId ?? options.gridId,
|
|
94
|
-
};
|
|
95
|
-
},
|
|
96
|
-
beforeAgentWork: async () => {
|
|
97
|
-
await controller.prepareForAgentWork();
|
|
98
|
-
},
|
|
99
|
-
onPreempt: (reason) => {
|
|
100
|
-
controlLeaseManager?.preempt(reason);
|
|
101
|
-
agentOptions.onLocalPreempt?.(reason);
|
|
102
|
-
},
|
|
103
|
-
onEpochAttached: (clientEpoch) => {
|
|
104
|
-
controlLeaseManager?.attach(clientEpoch);
|
|
105
|
-
if (controlLeaseManager) {
|
|
106
|
-
void controlLeaseManager.refreshCapabilities().catch(() => {
|
|
107
|
-
controlLeaseManager?.preempt('CONTEXT_CHANGED');
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
onLeaseChanged: (lease) => {
|
|
112
|
-
if (!controlLeaseManager || lease.kind !== 'PLAY')
|
|
113
|
-
return;
|
|
114
|
-
if (lease.status === 'ACTIVE') {
|
|
115
|
-
void controlLeaseManager
|
|
116
|
-
.refreshCapabilities()
|
|
117
|
-
.then(() => controlLeaseManager?.grantLease(lease))
|
|
118
|
-
.catch(() => controlLeaseManager?.preempt('CONTEXT_CHANGED'));
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
controlLeaseManager.preempt(lease.revokedReason ?? 'LEASE_EXPIRED');
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
const shell = new CrowdyStudioDomShell(host, controller, agent ?? undefined, {
|
|
127
|
-
getPlayLeaseContext: () => {
|
|
128
|
-
const capabilities = controlLeaseManager?.snapshot().capabilities;
|
|
129
|
-
return capabilities
|
|
130
|
-
? {
|
|
131
|
-
controlledEntityId: capabilities.controlledEntityId,
|
|
132
|
-
hostCapabilityRevision: capabilities.revision,
|
|
133
|
-
}
|
|
134
|
-
: null;
|
|
135
|
-
},
|
|
46
|
+
let dsh = null;
|
|
47
|
+
const dshOptions = options.dsh;
|
|
48
|
+
const shell = new CrowdyStudioDomShell(host, controller, {
|
|
49
|
+
dock: dshOptions
|
|
50
|
+
? (workspace) => {
|
|
51
|
+
const style = document.createElement('style');
|
|
52
|
+
style.textContent = CROWDY_STUDIO_DSH_STYLES;
|
|
53
|
+
workspace.append(style);
|
|
54
|
+
dsh = new CrowdyStudioDshPane(workspace, {
|
|
55
|
+
controller,
|
|
56
|
+
transport: new CrowdyStudioDshTransport(dshOptions.graphql, {
|
|
57
|
+
apiOrigin: dshOptions.apiOrigin,
|
|
58
|
+
getToken: dshOptions.getToken,
|
|
59
|
+
}),
|
|
60
|
+
appId: options.appId,
|
|
61
|
+
webBase: dshOptions.webBase,
|
|
62
|
+
persistScope: dshOptions.persistScope,
|
|
63
|
+
getToken: dshOptions.getToken,
|
|
64
|
+
graphqlUrl: dshOptions.graphqlUrl,
|
|
65
|
+
host: dshOptions.host,
|
|
66
|
+
studioOrigin: dshOptions.studioOrigin,
|
|
67
|
+
});
|
|
68
|
+
return dsh;
|
|
69
|
+
}
|
|
70
|
+
: undefined,
|
|
71
|
+
onFixWithAi: dshOptions
|
|
72
|
+
? (diagnostic) => {
|
|
73
|
+
dsh?.bridge.prompt(`Fix this ${diagnostic.severity} in ${diagnostic.target.toLowerCase()}/${diagnostic.path}:${diagnostic.line}:${diagnostic.column} — ${diagnostic.message}. Read the file first, make the smallest correct change, then run draft_test.`);
|
|
74
|
+
}
|
|
75
|
+
: undefined,
|
|
136
76
|
});
|
|
137
|
-
|
|
77
|
+
if (dshOptions && dshOptions.openOnMount !== false) {
|
|
78
|
+
shell.layout.setVisible('agent', true);
|
|
79
|
+
}
|
|
138
80
|
let editor = null;
|
|
139
81
|
let destroyed = false;
|
|
140
82
|
let recoveringEditor = false;
|
|
@@ -163,20 +105,13 @@ export async function mountCrowdyStudio(host, options) {
|
|
|
163
105
|
});
|
|
164
106
|
},
|
|
165
107
|
};
|
|
166
|
-
let selectedProjectId = controller.getState().project?.projectId;
|
|
167
108
|
const unsubscribe = controller.subscribe((state) => {
|
|
168
109
|
shell.render(state);
|
|
169
110
|
editor?.sync(state);
|
|
170
|
-
const nextProjectId = state.project?.projectId;
|
|
171
|
-
if (nextProjectId !== selectedProjectId) {
|
|
172
|
-
selectedProjectId = nextProjectId;
|
|
173
|
-
agent?.projectSelectionChanged(nextProjectId);
|
|
174
|
-
}
|
|
175
111
|
});
|
|
176
112
|
const onVisibilityChange = () => {
|
|
177
113
|
const visible = document.visibilityState !== 'hidden';
|
|
178
114
|
controller.setPageVisible(visible);
|
|
179
|
-
agent?.setPageVisible(visible);
|
|
180
115
|
};
|
|
181
116
|
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
182
117
|
onVisibilityChange();
|
|
@@ -191,11 +126,6 @@ export async function mountCrowdyStudio(host, options) {
|
|
|
191
126
|
}
|
|
192
127
|
editor.sync(controller.getState());
|
|
193
128
|
editor.layout();
|
|
194
|
-
if (agent && options.agent?.autoInitialize !== false) {
|
|
195
|
-
await agent.initialize().catch((error) => {
|
|
196
|
-
console.warn('Crowdy Studio agent could not attach; manual Studio remains available', error);
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
129
|
}
|
|
200
130
|
catch (error) {
|
|
201
131
|
disconnectLayoutObserver();
|
|
@@ -204,15 +134,14 @@ export async function mountCrowdyStudio(host, options) {
|
|
|
204
134
|
const failedEditor = editor;
|
|
205
135
|
failedEditor?.dispose();
|
|
206
136
|
shell.dispose();
|
|
207
|
-
unsubscribeHumanEdit();
|
|
208
|
-
agent?.destroy();
|
|
209
137
|
controller.destroy();
|
|
210
138
|
throw error;
|
|
211
139
|
}
|
|
212
140
|
return {
|
|
213
141
|
controller,
|
|
214
|
-
|
|
215
|
-
|
|
142
|
+
get dsh() {
|
|
143
|
+
return dsh;
|
|
144
|
+
},
|
|
216
145
|
get editorMode() {
|
|
217
146
|
return editor?.mode ?? 'textarea';
|
|
218
147
|
},
|
|
@@ -226,24 +155,8 @@ export async function mountCrowdyStudio(host, options) {
|
|
|
226
155
|
editor?.dispose();
|
|
227
156
|
editor = null;
|
|
228
157
|
shell.dispose();
|
|
229
|
-
|
|
230
|
-
agent?.destroy();
|
|
231
|
-
agent = null;
|
|
158
|
+
dsh = null;
|
|
232
159
|
controller.destroy();
|
|
233
160
|
},
|
|
234
161
|
};
|
|
235
162
|
}
|
|
236
|
-
function mergeAgentHandlers(...sets) {
|
|
237
|
-
const merged = {};
|
|
238
|
-
for (const set of sets) {
|
|
239
|
-
if (!set)
|
|
240
|
-
continue;
|
|
241
|
-
for (const [name, handler] of Object.entries(set)) {
|
|
242
|
-
if (merged[name]) {
|
|
243
|
-
throw new Error(`Duplicate Crowdy Studio browser tool handler: ${name}`);
|
|
244
|
-
}
|
|
245
|
-
merged[name] = handler;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
return Object.freeze(merged);
|
|
249
|
-
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CROWDY_STUDIO_STYLES = "\n.ck-crowdy-studio{--ck-bg:#111827;--ck-panel:#182235;--ck-line:#334155;--ck-text:#e5e7eb;--ck-muted:#94a3b8;--ck-accent:#38bdf8;container-type:inline-size;display:flex;flex-direction:column;position:relative;isolation:isolate;width:100%;height:100%;min-height:0;overflow:hidden;background:var(--ck-bg);color:var(--ck-text);font:13px/1.4 ui-sans-serif,system-ui,sans-serif;border:1px solid var(--ck-line)}\n.ck-crowdy-studio *{box-sizing:border-box}.ck-crowdy-studio button,.ck-crowdy-studio input,.ck-crowdy-studio select,.ck-crowdy-studio textarea{font:inherit}.ck-crowdy-studio button,.ck-crowdy-studio select,.ck-crowdy-studio input{background:#0f172a;color:var(--ck-text);border:1px solid var(--ck-line);border-radius:4px;padding:5px 8px}.ck-crowdy-studio button{cursor:pointer}.ck-crowdy-studio button:hover{border-color:var(--ck-accent)}.ck-crowdy-studio button:disabled{opacity:.5;cursor:not-allowed}\n.ck-crowdy-studio [hidden]{display:none!important}\n\n/* Top bar */\n.ck-crowdy-studio-toolbar{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border-bottom:1px solid var(--ck-line);position:relative;z-index:30}\n.ck-crowdy-studio-project-tools,.ck-crowdy-studio-runtime-tools{display:flex;align-items:center;gap:6px;min-width:0}\n.ck-crowdy-studio-primary{border-color:var(--ck-accent);color:#bae6fd}\n.ck-crowdy-studio-save{color:var(--ck-muted)}\n.ck-crowdy-studio-save[data-state=SAVED]{color:#86efac}.ck-crowdy-studio-save[data-state=SAVING]{color:#fde68a}.ck-crowdy-studio-save[data-state=CONFLICT]{color:#fca5a5;border-color:#f87171}.ck-crowdy-studio-save[data-state=OFFLINE]{color:#fdba74;border-color:#fb923c}\n.ck-crowdy-studio-save-message{margin:0;padding:4px 6px;color:var(--ck-muted);max-width:280px}\n.ck-crowdy-studio-save-actions{display:flex;gap:6px;padding:4px 6px}\n\n/* Menus */\n.ck-crowdy-studio-menu-wrap{position:relative;display:inline-flex;min-width:0}\n.ck-crowdy-studio-menu-button{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.ck-crowdy-studio-menu{position:absolute;top:calc(100% + 4px);left:0;z-index:40;min-width:180px;max-width:320px;max-height:60vh;overflow:auto;display:flex;flex-direction:column;background:var(--ck-panel);border:1px solid var(--ck-line);border-radius:6px;padding:4px;box-shadow:0 8px 24px rgba(2,6,23,.55)}\n.ck-crowdy-studio-runtime-tools .ck-crowdy-studio-menu{left:auto;right:0}\n.ck-crowdy-studio-menu-item{display:block;width:100%;text-align:left;background:transparent;border:0;border-radius:4px;padding:6px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n.ck-crowdy-studio-menu-item:hover{background:#0f172a;border:0}\n.ck-crowdy-studio-menu-item[data-active=true]{color:#bae6fd}\n.ck-crowdy-studio-menu-divider{border-top:1px solid var(--ck-line);margin:4px 2px}\n\n/* New-project popover */\n.ck-crowdy-studio-new{display:none;position:absolute;top:100%;left:8px;z-index:35;gap:6px;align-items:center;padding:8px;background:var(--ck-panel);border:1px solid var(--ck-line);border-radius:6px;box-shadow:0 8px 24px rgba(2,6,23,.55)}\n.ck-crowdy-studio-new[data-open=true]{display:flex}\n.ck-crowdy-studio-new input{flex:1;min-width:160px}\n\n/* Workspace: rail + panes + editor */\n.ck-crowdy-studio-workspace{display:flex;flex:1;min-height:0;min-width:0;position:relative}\n.ck-crowdy-studio-rail{display:flex;flex-direction:column;gap:4px;padding:6px 3px;border-right:1px solid var(--ck-line);background:#0b1220}\n.ck-crowdy-studio-rail-button{writing-mode:vertical-rl;padding:8px 4px;background:transparent;border:1px solid transparent;color:var(--ck-muted);border-radius:4px}\n.ck-crowdy-studio-rail-button:hover{color:var(--ck-text)}\n.ck-crowdy-studio-rail-button[aria-pressed=true]{color:#bae6fd;border-color:var(--ck-line);background:#0f172a}\n.ck-crowdy-studio-explorer,.ck-crowdy-studio-settings{flex:none;background:var(--ck-panel);overflow:auto;padding:8px;min-width:0}\n.ck-crowdy-studio-settings{border-left:1px solid var(--ck-line)}\n.ck-crowdy-studio-settings h3{margin:0 0 8px}\n.ck-crowdy-studio-github{margin-top:16px;padding-top:12px;border-top:1px solid var(--ck-line)}\n.ck-crowdy-studio-github-row{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}\n.ck-crowdy-studio-github-row input{flex:1;min-width:0}\n.ck-crowdy-studio-github-status,.ck-crowdy-studio-github-message{margin:4px 0;font-size:12px;opacity:.85}\n.ck-crowdy-studio-editor-column{display:flex;flex-direction:column;flex:1;min-width:240px;min-height:0}\n.ck-crowdy-studio-editor{flex:1;min-height:80px;position:relative}\n.ck-crowdy-studio-textarea{width:100%;height:100%;min-height:0;resize:none;background:#0b1020;color:var(--ck-text);border:0;padding:12px;font:13px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}\n.ck-crowdy-studio-editor-notice{padding:4px 8px;background:#78350f;color:#ffedd5}\n\n/* Splitters */\n.ck-crowdy-studio-splitter{flex:none;background:transparent;position:relative;z-index:5}\n.ck-crowdy-studio-splitter[data-orientation=vertical]{width:6px;cursor:col-resize}\n.ck-crowdy-studio-splitter[data-orientation=horizontal]{height:6px;cursor:row-resize}\n.ck-crowdy-studio-splitter:hover,.ck-crowdy-studio-splitter[data-dragging=true]{background:var(--ck-accent);opacity:.5}\n\n/* Explorer */\n.ck-crowdy-studio-section{margin-bottom:12px}\n.ck-crowdy-studio-section-header{display:flex;align-items:center;justify-content:space-between;color:var(--ck-muted);font-weight:700;text-transform:uppercase;font-size:11px;margin-bottom:4px}\n.ck-crowdy-studio-file{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px;align-items:center}\n.ck-crowdy-studio-file>button:first-child{text-align:left;overflow:hidden;text-overflow:ellipsis;border:0;background:transparent}\n.ck-crowdy-studio-file-action{padding:1px 6px}\n.ck-crowdy-studio-file .ck-crowdy-studio-menu{left:auto;right:0;min-width:130px}\n.ck-crowdy-studio-inline-form{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0;padding:6px;border:1px solid var(--ck-line);border-radius:4px;background:#0f172a}\n.ck-crowdy-studio-inline-form input{flex:1 1 100%;min-width:0}\n.ck-crowdy-studio-file-form-row{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin:4px 0;padding:6px;border:1px solid #f59e0b66;border-radius:4px}\n\n/* Editor tabs */\n.ck-crowdy-studio-tabs{display:flex;align-items:center;gap:6px;padding:4px;border-bottom:1px solid var(--ck-line);overflow:auto}\n.ck-crowdy-studio-tab{white-space:nowrap}\n.ck-crowdy-studio-tab[data-active=true],.ck-crowdy-studio-panel-tab[data-active=true]{border-color:var(--ck-accent);color:#bae6fd}\n.ck-crowdy-studio-tab span{margin-left:7px;color:var(--ck-muted)}\n\n/* Settings */\n.ck-crowdy-studio-settings label{display:grid;gap:3px;margin-bottom:9px;color:var(--ck-muted)}\n.ck-crowdy-studio-settings input,.ck-crowdy-studio-settings select{width:100%}\n\n/* Bottom panel */\n.ck-crowdy-studio-bottom{flex:none;display:flex;flex-direction:column;min-height:0;border-top:1px solid var(--ck-line)}\n.ck-crowdy-studio-panel-tabs{display:flex;align-items:center;gap:6px;padding:5px 7px;border-bottom:1px solid var(--ck-line)}\n.ck-crowdy-studio-panel-hide{margin-left:auto;padding:1px 7px;color:var(--ck-muted)}\n.ck-crowdy-studio-panel-body{flex:1;min-height:0;display:flex;flex-direction:column}\n.ck-crowdy-studio-panel{display:none;flex:1;overflow:auto;padding:8px}\n.ck-crowdy-studio-panel[data-active=true]{display:block}\n.ck-crowdy-studio-panel pre{white-space:pre-wrap;margin:0;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}\n.ck-crowdy-studio-problem{display:grid;grid-template-columns:auto auto 1fr;gap:8px;padding:3px;border-bottom:1px solid #243247;width:100%;text-align:left;background:transparent;border-left:0;border-right:0;border-top:0;border-radius:0}\n.ck-crowdy-studio-problem[data-source=rustc]{color:#fecaca}\n.ck-crowdy-studio-problem[data-source=local-advisory]{color:#fde68a}\n.ck-crowdy-studio-invoke{display:grid;grid-template-columns:180px 1fr auto;gap:6px}\n.ck-crowdy-studio-invoke textarea{min-height:70px;background:#0f172a;color:var(--ck-text);border:1px solid var(--ck-line)}\n.ck-crowdy-studio-empty{color:var(--ck-muted);padding:8px}\n\n/* Status bar */\n.ck-crowdy-studio-statusbar{display:flex;align-items:center;gap:14px;padding:3px 10px;border-top:1px solid var(--ck-line);background:#0b1220;font-size:12px;min-height:24px}\n.ck-crowdy-studio-status{color:var(--ck-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.ck-crowdy-studio-statusbar-runtime{background:transparent;border:0;padding:1px 4px;border-radius:3px}\n.ck-crowdy-studio-statusbar-runtime:hover{color:var(--ck-text)}\n.ck-crowdy-studio-statusbar-runtime[data-phase=RUNNING]{color:#86efac}\n.ck-crowdy-studio-statusbar-runtime[data-phase=COMPILING],.ck-crowdy-studio-statusbar-runtime[data-phase=TESTING_DRAFT],.ck-crowdy-studio-statusbar-runtime[data-phase=DEPLOYING_LIVE],.ck-crowdy-studio-statusbar-runtime[data-phase=ENABLING]{color:#fde68a}\n.ck-crowdy-studio-statusbar-runtime[data-phase=COMPILE_FAILED],.ck-crowdy-studio-statusbar-runtime[data-phase=ERROR],.ck-crowdy-studio-statusbar-runtime[data-phase=PARTIAL_FAILURE]{color:#fca5a5}\n\n/* Agent dock */\n.ck-crowdy-studio-agent-dock{flex:none;display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0;padding:10px;border-left:1px solid var(--ck-line);background:#0b1220;overflow:auto}\n.ck-crowdy-studio-agent-dock header{display:flex;align-items:center;justify-content:space-between;gap:8px}\n.ck-crowdy-studio-agent-dock h2,.ck-crowdy-studio-agent-dock h3{margin:0;font-size:13px}\n.ck-crowdy-studio-agent-status,.ck-crowdy-studio-agent-budget,.ck-crowdy-studio-agent-lease{color:var(--ck-muted);font-size:12px}\n.ck-crowdy-studio-agent-lease[data-active=true]{color:#fde68a;border:1px solid #f59e0b;border-radius:5px;padding:6px}\n.ck-crowdy-studio-agent-controls-row{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}\n.ck-crowdy-studio-agent-modes,.ck-crowdy-studio-agent-controls{display:flex;gap:5px;flex-wrap:wrap}\n.ck-crowdy-studio-agent-modes button[data-active=true]{border-color:var(--ck-accent);color:#bae6fd}\n.ck-crowdy-studio-agent-stop{border-color:#ef4444!important;color:#fecaca!important}\n.ck-crowdy-studio-agent-disclosure{border:1px solid var(--ck-line);border-radius:5px;padding:0}\n.ck-crowdy-studio-agent-disclosure>summary{cursor:pointer;padding:6px 8px;color:var(--ck-muted)}\n.ck-crowdy-studio-agent-disclosure[open]>summary{border-bottom:1px solid var(--ck-line);color:var(--ck-text)}\n.ck-crowdy-studio-agent-disclosure>:not(summary){padding:6px 8px}\n.ck-crowdy-studio-agent-lease-controls{display:flex;gap:6px;flex-wrap:wrap;margin:0;padding:7px;border:1px solid var(--ck-line)}\n.ck-crowdy-studio-agent-lease-controls legend{color:var(--ck-muted)}\n.ck-crowdy-studio-agent-lease-controls label{display:flex;gap:3px;align-items:center}\n.ck-crowdy-studio-agent-messages{display:flex;flex-direction:column;gap:6px;flex:1;min-height:120px;overflow:auto}\n.ck-crowdy-studio-agent-message,.ck-crowdy-studio-agent-stream,.ck-crowdy-studio-agent-approval,.ck-crowdy-studio-agent-diff,.ck-crowdy-studio-agent-checkpoint{padding:7px;border:1px solid var(--ck-line);border-radius:5px;background:var(--ck-panel)}\n.ck-crowdy-studio-agent-message[data-role=USER]{border-color:#155e75}\n.ck-crowdy-studio-agent-message p,.ck-crowdy-studio-agent-approval p,.ck-crowdy-studio-agent-diff p,.ck-crowdy-studio-agent-checkpoint p{margin:3px 0;white-space:pre-wrap;overflow-wrap:anywhere}\n.ck-crowdy-studio-agent-timeline{display:grid;gap:5px;margin:0;padding-left:22px;max-height:190px;overflow:auto}\n.ck-crowdy-studio-agent-timeline li{padding:4px;border-bottom:1px solid #243247}\n.ck-crowdy-studio-agent-timeline li>span{margin-left:6px;color:var(--ck-muted)}\n.ck-crowdy-studio-agent-approvals,.ck-crowdy-studio-agent-checkpoints{display:grid;gap:7px}\n.ck-crowdy-studio-agent-approval{border-color:#f59e0b}\n.ck-crowdy-studio-agent-approval code{display:block;overflow-wrap:anywhere;color:#fde68a}\n.ck-crowdy-studio-agent-approval>div{display:flex;gap:6px}\n.ck-crowdy-studio-agent-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}\n.ck-crowdy-studio-agent-composer textarea{min-height:62px;resize:vertical;background:#0f172a;color:var(--ck-text);border:1px solid var(--ck-line);padding:7px}\n.ck-crowdy-studio :focus-visible{outline:2px solid var(--ck-accent);outline-offset:2px}\n\n/* Narrow widths: side panes become overlays so the editor keeps priority. */\n@container(max-width:900px){.ck-crowdy-studio-settings{position:absolute;right:0;top:0;bottom:0;z-index:20;max-width:85%;border-left:1px solid var(--ck-line);box-shadow:-8px 0 24px rgba(2,6,23,.55)}.ck-crowdy-studio-splitter[data-orientation=vertical]{display:none}}\n@container(max-width:760px){.ck-crowdy-studio-agent-dock{position:absolute;right:0;top:0;bottom:0;z-index:22;max-width:92%;box-shadow:-8px 0 24px rgba(2,6,23,.55)}}\n@container(max-width:620px){.ck-crowdy-studio-explorer{position:absolute;left:34px;top:0;bottom:0;z-index:21;max-width:85%;border-right:1px solid var(--ck-line);box-shadow:8px 0 24px rgba(2,6,23,.55)}}\n";
|
|
1
|
+
export declare const CROWDY_STUDIO_STYLES = "\n.ck-crowdy-studio{--ck-bg:#111827;--ck-panel:#182235;--ck-line:#334155;--ck-text:#e5e7eb;--ck-muted:#94a3b8;--ck-accent:#38bdf8;container-type:inline-size;display:flex;flex-direction:column;position:relative;isolation:isolate;width:100%;height:100%;min-height:0;overflow:hidden;background:var(--ck-bg);color:var(--ck-text);font:13px/1.4 ui-sans-serif,system-ui,sans-serif;border:1px solid var(--ck-line)}\n.ck-crowdy-studio *{box-sizing:border-box}.ck-crowdy-studio button,.ck-crowdy-studio input,.ck-crowdy-studio select,.ck-crowdy-studio textarea{font:inherit}.ck-crowdy-studio button,.ck-crowdy-studio select,.ck-crowdy-studio input{background:#0f172a;color:var(--ck-text);border:1px solid var(--ck-line);border-radius:4px;padding:5px 8px}.ck-crowdy-studio button{cursor:pointer}.ck-crowdy-studio button:hover{border-color:var(--ck-accent)}.ck-crowdy-studio button:disabled{opacity:.5;cursor:not-allowed}\n.ck-crowdy-studio [hidden]{display:none!important}\n\n/* Top bar */\n.ck-crowdy-studio-toolbar{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 8px;border-bottom:1px solid var(--ck-line);position:relative;z-index:30}\n.ck-crowdy-studio-project-tools,.ck-crowdy-studio-runtime-tools{display:flex;align-items:center;gap:6px;min-width:0}\n.ck-crowdy-studio-primary{border-color:var(--ck-accent);color:#bae6fd}\n.ck-crowdy-studio-save{color:var(--ck-muted)}\n.ck-crowdy-studio-save[data-state=SAVED]{color:#86efac}.ck-crowdy-studio-save[data-state=SAVING]{color:#fde68a}.ck-crowdy-studio-save[data-state=CONFLICT]{color:#fca5a5;border-color:#f87171}.ck-crowdy-studio-save[data-state=OFFLINE]{color:#fdba74;border-color:#fb923c}\n.ck-crowdy-studio-save-message{margin:0;padding:4px 6px;color:var(--ck-muted);max-width:280px}\n.ck-crowdy-studio-save-actions{display:flex;gap:6px;padding:4px 6px}\n\n/* Menus */\n.ck-crowdy-studio-menu-wrap{position:relative;display:inline-flex;min-width:0}\n.ck-crowdy-studio-menu-button{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.ck-crowdy-studio-menu{position:absolute;top:calc(100% + 4px);left:0;z-index:40;min-width:180px;max-width:320px;max-height:60vh;overflow:auto;display:flex;flex-direction:column;background:var(--ck-panel);border:1px solid var(--ck-line);border-radius:6px;padding:4px;box-shadow:0 8px 24px rgba(2,6,23,.55)}\n.ck-crowdy-studio-runtime-tools .ck-crowdy-studio-menu{left:auto;right:0}\n.ck-crowdy-studio-menu-item{display:block;width:100%;text-align:left;background:transparent;border:0;border-radius:4px;padding:6px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n.ck-crowdy-studio-menu-item:hover{background:#0f172a;border:0}\n.ck-crowdy-studio-menu-item[data-active=true]{color:#bae6fd}\n.ck-crowdy-studio-menu-divider{border-top:1px solid var(--ck-line);margin:4px 2px}\n\n/* New-project popover */\n.ck-crowdy-studio-new{display:none;position:absolute;top:100%;left:8px;z-index:35;gap:6px;align-items:center;padding:8px;background:var(--ck-panel);border:1px solid var(--ck-line);border-radius:6px;box-shadow:0 8px 24px rgba(2,6,23,.55)}\n.ck-crowdy-studio-new[data-open=true]{display:flex}\n.ck-crowdy-studio-new input{flex:1;min-width:160px}\n\n/* Workspace: rail + panes + editor */\n.ck-crowdy-studio-workspace{display:flex;flex:1;min-height:0;min-width:0;position:relative}\n.ck-crowdy-studio-rail{display:flex;flex-direction:column;gap:4px;padding:6px 3px;border-right:1px solid var(--ck-line);background:#0b1220}\n.ck-crowdy-studio-rail-button{writing-mode:vertical-rl;padding:8px 4px;background:transparent;border:1px solid transparent;color:var(--ck-muted);border-radius:4px}\n.ck-crowdy-studio-rail-button:hover{color:var(--ck-text)}\n.ck-crowdy-studio-rail-button[aria-pressed=true]{color:#bae6fd;border-color:var(--ck-line);background:#0f172a}\n.ck-crowdy-studio-explorer,.ck-crowdy-studio-settings{flex:none;background:var(--ck-panel);overflow:auto;padding:8px;min-width:0}\n.ck-crowdy-studio-settings{border-left:1px solid var(--ck-line)}\n.ck-crowdy-studio-settings h3{margin:0 0 8px}\n.ck-crowdy-studio-github{margin-top:16px;padding-top:12px;border-top:1px solid var(--ck-line)}\n.ck-crowdy-studio-github-row{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}\n.ck-crowdy-studio-github-row input{flex:1;min-width:0}\n.ck-crowdy-studio-github-status,.ck-crowdy-studio-github-message{margin:4px 0;font-size:12px;opacity:.85}\n.ck-crowdy-studio-editor-column{display:flex;flex-direction:column;flex:1;min-width:240px;min-height:0}\n.ck-crowdy-studio-editor{flex:1;min-height:80px;position:relative}\n.ck-crowdy-studio-textarea{width:100%;height:100%;min-height:0;resize:none;background:#0b1020;color:var(--ck-text);border:0;padding:12px;font:13px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}\n.ck-crowdy-studio-editor-notice{padding:4px 8px;background:#78350f;color:#ffedd5}\n\n/* Splitters */\n.ck-crowdy-studio-splitter{flex:none;background:transparent;position:relative;z-index:5}\n.ck-crowdy-studio-splitter[data-orientation=vertical]{width:6px;cursor:col-resize}\n.ck-crowdy-studio-splitter[data-orientation=horizontal]{height:6px;cursor:row-resize}\n.ck-crowdy-studio-splitter:hover,.ck-crowdy-studio-splitter[data-dragging=true]{background:var(--ck-accent);opacity:.5}\n\n/* Explorer */\n.ck-crowdy-studio-section{margin-bottom:12px}\n.ck-crowdy-studio-section-header{display:flex;align-items:center;justify-content:space-between;color:var(--ck-muted);font-weight:700;text-transform:uppercase;font-size:11px;margin-bottom:4px}\n.ck-crowdy-studio-file{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px;align-items:center}\n.ck-crowdy-studio-file>button:first-child{text-align:left;overflow:hidden;text-overflow:ellipsis;border:0;background:transparent}\n.ck-crowdy-studio-file-action{padding:1px 6px}\n.ck-crowdy-studio-file .ck-crowdy-studio-menu{left:auto;right:0;min-width:130px}\n.ck-crowdy-studio-inline-form{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0;padding:6px;border:1px solid var(--ck-line);border-radius:4px;background:#0f172a}\n.ck-crowdy-studio-inline-form input{flex:1 1 100%;min-width:0}\n.ck-crowdy-studio-file-form-row{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin:4px 0;padding:6px;border:1px solid #f59e0b66;border-radius:4px}\n\n/* Editor tabs */\n.ck-crowdy-studio-tabs{display:flex;align-items:center;gap:6px;padding:4px;border-bottom:1px solid var(--ck-line);overflow:auto}\n.ck-crowdy-studio-tab{white-space:nowrap}\n.ck-crowdy-studio-tab[data-active=true],.ck-crowdy-studio-panel-tab[data-active=true]{border-color:var(--ck-accent);color:#bae6fd}\n.ck-crowdy-studio-tab span{margin-left:7px;color:var(--ck-muted)}\n\n/* Settings */\n.ck-crowdy-studio-settings label{display:grid;gap:3px;margin-bottom:9px;color:var(--ck-muted)}\n.ck-crowdy-studio-settings input,.ck-crowdy-studio-settings select{width:100%}\n\n/* Bottom panel */\n.ck-crowdy-studio-bottom{flex:none;display:flex;flex-direction:column;min-height:0;border-top:1px solid var(--ck-line)}\n.ck-crowdy-studio-panel-tabs{display:flex;align-items:center;gap:6px;padding:5px 7px;border-bottom:1px solid var(--ck-line)}\n.ck-crowdy-studio-panel-hide{margin-left:auto;padding:1px 7px;color:var(--ck-muted)}\n.ck-crowdy-studio-panel-body{flex:1;min-height:0;display:flex;flex-direction:column}\n.ck-crowdy-studio-panel{display:none;flex:1;overflow:auto;padding:8px}\n.ck-crowdy-studio-panel[data-active=true]{display:block}\n.ck-crowdy-studio-panel pre{white-space:pre-wrap;margin:0;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}\n.ck-crowdy-studio-problem{display:grid;grid-template-columns:auto auto 1fr;gap:8px;padding:3px;border-bottom:1px solid #243247;width:100%;text-align:left;background:transparent;border-left:0;border-right:0;border-top:0;border-radius:0}\n.ck-crowdy-studio-problem[data-source=rustc]{color:#fecaca}\n.ck-crowdy-studio-problem[data-source=local-advisory]{color:#fde68a}\n.ck-crowdy-studio-invoke{display:grid;grid-template-columns:180px 1fr auto;gap:6px}\n.ck-crowdy-studio-invoke textarea{min-height:70px;background:#0f172a;color:var(--ck-text);border:1px solid var(--ck-line)}\n.ck-crowdy-studio-empty{color:var(--ck-muted);padding:8px}\n\n/* Status bar */\n.ck-crowdy-studio-statusbar{display:flex;align-items:center;gap:14px;padding:3px 10px;border-top:1px solid var(--ck-line);background:#0b1220;font-size:12px;min-height:24px}\n.ck-crowdy-studio-status{color:var(--ck-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.ck-crowdy-studio-statusbar-runtime{background:transparent;border:0;padding:1px 4px;border-radius:3px}\n.ck-crowdy-studio-statusbar-runtime:hover{color:var(--ck-text)}\n.ck-crowdy-studio-statusbar-runtime[data-phase=RUNNING]{color:#86efac}\n.ck-crowdy-studio-statusbar-runtime[data-phase=COMPILING],.ck-crowdy-studio-statusbar-runtime[data-phase=TESTING_DRAFT],.ck-crowdy-studio-statusbar-runtime[data-phase=DEPLOYING_LIVE],.ck-crowdy-studio-statusbar-runtime[data-phase=ENABLING]{color:#fde68a}\n.ck-crowdy-studio-statusbar-runtime[data-phase=COMPILE_FAILED],.ck-crowdy-studio-statusbar-runtime[data-phase=ERROR],.ck-crowdy-studio-statusbar-runtime[data-phase=PARTIAL_FAILURE]{color:#fca5a5}\n\n/* Problems: Fix with AI */\n.ck-crowdy-studio-problem-row{display:flex;align-items:stretch;gap:4px}\n.ck-crowdy-studio-problem-row>.ck-crowdy-studio-problem{flex:1;min-width:0}\n.ck-crowdy-studio-problem-fix{flex:none;font-size:11px}\n\n/* Agent dock */\n.ck-crowdy-studio-agent-dock{flex:none;display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0;padding:10px;border-left:1px solid var(--ck-line);background:#0b1220;overflow:auto}\n.ck-crowdy-studio-agent-dock header{display:flex;align-items:center;justify-content:space-between;gap:8px}\n.ck-crowdy-studio-agent-dock h2,.ck-crowdy-studio-agent-dock h3{margin:0;font-size:13px}\n.ck-crowdy-studio-agent-status,.ck-crowdy-studio-agent-budget,.ck-crowdy-studio-agent-lease{color:var(--ck-muted);font-size:12px}\n.ck-crowdy-studio-agent-lease[data-active=true]{color:#fde68a;border:1px solid #f59e0b;border-radius:5px;padding:6px}\n.ck-crowdy-studio-agent-controls-row{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}\n.ck-crowdy-studio-agent-modes,.ck-crowdy-studio-agent-controls{display:flex;gap:5px;flex-wrap:wrap}\n.ck-crowdy-studio-agent-modes button[data-active=true]{border-color:var(--ck-accent);color:#bae6fd}\n.ck-crowdy-studio-agent-stop{border-color:#ef4444!important;color:#fecaca!important}\n.ck-crowdy-studio-agent-disclosure{border:1px solid var(--ck-line);border-radius:5px;padding:0}\n.ck-crowdy-studio-agent-disclosure>summary{cursor:pointer;padding:6px 8px;color:var(--ck-muted)}\n.ck-crowdy-studio-agent-disclosure[open]>summary{border-bottom:1px solid var(--ck-line);color:var(--ck-text)}\n.ck-crowdy-studio-agent-disclosure>:not(summary){padding:6px 8px}\n.ck-crowdy-studio-agent-lease-controls{display:flex;gap:6px;flex-wrap:wrap;margin:0;padding:7px;border:1px solid var(--ck-line)}\n.ck-crowdy-studio-agent-lease-controls legend{color:var(--ck-muted)}\n.ck-crowdy-studio-agent-lease-controls label{display:flex;gap:3px;align-items:center}\n.ck-crowdy-studio-agent-messages{display:flex;flex-direction:column;gap:6px;flex:1;min-height:120px;overflow:auto}\n.ck-crowdy-studio-agent-message,.ck-crowdy-studio-agent-stream,.ck-crowdy-studio-agent-approval,.ck-crowdy-studio-agent-diff,.ck-crowdy-studio-agent-checkpoint{padding:7px;border:1px solid var(--ck-line);border-radius:5px;background:var(--ck-panel)}\n.ck-crowdy-studio-agent-message[data-role=USER]{border-color:#155e75}\n.ck-crowdy-studio-agent-message p,.ck-crowdy-studio-agent-approval p,.ck-crowdy-studio-agent-diff p,.ck-crowdy-studio-agent-checkpoint p{margin:3px 0;white-space:pre-wrap;overflow-wrap:anywhere}\n.ck-crowdy-studio-agent-timeline{display:grid;gap:5px;margin:0;padding-left:22px;max-height:190px;overflow:auto}\n.ck-crowdy-studio-agent-timeline li{padding:4px;border-bottom:1px solid #243247}\n.ck-crowdy-studio-agent-timeline li>span{margin-left:6px;color:var(--ck-muted)}\n.ck-crowdy-studio-agent-approvals,.ck-crowdy-studio-agent-checkpoints{display:grid;gap:7px}\n.ck-crowdy-studio-agent-approval{border-color:#f59e0b}\n.ck-crowdy-studio-agent-approval code{display:block;overflow-wrap:anywhere;color:#fde68a}\n.ck-crowdy-studio-agent-approval>div{display:flex;gap:6px}\n.ck-crowdy-studio-agent-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}\n.ck-crowdy-studio-agent-composer textarea{min-height:62px;resize:vertical;background:#0f172a;color:var(--ck-text);border:1px solid var(--ck-line);padding:7px}\n.ck-crowdy-studio :focus-visible{outline:2px solid var(--ck-accent);outline-offset:2px}\n\n/* Narrow widths: side panes become overlays so the editor keeps priority. */\n@container(max-width:900px){.ck-crowdy-studio-settings{position:absolute;right:0;top:0;bottom:0;z-index:20;max-width:85%;border-left:1px solid var(--ck-line);box-shadow:-8px 0 24px rgba(2,6,23,.55)}.ck-crowdy-studio-splitter[data-orientation=vertical]{display:none}}\n@container(max-width:760px){.ck-crowdy-studio-agent-dock{position:absolute;right:0;top:0;bottom:0;z-index:22;max-width:92%;box-shadow:-8px 0 24px rgba(2,6,23,.55)}}\n@container(max-width:620px){.ck-crowdy-studio-explorer{position:absolute;left:34px;top:0;bottom:0;z-index:21;max-width:85%;border-right:1px solid var(--ck-line);box-shadow:8px 0 24px rgba(2,6,23,.55)}}\n";
|
|
2
2
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,4maA2IhC,CAAC"}
|
|
@@ -96,6 +96,11 @@ export const CROWDY_STUDIO_STYLES = `
|
|
|
96
96
|
.ck-crowdy-studio-statusbar-runtime[data-phase=COMPILING],.ck-crowdy-studio-statusbar-runtime[data-phase=TESTING_DRAFT],.ck-crowdy-studio-statusbar-runtime[data-phase=DEPLOYING_LIVE],.ck-crowdy-studio-statusbar-runtime[data-phase=ENABLING]{color:#fde68a}
|
|
97
97
|
.ck-crowdy-studio-statusbar-runtime[data-phase=COMPILE_FAILED],.ck-crowdy-studio-statusbar-runtime[data-phase=ERROR],.ck-crowdy-studio-statusbar-runtime[data-phase=PARTIAL_FAILURE]{color:#fca5a5}
|
|
98
98
|
|
|
99
|
+
/* Problems: Fix with AI */
|
|
100
|
+
.ck-crowdy-studio-problem-row{display:flex;align-items:stretch;gap:4px}
|
|
101
|
+
.ck-crowdy-studio-problem-row>.ck-crowdy-studio-problem{flex:1;min-width:0}
|
|
102
|
+
.ck-crowdy-studio-problem-fix{flex:none;font-size:11px}
|
|
103
|
+
|
|
99
104
|
/* Agent dock */
|
|
100
105
|
.ck-crowdy-studio-agent-dock{flex:none;display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0;padding:10px;border-left:1px solid var(--ck-line);background:#0b1220;overflow:auto}
|
|
101
106
|
.ck-crowdy-studio-agent-dock header{display:flex;align-items:center;justify-content:space-between;gap:8px}
|
package/dist/default-origin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
3
|
+
* `sync-client-origins.mjs --write --tier dev` writes this file, and
|
|
4
4
|
* `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
|
|
5
5
|
* host that declaration does not carry. Regenerate; never hand-edit.
|
|
6
6
|
*
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
* than no default at all. Every fallback this SDK ever removed named a host that
|
|
11
11
|
* was already dead. A generated file plus a gate is what makes this one different.
|
|
12
12
|
*
|
|
13
|
-
* Source: the operator's per-tier public CK API origin declaration, tier '
|
|
13
|
+
* Source: the operator's per-tier public CK API origin declaration, tier 'dev'
|
|
14
14
|
*/
|
|
15
15
|
/** The tier this build of the SDK is published for. */
|
|
16
|
-
export declare const CROWDY_DEFAULT_TIER = "
|
|
16
|
+
export declare const CROWDY_DEFAULT_TIER = "dev";
|
|
17
17
|
/** The public CK API origin for that tier. */
|
|
18
|
-
export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.
|
|
18
|
+
export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.dev.crowdedkingdoms.com";
|
|
19
19
|
/** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
|
|
20
|
-
export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.
|
|
20
|
+
export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.dev.crowdedkingdoms.com";
|
|
21
21
|
/** The bare hostname, for callers that need to compare rather than dial. */
|
|
22
|
-
export declare const CROWDY_DEFAULT_HOST = "ck.
|
|
22
|
+
export declare const CROWDY_DEFAULT_HOST = "ck.dev.crowdedkingdoms.com";
|
|
23
23
|
//# sourceMappingURL=default-origin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAE3E,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,+BAA+B,CAAC"}
|
package/dist/default-origin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
3
|
+
* `sync-client-origins.mjs --write --tier dev` writes this file, and
|
|
4
4
|
* `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
|
|
5
5
|
* host that declaration does not carry. Regenerate; never hand-edit.
|
|
6
6
|
*
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* than no default at all. Every fallback this SDK ever removed named a host that
|
|
11
11
|
* was already dead. A generated file plus a gate is what makes this one different.
|
|
12
12
|
*
|
|
13
|
-
* Source: the operator's per-tier public CK API origin declaration, tier '
|
|
13
|
+
* Source: the operator's per-tier public CK API origin declaration, tier 'dev'
|
|
14
14
|
*/
|
|
15
15
|
/** The tier this build of the SDK is published for. */
|
|
16
|
-
export const CROWDY_DEFAULT_TIER = '
|
|
16
|
+
export const CROWDY_DEFAULT_TIER = 'dev';
|
|
17
17
|
/** The public CK API origin for that tier. */
|
|
18
|
-
export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.
|
|
18
|
+
export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.dev.crowdedkingdoms.com';
|
|
19
19
|
/** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
|
|
20
|
-
export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.
|
|
20
|
+
export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.dev.crowdedkingdoms.com';
|
|
21
21
|
/** The bare hostname, for callers that need to compare rather than dial. */
|
|
22
|
-
export const CROWDY_DEFAULT_HOST = 'ck.
|
|
22
|
+
export const CROWDY_DEFAULT_HOST = 'ck.dev.crowdedkingdoms.com';
|