@punica/editor 1.0.5 → 1.0.7
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/index.bundle.esm.js +1 -1
- package/dist/index.bundle.esm.js.map +1 -1
- package/dist/index.bundle.umd.js +1 -1
- package/dist/index.bundle.umd.js.map +1 -1
- package/package.json +28 -3
- package/types/index.d.ts +120 -11
- package/types/punica.module.bootstrap.d.ts +45 -0
- package/types/punica.module.capability.d.ts +359 -0
- package/types/punica.module.extensions.api.d.ts +740 -0
- package/types/punica.module.extensions.settings.d.ts +106 -0
- package/types/punica.module.flow.agent.d.ts +75 -0
- package/types/punica.module.flow.api.d.ts +128 -0
- package/types/punica.module.flow.d.ts +490 -0
- package/types/punica.module.flow.engine.d.ts +228 -0
- package/types/punica.module.flow.mcp.d.ts +26 -0
- package/types/punica.module.flow.notebook.d.ts +210 -0
- package/types/punica.module.flow.primitives.d.ts +700 -0
- package/types/punica.module.flow.shell.d.ts +374 -0
- package/types/punica.module.kernel.ai.d.ts +462 -0
- package/types/punica.module.kernel.commands.d.ts +49 -0
- package/types/punica.module.kernel.events.d.ts +274 -0
- package/types/punica.module.kernel.history.d.ts +20 -0
- package/types/punica.module.kernel.llm.d.ts +343 -0
- package/types/punica.module.kernel.notifications.d.ts +64 -0
- package/types/punica.module.kernel.policy.d.ts +273 -0
- package/types/punica.module.kernel.tasks.d.ts +107 -0
- package/types/punica.module.kernel.timeServer.d.ts +16 -0
- package/types/punica.module.runtime.api.d.ts +214 -0
- package/types/punica.module.runtime.capabilities.d.ts +175 -0
- package/types/punica.module.runtime.compute.d.ts +339 -0
- package/types/punica.module.runtime.datasets.d.ts +234 -0
- package/types/punica.module.runtime.fs.d.ts +385 -0
- package/types/punica.module.runtime.harness.d.ts +246 -0
- package/types/punica.module.runtime.host.d.ts +272 -0
- package/types/punica.module.runtime.inference.d.ts +164 -0
- package/types/punica.module.runtime.lifecycle.d.ts +15 -0
- package/types/punica.module.runtime.llm.d.ts +470 -0
- package/types/punica.module.runtime.mcp.d.ts +139 -0
- package/types/punica.module.runtime.modelRuntimes.d.ts +90 -0
- package/types/punica.module.runtime.models.d.ts +254 -0
- package/types/punica.module.runtime.search.d.ts +59 -0
- package/types/punica.module.runtime.secrets.d.ts +26 -0
- package/types/punica.module.runtime.tasks.d.ts +27 -0
- package/types/punica.module.runtime.vcs.d.ts +67 -0
- package/types/punica.module.runtime.vectors.d.ts +74 -0
- package/types/punica.module.runtime.workspace.d.ts +134 -0
- package/types/punica.module.shell.activityBar.d.ts +42 -0
- package/types/punica.module.shell.components.d.ts +87 -0
- package/types/punica.module.shell.contentTabs.d.ts +33 -0
- package/types/punica.module.shell.dragDrop.d.ts +25 -0
- package/types/punica.module.shell.keyboardShortcuts.d.ts +38 -0
- package/types/punica.module.shell.layout.d.ts +106 -0
- package/types/punica.module.shell.markdown.d.ts +36 -0
- package/types/punica.module.shell.panelTabs.d.ts +48 -0
- package/types/punica.module.shell.profile.d.ts +278 -0
- package/types/punica.module.shell.statusbar.d.ts +26 -0
- package/types/punica.module.shell.view.d.ts +455 -0
- package/types/punica.module.shell.views.d.ts +150 -0
- package/types/punica.module.test.d.ts +562 -0
- package/types/punica.module.activityBar.d.ts +0 -21
- package/types/punica.module.commands.d.ts +0 -21
- package/types/punica.module.dragDrop.d.ts +0 -23
- package/types/punica.module.extensions.d.ts +0 -157
- package/types/punica.module.history.d.ts +0 -18
- package/types/punica.module.keyboardShortcuts.d.ts +0 -29
- package/types/punica.module.layout.d.ts +0 -23
- package/types/punica.module.statusbar.d.ts +0 -21
- package/types/punica.module.timeServer.d.ts +0 -14
- package/types/punica.module.view.d.ts +0 -8
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare module 'punica' {
|
|
2
|
+
/**
|
|
3
|
+
* IvyNode → MCP server integration metadata (flow-node manifest extension).
|
|
4
|
+
*
|
|
5
|
+
* This interface describes how a flow node declares that it talks to an
|
|
6
|
+
* MCP server. It lives in `ivy.node.json` manifests as
|
|
7
|
+
* `manifest.mcpMetadata` and is used by the flow engine to wire up
|
|
8
|
+
* node execution against an MCP tool endpoint.
|
|
9
|
+
*
|
|
10
|
+
* **Not** the MCP runtime client API — for that see
|
|
11
|
+
* `punica.module.runtime.mcp.d.ts` (`runtime.mcp.McpApi`).
|
|
12
|
+
*/
|
|
13
|
+
export interface IvyMcpMetadata {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
/** MCP method / route name. */
|
|
18
|
+
method?: string;
|
|
19
|
+
/** HTTP or protocol-level information if relevant. */
|
|
20
|
+
endpoint?: string;
|
|
21
|
+
/** Optional schema or contract representation. */
|
|
22
|
+
schema?: JSONObject;
|
|
23
|
+
/** Additional configuration for the MCP integration. */
|
|
24
|
+
config?: JSONObject;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
declare module 'punica' {
|
|
2
|
+
/**
|
|
3
|
+
* Base JSON / Notebook types
|
|
4
|
+
* These are adapted from the IPython notebook (nbformat 4.x) specification
|
|
5
|
+
* and extended with Ivy-specific metadata.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type JSONPrimitive = string | number | boolean | null;
|
|
9
|
+
|
|
10
|
+
export type JSONValue =
|
|
11
|
+
| JSONPrimitive
|
|
12
|
+
| JSONValue[]
|
|
13
|
+
| { [key: string]: JSONValue };
|
|
14
|
+
|
|
15
|
+
export interface JSONObject {
|
|
16
|
+
[key: string]: JSONValue;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type CellType = 'code' | 'markdown' | 'raw';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Canonical multiline representation used in nbformat.
|
|
23
|
+
*/
|
|
24
|
+
export type MultilineString = string | string[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Rich output mime bundle.
|
|
28
|
+
*/
|
|
29
|
+
export type MimeBundle = Record<string, JSONValue>;
|
|
30
|
+
|
|
31
|
+
export type Attachments = Record<string, MimeBundle>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Cell-level metadata extended with Ivy namespaces.
|
|
35
|
+
* Cells can have their own ivy.node metadata (for individual cell capabilities).
|
|
36
|
+
*
|
|
37
|
+
* Note:
|
|
38
|
+
* - We intentionally do NOT extend JSONObject here, because `ivy.node` is a
|
|
39
|
+
* rich TypeScript object (`IvyNodeMetadata`) rather than a strict JSONValue.
|
|
40
|
+
* - The index signature still enforces JSONValue for arbitrary metadata keys,
|
|
41
|
+
* but well-known fields like `ivy` are allowed to be richer objects.
|
|
42
|
+
*/
|
|
43
|
+
export interface CellMetadata {
|
|
44
|
+
/**
|
|
45
|
+
* Ivy-specific metadata for this cell.
|
|
46
|
+
* When present, this cell represents an Ivy node with capability definition.
|
|
47
|
+
*/
|
|
48
|
+
ivy?: {
|
|
49
|
+
/**
|
|
50
|
+
* Ivy node metadata for this cell.
|
|
51
|
+
* Defines the capability this cell represents.
|
|
52
|
+
*/
|
|
53
|
+
node?: IvyNodeMetadata;
|
|
54
|
+
/**
|
|
55
|
+
* Cell role for IvyNode v0.1 execution model.
|
|
56
|
+
* - 'input': First cell that receives input data (runner injects __ivy_input__)
|
|
57
|
+
* - 'compute': Intermediate cells that perform computation
|
|
58
|
+
* - 'output': Last cell that produces output (runner reads __ivy_output__)
|
|
59
|
+
*/
|
|
60
|
+
cell?: {
|
|
61
|
+
role?: 'input' | 'compute' | 'output';
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Allow additional Ivy sub-namespaces or view data.
|
|
65
|
+
* We use `unknown` here to avoid over-constraining richer objects.
|
|
66
|
+
*/
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Workflow-related metadata (for workflow serialization).
|
|
71
|
+
*/
|
|
72
|
+
workflowNodeId?: string;
|
|
73
|
+
workflowNodeType?: string;
|
|
74
|
+
label?: string;
|
|
75
|
+
disabled?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Additional arbitrary metadata fields.
|
|
78
|
+
* Typed as unknown to allow richer, non-JSONValue objects when needed.
|
|
79
|
+
*/
|
|
80
|
+
[key: string]: unknown;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Base cell for all notebook cell types.
|
|
85
|
+
*/
|
|
86
|
+
export interface BaseCell {
|
|
87
|
+
id: string;
|
|
88
|
+
cell_type: CellType;
|
|
89
|
+
metadata: CellMetadata;
|
|
90
|
+
source: MultilineString;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface MarkdownCell extends BaseCell {
|
|
94
|
+
cell_type: 'markdown';
|
|
95
|
+
attachments?: Attachments;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface RawCell extends BaseCell {
|
|
99
|
+
cell_type: 'raw';
|
|
100
|
+
attachments?: Attachments;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface CodeCell extends BaseCell {
|
|
104
|
+
cell_type: 'code';
|
|
105
|
+
execution_count: number | null;
|
|
106
|
+
outputs: Output[];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type NotebookCell = CodeCell | MarkdownCell | RawCell;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Standard nbformat outputs extended with Ivy-specific fields.
|
|
113
|
+
*/
|
|
114
|
+
export interface BaseOutput {
|
|
115
|
+
metadata?: JSONObject;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface StreamOutput extends BaseOutput {
|
|
119
|
+
output_type: 'stream';
|
|
120
|
+
name: 'stdout' | 'stderr';
|
|
121
|
+
text: MultilineString;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface DisplayDataOutput extends BaseOutput {
|
|
125
|
+
output_type: 'display_data';
|
|
126
|
+
data: MimeBundle;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface ExecuteResultOutput extends BaseOutput {
|
|
130
|
+
output_type: 'execute_result';
|
|
131
|
+
data: MimeBundle;
|
|
132
|
+
execution_count: number;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface ErrorOutput extends BaseOutput {
|
|
136
|
+
output_type: 'error';
|
|
137
|
+
ename: string;
|
|
138
|
+
evalue: string;
|
|
139
|
+
traceback: string[];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Extended / generic output shape that allows Ivy runtimes
|
|
144
|
+
* to attach richer execution state.
|
|
145
|
+
*/
|
|
146
|
+
export interface ExtendedOutput extends BaseOutput {
|
|
147
|
+
output_type: string;
|
|
148
|
+
status?: 'ok' | 'error';
|
|
149
|
+
comm_id?: string;
|
|
150
|
+
method?: string;
|
|
151
|
+
execution_state?: string;
|
|
152
|
+
name?: string;
|
|
153
|
+
text?: MultilineString;
|
|
154
|
+
value?: JSONValue;
|
|
155
|
+
title?: string;
|
|
156
|
+
isDone?: boolean;
|
|
157
|
+
// Allow Ivy-specific fields without losing type safety.
|
|
158
|
+
[key: string]: JSONValue | undefined;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type Output =
|
|
162
|
+
| StreamOutput
|
|
163
|
+
| DisplayDataOutput
|
|
164
|
+
| ExecuteResultOutput
|
|
165
|
+
| ErrorOutput
|
|
166
|
+
| ExtendedOutput;
|
|
167
|
+
|
|
168
|
+
export interface Kernelspec {
|
|
169
|
+
name: string;
|
|
170
|
+
display_name?: string;
|
|
171
|
+
language?: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface LanguageInfo {
|
|
175
|
+
name: string;
|
|
176
|
+
version?: string;
|
|
177
|
+
file_extension?: string;
|
|
178
|
+
mimetype?: string;
|
|
179
|
+
nbconvert_exporter?: string;
|
|
180
|
+
pygments_lexer?: string;
|
|
181
|
+
codemirror_mode?: string | { name: string; version?: number };
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Notebook-level metadata extended with Ivy namespaces.
|
|
186
|
+
*/
|
|
187
|
+
export interface NotebookMetadata extends JSONObject {
|
|
188
|
+
kernelspec?: Kernelspec;
|
|
189
|
+
language_info?: LanguageInfo;
|
|
190
|
+
ivy?: {
|
|
191
|
+
node?: IvyNodeMetadata;
|
|
192
|
+
flow?: IvyFlowMetadata;
|
|
193
|
+
agent?: IvyAgentMetadata;
|
|
194
|
+
mcp?: IvyMcpMetadata;
|
|
195
|
+
view?: IvyViewMetadata;
|
|
196
|
+
[key: string]: JSONValue | undefined;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Canonical Ivy notebook representation.
|
|
202
|
+
* This is nbformat 4.x plus Ivy-specific metadata under metadata.ivy.
|
|
203
|
+
*/
|
|
204
|
+
export interface IPythonNotebook {
|
|
205
|
+
cells: NotebookCell[];
|
|
206
|
+
metadata: NotebookMetadata;
|
|
207
|
+
nbformat: 4;
|
|
208
|
+
nbformat_minor: number;
|
|
209
|
+
}
|
|
210
|
+
}
|