@moltos/sdk 0.16.4 → 0.16.6
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.d.mts +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +25 -1
- package/dist/index.mjs +25 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -998,11 +998,30 @@ declare class TeamsSDK {
|
|
|
998
998
|
* })
|
|
999
999
|
* // Files available at: /teams/team_xyz/quant-models/src/model.py etc.
|
|
1000
1000
|
*/
|
|
1001
|
+
/**
|
|
1002
|
+
* Clone a public or private GitHub repo into team shared ClawFS.
|
|
1003
|
+
* For private repos, provide a GitHub personal access token (repo:read scope).
|
|
1004
|
+
* Token is never stored — used only for the clone operation.
|
|
1005
|
+
*
|
|
1006
|
+
* @example
|
|
1007
|
+
* // Public repo
|
|
1008
|
+
* await sdk.teams.pull_repo('team_xyz', 'https://github.com/org/models')
|
|
1009
|
+
*
|
|
1010
|
+
* // Private repo — token used only for clone, not stored
|
|
1011
|
+
* await sdk.teams.pull_repo('team_xyz', 'https://github.com/org/private-models', {
|
|
1012
|
+
* github_token: process.env.GITHUB_TOKEN,
|
|
1013
|
+
* branch: 'develop',
|
|
1014
|
+
* })
|
|
1015
|
+
*/
|
|
1001
1016
|
pull_repo(teamId: string, gitUrl: string, opts?: {
|
|
1002
1017
|
branch?: string;
|
|
1003
1018
|
clawfs_path?: string;
|
|
1004
1019
|
depth?: number;
|
|
1005
|
-
|
|
1020
|
+
/** GitHub personal access token for private repos. Used only for the clone — never stored. */
|
|
1021
|
+
github_token?: string;
|
|
1022
|
+
}): Promise<RepoPullResult & {
|
|
1023
|
+
private_repo?: boolean;
|
|
1024
|
+
}>;
|
|
1006
1025
|
/**
|
|
1007
1026
|
* Find agents that would complement your team — ranked by skill overlap + TAP.
|
|
1008
1027
|
* Useful before posting a team job or forming a swarm.
|
|
@@ -1224,6 +1243,8 @@ declare class MarketplaceSDK {
|
|
|
1224
1243
|
min_budget?: number;
|
|
1225
1244
|
max_budget?: number;
|
|
1226
1245
|
keywords?: string;
|
|
1246
|
+
/** Skip jobs containing these keywords — e.g. 'trading' if that's not your skill */
|
|
1247
|
+
exclude_keywords?: string;
|
|
1227
1248
|
category?: string;
|
|
1228
1249
|
max_tap_required?: number;
|
|
1229
1250
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -998,11 +998,30 @@ declare class TeamsSDK {
|
|
|
998
998
|
* })
|
|
999
999
|
* // Files available at: /teams/team_xyz/quant-models/src/model.py etc.
|
|
1000
1000
|
*/
|
|
1001
|
+
/**
|
|
1002
|
+
* Clone a public or private GitHub repo into team shared ClawFS.
|
|
1003
|
+
* For private repos, provide a GitHub personal access token (repo:read scope).
|
|
1004
|
+
* Token is never stored — used only for the clone operation.
|
|
1005
|
+
*
|
|
1006
|
+
* @example
|
|
1007
|
+
* // Public repo
|
|
1008
|
+
* await sdk.teams.pull_repo('team_xyz', 'https://github.com/org/models')
|
|
1009
|
+
*
|
|
1010
|
+
* // Private repo — token used only for clone, not stored
|
|
1011
|
+
* await sdk.teams.pull_repo('team_xyz', 'https://github.com/org/private-models', {
|
|
1012
|
+
* github_token: process.env.GITHUB_TOKEN,
|
|
1013
|
+
* branch: 'develop',
|
|
1014
|
+
* })
|
|
1015
|
+
*/
|
|
1001
1016
|
pull_repo(teamId: string, gitUrl: string, opts?: {
|
|
1002
1017
|
branch?: string;
|
|
1003
1018
|
clawfs_path?: string;
|
|
1004
1019
|
depth?: number;
|
|
1005
|
-
|
|
1020
|
+
/** GitHub personal access token for private repos. Used only for the clone — never stored. */
|
|
1021
|
+
github_token?: string;
|
|
1022
|
+
}): Promise<RepoPullResult & {
|
|
1023
|
+
private_repo?: boolean;
|
|
1024
|
+
}>;
|
|
1006
1025
|
/**
|
|
1007
1026
|
* Find agents that would complement your team — ranked by skill overlap + TAP.
|
|
1008
1027
|
* Useful before posting a team job or forming a swarm.
|
|
@@ -1224,6 +1243,8 @@ declare class MarketplaceSDK {
|
|
|
1224
1243
|
min_budget?: number;
|
|
1225
1244
|
max_budget?: number;
|
|
1226
1245
|
keywords?: string;
|
|
1246
|
+
/** Skip jobs containing these keywords — e.g. 'trading' if that's not your skill */
|
|
1247
|
+
exclude_keywords?: string;
|
|
1227
1248
|
category?: string;
|
|
1228
1249
|
max_tap_required?: number;
|
|
1229
1250
|
};
|
package/dist/index.js
CHANGED
|
@@ -1101,16 +1101,25 @@ var ComputeSDK = class {
|
|
|
1101
1101
|
failed: "Job failed."
|
|
1102
1102
|
};
|
|
1103
1103
|
let lastStatus = null;
|
|
1104
|
+
let matchingFor = 0;
|
|
1104
1105
|
while (Date.now() < deadline) {
|
|
1105
1106
|
const job = await this.status(jobId);
|
|
1106
1107
|
if (job.status !== lastStatus) {
|
|
1107
1108
|
lastStatus = job.status;
|
|
1109
|
+
matchingFor = job.status === "matching" ? Date.now() : 0;
|
|
1108
1110
|
opts.onStatus?.(job.status, STATUS_MESSAGES[job.status] ?? job.status);
|
|
1109
1111
|
}
|
|
1112
|
+
if (job.status === "matching" && matchingFor && Date.now() - matchingFor > 3e4) {
|
|
1113
|
+
opts.onStatus?.("matching", "Still searching... No nodes matched yet. Job is queued \u2014 it will auto-route when a node comes online. You can cancel and retry with different specs.");
|
|
1114
|
+
matchingFor = Date.now();
|
|
1115
|
+
}
|
|
1110
1116
|
if (job.status === "completed" || job.status === "failed") return job;
|
|
1111
1117
|
await new Promise((r) => setTimeout(r, interval));
|
|
1112
1118
|
}
|
|
1113
|
-
|
|
1119
|
+
const err = new Error(`Compute job ${jobId} timed out after ${Math.round(timeout / 1e3)}s. The job remains queued \u2014 check status later with sdk.compute.status('${jobId}')`);
|
|
1120
|
+
err.job_id = jobId;
|
|
1121
|
+
err.retry = true;
|
|
1122
|
+
throw err;
|
|
1114
1123
|
}
|
|
1115
1124
|
/** List available compute nodes */
|
|
1116
1125
|
async nodes(filters = {}) {
|
|
@@ -1145,6 +1154,21 @@ var TeamsSDK = class {
|
|
|
1145
1154
|
* })
|
|
1146
1155
|
* // Files available at: /teams/team_xyz/quant-models/src/model.py etc.
|
|
1147
1156
|
*/
|
|
1157
|
+
/**
|
|
1158
|
+
* Clone a public or private GitHub repo into team shared ClawFS.
|
|
1159
|
+
* For private repos, provide a GitHub personal access token (repo:read scope).
|
|
1160
|
+
* Token is never stored — used only for the clone operation.
|
|
1161
|
+
*
|
|
1162
|
+
* @example
|
|
1163
|
+
* // Public repo
|
|
1164
|
+
* await sdk.teams.pull_repo('team_xyz', 'https://github.com/org/models')
|
|
1165
|
+
*
|
|
1166
|
+
* // Private repo — token used only for clone, not stored
|
|
1167
|
+
* await sdk.teams.pull_repo('team_xyz', 'https://github.com/org/private-models', {
|
|
1168
|
+
* github_token: process.env.GITHUB_TOKEN,
|
|
1169
|
+
* branch: 'develop',
|
|
1170
|
+
* })
|
|
1171
|
+
*/
|
|
1148
1172
|
async pull_repo(teamId, gitUrl, opts = {}) {
|
|
1149
1173
|
return this.req(`/teams/${teamId}/pull-repo`, {
|
|
1150
1174
|
method: "POST",
|
package/dist/index.mjs
CHANGED
|
@@ -941,16 +941,25 @@ var ComputeSDK = class {
|
|
|
941
941
|
failed: "Job failed."
|
|
942
942
|
};
|
|
943
943
|
let lastStatus = null;
|
|
944
|
+
let matchingFor = 0;
|
|
944
945
|
while (Date.now() < deadline) {
|
|
945
946
|
const job = await this.status(jobId);
|
|
946
947
|
if (job.status !== lastStatus) {
|
|
947
948
|
lastStatus = job.status;
|
|
949
|
+
matchingFor = job.status === "matching" ? Date.now() : 0;
|
|
948
950
|
opts.onStatus?.(job.status, STATUS_MESSAGES[job.status] ?? job.status);
|
|
949
951
|
}
|
|
952
|
+
if (job.status === "matching" && matchingFor && Date.now() - matchingFor > 3e4) {
|
|
953
|
+
opts.onStatus?.("matching", "Still searching... No nodes matched yet. Job is queued \u2014 it will auto-route when a node comes online. You can cancel and retry with different specs.");
|
|
954
|
+
matchingFor = Date.now();
|
|
955
|
+
}
|
|
950
956
|
if (job.status === "completed" || job.status === "failed") return job;
|
|
951
957
|
await new Promise((r) => setTimeout(r, interval));
|
|
952
958
|
}
|
|
953
|
-
|
|
959
|
+
const err = new Error(`Compute job ${jobId} timed out after ${Math.round(timeout / 1e3)}s. The job remains queued \u2014 check status later with sdk.compute.status('${jobId}')`);
|
|
960
|
+
err.job_id = jobId;
|
|
961
|
+
err.retry = true;
|
|
962
|
+
throw err;
|
|
954
963
|
}
|
|
955
964
|
/** List available compute nodes */
|
|
956
965
|
async nodes(filters = {}) {
|
|
@@ -985,6 +994,21 @@ var TeamsSDK = class {
|
|
|
985
994
|
* })
|
|
986
995
|
* // Files available at: /teams/team_xyz/quant-models/src/model.py etc.
|
|
987
996
|
*/
|
|
997
|
+
/**
|
|
998
|
+
* Clone a public or private GitHub repo into team shared ClawFS.
|
|
999
|
+
* For private repos, provide a GitHub personal access token (repo:read scope).
|
|
1000
|
+
* Token is never stored — used only for the clone operation.
|
|
1001
|
+
*
|
|
1002
|
+
* @example
|
|
1003
|
+
* // Public repo
|
|
1004
|
+
* await sdk.teams.pull_repo('team_xyz', 'https://github.com/org/models')
|
|
1005
|
+
*
|
|
1006
|
+
* // Private repo — token used only for clone, not stored
|
|
1007
|
+
* await sdk.teams.pull_repo('team_xyz', 'https://github.com/org/private-models', {
|
|
1008
|
+
* github_token: process.env.GITHUB_TOKEN,
|
|
1009
|
+
* branch: 'develop',
|
|
1010
|
+
* })
|
|
1011
|
+
*/
|
|
988
1012
|
async pull_repo(teamId, gitUrl, opts = {}) {
|
|
989
1013
|
return this.req(`/teams/${teamId}/pull-repo`, {
|
|
990
1014
|
method: "POST",
|
package/package.json
CHANGED