thinkwork-cli 0.12.4 → 0.12.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/cli.js CHANGED
@@ -4643,6 +4643,8 @@ var CliScheduledJobsDocument = { "kind": "Document", "definitions": [{ "kind": "
4643
4643
  var CliScheduledJobDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "CliScheduledJob" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "scheduledJob" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "triggerType" } }, { "kind": "Field", "name": { "kind": "Name", "value": "agentId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "routineId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "prompt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scheduleType" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scheduleExpression" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timezone" } }, { "kind": "Field", "name": { "kind": "Name", "value": "enabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "ebScheduleName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "lastRunAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "nextRunAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] };
4644
4644
  var CliCreateScheduledJobDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CliCreateScheduledJob" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "CreateScheduledJobInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "createScheduledJob" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "enabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scheduleExpression" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timezone" } }] } }] } }] };
4645
4645
  var CliDeleteScheduledJobDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CliDeleteScheduledJob" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "deleteScheduledJob" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "ok" } }] } }] } }] };
4646
+ var CliRunScheduledJobDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CliRunScheduledJob" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "runScheduledJob" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "dispatched" } }, { "kind": "Field", "name": { "kind": "Name", "value": "statusCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "errorMessage" } }] } }] } }] };
4647
+ var CliUpdateScheduledJobDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CliUpdateScheduledJob" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateScheduledJobInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateScheduledJob" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "id" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "id" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "enabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scheduleType" } }, { "kind": "Field", "name": { "kind": "Name", "value": "scheduleExpression" } }, { "kind": "Field", "name": { "kind": "Name", "value": "timezone" } }, { "kind": "Field", "name": { "kind": "Name", "value": "nextRunAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] };
4646
4648
  var CliSchedJobTenantBySlugDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "CliSchedJobTenantBySlug" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "slug" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "tenantBySlug" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "slug" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "slug" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }] };
4647
4649
  var CliSkillCatalogDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "CliSkillCatalog" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "skillCatalog" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "skillId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "displayName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "category" } }, { "kind": "Field", "name": { "kind": "Name", "value": "icon" } }, { "kind": "Field", "name": { "kind": "Name", "value": "source" } }, { "kind": "Field", "name": { "kind": "Name", "value": "enabled" } }] } }] } }] };
4648
4650
  var CliSkillTenantBySlugDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "CliSkillTenantBySlug" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "slug" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "tenantBySlug" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "slug" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "slug" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }] };
@@ -4820,6 +4822,8 @@ var documents = {
4820
4822
  "\n query CliScheduledJob($id: ID!) {\n scheduledJob(id: $id) {\n id\n name\n description\n triggerType\n agentId\n routineId\n prompt\n scheduleType\n scheduleExpression\n timezone\n enabled\n ebScheduleName\n lastRunAt\n nextRunAt\n createdAt\n updatedAt\n }\n }\n": CliScheduledJobDocument,
4821
4823
  "\n mutation CliCreateScheduledJob($input: CreateScheduledJobInput!) {\n createScheduledJob(input: $input) {\n id\n name\n enabled\n scheduleExpression\n timezone\n }\n }\n": CliCreateScheduledJobDocument,
4822
4824
  "\n mutation CliDeleteScheduledJob($id: ID!) {\n deleteScheduledJob(id: $id) {\n id\n ok\n }\n }\n": CliDeleteScheduledJobDocument,
4825
+ "\n mutation CliRunScheduledJob($id: ID!) {\n runScheduledJob(id: $id) {\n id\n dispatched\n statusCode\n errorMessage\n }\n }\n": CliRunScheduledJobDocument,
4826
+ "\n mutation CliUpdateScheduledJob($id: ID!, $input: UpdateScheduledJobInput!) {\n updateScheduledJob(id: $id, input: $input) {\n id\n name\n enabled\n scheduleType\n scheduleExpression\n timezone\n nextRunAt\n updatedAt\n }\n }\n": CliUpdateScheduledJobDocument,
4823
4827
  "\n query CliSchedJobTenantBySlug($slug: String!) {\n tenantBySlug(slug: $slug) {\n id\n }\n }\n": CliSchedJobTenantBySlugDocument,
4824
4828
  "\n query CliSkillCatalog {\n skillCatalog {\n id\n skillId\n displayName\n description\n category\n icon\n source\n enabled\n }\n }\n": CliSkillCatalogDocument,
4825
4829
  "\n query CliSkillTenantBySlug($slug: String!) {\n tenantBySlug(slug: $slug) {\n id\n }\n }\n": CliSkillTenantBySlugDocument,
@@ -9941,6 +9945,30 @@ var DeleteScheduledJobDoc = graphql(`
9941
9945
  }
9942
9946
  }
9943
9947
  `);
9948
+ var RunScheduledJobDoc = graphql(`
9949
+ mutation CliRunScheduledJob($id: ID!) {
9950
+ runScheduledJob(id: $id) {
9951
+ id
9952
+ dispatched
9953
+ statusCode
9954
+ errorMessage
9955
+ }
9956
+ }
9957
+ `);
9958
+ var UpdateScheduledJobDoc = graphql(`
9959
+ mutation CliUpdateScheduledJob($id: ID!, $input: UpdateScheduledJobInput!) {
9960
+ updateScheduledJob(id: $id, input: $input) {
9961
+ id
9962
+ name
9963
+ enabled
9964
+ scheduleType
9965
+ scheduleExpression
9966
+ timezone
9967
+ nextRunAt
9968
+ updatedAt
9969
+ }
9970
+ }
9971
+ `);
9944
9972
  var SchedJobTenantBySlugDoc = graphql(`
9945
9973
  query CliSchedJobTenantBySlug($slug: String!) {
9946
9974
  tenantBySlug(slug: $slug) {
@@ -10134,13 +10162,74 @@ async function runSchedDelete(id, opts) {
10134
10162
  );
10135
10163
  }
10136
10164
  }
10137
- function notYetImplementedAtApi(verb) {
10138
- printError(
10139
- `\`scheduled-job ${verb}\` is not yet implemented at the GraphQL API.
10140
- The server only exposes scheduledJobs / scheduledJob / createScheduledJob today.
10141
- Use the admin UI for update/delete/run operations; CLI parity is tracked as a Phase-3 follow-up.`
10165
+ async function runSchedUpdate(id, opts) {
10166
+ const ctx = await resolveSchedContext(opts);
10167
+ const input20 = {};
10168
+ if (opts.name !== void 0) input20.name = opts.name;
10169
+ if (opts.description !== void 0) input20.description = opts.description;
10170
+ if (opts.prompt !== void 0) input20.prompt = opts.prompt;
10171
+ if (opts.schedule !== void 0) {
10172
+ input20.scheduleExpression = opts.schedule;
10173
+ input20.scheduleType = opts.schedule.trim().startsWith("cron(") ? "cron" : "rate";
10174
+ }
10175
+ if (opts.timezone !== void 0) input20.timezone = opts.timezone;
10176
+ if (opts.payload !== void 0) {
10177
+ try {
10178
+ input20.config = JSON.stringify(JSON.parse(opts.payload));
10179
+ } catch (err) {
10180
+ printError(`--payload is not valid JSON: ${err.message}`);
10181
+ process.exit(1);
10182
+ }
10183
+ }
10184
+ if (opts.enable && opts.disable) {
10185
+ printError("--enable and --disable are mutually exclusive.");
10186
+ process.exit(1);
10187
+ }
10188
+ if (opts.enable) input20.enabled = true;
10189
+ if (opts.disable) input20.enabled = false;
10190
+ if (Object.keys(input20).length === 0) {
10191
+ printError(
10192
+ "Nothing to update. Pass at least one of --schedule, --timezone, --payload, --enable/--disable, --name, --description, --prompt."
10193
+ );
10194
+ process.exit(1);
10195
+ }
10196
+ const data = await gqlMutate(ctx.client, UpdateScheduledJobDoc, {
10197
+ id,
10198
+ input: input20
10199
+ });
10200
+ if (isJsonMode()) {
10201
+ printJson(data.updateScheduledJob);
10202
+ return;
10203
+ }
10204
+ const job = data.updateScheduledJob;
10205
+ printSuccess(
10206
+ `Updated scheduled job ${job.id} \u2014 ${job.name} (${job.scheduleExpression}, ${job.timezone}, ${job.enabled ? "enabled" : "disabled"}).`
10142
10207
  );
10143
- process.exit(2);
10208
+ }
10209
+ async function runSchedRun(id, opts) {
10210
+ const ctx = await resolveSchedContext(opts);
10211
+ const data = await gqlMutate(ctx.client, RunScheduledJobDoc, { id });
10212
+ const result = data.runScheduledJob;
10213
+ if (isJsonMode()) {
10214
+ printJson(result);
10215
+ if (!result.dispatched) process.exit(1);
10216
+ return;
10217
+ }
10218
+ if (result.dispatched) {
10219
+ printSuccess(
10220
+ `Dispatched scheduled job ${result.id} (status ${result.statusCode ?? "\u2014"}). Downstream side effects run asynchronously.`
10221
+ );
10222
+ if (opts.wait) {
10223
+ console.log(
10224
+ ` --wait is not yet implemented on the API side; check ${result.id}'s last_run_at via \`scheduled-job get\`.`
10225
+ );
10226
+ }
10227
+ } else {
10228
+ printError(
10229
+ `Dispatch failed: ${result.errorMessage ?? "unknown reason"} (status ${result.statusCode ?? "\u2014"}).`
10230
+ );
10231
+ process.exit(1);
10232
+ }
10144
10233
  }
10145
10234
  function registerScheduledJobCommand(program2) {
10146
10235
  const job = program2.command("scheduled-job").alias("cron").description("Manage AWS-Scheduler-backed recurring agent jobs (wakeups on a cadence).");
@@ -10157,11 +10246,15 @@ Examples:
10157
10246
  $ thinkwork scheduled-job create "Hourly check" --agent agt-check --schedule "rate(1 hour)"
10158
10247
  `
10159
10248
  ).action(runSchedCreate);
10160
- job.command("update <id>").description("Update a scheduled job. (API surface pending \u2014 currently a no-op.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--schedule <expr>").option("--timezone <tz>").option("--payload <json>").option("--enable").option("--disable").action(() => notYetImplementedAtApi("update"));
10249
+ job.command("update <id>").description(
10250
+ "Update a scheduled job. Changes the EventBridge schedule when --schedule / --timezone / --enable / --disable are passed; partial-update otherwise."
10251
+ ).option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--schedule <expr>", "EventBridge schedule (cron(\u2026) or rate(\u2026))").option("--timezone <tz>").option("--payload <json>", "Payload to pass to the agent/routine").option("--enable", "Re-enable a paused job").option("--disable", "Pause without deleting").option("--name <text>").option("--description <text>").option("--prompt <text>").action(runSchedUpdate);
10161
10252
  job.command("delete <id>").description(
10162
10253
  "Delete a scheduled job. Deprovisions the EventBridge schedule first, then removes the row."
10163
10254
  ).option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("-y, --yes", "Skip confirmation").action(runSchedDelete);
10164
- job.command("run <id>").description("Trigger a scheduled job immediately. (API surface pending.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--wait", "Block until the run completes").action(() => notYetImplementedAtApi("run"));
10255
+ job.command("run <id>").description(
10256
+ "Fire a scheduled job once, immediately. Bypasses the EventBridge schedule; downstream side effects (thread turn, routine run) remain async."
10257
+ ).option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--wait", "(not yet supported server-side; reserved for future)").action(runSchedRun);
10165
10258
  }
10166
10259
 
10167
10260
  // src/commands/turn.ts
@@ -10918,7 +11011,7 @@ async function runWebhookDeliveries(id, opts) {
10918
11011
  ]
10919
11012
  );
10920
11013
  }
10921
- function notYetImplementedAtApi2(verb) {
11014
+ function notYetImplementedAtApi(verb) {
10922
11015
  printError(
10923
11016
  `\`webhook ${verb}\` is not yet implemented at the GraphQL API.
10924
11017
  Use admin UI for now; CLI parity is tracked as a Phase-3 follow-up.`
@@ -10938,7 +11031,7 @@ Examples:
10938
11031
  ).action(runWebhookCreate);
10939
11032
  wh.command("update <id>").description("Update a webhook's target, rate limit, or enabled state.").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--target-type <t>").option("--target-id <id>").option("--rate-limit <rpm>").option("--allowed-ips <csv>").option("--enable").option("--disable").action(runWebhookUpdate);
10940
11033
  wh.command("delete <id>").description("Delete a webhook (its URL stops working immediately).").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("-y, --yes", "Skip confirmation").action(runWebhookDelete);
10941
- wh.command("test <id>").description("Send a synthetic payload to the webhook. (API surface pending.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--payload <json>").action(() => notYetImplementedAtApi2("test"));
11034
+ wh.command("test <id>").description("Send a synthetic payload to the webhook. (API surface pending.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--payload <json>").action(() => notYetImplementedAtApi("test"));
10942
11035
  wh.command("rotate <id>").description("Generate a new token for an existing webhook.").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("-y, --yes", "Skip confirmation").action(runWebhookRotate);
10943
11036
  wh.command("deliveries <id>").description(
10944
11037
  "Show recent delivery attempts for a webhook (newest first). Default 25, max 500."
@@ -11246,7 +11339,7 @@ async function runSkillList(opts) {
11246
11339
  ]
11247
11340
  );
11248
11341
  }
11249
- function notYetImplementedAtApi3(verb) {
11342
+ function notYetImplementedAtApi2(verb) {
11250
11343
  printError(
11251
11344
  `\`skill ${verb}\` is not yet implemented at the GraphQL API.
11252
11345
  The current schema exposes skillCatalog (read), per-computer enableSkill/disableSkill,
@@ -11262,11 +11355,11 @@ function registerSkillCommand(program2) {
11262
11355
  );
11263
11356
  skill.command("catalog").description("Browse the skill catalog. Client-side filters --search and --tag are applied locally.").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--search <q>", "Filter by keyword").option("--tag <t>", "Filter by category").action(runSkillCatalog);
11264
11357
  skill.command("list").alias("ls").description("List skills available to the tenant.").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--custom-only", "Only show tenant-owned custom skills (source=tenant)").action(runSkillList);
11265
- skill.command("install <slug>").description("Install a public skill. (API surface pending \u2014 toggle per-agent via `agent skills set`.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--version <v>", "Pin to a specific version").action(() => notYetImplementedAtApi3("install"));
11266
- skill.command("upgrade <slug>").description("Upgrade an installed skill. (API surface pending.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").action(() => notYetImplementedAtApi3("upgrade"));
11267
- skill.command("create [slug]").description("Publish a custom tenant-scoped skill. (Use `skill push <folder>` for now.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--name <n>").option("--description <text>").option("--manifest-file <path>", "Path to the MCP server manifest JSON").option("--endpoint <url>", "MCP server HTTP/SSE endpoint").action(() => notYetImplementedAtApi3("create"));
11268
- skill.command("update <slug>").description("Update a custom skill. (API surface pending.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--name <n>").option("--description <text>").option("--manifest-file <path>").option("--endpoint <url>").action(() => notYetImplementedAtApi3("update"));
11269
- skill.command("delete <slug>").description("Delete a custom skill. (API surface pending.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("-y, --yes", "Skip confirmation").action(() => notYetImplementedAtApi3("delete"));
11358
+ skill.command("install <slug>").description("Install a public skill. (API surface pending \u2014 toggle per-agent via `agent skills set`.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--version <v>", "Pin to a specific version").action(() => notYetImplementedAtApi2("install"));
11359
+ skill.command("upgrade <slug>").description("Upgrade an installed skill. (API surface pending.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").action(() => notYetImplementedAtApi2("upgrade"));
11360
+ skill.command("create [slug]").description("Publish a custom tenant-scoped skill. (Use `skill push <folder>` for now.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--name <n>").option("--description <text>").option("--manifest-file <path>", "Path to the MCP server manifest JSON").option("--endpoint <url>", "MCP server HTTP/SSE endpoint").action(() => notYetImplementedAtApi2("create"));
11361
+ skill.command("update <slug>").description("Update a custom skill. (API surface pending.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("--name <n>").option("--description <text>").option("--manifest-file <path>").option("--endpoint <url>").action(() => notYetImplementedAtApi2("update"));
11362
+ skill.command("delete <slug>").description("Delete a custom skill. (API surface pending.)").option("-s, --stage <name>", "Deployment stage").option("-t, --tenant <slug>", "Tenant slug").option("-y, --yes", "Skip confirmation").action(() => notYetImplementedAtApi2("delete"));
11270
11363
  skill.command("push <folder>").description(
11271
11364
  "Zip a local plugin folder and upload it to the tenant as a pending plugin."
11272
11365
  ).option("-s, --stage <name>", "Deployment stage").option("--region <name>", "AWS region", "us-east-1").addHelpText(
@@ -181,6 +181,30 @@ variable "wiki_compile_model_id" {
181
181
  default = "openai.gpt-oss-120b-1:0"
182
182
  }
183
183
 
184
+ variable "requester_idle_memory_learning_enabled" {
185
+ description = "Enable requester-scoped 15-minute idle memory learning."
186
+ type = bool
187
+ default = true
188
+ }
189
+
190
+ variable "requester_memory_dreaming_enabled" {
191
+ description = "Enable recurring requester memory dreaming sweeps."
192
+ type = bool
193
+ default = true
194
+ }
195
+
196
+ variable "requester_memory_dreaming_schedule_expression" {
197
+ description = "EventBridge Scheduler expression for requester memory dreaming sweeps."
198
+ type = string
199
+ default = "cron(30 4 * * ? *)"
200
+ }
201
+
202
+ variable "requester_memory_dreaming_model_id" {
203
+ description = "Bedrock Converse model id for requester memory REM reflection."
204
+ type = string
205
+ default = "openai.gpt-oss-120b-1:0"
206
+ }
207
+
184
208
  variable "company_brain_source_agent_model_id" {
185
209
  description = <<-EOT
186
210
  Bedrock model id the GraphQL Company Brain source-agent runtime uses
@@ -411,13 +435,17 @@ module "thinkwork" {
411
435
  # Wiki compile Lambda config. Pinned so unrelated terraform applies
412
436
  # don't wipe the Bedrock model or the aggregation flag back to
413
437
  # whatever the Lambda env defaults to.
414
- wiki_compile_model_id = var.wiki_compile_model_id
415
- company_brain_source_agent_model_id = var.company_brain_source_agent_model_id
416
- wiki_aggregation_pass_enabled = var.wiki_aggregation_pass_enabled
417
- wiki_deterministic_linking_enabled = var.wiki_deterministic_linking_enabled
418
- google_places_api_key = var.google_places_api_key
419
- nova_act_api_key = var.nova_act_api_key
420
- agentcore_code_interpreter_id = var.agentcore_code_interpreter_id
438
+ wiki_compile_model_id = var.wiki_compile_model_id
439
+ company_brain_source_agent_model_id = var.company_brain_source_agent_model_id
440
+ wiki_aggregation_pass_enabled = var.wiki_aggregation_pass_enabled
441
+ wiki_deterministic_linking_enabled = var.wiki_deterministic_linking_enabled
442
+ google_places_api_key = var.google_places_api_key
443
+ requester_idle_memory_learning_enabled = var.requester_idle_memory_learning_enabled
444
+ requester_memory_dreaming_enabled = var.requester_memory_dreaming_enabled
445
+ requester_memory_dreaming_schedule_expression = var.requester_memory_dreaming_schedule_expression
446
+ requester_memory_dreaming_model_id = var.requester_memory_dreaming_model_id
447
+ nova_act_api_key = var.nova_act_api_key
448
+ agentcore_code_interpreter_id = var.agentcore_code_interpreter_id
421
449
 
422
450
  # Mapbox public token for apps/computer MapView primitive. Flows through
423
451
  # to scripts/build-computer.sh → VITE_MAPBOX_PUBLIC_TOKEN.
@@ -271,15 +271,16 @@ resource "aws_lambda_function" "agentcore_flue" {
271
271
 
272
272
  environment {
273
273
  variables = {
274
- PORT = "8080"
275
- AWS_LWA_PORT = "8080"
276
- AGENTCORE_MEMORY_ID = var.agentcore_memory_id
277
- AGENTCORE_FILES_BUCKET = var.bucket_name
278
- MEMORY_ENGINE = var.memory_engine
279
- MEMORY_RETAIN_FN_NAME = local.memory_retain_fn_name
280
- HINDSIGHT_ENDPOINT = var.hindsight_endpoint
281
- THINKWORK_API_URL = var.api_endpoint
282
- API_AUTH_SECRET = var.api_auth_secret
274
+ PORT = "8080"
275
+ AWS_LWA_PORT = "8080"
276
+ AGENTCORE_MEMORY_ID = var.agentcore_memory_id
277
+ AGENTCORE_FILES_BUCKET = var.bucket_name
278
+ MEMORY_ENGINE = var.memory_engine
279
+ REQUESTER_IDLE_MEMORY_LEARNING_ENABLED = tostring(var.requester_idle_memory_learning_enabled)
280
+ MEMORY_RETAIN_FN_NAME = local.memory_retain_fn_name
281
+ HINDSIGHT_ENDPOINT = var.hindsight_endpoint
282
+ THINKWORK_API_URL = var.api_endpoint
283
+ API_AUTH_SECRET = var.api_auth_secret
283
284
  # Plan §005 U4 — AuroraSessionStore uses the RDS Data API to persist
284
285
  # Flue's SessionData blobs against threads.session_data. Empty during
285
286
  # the first greenfield apply (DB cluster doesn't exist yet); the
@@ -78,6 +78,12 @@ variable "memory_engine" {
78
78
  }
79
79
  }
80
80
 
81
+ variable "requester_idle_memory_learning_enabled" {
82
+ description = "When true, requester memory learning runs through the API idle/dreaming pipeline instead of runtime retain-on-every-turn."
83
+ type = bool
84
+ default = false
85
+ }
86
+
81
87
  variable "db_cluster_arn" {
82
88
  description = "Aurora DB cluster ARN. Injected as DB_CLUSTER_ARN so AuroraSessionStore (plan §005 U4) can target the cluster via the RDS Data API. The cluster's IAM resource scope (thinkwork-<stage>-db-* in agentcore-flue's role policy) covers any cluster-id suffix."
83
89
  type = string
@@ -68,6 +68,12 @@ variable "memory_engine" {
68
68
  }
69
69
  }
70
70
 
71
+ variable "requester_idle_memory_learning_enabled" {
72
+ description = "When true, requester memory learning runs through the API idle/dreaming pipeline instead of runtime retain-on-every-turn."
73
+ type = bool
74
+ default = false
75
+ }
76
+
71
77
  # memory-retain Lambda name + ARN are constructed locally rather than
72
78
  # taken as inputs to avoid a circular dependency: the lambda-api module
73
79
  # already consumes this module's outputs (agentcore_function_name/arn).
@@ -336,12 +342,13 @@ resource "aws_lambda_function" "agentcore" {
336
342
 
337
343
  environment {
338
344
  variables = {
339
- PORT = "8080"
340
- AWS_LWA_PORT = "8080"
341
- AGENTCORE_MEMORY_ID = var.agentcore_memory_id
342
- AGENTCORE_FILES_BUCKET = var.bucket_name
343
- MEMORY_ENGINE = var.memory_engine
344
- MEMORY_RETAIN_FN_NAME = local.memory_retain_fn_name
345
+ PORT = "8080"
346
+ AWS_LWA_PORT = "8080"
347
+ AGENTCORE_MEMORY_ID = var.agentcore_memory_id
348
+ AGENTCORE_FILES_BUCKET = var.bucket_name
349
+ MEMORY_ENGINE = var.memory_engine
350
+ REQUESTER_IDLE_MEMORY_LEARNING_ENABLED = tostring(var.requester_idle_memory_learning_enabled)
351
+ MEMORY_RETAIN_FN_NAME = local.memory_retain_fn_name
345
352
  # Needed by run_skill_dispatch.py to POST terminal state back to
346
353
  # /api/skills/complete after a composition run finishes.
347
354
  THINKWORK_API_URL = var.api_endpoint
@@ -187,6 +187,16 @@ locals {
187
187
  # handler and pushed ~70 Lambdas over quota.
188
188
  "computer-manager" = local.computer_runtime_control_env
189
189
  "computer-runtime-reconciler" = local.computer_runtime_control_env
190
+ "computer-runtime" = {
191
+ REQUESTER_IDLE_MEMORY_LEARNING_ENABLED = tostring(var.requester_idle_memory_learning_enabled)
192
+ }
193
+ "thread-attachments-finalize" = {
194
+ REQUESTER_IDLE_MEMORY_LEARNING_ENABLED = tostring(var.requester_idle_memory_learning_enabled)
195
+ }
196
+ "requester-memory-dreaming" = {
197
+ REQUESTER_MEMORY_DREAMING_ENABLED = tostring(var.requester_memory_dreaming_enabled)
198
+ REQUESTER_MEMORY_DREAMING_MODEL_ID = var.requester_memory_dreaming_model_id
199
+ }
190
200
  "mcp-context-engine" = {
191
201
  CONTEXT_ENGINE_MEMORY_QUERY_MODE = "reflect"
192
202
  CONTEXT_ENGINE_MEMORY_TIMEOUT_MS = "20000"
@@ -221,6 +231,8 @@ locals {
221
231
  ROUTINE_TASK_PYTHON_FUNCTION_NAME = "thinkwork-${var.stage}-api-routine-task-python"
222
232
  ADMIN_OPS_MCP_FUNCTION_NAME = "thinkwork-${var.stage}-api-admin-ops-mcp"
223
233
  SLACK_SEND_FUNCTION_NAME = "thinkwork-${var.stage}-api-slack-send"
234
+ # requester idle memory learning defaults on in API code so this
235
+ # env-heavy Lambda can stay below AWS's 4 KB environment limit.
224
236
  # Phase 3 U10 — compliance read resolvers (complianceEvents,
225
237
  # complianceEvent, complianceEventByHash) connect to Aurora as
226
238
  # the compliance_reader role. The existing lambda_secrets policy
@@ -309,6 +321,7 @@ resource "aws_lambda_function" "handler" {
309
321
  "guardrails",
310
322
  "scheduled-jobs",
311
323
  "thread-idle-memory-learning",
324
+ "requester-memory-dreaming",
312
325
  "job-schedule-manager",
313
326
  "job-trigger",
314
327
  "routine-task-weather-email",
@@ -500,8 +513,8 @@ resource "aws_lambda_function" "handler" {
500
513
  # routine-task-python wraps a 300s sandbox session and needs headroom
501
514
  # for the Start/Invoke/Stop/S3-offload round trip; 360s leaves ~60s
502
515
  # for AWS-call setup and offload after the sandbox's own ceiling.
503
- timeout = each.key == "wakeup-processor" ? 300 : each.key == "chat-agent-invoke" ? 300 : each.key == "workspace-event-dispatcher" ? 60 : each.key == "eval-runner" ? 900 : each.key == "eval-worker" ? 240 : each.key == "wiki-compile" ? 480 : each.key == "ontology-scan" ? 300 : each.key == "ontology-reprocess" ? 300 : each.key == "wiki-lint" ? 300 : each.key == "wiki-export" ? 600 : each.key == "wiki-bootstrap-import" ? 900 : each.key == "folder-bundle-import" ? 300 : each.key == "routine-task-python" ? 360 : 30
504
- memory_size = each.key == "graphql-http" ? 512 : each.key == "wakeup-processor" ? 512 : each.key == "workspace-event-dispatcher" ? 512 : each.key == "eval-runner" ? 512 : each.key == "eval-worker" ? 512 : each.key == "wiki-compile" ? 1024 : each.key == "ontology-scan" ? 512 : each.key == "wiki-export" ? 1024 : each.key == "wiki-bootstrap-import" ? 1024 : each.key == "folder-bundle-import" ? 1024 : 256
516
+ timeout = each.key == "wakeup-processor" ? 300 : each.key == "chat-agent-invoke" ? 300 : each.key == "workspace-event-dispatcher" ? 60 : each.key == "eval-runner" ? 900 : each.key == "eval-worker" ? 240 : each.key == "wiki-compile" ? 480 : each.key == "requester-memory-dreaming" ? 300 : each.key == "ontology-scan" ? 300 : each.key == "ontology-reprocess" ? 300 : each.key == "wiki-lint" ? 300 : each.key == "wiki-export" ? 600 : each.key == "wiki-bootstrap-import" ? 900 : each.key == "folder-bundle-import" ? 300 : each.key == "routine-task-python" ? 360 : 30
517
+ memory_size = each.key == "graphql-http" ? 512 : each.key == "wakeup-processor" ? 512 : each.key == "workspace-event-dispatcher" ? 512 : each.key == "eval-runner" ? 512 : each.key == "eval-worker" ? 512 : each.key == "wiki-compile" ? 1024 : each.key == "requester-memory-dreaming" ? 512 : each.key == "ontology-scan" ? 512 : each.key == "wiki-export" ? 1024 : each.key == "wiki-bootstrap-import" ? 1024 : each.key == "folder-bundle-import" ? 1024 : 256
505
518
 
506
519
  filename = local.use_local_zips ? "${var.lambda_zips_dir}/${each.key}.zip" : null
507
520
  source_code_hash = local.use_local_zips ? filebase64sha256("${var.lambda_zips_dir}/${each.key}.zip") : null
@@ -1145,6 +1158,28 @@ resource "aws_scheduler_schedule" "plugin_staging_sweeper" {
1145
1158
  }
1146
1159
  }
1147
1160
 
1161
+ # ---------------------------------------------------------------------------
1162
+ # Requester memory dreaming — broad per-user memory compaction/reflection sweep
1163
+ # ---------------------------------------------------------------------------
1164
+
1165
+ resource "aws_scheduler_schedule" "requester_memory_dreaming" {
1166
+ count = local.deploy_lambda_handlers ? 1 : 0
1167
+
1168
+ name = "thinkwork-${var.stage}-requester-memory-dreaming"
1169
+ group_name = "default"
1170
+ schedule_expression = var.requester_memory_dreaming_schedule_expression
1171
+ state = var.requester_memory_dreaming_enabled ? "ENABLED" : "DISABLED"
1172
+
1173
+ flexible_time_window {
1174
+ mode = "OFF"
1175
+ }
1176
+
1177
+ target {
1178
+ arn = aws_lambda_function.handler["requester-memory-dreaming"].arn
1179
+ role_arn = aws_iam_role.scheduler.arn
1180
+ }
1181
+ }
1182
+
1148
1183
  # ---------------------------------------------------------------------------
1149
1184
  # MCP approval TTL sweeper — daily auto-reject of pending rows > 30 days old
1150
1185
  # (plan §U11). A plugin whose MCP sat uncurated for a month is stale: clear
@@ -159,6 +159,30 @@ variable "extension_proxy_backends_json" {
159
159
  default = "{}"
160
160
  }
161
161
 
162
+ variable "requester_idle_memory_learning_enabled" {
163
+ description = "Enable requester-scoped 15-minute idle memory learning."
164
+ type = bool
165
+ default = false
166
+ }
167
+
168
+ variable "requester_memory_dreaming_enabled" {
169
+ description = "Enable recurring requester memory dreaming sweeps."
170
+ type = bool
171
+ default = false
172
+ }
173
+
174
+ variable "requester_memory_dreaming_schedule_expression" {
175
+ description = "EventBridge Scheduler expression for requester memory dreaming sweeps."
176
+ type = string
177
+ default = "cron(30 4 * * ? *)"
178
+ }
179
+
180
+ variable "requester_memory_dreaming_model_id" {
181
+ description = "Bedrock Converse model id for requester memory REM reflection."
182
+ type = string
183
+ default = "openai.gpt-oss-120b-1:0"
184
+ }
185
+
162
186
  variable "extension_proxy_signing_secret" {
163
187
  description = "Shared HMAC secret used by the generic Admin extension proxy to sign actor context for extension backends."
164
188
  type = string
@@ -322,45 +322,49 @@ module "api" {
322
322
 
323
323
  kb_service_role_arn = module.bedrock_kb.kb_service_role_arn
324
324
 
325
- lambda_zips_dir = var.lambda_zips_dir
326
- api_auth_secret = var.api_auth_secret
327
- db_password = var.db_password
328
- agentcore_function_name = module.agentcore.agentcore_function_name
329
- agentcore_flue_function_name = module.agentcore_flue.agentcore_flue_function_name
330
- agentcore_function_arn = module.agentcore.agentcore_function_arn
331
- agentcore_flue_function_arn = module.agentcore_flue.agentcore_flue_function_arn
332
- hindsight_endpoint = local.hindsight_enabled ? module.hindsight[0].hindsight_endpoint : ""
333
- agentcore_memory_id = module.agentcore_memory.memory_id
334
- memory_engine = local.resolved_memory_engine
335
- admin_url = var.admin_domain != "" ? "https://${var.admin_domain}" : "https://${module.admin_site.distribution_domain}"
336
- docs_url = "https://${module.docs_site.distribution_domain}"
337
- www_url = var.www_domain != "" ? "https://${var.www_domain}" : "https://${module.www_site.distribution_domain}"
338
- stripe_price_ids_json = var.stripe_price_ids_json
339
- appsync_realtime_url = module.appsync.graphql_realtime_url
340
- ecr_repository_url = module.agentcore.ecr_repository_url
341
- job_scheduler_role_arn = module.job_triggers.job_scheduler_role_arn
342
- routines_execution_role_arn = module.routines_stepfunctions.execution_role_arn
343
- routines_log_group_arn = module.routines_stepfunctions.log_group_arn
344
- agentcore_code_interpreter_id = var.agentcore_code_interpreter_id
345
- wiki_compile_model_id = var.wiki_compile_model_id
346
- company_brain_source_agent_model_id = var.company_brain_source_agent_model_id
347
- wiki_aggregation_pass_enabled = var.wiki_aggregation_pass_enabled
348
- wiki_deterministic_linking_enabled = var.wiki_deterministic_linking_enabled
349
- google_places_api_key = var.google_places_api_key
350
- enable_workspace_orchestration = var.enable_workspace_orchestration
351
- computer_runtime_cluster_name = module.computer_runtime.cluster_name
352
- computer_runtime_cluster_arn = module.computer_runtime.cluster_arn
353
- computer_runtime_efs_file_system_id = module.computer_runtime.efs_file_system_id
354
- computer_runtime_subnet_ids = module.computer_runtime.task_subnet_ids
355
- computer_runtime_assign_public_ip = module.computer_runtime.assign_public_ip
356
- computer_runtime_task_sg_id = module.computer_runtime.task_security_group_id
357
- computer_runtime_execution_role_arn = module.computer_runtime.execution_role_arn
358
- computer_runtime_task_role_arn = module.computer_runtime.task_role_arn
359
- computer_runtime_log_group_name = module.computer_runtime.log_group_name
360
- computer_runtime_repository_url = module.computer_runtime.repository_url
361
- computer_runtime_default_cpu = module.computer_runtime.default_cpu
362
- computer_runtime_default_memory = module.computer_runtime.default_memory
363
- computer_runtime_manager_policy_arn = module.computer_runtime.manager_policy_arn
325
+ lambda_zips_dir = var.lambda_zips_dir
326
+ api_auth_secret = var.api_auth_secret
327
+ db_password = var.db_password
328
+ agentcore_function_name = module.agentcore.agentcore_function_name
329
+ agentcore_flue_function_name = module.agentcore_flue.agentcore_flue_function_name
330
+ agentcore_function_arn = module.agentcore.agentcore_function_arn
331
+ agentcore_flue_function_arn = module.agentcore_flue.agentcore_flue_function_arn
332
+ hindsight_endpoint = local.hindsight_enabled ? module.hindsight[0].hindsight_endpoint : ""
333
+ agentcore_memory_id = module.agentcore_memory.memory_id
334
+ memory_engine = local.resolved_memory_engine
335
+ admin_url = var.admin_domain != "" ? "https://${var.admin_domain}" : "https://${module.admin_site.distribution_domain}"
336
+ docs_url = "https://${module.docs_site.distribution_domain}"
337
+ www_url = var.www_domain != "" ? "https://${var.www_domain}" : "https://${module.www_site.distribution_domain}"
338
+ stripe_price_ids_json = var.stripe_price_ids_json
339
+ appsync_realtime_url = module.appsync.graphql_realtime_url
340
+ ecr_repository_url = module.agentcore.ecr_repository_url
341
+ job_scheduler_role_arn = module.job_triggers.job_scheduler_role_arn
342
+ routines_execution_role_arn = module.routines_stepfunctions.execution_role_arn
343
+ routines_log_group_arn = module.routines_stepfunctions.log_group_arn
344
+ agentcore_code_interpreter_id = var.agentcore_code_interpreter_id
345
+ wiki_compile_model_id = var.wiki_compile_model_id
346
+ company_brain_source_agent_model_id = var.company_brain_source_agent_model_id
347
+ wiki_aggregation_pass_enabled = var.wiki_aggregation_pass_enabled
348
+ wiki_deterministic_linking_enabled = var.wiki_deterministic_linking_enabled
349
+ google_places_api_key = var.google_places_api_key
350
+ enable_workspace_orchestration = var.enable_workspace_orchestration
351
+ requester_idle_memory_learning_enabled = var.requester_idle_memory_learning_enabled
352
+ requester_memory_dreaming_enabled = var.requester_memory_dreaming_enabled
353
+ requester_memory_dreaming_schedule_expression = var.requester_memory_dreaming_schedule_expression
354
+ requester_memory_dreaming_model_id = var.requester_memory_dreaming_model_id
355
+ computer_runtime_cluster_name = module.computer_runtime.cluster_name
356
+ computer_runtime_cluster_arn = module.computer_runtime.cluster_arn
357
+ computer_runtime_efs_file_system_id = module.computer_runtime.efs_file_system_id
358
+ computer_runtime_subnet_ids = module.computer_runtime.task_subnet_ids
359
+ computer_runtime_assign_public_ip = module.computer_runtime.assign_public_ip
360
+ computer_runtime_task_sg_id = module.computer_runtime.task_security_group_id
361
+ computer_runtime_execution_role_arn = module.computer_runtime.execution_role_arn
362
+ computer_runtime_task_role_arn = module.computer_runtime.task_role_arn
363
+ computer_runtime_log_group_name = module.computer_runtime.log_group_name
364
+ computer_runtime_repository_url = module.computer_runtime.repository_url
365
+ computer_runtime_default_cpu = module.computer_runtime.default_cpu
366
+ computer_runtime_default_memory = module.computer_runtime.default_memory
367
+ computer_runtime_manager_policy_arn = module.computer_runtime.manager_policy_arn
364
368
 
365
369
  # workspace-files-efs sidecar: VPC-attached Lambda that reads any Computer's
366
370
  # workspace files directly off the shared EFS (bypasses the
@@ -407,9 +411,10 @@ module "agentcore" {
407
411
  region = var.region
408
412
  bucket_name = module.s3.bucket_name
409
413
 
410
- hindsight_endpoint = local.hindsight_enabled ? module.hindsight[0].hindsight_endpoint : ""
411
- agentcore_memory_id = module.agentcore_memory.memory_id
412
- memory_engine = local.resolved_memory_engine
414
+ hindsight_endpoint = local.hindsight_enabled ? module.hindsight[0].hindsight_endpoint : ""
415
+ agentcore_memory_id = module.agentcore_memory.memory_id
416
+ memory_engine = local.resolved_memory_engine
417
+ requester_idle_memory_learning_enabled = var.requester_idle_memory_learning_enabled
413
418
 
414
419
  # Threaded through so the container's run_skill_dispatch can POST
415
420
  # terminal state back to /api/skills/complete. The lambda-api module
@@ -440,9 +445,10 @@ module "agentcore_flue" {
440
445
  ecr_repository_url = module.agentcore.ecr_repository_url
441
446
  async_dlq_arn = module.agentcore.agentcore_async_dlq_arn
442
447
 
443
- hindsight_endpoint = local.hindsight_enabled ? module.hindsight[0].hindsight_endpoint : ""
444
- agentcore_memory_id = module.agentcore_memory.memory_id
445
- memory_engine = local.resolved_memory_engine
448
+ hindsight_endpoint = local.hindsight_enabled ? module.hindsight[0].hindsight_endpoint : ""
449
+ agentcore_memory_id = module.agentcore_memory.memory_id
450
+ memory_engine = local.resolved_memory_engine
451
+ requester_idle_memory_learning_enabled = var.requester_idle_memory_learning_enabled
446
452
 
447
453
  api_endpoint = module.api.api_endpoint
448
454
  api_auth_secret = var.api_auth_secret
@@ -185,6 +185,30 @@ variable "enable_workspace_orchestration" {
185
185
  default = false
186
186
  }
187
187
 
188
+ variable "requester_idle_memory_learning_enabled" {
189
+ description = "Enable requester-scoped 15-minute idle memory learning."
190
+ type = bool
191
+ default = false
192
+ }
193
+
194
+ variable "requester_memory_dreaming_enabled" {
195
+ description = "Enable recurring requester memory dreaming sweeps."
196
+ type = bool
197
+ default = false
198
+ }
199
+
200
+ variable "requester_memory_dreaming_schedule_expression" {
201
+ description = "EventBridge Scheduler expression for requester memory dreaming sweeps."
202
+ type = string
203
+ default = "cron(30 4 * * ? *)"
204
+ }
205
+
206
+ variable "requester_memory_dreaming_model_id" {
207
+ description = "Bedrock Converse model id for requester memory REM reflection."
208
+ type = string
209
+ default = "openai.gpt-oss-120b-1:0"
210
+ }
211
+
188
212
  # ---------------------------------------------------------------------------
189
213
  # Naming / Buckets
190
214
  # ---------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkwork-cli",
3
- "version": "0.12.4",
3
+ "version": "0.12.6",
4
4
  "description": "Thinkwork CLI — deploy, manage, and interact with your Thinkwork stack",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",