@elevasis/sdk 1.50.0 → 1.52.0

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/cli.cjs CHANGED
@@ -45563,11 +45563,6 @@ function validateAgentGrammar(orgName, agentId, agent, mode) {
45563
45563
  function validateAgentCheapAssertions(orgName, agentId, agent, mode) {
45564
45564
  const issues = [];
45565
45565
  const config3 = agent.config;
45566
- if (config3.sessionCapable && config3.securityLevel === "none") {
45567
- issues.push(
45568
- `securityLevel: 'none' on a sessionCapable agent -- a session agent takes untrusted user input and must run with prompt-injection defenses ('standard' or 'hardened').`
45569
- );
45570
- }
45571
45566
  if (!isStubDefinition(agent) && !config3.systemPrompt.trim()) {
45572
45567
  issues.push(`systemPrompt is empty -- an agent with no behavioural instructions cannot be deployed.`);
45573
45568
  }
@@ -45875,6 +45870,54 @@ var init_validation2 = __esm({
45875
45870
  }
45876
45871
  });
45877
45872
 
45873
+ // ../core/src/execution/engine/base/redaction.ts
45874
+ function normalizeKey(key) {
45875
+ return key.toLowerCase().replace(/[_\-.\s]/g, "");
45876
+ }
45877
+ function isTokenCountKey(normalized) {
45878
+ if (SECRET_PLURAL_EXCEPTIONS.has(normalized)) return false;
45879
+ if (normalized.endsWith("tokens")) return true;
45880
+ return ["tokenbudget", "tokenlimit", "tokencount", "tokenusage"].some((k) => normalized.includes(k));
45881
+ }
45882
+ function isSecretKey(key) {
45883
+ const normalized = normalizeKey(key);
45884
+ if (isTokenCountKey(normalized)) return false;
45885
+ return SECRET_PATTERNS.some((pattern) => normalized.includes(pattern));
45886
+ }
45887
+ function redactSecretValue(value) {
45888
+ if (typeof value !== "string") return "[REDACTED]";
45889
+ if (value.length <= 7) return "[REDACTED]";
45890
+ return value.substring(0, 7) + "...";
45891
+ }
45892
+ var SECRET_PATTERNS, SECRET_PLURAL_EXCEPTIONS;
45893
+ var init_redaction = __esm({
45894
+ "../core/src/execution/engine/base/redaction.ts"() {
45895
+ "use strict";
45896
+ SECRET_PATTERNS = [
45897
+ "apikey",
45898
+ "secret",
45899
+ "password",
45900
+ "passphrase",
45901
+ "token",
45902
+ "credential",
45903
+ "privatekey",
45904
+ "accesskey",
45905
+ "authorization",
45906
+ "bearer"
45907
+ ];
45908
+ SECRET_PLURAL_EXCEPTIONS = /* @__PURE__ */ new Set([
45909
+ "refreshtokens",
45910
+ "accesstokens",
45911
+ "apitokens",
45912
+ "authtokens",
45913
+ "bearertokens",
45914
+ "sessiontokens",
45915
+ "bypasstokens",
45916
+ "validtokens"
45917
+ ]);
45918
+ }
45919
+ });
45920
+
45878
45921
  // ../core/src/execution/engine/base/serialization.ts
45879
45922
  function serializeDefinition(definition, options) {
45880
45923
  const opts = {
@@ -45912,7 +45955,7 @@ function serializeObject(obj, ctx) {
45912
45955
  for (const [key, val] of Object.entries(obj)) {
45913
45956
  if (typeof val === "function") continue;
45914
45957
  if (ctx.redactSecrets && isSecretKey(key)) {
45915
- result[key] = redactSecret(val);
45958
+ result[key] = redactSecretValue(val);
45916
45959
  continue;
45917
45960
  }
45918
45961
  if (key === "steps" && isWorkflowStepsRecord(val)) {
@@ -45998,23 +46041,12 @@ function isToolObject(value) {
45998
46041
  function isNextConfigObject(value) {
45999
46042
  return value && typeof value === "object" && "type" in value && (value.type === StepType.LINEAR || value.type === StepType.CONDITIONAL);
46000
46043
  }
46001
- function isSecretKey(key) {
46002
- const lower = key.toLowerCase();
46003
- const whitelist = ["maxtokens", "memorytokens", "inputtokens", "outputtokens"];
46004
- if (whitelist.some((w) => lower.includes(w))) return false;
46005
- const patterns = ["apikey", "secret", "password", "token", "credential"];
46006
- return patterns.some((p) => lower.includes(p));
46007
- }
46008
- function redactSecret(value) {
46009
- if (typeof value !== "string") return "[REDACTED]";
46010
- if (value.length <= 7) return "[REDACTED]";
46011
- return value.substring(0, 7) + "...";
46012
- }
46013
46044
  var init_serialization = __esm({
46014
46045
  "../core/src/execution/engine/base/serialization.ts"() {
46015
46046
  "use strict";
46016
46047
  init_esm();
46017
46048
  init_types5();
46049
+ init_redaction();
46018
46050
  }
46019
46051
  });
46020
46052
 
@@ -49298,7 +49330,7 @@ var init_package = __esm({
49298
49330
  "package.json"() {
49299
49331
  package_default = {
49300
49332
  name: "@elevasis/sdk",
49301
- version: "1.50.0",
49333
+ version: "1.52.0",
49302
49334
  description: "SDK for building Elevasis organization resources",
49303
49335
  type: "module",
49304
49336
  bin: {
@@ -52022,9 +52054,10 @@ Credentials (${data.credentials.length}):
52022
52054
  // src/cli/commands/creds/creds-create.ts
52023
52055
  init_source();
52024
52056
  init_ora();
52057
+ init_src();
52025
52058
  init_api_client();
52026
52059
  var CREDENTIAL_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;
52027
- var VALID_TYPES = ["api-key", "webhook-secret"];
52060
+ var VALID_TYPES = CredentialTypeSchema.options.filter((type) => type !== "oauth");
52028
52061
  async function createCreds(apiUrl, name, type, valueJson) {
52029
52062
  if (!name || name.length < 1 || name.length > 100) {
52030
52063
  throw new Error("Credential name must be 1-100 characters");
@@ -52044,6 +52077,8 @@ Note: OAuth credentials must be created through the Command Center UI`
52044
52077
  if (!valueJson) {
52045
52078
  throw new Error(
52046
52079
  `Credential value is required. Provide it with --value '{"apiKey":"sk-..."}'
52080
+ For a secret you do not want in shell history, write it to a file and pass
52081
+ --value @json:tmp/credential.json instead.
52047
52082
  Value must be a valid JSON object.`
52048
52083
  );
52049
52084
  }
@@ -52063,11 +52098,7 @@ Example: --value '{"apiKey":"sk-abc123"}'`
52063
52098
  throw new Error("Credential value must not be empty");
52064
52099
  }
52065
52100
  const spinner = ora("Creating credential...").start();
52066
- const result = await apiPost(
52067
- "/api/external/credentials",
52068
- { name, type, value },
52069
- apiUrl
52070
- );
52101
+ const result = await apiPost("/api/external/credentials", { name, type, value }, apiUrl);
52071
52102
  spinner.stop();
52072
52103
  console.log(source_default.green(`
52073
52104
  Credential created successfully!`));
@@ -52101,10 +52132,8 @@ Example: --value '{"apiKey":"sk-new-key"}'`
52101
52132
  const credential = data.credentials.find((c) => c.name === name);
52102
52133
  if (!credential) {
52103
52134
  spinner.stop();
52104
- throw new Error(
52105
- `Credential '${name}' not found.
52106
- Run "elevasis-sdk creds list" to see available credentials.`
52107
- );
52135
+ throw new Error(`Credential '${name}' not found.
52136
+ Run "elevasis-sdk creds list" to see available credentials.`);
52108
52137
  }
52109
52138
  await apiPatch(`/api/external/credentials/${credential.id}`, { value }, apiUrl);
52110
52139
  spinner.stop();
@@ -52199,21 +52228,31 @@ Credential '${name}' deleted successfully.`));
52199
52228
  // src/cli/commands/creds/creds.ts
52200
52229
  function registerCredsCommand(program3) {
52201
52230
  const creds = program3.command("creds").description("Manage organization credentials");
52202
- creds.command("list").description("List all credentials (metadata only, no secrets)").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").option("--json", "Output as JSON").action(wrapAction("creds list", async (options) => {
52203
- await listCreds(resolveApiUrl(options.apiUrl, options.prod), options.json);
52204
- }));
52205
- creds.command("create").description("Create a new credential").requiredOption("--name <name>", "Credential name (lowercase, digits, hyphens)").requiredOption("--type <type>", "Credential type (api-key, webhook-secret)").option("--value <json>", "Credential value as JSON string").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").action(wrapAction("creds create", async (options) => {
52206
- await createCreds(resolveApiUrl(options.apiUrl, options.prod), options.name, options.type, options.value);
52207
- }));
52208
- creds.command("update <name>").description("Update a credential value").requiredOption("--value <json>", "New credential value as JSON string").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").action(wrapAction("creds update", async (name, options) => {
52209
- await updateCreds(resolveApiUrl(options.apiUrl, options.prod), name, options.value);
52210
- }));
52211
- creds.command("rename <name>").description("Rename a credential").requiredOption("--to <newName>", "New credential name").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").action(wrapAction("creds rename", async (name, options) => {
52212
- await renameCreds(resolveApiUrl(options.apiUrl, options.prod), name, options.to);
52213
- }));
52214
- creds.command("delete <name>").description("Delete a credential").option("--force", "Skip confirmation prompt").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").action(wrapAction("creds delete", async (name, options) => {
52215
- await deleteCreds(resolveApiUrl(options.apiUrl, options.prod), name, options.force);
52216
- }));
52231
+ creds.command("list").description("List all credentials (metadata only, no secrets)").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").option("--json", "Output as JSON").action(
52232
+ wrapAction("creds list", async (options) => {
52233
+ await listCreds(resolveApiUrl(options.apiUrl, options.prod), options.json);
52234
+ })
52235
+ );
52236
+ creds.command("create").description("Create a new credential").requiredOption("--name <name>", "Credential name (lowercase, digits, hyphens)").requiredOption("--type <type>", "Credential type (api-key, webhook-secret, api-key-secret, clickup, instagram)").option("--value <json>", "Credential value as JSON string (or @json:<path> to read it from a file)").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").action(
52237
+ wrapAction("creds create", async (options) => {
52238
+ await createCreds(resolveApiUrl(options.apiUrl, options.prod), options.name, options.type, options.value);
52239
+ })
52240
+ );
52241
+ creds.command("update <name>").description("Update a credential value").requiredOption("--value <json>", "New credential value as JSON string (or @json:<path> to read it from a file)").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").action(
52242
+ wrapAction("creds update", async (name, options) => {
52243
+ await updateCreds(resolveApiUrl(options.apiUrl, options.prod), name, options.value);
52244
+ })
52245
+ );
52246
+ creds.command("rename <name>").description("Rename a credential").requiredOption("--to <newName>", "New credential name").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").action(
52247
+ wrapAction("creds rename", async (name, options) => {
52248
+ await renameCreds(resolveApiUrl(options.apiUrl, options.prod), name, options.to);
52249
+ })
52250
+ );
52251
+ creds.command("delete <name>").description("Delete a credential").option("--force", "Skip confirmation prompt").option("--prod", "Target production (overrides NODE_ENV=development)").option("--api-url <url>", "API URL").action(
52252
+ wrapAction("creds delete", async (name, options) => {
52253
+ await deleteCreds(resolveApiUrl(options.apiUrl, options.prod), name, options.force);
52254
+ })
52255
+ );
52217
52256
  }
52218
52257
 
52219
52258
  // src/cli/commands/error/error.ts
@@ -53621,6 +53660,106 @@ var UpdateNoteRequestSchema = external_exports.object({
53621
53660
  metadata: external_exports.record(external_exports.string(), external_exports.unknown()).nullable().optional()
53622
53661
  }).strict().refine((data) => Object.keys(data).length > 0, { message: "At least one field must be provided" });
53623
53662
  var NoteIdParamsSchema = external_exports.object({ id: UuidSchema });
53663
+ var ProjectRowSchema = external_exports.object({
53664
+ id: external_exports.string(),
53665
+ organization_id: external_exports.string(),
53666
+ name: external_exports.string(),
53667
+ kind: external_exports.string(),
53668
+ status: external_exports.string(),
53669
+ description: external_exports.string().nullable(),
53670
+ deal_id: external_exports.string().nullable(),
53671
+ client_id: external_exports.string().nullable(),
53672
+ client_company_id: external_exports.string().nullable(),
53673
+ start_date: external_exports.string().nullable(),
53674
+ target_end_date: external_exports.string().nullable(),
53675
+ actual_end_date: external_exports.string().nullable(),
53676
+ contract_value: external_exports.number().nullable(),
53677
+ metadata: external_exports.unknown().nullable(),
53678
+ created_at: external_exports.string(),
53679
+ updated_at: external_exports.string()
53680
+ });
53681
+ var MilestoneRowSchema = external_exports.object({
53682
+ id: external_exports.string(),
53683
+ organization_id: external_exports.string(),
53684
+ project_id: external_exports.string(),
53685
+ name: external_exports.string(),
53686
+ status: external_exports.string(),
53687
+ description: external_exports.string().nullable(),
53688
+ due_date: external_exports.string().nullable(),
53689
+ completed_at: external_exports.string().nullable(),
53690
+ sequence: external_exports.number(),
53691
+ checklist: external_exports.unknown().nullable(),
53692
+ metadata: external_exports.unknown().nullable(),
53693
+ created_at: external_exports.string(),
53694
+ updated_at: external_exports.string()
53695
+ });
53696
+ var TaskRowSchema = external_exports.object({
53697
+ id: external_exports.string(),
53698
+ organization_id: external_exports.string(),
53699
+ project_id: external_exports.string(),
53700
+ name: external_exports.string(),
53701
+ type: external_exports.string(),
53702
+ status: external_exports.string(),
53703
+ description: external_exports.string().nullable(),
53704
+ milestone_id: external_exports.string().nullable(),
53705
+ parent_task_id: external_exports.string().nullable(),
53706
+ due_date: external_exports.string().nullable(),
53707
+ completed_at: external_exports.string().nullable(),
53708
+ file_url: external_exports.string().nullable(),
53709
+ checklist: external_exports.unknown(),
53710
+ resume_context: external_exports.unknown().nullable(),
53711
+ metadata: external_exports.unknown().nullable(),
53712
+ created_at: external_exports.string(),
53713
+ updated_at: external_exports.string()
53714
+ });
53715
+ var NoteRowSchema = external_exports.object({
53716
+ id: external_exports.string(),
53717
+ organization_id: external_exports.string(),
53718
+ project_id: external_exports.string(),
53719
+ content: external_exports.string(),
53720
+ type: external_exports.string(),
53721
+ summary: external_exports.string().nullable(),
53722
+ task_id: external_exports.string().nullable(),
53723
+ milestone_id: external_exports.string().nullable(),
53724
+ occurred_at: external_exports.string(),
53725
+ created_by: external_exports.string().nullable(),
53726
+ created_at: external_exports.string()
53727
+ });
53728
+ var ProjectWithCountsSchema = ProjectRowSchema.extend({
53729
+ milestoneCount: external_exports.number().int(),
53730
+ taskCount: external_exports.number().int(),
53731
+ completedMilestones: external_exports.number().int().optional(),
53732
+ completedTasks: external_exports.number().int().optional()
53733
+ });
53734
+ var ProjectCompanyRefSchema = external_exports.object({
53735
+ id: external_exports.string(),
53736
+ name: external_exports.string(),
53737
+ domain: external_exports.string().nullable()
53738
+ });
53739
+ var ProjectDetailSchema = ProjectRowSchema.extend({
53740
+ milestones: external_exports.array(MilestoneRowSchema),
53741
+ tasks: external_exports.array(TaskRowSchema),
53742
+ company: ProjectCompanyRefSchema.nullable(),
53743
+ deal: ProjectSourceDealRefSchema.nullable(),
53744
+ client: ProjectClientRefSchema.nullable()
53745
+ });
53746
+ var TaskResumeContextSchema = external_exports.object({
53747
+ id: external_exports.string(),
53748
+ project_id: external_exports.string(),
53749
+ resume_context: external_exports.unknown().nullable(),
53750
+ updated_at: external_exports.string()
53751
+ });
53752
+ var ProjectListResponseSchema = external_exports.object({ projects: external_exports.array(ProjectWithCountsSchema) });
53753
+ var ProjectDetailResponseSchema = external_exports.object({ project: ProjectDetailSchema });
53754
+ var ProjectResponseSchema = external_exports.object({ project: ProjectRowSchema });
53755
+ var MilestoneListResponseSchema = external_exports.object({ milestones: external_exports.array(MilestoneRowSchema) });
53756
+ var MilestoneResponseSchema = external_exports.object({ milestone: MilestoneRowSchema });
53757
+ var TaskListResponseSchema = external_exports.object({ tasks: external_exports.array(TaskRowSchema) });
53758
+ var TaskResponseSchema = external_exports.object({ task: TaskRowSchema });
53759
+ var TaskResumeContextResponseSchema = external_exports.object({ task: TaskResumeContextSchema });
53760
+ var NoteListResponseSchema = external_exports.object({ notes: external_exports.array(NoteRowSchema) });
53761
+ var NoteResponseSchema = external_exports.object({ note: NoteRowSchema });
53762
+ var DeleteSuccessResponseSchema = external_exports.object({ success: external_exports.boolean() });
53624
53763
 
53625
53764
  // src/cli/commands/project/notes.ts
53626
53765
  init_wrap_action();
package/dist/index.d.ts CHANGED
@@ -3743,6 +3743,7 @@ type Database = {
3743
3743
  created_at: string | null;
3744
3744
  error: string | null;
3745
3745
  execution_id: string;
3746
+ idempotency_key: string | null;
3746
3747
  input: Json | null;
3747
3748
  last_heartbeat_at: string | null;
3748
3749
  logs: Json | null;
@@ -3769,6 +3770,7 @@ type Database = {
3769
3770
  created_at?: string | null;
3770
3771
  error?: string | null;
3771
3772
  execution_id?: string;
3773
+ idempotency_key?: string | null;
3772
3774
  input?: Json | null;
3773
3775
  last_heartbeat_at?: string | null;
3774
3776
  logs?: Json | null;
@@ -3795,6 +3797,7 @@ type Database = {
3795
3797
  created_at?: string | null;
3796
3798
  error?: string | null;
3797
3799
  execution_id?: string;
3800
+ idempotency_key?: string | null;
3798
3801
  input?: Json | null;
3799
3802
  last_heartbeat_at?: string | null;
3800
3803
  logs?: Json | null;
@@ -11701,6 +11704,240 @@ declare const ProjectSchemas: {
11701
11704
  NoteIdParams: z.ZodObject<{
11702
11705
  id: z.ZodString;
11703
11706
  }, z.core.$strip>;
11707
+ ProjectListResponse: z.ZodObject<{
11708
+ projects: z.ZodArray<z.ZodObject<{
11709
+ id: z.ZodString;
11710
+ organization_id: z.ZodString;
11711
+ name: z.ZodString;
11712
+ kind: z.ZodString;
11713
+ status: z.ZodString;
11714
+ description: z.ZodNullable<z.ZodString>;
11715
+ deal_id: z.ZodNullable<z.ZodString>;
11716
+ client_id: z.ZodNullable<z.ZodString>;
11717
+ client_company_id: z.ZodNullable<z.ZodString>;
11718
+ start_date: z.ZodNullable<z.ZodString>;
11719
+ target_end_date: z.ZodNullable<z.ZodString>;
11720
+ actual_end_date: z.ZodNullable<z.ZodString>;
11721
+ contract_value: z.ZodNullable<z.ZodNumber>;
11722
+ metadata: z.ZodNullable<z.ZodUnknown>;
11723
+ created_at: z.ZodString;
11724
+ updated_at: z.ZodString;
11725
+ milestoneCount: z.ZodNumber;
11726
+ taskCount: z.ZodNumber;
11727
+ completedMilestones: z.ZodOptional<z.ZodNumber>;
11728
+ completedTasks: z.ZodOptional<z.ZodNumber>;
11729
+ }, z.core.$strip>>;
11730
+ }, z.core.$strip>;
11731
+ ProjectDetailResponse: z.ZodObject<{
11732
+ project: z.ZodObject<{
11733
+ id: z.ZodString;
11734
+ organization_id: z.ZodString;
11735
+ name: z.ZodString;
11736
+ kind: z.ZodString;
11737
+ status: z.ZodString;
11738
+ description: z.ZodNullable<z.ZodString>;
11739
+ deal_id: z.ZodNullable<z.ZodString>;
11740
+ client_id: z.ZodNullable<z.ZodString>;
11741
+ client_company_id: z.ZodNullable<z.ZodString>;
11742
+ start_date: z.ZodNullable<z.ZodString>;
11743
+ target_end_date: z.ZodNullable<z.ZodString>;
11744
+ actual_end_date: z.ZodNullable<z.ZodString>;
11745
+ contract_value: z.ZodNullable<z.ZodNumber>;
11746
+ metadata: z.ZodNullable<z.ZodUnknown>;
11747
+ created_at: z.ZodString;
11748
+ updated_at: z.ZodString;
11749
+ milestones: z.ZodArray<z.ZodObject<{
11750
+ id: z.ZodString;
11751
+ organization_id: z.ZodString;
11752
+ project_id: z.ZodString;
11753
+ name: z.ZodString;
11754
+ status: z.ZodString;
11755
+ description: z.ZodNullable<z.ZodString>;
11756
+ due_date: z.ZodNullable<z.ZodString>;
11757
+ completed_at: z.ZodNullable<z.ZodString>;
11758
+ sequence: z.ZodNumber;
11759
+ checklist: z.ZodNullable<z.ZodUnknown>;
11760
+ metadata: z.ZodNullable<z.ZodUnknown>;
11761
+ created_at: z.ZodString;
11762
+ updated_at: z.ZodString;
11763
+ }, z.core.$strip>>;
11764
+ tasks: z.ZodArray<z.ZodObject<{
11765
+ id: z.ZodString;
11766
+ organization_id: z.ZodString;
11767
+ project_id: z.ZodString;
11768
+ name: z.ZodString;
11769
+ type: z.ZodString;
11770
+ status: z.ZodString;
11771
+ description: z.ZodNullable<z.ZodString>;
11772
+ milestone_id: z.ZodNullable<z.ZodString>;
11773
+ parent_task_id: z.ZodNullable<z.ZodString>;
11774
+ due_date: z.ZodNullable<z.ZodString>;
11775
+ completed_at: z.ZodNullable<z.ZodString>;
11776
+ file_url: z.ZodNullable<z.ZodString>;
11777
+ checklist: z.ZodUnknown;
11778
+ resume_context: z.ZodNullable<z.ZodUnknown>;
11779
+ metadata: z.ZodNullable<z.ZodUnknown>;
11780
+ created_at: z.ZodString;
11781
+ updated_at: z.ZodString;
11782
+ }, z.core.$strip>>;
11783
+ company: z.ZodNullable<z.ZodObject<{
11784
+ id: z.ZodString;
11785
+ name: z.ZodString;
11786
+ domain: z.ZodNullable<z.ZodString>;
11787
+ }, z.core.$strip>>;
11788
+ deal: z.ZodNullable<z.ZodObject<{
11789
+ id: z.ZodString;
11790
+ clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11791
+ contactEmail: z.ZodString;
11792
+ stageKey: z.ZodNullable<z.ZodString>;
11793
+ stateKey: z.ZodNullable<z.ZodString>;
11794
+ sourceListId: z.ZodNullable<z.ZodString>;
11795
+ updatedAt: z.ZodString;
11796
+ }, z.core.$strip>>;
11797
+ client: z.ZodNullable<z.ZodObject<{
11798
+ id: z.ZodString;
11799
+ name: z.ZodString;
11800
+ status: z.ZodString;
11801
+ }, z.core.$strip>>;
11802
+ }, z.core.$strip>;
11803
+ }, z.core.$strip>;
11804
+ ProjectResponse: z.ZodObject<{
11805
+ project: z.ZodObject<{
11806
+ id: z.ZodString;
11807
+ organization_id: z.ZodString;
11808
+ name: z.ZodString;
11809
+ kind: z.ZodString;
11810
+ status: z.ZodString;
11811
+ description: z.ZodNullable<z.ZodString>;
11812
+ deal_id: z.ZodNullable<z.ZodString>;
11813
+ client_id: z.ZodNullable<z.ZodString>;
11814
+ client_company_id: z.ZodNullable<z.ZodString>;
11815
+ start_date: z.ZodNullable<z.ZodString>;
11816
+ target_end_date: z.ZodNullable<z.ZodString>;
11817
+ actual_end_date: z.ZodNullable<z.ZodString>;
11818
+ contract_value: z.ZodNullable<z.ZodNumber>;
11819
+ metadata: z.ZodNullable<z.ZodUnknown>;
11820
+ created_at: z.ZodString;
11821
+ updated_at: z.ZodString;
11822
+ }, z.core.$strip>;
11823
+ }, z.core.$strip>;
11824
+ MilestoneListResponse: z.ZodObject<{
11825
+ milestones: z.ZodArray<z.ZodObject<{
11826
+ id: z.ZodString;
11827
+ organization_id: z.ZodString;
11828
+ project_id: z.ZodString;
11829
+ name: z.ZodString;
11830
+ status: z.ZodString;
11831
+ description: z.ZodNullable<z.ZodString>;
11832
+ due_date: z.ZodNullable<z.ZodString>;
11833
+ completed_at: z.ZodNullable<z.ZodString>;
11834
+ sequence: z.ZodNumber;
11835
+ checklist: z.ZodNullable<z.ZodUnknown>;
11836
+ metadata: z.ZodNullable<z.ZodUnknown>;
11837
+ created_at: z.ZodString;
11838
+ updated_at: z.ZodString;
11839
+ }, z.core.$strip>>;
11840
+ }, z.core.$strip>;
11841
+ MilestoneResponse: z.ZodObject<{
11842
+ milestone: z.ZodObject<{
11843
+ id: z.ZodString;
11844
+ organization_id: z.ZodString;
11845
+ project_id: z.ZodString;
11846
+ name: z.ZodString;
11847
+ status: z.ZodString;
11848
+ description: z.ZodNullable<z.ZodString>;
11849
+ due_date: z.ZodNullable<z.ZodString>;
11850
+ completed_at: z.ZodNullable<z.ZodString>;
11851
+ sequence: z.ZodNumber;
11852
+ checklist: z.ZodNullable<z.ZodUnknown>;
11853
+ metadata: z.ZodNullable<z.ZodUnknown>;
11854
+ created_at: z.ZodString;
11855
+ updated_at: z.ZodString;
11856
+ }, z.core.$strip>;
11857
+ }, z.core.$strip>;
11858
+ TaskListResponse: z.ZodObject<{
11859
+ tasks: z.ZodArray<z.ZodObject<{
11860
+ id: z.ZodString;
11861
+ organization_id: z.ZodString;
11862
+ project_id: z.ZodString;
11863
+ name: z.ZodString;
11864
+ type: z.ZodString;
11865
+ status: z.ZodString;
11866
+ description: z.ZodNullable<z.ZodString>;
11867
+ milestone_id: z.ZodNullable<z.ZodString>;
11868
+ parent_task_id: z.ZodNullable<z.ZodString>;
11869
+ due_date: z.ZodNullable<z.ZodString>;
11870
+ completed_at: z.ZodNullable<z.ZodString>;
11871
+ file_url: z.ZodNullable<z.ZodString>;
11872
+ checklist: z.ZodUnknown;
11873
+ resume_context: z.ZodNullable<z.ZodUnknown>;
11874
+ metadata: z.ZodNullable<z.ZodUnknown>;
11875
+ created_at: z.ZodString;
11876
+ updated_at: z.ZodString;
11877
+ }, z.core.$strip>>;
11878
+ }, z.core.$strip>;
11879
+ TaskResponse: z.ZodObject<{
11880
+ task: z.ZodObject<{
11881
+ id: z.ZodString;
11882
+ organization_id: z.ZodString;
11883
+ project_id: z.ZodString;
11884
+ name: z.ZodString;
11885
+ type: z.ZodString;
11886
+ status: z.ZodString;
11887
+ description: z.ZodNullable<z.ZodString>;
11888
+ milestone_id: z.ZodNullable<z.ZodString>;
11889
+ parent_task_id: z.ZodNullable<z.ZodString>;
11890
+ due_date: z.ZodNullable<z.ZodString>;
11891
+ completed_at: z.ZodNullable<z.ZodString>;
11892
+ file_url: z.ZodNullable<z.ZodString>;
11893
+ checklist: z.ZodUnknown;
11894
+ resume_context: z.ZodNullable<z.ZodUnknown>;
11895
+ metadata: z.ZodNullable<z.ZodUnknown>;
11896
+ created_at: z.ZodString;
11897
+ updated_at: z.ZodString;
11898
+ }, z.core.$strip>;
11899
+ }, z.core.$strip>;
11900
+ TaskResumeContextResponse: z.ZodObject<{
11901
+ task: z.ZodObject<{
11902
+ id: z.ZodString;
11903
+ project_id: z.ZodString;
11904
+ resume_context: z.ZodNullable<z.ZodUnknown>;
11905
+ updated_at: z.ZodString;
11906
+ }, z.core.$strip>;
11907
+ }, z.core.$strip>;
11908
+ NoteListResponse: z.ZodObject<{
11909
+ notes: z.ZodArray<z.ZodObject<{
11910
+ id: z.ZodString;
11911
+ organization_id: z.ZodString;
11912
+ project_id: z.ZodString;
11913
+ content: z.ZodString;
11914
+ type: z.ZodString;
11915
+ summary: z.ZodNullable<z.ZodString>;
11916
+ task_id: z.ZodNullable<z.ZodString>;
11917
+ milestone_id: z.ZodNullable<z.ZodString>;
11918
+ occurred_at: z.ZodString;
11919
+ created_by: z.ZodNullable<z.ZodString>;
11920
+ created_at: z.ZodString;
11921
+ }, z.core.$strip>>;
11922
+ }, z.core.$strip>;
11923
+ NoteResponse: z.ZodObject<{
11924
+ note: z.ZodObject<{
11925
+ id: z.ZodString;
11926
+ organization_id: z.ZodString;
11927
+ project_id: z.ZodString;
11928
+ content: z.ZodString;
11929
+ type: z.ZodString;
11930
+ summary: z.ZodNullable<z.ZodString>;
11931
+ task_id: z.ZodNullable<z.ZodString>;
11932
+ milestone_id: z.ZodNullable<z.ZodString>;
11933
+ occurred_at: z.ZodString;
11934
+ created_by: z.ZodNullable<z.ZodString>;
11935
+ created_at: z.ZodString;
11936
+ }, z.core.$strip>;
11937
+ }, z.core.$strip>;
11938
+ DeleteSuccessResponse: z.ZodObject<{
11939
+ success: z.ZodBoolean;
11940
+ }, z.core.$strip>;
11704
11941
  };
11705
11942
 
11706
11943
  /**
@@ -12218,9 +12455,19 @@ type AttioToolMap = {
12218
12455
  result: DeleteNoteResult;
12219
12456
  };
12220
12457
  };
12458
+ /**
12459
+ * What a tenant actually passes to `scheduler.createSchedule`.
12460
+ *
12461
+ * `organizationId` is omitted because the caller never supplies it and cannot: the dispatcher injects
12462
+ * the authenticated org via `scopedOrganizationParams` and overwrites whatever arrived on the wire.
12463
+ * Declaring it required made every call site cast the field away -- three verbatim copies of the same
12464
+ * `as` in `packages/elevasis/operations` alone -- to satisfy a type describing the server's shape rather
12465
+ * than the tenant's. `NotificationSDKInput` below has always had this right.
12466
+ */
12467
+ type CreateScheduleSDKInput = Omit<CreateScheduleInput, 'organizationId'>;
12221
12468
  type SchedulerToolMap = {
12222
12469
  createSchedule: {
12223
- params: CreateScheduleInput;
12470
+ params: CreateScheduleSDKInput;
12224
12471
  result: TaskSchedule;
12225
12472
  };
12226
12473
  updateAnchor: {
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineStep, defineTopology, defineTopologyRelationship, defineWorkflow, defineWorkflowConfig, deriveActions, diagnosticOutput, integrationInput, isBuiltInReadinessProfile, isZodType, lookupReadinessProfile, parseTopologyNodeRef, registerReadinessProfile, resolveContractRef, runDiagnostic, splitName, topologyRef, topologyRelationship, validateDeclaredSystemInterfaceReadiness, validateResourceGovernance } from './chunk-YJDXRHNP.js';
1
+ export { ActivityEventSchema, BuildPlanSnapshotStepSchema, ProspectingBuildTemplateSchema as BuildTemplateSchema, ContractRefResolutionError, CrmStageKeySchema, CrmStateKeySchema, EmailSchema, ExecutionError, ListBuilderStageKeySchema, ProcessingStageStatusSchema, RegistryValidationError, ResourceRegistry, StepType, ToolingError, bindResourceDescriptor, compileBusinessOntologyValidationIndex, concurrentPool, createLeadGenStageValidators, defineContract, defineResource, defineResourceOntology, defineResources, defineStep, defineTopology, defineTopologyRelationship, defineWorkflow, defineWorkflowConfig, deriveActions, diagnosticOutput, integrationInput, isBuiltInReadinessProfile, isZodType, lookupReadinessProfile, parseTopologyNodeRef, registerReadinessProfile, resolveContractRef, runDiagnostic, splitName, topologyRef, topologyRelationship, validateDeclaredSystemInterfaceReadiness, validateResourceGovernance } from './chunk-XC57JNMA.js';
2
2
  export { projectDeploymentSpec, projectTopologyRelationships, toSdkResourceDescriptor, withPlatformAgentResourceDescriptor, withPlatformAgentResourceDescriptors, withPlatformIntegrationResourceDescriptor, withPlatformIntegrationResourceDescriptors, withPlatformResourceDescriptor, withPlatformResourceDescriptors } from './chunk-VYWGWJRW.js';
@@ -1,4 +1,4 @@
1
- import { WorkflowDefinition, DeploymentSpec, SDKLLMGenerateParams, LLMGenerateResponse, AnymailfinderToolMap, ApifyToolMap, AttioToolMap, DropboxToolMap, GmailToolMap, GoogleSheetsToolMap, InstantlyToolMap, MillionVerifierToolMap, ResendToolMap, SignatureApiToolMap, StripeToolMap, TombaToolMap, LeadToolMap, ApprovalToolMap, ArtifactsToolMap, ContentToolMap, CrmToolMap, EmailToolMap, ExecutionToolMap, ListToolMap, NotificationToolMap, PdfToolMap, ProjectsToolMap, SchedulerToolMap, StorageToolMap } from '@elevasis/sdk';
1
+ import { WorkflowDefinition, DeploymentSpec, SDKLLMGenerateParams, LLMGenerateResponse, AnymailfinderToolMap, ApifyToolMap, AttioToolMap, DropboxToolMap, GmailToolMap, GoogleSheetsToolMap, InstagramToolMap, InstantlyToolMap, MillionVerifierToolMap, ResendToolMap, SignatureApiToolMap, StripeToolMap, TombaToolMap, LeadToolMap, ApprovalToolMap, ArtifactsToolMap, ContentToolMap, CrmToolMap, EmailToolMap, ExecutionToolMap, ListToolMap, NotificationToolMap, PdfToolMap, ProjectsToolMap, SchedulerToolMap, StorageToolMap } from '@elevasis/sdk';
2
2
  import { LogEntry, TypedAdapter } from '@elevasis/sdk/worker';
3
3
 
4
4
  interface RunWorkflowContext {
@@ -81,6 +81,17 @@ declare const createMockApify: (_credential: string, overrides?: MockAdapterOver
81
81
  declare const createMockDropbox: (_credential: string, overrides?: MockAdapterOverrides<DropboxToolMap>) => TypedAdapter<DropboxToolMap>;
82
82
  declare const createMockGmail: (_credential: string, overrides?: MockAdapterOverrides<GmailToolMap>) => TypedAdapter<GmailToolMap>;
83
83
  declare const createMockGoogleSheets: (_credential: string, overrides?: MockAdapterOverrides<GoogleSheetsToolMap>) => TypedAdapter<GoogleSheetsToolMap>;
84
+ /**
85
+ * Instagram is the one integration here whose workflow performs an action that cannot be undone --
86
+ * `publishContainer` puts a post on a real account. Test a composed publish pipeline against this
87
+ * mock rather than against the live adapter.
88
+ *
89
+ * Two methods are worth overriding deliberately rather than letting them return `undefined`:
90
+ * `getContainerStatus`, because a publish sequence polls it until the container reports `FINISHED`
91
+ * and an un-overridden mock never gets there, and `refreshToken`, whose `expiresIn` the adapter
92
+ * turns into the stored `expiresAt`.
93
+ */
94
+ declare const createMockInstagram: (_credential: string, overrides?: MockAdapterOverrides<InstagramToolMap>) => TypedAdapter<InstagramToolMap>;
84
95
  declare const createMockInstantly: (_credential: string, overrides?: MockAdapterOverrides<InstantlyToolMap>) => TypedAdapter<InstantlyToolMap>;
85
96
  declare const createMockTomba: (_credential: string, overrides?: MockAdapterOverrides<TombaToolMap>) => TypedAdapter<TombaToolMap>;
86
97
  declare const createMockResend: (_credential: string, overrides?: MockAdapterOverrides<ResendToolMap>) => TypedAdapter<ResendToolMap>;
@@ -89,5 +100,5 @@ declare const createMockStripe: (_credential: string, overrides?: MockAdapterOve
89
100
  declare const createMockAnymailfinder: (_credential: string, overrides?: MockAdapterOverrides<AnymailfinderToolMap>) => TypedAdapter<AnymailfinderToolMap>;
90
101
  declare const createMockMillionVerifier: (_credential: string, overrides?: MockAdapterOverrides<MillionVerifierToolMap>) => TypedAdapter<MillionVerifierToolMap>;
91
102
 
92
- export { assertResourceRegistry, createMockAnymailfinder, createMockApify, createMockAttio, createMockDropbox, createMockGmail, createMockGoogleSheets, createMockInstantly, createMockMillionVerifier, createMockResend, createMockSignatureApi, createMockStripe, createMockTomba, mockAcqDb, mockApproval, mockArtifacts, mockContent, mockCrm, mockEmail, mockExecution, mockList, mockLlm, mockNotifications, mockPdf, mockProjects, mockScheduler, mockStorage, runLinearWorkflow, runWorkflow };
103
+ export { assertResourceRegistry, createMockAnymailfinder, createMockApify, createMockAttio, createMockDropbox, createMockGmail, createMockGoogleSheets, createMockInstagram, createMockInstantly, createMockMillionVerifier, createMockResend, createMockSignatureApi, createMockStripe, createMockTomba, mockAcqDb, mockApproval, mockArtifacts, mockContent, mockCrm, mockEmail, mockExecution, mockList, mockLlm, mockNotifications, mockPdf, mockProjects, mockScheduler, mockStorage, runLinearWorkflow, runWorkflow };
93
104
  export type { AssertResourceRegistryOptions, LinearWorkflowStepEvent, MockAdapterOverrides, MockLlmAdapter, RunLinearWorkflowContext, RunLinearWorkflowOptions, RunLinearWorkflowResult, RunWorkflowContext, RunWorkflowOptions, RunWorkflowResult, WorkflowStepEvent };