@mitralab.io/sdk-core 0.2.7-beta.0 → 0.2.8
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/contracts/README.md +8 -0
- package/contracts/manifest.json +11 -1
- package/contracts/v0.2.8/sdk-parity.json +2902 -0
- package/contracts/v0.2.8-beta.0/sdk-parity.json +2902 -0
- package/dist/index.cjs +4 -10
- package/dist/index.d.cts +0 -10
- package/dist/index.d.ts +0 -10
- package/dist/index.js +4 -10
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -996,7 +996,6 @@ function expectAgentTask(value, context, errors = defaultSdkCoreErrorFactory) {
|
|
|
996
996
|
if (!isNullableString(task[field])) invalidField(context, field, errors);
|
|
997
997
|
}
|
|
998
998
|
if ("scope" in task && !isNullableString(task.scope)) invalidField(context, "scope", errors);
|
|
999
|
-
if ("model" in task && !isNullableString(task.model)) invalidField(context, "model", errors);
|
|
1000
999
|
if (typeof task.agentType !== "string") invalidField(context, "agentType", errors);
|
|
1001
1000
|
if (typeof task.archived !== "boolean") invalidField(context, "archived", errors);
|
|
1002
1001
|
if (!isNullableString(task.createdAt)) invalidField(context, "createdAt", errors);
|
|
@@ -3277,8 +3276,7 @@ var CoreAgentTaskSession = class {
|
|
|
3277
3276
|
text: item.text,
|
|
3278
3277
|
createdAt: item.createdAt,
|
|
3279
3278
|
...item.agentType ? { agentType: item.agentType } : {},
|
|
3280
|
-
...item.reasoningEffort ? { reasoningEffort: item.reasoningEffort } : {}
|
|
3281
|
-
...item.model ? { model: item.model } : {}
|
|
3279
|
+
...item.reasoningEffort ? { reasoningEffort: item.reasoningEffort } : {}
|
|
3282
3280
|
}));
|
|
3283
3281
|
}
|
|
3284
3282
|
send(prompt, options = {}) {
|
|
@@ -3297,8 +3295,7 @@ var CoreAgentTaskSession = class {
|
|
|
3297
3295
|
if (waiter.settled) return waiter.promise;
|
|
3298
3296
|
const sendOptions = {
|
|
3299
3297
|
...options.agentType ? { agentType: options.agentType } : {},
|
|
3300
|
-
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3301
|
-
...options.model ? { model: options.model } : {}
|
|
3298
|
+
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3302
3299
|
};
|
|
3303
3300
|
if (this.isBusy()) {
|
|
3304
3301
|
const queueId = this.enqueue(prompt, sendOptions, waiter);
|
|
@@ -3435,8 +3432,7 @@ var CoreAgentTaskSession = class {
|
|
|
3435
3432
|
type: "message",
|
|
3436
3433
|
content: prompt,
|
|
3437
3434
|
...options.agentType ? { agentType: options.agentType } : {},
|
|
3438
|
-
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3439
|
-
...options.model ? { model: options.model } : {}
|
|
3435
|
+
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3440
3436
|
};
|
|
3441
3437
|
if (this.isClosed()) {
|
|
3442
3438
|
await this.sendInput(input).catch(() => void 0);
|
|
@@ -3466,7 +3462,6 @@ var CoreAgentTaskSession = class {
|
|
|
3466
3462
|
...createOptions.title ? { title: createOptions.title } : {},
|
|
3467
3463
|
...createOptions.agentId ? { agentId: createOptions.agentId } : {},
|
|
3468
3464
|
...createOptions.reasoningEffort ? { reasoningEffort: createOptions.reasoningEffort } : {},
|
|
3469
|
-
...createOptions.model ? { model: createOptions.model } : {},
|
|
3470
3465
|
...createOptions.userId ? { userId: createOptions.userId } : {},
|
|
3471
3466
|
...createOptions.runtime ? { runtime: createOptions.runtime } : {},
|
|
3472
3467
|
...createOptions.scope ? { scope: createOptions.scope } : {}
|
|
@@ -3733,8 +3728,7 @@ var CoreAgentTaskSession = class {
|
|
|
3733
3728
|
next.text,
|
|
3734
3729
|
{
|
|
3735
3730
|
...next.agentType ? { agentType: next.agentType } : {},
|
|
3736
|
-
...next.reasoningEffort ? { reasoningEffort: next.reasoningEffort } : {}
|
|
3737
|
-
...next.model ? { model: next.model } : {}
|
|
3731
|
+
...next.reasoningEffort ? { reasoningEffort: next.reasoningEffort } : {}
|
|
3738
3732
|
},
|
|
3739
3733
|
next.waiter
|
|
3740
3734
|
);
|
package/dist/index.d.cts
CHANGED
|
@@ -1033,8 +1033,6 @@ interface AgentTaskCreateInput {
|
|
|
1033
1033
|
agentId?: string;
|
|
1034
1034
|
/** Optional reasoning setting supported by the selected model. */
|
|
1035
1035
|
reasoningEffort?: string;
|
|
1036
|
-
/** Catalog model id, for example `custom/<providerId>/<model>`. Copilot requires it for CUSTOM_AI. */
|
|
1037
|
-
model?: string;
|
|
1038
1036
|
/** Optional runtime. Core never defaults it; the concrete SDK decides what to send. */
|
|
1039
1037
|
runtime?: AgentTaskRuntime;
|
|
1040
1038
|
/** Optional credential scope. Core never defaults it; the concrete SDK decides what to send. */
|
|
@@ -1057,8 +1055,6 @@ interface AgentTask {
|
|
|
1057
1055
|
reasoningEffort: string | null;
|
|
1058
1056
|
/** Absent on a Copilot that predates credential scopes; null on a task without one. */
|
|
1059
1057
|
scope?: AgentCredentialScope | null;
|
|
1060
|
-
/** Absent on a Copilot that predates custom providers; null on a task without an explicit model. */
|
|
1061
|
-
model?: string | null;
|
|
1062
1058
|
archived: boolean;
|
|
1063
1059
|
createdAt: string | null;
|
|
1064
1060
|
updatedAt: string;
|
|
@@ -1078,8 +1074,6 @@ type AgentTaskInput = {
|
|
|
1078
1074
|
content: string;
|
|
1079
1075
|
agentType?: string;
|
|
1080
1076
|
reasoningEffort?: string;
|
|
1081
|
-
/** Catalog model id. */
|
|
1082
|
-
model?: string;
|
|
1083
1077
|
} | {
|
|
1084
1078
|
type: "interrupt";
|
|
1085
1079
|
} | {
|
|
@@ -1791,8 +1785,6 @@ interface NewAgentTaskSessionOptions {
|
|
|
1791
1785
|
title?: string;
|
|
1792
1786
|
agentId?: string;
|
|
1793
1787
|
reasoningEffort?: string;
|
|
1794
|
-
/** Catalog model id. */
|
|
1795
|
-
model?: string;
|
|
1796
1788
|
userId?: string;
|
|
1797
1789
|
/** Runtime the task is born on. Omitted means the Copilot server default. */
|
|
1798
1790
|
runtime?: AgentTaskRuntime;
|
|
@@ -1809,8 +1801,6 @@ type AgentTaskSessionOptions = NewAgentTaskSessionOptions | ExistingAgentTaskSes
|
|
|
1809
1801
|
interface AgentSendOptions {
|
|
1810
1802
|
agentType?: string;
|
|
1811
1803
|
reasoningEffort?: string;
|
|
1812
|
-
/** Catalog model id. */
|
|
1813
|
-
model?: string;
|
|
1814
1804
|
}
|
|
1815
1805
|
interface AgentSendAndWaitOptions extends AgentSendOptions {
|
|
1816
1806
|
signal?: AbortSignal;
|
package/dist/index.d.ts
CHANGED
|
@@ -1033,8 +1033,6 @@ interface AgentTaskCreateInput {
|
|
|
1033
1033
|
agentId?: string;
|
|
1034
1034
|
/** Optional reasoning setting supported by the selected model. */
|
|
1035
1035
|
reasoningEffort?: string;
|
|
1036
|
-
/** Catalog model id, for example `custom/<providerId>/<model>`. Copilot requires it for CUSTOM_AI. */
|
|
1037
|
-
model?: string;
|
|
1038
1036
|
/** Optional runtime. Core never defaults it; the concrete SDK decides what to send. */
|
|
1039
1037
|
runtime?: AgentTaskRuntime;
|
|
1040
1038
|
/** Optional credential scope. Core never defaults it; the concrete SDK decides what to send. */
|
|
@@ -1057,8 +1055,6 @@ interface AgentTask {
|
|
|
1057
1055
|
reasoningEffort: string | null;
|
|
1058
1056
|
/** Absent on a Copilot that predates credential scopes; null on a task without one. */
|
|
1059
1057
|
scope?: AgentCredentialScope | null;
|
|
1060
|
-
/** Absent on a Copilot that predates custom providers; null on a task without an explicit model. */
|
|
1061
|
-
model?: string | null;
|
|
1062
1058
|
archived: boolean;
|
|
1063
1059
|
createdAt: string | null;
|
|
1064
1060
|
updatedAt: string;
|
|
@@ -1078,8 +1074,6 @@ type AgentTaskInput = {
|
|
|
1078
1074
|
content: string;
|
|
1079
1075
|
agentType?: string;
|
|
1080
1076
|
reasoningEffort?: string;
|
|
1081
|
-
/** Catalog model id. */
|
|
1082
|
-
model?: string;
|
|
1083
1077
|
} | {
|
|
1084
1078
|
type: "interrupt";
|
|
1085
1079
|
} | {
|
|
@@ -1791,8 +1785,6 @@ interface NewAgentTaskSessionOptions {
|
|
|
1791
1785
|
title?: string;
|
|
1792
1786
|
agentId?: string;
|
|
1793
1787
|
reasoningEffort?: string;
|
|
1794
|
-
/** Catalog model id. */
|
|
1795
|
-
model?: string;
|
|
1796
1788
|
userId?: string;
|
|
1797
1789
|
/** Runtime the task is born on. Omitted means the Copilot server default. */
|
|
1798
1790
|
runtime?: AgentTaskRuntime;
|
|
@@ -1809,8 +1801,6 @@ type AgentTaskSessionOptions = NewAgentTaskSessionOptions | ExistingAgentTaskSes
|
|
|
1809
1801
|
interface AgentSendOptions {
|
|
1810
1802
|
agentType?: string;
|
|
1811
1803
|
reasoningEffort?: string;
|
|
1812
|
-
/** Catalog model id. */
|
|
1813
|
-
model?: string;
|
|
1814
1804
|
}
|
|
1815
1805
|
interface AgentSendAndWaitOptions extends AgentSendOptions {
|
|
1816
1806
|
signal?: AbortSignal;
|
package/dist/index.js
CHANGED
|
@@ -924,7 +924,6 @@ function expectAgentTask(value, context, errors = defaultSdkCoreErrorFactory) {
|
|
|
924
924
|
if (!isNullableString(task[field])) invalidField(context, field, errors);
|
|
925
925
|
}
|
|
926
926
|
if ("scope" in task && !isNullableString(task.scope)) invalidField(context, "scope", errors);
|
|
927
|
-
if ("model" in task && !isNullableString(task.model)) invalidField(context, "model", errors);
|
|
928
927
|
if (typeof task.agentType !== "string") invalidField(context, "agentType", errors);
|
|
929
928
|
if (typeof task.archived !== "boolean") invalidField(context, "archived", errors);
|
|
930
929
|
if (!isNullableString(task.createdAt)) invalidField(context, "createdAt", errors);
|
|
@@ -3205,8 +3204,7 @@ var CoreAgentTaskSession = class {
|
|
|
3205
3204
|
text: item.text,
|
|
3206
3205
|
createdAt: item.createdAt,
|
|
3207
3206
|
...item.agentType ? { agentType: item.agentType } : {},
|
|
3208
|
-
...item.reasoningEffort ? { reasoningEffort: item.reasoningEffort } : {}
|
|
3209
|
-
...item.model ? { model: item.model } : {}
|
|
3207
|
+
...item.reasoningEffort ? { reasoningEffort: item.reasoningEffort } : {}
|
|
3210
3208
|
}));
|
|
3211
3209
|
}
|
|
3212
3210
|
send(prompt, options = {}) {
|
|
@@ -3225,8 +3223,7 @@ var CoreAgentTaskSession = class {
|
|
|
3225
3223
|
if (waiter.settled) return waiter.promise;
|
|
3226
3224
|
const sendOptions = {
|
|
3227
3225
|
...options.agentType ? { agentType: options.agentType } : {},
|
|
3228
|
-
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3229
|
-
...options.model ? { model: options.model } : {}
|
|
3226
|
+
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3230
3227
|
};
|
|
3231
3228
|
if (this.isBusy()) {
|
|
3232
3229
|
const queueId = this.enqueue(prompt, sendOptions, waiter);
|
|
@@ -3363,8 +3360,7 @@ var CoreAgentTaskSession = class {
|
|
|
3363
3360
|
type: "message",
|
|
3364
3361
|
content: prompt,
|
|
3365
3362
|
...options.agentType ? { agentType: options.agentType } : {},
|
|
3366
|
-
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3367
|
-
...options.model ? { model: options.model } : {}
|
|
3363
|
+
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3368
3364
|
};
|
|
3369
3365
|
if (this.isClosed()) {
|
|
3370
3366
|
await this.sendInput(input).catch(() => void 0);
|
|
@@ -3394,7 +3390,6 @@ var CoreAgentTaskSession = class {
|
|
|
3394
3390
|
...createOptions.title ? { title: createOptions.title } : {},
|
|
3395
3391
|
...createOptions.agentId ? { agentId: createOptions.agentId } : {},
|
|
3396
3392
|
...createOptions.reasoningEffort ? { reasoningEffort: createOptions.reasoningEffort } : {},
|
|
3397
|
-
...createOptions.model ? { model: createOptions.model } : {},
|
|
3398
3393
|
...createOptions.userId ? { userId: createOptions.userId } : {},
|
|
3399
3394
|
...createOptions.runtime ? { runtime: createOptions.runtime } : {},
|
|
3400
3395
|
...createOptions.scope ? { scope: createOptions.scope } : {}
|
|
@@ -3661,8 +3656,7 @@ var CoreAgentTaskSession = class {
|
|
|
3661
3656
|
next.text,
|
|
3662
3657
|
{
|
|
3663
3658
|
...next.agentType ? { agentType: next.agentType } : {},
|
|
3664
|
-
...next.reasoningEffort ? { reasoningEffort: next.reasoningEffort } : {}
|
|
3665
|
-
...next.model ? { model: next.model } : {}
|
|
3659
|
+
...next.reasoningEffort ? { reasoningEffort: next.reasoningEffort } : {}
|
|
3666
3660
|
},
|
|
3667
3661
|
next.waiter
|
|
3668
3662
|
);
|