@ai-workbench/connect 0.0.0-stage → 0.7.5
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/NOTICE.md +18 -0
- package/README.md +24 -2
- package/client/index.cjs +123 -0
- package/cordis.patch.yml +3 -0
- package/helper/auth-status.cjs +18 -0
- package/helper/claude-callback.cjs +29 -0
- package/helper/main.cjs +19 -0
- package/helper/projects.cjs +57 -0
- package/helper/remote-command.cjs +15 -0
- package/helper/remote-login.cjs +25 -0
- package/helper/window.cjs +52 -0
- package/lib/api.d.ts +196 -0
- package/lib/api.js +1 -0
- package/lib/archive.d.ts +1 -0
- package/lib/archive.js +63 -0
- package/lib/auth-status.d.ts +3 -0
- package/lib/auth-status.js +18 -0
- package/lib/cache.d.ts +21 -0
- package/lib/cache.js +156 -0
- package/lib/component-download.d.ts +25 -0
- package/lib/component-download.js +73 -0
- package/lib/components.d.ts +9 -0
- package/lib/components.js +121 -0
- package/lib/connect.d.ts +10 -0
- package/lib/connect.js +246 -0
- package/lib/cordis.d.ts +15 -0
- package/lib/cordis.js +1 -0
- package/lib/defaults.d.ts +29 -0
- package/lib/defaults.js +4 -0
- package/lib/electron.d.ts +8 -0
- package/lib/electron.js +83 -0
- package/lib/enrollment.d.ts +3 -0
- package/lib/enrollment.js +78 -0
- package/lib/index.d.ts +40 -0
- package/lib/index.js +48 -0
- package/lib/integration.d.ts +5 -0
- package/lib/integration.js +47 -0
- package/lib/login.d.ts +35 -0
- package/lib/login.js +81 -0
- package/lib/native-import-picker.d.ts +11 -0
- package/lib/native-import-picker.js +49 -0
- package/lib/needs.d.ts +9 -0
- package/lib/needs.js +52 -0
- package/lib/network.d.ts +26 -0
- package/lib/network.js +226 -0
- package/lib/physical-fs.d.ts +3 -0
- package/lib/physical-fs.js +7 -0
- package/lib/ports.d.ts +43 -0
- package/lib/ports.js +1 -0
- package/lib/private-files.d.ts +3 -0
- package/lib/private-files.js +41 -0
- package/lib/processes.d.ts +5 -0
- package/lib/processes.js +147 -0
- package/lib/profile-activation.d.ts +32 -0
- package/lib/profile-activation.js +118 -0
- package/lib/profile-enrollment.d.ts +21 -0
- package/lib/profile-enrollment.js +275 -0
- package/lib/profile-runtime.d.ts +6 -0
- package/lib/profile-runtime.js +47 -0
- package/lib/profile-settings.d.ts +2 -0
- package/lib/profile-settings.js +10 -0
- package/lib/projects.d.ts +4 -0
- package/lib/projects.js +41 -0
- package/lib/provider.d.ts +73 -0
- package/lib/provider.js +39 -0
- package/lib/remote-login.d.ts +2 -0
- package/lib/remote-login.js +9 -0
- package/lib/ssh.d.ts +10 -0
- package/lib/ssh.js +78 -0
- package/lib/startup.d.ts +18 -0
- package/lib/startup.js +211 -0
- package/lib/workspace-bindings.d.ts +32 -0
- package/lib/workspace-bindings.js +328 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/node_modules/argparse/LICENSE +254 -0
- package/node_modules/argparse/README.md +84 -0
- package/node_modules/argparse/argparse.js +3707 -0
- package/node_modules/argparse/lib/sub.js +67 -0
- package/node_modules/argparse/lib/textwrap.js +440 -0
- package/node_modules/argparse/package.json +31 -0
- package/node_modules/js-yaml/LICENSE +21 -0
- package/node_modules/js-yaml/README.md +233 -0
- package/node_modules/js-yaml/bin/js-yaml.js +117 -0
- package/node_modules/js-yaml/dist/js-yaml.js +3022 -0
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js +2 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs +3082 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -0
- package/node_modules/js-yaml/index.js +44 -0
- package/node_modules/js-yaml/lib/common.js +50 -0
- package/node_modules/js-yaml/lib/dumper.js +937 -0
- package/node_modules/js-yaml/lib/exception.js +51 -0
- package/node_modules/js-yaml/lib/index_vite_proxy.tmp.mjs +37 -0
- package/node_modules/js-yaml/lib/loader.js +1803 -0
- package/node_modules/js-yaml/lib/schema/core.js +9 -0
- package/node_modules/js-yaml/lib/schema/default.js +20 -0
- package/node_modules/js-yaml/lib/schema/failsafe.js +14 -0
- package/node_modules/js-yaml/lib/schema/json.js +17 -0
- package/node_modules/js-yaml/lib/schema.js +109 -0
- package/node_modules/js-yaml/lib/snippet.js +96 -0
- package/node_modules/js-yaml/lib/type/binary.js +122 -0
- package/node_modules/js-yaml/lib/type/bool.js +35 -0
- package/node_modules/js-yaml/lib/type/float.js +99 -0
- package/node_modules/js-yaml/lib/type/int.js +142 -0
- package/node_modules/js-yaml/lib/type/map.js +8 -0
- package/node_modules/js-yaml/lib/type/merge.js +12 -0
- package/node_modules/js-yaml/lib/type/null.js +35 -0
- package/node_modules/js-yaml/lib/type/omap.js +45 -0
- package/node_modules/js-yaml/lib/type/pairs.js +50 -0
- package/node_modules/js-yaml/lib/type/seq.js +8 -0
- package/node_modules/js-yaml/lib/type/set.js +29 -0
- package/node_modules/js-yaml/lib/type/str.js +8 -0
- package/node_modules/js-yaml/lib/type/timestamp.js +88 -0
- package/node_modules/js-yaml/lib/type.js +66 -0
- package/node_modules/js-yaml/package.json +83 -0
- package/node_modules/pend/LICENSE +23 -0
- package/node_modules/pend/README.md +41 -0
- package/node_modules/pend/index.js +55 -0
- package/node_modules/pend/package.json +18 -0
- package/node_modules/pend/test.js +137 -0
- package/node_modules/yauzl/LICENSE +21 -0
- package/node_modules/yauzl/README.md +1015 -0
- package/node_modules/yauzl/crc32.js +45 -0
- package/node_modules/yauzl/fd-slicer.js +188 -0
- package/node_modules/yauzl/index.js +1096 -0
- package/node_modules/yauzl/package.json +40 -0
- package/package.json +89 -4
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { lstat, realpath, open, rename, rm } from 'node:fs/promises';
|
|
2
|
+
import { join, isAbsolute, basename } from 'node:path';
|
|
3
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
4
|
+
import { privateDirectory, readPrivate } from "./private-files.js";
|
|
5
|
+
import { isProjectName } from "./projects.js";
|
|
6
|
+
import { ok, fail, NeedError, need } from "./needs.js";
|
|
7
|
+
// All bindings belonging to one profile share reservation ordering, including reopened service instances.
|
|
8
|
+
const queues = new Map();
|
|
9
|
+
const hash = (v) => createHash('sha256').update(JSON.stringify(v)).digest('hex');
|
|
10
|
+
const token = (v) => typeof v === 'string' && v.length > 0 && !/[\x00-\x1f\x7f]/.test(v);
|
|
11
|
+
const integrity = (r) => hash([r.identity, r.workspaceId, r.localPath, r.localDev, r.localIno, r.project, r.bindingId, r.noticeId, r.sessionIds]);
|
|
12
|
+
export function createWorkspaceBindings(options) {
|
|
13
|
+
const root = join(options.profileDir, 'ai-workbench-connect'), file = join(root, 'workspaces.json'), owner = randomUUID();
|
|
14
|
+
let revision = 0, disposed = false, tail = Promise.resolve(), snapshot = { instanceId: options.api.getConnectionState().instanceId, revision: 0, items: [] };
|
|
15
|
+
let latest = [];
|
|
16
|
+
const listeners = new Set(), statuses = new Map();
|
|
17
|
+
const same = (a) => { const b = options.api.getConnectionState(); return !disposed && b.phase === 'connected' && b.instanceId === a.instanceId && b.epoch === a.epoch; };
|
|
18
|
+
const stale = () => fail(disposed ? 'DISPOSED' : 'CONNECTION_LOST');
|
|
19
|
+
const diagnostic = (error) => options.diagnostic?.(error);
|
|
20
|
+
function publish(items) {
|
|
21
|
+
if (disposed)
|
|
22
|
+
return;
|
|
23
|
+
latest = items;
|
|
24
|
+
snapshot = { instanceId: options.api.getConnectionState().instanceId, revision: (revision = options.nextRevision?.() ?? revision + 1), items: items.map(r => ({ bindingId: r.bindingId, workspaceId: r.workspaceId, workspaceName: r.project.name, status: statuses.get(r.bindingId) ?? (r.phase === 'intent' ? 'pending' : 'unavailable'), notice: { noticeId: r.noticeId, settings: r.settings, provider: r.provider === 'claimed' && r.claim?.owner !== owner ? 'unknown' : r.provider } })) };
|
|
25
|
+
options.onState?.(structuredClone(snapshot));
|
|
26
|
+
for (const listener of listeners)
|
|
27
|
+
listener(structuredClone(snapshot));
|
|
28
|
+
}
|
|
29
|
+
async function prepare() {
|
|
30
|
+
if (!isAbsolute(options.profileDir) || await realpath(options.profileDir) !== options.profileDir)
|
|
31
|
+
throw Error('PROFILE_PATH_INVALID');
|
|
32
|
+
await privateDirectory(root);
|
|
33
|
+
if (await realpath(root) !== root)
|
|
34
|
+
throw Error('BINDING_PATH_INVALID');
|
|
35
|
+
}
|
|
36
|
+
async function records() {
|
|
37
|
+
let raw;
|
|
38
|
+
try {
|
|
39
|
+
raw = await readPrivate(file, options.metadataMaxBytes);
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
if (error.code === 'ENOENT')
|
|
43
|
+
return [];
|
|
44
|
+
throw error;
|
|
45
|
+
}
|
|
46
|
+
const value = JSON.parse(raw);
|
|
47
|
+
if (value.schemaVersion !== 2 || !Array.isArray(value.items))
|
|
48
|
+
throw Error('BINDING_INVALID');
|
|
49
|
+
const ids = new Set(), paths = new Set(), notices = new Set(), bindings = new Set(), sessions = new Set();
|
|
50
|
+
for (const r of value.items) {
|
|
51
|
+
if (!r || !token(r.bindingId) || !token(r.noticeId) || !token(r.workspaceId) || !(/^[a-f0-9]{64}$/.test(r.identity)) || !isAbsolute(r.localPath) || !Number.isSafeInteger(r.localDev) || !Number.isSafeInteger(r.localIno) || !isProjectName(r.project?.name) || typeof r.project.path !== 'string' || r.key !== integrity(r) || !['intent', 'bound'].includes(r.phase) || !['pending', 'displayed'].includes(r.settings) || !['pending', 'claimed', 'delivered', 'unknown'].includes(r.provider) || ids.has(r.workspaceId) || paths.has(r.identity + '\0' + r.project.path) || notices.has(r.noticeId) || bindings.has(r.bindingId) || !Array.isArray(r.sessionIds) || r.sessionIds.some(id => !token(id) || sessions.has(id)) || new Set(r.sessionIds).size !== r.sessionIds.length)
|
|
52
|
+
throw Error('BINDING_INVALID');
|
|
53
|
+
if (r.provider === 'pending' ? r.claim !== undefined : (!r.claim || !token(r.claim.id) || !token(r.claim.sessionId) || !['claude', 'codex'].includes(r.claim.provider) || !token(r.claim.owner) || (r.provider === 'delivered' && !token(r.claim.deliveryId))))
|
|
54
|
+
throw Error('BINDING_CLAIM_INVALID');
|
|
55
|
+
ids.add(r.workspaceId);
|
|
56
|
+
paths.add(r.identity + '\0' + r.project.path);
|
|
57
|
+
notices.add(r.noticeId);
|
|
58
|
+
bindings.add(r.bindingId);
|
|
59
|
+
for (const id of r.sessionIds)
|
|
60
|
+
sessions.add(id);
|
|
61
|
+
}
|
|
62
|
+
return value.items;
|
|
63
|
+
}
|
|
64
|
+
async function save(items) {
|
|
65
|
+
for (const r of items)
|
|
66
|
+
r.key = integrity(r);
|
|
67
|
+
const bytes = JSON.stringify({ schemaVersion: 2, items }) + '\n';
|
|
68
|
+
if (Buffer.byteLength(bytes) > options.metadataMaxBytes)
|
|
69
|
+
throw Error('BINDING_LIMIT');
|
|
70
|
+
const temp = join(root, '.workspaces-' + randomUUID());
|
|
71
|
+
try {
|
|
72
|
+
const h = await open(temp, 'wx', 0o600);
|
|
73
|
+
try {
|
|
74
|
+
await h.writeFile(bytes);
|
|
75
|
+
await h.sync();
|
|
76
|
+
}
|
|
77
|
+
finally {
|
|
78
|
+
await h.close();
|
|
79
|
+
}
|
|
80
|
+
await rename(temp, file);
|
|
81
|
+
const dir = await open(root, 'r');
|
|
82
|
+
try {
|
|
83
|
+
await dir.sync();
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
await dir.close();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
await rm(temp, { force: true });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function serialized(run) {
|
|
94
|
+
const prior = queues.get(file) ?? Promise.resolve();
|
|
95
|
+
const promise = prior.then(() => disposed ? fail('DISPOSED') : run());
|
|
96
|
+
const settled = promise.then(() => { }, () => { });
|
|
97
|
+
queues.set(file, settled);
|
|
98
|
+
tail = settled;
|
|
99
|
+
void settled.then(() => { if (queues.get(file) === settled)
|
|
100
|
+
queues.delete(file); });
|
|
101
|
+
return promise;
|
|
102
|
+
}
|
|
103
|
+
async function native(sessionId) {
|
|
104
|
+
const matches = options.registry.list().filter(w => Array.isArray(w.sessionIds) && w.sessionIds.includes(sessionId));
|
|
105
|
+
if (matches.length !== 1)
|
|
106
|
+
throw new NeedError(need('PROJECT_BINDING_REQUIRED'));
|
|
107
|
+
const workspace = matches[0], registered = options.registry.get(workspace.id), header = await options.readHeader(sessionId);
|
|
108
|
+
if (!registered || registered.path !== workspace.path || !registered.sessionIds.includes(sessionId) || !isAbsolute(workspace.path) || !header || header.id !== sessionId || !header.cwd || !isAbsolute(header.cwd))
|
|
109
|
+
throw new NeedError(need('PROJECT_BINDING_REQUIRED'));
|
|
110
|
+
const localPath = await realpath(workspace.path), cwd = await realpath(header.cwd), info = await lstat(localPath);
|
|
111
|
+
if (localPath !== cwd || !info.isDirectory() || info.isSymbolicLink())
|
|
112
|
+
throw new NeedError(need('PROJECT_BINDING_REQUIRED'));
|
|
113
|
+
return { workspaceId: workspace.id, localPath, localDev: info.dev, localIno: info.ino, name: basename(localPath) };
|
|
114
|
+
}
|
|
115
|
+
const sameNative = (a, b) => a.workspaceId === b.workspaceId && a.localPath === b.localPath && a.localDev === b.localDev && a.localIno === b.localIno;
|
|
116
|
+
function validList(list, projectRoot) { return Array.isArray(list.projects) && Array.isArray(list.unavailable) && list.projects.every(p => isProjectName(p.name) && p.path === projectRoot + '/' + p.name) && new Set(list.projects.map(p => p.path)).size === list.projects.length; }
|
|
117
|
+
function occupancy(list, name) {
|
|
118
|
+
const aliases = (n) => n.normalize('NFC').toLowerCase() === name.normalize('NFC').toLowerCase();
|
|
119
|
+
return list.unavailable.some(p => aliases(p.name)) || list.projects.some(p => p.name !== name && aliases(p.name));
|
|
120
|
+
}
|
|
121
|
+
async function resolve(sessionId, use) {
|
|
122
|
+
if (!token(sessionId) || !use || !['claude', 'codex'].includes(use.provider) || use.purpose !== 'user-turn')
|
|
123
|
+
return fail('PROJECT_BINDING_REQUIRED');
|
|
124
|
+
let stored, binding;
|
|
125
|
+
try {
|
|
126
|
+
await prepare();
|
|
127
|
+
stored = await records();
|
|
128
|
+
const before = options.api.getConnectionState();
|
|
129
|
+
const ready = await options.api.ensureReady(use.provider);
|
|
130
|
+
if (!same(before))
|
|
131
|
+
return stale();
|
|
132
|
+
if (!ready.ok)
|
|
133
|
+
return ready;
|
|
134
|
+
const targetResult = await options.api.getSshTarget();
|
|
135
|
+
if (!same(before))
|
|
136
|
+
return stale();
|
|
137
|
+
if (!targetResult.ok)
|
|
138
|
+
return targetResult;
|
|
139
|
+
const target = targetResult.value;
|
|
140
|
+
if (JSON.stringify(target) !== JSON.stringify(ready.value))
|
|
141
|
+
return fail('CONNECTION_LOST');
|
|
142
|
+
const trust = await readPrivate(target.knownHostsFile, options.metadataMaxBytes), identity = hash([target.host, target.username, target.port, target.projectRoot, target.session, trust]);
|
|
143
|
+
binding = stored.find(r => r.sessionIds.includes(sessionId));
|
|
144
|
+
let current;
|
|
145
|
+
try {
|
|
146
|
+
current = await native(sessionId);
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
if (stored.some(r => r.sessionIds.includes(sessionId) || options.registry.get(r.workspaceId)?.sessionIds.includes(sessionId))) {
|
|
150
|
+
diagnostic(error);
|
|
151
|
+
throw new NeedError(need('PROJECT_BINDING_INVALID'));
|
|
152
|
+
}
|
|
153
|
+
throw error;
|
|
154
|
+
}
|
|
155
|
+
if (!isProjectName(current.name))
|
|
156
|
+
return fail('PROJECT_NAME_INVALID');
|
|
157
|
+
const localBinding = stored.find(r => r.workspaceId === current.workspaceId || r.localPath === current.localPath);
|
|
158
|
+
if (binding && binding !== localBinding)
|
|
159
|
+
throw new NeedError(need('PROJECT_BINDING_INVALID'));
|
|
160
|
+
binding = localBinding;
|
|
161
|
+
if (binding && (binding.identity !== identity || binding.workspaceId !== current.workspaceId || binding.localPath !== current.localPath || binding.localDev !== current.localDev || binding.localIno !== current.localIno || binding.project.name !== current.name || binding.project.path !== target.projectRoot + '/' + current.name))
|
|
162
|
+
throw new NeedError(need('PROJECT_BINDING_INVALID'));
|
|
163
|
+
const remotePath = target.projectRoot + '/' + current.name, collision = stored.find(r => r !== binding && r.identity === identity && r.project.path === remotePath);
|
|
164
|
+
if (collision) {
|
|
165
|
+
const result = fail(collision.phase === 'intent' ? 'PROJECT_BINDING_BUSY' : 'PROJECT_EXISTS');
|
|
166
|
+
if (!result.ok)
|
|
167
|
+
result.error.message = `远程主机上的‘${current.name}’已被另一工作区使用/正在关联,请选择名称不同的本地文件夹或联系管理员`;
|
|
168
|
+
return result;
|
|
169
|
+
}
|
|
170
|
+
const listed = await options.api.listProjects();
|
|
171
|
+
if (!same(before))
|
|
172
|
+
return stale();
|
|
173
|
+
if (!listed.ok)
|
|
174
|
+
return listed;
|
|
175
|
+
if (!validList(listed.value, target.projectRoot))
|
|
176
|
+
return fail('PROJECT_PROTOCOL_INVALID');
|
|
177
|
+
let project = listed.value.projects.find(p => p.name === current.name && p.path === remotePath);
|
|
178
|
+
if (binding?.phase === 'bound' && !project)
|
|
179
|
+
throw new NeedError(need('PROJECT_BINDING_INVALID'));
|
|
180
|
+
if (occupancy(listed.value, current.name))
|
|
181
|
+
return fail(binding?.phase === 'intent' ? 'PROJECT_CREATE_UNKNOWN' : 'PROJECT_EXISTS');
|
|
182
|
+
if (!binding) {
|
|
183
|
+
binding = { key: '', identity, workspaceId: current.workspaceId, localPath: current.localPath, localDev: current.localDev, localIno: current.localIno, project: { name: current.name, path: remotePath }, bindingId: randomUUID(), noticeId: randomUUID(), sessionIds: [sessionId], phase: project ? 'bound' : 'intent', settings: 'pending', provider: 'pending' };
|
|
184
|
+
stored.push(binding);
|
|
185
|
+
await save(stored);
|
|
186
|
+
if (!same(before))
|
|
187
|
+
return stale();
|
|
188
|
+
if (!project) {
|
|
189
|
+
if (!sameNative(current, await native(sessionId)))
|
|
190
|
+
throw new NeedError(need('PROJECT_BINDING_INVALID'));
|
|
191
|
+
if (!same(before))
|
|
192
|
+
return stale();
|
|
193
|
+
let created;
|
|
194
|
+
try {
|
|
195
|
+
created = await options.api.createProject(current.name);
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
diagnostic(error);
|
|
199
|
+
publish(stored);
|
|
200
|
+
return fail('PROJECT_CREATE_UNKNOWN');
|
|
201
|
+
}
|
|
202
|
+
if (!same(before))
|
|
203
|
+
return stale();
|
|
204
|
+
if (!created.ok) {
|
|
205
|
+
publish(stored);
|
|
206
|
+
return created;
|
|
207
|
+
}
|
|
208
|
+
if (created.value.name !== current.name || created.value.path !== remotePath)
|
|
209
|
+
return fail('PROJECT_PROTOCOL_INVALID');
|
|
210
|
+
const verified = await options.api.listProjects();
|
|
211
|
+
if (!same(before))
|
|
212
|
+
return stale();
|
|
213
|
+
if (!verified.ok || !validList(verified.value, target.projectRoot) || occupancy(verified.value, current.name))
|
|
214
|
+
return fail('PROJECT_CREATE_UNKNOWN');
|
|
215
|
+
project = verified.value.projects.find(p => p.name === current.name && p.path === remotePath);
|
|
216
|
+
if (!project)
|
|
217
|
+
return fail('PROJECT_CREATE_UNKNOWN');
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
else if (!project) {
|
|
221
|
+
publish(stored);
|
|
222
|
+
return fail('PROJECT_CREATE_UNKNOWN');
|
|
223
|
+
}
|
|
224
|
+
if (!sameNative(current, await native(sessionId)))
|
|
225
|
+
throw new NeedError(need('PROJECT_BINDING_INVALID'));
|
|
226
|
+
if (!same(before))
|
|
227
|
+
return stale();
|
|
228
|
+
binding.phase = 'bound';
|
|
229
|
+
if (!binding.sessionIds.includes(sessionId))
|
|
230
|
+
binding.sessionIds.push(sessionId);
|
|
231
|
+
statuses.set(binding.bindingId, 'ready');
|
|
232
|
+
if (binding.provider === 'unknown' || (binding.provider === 'claimed' && binding.claim?.owner !== owner)) {
|
|
233
|
+
binding.provider = 'unknown';
|
|
234
|
+
await save(stored);
|
|
235
|
+
publish(stored);
|
|
236
|
+
return fail('PROJECT_NOTICE_DELIVERY_UNKNOWN');
|
|
237
|
+
}
|
|
238
|
+
if (binding.provider === 'claimed' && (binding.claim?.sessionId !== sessionId || binding.claim.provider !== use.provider)) {
|
|
239
|
+
await save(stored);
|
|
240
|
+
publish(stored);
|
|
241
|
+
return fail('PROJECT_BINDING_BUSY');
|
|
242
|
+
}
|
|
243
|
+
if (binding.provider === 'pending') {
|
|
244
|
+
binding.provider = 'claimed';
|
|
245
|
+
binding.claim = { id: randomUUID(), sessionId, provider: use.provider, owner };
|
|
246
|
+
}
|
|
247
|
+
await save(stored);
|
|
248
|
+
if (!same(before))
|
|
249
|
+
return stale();
|
|
250
|
+
if (!sameNative(current, await native(sessionId)))
|
|
251
|
+
throw new NeedError(need('PROJECT_BINDING_INVALID'));
|
|
252
|
+
if (!same(before))
|
|
253
|
+
return stale();
|
|
254
|
+
publish(stored);
|
|
255
|
+
return ok({ instanceId: before.instanceId, epoch: before.epoch, bindingRevision: revision, bindingId: binding.bindingId, sessionId, workspaceId: current.workspaceId, project: structuredClone(binding.project), target, ...(binding.provider === 'claimed' ? { notice: { noticeId: binding.noticeId, claimId: binding.claim.id, workspaceName: binding.project.name, messageKey: 'remote-workspace-binding' } } : {}) });
|
|
256
|
+
}
|
|
257
|
+
catch (error) {
|
|
258
|
+
diagnostic(error);
|
|
259
|
+
if (binding)
|
|
260
|
+
statuses.set(binding.bindingId, 'invalid');
|
|
261
|
+
if (stored)
|
|
262
|
+
publish(stored);
|
|
263
|
+
return error instanceof NeedError ? { ok: false, error: error.need } : fail('PROJECT_BINDING_INVALID');
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
async function acknowledge(receipt) {
|
|
267
|
+
try {
|
|
268
|
+
await prepare();
|
|
269
|
+
const stored = await records();
|
|
270
|
+
if (!receipt || !token(receipt.noticeId))
|
|
271
|
+
return fail('PROJECT_BINDING_INVALID');
|
|
272
|
+
const binding = stored.find(r => r.noticeId === receipt.noticeId);
|
|
273
|
+
if (!binding || binding.phase !== 'bound')
|
|
274
|
+
return fail('PROJECT_BINDING_INVALID');
|
|
275
|
+
if (receipt.surface === 'settings') {
|
|
276
|
+
if (receipt.outcome !== 'displayed' || Object.keys(receipt).sort().join(',') !== 'noticeId,outcome,surface')
|
|
277
|
+
return fail('PROJECT_BINDING_INVALID');
|
|
278
|
+
binding.settings = 'displayed';
|
|
279
|
+
}
|
|
280
|
+
else if (receipt.surface === 'provider') {
|
|
281
|
+
const claim = binding.claim, keys = receipt.outcome === 'delivered' ? 'claimId,deliveryId,noticeId,outcome,provider,sessionId,surface' : 'claimId,noticeId,outcome,provider,sessionId,surface';
|
|
282
|
+
if (!claim || !['claimed', 'unknown', 'delivered'].includes(binding.provider) || Object.keys(receipt).sort().join(',') !== keys || receipt.claimId !== claim.id || receipt.sessionId !== claim.sessionId || receipt.provider !== claim.provider || !['delivered', 'not-delivered', 'unknown'].includes(receipt.outcome) || (receipt.outcome === 'delivered' && !token(receipt.deliveryId)))
|
|
283
|
+
return fail('PROJECT_BINDING_INVALID');
|
|
284
|
+
if (binding.provider === 'delivered') {
|
|
285
|
+
return receipt.outcome === 'delivered' && receipt.deliveryId === claim.deliveryId ? ok(undefined) : fail('PROJECT_BINDING_INVALID');
|
|
286
|
+
}
|
|
287
|
+
if (receipt.outcome === 'not-delivered') {
|
|
288
|
+
binding.provider = 'pending';
|
|
289
|
+
delete binding.claim;
|
|
290
|
+
}
|
|
291
|
+
else if (receipt.outcome === 'unknown')
|
|
292
|
+
binding.provider = 'unknown';
|
|
293
|
+
else if (receipt.outcome === 'delivered') {
|
|
294
|
+
binding.provider = 'delivered';
|
|
295
|
+
claim.deliveryId = receipt.deliveryId;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
else
|
|
299
|
+
return fail('PROJECT_BINDING_INVALID');
|
|
300
|
+
await save(stored);
|
|
301
|
+
publish(stored);
|
|
302
|
+
return ok(undefined);
|
|
303
|
+
}
|
|
304
|
+
catch (error) {
|
|
305
|
+
diagnostic(error);
|
|
306
|
+
return fail('PROJECT_BINDING_INVALID');
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
// Loading metadata never resolves a remote project or creates either a local or remote directory.
|
|
310
|
+
void serialized(async () => { try {
|
|
311
|
+
await prepare();
|
|
312
|
+
publish(await records());
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
diagnostic(error);
|
|
316
|
+
} });
|
|
317
|
+
return {
|
|
318
|
+
observeConnection(state) { if (disposed)
|
|
319
|
+
return; for (const [id, status] of statuses)
|
|
320
|
+
if (status === 'ready')
|
|
321
|
+
statuses.set(id, 'unavailable'); publish(latest); },
|
|
322
|
+
dispose() { disposed = true; listeners.clear(); return tail; },
|
|
323
|
+
getWorkspaceBindingState: () => structuredClone(snapshot),
|
|
324
|
+
onWorkspaceBindingState(listener) { listeners.add(listener); return () => { listeners.delete(listener); }; },
|
|
325
|
+
acknowledgeWorkspaceNotice: (receipt) => serialized(() => acknowledge(receipt)),
|
|
326
|
+
resolveSessionProject: (sessionId, use) => serialized(() => resolve(sessionId, use)),
|
|
327
|
+
};
|
|
328
|
+
}
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
A. HISTORY OF THE SOFTWARE
|
|
2
|
+
==========================
|
|
3
|
+
|
|
4
|
+
Python was created in the early 1990s by Guido van Rossum at Stichting
|
|
5
|
+
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
|
|
6
|
+
as a successor of a language called ABC. Guido remains Python's
|
|
7
|
+
principal author, although it includes many contributions from others.
|
|
8
|
+
|
|
9
|
+
In 1995, Guido continued his work on Python at the Corporation for
|
|
10
|
+
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
|
|
11
|
+
in Reston, Virginia where he released several versions of the
|
|
12
|
+
software.
|
|
13
|
+
|
|
14
|
+
In May 2000, Guido and the Python core development team moved to
|
|
15
|
+
BeOpen.com to form the BeOpen PythonLabs team. In October of the same
|
|
16
|
+
year, the PythonLabs team moved to Digital Creations, which became
|
|
17
|
+
Zope Corporation. In 2001, the Python Software Foundation (PSF, see
|
|
18
|
+
https://www.python.org/psf/) was formed, a non-profit organization
|
|
19
|
+
created specifically to own Python-related Intellectual Property.
|
|
20
|
+
Zope Corporation was a sponsoring member of the PSF.
|
|
21
|
+
|
|
22
|
+
All Python releases are Open Source (see http://www.opensource.org for
|
|
23
|
+
the Open Source Definition). Historically, most, but not all, Python
|
|
24
|
+
releases have also been GPL-compatible; the table below summarizes
|
|
25
|
+
the various releases.
|
|
26
|
+
|
|
27
|
+
Release Derived Year Owner GPL-
|
|
28
|
+
from compatible? (1)
|
|
29
|
+
|
|
30
|
+
0.9.0 thru 1.2 1991-1995 CWI yes
|
|
31
|
+
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
|
|
32
|
+
1.6 1.5.2 2000 CNRI no
|
|
33
|
+
2.0 1.6 2000 BeOpen.com no
|
|
34
|
+
1.6.1 1.6 2001 CNRI yes (2)
|
|
35
|
+
2.1 2.0+1.6.1 2001 PSF no
|
|
36
|
+
2.0.1 2.0+1.6.1 2001 PSF yes
|
|
37
|
+
2.1.1 2.1+2.0.1 2001 PSF yes
|
|
38
|
+
2.1.2 2.1.1 2002 PSF yes
|
|
39
|
+
2.1.3 2.1.2 2002 PSF yes
|
|
40
|
+
2.2 and above 2.1.1 2001-now PSF yes
|
|
41
|
+
|
|
42
|
+
Footnotes:
|
|
43
|
+
|
|
44
|
+
(1) GPL-compatible doesn't mean that we're distributing Python under
|
|
45
|
+
the GPL. All Python licenses, unlike the GPL, let you distribute
|
|
46
|
+
a modified version without making your changes open source. The
|
|
47
|
+
GPL-compatible licenses make it possible to combine Python with
|
|
48
|
+
other software that is released under the GPL; the others don't.
|
|
49
|
+
|
|
50
|
+
(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
|
|
51
|
+
because its license has a choice of law clause. According to
|
|
52
|
+
CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
|
|
53
|
+
is "not incompatible" with the GPL.
|
|
54
|
+
|
|
55
|
+
Thanks to the many outside volunteers who have worked under Guido's
|
|
56
|
+
direction to make these releases possible.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
|
|
60
|
+
===============================================================
|
|
61
|
+
|
|
62
|
+
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
|
63
|
+
--------------------------------------------
|
|
64
|
+
|
|
65
|
+
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
|
66
|
+
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
|
67
|
+
otherwise using this software ("Python") in source or binary form and
|
|
68
|
+
its associated documentation.
|
|
69
|
+
|
|
70
|
+
2. Subject to the terms and conditions of this License Agreement, PSF hereby
|
|
71
|
+
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
|
|
72
|
+
analyze, test, perform and/or display publicly, prepare derivative works,
|
|
73
|
+
distribute, and otherwise use Python alone or in any derivative version,
|
|
74
|
+
provided, however, that PSF's License Agreement and PSF's notice of copyright,
|
|
75
|
+
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
|
76
|
+
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation;
|
|
77
|
+
All Rights Reserved" are retained in Python alone or in any derivative version
|
|
78
|
+
prepared by Licensee.
|
|
79
|
+
|
|
80
|
+
3. In the event Licensee prepares a derivative work that is based on
|
|
81
|
+
or incorporates Python or any part thereof, and wants to make
|
|
82
|
+
the derivative work available to others as provided herein, then
|
|
83
|
+
Licensee hereby agrees to include in any such work a brief summary of
|
|
84
|
+
the changes made to Python.
|
|
85
|
+
|
|
86
|
+
4. PSF is making Python available to Licensee on an "AS IS"
|
|
87
|
+
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
88
|
+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
|
89
|
+
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
90
|
+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
|
91
|
+
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
92
|
+
|
|
93
|
+
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
94
|
+
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
95
|
+
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
|
96
|
+
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
97
|
+
|
|
98
|
+
6. This License Agreement will automatically terminate upon a material
|
|
99
|
+
breach of its terms and conditions.
|
|
100
|
+
|
|
101
|
+
7. Nothing in this License Agreement shall be deemed to create any
|
|
102
|
+
relationship of agency, partnership, or joint venture between PSF and
|
|
103
|
+
Licensee. This License Agreement does not grant permission to use PSF
|
|
104
|
+
trademarks or trade name in a trademark sense to endorse or promote
|
|
105
|
+
products or services of Licensee, or any third party.
|
|
106
|
+
|
|
107
|
+
8. By copying, installing or otherwise using Python, Licensee
|
|
108
|
+
agrees to be bound by the terms and conditions of this License
|
|
109
|
+
Agreement.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
|
|
113
|
+
-------------------------------------------
|
|
114
|
+
|
|
115
|
+
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
|
|
116
|
+
|
|
117
|
+
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
|
|
118
|
+
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
|
|
119
|
+
Individual or Organization ("Licensee") accessing and otherwise using
|
|
120
|
+
this software in source or binary form and its associated
|
|
121
|
+
documentation ("the Software").
|
|
122
|
+
|
|
123
|
+
2. Subject to the terms and conditions of this BeOpen Python License
|
|
124
|
+
Agreement, BeOpen hereby grants Licensee a non-exclusive,
|
|
125
|
+
royalty-free, world-wide license to reproduce, analyze, test, perform
|
|
126
|
+
and/or display publicly, prepare derivative works, distribute, and
|
|
127
|
+
otherwise use the Software alone or in any derivative version,
|
|
128
|
+
provided, however, that the BeOpen Python License is retained in the
|
|
129
|
+
Software, alone or in any derivative version prepared by Licensee.
|
|
130
|
+
|
|
131
|
+
3. BeOpen is making the Software available to Licensee on an "AS IS"
|
|
132
|
+
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
133
|
+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
|
|
134
|
+
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
135
|
+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
|
|
136
|
+
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
137
|
+
|
|
138
|
+
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
|
|
139
|
+
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
|
|
140
|
+
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
|
|
141
|
+
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
142
|
+
|
|
143
|
+
5. This License Agreement will automatically terminate upon a material
|
|
144
|
+
breach of its terms and conditions.
|
|
145
|
+
|
|
146
|
+
6. This License Agreement shall be governed by and interpreted in all
|
|
147
|
+
respects by the law of the State of California, excluding conflict of
|
|
148
|
+
law provisions. Nothing in this License Agreement shall be deemed to
|
|
149
|
+
create any relationship of agency, partnership, or joint venture
|
|
150
|
+
between BeOpen and Licensee. This License Agreement does not grant
|
|
151
|
+
permission to use BeOpen trademarks or trade names in a trademark
|
|
152
|
+
sense to endorse or promote products or services of Licensee, or any
|
|
153
|
+
third party. As an exception, the "BeOpen Python" logos available at
|
|
154
|
+
http://www.pythonlabs.com/logos.html may be used according to the
|
|
155
|
+
permissions granted on that web page.
|
|
156
|
+
|
|
157
|
+
7. By copying, installing or otherwise using the software, Licensee
|
|
158
|
+
agrees to be bound by the terms and conditions of this License
|
|
159
|
+
Agreement.
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
|
|
163
|
+
---------------------------------------
|
|
164
|
+
|
|
165
|
+
1. This LICENSE AGREEMENT is between the Corporation for National
|
|
166
|
+
Research Initiatives, having an office at 1895 Preston White Drive,
|
|
167
|
+
Reston, VA 20191 ("CNRI"), and the Individual or Organization
|
|
168
|
+
("Licensee") accessing and otherwise using Python 1.6.1 software in
|
|
169
|
+
source or binary form and its associated documentation.
|
|
170
|
+
|
|
171
|
+
2. Subject to the terms and conditions of this License Agreement, CNRI
|
|
172
|
+
hereby grants Licensee a nonexclusive, royalty-free, world-wide
|
|
173
|
+
license to reproduce, analyze, test, perform and/or display publicly,
|
|
174
|
+
prepare derivative works, distribute, and otherwise use Python 1.6.1
|
|
175
|
+
alone or in any derivative version, provided, however, that CNRI's
|
|
176
|
+
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
|
|
177
|
+
1995-2001 Corporation for National Research Initiatives; All Rights
|
|
178
|
+
Reserved" are retained in Python 1.6.1 alone or in any derivative
|
|
179
|
+
version prepared by Licensee. Alternately, in lieu of CNRI's License
|
|
180
|
+
Agreement, Licensee may substitute the following text (omitting the
|
|
181
|
+
quotes): "Python 1.6.1 is made available subject to the terms and
|
|
182
|
+
conditions in CNRI's License Agreement. This Agreement together with
|
|
183
|
+
Python 1.6.1 may be located on the Internet using the following
|
|
184
|
+
unique, persistent identifier (known as a handle): 1895.22/1013. This
|
|
185
|
+
Agreement may also be obtained from a proxy server on the Internet
|
|
186
|
+
using the following URL: http://hdl.handle.net/1895.22/1013".
|
|
187
|
+
|
|
188
|
+
3. In the event Licensee prepares a derivative work that is based on
|
|
189
|
+
or incorporates Python 1.6.1 or any part thereof, and wants to make
|
|
190
|
+
the derivative work available to others as provided herein, then
|
|
191
|
+
Licensee hereby agrees to include in any such work a brief summary of
|
|
192
|
+
the changes made to Python 1.6.1.
|
|
193
|
+
|
|
194
|
+
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
|
|
195
|
+
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
196
|
+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
|
|
197
|
+
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
198
|
+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
|
|
199
|
+
INFRINGE ANY THIRD PARTY RIGHTS.
|
|
200
|
+
|
|
201
|
+
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
202
|
+
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
203
|
+
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
|
|
204
|
+
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
205
|
+
|
|
206
|
+
6. This License Agreement will automatically terminate upon a material
|
|
207
|
+
breach of its terms and conditions.
|
|
208
|
+
|
|
209
|
+
7. This License Agreement shall be governed by the federal
|
|
210
|
+
intellectual property law of the United States, including without
|
|
211
|
+
limitation the federal copyright law, and, to the extent such
|
|
212
|
+
U.S. federal law does not apply, by the law of the Commonwealth of
|
|
213
|
+
Virginia, excluding Virginia's conflict of law provisions.
|
|
214
|
+
Notwithstanding the foregoing, with regard to derivative works based
|
|
215
|
+
on Python 1.6.1 that incorporate non-separable material that was
|
|
216
|
+
previously distributed under the GNU General Public License (GPL), the
|
|
217
|
+
law of the Commonwealth of Virginia shall govern this License
|
|
218
|
+
Agreement only as to issues arising under or with respect to
|
|
219
|
+
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
|
|
220
|
+
License Agreement shall be deemed to create any relationship of
|
|
221
|
+
agency, partnership, or joint venture between CNRI and Licensee. This
|
|
222
|
+
License Agreement does not grant permission to use CNRI trademarks or
|
|
223
|
+
trade name in a trademark sense to endorse or promote products or
|
|
224
|
+
services of Licensee, or any third party.
|
|
225
|
+
|
|
226
|
+
8. By clicking on the "ACCEPT" button where indicated, or by copying,
|
|
227
|
+
installing or otherwise using Python 1.6.1, Licensee agrees to be
|
|
228
|
+
bound by the terms and conditions of this License Agreement.
|
|
229
|
+
|
|
230
|
+
ACCEPT
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
|
|
234
|
+
--------------------------------------------------
|
|
235
|
+
|
|
236
|
+
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
|
|
237
|
+
The Netherlands. All rights reserved.
|
|
238
|
+
|
|
239
|
+
Permission to use, copy, modify, and distribute this software and its
|
|
240
|
+
documentation for any purpose and without fee is hereby granted,
|
|
241
|
+
provided that the above copyright notice appear in all copies and that
|
|
242
|
+
both that copyright notice and this permission notice appear in
|
|
243
|
+
supporting documentation, and that the name of Stichting Mathematisch
|
|
244
|
+
Centrum or CWI not be used in advertising or publicity pertaining to
|
|
245
|
+
distribution of the software without specific, written prior
|
|
246
|
+
permission.
|
|
247
|
+
|
|
248
|
+
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
|
249
|
+
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
250
|
+
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
|
|
251
|
+
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
252
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
253
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
254
|
+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|