New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(agent): respect Agent.status
and Agent.channel.endpoint.status
being off
#4523
feat(agent): respect Agent.status
and Agent.channel.endpoint.status
being off
#4523
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
d131d32
to
6706214
Compare
Agent
and Agent.channel.endpoint
status being off
Agent.status
and Agent.channel.endpoint.status
being off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks @ThatOneBro ! 🙏
As discussed offline, in Medplum v4, we should review the value set for Agent.status
. I think this looks good for now.
Bunch of minor nitpicky comments. Overall structure looks good to me 👍
// We will remove the channels that are left over -- channels that are not part of the new config | ||
for (const definition of channels) { | ||
pendingRemoval.delete(definition.name); | ||
const filteredChannels = [] as AgentChannel[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like filteredChannels
or filteredEndpoints
is used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah you're right. I think there's technically a bug here, and we should be using the filtered arrays instead of only filtering channels. Going to add a test for multiple channels to catch this
@@ -197,7 +199,7 @@ describe('Agent Net Utils', () => { | |||
await expect(messageReceived).resolves.toMatchObject<Partial<AgentTransmitResponse>>({ | |||
type: 'agent:transmit:response', | |||
contentType: ContentType.TEXT, | |||
statusCode: 500, | |||
statusCode: 400, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, ty 🙏
@@ -1,5 +1,5 @@ | |||
import { Hl7Message } from '@medplum/core'; | |||
import { connect } from 'net'; | |||
import { connect } from 'node:net'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -114,3 +121,17 @@ async function pushToAgent(req: Request): Promise<[OperationOutcome] | [Operatio | |||
// 1. The agent will respond with a message on the channel | |||
// 2. The timer will expire and the request will timeout | |||
} | |||
|
|||
function validateParams(params: AgentPushParameters): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mental note, as discussed offline, in the future these checks should be handled by parseParameters()
for required fields.
Co-authored-by: Cody Ebberson <cody@ebberson.com>
Co-authored-by: Cody Ebberson <cody@ebberson.com>
Quality Gate passedIssues Measures |
Fix age display in PatientSummary (#4484)Fixes #4471 - DetectedIssue.status valueset and search param (#4483) Qualify columns with table name in generated SQL (#4487) fix(migrations): only take lock if migrating (#4490) Document updating profiles (#4402) Run expand tests against old and new (#4503) Adding OpenCareHub support post (#4504) [Medplum Provider app] Various fixes and touchups (#4500) ci(agent): add workflow for building agent outside of a release (#4512) feat(agent): `Agent/$reload-config` operation (#4457) Remove broken links to Foo Provider (#4518) Dependency upgrades 2024-05-06 (#4515) PatientSummary and provider app tweaks (#4521) Fixes #4509 - Improve exact match search support for token parameters in `matchesTokenFilter` (#4516) Link to new Demo Applications (#4514) Clarify that autobatching only applies to `GET` requests (#4479) Added missing useEffect dependency in chat demo (#4527) fix: allows CORS for `keyvalue` API (#4476) Fixes #4508 - MeasureReport-subject search param backport (#4530) Fix CLI update-server version flag (#4534) Patient summary appointments and encounters links (#4524) Remove unused DB columns (#4532) fix(agent): unwrap response for `$reload-config` by id (#4542) `PatientSummary` Problem List uses US Core profile (#4535) fix(cli): always exit with exit code 1 after error occurs during command (#4536) Add failing test about validating nested extensions (#4548) Add error message when `cli` fails on login (#4507) Remove functions moved to core (#4547) fix: AttachmentDisplay use uncached url for download link (#4501) feat(agent): respect `Agent.status` and `Agent.channel.endpoint.status` being `off` (#4523) CMS 1500 and Superbill (#4543) Demo Bot: Agent Setup (#4555) feat(Subscription): add `author` as a `SearchParameter` (#4540) Dependency upgrades 2024-05-13 (#4544) Full linked Project ordering in CodeSystem lookup (#4522) Disable super admin refresh tokens (#4492) Minor fixes for the agent setup bot (#4560) docs(agent): document how logging works with `Bot` and `Agent` (#4563) Split rate limits into two buckets (#4568) Properly detect array elements (#4569) Apply filter to ValueSet with expansion.contains (#4570) More efficiently validate included concepts (#4573) Dependency upgrades 2024-05-20 (#4574) tweak(agent): add timezone in status `lastUpdated` time (#4564) fix(client/keyvalue): set keyvalue content-type text (#4575) Allow configuring server default rate limits (#4491) feat(cli): add `token` command to get access token (#4579) Updating device resources and videos (#4578) fix(subscriptions): don't retry ws subs if sub is deleted (#4577) Add support for 'pr' filter operation (#4584) Super admin endpoint for database stats (#4443)
Fix age display in PatientSummary (#4484)Fixes #4471 - DetectedIssue.status valueset and search param (#4483) Qualify columns with table name in generated SQL (#4487) fix(migrations): only take lock if migrating (#4490) Document updating profiles (#4402) Run expand tests against old and new (#4503) Adding OpenCareHub support post (#4504) [Medplum Provider app] Various fixes and touchups (#4500) ci(agent): add workflow for building agent outside of a release (#4512) feat(agent): `Agent/$reload-config` operation (#4457) Remove broken links to Foo Provider (#4518) Dependency upgrades 2024-05-06 (#4515) PatientSummary and provider app tweaks (#4521) Fixes #4509 - Improve exact match search support for token parameters in `matchesTokenFilter` (#4516) Link to new Demo Applications (#4514) Clarify that autobatching only applies to `GET` requests (#4479) Added missing useEffect dependency in chat demo (#4527) fix: allows CORS for `keyvalue` API (#4476) Fixes #4508 - MeasureReport-subject search param backport (#4530) Fix CLI update-server version flag (#4534) Patient summary appointments and encounters links (#4524) Remove unused DB columns (#4532) fix(agent): unwrap response for `$reload-config` by id (#4542) `PatientSummary` Problem List uses US Core profile (#4535) fix(cli): always exit with exit code 1 after error occurs during command (#4536) Add failing test about validating nested extensions (#4548) Add error message when `cli` fails on login (#4507) Remove functions moved to core (#4547) fix: AttachmentDisplay use uncached url for download link (#4501) feat(agent): respect `Agent.status` and `Agent.channel.endpoint.status` being `off` (#4523) CMS 1500 and Superbill (#4543) Demo Bot: Agent Setup (#4555) feat(Subscription): add `author` as a `SearchParameter` (#4540) Dependency upgrades 2024-05-13 (#4544) Full linked Project ordering in CodeSystem lookup (#4522) Disable super admin refresh tokens (#4492) Minor fixes for the agent setup bot (#4560) docs(agent): document how logging works with `Bot` and `Agent` (#4563) Split rate limits into two buckets (#4568) Properly detect array elements (#4569) Apply filter to ValueSet with expansion.contains (#4570) More efficiently validate included concepts (#4573) Dependency upgrades 2024-05-20 (#4574) tweak(agent): add timezone in status `lastUpdated` time (#4564) fix(client/keyvalue): set keyvalue content-type text (#4575) Allow configuring server default rate limits (#4491) feat(cli): add `token` command to get access token (#4579) Updating device resources and videos (#4578) fix(subscriptions): don't retry ws subs if sub is deleted (#4577) Add support for 'pr' filter operation (#4584) Super admin endpoint for database stats (#4443)
Fixes #4460
Fixes #4459